@univerjs/slides-ui 0.6.1-nightly.202502241606 → 0.6.1-nightly.202502261607
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 +3 -3
- package/lib/es/index.js +233 -244
- package/lib/types/components/image-popup-menu/ImagePopupMenu.d.ts +1 -2
- package/lib/umd/index.js +3 -3
- package/package.json +11 -11
package/lib/es/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var I = (i, e, t) =>
|
|
4
|
-
import { Inject as X, Injector as ke, IUniverInstanceService as T, RxDisposable as pe, UniverInstanceType as E, debounce as
|
|
5
|
-
import { IRenderManagerService as Y, Viewport as it, ScrollBar as xt, Slide as
|
|
6
|
-
import { ObjectProvider as
|
|
7
|
-
import { useDependency as x, ISidebarService as Tt, ICanvasPopupService as
|
|
1
|
+
var ln = Object.defineProperty;
|
|
2
|
+
var dn = (i, e, t) => e in i ? ln(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
|
+
var I = (i, e, t) => dn(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { Inject as X, Injector as ke, IUniverInstanceService as T, RxDisposable as pe, UniverInstanceType as E, debounce as un, getColorStyle as gn, CommandType as V, Tools as hn, LocaleService as ee, ICommandService as B, generateRandomId as St, BasicShapes as mn, PageElementType as Ke, Disposable as Ve, DisposableCollection as Ge, IContextService as Ce, toDisposable as It, FOCUSING_COMMON_DRAWINGS as vn, createInternalEditorID as pn, createIdentifier as bt, EDITOR_ACTIVATED as xe, FOCUSING_EDITOR_STANDALONE as Pt, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE as Et, DocumentDataModel as Cn, HorizontalAlign as Rt, VerticalAlign as ye, IUndoRedoService as fn, WrapStrategy as tt, FOCUSING_EDITOR_BUT_HIDDEN as _n, DEFAULT_EMPTY_DOCUMENT_VALUE as Sn, Direction as L, DocumentFlavor as In, FOCUSING_UNIVER_EDITOR as Ot, FORMULA_EDITOR_ACTIVATED as bn, Plugin as Pn, merge as En, mergeOverrideWithDependencies as nt, IConfigService as Rn } from "@univerjs/core";
|
|
5
|
+
import { IRenderManagerService as Y, Viewport as it, ScrollBar as xt, Slide as On, Rect as yt, Scene as xn, ObjectType as ge, pxToNum as yn, DeviceInputEventType as J, convertTextRotation as rt, FIX_ONE_PIXEL_BLUR_OFFSET as se, fixLineWidthByScale as st } from "@univerjs/engine-render";
|
|
6
|
+
import { ObjectProvider as Tn, SLIDE_KEY as oe } from "@univerjs/slides";
|
|
7
|
+
import { useDependency as x, ISidebarService as Tt, ICanvasPopupService as Mn, ILayoutService as wn, KeyCode as M, ILocalFileService as Nn, useObservable as Dn, DISABLE_AUTO_FOCUS_KEY as ot, getMenuHiddenObservable as fe, MenuItemType as _e, RibbonStartGroup as Un, MetaKeys as Vn, IMenuManagerService as Bn, ComponentManager as jn, IUIPartsService as Ln, IShortcutService as An, BuiltInUIPart as at, connectInjector as ct } from "@univerjs/ui";
|
|
8
8
|
import { jsxs as R, jsx as u } from "react/jsx-runtime";
|
|
9
|
-
import { Button as be, Dropdown as Mt, ColorPicker as
|
|
10
|
-
import wt, { forwardRef as $, useRef as Nt, createElement as H, useState as G, useEffect as me, useMemo as
|
|
11
|
-
import { BehaviorSubject as Q, Subject as Dt, filter as
|
|
12
|
-
import { DocSelectionManagerService as
|
|
13
|
-
import { IEditorService as Xe, DocSelectionRenderService as gt, VIEWPORT_KEY as ht, DOCS_COMPONENT_MAIN_LAYER_INDEX as
|
|
14
|
-
import { DRAWING_IMAGE_ALLOW_IMAGE_LIST as
|
|
15
|
-
var
|
|
16
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
9
|
+
import { clsx as y, Button as be, Dropdown as Mt, ColorPicker as $n, InputNumber as de, Scrollbar as Hn } from "@univerjs/design";
|
|
10
|
+
import wt, { forwardRef as $, useRef as Nt, createElement as H, useState as G, useEffect as me, useMemo as Fn, useCallback as lt } from "react";
|
|
11
|
+
import { BehaviorSubject as Q, Subject as Dt, filter as zn, takeUntil as dt } from "rxjs";
|
|
12
|
+
import { DocSelectionManagerService as Wn, DocSkeletonManagerService as ut, RichTextEditingMutation as kn } from "@univerjs/docs";
|
|
13
|
+
import { IEditorService as Xe, DocSelectionRenderService as gt, VIEWPORT_KEY as ht, DOCS_COMPONENT_MAIN_LAYER_INDEX as Kn, MoveSelectionOperation as Gn, MoveCursorOperation as Xn, DOCS_VIEW_KEY as Yn, DeleteLeftCommand as Zn } from "@univerjs/docs-ui";
|
|
14
|
+
import { DRAWING_IMAGE_ALLOW_IMAGE_LIST as qn, IImageIoService as Jn, getImageSize as Qn } from "@univerjs/drawing";
|
|
15
|
+
var ei = Object.getOwnPropertyDescriptor, ti = (i, e, t, n) => {
|
|
16
|
+
for (var r = n > 1 ? void 0 : n ? ei(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
17
17
|
(o = i[s]) && (r = o(r) || r);
|
|
18
18
|
return r;
|
|
19
19
|
}, Be = (i, e) => (t, n) => e(t, n, i);
|
|
@@ -21,10 +21,10 @@ let ve = class extends pe {
|
|
|
21
21
|
constructor(e, t, n, r) {
|
|
22
22
|
super();
|
|
23
23
|
I(this, "_objectProvider", null);
|
|
24
|
-
I(this, "_refreshThumb",
|
|
24
|
+
I(this, "_refreshThumb", un(() => {
|
|
25
25
|
this.createThumbs();
|
|
26
26
|
}, 300));
|
|
27
|
-
this._renderContext = e, this._injector = t, this._univerInstanceService = n, this._renderManagerService = r, this._objectProvider = this._injector.createInstance(
|
|
27
|
+
this._renderContext = e, this._injector = t, this._univerInstanceService = n, this._renderManagerService = r, this._objectProvider = this._injector.createInstance(Tn), this._addNewRender();
|
|
28
28
|
}
|
|
29
29
|
_addNewRender() {
|
|
30
30
|
const { unitId: e, engine: t, scene: n } = this._renderContext, r = this._getCurrUnitModel();
|
|
@@ -79,7 +79,7 @@ let ve = class extends pe {
|
|
|
79
79
|
* @param mainScene
|
|
80
80
|
*/
|
|
81
81
|
_createSlide(e) {
|
|
82
|
-
const t = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE), { width: n, height: r } = e, s = t.getPageSize(), { width: o = 100, height: a = 100 } = s, c = new
|
|
82
|
+
const t = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE), { width: n, height: r } = e, s = t.getPageSize(), { width: o = 100, height: a = 100 } = s, c = new On(oe.COMPONENT, {
|
|
83
83
|
left: (n - o) / 2,
|
|
84
84
|
top: (r - a) / 2,
|
|
85
85
|
width: o,
|
|
@@ -96,7 +96,7 @@ let ve = class extends pe {
|
|
|
96
96
|
height: o,
|
|
97
97
|
strokeWidth: 1,
|
|
98
98
|
stroke: "rgba(198,198,198,1)",
|
|
99
|
-
fill:
|
|
99
|
+
fill: gn(t) || "rgba(255,255,255,1)",
|
|
100
100
|
zIndex: 0,
|
|
101
101
|
evented: !1
|
|
102
102
|
});
|
|
@@ -183,7 +183,7 @@ let ve = class extends pe {
|
|
|
183
183
|
const n = this._renderContext;
|
|
184
184
|
if (!n || !this._objectProvider)
|
|
185
185
|
return;
|
|
186
|
-
const { scene: r, mainComponent: s } = n, o = s, { width: a, height: c } = o, h = new
|
|
186
|
+
const { scene: r, mainComponent: s } = n, o = s, { width: a, height: c } = o, h = new xn(e, o, {
|
|
187
187
|
width: a,
|
|
188
188
|
height: c
|
|
189
189
|
});
|
|
@@ -249,16 +249,16 @@ let ve = class extends pe {
|
|
|
249
249
|
s && o && s.addPageScene(o), e.appendPage(t), e.setActivePage(t);
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
|
-
ve =
|
|
252
|
+
ve = ti([
|
|
253
253
|
Be(1, X(ke)),
|
|
254
254
|
Be(2, T),
|
|
255
255
|
Be(3, Y)
|
|
256
256
|
], ve);
|
|
257
|
-
var
|
|
258
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
257
|
+
var ni = Object.getOwnPropertyDescriptor, ii = (i, e, t, n) => {
|
|
258
|
+
for (var r = n > 1 ? void 0 : n ? ni(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
259
259
|
(o = i[s]) && (r = o(r) || r);
|
|
260
260
|
return r;
|
|
261
|
-
},
|
|
261
|
+
}, ri = (i, e) => (t, n) => e(t, n, i);
|
|
262
262
|
let N = class extends pe {
|
|
263
263
|
constructor(i) {
|
|
264
264
|
super(), this._renderManagerService = i;
|
|
@@ -291,10 +291,10 @@ let N = class extends pe {
|
|
|
291
291
|
this._getSlideRenderControllerFromRenderUnit(i).appendPage();
|
|
292
292
|
}
|
|
293
293
|
};
|
|
294
|
-
N =
|
|
295
|
-
|
|
294
|
+
N = ii([
|
|
295
|
+
ri(0, Y)
|
|
296
296
|
], N);
|
|
297
|
-
const
|
|
297
|
+
const si = "slides-ui.config", mt = {}, Ut = {
|
|
298
298
|
id: "slide.operation.delete-element",
|
|
299
299
|
type: V.OPERATION,
|
|
300
300
|
handler: (i, e) => {
|
|
@@ -313,7 +313,7 @@ var U = function() {
|
|
|
313
313
|
}
|
|
314
314
|
return i;
|
|
315
315
|
}, U.apply(this, arguments);
|
|
316
|
-
},
|
|
316
|
+
}, oi = function(i, e) {
|
|
317
317
|
var t = {};
|
|
318
318
|
for (var n in i) Object.prototype.hasOwnProperty.call(i, n) && e.indexOf(n) < 0 && (t[n] = i[n]);
|
|
319
319
|
if (i != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -321,15 +321,15 @@ var U = function() {
|
|
|
321
321
|
e.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(i, n[r]) && (t[n[r]] = i[n[r]]);
|
|
322
322
|
return t;
|
|
323
323
|
}, F = $(function(i, e) {
|
|
324
|
-
var t = i.icon, n = i.id, r = i.className, s = i.extend, o =
|
|
324
|
+
var t = i.icon, n = i.id, r = i.className, s = i.extend, o = oi(i, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(n, " ").concat(r || "").trim(), c = Nt("_".concat(li()));
|
|
325
325
|
return Vt(t, "".concat(n), { defIds: t.defIds, idSuffix: c.current }, U({ ref: e, className: a }, o), s);
|
|
326
326
|
});
|
|
327
327
|
function Vt(i, e, t, n, r) {
|
|
328
|
-
return H(i.tag, U(U({ key: e },
|
|
328
|
+
return H(i.tag, U(U({ key: e }, ai(i, t, r)), n), (ci(i, t).children || []).map(function(s, o) {
|
|
329
329
|
return Vt(s, "".concat(e, "-").concat(i.tag, "-").concat(o), t, void 0, r);
|
|
330
330
|
}));
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function ai(i, e, t) {
|
|
333
333
|
var n = U({}, i.attrs);
|
|
334
334
|
t != null && t.colorChannel1 && n.fill === "colorChannel1" && (n.fill = t.colorChannel1), i.tag === "mask" && n.id && (n.id = n.id + e.idSuffix), Object.entries(n).forEach(function(s) {
|
|
335
335
|
var o = s[0], a = s[1];
|
|
@@ -341,109 +341,96 @@ function ci(i, e, t) {
|
|
|
341
341
|
typeof a == "string" && (n[o] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
342
342
|
})), n;
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function ci(i, e) {
|
|
345
345
|
var t, n = e.defIds;
|
|
346
346
|
return !n || n.length === 0 ? i : i.tag === "defs" && (!((t = i.children) === null || t === void 0) && t.length) ? U(U({}, i), { children: i.children.map(function(r) {
|
|
347
347
|
return typeof r.attrs.id == "string" && n && n.indexOf(r.attrs.id) > -1 ? U(U({}, r), { attrs: U(U({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
|
|
348
348
|
}) }) : i;
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function li() {
|
|
351
351
|
return Math.random().toString(36).substring(2, 8);
|
|
352
352
|
}
|
|
353
353
|
F.displayName = "UniverIcon";
|
|
354
|
-
var
|
|
354
|
+
var di = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.2498 3.65005C2.2498 2.87685 2.87661 2.25005 3.64981 2.25005H7.9998C8.33118 2.25005 8.5998 1.98142 8.5998 1.65005C8.5998 1.31868 8.33118 1.05005 7.9998 1.05005H3.64981C2.21387 1.05005 1.0498 2.21411 1.0498 3.65005V12.35C1.0498 13.786 2.21386 14.95 3.6498 14.95H12.3498C13.7857 14.95 14.9498 13.786 14.9498 12.3501V8.00005C14.9498 7.66868 14.6812 7.40005 14.3498 7.40005C14.0184 7.40005 13.7498 7.66868 13.7498 8.00005V9.23974L12.2385 8.1063C11.7252 7.72129 11.0068 7.7723 10.5531 8.22605L9.00869 9.77041L6.73916 7.8251C6.24387 7.40055 5.5095 7.41278 5.02864 7.85359L2.2498 10.4009V3.65005ZM2.2498 12.0287V12.35C2.2498 13.1232 2.87661 13.75 3.6498 13.75H12.3498C13.123 13.75 13.7498 13.1232 13.7498 12.3501V10.7397L11.5186 9.06631C11.4829 9.03956 11.433 9.04314 11.4016 9.07458L9.92249 10.5537L11.1015 11.5642C11.3531 11.7799 11.3822 12.1587 11.1666 12.4103C10.9509 12.6619 10.5721 12.691 10.3205 12.4753L5.9582 8.7362C5.92384 8.70674 5.87288 8.70758 5.83952 8.73816L2.2498 12.0287Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M11.8097 1.14783C12.1411 1.14783 12.4097 1.41646 12.4097 1.74783V3.297H14.1541C14.4855 3.297 14.7541 3.56563 14.7541 3.897C14.7541 4.22837 14.4855 4.497 14.1541 4.497H12.4097V6.24167C12.4097 6.57304 12.1411 6.84167 11.8097 6.84167C11.4783 6.84167 11.2097 6.57304 11.2097 6.24167V4.497H9.6603C9.32893 4.497 9.0603 4.22837 9.0603 3.897C9.0603 3.56563 9.32893 3.297 9.6603 3.297H11.2097V1.74783C11.2097 1.41646 11.4783 1.14783 11.8097 1.14783Z" } }] }, Bt = $(function(i, e) {
|
|
355
355
|
return H(F, Object.assign({}, i, {
|
|
356
356
|
id: "add-image-single",
|
|
357
357
|
ref: e,
|
|
358
|
-
icon:
|
|
358
|
+
icon: di
|
|
359
359
|
}));
|
|
360
360
|
});
|
|
361
361
|
Bt.displayName = "AddImageSingle";
|
|
362
|
-
var
|
|
362
|
+
var ui = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "colorChannel1", d: "M11.0363 12.2367V14.0367C11.0363 14.3681 11.3049 14.6367 11.6363 14.6367C11.9676 14.6367 12.2363 14.3681 12.2363 14.0367V12.2367H14.0364C14.3677 12.2367 14.6364 11.9681 14.6364 11.6367C14.6364 11.3054 14.3677 11.0367 14.0364 11.0367H12.2363V9.23672C12.2363 8.90535 11.9676 8.63672 11.6363 8.63672C11.3049 8.63672 11.0363 8.90535 11.0363 9.23672V11.0367H9.23635C8.90498 11.0367 8.63635 11.3054 8.63635 11.6367C8.63635 11.9681 8.90498 12.2367 9.23635 12.2367H11.0363Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2.56365 1.36377C1.90091 1.36377 1.36365 1.90103 1.36365 2.56377V6.16377C1.36365 6.82651 1.90091 7.36377 2.56365 7.36377H6.16365C6.82639 7.36377 7.36365 6.82651 7.36365 6.16377V2.56377C7.36365 1.90103 6.82639 1.36377 6.16365 1.36377H2.56365zM6.16365 2.56377H2.56365L2.56365 6.16377H6.16365V2.56377zM2.56365 8.63647C1.90091 8.63647 1.36365 9.17373 1.36365 9.83647V13.4365C1.36365 14.0992 1.90091 14.6365 2.56365 14.6365H6.16365C6.82639 14.6365 7.36365 14.0992 7.36365 13.4365V9.83647C7.36365 9.17373 6.82639 8.63647 6.16365 8.63647H2.56365zM6.16365 9.83647H2.56365L2.56365 13.4365H6.16365V9.83647zM9.83635 7.36377C9.17361 7.36377 8.63635 6.82651 8.63635 6.16377V2.56377C8.63635 1.90103 9.17361 1.36377 9.83635 1.36377H13.4364C14.0991 1.36377 14.6364 1.90103 14.6364 2.56377V6.16377C14.6364 6.82651 14.0991 7.36377 13.4364 7.36377H9.83635zM9.83635 6.16377V2.56377L13.4364 2.56377V6.16377H9.83635z", fillRule: "evenodd", clipRule: "evenodd" } }] }, jt = $(function(i, e) {
|
|
363
363
|
return H(F, Object.assign({}, i, {
|
|
364
364
|
id: "autofill",
|
|
365
365
|
ref: e,
|
|
366
|
-
icon:
|
|
366
|
+
icon: ui
|
|
367
367
|
}));
|
|
368
368
|
});
|
|
369
369
|
jt.displayName = "Autofill";
|
|
370
|
-
var
|
|
370
|
+
var gi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M14.0045 4.4334C14.8881 4.4334 15.6045 3.71705 15.6045 2.8334 15.6045 1.94974 14.8881 1.2334 14.0045 1.2334H3.70449C2.82084 1.2334 2.10449 1.94974 2.10449 2.8334 2.10449 3.71705 2.82084 4.4334 3.70449 4.4334H14.0045zM14.4045 2.8334C14.4045 3.05431 14.2254 3.2334 14.0045 3.2334H3.70449C3.48358 3.2334 3.30449 3.05431 3.30449 2.8334 3.30449 2.61248 3.48358 2.4334 3.70449 2.4334H14.0045C14.2254 2.4334 14.4045 2.61249 14.4045 2.8334zM14.1544 8.5999C15.038 8.5999 15.7544 7.88356 15.7544 6.9999 15.7544 6.11625 15.038 5.3999 14.1544 5.3999H3.85439C2.97074 5.3999 2.25439 6.11625 2.25439 6.9999 2.25439 7.88356 2.97074 8.5999 3.85439 8.5999H14.1544zM14.5544 6.9999C14.5544 7.22082 14.3753 7.3999 14.1544 7.3999H3.85439C3.63348 7.3999 3.45439 7.22082 3.45439 6.9999 3.45439 6.77899 3.63348 6.5999 3.85439 6.5999H14.1544C14.3753 6.5999 14.5544 6.77899 14.5544 6.9999z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M8.57975 14.5902L6.58023 12.5907C6.34591 12.3564 6.34591 11.9765 6.58023 11.7421 6.81454 11.5078 7.19444 11.5078 7.42876 11.7421L8.40449 12.7179V10.1664C8.40449 9.83504 8.67312 9.56641 9.00449 9.56641 9.33586 9.56641 9.60449 9.83504 9.60449 10.1664V12.7179L10.5802 11.7421C10.8145 11.5078 11.1944 11.5078 11.4288 11.7421 11.6631 11.9765 11.6631 12.3564 11.4288 12.5907L9.42923 14.5902M8.57975 14.5902C8.58121 14.5917 8.58268 14.5931 8.58416 14.5946 8.64077 14.6502 8.70566 14.6923 8.77482 14.7209 8.84557 14.7502 8.92314 14.7664 9.00449 14.7664 9.08585 14.7664 9.16342 14.7502 9.23416 14.7209 9.30332 14.6923 9.36821 14.6502 9.42482 14.5946" } }] }, Lt = $(function(i, e) {
|
|
371
371
|
return H(F, Object.assign({}, i, {
|
|
372
372
|
id: "bottom-single",
|
|
373
373
|
ref: e,
|
|
374
|
-
icon:
|
|
374
|
+
icon: gi
|
|
375
375
|
}));
|
|
376
376
|
});
|
|
377
377
|
Lt.displayName = "BottomSingle";
|
|
378
|
-
var
|
|
378
|
+
var hi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "g", attrs: { clipPath: "url(#graph-single_clip0_1293_28)" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M6.29541 11.1896C3.83208 10.7489 1.9624 8.59552 1.9624 6.00544C1.9624 3.09673 4.32036 0.73877 7.22907 0.73877C9.93483 0.73877 12.164 2.77918 12.4619 5.40527H13.5621C14.998 5.40527 16.1621 6.56933 16.1621 8.00527V12.6719C16.1621 14.1079 14.998 15.2719 13.5621 15.2719H8.89541C7.45947 15.2719 6.29541 14.1079 6.29541 12.6719V11.1896ZM3.1624 6.00544C3.1624 3.75947 4.98311 1.93877 7.22907 1.93877C9.27112 1.93877 10.9616 3.44388 11.2518 5.40527H8.89541C7.45947 5.40527 6.29541 6.56933 6.29541 8.00527V9.96442C4.49946 9.5425 3.1624 7.93012 3.1624 6.00544ZM7.49541 8.00527C7.49541 7.23207 8.12221 6.60527 8.89541 6.60527H13.5621C14.3353 6.60527 14.9621 7.23207 14.9621 8.00527V12.6719C14.9621 13.4451 14.3353 14.0719 13.5621 14.0719H8.89541C8.12221 14.0719 7.49541 13.4451 7.49541 12.6719V8.00527Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, { tag: "defs", attrs: {}, children: [{ tag: "clipPath", attrs: { id: "graph-single_clip0_1293_28" }, children: [{ tag: "path", attrs: { fill: "#fff", d: "M0 0H16V16H0z", transform: "translate(.9)" } }] }] }], defIds: ["graph-single_clip0_1293_28"] }, At = $(function(i, e) {
|
|
379
379
|
return H(F, Object.assign({}, i, {
|
|
380
380
|
id: "graph-single",
|
|
381
381
|
ref: e,
|
|
382
|
-
icon:
|
|
382
|
+
icon: hi
|
|
383
383
|
}));
|
|
384
384
|
});
|
|
385
385
|
At.displayName = "GraphSingle";
|
|
386
|
-
var
|
|
386
|
+
var mi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ye = $(function(i, e) {
|
|
387
387
|
return H(F, Object.assign({}, i, {
|
|
388
388
|
id: "more-down-single",
|
|
389
389
|
ref: e,
|
|
390
|
-
icon:
|
|
390
|
+
icon: mi
|
|
391
391
|
}));
|
|
392
392
|
});
|
|
393
393
|
Ye.displayName = "MoreDownSingle";
|
|
394
|
-
var
|
|
394
|
+
var vi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.25 2.96401C1.25 3.84767 1.96634 4.56401 2.85 4.56401H13.15C14.0337 4.56401 14.75 3.84767 14.75 2.96401C14.75 2.08036 14.0337 1.36401 13.15 1.36401H2.85C1.96635 1.36401 1.25 2.08036 1.25 2.96401ZM2.85 3.36401C2.62909 3.36401 2.45 3.18493 2.45 2.96401C2.45 2.7431 2.62909 2.56401 2.85 2.56401H13.15C13.3709 2.56401 13.55 2.7431 13.55 2.96401C13.55 3.18493 13.3709 3.36401 13.15 3.36401H2.85Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.57564 11.6118C5.80995 11.3774 6.18985 11.3774 6.42417 11.6118L7.3999 12.5875V6.36951C7.3999 6.03814 7.66853 5.76951 7.9999 5.76951C8.33127 5.76951 8.5999 6.03814 8.5999 6.36951V12.5875L9.57564 11.6118C9.80995 11.3774 10.1899 11.3774 10.4242 11.6118C10.6585 11.8461 10.6585 12.226 10.4242 12.4603L8.4324 14.452C8.32324 14.5655 8.16982 14.6362 7.9999 14.6362C7.82998 14.6362 7.67655 14.5655 7.56739 14.452L5.57564 12.4603C5.34132 12.226 5.34132 11.8461 5.57564 11.6118Z" } }] }, $t = $(function(i, e) {
|
|
395
395
|
return H(F, Object.assign({}, i, {
|
|
396
396
|
id: "move-down-single",
|
|
397
397
|
ref: e,
|
|
398
|
-
icon:
|
|
398
|
+
icon: vi
|
|
399
399
|
}));
|
|
400
400
|
});
|
|
401
401
|
$t.displayName = "MoveDownSingle";
|
|
402
|
-
var
|
|
402
|
+
var pi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.25 13.036C1.25 12.1523 1.96634 11.436 2.85 11.436H13.15C14.0337 11.436 14.75 12.1523 14.75 13.036C14.75 13.9196 14.0337 14.636 13.15 14.636H2.85C1.96635 14.636 1.25 13.9196 1.25 13.036ZM2.85 12.636C2.62909 12.636 2.45 12.8151 2.45 13.036C2.45 13.2569 2.62909 13.436 2.85 13.436H13.15C13.3709 13.436 13.55 13.2569 13.55 13.036C13.55 12.8151 13.3709 12.636 13.15 12.636H2.85Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.57564 4.38825C5.80995 4.62256 6.18985 4.62256 6.42417 4.38825L7.3999 3.41251V9.63049C7.3999 9.96186 7.66853 10.2305 7.9999 10.2305C8.33127 10.2305 8.5999 9.96186 8.5999 9.63049V3.41251L9.57564 4.38825C9.80995 4.62256 10.1899 4.62256 10.4242 4.38825C10.6585 4.15393 10.6585 3.77403 10.4242 3.53972L8.4324 1.54796C8.32324 1.43445 8.16982 1.36382 7.9999 1.36382C7.82998 1.36382 7.67655 1.43446 7.56739 1.54797L5.57564 3.53972C5.34132 3.77403 5.34132 4.15393 5.57564 4.38825Z" } }] }, Ht = $(function(i, e) {
|
|
403
403
|
return H(F, Object.assign({}, i, {
|
|
404
404
|
id: "move-up-single",
|
|
405
405
|
ref: e,
|
|
406
|
-
icon:
|
|
406
|
+
icon: pi
|
|
407
407
|
}));
|
|
408
408
|
});
|
|
409
409
|
Ht.displayName = "MoveUpSingle";
|
|
410
|
-
var
|
|
410
|
+
var Ci = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.01281 1.36643C8.79386 0.585377 10.0602 0.585378 10.8412 1.36643L12.9223 3.44752C13.7034 4.22857 13.7034 5.4949 12.9223 6.27595L9.36445 9.83383C8.5834 10.6149 7.31707 10.6149 6.53602 9.83383L4.45493 7.75273C3.67388 6.97168 3.67388 5.70535 4.45493 4.9243L8.01281 1.36643ZM9.9927 2.21495C9.68028 1.90253 9.17375 1.90253 8.86133 2.21495L5.30346 5.77283L5.29671 5.77966L10.839 6.66224L12.0738 5.42742C12.3862 5.115 12.3862 4.60847 12.0738 4.29605L9.9927 2.21495Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.5179 9.48875C14.5179 9.99175 14.1101 10.3995 13.607 10.3995C13.1041 10.3995 12.6963 9.99175 12.6963 9.48875C12.6963 9.1773 13.0455 8.59966 13.3114 8.20487C13.4549 7.99177 13.7591 7.99177 13.9027 8.20486C14.1687 8.59965 14.5179 9.1773 14.5179 9.48875Z" } }, { tag: "path", attrs: { fill: "colorChannel1", d: "M1.98682 13.4992C1.98682 12.5603 2.74793 11.7992 3.68682 11.7992H14.2868C15.2257 11.7992 15.9868 12.5603 15.9868 13.4992V13.4992C15.9868 14.4381 15.2257 15.1992 14.2868 15.1992H3.68682C2.74793 15.1992 1.98682 14.4381 1.98682 13.4992V13.4992Z" } }] }, Ft = $(function(i, e) {
|
|
411
411
|
return H(F, Object.assign({}, i, {
|
|
412
412
|
id: "paint-bucket",
|
|
413
413
|
ref: e,
|
|
414
|
-
icon:
|
|
414
|
+
icon: Ci
|
|
415
415
|
}));
|
|
416
416
|
});
|
|
417
417
|
Ft.displayName = "PaintBucket";
|
|
418
|
-
var
|
|
418
|
+
var fi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "g", attrs: { fill: "currentColor", clipPath: "url(#text-single_clip0_1293_26)" }, children: [{ tag: "path", attrs: { d: "M2.22891 2.07227C1.89754 2.07227 1.62891 2.34089 1.62891 2.67227C1.62891 3.00364 1.89754 3.27227 2.22891 3.27227H6.29541V14.0056C6.29541 14.337 6.56404 14.6056 6.89541 14.6056C7.22678 14.6056 7.49541 14.337 7.49541 14.0056V3.27227H11.5622C11.8936 3.27227 12.1622 3.00364 12.1622 2.67227C12.1622 2.34089 11.8936 2.07227 11.5622 2.07227H2.22891Z" } }, { tag: "path", attrs: { d: "M10.2289 6.40552C9.89754 6.40552 9.62891 6.67415 9.62891 7.00552C9.62891 7.33689 9.89754 7.60552 10.2289 7.60552H12.2954V14.0055C12.2954 14.3369 12.564 14.6055 12.8954 14.6055C13.2268 14.6055 13.4954 14.3369 13.4954 14.0055V7.60552H15.5622C15.8936 7.60552 16.1622 7.33689 16.1622 7.00552C16.1622 6.67415 15.8936 6.40552 15.5622 6.40552H10.2289Z" } }] }, { tag: "defs", attrs: {}, children: [{ tag: "clipPath", attrs: { id: "text-single_clip0_1293_26" }, children: [{ tag: "path", attrs: { fill: "#fff", d: "M0 0H16V16H0z", transform: "translate(.9)" } }] }] }], defIds: ["text-single_clip0_1293_26"] }, zt = $(function(i, e) {
|
|
419
419
|
return H(F, Object.assign({}, i, {
|
|
420
420
|
id: "text-single",
|
|
421
421
|
ref: e,
|
|
422
|
-
icon:
|
|
422
|
+
icon: fi
|
|
423
423
|
}));
|
|
424
424
|
});
|
|
425
425
|
zt.displayName = "TextSingle";
|
|
426
|
-
var
|
|
426
|
+
var _i = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.82994 1.40913C7.88746 1.35161 7.95376 1.30821 8.02453 1.27893C8.09527 1.24959 8.17285 1.2334 8.2542 1.2334C8.33555 1.2334 8.41313 1.24959 8.48387 1.27893C8.55464 1.30821 8.62094 1.35161 8.67846 1.40913L10.6785 3.40913C10.9128 3.64345 10.9128 4.02335 10.6785 4.25766C10.4441 4.49198 10.0642 4.49198 9.82994 4.25766L8.8542 3.28193V5.8334C8.8542 6.16477 8.58557 6.4334 8.2542 6.4334C7.92283 6.4334 7.6542 6.16477 7.6542 5.8334V3.28193L6.67846 4.25766C6.44415 4.49198 6.06425 4.49198 5.82994 4.25766C5.59562 4.02335 5.59562 3.64345 5.82994 3.40913L7.82994 1.40913Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.50439 9C1.50439 8.11634 2.22074 7.4 3.10439 7.4H13.4044C14.288 7.4 15.0044 8.11634 15.0044 9 15.0044 9.88366 14.2881 10.6 13.4044 10.6H3.1044C2.22074 10.6 1.50439 9.88366 1.50439 9zM3.10439 8.6C2.88348 8.6 2.70439 8.77909 2.70439 9 2.70439 9.22091 2.88348 9.4 3.1044 9.4H13.4044C13.6253 9.4 13.8044 9.22091 13.8044 9 13.8044 8.77909 13.6253 8.6 13.4044 8.6H3.10439zM1.6543 13.1665C1.6543 12.2828 2.37064 11.5665 3.2543 11.5665H13.5543C14.438 11.5665 15.1543 12.2828 15.1543 13.1665 15.1543 14.0502 14.438 14.7665 13.5543 14.7665H3.2543C2.37064 14.7665 1.6543 14.0502 1.6543 13.1665zM3.2543 12.7665C3.03338 12.7665 2.8543 12.9456 2.8543 13.1665 2.8543 13.3874 3.03338 13.5665 3.2543 13.5665H13.5543C13.7752 13.5665 13.9543 13.3874 13.9543 13.1665 13.9543 12.9456 13.7752 12.7665 13.5543 12.7665H3.2543z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Wt = $(function(i, e) {
|
|
427
427
|
return H(F, Object.assign({}, i, {
|
|
428
428
|
id: "topmost-single",
|
|
429
429
|
ref: e,
|
|
430
|
-
icon:
|
|
430
|
+
icon: _i
|
|
431
431
|
}));
|
|
432
432
|
});
|
|
433
433
|
Wt.displayName = "TopmostSingle";
|
|
434
|
-
function kt(i) {
|
|
435
|
-
var e, t, n = "";
|
|
436
|
-
if (typeof i == "string" || typeof i == "number") n += i;
|
|
437
|
-
else if (typeof i == "object") if (Array.isArray(i)) {
|
|
438
|
-
var r = i.length;
|
|
439
|
-
for (e = 0; e < r; e++) i[e] && (t = kt(i[e])) && (n && (n += " "), n += t);
|
|
440
|
-
} else for (t in i) i[t] && (n && (n += " "), n += t);
|
|
441
|
-
return n;
|
|
442
|
-
}
|
|
443
|
-
function y() {
|
|
444
|
-
for (var i, e, t = 0, n = "", r = arguments.length; t < r; t++) (i = arguments[t]) && (e = kt(i)) && (n && (n += " "), n += e);
|
|
445
|
-
return n;
|
|
446
|
-
}
|
|
447
434
|
const k = {
|
|
448
435
|
id: "slide.operation.update-element",
|
|
449
436
|
type: V.OPERATION,
|
|
@@ -451,20 +438,20 @@ const k = {
|
|
|
451
438
|
const { oKey: t, props: n } = e, r = i.get(T), s = e == null ? void 0 : e.unitId, o = r.getUnit(s);
|
|
452
439
|
if (!o) return !1;
|
|
453
440
|
const a = o.getActivePage();
|
|
454
|
-
return a.pageElements[t] =
|
|
455
|
-
}
|
|
456
|
-
},
|
|
457
|
-
imageCommonPanelGrid:
|
|
458
|
-
imageCommonPanelBorder:
|
|
459
|
-
imageCommonPanelTitle:
|
|
460
|
-
imageCommonPanelRow:
|
|
461
|
-
imageCommonPanelColumn:
|
|
462
|
-
imageCommonPanelInline:
|
|
463
|
-
imageCommonPanelSpan2:
|
|
464
|
-
imageCommonPanelSpan3:
|
|
465
|
-
imageCommonPanelInput:
|
|
441
|
+
return a.pageElements[t] = hn.deepMerge(a.pageElements[t], n), o.updatePage(a.id, a), !0;
|
|
442
|
+
}
|
|
443
|
+
}, Si = "univer-image-common-panel-grid", Ii = "univer-image-common-panel-border", bi = "univer-image-common-panel-title", Pi = "univer-image-common-panel-row", Ei = "univer-image-common-panel-column", Ri = "univer-image-common-panel-inline", Oi = "univer-image-common-panel-span2", xi = "univer-image-common-panel-span3", yi = "univer-image-common-panel-input", g = {
|
|
444
|
+
imageCommonPanelGrid: Si,
|
|
445
|
+
imageCommonPanelBorder: Ii,
|
|
446
|
+
imageCommonPanelTitle: bi,
|
|
447
|
+
imageCommonPanelRow: Pi,
|
|
448
|
+
imageCommonPanelColumn: Ei,
|
|
449
|
+
imageCommonPanelInline: Ri,
|
|
450
|
+
imageCommonPanelSpan2: Oi,
|
|
451
|
+
imageCommonPanelSpan3: xi,
|
|
452
|
+
imageCommonPanelInput: yi
|
|
466
453
|
};
|
|
467
|
-
function
|
|
454
|
+
function Ti(i) {
|
|
468
455
|
const { pageId: e, unitId: t } = i, n = x(ee), r = x(N), s = x(B), o = r.getRenderUnitByPageId(e, t), a = o == null ? void 0 : o.scene;
|
|
469
456
|
if (!a) return null;
|
|
470
457
|
const c = a.getTransformer();
|
|
@@ -531,7 +518,7 @@ function Mi(i) {
|
|
|
531
518
|
] })
|
|
532
519
|
] });
|
|
533
520
|
}
|
|
534
|
-
function
|
|
521
|
+
function Mi(i) {
|
|
535
522
|
var C, p;
|
|
536
523
|
const { pageId: e, unitId: t } = i, n = x(ee), r = x(N), s = x(B), o = r.getRenderUnitByPageId(e, t), a = o == null ? void 0 : o.scene;
|
|
537
524
|
if (!a) return null;
|
|
@@ -567,7 +554,7 @@ function wi(i) {
|
|
|
567
554
|
Mt,
|
|
568
555
|
{
|
|
569
556
|
overlay: /* @__PURE__ */ u("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ u(
|
|
570
|
-
|
|
557
|
+
$n,
|
|
571
558
|
{
|
|
572
559
|
value: "#fff",
|
|
573
560
|
onChange: f
|
|
@@ -583,7 +570,7 @@ function wi(i) {
|
|
|
583
570
|
}
|
|
584
571
|
);
|
|
585
572
|
}
|
|
586
|
-
function
|
|
573
|
+
function wi(i) {
|
|
587
574
|
const { pageId: e, unitId: t } = i, n = x(ee), r = x(N), s = x(B), o = r.getRenderUnitByPageId(e, t), a = o == null ? void 0 : o.scene;
|
|
588
575
|
if (!a) return null;
|
|
589
576
|
const c = a.getTransformer();
|
|
@@ -598,13 +585,13 @@ function Ni(i) {
|
|
|
598
585
|
angle: p = 0
|
|
599
586
|
} = l, [m, _] = G(d), [b, P] = G(v), [w, D] = G(f), [j, O] = G(C), [K, ae] = G(p), z = (S) => {
|
|
600
587
|
const { objects: ce } = S, le = ce.values().next().value, {
|
|
601
|
-
width:
|
|
602
|
-
height:
|
|
603
|
-
left:
|
|
604
|
-
top:
|
|
605
|
-
angle:
|
|
588
|
+
width: rn = 0,
|
|
589
|
+
height: sn = 0,
|
|
590
|
+
left: on = 0,
|
|
591
|
+
top: an = 0,
|
|
592
|
+
angle: cn = 0
|
|
606
593
|
} = le;
|
|
607
|
-
_(
|
|
594
|
+
_(rn), P(sn), D(on), O(an), ae(cn);
|
|
608
595
|
};
|
|
609
596
|
me(() => {
|
|
610
597
|
const S = c.changeStart$.subscribe((le) => {
|
|
@@ -747,10 +734,10 @@ function Ni(i) {
|
|
|
747
734
|
}
|
|
748
735
|
);
|
|
749
736
|
}
|
|
750
|
-
const
|
|
751
|
-
imageCommonPanel:
|
|
737
|
+
const Ni = "univer-image-common-panel", Di = {
|
|
738
|
+
imageCommonPanel: Ni
|
|
752
739
|
}, Oe = "COMPONENT_SLIDE_SIDEBAR";
|
|
753
|
-
function
|
|
740
|
+
function Ui() {
|
|
754
741
|
var h, l, d;
|
|
755
742
|
const i = x(T), e = x(N), t = i.getCurrentUnitForType(E.UNIVER_SLIDE), n = (h = t == null ? void 0 : t.getActivePage()) == null ? void 0 : h.id;
|
|
756
743
|
if (!n) return null;
|
|
@@ -760,10 +747,10 @@ function Vi() {
|
|
|
760
747
|
if (!a)
|
|
761
748
|
return null;
|
|
762
749
|
const c = ((d = i.getFocusedUnit()) == null ? void 0 : d.getUnitId()) || "";
|
|
763
|
-
return /* @__PURE__ */ R("section", { className:
|
|
764
|
-
/* @__PURE__ */ u(
|
|
765
|
-
/* @__PURE__ */ u(
|
|
766
|
-
a.objectType === ge.RECT && /* @__PURE__ */ u(
|
|
750
|
+
return /* @__PURE__ */ R("section", { className: Di.imageCommonPanel, children: [
|
|
751
|
+
/* @__PURE__ */ u(Ti, { pageId: n, unitId: c }),
|
|
752
|
+
/* @__PURE__ */ u(wi, { pageId: n, unitId: c }),
|
|
753
|
+
a.objectType === ge.RECT && /* @__PURE__ */ u(Mi, { pageId: n, unitId: c })
|
|
767
754
|
] });
|
|
768
755
|
}
|
|
769
756
|
const Ze = {
|
|
@@ -772,9 +759,9 @@ const Ze = {
|
|
|
772
759
|
handler: async (i) => {
|
|
773
760
|
var r;
|
|
774
761
|
const e = i.get(B), n = (r = i.get(T).getFocusedUnit()) == null ? void 0 : r.getUnitId();
|
|
775
|
-
return e.executeCommand(
|
|
762
|
+
return e.executeCommand(kt.id, { unitId: n });
|
|
776
763
|
}
|
|
777
|
-
},
|
|
764
|
+
}, kt = {
|
|
778
765
|
id: "slide.operation.insert-float-shape",
|
|
779
766
|
type: V.OPERATION,
|
|
780
767
|
handler: async (i, e) => {
|
|
@@ -791,7 +778,7 @@ const Ze = {
|
|
|
791
778
|
description: "",
|
|
792
779
|
type: Ke.SHAPE,
|
|
793
780
|
shape: {
|
|
794
|
-
shapeType:
|
|
781
|
+
shapeType: mn.Rect,
|
|
795
782
|
text: "",
|
|
796
783
|
shapeProperties: {
|
|
797
784
|
shapeBackgroundFill: {
|
|
@@ -818,13 +805,13 @@ const Ze = {
|
|
|
818
805
|
width: 360
|
|
819
806
|
}) : r.close(), !0;
|
|
820
807
|
}
|
|
821
|
-
},
|
|
822
|
-
var
|
|
823
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
808
|
+
}, Kt = "COMPONENT_SLIDE_IMAGE_POPUP_MENU";
|
|
809
|
+
var Vi = Object.getOwnPropertyDescriptor, Bi = (i, e, t, n) => {
|
|
810
|
+
for (var r = n > 1 ? void 0 : n ? Vi(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
824
811
|
(o = i[s]) && (r = o(r) || r);
|
|
825
812
|
return r;
|
|
826
813
|
}, Pe = (i, e) => (t, n) => e(t, n, i);
|
|
827
|
-
function
|
|
814
|
+
function ji(i, e) {
|
|
828
815
|
const t = vt(i.left, i.top, e), n = vt(i.right, i.bottom, e);
|
|
829
816
|
return {
|
|
830
817
|
left: t.x,
|
|
@@ -858,7 +845,7 @@ let Te = class extends Ve {
|
|
|
858
845
|
right: c + l,
|
|
859
846
|
top: h,
|
|
860
847
|
bottom: h + d
|
|
861
|
-
}, p = a.getCanvasElement(), m = p.getBoundingClientRect(), _ =
|
|
848
|
+
}, p = a.getCanvasElement(), m = p.getBoundingClientRect(), _ = yn(p.style.width), { scaleX: b, scaleY: P } = o.getAncestorScale(), w = ji(C, o), { top: D, left: j, width: O } = m, K = O / _;
|
|
862
849
|
return {
|
|
863
850
|
left: w.left * K * b + j + v,
|
|
864
851
|
right: w.right * K * b + j + v,
|
|
@@ -894,14 +881,14 @@ let Te = class extends Ve {
|
|
|
894
881
|
};
|
|
895
882
|
}
|
|
896
883
|
};
|
|
897
|
-
Te =
|
|
898
|
-
Pe(0, X(
|
|
884
|
+
Te = Bi([
|
|
885
|
+
Pe(0, X(Mn)),
|
|
899
886
|
Pe(1, Y),
|
|
900
887
|
Pe(2, T),
|
|
901
888
|
Pe(3, B)
|
|
902
889
|
], Te);
|
|
903
|
-
var
|
|
904
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
890
|
+
var Li = Object.getOwnPropertyDescriptor, Ai = (i, e, t, n) => {
|
|
891
|
+
for (var r = n > 1 ? void 0 : n ? Li(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
905
892
|
(o = i[s]) && (r = o(r) || r);
|
|
906
893
|
return r;
|
|
907
894
|
}, q = (i, e) => (t, n) => e(t, n, i);
|
|
@@ -944,7 +931,7 @@ let Me = class extends pe {
|
|
|
944
931
|
return;
|
|
945
932
|
const v = d.oKey;
|
|
946
933
|
c == null || c.dispose(), c = this.disposeWithMe(this._canvasPopManagerService.attachPopupToObject(d, {
|
|
947
|
-
componentKey:
|
|
934
|
+
componentKey: Kt,
|
|
948
935
|
direction: "horizontal",
|
|
949
936
|
offset: [2, 0],
|
|
950
937
|
extraProps: {
|
|
@@ -958,7 +945,7 @@ let Me = class extends pe {
|
|
|
958
945
|
)
|
|
959
946
|
), this.disposeWithMe(
|
|
960
947
|
a.clearControl$.subscribe(() => {
|
|
961
|
-
c == null || c.dispose(), this._contextService.setContextValue(
|
|
948
|
+
c == null || c.dispose(), this._contextService.setContextValue(vn, !1);
|
|
962
949
|
})
|
|
963
950
|
), this.disposeWithMe(
|
|
964
951
|
a.changing$.subscribe(() => {
|
|
@@ -1005,7 +992,7 @@ let Me = class extends pe {
|
|
|
1005
992
|
}];
|
|
1006
993
|
}
|
|
1007
994
|
};
|
|
1008
|
-
Me =
|
|
995
|
+
Me = Ai([
|
|
1009
996
|
q(0, X(Te)),
|
|
1010
997
|
q(1, Y),
|
|
1011
998
|
q(2, T),
|
|
@@ -1018,9 +1005,9 @@ const we = {
|
|
|
1018
1005
|
id: "slide.operation.edit-arrow",
|
|
1019
1006
|
type: V.OPERATION,
|
|
1020
1007
|
handler: () => !0
|
|
1021
|
-
}, he =
|
|
1022
|
-
var
|
|
1023
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
1008
|
+
}, he = pn("SLIDE_EDITOR");
|
|
1009
|
+
var $i = Object.getOwnPropertyDescriptor, Hi = (i, e, t, n) => {
|
|
1010
|
+
for (var r = n > 1 ? void 0 : n ? $i(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
1024
1011
|
(o = i[s]) && (r = o(r) || r);
|
|
1025
1012
|
return r;
|
|
1026
1013
|
}, je = (i, e) => (t, n) => e(t, n, i);
|
|
@@ -1078,7 +1065,7 @@ let He = class extends Ve {
|
|
|
1078
1065
|
pageSize: { width: t.richTextObj.width, height: 1 / 0 }
|
|
1079
1066
|
};
|
|
1080
1067
|
const o = {
|
|
1081
|
-
documentModel: new
|
|
1068
|
+
documentModel: new Cn(r),
|
|
1082
1069
|
fontString: "document",
|
|
1083
1070
|
textRotation: { a: 0, v: 0 },
|
|
1084
1071
|
wrapStrategy: 0,
|
|
@@ -1162,12 +1149,12 @@ let He = class extends Ve {
|
|
|
1162
1149
|
};
|
|
1163
1150
|
}
|
|
1164
1151
|
};
|
|
1165
|
-
He =
|
|
1152
|
+
He = Hi([
|
|
1166
1153
|
je(0, Xe),
|
|
1167
1154
|
je(1, Ce),
|
|
1168
1155
|
je(2, Y)
|
|
1169
1156
|
], He);
|
|
1170
|
-
class
|
|
1157
|
+
class Fi {
|
|
1171
1158
|
constructor() {
|
|
1172
1159
|
I(this, "_state", null);
|
|
1173
1160
|
I(this, "_rect", null);
|
|
@@ -1204,12 +1191,12 @@ class zi {
|
|
|
1204
1191
|
const Je = bt(
|
|
1205
1192
|
"univer.slide-editor-manager.service"
|
|
1206
1193
|
);
|
|
1207
|
-
var Z = /* @__PURE__ */ ((i) => (i[i.InitialState = 0] = "InitialState", i[i.StartEditor = 1] = "StartEditor", i[i.CursorChange = 2] = "CursorChange", i))(Z || {}),
|
|
1208
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
1194
|
+
var Z = /* @__PURE__ */ ((i) => (i[i.InitialState = 0] = "InitialState", i[i.StartEditor = 1] = "StartEditor", i[i.CursorChange = 2] = "CursorChange", i))(Z || {}), zi = Object.getOwnPropertyDescriptor, Wi = (i, e, t, n) => {
|
|
1195
|
+
for (var r = n > 1 ? void 0 : n ? zi(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
1209
1196
|
(o = i[s]) && (r = o(r) || r);
|
|
1210
1197
|
return r;
|
|
1211
1198
|
}, A = (i, e) => (t, n) => e(t, n, i);
|
|
1212
|
-
const pt = -1e3, Ct = 5,
|
|
1199
|
+
const pt = -1e3, Ct = 5, ki = 2;
|
|
1213
1200
|
let Fe = class extends Ve {
|
|
1214
1201
|
constructor(e, t, n, r, s, o, a, c, h, l, d, v) {
|
|
1215
1202
|
super();
|
|
@@ -1261,7 +1248,7 @@ let Fe = class extends Ve {
|
|
|
1261
1248
|
return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(ut).getViewModel();
|
|
1262
1249
|
}
|
|
1263
1250
|
_initialCursorSync(e) {
|
|
1264
|
-
e.add(this._cellEditorManagerService.focus$.pipe(
|
|
1251
|
+
e.add(this._cellEditorManagerService.focus$.pipe(zn((t) => !!t)).subscribe(() => {
|
|
1265
1252
|
var n;
|
|
1266
1253
|
const t = (n = this._renderManagerService.getCurrentTypeOfRenderer(E.UNIVER_DOC)) == null ? void 0 : n.with(gt);
|
|
1267
1254
|
t && t.sync();
|
|
@@ -1282,7 +1269,7 @@ let Fe = class extends Ve {
|
|
|
1282
1269
|
scaleX: c,
|
|
1283
1270
|
editorUnitId: h
|
|
1284
1271
|
} = t, { vertexAngle: l } = rt(s);
|
|
1285
|
-
a.updateDocumentId(h), o === tt.WRAP && l === 0 && a.updateDocumentDataPageSize((r - n) / c), this._instanceSrv.changeDoc(h, a), this._contextService.setContextValue(
|
|
1272
|
+
a.updateDocumentId(h), o === tt.WRAP && l === 0 && a.updateDocumentDataPageSize((r - n) / c), this._instanceSrv.changeDoc(h, a), this._contextService.setContextValue(_n, !0), this._textSelectionManagerService.replaceTextRanges([{
|
|
1286
1273
|
startOffset: 0,
|
|
1287
1274
|
endOffset: 0
|
|
1288
1275
|
}]);
|
|
@@ -1361,7 +1348,7 @@ let Fe = class extends Ve {
|
|
|
1361
1348
|
const d = this._renderContext.engine.getCanvasElement(), v = d.getBoundingClientRect(), f = h(d.style.width), { top: C, left: p, width: m } = v, _ = m / f;
|
|
1362
1349
|
let { startX: b, startY: P } = n;
|
|
1363
1350
|
b += r.left, P += r.top;
|
|
1364
|
-
const { document: w, scene: D, engine: j } = c, O = D.getViewport(ht.VIEW_MAIN), K = document.body.clientHeight - P - r.top -
|
|
1351
|
+
const { document: w, scene: D, engine: j } = c, O = D.getViewport(ht.VIEW_MAIN), K = document.body.clientHeight - P - r.top - ki * 2, ae = document.body.clientWidth - b - r.left;
|
|
1365
1352
|
let z = t, W = O == null ? void 0 : O.getScrollBar();
|
|
1366
1353
|
z > K ? (z = K, W == null ? O && new xt(O, { enableHorizontal: !1, barSize: 8 }) : O == null || O.resetCanvasSizeAndUpdateScroll()) : (W = null, (S = O == null ? void 0 : O.getScrollBar()) == null || S.dispose()), e += (W == null ? void 0 : W.barSize) || 0, e = Math.min(e, ae), b -= se, P -= se, this._addBackground(D, e / o, t / a, s);
|
|
1367
1354
|
const { scaleX: te, scaleY: ne } = D.getPrecisionScale();
|
|
@@ -1399,7 +1386,7 @@ let Fe = class extends Ve {
|
|
|
1399
1386
|
evented: !1
|
|
1400
1387
|
})
|
|
1401
1388
|
],
|
|
1402
|
-
|
|
1389
|
+
Kn
|
|
1403
1390
|
) : r == null ? o.dispose() : (o.setProps({
|
|
1404
1391
|
fill: r
|
|
1405
1392
|
}), o.transformByState({
|
|
@@ -1450,7 +1437,7 @@ let Fe = class extends Ve {
|
|
|
1450
1437
|
]), (_ = this._renderManagerService.getRenderById(l)) == null || _.scene.resetCursor();
|
|
1451
1438
|
}
|
|
1452
1439
|
_resetBodyStyle(e, t = !1) {
|
|
1453
|
-
e.dataStream =
|
|
1440
|
+
e.dataStream = Sn, 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 = [
|
|
1454
1441
|
{
|
|
1455
1442
|
startIndex: 0
|
|
1456
1443
|
}
|
|
@@ -1465,7 +1452,7 @@ let Fe = class extends Ve {
|
|
|
1465
1452
|
_showEditorByKeyboard(e) {
|
|
1466
1453
|
}
|
|
1467
1454
|
_commandExecutedListener(e) {
|
|
1468
|
-
const t = [we.id], n = [
|
|
1455
|
+
const t = [we.id], n = [kn.id];
|
|
1469
1456
|
e.add(this._commandService.onCommandExecuted((r) => {
|
|
1470
1457
|
this._editorService.getFocusId() === he && (t.includes(r.id) && this._moveCursorCmdHandler(r), n.includes(r.id) && this._editorBridgeService.isVisible() && this._editingChangedHandler());
|
|
1471
1458
|
}));
|
|
@@ -1484,7 +1471,7 @@ let Fe = class extends Ve {
|
|
|
1484
1471
|
this._handleEditorVisible({ visible: !0, eventType: 3, unitId: n });
|
|
1485
1472
|
}
|
|
1486
1473
|
_getEditorObject() {
|
|
1487
|
-
return
|
|
1474
|
+
return Ki(this._editorBridgeService.getCurrentEditorId(), this._renderManagerService);
|
|
1488
1475
|
}
|
|
1489
1476
|
async _handleEditorInvisible(e) {
|
|
1490
1477
|
const { keycode: t } = e;
|
|
@@ -1542,33 +1529,33 @@ let Fe = class extends Ve {
|
|
|
1542
1529
|
// TODO: @JOCS, is it necessary to move these commands MoveSelectionOperation\MoveCursorOperation to shortcut? and use multi-commands?
|
|
1543
1530
|
_moveInEditor(e, t) {
|
|
1544
1531
|
let n = L.LEFT;
|
|
1545
|
-
e === M.ARROW_DOWN ? n = L.DOWN : e === M.ARROW_UP ? n = L.UP : e === M.ARROW_RIGHT && (n = L.RIGHT), t ? this._commandService.executeCommand(
|
|
1532
|
+
e === M.ARROW_DOWN ? n = L.DOWN : e === M.ARROW_UP ? n = L.UP : e === M.ARROW_RIGHT && (n = L.RIGHT), t ? this._commandService.executeCommand(Gn.id, {
|
|
1546
1533
|
direction: n
|
|
1547
|
-
}) : this._commandService.executeCommand(
|
|
1534
|
+
}) : this._commandService.executeCommand(Xn.id, {
|
|
1548
1535
|
direction: n
|
|
1549
1536
|
});
|
|
1550
1537
|
}
|
|
1551
1538
|
};
|
|
1552
|
-
Fe =
|
|
1553
|
-
A(1,
|
|
1554
|
-
A(2,
|
|
1539
|
+
Fe = Wi([
|
|
1540
|
+
A(1, wn),
|
|
1541
|
+
A(2, fn),
|
|
1555
1542
|
A(3, Ce),
|
|
1556
1543
|
A(4, T),
|
|
1557
1544
|
A(5, Y),
|
|
1558
1545
|
A(6, qe),
|
|
1559
1546
|
A(7, Je),
|
|
1560
|
-
A(8, X(
|
|
1547
|
+
A(8, X(Wn)),
|
|
1561
1548
|
A(9, B),
|
|
1562
1549
|
A(10, X(ee)),
|
|
1563
1550
|
A(11, Xe)
|
|
1564
1551
|
], Fe);
|
|
1565
|
-
function
|
|
1552
|
+
function Ki(i, e) {
|
|
1566
1553
|
if (i == null)
|
|
1567
1554
|
return;
|
|
1568
1555
|
const t = e.getRenderById(i);
|
|
1569
1556
|
if (t == null)
|
|
1570
1557
|
return;
|
|
1571
|
-
const { mainComponent: n, scene: r, engine: s, components: o } = t, a = n, c = o.get(
|
|
1558
|
+
const { mainComponent: n, scene: r, engine: s, components: o } = t, a = n, c = o.get(Yn.BACKGROUND);
|
|
1572
1559
|
return {
|
|
1573
1560
|
document: a,
|
|
1574
1561
|
docBackground: c,
|
|
@@ -1576,8 +1563,8 @@ function Gi(i, e) {
|
|
|
1576
1563
|
engine: s
|
|
1577
1564
|
};
|
|
1578
1565
|
}
|
|
1579
|
-
var
|
|
1580
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
1566
|
+
var Gi = Object.getOwnPropertyDescriptor, Xi = (i, e, t, n) => {
|
|
1567
|
+
for (var r = n > 1 ? void 0 : n ? Gi(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
1581
1568
|
(o = i[s]) && (r = o(r) || r);
|
|
1582
1569
|
return r;
|
|
1583
1570
|
}, Le = (i, e) => (t, n) => e(t, n, i);
|
|
@@ -1689,12 +1676,12 @@ let ze = class extends pe {
|
|
|
1689
1676
|
this._editorBridgeService.changeVisible({ visible: e, eventType: J.PointerDown, unitId: t });
|
|
1690
1677
|
}
|
|
1691
1678
|
};
|
|
1692
|
-
ze =
|
|
1679
|
+
ze = Xi([
|
|
1693
1680
|
Le(1, T),
|
|
1694
1681
|
Le(2, B),
|
|
1695
1682
|
Le(3, qe)
|
|
1696
1683
|
], ze);
|
|
1697
|
-
const
|
|
1684
|
+
const Gt = {
|
|
1698
1685
|
id: "slide.operation.activate-slide",
|
|
1699
1686
|
type: V.OPERATION,
|
|
1700
1687
|
handler: (i, e) => {
|
|
@@ -1706,7 +1693,7 @@ const Xt = {
|
|
|
1706
1693
|
const c = (l = a.scene) == null ? void 0 : l.getTransformer();
|
|
1707
1694
|
return c && c.clearControls(), n.activePage(e.id, t), !0;
|
|
1708
1695
|
}
|
|
1709
|
-
},
|
|
1696
|
+
}, Xt = {
|
|
1710
1697
|
id: "slide.operation.append-slide",
|
|
1711
1698
|
type: V.OPERATION,
|
|
1712
1699
|
handler: (i, e) => {
|
|
@@ -1720,14 +1707,14 @@ const Xt = {
|
|
|
1720
1707
|
var j;
|
|
1721
1708
|
const t = i.get(T), n = (j = t.getCurrentUnitForType(E.UNIVER_SLIDE)) == null ? void 0 : j.getUnitId();
|
|
1722
1709
|
if (!n) return !1;
|
|
1723
|
-
const s = await i.get(
|
|
1710
|
+
const s = await i.get(Nn).openFile({
|
|
1724
1711
|
multiple: !0,
|
|
1725
|
-
accept:
|
|
1712
|
+
accept: qn.map((O) => `.${O.replace("image/", "")}`).join(",")
|
|
1726
1713
|
});
|
|
1727
1714
|
if (s.length !== 1) return !1;
|
|
1728
|
-
const a = await i.get(
|
|
1715
|
+
const a = await i.get(Jn).saveImage(s[0]);
|
|
1729
1716
|
if (!a) return !1;
|
|
1730
|
-
const { imageId: c, imageSourceType: h, source: l, base64Cache: d } = a, { width: v, height: f, image: C } = await
|
|
1717
|
+
const { imageId: c, imageSourceType: h, source: l, base64Cache: d } = a, { width: v, height: f, image: C } = await Qn(d || ""), p = t.getUnit(n);
|
|
1731
1718
|
if (!p) return !1;
|
|
1732
1719
|
const m = p.getActivePage(), _ = Object.values(m.pageElements), b = _ != null && _.length ? Math.max(..._.map((O) => O.zIndex)) : 20, P = {
|
|
1733
1720
|
id: c,
|
|
@@ -1759,9 +1746,9 @@ const Xt = {
|
|
|
1759
1746
|
handler: async (i) => {
|
|
1760
1747
|
var r;
|
|
1761
1748
|
const e = i.get(B), n = (r = i.get(T).getFocusedUnit()) == null ? void 0 : r.getUnitId();
|
|
1762
|
-
return await e.executeCommand(
|
|
1749
|
+
return await e.executeCommand(Yt.id, { unitId: n });
|
|
1763
1750
|
}
|
|
1764
|
-
},
|
|
1751
|
+
}, Yt = {
|
|
1765
1752
|
id: "slide.operation.add-text",
|
|
1766
1753
|
type: V.OPERATION,
|
|
1767
1754
|
handler: async (i, e) => {
|
|
@@ -1790,17 +1777,18 @@ const Xt = {
|
|
|
1790
1777
|
const p = i.get(N), m = p.createObjectToPage(C, d.id, t);
|
|
1791
1778
|
return m && p.setObjectActiveByPage(m, d.id, t), !0;
|
|
1792
1779
|
}
|
|
1793
|
-
},
|
|
1780
|
+
}, Zt = {
|
|
1794
1781
|
id: "slide.operation.set-slide-page-thumb",
|
|
1795
1782
|
type: V.OPERATION,
|
|
1796
1783
|
handler: (i, e) => (i.get(N).createThumbs(e.unitId), !0)
|
|
1797
|
-
},
|
|
1798
|
-
imagePopupMenu:
|
|
1799
|
-
imagePopupMenuItem:
|
|
1800
|
-
imagePopupMenuItemTitle:
|
|
1801
|
-
btnContainer:
|
|
1802
|
-
btnContainerExpand:
|
|
1803
|
-
}
|
|
1784
|
+
}, Yi = "univer-image-popup-menu", Zi = "univer-image-popup-menu-item", qi = "univer-image-popup-menu-item-title", Ji = "univer-btn-container", Qi = "univer-btn-container-expand", ue = {
|
|
1785
|
+
imagePopupMenu: Yi,
|
|
1786
|
+
imagePopupMenuItem: Zi,
|
|
1787
|
+
imagePopupMenuItemTitle: qi,
|
|
1788
|
+
btnContainer: Ji,
|
|
1789
|
+
btnContainerExpand: Qi
|
|
1790
|
+
};
|
|
1791
|
+
function er(i) {
|
|
1804
1792
|
var C, p;
|
|
1805
1793
|
const e = (p = (C = i.popup) == null ? void 0 : C.extraProps) == null ? void 0 : p.menuItems;
|
|
1806
1794
|
if (!e)
|
|
@@ -1864,20 +1852,21 @@ const Xt = {
|
|
|
1864
1852
|
)
|
|
1865
1853
|
}
|
|
1866
1854
|
);
|
|
1867
|
-
}
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1855
|
+
}
|
|
1856
|
+
const tr = "univer-slide-bar", nr = "univer-slide-bar-content", ir = "univer-slide-bar-content-header", rr = "univer-slide-bar-item", sr = "univer-slide-bar-box", or = "univer-slide-bar-item-active", ie = {
|
|
1857
|
+
slideBar: tr,
|
|
1858
|
+
slideBarContent: nr,
|
|
1859
|
+
slideBarContentHeader: ir,
|
|
1860
|
+
slideBarItem: rr,
|
|
1861
|
+
slideBarBox: sr,
|
|
1862
|
+
slideBarItemActive: or
|
|
1874
1863
|
};
|
|
1875
|
-
function
|
|
1864
|
+
function ar() {
|
|
1876
1865
|
var C, p;
|
|
1877
1866
|
const i = x(T), e = x(B), t = x(Y), n = x(ee), r = Nt(null), s = i.getCurrentUnitForType(E.UNIVER_SLIDE), o = s == null ? void 0 : s.getPages(), a = s == null ? void 0 : s.getPageOrder();
|
|
1878
1867
|
if (!o || !a)
|
|
1879
1868
|
return null;
|
|
1880
|
-
const c = a.map((m) => o[m]), [h, l] = G((p = (C = s == null ? void 0 : s.getActivePage()) == null ? void 0 : C.id) != null ? p : null), d =
|
|
1869
|
+
const c = a.map((m) => o[m]), [h, l] = G((p = (C = s == null ? void 0 : s.getActivePage()) == null ? void 0 : C.id) != null ? p : null), d = Fn(() => c.map(() => wt.createRef()), [c]);
|
|
1881
1870
|
me(() => {
|
|
1882
1871
|
const m = s == null ? void 0 : s.activePage$.subscribe((_) => {
|
|
1883
1872
|
var P;
|
|
@@ -1894,14 +1883,14 @@ function cr() {
|
|
|
1894
1883
|
const P = c[_];
|
|
1895
1884
|
(b = t.getRenderById(P.id)) == null || b.engine.setContainer(m.current);
|
|
1896
1885
|
}
|
|
1897
|
-
}), d.length > 0 && e.syncExecuteCommand(
|
|
1886
|
+
}), d.length > 0 && e.syncExecuteCommand(Zt.id, { unitId: s == null ? void 0 : s.getUnitId() });
|
|
1898
1887
|
}, [d, c, t, e, s]);
|
|
1899
1888
|
const v = lt((m) => {
|
|
1900
|
-
e.syncExecuteCommand(
|
|
1889
|
+
e.syncExecuteCommand(Gt.id, { id: m, unitId: s == null ? void 0 : s.getUnitId() });
|
|
1901
1890
|
}, [e, s]), f = lt(() => {
|
|
1902
|
-
e.syncExecuteCommand(
|
|
1891
|
+
e.syncExecuteCommand(Xt.id, { unitId: s == null ? void 0 : s.getUnitId() });
|
|
1903
1892
|
}, [e, s]);
|
|
1904
|
-
return /* @__PURE__ */ u("aside", { className: ie.slideBar, ref: r, children: /* @__PURE__ */ u(
|
|
1893
|
+
return /* @__PURE__ */ u("aside", { className: ie.slideBar, ref: r, children: /* @__PURE__ */ u(Hn, { children: /* @__PURE__ */ R("div", { className: ie.slideBarContent, children: [
|
|
1905
1894
|
/* @__PURE__ */ u("header", { className: ie.slideBarContentHeader, children: /* @__PURE__ */ u("a", { onClick: f, children: n.t("slide.append") }) }),
|
|
1906
1895
|
c.map((m, _) => /* @__PURE__ */ R(
|
|
1907
1896
|
"div",
|
|
@@ -1919,23 +1908,23 @@ function cr() {
|
|
|
1919
1908
|
))
|
|
1920
1909
|
] }) }) });
|
|
1921
1910
|
}
|
|
1922
|
-
const
|
|
1923
|
-
slideEditorContainer:
|
|
1911
|
+
const cr = "univer-slide-editor-container", lr = {
|
|
1912
|
+
slideEditorContainer: cr
|
|
1924
1913
|
}, Ne = -1e3, ft = {
|
|
1925
1914
|
width: 0,
|
|
1926
1915
|
height: 0,
|
|
1927
1916
|
top: Ne,
|
|
1928
1917
|
left: Ne
|
|
1929
|
-
},
|
|
1918
|
+
}, dr = () => {
|
|
1930
1919
|
const [i, e] = G({
|
|
1931
1920
|
...ft
|
|
1932
|
-
}), t = x(Je), n = x(Xe), r = x(Ce), s =
|
|
1921
|
+
}), t = x(Je), n = x(Xe), r = x(Ce), s = Dn(
|
|
1933
1922
|
() => r.subscribeContextValue$(ot),
|
|
1934
1923
|
!1,
|
|
1935
1924
|
void 0,
|
|
1936
1925
|
[r, ot]
|
|
1937
1926
|
);
|
|
1938
|
-
return
|
|
1927
|
+
return In.UNSPECIFIED, me(() => {
|
|
1939
1928
|
t.state$.subscribe((o) => {
|
|
1940
1929
|
if (o == null)
|
|
1941
1930
|
return;
|
|
@@ -1969,7 +1958,7 @@ const lr = "univer-slide-editor-container", dr = {
|
|
|
1969
1958
|
}, [s, i]), /* @__PURE__ */ u(
|
|
1970
1959
|
"div",
|
|
1971
1960
|
{
|
|
1972
|
-
className:
|
|
1961
|
+
className: lr.slideEditorContainer,
|
|
1973
1962
|
style: {
|
|
1974
1963
|
left: i.left,
|
|
1975
1964
|
top: i.top,
|
|
@@ -1978,17 +1967,17 @@ const lr = "univer-slide-editor-container", dr = {
|
|
|
1978
1967
|
}
|
|
1979
1968
|
}
|
|
1980
1969
|
);
|
|
1981
|
-
},
|
|
1982
|
-
function
|
|
1970
|
+
}, qt = "addition-and-subtraction-single", Jt = "slide.menu.image";
|
|
1971
|
+
function ur(i) {
|
|
1983
1972
|
return {
|
|
1984
|
-
id:
|
|
1973
|
+
id: Jt,
|
|
1985
1974
|
type: _e.SUBITEMS,
|
|
1986
|
-
icon:
|
|
1975
|
+
icon: qt,
|
|
1987
1976
|
tooltip: "slide.image.insert.title",
|
|
1988
1977
|
hidden$: fe(i, E.UNIVER_SLIDE)
|
|
1989
1978
|
};
|
|
1990
1979
|
}
|
|
1991
|
-
function
|
|
1980
|
+
function gr(i) {
|
|
1992
1981
|
return {
|
|
1993
1982
|
id: Qe.id,
|
|
1994
1983
|
title: "slide.image.insert.float",
|
|
@@ -1996,18 +1985,18 @@ function hr(i) {
|
|
|
1996
1985
|
hidden$: fe(i, E.UNIVER_SLIDE)
|
|
1997
1986
|
};
|
|
1998
1987
|
}
|
|
1999
|
-
const
|
|
2000
|
-
function
|
|
1988
|
+
const Qt = "graph-single", en = "slide.menu.shape";
|
|
1989
|
+
function hr(i) {
|
|
2001
1990
|
return {
|
|
2002
|
-
id:
|
|
1991
|
+
id: en,
|
|
2003
1992
|
type: _e.SUBITEMS,
|
|
2004
|
-
icon:
|
|
1993
|
+
icon: Qt,
|
|
2005
1994
|
tooltip: "slide.shape.insert.title",
|
|
2006
1995
|
hidden$: fe(i, E.UNIVER_SLIDE)
|
|
2007
1996
|
// disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),
|
|
2008
1997
|
};
|
|
2009
1998
|
}
|
|
2010
|
-
function
|
|
1999
|
+
function mr(i) {
|
|
2011
2000
|
return {
|
|
2012
2001
|
id: Ze.id,
|
|
2013
2002
|
title: "slide.shape.insert.rectangle",
|
|
@@ -2015,36 +2004,36 @@ function vr(i) {
|
|
|
2015
2004
|
hidden$: fe(i, E.UNIVER_SLIDE)
|
|
2016
2005
|
};
|
|
2017
2006
|
}
|
|
2018
|
-
const
|
|
2019
|
-
function
|
|
2007
|
+
const tn = "text-single";
|
|
2008
|
+
function vr(i) {
|
|
2020
2009
|
return {
|
|
2021
2010
|
id: et.id,
|
|
2022
2011
|
type: _e.BUTTON,
|
|
2023
|
-
icon:
|
|
2012
|
+
icon: tn,
|
|
2024
2013
|
tooltip: "slide.text.insert.title",
|
|
2025
2014
|
hidden$: fe(i, E.UNIVER_SLIDE)
|
|
2026
2015
|
};
|
|
2027
2016
|
}
|
|
2028
|
-
const
|
|
2029
|
-
[
|
|
2017
|
+
const pr = {
|
|
2018
|
+
[Un.FORMAT]: {
|
|
2030
2019
|
[et.id]: {
|
|
2031
2020
|
order: 0,
|
|
2032
|
-
menuItemFactory:
|
|
2021
|
+
menuItemFactory: vr
|
|
2033
2022
|
},
|
|
2034
|
-
[
|
|
2023
|
+
[Jt]: {
|
|
2035
2024
|
order: 0,
|
|
2036
|
-
menuItemFactory:
|
|
2025
|
+
menuItemFactory: ur,
|
|
2037
2026
|
[Qe.id]: {
|
|
2038
2027
|
order: 0,
|
|
2039
|
-
menuItemFactory:
|
|
2028
|
+
menuItemFactory: gr
|
|
2040
2029
|
}
|
|
2041
2030
|
},
|
|
2042
|
-
[
|
|
2031
|
+
[en]: {
|
|
2043
2032
|
order: 0,
|
|
2044
|
-
menuItemFactory:
|
|
2033
|
+
menuItemFactory: hr,
|
|
2045
2034
|
[Ze.id]: {
|
|
2046
2035
|
order: 0,
|
|
2047
|
-
menuItemFactory:
|
|
2036
|
+
menuItemFactory: mr
|
|
2048
2037
|
}
|
|
2049
2038
|
}
|
|
2050
2039
|
}
|
|
@@ -2052,19 +2041,19 @@ const Cr = {
|
|
|
2052
2041
|
function We(i) {
|
|
2053
2042
|
return i.getContextValue(Ot) && i.getContextValue(xe);
|
|
2054
2043
|
}
|
|
2055
|
-
function
|
|
2056
|
-
return i.getContextValue(
|
|
2044
|
+
function Cr(i) {
|
|
2045
|
+
return i.getContextValue(bn) && i.getContextValue(Ot);
|
|
2057
2046
|
}
|
|
2058
|
-
const
|
|
2047
|
+
const nn = [
|
|
2059
2048
|
M.ARROW_DOWN,
|
|
2060
2049
|
M.ARROW_UP,
|
|
2061
2050
|
M.ARROW_LEFT,
|
|
2062
2051
|
M.ARROW_RIGHT
|
|
2063
2052
|
];
|
|
2064
|
-
[M.ENTER, M.TAB, ...
|
|
2065
|
-
function
|
|
2053
|
+
[M.ENTER, M.TAB, ...nn];
|
|
2054
|
+
function fr() {
|
|
2066
2055
|
const i = [];
|
|
2067
|
-
for (const e of
|
|
2056
|
+
for (const e of nn)
|
|
2068
2057
|
i.push({
|
|
2069
2058
|
id: we.id,
|
|
2070
2059
|
binding: e,
|
|
@@ -2077,7 +2066,7 @@ function _r() {
|
|
|
2077
2066
|
}
|
|
2078
2067
|
}), i.push({
|
|
2079
2068
|
id: we.id,
|
|
2080
|
-
binding: e |
|
|
2069
|
+
binding: e | Vn.SHIFT,
|
|
2081
2070
|
preconditions: (t) => We(t),
|
|
2082
2071
|
staticParameters: {
|
|
2083
2072
|
visible: !1,
|
|
@@ -2088,13 +2077,13 @@ function _r() {
|
|
|
2088
2077
|
});
|
|
2089
2078
|
return i;
|
|
2090
2079
|
}
|
|
2091
|
-
const
|
|
2092
|
-
id:
|
|
2093
|
-
preconditions: (i) => We(i) ||
|
|
2080
|
+
const _r = {
|
|
2081
|
+
id: Zn.id,
|
|
2082
|
+
preconditions: (i) => We(i) || Cr(i),
|
|
2094
2083
|
binding: M.BACKSPACE
|
|
2095
2084
|
};
|
|
2096
|
-
var
|
|
2097
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
2085
|
+
var Sr = Object.getOwnPropertyDescriptor, Ir = (i, e, t, n) => {
|
|
2086
|
+
for (var r = n > 1 ? void 0 : n ? Sr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
2098
2087
|
(o = i[s]) && (r = o(r) || r);
|
|
2099
2088
|
return r;
|
|
2100
2089
|
}, re = (i, e) => (t, n) => e(t, n, i);
|
|
@@ -2103,21 +2092,21 @@ let De = class extends Ve {
|
|
|
2103
2092
|
super(), this._injector = i, this._menuManagerService = e, this._componentManager = t, this._uiPartsService = n, this._commandService = r, this._shortcutService = s, this._initCommands(), this._initCustomComponents(), this._initUIComponents(), this._initMenus(), this._initShortcuts();
|
|
2104
2093
|
}
|
|
2105
2094
|
_initMenus() {
|
|
2106
|
-
this._menuManagerService.mergeMenu(
|
|
2095
|
+
this._menuManagerService.mergeMenu(pr);
|
|
2107
2096
|
}
|
|
2108
2097
|
_initCustomComponents() {
|
|
2109
2098
|
const i = this._componentManager;
|
|
2110
|
-
this.disposeWithMe(i.register(
|
|
2099
|
+
this.disposeWithMe(i.register(qt, Bt)), this.disposeWithMe(i.register(tn, zt)), this.disposeWithMe(i.register(Qt, At)), this.disposeWithMe(i.register(Kt, er)), this.disposeWithMe(i.register(Oe, Ui));
|
|
2111
2100
|
}
|
|
2112
2101
|
_initCommands() {
|
|
2113
2102
|
[
|
|
2114
|
-
Yt,
|
|
2115
2103
|
Xt,
|
|
2116
|
-
|
|
2117
|
-
Qe,
|
|
2104
|
+
Gt,
|
|
2118
2105
|
Zt,
|
|
2106
|
+
Qe,
|
|
2107
|
+
Yt,
|
|
2119
2108
|
et,
|
|
2120
|
-
|
|
2109
|
+
kt,
|
|
2121
2110
|
Ze,
|
|
2122
2111
|
$e,
|
|
2123
2112
|
Ut,
|
|
@@ -2128,30 +2117,30 @@ let De = class extends Ve {
|
|
|
2128
2117
|
}
|
|
2129
2118
|
_initUIComponents() {
|
|
2130
2119
|
this.disposeWithMe(
|
|
2131
|
-
this._uiPartsService.registerComponent(at.LEFT_SIDEBAR, () => ct(
|
|
2120
|
+
this._uiPartsService.registerComponent(at.LEFT_SIDEBAR, () => ct(ar, this._injector))
|
|
2132
2121
|
), this.disposeWithMe(
|
|
2133
|
-
this._uiPartsService.registerComponent(at.CONTENT, () => ct(
|
|
2122
|
+
this._uiPartsService.registerComponent(at.CONTENT, () => ct(dr, this._injector))
|
|
2134
2123
|
);
|
|
2135
2124
|
}
|
|
2136
2125
|
_initShortcuts() {
|
|
2137
2126
|
[
|
|
2138
|
-
|
|
2139
|
-
...
|
|
2127
|
+
_r,
|
|
2128
|
+
...fr()
|
|
2140
2129
|
].forEach((i) => {
|
|
2141
2130
|
this.disposeWithMe(this._shortcutService.registerShortcut(i));
|
|
2142
2131
|
});
|
|
2143
2132
|
}
|
|
2144
2133
|
};
|
|
2145
|
-
De =
|
|
2134
|
+
De = Ir([
|
|
2146
2135
|
re(0, X(ke)),
|
|
2147
|
-
re(1,
|
|
2148
|
-
re(2, X(
|
|
2149
|
-
re(3,
|
|
2136
|
+
re(1, Bn),
|
|
2137
|
+
re(2, X(jn)),
|
|
2138
|
+
re(3, Ln),
|
|
2150
2139
|
re(4, B),
|
|
2151
|
-
re(5,
|
|
2140
|
+
re(5, An)
|
|
2152
2141
|
], De);
|
|
2153
|
-
var
|
|
2154
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
2142
|
+
var br = Object.getOwnPropertyDescriptor, Pr = (i, e, t, n) => {
|
|
2143
|
+
for (var r = n > 1 ? void 0 : n ? br(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
2155
2144
|
(o = i[s]) && (r = o(r) || r);
|
|
2156
2145
|
return r;
|
|
2157
2146
|
}, Ae = (i, e) => (t, n) => e(t, n, i);
|
|
@@ -2180,34 +2169,34 @@ let Ue = class extends pe {
|
|
|
2180
2169
|
_initContextListener() {
|
|
2181
2170
|
}
|
|
2182
2171
|
};
|
|
2183
|
-
Ue =
|
|
2172
|
+
Ue = Pr([
|
|
2184
2173
|
Ae(0, Ce),
|
|
2185
2174
|
Ae(1, T),
|
|
2186
2175
|
Ae(2, Y)
|
|
2187
2176
|
], Ue);
|
|
2188
|
-
var
|
|
2189
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
2177
|
+
var Er = Object.getOwnPropertyDescriptor, Rr = (i, e, t, n) => {
|
|
2178
|
+
for (var r = n > 1 ? void 0 : n ? Er(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
2190
2179
|
(o = i[s]) && (r = o(r) || r);
|
|
2191
2180
|
return r;
|
|
2192
2181
|
}, Ee = (i, e) => (t, n) => e(t, n, i);
|
|
2193
|
-
const
|
|
2182
|
+
const Or = "SLIDE_UI";
|
|
2194
2183
|
var Re;
|
|
2195
|
-
let _t = (Re = class extends
|
|
2184
|
+
let _t = (Re = class extends Pn {
|
|
2196
2185
|
constructor(i = mt, e, t, n, r) {
|
|
2197
2186
|
super(), this._config = i, this._injector = e, this._renderManagerService = t, this._univerInstanceService = n, this._configService = r;
|
|
2198
|
-
const { menu: s, ...o } =
|
|
2187
|
+
const { menu: s, ...o } = En(
|
|
2199
2188
|
{},
|
|
2200
2189
|
mt,
|
|
2201
2190
|
this._config
|
|
2202
2191
|
);
|
|
2203
|
-
s && this._configService.setConfig("menu", s, { merge: !0 }), this._configService.setConfig(
|
|
2192
|
+
s && this._configService.setConfig("menu", s, { merge: !0 }), this._configService.setConfig(si, o);
|
|
2204
2193
|
}
|
|
2205
2194
|
onStarting() {
|
|
2206
2195
|
nt([
|
|
2207
2196
|
[Ue],
|
|
2208
2197
|
[qe, { useClass: He }],
|
|
2209
2198
|
// used by SlideUIController --> EditorContainer
|
|
2210
|
-
[Je, { useClass:
|
|
2199
|
+
[Je, { useClass: Fi }],
|
|
2211
2200
|
[Te]
|
|
2212
2201
|
], this._config.override).forEach((i) => this._injector.add(i));
|
|
2213
2202
|
}
|
|
@@ -2254,33 +2243,33 @@ let _t = (Re = class extends En {
|
|
|
2254
2243
|
} catch {
|
|
2255
2244
|
}
|
|
2256
2245
|
}
|
|
2257
|
-
}, I(Re, "pluginName",
|
|
2258
|
-
_t =
|
|
2246
|
+
}, I(Re, "pluginName", Or), I(Re, "type", E.UNIVER_SLIDE), Re);
|
|
2247
|
+
_t = Rr([
|
|
2259
2248
|
Ee(1, X(ke)),
|
|
2260
2249
|
Ee(2, Y),
|
|
2261
2250
|
Ee(3, T),
|
|
2262
|
-
Ee(4,
|
|
2251
|
+
Ee(4, Rn)
|
|
2263
2252
|
], _t);
|
|
2264
2253
|
export {
|
|
2265
|
-
|
|
2266
|
-
|
|
2254
|
+
Gt as ActivateSlidePageOperation,
|
|
2255
|
+
Xt as AppendSlideOperation,
|
|
2267
2256
|
N as CanvasView,
|
|
2268
2257
|
Ut as DeleteSlideElementOperation,
|
|
2269
2258
|
qe as ISlideEditorBridgeService,
|
|
2270
2259
|
Qe as InsertSlideFloatImageCommand,
|
|
2271
2260
|
Ze as InsertSlideShapeRectangleCommand,
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2261
|
+
kt as InsertSlideShapeRectangleOperation,
|
|
2262
|
+
en as SHAPE_MENU_ID,
|
|
2263
|
+
Jt as SLIDES_IMAGE_MENU_ID,
|
|
2275
2264
|
he as SLIDE_EDITOR_ID,
|
|
2276
|
-
|
|
2265
|
+
Zt as SetSlidePageThumbOperation,
|
|
2277
2266
|
et as SlideAddTextCommand,
|
|
2278
|
-
|
|
2267
|
+
Yt as SlideAddTextOperation,
|
|
2279
2268
|
Te as SlideCanvasPopMangerService,
|
|
2280
|
-
|
|
2281
|
-
|
|
2269
|
+
dr as SlideEditorContainer,
|
|
2270
|
+
ar as SlideSideBar,
|
|
2282
2271
|
De as SlidesUIController,
|
|
2283
|
-
|
|
2272
|
+
pr as SlidesUIMenuSchema,
|
|
2284
2273
|
_t as UniverSlidesUIPlugin,
|
|
2285
2274
|
k as UpdateSlideElementOperation
|
|
2286
2275
|
};
|