@univerjs/slides-ui 0.8.0-beta.0 → 0.8.0-nightly.202505271607
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 +2 -2
- package/lib/es/index.js +642 -649
- package/lib/index.js +642 -649
- package/lib/types/controllers/image.menu.d.ts +0 -1
- package/lib/types/controllers/shape.menu.d.ts +1 -2
- package/lib/types/controllers/text.menu.d.ts +0 -1
- package/lib/types/views/editor-container/EditorContainer.d.ts +16 -6
- package/lib/umd/index.js +2 -2
- package/package.json +10 -10
- package/LICENSE +0 -176
package/lib/es/index.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var S = (n, e, t) =>
|
|
4
|
-
import { Inject as
|
|
5
|
-
import { IRenderManagerService as
|
|
6
|
-
import { ObjectProvider as
|
|
7
|
-
import { useDependency as
|
|
8
|
-
import { jsxs as
|
|
9
|
-
import { Button as Se, clsx as K, Dropdown as
|
|
10
|
-
import
|
|
11
|
-
import { BehaviorSubject as J, Subject as Nt, filter as
|
|
12
|
-
import { DocSelectionManagerService as
|
|
13
|
-
import { IEditorService as
|
|
14
|
-
import { DRAWING_IMAGE_ALLOW_IMAGE_LIST as
|
|
15
|
-
var
|
|
16
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1
|
+
var ni = Object.defineProperty;
|
|
2
|
+
var ri = (n, e, t) => e in n ? ni(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var S = (n, e, t) => ri(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { Inject as Z, Injector as ke, IUniverInstanceService as w, RxDisposable as ge, UniverInstanceType as E, debounce as si, getColorStyle as oi, CommandType as D, Tools as ci, LocaleService as Q, ICommandService as U, generateRandomId as Ct, BasicShapes as ai, PageElementType as ze, Disposable as De, DisposableCollection as Ke, IContextService as fe, toDisposable as St, FOCUSING_COMMON_DRAWINGS as li, createInternalEditorID as di, createIdentifier as It, EDITOR_ACTIVATED as Re, FOCUSING_EDITOR_STANDALONE as bt, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE as Et, DocumentDataModel as ui, HorizontalAlign as xt, VerticalAlign as Oe, IUndoRedoService as hi, WrapStrategy as et, FOCUSING_EDITOR_BUT_HIDDEN as vi, DEFAULT_EMPTY_DOCUMENT_VALUE as gi, Direction as j, DocumentFlavor as fi, FOCUSING_UNIVER_EDITOR as Rt, FORMULA_EDITOR_ACTIVATED as pi, Plugin as mi, merge as _i, mergeOverrideWithDependencies as tt, IConfigService as Ci } from "@univerjs/core";
|
|
5
|
+
import { IRenderManagerService as X, Viewport as it, ScrollBar as Ot, getCurrentTypeOfRenderer as Le, Slide as Si, Rect as wt, Scene as Ii, ObjectType as le, pxToNum as bi, DeviceInputEventType as q, convertTextRotation as nt, FIX_ONE_PIXEL_BLUR_OFFSET as ne, fixLineWidthByScale as rt } from "@univerjs/engine-render";
|
|
6
|
+
import { ObjectProvider as Ei, SLIDE_KEY as re } from "@univerjs/slides";
|
|
7
|
+
import { useDependency as O, ISidebarService as yt, ICanvasPopupService as xi, ILayoutService as Ri, KeyCode as y, ILocalFileService as Oi, useObservable as wi, DISABLE_AUTO_FOCUS_KEY as st, getMenuHiddenObservable as pe, MenuItemType as me, RibbonStartGroup as yi, MetaKeys as Pi, IMenuManagerService as Ti, ComponentManager as Mi, IUIPartsService as Ni, IShortcutService as Di, BuiltInUIPart as ot, connectInjector as ct } from "@univerjs/ui";
|
|
8
|
+
import { jsxs as x, jsx as u } from "react/jsx-runtime";
|
|
9
|
+
import { Button as Se, clsx as K, Dropdown as Pt, ColorPicker as Ui, borderTopClassName as Tt, InputNumber as ae, borderClassName as ue, scrollbarClassName as Vi } from "@univerjs/design";
|
|
10
|
+
import { forwardRef as F, useRef as Mt, createElement as W, useState as $, useEffect as he, useMemo as ji, createRef as Ai, useCallback as at } from "react";
|
|
11
|
+
import { BehaviorSubject as J, Subject as Nt, filter as Li, takeUntil as lt } from "rxjs";
|
|
12
|
+
import { DocSelectionManagerService as Bi, DocSkeletonManagerService as dt, RichTextEditingMutation as $i } from "@univerjs/docs";
|
|
13
|
+
import { IEditorService as Ze, DocSelectionRenderService as ut, VIEWPORT_KEY as ht, DOCS_COMPONENT_MAIN_LAYER_INDEX as Hi, MoveSelectionOperation as Fi, MoveCursorOperation as Wi, DOCS_VIEW_KEY as ki, DeleteLeftCommand as zi } from "@univerjs/docs-ui";
|
|
14
|
+
import { DRAWING_IMAGE_ALLOW_IMAGE_LIST as Ki, IImageIoService as Zi, getImageSize as Xi } from "@univerjs/drawing";
|
|
15
|
+
var Gi = Object.getOwnPropertyDescriptor, Yi = (n, e, t, i) => {
|
|
16
|
+
for (var r = i > 1 ? void 0 : i ? Gi(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
17
17
|
(o = n[s]) && (r = o(r) || r);
|
|
18
18
|
return r;
|
|
19
19
|
}, Ue = (n, e) => (t, i) => e(t, i, n);
|
|
20
|
-
let
|
|
20
|
+
let ve = class extends ge {
|
|
21
21
|
constructor(e, t, i, r) {
|
|
22
22
|
super();
|
|
23
23
|
S(this, "_objectProvider", null);
|
|
24
|
-
S(this, "_refreshThumb",
|
|
24
|
+
S(this, "_refreshThumb", si(() => {
|
|
25
25
|
this.createThumbs();
|
|
26
26
|
}, 300));
|
|
27
|
-
this._renderContext = e, this._injector = t, this._univerInstanceService = i, this._renderManagerService = r, this._objectProvider = this._injector.createInstance(
|
|
27
|
+
this._renderContext = e, this._injector = t, this._univerInstanceService = i, this._renderManagerService = r, this._objectProvider = this._injector.createInstance(Ei), this._addNewRender();
|
|
28
28
|
}
|
|
29
29
|
_addNewRender() {
|
|
30
30
|
const { unitId: e, engine: t, scene: i } = this._renderContext, r = this._getCurrUnitModel();
|
|
@@ -46,61 +46,61 @@ let ge = class extends ve {
|
|
|
46
46
|
explicitViewportHeightSet: !1,
|
|
47
47
|
isWheelPreventDefaultX: !0
|
|
48
48
|
});
|
|
49
|
-
i.attachControl(), i.onMouseWheel$.subscribeEvent((
|
|
50
|
-
const l =
|
|
49
|
+
i.attachControl(), i.onMouseWheel$.subscribeEvent((a, h) => {
|
|
50
|
+
const l = a;
|
|
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
|
|
61
|
-
this._renderContext.mainComponent =
|
|
59
|
+
}), Ot.attachTo(o);
|
|
60
|
+
const c = this._createSlide(i);
|
|
61
|
+
this._renderContext.mainComponent = c, this._createSlidePages(r, c), this.createThumbs(), t.runRenderLoop(() => {
|
|
62
62
|
i.render();
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
_scrollToCenter() {
|
|
66
|
-
var
|
|
67
|
-
const e = (
|
|
66
|
+
var a;
|
|
67
|
+
const e = (a = this._currentRender()) == null ? void 0 : a.scene, t = e == null ? void 0 : e.getViewport(re.VIEW), i = this._getCenterPositionViewPort(e);
|
|
68
68
|
if (!t || !i) return;
|
|
69
|
-
const { left: r, top: s } = i, { x: o, y:
|
|
69
|
+
const { left: r, top: s } = i, { x: o, y: c } = t.transViewportScroll2ScrollValue(r, s);
|
|
70
70
|
t.scrollToBarPos({
|
|
71
71
|
x: o,
|
|
72
|
-
y:
|
|
72
|
+
y: c
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
75
|
_currentRender() {
|
|
76
|
-
return
|
|
76
|
+
return Le(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: i, height: r } = e, s = t.getPageSize(), { width: o = 100, height:
|
|
82
|
+
const t = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE), { width: i, height: r } = e, s = t.getPageSize(), { width: o = 100, height: c = 100 } = s, a = new Si(re.COMPONENT, {
|
|
83
83
|
left: (i - o) / 2,
|
|
84
|
-
top: (r -
|
|
84
|
+
top: (r - c) / 2,
|
|
85
85
|
width: o,
|
|
86
|
-
height:
|
|
86
|
+
height: c,
|
|
87
87
|
zIndex: 10
|
|
88
88
|
});
|
|
89
|
-
return
|
|
89
|
+
return a.enableSelectedClipElement(), e.addObject(a), a;
|
|
90
90
|
}
|
|
91
91
|
_addBackgroundRect(e, t) {
|
|
92
|
-
const r = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE).getPageSize(), { width: s = 0, height: o = 0 } = r,
|
|
92
|
+
const r = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE).getPageSize(), { width: s = 0, height: o = 0 } = r, c = new wt("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: oi(t) || "rgba(255,255,255,1)",
|
|
100
100
|
zIndex: 0,
|
|
101
101
|
evented: !1
|
|
102
102
|
});
|
|
103
|
-
e.addObject(
|
|
103
|
+
e.addObject(c, 0);
|
|
104
104
|
}
|
|
105
105
|
_getCenterPositionViewPort(e) {
|
|
106
106
|
if (!e) return { left: 0, top: 0 };
|
|
@@ -117,8 +117,8 @@ let ge = class extends ve {
|
|
|
117
117
|
const { engine: r } = i;
|
|
118
118
|
if (r == null)
|
|
119
119
|
return;
|
|
120
|
-
const { width: s, height: o } = t, { width:
|
|
121
|
-
t.renderToThumb(h, e,
|
|
120
|
+
const { width: s, height: o } = t, { width: c = s, height: a = o } = r, h = r.getCanvas().getContext();
|
|
121
|
+
t.renderToThumb(h, e, c / s, a / o);
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
124
|
* CreateScene by pages, and activate first one.
|
|
@@ -129,8 +129,8 @@ let ge = class extends ve {
|
|
|
129
129
|
const i = e.getPages(), r = e.getPageOrder();
|
|
130
130
|
if (!(!i || !r) && r.length !== 0) {
|
|
131
131
|
for (let s = 0, o = r.length; s < o; s++) {
|
|
132
|
-
const
|
|
133
|
-
this.createPageScene(
|
|
132
|
+
const c = r[s];
|
|
133
|
+
this.createPageScene(c, i[c]), this._createThumb(c);
|
|
134
134
|
}
|
|
135
135
|
t.activeFirstPage();
|
|
136
136
|
}
|
|
@@ -151,17 +151,17 @@ let ge = class extends ve {
|
|
|
151
151
|
if (t)
|
|
152
152
|
r = i.getPage(t);
|
|
153
153
|
else {
|
|
154
|
-
const
|
|
155
|
-
if (h == null ||
|
|
154
|
+
const a = i.getPages(), h = i.getPageOrder();
|
|
155
|
+
if (h == null || a == null)
|
|
156
156
|
return;
|
|
157
|
-
r =
|
|
157
|
+
r = a[h[0]], t = r.id;
|
|
158
158
|
}
|
|
159
159
|
const s = this._currentRender();
|
|
160
160
|
if (r == null || s == null || s.mainComponent == null)
|
|
161
161
|
return;
|
|
162
|
-
const { id: o } = r,
|
|
163
|
-
if (i.setActivePage(r),
|
|
164
|
-
|
|
162
|
+
const { id: o } = r, c = s.mainComponent;
|
|
163
|
+
if (i.setActivePage(r), c != null && c.hasPage(o)) {
|
|
164
|
+
c.changePage(o);
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
167
|
this.createPageScene(o, r);
|
|
@@ -183,9 +183,9 @@ let ge = class extends ve {
|
|
|
183
183
|
const i = this._renderContext;
|
|
184
184
|
if (!i || !this._objectProvider)
|
|
185
185
|
return;
|
|
186
|
-
const { scene: r, mainComponent: s } = i, o = s, { width:
|
|
187
|
-
width:
|
|
188
|
-
height:
|
|
186
|
+
const { scene: r, mainComponent: s } = i, o = s, { width: c, height: a } = o, h = new Ii(e, o, {
|
|
187
|
+
width: c,
|
|
188
|
+
height: a
|
|
189
189
|
});
|
|
190
190
|
new it(`PageViewer_${e}`, h, {
|
|
191
191
|
left: 0,
|
|
@@ -195,15 +195,15 @@ let ge = class extends ve {
|
|
|
195
195
|
explicitViewportWidthSet: !1,
|
|
196
196
|
explicitViewportHeightSet: !1
|
|
197
197
|
}).closeClip();
|
|
198
|
-
const { pageElements: d, pageBackgroundFill:
|
|
199
|
-
if (!
|
|
200
|
-
this._addBackgroundRect(h,
|
|
198
|
+
const { pageElements: d, pageBackgroundFill: g } = t, m = this._objectProvider.convertToRenderObjects(d, r);
|
|
199
|
+
if (!m || !o) return;
|
|
200
|
+
this._addBackgroundRect(h, g), h.addObjects(m), h.initTransformer(), m.forEach((f) => {
|
|
201
201
|
h.attachTransformerTo(f);
|
|
202
202
|
});
|
|
203
|
-
const
|
|
204
|
-
return
|
|
203
|
+
const p = h.getTransformer();
|
|
204
|
+
return p == null || p.changeEnd$.subscribe(() => {
|
|
205
205
|
this._thumbSceneRender(e, o);
|
|
206
|
-
}),
|
|
206
|
+
}), p == null || p.clearControl$.subscribe(() => {
|
|
207
207
|
this._thumbSceneRender(e, o);
|
|
208
208
|
}), o.addPageScene(h), h;
|
|
209
209
|
}
|
|
@@ -249,22 +249,22 @@ let ge = class extends ve {
|
|
|
249
249
|
s && o && s.addPageScene(o), e.appendPage(t), e.setActivePage(t);
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
|
-
|
|
253
|
-
Ue(1,
|
|
254
|
-
Ue(2,
|
|
255
|
-
Ue(3,
|
|
256
|
-
],
|
|
257
|
-
var
|
|
258
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
252
|
+
ve = Yi([
|
|
253
|
+
Ue(1, Z(ke)),
|
|
254
|
+
Ue(2, w),
|
|
255
|
+
Ue(3, X)
|
|
256
|
+
], ve);
|
|
257
|
+
var qi = Object.getOwnPropertyDescriptor, Ji = (n, e, t, i) => {
|
|
258
|
+
for (var r = i > 1 ? void 0 : i ? qi(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
259
259
|
(o = n[s]) && (r = o(r) || r);
|
|
260
260
|
return r;
|
|
261
|
-
},
|
|
262
|
-
let T = class extends
|
|
261
|
+
}, Qi = (n, e) => (t, i) => e(t, i, n);
|
|
262
|
+
let T = class extends ge {
|
|
263
263
|
constructor(n) {
|
|
264
264
|
super(), this._renderManagerService = n;
|
|
265
265
|
}
|
|
266
266
|
_getSlideRenderControllerFromRenderUnit(n) {
|
|
267
|
-
return this._renderManagerService.getRenderById(n).with(
|
|
267
|
+
return this._renderManagerService.getRenderById(n).with(ve);
|
|
268
268
|
}
|
|
269
269
|
createThumbs(n) {
|
|
270
270
|
this._getSlideRenderControllerFromRenderUnit(n).createThumbs();
|
|
@@ -291,15 +291,15 @@ let T = class extends ve {
|
|
|
291
291
|
this._getSlideRenderControllerFromRenderUnit(n).appendPage();
|
|
292
292
|
}
|
|
293
293
|
};
|
|
294
|
-
T =
|
|
295
|
-
|
|
294
|
+
T = Ji([
|
|
295
|
+
Qi(0, X)
|
|
296
296
|
], T);
|
|
297
|
-
const
|
|
297
|
+
const en = "slides-ui.config", vt = {}, Dt = {
|
|
298
298
|
id: "slide.operation.delete-element",
|
|
299
299
|
type: D.OPERATION,
|
|
300
300
|
handler: (n, e) => {
|
|
301
301
|
if (!(e != null && e.id)) return !1;
|
|
302
|
-
const t = e.unitId, r = n.get(
|
|
302
|
+
const t = e.unitId, r = n.get(w).getUnit(t);
|
|
303
303
|
if (!r) return !1;
|
|
304
304
|
const s = r.getActivePage();
|
|
305
305
|
return delete s.pageElements[e.id], r.updatePage(s.id, s), n.get(T).removeObjectById(e.id, s.id, t), !0;
|
|
@@ -313,158 +313,150 @@ var N = function() {
|
|
|
313
313
|
}
|
|
314
314
|
return n;
|
|
315
315
|
}, N.apply(this, arguments);
|
|
316
|
-
},
|
|
316
|
+
}, tn = function(n, e) {
|
|
317
317
|
var t = {};
|
|
318
318
|
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && e.indexOf(i) < 0 && (t[i] = n[i]);
|
|
319
319
|
if (n != null && typeof Object.getOwnPropertySymbols == "function")
|
|
320
320
|
for (var r = 0, i = Object.getOwnPropertySymbols(n); r < i.length; r++)
|
|
321
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 = n.icon, i = n.id, r = n.className, s = n.extend, o =
|
|
325
|
-
return Ut(t, "".concat(i), { defIds: t.defIds, idSuffix:
|
|
323
|
+
}, k = F(function(n, e) {
|
|
324
|
+
var t = n.icon, i = n.id, r = n.className, s = n.extend, o = tn(n, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(i, " ").concat(r || "").trim(), a = Mt("_".concat(sn()));
|
|
325
|
+
return Ut(t, "".concat(i), { defIds: t.defIds, idSuffix: a.current }, N({ ref: e, className: c }, o), s);
|
|
326
326
|
});
|
|
327
327
|
function Ut(n, e, t, i, r) {
|
|
328
|
-
return
|
|
328
|
+
return W(n.tag, N(N({ key: e }, nn(n, t, r)), i), (rn(n, t).children || []).map(function(s, o) {
|
|
329
329
|
return Ut(s, "".concat(e, "-").concat(n.tag, "-").concat(o), t, void 0, r);
|
|
330
330
|
}));
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function nn(n, e, t) {
|
|
333
333
|
var i = N({}, n.attrs);
|
|
334
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
|
-
var o = s[0],
|
|
336
|
-
o === "mask" && typeof
|
|
335
|
+
var o = s[0], c = s[1];
|
|
336
|
+
o === "mask" && typeof c == "string" && (i[o] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
337
337
|
});
|
|
338
338
|
var r = e.defIds;
|
|
339
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
|
-
var o = s[0],
|
|
341
|
-
typeof
|
|
340
|
+
var o = s[0], c = s[1];
|
|
341
|
+
typeof c == "string" && (i[o] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
342
342
|
})), i;
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function rn(n, e) {
|
|
345
345
|
var t, i = e.defIds;
|
|
346
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
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
348
|
}) }) : n;
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function sn() {
|
|
351
351
|
return Math.random().toString(36).substring(2, 8);
|
|
352
352
|
}
|
|
353
|
-
|
|
354
|
-
var
|
|
355
|
-
return
|
|
356
|
-
id: "
|
|
353
|
+
k.displayName = "UniverIcon";
|
|
354
|
+
var on = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", 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.56377Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2.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.83647Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M9.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" } }] }, Vt = F(function(n, e) {
|
|
355
|
+
return W(k, Object.assign({}, n, {
|
|
356
|
+
id: "autofill-double-icon",
|
|
357
357
|
ref: e,
|
|
358
|
-
icon:
|
|
358
|
+
icon: on
|
|
359
359
|
}));
|
|
360
360
|
});
|
|
361
|
-
Vt.displayName = "
|
|
362
|
-
var
|
|
363
|
-
return
|
|
364
|
-
id: "
|
|
361
|
+
Vt.displayName = "AutofillDoubleIcon";
|
|
362
|
+
var cn = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", 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.8334C15.6045 1.94974 14.8881 1.2334 14.0045 1.2334H3.70449C2.82084 1.2334 2.10449 1.94974 2.10449 2.8334C2.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.8334C3.30449 2.61248 3.48358 2.4334 3.70449 2.4334H14.0045C14.2254 2.4334 14.4045 2.61249 14.4045 2.8334Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.1544 8.5999C15.038 8.5999 15.7544 7.88356 15.7544 6.9999C15.7544 6.11625 15.038 5.3999 14.1544 5.3999H3.85439C2.97074 5.3999 2.25439 6.11625 2.25439 6.9999C2.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.9999C3.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.7421C6.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.56641C9.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.7421C11.6631 11.9765 11.6631 12.3564 11.4288 12.5907L9.42923 14.5902" } }, { tag: "path", attrs: { fill: "currentColor", d: "M8.57975 14.5902C8.58121 14.5917 8.58268 14.5931 8.58416 14.5946C8.64077 14.6502 8.70566 14.6923 8.77482 14.7209C8.84557 14.7502 8.92314 14.7664 9.00449 14.7664C9.08585 14.7664 9.16342 14.7502 9.23416 14.7209C9.30332 14.6923 9.36821 14.6502 9.42482 14.5946" } }] }, jt = F(function(n, e) {
|
|
363
|
+
return W(k, Object.assign({}, n, {
|
|
364
|
+
id: "bottom-icon",
|
|
365
365
|
ref: e,
|
|
366
|
-
icon:
|
|
366
|
+
icon: cn
|
|
367
367
|
}));
|
|
368
368
|
});
|
|
369
|
-
jt.displayName = "
|
|
370
|
-
var
|
|
371
|
-
return
|
|
372
|
-
id: "
|
|
369
|
+
jt.displayName = "BottomIcon";
|
|
370
|
+
var an = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "g", attrs: { clipPath: "url(#graph-icon_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-icon_clip0_1293_28" }, children: [{ tag: "path", attrs: { fill: "white", d: "M0 0H16V16H0z", transform: "translate(.9)" } }] }] }], defIds: ["graph-icon_clip0_1293_28"] }, At = F(function(n, e) {
|
|
371
|
+
return W(k, Object.assign({}, n, {
|
|
372
|
+
id: "graph-icon",
|
|
373
373
|
ref: e,
|
|
374
|
-
icon:
|
|
374
|
+
icon: an
|
|
375
375
|
}));
|
|
376
376
|
});
|
|
377
|
-
|
|
378
|
-
var
|
|
379
|
-
return
|
|
380
|
-
id: "
|
|
377
|
+
At.displayName = "GraphIcon";
|
|
378
|
+
var ln = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", 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 = F(function(n, e) {
|
|
379
|
+
return W(k, Object.assign({}, n, {
|
|
380
|
+
id: "more-down-icon",
|
|
381
381
|
ref: e,
|
|
382
|
-
icon:
|
|
382
|
+
icon: ln
|
|
383
383
|
}));
|
|
384
384
|
});
|
|
385
|
-
|
|
386
|
-
var
|
|
387
|
-
return
|
|
388
|
-
id: "
|
|
385
|
+
Xe.displayName = "MoreDownIcon";
|
|
386
|
+
var dn = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", 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 = F(function(n, e) {
|
|
387
|
+
return W(k, Object.assign({}, n, {
|
|
388
|
+
id: "move-down-icon",
|
|
389
389
|
ref: e,
|
|
390
|
-
icon:
|
|
390
|
+
icon: dn
|
|
391
391
|
}));
|
|
392
392
|
});
|
|
393
|
-
|
|
394
|
-
var
|
|
395
|
-
return
|
|
396
|
-
id: "move-
|
|
393
|
+
Lt.displayName = "MoveDownIcon";
|
|
394
|
+
var un = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", 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" } }] }, Bt = F(function(n, e) {
|
|
395
|
+
return W(k, Object.assign({}, n, {
|
|
396
|
+
id: "move-up-icon",
|
|
397
397
|
ref: e,
|
|
398
|
-
icon:
|
|
399
|
-
}));
|
|
400
|
-
});
|
|
401
|
-
Bt.displayName = "MoveDownSingle";
|
|
402
|
-
var pn = { 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" } }] }, $t = A(function(n, e) {
|
|
403
|
-
return B($, Object.assign({}, n, {
|
|
404
|
-
id: "move-up-single",
|
|
405
|
-
ref: e,
|
|
406
|
-
icon: pn
|
|
398
|
+
icon: un
|
|
407
399
|
}));
|
|
408
400
|
});
|
|
409
|
-
|
|
410
|
-
var
|
|
411
|
-
return
|
|
412
|
-
id: "paint-bucket",
|
|
401
|
+
Bt.displayName = "MoveUpIcon";
|
|
402
|
+
var hn = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", 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" } }] }, $t = F(function(n, e) {
|
|
403
|
+
return W(k, Object.assign({}, n, {
|
|
404
|
+
id: "paint-bucket-double-icon",
|
|
413
405
|
ref: e,
|
|
414
|
-
icon:
|
|
406
|
+
icon: hn
|
|
415
407
|
}));
|
|
416
408
|
});
|
|
417
|
-
|
|
418
|
-
var
|
|
419
|
-
return
|
|
420
|
-
id: "text-
|
|
409
|
+
$t.displayName = "PaintBucketDoubleIcon";
|
|
410
|
+
var vn = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "g", attrs: { fill: "currentColor", clipPath: "url(#text-icon_clip0_1293_26)" }, children: [{ tag: "path", attrs: { d: "M2.22891 2.07227C1.89754 2.07227 1.62891 2.34089 1.62891 2.67227C1.62891 3.00364 1.89754 3.27227 2.22891 3.27227H6.29541V14.0056C6.29541 14.337 6.56404 14.6056 6.89541 14.6056C7.22678 14.6056 7.49541 14.337 7.49541 14.0056V3.27227H11.5622C11.8936 3.27227 12.1622 3.00364 12.1622 2.67227C12.1622 2.34089 11.8936 2.07227 11.5622 2.07227H2.22891Z" } }, { tag: "path", attrs: { d: "M10.2289 6.40552C9.89754 6.40552 9.62891 6.67415 9.62891 7.00552C9.62891 7.33689 9.89754 7.60552 10.2289 7.60552H12.2954V14.0055C12.2954 14.3369 12.564 14.6055 12.8954 14.6055C13.2268 14.6055 13.4954 14.3369 13.4954 14.0055V7.60552H15.5622C15.8936 7.60552 16.1622 7.33689 16.1622 7.00552C16.1622 6.67415 15.8936 6.40552 15.5622 6.40552H10.2289Z" } }] }, { tag: "defs", attrs: {}, children: [{ tag: "clipPath", attrs: { id: "text-icon_clip0_1293_26" }, children: [{ tag: "path", attrs: { fill: "white", d: "M0 0H16V16H0z", transform: "translate(.9)" } }] }] }], defIds: ["text-icon_clip0_1293_26"] }, Ht = F(function(n, e) {
|
|
411
|
+
return W(k, Object.assign({}, n, {
|
|
412
|
+
id: "text-icon",
|
|
421
413
|
ref: e,
|
|
422
|
-
icon:
|
|
414
|
+
icon: vn
|
|
423
415
|
}));
|
|
424
416
|
});
|
|
425
|
-
|
|
426
|
-
var
|
|
427
|
-
return
|
|
428
|
-
id: "topmost-
|
|
417
|
+
Ht.displayName = "TextIcon";
|
|
418
|
+
var gn = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", 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 9C15.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 9C2.70439 9.22091 2.88348 9.4 3.1044 9.4H13.4044C13.6253 9.4 13.8044 9.22091 13.8044 9C13.8044 8.77909 13.6253 8.6 13.4044 8.6H3.10439Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.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.1665C15.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.1665C2.8543 13.3874 3.03338 13.5665 3.2543 13.5665H13.5543C13.7752 13.5665 13.9543 13.3874 13.9543 13.1665C13.9543 12.9456 13.7752 12.7665 13.5543 12.7665H3.2543Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ft = F(function(n, e) {
|
|
419
|
+
return W(k, Object.assign({}, n, {
|
|
420
|
+
id: "topmost-icon",
|
|
429
421
|
ref: e,
|
|
430
|
-
icon:
|
|
422
|
+
icon: gn
|
|
431
423
|
}));
|
|
432
424
|
});
|
|
433
|
-
|
|
434
|
-
const
|
|
425
|
+
Ft.displayName = "TopmostIcon";
|
|
426
|
+
const H = {
|
|
435
427
|
id: "slide.operation.update-element",
|
|
436
428
|
type: D.OPERATION,
|
|
437
429
|
handler: (n, e) => {
|
|
438
|
-
const { oKey: t, props: i } = e, r = n.get(
|
|
430
|
+
const { oKey: t, props: i } = e, r = n.get(w), s = e == null ? void 0 : e.unitId, o = r.getUnit(s);
|
|
439
431
|
if (!o) return !1;
|
|
440
|
-
const
|
|
441
|
-
return
|
|
432
|
+
const c = o.getActivePage();
|
|
433
|
+
return c.pageElements[t] = ci.deepMerge(c.pageElements[t], i), o.updatePage(c.id, c), !0;
|
|
442
434
|
}
|
|
443
435
|
};
|
|
444
|
-
function
|
|
445
|
-
const { pageId: e, unitId: t } = n, i =
|
|
446
|
-
if (!a) return null;
|
|
447
|
-
const c = a.getTransformer();
|
|
436
|
+
function fn(n) {
|
|
437
|
+
const { pageId: e, unitId: t } = n, i = O(Q), r = O(T), s = O(U), o = r.getRenderUnitByPageId(e, t), c = o == null ? void 0 : o.scene;
|
|
448
438
|
if (!c) return null;
|
|
449
|
-
const
|
|
439
|
+
const a = c.getTransformer();
|
|
440
|
+
if (!a) return null;
|
|
441
|
+
const l = a.getSelectedObjectMap().values().next().value;
|
|
450
442
|
if (!l) return null;
|
|
451
|
-
const d = (
|
|
452
|
-
const
|
|
453
|
-
const
|
|
443
|
+
const d = (g) => {
|
|
444
|
+
const m = c.getAllObjects(), [p, f] = m.reduce(([_, I], b) => {
|
|
445
|
+
const P = b.zIndex, M = P < _ ? P : _, V = P > I ? P : I;
|
|
454
446
|
return [M, V];
|
|
455
447
|
}, [0, 0]);
|
|
456
|
-
let
|
|
457
|
-
|
|
458
|
-
zIndex:
|
|
459
|
-
}), s.executeCommand(
|
|
448
|
+
let v = l.zIndex;
|
|
449
|
+
g === 3 ? v = p - 1 : g === 2 ? v = f + 1 : g === 0 ? v = l.zIndex + 1 : g === 1 && (v = l.zIndex - 1), l.setProps({
|
|
450
|
+
zIndex: v
|
|
451
|
+
}), s.executeCommand(H.id, {
|
|
460
452
|
unitId: t,
|
|
461
453
|
oKey: l == null ? void 0 : l.oKey,
|
|
462
454
|
props: {
|
|
463
|
-
zIndex:
|
|
455
|
+
zIndex: v
|
|
464
456
|
}
|
|
465
457
|
});
|
|
466
458
|
};
|
|
467
|
-
return /* @__PURE__ */
|
|
459
|
+
return /* @__PURE__ */ x("div", { className: "univer-relative univer-w-full", children: [
|
|
468
460
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u(
|
|
469
461
|
"div",
|
|
470
462
|
{
|
|
@@ -472,14 +464,14 @@ function In(n) {
|
|
|
472
464
|
children: /* @__PURE__ */ u("div", { children: i.t("image-panel.arrange.title") })
|
|
473
465
|
}
|
|
474
466
|
) }),
|
|
475
|
-
/* @__PURE__ */
|
|
467
|
+
/* @__PURE__ */ x("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: [
|
|
476
468
|
/* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(Se, { onClick: () => {
|
|
477
469
|
d(
|
|
478
470
|
0
|
|
479
471
|
/* forward */
|
|
480
472
|
);
|
|
481
|
-
}, children: /* @__PURE__ */
|
|
482
|
-
/* @__PURE__ */ u(
|
|
473
|
+
}, children: /* @__PURE__ */ x("span", { className: "univer-flex univer-items-center univer-gap-1", children: [
|
|
474
|
+
/* @__PURE__ */ u(Bt, {}),
|
|
483
475
|
i.t("image-panel.arrange.forward")
|
|
484
476
|
] }) }) }),
|
|
485
477
|
/* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(Se, { onClick: () => {
|
|
@@ -487,19 +479,19 @@ function In(n) {
|
|
|
487
479
|
1
|
|
488
480
|
/* backward */
|
|
489
481
|
);
|
|
490
|
-
}, children: /* @__PURE__ */
|
|
491
|
-
/* @__PURE__ */ u(
|
|
482
|
+
}, children: /* @__PURE__ */ x("span", { className: "univer-flex univer-items-center univer-gap-1", children: [
|
|
483
|
+
/* @__PURE__ */ u(Lt, {}),
|
|
492
484
|
i.t("image-panel.arrange.backward")
|
|
493
485
|
] }) }) })
|
|
494
486
|
] }),
|
|
495
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ x("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: [
|
|
496
488
|
/* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(Se, { onClick: () => {
|
|
497
489
|
d(
|
|
498
490
|
2
|
|
499
491
|
/* front */
|
|
500
492
|
);
|
|
501
|
-
}, children: /* @__PURE__ */
|
|
502
|
-
/* @__PURE__ */ u(
|
|
493
|
+
}, children: /* @__PURE__ */ x("span", { className: "univer-flex univer-items-center univer-gap-1", children: [
|
|
494
|
+
/* @__PURE__ */ u(Ft, {}),
|
|
503
495
|
i.t("image-panel.arrange.front")
|
|
504
496
|
] }) }) }),
|
|
505
497
|
/* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(Se, { onClick: () => {
|
|
@@ -507,44 +499,44 @@ function In(n) {
|
|
|
507
499
|
3
|
|
508
500
|
/* back */
|
|
509
501
|
);
|
|
510
|
-
}, children: /* @__PURE__ */
|
|
511
|
-
/* @__PURE__ */ u(
|
|
502
|
+
}, children: /* @__PURE__ */ x("span", { className: "univer-flex univer-items-center univer-gap-1", children: [
|
|
503
|
+
/* @__PURE__ */ u(jt, {}),
|
|
512
504
|
i.t("image-panel.arrange.back")
|
|
513
505
|
] }) }) })
|
|
514
506
|
] })
|
|
515
507
|
] });
|
|
516
508
|
}
|
|
517
|
-
function
|
|
518
|
-
var
|
|
519
|
-
const { pageId: e, unitId: t } = n, i =
|
|
520
|
-
if (!a) return null;
|
|
521
|
-
const c = a.getTransformer();
|
|
509
|
+
function pn(n) {
|
|
510
|
+
var p, f;
|
|
511
|
+
const { pageId: e, unitId: t } = n, i = O(Q), r = O(T), s = O(U), o = r.getRenderUnitByPageId(e, t), c = o == null ? void 0 : o.scene;
|
|
522
512
|
if (!c) return null;
|
|
523
|
-
const
|
|
513
|
+
const a = c.getTransformer();
|
|
514
|
+
if (!a) return null;
|
|
515
|
+
const l = a.getSelectedObjectMap().values().next().value;
|
|
524
516
|
if (!l) return null;
|
|
525
|
-
const [d,
|
|
526
|
-
function
|
|
517
|
+
const [d, g] = $((f = (p = l.fill) == null ? void 0 : p.toString()) != null ? f : "");
|
|
518
|
+
function m(v) {
|
|
527
519
|
l == null || l.setProps({
|
|
528
|
-
fill:
|
|
529
|
-
}), s.executeCommand(
|
|
520
|
+
fill: v
|
|
521
|
+
}), s.executeCommand(H.id, {
|
|
530
522
|
unitId: t,
|
|
531
523
|
oKey: l == null ? void 0 : l.oKey,
|
|
532
524
|
props: {
|
|
533
525
|
shape: {
|
|
534
526
|
shapeProperties: {
|
|
535
527
|
shapeBackgroundFill: {
|
|
536
|
-
rgb:
|
|
528
|
+
rgb: v
|
|
537
529
|
}
|
|
538
530
|
}
|
|
539
531
|
}
|
|
540
532
|
}
|
|
541
|
-
}), v
|
|
533
|
+
}), g(v);
|
|
542
534
|
}
|
|
543
535
|
return /* @__PURE__ */ u(
|
|
544
536
|
"div",
|
|
545
537
|
{
|
|
546
538
|
className: K("univer-relative univer-bottom-0 univer-mt-5 univer-w-full", Tt),
|
|
547
|
-
children: /* @__PURE__ */
|
|
539
|
+
children: /* @__PURE__ */ x("div", { className: "univer-relative univer-w-full", children: [
|
|
548
540
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u(
|
|
549
541
|
"div",
|
|
550
542
|
{
|
|
@@ -553,18 +545,18 @@ function bn(n) {
|
|
|
553
545
|
}
|
|
554
546
|
) }),
|
|
555
547
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(
|
|
556
|
-
|
|
548
|
+
Pt,
|
|
557
549
|
{
|
|
558
550
|
overlay: /* @__PURE__ */ u("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ u(
|
|
559
|
-
|
|
551
|
+
Ui,
|
|
560
552
|
{
|
|
561
553
|
value: "#fff",
|
|
562
|
-
onChange:
|
|
554
|
+
onChange: m
|
|
563
555
|
}
|
|
564
556
|
) }),
|
|
565
|
-
children: /* @__PURE__ */
|
|
566
|
-
/* @__PURE__ */ u(
|
|
567
|
-
/* @__PURE__ */ u(
|
|
557
|
+
children: /* @__PURE__ */ x("a", { className: "univer-flex univer-cursor-pointer univer-items-center univer-gap-1", children: [
|
|
558
|
+
/* @__PURE__ */ u($t, { className: "univer-fill-primary-600" }),
|
|
559
|
+
/* @__PURE__ */ u(Xe, {})
|
|
568
560
|
] })
|
|
569
561
|
}
|
|
570
562
|
) }) })
|
|
@@ -572,77 +564,77 @@ function bn(n) {
|
|
|
572
564
|
}
|
|
573
565
|
);
|
|
574
566
|
}
|
|
575
|
-
function
|
|
576
|
-
const { pageId: e, unitId: t } = n, i =
|
|
577
|
-
if (!a) return null;
|
|
578
|
-
const c = a.getTransformer();
|
|
567
|
+
function mn(n) {
|
|
568
|
+
const { pageId: e, unitId: t } = n, i = O(Q), r = O(T), s = O(U), o = r.getRenderUnitByPageId(e, t), c = o == null ? void 0 : o.scene;
|
|
579
569
|
if (!c) return null;
|
|
580
|
-
const
|
|
570
|
+
const a = c.getTransformer();
|
|
571
|
+
if (!a) return null;
|
|
572
|
+
const l = a.getSelectedObjectMap().values().next().value;
|
|
581
573
|
if (!l) return null;
|
|
582
574
|
const {
|
|
583
575
|
width: d = 0,
|
|
584
|
-
height:
|
|
585
|
-
left:
|
|
586
|
-
top:
|
|
576
|
+
height: g = 0,
|
|
577
|
+
left: m = 0,
|
|
578
|
+
top: p = 0,
|
|
587
579
|
angle: f = 0
|
|
588
|
-
} = l, [
|
|
589
|
-
const { objects: oe } = C,
|
|
590
|
-
width:
|
|
591
|
-
height:
|
|
592
|
-
left:
|
|
593
|
-
top:
|
|
594
|
-
angle:
|
|
595
|
-
} =
|
|
596
|
-
_(
|
|
580
|
+
} = l, [v, _] = $(d), [I, b] = $(g), [P, M] = $(m), [V, R] = $(p), [z, se] = $(f), L = (C) => {
|
|
581
|
+
const { objects: oe } = C, ce = oe.values().next().value, {
|
|
582
|
+
width: Jt = 0,
|
|
583
|
+
height: Qt = 0,
|
|
584
|
+
left: ei = 0,
|
|
585
|
+
top: ti = 0,
|
|
586
|
+
angle: ii = 0
|
|
587
|
+
} = ce;
|
|
588
|
+
_(Jt), b(Qt), M(ei), R(ti), se(ii);
|
|
597
589
|
};
|
|
598
590
|
he(() => {
|
|
599
|
-
const C =
|
|
600
|
-
|
|
601
|
-
}), oe =
|
|
602
|
-
|
|
591
|
+
const C = a.changeStart$.subscribe((ce) => {
|
|
592
|
+
L(ce);
|
|
593
|
+
}), oe = a.changing$.subscribe((ce) => {
|
|
594
|
+
L(ce);
|
|
603
595
|
});
|
|
604
596
|
return () => {
|
|
605
597
|
oe.unsubscribe(), C.unsubscribe();
|
|
606
598
|
};
|
|
607
599
|
}, []);
|
|
608
|
-
function
|
|
609
|
-
!C || !l || (s.executeCommand(
|
|
600
|
+
function B(C) {
|
|
601
|
+
!C || !l || (s.executeCommand(H.id, {
|
|
610
602
|
pageId: e,
|
|
611
603
|
oKey: l.oKey,
|
|
612
604
|
props: {
|
|
613
605
|
width: C
|
|
614
606
|
}
|
|
615
|
-
}), l == null || l.resize(C, l.height), _(C),
|
|
607
|
+
}), l == null || l.resize(C, l.height), _(C), a == null || a.refreshControls());
|
|
616
608
|
}
|
|
617
609
|
function ee(C) {
|
|
618
|
-
!C || !l || (s.executeCommand(
|
|
610
|
+
!C || !l || (s.executeCommand(H.id, {
|
|
619
611
|
pageId: e,
|
|
620
612
|
oKey: l.oKey,
|
|
621
613
|
props: {
|
|
622
614
|
height: C
|
|
623
615
|
}
|
|
624
|
-
}), l == null || l.resize(l.width, C), b(C),
|
|
616
|
+
}), l == null || l.resize(l.width, C), b(C), a == null || a.refreshControls());
|
|
625
617
|
}
|
|
626
618
|
function te(C) {
|
|
627
|
-
!C || !l || (s.executeCommand(
|
|
619
|
+
!C || !l || (s.executeCommand(H.id, {
|
|
628
620
|
pageId: e,
|
|
629
621
|
oKey: l.oKey,
|
|
630
622
|
props: {
|
|
631
623
|
left: C
|
|
632
624
|
}
|
|
633
|
-
}), l == null || l.translate(C, l.top), M(C),
|
|
625
|
+
}), l == null || l.translate(C, l.top), M(C), a == null || a.refreshControls());
|
|
634
626
|
}
|
|
635
627
|
function _e(C) {
|
|
636
|
-
!C || !l || (s.executeCommand(
|
|
628
|
+
!C || !l || (s.executeCommand(H.id, {
|
|
637
629
|
pageId: e,
|
|
638
630
|
oKey: l.oKey,
|
|
639
631
|
props: {
|
|
640
632
|
right: C
|
|
641
633
|
}
|
|
642
|
-
}), l == null || l.translate(l.left, C),
|
|
634
|
+
}), l == null || l.translate(l.left, C), R(C), a == null || a.refreshControls());
|
|
643
635
|
}
|
|
644
636
|
function Ce(C) {
|
|
645
|
-
!C || !l || (s.executeCommand(
|
|
637
|
+
!C || !l || (s.executeCommand(H.id, {
|
|
646
638
|
pageId: e,
|
|
647
639
|
oKey: l.oKey,
|
|
648
640
|
props: {
|
|
@@ -650,9 +642,9 @@ function En(n) {
|
|
|
650
642
|
}
|
|
651
643
|
}), l == null || l.transformByState({
|
|
652
644
|
angle: C
|
|
653
|
-
}), se(C),
|
|
645
|
+
}), se(C), a == null || a.refreshControls());
|
|
654
646
|
}
|
|
655
|
-
return /* @__PURE__ */
|
|
647
|
+
return /* @__PURE__ */ x(
|
|
656
648
|
"div",
|
|
657
649
|
{
|
|
658
650
|
className: K("univer-relative univer-bottom-0 univer-mt-5 univer-w-full", Tt),
|
|
@@ -664,25 +656,25 @@ function En(n) {
|
|
|
664
656
|
children: /* @__PURE__ */ u("div", { children: i.t("image-panel.transform.title") })
|
|
665
657
|
}
|
|
666
658
|
) }),
|
|
667
|
-
/* @__PURE__ */
|
|
668
|
-
/* @__PURE__ */ u("div", { className: "univer-w-1/3", children: /* @__PURE__ */
|
|
659
|
+
/* @__PURE__ */ x("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: [
|
|
660
|
+
/* @__PURE__ */ u("div", { className: "univer-w-1/3", children: /* @__PURE__ */ x("label", { children: [
|
|
669
661
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: i.t("image-panel.transform.width") }) }),
|
|
670
662
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: /* @__PURE__ */ u(
|
|
671
|
-
|
|
663
|
+
ae,
|
|
672
664
|
{
|
|
673
665
|
className: "univer-w-11/12",
|
|
674
666
|
min: 1,
|
|
675
|
-
value:
|
|
667
|
+
value: v,
|
|
676
668
|
onChange: (C) => {
|
|
677
|
-
|
|
669
|
+
B(C);
|
|
678
670
|
}
|
|
679
671
|
}
|
|
680
672
|
) }) })
|
|
681
673
|
] }) }),
|
|
682
|
-
/* @__PURE__ */ u("div", { className: "univer-w-1/3", children: /* @__PURE__ */
|
|
674
|
+
/* @__PURE__ */ u("div", { className: "univer-w-1/3", children: /* @__PURE__ */ x("label", { children: [
|
|
683
675
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: i.t("image-panel.transform.height") }) }),
|
|
684
676
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: /* @__PURE__ */ u(
|
|
685
|
-
|
|
677
|
+
ae,
|
|
686
678
|
{
|
|
687
679
|
className: "univer-w-11/12",
|
|
688
680
|
min: 1,
|
|
@@ -694,26 +686,26 @@ function En(n) {
|
|
|
694
686
|
) }) })
|
|
695
687
|
] }) })
|
|
696
688
|
] }),
|
|
697
|
-
/* @__PURE__ */
|
|
698
|
-
/* @__PURE__ */ u("div", { className: "univer-w-1/3", children: /* @__PURE__ */
|
|
689
|
+
/* @__PURE__ */ x("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: [
|
|
690
|
+
/* @__PURE__ */ u("div", { className: "univer-w-1/3", children: /* @__PURE__ */ x("label", { children: [
|
|
699
691
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: i.t("image-panel.transform.x") }) }),
|
|
700
692
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: /* @__PURE__ */ u(
|
|
701
|
-
|
|
693
|
+
ae,
|
|
702
694
|
{
|
|
703
695
|
className: "univer-w-11/12",
|
|
704
696
|
precision: 1,
|
|
705
697
|
min: 0,
|
|
706
|
-
value:
|
|
698
|
+
value: P,
|
|
707
699
|
onChange: (C) => {
|
|
708
700
|
te(C);
|
|
709
701
|
}
|
|
710
702
|
}
|
|
711
703
|
) }) })
|
|
712
704
|
] }) }),
|
|
713
|
-
/* @__PURE__ */ u("div", { className: "univer-w-1/3", children: /* @__PURE__ */
|
|
705
|
+
/* @__PURE__ */ u("div", { className: "univer-w-1/3", children: /* @__PURE__ */ x("label", { children: [
|
|
714
706
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: i.t("image-panel.transform.y") }) }),
|
|
715
707
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: /* @__PURE__ */ u(
|
|
716
|
-
|
|
708
|
+
ae,
|
|
717
709
|
{
|
|
718
710
|
className: "univer-w-11/12",
|
|
719
711
|
precision: 1,
|
|
@@ -725,10 +717,10 @@ function En(n) {
|
|
|
725
717
|
}
|
|
726
718
|
) }) })
|
|
727
719
|
] }) }),
|
|
728
|
-
/* @__PURE__ */ u("div", { className: "univer-w-1/3", children: /* @__PURE__ */
|
|
720
|
+
/* @__PURE__ */ u("div", { className: "univer-w-1/3", children: /* @__PURE__ */ x("label", { children: [
|
|
729
721
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: i.t("image-panel.transform.rotate") }) }),
|
|
730
722
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: /* @__PURE__ */ u(
|
|
731
|
-
|
|
723
|
+
ae,
|
|
732
724
|
{
|
|
733
725
|
className: "univer-w-11/12",
|
|
734
726
|
precision: 1,
|
|
@@ -742,49 +734,49 @@ function En(n) {
|
|
|
742
734
|
}
|
|
743
735
|
);
|
|
744
736
|
}
|
|
745
|
-
const
|
|
746
|
-
function
|
|
737
|
+
const xe = "COMPONENT_SLIDE_SIDEBAR";
|
|
738
|
+
function _n() {
|
|
747
739
|
var h, l, d;
|
|
748
|
-
const n =
|
|
740
|
+
const n = O(w), e = O(T), t = n.getCurrentUnitForType(E.UNIVER_SLIDE), i = (h = t == null ? void 0 : t.getActivePage()) == null ? void 0 : h.id;
|
|
749
741
|
if (!i) return null;
|
|
750
742
|
const s = (l = e.getRenderUnitByPageId(i, i).scene) == null ? void 0 : l.getTransformer();
|
|
751
743
|
if (!s) return null;
|
|
752
|
-
const
|
|
753
|
-
if (!
|
|
744
|
+
const c = s.getSelectedObjectMap().values().next().value;
|
|
745
|
+
if (!c)
|
|
754
746
|
return null;
|
|
755
|
-
const
|
|
756
|
-
return /* @__PURE__ */
|
|
757
|
-
/* @__PURE__ */ u(
|
|
758
|
-
/* @__PURE__ */ u(
|
|
759
|
-
|
|
747
|
+
const a = ((d = n.getFocusedUnit()) == null ? void 0 : d.getUnitId()) || "";
|
|
748
|
+
return /* @__PURE__ */ x("section", { className: "univer-p-2 univer-text-center univer-text-sm", children: [
|
|
749
|
+
/* @__PURE__ */ u(fn, { pageId: i, unitId: a }),
|
|
750
|
+
/* @__PURE__ */ u(mn, { pageId: i, unitId: a }),
|
|
751
|
+
c.objectType === le.RECT && /* @__PURE__ */ u(pn, { pageId: i, unitId: a })
|
|
760
752
|
] });
|
|
761
753
|
}
|
|
762
|
-
const
|
|
754
|
+
const Ge = {
|
|
763
755
|
id: "slide.command.insert-float-shape",
|
|
764
756
|
type: D.COMMAND,
|
|
765
757
|
handler: async (n) => {
|
|
766
758
|
var r;
|
|
767
|
-
const e = n.get(U), i = (r = n.get(
|
|
768
|
-
return e.executeCommand(
|
|
759
|
+
const e = n.get(U), i = (r = n.get(w).getFocusedUnit()) == null ? void 0 : r.getUnitId();
|
|
760
|
+
return e.executeCommand(Wt.id, { unitId: i });
|
|
769
761
|
}
|
|
770
|
-
},
|
|
762
|
+
}, Wt = {
|
|
771
763
|
id: "slide.operation.insert-float-shape",
|
|
772
764
|
type: D.OPERATION,
|
|
773
765
|
handler: async (n, e) => {
|
|
774
|
-
const t = Ct(6), i = n.get(
|
|
766
|
+
const t = Ct(6), i = n.get(w), r = e.unitId, s = i.getUnit(r);
|
|
775
767
|
if (!s) return !1;
|
|
776
|
-
const o = s.getActivePage(),
|
|
768
|
+
const o = s.getActivePage(), c = Object.values(o.pageElements), a = c != null && c.length ? Math.max(...c.map((g) => g.zIndex)) : 20, h = {
|
|
777
769
|
id: t,
|
|
778
|
-
zIndex:
|
|
770
|
+
zIndex: a + 1,
|
|
779
771
|
left: 378,
|
|
780
772
|
top: 142,
|
|
781
773
|
width: 250,
|
|
782
774
|
height: 250,
|
|
783
775
|
title: t,
|
|
784
776
|
description: "",
|
|
785
|
-
type:
|
|
777
|
+
type: ze.SHAPE,
|
|
786
778
|
shape: {
|
|
787
|
-
shapeType:
|
|
779
|
+
shapeType: ai.Rect,
|
|
788
780
|
text: "",
|
|
789
781
|
shapeProperties: {
|
|
790
782
|
shapeBackgroundFill: {
|
|
@@ -801,24 +793,24 @@ const Ye = {
|
|
|
801
793
|
id: "sidebar.operation.slide-shape",
|
|
802
794
|
type: D.COMMAND,
|
|
803
795
|
handler: async (n, e) => {
|
|
804
|
-
const { visible: t, objectType: i } = e, r = n.get(
|
|
805
|
-
let o = "",
|
|
806
|
-
return i === le.RECT ? (o = "slide.sidebar.shape",
|
|
796
|
+
const { visible: t, objectType: i } = e, r = n.get(yt), s = n.get(Q);
|
|
797
|
+
let o = "", c = "";
|
|
798
|
+
return i === le.RECT ? (o = "slide.sidebar.shape", c = xe) : i === le.IMAGE ? (o = "slide.sidebar.image", c = xe) : i === le.RICH_TEXT && (o = "slide.sidebar.text", c = xe), t ? r.open({
|
|
807
799
|
header: { title: s.t(o) },
|
|
808
|
-
children: { label:
|
|
800
|
+
children: { label: c },
|
|
809
801
|
onClose: () => {
|
|
810
802
|
},
|
|
811
803
|
width: 360
|
|
812
804
|
}) : r.close(), !0;
|
|
813
805
|
}
|
|
814
806
|
}, kt = "COMPONENT_SLIDE_IMAGE_POPUP_MENU";
|
|
815
|
-
var
|
|
816
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
807
|
+
var Cn = Object.getOwnPropertyDescriptor, Sn = (n, e, t, i) => {
|
|
808
|
+
for (var r = i > 1 ? void 0 : i ? Cn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
817
809
|
(o = n[s]) && (r = o(r) || r);
|
|
818
810
|
return r;
|
|
819
811
|
}, Ie = (n, e) => (t, i) => e(t, i, n);
|
|
820
|
-
function
|
|
821
|
-
const t =
|
|
812
|
+
function In(n, e) {
|
|
813
|
+
const t = gt(n.left, n.top, e), i = gt(n.right, n.bottom, e);
|
|
822
814
|
return {
|
|
823
815
|
left: t.x,
|
|
824
816
|
top: t.y,
|
|
@@ -826,37 +818,37 @@ function yn(n, e) {
|
|
|
826
818
|
bottom: i.y
|
|
827
819
|
};
|
|
828
820
|
}
|
|
829
|
-
function
|
|
821
|
+
function gt(n, e, t) {
|
|
830
822
|
const { scaleX: i, scaleY: r } = t.getAncestorScale(), s = t.getViewport(re.VIEW);
|
|
831
823
|
if (!s)
|
|
832
824
|
return {
|
|
833
825
|
x: n,
|
|
834
826
|
y: e
|
|
835
827
|
};
|
|
836
|
-
const { viewportScrollX: o, viewportScrollY:
|
|
828
|
+
const { viewportScrollX: o, viewportScrollY: c } = s, a = (n - o) * i, h = (e - c) * r;
|
|
837
829
|
return {
|
|
838
|
-
x:
|
|
830
|
+
x: a,
|
|
839
831
|
y: h
|
|
840
832
|
};
|
|
841
833
|
}
|
|
842
|
-
let
|
|
834
|
+
let we = class extends De {
|
|
843
835
|
constructor(n, e, t, i) {
|
|
844
836
|
super(), this._globalPopupManagerService = n, this._renderManagerService = e, this._univerInstanceService = t, this._commandService = i;
|
|
845
837
|
}
|
|
846
838
|
_createObjectPositionObserver(n, e) {
|
|
847
839
|
const i = (() => {
|
|
848
|
-
var
|
|
849
|
-
const { scene: o, engine:
|
|
850
|
-
left:
|
|
851
|
-
right:
|
|
840
|
+
var L, B, ee, te;
|
|
841
|
+
const { scene: o, engine: c } = e, { left: a, top: h, width: l, height: d } = n, g = (o.width - ((B = (L = e.mainComponent) == null ? void 0 : L.width) != null ? B : 0)) / 2, m = (o.height - ((te = (ee = e.mainComponent) == null ? void 0 : ee.height) != null ? te : 0)) / 2, p = {
|
|
842
|
+
left: a,
|
|
843
|
+
right: a + l,
|
|
852
844
|
top: h,
|
|
853
845
|
bottom: h + d
|
|
854
|
-
}, f =
|
|
846
|
+
}, f = c.getCanvasElement(), v = f.getBoundingClientRect(), _ = bi(f.style.width), { scaleX: I, scaleY: b } = o.getAncestorScale(), P = In(p, o), { top: M, left: V, width: R } = v, z = R / _;
|
|
855
847
|
return {
|
|
856
|
-
left:
|
|
857
|
-
right:
|
|
858
|
-
top:
|
|
859
|
-
bottom:
|
|
848
|
+
left: P.left * z * I + V + g,
|
|
849
|
+
right: P.right * z * I + V + g,
|
|
850
|
+
top: P.top * z * b + M + m,
|
|
851
|
+
bottom: P.bottom * z * b + M + m
|
|
860
852
|
};
|
|
861
853
|
})(), r = new J(i), s = new Ke();
|
|
862
854
|
return {
|
|
@@ -872,7 +864,7 @@ let ye = class extends De {
|
|
|
872
864
|
dispose: () => {
|
|
873
865
|
}
|
|
874
866
|
};
|
|
875
|
-
const { position: s, position$: o, disposable:
|
|
867
|
+
const { position: s, position$: o, disposable: c } = this._createObjectPositionObserver(n, r), a = this._globalPopupManagerService.addPopup({
|
|
876
868
|
...e,
|
|
877
869
|
unitId: i,
|
|
878
870
|
subUnitId: "default",
|
|
@@ -882,27 +874,27 @@ let ye = class extends De {
|
|
|
882
874
|
});
|
|
883
875
|
return {
|
|
884
876
|
dispose: () => {
|
|
885
|
-
this._globalPopupManagerService.removePopup(
|
|
877
|
+
this._globalPopupManagerService.removePopup(a), o.complete(), c.dispose();
|
|
886
878
|
}
|
|
887
879
|
};
|
|
888
880
|
}
|
|
889
881
|
};
|
|
890
|
-
|
|
891
|
-
Ie(0,
|
|
892
|
-
Ie(1,
|
|
893
|
-
Ie(2,
|
|
882
|
+
we = Sn([
|
|
883
|
+
Ie(0, Z(xi)),
|
|
884
|
+
Ie(1, X),
|
|
885
|
+
Ie(2, w),
|
|
894
886
|
Ie(3, U)
|
|
895
|
-
],
|
|
896
|
-
var
|
|
897
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
887
|
+
], we);
|
|
888
|
+
var bn = Object.getOwnPropertyDescriptor, En = (n, e, t, i) => {
|
|
889
|
+
for (var r = i > 1 ? void 0 : i ? bn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
898
890
|
(o = n[s]) && (r = o(r) || r);
|
|
899
891
|
return r;
|
|
900
|
-
},
|
|
901
|
-
let
|
|
902
|
-
constructor(e, t, i, r, s, o,
|
|
892
|
+
}, Y = (n, e) => (t, i) => e(t, i, n);
|
|
893
|
+
let ye = class extends ge {
|
|
894
|
+
constructor(e, t, i, r, s, o, c) {
|
|
903
895
|
super();
|
|
904
896
|
S(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
|
|
905
|
-
this._canvasPopManagerService = e, this._renderManagerService = t, this._univerInstanceService = i, this._contextService = r, this._canvasView = s, this._sidebarService = o, this._commandService =
|
|
897
|
+
this._canvasPopManagerService = e, this._renderManagerService = t, this._univerInstanceService = i, this._contextService = r, this._canvasView = s, this._sidebarService = o, this._commandService = c, this._init();
|
|
906
898
|
}
|
|
907
899
|
_init() {
|
|
908
900
|
this._univerInstanceService.getAllUnitsForType(E.UNIVER_SLIDE).forEach((e) => this._create(e));
|
|
@@ -921,27 +913,27 @@ let Pe = class extends ve {
|
|
|
921
913
|
const t = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE), i = (r = t == null ? void 0 : t.getPages()) != null ? r : {};
|
|
922
914
|
Object.keys(i).forEach((s) => {
|
|
923
915
|
var h;
|
|
924
|
-
const
|
|
925
|
-
if (!
|
|
926
|
-
let
|
|
916
|
+
const c = (h = this._canvasView.getRenderUnitByPageId(s, e).scene) == null ? void 0 : h.getTransformer();
|
|
917
|
+
if (!c) return;
|
|
918
|
+
let a;
|
|
927
919
|
this.disposeWithMe(
|
|
928
920
|
St(
|
|
929
|
-
|
|
930
|
-
const l =
|
|
921
|
+
c.createControl$.subscribe(() => {
|
|
922
|
+
const l = c.getSelectedObjectMap();
|
|
931
923
|
if (l.size > 1) {
|
|
932
|
-
|
|
924
|
+
a == null || a.dispose();
|
|
933
925
|
return;
|
|
934
926
|
}
|
|
935
927
|
const d = l.values().next().value;
|
|
936
928
|
if (!d)
|
|
937
929
|
return;
|
|
938
|
-
const
|
|
939
|
-
|
|
930
|
+
const g = d.oKey;
|
|
931
|
+
a == null || a.dispose(), a = this.disposeWithMe(this._canvasPopManagerService.attachPopupToObject(d, {
|
|
940
932
|
componentKey: kt,
|
|
941
933
|
direction: "horizontal",
|
|
942
934
|
offset: [2, 0],
|
|
943
935
|
extraProps: {
|
|
944
|
-
menuItems: this._getMenuItemsByObjectType(d.objectType,
|
|
936
|
+
menuItems: this._getMenuItemsByObjectType(d.objectType, g, e)
|
|
945
937
|
}
|
|
946
938
|
})), this._sidebarService.visible && this._commandService.executeCommand(Be.id, {
|
|
947
939
|
visible: !0,
|
|
@@ -950,19 +942,19 @@ let Pe = class extends ve {
|
|
|
950
942
|
})
|
|
951
943
|
)
|
|
952
944
|
), this.disposeWithMe(
|
|
953
|
-
|
|
954
|
-
|
|
945
|
+
c.clearControl$.subscribe(() => {
|
|
946
|
+
a == null || a.dispose(), this._contextService.setContextValue(li, !1);
|
|
955
947
|
})
|
|
956
948
|
), this.disposeWithMe(
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
const l =
|
|
949
|
+
c.changing$.subscribe(() => {
|
|
950
|
+
a == null || a.dispose();
|
|
951
|
+
const l = c.getSelectedObjectMap();
|
|
960
952
|
if (l.size > 1) {
|
|
961
|
-
|
|
953
|
+
a == null || a.dispose();
|
|
962
954
|
return;
|
|
963
955
|
}
|
|
964
956
|
const d = l.values().next().value;
|
|
965
|
-
d && this._commandService.executeCommand(
|
|
957
|
+
d && this._commandService.executeCommand(H.id, {
|
|
966
958
|
unitId: e,
|
|
967
959
|
oKey: d.oKey,
|
|
968
960
|
props: {
|
|
@@ -998,26 +990,26 @@ let Pe = class extends ve {
|
|
|
998
990
|
}];
|
|
999
991
|
}
|
|
1000
992
|
};
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
],
|
|
1010
|
-
const
|
|
993
|
+
ye = En([
|
|
994
|
+
Y(0, Z(we)),
|
|
995
|
+
Y(1, X),
|
|
996
|
+
Y(2, w),
|
|
997
|
+
Y(3, fe),
|
|
998
|
+
Y(4, Z(T)),
|
|
999
|
+
Y(5, yt),
|
|
1000
|
+
Y(6, U)
|
|
1001
|
+
], ye);
|
|
1002
|
+
const Pe = {
|
|
1011
1003
|
id: "slide.operation.edit-arrow",
|
|
1012
1004
|
type: D.OPERATION,
|
|
1013
1005
|
handler: () => !0
|
|
1014
|
-
}, de =
|
|
1015
|
-
var
|
|
1016
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1006
|
+
}, de = di("SLIDE_EDITOR");
|
|
1007
|
+
var xn = Object.getOwnPropertyDescriptor, Rn = (n, e, t, i) => {
|
|
1008
|
+
for (var r = i > 1 ? void 0 : i ? xn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
1017
1009
|
(o = n[s]) && (r = o(r) || r);
|
|
1018
1010
|
return r;
|
|
1019
1011
|
}, Ve = (n, e) => (t, i) => e(t, i, n);
|
|
1020
|
-
const
|
|
1012
|
+
const Ye = It("univer.slide-editor-bridge.service");
|
|
1021
1013
|
let $e = class extends De {
|
|
1022
1014
|
constructor(e, t, i) {
|
|
1023
1015
|
super();
|
|
@@ -1051,7 +1043,7 @@ let $e = class extends De {
|
|
|
1051
1043
|
* @editorInfo editorInfo
|
|
1052
1044
|
*/
|
|
1053
1045
|
setEditorRect(e) {
|
|
1054
|
-
this._currentEditRectInfo = e, this._editorService.getFocusEditor() || (this._editorService.focus(de), this._contextService.setContextValue(
|
|
1046
|
+
this._currentEditRectInfo = e, this._editorService.getFocusEditor() || (this._editorService.focus(de), this._contextService.setContextValue(Re, !1), this._contextService.setContextValue(bt, !1), this._contextService.setContextValue(Et, !1));
|
|
1055
1047
|
const t = this.getEditRectState();
|
|
1056
1048
|
this._currentEditRectState = t, this._currentEditRectState$.next(t);
|
|
1057
1049
|
}
|
|
@@ -1071,26 +1063,26 @@ let $e = class extends De {
|
|
|
1071
1063
|
pageSize: { width: t.richTextObj.width, height: 1 / 0 }
|
|
1072
1064
|
};
|
|
1073
1065
|
const o = {
|
|
1074
|
-
documentModel: new
|
|
1066
|
+
documentModel: new ui(r),
|
|
1075
1067
|
fontString: "document",
|
|
1076
1068
|
textRotation: { a: 0, v: 0 },
|
|
1077
1069
|
wrapStrategy: 0,
|
|
1078
|
-
verticalAlign:
|
|
1079
|
-
horizontalAlign:
|
|
1070
|
+
verticalAlign: Oe.TOP,
|
|
1071
|
+
horizontalAlign: xt.LEFT,
|
|
1080
1072
|
paddingData: { t: 0, b: 1, l: 2, r: 2 }
|
|
1081
|
-
},
|
|
1073
|
+
}, c = t.richTextObj.width, a = t.richTextObj.height, h = t.richTextObj.left, l = t.richTextObj.top, d = {
|
|
1082
1074
|
left: 0,
|
|
1083
1075
|
top: 0
|
|
1084
|
-
},
|
|
1076
|
+
}, g = this._renderManagerService.getRenderById(i), m = g == null ? void 0 : g.scene, p = m == null ? void 0 : m.getViewport(re.VIEW), f = m == null ? void 0 : m.getObject(re.COMPONENT), v = {
|
|
1085
1077
|
x: (f == null ? void 0 : f.left) || 0,
|
|
1086
1078
|
y: (f == null ? void 0 : f.top) || 0
|
|
1087
|
-
}, _ = (
|
|
1088
|
-
return d.left =
|
|
1079
|
+
}, _ = (p == null ? void 0 : p.viewportScrollX) || 0, I = (p == null ? void 0 : p.viewportScrollY) || 0;
|
|
1080
|
+
return d.left = v.x - _, d.top = v.y - I, {
|
|
1089
1081
|
position: {
|
|
1090
1082
|
startX: h,
|
|
1091
1083
|
startY: l,
|
|
1092
|
-
endX: h +
|
|
1093
|
-
endY: l +
|
|
1084
|
+
endX: h + c,
|
|
1085
|
+
endY: l + a
|
|
1094
1086
|
},
|
|
1095
1087
|
scaleX: 1,
|
|
1096
1088
|
scaleY: 1,
|
|
@@ -1143,7 +1135,7 @@ let $e = class extends De {
|
|
|
1143
1135
|
textStyle: { fs: r },
|
|
1144
1136
|
renderConfig: {
|
|
1145
1137
|
// horizontalAlign: HorizontalAlign.CENTER,
|
|
1146
|
-
verticalAlign:
|
|
1138
|
+
verticalAlign: Oe.MIDDLE,
|
|
1147
1139
|
centerAngle: 0,
|
|
1148
1140
|
vertexAngle: 0,
|
|
1149
1141
|
wrapStrategy: 0
|
|
@@ -1155,12 +1147,12 @@ let $e = class extends De {
|
|
|
1155
1147
|
};
|
|
1156
1148
|
}
|
|
1157
1149
|
};
|
|
1158
|
-
$e =
|
|
1159
|
-
Ve(0,
|
|
1150
|
+
$e = Rn([
|
|
1151
|
+
Ve(0, Ze),
|
|
1160
1152
|
Ve(1, fe),
|
|
1161
|
-
Ve(2,
|
|
1153
|
+
Ve(2, X)
|
|
1162
1154
|
], $e);
|
|
1163
|
-
class
|
|
1155
|
+
class On {
|
|
1164
1156
|
constructor() {
|
|
1165
1157
|
S(this, "_state", null);
|
|
1166
1158
|
S(this, "_rect", null);
|
|
@@ -1197,27 +1189,27 @@ class Nn {
|
|
|
1197
1189
|
const qe = It(
|
|
1198
1190
|
"univer.slide-editor-manager.service"
|
|
1199
1191
|
);
|
|
1200
|
-
var
|
|
1201
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1192
|
+
var G = /* @__PURE__ */ ((n) => (n[n.InitialState = 0] = "InitialState", n[n.StartEditor = 1] = "StartEditor", n[n.CursorChange = 2] = "CursorChange", n))(G || {}), wn = Object.getOwnPropertyDescriptor, yn = (n, e, t, i) => {
|
|
1193
|
+
for (var r = i > 1 ? void 0 : i ? wn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
1202
1194
|
(o = n[s]) && (r = o(r) || r);
|
|
1203
1195
|
return r;
|
|
1204
|
-
},
|
|
1205
|
-
const ft = -1e3,
|
|
1196
|
+
}, A = (n, e) => (t, i) => e(t, i, n);
|
|
1197
|
+
const ft = -1e3, pt = 5, Pn = 2;
|
|
1206
1198
|
let He = class extends De {
|
|
1207
|
-
constructor(e, t, i, r, s, o,
|
|
1199
|
+
constructor(e, t, i, r, s, o, c, a, h, l, d, g) {
|
|
1208
1200
|
super();
|
|
1209
1201
|
/**
|
|
1210
1202
|
* It is used to distinguish whether the user has actively moved the cursor in the editor, mainly through mouse clicks.
|
|
1211
1203
|
*/
|
|
1212
|
-
S(this, "_cursorChange",
|
|
1204
|
+
S(this, "_cursorChange", G.InitialState);
|
|
1213
1205
|
/** If the corresponding unit is active and prepared for editing. */
|
|
1214
1206
|
S(this, "_isUnitEditing", !1);
|
|
1215
1207
|
S(this, "_d");
|
|
1216
|
-
this._renderContext = e, this._layoutService = t, this._undoRedoService = i, this._contextService = r, this._instanceSrv = s, this._renderManagerService = o, this._editorBridgeService =
|
|
1217
|
-
|
|
1208
|
+
this._renderContext = e, this._layoutService = t, this._undoRedoService = i, this._contextService = r, this._instanceSrv = s, this._renderManagerService = o, this._editorBridgeService = c, this._cellEditorManagerService = a, this._textSelectionManagerService = h, this._commandService = l, this._localService = d, this._editorService = g, this.disposeWithMe(this._instanceSrv.getCurrentTypeOfUnit$(E.UNIVER_SLIDE).subscribe((m) => {
|
|
1209
|
+
m && m.getUnitId() === this._renderContext.unitId ? this._d = this._init() : (this._disposeCurrent(), this._isUnitEditing && (this._handleEditorInvisible({
|
|
1218
1210
|
visible: !1,
|
|
1219
1211
|
eventType: q.Keyboard,
|
|
1220
|
-
keycode:
|
|
1212
|
+
keycode: y.ESC,
|
|
1221
1213
|
unitId: this._renderContext.unitId
|
|
1222
1214
|
}), this._isUnitEditing = !1));
|
|
1223
1215
|
})), this._initEditorVisibilityListener();
|
|
@@ -1254,9 +1246,9 @@ let He = class extends De {
|
|
|
1254
1246
|
return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(dt).getViewModel();
|
|
1255
1247
|
}
|
|
1256
1248
|
_initialCursorSync(e) {
|
|
1257
|
-
e.add(this._cellEditorManagerService.focus$.pipe(
|
|
1249
|
+
e.add(this._cellEditorManagerService.focus$.pipe(Li((t) => !!t)).subscribe(() => {
|
|
1258
1250
|
var t;
|
|
1259
|
-
(t =
|
|
1251
|
+
(t = Le(E.UNIVER_DOC, this._instanceSrv, this._renderManagerService)) == null || t.with(ut).sync();
|
|
1260
1252
|
}));
|
|
1261
1253
|
}
|
|
1262
1254
|
/**
|
|
@@ -1270,14 +1262,14 @@ let He = class extends De {
|
|
|
1270
1262
|
return;
|
|
1271
1263
|
const {
|
|
1272
1264
|
position: { startX: i, endX: r },
|
|
1273
|
-
documentLayoutObject: { textRotation: s, wrapStrategy: o, documentModel:
|
|
1274
|
-
scaleX:
|
|
1265
|
+
documentLayoutObject: { textRotation: s, wrapStrategy: o, documentModel: c },
|
|
1266
|
+
scaleX: a,
|
|
1275
1267
|
editorUnitId: h
|
|
1276
1268
|
} = t, { vertexAngle: l } = nt(s);
|
|
1277
|
-
|
|
1269
|
+
c.updateDocumentId(h), o === et.WRAP && l === 0 && c.updateDocumentDataPageSize((r - i) / a), this._instanceSrv.changeDoc(h, c), this._contextService.setContextValue(vi, !0), this._textSelectionManagerService.replaceTextRanges([{
|
|
1278
1270
|
startOffset: 0,
|
|
1279
1271
|
endOffset: 0
|
|
1280
|
-
}]), (d =
|
|
1272
|
+
}]), (d = Le(E.UNIVER_DOC, this._instanceSrv, this._renderManagerService)) == null || d.with(ut).activate(ft, ft);
|
|
1281
1273
|
}));
|
|
1282
1274
|
}
|
|
1283
1275
|
/**
|
|
@@ -1290,80 +1282,80 @@ let He = class extends De {
|
|
|
1290
1282
|
* @param scaleY
|
|
1291
1283
|
*/
|
|
1292
1284
|
_fitTextSize(e, t, i, r, s = 1, o = 1) {
|
|
1293
|
-
const { startX:
|
|
1285
|
+
const { startX: c, startY: a, endX: h, endY: l } = e, d = r.documentModel;
|
|
1294
1286
|
if (d == null)
|
|
1295
1287
|
return;
|
|
1296
|
-
const { actualWidth:
|
|
1288
|
+
const { actualWidth: g, actualHeight: m } = this._predictingSize(
|
|
1297
1289
|
e,
|
|
1298
1290
|
t,
|
|
1299
1291
|
i,
|
|
1300
1292
|
r,
|
|
1301
1293
|
s,
|
|
1302
1294
|
o
|
|
1303
|
-
), { verticalAlign:
|
|
1304
|
-
let _ = h -
|
|
1305
|
-
if (_ <
|
|
1306
|
-
I =
|
|
1295
|
+
), { verticalAlign: p, paddingData: f, fill: v } = r;
|
|
1296
|
+
let _ = h - c, I = l - a;
|
|
1297
|
+
if (_ < g && (_ = g), I < m)
|
|
1298
|
+
I = m, d.updateDocumentDataMargin(f);
|
|
1307
1299
|
else {
|
|
1308
1300
|
let b = 0;
|
|
1309
|
-
|
|
1301
|
+
p === Oe.MIDDLE ? b = (I - m) / 2 / o : p === Oe.TOP ? b = f.t || 0 : b = (I - m) / o - (f.b || 0), b = b < (f.t || 0) ? f.t || 0 : b, d.updateDocumentDataMargin({
|
|
1310
1302
|
t: b
|
|
1311
1303
|
});
|
|
1312
1304
|
}
|
|
1313
|
-
i.calculate(), this._editAreaProcessing(_, I, e, t,
|
|
1305
|
+
i.calculate(), this._editAreaProcessing(_, I, e, t, v, s, o);
|
|
1314
1306
|
}
|
|
1315
1307
|
/**
|
|
1316
1308
|
* Mainly used to pre-calculate the width of the editor,
|
|
1317
1309
|
* to determine whether it needs to be automatically widened.
|
|
1318
1310
|
*/
|
|
1319
1311
|
_predictingSize(e, t, i, r, s = 1, o = 1) {
|
|
1320
|
-
const { startX:
|
|
1321
|
-
if (l === et.WRAP &&
|
|
1322
|
-
const { actualWidth:
|
|
1312
|
+
const { startX: c, endX: a } = e, { textRotation: h, wrapStrategy: l } = r, d = r.documentModel, { vertexAngle: g } = nt(h), m = document.body.clientWidth;
|
|
1313
|
+
if (l === et.WRAP && g === 0) {
|
|
1314
|
+
const { actualWidth: v, actualHeight: _ } = i.getActualSize();
|
|
1323
1315
|
return {
|
|
1324
|
-
actualWidth:
|
|
1316
|
+
actualWidth: v * s,
|
|
1325
1317
|
actualHeight: _ * o
|
|
1326
1318
|
};
|
|
1327
1319
|
}
|
|
1328
|
-
d == null || d.updateDocumentDataPageSize((
|
|
1329
|
-
const
|
|
1330
|
-
let f =
|
|
1331
|
-
return f <
|
|
1332
|
-
horizontalAlign:
|
|
1320
|
+
d == null || d.updateDocumentDataPageSize((m - c - t.left) / s), i.calculate();
|
|
1321
|
+
const p = i.getActualSize();
|
|
1322
|
+
let f = a - c;
|
|
1323
|
+
return f < p.actualWidth * s + pt * s && (f = p.actualWidth * s + pt * s), d == null || d.updateDocumentDataPageSize(f / s), d == null || d.updateDocumentRenderConfig({
|
|
1324
|
+
horizontalAlign: xt.UNSPECIFIED,
|
|
1333
1325
|
cellValueType: void 0
|
|
1334
1326
|
}), {
|
|
1335
1327
|
actualWidth: f,
|
|
1336
|
-
actualHeight:
|
|
1328
|
+
actualHeight: p.actualHeight * o
|
|
1337
1329
|
};
|
|
1338
1330
|
}
|
|
1339
1331
|
/**
|
|
1340
1332
|
* control the size of editing area
|
|
1341
1333
|
*/
|
|
1342
1334
|
// eslint-disable-next-line max-lines-per-function
|
|
1343
|
-
_editAreaProcessing(e, t, i, r, s, o = 1,
|
|
1335
|
+
_editAreaProcessing(e, t, i, r, s, o = 1, c = 1) {
|
|
1344
1336
|
var C;
|
|
1345
|
-
const
|
|
1346
|
-
if (
|
|
1337
|
+
const a = this._getEditorObject();
|
|
1338
|
+
if (a == null)
|
|
1347
1339
|
return;
|
|
1348
1340
|
function h(oe) {
|
|
1349
1341
|
return Number.parseInt(oe.replace("px", ""));
|
|
1350
1342
|
}
|
|
1351
|
-
const d = this._renderContext.engine.getCanvasElement(),
|
|
1343
|
+
const d = this._renderContext.engine.getCanvasElement(), g = d.getBoundingClientRect(), m = h(d.style.width), { top: p, left: f, width: v } = g, _ = v / m;
|
|
1352
1344
|
let { startX: I, startY: b } = i;
|
|
1353
1345
|
I += r.left, b += r.top;
|
|
1354
|
-
const { document:
|
|
1355
|
-
let
|
|
1356
|
-
|
|
1346
|
+
const { document: P, scene: M, engine: V } = a, R = M.getViewport(ht.VIEW_MAIN), z = document.body.clientHeight - b - r.top - Pn * 2, se = document.body.clientWidth - I - r.left;
|
|
1347
|
+
let L = t, B = R == null ? void 0 : R.getScrollBar();
|
|
1348
|
+
L > z ? (L = z, B == null ? R && new Ot(R, { enableHorizontal: !1, barSize: 8 }) : R == null || R.resetCanvasSizeAndUpdateScroll()) : (B = null, (C = R == null ? void 0 : R.getScrollBar()) == null || C.dispose()), e += (B == null ? void 0 : B.barSize) || 0, e = Math.min(e, se), I -= ne, b -= ne, this._addBackground(M, e / o, t / c, s);
|
|
1357
1349
|
const { scaleX: ee, scaleY: te } = M.getPrecisionScale();
|
|
1358
1350
|
M.transformByState({
|
|
1359
1351
|
width: e * _ / o,
|
|
1360
|
-
height: t * _ /
|
|
1352
|
+
height: t * _ / c,
|
|
1361
1353
|
scaleX: o * _,
|
|
1362
|
-
scaleY:
|
|
1363
|
-
}),
|
|
1354
|
+
scaleY: c * _
|
|
1355
|
+
}), P.resize(e / o, t / c), setTimeout(() => {
|
|
1364
1356
|
V.resizeBySize(
|
|
1365
1357
|
rt(e, ee),
|
|
1366
|
-
rt(
|
|
1358
|
+
rt(L, te)
|
|
1367
1359
|
);
|
|
1368
1360
|
}, 0);
|
|
1369
1361
|
const _e = this._layoutService.getContentElement().getBoundingClientRect(), Ce = d.getBoundingClientRect();
|
|
@@ -1371,7 +1363,7 @@ let He = class extends De {
|
|
|
1371
1363
|
startX: I,
|
|
1372
1364
|
startY: b,
|
|
1373
1365
|
endX: e * _ + I,
|
|
1374
|
-
endY:
|
|
1366
|
+
endY: L * _ + b,
|
|
1375
1367
|
show: !0
|
|
1376
1368
|
});
|
|
1377
1369
|
}
|
|
@@ -1382,14 +1374,14 @@ let He = class extends De {
|
|
|
1382
1374
|
const s = "_backgroundRectHelperColor_", o = e.getObject(s);
|
|
1383
1375
|
o == null && r == null || (o == null ? e.addObjects(
|
|
1384
1376
|
[
|
|
1385
|
-
new
|
|
1377
|
+
new wt(s, {
|
|
1386
1378
|
width: t,
|
|
1387
1379
|
height: i,
|
|
1388
1380
|
fill: r,
|
|
1389
1381
|
evented: !1
|
|
1390
1382
|
})
|
|
1391
1383
|
],
|
|
1392
|
-
|
|
1384
|
+
Hi
|
|
1393
1385
|
) : r == null ? o.dispose() : (o.setProps({
|
|
1394
1386
|
fill: r
|
|
1395
1387
|
}), o.transformByState({
|
|
@@ -1406,9 +1398,9 @@ let He = class extends De {
|
|
|
1406
1398
|
// first part: startEditing --> _updateEditor
|
|
1407
1399
|
// 2nd part: startEditing --> changeVisible --> slide-editor-bridge.render-controller.ts@changeVisible --> _editorBridgeService.changeVisible
|
|
1408
1400
|
_handleEditorVisible(e) {
|
|
1409
|
-
var
|
|
1401
|
+
var v, _;
|
|
1410
1402
|
const { eventType: t } = e;
|
|
1411
|
-
this._cursorChange = [q.PointerDown, q.Dblclick].includes(t) ?
|
|
1403
|
+
this._cursorChange = [q.PointerDown, q.Dblclick].includes(t) ? G.CursorChange : G.StartEditor;
|
|
1412
1404
|
const i = this._editorBridgeService.getEditRectState();
|
|
1413
1405
|
if (i == null)
|
|
1414
1406
|
return;
|
|
@@ -1416,21 +1408,21 @@ let He = class extends De {
|
|
|
1416
1408
|
position: r,
|
|
1417
1409
|
documentLayoutObject: s,
|
|
1418
1410
|
slideCardOffset: o,
|
|
1419
|
-
scaleX:
|
|
1420
|
-
scaleY:
|
|
1411
|
+
scaleX: c,
|
|
1412
|
+
scaleY: a,
|
|
1421
1413
|
editorUnitId: h,
|
|
1422
1414
|
unitId: l
|
|
1423
1415
|
} = i, d = this._getEditorObject();
|
|
1424
1416
|
if (d == null)
|
|
1425
1417
|
return;
|
|
1426
|
-
const { scene:
|
|
1427
|
-
this._contextService.setContextValue(
|
|
1428
|
-
const { documentModel:
|
|
1429
|
-
if (!
|
|
1418
|
+
const { scene: g } = d;
|
|
1419
|
+
this._contextService.setContextValue(Re, !0);
|
|
1420
|
+
const { documentModel: m } = s, p = this._getEditorSkeleton(h);
|
|
1421
|
+
if (!p || !m)
|
|
1430
1422
|
return;
|
|
1431
|
-
this._fitTextSize(r, o,
|
|
1432
|
-
const f =
|
|
1433
|
-
(
|
|
1423
|
+
this._fitTextSize(r, o, p, s, c, a);
|
|
1424
|
+
const f = m.getBody().dataStream.length - 2 || 0;
|
|
1425
|
+
(v = g.getViewport(ht.VIEW_MAIN)) == null || v.scrollToViewportPos({
|
|
1434
1426
|
viewportScrollX: Number.POSITIVE_INFINITY
|
|
1435
1427
|
}), this._textSelectionManagerService.replaceTextRanges([
|
|
1436
1428
|
{
|
|
@@ -1440,7 +1432,7 @@ let He = class extends De {
|
|
|
1440
1432
|
]), (_ = this._renderManagerService.getRenderById(l)) == null || _.scene.resetCursor();
|
|
1441
1433
|
}
|
|
1442
1434
|
_resetBodyStyle(e, t = !1) {
|
|
1443
|
-
e.dataStream =
|
|
1435
|
+
e.dataStream = gi, 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 = [
|
|
1444
1436
|
{
|
|
1445
1437
|
startIndex: 0
|
|
1446
1438
|
}
|
|
@@ -1455,14 +1447,14 @@ let He = class extends De {
|
|
|
1455
1447
|
_showEditorByKeyboard(e) {
|
|
1456
1448
|
}
|
|
1457
1449
|
_commandExecutedListener(e) {
|
|
1458
|
-
const t = [
|
|
1450
|
+
const t = [Pe.id], i = [$i.id];
|
|
1459
1451
|
e.add(this._commandService.onCommandExecuted((r) => {
|
|
1460
1452
|
this._editorService.getFocusId() === de && (t.includes(r.id) && this._moveCursorCmdHandler(r), i.includes(r.id) && this._editorBridgeService.isVisible() && this._editingChangedHandler());
|
|
1461
1453
|
}));
|
|
1462
1454
|
}
|
|
1463
1455
|
_moveCursorCmdHandler(e) {
|
|
1464
1456
|
const t = e.params, { keycode: i, isShift: r } = t;
|
|
1465
|
-
i != null && this._cursorChange ===
|
|
1457
|
+
i != null && this._cursorChange === G.CursorChange ? this._moveInEditor(i, r) : this._editorBridgeService.changeVisible(t);
|
|
1466
1458
|
}
|
|
1467
1459
|
_editingChangedHandler() {
|
|
1468
1460
|
const e = this._editorBridgeService.getEditorRect();
|
|
@@ -1474,11 +1466,11 @@ let He = class extends De {
|
|
|
1474
1466
|
this._handleEditorVisible({ visible: !0, eventType: 3, unitId: i });
|
|
1475
1467
|
}
|
|
1476
1468
|
_getEditorObject() {
|
|
1477
|
-
return
|
|
1469
|
+
return Tn(this._editorBridgeService.getCurrentEditorId(), this._renderManagerService);
|
|
1478
1470
|
}
|
|
1479
1471
|
async _handleEditorInvisible(e) {
|
|
1480
1472
|
const { keycode: t } = e;
|
|
1481
|
-
if (this._cursorChange =
|
|
1473
|
+
if (this._cursorChange = G.InitialState, this._exitInput(e), this._editorBridgeService.getEditRectState() == null)
|
|
1482
1474
|
return;
|
|
1483
1475
|
if (this._editorBridgeService.getEditorDirty() === !1) {
|
|
1484
1476
|
this._moveCursor(t);
|
|
@@ -1487,7 +1479,7 @@ let He = class extends De {
|
|
|
1487
1479
|
this._moveCursor(t);
|
|
1488
1480
|
}
|
|
1489
1481
|
_exitInput(e) {
|
|
1490
|
-
this._contextService.setContextValue(
|
|
1482
|
+
this._contextService.setContextValue(Re, !1), this._cellEditorManagerService.setState({
|
|
1491
1483
|
show: e.visible
|
|
1492
1484
|
});
|
|
1493
1485
|
const t = this._editorBridgeService.getCurrentEditorId();
|
|
@@ -1496,22 +1488,22 @@ let He = class extends De {
|
|
|
1496
1488
|
_moveCursor(e) {
|
|
1497
1489
|
if (e != null)
|
|
1498
1490
|
switch (j.LEFT, e) {
|
|
1499
|
-
case
|
|
1491
|
+
case y.ENTER:
|
|
1500
1492
|
j.DOWN;
|
|
1501
1493
|
break;
|
|
1502
|
-
case
|
|
1494
|
+
case y.TAB:
|
|
1503
1495
|
j.RIGHT;
|
|
1504
1496
|
break;
|
|
1505
|
-
case
|
|
1497
|
+
case y.ARROW_DOWN:
|
|
1506
1498
|
j.DOWN;
|
|
1507
1499
|
break;
|
|
1508
|
-
case
|
|
1500
|
+
case y.ARROW_UP:
|
|
1509
1501
|
j.UP;
|
|
1510
1502
|
break;
|
|
1511
|
-
case
|
|
1503
|
+
case y.ARROW_LEFT:
|
|
1512
1504
|
j.LEFT;
|
|
1513
1505
|
break;
|
|
1514
|
-
case
|
|
1506
|
+
case y.ARROW_RIGHT:
|
|
1515
1507
|
j.RIGHT;
|
|
1516
1508
|
break;
|
|
1517
1509
|
}
|
|
@@ -1526,52 +1518,52 @@ let He = class extends De {
|
|
|
1526
1518
|
return;
|
|
1527
1519
|
const { document: i } = t;
|
|
1528
1520
|
e.add(St(i.onPointerDown$.subscribeEvent(() => {
|
|
1529
|
-
this._cursorChange ===
|
|
1521
|
+
this._cursorChange === G.StartEditor && (this._cursorChange = G.CursorChange);
|
|
1530
1522
|
})));
|
|
1531
1523
|
}
|
|
1532
1524
|
// TODO: @JOCS, is it necessary to move these commands MoveSelectionOperation\MoveCursorOperation to shortcut? and use multi-commands?
|
|
1533
1525
|
_moveInEditor(e, t) {
|
|
1534
1526
|
let i = j.LEFT;
|
|
1535
|
-
e ===
|
|
1527
|
+
e === y.ARROW_DOWN ? i = j.DOWN : e === y.ARROW_UP ? i = j.UP : e === y.ARROW_RIGHT && (i = j.RIGHT), t ? this._commandService.executeCommand(Fi.id, {
|
|
1536
1528
|
direction: i
|
|
1537
|
-
}) : this._commandService.executeCommand(
|
|
1529
|
+
}) : this._commandService.executeCommand(Wi.id, {
|
|
1538
1530
|
direction: i
|
|
1539
1531
|
});
|
|
1540
1532
|
}
|
|
1541
1533
|
};
|
|
1542
|
-
He =
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1534
|
+
He = yn([
|
|
1535
|
+
A(1, Ri),
|
|
1536
|
+
A(2, hi),
|
|
1537
|
+
A(3, fe),
|
|
1538
|
+
A(4, w),
|
|
1539
|
+
A(5, X),
|
|
1540
|
+
A(6, Ye),
|
|
1541
|
+
A(7, qe),
|
|
1542
|
+
A(8, Z(Bi)),
|
|
1543
|
+
A(9, U),
|
|
1544
|
+
A(10, Z(Q)),
|
|
1545
|
+
A(11, Ze)
|
|
1554
1546
|
], He);
|
|
1555
|
-
function
|
|
1547
|
+
function Tn(n, e) {
|
|
1556
1548
|
if (n == null)
|
|
1557
1549
|
return;
|
|
1558
1550
|
const t = e.getRenderById(n);
|
|
1559
1551
|
if (t == null)
|
|
1560
1552
|
return;
|
|
1561
|
-
const { mainComponent: i, scene: r, engine: s, components: o } = t,
|
|
1553
|
+
const { mainComponent: i, scene: r, engine: s, components: o } = t, c = i, a = o.get(ki.BACKGROUND);
|
|
1562
1554
|
return {
|
|
1563
|
-
document:
|
|
1564
|
-
docBackground:
|
|
1555
|
+
document: c,
|
|
1556
|
+
docBackground: a,
|
|
1565
1557
|
scene: r,
|
|
1566
1558
|
engine: s
|
|
1567
1559
|
};
|
|
1568
1560
|
}
|
|
1569
|
-
var
|
|
1570
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1561
|
+
var Mn = Object.getOwnPropertyDescriptor, Nn = (n, e, t, i) => {
|
|
1562
|
+
for (var r = i > 1 ? void 0 : i ? Mn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
1571
1563
|
(o = n[s]) && (r = o(r) || r);
|
|
1572
1564
|
return r;
|
|
1573
1565
|
}, je = (n, e) => (t, i) => e(t, i, n);
|
|
1574
|
-
let Fe = class extends
|
|
1566
|
+
let Fe = class extends ge {
|
|
1575
1567
|
constructor(e, t, i, r) {
|
|
1576
1568
|
super();
|
|
1577
1569
|
/**
|
|
@@ -1608,16 +1600,16 @@ let Fe = class extends ve {
|
|
|
1608
1600
|
}
|
|
1609
1601
|
_initEventListener(e) {
|
|
1610
1602
|
const t = (o) => {
|
|
1611
|
-
const
|
|
1612
|
-
|
|
1603
|
+
const c = o.getTransformer();
|
|
1604
|
+
c && (e.add(c.clearControl$.subscribe(() => {
|
|
1613
1605
|
this.setEditorVisible(!1), this.pickOtherObjects();
|
|
1614
|
-
})), e.add(
|
|
1606
|
+
})), e.add(c.createControl$.subscribe(() => {
|
|
1615
1607
|
this.setEditorVisible(!1);
|
|
1616
1608
|
})), e.add(o.onDblclick$.subscribeEvent(() => {
|
|
1617
|
-
|
|
1618
|
-
const h =
|
|
1609
|
+
c.clearControls();
|
|
1610
|
+
const h = c.getSelectedObjectMap().values().next().value;
|
|
1619
1611
|
h && (h.objectType !== le.RICH_TEXT ? this.pickOtherObjects() : this.startEditing(o.sceneKey, h));
|
|
1620
|
-
})), e.add(this._instanceSrv.focused$.subscribe((
|
|
1612
|
+
})), e.add(this._instanceSrv.focused$.subscribe((a) => {
|
|
1621
1613
|
this.endEditing();
|
|
1622
1614
|
})));
|
|
1623
1615
|
}, { mainComponent: i } = this._renderContext;
|
|
@@ -1626,8 +1618,8 @@ let Fe = class extends ve {
|
|
|
1626
1618
|
});
|
|
1627
1619
|
const s = Array.from(i.getSubScenes().values());
|
|
1628
1620
|
for (let o = 0; o < s.length; o++) {
|
|
1629
|
-
const
|
|
1630
|
-
t(
|
|
1621
|
+
const c = s[o];
|
|
1622
|
+
t(c);
|
|
1631
1623
|
}
|
|
1632
1624
|
}
|
|
1633
1625
|
pickOtherObjects() {
|
|
@@ -1651,10 +1643,10 @@ let Fe = class extends ve {
|
|
|
1651
1643
|
text: e.text
|
|
1652
1644
|
}, r = (s = e.documentData.body) == null ? void 0 : s.textRuns;
|
|
1653
1645
|
if (r && r.length) {
|
|
1654
|
-
const
|
|
1655
|
-
i.cl =
|
|
1646
|
+
const c = r[0].ts;
|
|
1647
|
+
i.cl = c == null ? void 0 : c.cl;
|
|
1656
1648
|
}
|
|
1657
|
-
this._commandService.executeCommand(
|
|
1649
|
+
this._commandService.executeCommand(H.id, {
|
|
1658
1650
|
unitId: this._renderContext.unitId,
|
|
1659
1651
|
oKey: e == null ? void 0 : e.oKey,
|
|
1660
1652
|
props: {
|
|
@@ -1679,96 +1671,96 @@ let Fe = class extends ve {
|
|
|
1679
1671
|
this._editorBridgeService.changeVisible({ visible: e, eventType: q.PointerDown, unitId: t });
|
|
1680
1672
|
}
|
|
1681
1673
|
};
|
|
1682
|
-
Fe =
|
|
1683
|
-
je(1,
|
|
1674
|
+
Fe = Nn([
|
|
1675
|
+
je(1, w),
|
|
1684
1676
|
je(2, U),
|
|
1685
|
-
je(3,
|
|
1677
|
+
je(3, Ye)
|
|
1686
1678
|
], Fe);
|
|
1687
|
-
const
|
|
1679
|
+
const zt = {
|
|
1688
1680
|
id: "slide.operation.activate-slide",
|
|
1689
1681
|
type: D.OPERATION,
|
|
1690
1682
|
handler: (n, e) => {
|
|
1691
1683
|
var h, l;
|
|
1692
|
-
const t = e.unitId, i = n.get(T), s = n.get(
|
|
1684
|
+
const t = e.unitId, i = n.get(T), s = n.get(w).getUnit(t), o = (h = s == null ? void 0 : s.getActivePage()) == null ? void 0 : h.id;
|
|
1693
1685
|
if (!o) return !1;
|
|
1694
|
-
const
|
|
1695
|
-
if (!
|
|
1696
|
-
const
|
|
1697
|
-
return
|
|
1686
|
+
const c = i.getRenderUnitByPageId(o, t);
|
|
1687
|
+
if (!c) return !1;
|
|
1688
|
+
const a = (l = c.scene) == null ? void 0 : l.getTransformer();
|
|
1689
|
+
return a && a.clearControls(), i.activePage(e.id, t), !0;
|
|
1698
1690
|
}
|
|
1699
|
-
},
|
|
1691
|
+
}, Kt = {
|
|
1700
1692
|
id: "slide.operation.append-slide",
|
|
1701
1693
|
type: D.OPERATION,
|
|
1702
1694
|
handler: (n, e) => {
|
|
1703
1695
|
const t = e.unitId;
|
|
1704
|
-
return n.get(
|
|
1696
|
+
return n.get(w).getUnit(t) ? (n.get(T).appendPage(t), !0) : !1;
|
|
1705
1697
|
}
|
|
1706
1698
|
}, Je = {
|
|
1707
1699
|
id: "slide.command.insert-float-image",
|
|
1708
1700
|
type: D.COMMAND,
|
|
1709
1701
|
handler: async (n, e) => {
|
|
1710
1702
|
var V;
|
|
1711
|
-
const t = n.get(
|
|
1703
|
+
const t = n.get(w), i = (V = t.getCurrentUnitForType(E.UNIVER_SLIDE)) == null ? void 0 : V.getUnitId();
|
|
1712
1704
|
if (!i) return !1;
|
|
1713
|
-
const s = await n.get(
|
|
1705
|
+
const s = await n.get(Oi).openFile({
|
|
1714
1706
|
multiple: !0,
|
|
1715
|
-
accept:
|
|
1707
|
+
accept: Ki.map((R) => `.${R.replace("image/", "")}`).join(",")
|
|
1716
1708
|
});
|
|
1717
1709
|
if (s.length !== 1) return !1;
|
|
1718
|
-
const
|
|
1719
|
-
if (!
|
|
1720
|
-
const { imageId:
|
|
1710
|
+
const c = await n.get(Zi).saveImage(s[0]);
|
|
1711
|
+
if (!c) return !1;
|
|
1712
|
+
const { imageId: a, imageSourceType: h, source: l, base64Cache: d } = c, { width: g, height: m, image: p } = await Xi(d || ""), f = t.getUnit(i);
|
|
1721
1713
|
if (!f) return !1;
|
|
1722
|
-
const
|
|
1723
|
-
id:
|
|
1714
|
+
const v = f.getActivePage(), _ = Object.values(v.pageElements), I = _ != null && _.length ? Math.max(..._.map((R) => R.zIndex)) : 20, b = {
|
|
1715
|
+
id: a,
|
|
1724
1716
|
zIndex: I + 1,
|
|
1725
1717
|
left: 0,
|
|
1726
1718
|
top: 0,
|
|
1727
|
-
width:
|
|
1728
|
-
height:
|
|
1719
|
+
width: g,
|
|
1720
|
+
height: m,
|
|
1729
1721
|
title: "",
|
|
1730
1722
|
description: "",
|
|
1731
|
-
type:
|
|
1723
|
+
type: ze.IMAGE,
|
|
1732
1724
|
image: {
|
|
1733
1725
|
imageProperties: {
|
|
1734
1726
|
contentUrl: d,
|
|
1735
1727
|
imageSourceType: h,
|
|
1736
1728
|
source: l,
|
|
1737
1729
|
base64Cache: d,
|
|
1738
|
-
image:
|
|
1730
|
+
image: p
|
|
1739
1731
|
}
|
|
1740
1732
|
}
|
|
1741
1733
|
};
|
|
1742
|
-
|
|
1743
|
-
const
|
|
1744
|
-
return M &&
|
|
1734
|
+
v.pageElements[a] = b, f.updatePage(v.id, v);
|
|
1735
|
+
const P = n.get(T), M = P.createObjectToPage(b, v.id, i);
|
|
1736
|
+
return M && P.setObjectActiveByPage(M, v.id, i), !0;
|
|
1745
1737
|
}
|
|
1746
1738
|
}, Qe = {
|
|
1747
1739
|
id: "slide.command.add-text",
|
|
1748
1740
|
type: D.COMMAND,
|
|
1749
1741
|
handler: async (n) => {
|
|
1750
1742
|
var r;
|
|
1751
|
-
const e = n.get(U), i = (r = n.get(
|
|
1752
|
-
return await e.executeCommand(
|
|
1743
|
+
const e = n.get(U), i = (r = n.get(w).getFocusedUnit()) == null ? void 0 : r.getUnitId();
|
|
1744
|
+
return await e.executeCommand(Zt.id, { unitId: i });
|
|
1753
1745
|
}
|
|
1754
|
-
},
|
|
1746
|
+
}, Zt = {
|
|
1755
1747
|
id: "slide.operation.add-text",
|
|
1756
1748
|
type: D.OPERATION,
|
|
1757
1749
|
handler: async (n, e) => {
|
|
1758
|
-
const t = e.unitId, i = Ct(6), r = 220, s = 40, o = 230,
|
|
1750
|
+
const t = e.unitId, i = Ct(6), r = 220, s = 40, o = 230, c = 142, a = (e == null ? void 0 : e.text) || "A New Text", l = n.get(w).getUnit(t);
|
|
1759
1751
|
if (!l) return !1;
|
|
1760
|
-
const d = l.getActivePage(),
|
|
1752
|
+
const d = l.getActivePage(), g = Object.values(d.pageElements), m = g != null && g.length ? Math.max(...g.map((_) => _.zIndex)) : 21, p = {
|
|
1761
1753
|
id: i,
|
|
1762
|
-
zIndex:
|
|
1754
|
+
zIndex: m + 1,
|
|
1763
1755
|
left: o,
|
|
1764
|
-
top:
|
|
1756
|
+
top: c,
|
|
1765
1757
|
width: r,
|
|
1766
1758
|
height: s,
|
|
1767
1759
|
title: "text",
|
|
1768
1760
|
description: "",
|
|
1769
|
-
type:
|
|
1761
|
+
type: ze.TEXT,
|
|
1770
1762
|
richText: {
|
|
1771
|
-
text:
|
|
1763
|
+
text: a,
|
|
1772
1764
|
fs: 30,
|
|
1773
1765
|
cl: {
|
|
1774
1766
|
rgb: "rgb(51, 51, 51)"
|
|
@@ -1776,56 +1768,56 @@ const Kt = {
|
|
|
1776
1768
|
bl: 1
|
|
1777
1769
|
}
|
|
1778
1770
|
};
|
|
1779
|
-
d.pageElements[i] =
|
|
1780
|
-
const f = n.get(T),
|
|
1781
|
-
return
|
|
1771
|
+
d.pageElements[i] = p, l.updatePage(d.id, d);
|
|
1772
|
+
const f = n.get(T), v = f.createObjectToPage(p, d.id, t);
|
|
1773
|
+
return v && f.setObjectActiveByPage(v, d.id, t), !0;
|
|
1782
1774
|
}
|
|
1783
|
-
},
|
|
1775
|
+
}, Xt = {
|
|
1784
1776
|
id: "slide.operation.set-slide-page-thumb",
|
|
1785
1777
|
type: D.OPERATION,
|
|
1786
1778
|
handler: (n, e) => (n.get(T).createThumbs(e.unitId), !0)
|
|
1787
1779
|
};
|
|
1788
|
-
function
|
|
1789
|
-
var
|
|
1790
|
-
const e = (f = (
|
|
1780
|
+
function Dn(n) {
|
|
1781
|
+
var p, f;
|
|
1782
|
+
const e = (f = (p = n.popup) == null ? void 0 : p.extraProps) == null ? void 0 : f.menuItems;
|
|
1791
1783
|
if (!e)
|
|
1792
1784
|
return null;
|
|
1793
|
-
const t =
|
|
1794
|
-
|
|
1785
|
+
const t = O(U), i = O(Q), [r, s] = $(!1), [o, c] = $(!1), a = () => {
|
|
1786
|
+
c(!0);
|
|
1795
1787
|
}, h = () => {
|
|
1796
|
-
|
|
1797
|
-
}, l = (
|
|
1798
|
-
s(
|
|
1799
|
-
}, d = (
|
|
1800
|
-
t.executeCommand(
|
|
1801
|
-
},
|
|
1788
|
+
c(!1);
|
|
1789
|
+
}, l = (v) => {
|
|
1790
|
+
s(v);
|
|
1791
|
+
}, d = (v) => {
|
|
1792
|
+
t.executeCommand(v.commandId, v.commandParams), s(!1);
|
|
1793
|
+
}, g = r || o, m = e.filter((v) => !v.disable);
|
|
1802
1794
|
return /* @__PURE__ */ u(
|
|
1803
1795
|
"div",
|
|
1804
1796
|
{
|
|
1805
|
-
onMouseEnter:
|
|
1797
|
+
onMouseEnter: a,
|
|
1806
1798
|
onMouseLeave: h,
|
|
1807
1799
|
children: /* @__PURE__ */ u(
|
|
1808
|
-
|
|
1800
|
+
Pt,
|
|
1809
1801
|
{
|
|
1810
1802
|
align: "start",
|
|
1811
1803
|
overlay: /* @__PURE__ */ u(
|
|
1812
1804
|
"ul",
|
|
1813
1805
|
{
|
|
1814
1806
|
className: K("univer-m-0 univer-box-border univer-grid univer-list-none univer-items-center univer-gap-1 univer-rounded-lg univer-bg-white univer-p-1.5 univer-text-sm univer-shadow-lg", ue),
|
|
1815
|
-
children:
|
|
1807
|
+
children: m.map((v) => /* @__PURE__ */ u(
|
|
1816
1808
|
"li",
|
|
1817
1809
|
{
|
|
1818
1810
|
className: "univer-relative univer-box-border univer-flex univer-h-8 univer-cursor-pointer univer-items-center univer-rounded univer-text-sm univer-transition-colors hover:univer-bg-gray-100",
|
|
1819
|
-
onClick: () => d(
|
|
1820
|
-
children: /* @__PURE__ */ u("span", { className: "univer-px-2 univer-py-1.5 univer-align-middle", children: i.t(
|
|
1811
|
+
onClick: () => d(v),
|
|
1812
|
+
children: /* @__PURE__ */ u("span", { className: "univer-px-2 univer-py-1.5 univer-align-middle", children: i.t(v.label) })
|
|
1821
1813
|
},
|
|
1822
|
-
|
|
1814
|
+
v.index
|
|
1823
1815
|
))
|
|
1824
1816
|
}
|
|
1825
1817
|
),
|
|
1826
1818
|
open: r,
|
|
1827
1819
|
onOpenChange: l,
|
|
1828
|
-
children: /* @__PURE__ */
|
|
1820
|
+
children: /* @__PURE__ */ x(
|
|
1829
1821
|
"div",
|
|
1830
1822
|
{
|
|
1831
1823
|
className: K("univer-flex univer-items-center univer-gap-2 univer-rounded univer-p-1 dark:hover:!univer-bg-gray-800 hover:univer-bg-gray-100", ue, {
|
|
@@ -1834,12 +1826,12 @@ function Bn(n) {
|
|
|
1834
1826
|
}),
|
|
1835
1827
|
children: [
|
|
1836
1828
|
/* @__PURE__ */ u(
|
|
1837
|
-
|
|
1829
|
+
Vt,
|
|
1838
1830
|
{
|
|
1839
1831
|
className: "univer-fill-primary-600 univer-text-gray-900 dark:!univer-text-white"
|
|
1840
1832
|
}
|
|
1841
1833
|
),
|
|
1842
|
-
|
|
1834
|
+
g && /* @__PURE__ */ u(Xe, { className: "dark:!univer-text-white" })
|
|
1843
1835
|
]
|
|
1844
1836
|
}
|
|
1845
1837
|
)
|
|
@@ -1848,56 +1840,56 @@ function Bn(n) {
|
|
|
1848
1840
|
}
|
|
1849
1841
|
);
|
|
1850
1842
|
}
|
|
1851
|
-
function
|
|
1852
|
-
var
|
|
1853
|
-
const n =
|
|
1854
|
-
if (!o || !
|
|
1843
|
+
function Un() {
|
|
1844
|
+
var p, f;
|
|
1845
|
+
const n = O(w), e = O(U), t = O(X), i = O(Q), r = Mt(null), s = n.getCurrentUnitForType(E.UNIVER_SLIDE), o = s == null ? void 0 : s.getPages(), c = s == null ? void 0 : s.getPageOrder();
|
|
1846
|
+
if (!o || !c)
|
|
1855
1847
|
return null;
|
|
1856
|
-
const
|
|
1848
|
+
const a = c.map((v) => o[v]), [h, l] = $((f = (p = s == null ? void 0 : s.getActivePage()) == null ? void 0 : p.id) != null ? f : null), d = ji(() => a.map(() => Ai()), [a]);
|
|
1857
1849
|
he(() => {
|
|
1858
|
-
const
|
|
1850
|
+
const v = s == null ? void 0 : s.activePage$.subscribe((_) => {
|
|
1859
1851
|
var b;
|
|
1860
1852
|
const I = (b = _ == null ? void 0 : _.id) != null ? b : null;
|
|
1861
1853
|
I && l(I);
|
|
1862
1854
|
});
|
|
1863
1855
|
return () => {
|
|
1864
|
-
|
|
1856
|
+
v == null || v.unsubscribe();
|
|
1865
1857
|
};
|
|
1866
1858
|
}, []), he(() => {
|
|
1867
|
-
d.forEach((
|
|
1859
|
+
d.forEach((v, _) => {
|
|
1868
1860
|
var I;
|
|
1869
|
-
if (
|
|
1870
|
-
const b =
|
|
1871
|
-
(I = t.getRenderById(b.id)) == null || I.engine.setContainer(
|
|
1861
|
+
if (v.current) {
|
|
1862
|
+
const b = a[_];
|
|
1863
|
+
(I = t.getRenderById(b.id)) == null || I.engine.setContainer(v.current);
|
|
1872
1864
|
}
|
|
1873
|
-
}), d.length > 0 && e.syncExecuteCommand(
|
|
1874
|
-
}, [d,
|
|
1875
|
-
const
|
|
1876
|
-
e.syncExecuteCommand(
|
|
1877
|
-
}, [e, s]),
|
|
1878
|
-
e.syncExecuteCommand(
|
|
1865
|
+
}), d.length > 0 && e.syncExecuteCommand(Xt.id, { unitId: s == null ? void 0 : s.getUnitId() });
|
|
1866
|
+
}, [d, a, t, e, s]);
|
|
1867
|
+
const g = at((v) => {
|
|
1868
|
+
e.syncExecuteCommand(zt.id, { id: v, unitId: s == null ? void 0 : s.getUnitId() });
|
|
1869
|
+
}, [e, s]), m = at(() => {
|
|
1870
|
+
e.syncExecuteCommand(Kt.id, { unitId: s == null ? void 0 : s.getUnitId() });
|
|
1879
1871
|
}, [e, s]);
|
|
1880
1872
|
return /* @__PURE__ */ u(
|
|
1881
1873
|
"aside",
|
|
1882
1874
|
{
|
|
1883
1875
|
ref: r,
|
|
1884
|
-
className: K("univer-flex univer-h-full univer-w-64 univer-flex-col univer-overflow-y-auto univer-overflow-x-hidden",
|
|
1885
|
-
children: /* @__PURE__ */
|
|
1876
|
+
className: K("univer-flex univer-h-full univer-w-64 univer-flex-col univer-overflow-y-auto univer-overflow-x-hidden", Vi),
|
|
1877
|
+
children: /* @__PURE__ */ x("div", { className: "univer-px-4", children: [
|
|
1886
1878
|
/* @__PURE__ */ u("header", { className: "univer-flex univer-justify-center univer-pt-4", children: /* @__PURE__ */ u(
|
|
1887
1879
|
"a",
|
|
1888
1880
|
{
|
|
1889
1881
|
className: K("univer-box-border univer-block univer-h-8 univer-w-full univer-cursor-pointer univer-rounded-md univer-bg-white univer-text-center univer-text-sm univer-leading-8 univer-transition-colors", ue),
|
|
1890
|
-
onClick:
|
|
1882
|
+
onClick: m,
|
|
1891
1883
|
children: i.t("slide.append")
|
|
1892
1884
|
}
|
|
1893
1885
|
) }),
|
|
1894
|
-
|
|
1886
|
+
a.map((v, _) => /* @__PURE__ */ x(
|
|
1895
1887
|
"div",
|
|
1896
1888
|
{
|
|
1897
1889
|
className: K("univer-my-4 univer-flex univer-gap-2", {
|
|
1898
|
-
"[&>div]:univer-border-primary-600 [&>span]:univer-text-primary-600":
|
|
1890
|
+
"[&>div]:univer-border-primary-600 [&>span]:univer-text-primary-600": v.id === h
|
|
1899
1891
|
}),
|
|
1900
|
-
onClick: () => v
|
|
1892
|
+
onClick: () => g(v.id),
|
|
1901
1893
|
children: [
|
|
1902
1894
|
/* @__PURE__ */ u("span", { children: _ + 1 }),
|
|
1903
1895
|
/* @__PURE__ */ u(
|
|
@@ -1909,53 +1901,54 @@ function $n() {
|
|
|
1909
1901
|
)
|
|
1910
1902
|
]
|
|
1911
1903
|
},
|
|
1912
|
-
|
|
1904
|
+
v.id
|
|
1913
1905
|
))
|
|
1914
1906
|
] })
|
|
1915
1907
|
}
|
|
1916
1908
|
);
|
|
1917
1909
|
}
|
|
1918
|
-
const Te = -1e3,
|
|
1910
|
+
const Te = -1e3, mt = {
|
|
1919
1911
|
width: 0,
|
|
1920
1912
|
height: 0,
|
|
1921
1913
|
top: Te,
|
|
1922
1914
|
left: Te
|
|
1923
|
-
}
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1915
|
+
};
|
|
1916
|
+
function Vn() {
|
|
1917
|
+
const [n, e] = $({
|
|
1918
|
+
...mt
|
|
1919
|
+
}), t = O(qe), i = O(Ze), r = O(fe), s = wi(
|
|
1927
1920
|
() => r.subscribeContextValue$(st),
|
|
1928
1921
|
!1,
|
|
1929
1922
|
void 0,
|
|
1930
1923
|
[r, st]
|
|
1931
1924
|
);
|
|
1932
|
-
return
|
|
1925
|
+
return fi.UNSPECIFIED, he(() => {
|
|
1933
1926
|
t.state$.subscribe((o) => {
|
|
1934
1927
|
if (o == null)
|
|
1935
1928
|
return;
|
|
1936
1929
|
const {
|
|
1937
|
-
startX:
|
|
1938
|
-
startY:
|
|
1930
|
+
startX: c = Te,
|
|
1931
|
+
startY: a = Te,
|
|
1939
1932
|
endX: h = 0,
|
|
1940
1933
|
endY: l = 0,
|
|
1941
1934
|
show: d = !1
|
|
1942
1935
|
} = o;
|
|
1943
1936
|
if (!d)
|
|
1944
1937
|
e({
|
|
1945
|
-
...
|
|
1938
|
+
...mt
|
|
1946
1939
|
});
|
|
1947
1940
|
else {
|
|
1948
1941
|
e({
|
|
1949
|
-
width: h -
|
|
1950
|
-
height: l -
|
|
1951
|
-
left:
|
|
1952
|
-
top:
|
|
1942
|
+
width: h - c - ne + 2,
|
|
1943
|
+
height: l - a - ne + 2,
|
|
1944
|
+
left: c + ne,
|
|
1945
|
+
top: a + ne
|
|
1953
1946
|
});
|
|
1954
|
-
const
|
|
1955
|
-
if (
|
|
1947
|
+
const g = i.getEditor(de);
|
|
1948
|
+
if (g == null)
|
|
1956
1949
|
return;
|
|
1957
|
-
const { left:
|
|
1958
|
-
t.setRect({ left:
|
|
1950
|
+
const { left: m, top: p, width: f, height: v } = g.getBoundingClientRect();
|
|
1951
|
+
t.setRect({ left: m, top: p, width: f, height: v });
|
|
1959
1952
|
}
|
|
1960
1953
|
});
|
|
1961
1954
|
}, []), he(() => {
|
|
@@ -1972,95 +1965,95 @@ const Te = -1e3, pt = {
|
|
|
1972
1965
|
}
|
|
1973
1966
|
}
|
|
1974
1967
|
);
|
|
1975
|
-
}
|
|
1976
|
-
|
|
1968
|
+
}
|
|
1969
|
+
const Gt = "slide.menu.image";
|
|
1970
|
+
function jn(n) {
|
|
1977
1971
|
return {
|
|
1978
|
-
id:
|
|
1979
|
-
type:
|
|
1980
|
-
icon:
|
|
1972
|
+
id: Gt,
|
|
1973
|
+
type: me.SUBITEMS,
|
|
1974
|
+
icon: "AddImageIcon",
|
|
1981
1975
|
tooltip: "slide.image.insert.title",
|
|
1982
|
-
hidden$:
|
|
1976
|
+
hidden$: pe(n, E.UNIVER_SLIDE)
|
|
1983
1977
|
};
|
|
1984
1978
|
}
|
|
1985
|
-
function
|
|
1979
|
+
function An(n) {
|
|
1986
1980
|
return {
|
|
1987
1981
|
id: Je.id,
|
|
1988
1982
|
title: "slide.image.insert.float",
|
|
1989
|
-
type:
|
|
1990
|
-
hidden$:
|
|
1983
|
+
type: me.BUTTON,
|
|
1984
|
+
hidden$: pe(n, E.UNIVER_SLIDE)
|
|
1991
1985
|
};
|
|
1992
1986
|
}
|
|
1993
|
-
const
|
|
1994
|
-
function
|
|
1987
|
+
const Yt = "slide.menu.shape";
|
|
1988
|
+
function Ln(n) {
|
|
1995
1989
|
return {
|
|
1996
|
-
id:
|
|
1997
|
-
type:
|
|
1998
|
-
icon:
|
|
1990
|
+
id: Yt,
|
|
1991
|
+
type: me.SUBITEMS,
|
|
1992
|
+
icon: "GraphIcon",
|
|
1999
1993
|
tooltip: "slide.shape.insert.title",
|
|
2000
|
-
hidden$:
|
|
1994
|
+
hidden$: pe(n, E.UNIVER_SLIDE)
|
|
2001
1995
|
// disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),
|
|
2002
1996
|
};
|
|
2003
1997
|
}
|
|
2004
|
-
function
|
|
1998
|
+
function Bn(n) {
|
|
2005
1999
|
return {
|
|
2006
|
-
id:
|
|
2000
|
+
id: Ge.id,
|
|
2007
2001
|
title: "slide.shape.insert.rectangle",
|
|
2008
|
-
type:
|
|
2009
|
-
hidden$:
|
|
2002
|
+
type: me.BUTTON,
|
|
2003
|
+
hidden$: pe(n, E.UNIVER_SLIDE)
|
|
2010
2004
|
};
|
|
2011
2005
|
}
|
|
2012
|
-
|
|
2013
|
-
function Kn(n) {
|
|
2006
|
+
function $n(n) {
|
|
2014
2007
|
return {
|
|
2015
2008
|
id: Qe.id,
|
|
2016
|
-
type:
|
|
2017
|
-
icon:
|
|
2009
|
+
type: me.BUTTON,
|
|
2010
|
+
icon: "TextIcon",
|
|
2018
2011
|
tooltip: "slide.text.insert.title",
|
|
2019
|
-
hidden$:
|
|
2012
|
+
hidden$: pe(n, E.UNIVER_SLIDE)
|
|
2020
2013
|
};
|
|
2021
2014
|
}
|
|
2022
|
-
const
|
|
2023
|
-
[
|
|
2015
|
+
const Hn = {
|
|
2016
|
+
[yi.FORMAT]: {
|
|
2024
2017
|
[Qe.id]: {
|
|
2025
2018
|
order: 0,
|
|
2026
|
-
menuItemFactory:
|
|
2019
|
+
menuItemFactory: $n
|
|
2027
2020
|
},
|
|
2028
|
-
[
|
|
2021
|
+
[Gt]: {
|
|
2029
2022
|
order: 0,
|
|
2030
|
-
menuItemFactory:
|
|
2023
|
+
menuItemFactory: jn,
|
|
2031
2024
|
[Je.id]: {
|
|
2032
2025
|
order: 0,
|
|
2033
|
-
menuItemFactory:
|
|
2026
|
+
menuItemFactory: An
|
|
2034
2027
|
}
|
|
2035
2028
|
},
|
|
2036
|
-
[
|
|
2029
|
+
[Yt]: {
|
|
2037
2030
|
order: 0,
|
|
2038
|
-
menuItemFactory:
|
|
2039
|
-
[
|
|
2031
|
+
menuItemFactory: Ln,
|
|
2032
|
+
[Ge.id]: {
|
|
2040
2033
|
order: 0,
|
|
2041
|
-
menuItemFactory:
|
|
2034
|
+
menuItemFactory: Bn
|
|
2042
2035
|
}
|
|
2043
2036
|
}
|
|
2044
2037
|
}
|
|
2045
2038
|
};
|
|
2046
2039
|
function We(n) {
|
|
2047
|
-
return n.getContextValue(
|
|
2040
|
+
return n.getContextValue(Rt) && n.getContextValue(Re);
|
|
2048
2041
|
}
|
|
2049
|
-
function
|
|
2050
|
-
return n.getContextValue(
|
|
2042
|
+
function Fn(n) {
|
|
2043
|
+
return n.getContextValue(pi) && n.getContextValue(Rt);
|
|
2051
2044
|
}
|
|
2052
|
-
const
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2045
|
+
const qt = [
|
|
2046
|
+
y.ARROW_DOWN,
|
|
2047
|
+
y.ARROW_UP,
|
|
2048
|
+
y.ARROW_LEFT,
|
|
2049
|
+
y.ARROW_RIGHT
|
|
2057
2050
|
];
|
|
2058
|
-
[
|
|
2059
|
-
function
|
|
2051
|
+
[y.ENTER, y.TAB, ...qt];
|
|
2052
|
+
function Wn() {
|
|
2060
2053
|
const n = [];
|
|
2061
|
-
for (const e of
|
|
2054
|
+
for (const e of qt)
|
|
2062
2055
|
n.push({
|
|
2063
|
-
id:
|
|
2056
|
+
id: Pe.id,
|
|
2064
2057
|
binding: e,
|
|
2065
2058
|
preconditions: (t) => We(t),
|
|
2066
2059
|
staticParameters: {
|
|
@@ -2070,8 +2063,8 @@ function Yn() {
|
|
|
2070
2063
|
isShift: !1
|
|
2071
2064
|
}
|
|
2072
2065
|
}), n.push({
|
|
2073
|
-
id:
|
|
2074
|
-
binding: e |
|
|
2066
|
+
id: Pe.id,
|
|
2067
|
+
binding: e | Pi.SHIFT,
|
|
2075
2068
|
preconditions: (t) => We(t),
|
|
2076
2069
|
staticParameters: {
|
|
2077
2070
|
visible: !1,
|
|
@@ -2082,13 +2075,13 @@ function Yn() {
|
|
|
2082
2075
|
});
|
|
2083
2076
|
return n;
|
|
2084
2077
|
}
|
|
2085
|
-
const
|
|
2086
|
-
id:
|
|
2087
|
-
preconditions: (n) => We(n) ||
|
|
2088
|
-
binding:
|
|
2078
|
+
const kn = {
|
|
2079
|
+
id: zi.id,
|
|
2080
|
+
preconditions: (n) => We(n) || Fn(n),
|
|
2081
|
+
binding: y.BACKSPACE
|
|
2089
2082
|
};
|
|
2090
|
-
var
|
|
2091
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
2083
|
+
var zn = Object.getOwnPropertyDescriptor, Kn = (n, e, t, i) => {
|
|
2084
|
+
for (var r = i > 1 ? void 0 : i ? zn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
2092
2085
|
(o = n[s]) && (r = o(r) || r);
|
|
2093
2086
|
return r;
|
|
2094
2087
|
}, ie = (n, e) => (t, i) => e(t, i, n);
|
|
@@ -2097,59 +2090,59 @@ let Me = class extends De {
|
|
|
2097
2090
|
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();
|
|
2098
2091
|
}
|
|
2099
2092
|
_initMenus() {
|
|
2100
|
-
this._menuManagerService.mergeMenu(
|
|
2093
|
+
this._menuManagerService.mergeMenu(Hn);
|
|
2101
2094
|
}
|
|
2102
2095
|
_initCustomComponents() {
|
|
2103
2096
|
const n = this._componentManager;
|
|
2104
|
-
this.disposeWithMe(n.register(
|
|
2097
|
+
this.disposeWithMe(n.register("TextIcon", Ht)), this.disposeWithMe(n.register("GraphIcon", At)), this.disposeWithMe(n.register(kt, Dn)), this.disposeWithMe(n.register(xe, _n));
|
|
2105
2098
|
}
|
|
2106
2099
|
_initCommands() {
|
|
2107
2100
|
[
|
|
2108
|
-
Xt,
|
|
2109
2101
|
Kt,
|
|
2110
|
-
|
|
2102
|
+
zt,
|
|
2103
|
+
Xt,
|
|
2111
2104
|
Je,
|
|
2112
|
-
|
|
2105
|
+
Zt,
|
|
2113
2106
|
Qe,
|
|
2114
|
-
|
|
2115
|
-
|
|
2107
|
+
Wt,
|
|
2108
|
+
Ge,
|
|
2116
2109
|
Be,
|
|
2117
2110
|
Dt,
|
|
2118
|
-
|
|
2111
|
+
H,
|
|
2119
2112
|
// commands for editor
|
|
2120
|
-
|
|
2113
|
+
Pe
|
|
2121
2114
|
].forEach((n) => this.disposeWithMe(this._commandService.registerCommand(n)));
|
|
2122
2115
|
}
|
|
2123
2116
|
_initUIComponents() {
|
|
2124
2117
|
this.disposeWithMe(
|
|
2125
|
-
this._uiPartsService.registerComponent(ot.LEFT_SIDEBAR, () =>
|
|
2118
|
+
this._uiPartsService.registerComponent(ot.LEFT_SIDEBAR, () => ct(Un, this._injector))
|
|
2126
2119
|
), this.disposeWithMe(
|
|
2127
|
-
this._uiPartsService.registerComponent(ot.CONTENT, () =>
|
|
2120
|
+
this._uiPartsService.registerComponent(ot.CONTENT, () => ct(Vn, this._injector))
|
|
2128
2121
|
);
|
|
2129
2122
|
}
|
|
2130
2123
|
_initShortcuts() {
|
|
2131
2124
|
[
|
|
2132
|
-
|
|
2133
|
-
...
|
|
2125
|
+
kn,
|
|
2126
|
+
...Wn()
|
|
2134
2127
|
].forEach((n) => {
|
|
2135
2128
|
this.disposeWithMe(this._shortcutService.registerShortcut(n));
|
|
2136
2129
|
});
|
|
2137
2130
|
}
|
|
2138
2131
|
};
|
|
2139
|
-
Me =
|
|
2140
|
-
ie(0,
|
|
2141
|
-
ie(1,
|
|
2142
|
-
ie(2,
|
|
2143
|
-
ie(3,
|
|
2132
|
+
Me = Kn([
|
|
2133
|
+
ie(0, Z(ke)),
|
|
2134
|
+
ie(1, Ti),
|
|
2135
|
+
ie(2, Z(Mi)),
|
|
2136
|
+
ie(3, Ni),
|
|
2144
2137
|
ie(4, U),
|
|
2145
|
-
ie(5,
|
|
2138
|
+
ie(5, Di)
|
|
2146
2139
|
], Me);
|
|
2147
|
-
var
|
|
2148
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
2140
|
+
var Zn = Object.getOwnPropertyDescriptor, Xn = (n, e, t, i) => {
|
|
2141
|
+
for (var r = i > 1 ? void 0 : i ? Zn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
2149
2142
|
(o = n[s]) && (r = o(r) || r);
|
|
2150
2143
|
return r;
|
|
2151
|
-
},
|
|
2152
|
-
let Ne = class extends
|
|
2144
|
+
}, Ae = (n, e) => (t, i) => e(t, i, n);
|
|
2145
|
+
let Ne = class extends ge {
|
|
2153
2146
|
// private _skeletonChangeMutations = new Set<string>();
|
|
2154
2147
|
constructor(n, e, t) {
|
|
2155
2148
|
super(), this._contextService = n, this._instanceSrv = e, this._renderManagerService = t, Promise.resolve().then(() => this._init());
|
|
@@ -2174,41 +2167,41 @@ let Ne = class extends ve {
|
|
|
2174
2167
|
_initContextListener() {
|
|
2175
2168
|
}
|
|
2176
2169
|
};
|
|
2177
|
-
Ne =
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2170
|
+
Ne = Xn([
|
|
2171
|
+
Ae(0, fe),
|
|
2172
|
+
Ae(1, w),
|
|
2173
|
+
Ae(2, X)
|
|
2181
2174
|
], Ne);
|
|
2182
|
-
var
|
|
2183
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
2175
|
+
var Gn = Object.getOwnPropertyDescriptor, Yn = (n, e, t, i) => {
|
|
2176
|
+
for (var r = i > 1 ? void 0 : i ? Gn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
2184
2177
|
(o = n[s]) && (r = o(r) || r);
|
|
2185
2178
|
return r;
|
|
2186
2179
|
}, be = (n, e) => (t, i) => e(t, i, n);
|
|
2187
|
-
const
|
|
2180
|
+
const qn = "SLIDE_UI";
|
|
2188
2181
|
var Ee;
|
|
2189
|
-
let _t = (Ee = class extends
|
|
2190
|
-
constructor(n =
|
|
2182
|
+
let _t = (Ee = class extends mi {
|
|
2183
|
+
constructor(n = vt, e, t, i, r) {
|
|
2191
2184
|
super(), this._config = n, this._injector = e, this._renderManagerService = t, this._univerInstanceService = i, this._configService = r;
|
|
2192
|
-
const { menu: s, ...o } =
|
|
2185
|
+
const { menu: s, ...o } = _i(
|
|
2193
2186
|
{},
|
|
2194
|
-
|
|
2187
|
+
vt,
|
|
2195
2188
|
this._config
|
|
2196
2189
|
);
|
|
2197
|
-
s && this._configService.setConfig("menu", s, { merge: !0 }), this._configService.setConfig(
|
|
2190
|
+
s && this._configService.setConfig("menu", s, { merge: !0 }), this._configService.setConfig(en, o);
|
|
2198
2191
|
}
|
|
2199
2192
|
onStarting() {
|
|
2200
2193
|
tt([
|
|
2201
2194
|
[Ne],
|
|
2202
|
-
[
|
|
2195
|
+
[Ye, { useClass: $e }],
|
|
2203
2196
|
// used by SlideUIController --> EditorContainer
|
|
2204
|
-
[qe, { useClass:
|
|
2205
|
-
[
|
|
2197
|
+
[qe, { useClass: On }],
|
|
2198
|
+
[we]
|
|
2206
2199
|
], this._config.override).forEach((n) => this._injector.add(n));
|
|
2207
2200
|
}
|
|
2208
2201
|
onReady() {
|
|
2209
2202
|
[
|
|
2210
2203
|
// SlideRenderService will be init in ready stage, and then calling RenderManagerService@createRender --> init all deps in this rendering register block.
|
|
2211
|
-
[
|
|
2204
|
+
[ve]
|
|
2212
2205
|
].forEach((n) => {
|
|
2213
2206
|
this.disposeWithMe(this._renderManagerService.registerRenderModule(E.UNIVER_SLIDE, n));
|
|
2214
2207
|
}), tt([
|
|
@@ -2221,8 +2214,8 @@ let _t = (Ee = class extends Ii {
|
|
|
2221
2214
|
// SlidesUIController controller would add a new RenderUnit (__INTERNAL_EDITOR__DOCS_NORMAL)
|
|
2222
2215
|
[Me],
|
|
2223
2216
|
// editor service was create in renderManagerService
|
|
2224
|
-
[
|
|
2225
|
-
[
|
|
2217
|
+
[ve],
|
|
2218
|
+
[ye]
|
|
2226
2219
|
], this._config.override).forEach((n) => {
|
|
2227
2220
|
this._injector.add(n);
|
|
2228
2221
|
}), this._injector.get(T), this._injector.get(Ne);
|
|
@@ -2238,7 +2231,7 @@ let _t = (Ee = class extends Ii {
|
|
|
2238
2231
|
}), this._markSlideAsFocused(), this._injector.get(Me);
|
|
2239
2232
|
}
|
|
2240
2233
|
onSteady() {
|
|
2241
|
-
this._injector.get(
|
|
2234
|
+
this._injector.get(ye);
|
|
2242
2235
|
}
|
|
2243
2236
|
_markSlideAsFocused() {
|
|
2244
2237
|
const n = this._univerInstanceService;
|
|
@@ -2248,33 +2241,33 @@ let _t = (Ee = class extends Ii {
|
|
|
2248
2241
|
} catch {
|
|
2249
2242
|
}
|
|
2250
2243
|
}
|
|
2251
|
-
}, S(Ee, "pluginName",
|
|
2252
|
-
_t =
|
|
2253
|
-
be(1,
|
|
2254
|
-
be(2,
|
|
2255
|
-
be(3,
|
|
2256
|
-
be(4,
|
|
2244
|
+
}, S(Ee, "pluginName", qn), S(Ee, "type", E.UNIVER_SLIDE), Ee);
|
|
2245
|
+
_t = Yn([
|
|
2246
|
+
be(1, Z(ke)),
|
|
2247
|
+
be(2, X),
|
|
2248
|
+
be(3, w),
|
|
2249
|
+
be(4, Ci)
|
|
2257
2250
|
], _t);
|
|
2258
2251
|
export {
|
|
2259
|
-
|
|
2260
|
-
|
|
2252
|
+
zt as ActivateSlidePageOperation,
|
|
2253
|
+
Kt as AppendSlideOperation,
|
|
2261
2254
|
T as CanvasView,
|
|
2262
2255
|
Dt as DeleteSlideElementOperation,
|
|
2263
|
-
|
|
2256
|
+
Ye as ISlideEditorBridgeService,
|
|
2264
2257
|
Je as InsertSlideFloatImageCommand,
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2258
|
+
Ge as InsertSlideShapeRectangleCommand,
|
|
2259
|
+
Wt as InsertSlideShapeRectangleOperation,
|
|
2260
|
+
Yt as SHAPE_MENU_ID,
|
|
2261
|
+
Gt as SLIDES_IMAGE_MENU_ID,
|
|
2269
2262
|
de as SLIDE_EDITOR_ID,
|
|
2270
|
-
|
|
2263
|
+
Xt as SetSlidePageThumbOperation,
|
|
2271
2264
|
Qe as SlideAddTextCommand,
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2265
|
+
Zt as SlideAddTextOperation,
|
|
2266
|
+
we as SlideCanvasPopMangerService,
|
|
2267
|
+
Vn as SlideEditorContainer,
|
|
2268
|
+
Un as SlideSideBar,
|
|
2276
2269
|
Me as SlidesUIController,
|
|
2277
|
-
|
|
2270
|
+
Hn as SlidesUIMenuSchema,
|
|
2278
2271
|
_t as UniverSlidesUIPlugin,
|
|
2279
|
-
|
|
2272
|
+
H as UpdateSlideElementOperation
|
|
2280
2273
|
};
|