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