@univerjs/slides-ui 0.10.11 → 0.10.12-nightly.202510251119
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 +982 -681
- package/lib/index.js +982 -681
- package/lib/umd/index.js +2 -2
- package/package.json +11 -11
- package/LICENSE +0 -176
package/lib/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,49 @@ 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 =
|
|
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;
|
|
800
1101
|
if (!i) return null;
|
|
801
1102
|
const s = (l = e.getRenderUnitByPageId(i, i).scene) == null ? void 0 : l.getTransformer();
|
|
802
1103
|
if (!s) return null;
|
|
803
|
-
const
|
|
804
|
-
if (!
|
|
1104
|
+
const c = s.getSelectedObjectMap().values().next().value;
|
|
1105
|
+
if (!c)
|
|
805
1106
|
return null;
|
|
806
|
-
const
|
|
1107
|
+
const a = ((d = n.getFocusedUnit()) == null ? void 0 : d.getUnitId()) || "";
|
|
807
1108
|
return /* @__PURE__ */ x("section", { className: "univer-p-2 univer-text-center univer-text-sm", children: [
|
|
808
|
-
/* @__PURE__ */ u(
|
|
809
|
-
/* @__PURE__ */ u(
|
|
810
|
-
|
|
1109
|
+
/* @__PURE__ */ u(gn, { pageId: i, unitId: a }),
|
|
1110
|
+
/* @__PURE__ */ u(fn, { pageId: i, unitId: a }),
|
|
1111
|
+
c.objectType === de.RECT && /* @__PURE__ */ u(vn, { pageId: i, unitId: a })
|
|
811
1112
|
] });
|
|
812
1113
|
}
|
|
813
|
-
const
|
|
1114
|
+
const Ye = {
|
|
814
1115
|
id: "slide.command.insert-float-shape.rectangle",
|
|
815
1116
|
type: N.COMMAND,
|
|
816
1117
|
handler: async (n) => {
|
|
817
1118
|
var r;
|
|
818
1119
|
const e = n.get(D), i = (r = n.get(w).getFocusedUnit()) == null ? void 0 : r.getUnitId();
|
|
819
|
-
return e.executeCommand(
|
|
1120
|
+
return e.executeCommand(Zt.id, { unitId: i });
|
|
820
1121
|
}
|
|
821
|
-
},
|
|
1122
|
+
}, Zt = {
|
|
822
1123
|
id: "slide.operation.insert-float-shape.rectangle",
|
|
823
1124
|
type: N.OPERATION,
|
|
824
1125
|
handler: async (n, e) => {
|
|
825
|
-
const t =
|
|
1126
|
+
const t = ze(6), i = n.get(w), r = e.unitId, s = i.getUnit(r);
|
|
826
1127
|
if (!s) return !1;
|
|
827
|
-
const o = s.getActivePage(),
|
|
1128
|
+
const o = s.getActivePage(), c = Object.values(o.pageElements), a = c != null && c.length ? Math.max(...c.map((v) => v.zIndex)) : 20, h = {
|
|
828
1129
|
id: t,
|
|
829
|
-
zIndex:
|
|
1130
|
+
zIndex: a + 1,
|
|
830
1131
|
left: 378,
|
|
831
1132
|
top: 142,
|
|
832
1133
|
width: 250,
|
|
833
1134
|
height: 250,
|
|
834
1135
|
title: t,
|
|
835
1136
|
description: "",
|
|
836
|
-
type:
|
|
1137
|
+
type: Ne.SHAPE,
|
|
837
1138
|
shape: {
|
|
838
|
-
shapeType:
|
|
1139
|
+
shapeType: It.Rect,
|
|
839
1140
|
text: "",
|
|
840
1141
|
shapeProperties: {
|
|
841
1142
|
shapeBackgroundFill: {
|
|
@@ -845,24 +1146,24 @@ const qe = {
|
|
|
845
1146
|
}
|
|
846
1147
|
};
|
|
847
1148
|
o.pageElements[t] = h, s.updatePage(o.id, o);
|
|
848
|
-
const l = n.get(
|
|
1149
|
+
const l = n.get(y), d = l.createObjectToPage(h, o.id, r);
|
|
849
1150
|
return d && l.setObjectActiveByPage(d, o.id, r), !0;
|
|
850
1151
|
}
|
|
851
1152
|
}, $e = {
|
|
852
1153
|
id: "sidebar.operation.slide-shape",
|
|
853
1154
|
type: N.COMMAND,
|
|
854
1155
|
handler: async (n, e) => {
|
|
855
|
-
const { visible: t, objectType: i } = e, r = n.get(
|
|
856
|
-
let o = "",
|
|
857
|
-
return i ===
|
|
1156
|
+
const { visible: t, objectType: i } = e, r = n.get(Tt), s = n.get(J);
|
|
1157
|
+
let o = "", c = "";
|
|
1158
|
+
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
1159
|
header: { title: s.t(o) },
|
|
859
|
-
children: { label:
|
|
1160
|
+
children: { label: c },
|
|
860
1161
|
onClose: () => {
|
|
861
1162
|
},
|
|
862
1163
|
width: 360
|
|
863
1164
|
}) : r.close(), !0;
|
|
864
1165
|
}
|
|
865
|
-
},
|
|
1166
|
+
}, qe = {
|
|
866
1167
|
id: "slide.command.insert-float-shape.ellipse",
|
|
867
1168
|
type: N.COMMAND,
|
|
868
1169
|
handler: async (n) => {
|
|
@@ -874,20 +1175,20 @@ const qe = {
|
|
|
874
1175
|
id: "slide.operation.insert-float-shape.ellipse",
|
|
875
1176
|
type: N.OPERATION,
|
|
876
1177
|
handler: async (n, e) => {
|
|
877
|
-
const t =
|
|
1178
|
+
const t = ze(6), i = n.get(w), r = e.unitId, s = i.getUnit(r);
|
|
878
1179
|
if (!s) return !1;
|
|
879
|
-
const o = s.getActivePage(),
|
|
1180
|
+
const o = s.getActivePage(), c = Object.values(o.pageElements), a = c != null && c.length ? Math.max(...c.map((v) => v.zIndex)) : 20, h = {
|
|
880
1181
|
id: t,
|
|
881
|
-
zIndex:
|
|
1182
|
+
zIndex: a + 1,
|
|
882
1183
|
left: 378,
|
|
883
1184
|
top: 142,
|
|
884
1185
|
width: 250,
|
|
885
1186
|
height: 250,
|
|
886
1187
|
title: t,
|
|
887
1188
|
description: "",
|
|
888
|
-
type:
|
|
1189
|
+
type: Ne.SHAPE,
|
|
889
1190
|
shape: {
|
|
890
|
-
shapeType:
|
|
1191
|
+
shapeType: It.Ellipse,
|
|
891
1192
|
text: "",
|
|
892
1193
|
shapeProperties: {
|
|
893
1194
|
radius: 100,
|
|
@@ -898,35 +1199,35 @@ const qe = {
|
|
|
898
1199
|
}
|
|
899
1200
|
};
|
|
900
1201
|
o.pageElements[t] = h, s.updatePage(o.id, o);
|
|
901
|
-
const l = n.get(
|
|
1202
|
+
const l = n.get(y), d = l.createObjectToPage(h, o.id, r);
|
|
902
1203
|
return d && l.setObjectActiveByPage(d, o.id, r), !0;
|
|
903
1204
|
}
|
|
904
|
-
},
|
|
1205
|
+
}, Je = {
|
|
905
1206
|
id: "slide.command.add-text",
|
|
906
1207
|
type: N.COMMAND,
|
|
907
1208
|
handler: async (n) => {
|
|
908
1209
|
var r;
|
|
909
1210
|
const e = n.get(D), i = (r = n.get(w).getFocusedUnit()) == null ? void 0 : r.getUnitId();
|
|
910
|
-
return await e.executeCommand(
|
|
1211
|
+
return await e.executeCommand(Xt.id, { unitId: i });
|
|
911
1212
|
}
|
|
912
|
-
},
|
|
1213
|
+
}, Xt = {
|
|
913
1214
|
id: "slide.operation.add-text",
|
|
914
1215
|
type: N.OPERATION,
|
|
915
1216
|
handler: async (n, e) => {
|
|
916
|
-
const t = e.unitId, i =
|
|
1217
|
+
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
1218
|
if (!l) return !1;
|
|
918
1219
|
const d = l.getActivePage(), v = Object.values(d.pageElements), m = v != null && v.length ? Math.max(...v.map((_) => _.zIndex)) : 21, p = {
|
|
919
1220
|
id: i,
|
|
920
1221
|
zIndex: m + 1,
|
|
921
1222
|
left: o,
|
|
922
|
-
top:
|
|
1223
|
+
top: c,
|
|
923
1224
|
width: r,
|
|
924
1225
|
height: s,
|
|
925
1226
|
title: "text",
|
|
926
1227
|
description: "",
|
|
927
|
-
type:
|
|
1228
|
+
type: Ne.TEXT,
|
|
928
1229
|
richText: {
|
|
929
|
-
text:
|
|
1230
|
+
text: a,
|
|
930
1231
|
fs: 30,
|
|
931
1232
|
cl: {
|
|
932
1233
|
rgb: "rgb(51, 51, 51)"
|
|
@@ -935,21 +1236,21 @@ const qe = {
|
|
|
935
1236
|
}
|
|
936
1237
|
};
|
|
937
1238
|
d.pageElements[i] = p, l.updatePage(d.id, d);
|
|
938
|
-
const f = n.get(
|
|
1239
|
+
const f = n.get(y), g = f.createObjectToPage(p, d.id, t);
|
|
939
1240
|
return g && f.setObjectActiveByPage(g, d.id, t), !0;
|
|
940
1241
|
}
|
|
941
|
-
},
|
|
1242
|
+
}, Yt = {
|
|
942
1243
|
id: "slide.operation.set-slide-page-thumb",
|
|
943
1244
|
type: N.OPERATION,
|
|
944
|
-
handler: (n, e) => (n.get(
|
|
1245
|
+
handler: (n, e) => (n.get(y).createThumbs(e.unitId), !0)
|
|
945
1246
|
};
|
|
946
|
-
function
|
|
1247
|
+
function mn() {
|
|
947
1248
|
var p, f;
|
|
948
|
-
const n =
|
|
949
|
-
if (!o || !
|
|
1249
|
+
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();
|
|
1250
|
+
if (!o || !c)
|
|
950
1251
|
return null;
|
|
951
|
-
const
|
|
952
|
-
|
|
1252
|
+
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]);
|
|
1253
|
+
ge(() => {
|
|
953
1254
|
const g = s == null ? void 0 : s.activePage$.subscribe((_) => {
|
|
954
1255
|
var b;
|
|
955
1256
|
const I = (b = _ == null ? void 0 : _.id) != null ? b : null;
|
|
@@ -958,38 +1259,38 @@ function Cn() {
|
|
|
958
1259
|
return () => {
|
|
959
1260
|
g == null || g.unsubscribe();
|
|
960
1261
|
};
|
|
961
|
-
}, []),
|
|
1262
|
+
}, []), ge(() => {
|
|
962
1263
|
d.forEach((g, _) => {
|
|
963
1264
|
var I;
|
|
964
1265
|
if (g.current) {
|
|
965
|
-
const b =
|
|
1266
|
+
const b = a[_];
|
|
966
1267
|
(I = t.getRenderById(b.id)) == null || I.engine.setContainer(g.current);
|
|
967
1268
|
}
|
|
968
|
-
}), d.length > 0 && e.syncExecuteCommand(
|
|
969
|
-
}, [d,
|
|
970
|
-
const v =
|
|
1269
|
+
}), d.length > 0 && e.syncExecuteCommand(Yt.id, { unitId: s == null ? void 0 : s.getUnitId() });
|
|
1270
|
+
}, [d, a, t, e, s]);
|
|
1271
|
+
const v = lt((g) => {
|
|
971
1272
|
e.syncExecuteCommand(Vt.id, { id: g, unitId: s == null ? void 0 : s.getUnitId() });
|
|
972
|
-
}, [e, s]), m =
|
|
973
|
-
e.syncExecuteCommand(
|
|
1273
|
+
}, [e, s]), m = lt(() => {
|
|
1274
|
+
e.syncExecuteCommand(jt.id, { unitId: s == null ? void 0 : s.getUnitId() });
|
|
974
1275
|
}, [e, s]);
|
|
975
1276
|
return /* @__PURE__ */ u(
|
|
976
1277
|
"aside",
|
|
977
1278
|
{
|
|
978
1279
|
ref: r,
|
|
979
|
-
className:
|
|
1280
|
+
className: k("univer-flex univer-h-full univer-w-64 univer-flex-col univer-overflow-y-auto univer-overflow-x-hidden", Li),
|
|
980
1281
|
children: /* @__PURE__ */ x("div", { className: "univer-px-4", children: [
|
|
981
1282
|
/* @__PURE__ */ u("header", { className: "univer-flex univer-justify-center univer-pt-4", children: /* @__PURE__ */ u(
|
|
982
1283
|
"a",
|
|
983
1284
|
{
|
|
984
|
-
className:
|
|
1285
|
+
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
1286
|
onClick: m,
|
|
986
1287
|
children: i.t("slide.append")
|
|
987
1288
|
}
|
|
988
1289
|
) }),
|
|
989
|
-
|
|
1290
|
+
a.map((g, _) => /* @__PURE__ */ x(
|
|
990
1291
|
"div",
|
|
991
1292
|
{
|
|
992
|
-
className:
|
|
1293
|
+
className: k("univer-my-4 univer-flex univer-gap-2", {
|
|
993
1294
|
"[&>div]:univer-border-primary-600 [&>span]:univer-text-primary-600": g.id === h
|
|
994
1295
|
}),
|
|
995
1296
|
onClick: () => v(g.id),
|
|
@@ -999,7 +1300,7 @@ function Cn() {
|
|
|
999
1300
|
"div",
|
|
1000
1301
|
{
|
|
1001
1302
|
ref: d[_],
|
|
1002
|
-
className:
|
|
1303
|
+
className: k("univer-relative univer-box-border univer-h-32 univer-w-52 univer-bg-white hover:univer-border-primary-600", he)
|
|
1003
1304
|
}
|
|
1004
1305
|
)
|
|
1005
1306
|
]
|
|
@@ -1010,101 +1311,101 @@ function Cn() {
|
|
|
1010
1311
|
}
|
|
1011
1312
|
);
|
|
1012
1313
|
}
|
|
1013
|
-
const
|
|
1014
|
-
function
|
|
1314
|
+
const ue = di("SLIDE_EDITOR"), qt = "slide.menu.image";
|
|
1315
|
+
function _n(n) {
|
|
1015
1316
|
return {
|
|
1016
|
-
id:
|
|
1017
|
-
type:
|
|
1317
|
+
id: qt,
|
|
1318
|
+
type: se.SUBITEMS,
|
|
1018
1319
|
icon: "AddImageIcon",
|
|
1019
1320
|
tooltip: "slide.image.insert.title",
|
|
1020
|
-
hidden$:
|
|
1321
|
+
hidden$: re(n, E.UNIVER_SLIDE)
|
|
1021
1322
|
};
|
|
1022
1323
|
}
|
|
1023
|
-
function
|
|
1324
|
+
function Cn(n) {
|
|
1024
1325
|
return {
|
|
1025
1326
|
id: Ge.id,
|
|
1026
1327
|
title: "slide.image.insert.float",
|
|
1027
|
-
type:
|
|
1028
|
-
hidden$:
|
|
1328
|
+
type: se.BUTTON,
|
|
1329
|
+
hidden$: re(n, E.UNIVER_SLIDE)
|
|
1029
1330
|
};
|
|
1030
1331
|
}
|
|
1031
|
-
const
|
|
1032
|
-
function
|
|
1332
|
+
const Jt = "slide.menu.shape";
|
|
1333
|
+
function Sn(n) {
|
|
1033
1334
|
return {
|
|
1034
|
-
id:
|
|
1035
|
-
type:
|
|
1335
|
+
id: Jt,
|
|
1336
|
+
type: se.SUBITEMS,
|
|
1036
1337
|
icon: "GraphIcon",
|
|
1037
1338
|
tooltip: "slide.shape.insert.title",
|
|
1038
|
-
hidden$:
|
|
1339
|
+
hidden$: re(n, E.UNIVER_SLIDE)
|
|
1039
1340
|
// disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),
|
|
1040
1341
|
};
|
|
1041
1342
|
}
|
|
1042
|
-
function
|
|
1343
|
+
function In(n) {
|
|
1043
1344
|
return {
|
|
1044
|
-
id:
|
|
1345
|
+
id: Ye.id,
|
|
1045
1346
|
title: "slide.shape.insert.rectangle",
|
|
1046
|
-
type:
|
|
1047
|
-
hidden$:
|
|
1347
|
+
type: se.BUTTON,
|
|
1348
|
+
hidden$: re(n, E.UNIVER_SLIDE)
|
|
1048
1349
|
};
|
|
1049
1350
|
}
|
|
1050
|
-
function
|
|
1351
|
+
function bn(n) {
|
|
1051
1352
|
return {
|
|
1052
|
-
id:
|
|
1353
|
+
id: qe.id,
|
|
1053
1354
|
title: "slide.shape.insert.ellipse",
|
|
1054
|
-
type:
|
|
1055
|
-
hidden$:
|
|
1355
|
+
type: se.BUTTON,
|
|
1356
|
+
hidden$: re(n, E.UNIVER_SLIDE)
|
|
1056
1357
|
};
|
|
1057
1358
|
}
|
|
1058
|
-
function
|
|
1359
|
+
function En(n) {
|
|
1059
1360
|
return {
|
|
1060
|
-
id:
|
|
1061
|
-
type:
|
|
1361
|
+
id: Je.id,
|
|
1362
|
+
type: se.BUTTON,
|
|
1062
1363
|
icon: "TextIcon",
|
|
1063
1364
|
tooltip: "slide.text.insert.title",
|
|
1064
|
-
hidden$:
|
|
1365
|
+
hidden$: re(n, E.UNIVER_SLIDE)
|
|
1065
1366
|
};
|
|
1066
1367
|
}
|
|
1067
|
-
const
|
|
1368
|
+
const xn = {
|
|
1068
1369
|
[Pi.FORMAT]: {
|
|
1069
|
-
[
|
|
1370
|
+
[Je.id]: {
|
|
1070
1371
|
order: 0,
|
|
1071
|
-
menuItemFactory:
|
|
1372
|
+
menuItemFactory: En
|
|
1072
1373
|
},
|
|
1073
|
-
[
|
|
1374
|
+
[qt]: {
|
|
1074
1375
|
order: 0,
|
|
1075
|
-
menuItemFactory:
|
|
1376
|
+
menuItemFactory: _n,
|
|
1076
1377
|
[Ge.id]: {
|
|
1077
1378
|
order: 0,
|
|
1078
|
-
menuItemFactory:
|
|
1379
|
+
menuItemFactory: Cn
|
|
1079
1380
|
}
|
|
1080
1381
|
},
|
|
1081
|
-
[
|
|
1382
|
+
[Jt]: {
|
|
1082
1383
|
order: 0,
|
|
1083
|
-
menuItemFactory:
|
|
1084
|
-
[
|
|
1384
|
+
menuItemFactory: Sn,
|
|
1385
|
+
[Ye.id]: {
|
|
1085
1386
|
order: 0,
|
|
1086
|
-
menuItemFactory:
|
|
1387
|
+
menuItemFactory: In
|
|
1087
1388
|
},
|
|
1088
|
-
[
|
|
1389
|
+
[qe.id]: {
|
|
1089
1390
|
order: 0,
|
|
1090
|
-
menuItemFactory:
|
|
1391
|
+
menuItemFactory: bn
|
|
1091
1392
|
}
|
|
1092
1393
|
}
|
|
1093
1394
|
}
|
|
1094
|
-
},
|
|
1395
|
+
}, Oe = {
|
|
1095
1396
|
id: "slide.operation.edit-arrow",
|
|
1096
1397
|
type: N.OPERATION,
|
|
1097
1398
|
handler: () => !0
|
|
1098
|
-
},
|
|
1099
|
-
function
|
|
1399
|
+
}, Qt = "COMPONENT_SLIDE_IMAGE_POPUP_MENU";
|
|
1400
|
+
function Rn(n) {
|
|
1100
1401
|
var p, f;
|
|
1101
1402
|
const e = (f = (p = n.popup) == null ? void 0 : p.extraProps) == null ? void 0 : f.menuItems;
|
|
1102
1403
|
if (!e)
|
|
1103
1404
|
return null;
|
|
1104
|
-
const t =
|
|
1105
|
-
|
|
1405
|
+
const t = O(D), i = O(J), [r, s] = $(!1), [o, c] = $(!1), a = () => {
|
|
1406
|
+
c(!0);
|
|
1106
1407
|
}, h = () => {
|
|
1107
|
-
|
|
1408
|
+
c(!1);
|
|
1108
1409
|
}, l = (g) => {
|
|
1109
1410
|
s(g);
|
|
1110
1411
|
}, d = (g) => {
|
|
@@ -1113,16 +1414,16 @@ function wn(n) {
|
|
|
1113
1414
|
return /* @__PURE__ */ u(
|
|
1114
1415
|
"div",
|
|
1115
1416
|
{
|
|
1116
|
-
onMouseEnter:
|
|
1417
|
+
onMouseEnter: a,
|
|
1117
1418
|
onMouseLeave: h,
|
|
1118
1419
|
children: /* @__PURE__ */ u(
|
|
1119
|
-
|
|
1420
|
+
Mt,
|
|
1120
1421
|
{
|
|
1121
1422
|
align: "start",
|
|
1122
1423
|
overlay: /* @__PURE__ */ u(
|
|
1123
1424
|
"ul",
|
|
1124
1425
|
{
|
|
1125
|
-
className:
|
|
1426
|
+
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
1427
|
children: m.map((g) => /* @__PURE__ */ u(
|
|
1127
1428
|
"li",
|
|
1128
1429
|
{
|
|
@@ -1139,18 +1440,18 @@ function wn(n) {
|
|
|
1139
1440
|
children: /* @__PURE__ */ x(
|
|
1140
1441
|
"div",
|
|
1141
1442
|
{
|
|
1142
|
-
className:
|
|
1443
|
+
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
1444
|
"univer-bg-gray-100 dark:!univer-bg-gray-800": r,
|
|
1144
1445
|
"univer-bg-white dark:!univer-bg-gray-900": !r
|
|
1145
1446
|
}),
|
|
1146
1447
|
children: [
|
|
1147
1448
|
/* @__PURE__ */ u(
|
|
1148
|
-
|
|
1449
|
+
zt,
|
|
1149
1450
|
{
|
|
1150
1451
|
className: "univer-fill-primary-600 univer-text-gray-900 dark:!univer-text-white"
|
|
1151
1452
|
}
|
|
1152
1453
|
),
|
|
1153
|
-
v && /* @__PURE__ */ u(
|
|
1454
|
+
v && /* @__PURE__ */ u(Xe, { className: "dark:!univer-text-white" })
|
|
1154
1455
|
]
|
|
1155
1456
|
}
|
|
1156
1457
|
)
|
|
@@ -1159,16 +1460,16 @@ function wn(n) {
|
|
|
1159
1460
|
}
|
|
1160
1461
|
);
|
|
1161
1462
|
}
|
|
1162
|
-
class
|
|
1463
|
+
class On {
|
|
1163
1464
|
constructor() {
|
|
1164
1465
|
S(this, "_state", null);
|
|
1165
1466
|
S(this, "_rect", null);
|
|
1166
|
-
S(this, "_state$", new
|
|
1467
|
+
S(this, "_state$", new q(null));
|
|
1167
1468
|
S(this, "state$", this._state$.asObservable());
|
|
1168
|
-
S(this, "_rect$", new
|
|
1469
|
+
S(this, "_rect$", new q(null));
|
|
1169
1470
|
S(this, "rect$", this._rect$.asObservable());
|
|
1170
1471
|
S(this, "_focus", !1);
|
|
1171
|
-
S(this, "_focus$", new
|
|
1472
|
+
S(this, "_focus$", new q(this._focus));
|
|
1172
1473
|
S(this, "focus$", this._focus$.asObservable());
|
|
1173
1474
|
}
|
|
1174
1475
|
dispose() {
|
|
@@ -1193,58 +1494,58 @@ class yn {
|
|
|
1193
1494
|
this._state$.next(e);
|
|
1194
1495
|
}
|
|
1195
1496
|
}
|
|
1196
|
-
const
|
|
1497
|
+
const Qe = bt(
|
|
1197
1498
|
"univer.slide-editor-manager.service"
|
|
1198
|
-
),
|
|
1499
|
+
), we = -1e3, vt = {
|
|
1199
1500
|
width: 0,
|
|
1200
1501
|
height: 0,
|
|
1201
|
-
top:
|
|
1202
|
-
left:
|
|
1502
|
+
top: we,
|
|
1503
|
+
left: we
|
|
1203
1504
|
};
|
|
1204
|
-
function
|
|
1505
|
+
function wn() {
|
|
1205
1506
|
const [n, e] = $({
|
|
1206
|
-
...
|
|
1207
|
-
}), t =
|
|
1208
|
-
() => r.subscribeContextValue$(
|
|
1507
|
+
...vt
|
|
1508
|
+
}), t = O(Qe), i = O(Ze), r = O(pe), s = yi(
|
|
1509
|
+
() => r.subscribeContextValue$(ot),
|
|
1209
1510
|
!1,
|
|
1210
1511
|
void 0,
|
|
1211
|
-
[r,
|
|
1512
|
+
[r, ot]
|
|
1212
1513
|
);
|
|
1213
|
-
return
|
|
1514
|
+
return ui.UNSPECIFIED, ge(() => {
|
|
1214
1515
|
t.state$.subscribe((o) => {
|
|
1215
1516
|
if (o == null)
|
|
1216
1517
|
return;
|
|
1217
1518
|
const {
|
|
1218
|
-
startX:
|
|
1219
|
-
startY:
|
|
1519
|
+
startX: c = we,
|
|
1520
|
+
startY: a = we,
|
|
1220
1521
|
endX: h = 0,
|
|
1221
1522
|
endY: l = 0,
|
|
1222
1523
|
show: d = !1
|
|
1223
1524
|
} = o;
|
|
1224
1525
|
if (!d)
|
|
1225
1526
|
e({
|
|
1226
|
-
...
|
|
1527
|
+
...vt
|
|
1227
1528
|
});
|
|
1228
1529
|
else {
|
|
1229
1530
|
e({
|
|
1230
|
-
width: h -
|
|
1231
|
-
height: l -
|
|
1232
|
-
left:
|
|
1233
|
-
top:
|
|
1531
|
+
width: h - c - ie + 2,
|
|
1532
|
+
height: l - a - ie + 2,
|
|
1533
|
+
left: c + ie,
|
|
1534
|
+
top: a + ie
|
|
1234
1535
|
});
|
|
1235
|
-
const v = i.getEditor(
|
|
1536
|
+
const v = i.getEditor(ue);
|
|
1236
1537
|
if (v == null)
|
|
1237
1538
|
return;
|
|
1238
1539
|
const { left: m, top: p, width: f, height: g } = v.getBoundingClientRect();
|
|
1239
1540
|
t.setRect({ left: m, top: p, width: f, height: g });
|
|
1240
1541
|
}
|
|
1241
1542
|
});
|
|
1242
|
-
}, []),
|
|
1543
|
+
}, []), ge(() => {
|
|
1243
1544
|
s || t.setFocus(!0);
|
|
1244
1545
|
}, [s, n]), /* @__PURE__ */ u(
|
|
1245
1546
|
"div",
|
|
1246
1547
|
{
|
|
1247
|
-
className:
|
|
1548
|
+
className: k("univer-absolute univer-z-10 univer-box-border univer-flex", he),
|
|
1248
1549
|
style: {
|
|
1249
1550
|
left: n.left,
|
|
1250
1551
|
top: n.top,
|
|
@@ -1254,117 +1555,117 @@ function Pn() {
|
|
|
1254
1555
|
}
|
|
1255
1556
|
);
|
|
1256
1557
|
}
|
|
1257
|
-
function
|
|
1258
|
-
return n.getContextValue(
|
|
1558
|
+
function Be(n) {
|
|
1559
|
+
return n.getContextValue(Et) && n.getContextValue(xe);
|
|
1259
1560
|
}
|
|
1260
|
-
function
|
|
1261
|
-
return n.getContextValue(
|
|
1561
|
+
function Pn(n) {
|
|
1562
|
+
return n.getContextValue(hi) && n.getContextValue(Et);
|
|
1262
1563
|
}
|
|
1263
|
-
const
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1564
|
+
const ei = [
|
|
1565
|
+
P.ARROW_DOWN,
|
|
1566
|
+
P.ARROW_UP,
|
|
1567
|
+
P.ARROW_LEFT,
|
|
1568
|
+
P.ARROW_RIGHT
|
|
1268
1569
|
];
|
|
1269
|
-
[
|
|
1270
|
-
function
|
|
1570
|
+
[P.ENTER, P.TAB, ...ei];
|
|
1571
|
+
function yn() {
|
|
1271
1572
|
const n = [];
|
|
1272
|
-
for (const e of
|
|
1573
|
+
for (const e of ei)
|
|
1273
1574
|
n.push({
|
|
1274
|
-
id:
|
|
1575
|
+
id: Oe.id,
|
|
1275
1576
|
binding: e,
|
|
1276
|
-
preconditions: (t) =>
|
|
1577
|
+
preconditions: (t) => Be(t),
|
|
1277
1578
|
staticParameters: {
|
|
1278
1579
|
visible: !1,
|
|
1279
|
-
eventType:
|
|
1580
|
+
eventType: Y.Keyboard,
|
|
1280
1581
|
keycode: e,
|
|
1281
1582
|
isShift: !1
|
|
1282
1583
|
}
|
|
1283
1584
|
}), n.push({
|
|
1284
|
-
id:
|
|
1285
|
-
binding: e |
|
|
1286
|
-
preconditions: (t) =>
|
|
1585
|
+
id: Oe.id,
|
|
1586
|
+
binding: e | Ti.SHIFT,
|
|
1587
|
+
preconditions: (t) => Be(t),
|
|
1287
1588
|
staticParameters: {
|
|
1288
1589
|
visible: !1,
|
|
1289
|
-
eventType:
|
|
1590
|
+
eventType: Y.Keyboard,
|
|
1290
1591
|
keycode: e,
|
|
1291
1592
|
isShift: !0
|
|
1292
1593
|
}
|
|
1293
1594
|
});
|
|
1294
1595
|
return n;
|
|
1295
1596
|
}
|
|
1296
|
-
const
|
|
1297
|
-
id:
|
|
1298
|
-
preconditions: (n) =>
|
|
1299
|
-
binding:
|
|
1597
|
+
const Tn = {
|
|
1598
|
+
id: Hi.id,
|
|
1599
|
+
preconditions: (n) => Be(n) || Pn(n),
|
|
1600
|
+
binding: P.BACKSPACE
|
|
1300
1601
|
};
|
|
1301
|
-
var
|
|
1302
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1602
|
+
var Mn = Object.getOwnPropertyDescriptor, Nn = (n, e, t, i) => {
|
|
1603
|
+
for (var r = i > 1 ? void 0 : i ? Mn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
1303
1604
|
(o = n[s]) && (r = o(r) || r);
|
|
1304
1605
|
return r;
|
|
1305
|
-
},
|
|
1306
|
-
let Pe = class extends
|
|
1606
|
+
}, te = (n, e) => (t, i) => e(t, i, n);
|
|
1607
|
+
let Pe = class extends De {
|
|
1307
1608
|
constructor(n, e, t, i, r, s) {
|
|
1308
1609
|
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
1610
|
}
|
|
1310
1611
|
_initMenus() {
|
|
1311
|
-
this._menuManagerService.mergeMenu(
|
|
1612
|
+
this._menuManagerService.mergeMenu(xn);
|
|
1312
1613
|
}
|
|
1313
1614
|
_initCustomComponents() {
|
|
1314
1615
|
const n = this._componentManager;
|
|
1315
|
-
this.disposeWithMe(n.register("TextIcon",
|
|
1616
|
+
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
1617
|
}
|
|
1317
1618
|
_initCommands() {
|
|
1318
1619
|
[
|
|
1319
|
-
|
|
1620
|
+
jt,
|
|
1320
1621
|
Vt,
|
|
1321
|
-
qt,
|
|
1322
|
-
Ge,
|
|
1323
1622
|
Yt,
|
|
1324
|
-
|
|
1325
|
-
Je,
|
|
1326
|
-
Gt,
|
|
1623
|
+
Ge,
|
|
1327
1624
|
Xt,
|
|
1625
|
+
Je,
|
|
1328
1626
|
qe,
|
|
1627
|
+
Gt,
|
|
1628
|
+
Zt,
|
|
1629
|
+
Ye,
|
|
1329
1630
|
$e,
|
|
1330
|
-
|
|
1331
|
-
|
|
1631
|
+
At,
|
|
1632
|
+
B,
|
|
1332
1633
|
// commands for editor
|
|
1333
|
-
|
|
1634
|
+
Oe
|
|
1334
1635
|
].forEach((n) => this.disposeWithMe(this._commandService.registerCommand(n)));
|
|
1335
1636
|
}
|
|
1336
1637
|
_initUIComponents() {
|
|
1337
1638
|
this.disposeWithMe(
|
|
1338
|
-
this._uiPartsService.registerComponent(ct.LEFT_SIDEBAR, () =>
|
|
1639
|
+
this._uiPartsService.registerComponent(ct.LEFT_SIDEBAR, () => at(mn, this._injector))
|
|
1339
1640
|
), this.disposeWithMe(
|
|
1340
|
-
this._uiPartsService.registerComponent(ct.CONTENT, () =>
|
|
1641
|
+
this._uiPartsService.registerComponent(ct.CONTENT, () => at(wn, this._injector))
|
|
1341
1642
|
);
|
|
1342
1643
|
}
|
|
1343
1644
|
_initShortcuts() {
|
|
1344
1645
|
[
|
|
1345
|
-
|
|
1346
|
-
...
|
|
1646
|
+
Tn,
|
|
1647
|
+
...yn()
|
|
1347
1648
|
].forEach((n) => {
|
|
1348
1649
|
this.disposeWithMe(this._shortcutService.registerShortcut(n));
|
|
1349
1650
|
});
|
|
1350
1651
|
}
|
|
1351
1652
|
};
|
|
1352
|
-
Pe =
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1653
|
+
Pe = Nn([
|
|
1654
|
+
te(0, z(ke)),
|
|
1655
|
+
te(1, Mi),
|
|
1656
|
+
te(2, z(Ni)),
|
|
1657
|
+
te(3, Di),
|
|
1658
|
+
te(4, D),
|
|
1659
|
+
te(5, Ui)
|
|
1359
1660
|
], Pe);
|
|
1360
|
-
const
|
|
1361
|
-
var
|
|
1362
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1661
|
+
const Dn = "slides-ui.config", ft = {};
|
|
1662
|
+
var Un = Object.getOwnPropertyDescriptor, Vn = (n, e, t, i) => {
|
|
1663
|
+
for (var r = i > 1 ? void 0 : i ? Un(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
1363
1664
|
(o = n[s]) && (r = o(r) || r);
|
|
1364
1665
|
return r;
|
|
1365
|
-
},
|
|
1366
|
-
function
|
|
1367
|
-
const t =
|
|
1666
|
+
}, Se = (n, e) => (t, i) => e(t, i, n);
|
|
1667
|
+
function jn(n, e) {
|
|
1668
|
+
const t = pt(n.left, n.top, e), i = pt(n.right, n.bottom, e);
|
|
1368
1669
|
return {
|
|
1369
1670
|
left: t.x,
|
|
1370
1671
|
top: t.y,
|
|
@@ -1372,39 +1673,39 @@ function Ln(n, e) {
|
|
|
1372
1673
|
bottom: i.y
|
|
1373
1674
|
};
|
|
1374
1675
|
}
|
|
1375
|
-
function
|
|
1376
|
-
const { scaleX: i, scaleY: r } = t.getAncestorScale(), s = t.getViewport(
|
|
1676
|
+
function pt(n, e, t) {
|
|
1677
|
+
const { scaleX: i, scaleY: r } = t.getAncestorScale(), s = t.getViewport(ne.VIEW);
|
|
1377
1678
|
if (!s)
|
|
1378
1679
|
return {
|
|
1379
1680
|
x: n,
|
|
1380
1681
|
y: e
|
|
1381
1682
|
};
|
|
1382
|
-
const { viewportScrollX: o, viewportScrollY:
|
|
1683
|
+
const { viewportScrollX: o, viewportScrollY: c } = s, a = (n - o) * i, h = (e - c) * r;
|
|
1383
1684
|
return {
|
|
1384
|
-
x:
|
|
1685
|
+
x: a,
|
|
1385
1686
|
y: h
|
|
1386
1687
|
};
|
|
1387
1688
|
}
|
|
1388
|
-
let
|
|
1689
|
+
let ye = class extends De {
|
|
1389
1690
|
constructor(n, e, t, i) {
|
|
1390
1691
|
super(), this._globalPopupManagerService = n, this._renderManagerService = e, this._univerInstanceService = t, this._commandService = i;
|
|
1391
1692
|
}
|
|
1392
1693
|
_createObjectPositionObserver(n, e) {
|
|
1393
1694
|
const i = (() => {
|
|
1394
|
-
var L,
|
|
1395
|
-
const { scene: o, engine:
|
|
1396
|
-
left:
|
|
1397
|
-
right:
|
|
1695
|
+
var A, L, Q, ee;
|
|
1696
|
+
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 = {
|
|
1697
|
+
left: a,
|
|
1698
|
+
right: a + l,
|
|
1398
1699
|
top: h,
|
|
1399
1700
|
bottom: h + d
|
|
1400
|
-
}, f =
|
|
1701
|
+
}, 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
1702
|
return {
|
|
1402
|
-
left: T.left *
|
|
1403
|
-
right: T.right *
|
|
1404
|
-
top: T.top *
|
|
1405
|
-
bottom: T.bottom *
|
|
1703
|
+
left: T.left * W * I + U + v,
|
|
1704
|
+
right: T.right * W * I + U + v,
|
|
1705
|
+
top: T.top * W * b + M + m,
|
|
1706
|
+
bottom: T.bottom * W * b + M + m
|
|
1406
1707
|
};
|
|
1407
|
-
})(), r = new
|
|
1708
|
+
})(), r = new q(i), s = new Ke();
|
|
1408
1709
|
return {
|
|
1409
1710
|
position: i,
|
|
1410
1711
|
position$: r,
|
|
@@ -1418,7 +1719,7 @@ let Te = class extends Ue {
|
|
|
1418
1719
|
dispose: () => {
|
|
1419
1720
|
}
|
|
1420
1721
|
};
|
|
1421
|
-
const { position: s, position$: o, disposable:
|
|
1722
|
+
const { position: s, position$: o, disposable: c } = this._createObjectPositionObserver(n, r), a = this._globalPopupManagerService.addPopup({
|
|
1422
1723
|
...e,
|
|
1423
1724
|
unitId: i,
|
|
1424
1725
|
subUnitId: "default",
|
|
@@ -1428,27 +1729,27 @@ let Te = class extends Ue {
|
|
|
1428
1729
|
});
|
|
1429
1730
|
return {
|
|
1430
1731
|
dispose: () => {
|
|
1431
|
-
this._globalPopupManagerService.removePopup(
|
|
1732
|
+
this._globalPopupManagerService.removePopup(a), o.complete(), c.dispose();
|
|
1432
1733
|
}
|
|
1433
1734
|
};
|
|
1434
1735
|
}
|
|
1435
1736
|
};
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
],
|
|
1442
|
-
var
|
|
1443
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1737
|
+
ye = Vn([
|
|
1738
|
+
Se(0, z(Vi)),
|
|
1739
|
+
Se(1, K),
|
|
1740
|
+
Se(2, w),
|
|
1741
|
+
Se(3, D)
|
|
1742
|
+
], ye);
|
|
1743
|
+
var An = Object.getOwnPropertyDescriptor, Ln = (n, e, t, i) => {
|
|
1744
|
+
for (var r = i > 1 ? void 0 : i ? An(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
1444
1745
|
(o = n[s]) && (r = o(r) || r);
|
|
1445
1746
|
return r;
|
|
1446
|
-
},
|
|
1447
|
-
let
|
|
1448
|
-
constructor(e, t, i, r, s, o,
|
|
1747
|
+
}, X = (n, e) => (t, i) => e(t, i, n);
|
|
1748
|
+
let Te = class extends fe {
|
|
1749
|
+
constructor(e, t, i, r, s, o, c) {
|
|
1449
1750
|
super();
|
|
1450
1751
|
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 =
|
|
1752
|
+
this._canvasPopManagerService = e, this._renderManagerService = t, this._univerInstanceService = i, this._contextService = r, this._canvasView = s, this._sidebarService = o, this._commandService = c, this._init();
|
|
1452
1753
|
}
|
|
1453
1754
|
_init() {
|
|
1454
1755
|
this._univerInstanceService.getAllUnitsForType(E.UNIVER_SLIDE).forEach((e) => this._create(e));
|
|
@@ -1467,23 +1768,23 @@ let Me = class extends pe {
|
|
|
1467
1768
|
const t = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE), i = (r = t == null ? void 0 : t.getPages()) != null ? r : {};
|
|
1468
1769
|
Object.keys(i).forEach((s) => {
|
|
1469
1770
|
var h;
|
|
1470
|
-
const
|
|
1471
|
-
if (!
|
|
1472
|
-
let
|
|
1771
|
+
const c = (h = this._canvasView.getRenderUnitByPageId(s, e).scene) == null ? void 0 : h.getTransformer();
|
|
1772
|
+
if (!c) return;
|
|
1773
|
+
let a;
|
|
1473
1774
|
this.disposeWithMe(
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
const l =
|
|
1775
|
+
xt(
|
|
1776
|
+
c.createControl$.subscribe(() => {
|
|
1777
|
+
const l = c.getSelectedObjectMap();
|
|
1477
1778
|
if (l.size > 1) {
|
|
1478
|
-
|
|
1779
|
+
a == null || a.dispose();
|
|
1479
1780
|
return;
|
|
1480
1781
|
}
|
|
1481
1782
|
const d = l.values().next().value;
|
|
1482
1783
|
if (!d)
|
|
1483
1784
|
return;
|
|
1484
1785
|
const v = d.oKey;
|
|
1485
|
-
|
|
1486
|
-
componentKey:
|
|
1786
|
+
a == null || a.dispose(), a = this.disposeWithMe(this._canvasPopManagerService.attachPopupToObject(d, {
|
|
1787
|
+
componentKey: Qt,
|
|
1487
1788
|
direction: "horizontal",
|
|
1488
1789
|
offset: [2, 0],
|
|
1489
1790
|
extraProps: {
|
|
@@ -1496,19 +1797,19 @@ let Me = class extends pe {
|
|
|
1496
1797
|
})
|
|
1497
1798
|
)
|
|
1498
1799
|
), this.disposeWithMe(
|
|
1499
|
-
|
|
1500
|
-
|
|
1800
|
+
c.clearControl$.subscribe(() => {
|
|
1801
|
+
a == null || a.dispose(), this._contextService.setContextValue(gi, !1);
|
|
1501
1802
|
})
|
|
1502
1803
|
), this.disposeWithMe(
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
const l =
|
|
1804
|
+
c.changing$.subscribe(() => {
|
|
1805
|
+
a == null || a.dispose();
|
|
1806
|
+
const l = c.getSelectedObjectMap();
|
|
1506
1807
|
if (l.size > 1) {
|
|
1507
|
-
|
|
1808
|
+
a == null || a.dispose();
|
|
1508
1809
|
return;
|
|
1509
1810
|
}
|
|
1510
1811
|
const d = l.values().next().value;
|
|
1511
|
-
d && this._commandService.executeCommand(
|
|
1812
|
+
d && this._commandService.executeCommand(B.id, {
|
|
1512
1813
|
unitId: e,
|
|
1513
1814
|
oKey: d.oKey,
|
|
1514
1815
|
props: {
|
|
@@ -1535,7 +1836,7 @@ let Me = class extends pe {
|
|
|
1535
1836
|
}, {
|
|
1536
1837
|
label: "slide.popup.delete",
|
|
1537
1838
|
index: 5,
|
|
1538
|
-
commandId:
|
|
1839
|
+
commandId: At.id,
|
|
1539
1840
|
commandParams: {
|
|
1540
1841
|
id: t,
|
|
1541
1842
|
unitId: i
|
|
@@ -1544,40 +1845,40 @@ let Me = class extends pe {
|
|
|
1544
1845
|
}];
|
|
1545
1846
|
}
|
|
1546
1847
|
};
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
],
|
|
1556
|
-
var
|
|
1557
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1848
|
+
Te = Ln([
|
|
1849
|
+
X(0, z(ye)),
|
|
1850
|
+
X(1, K),
|
|
1851
|
+
X(2, w),
|
|
1852
|
+
X(3, pe),
|
|
1853
|
+
X(4, z(y)),
|
|
1854
|
+
X(5, Tt),
|
|
1855
|
+
X(6, D)
|
|
1856
|
+
], Te);
|
|
1857
|
+
var $n = Object.getOwnPropertyDescriptor, Bn = (n, e, t, i) => {
|
|
1858
|
+
for (var r = i > 1 ? void 0 : i ? $n(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
1558
1859
|
(o = n[s]) && (r = o(r) || r);
|
|
1559
1860
|
return r;
|
|
1560
1861
|
}, Ve = (n, e) => (t, i) => e(t, i, n);
|
|
1561
|
-
const
|
|
1562
|
-
let
|
|
1862
|
+
const et = bt("univer.slide-editor-bridge.service");
|
|
1863
|
+
let He = class extends De {
|
|
1563
1864
|
constructor(e, t, i) {
|
|
1564
1865
|
super();
|
|
1565
|
-
S(this, "_editorUnitId",
|
|
1866
|
+
S(this, "_editorUnitId", ue);
|
|
1566
1867
|
S(this, "_isForceKeepVisible", !1);
|
|
1567
1868
|
S(this, "_editorIsDirty", !1);
|
|
1568
1869
|
S(this, "_currentEditRectState", null);
|
|
1569
|
-
S(this, "_currentEditRectState$", new
|
|
1870
|
+
S(this, "_currentEditRectState$", new q(null));
|
|
1570
1871
|
S(this, "currentEditRectState$", this._currentEditRectState$.asObservable());
|
|
1571
1872
|
S(this, "_visibleParam", {
|
|
1572
1873
|
visible: !1,
|
|
1573
|
-
eventType:
|
|
1874
|
+
eventType: Y.Dblclick,
|
|
1574
1875
|
unitId: ""
|
|
1575
1876
|
});
|
|
1576
|
-
S(this, "_visible$", new
|
|
1877
|
+
S(this, "_visible$", new q(this._visibleParam));
|
|
1577
1878
|
S(this, "visible$", this._visible$.asObservable());
|
|
1578
|
-
S(this, "_afterVisible$", new
|
|
1879
|
+
S(this, "_afterVisible$", new q(this._visibleParam));
|
|
1579
1880
|
S(this, "afterVisible$", this._afterVisible$.asObservable());
|
|
1580
|
-
S(this, "endEditing$", new
|
|
1881
|
+
S(this, "endEditing$", new Ut());
|
|
1581
1882
|
S(this, "_currentEditRectInfo");
|
|
1582
1883
|
this._editorService = e, this._contextService = t, this._renderManagerService = i;
|
|
1583
1884
|
}
|
|
@@ -1592,7 +1893,7 @@ let Fe = class extends Ue {
|
|
|
1592
1893
|
* @editorInfo editorInfo
|
|
1593
1894
|
*/
|
|
1594
1895
|
setEditorRect(e) {
|
|
1595
|
-
this._currentEditRectInfo = e, this._editorService.getFocusEditor() || (this._editorService.focus(
|
|
1896
|
+
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
1897
|
const t = this.getEditRectState();
|
|
1597
1898
|
this._currentEditRectState = t, this._currentEditRectState$.next(t);
|
|
1598
1899
|
}
|
|
@@ -1606,23 +1907,23 @@ let Fe = class extends Ue {
|
|
|
1606
1907
|
* && this@setEditorRect
|
|
1607
1908
|
*/
|
|
1608
1909
|
getEditRectState() {
|
|
1609
|
-
const e =
|
|
1910
|
+
const e = ue, t = this._currentEditRectInfo, i = t.unitId, r = t.richTextObj.documentData;
|
|
1610
1911
|
r.id = e, r.documentStyle = {
|
|
1611
1912
|
...r.documentStyle,
|
|
1612
1913
|
pageSize: { width: t.richTextObj.width, height: 1 / 0 }
|
|
1613
1914
|
};
|
|
1614
1915
|
const o = {
|
|
1615
|
-
documentModel: new
|
|
1916
|
+
documentModel: new vi(r),
|
|
1616
1917
|
fontString: "document",
|
|
1617
1918
|
textRotation: { a: 0, v: 0 },
|
|
1618
1919
|
wrapStrategy: 0,
|
|
1619
1920
|
verticalAlign: Re.TOP,
|
|
1620
|
-
horizontalAlign:
|
|
1921
|
+
horizontalAlign: wt.LEFT,
|
|
1621
1922
|
paddingData: { t: 0, b: 1, l: 2, r: 2 }
|
|
1622
|
-
},
|
|
1923
|
+
}, c = t.richTextObj.width, a = t.richTextObj.height, h = t.richTextObj.left, l = t.richTextObj.top, d = {
|
|
1623
1924
|
left: 0,
|
|
1624
1925
|
top: 0
|
|
1625
|
-
}, v = this._renderManagerService.getRenderById(i), m = v == null ? void 0 : v.scene, p = m == null ? void 0 : m.getViewport(
|
|
1926
|
+
}, 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
1927
|
x: (f == null ? void 0 : f.left) || 0,
|
|
1627
1928
|
y: (f == null ? void 0 : f.top) || 0
|
|
1628
1929
|
}, _ = (p == null ? void 0 : p.viewportScrollX) || 0, I = (p == null ? void 0 : p.viewportScrollY) || 0;
|
|
@@ -1630,8 +1931,8 @@ let Fe = class extends Ue {
|
|
|
1630
1931
|
position: {
|
|
1631
1932
|
startX: h,
|
|
1632
1933
|
startY: l,
|
|
1633
|
-
endX: h +
|
|
1634
|
-
endY: l +
|
|
1934
|
+
endX: h + c,
|
|
1935
|
+
endY: l + a
|
|
1635
1936
|
},
|
|
1636
1937
|
scaleX: 1,
|
|
1637
1938
|
scaleY: 1,
|
|
@@ -1696,19 +1997,19 @@ let Fe = class extends Ue {
|
|
|
1696
1997
|
};
|
|
1697
1998
|
}
|
|
1698
1999
|
};
|
|
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 ?
|
|
2000
|
+
He = Bn([
|
|
2001
|
+
Ve(0, Ze),
|
|
2002
|
+
Ve(1, pe),
|
|
2003
|
+
Ve(2, K)
|
|
2004
|
+
], He);
|
|
2005
|
+
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) => {
|
|
2006
|
+
for (var r = i > 1 ? void 0 : i ? Hn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
1706
2007
|
(o = n[s]) && (r = o(r) || r);
|
|
1707
2008
|
return r;
|
|
1708
|
-
},
|
|
1709
|
-
const
|
|
1710
|
-
let
|
|
1711
|
-
constructor(e, t, i, r, s, o,
|
|
2009
|
+
}, j = (n, e) => (t, i) => e(t, i, n);
|
|
2010
|
+
const mt = -1e3, _t = 5, Wn = 2;
|
|
2011
|
+
let Fe = class extends De {
|
|
2012
|
+
constructor(e, t, i, r, s, o, c, a, h, l, d, v) {
|
|
1712
2013
|
super();
|
|
1713
2014
|
/**
|
|
1714
2015
|
* It is used to distinguish whether the user has actively moved the cursor in the editor, mainly through mouse clicks.
|
|
@@ -1717,11 +2018,11 @@ let We = class extends Ue {
|
|
|
1717
2018
|
/** If the corresponding unit is active and prepared for editing. */
|
|
1718
2019
|
S(this, "_isUnitEditing", !1);
|
|
1719
2020
|
S(this, "_d");
|
|
1720
|
-
this._renderContext = e, this._layoutService = t, this._undoRedoService = i, this._contextService = r, this._instanceSrv = s, this._renderManagerService = o, this._editorBridgeService =
|
|
2021
|
+
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
2022
|
m && m.getUnitId() === this._renderContext.unitId ? this._d = this._init() : (this._disposeCurrent(), this._isUnitEditing && (this._handleEditorInvisible({
|
|
1722
2023
|
visible: !1,
|
|
1723
|
-
eventType:
|
|
1724
|
-
keycode:
|
|
2024
|
+
eventType: Y.Keyboard,
|
|
2025
|
+
keycode: P.ESC,
|
|
1725
2026
|
unitId: this._renderContext.unitId
|
|
1726
2027
|
}), this._isUnitEditing = !1));
|
|
1727
2028
|
})), this._initEditorVisibilityListener();
|
|
@@ -1734,7 +2035,7 @@ let We = class extends Ue {
|
|
|
1734
2035
|
(e = this._d) == null || e.dispose(), this._d = null;
|
|
1735
2036
|
}
|
|
1736
2037
|
_init() {
|
|
1737
|
-
const e = new
|
|
2038
|
+
const e = new Ke();
|
|
1738
2039
|
return this._subscribeToCurrentCell(e), this._initialKeyboardListener(e), this._initialCursorSync(e), this._listenEditorFocus(e), this._commandExecutedListener(e), setTimeout(() => {
|
|
1739
2040
|
this._cursorStateListener(e);
|
|
1740
2041
|
}, 1e3), e;
|
|
@@ -1751,16 +2052,16 @@ let We = class extends Ue {
|
|
|
1751
2052
|
}
|
|
1752
2053
|
_getEditorSkeleton(e) {
|
|
1753
2054
|
var t;
|
|
1754
|
-
return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(
|
|
2055
|
+
return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(gt).getSkeleton();
|
|
1755
2056
|
}
|
|
1756
2057
|
_getEditorViewModel(e) {
|
|
1757
2058
|
var t;
|
|
1758
|
-
return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(
|
|
2059
|
+
return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(gt).getViewModel();
|
|
1759
2060
|
}
|
|
1760
2061
|
_initialCursorSync(e) {
|
|
1761
|
-
e.add(this._cellEditorManagerService.focus$.pipe(
|
|
2062
|
+
e.add(this._cellEditorManagerService.focus$.pipe(Ki((t) => !!t)).subscribe(() => {
|
|
1762
2063
|
var t;
|
|
1763
|
-
(t =
|
|
2064
|
+
(t = Le(E.UNIVER_DOC, this._instanceSrv, this._renderManagerService)) == null || t.with(dt).sync();
|
|
1764
2065
|
}));
|
|
1765
2066
|
}
|
|
1766
2067
|
/**
|
|
@@ -1770,18 +2071,18 @@ let We = class extends Ue {
|
|
|
1770
2071
|
_subscribeToCurrentCell(e) {
|
|
1771
2072
|
e.add(this._editorBridgeService.currentEditRectState$.subscribe((t) => {
|
|
1772
2073
|
var d;
|
|
1773
|
-
if (t == null || this._contextService.getContextValue(Rt) || this._contextService.getContextValue(
|
|
2074
|
+
if (t == null || this._contextService.getContextValue(Rt) || this._contextService.getContextValue(Ot))
|
|
1774
2075
|
return;
|
|
1775
2076
|
const {
|
|
1776
2077
|
position: { startX: i, endX: r },
|
|
1777
|
-
documentLayoutObject: { textRotation: s, wrapStrategy: o, documentModel:
|
|
1778
|
-
scaleX:
|
|
2078
|
+
documentLayoutObject: { textRotation: s, wrapStrategy: o, documentModel: c },
|
|
2079
|
+
scaleX: a,
|
|
1779
2080
|
editorUnitId: h
|
|
1780
|
-
} = t, { vertexAngle: l } =
|
|
1781
|
-
|
|
2081
|
+
} = t, { vertexAngle: l } = rt(s);
|
|
2082
|
+
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
2083
|
startOffset: 0,
|
|
1783
2084
|
endOffset: 0
|
|
1784
|
-
}]), (d =
|
|
2085
|
+
}]), (d = Le(E.UNIVER_DOC, this._instanceSrv, this._renderManagerService)) == null || d.with(dt).activate(mt, mt);
|
|
1785
2086
|
}));
|
|
1786
2087
|
}
|
|
1787
2088
|
/**
|
|
@@ -1794,7 +2095,7 @@ let We = class extends Ue {
|
|
|
1794
2095
|
* @param scaleY
|
|
1795
2096
|
*/
|
|
1796
2097
|
_fitTextSize(e, t, i, r, s = 1, o = 1) {
|
|
1797
|
-
const { startX:
|
|
2098
|
+
const { startX: c, startY: a, endX: h, endY: l } = e, d = r.documentModel;
|
|
1798
2099
|
if (d == null)
|
|
1799
2100
|
return;
|
|
1800
2101
|
const { actualWidth: v, actualHeight: m } = this._predictingSize(
|
|
@@ -1805,7 +2106,7 @@ let We = class extends Ue {
|
|
|
1805
2106
|
s,
|
|
1806
2107
|
o
|
|
1807
2108
|
), { verticalAlign: p, paddingData: f, fill: g } = r;
|
|
1808
|
-
let _ = h -
|
|
2109
|
+
let _ = h - c, I = l - a;
|
|
1809
2110
|
if (_ < v && (_ = v), I < m)
|
|
1810
2111
|
I = m, d.updateDocumentDataMargin(f);
|
|
1811
2112
|
else {
|
|
@@ -1821,19 +2122,19 @@ let We = class extends Ue {
|
|
|
1821
2122
|
* to determine whether it needs to be automatically widened.
|
|
1822
2123
|
*/
|
|
1823
2124
|
_predictingSize(e, t, i, r, s = 1, o = 1) {
|
|
1824
|
-
const { startX:
|
|
1825
|
-
if (l ===
|
|
2125
|
+
const { startX: c, endX: a } = e, { textRotation: h, wrapStrategy: l } = r, d = r.documentModel, { vertexAngle: v } = rt(h), m = document.body.clientWidth;
|
|
2126
|
+
if (l === tt.WRAP && v === 0) {
|
|
1826
2127
|
const { actualWidth: g, actualHeight: _ } = i.getActualSize();
|
|
1827
2128
|
return {
|
|
1828
2129
|
actualWidth: g * s,
|
|
1829
2130
|
actualHeight: _ * o
|
|
1830
2131
|
};
|
|
1831
2132
|
}
|
|
1832
|
-
d == null || d.updateDocumentDataPageSize((m -
|
|
2133
|
+
d == null || d.updateDocumentDataPageSize((m - c - t.left) / s), i.calculate();
|
|
1833
2134
|
const p = i.getActualSize();
|
|
1834
|
-
let f =
|
|
1835
|
-
return f < p.actualWidth * s +
|
|
1836
|
-
horizontalAlign:
|
|
2135
|
+
let f = a - c;
|
|
2136
|
+
return f < p.actualWidth * s + _t * s && (f = p.actualWidth * s + _t * s), d == null || d.updateDocumentDataPageSize(f / s), d == null || d.updateDocumentRenderConfig({
|
|
2137
|
+
horizontalAlign: wt.UNSPECIFIED,
|
|
1837
2138
|
cellValueType: void 0
|
|
1838
2139
|
}), {
|
|
1839
2140
|
actualWidth: f,
|
|
@@ -1844,10 +2145,10 @@ let We = class extends Ue {
|
|
|
1844
2145
|
* control the size of editing area
|
|
1845
2146
|
*/
|
|
1846
2147
|
// eslint-disable-next-line max-lines-per-function
|
|
1847
|
-
_editAreaProcessing(e, t, i, r, s, o = 1,
|
|
2148
|
+
_editAreaProcessing(e, t, i, r, s, o = 1, c = 1) {
|
|
1848
2149
|
var C;
|
|
1849
|
-
const
|
|
1850
|
-
if (
|
|
2150
|
+
const a = this._getEditorObject();
|
|
2151
|
+
if (a == null)
|
|
1851
2152
|
return;
|
|
1852
2153
|
function h(ce) {
|
|
1853
2154
|
return Number.parseInt(ce.replace("px", ""));
|
|
@@ -1855,27 +2156,27 @@ let We = class extends Ue {
|
|
|
1855
2156
|
const d = this._renderContext.engine.getCanvasElement(), v = d.getBoundingClientRect(), m = h(d.style.width), { top: p, left: f, width: g } = v, _ = g / m;
|
|
1856
2157
|
let { startX: I, startY: b } = i;
|
|
1857
2158
|
I += r.left, b += r.top;
|
|
1858
|
-
const { document: T, scene: M, engine:
|
|
1859
|
-
let
|
|
1860
|
-
|
|
1861
|
-
const { scaleX:
|
|
2159
|
+
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;
|
|
2160
|
+
let A = t, L = R == null ? void 0 : R.getScrollBar();
|
|
2161
|
+
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);
|
|
2162
|
+
const { scaleX: Q, scaleY: ee } = M.getPrecisionScale();
|
|
1862
2163
|
M.transformByState({
|
|
1863
2164
|
width: e * _ / o,
|
|
1864
|
-
height: t * _ /
|
|
2165
|
+
height: t * _ / c,
|
|
1865
2166
|
scaleX: o * _,
|
|
1866
|
-
scaleY:
|
|
1867
|
-
}), T.resize(e / o, t /
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
2167
|
+
scaleY: c * _
|
|
2168
|
+
}), T.resize(e / o, t / c), setTimeout(() => {
|
|
2169
|
+
U.resizeBySize(
|
|
2170
|
+
st(e, Q),
|
|
2171
|
+
st(A, ee)
|
|
1871
2172
|
);
|
|
1872
2173
|
}, 0);
|
|
1873
|
-
const
|
|
1874
|
-
I = I * _ + (
|
|
2174
|
+
const me = this._layoutService.getContentElement().getBoundingClientRect(), _e = d.getBoundingClientRect();
|
|
2175
|
+
I = I * _ + (_e.left - me.left), b = b * _ + (_e.top - me.top), this._cellEditorManagerService.setState({
|
|
1875
2176
|
startX: I,
|
|
1876
2177
|
startY: b,
|
|
1877
2178
|
endX: e * _ + I,
|
|
1878
|
-
endY:
|
|
2179
|
+
endY: A * _ + b,
|
|
1879
2180
|
show: !0
|
|
1880
2181
|
});
|
|
1881
2182
|
}
|
|
@@ -1886,14 +2187,14 @@ let We = class extends Ue {
|
|
|
1886
2187
|
const s = "_backgroundRectHelperColor_", o = e.getObject(s);
|
|
1887
2188
|
o == null && r == null || (o == null ? e.addObjects(
|
|
1888
2189
|
[
|
|
1889
|
-
new
|
|
2190
|
+
new yt(s, {
|
|
1890
2191
|
width: t,
|
|
1891
2192
|
height: i,
|
|
1892
2193
|
fill: r,
|
|
1893
2194
|
evented: !1
|
|
1894
2195
|
})
|
|
1895
2196
|
],
|
|
1896
|
-
|
|
2197
|
+
Fi
|
|
1897
2198
|
) : r == null ? o.dispose() : (o.setProps({
|
|
1898
2199
|
fill: r
|
|
1899
2200
|
}), o.transformByState({
|
|
@@ -1912,7 +2213,7 @@ let We = class extends Ue {
|
|
|
1912
2213
|
_handleEditorVisible(e) {
|
|
1913
2214
|
var g, _;
|
|
1914
2215
|
const { eventType: t } = e;
|
|
1915
|
-
this._cursorChange = [
|
|
2216
|
+
this._cursorChange = [Y.PointerDown, Y.Dblclick].includes(t) ? G.CursorChange : G.StartEditor;
|
|
1916
2217
|
const i = this._editorBridgeService.getEditRectState();
|
|
1917
2218
|
if (i == null)
|
|
1918
2219
|
return;
|
|
@@ -1920,21 +2221,21 @@ let We = class extends Ue {
|
|
|
1920
2221
|
position: r,
|
|
1921
2222
|
documentLayoutObject: s,
|
|
1922
2223
|
slideCardOffset: o,
|
|
1923
|
-
scaleX:
|
|
1924
|
-
scaleY:
|
|
2224
|
+
scaleX: c,
|
|
2225
|
+
scaleY: a,
|
|
1925
2226
|
editorUnitId: h,
|
|
1926
2227
|
unitId: l
|
|
1927
2228
|
} = i, d = this._getEditorObject();
|
|
1928
2229
|
if (d == null)
|
|
1929
2230
|
return;
|
|
1930
2231
|
const { scene: v } = d;
|
|
1931
|
-
this._contextService.setContextValue(
|
|
2232
|
+
this._contextService.setContextValue(xe, !0);
|
|
1932
2233
|
const { documentModel: m } = s, p = this._getEditorSkeleton(h);
|
|
1933
2234
|
if (!p || !m)
|
|
1934
2235
|
return;
|
|
1935
|
-
this._fitTextSize(r, o, p, s,
|
|
2236
|
+
this._fitTextSize(r, o, p, s, c, a);
|
|
1936
2237
|
const f = m.getBody().dataStream.length - 2 || 0;
|
|
1937
|
-
(g = v.getViewport(
|
|
2238
|
+
(g = v.getViewport(ut.VIEW_MAIN)) == null || g.scrollToViewportPos({
|
|
1938
2239
|
viewportScrollX: Number.POSITIVE_INFINITY
|
|
1939
2240
|
}), this._textSelectionManagerService.replaceTextRanges([
|
|
1940
2241
|
{
|
|
@@ -1944,7 +2245,7 @@ let We = class extends Ue {
|
|
|
1944
2245
|
]), (_ = this._renderManagerService.getRenderById(l)) == null || _.scene.resetCursor();
|
|
1945
2246
|
}
|
|
1946
2247
|
_resetBodyStyle(e, t = !1) {
|
|
1947
|
-
e.dataStream =
|
|
2248
|
+
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
2249
|
{
|
|
1949
2250
|
startIndex: 0
|
|
1950
2251
|
}
|
|
@@ -1959,9 +2260,9 @@ let We = class extends Ue {
|
|
|
1959
2260
|
_showEditorByKeyboard(e) {
|
|
1960
2261
|
}
|
|
1961
2262
|
_commandExecutedListener(e) {
|
|
1962
|
-
const t = [
|
|
2263
|
+
const t = [Oe.id], i = [Gi.id];
|
|
1963
2264
|
e.add(this._commandService.onCommandExecuted((r) => {
|
|
1964
|
-
this._editorService.getFocusId() ===
|
|
2265
|
+
this._editorService.getFocusId() === ue && (t.includes(r.id) && this._moveCursorCmdHandler(r), i.includes(r.id) && this._editorBridgeService.isVisible() && this._editingChangedHandler());
|
|
1965
2266
|
}));
|
|
1966
2267
|
}
|
|
1967
2268
|
_moveCursorCmdHandler(e) {
|
|
@@ -1978,7 +2279,7 @@ let We = class extends Ue {
|
|
|
1978
2279
|
this._handleEditorVisible({ visible: !0, eventType: 3, unitId: i });
|
|
1979
2280
|
}
|
|
1980
2281
|
_getEditorObject() {
|
|
1981
|
-
return
|
|
2282
|
+
return kn(this._editorBridgeService.getCurrentEditorId(), this._renderManagerService);
|
|
1982
2283
|
}
|
|
1983
2284
|
async _handleEditorInvisible(e) {
|
|
1984
2285
|
const { keycode: t } = e;
|
|
@@ -1991,7 +2292,7 @@ let We = class extends Ue {
|
|
|
1991
2292
|
this._moveCursor(t);
|
|
1992
2293
|
}
|
|
1993
2294
|
_exitInput(e) {
|
|
1994
|
-
this._contextService.setContextValue(
|
|
2295
|
+
this._contextService.setContextValue(xe, !1), this._cellEditorManagerService.setState({
|
|
1995
2296
|
show: e.visible
|
|
1996
2297
|
});
|
|
1997
2298
|
const t = this._editorBridgeService.getCurrentEditorId();
|
|
@@ -2000,22 +2301,22 @@ let We = class extends Ue {
|
|
|
2000
2301
|
_moveCursor(e) {
|
|
2001
2302
|
if (e != null)
|
|
2002
2303
|
switch (V.LEFT, e) {
|
|
2003
|
-
case
|
|
2304
|
+
case P.ENTER:
|
|
2004
2305
|
V.DOWN;
|
|
2005
2306
|
break;
|
|
2006
|
-
case
|
|
2307
|
+
case P.TAB:
|
|
2007
2308
|
V.RIGHT;
|
|
2008
2309
|
break;
|
|
2009
|
-
case
|
|
2310
|
+
case P.ARROW_DOWN:
|
|
2010
2311
|
V.DOWN;
|
|
2011
2312
|
break;
|
|
2012
|
-
case
|
|
2313
|
+
case P.ARROW_UP:
|
|
2013
2314
|
V.UP;
|
|
2014
2315
|
break;
|
|
2015
|
-
case
|
|
2316
|
+
case P.ARROW_LEFT:
|
|
2016
2317
|
V.LEFT;
|
|
2017
2318
|
break;
|
|
2018
|
-
case
|
|
2319
|
+
case P.ARROW_RIGHT:
|
|
2019
2320
|
V.RIGHT;
|
|
2020
2321
|
break;
|
|
2021
2322
|
}
|
|
@@ -2029,53 +2330,53 @@ let We = class extends Ue {
|
|
|
2029
2330
|
if (!t)
|
|
2030
2331
|
return;
|
|
2031
2332
|
const { document: i } = t;
|
|
2032
|
-
e.add(
|
|
2333
|
+
e.add(xt(i.onPointerDown$.subscribeEvent(() => {
|
|
2033
2334
|
this._cursorChange === G.StartEditor && (this._cursorChange = G.CursorChange);
|
|
2034
2335
|
})));
|
|
2035
2336
|
}
|
|
2036
2337
|
// TODO: @JOCS, is it necessary to move these commands MoveSelectionOperation\MoveCursorOperation to shortcut? and use multi-commands?
|
|
2037
2338
|
_moveInEditor(e, t) {
|
|
2038
2339
|
let i = V.LEFT;
|
|
2039
|
-
e ===
|
|
2340
|
+
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
2341
|
direction: i
|
|
2041
|
-
}) : this._commandService.executeCommand(
|
|
2342
|
+
}) : this._commandService.executeCommand(ki.id, {
|
|
2042
2343
|
direction: i
|
|
2043
2344
|
});
|
|
2044
2345
|
}
|
|
2045
2346
|
};
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
],
|
|
2059
|
-
function
|
|
2347
|
+
Fe = Fn([
|
|
2348
|
+
j(1, ji),
|
|
2349
|
+
j(2, fi),
|
|
2350
|
+
j(3, pe),
|
|
2351
|
+
j(4, w),
|
|
2352
|
+
j(5, K),
|
|
2353
|
+
j(6, et),
|
|
2354
|
+
j(7, Qe),
|
|
2355
|
+
j(8, z(Zi)),
|
|
2356
|
+
j(9, D),
|
|
2357
|
+
j(10, z(J)),
|
|
2358
|
+
j(11, Ze)
|
|
2359
|
+
], Fe);
|
|
2360
|
+
function kn(n, e) {
|
|
2060
2361
|
if (n == null)
|
|
2061
2362
|
return;
|
|
2062
2363
|
const t = e.getRenderById(n);
|
|
2063
2364
|
if (t == null)
|
|
2064
2365
|
return;
|
|
2065
|
-
const { mainComponent: i, scene: r, engine: s, components: o } = t,
|
|
2366
|
+
const { mainComponent: i, scene: r, engine: s, components: o } = t, c = i, a = o.get(zi.BACKGROUND);
|
|
2066
2367
|
return {
|
|
2067
|
-
document:
|
|
2068
|
-
docBackground:
|
|
2368
|
+
document: c,
|
|
2369
|
+
docBackground: a,
|
|
2069
2370
|
scene: r,
|
|
2070
2371
|
engine: s
|
|
2071
2372
|
};
|
|
2072
2373
|
}
|
|
2073
|
-
var
|
|
2074
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
2374
|
+
var zn = Object.getOwnPropertyDescriptor, Kn = (n, e, t, i) => {
|
|
2375
|
+
for (var r = i > 1 ? void 0 : i ? zn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
2075
2376
|
(o = n[s]) && (r = o(r) || r);
|
|
2076
2377
|
return r;
|
|
2077
|
-
},
|
|
2078
|
-
let
|
|
2378
|
+
}, je = (n, e) => (t, i) => e(t, i, n);
|
|
2379
|
+
let We = class extends fe {
|
|
2079
2380
|
constructor(e, t, i, r) {
|
|
2080
2381
|
super();
|
|
2081
2382
|
/**
|
|
@@ -2084,7 +2385,7 @@ let ke = class extends pe {
|
|
|
2084
2385
|
// private _cursorChange: CursorChange = CursorChange.InitialState;
|
|
2085
2386
|
/** If the corresponding unit is active and prepared for editing. */
|
|
2086
2387
|
// private _isUnitEditing = false;
|
|
2087
|
-
S(this, "setSlideTextEditor$", new
|
|
2388
|
+
S(this, "setSlideTextEditor$", new Ut());
|
|
2088
2389
|
S(this, "_curRichText", null);
|
|
2089
2390
|
S(this, "_d");
|
|
2090
2391
|
this._renderContext = e, this._instanceSrv = t, this._commandService = i, this._editorBridgeService = r, this.disposeWithMe(this._instanceSrv.getCurrentTypeOfUnit$(E.UNIVER_SLIDE).subscribe((s) => {
|
|
@@ -2092,7 +2393,7 @@ let ke = class extends pe {
|
|
|
2092
2393
|
}));
|
|
2093
2394
|
}
|
|
2094
2395
|
_init() {
|
|
2095
|
-
const e = new
|
|
2396
|
+
const e = new Ke();
|
|
2096
2397
|
return this._initEventListener(e), e;
|
|
2097
2398
|
}
|
|
2098
2399
|
_disposeCurrent() {
|
|
@@ -2112,16 +2413,16 @@ let ke = class extends pe {
|
|
|
2112
2413
|
}
|
|
2113
2414
|
_initEventListener(e) {
|
|
2114
2415
|
const t = (o) => {
|
|
2115
|
-
const
|
|
2116
|
-
|
|
2416
|
+
const c = o.getTransformer();
|
|
2417
|
+
c && (e.add(c.clearControl$.subscribe(() => {
|
|
2117
2418
|
this.setEditorVisible(!1), this.pickOtherObjects();
|
|
2118
|
-
})), e.add(
|
|
2419
|
+
})), e.add(c.createControl$.subscribe(() => {
|
|
2119
2420
|
this.setEditorVisible(!1);
|
|
2120
2421
|
})), e.add(o.onDblclick$.subscribeEvent(() => {
|
|
2121
|
-
|
|
2122
|
-
const h =
|
|
2123
|
-
h && (h.objectType !==
|
|
2124
|
-
})), e.add(this._instanceSrv.focused$.subscribe((
|
|
2422
|
+
c.clearControls();
|
|
2423
|
+
const h = c.getSelectedObjectMap().values().next().value;
|
|
2424
|
+
h && (h.objectType !== de.RICH_TEXT ? this.pickOtherObjects() : this.startEditing(o.sceneKey, h));
|
|
2425
|
+
})), e.add(this._instanceSrv.focused$.subscribe((a) => {
|
|
2125
2426
|
this.endEditing();
|
|
2126
2427
|
})));
|
|
2127
2428
|
}, { mainComponent: i } = this._renderContext;
|
|
@@ -2130,8 +2431,8 @@ let ke = class extends pe {
|
|
|
2130
2431
|
});
|
|
2131
2432
|
const s = Array.from(i.getSubScenes().values());
|
|
2132
2433
|
for (let o = 0; o < s.length; o++) {
|
|
2133
|
-
const
|
|
2134
|
-
t(
|
|
2434
|
+
const c = s[o];
|
|
2435
|
+
t(c);
|
|
2135
2436
|
}
|
|
2136
2437
|
}
|
|
2137
2438
|
pickOtherObjects() {
|
|
@@ -2155,10 +2456,10 @@ let ke = class extends pe {
|
|
|
2155
2456
|
text: e.text
|
|
2156
2457
|
}, r = (s = e.documentData.body) == null ? void 0 : s.textRuns;
|
|
2157
2458
|
if (r && r.length) {
|
|
2158
|
-
const
|
|
2159
|
-
i.cl =
|
|
2459
|
+
const c = r[0].ts;
|
|
2460
|
+
i.cl = c == null ? void 0 : c.cl;
|
|
2160
2461
|
}
|
|
2161
|
-
this._commandService.executeCommand(
|
|
2462
|
+
this._commandService.executeCommand(B.id, {
|
|
2162
2463
|
unitId: this._renderContext.unitId,
|
|
2163
2464
|
oKey: e == null ? void 0 : e.oKey,
|
|
2164
2465
|
props: {
|
|
@@ -2180,20 +2481,20 @@ let ke = class extends pe {
|
|
|
2180
2481
|
var i, r;
|
|
2181
2482
|
e ? (i = this._curRichText) == null || i.hide() : (r = this._curRichText) == null || r.show();
|
|
2182
2483
|
const { unitId: t } = this._renderContext;
|
|
2183
|
-
this._editorBridgeService.changeVisible({ visible: e, eventType:
|
|
2484
|
+
this._editorBridgeService.changeVisible({ visible: e, eventType: Y.PointerDown, unitId: t });
|
|
2184
2485
|
}
|
|
2185
2486
|
};
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
],
|
|
2191
|
-
var
|
|
2192
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
2487
|
+
We = Kn([
|
|
2488
|
+
je(1, w),
|
|
2489
|
+
je(2, D),
|
|
2490
|
+
je(3, et)
|
|
2491
|
+
], We);
|
|
2492
|
+
var Zn = Object.getOwnPropertyDescriptor, Gn = (n, e, t, i) => {
|
|
2493
|
+
for (var r = i > 1 ? void 0 : i ? Zn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
2193
2494
|
(o = n[s]) && (r = o(r) || r);
|
|
2194
2495
|
return r;
|
|
2195
|
-
},
|
|
2196
|
-
let
|
|
2496
|
+
}, Ae = (n, e) => (t, i) => e(t, i, n);
|
|
2497
|
+
let Me = class extends fe {
|
|
2197
2498
|
// private _skeletonChangeMutations = new Set<string>();
|
|
2198
2499
|
constructor(n, e, t) {
|
|
2199
2500
|
super(), this._contextService = n, this._instanceSrv = e, this._renderManagerService = t, Promise.resolve().then(() => this._init());
|
|
@@ -2202,11 +2503,11 @@ let Ne = class extends pe {
|
|
|
2202
2503
|
this._initSlideDataListener(), this._initContextListener();
|
|
2203
2504
|
}
|
|
2204
2505
|
_initSlideDataListener() {
|
|
2205
|
-
this._instanceSrv.getTypeOfUnitAdded$(E.UNIVER_SLIDE).pipe(
|
|
2506
|
+
this._instanceSrv.getTypeOfUnitAdded$(E.UNIVER_SLIDE).pipe(ht(this.dispose$)).subscribe((n) => {
|
|
2206
2507
|
this._createRenderer(n == null ? void 0 : n.getUnitId());
|
|
2207
2508
|
}), this._instanceSrv.getAllUnitsForType(E.UNIVER_SLIDE).forEach((n) => {
|
|
2208
2509
|
this._createRenderer(n.getUnitId());
|
|
2209
|
-
}), this._instanceSrv.getTypeOfUnitDisposed$(E.UNIVER_SLIDE).pipe(
|
|
2510
|
+
}), this._instanceSrv.getTypeOfUnitDisposed$(E.UNIVER_SLIDE).pipe(ht(this.dispose$)).subscribe((n) => this._disposeRenderer(n));
|
|
2210
2511
|
}
|
|
2211
2512
|
_createRenderer(n) {
|
|
2212
2513
|
n == null || this._instanceSrv.getUnit(n, E.UNIVER_SLIDE) == null || this._renderManagerService.createRender(n);
|
|
@@ -2218,45 +2519,45 @@ let Ne = class extends pe {
|
|
|
2218
2519
|
_initContextListener() {
|
|
2219
2520
|
}
|
|
2220
2521
|
};
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
],
|
|
2226
|
-
var
|
|
2227
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
2522
|
+
Me = Gn([
|
|
2523
|
+
Ae(0, pe),
|
|
2524
|
+
Ae(1, w),
|
|
2525
|
+
Ae(2, K)
|
|
2526
|
+
], Me);
|
|
2527
|
+
var Xn = Object.getOwnPropertyDescriptor, Yn = (n, e, t, i) => {
|
|
2528
|
+
for (var r = i > 1 ? void 0 : i ? Xn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
2228
2529
|
(o = n[s]) && (r = o(r) || r);
|
|
2229
2530
|
return r;
|
|
2230
|
-
},
|
|
2231
|
-
const
|
|
2232
|
-
var
|
|
2233
|
-
let
|
|
2234
|
-
constructor(n =
|
|
2531
|
+
}, Ie = (n, e) => (t, i) => e(t, i, n);
|
|
2532
|
+
const qn = "SLIDE_UI";
|
|
2533
|
+
var be;
|
|
2534
|
+
let Ct = (be = class extends _i {
|
|
2535
|
+
constructor(n = ft, e, t, i, r) {
|
|
2235
2536
|
super(), this._config = n, this._injector = e, this._renderManagerService = t, this._univerInstanceService = i, this._configService = r;
|
|
2236
|
-
const { menu: s, ...o } =
|
|
2537
|
+
const { menu: s, ...o } = St(
|
|
2237
2538
|
{},
|
|
2238
|
-
|
|
2539
|
+
ft,
|
|
2239
2540
|
this._config
|
|
2240
2541
|
);
|
|
2241
|
-
s && this._configService.setConfig("menu", s, { merge: !0 }), this._configService.setConfig(
|
|
2542
|
+
s && this._configService.setConfig("menu", s, { merge: !0 }), this._configService.setConfig(Dn, o);
|
|
2242
2543
|
}
|
|
2243
2544
|
onStarting() {
|
|
2244
|
-
|
|
2245
|
-
[
|
|
2246
|
-
[
|
|
2545
|
+
it([
|
|
2546
|
+
[Me],
|
|
2547
|
+
[et, { useClass: He }],
|
|
2247
2548
|
// used by SlideUIController --> EditorContainer
|
|
2248
|
-
[
|
|
2249
|
-
[
|
|
2549
|
+
[Qe, { useClass: On }],
|
|
2550
|
+
[ye]
|
|
2250
2551
|
], this._config.override).forEach((n) => this._injector.add(n));
|
|
2251
2552
|
}
|
|
2252
2553
|
onReady() {
|
|
2253
2554
|
[
|
|
2254
2555
|
// SlideRenderService will be init in ready stage, and then calling RenderManagerService@createRender --> init all deps in this rendering register block.
|
|
2255
|
-
[
|
|
2556
|
+
[ve]
|
|
2256
2557
|
].forEach((n) => {
|
|
2257
2558
|
this.disposeWithMe(this._renderManagerService.registerRenderModule(E.UNIVER_SLIDE, n));
|
|
2258
|
-
}),
|
|
2259
|
-
[
|
|
2559
|
+
}), it([
|
|
2560
|
+
[y],
|
|
2260
2561
|
// cannot register in _renderManagerService now.
|
|
2261
2562
|
// [ISlideEditorBridgeService, { useClass: SlideEditorBridgeService }],
|
|
2262
2563
|
// // used by SlideUIController --> EditorContainer
|
|
@@ -2265,24 +2566,24 @@ let St = (Ee = class extends Ci {
|
|
|
2265
2566
|
// SlidesUIController controller would add a new RenderUnit (__INTERNAL_EDITOR__DOCS_NORMAL)
|
|
2266
2567
|
[Pe],
|
|
2267
2568
|
// editor service was create in renderManagerService
|
|
2268
|
-
[
|
|
2269
|
-
[
|
|
2569
|
+
[ve],
|
|
2570
|
+
[Te]
|
|
2270
2571
|
], this._config.override).forEach((n) => {
|
|
2271
2572
|
this._injector.add(n);
|
|
2272
|
-
}), this._injector.get(
|
|
2573
|
+
}), this._injector.get(y), this._injector.get(Me);
|
|
2273
2574
|
}
|
|
2274
2575
|
onRendered() {
|
|
2275
2576
|
[
|
|
2276
2577
|
// need slideEditorBridgeService
|
|
2277
2578
|
// need TextSelectionRenderService which init by EditorContainer
|
|
2278
|
-
[
|
|
2279
|
-
[
|
|
2579
|
+
[We],
|
|
2580
|
+
[Fe]
|
|
2280
2581
|
].forEach((n) => {
|
|
2281
2582
|
this.disposeWithMe(this._renderManagerService.registerRenderModule(E.UNIVER_SLIDE, n));
|
|
2282
2583
|
}), this._markSlideAsFocused(), this._injector.get(Pe);
|
|
2283
2584
|
}
|
|
2284
2585
|
onSteady() {
|
|
2285
|
-
this._injector.get(
|
|
2586
|
+
this._injector.get(Te);
|
|
2286
2587
|
}
|
|
2287
2588
|
_markSlideAsFocused() {
|
|
2288
2589
|
const n = this._univerInstanceService;
|
|
@@ -2292,35 +2593,35 @@ let St = (Ee = class extends Ci {
|
|
|
2292
2593
|
} catch {
|
|
2293
2594
|
}
|
|
2294
2595
|
}
|
|
2295
|
-
}, S(
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
],
|
|
2596
|
+
}, S(be, "pluginName", qn), S(be, "type", E.UNIVER_SLIDE), be);
|
|
2597
|
+
Ct = Yn([
|
|
2598
|
+
Ie(1, z(ke)),
|
|
2599
|
+
Ie(2, K),
|
|
2600
|
+
Ie(3, w),
|
|
2601
|
+
Ie(4, Ci)
|
|
2602
|
+
], Ct);
|
|
2302
2603
|
export {
|
|
2303
2604
|
Vt as ActivateSlidePageOperation,
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2605
|
+
jt as AppendSlideOperation,
|
|
2606
|
+
y as CanvasView,
|
|
2607
|
+
At as DeleteSlideElementOperation,
|
|
2608
|
+
et as ISlideEditorBridgeService,
|
|
2308
2609
|
Ge as InsertSlideFloatImageCommand,
|
|
2309
|
-
|
|
2610
|
+
qe as InsertSlideShapeEllipseCommand,
|
|
2310
2611
|
Gt as InsertSlideShapeEllipseOperation,
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2612
|
+
Ye as InsertSlideShapeRectangleCommand,
|
|
2613
|
+
Zt as InsertSlideShapeRectangleOperation,
|
|
2614
|
+
Jt as SHAPE_MENU_ID,
|
|
2615
|
+
qt as SLIDES_IMAGE_MENU_ID,
|
|
2616
|
+
ue as SLIDE_EDITOR_ID,
|
|
2617
|
+
Yt as SetSlidePageThumbOperation,
|
|
2618
|
+
Je as SlideAddTextCommand,
|
|
2619
|
+
Xt as SlideAddTextOperation,
|
|
2620
|
+
ye as SlideCanvasPopMangerService,
|
|
2621
|
+
wn as SlideEditorContainer,
|
|
2622
|
+
mn as SlideSideBar,
|
|
2322
2623
|
Pe as SlidesUIController,
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2624
|
+
xn as SlidesUIMenuSchema,
|
|
2625
|
+
Ct as UniverSlidesUIPlugin,
|
|
2626
|
+
B as UpdateSlideElementOperation
|
|
2326
2627
|
};
|