@univerjs/slides-ui 0.10.12 → 0.10.13-nightly.202510290902
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +2 -2
- package/lib/es/index.js +985 -687
- package/lib/index.js +985 -687
- package/lib/umd/index.js +2 -2
- package/package.json +13 -13
- package/LICENSE +0 -176
package/lib/es/index.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
var
|
|
2
|
-
var ci = (n, e, t) => e in n ?
|
|
1
|
+
var oi = Object.defineProperty;
|
|
2
|
+
var ci = (n, e, t) => e in n ? oi(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
3
|
var S = (n, e, t) => ci(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { Inject as
|
|
5
|
-
import { IRenderManagerService as
|
|
6
|
-
import { ObjectProvider as
|
|
7
|
-
import { DRAWING_IMAGE_ALLOW_IMAGE_LIST as
|
|
8
|
-
import { ILocalFileService as
|
|
4
|
+
import { Inject as z, Injector as ke, IUniverInstanceService as w, RxDisposable as fe, UniverInstanceType as E, debounce as ai, getColorStyle as li, CommandType as N, PageElementType as Ne, merge as St, LocaleService as J, ICommandService as D, generateRandomId as ze, BasicShapes as It, createInternalEditorID as di, createIdentifier as bt, IContextService as pe, DocumentFlavor as ui, FOCUSING_UNIVER_EDITOR as Et, EDITOR_ACTIVATED as xe, FORMULA_EDITOR_ACTIVATED as hi, Disposable as De, DisposableCollection as Ke, toDisposable as xt, FOCUSING_COMMON_DRAWINGS as gi, FOCUSING_EDITOR_STANDALONE as Rt, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE as Ot, DocumentDataModel as vi, HorizontalAlign as wt, VerticalAlign as Re, IUndoRedoService as fi, WrapStrategy as tt, FOCUSING_EDITOR_BUT_HIDDEN as pi, DEFAULT_EMPTY_DOCUMENT_VALUE as mi, Direction as V, Plugin as _i, mergeOverrideWithDependencies as it, IConfigService as Ci } from "@univerjs/core";
|
|
5
|
+
import { IRenderManagerService as K, Viewport as nt, ScrollBar as Pt, getCurrentTypeOfRenderer as Le, Slide as Si, Rect as yt, Scene as Ii, ObjectType as de, FIX_ONE_PIXEL_BLUR_OFFSET as ie, DeviceInputEventType as Y, pxToNum as bi, convertTextRotation as rt, fixLineWidthByScale as st } from "@univerjs/engine-render";
|
|
6
|
+
import { ObjectProvider as Ei, SLIDE_KEY as ne } from "@univerjs/slides";
|
|
7
|
+
import { DRAWING_IMAGE_ALLOW_IMAGE_LIST as xi, IImageIoService as Ri, getImageSize as Oi } from "@univerjs/drawing";
|
|
8
|
+
import { ILocalFileService as wi, useDependency as O, ISidebarService as Tt, getMenuHiddenObservable as re, MenuItemType as se, RibbonStartGroup as Pi, useObservable as yi, DISABLE_AUTO_FOCUS_KEY as ot, KeyCode as P, MetaKeys as Ti, IMenuManagerService as Mi, ComponentManager as Ni, IUIPartsService as Di, IShortcutService as Ui, BuiltInUIPart as ct, connectInjector as at, ICanvasPopupService as Vi, ILayoutService as ji } from "@univerjs/ui";
|
|
9
9
|
import { jsxs as x, jsx as u } from "react/jsx-runtime";
|
|
10
|
-
import { Button as
|
|
11
|
-
import {
|
|
12
|
-
import { IEditorService as
|
|
13
|
-
import { BehaviorSubject as
|
|
14
|
-
import { DocSelectionManagerService as
|
|
15
|
-
var
|
|
16
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
10
|
+
import { Button as Ce, clsx as k, Dropdown as Mt, ColorPicker as Ai, borderTopClassName as Nt, InputNumber as le, borderClassName as he, scrollbarClassName as Li } from "@univerjs/design";
|
|
11
|
+
import { useRef as Dt, createElement as H, forwardRef as Z, useState as $, useEffect as ge, useMemo as $i, createRef as Bi, useCallback as lt } from "react";
|
|
12
|
+
import { IEditorService as Ze, DeleteLeftCommand as Hi, DocSelectionRenderService as dt, VIEWPORT_KEY as ut, DOCS_COMPONENT_MAIN_LAYER_INDEX as Fi, MoveSelectionOperation as Wi, MoveCursorOperation as ki, DOCS_VIEW_KEY as zi } from "@univerjs/docs-ui";
|
|
13
|
+
import { BehaviorSubject as q, Subject as Ut, filter as Ki, takeUntil as ht } from "rxjs";
|
|
14
|
+
import { DocSelectionManagerService as Zi, DocSkeletonManagerService as gt, RichTextEditingMutation as Gi } from "@univerjs/docs";
|
|
15
|
+
var Xi = Object.getOwnPropertyDescriptor, Yi = (n, e, t, i) => {
|
|
16
|
+
for (var r = i > 1 ? void 0 : i ? Xi(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
17
17
|
(o = n[s]) && (r = o(r) || r);
|
|
18
18
|
return r;
|
|
19
|
-
},
|
|
20
|
-
let
|
|
19
|
+
}, Ue = (n, e) => (t, i) => e(t, i, n);
|
|
20
|
+
let ve = class extends fe {
|
|
21
21
|
constructor(e, t, i, r) {
|
|
22
22
|
super();
|
|
23
23
|
S(this, "_objectProvider", null);
|
|
24
|
-
S(this, "_refreshThumb",
|
|
24
|
+
S(this, "_refreshThumb", ai(() => {
|
|
25
25
|
this.createThumbs();
|
|
26
26
|
}, 300));
|
|
27
|
-
this._renderContext = e, this._injector = t, this._univerInstanceService = i, this._renderManagerService = r, this._objectProvider = this._injector.createInstance(
|
|
27
|
+
this._renderContext = e, this._injector = t, this._univerInstanceService = i, this._renderManagerService = r, this._objectProvider = this._injector.createInstance(Ei), this._addNewRender();
|
|
28
28
|
}
|
|
29
29
|
_addNewRender() {
|
|
30
30
|
const { unitId: e, engine: t, scene: i } = this._renderContext, r = this._getCurrUnitModel();
|
|
@@ -37,7 +37,7 @@ let fe = class extends pe {
|
|
|
37
37
|
this.createThumbs();
|
|
38
38
|
}, 300);
|
|
39
39
|
});
|
|
40
|
-
const o = new
|
|
40
|
+
const o = new nt(ne.VIEW, i, {
|
|
41
41
|
left: 0,
|
|
42
42
|
top: 0,
|
|
43
43
|
bottom: 0,
|
|
@@ -46,8 +46,8 @@ let fe = class extends pe {
|
|
|
46
46
|
explicitViewportHeightSet: !1,
|
|
47
47
|
isWheelPreventDefaultX: !0
|
|
48
48
|
});
|
|
49
|
-
i.attachControl(), i.onMouseWheel$.subscribeEvent((
|
|
50
|
-
const l =
|
|
49
|
+
i.attachControl(), i.onMouseWheel$.subscribeEvent((a, h) => {
|
|
50
|
+
const l = a;
|
|
51
51
|
if (l.ctrlKey) {
|
|
52
52
|
const d = Math.abs(l.deltaX);
|
|
53
53
|
let v = d < 40 ? 0.2 : d < 80 ? 0.4 : 0.2;
|
|
@@ -57,50 +57,50 @@ let fe = class extends pe {
|
|
|
57
57
|
}), i.onFileLoaded$.subscribeEvent(() => {
|
|
58
58
|
this._refreshThumb();
|
|
59
59
|
}), Pt.attachTo(o);
|
|
60
|
-
const
|
|
61
|
-
this._renderContext.mainComponent =
|
|
60
|
+
const c = this._createSlide(i);
|
|
61
|
+
this._renderContext.mainComponent = c, this._createSlidePages(r, c), this.createThumbs(), t.runRenderLoop(() => {
|
|
62
62
|
i.render();
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
_scrollToCenter() {
|
|
66
|
-
var
|
|
67
|
-
const e = (
|
|
66
|
+
var a;
|
|
67
|
+
const e = (a = this._currentRender()) == null ? void 0 : a.scene, t = e == null ? void 0 : e.getViewport(ne.VIEW), i = this._getCenterPositionViewPort(e);
|
|
68
68
|
if (!t || !i) return;
|
|
69
|
-
const { left: r, top: s } = i, { x: o, y:
|
|
69
|
+
const { left: r, top: s } = i, { x: o, y: c } = t.transViewportScroll2ScrollValue(r, s);
|
|
70
70
|
t.scrollToBarPos({
|
|
71
71
|
x: o,
|
|
72
|
-
y:
|
|
72
|
+
y: c
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
75
|
_currentRender() {
|
|
76
|
-
return
|
|
76
|
+
return Le(E.UNIVER_SLIDE, this._univerInstanceService, this._renderManagerService);
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
79
|
* @param mainScene
|
|
80
80
|
*/
|
|
81
81
|
_createSlide(e) {
|
|
82
|
-
const t = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE), { width: i, height: r } = e, s = t.getPageSize(), { width: o = 100, height:
|
|
82
|
+
const t = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE), { width: i, height: r } = e, s = t.getPageSize(), { width: o = 100, height: c = 100 } = s, a = new Si(ne.COMPONENT, {
|
|
83
83
|
left: (i - o) / 2,
|
|
84
|
-
top: (r -
|
|
84
|
+
top: (r - c) / 2,
|
|
85
85
|
width: o,
|
|
86
|
-
height:
|
|
86
|
+
height: c,
|
|
87
87
|
zIndex: 10
|
|
88
88
|
});
|
|
89
|
-
return
|
|
89
|
+
return a.enableSelectedClipElement(), e.addObject(a), a;
|
|
90
90
|
}
|
|
91
91
|
_addBackgroundRect(e, t) {
|
|
92
|
-
const r = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE).getPageSize(), { width: s = 0, height: o = 0 } = r,
|
|
92
|
+
const r = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE).getPageSize(), { width: s = 0, height: o = 0 } = r, c = new yt("canvas", {
|
|
93
93
|
left: 0,
|
|
94
94
|
top: 0,
|
|
95
95
|
width: s,
|
|
96
96
|
height: o,
|
|
97
97
|
strokeWidth: 1,
|
|
98
98
|
stroke: "rgba(198,198,198,1)",
|
|
99
|
-
fill:
|
|
99
|
+
fill: li(t) || "rgba(255,255,255,1)",
|
|
100
100
|
zIndex: 0,
|
|
101
101
|
evented: !1
|
|
102
102
|
});
|
|
103
|
-
e.addObject(
|
|
103
|
+
e.addObject(c, 0);
|
|
104
104
|
}
|
|
105
105
|
_getCenterPositionViewPort(e) {
|
|
106
106
|
if (!e) return { left: 0, top: 0 };
|
|
@@ -117,8 +117,8 @@ let fe = class extends pe {
|
|
|
117
117
|
const { engine: r } = i;
|
|
118
118
|
if (r == null)
|
|
119
119
|
return;
|
|
120
|
-
const { width: s, height: o } = t, { width:
|
|
121
|
-
t.renderToThumb(h, e,
|
|
120
|
+
const { width: s, height: o } = t, { width: c = s, height: a = o } = r, h = r.getCanvas().getContext();
|
|
121
|
+
t.renderToThumb(h, e, c / s, a / o);
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
124
|
* CreateScene by pages, and activate first one.
|
|
@@ -129,8 +129,8 @@ let fe = class extends pe {
|
|
|
129
129
|
const i = e.getPages(), r = e.getPageOrder();
|
|
130
130
|
if (!(!i || !r) && r.length !== 0) {
|
|
131
131
|
for (let s = 0, o = r.length; s < o; s++) {
|
|
132
|
-
const
|
|
133
|
-
this.createPageScene(
|
|
132
|
+
const c = r[s];
|
|
133
|
+
this.createPageScene(c, i[c]), this._createThumb(c);
|
|
134
134
|
}
|
|
135
135
|
t.activeFirstPage();
|
|
136
136
|
}
|
|
@@ -151,17 +151,17 @@ let fe = class extends pe {
|
|
|
151
151
|
if (t)
|
|
152
152
|
r = i.getPage(t);
|
|
153
153
|
else {
|
|
154
|
-
const
|
|
155
|
-
if (h == null ||
|
|
154
|
+
const a = i.getPages(), h = i.getPageOrder();
|
|
155
|
+
if (h == null || a == null)
|
|
156
156
|
return;
|
|
157
|
-
r =
|
|
157
|
+
r = a[h[0]], t = r.id;
|
|
158
158
|
}
|
|
159
159
|
const s = this._currentRender();
|
|
160
160
|
if (r == null || s == null || s.mainComponent == null)
|
|
161
161
|
return;
|
|
162
|
-
const { id: o } = r,
|
|
163
|
-
if (i.setActivePage(r),
|
|
164
|
-
|
|
162
|
+
const { id: o } = r, c = s.mainComponent;
|
|
163
|
+
if (i.setActivePage(r), c != null && c.hasPage(o)) {
|
|
164
|
+
c.changePage(o);
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
167
|
this.createPageScene(o, r);
|
|
@@ -183,11 +183,11 @@ let fe = class extends pe {
|
|
|
183
183
|
const i = this._renderContext;
|
|
184
184
|
if (!i || !this._objectProvider)
|
|
185
185
|
return;
|
|
186
|
-
const { scene: r, mainComponent: s } = i, o = s, { width:
|
|
187
|
-
width:
|
|
188
|
-
height:
|
|
186
|
+
const { scene: r, mainComponent: s } = i, o = s, { width: c, height: a } = o, h = new Ii(e, o, {
|
|
187
|
+
width: c,
|
|
188
|
+
height: a
|
|
189
189
|
});
|
|
190
|
-
new
|
|
190
|
+
new nt(`PageViewer_${e}`, h, {
|
|
191
191
|
left: 0,
|
|
192
192
|
top: 0,
|
|
193
193
|
bottom: 0,
|
|
@@ -249,22 +249,22 @@ let fe = class extends pe {
|
|
|
249
249
|
s && o && s.addPageScene(o), e.appendPage(t), e.setActivePage(t);
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
],
|
|
257
|
-
var
|
|
258
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
252
|
+
ve = Yi([
|
|
253
|
+
Ue(1, z(ke)),
|
|
254
|
+
Ue(2, w),
|
|
255
|
+
Ue(3, K)
|
|
256
|
+
], ve);
|
|
257
|
+
var qi = Object.getOwnPropertyDescriptor, Ji = (n, e, t, i) => {
|
|
258
|
+
for (var r = i > 1 ? void 0 : i ? qi(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
259
259
|
(o = n[s]) && (r = o(r) || r);
|
|
260
260
|
return r;
|
|
261
|
-
},
|
|
262
|
-
let
|
|
261
|
+
}, Qi = (n, e) => (t, i) => e(t, i, n);
|
|
262
|
+
let y = class extends fe {
|
|
263
263
|
constructor(n) {
|
|
264
264
|
super(), this._renderManagerService = n;
|
|
265
265
|
}
|
|
266
266
|
_getSlideRenderControllerFromRenderUnit(n) {
|
|
267
|
-
return this._renderManagerService.getRenderById(n).with(
|
|
267
|
+
return this._renderManagerService.getRenderById(n).with(ve);
|
|
268
268
|
}
|
|
269
269
|
createThumbs(n) {
|
|
270
270
|
this._getSlideRenderControllerFromRenderUnit(n).createThumbs();
|
|
@@ -291,29 +291,29 @@ let P = class extends pe {
|
|
|
291
291
|
this._getSlideRenderControllerFromRenderUnit(n).appendPage();
|
|
292
292
|
}
|
|
293
293
|
};
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
],
|
|
294
|
+
y = Ji([
|
|
295
|
+
Qi(0, K)
|
|
296
|
+
], y);
|
|
297
297
|
const Vt = {
|
|
298
298
|
id: "slide.operation.activate-slide",
|
|
299
299
|
type: N.OPERATION,
|
|
300
300
|
handler: (n, e) => {
|
|
301
301
|
var h, l;
|
|
302
|
-
const t = e.unitId, i = n.get(
|
|
302
|
+
const t = e.unitId, i = n.get(y), s = n.get(w).getUnit(t), o = (h = s == null ? void 0 : s.getActivePage()) == null ? void 0 : h.id;
|
|
303
303
|
if (!o) return !1;
|
|
304
|
-
const
|
|
305
|
-
if (!
|
|
306
|
-
const
|
|
307
|
-
return
|
|
304
|
+
const c = i.getRenderUnitByPageId(o, t);
|
|
305
|
+
if (!c) return !1;
|
|
306
|
+
const a = (l = c.scene) == null ? void 0 : l.getTransformer();
|
|
307
|
+
return a && a.clearControls(), i.activePage(e.id, t), !0;
|
|
308
308
|
}
|
|
309
|
-
},
|
|
309
|
+
}, jt = {
|
|
310
310
|
id: "slide.operation.append-slide",
|
|
311
311
|
type: N.OPERATION,
|
|
312
312
|
handler: (n, e) => {
|
|
313
313
|
const t = e.unitId;
|
|
314
|
-
return n.get(w).getUnit(t) ? (n.get(
|
|
314
|
+
return n.get(w).getUnit(t) ? (n.get(y).appendPage(t), !0) : !1;
|
|
315
315
|
}
|
|
316
|
-
},
|
|
316
|
+
}, At = {
|
|
317
317
|
id: "slide.operation.delete-element",
|
|
318
318
|
type: N.OPERATION,
|
|
319
319
|
handler: (n, e) => {
|
|
@@ -321,26 +321,26 @@ const Vt = {
|
|
|
321
321
|
const t = e.unitId, r = n.get(w).getUnit(t);
|
|
322
322
|
if (!r) return !1;
|
|
323
323
|
const s = r.getActivePage();
|
|
324
|
-
return delete s.pageElements[e.id], r.updatePage(s.id, s), n.get(
|
|
324
|
+
return delete s.pageElements[e.id], r.updatePage(s.id, s), n.get(y).removeObjectById(e.id, s.id, t), !0;
|
|
325
325
|
}
|
|
326
326
|
}, Ge = {
|
|
327
327
|
id: "slide.command.insert-float-image",
|
|
328
328
|
type: N.COMMAND,
|
|
329
329
|
handler: async (n, e) => {
|
|
330
|
-
var
|
|
331
|
-
const t = n.get(w), i = (
|
|
330
|
+
var U;
|
|
331
|
+
const t = n.get(w), i = (U = t.getCurrentUnitForType(E.UNIVER_SLIDE)) == null ? void 0 : U.getUnitId();
|
|
332
332
|
if (!i) return !1;
|
|
333
|
-
const s = await n.get(
|
|
333
|
+
const s = await n.get(wi).openFile({
|
|
334
334
|
multiple: !0,
|
|
335
|
-
accept:
|
|
335
|
+
accept: xi.map((R) => `.${R.replace("image/", "")}`).join(",")
|
|
336
336
|
});
|
|
337
337
|
if (s.length !== 1) return !1;
|
|
338
|
-
const
|
|
339
|
-
if (!
|
|
340
|
-
const { imageId:
|
|
338
|
+
const c = await n.get(Ri).saveImage(s[0]);
|
|
339
|
+
if (!c) return !1;
|
|
340
|
+
const { imageId: a, imageSourceType: h, source: l, base64Cache: d } = c, { width: v, height: m, image: p } = await Oi(d || ""), f = t.getUnit(i);
|
|
341
341
|
if (!f) return !1;
|
|
342
|
-
const g = f.getActivePage(), _ = Object.values(g.pageElements), I = _ != null && _.length ? Math.max(..._.map((
|
|
343
|
-
id:
|
|
342
|
+
const g = f.getActivePage(), _ = Object.values(g.pageElements), I = _ != null && _.length ? Math.max(..._.map((R) => R.zIndex)) : 20, b = {
|
|
343
|
+
id: a,
|
|
344
344
|
zIndex: I + 1,
|
|
345
345
|
left: 0,
|
|
346
346
|
top: 0,
|
|
@@ -348,7 +348,7 @@ const Vt = {
|
|
|
348
348
|
height: m,
|
|
349
349
|
title: "",
|
|
350
350
|
description: "",
|
|
351
|
-
type:
|
|
351
|
+
type: Ne.IMAGE,
|
|
352
352
|
image: {
|
|
353
353
|
imageProperties: {
|
|
354
354
|
contentUrl: d,
|
|
@@ -359,155 +359,456 @@ const Vt = {
|
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
};
|
|
362
|
-
g.pageElements[
|
|
363
|
-
const T = n.get(
|
|
362
|
+
g.pageElements[a] = b, f.updatePage(g.id, g);
|
|
363
|
+
const T = n.get(y), M = T.createObjectToPage(b, g.id, i);
|
|
364
364
|
return M && T.setObjectActiveByPage(M, g.id, i), !0;
|
|
365
365
|
}
|
|
366
366
|
};
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && e.indexOf(i) < 0 && (t[i] = n[i]);
|
|
378
|
-
if (n != null && typeof Object.getOwnPropertySymbols == "function")
|
|
379
|
-
for (var r = 0, i = Object.getOwnPropertySymbols(n); r < i.length; r++)
|
|
380
|
-
e.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(n, i[r]) && (t[i[r]] = n[i[r]]);
|
|
381
|
-
return t;
|
|
382
|
-
}, k = F(function(n, e) {
|
|
383
|
-
var t = n.icon, i = n.id, r = n.className, s = n.extend, o = tn(n, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(i, " ").concat(r || "").trim(), c = Ut("_".concat(sn()));
|
|
384
|
-
return Bt(t, "".concat(i), { defIds: t.defIds, idSuffix: c.current }, U({ ref: e, className: a }, o), s);
|
|
385
|
-
});
|
|
386
|
-
function Bt(n, e, t, i, r) {
|
|
387
|
-
return W(n.tag, U(U({ key: e }, nn(n, t, r)), i), (rn(n, t).children || []).map(function(s, o) {
|
|
388
|
-
return Bt(s, "".concat(e, "-").concat(n.tag, "-").concat(o), t, void 0, r);
|
|
389
|
-
}));
|
|
367
|
+
function F({ ref: n, ...e }) {
|
|
368
|
+
const { icon: t, id: i, className: r, extend: s, ...o } = e, c = `univerjs-icon univerjs-icon-${i} ${r || ""}`.trim(), a = Dt(`_${nn()}`);
|
|
369
|
+
return Lt(t, `${i}`, {
|
|
370
|
+
defIds: t.defIds,
|
|
371
|
+
idSuffix: a.current
|
|
372
|
+
}, {
|
|
373
|
+
ref: n,
|
|
374
|
+
className: c,
|
|
375
|
+
...o
|
|
376
|
+
}, s);
|
|
390
377
|
}
|
|
391
|
-
function
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
378
|
+
function Lt(n, e, t, i, r) {
|
|
379
|
+
return H(n.tag, {
|
|
380
|
+
key: e,
|
|
381
|
+
...en(n, t, r),
|
|
382
|
+
...i
|
|
383
|
+
}, (tn(n, t).children || []).map((s, o) => Lt(s, `${e}-${n.tag}-${o}`, t, void 0, r)));
|
|
384
|
+
}
|
|
385
|
+
function en(n, e, t) {
|
|
386
|
+
const i = { ...n.attrs };
|
|
387
|
+
t != null && t.colorChannel1 && i.fill === "colorChannel1" && (i.fill = t.colorChannel1), n.tag === "mask" && i.id && (i.id = i.id + e.idSuffix), Object.entries(i).forEach(([s, o]) => {
|
|
388
|
+
s === "mask" && typeof o == "string" && (i[s] = o.replace(/url\(#(.*)\)/, `url(#$1${e.idSuffix})`));
|
|
396
389
|
});
|
|
397
|
-
|
|
398
|
-
return !r || r.length === 0 || (n.tag === "use" && i["xlink:href"] && (i["xlink:href"] = i["xlink:href"] + e.idSuffix), Object.entries(i).forEach(
|
|
399
|
-
|
|
400
|
-
typeof a == "string" && (i[o] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
390
|
+
const { defIds: r } = e;
|
|
391
|
+
return !r || r.length === 0 || (n.tag === "use" && i["xlink:href"] && (i["xlink:href"] = i["xlink:href"] + e.idSuffix), Object.entries(i).forEach(([s, o]) => {
|
|
392
|
+
typeof o == "string" && (i[s] = o.replace(/url\(#(.*)\)/, `url(#$1${e.idSuffix})`));
|
|
401
393
|
})), i;
|
|
402
394
|
}
|
|
403
|
-
function
|
|
404
|
-
var
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
395
|
+
function tn(n, e) {
|
|
396
|
+
var i;
|
|
397
|
+
const { defIds: t } = e;
|
|
398
|
+
return !t || t.length === 0 ? n : n.tag === "defs" && ((i = n.children) != null && i.length) ? {
|
|
399
|
+
...n,
|
|
400
|
+
children: n.children.map((r) => typeof r.attrs.id == "string" && t && t.includes(r.attrs.id) ? {
|
|
401
|
+
...r,
|
|
402
|
+
attrs: {
|
|
403
|
+
...r.attrs,
|
|
404
|
+
id: r.attrs.id + e.idSuffix
|
|
405
|
+
}
|
|
406
|
+
} : r)
|
|
407
|
+
} : n;
|
|
408
408
|
}
|
|
409
|
-
function
|
|
409
|
+
function nn() {
|
|
410
410
|
return Math.random().toString(36).substring(2, 8);
|
|
411
411
|
}
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
412
|
+
F.displayName = "UniverIcon";
|
|
413
|
+
const rn = {
|
|
414
|
+
tag: "svg",
|
|
415
|
+
attrs: {
|
|
416
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
417
|
+
fill: "none",
|
|
418
|
+
viewBox: "0 0 17 16",
|
|
419
|
+
width: "1em",
|
|
420
|
+
height: "1em"
|
|
421
|
+
},
|
|
422
|
+
children: [
|
|
423
|
+
{
|
|
424
|
+
tag: "path",
|
|
425
|
+
attrs: {
|
|
426
|
+
fill: "currentColor",
|
|
427
|
+
d: "M14.0045 4.4334C14.8881 4.4334 15.6045 3.71705 15.6045 2.8334C15.6045 1.94974 14.8881 1.2334 14.0045 1.2334H3.70449C2.82084 1.2334 2.10449 1.94974 2.10449 2.8334C2.10449 3.71705 2.82084 4.4334 3.70449 4.4334H14.0045ZM14.4045 2.8334C14.4045 3.05431 14.2254 3.2334 14.0045 3.2334H3.70449C3.48358 3.2334 3.30449 3.05431 3.30449 2.8334C3.30449 2.61248 3.48358 2.4334 3.70449 2.4334H14.0045C14.2254 2.4334 14.4045 2.61249 14.4045 2.8334Z",
|
|
428
|
+
fillRule: "evenodd",
|
|
429
|
+
clipRule: "evenodd"
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
tag: "path",
|
|
434
|
+
attrs: {
|
|
435
|
+
fill: "currentColor",
|
|
436
|
+
d: "M14.1544 8.5999C15.038 8.5999 15.7544 7.88356 15.7544 6.9999C15.7544 6.11625 15.038 5.3999 14.1544 5.3999H3.85439C2.97074 5.3999 2.25439 6.11625 2.25439 6.9999C2.25439 7.88356 2.97074 8.5999 3.85439 8.5999H14.1544ZM14.5544 6.9999C14.5544 7.22082 14.3753 7.3999 14.1544 7.3999H3.85439C3.63348 7.3999 3.45439 7.22082 3.45439 6.9999C3.45439 6.77899 3.63348 6.5999 3.85439 6.5999H14.1544C14.3753 6.5999 14.5544 6.77899 14.5544 6.9999Z",
|
|
437
|
+
fillRule: "evenodd",
|
|
438
|
+
clipRule: "evenodd"
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
tag: "path",
|
|
443
|
+
attrs: {
|
|
444
|
+
fill: "currentColor",
|
|
445
|
+
d: "M8.57975 14.5902L6.58023 12.5907C6.34591 12.3564 6.34591 11.9765 6.58023 11.7421C6.81454 11.5078 7.19444 11.5078 7.42876 11.7421L8.40449 12.7179V10.1664C8.40449 9.83504 8.67312 9.56641 9.00449 9.56641C9.33586 9.56641 9.60449 9.83504 9.60449 10.1664V12.7179L10.5802 11.7421C10.8145 11.5078 11.1944 11.5078 11.4288 11.7421C11.6631 11.9765 11.6631 12.3564 11.4288 12.5907L9.42923 14.5902"
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
tag: "path",
|
|
450
|
+
attrs: {
|
|
451
|
+
fill: "currentColor",
|
|
452
|
+
d: "M8.57975 14.5902C8.58121 14.5917 8.58268 14.5931 8.58416 14.5946C8.64077 14.6502 8.70566 14.6923 8.77482 14.7209C8.84557 14.7502 8.92314 14.7664 9.00449 14.7664C9.08585 14.7664 9.16342 14.7502 9.23416 14.7209C9.30332 14.6923 9.36821 14.6502 9.42482 14.5946"
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
]
|
|
456
|
+
}, $t = Z(function(e, t) {
|
|
457
|
+
return H(F, Object.assign({}, e, {
|
|
423
458
|
id: "bottom-icon",
|
|
424
|
-
ref:
|
|
425
|
-
icon:
|
|
459
|
+
ref: t,
|
|
460
|
+
icon: rn
|
|
426
461
|
}));
|
|
427
462
|
});
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
463
|
+
$t.displayName = "BottomIcon";
|
|
464
|
+
const sn = {
|
|
465
|
+
tag: "svg",
|
|
466
|
+
attrs: {
|
|
467
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
468
|
+
fill: "none",
|
|
469
|
+
viewBox: "0 0 17 16",
|
|
470
|
+
width: "1em",
|
|
471
|
+
height: "1em"
|
|
472
|
+
},
|
|
473
|
+
children: [{
|
|
474
|
+
tag: "g",
|
|
475
|
+
attrs: { clipPath: "url(#graph-icon_clip0_1293_28)" },
|
|
476
|
+
children: [{
|
|
477
|
+
tag: "path",
|
|
478
|
+
attrs: {
|
|
479
|
+
fill: "currentColor",
|
|
480
|
+
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",
|
|
481
|
+
fillRule: "evenodd",
|
|
482
|
+
clipRule: "evenodd"
|
|
483
|
+
}
|
|
484
|
+
}]
|
|
485
|
+
}, {
|
|
486
|
+
tag: "defs",
|
|
487
|
+
attrs: {},
|
|
488
|
+
children: [{
|
|
489
|
+
tag: "clipPath",
|
|
490
|
+
attrs: { id: "graph-icon_clip0_1293_28" },
|
|
491
|
+
children: [{
|
|
492
|
+
tag: "path",
|
|
493
|
+
attrs: {
|
|
494
|
+
fill: "white",
|
|
495
|
+
d: "M0 0H16V16H0z",
|
|
496
|
+
transform: "translate(.9)"
|
|
497
|
+
}
|
|
498
|
+
}]
|
|
499
|
+
}]
|
|
500
|
+
}],
|
|
501
|
+
defIds: ["graph-icon_clip0_1293_28"]
|
|
502
|
+
}, Bt = Z(function(e, t) {
|
|
503
|
+
return H(F, Object.assign({}, e, {
|
|
431
504
|
id: "graph-icon",
|
|
432
|
-
ref:
|
|
433
|
-
icon:
|
|
505
|
+
ref: t,
|
|
506
|
+
icon: sn
|
|
434
507
|
}));
|
|
435
508
|
});
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
509
|
+
Bt.displayName = "GraphIcon";
|
|
510
|
+
const on = {
|
|
511
|
+
tag: "svg",
|
|
512
|
+
attrs: {
|
|
513
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
514
|
+
fill: "none",
|
|
515
|
+
viewBox: "0 0 16 16",
|
|
516
|
+
width: "1em",
|
|
517
|
+
height: "1em"
|
|
518
|
+
},
|
|
519
|
+
children: [{
|
|
520
|
+
tag: "path",
|
|
521
|
+
attrs: {
|
|
522
|
+
fill: "currentColor",
|
|
523
|
+
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",
|
|
524
|
+
fillRule: "evenodd",
|
|
525
|
+
clipRule: "evenodd"
|
|
526
|
+
}
|
|
527
|
+
}]
|
|
528
|
+
}, Xe = Z(function(e, t) {
|
|
529
|
+
return H(F, Object.assign({}, e, {
|
|
439
530
|
id: "more-down-icon",
|
|
440
|
-
ref:
|
|
441
|
-
icon:
|
|
531
|
+
ref: t,
|
|
532
|
+
icon: on
|
|
442
533
|
}));
|
|
443
534
|
});
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
535
|
+
Xe.displayName = "MoreDownIcon";
|
|
536
|
+
const cn = {
|
|
537
|
+
tag: "svg",
|
|
538
|
+
attrs: {
|
|
539
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
540
|
+
fill: "none",
|
|
541
|
+
viewBox: "0 0 16 16",
|
|
542
|
+
width: "1em",
|
|
543
|
+
height: "1em"
|
|
544
|
+
},
|
|
545
|
+
children: [{
|
|
546
|
+
tag: "path",
|
|
547
|
+
attrs: {
|
|
548
|
+
fill: "currentColor",
|
|
549
|
+
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",
|
|
550
|
+
fillRule: "evenodd",
|
|
551
|
+
clipRule: "evenodd"
|
|
552
|
+
}
|
|
553
|
+
}, {
|
|
554
|
+
tag: "path",
|
|
555
|
+
attrs: {
|
|
556
|
+
fill: "currentColor",
|
|
557
|
+
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"
|
|
558
|
+
}
|
|
559
|
+
}]
|
|
560
|
+
}, Ht = Z(function(e, t) {
|
|
561
|
+
return H(F, Object.assign({}, e, {
|
|
447
562
|
id: "move-down-icon",
|
|
448
|
-
ref:
|
|
449
|
-
icon:
|
|
563
|
+
ref: t,
|
|
564
|
+
icon: cn
|
|
450
565
|
}));
|
|
451
566
|
});
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
567
|
+
Ht.displayName = "MoveDownIcon";
|
|
568
|
+
const an = {
|
|
569
|
+
tag: "svg",
|
|
570
|
+
attrs: {
|
|
571
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
572
|
+
fill: "none",
|
|
573
|
+
viewBox: "0 0 16 16",
|
|
574
|
+
width: "1em",
|
|
575
|
+
height: "1em"
|
|
576
|
+
},
|
|
577
|
+
children: [{
|
|
578
|
+
tag: "path",
|
|
579
|
+
attrs: {
|
|
580
|
+
fill: "currentColor",
|
|
581
|
+
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",
|
|
582
|
+
fillRule: "evenodd",
|
|
583
|
+
clipRule: "evenodd"
|
|
584
|
+
}
|
|
585
|
+
}, {
|
|
586
|
+
tag: "path",
|
|
587
|
+
attrs: {
|
|
588
|
+
fill: "currentColor",
|
|
589
|
+
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"
|
|
590
|
+
}
|
|
591
|
+
}]
|
|
592
|
+
}, Ft = Z(function(e, t) {
|
|
593
|
+
return H(F, Object.assign({}, e, {
|
|
455
594
|
id: "move-up-icon",
|
|
456
|
-
ref:
|
|
457
|
-
icon:
|
|
458
|
-
}));
|
|
459
|
-
});
|
|
460
|
-
kt.displayName = "MoveUpIcon";
|
|
461
|
-
var hn = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.01281 1.36643C8.79386 0.585377 10.0602 0.585378 10.8412 1.36643L12.9223 3.44752C13.7034 4.22857 13.7034 5.4949 12.9223 6.27595L9.36445 9.83383C8.5834 10.6149 7.31707 10.6149 6.53602 9.83383L4.45493 7.75273C3.67388 6.97168 3.67388 5.70535 4.45493 4.9243L8.01281 1.36643ZM9.9927 2.21495C9.68028 1.90253 9.17375 1.90253 8.86133 2.21495L5.30346 5.77283L5.29671 5.77966L10.839 6.66224L12.0738 5.42742C12.3862 5.115 12.3862 4.60847 12.0738 4.29605L9.9927 2.21495Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.5179 9.48875C14.5179 9.99175 14.1101 10.3995 13.607 10.3995C13.1041 10.3995 12.6963 9.99175 12.6963 9.48875C12.6963 9.1773 13.0455 8.59966 13.3114 8.20487C13.4549 7.99177 13.7591 7.99177 13.9027 8.20486C14.1687 8.59965 14.5179 9.1773 14.5179 9.48875Z" } }, { tag: "path", attrs: { fill: "colorChannel1", d: "M1.98682 13.4992C1.98682 12.5603 2.74793 11.7992 3.68682 11.7992H14.2868C15.2257 11.7992 15.9868 12.5603 15.9868 13.4992V13.4992C15.9868 14.4381 15.2257 15.1992 14.2868 15.1992H3.68682C2.74793 15.1992 1.98682 14.4381 1.98682 13.4992V13.4992Z" } }] }, zt = F(function(n, e) {
|
|
462
|
-
return W(k, Object.assign({}, n, {
|
|
463
|
-
id: "paint-bucket-double-icon",
|
|
464
|
-
ref: e,
|
|
465
|
-
icon: hn
|
|
595
|
+
ref: t,
|
|
596
|
+
icon: an
|
|
466
597
|
}));
|
|
467
598
|
});
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
599
|
+
Ft.displayName = "MoveUpIcon";
|
|
600
|
+
const ln = {
|
|
601
|
+
tag: "svg",
|
|
602
|
+
attrs: {
|
|
603
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
604
|
+
fill: "none",
|
|
605
|
+
viewBox: "0 0 17 16",
|
|
606
|
+
width: "1em",
|
|
607
|
+
height: "1em"
|
|
608
|
+
},
|
|
609
|
+
children: [{
|
|
610
|
+
tag: "g",
|
|
611
|
+
attrs: {
|
|
612
|
+
fill: "currentColor",
|
|
613
|
+
clipPath: "url(#text-icon_clip0_1293_26)"
|
|
614
|
+
},
|
|
615
|
+
children: [{
|
|
616
|
+
tag: "path",
|
|
617
|
+
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" }
|
|
618
|
+
}, {
|
|
619
|
+
tag: "path",
|
|
620
|
+
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" }
|
|
621
|
+
}]
|
|
622
|
+
}, {
|
|
623
|
+
tag: "defs",
|
|
624
|
+
attrs: {},
|
|
625
|
+
children: [{
|
|
626
|
+
tag: "clipPath",
|
|
627
|
+
attrs: { id: "text-icon_clip0_1293_26" },
|
|
628
|
+
children: [{
|
|
629
|
+
tag: "path",
|
|
630
|
+
attrs: {
|
|
631
|
+
fill: "white",
|
|
632
|
+
d: "M0 0H16V16H0z",
|
|
633
|
+
transform: "translate(.9)"
|
|
634
|
+
}
|
|
635
|
+
}]
|
|
636
|
+
}]
|
|
637
|
+
}],
|
|
638
|
+
defIds: ["text-icon_clip0_1293_26"]
|
|
639
|
+
}, Wt = Z(function(e, t) {
|
|
640
|
+
return H(F, Object.assign({}, e, {
|
|
471
641
|
id: "text-icon",
|
|
472
|
-
ref:
|
|
473
|
-
icon:
|
|
642
|
+
ref: t,
|
|
643
|
+
icon: ln
|
|
474
644
|
}));
|
|
475
645
|
});
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
646
|
+
Wt.displayName = "TextIcon";
|
|
647
|
+
const dn = {
|
|
648
|
+
tag: "svg",
|
|
649
|
+
attrs: {
|
|
650
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
651
|
+
fill: "none",
|
|
652
|
+
viewBox: "0 0 17 16",
|
|
653
|
+
width: "1em",
|
|
654
|
+
height: "1em"
|
|
655
|
+
},
|
|
656
|
+
children: [
|
|
657
|
+
{
|
|
658
|
+
tag: "path",
|
|
659
|
+
attrs: {
|
|
660
|
+
fill: "currentColor",
|
|
661
|
+
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"
|
|
662
|
+
}
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
tag: "path",
|
|
666
|
+
attrs: {
|
|
667
|
+
fill: "currentColor",
|
|
668
|
+
d: "M1.50439 9C1.50439 8.11634 2.22074 7.4 3.10439 7.4H13.4044C14.288 7.4 15.0044 8.11634 15.0044 9C15.0044 9.88366 14.2881 10.6 13.4044 10.6H3.1044C2.22074 10.6 1.50439 9.88366 1.50439 9ZM3.10439 8.6C2.88348 8.6 2.70439 8.77909 2.70439 9C2.70439 9.22091 2.88348 9.4 3.1044 9.4H13.4044C13.6253 9.4 13.8044 9.22091 13.8044 9C13.8044 8.77909 13.6253 8.6 13.4044 8.6H3.10439Z",
|
|
669
|
+
fillRule: "evenodd",
|
|
670
|
+
clipRule: "evenodd"
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
tag: "path",
|
|
675
|
+
attrs: {
|
|
676
|
+
fill: "currentColor",
|
|
677
|
+
d: "M1.6543 13.1665C1.6543 12.2828 2.37064 11.5665 3.2543 11.5665H13.5543C14.438 11.5665 15.1543 12.2828 15.1543 13.1665C15.1543 14.0502 14.438 14.7665 13.5543 14.7665H3.2543C2.37064 14.7665 1.6543 14.0502 1.6543 13.1665ZM3.2543 12.7665C3.03338 12.7665 2.8543 12.9456 2.8543 13.1665C2.8543 13.3874 3.03338 13.5665 3.2543 13.5665H13.5543C13.7752 13.5665 13.9543 13.3874 13.9543 13.1665C13.9543 12.9456 13.7752 12.7665 13.5543 12.7665H3.2543Z",
|
|
678
|
+
fillRule: "evenodd",
|
|
679
|
+
clipRule: "evenodd"
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
]
|
|
683
|
+
}, kt = Z(function(e, t) {
|
|
684
|
+
return H(F, Object.assign({}, e, {
|
|
479
685
|
id: "topmost-icon",
|
|
480
|
-
ref:
|
|
481
|
-
icon:
|
|
686
|
+
ref: t,
|
|
687
|
+
icon: dn
|
|
482
688
|
}));
|
|
483
689
|
});
|
|
484
|
-
|
|
485
|
-
const
|
|
690
|
+
kt.displayName = "TopmostIcon";
|
|
691
|
+
const un = {
|
|
692
|
+
tag: "svg",
|
|
693
|
+
attrs: {
|
|
694
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
695
|
+
fill: "none",
|
|
696
|
+
viewBox: "0 0 16 16",
|
|
697
|
+
width: "1em",
|
|
698
|
+
height: "1em"
|
|
699
|
+
},
|
|
700
|
+
children: [
|
|
701
|
+
{
|
|
702
|
+
tag: "path",
|
|
703
|
+
attrs: {
|
|
704
|
+
fill: "colorChannel1",
|
|
705
|
+
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"
|
|
706
|
+
}
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
tag: "path",
|
|
710
|
+
attrs: {
|
|
711
|
+
fill: "currentColor",
|
|
712
|
+
d: "M2.56365 1.36377C1.90091 1.36377 1.36365 1.90103 1.36365 2.56377V6.16377C1.36365 6.82651 1.90091 7.36377 2.56365 7.36377H6.16365C6.82639 7.36377 7.36365 6.82651 7.36365 6.16377V2.56377C7.36365 1.90103 6.82639 1.36377 6.16365 1.36377H2.56365ZM6.16365 2.56377H2.56365L2.56365 6.16377H6.16365V2.56377Z",
|
|
713
|
+
fillRule: "evenodd",
|
|
714
|
+
clipRule: "evenodd"
|
|
715
|
+
}
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
tag: "path",
|
|
719
|
+
attrs: {
|
|
720
|
+
fill: "currentColor",
|
|
721
|
+
d: "M2.56365 8.63647C1.90091 8.63647 1.36365 9.17373 1.36365 9.83647V13.4365C1.36365 14.0992 1.90091 14.6365 2.56365 14.6365H6.16365C6.82639 14.6365 7.36365 14.0992 7.36365 13.4365V9.83647C7.36365 9.17373 6.82639 8.63647 6.16365 8.63647H2.56365ZM6.16365 9.83647H2.56365L2.56365 13.4365H6.16365V9.83647Z",
|
|
722
|
+
fillRule: "evenodd",
|
|
723
|
+
clipRule: "evenodd"
|
|
724
|
+
}
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
tag: "path",
|
|
728
|
+
attrs: {
|
|
729
|
+
fill: "currentColor",
|
|
730
|
+
d: "M9.83635 7.36377C9.17361 7.36377 8.63635 6.82651 8.63635 6.16377V2.56377C8.63635 1.90103 9.17361 1.36377 9.83635 1.36377H13.4364C14.0991 1.36377 14.6364 1.90103 14.6364 2.56377V6.16377C14.6364 6.82651 14.0991 7.36377 13.4364 7.36377H9.83635ZM9.83635 6.16377V2.56377L13.4364 2.56377V6.16377H9.83635Z",
|
|
731
|
+
fillRule: "evenodd",
|
|
732
|
+
clipRule: "evenodd"
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
]
|
|
736
|
+
}, zt = Z(function(e, t) {
|
|
737
|
+
return H(F, Object.assign({}, e, {
|
|
738
|
+
id: "autofill-double-icon",
|
|
739
|
+
ref: t,
|
|
740
|
+
icon: un
|
|
741
|
+
}));
|
|
742
|
+
});
|
|
743
|
+
zt.displayName = "AutofillDoubleIcon";
|
|
744
|
+
const hn = {
|
|
745
|
+
tag: "svg",
|
|
746
|
+
attrs: {
|
|
747
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
748
|
+
fill: "none",
|
|
749
|
+
viewBox: "0 0 17 16",
|
|
750
|
+
width: "1em",
|
|
751
|
+
height: "1em"
|
|
752
|
+
},
|
|
753
|
+
children: [
|
|
754
|
+
{
|
|
755
|
+
tag: "path",
|
|
756
|
+
attrs: {
|
|
757
|
+
fill: "currentColor",
|
|
758
|
+
d: "M8.01281 1.36643C8.79386 0.585377 10.0602 0.585378 10.8412 1.36643L12.9223 3.44752C13.7034 4.22857 13.7034 5.4949 12.9223 6.27595L9.36445 9.83383C8.5834 10.6149 7.31707 10.6149 6.53602 9.83383L4.45493 7.75273C3.67388 6.97168 3.67388 5.70535 4.45493 4.9243L8.01281 1.36643ZM9.9927 2.21495C9.68028 1.90253 9.17375 1.90253 8.86133 2.21495L5.30346 5.77283L5.29671 5.77966L10.839 6.66224L12.0738 5.42742C12.3862 5.115 12.3862 4.60847 12.0738 4.29605L9.9927 2.21495Z",
|
|
759
|
+
fillRule: "evenodd",
|
|
760
|
+
clipRule: "evenodd"
|
|
761
|
+
}
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
tag: "path",
|
|
765
|
+
attrs: {
|
|
766
|
+
fill: "currentColor",
|
|
767
|
+
d: "M14.5179 9.48875C14.5179 9.99175 14.1101 10.3995 13.607 10.3995C13.1041 10.3995 12.6963 9.99175 12.6963 9.48875C12.6963 9.1773 13.0455 8.59966 13.3114 8.20487C13.4549 7.99177 13.7591 7.99177 13.9027 8.20486C14.1687 8.59965 14.5179 9.1773 14.5179 9.48875Z"
|
|
768
|
+
}
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
tag: "path",
|
|
772
|
+
attrs: {
|
|
773
|
+
fill: "colorChannel1",
|
|
774
|
+
d: "M1.98682 13.4992C1.98682 12.5603 2.74793 11.7992 3.68682 11.7992H14.2868C15.2257 11.7992 15.9868 12.5603 15.9868 13.4992V13.4992C15.9868 14.4381 15.2257 15.1992 14.2868 15.1992H3.68682C2.74793 15.1992 1.98682 14.4381 1.98682 13.4992V13.4992Z"
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
]
|
|
778
|
+
}, Kt = Z(function(e, t) {
|
|
779
|
+
return H(F, Object.assign({}, e, {
|
|
780
|
+
id: "paint-bucket-double-icon",
|
|
781
|
+
ref: t,
|
|
782
|
+
icon: hn
|
|
783
|
+
}));
|
|
784
|
+
});
|
|
785
|
+
Kt.displayName = "PaintBucketDoubleIcon";
|
|
786
|
+
const B = {
|
|
486
787
|
id: "slide.operation.update-element",
|
|
487
788
|
type: N.OPERATION,
|
|
488
789
|
handler: (n, e) => {
|
|
489
790
|
const { oKey: t, props: i } = e, r = n.get(w), s = e == null ? void 0 : e.unitId, o = r.getUnit(s);
|
|
490
791
|
if (!o) return !1;
|
|
491
|
-
const
|
|
492
|
-
return
|
|
792
|
+
const c = o.getActivePage();
|
|
793
|
+
return c.pageElements[t] = St(c.pageElements[t], i), o.updatePage(c.id, c), !0;
|
|
493
794
|
}
|
|
494
795
|
};
|
|
495
|
-
function
|
|
496
|
-
const { pageId: e, unitId: t } = n, i =
|
|
497
|
-
if (!a) return null;
|
|
498
|
-
const c = a.getTransformer();
|
|
796
|
+
function gn(n) {
|
|
797
|
+
const { pageId: e, unitId: t } = n, i = O(J), r = O(y), s = O(D), o = r.getRenderUnitByPageId(e, t), c = o == null ? void 0 : o.scene;
|
|
499
798
|
if (!c) return null;
|
|
500
|
-
const
|
|
799
|
+
const a = c.getTransformer();
|
|
800
|
+
if (!a) return null;
|
|
801
|
+
const l = a.getSelectedObjectMap().values().next().value;
|
|
501
802
|
if (!l) return null;
|
|
502
803
|
const d = (v) => {
|
|
503
|
-
const m =
|
|
504
|
-
const T = b.zIndex, M = T < _ ? T : _,
|
|
505
|
-
return [M,
|
|
804
|
+
const m = c.getAllObjects(), [p, f] = m.reduce(([_, I], b) => {
|
|
805
|
+
const T = b.zIndex, M = T < _ ? T : _, U = T > I ? T : I;
|
|
806
|
+
return [M, U];
|
|
506
807
|
}, [0, 0]);
|
|
507
808
|
let g = l.zIndex;
|
|
508
809
|
v === 3 ? g = p - 1 : v === 2 ? g = f + 1 : v === 0 ? g = l.zIndex + 1 : v === 1 && (g = l.zIndex - 1), l.setProps({
|
|
509
810
|
zIndex: g
|
|
510
|
-
}), s.executeCommand(
|
|
811
|
+
}), s.executeCommand(B.id, {
|
|
511
812
|
unitId: t,
|
|
512
813
|
oKey: l == null ? void 0 : l.oKey,
|
|
513
814
|
props: {
|
|
@@ -524,60 +825,60 @@ function fn(n) {
|
|
|
524
825
|
}
|
|
525
826
|
) }),
|
|
526
827
|
/* @__PURE__ */ x("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: [
|
|
527
|
-
/* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(
|
|
828
|
+
/* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(Ce, { onClick: () => {
|
|
528
829
|
d(
|
|
529
830
|
0
|
|
530
831
|
/* forward */
|
|
531
832
|
);
|
|
532
833
|
}, children: /* @__PURE__ */ x("span", { className: "univer-flex univer-items-center univer-gap-1", children: [
|
|
533
|
-
/* @__PURE__ */ u(
|
|
834
|
+
/* @__PURE__ */ u(Ft, {}),
|
|
534
835
|
i.t("image-panel.arrange.forward")
|
|
535
836
|
] }) }) }),
|
|
536
|
-
/* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(
|
|
837
|
+
/* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(Ce, { onClick: () => {
|
|
537
838
|
d(
|
|
538
839
|
1
|
|
539
840
|
/* backward */
|
|
540
841
|
);
|
|
541
842
|
}, children: /* @__PURE__ */ x("span", { className: "univer-flex univer-items-center univer-gap-1", children: [
|
|
542
|
-
/* @__PURE__ */ u(
|
|
843
|
+
/* @__PURE__ */ u(Ht, {}),
|
|
543
844
|
i.t("image-panel.arrange.backward")
|
|
544
845
|
] }) }) })
|
|
545
846
|
] }),
|
|
546
847
|
/* @__PURE__ */ x("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: [
|
|
547
|
-
/* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(
|
|
848
|
+
/* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(Ce, { onClick: () => {
|
|
548
849
|
d(
|
|
549
850
|
2
|
|
550
851
|
/* front */
|
|
551
852
|
);
|
|
552
853
|
}, children: /* @__PURE__ */ x("span", { className: "univer-flex univer-items-center univer-gap-1", children: [
|
|
553
|
-
/* @__PURE__ */ u(
|
|
854
|
+
/* @__PURE__ */ u(kt, {}),
|
|
554
855
|
i.t("image-panel.arrange.front")
|
|
555
856
|
] }) }) }),
|
|
556
|
-
/* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(
|
|
857
|
+
/* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(Ce, { onClick: () => {
|
|
557
858
|
d(
|
|
558
859
|
3
|
|
559
860
|
/* back */
|
|
560
861
|
);
|
|
561
862
|
}, children: /* @__PURE__ */ x("span", { className: "univer-flex univer-items-center univer-gap-1", children: [
|
|
562
|
-
/* @__PURE__ */ u(
|
|
863
|
+
/* @__PURE__ */ u($t, {}),
|
|
563
864
|
i.t("image-panel.arrange.back")
|
|
564
865
|
] }) }) })
|
|
565
866
|
] })
|
|
566
867
|
] });
|
|
567
868
|
}
|
|
568
|
-
function
|
|
869
|
+
function vn(n) {
|
|
569
870
|
var p, f;
|
|
570
|
-
const { pageId: e, unitId: t } = n, i =
|
|
571
|
-
if (!a) return null;
|
|
572
|
-
const c = a.getTransformer();
|
|
871
|
+
const { pageId: e, unitId: t } = n, i = O(J), r = O(y), s = O(D), o = r.getRenderUnitByPageId(e, t), c = o == null ? void 0 : o.scene;
|
|
573
872
|
if (!c) return null;
|
|
574
|
-
const
|
|
873
|
+
const a = c.getTransformer();
|
|
874
|
+
if (!a) return null;
|
|
875
|
+
const l = a.getSelectedObjectMap().values().next().value;
|
|
575
876
|
if (!l) return null;
|
|
576
877
|
const [d, v] = $((f = (p = l.fill) == null ? void 0 : p.toString()) != null ? f : "");
|
|
577
878
|
function m(g) {
|
|
578
879
|
l == null || l.setProps({
|
|
579
880
|
fill: g
|
|
580
|
-
}), s.executeCommand(
|
|
881
|
+
}), s.executeCommand(B.id, {
|
|
581
882
|
unitId: t,
|
|
582
883
|
oKey: l == null ? void 0 : l.oKey,
|
|
583
884
|
props: {
|
|
@@ -594,7 +895,7 @@ function pn(n) {
|
|
|
594
895
|
return /* @__PURE__ */ u(
|
|
595
896
|
"div",
|
|
596
897
|
{
|
|
597
|
-
className:
|
|
898
|
+
className: k("univer-relative univer-bottom-0 univer-mt-5 univer-w-full", Nt),
|
|
598
899
|
children: /* @__PURE__ */ x("div", { className: "univer-relative univer-w-full", children: [
|
|
599
900
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u(
|
|
600
901
|
"div",
|
|
@@ -604,18 +905,18 @@ function pn(n) {
|
|
|
604
905
|
}
|
|
605
906
|
) }),
|
|
606
907
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(
|
|
607
|
-
|
|
908
|
+
Mt,
|
|
608
909
|
{
|
|
609
910
|
overlay: /* @__PURE__ */ u("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ u(
|
|
610
|
-
|
|
911
|
+
Ai,
|
|
611
912
|
{
|
|
612
913
|
value: "#fff",
|
|
613
914
|
onChange: m
|
|
614
915
|
}
|
|
615
916
|
) }),
|
|
616
917
|
children: /* @__PURE__ */ x("a", { className: "univer-flex univer-cursor-pointer univer-items-center univer-gap-1", children: [
|
|
617
|
-
/* @__PURE__ */ u(
|
|
618
|
-
/* @__PURE__ */ u(
|
|
918
|
+
/* @__PURE__ */ u(Kt, { className: "univer-fill-primary-600" }),
|
|
919
|
+
/* @__PURE__ */ u(Xe, {})
|
|
619
920
|
] })
|
|
620
921
|
}
|
|
621
922
|
) }) })
|
|
@@ -623,12 +924,12 @@ function pn(n) {
|
|
|
623
924
|
}
|
|
624
925
|
);
|
|
625
926
|
}
|
|
626
|
-
function
|
|
627
|
-
const { pageId: e, unitId: t } = n, i =
|
|
628
|
-
if (!a) return null;
|
|
629
|
-
const c = a.getTransformer();
|
|
927
|
+
function fn(n) {
|
|
928
|
+
const { pageId: e, unitId: t } = n, i = O(J), r = O(y), s = O(D), o = r.getRenderUnitByPageId(e, t), c = o == null ? void 0 : o.scene;
|
|
630
929
|
if (!c) return null;
|
|
631
|
-
const
|
|
930
|
+
const a = c.getTransformer();
|
|
931
|
+
if (!a) return null;
|
|
932
|
+
const l = a.getSelectedObjectMap().values().next().value;
|
|
632
933
|
if (!l) return null;
|
|
633
934
|
const {
|
|
634
935
|
width: d = 0,
|
|
@@ -636,64 +937,64 @@ function mn(n) {
|
|
|
636
937
|
left: m = 0,
|
|
637
938
|
top: p = 0,
|
|
638
939
|
angle: f = 0
|
|
639
|
-
} = l, [g, _] = $(d), [I, b] = $(v), [T, M] = $(m), [
|
|
640
|
-
const { objects: ce } = C,
|
|
641
|
-
width:
|
|
642
|
-
height:
|
|
643
|
-
left:
|
|
644
|
-
top:
|
|
645
|
-
angle:
|
|
646
|
-
} =
|
|
647
|
-
_(
|
|
940
|
+
} = l, [g, _] = $(d), [I, b] = $(v), [T, M] = $(m), [U, R] = $(p), [W, oe] = $(f), A = (C) => {
|
|
941
|
+
const { objects: ce } = C, ae = ce.values().next().value, {
|
|
942
|
+
width: ti = 0,
|
|
943
|
+
height: ii = 0,
|
|
944
|
+
left: ni = 0,
|
|
945
|
+
top: ri = 0,
|
|
946
|
+
angle: si = 0
|
|
947
|
+
} = ae;
|
|
948
|
+
_(ti), b(ii), M(ni), R(ri), oe(si);
|
|
648
949
|
};
|
|
649
|
-
|
|
650
|
-
const C =
|
|
651
|
-
|
|
652
|
-
}), ce =
|
|
653
|
-
|
|
950
|
+
ge(() => {
|
|
951
|
+
const C = a.changeStart$.subscribe((ae) => {
|
|
952
|
+
A(ae);
|
|
953
|
+
}), ce = a.changing$.subscribe((ae) => {
|
|
954
|
+
A(ae);
|
|
654
955
|
});
|
|
655
956
|
return () => {
|
|
656
957
|
ce.unsubscribe(), C.unsubscribe();
|
|
657
958
|
};
|
|
658
959
|
}, []);
|
|
659
|
-
function
|
|
660
|
-
!C || !l || (s.executeCommand(
|
|
960
|
+
function L(C) {
|
|
961
|
+
!C || !l || (s.executeCommand(B.id, {
|
|
661
962
|
pageId: e,
|
|
662
963
|
oKey: l.oKey,
|
|
663
964
|
props: {
|
|
664
965
|
width: C
|
|
665
966
|
}
|
|
666
|
-
}), l == null || l.resize(C, l.height), _(C),
|
|
967
|
+
}), l == null || l.resize(C, l.height), _(C), a == null || a.refreshControls());
|
|
667
968
|
}
|
|
668
|
-
function
|
|
669
|
-
!C || !l || (s.executeCommand(
|
|
969
|
+
function Q(C) {
|
|
970
|
+
!C || !l || (s.executeCommand(B.id, {
|
|
670
971
|
pageId: e,
|
|
671
972
|
oKey: l.oKey,
|
|
672
973
|
props: {
|
|
673
974
|
height: C
|
|
674
975
|
}
|
|
675
|
-
}), l == null || l.resize(l.width, C), b(C),
|
|
976
|
+
}), l == null || l.resize(l.width, C), b(C), a == null || a.refreshControls());
|
|
676
977
|
}
|
|
677
|
-
function
|
|
678
|
-
!C || !l || (s.executeCommand(
|
|
978
|
+
function ee(C) {
|
|
979
|
+
!C || !l || (s.executeCommand(B.id, {
|
|
679
980
|
pageId: e,
|
|
680
981
|
oKey: l.oKey,
|
|
681
982
|
props: {
|
|
682
983
|
left: C
|
|
683
984
|
}
|
|
684
|
-
}), l == null || l.translate(C, l.top), M(C),
|
|
985
|
+
}), l == null || l.translate(C, l.top), M(C), a == null || a.refreshControls());
|
|
685
986
|
}
|
|
686
|
-
function
|
|
687
|
-
!C || !l || (s.executeCommand(
|
|
987
|
+
function me(C) {
|
|
988
|
+
!C || !l || (s.executeCommand(B.id, {
|
|
688
989
|
pageId: e,
|
|
689
990
|
oKey: l.oKey,
|
|
690
991
|
props: {
|
|
691
992
|
right: C
|
|
692
993
|
}
|
|
693
|
-
}), l == null || l.translate(l.left, C),
|
|
994
|
+
}), l == null || l.translate(l.left, C), R(C), a == null || a.refreshControls());
|
|
694
995
|
}
|
|
695
|
-
function
|
|
696
|
-
!C || !l || (s.executeCommand(
|
|
996
|
+
function _e(C) {
|
|
997
|
+
!C || !l || (s.executeCommand(B.id, {
|
|
697
998
|
pageId: e,
|
|
698
999
|
oKey: l.oKey,
|
|
699
1000
|
props: {
|
|
@@ -701,12 +1002,12 @@ function mn(n) {
|
|
|
701
1002
|
}
|
|
702
1003
|
}), l == null || l.transformByState({
|
|
703
1004
|
angle: C
|
|
704
|
-
}),
|
|
1005
|
+
}), oe(C), a == null || a.refreshControls());
|
|
705
1006
|
}
|
|
706
1007
|
return /* @__PURE__ */ x(
|
|
707
1008
|
"div",
|
|
708
1009
|
{
|
|
709
|
-
className:
|
|
1010
|
+
className: k("univer-relative univer-bottom-0 univer-mt-5 univer-w-full", Nt),
|
|
710
1011
|
children: [
|
|
711
1012
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u(
|
|
712
1013
|
"div",
|
|
@@ -719,13 +1020,13 @@ function mn(n) {
|
|
|
719
1020
|
/* @__PURE__ */ u("div", { className: "univer-w-1/3", children: /* @__PURE__ */ x("label", { children: [
|
|
720
1021
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: i.t("image-panel.transform.width") }) }),
|
|
721
1022
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: /* @__PURE__ */ u(
|
|
722
|
-
|
|
1023
|
+
le,
|
|
723
1024
|
{
|
|
724
1025
|
className: "univer-w-11/12",
|
|
725
1026
|
min: 1,
|
|
726
1027
|
value: g,
|
|
727
1028
|
onChange: (C) => {
|
|
728
|
-
|
|
1029
|
+
L(C);
|
|
729
1030
|
}
|
|
730
1031
|
}
|
|
731
1032
|
) }) })
|
|
@@ -733,13 +1034,13 @@ function mn(n) {
|
|
|
733
1034
|
/* @__PURE__ */ u("div", { className: "univer-w-1/3", children: /* @__PURE__ */ x("label", { children: [
|
|
734
1035
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: i.t("image-panel.transform.height") }) }),
|
|
735
1036
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: /* @__PURE__ */ u(
|
|
736
|
-
|
|
1037
|
+
le,
|
|
737
1038
|
{
|
|
738
1039
|
className: "univer-w-11/12",
|
|
739
1040
|
min: 1,
|
|
740
1041
|
value: I,
|
|
741
1042
|
onChange: (C) => {
|
|
742
|
-
|
|
1043
|
+
Q(C);
|
|
743
1044
|
}
|
|
744
1045
|
}
|
|
745
1046
|
) }) })
|
|
@@ -749,14 +1050,14 @@ function mn(n) {
|
|
|
749
1050
|
/* @__PURE__ */ u("div", { className: "univer-w-1/3", children: /* @__PURE__ */ x("label", { children: [
|
|
750
1051
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: i.t("image-panel.transform.x") }) }),
|
|
751
1052
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: /* @__PURE__ */ u(
|
|
752
|
-
|
|
1053
|
+
le,
|
|
753
1054
|
{
|
|
754
1055
|
className: "univer-w-11/12",
|
|
755
1056
|
precision: 1,
|
|
756
1057
|
min: 0,
|
|
757
1058
|
value: T,
|
|
758
1059
|
onChange: (C) => {
|
|
759
|
-
|
|
1060
|
+
ee(C);
|
|
760
1061
|
}
|
|
761
1062
|
}
|
|
762
1063
|
) }) })
|
|
@@ -764,14 +1065,14 @@ function mn(n) {
|
|
|
764
1065
|
/* @__PURE__ */ u("div", { className: "univer-w-1/3", children: /* @__PURE__ */ x("label", { children: [
|
|
765
1066
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: i.t("image-panel.transform.y") }) }),
|
|
766
1067
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: /* @__PURE__ */ u(
|
|
767
|
-
|
|
1068
|
+
le,
|
|
768
1069
|
{
|
|
769
1070
|
className: "univer-w-11/12",
|
|
770
1071
|
precision: 1,
|
|
771
1072
|
min: 0,
|
|
772
|
-
value:
|
|
1073
|
+
value: U,
|
|
773
1074
|
onChange: (C) => {
|
|
774
|
-
|
|
1075
|
+
me(C);
|
|
775
1076
|
}
|
|
776
1077
|
}
|
|
777
1078
|
) }) })
|
|
@@ -779,12 +1080,12 @@ function mn(n) {
|
|
|
779
1080
|
/* @__PURE__ */ u("div", { className: "univer-w-1/3", children: /* @__PURE__ */ x("label", { children: [
|
|
780
1081
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: i.t("image-panel.transform.rotate") }) }),
|
|
781
1082
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: /* @__PURE__ */ u(
|
|
782
|
-
|
|
1083
|
+
le,
|
|
783
1084
|
{
|
|
784
1085
|
className: "univer-w-11/12",
|
|
785
1086
|
precision: 1,
|
|
786
|
-
value:
|
|
787
|
-
onChange:
|
|
1087
|
+
value: W,
|
|
1088
|
+
onChange: _e
|
|
788
1089
|
}
|
|
789
1090
|
) }) })
|
|
790
1091
|
] }) })
|
|
@@ -793,49 +1094,46 @@ function mn(n) {
|
|
|
793
1094
|
}
|
|
794
1095
|
);
|
|
795
1096
|
}
|
|
796
|
-
const
|
|
797
|
-
function
|
|
1097
|
+
const Ee = "COMPONENT_SLIDE_SIDEBAR";
|
|
1098
|
+
function pn() {
|
|
798
1099
|
var h, l, d;
|
|
799
|
-
const n =
|
|
800
|
-
if (!i) return null;
|
|
801
|
-
const
|
|
802
|
-
if (!
|
|
803
|
-
const a =
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
/* @__PURE__ */ u(mn, { pageId: i, unitId: c }),
|
|
810
|
-
a.objectType === ue.RECT && /* @__PURE__ */ u(pn, { pageId: i, unitId: c })
|
|
811
|
-
] });
|
|
1100
|
+
const n = O(w), e = O(y), t = n.getCurrentUnitForType(E.UNIVER_SLIDE), i = (h = t == null ? void 0 : t.getActivePage()) == null ? void 0 : h.id, r = ((l = n.getFocusedUnit()) == null ? void 0 : l.getUnitId()) || "";
|
|
1101
|
+
if (!i || !r) return null;
|
|
1102
|
+
const o = (d = e.getRenderUnitByPageId(i, r).scene) == null ? void 0 : d.getTransformer();
|
|
1103
|
+
if (!o) return null;
|
|
1104
|
+
const a = o.getSelectedObjectMap().values().next().value;
|
|
1105
|
+
return a ? /* @__PURE__ */ x("section", { className: "univer-p-2 univer-text-center univer-text-sm", children: [
|
|
1106
|
+
/* @__PURE__ */ u(gn, { pageId: i, unitId: r }),
|
|
1107
|
+
/* @__PURE__ */ u(fn, { pageId: i, unitId: r }),
|
|
1108
|
+
a.objectType === de.RECT && /* @__PURE__ */ u(vn, { pageId: i, unitId: r })
|
|
1109
|
+
] }) : null;
|
|
812
1110
|
}
|
|
813
|
-
const
|
|
1111
|
+
const Ye = {
|
|
814
1112
|
id: "slide.command.insert-float-shape.rectangle",
|
|
815
1113
|
type: N.COMMAND,
|
|
816
1114
|
handler: async (n) => {
|
|
817
1115
|
var r;
|
|
818
1116
|
const e = n.get(D), i = (r = n.get(w).getFocusedUnit()) == null ? void 0 : r.getUnitId();
|
|
819
|
-
return e.executeCommand(
|
|
1117
|
+
return e.executeCommand(Zt.id, { unitId: i });
|
|
820
1118
|
}
|
|
821
|
-
},
|
|
1119
|
+
}, Zt = {
|
|
822
1120
|
id: "slide.operation.insert-float-shape.rectangle",
|
|
823
1121
|
type: N.OPERATION,
|
|
824
1122
|
handler: async (n, e) => {
|
|
825
|
-
const t =
|
|
1123
|
+
const t = ze(6), i = n.get(w), r = e.unitId, s = i.getUnit(r);
|
|
826
1124
|
if (!s) return !1;
|
|
827
|
-
const o = s.getActivePage(),
|
|
1125
|
+
const o = s.getActivePage(), c = Object.values(o.pageElements), a = c != null && c.length ? Math.max(...c.map((v) => v.zIndex)) : 20, h = {
|
|
828
1126
|
id: t,
|
|
829
|
-
zIndex:
|
|
1127
|
+
zIndex: a + 1,
|
|
830
1128
|
left: 378,
|
|
831
1129
|
top: 142,
|
|
832
1130
|
width: 250,
|
|
833
1131
|
height: 250,
|
|
834
1132
|
title: t,
|
|
835
1133
|
description: "",
|
|
836
|
-
type:
|
|
1134
|
+
type: Ne.SHAPE,
|
|
837
1135
|
shape: {
|
|
838
|
-
shapeType:
|
|
1136
|
+
shapeType: It.Rect,
|
|
839
1137
|
text: "",
|
|
840
1138
|
shapeProperties: {
|
|
841
1139
|
shapeBackgroundFill: {
|
|
@@ -845,24 +1143,24 @@ const qe = {
|
|
|
845
1143
|
}
|
|
846
1144
|
};
|
|
847
1145
|
o.pageElements[t] = h, s.updatePage(o.id, o);
|
|
848
|
-
const l = n.get(
|
|
1146
|
+
const l = n.get(y), d = l.createObjectToPage(h, o.id, r);
|
|
849
1147
|
return d && l.setObjectActiveByPage(d, o.id, r), !0;
|
|
850
1148
|
}
|
|
851
1149
|
}, $e = {
|
|
852
1150
|
id: "sidebar.operation.slide-shape",
|
|
853
1151
|
type: N.COMMAND,
|
|
854
1152
|
handler: async (n, e) => {
|
|
855
|
-
const { visible: t, objectType: i } = e, r = n.get(
|
|
856
|
-
let o = "",
|
|
857
|
-
return i ===
|
|
1153
|
+
const { visible: t, objectType: i } = e, r = n.get(Tt), s = n.get(J);
|
|
1154
|
+
let o = "", c = "";
|
|
1155
|
+
return i === de.RECT ? (o = "slide.sidebar.shape", c = Ee) : i === de.IMAGE ? (o = "slide.sidebar.image", c = Ee) : i === de.RICH_TEXT && (o = "slide.sidebar.text", c = Ee), t ? r.open({
|
|
858
1156
|
header: { title: s.t(o) },
|
|
859
|
-
children: { label:
|
|
1157
|
+
children: { label: c },
|
|
860
1158
|
onClose: () => {
|
|
861
1159
|
},
|
|
862
1160
|
width: 360
|
|
863
1161
|
}) : r.close(), !0;
|
|
864
1162
|
}
|
|
865
|
-
},
|
|
1163
|
+
}, qe = {
|
|
866
1164
|
id: "slide.command.insert-float-shape.ellipse",
|
|
867
1165
|
type: N.COMMAND,
|
|
868
1166
|
handler: async (n) => {
|
|
@@ -874,20 +1172,20 @@ const qe = {
|
|
|
874
1172
|
id: "slide.operation.insert-float-shape.ellipse",
|
|
875
1173
|
type: N.OPERATION,
|
|
876
1174
|
handler: async (n, e) => {
|
|
877
|
-
const t =
|
|
1175
|
+
const t = ze(6), i = n.get(w), r = e.unitId, s = i.getUnit(r);
|
|
878
1176
|
if (!s) return !1;
|
|
879
|
-
const o = s.getActivePage(),
|
|
1177
|
+
const o = s.getActivePage(), c = Object.values(o.pageElements), a = c != null && c.length ? Math.max(...c.map((v) => v.zIndex)) : 20, h = {
|
|
880
1178
|
id: t,
|
|
881
|
-
zIndex:
|
|
1179
|
+
zIndex: a + 1,
|
|
882
1180
|
left: 378,
|
|
883
1181
|
top: 142,
|
|
884
1182
|
width: 250,
|
|
885
1183
|
height: 250,
|
|
886
1184
|
title: t,
|
|
887
1185
|
description: "",
|
|
888
|
-
type:
|
|
1186
|
+
type: Ne.SHAPE,
|
|
889
1187
|
shape: {
|
|
890
|
-
shapeType:
|
|
1188
|
+
shapeType: It.Ellipse,
|
|
891
1189
|
text: "",
|
|
892
1190
|
shapeProperties: {
|
|
893
1191
|
radius: 100,
|
|
@@ -898,35 +1196,35 @@ const qe = {
|
|
|
898
1196
|
}
|
|
899
1197
|
};
|
|
900
1198
|
o.pageElements[t] = h, s.updatePage(o.id, o);
|
|
901
|
-
const l = n.get(
|
|
1199
|
+
const l = n.get(y), d = l.createObjectToPage(h, o.id, r);
|
|
902
1200
|
return d && l.setObjectActiveByPage(d, o.id, r), !0;
|
|
903
1201
|
}
|
|
904
|
-
},
|
|
1202
|
+
}, Je = {
|
|
905
1203
|
id: "slide.command.add-text",
|
|
906
1204
|
type: N.COMMAND,
|
|
907
1205
|
handler: async (n) => {
|
|
908
1206
|
var r;
|
|
909
1207
|
const e = n.get(D), i = (r = n.get(w).getFocusedUnit()) == null ? void 0 : r.getUnitId();
|
|
910
|
-
return await e.executeCommand(
|
|
1208
|
+
return await e.executeCommand(Xt.id, { unitId: i });
|
|
911
1209
|
}
|
|
912
|
-
},
|
|
1210
|
+
}, Xt = {
|
|
913
1211
|
id: "slide.operation.add-text",
|
|
914
1212
|
type: N.OPERATION,
|
|
915
1213
|
handler: async (n, e) => {
|
|
916
|
-
const t = e.unitId, i =
|
|
1214
|
+
const t = e.unitId, i = ze(6), r = 220, s = 40, o = 230, c = 142, a = (e == null ? void 0 : e.text) || "A New Text", l = n.get(w).getUnit(t);
|
|
917
1215
|
if (!l) return !1;
|
|
918
1216
|
const d = l.getActivePage(), v = Object.values(d.pageElements), m = v != null && v.length ? Math.max(...v.map((_) => _.zIndex)) : 21, p = {
|
|
919
1217
|
id: i,
|
|
920
1218
|
zIndex: m + 1,
|
|
921
1219
|
left: o,
|
|
922
|
-
top:
|
|
1220
|
+
top: c,
|
|
923
1221
|
width: r,
|
|
924
1222
|
height: s,
|
|
925
1223
|
title: "text",
|
|
926
1224
|
description: "",
|
|
927
|
-
type:
|
|
1225
|
+
type: Ne.TEXT,
|
|
928
1226
|
richText: {
|
|
929
|
-
text:
|
|
1227
|
+
text: a,
|
|
930
1228
|
fs: 30,
|
|
931
1229
|
cl: {
|
|
932
1230
|
rgb: "rgb(51, 51, 51)"
|
|
@@ -935,21 +1233,21 @@ const qe = {
|
|
|
935
1233
|
}
|
|
936
1234
|
};
|
|
937
1235
|
d.pageElements[i] = p, l.updatePage(d.id, d);
|
|
938
|
-
const f = n.get(
|
|
1236
|
+
const f = n.get(y), g = f.createObjectToPage(p, d.id, t);
|
|
939
1237
|
return g && f.setObjectActiveByPage(g, d.id, t), !0;
|
|
940
1238
|
}
|
|
941
|
-
},
|
|
1239
|
+
}, Yt = {
|
|
942
1240
|
id: "slide.operation.set-slide-page-thumb",
|
|
943
1241
|
type: N.OPERATION,
|
|
944
|
-
handler: (n, e) => (n.get(
|
|
1242
|
+
handler: (n, e) => (n.get(y).createThumbs(e.unitId), !0)
|
|
945
1243
|
};
|
|
946
|
-
function
|
|
1244
|
+
function mn() {
|
|
947
1245
|
var p, f;
|
|
948
|
-
const n =
|
|
949
|
-
if (!o || !
|
|
1246
|
+
const n = O(w), e = O(D), t = O(K), i = O(J), r = Dt(null), s = n.getCurrentUnitForType(E.UNIVER_SLIDE), o = s == null ? void 0 : s.getPages(), c = s == null ? void 0 : s.getPageOrder();
|
|
1247
|
+
if (!o || !c)
|
|
950
1248
|
return null;
|
|
951
|
-
const
|
|
952
|
-
|
|
1249
|
+
const a = c.map((g) => o[g]), [h, l] = $((f = (p = s == null ? void 0 : s.getActivePage()) == null ? void 0 : p.id) != null ? f : null), d = $i(() => a.map(() => Bi()), [a]);
|
|
1250
|
+
ge(() => {
|
|
953
1251
|
const g = s == null ? void 0 : s.activePage$.subscribe((_) => {
|
|
954
1252
|
var b;
|
|
955
1253
|
const I = (b = _ == null ? void 0 : _.id) != null ? b : null;
|
|
@@ -958,38 +1256,38 @@ function Cn() {
|
|
|
958
1256
|
return () => {
|
|
959
1257
|
g == null || g.unsubscribe();
|
|
960
1258
|
};
|
|
961
|
-
}, []),
|
|
1259
|
+
}, []), ge(() => {
|
|
962
1260
|
d.forEach((g, _) => {
|
|
963
1261
|
var I;
|
|
964
1262
|
if (g.current) {
|
|
965
|
-
const b =
|
|
1263
|
+
const b = a[_];
|
|
966
1264
|
(I = t.getRenderById(b.id)) == null || I.engine.setContainer(g.current);
|
|
967
1265
|
}
|
|
968
|
-
}), d.length > 0 && e.syncExecuteCommand(
|
|
969
|
-
}, [d,
|
|
970
|
-
const v =
|
|
1266
|
+
}), d.length > 0 && e.syncExecuteCommand(Yt.id, { unitId: s == null ? void 0 : s.getUnitId() });
|
|
1267
|
+
}, [d, a, t, e, s]);
|
|
1268
|
+
const v = lt((g) => {
|
|
971
1269
|
e.syncExecuteCommand(Vt.id, { id: g, unitId: s == null ? void 0 : s.getUnitId() });
|
|
972
|
-
}, [e, s]), m =
|
|
973
|
-
e.syncExecuteCommand(
|
|
1270
|
+
}, [e, s]), m = lt(() => {
|
|
1271
|
+
e.syncExecuteCommand(jt.id, { unitId: s == null ? void 0 : s.getUnitId() });
|
|
974
1272
|
}, [e, s]);
|
|
975
1273
|
return /* @__PURE__ */ u(
|
|
976
1274
|
"aside",
|
|
977
1275
|
{
|
|
978
1276
|
ref: r,
|
|
979
|
-
className:
|
|
1277
|
+
className: k("univer-flex univer-h-full univer-w-64 univer-flex-col univer-overflow-y-auto univer-overflow-x-hidden", Li),
|
|
980
1278
|
children: /* @__PURE__ */ x("div", { className: "univer-px-4", children: [
|
|
981
1279
|
/* @__PURE__ */ u("header", { className: "univer-flex univer-justify-center univer-pt-4", children: /* @__PURE__ */ u(
|
|
982
1280
|
"a",
|
|
983
1281
|
{
|
|
984
|
-
className:
|
|
1282
|
+
className: k("univer-box-border univer-block univer-h-8 univer-w-full univer-cursor-pointer univer-rounded-md univer-bg-white univer-text-center univer-text-sm univer-leading-8 univer-transition-colors", he),
|
|
985
1283
|
onClick: m,
|
|
986
1284
|
children: i.t("slide.append")
|
|
987
1285
|
}
|
|
988
1286
|
) }),
|
|
989
|
-
|
|
1287
|
+
a.map((g, _) => /* @__PURE__ */ x(
|
|
990
1288
|
"div",
|
|
991
1289
|
{
|
|
992
|
-
className:
|
|
1290
|
+
className: k("univer-my-4 univer-flex univer-gap-2", {
|
|
993
1291
|
"[&>div]:univer-border-primary-600 [&>span]:univer-text-primary-600": g.id === h
|
|
994
1292
|
}),
|
|
995
1293
|
onClick: () => v(g.id),
|
|
@@ -999,7 +1297,7 @@ function Cn() {
|
|
|
999
1297
|
"div",
|
|
1000
1298
|
{
|
|
1001
1299
|
ref: d[_],
|
|
1002
|
-
className:
|
|
1300
|
+
className: k("univer-relative univer-box-border univer-h-32 univer-w-52 univer-bg-white hover:univer-border-primary-600", he)
|
|
1003
1301
|
}
|
|
1004
1302
|
)
|
|
1005
1303
|
]
|
|
@@ -1010,101 +1308,101 @@ function Cn() {
|
|
|
1010
1308
|
}
|
|
1011
1309
|
);
|
|
1012
1310
|
}
|
|
1013
|
-
const
|
|
1014
|
-
function
|
|
1311
|
+
const ue = di("SLIDE_EDITOR"), qt = "slide.menu.image";
|
|
1312
|
+
function _n(n) {
|
|
1015
1313
|
return {
|
|
1016
|
-
id:
|
|
1017
|
-
type:
|
|
1314
|
+
id: qt,
|
|
1315
|
+
type: se.SUBITEMS,
|
|
1018
1316
|
icon: "AddImageIcon",
|
|
1019
1317
|
tooltip: "slide.image.insert.title",
|
|
1020
|
-
hidden$:
|
|
1318
|
+
hidden$: re(n, E.UNIVER_SLIDE)
|
|
1021
1319
|
};
|
|
1022
1320
|
}
|
|
1023
|
-
function
|
|
1321
|
+
function Cn(n) {
|
|
1024
1322
|
return {
|
|
1025
1323
|
id: Ge.id,
|
|
1026
1324
|
title: "slide.image.insert.float",
|
|
1027
|
-
type:
|
|
1028
|
-
hidden$:
|
|
1325
|
+
type: se.BUTTON,
|
|
1326
|
+
hidden$: re(n, E.UNIVER_SLIDE)
|
|
1029
1327
|
};
|
|
1030
1328
|
}
|
|
1031
|
-
const
|
|
1032
|
-
function
|
|
1329
|
+
const Jt = "slide.menu.shape";
|
|
1330
|
+
function Sn(n) {
|
|
1033
1331
|
return {
|
|
1034
|
-
id:
|
|
1035
|
-
type:
|
|
1332
|
+
id: Jt,
|
|
1333
|
+
type: se.SUBITEMS,
|
|
1036
1334
|
icon: "GraphIcon",
|
|
1037
1335
|
tooltip: "slide.shape.insert.title",
|
|
1038
|
-
hidden$:
|
|
1336
|
+
hidden$: re(n, E.UNIVER_SLIDE)
|
|
1039
1337
|
// disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),
|
|
1040
1338
|
};
|
|
1041
1339
|
}
|
|
1042
|
-
function
|
|
1340
|
+
function In(n) {
|
|
1043
1341
|
return {
|
|
1044
|
-
id:
|
|
1342
|
+
id: Ye.id,
|
|
1045
1343
|
title: "slide.shape.insert.rectangle",
|
|
1046
|
-
type:
|
|
1047
|
-
hidden$:
|
|
1344
|
+
type: se.BUTTON,
|
|
1345
|
+
hidden$: re(n, E.UNIVER_SLIDE)
|
|
1048
1346
|
};
|
|
1049
1347
|
}
|
|
1050
|
-
function
|
|
1348
|
+
function bn(n) {
|
|
1051
1349
|
return {
|
|
1052
|
-
id:
|
|
1350
|
+
id: qe.id,
|
|
1053
1351
|
title: "slide.shape.insert.ellipse",
|
|
1054
|
-
type:
|
|
1055
|
-
hidden$:
|
|
1352
|
+
type: se.BUTTON,
|
|
1353
|
+
hidden$: re(n, E.UNIVER_SLIDE)
|
|
1056
1354
|
};
|
|
1057
1355
|
}
|
|
1058
|
-
function
|
|
1356
|
+
function En(n) {
|
|
1059
1357
|
return {
|
|
1060
|
-
id:
|
|
1061
|
-
type:
|
|
1358
|
+
id: Je.id,
|
|
1359
|
+
type: se.BUTTON,
|
|
1062
1360
|
icon: "TextIcon",
|
|
1063
1361
|
tooltip: "slide.text.insert.title",
|
|
1064
|
-
hidden$:
|
|
1362
|
+
hidden$: re(n, E.UNIVER_SLIDE)
|
|
1065
1363
|
};
|
|
1066
1364
|
}
|
|
1067
|
-
const
|
|
1365
|
+
const xn = {
|
|
1068
1366
|
[Pi.FORMAT]: {
|
|
1069
|
-
[
|
|
1367
|
+
[Je.id]: {
|
|
1070
1368
|
order: 0,
|
|
1071
|
-
menuItemFactory:
|
|
1369
|
+
menuItemFactory: En
|
|
1072
1370
|
},
|
|
1073
|
-
[
|
|
1371
|
+
[qt]: {
|
|
1074
1372
|
order: 0,
|
|
1075
|
-
menuItemFactory:
|
|
1373
|
+
menuItemFactory: _n,
|
|
1076
1374
|
[Ge.id]: {
|
|
1077
1375
|
order: 0,
|
|
1078
|
-
menuItemFactory:
|
|
1376
|
+
menuItemFactory: Cn
|
|
1079
1377
|
}
|
|
1080
1378
|
},
|
|
1081
|
-
[
|
|
1379
|
+
[Jt]: {
|
|
1082
1380
|
order: 0,
|
|
1083
|
-
menuItemFactory:
|
|
1084
|
-
[
|
|
1381
|
+
menuItemFactory: Sn,
|
|
1382
|
+
[Ye.id]: {
|
|
1085
1383
|
order: 0,
|
|
1086
|
-
menuItemFactory:
|
|
1384
|
+
menuItemFactory: In
|
|
1087
1385
|
},
|
|
1088
|
-
[
|
|
1386
|
+
[qe.id]: {
|
|
1089
1387
|
order: 0,
|
|
1090
|
-
menuItemFactory:
|
|
1388
|
+
menuItemFactory: bn
|
|
1091
1389
|
}
|
|
1092
1390
|
}
|
|
1093
1391
|
}
|
|
1094
|
-
},
|
|
1392
|
+
}, Oe = {
|
|
1095
1393
|
id: "slide.operation.edit-arrow",
|
|
1096
1394
|
type: N.OPERATION,
|
|
1097
1395
|
handler: () => !0
|
|
1098
|
-
},
|
|
1099
|
-
function
|
|
1396
|
+
}, Qt = "COMPONENT_SLIDE_IMAGE_POPUP_MENU";
|
|
1397
|
+
function Rn(n) {
|
|
1100
1398
|
var p, f;
|
|
1101
1399
|
const e = (f = (p = n.popup) == null ? void 0 : p.extraProps) == null ? void 0 : f.menuItems;
|
|
1102
1400
|
if (!e)
|
|
1103
1401
|
return null;
|
|
1104
|
-
const t =
|
|
1105
|
-
|
|
1402
|
+
const t = O(D), i = O(J), [r, s] = $(!1), [o, c] = $(!1), a = () => {
|
|
1403
|
+
c(!0);
|
|
1106
1404
|
}, h = () => {
|
|
1107
|
-
|
|
1405
|
+
c(!1);
|
|
1108
1406
|
}, l = (g) => {
|
|
1109
1407
|
s(g);
|
|
1110
1408
|
}, d = (g) => {
|
|
@@ -1113,16 +1411,16 @@ function wn(n) {
|
|
|
1113
1411
|
return /* @__PURE__ */ u(
|
|
1114
1412
|
"div",
|
|
1115
1413
|
{
|
|
1116
|
-
onMouseEnter:
|
|
1414
|
+
onMouseEnter: a,
|
|
1117
1415
|
onMouseLeave: h,
|
|
1118
1416
|
children: /* @__PURE__ */ u(
|
|
1119
|
-
|
|
1417
|
+
Mt,
|
|
1120
1418
|
{
|
|
1121
1419
|
align: "start",
|
|
1122
1420
|
overlay: /* @__PURE__ */ u(
|
|
1123
1421
|
"ul",
|
|
1124
1422
|
{
|
|
1125
|
-
className:
|
|
1423
|
+
className: k("univer-m-0 univer-box-border univer-grid univer-list-none univer-items-center univer-gap-1 univer-rounded-lg univer-bg-white univer-p-1.5 univer-text-sm univer-shadow-lg", he),
|
|
1126
1424
|
children: m.map((g) => /* @__PURE__ */ u(
|
|
1127
1425
|
"li",
|
|
1128
1426
|
{
|
|
@@ -1139,18 +1437,18 @@ function wn(n) {
|
|
|
1139
1437
|
children: /* @__PURE__ */ x(
|
|
1140
1438
|
"div",
|
|
1141
1439
|
{
|
|
1142
|
-
className:
|
|
1440
|
+
className: k("univer-flex univer-items-center univer-gap-2 univer-rounded univer-p-1 hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-800", he, {
|
|
1143
1441
|
"univer-bg-gray-100 dark:!univer-bg-gray-800": r,
|
|
1144
1442
|
"univer-bg-white dark:!univer-bg-gray-900": !r
|
|
1145
1443
|
}),
|
|
1146
1444
|
children: [
|
|
1147
1445
|
/* @__PURE__ */ u(
|
|
1148
|
-
|
|
1446
|
+
zt,
|
|
1149
1447
|
{
|
|
1150
1448
|
className: "univer-fill-primary-600 univer-text-gray-900 dark:!univer-text-white"
|
|
1151
1449
|
}
|
|
1152
1450
|
),
|
|
1153
|
-
v && /* @__PURE__ */ u(
|
|
1451
|
+
v && /* @__PURE__ */ u(Xe, { className: "dark:!univer-text-white" })
|
|
1154
1452
|
]
|
|
1155
1453
|
}
|
|
1156
1454
|
)
|
|
@@ -1159,16 +1457,16 @@ function wn(n) {
|
|
|
1159
1457
|
}
|
|
1160
1458
|
);
|
|
1161
1459
|
}
|
|
1162
|
-
class
|
|
1460
|
+
class On {
|
|
1163
1461
|
constructor() {
|
|
1164
1462
|
S(this, "_state", null);
|
|
1165
1463
|
S(this, "_rect", null);
|
|
1166
|
-
S(this, "_state$", new
|
|
1464
|
+
S(this, "_state$", new q(null));
|
|
1167
1465
|
S(this, "state$", this._state$.asObservable());
|
|
1168
|
-
S(this, "_rect$", new
|
|
1466
|
+
S(this, "_rect$", new q(null));
|
|
1169
1467
|
S(this, "rect$", this._rect$.asObservable());
|
|
1170
1468
|
S(this, "_focus", !1);
|
|
1171
|
-
S(this, "_focus$", new
|
|
1469
|
+
S(this, "_focus$", new q(this._focus));
|
|
1172
1470
|
S(this, "focus$", this._focus$.asObservable());
|
|
1173
1471
|
}
|
|
1174
1472
|
dispose() {
|
|
@@ -1193,58 +1491,58 @@ class yn {
|
|
|
1193
1491
|
this._state$.next(e);
|
|
1194
1492
|
}
|
|
1195
1493
|
}
|
|
1196
|
-
const
|
|
1494
|
+
const Qe = bt(
|
|
1197
1495
|
"univer.slide-editor-manager.service"
|
|
1198
|
-
),
|
|
1496
|
+
), we = -1e3, vt = {
|
|
1199
1497
|
width: 0,
|
|
1200
1498
|
height: 0,
|
|
1201
|
-
top:
|
|
1202
|
-
left:
|
|
1499
|
+
top: we,
|
|
1500
|
+
left: we
|
|
1203
1501
|
};
|
|
1204
|
-
function
|
|
1502
|
+
function wn() {
|
|
1205
1503
|
const [n, e] = $({
|
|
1206
|
-
...
|
|
1207
|
-
}), t =
|
|
1208
|
-
() => r.subscribeContextValue$(
|
|
1504
|
+
...vt
|
|
1505
|
+
}), t = O(Qe), i = O(Ze), r = O(pe), s = yi(
|
|
1506
|
+
() => r.subscribeContextValue$(ot),
|
|
1209
1507
|
!1,
|
|
1210
1508
|
void 0,
|
|
1211
|
-
[r,
|
|
1509
|
+
[r, ot]
|
|
1212
1510
|
);
|
|
1213
|
-
return
|
|
1511
|
+
return ui.UNSPECIFIED, ge(() => {
|
|
1214
1512
|
t.state$.subscribe((o) => {
|
|
1215
1513
|
if (o == null)
|
|
1216
1514
|
return;
|
|
1217
1515
|
const {
|
|
1218
|
-
startX:
|
|
1219
|
-
startY:
|
|
1516
|
+
startX: c = we,
|
|
1517
|
+
startY: a = we,
|
|
1220
1518
|
endX: h = 0,
|
|
1221
1519
|
endY: l = 0,
|
|
1222
1520
|
show: d = !1
|
|
1223
1521
|
} = o;
|
|
1224
1522
|
if (!d)
|
|
1225
1523
|
e({
|
|
1226
|
-
...
|
|
1524
|
+
...vt
|
|
1227
1525
|
});
|
|
1228
1526
|
else {
|
|
1229
1527
|
e({
|
|
1230
|
-
width: h -
|
|
1231
|
-
height: l -
|
|
1232
|
-
left:
|
|
1233
|
-
top:
|
|
1528
|
+
width: h - c - ie + 2,
|
|
1529
|
+
height: l - a - ie + 2,
|
|
1530
|
+
left: c + ie,
|
|
1531
|
+
top: a + ie
|
|
1234
1532
|
});
|
|
1235
|
-
const v = i.getEditor(
|
|
1533
|
+
const v = i.getEditor(ue);
|
|
1236
1534
|
if (v == null)
|
|
1237
1535
|
return;
|
|
1238
1536
|
const { left: m, top: p, width: f, height: g } = v.getBoundingClientRect();
|
|
1239
1537
|
t.setRect({ left: m, top: p, width: f, height: g });
|
|
1240
1538
|
}
|
|
1241
1539
|
});
|
|
1242
|
-
}, []),
|
|
1540
|
+
}, []), ge(() => {
|
|
1243
1541
|
s || t.setFocus(!0);
|
|
1244
1542
|
}, [s, n]), /* @__PURE__ */ u(
|
|
1245
1543
|
"div",
|
|
1246
1544
|
{
|
|
1247
|
-
className:
|
|
1545
|
+
className: k("univer-absolute univer-z-10 univer-box-border univer-flex", he),
|
|
1248
1546
|
style: {
|
|
1249
1547
|
left: n.left,
|
|
1250
1548
|
top: n.top,
|
|
@@ -1254,117 +1552,117 @@ function Pn() {
|
|
|
1254
1552
|
}
|
|
1255
1553
|
);
|
|
1256
1554
|
}
|
|
1257
|
-
function
|
|
1258
|
-
return n.getContextValue(
|
|
1555
|
+
function Be(n) {
|
|
1556
|
+
return n.getContextValue(Et) && n.getContextValue(xe);
|
|
1259
1557
|
}
|
|
1260
|
-
function
|
|
1261
|
-
return n.getContextValue(
|
|
1558
|
+
function Pn(n) {
|
|
1559
|
+
return n.getContextValue(hi) && n.getContextValue(Et);
|
|
1262
1560
|
}
|
|
1263
|
-
const
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1561
|
+
const ei = [
|
|
1562
|
+
P.ARROW_DOWN,
|
|
1563
|
+
P.ARROW_UP,
|
|
1564
|
+
P.ARROW_LEFT,
|
|
1565
|
+
P.ARROW_RIGHT
|
|
1268
1566
|
];
|
|
1269
|
-
[
|
|
1270
|
-
function
|
|
1567
|
+
[P.ENTER, P.TAB, ...ei];
|
|
1568
|
+
function yn() {
|
|
1271
1569
|
const n = [];
|
|
1272
|
-
for (const e of
|
|
1570
|
+
for (const e of ei)
|
|
1273
1571
|
n.push({
|
|
1274
|
-
id:
|
|
1572
|
+
id: Oe.id,
|
|
1275
1573
|
binding: e,
|
|
1276
|
-
preconditions: (t) =>
|
|
1574
|
+
preconditions: (t) => Be(t),
|
|
1277
1575
|
staticParameters: {
|
|
1278
1576
|
visible: !1,
|
|
1279
|
-
eventType:
|
|
1577
|
+
eventType: Y.Keyboard,
|
|
1280
1578
|
keycode: e,
|
|
1281
1579
|
isShift: !1
|
|
1282
1580
|
}
|
|
1283
1581
|
}), n.push({
|
|
1284
|
-
id:
|
|
1285
|
-
binding: e |
|
|
1286
|
-
preconditions: (t) =>
|
|
1582
|
+
id: Oe.id,
|
|
1583
|
+
binding: e | Ti.SHIFT,
|
|
1584
|
+
preconditions: (t) => Be(t),
|
|
1287
1585
|
staticParameters: {
|
|
1288
1586
|
visible: !1,
|
|
1289
|
-
eventType:
|
|
1587
|
+
eventType: Y.Keyboard,
|
|
1290
1588
|
keycode: e,
|
|
1291
1589
|
isShift: !0
|
|
1292
1590
|
}
|
|
1293
1591
|
});
|
|
1294
1592
|
return n;
|
|
1295
1593
|
}
|
|
1296
|
-
const
|
|
1297
|
-
id:
|
|
1298
|
-
preconditions: (n) =>
|
|
1299
|
-
binding:
|
|
1594
|
+
const Tn = {
|
|
1595
|
+
id: Hi.id,
|
|
1596
|
+
preconditions: (n) => Be(n) || Pn(n),
|
|
1597
|
+
binding: P.BACKSPACE
|
|
1300
1598
|
};
|
|
1301
|
-
var
|
|
1302
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1599
|
+
var Mn = Object.getOwnPropertyDescriptor, Nn = (n, e, t, i) => {
|
|
1600
|
+
for (var r = i > 1 ? void 0 : i ? Mn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
1303
1601
|
(o = n[s]) && (r = o(r) || r);
|
|
1304
1602
|
return r;
|
|
1305
|
-
},
|
|
1306
|
-
let Pe = class extends
|
|
1603
|
+
}, te = (n, e) => (t, i) => e(t, i, n);
|
|
1604
|
+
let Pe = class extends De {
|
|
1307
1605
|
constructor(n, e, t, i, r, s) {
|
|
1308
1606
|
super(), this._injector = n, this._menuManagerService = e, this._componentManager = t, this._uiPartsService = i, this._commandService = r, this._shortcutService = s, this._initCommands(), this._initCustomComponents(), this._initUIComponents(), this._initMenus(), this._initShortcuts();
|
|
1309
1607
|
}
|
|
1310
1608
|
_initMenus() {
|
|
1311
|
-
this._menuManagerService.mergeMenu(
|
|
1609
|
+
this._menuManagerService.mergeMenu(xn);
|
|
1312
1610
|
}
|
|
1313
1611
|
_initCustomComponents() {
|
|
1314
1612
|
const n = this._componentManager;
|
|
1315
|
-
this.disposeWithMe(n.register("TextIcon",
|
|
1613
|
+
this.disposeWithMe(n.register("TextIcon", Wt)), this.disposeWithMe(n.register("GraphIcon", Bt)), this.disposeWithMe(n.register(Qt, Rn)), this.disposeWithMe(n.register(Ee, pn));
|
|
1316
1614
|
}
|
|
1317
1615
|
_initCommands() {
|
|
1318
1616
|
[
|
|
1319
|
-
|
|
1617
|
+
jt,
|
|
1320
1618
|
Vt,
|
|
1321
|
-
qt,
|
|
1322
|
-
Ge,
|
|
1323
1619
|
Yt,
|
|
1324
|
-
|
|
1325
|
-
Je,
|
|
1326
|
-
Gt,
|
|
1620
|
+
Ge,
|
|
1327
1621
|
Xt,
|
|
1622
|
+
Je,
|
|
1328
1623
|
qe,
|
|
1624
|
+
Gt,
|
|
1625
|
+
Zt,
|
|
1626
|
+
Ye,
|
|
1329
1627
|
$e,
|
|
1330
|
-
|
|
1331
|
-
|
|
1628
|
+
At,
|
|
1629
|
+
B,
|
|
1332
1630
|
// commands for editor
|
|
1333
|
-
|
|
1631
|
+
Oe
|
|
1334
1632
|
].forEach((n) => this.disposeWithMe(this._commandService.registerCommand(n)));
|
|
1335
1633
|
}
|
|
1336
1634
|
_initUIComponents() {
|
|
1337
1635
|
this.disposeWithMe(
|
|
1338
|
-
this._uiPartsService.registerComponent(ct.LEFT_SIDEBAR, () =>
|
|
1636
|
+
this._uiPartsService.registerComponent(ct.LEFT_SIDEBAR, () => at(mn, this._injector))
|
|
1339
1637
|
), this.disposeWithMe(
|
|
1340
|
-
this._uiPartsService.registerComponent(ct.CONTENT, () =>
|
|
1638
|
+
this._uiPartsService.registerComponent(ct.CONTENT, () => at(wn, this._injector))
|
|
1341
1639
|
);
|
|
1342
1640
|
}
|
|
1343
1641
|
_initShortcuts() {
|
|
1344
1642
|
[
|
|
1345
|
-
|
|
1346
|
-
...
|
|
1643
|
+
Tn,
|
|
1644
|
+
...yn()
|
|
1347
1645
|
].forEach((n) => {
|
|
1348
1646
|
this.disposeWithMe(this._shortcutService.registerShortcut(n));
|
|
1349
1647
|
});
|
|
1350
1648
|
}
|
|
1351
1649
|
};
|
|
1352
|
-
Pe =
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1650
|
+
Pe = Nn([
|
|
1651
|
+
te(0, z(ke)),
|
|
1652
|
+
te(1, Mi),
|
|
1653
|
+
te(2, z(Ni)),
|
|
1654
|
+
te(3, Di),
|
|
1655
|
+
te(4, D),
|
|
1656
|
+
te(5, Ui)
|
|
1359
1657
|
], Pe);
|
|
1360
|
-
const
|
|
1361
|
-
var
|
|
1362
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1658
|
+
const Dn = "slides-ui.config", ft = {};
|
|
1659
|
+
var Un = Object.getOwnPropertyDescriptor, Vn = (n, e, t, i) => {
|
|
1660
|
+
for (var r = i > 1 ? void 0 : i ? Un(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
1363
1661
|
(o = n[s]) && (r = o(r) || r);
|
|
1364
1662
|
return r;
|
|
1365
|
-
},
|
|
1366
|
-
function
|
|
1367
|
-
const t =
|
|
1663
|
+
}, Se = (n, e) => (t, i) => e(t, i, n);
|
|
1664
|
+
function jn(n, e) {
|
|
1665
|
+
const t = pt(n.left, n.top, e), i = pt(n.right, n.bottom, e);
|
|
1368
1666
|
return {
|
|
1369
1667
|
left: t.x,
|
|
1370
1668
|
top: t.y,
|
|
@@ -1372,39 +1670,39 @@ function Ln(n, e) {
|
|
|
1372
1670
|
bottom: i.y
|
|
1373
1671
|
};
|
|
1374
1672
|
}
|
|
1375
|
-
function
|
|
1376
|
-
const { scaleX: i, scaleY: r } = t.getAncestorScale(), s = t.getViewport(
|
|
1673
|
+
function pt(n, e, t) {
|
|
1674
|
+
const { scaleX: i, scaleY: r } = t.getAncestorScale(), s = t.getViewport(ne.VIEW);
|
|
1377
1675
|
if (!s)
|
|
1378
1676
|
return {
|
|
1379
1677
|
x: n,
|
|
1380
1678
|
y: e
|
|
1381
1679
|
};
|
|
1382
|
-
const { viewportScrollX: o, viewportScrollY:
|
|
1680
|
+
const { viewportScrollX: o, viewportScrollY: c } = s, a = (n - o) * i, h = (e - c) * r;
|
|
1383
1681
|
return {
|
|
1384
|
-
x:
|
|
1682
|
+
x: a,
|
|
1385
1683
|
y: h
|
|
1386
1684
|
};
|
|
1387
1685
|
}
|
|
1388
|
-
let
|
|
1686
|
+
let ye = class extends De {
|
|
1389
1687
|
constructor(n, e, t, i) {
|
|
1390
1688
|
super(), this._globalPopupManagerService = n, this._renderManagerService = e, this._univerInstanceService = t, this._commandService = i;
|
|
1391
1689
|
}
|
|
1392
1690
|
_createObjectPositionObserver(n, e) {
|
|
1393
1691
|
const i = (() => {
|
|
1394
|
-
var L,
|
|
1395
|
-
const { scene: o, engine:
|
|
1396
|
-
left:
|
|
1397
|
-
right:
|
|
1692
|
+
var A, L, Q, ee;
|
|
1693
|
+
const { scene: o, engine: c } = e, { left: a, top: h, width: l, height: d } = n, v = (o.width - ((L = (A = e.mainComponent) == null ? void 0 : A.width) != null ? L : 0)) / 2, m = (o.height - ((ee = (Q = e.mainComponent) == null ? void 0 : Q.height) != null ? ee : 0)) / 2, p = {
|
|
1694
|
+
left: a,
|
|
1695
|
+
right: a + l,
|
|
1398
1696
|
top: h,
|
|
1399
1697
|
bottom: h + d
|
|
1400
|
-
}, f =
|
|
1698
|
+
}, f = c.getCanvasElement(), g = f.getBoundingClientRect(), _ = bi(f.style.width), { scaleX: I, scaleY: b } = o.getAncestorScale(), T = jn(p, o), { top: M, left: U, width: R } = g, W = R / _;
|
|
1401
1699
|
return {
|
|
1402
|
-
left: T.left *
|
|
1403
|
-
right: T.right *
|
|
1404
|
-
top: T.top *
|
|
1405
|
-
bottom: T.bottom *
|
|
1700
|
+
left: T.left * W * I + U + v,
|
|
1701
|
+
right: T.right * W * I + U + v,
|
|
1702
|
+
top: T.top * W * b + M + m,
|
|
1703
|
+
bottom: T.bottom * W * b + M + m
|
|
1406
1704
|
};
|
|
1407
|
-
})(), r = new
|
|
1705
|
+
})(), r = new q(i), s = new Ke();
|
|
1408
1706
|
return {
|
|
1409
1707
|
position: i,
|
|
1410
1708
|
position$: r,
|
|
@@ -1418,7 +1716,7 @@ let Te = class extends Ue {
|
|
|
1418
1716
|
dispose: () => {
|
|
1419
1717
|
}
|
|
1420
1718
|
};
|
|
1421
|
-
const { position: s, position$: o, disposable:
|
|
1719
|
+
const { position: s, position$: o, disposable: c } = this._createObjectPositionObserver(n, r), a = this._globalPopupManagerService.addPopup({
|
|
1422
1720
|
...e,
|
|
1423
1721
|
unitId: i,
|
|
1424
1722
|
subUnitId: "default",
|
|
@@ -1428,27 +1726,27 @@ let Te = class extends Ue {
|
|
|
1428
1726
|
});
|
|
1429
1727
|
return {
|
|
1430
1728
|
dispose: () => {
|
|
1431
|
-
this._globalPopupManagerService.removePopup(
|
|
1729
|
+
this._globalPopupManagerService.removePopup(a), o.complete(), c.dispose();
|
|
1432
1730
|
}
|
|
1433
1731
|
};
|
|
1434
1732
|
}
|
|
1435
1733
|
};
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
],
|
|
1442
|
-
var
|
|
1443
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1734
|
+
ye = Vn([
|
|
1735
|
+
Se(0, z(Vi)),
|
|
1736
|
+
Se(1, K),
|
|
1737
|
+
Se(2, w),
|
|
1738
|
+
Se(3, D)
|
|
1739
|
+
], ye);
|
|
1740
|
+
var An = Object.getOwnPropertyDescriptor, Ln = (n, e, t, i) => {
|
|
1741
|
+
for (var r = i > 1 ? void 0 : i ? An(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
1444
1742
|
(o = n[s]) && (r = o(r) || r);
|
|
1445
1743
|
return r;
|
|
1446
|
-
},
|
|
1447
|
-
let
|
|
1448
|
-
constructor(e, t, i, r, s, o,
|
|
1744
|
+
}, X = (n, e) => (t, i) => e(t, i, n);
|
|
1745
|
+
let Te = class extends fe {
|
|
1746
|
+
constructor(e, t, i, r, s, o, c) {
|
|
1449
1747
|
super();
|
|
1450
1748
|
S(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
|
|
1451
|
-
this._canvasPopManagerService = e, this._renderManagerService = t, this._univerInstanceService = i, this._contextService = r, this._canvasView = s, this._sidebarService = o, this._commandService =
|
|
1749
|
+
this._canvasPopManagerService = e, this._renderManagerService = t, this._univerInstanceService = i, this._contextService = r, this._canvasView = s, this._sidebarService = o, this._commandService = c, this._init();
|
|
1452
1750
|
}
|
|
1453
1751
|
_init() {
|
|
1454
1752
|
this._univerInstanceService.getAllUnitsForType(E.UNIVER_SLIDE).forEach((e) => this._create(e));
|
|
@@ -1467,23 +1765,23 @@ let Me = class extends pe {
|
|
|
1467
1765
|
const t = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE), i = (r = t == null ? void 0 : t.getPages()) != null ? r : {};
|
|
1468
1766
|
Object.keys(i).forEach((s) => {
|
|
1469
1767
|
var h;
|
|
1470
|
-
const
|
|
1471
|
-
if (!
|
|
1472
|
-
let
|
|
1768
|
+
const c = (h = this._canvasView.getRenderUnitByPageId(s, e).scene) == null ? void 0 : h.getTransformer();
|
|
1769
|
+
if (!c) return;
|
|
1770
|
+
let a;
|
|
1473
1771
|
this.disposeWithMe(
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
const l =
|
|
1772
|
+
xt(
|
|
1773
|
+
c.createControl$.subscribe(() => {
|
|
1774
|
+
const l = c.getSelectedObjectMap();
|
|
1477
1775
|
if (l.size > 1) {
|
|
1478
|
-
|
|
1776
|
+
a == null || a.dispose();
|
|
1479
1777
|
return;
|
|
1480
1778
|
}
|
|
1481
1779
|
const d = l.values().next().value;
|
|
1482
1780
|
if (!d)
|
|
1483
1781
|
return;
|
|
1484
1782
|
const v = d.oKey;
|
|
1485
|
-
|
|
1486
|
-
componentKey:
|
|
1783
|
+
a == null || a.dispose(), a = this.disposeWithMe(this._canvasPopManagerService.attachPopupToObject(d, {
|
|
1784
|
+
componentKey: Qt,
|
|
1487
1785
|
direction: "horizontal",
|
|
1488
1786
|
offset: [2, 0],
|
|
1489
1787
|
extraProps: {
|
|
@@ -1496,19 +1794,19 @@ let Me = class extends pe {
|
|
|
1496
1794
|
})
|
|
1497
1795
|
)
|
|
1498
1796
|
), this.disposeWithMe(
|
|
1499
|
-
|
|
1500
|
-
|
|
1797
|
+
c.clearControl$.subscribe(() => {
|
|
1798
|
+
a == null || a.dispose(), this._contextService.setContextValue(gi, !1);
|
|
1501
1799
|
})
|
|
1502
1800
|
), this.disposeWithMe(
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
const l =
|
|
1801
|
+
c.changing$.subscribe(() => {
|
|
1802
|
+
a == null || a.dispose();
|
|
1803
|
+
const l = c.getSelectedObjectMap();
|
|
1506
1804
|
if (l.size > 1) {
|
|
1507
|
-
|
|
1805
|
+
a == null || a.dispose();
|
|
1508
1806
|
return;
|
|
1509
1807
|
}
|
|
1510
1808
|
const d = l.values().next().value;
|
|
1511
|
-
d && this._commandService.executeCommand(
|
|
1809
|
+
d && this._commandService.executeCommand(B.id, {
|
|
1512
1810
|
unitId: e,
|
|
1513
1811
|
oKey: d.oKey,
|
|
1514
1812
|
props: {
|
|
@@ -1535,7 +1833,7 @@ let Me = class extends pe {
|
|
|
1535
1833
|
}, {
|
|
1536
1834
|
label: "slide.popup.delete",
|
|
1537
1835
|
index: 5,
|
|
1538
|
-
commandId:
|
|
1836
|
+
commandId: At.id,
|
|
1539
1837
|
commandParams: {
|
|
1540
1838
|
id: t,
|
|
1541
1839
|
unitId: i
|
|
@@ -1544,40 +1842,40 @@ let Me = class extends pe {
|
|
|
1544
1842
|
}];
|
|
1545
1843
|
}
|
|
1546
1844
|
};
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
],
|
|
1556
|
-
var
|
|
1557
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1845
|
+
Te = Ln([
|
|
1846
|
+
X(0, z(ye)),
|
|
1847
|
+
X(1, K),
|
|
1848
|
+
X(2, w),
|
|
1849
|
+
X(3, pe),
|
|
1850
|
+
X(4, z(y)),
|
|
1851
|
+
X(5, Tt),
|
|
1852
|
+
X(6, D)
|
|
1853
|
+
], Te);
|
|
1854
|
+
var $n = Object.getOwnPropertyDescriptor, Bn = (n, e, t, i) => {
|
|
1855
|
+
for (var r = i > 1 ? void 0 : i ? $n(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
1558
1856
|
(o = n[s]) && (r = o(r) || r);
|
|
1559
1857
|
return r;
|
|
1560
1858
|
}, Ve = (n, e) => (t, i) => e(t, i, n);
|
|
1561
|
-
const
|
|
1562
|
-
let
|
|
1859
|
+
const et = bt("univer.slide-editor-bridge.service");
|
|
1860
|
+
let He = class extends De {
|
|
1563
1861
|
constructor(e, t, i) {
|
|
1564
1862
|
super();
|
|
1565
|
-
S(this, "_editorUnitId",
|
|
1863
|
+
S(this, "_editorUnitId", ue);
|
|
1566
1864
|
S(this, "_isForceKeepVisible", !1);
|
|
1567
1865
|
S(this, "_editorIsDirty", !1);
|
|
1568
1866
|
S(this, "_currentEditRectState", null);
|
|
1569
|
-
S(this, "_currentEditRectState$", new
|
|
1867
|
+
S(this, "_currentEditRectState$", new q(null));
|
|
1570
1868
|
S(this, "currentEditRectState$", this._currentEditRectState$.asObservable());
|
|
1571
1869
|
S(this, "_visibleParam", {
|
|
1572
1870
|
visible: !1,
|
|
1573
|
-
eventType:
|
|
1871
|
+
eventType: Y.Dblclick,
|
|
1574
1872
|
unitId: ""
|
|
1575
1873
|
});
|
|
1576
|
-
S(this, "_visible$", new
|
|
1874
|
+
S(this, "_visible$", new q(this._visibleParam));
|
|
1577
1875
|
S(this, "visible$", this._visible$.asObservable());
|
|
1578
|
-
S(this, "_afterVisible$", new
|
|
1876
|
+
S(this, "_afterVisible$", new q(this._visibleParam));
|
|
1579
1877
|
S(this, "afterVisible$", this._afterVisible$.asObservable());
|
|
1580
|
-
S(this, "endEditing$", new
|
|
1878
|
+
S(this, "endEditing$", new Ut());
|
|
1581
1879
|
S(this, "_currentEditRectInfo");
|
|
1582
1880
|
this._editorService = e, this._contextService = t, this._renderManagerService = i;
|
|
1583
1881
|
}
|
|
@@ -1592,7 +1890,7 @@ let Fe = class extends Ue {
|
|
|
1592
1890
|
* @editorInfo editorInfo
|
|
1593
1891
|
*/
|
|
1594
1892
|
setEditorRect(e) {
|
|
1595
|
-
this._currentEditRectInfo = e, this._editorService.getFocusEditor() || (this._editorService.focus(
|
|
1893
|
+
this._currentEditRectInfo = e, this._editorService.getFocusEditor() || (this._editorService.focus(ue), this._contextService.setContextValue(xe, !1), this._contextService.setContextValue(Rt, !1), this._contextService.setContextValue(Ot, !1));
|
|
1596
1894
|
const t = this.getEditRectState();
|
|
1597
1895
|
this._currentEditRectState = t, this._currentEditRectState$.next(t);
|
|
1598
1896
|
}
|
|
@@ -1606,23 +1904,23 @@ let Fe = class extends Ue {
|
|
|
1606
1904
|
* && this@setEditorRect
|
|
1607
1905
|
*/
|
|
1608
1906
|
getEditRectState() {
|
|
1609
|
-
const e =
|
|
1907
|
+
const e = ue, t = this._currentEditRectInfo, i = t.unitId, r = t.richTextObj.documentData;
|
|
1610
1908
|
r.id = e, r.documentStyle = {
|
|
1611
1909
|
...r.documentStyle,
|
|
1612
1910
|
pageSize: { width: t.richTextObj.width, height: 1 / 0 }
|
|
1613
1911
|
};
|
|
1614
1912
|
const o = {
|
|
1615
|
-
documentModel: new
|
|
1913
|
+
documentModel: new vi(r),
|
|
1616
1914
|
fontString: "document",
|
|
1617
1915
|
textRotation: { a: 0, v: 0 },
|
|
1618
1916
|
wrapStrategy: 0,
|
|
1619
1917
|
verticalAlign: Re.TOP,
|
|
1620
|
-
horizontalAlign:
|
|
1918
|
+
horizontalAlign: wt.LEFT,
|
|
1621
1919
|
paddingData: { t: 0, b: 1, l: 2, r: 2 }
|
|
1622
|
-
},
|
|
1920
|
+
}, c = t.richTextObj.width, a = t.richTextObj.height, h = t.richTextObj.left, l = t.richTextObj.top, d = {
|
|
1623
1921
|
left: 0,
|
|
1624
1922
|
top: 0
|
|
1625
|
-
}, v = this._renderManagerService.getRenderById(i), m = v == null ? void 0 : v.scene, p = m == null ? void 0 : m.getViewport(
|
|
1923
|
+
}, v = this._renderManagerService.getRenderById(i), m = v == null ? void 0 : v.scene, p = m == null ? void 0 : m.getViewport(ne.VIEW), f = m == null ? void 0 : m.getObject(ne.COMPONENT), g = {
|
|
1626
1924
|
x: (f == null ? void 0 : f.left) || 0,
|
|
1627
1925
|
y: (f == null ? void 0 : f.top) || 0
|
|
1628
1926
|
}, _ = (p == null ? void 0 : p.viewportScrollX) || 0, I = (p == null ? void 0 : p.viewportScrollY) || 0;
|
|
@@ -1630,8 +1928,8 @@ let Fe = class extends Ue {
|
|
|
1630
1928
|
position: {
|
|
1631
1929
|
startX: h,
|
|
1632
1930
|
startY: l,
|
|
1633
|
-
endX: h +
|
|
1634
|
-
endY: l +
|
|
1931
|
+
endX: h + c,
|
|
1932
|
+
endY: l + a
|
|
1635
1933
|
},
|
|
1636
1934
|
scaleX: 1,
|
|
1637
1935
|
scaleY: 1,
|
|
@@ -1696,19 +1994,19 @@ let Fe = class extends Ue {
|
|
|
1696
1994
|
};
|
|
1697
1995
|
}
|
|
1698
1996
|
};
|
|
1699
|
-
|
|
1700
|
-
Ve(0,
|
|
1701
|
-
Ve(1,
|
|
1702
|
-
Ve(2,
|
|
1703
|
-
],
|
|
1704
|
-
var G = /* @__PURE__ */ ((n) => (n[n.InitialState = 0] = "InitialState", n[n.StartEditor = 1] = "StartEditor", n[n.CursorChange = 2] = "CursorChange", n))(G || {}),
|
|
1705
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1997
|
+
He = Bn([
|
|
1998
|
+
Ve(0, Ze),
|
|
1999
|
+
Ve(1, pe),
|
|
2000
|
+
Ve(2, K)
|
|
2001
|
+
], He);
|
|
2002
|
+
var G = /* @__PURE__ */ ((n) => (n[n.InitialState = 0] = "InitialState", n[n.StartEditor = 1] = "StartEditor", n[n.CursorChange = 2] = "CursorChange", n))(G || {}), Hn = Object.getOwnPropertyDescriptor, Fn = (n, e, t, i) => {
|
|
2003
|
+
for (var r = i > 1 ? void 0 : i ? Hn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
1706
2004
|
(o = n[s]) && (r = o(r) || r);
|
|
1707
2005
|
return r;
|
|
1708
|
-
},
|
|
1709
|
-
const
|
|
1710
|
-
let
|
|
1711
|
-
constructor(e, t, i, r, s, o,
|
|
2006
|
+
}, j = (n, e) => (t, i) => e(t, i, n);
|
|
2007
|
+
const mt = -1e3, _t = 5, Wn = 2;
|
|
2008
|
+
let Fe = class extends De {
|
|
2009
|
+
constructor(e, t, i, r, s, o, c, a, h, l, d, v) {
|
|
1712
2010
|
super();
|
|
1713
2011
|
/**
|
|
1714
2012
|
* It is used to distinguish whether the user has actively moved the cursor in the editor, mainly through mouse clicks.
|
|
@@ -1717,11 +2015,11 @@ let We = class extends Ue {
|
|
|
1717
2015
|
/** If the corresponding unit is active and prepared for editing. */
|
|
1718
2016
|
S(this, "_isUnitEditing", !1);
|
|
1719
2017
|
S(this, "_d");
|
|
1720
|
-
this._renderContext = e, this._layoutService = t, this._undoRedoService = i, this._contextService = r, this._instanceSrv = s, this._renderManagerService = o, this._editorBridgeService =
|
|
2018
|
+
this._renderContext = e, this._layoutService = t, this._undoRedoService = i, this._contextService = r, this._instanceSrv = s, this._renderManagerService = o, this._editorBridgeService = c, this._cellEditorManagerService = a, this._textSelectionManagerService = h, this._commandService = l, this._localService = d, this._editorService = v, this.disposeWithMe(this._instanceSrv.getCurrentTypeOfUnit$(E.UNIVER_SLIDE).subscribe((m) => {
|
|
1721
2019
|
m && m.getUnitId() === this._renderContext.unitId ? this._d = this._init() : (this._disposeCurrent(), this._isUnitEditing && (this._handleEditorInvisible({
|
|
1722
2020
|
visible: !1,
|
|
1723
|
-
eventType:
|
|
1724
|
-
keycode:
|
|
2021
|
+
eventType: Y.Keyboard,
|
|
2022
|
+
keycode: P.ESC,
|
|
1725
2023
|
unitId: this._renderContext.unitId
|
|
1726
2024
|
}), this._isUnitEditing = !1));
|
|
1727
2025
|
})), this._initEditorVisibilityListener();
|
|
@@ -1734,7 +2032,7 @@ let We = class extends Ue {
|
|
|
1734
2032
|
(e = this._d) == null || e.dispose(), this._d = null;
|
|
1735
2033
|
}
|
|
1736
2034
|
_init() {
|
|
1737
|
-
const e = new
|
|
2035
|
+
const e = new Ke();
|
|
1738
2036
|
return this._subscribeToCurrentCell(e), this._initialKeyboardListener(e), this._initialCursorSync(e), this._listenEditorFocus(e), this._commandExecutedListener(e), setTimeout(() => {
|
|
1739
2037
|
this._cursorStateListener(e);
|
|
1740
2038
|
}, 1e3), e;
|
|
@@ -1751,16 +2049,16 @@ let We = class extends Ue {
|
|
|
1751
2049
|
}
|
|
1752
2050
|
_getEditorSkeleton(e) {
|
|
1753
2051
|
var t;
|
|
1754
|
-
return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(
|
|
2052
|
+
return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(gt).getSkeleton();
|
|
1755
2053
|
}
|
|
1756
2054
|
_getEditorViewModel(e) {
|
|
1757
2055
|
var t;
|
|
1758
|
-
return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(
|
|
2056
|
+
return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(gt).getViewModel();
|
|
1759
2057
|
}
|
|
1760
2058
|
_initialCursorSync(e) {
|
|
1761
|
-
e.add(this._cellEditorManagerService.focus$.pipe(
|
|
2059
|
+
e.add(this._cellEditorManagerService.focus$.pipe(Ki((t) => !!t)).subscribe(() => {
|
|
1762
2060
|
var t;
|
|
1763
|
-
(t =
|
|
2061
|
+
(t = Le(E.UNIVER_DOC, this._instanceSrv, this._renderManagerService)) == null || t.with(dt).sync();
|
|
1764
2062
|
}));
|
|
1765
2063
|
}
|
|
1766
2064
|
/**
|
|
@@ -1770,18 +2068,18 @@ let We = class extends Ue {
|
|
|
1770
2068
|
_subscribeToCurrentCell(e) {
|
|
1771
2069
|
e.add(this._editorBridgeService.currentEditRectState$.subscribe((t) => {
|
|
1772
2070
|
var d;
|
|
1773
|
-
if (t == null || this._contextService.getContextValue(Rt) || this._contextService.getContextValue(
|
|
2071
|
+
if (t == null || this._contextService.getContextValue(Rt) || this._contextService.getContextValue(Ot))
|
|
1774
2072
|
return;
|
|
1775
2073
|
const {
|
|
1776
2074
|
position: { startX: i, endX: r },
|
|
1777
|
-
documentLayoutObject: { textRotation: s, wrapStrategy: o, documentModel:
|
|
1778
|
-
scaleX:
|
|
2075
|
+
documentLayoutObject: { textRotation: s, wrapStrategy: o, documentModel: c },
|
|
2076
|
+
scaleX: a,
|
|
1779
2077
|
editorUnitId: h
|
|
1780
|
-
} = t, { vertexAngle: l } =
|
|
1781
|
-
|
|
2078
|
+
} = t, { vertexAngle: l } = rt(s);
|
|
2079
|
+
c.updateDocumentId(h), o === tt.WRAP && l === 0 && c.updateDocumentDataPageSize((r - i) / a), this._instanceSrv.changeDoc(h, c), this._contextService.setContextValue(pi, !0), this._textSelectionManagerService.replaceTextRanges([{
|
|
1782
2080
|
startOffset: 0,
|
|
1783
2081
|
endOffset: 0
|
|
1784
|
-
}]), (d =
|
|
2082
|
+
}]), (d = Le(E.UNIVER_DOC, this._instanceSrv, this._renderManagerService)) == null || d.with(dt).activate(mt, mt);
|
|
1785
2083
|
}));
|
|
1786
2084
|
}
|
|
1787
2085
|
/**
|
|
@@ -1794,7 +2092,7 @@ let We = class extends Ue {
|
|
|
1794
2092
|
* @param scaleY
|
|
1795
2093
|
*/
|
|
1796
2094
|
_fitTextSize(e, t, i, r, s = 1, o = 1) {
|
|
1797
|
-
const { startX:
|
|
2095
|
+
const { startX: c, startY: a, endX: h, endY: l } = e, d = r.documentModel;
|
|
1798
2096
|
if (d == null)
|
|
1799
2097
|
return;
|
|
1800
2098
|
const { actualWidth: v, actualHeight: m } = this._predictingSize(
|
|
@@ -1805,7 +2103,7 @@ let We = class extends Ue {
|
|
|
1805
2103
|
s,
|
|
1806
2104
|
o
|
|
1807
2105
|
), { verticalAlign: p, paddingData: f, fill: g } = r;
|
|
1808
|
-
let _ = h -
|
|
2106
|
+
let _ = h - c, I = l - a;
|
|
1809
2107
|
if (_ < v && (_ = v), I < m)
|
|
1810
2108
|
I = m, d.updateDocumentDataMargin(f);
|
|
1811
2109
|
else {
|
|
@@ -1821,19 +2119,19 @@ let We = class extends Ue {
|
|
|
1821
2119
|
* to determine whether it needs to be automatically widened.
|
|
1822
2120
|
*/
|
|
1823
2121
|
_predictingSize(e, t, i, r, s = 1, o = 1) {
|
|
1824
|
-
const { startX:
|
|
1825
|
-
if (l ===
|
|
2122
|
+
const { startX: c, endX: a } = e, { textRotation: h, wrapStrategy: l } = r, d = r.documentModel, { vertexAngle: v } = rt(h), m = document.body.clientWidth;
|
|
2123
|
+
if (l === tt.WRAP && v === 0) {
|
|
1826
2124
|
const { actualWidth: g, actualHeight: _ } = i.getActualSize();
|
|
1827
2125
|
return {
|
|
1828
2126
|
actualWidth: g * s,
|
|
1829
2127
|
actualHeight: _ * o
|
|
1830
2128
|
};
|
|
1831
2129
|
}
|
|
1832
|
-
d == null || d.updateDocumentDataPageSize((m -
|
|
2130
|
+
d == null || d.updateDocumentDataPageSize((m - c - t.left) / s), i.calculate();
|
|
1833
2131
|
const p = i.getActualSize();
|
|
1834
|
-
let f =
|
|
1835
|
-
return f < p.actualWidth * s +
|
|
1836
|
-
horizontalAlign:
|
|
2132
|
+
let f = a - c;
|
|
2133
|
+
return f < p.actualWidth * s + _t * s && (f = p.actualWidth * s + _t * s), d == null || d.updateDocumentDataPageSize(f / s), d == null || d.updateDocumentRenderConfig({
|
|
2134
|
+
horizontalAlign: wt.UNSPECIFIED,
|
|
1837
2135
|
cellValueType: void 0
|
|
1838
2136
|
}), {
|
|
1839
2137
|
actualWidth: f,
|
|
@@ -1844,10 +2142,10 @@ let We = class extends Ue {
|
|
|
1844
2142
|
* control the size of editing area
|
|
1845
2143
|
*/
|
|
1846
2144
|
// eslint-disable-next-line max-lines-per-function
|
|
1847
|
-
_editAreaProcessing(e, t, i, r, s, o = 1,
|
|
2145
|
+
_editAreaProcessing(e, t, i, r, s, o = 1, c = 1) {
|
|
1848
2146
|
var C;
|
|
1849
|
-
const
|
|
1850
|
-
if (
|
|
2147
|
+
const a = this._getEditorObject();
|
|
2148
|
+
if (a == null)
|
|
1851
2149
|
return;
|
|
1852
2150
|
function h(ce) {
|
|
1853
2151
|
return Number.parseInt(ce.replace("px", ""));
|
|
@@ -1855,27 +2153,27 @@ let We = class extends Ue {
|
|
|
1855
2153
|
const d = this._renderContext.engine.getCanvasElement(), v = d.getBoundingClientRect(), m = h(d.style.width), { top: p, left: f, width: g } = v, _ = g / m;
|
|
1856
2154
|
let { startX: I, startY: b } = i;
|
|
1857
2155
|
I += r.left, b += r.top;
|
|
1858
|
-
const { document: T, scene: M, engine:
|
|
1859
|
-
let
|
|
1860
|
-
|
|
1861
|
-
const { scaleX:
|
|
2156
|
+
const { document: T, scene: M, engine: U } = a, R = M.getViewport(ut.VIEW_MAIN), W = document.body.clientHeight - b - r.top - Wn * 2, oe = document.body.clientWidth - I - r.left;
|
|
2157
|
+
let A = t, L = R == null ? void 0 : R.getScrollBar();
|
|
2158
|
+
A > W ? (A = W, L == null ? R && new Pt(R, { enableHorizontal: !1, barSize: 8 }) : R == null || R.resetCanvasSizeAndUpdateScroll()) : (L = null, (C = R == null ? void 0 : R.getScrollBar()) == null || C.dispose()), e += (L == null ? void 0 : L.barSize) || 0, e = Math.min(e, oe), I -= ie, b -= ie, this._addBackground(M, e / o, t / c, s);
|
|
2159
|
+
const { scaleX: Q, scaleY: ee } = M.getPrecisionScale();
|
|
1862
2160
|
M.transformByState({
|
|
1863
2161
|
width: e * _ / o,
|
|
1864
|
-
height: t * _ /
|
|
2162
|
+
height: t * _ / c,
|
|
1865
2163
|
scaleX: o * _,
|
|
1866
|
-
scaleY:
|
|
1867
|
-
}), T.resize(e / o, t /
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
2164
|
+
scaleY: c * _
|
|
2165
|
+
}), T.resize(e / o, t / c), setTimeout(() => {
|
|
2166
|
+
U.resizeBySize(
|
|
2167
|
+
st(e, Q),
|
|
2168
|
+
st(A, ee)
|
|
1871
2169
|
);
|
|
1872
2170
|
}, 0);
|
|
1873
|
-
const
|
|
1874
|
-
I = I * _ + (
|
|
2171
|
+
const me = this._layoutService.getContentElement().getBoundingClientRect(), _e = d.getBoundingClientRect();
|
|
2172
|
+
I = I * _ + (_e.left - me.left), b = b * _ + (_e.top - me.top), this._cellEditorManagerService.setState({
|
|
1875
2173
|
startX: I,
|
|
1876
2174
|
startY: b,
|
|
1877
2175
|
endX: e * _ + I,
|
|
1878
|
-
endY:
|
|
2176
|
+
endY: A * _ + b,
|
|
1879
2177
|
show: !0
|
|
1880
2178
|
});
|
|
1881
2179
|
}
|
|
@@ -1886,14 +2184,14 @@ let We = class extends Ue {
|
|
|
1886
2184
|
const s = "_backgroundRectHelperColor_", o = e.getObject(s);
|
|
1887
2185
|
o == null && r == null || (o == null ? e.addObjects(
|
|
1888
2186
|
[
|
|
1889
|
-
new
|
|
2187
|
+
new yt(s, {
|
|
1890
2188
|
width: t,
|
|
1891
2189
|
height: i,
|
|
1892
2190
|
fill: r,
|
|
1893
2191
|
evented: !1
|
|
1894
2192
|
})
|
|
1895
2193
|
],
|
|
1896
|
-
|
|
2194
|
+
Fi
|
|
1897
2195
|
) : r == null ? o.dispose() : (o.setProps({
|
|
1898
2196
|
fill: r
|
|
1899
2197
|
}), o.transformByState({
|
|
@@ -1912,7 +2210,7 @@ let We = class extends Ue {
|
|
|
1912
2210
|
_handleEditorVisible(e) {
|
|
1913
2211
|
var g, _;
|
|
1914
2212
|
const { eventType: t } = e;
|
|
1915
|
-
this._cursorChange = [
|
|
2213
|
+
this._cursorChange = [Y.PointerDown, Y.Dblclick].includes(t) ? G.CursorChange : G.StartEditor;
|
|
1916
2214
|
const i = this._editorBridgeService.getEditRectState();
|
|
1917
2215
|
if (i == null)
|
|
1918
2216
|
return;
|
|
@@ -1920,21 +2218,21 @@ let We = class extends Ue {
|
|
|
1920
2218
|
position: r,
|
|
1921
2219
|
documentLayoutObject: s,
|
|
1922
2220
|
slideCardOffset: o,
|
|
1923
|
-
scaleX:
|
|
1924
|
-
scaleY:
|
|
2221
|
+
scaleX: c,
|
|
2222
|
+
scaleY: a,
|
|
1925
2223
|
editorUnitId: h,
|
|
1926
2224
|
unitId: l
|
|
1927
2225
|
} = i, d = this._getEditorObject();
|
|
1928
2226
|
if (d == null)
|
|
1929
2227
|
return;
|
|
1930
2228
|
const { scene: v } = d;
|
|
1931
|
-
this._contextService.setContextValue(
|
|
2229
|
+
this._contextService.setContextValue(xe, !0);
|
|
1932
2230
|
const { documentModel: m } = s, p = this._getEditorSkeleton(h);
|
|
1933
2231
|
if (!p || !m)
|
|
1934
2232
|
return;
|
|
1935
|
-
this._fitTextSize(r, o, p, s,
|
|
2233
|
+
this._fitTextSize(r, o, p, s, c, a);
|
|
1936
2234
|
const f = m.getBody().dataStream.length - 2 || 0;
|
|
1937
|
-
(g = v.getViewport(
|
|
2235
|
+
(g = v.getViewport(ut.VIEW_MAIN)) == null || g.scrollToViewportPos({
|
|
1938
2236
|
viewportScrollX: Number.POSITIVE_INFINITY
|
|
1939
2237
|
}), this._textSelectionManagerService.replaceTextRanges([
|
|
1940
2238
|
{
|
|
@@ -1944,7 +2242,7 @@ let We = class extends Ue {
|
|
|
1944
2242
|
]), (_ = this._renderManagerService.getRenderById(l)) == null || _.scene.resetCursor();
|
|
1945
2243
|
}
|
|
1946
2244
|
_resetBodyStyle(e, t = !1) {
|
|
1947
|
-
e.dataStream =
|
|
2245
|
+
e.dataStream = mi, e.textRuns != null && (e.textRuns.length === 1 && !t ? (e.textRuns[0].st = 0, e.textRuns[0].ed = 1) : e.textRuns = void 0), e.paragraphs != null && (e.paragraphs.length === 1 ? e.paragraphs[0].startIndex = 0 : e.paragraphs = [
|
|
1948
2246
|
{
|
|
1949
2247
|
startIndex: 0
|
|
1950
2248
|
}
|
|
@@ -1959,9 +2257,9 @@ let We = class extends Ue {
|
|
|
1959
2257
|
_showEditorByKeyboard(e) {
|
|
1960
2258
|
}
|
|
1961
2259
|
_commandExecutedListener(e) {
|
|
1962
|
-
const t = [
|
|
2260
|
+
const t = [Oe.id], i = [Gi.id];
|
|
1963
2261
|
e.add(this._commandService.onCommandExecuted((r) => {
|
|
1964
|
-
this._editorService.getFocusId() ===
|
|
2262
|
+
this._editorService.getFocusId() === ue && (t.includes(r.id) && this._moveCursorCmdHandler(r), i.includes(r.id) && this._editorBridgeService.isVisible() && this._editingChangedHandler());
|
|
1965
2263
|
}));
|
|
1966
2264
|
}
|
|
1967
2265
|
_moveCursorCmdHandler(e) {
|
|
@@ -1978,7 +2276,7 @@ let We = class extends Ue {
|
|
|
1978
2276
|
this._handleEditorVisible({ visible: !0, eventType: 3, unitId: i });
|
|
1979
2277
|
}
|
|
1980
2278
|
_getEditorObject() {
|
|
1981
|
-
return
|
|
2279
|
+
return kn(this._editorBridgeService.getCurrentEditorId(), this._renderManagerService);
|
|
1982
2280
|
}
|
|
1983
2281
|
async _handleEditorInvisible(e) {
|
|
1984
2282
|
const { keycode: t } = e;
|
|
@@ -1991,7 +2289,7 @@ let We = class extends Ue {
|
|
|
1991
2289
|
this._moveCursor(t);
|
|
1992
2290
|
}
|
|
1993
2291
|
_exitInput(e) {
|
|
1994
|
-
this._contextService.setContextValue(
|
|
2292
|
+
this._contextService.setContextValue(xe, !1), this._cellEditorManagerService.setState({
|
|
1995
2293
|
show: e.visible
|
|
1996
2294
|
});
|
|
1997
2295
|
const t = this._editorBridgeService.getCurrentEditorId();
|
|
@@ -2000,22 +2298,22 @@ let We = class extends Ue {
|
|
|
2000
2298
|
_moveCursor(e) {
|
|
2001
2299
|
if (e != null)
|
|
2002
2300
|
switch (V.LEFT, e) {
|
|
2003
|
-
case
|
|
2301
|
+
case P.ENTER:
|
|
2004
2302
|
V.DOWN;
|
|
2005
2303
|
break;
|
|
2006
|
-
case
|
|
2304
|
+
case P.TAB:
|
|
2007
2305
|
V.RIGHT;
|
|
2008
2306
|
break;
|
|
2009
|
-
case
|
|
2307
|
+
case P.ARROW_DOWN:
|
|
2010
2308
|
V.DOWN;
|
|
2011
2309
|
break;
|
|
2012
|
-
case
|
|
2310
|
+
case P.ARROW_UP:
|
|
2013
2311
|
V.UP;
|
|
2014
2312
|
break;
|
|
2015
|
-
case
|
|
2313
|
+
case P.ARROW_LEFT:
|
|
2016
2314
|
V.LEFT;
|
|
2017
2315
|
break;
|
|
2018
|
-
case
|
|
2316
|
+
case P.ARROW_RIGHT:
|
|
2019
2317
|
V.RIGHT;
|
|
2020
2318
|
break;
|
|
2021
2319
|
}
|
|
@@ -2029,53 +2327,53 @@ let We = class extends Ue {
|
|
|
2029
2327
|
if (!t)
|
|
2030
2328
|
return;
|
|
2031
2329
|
const { document: i } = t;
|
|
2032
|
-
e.add(
|
|
2330
|
+
e.add(xt(i.onPointerDown$.subscribeEvent(() => {
|
|
2033
2331
|
this._cursorChange === G.StartEditor && (this._cursorChange = G.CursorChange);
|
|
2034
2332
|
})));
|
|
2035
2333
|
}
|
|
2036
2334
|
// TODO: @JOCS, is it necessary to move these commands MoveSelectionOperation\MoveCursorOperation to shortcut? and use multi-commands?
|
|
2037
2335
|
_moveInEditor(e, t) {
|
|
2038
2336
|
let i = V.LEFT;
|
|
2039
|
-
e ===
|
|
2337
|
+
e === P.ARROW_DOWN ? i = V.DOWN : e === P.ARROW_UP ? i = V.UP : e === P.ARROW_RIGHT && (i = V.RIGHT), t ? this._commandService.executeCommand(Wi.id, {
|
|
2040
2338
|
direction: i
|
|
2041
|
-
}) : this._commandService.executeCommand(
|
|
2339
|
+
}) : this._commandService.executeCommand(ki.id, {
|
|
2042
2340
|
direction: i
|
|
2043
2341
|
});
|
|
2044
2342
|
}
|
|
2045
2343
|
};
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
],
|
|
2059
|
-
function
|
|
2344
|
+
Fe = Fn([
|
|
2345
|
+
j(1, ji),
|
|
2346
|
+
j(2, fi),
|
|
2347
|
+
j(3, pe),
|
|
2348
|
+
j(4, w),
|
|
2349
|
+
j(5, K),
|
|
2350
|
+
j(6, et),
|
|
2351
|
+
j(7, Qe),
|
|
2352
|
+
j(8, z(Zi)),
|
|
2353
|
+
j(9, D),
|
|
2354
|
+
j(10, z(J)),
|
|
2355
|
+
j(11, Ze)
|
|
2356
|
+
], Fe);
|
|
2357
|
+
function kn(n, e) {
|
|
2060
2358
|
if (n == null)
|
|
2061
2359
|
return;
|
|
2062
2360
|
const t = e.getRenderById(n);
|
|
2063
2361
|
if (t == null)
|
|
2064
2362
|
return;
|
|
2065
|
-
const { mainComponent: i, scene: r, engine: s, components: o } = t,
|
|
2363
|
+
const { mainComponent: i, scene: r, engine: s, components: o } = t, c = i, a = o.get(zi.BACKGROUND);
|
|
2066
2364
|
return {
|
|
2067
|
-
document:
|
|
2068
|
-
docBackground:
|
|
2365
|
+
document: c,
|
|
2366
|
+
docBackground: a,
|
|
2069
2367
|
scene: r,
|
|
2070
2368
|
engine: s
|
|
2071
2369
|
};
|
|
2072
2370
|
}
|
|
2073
|
-
var
|
|
2074
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
2371
|
+
var zn = Object.getOwnPropertyDescriptor, Kn = (n, e, t, i) => {
|
|
2372
|
+
for (var r = i > 1 ? void 0 : i ? zn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
2075
2373
|
(o = n[s]) && (r = o(r) || r);
|
|
2076
2374
|
return r;
|
|
2077
|
-
},
|
|
2078
|
-
let
|
|
2375
|
+
}, je = (n, e) => (t, i) => e(t, i, n);
|
|
2376
|
+
let We = class extends fe {
|
|
2079
2377
|
constructor(e, t, i, r) {
|
|
2080
2378
|
super();
|
|
2081
2379
|
/**
|
|
@@ -2084,7 +2382,7 @@ let ke = class extends pe {
|
|
|
2084
2382
|
// private _cursorChange: CursorChange = CursorChange.InitialState;
|
|
2085
2383
|
/** If the corresponding unit is active and prepared for editing. */
|
|
2086
2384
|
// private _isUnitEditing = false;
|
|
2087
|
-
S(this, "setSlideTextEditor$", new
|
|
2385
|
+
S(this, "setSlideTextEditor$", new Ut());
|
|
2088
2386
|
S(this, "_curRichText", null);
|
|
2089
2387
|
S(this, "_d");
|
|
2090
2388
|
this._renderContext = e, this._instanceSrv = t, this._commandService = i, this._editorBridgeService = r, this.disposeWithMe(this._instanceSrv.getCurrentTypeOfUnit$(E.UNIVER_SLIDE).subscribe((s) => {
|
|
@@ -2092,7 +2390,7 @@ let ke = class extends pe {
|
|
|
2092
2390
|
}));
|
|
2093
2391
|
}
|
|
2094
2392
|
_init() {
|
|
2095
|
-
const e = new
|
|
2393
|
+
const e = new Ke();
|
|
2096
2394
|
return this._initEventListener(e), e;
|
|
2097
2395
|
}
|
|
2098
2396
|
_disposeCurrent() {
|
|
@@ -2112,16 +2410,16 @@ let ke = class extends pe {
|
|
|
2112
2410
|
}
|
|
2113
2411
|
_initEventListener(e) {
|
|
2114
2412
|
const t = (o) => {
|
|
2115
|
-
const
|
|
2116
|
-
|
|
2413
|
+
const c = o.getTransformer();
|
|
2414
|
+
c && (e.add(c.clearControl$.subscribe(() => {
|
|
2117
2415
|
this.setEditorVisible(!1), this.pickOtherObjects();
|
|
2118
|
-
})), e.add(
|
|
2416
|
+
})), e.add(c.createControl$.subscribe(() => {
|
|
2119
2417
|
this.setEditorVisible(!1);
|
|
2120
2418
|
})), e.add(o.onDblclick$.subscribeEvent(() => {
|
|
2121
|
-
|
|
2122
|
-
const h =
|
|
2123
|
-
h && (h.objectType !==
|
|
2124
|
-
})), e.add(this._instanceSrv.focused$.subscribe((
|
|
2419
|
+
c.clearControls();
|
|
2420
|
+
const h = c.getSelectedObjectMap().values().next().value;
|
|
2421
|
+
h && (h.objectType !== de.RICH_TEXT ? this.pickOtherObjects() : this.startEditing(o.sceneKey, h));
|
|
2422
|
+
})), e.add(this._instanceSrv.focused$.subscribe((a) => {
|
|
2125
2423
|
this.endEditing();
|
|
2126
2424
|
})));
|
|
2127
2425
|
}, { mainComponent: i } = this._renderContext;
|
|
@@ -2130,8 +2428,8 @@ let ke = class extends pe {
|
|
|
2130
2428
|
});
|
|
2131
2429
|
const s = Array.from(i.getSubScenes().values());
|
|
2132
2430
|
for (let o = 0; o < s.length; o++) {
|
|
2133
|
-
const
|
|
2134
|
-
t(
|
|
2431
|
+
const c = s[o];
|
|
2432
|
+
t(c);
|
|
2135
2433
|
}
|
|
2136
2434
|
}
|
|
2137
2435
|
pickOtherObjects() {
|
|
@@ -2155,10 +2453,10 @@ let ke = class extends pe {
|
|
|
2155
2453
|
text: e.text
|
|
2156
2454
|
}, r = (s = e.documentData.body) == null ? void 0 : s.textRuns;
|
|
2157
2455
|
if (r && r.length) {
|
|
2158
|
-
const
|
|
2159
|
-
i.cl =
|
|
2456
|
+
const c = r[0].ts;
|
|
2457
|
+
i.cl = c == null ? void 0 : c.cl;
|
|
2160
2458
|
}
|
|
2161
|
-
this._commandService.executeCommand(
|
|
2459
|
+
this._commandService.executeCommand(B.id, {
|
|
2162
2460
|
unitId: this._renderContext.unitId,
|
|
2163
2461
|
oKey: e == null ? void 0 : e.oKey,
|
|
2164
2462
|
props: {
|
|
@@ -2180,20 +2478,20 @@ let ke = class extends pe {
|
|
|
2180
2478
|
var i, r;
|
|
2181
2479
|
e ? (i = this._curRichText) == null || i.hide() : (r = this._curRichText) == null || r.show();
|
|
2182
2480
|
const { unitId: t } = this._renderContext;
|
|
2183
|
-
this._editorBridgeService.changeVisible({ visible: e, eventType:
|
|
2481
|
+
this._editorBridgeService.changeVisible({ visible: e, eventType: Y.PointerDown, unitId: t });
|
|
2184
2482
|
}
|
|
2185
2483
|
};
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
],
|
|
2191
|
-
var
|
|
2192
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
2484
|
+
We = Kn([
|
|
2485
|
+
je(1, w),
|
|
2486
|
+
je(2, D),
|
|
2487
|
+
je(3, et)
|
|
2488
|
+
], We);
|
|
2489
|
+
var Zn = Object.getOwnPropertyDescriptor, Gn = (n, e, t, i) => {
|
|
2490
|
+
for (var r = i > 1 ? void 0 : i ? Zn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
2193
2491
|
(o = n[s]) && (r = o(r) || r);
|
|
2194
2492
|
return r;
|
|
2195
|
-
},
|
|
2196
|
-
let
|
|
2493
|
+
}, Ae = (n, e) => (t, i) => e(t, i, n);
|
|
2494
|
+
let Me = class extends fe {
|
|
2197
2495
|
// private _skeletonChangeMutations = new Set<string>();
|
|
2198
2496
|
constructor(n, e, t) {
|
|
2199
2497
|
super(), this._contextService = n, this._instanceSrv = e, this._renderManagerService = t, Promise.resolve().then(() => this._init());
|
|
@@ -2202,11 +2500,11 @@ let Ne = class extends pe {
|
|
|
2202
2500
|
this._initSlideDataListener(), this._initContextListener();
|
|
2203
2501
|
}
|
|
2204
2502
|
_initSlideDataListener() {
|
|
2205
|
-
this._instanceSrv.getTypeOfUnitAdded$(E.UNIVER_SLIDE).pipe(
|
|
2503
|
+
this._instanceSrv.getTypeOfUnitAdded$(E.UNIVER_SLIDE).pipe(ht(this.dispose$)).subscribe((n) => {
|
|
2206
2504
|
this._createRenderer(n == null ? void 0 : n.getUnitId());
|
|
2207
2505
|
}), this._instanceSrv.getAllUnitsForType(E.UNIVER_SLIDE).forEach((n) => {
|
|
2208
2506
|
this._createRenderer(n.getUnitId());
|
|
2209
|
-
}), this._instanceSrv.getTypeOfUnitDisposed$(E.UNIVER_SLIDE).pipe(
|
|
2507
|
+
}), this._instanceSrv.getTypeOfUnitDisposed$(E.UNIVER_SLIDE).pipe(ht(this.dispose$)).subscribe((n) => this._disposeRenderer(n));
|
|
2210
2508
|
}
|
|
2211
2509
|
_createRenderer(n) {
|
|
2212
2510
|
n == null || this._instanceSrv.getUnit(n, E.UNIVER_SLIDE) == null || this._renderManagerService.createRender(n);
|
|
@@ -2218,45 +2516,45 @@ let Ne = class extends pe {
|
|
|
2218
2516
|
_initContextListener() {
|
|
2219
2517
|
}
|
|
2220
2518
|
};
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
],
|
|
2226
|
-
var
|
|
2227
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
2519
|
+
Me = Gn([
|
|
2520
|
+
Ae(0, pe),
|
|
2521
|
+
Ae(1, w),
|
|
2522
|
+
Ae(2, K)
|
|
2523
|
+
], Me);
|
|
2524
|
+
var Xn = Object.getOwnPropertyDescriptor, Yn = (n, e, t, i) => {
|
|
2525
|
+
for (var r = i > 1 ? void 0 : i ? Xn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
2228
2526
|
(o = n[s]) && (r = o(r) || r);
|
|
2229
2527
|
return r;
|
|
2230
|
-
},
|
|
2231
|
-
const
|
|
2232
|
-
var
|
|
2233
|
-
let
|
|
2234
|
-
constructor(n =
|
|
2528
|
+
}, Ie = (n, e) => (t, i) => e(t, i, n);
|
|
2529
|
+
const qn = "SLIDE_UI";
|
|
2530
|
+
var be;
|
|
2531
|
+
let Ct = (be = class extends _i {
|
|
2532
|
+
constructor(n = ft, e, t, i, r) {
|
|
2235
2533
|
super(), this._config = n, this._injector = e, this._renderManagerService = t, this._univerInstanceService = i, this._configService = r;
|
|
2236
|
-
const { menu: s, ...o } =
|
|
2534
|
+
const { menu: s, ...o } = St(
|
|
2237
2535
|
{},
|
|
2238
|
-
|
|
2536
|
+
ft,
|
|
2239
2537
|
this._config
|
|
2240
2538
|
);
|
|
2241
|
-
s && this._configService.setConfig("menu", s, { merge: !0 }), this._configService.setConfig(
|
|
2539
|
+
s && this._configService.setConfig("menu", s, { merge: !0 }), this._configService.setConfig(Dn, o);
|
|
2242
2540
|
}
|
|
2243
2541
|
onStarting() {
|
|
2244
|
-
|
|
2245
|
-
[
|
|
2246
|
-
[
|
|
2542
|
+
it([
|
|
2543
|
+
[Me],
|
|
2544
|
+
[et, { useClass: He }],
|
|
2247
2545
|
// used by SlideUIController --> EditorContainer
|
|
2248
|
-
[
|
|
2249
|
-
[
|
|
2546
|
+
[Qe, { useClass: On }],
|
|
2547
|
+
[ye]
|
|
2250
2548
|
], this._config.override).forEach((n) => this._injector.add(n));
|
|
2251
2549
|
}
|
|
2252
2550
|
onReady() {
|
|
2253
2551
|
[
|
|
2254
2552
|
// SlideRenderService will be init in ready stage, and then calling RenderManagerService@createRender --> init all deps in this rendering register block.
|
|
2255
|
-
[
|
|
2553
|
+
[ve]
|
|
2256
2554
|
].forEach((n) => {
|
|
2257
2555
|
this.disposeWithMe(this._renderManagerService.registerRenderModule(E.UNIVER_SLIDE, n));
|
|
2258
|
-
}),
|
|
2259
|
-
[
|
|
2556
|
+
}), it([
|
|
2557
|
+
[y],
|
|
2260
2558
|
// cannot register in _renderManagerService now.
|
|
2261
2559
|
// [ISlideEditorBridgeService, { useClass: SlideEditorBridgeService }],
|
|
2262
2560
|
// // used by SlideUIController --> EditorContainer
|
|
@@ -2265,24 +2563,24 @@ let St = (Ee = class extends Ci {
|
|
|
2265
2563
|
// SlidesUIController controller would add a new RenderUnit (__INTERNAL_EDITOR__DOCS_NORMAL)
|
|
2266
2564
|
[Pe],
|
|
2267
2565
|
// editor service was create in renderManagerService
|
|
2268
|
-
[
|
|
2269
|
-
[
|
|
2566
|
+
[ve],
|
|
2567
|
+
[Te]
|
|
2270
2568
|
], this._config.override).forEach((n) => {
|
|
2271
2569
|
this._injector.add(n);
|
|
2272
|
-
}), this._injector.get(
|
|
2570
|
+
}), this._injector.get(y), this._injector.get(Me);
|
|
2273
2571
|
}
|
|
2274
2572
|
onRendered() {
|
|
2275
2573
|
[
|
|
2276
2574
|
// need slideEditorBridgeService
|
|
2277
2575
|
// need TextSelectionRenderService which init by EditorContainer
|
|
2278
|
-
[
|
|
2279
|
-
[
|
|
2576
|
+
[We],
|
|
2577
|
+
[Fe]
|
|
2280
2578
|
].forEach((n) => {
|
|
2281
2579
|
this.disposeWithMe(this._renderManagerService.registerRenderModule(E.UNIVER_SLIDE, n));
|
|
2282
2580
|
}), this._markSlideAsFocused(), this._injector.get(Pe);
|
|
2283
2581
|
}
|
|
2284
2582
|
onSteady() {
|
|
2285
|
-
this._injector.get(
|
|
2583
|
+
this._injector.get(Te);
|
|
2286
2584
|
}
|
|
2287
2585
|
_markSlideAsFocused() {
|
|
2288
2586
|
const n = this._univerInstanceService;
|
|
@@ -2292,35 +2590,35 @@ let St = (Ee = class extends Ci {
|
|
|
2292
2590
|
} catch {
|
|
2293
2591
|
}
|
|
2294
2592
|
}
|
|
2295
|
-
}, S(
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
],
|
|
2593
|
+
}, S(be, "pluginName", qn), S(be, "type", E.UNIVER_SLIDE), be);
|
|
2594
|
+
Ct = Yn([
|
|
2595
|
+
Ie(1, z(ke)),
|
|
2596
|
+
Ie(2, K),
|
|
2597
|
+
Ie(3, w),
|
|
2598
|
+
Ie(4, Ci)
|
|
2599
|
+
], Ct);
|
|
2302
2600
|
export {
|
|
2303
2601
|
Vt as ActivateSlidePageOperation,
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2602
|
+
jt as AppendSlideOperation,
|
|
2603
|
+
y as CanvasView,
|
|
2604
|
+
At as DeleteSlideElementOperation,
|
|
2605
|
+
et as ISlideEditorBridgeService,
|
|
2308
2606
|
Ge as InsertSlideFloatImageCommand,
|
|
2309
|
-
|
|
2607
|
+
qe as InsertSlideShapeEllipseCommand,
|
|
2310
2608
|
Gt as InsertSlideShapeEllipseOperation,
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2609
|
+
Ye as InsertSlideShapeRectangleCommand,
|
|
2610
|
+
Zt as InsertSlideShapeRectangleOperation,
|
|
2611
|
+
Jt as SHAPE_MENU_ID,
|
|
2612
|
+
qt as SLIDES_IMAGE_MENU_ID,
|
|
2613
|
+
ue as SLIDE_EDITOR_ID,
|
|
2614
|
+
Yt as SetSlidePageThumbOperation,
|
|
2615
|
+
Je as SlideAddTextCommand,
|
|
2616
|
+
Xt as SlideAddTextOperation,
|
|
2617
|
+
ye as SlideCanvasPopMangerService,
|
|
2618
|
+
wn as SlideEditorContainer,
|
|
2619
|
+
mn as SlideSideBar,
|
|
2322
2620
|
Pe as SlidesUIController,
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2621
|
+
xn as SlidesUIMenuSchema,
|
|
2622
|
+
Ct as UniverSlidesUIPlugin,
|
|
2623
|
+
B as UpdateSlideElementOperation
|
|
2326
2624
|
};
|