@univerjs/slides-ui 0.9.2 → 0.9.3
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 +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -0
- package/lib/cjs/locale/es-ES.js +1 -0
- package/lib/es/index.js +231 -231
- package/lib/es/locale/ca-ES.js +39 -0
- package/lib/es/locale/es-ES.js +39 -0
- package/lib/index.js +231 -231
- package/lib/locale/ca-ES.js +39 -0
- package/lib/locale/es-ES.js +39 -0
- package/lib/types/locale/ca-ES.d.ts +3 -0
- package/lib/types/locale/es-ES.d.ts +3 -0
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -0
- package/lib/umd/locale/es-ES.js +1 -0
- package/package.json +11 -11
package/lib/es/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var S = (n, e, t) =>
|
|
4
|
-
import { Inject as Z, Injector as ke, IUniverInstanceService as w, RxDisposable as ge, UniverInstanceType as E, debounce as
|
|
5
|
-
import { IRenderManagerService as X, Viewport as it, ScrollBar as
|
|
6
|
-
import { ObjectProvider as
|
|
7
|
-
import { DRAWING_IMAGE_ALLOW_IMAGE_LIST as
|
|
8
|
-
import { ILocalFileService as
|
|
1
|
+
var ri = Object.defineProperty;
|
|
2
|
+
var si = (n, e, t) => e in n ? ri(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var S = (n, e, t) => si(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { Inject as Z, Injector as ke, IUniverInstanceService as w, RxDisposable as ge, UniverInstanceType as E, debounce as oi, getColorStyle as ci, CommandType as D, PageElementType as ze, merge as Ct, LocaleService as Q, ICommandService as U, generateRandomId as St, BasicShapes as ai, createInternalEditorID as li, createIdentifier as It, IContextService as fe, DocumentFlavor as di, FOCUSING_UNIVER_EDITOR as bt, EDITOR_ACTIVATED as Re, FORMULA_EDITOR_ACTIVATED as ui, Disposable as De, DisposableCollection as Ke, toDisposable as Et, FOCUSING_COMMON_DRAWINGS as hi, FOCUSING_EDITOR_STANDALONE as xt, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE as Rt, DocumentDataModel as vi, HorizontalAlign as Ot, VerticalAlign as Oe, IUndoRedoService as gi, WrapStrategy as et, FOCUSING_EDITOR_BUT_HIDDEN as fi, DEFAULT_EMPTY_DOCUMENT_VALUE as pi, Direction as j, Plugin as mi, mergeOverrideWithDependencies as tt, IConfigService as _i } from "@univerjs/core";
|
|
5
|
+
import { IRenderManagerService as X, Viewport as it, ScrollBar as wt, getCurrentTypeOfRenderer as Le, Slide as Ci, Rect as yt, Scene as Si, ObjectType as le, FIX_ONE_PIXEL_BLUR_OFFSET as ne, DeviceInputEventType as q, pxToNum as Ii, convertTextRotation as nt, fixLineWidthByScale as rt } from "@univerjs/engine-render";
|
|
6
|
+
import { ObjectProvider as bi, SLIDE_KEY as re } from "@univerjs/slides";
|
|
7
|
+
import { DRAWING_IMAGE_ALLOW_IMAGE_LIST as Ei, IImageIoService as xi, getImageSize as Ri } from "@univerjs/drawing";
|
|
8
|
+
import { ILocalFileService as Oi, useDependency as O, ISidebarService as Pt, getMenuHiddenObservable as pe, MenuItemType as me, RibbonStartGroup as wi, useObservable as yi, DISABLE_AUTO_FOCUS_KEY as st, KeyCode as y, MetaKeys as Pi, IMenuManagerService as Ti, ComponentManager as Mi, IUIPartsService as Ni, IShortcutService as Di, BuiltInUIPart as ot, connectInjector as ct, ICanvasPopupService as Ui, ILayoutService as Vi } from "@univerjs/ui";
|
|
9
9
|
import { jsxs as x, jsx as u } from "react/jsx-runtime";
|
|
10
|
-
import { Button as Se, clsx as K, Dropdown as
|
|
11
|
-
import { forwardRef as F, useRef as
|
|
12
|
-
import { IEditorService as Ze, DeleteLeftCommand as
|
|
13
|
-
import { BehaviorSubject as J, Subject as
|
|
14
|
-
import { DocSelectionManagerService as
|
|
15
|
-
var
|
|
16
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
10
|
+
import { Button as Se, clsx as K, Dropdown as Tt, ColorPicker as ji, borderTopClassName as Mt, InputNumber as ae, borderClassName as ue, scrollbarClassName as Ai } from "@univerjs/design";
|
|
11
|
+
import { forwardRef as F, useRef as Nt, createElement as W, useState as $, useEffect as he, useMemo as Li, createRef as Bi, useCallback as at } from "react";
|
|
12
|
+
import { IEditorService as Ze, DeleteLeftCommand as $i, DocSelectionRenderService as lt, VIEWPORT_KEY as dt, DOCS_COMPONENT_MAIN_LAYER_INDEX as Hi, MoveSelectionOperation as Fi, MoveCursorOperation as Wi, DOCS_VIEW_KEY as ki } from "@univerjs/docs-ui";
|
|
13
|
+
import { BehaviorSubject as J, Subject as Dt, filter as zi, takeUntil as ut } from "rxjs";
|
|
14
|
+
import { DocSelectionManagerService as Ki, DocSkeletonManagerService as ht, RichTextEditingMutation as Zi } from "@univerjs/docs";
|
|
15
|
+
var Xi = Object.getOwnPropertyDescriptor, Gi = (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
19
|
}, Ue = (n, e) => (t, i) => e(t, i, n);
|
|
@@ -21,10 +21,10 @@ let ve = class extends ge {
|
|
|
21
21
|
constructor(e, t, i, r) {
|
|
22
22
|
super();
|
|
23
23
|
S(this, "_objectProvider", null);
|
|
24
|
-
S(this, "_refreshThumb",
|
|
24
|
+
S(this, "_refreshThumb", oi(() => {
|
|
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(bi), this._addNewRender();
|
|
28
28
|
}
|
|
29
29
|
_addNewRender() {
|
|
30
30
|
const { unitId: e, engine: t, scene: i } = this._renderContext, r = this._getCurrUnitModel();
|
|
@@ -56,7 +56,7 @@ let ve = class extends ge {
|
|
|
56
56
|
o.onMouseWheel(l, h);
|
|
57
57
|
}), i.onFileLoaded$.subscribeEvent(() => {
|
|
58
58
|
this._refreshThumb();
|
|
59
|
-
}),
|
|
59
|
+
}), wt.attachTo(o);
|
|
60
60
|
const c = this._createSlide(i);
|
|
61
61
|
this._renderContext.mainComponent = c, this._createSlidePages(r, c), this.createThumbs(), t.runRenderLoop(() => {
|
|
62
62
|
i.render();
|
|
@@ -79,7 +79,7 @@ let ve = class extends ge {
|
|
|
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: c = 100 } = s, a = new
|
|
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 Ci(re.COMPONENT, {
|
|
83
83
|
left: (i - o) / 2,
|
|
84
84
|
top: (r - c) / 2,
|
|
85
85
|
width: o,
|
|
@@ -89,14 +89,14 @@ let ve = class extends ge {
|
|
|
89
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, c = new
|
|
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: ci(t) || "rgba(255,255,255,1)",
|
|
100
100
|
zIndex: 0,
|
|
101
101
|
evented: !1
|
|
102
102
|
});
|
|
@@ -183,7 +183,7 @@ let ve = class extends ge {
|
|
|
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: c, height: a } = o, h = new
|
|
186
|
+
const { scene: r, mainComponent: s } = i, o = s, { width: c, height: a } = o, h = new Si(e, o, {
|
|
187
187
|
width: c,
|
|
188
188
|
height: a
|
|
189
189
|
});
|
|
@@ -249,16 +249,16 @@ let ve = class extends ge {
|
|
|
249
249
|
s && o && s.addPageScene(o), e.appendPage(t), e.setActivePage(t);
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
|
-
ve =
|
|
252
|
+
ve = Gi([
|
|
253
253
|
Ue(1, Z(ke)),
|
|
254
254
|
Ue(2, w),
|
|
255
255
|
Ue(3, X)
|
|
256
256
|
], ve);
|
|
257
|
-
var
|
|
258
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
257
|
+
var Yi = Object.getOwnPropertyDescriptor, qi = (n, e, t, i) => {
|
|
258
|
+
for (var r = i > 1 ? void 0 : i ? Yi(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
|
-
},
|
|
261
|
+
}, Ji = (n, e) => (t, i) => e(t, i, n);
|
|
262
262
|
let T = class extends ge {
|
|
263
263
|
constructor(n) {
|
|
264
264
|
super(), this._renderManagerService = n;
|
|
@@ -291,10 +291,10 @@ let T = class extends ge {
|
|
|
291
291
|
this._getSlideRenderControllerFromRenderUnit(n).appendPage();
|
|
292
292
|
}
|
|
293
293
|
};
|
|
294
|
-
T =
|
|
295
|
-
|
|
294
|
+
T = qi([
|
|
295
|
+
Ji(0, X)
|
|
296
296
|
], T);
|
|
297
|
-
const
|
|
297
|
+
const Ut = {
|
|
298
298
|
id: "slide.operation.activate-slide",
|
|
299
299
|
type: D.OPERATION,
|
|
300
300
|
handler: (n, e) => {
|
|
@@ -306,14 +306,14 @@ const Dt = {
|
|
|
306
306
|
const a = (l = c.scene) == null ? void 0 : l.getTransformer();
|
|
307
307
|
return a && a.clearControls(), i.activePage(e.id, t), !0;
|
|
308
308
|
}
|
|
309
|
-
},
|
|
309
|
+
}, Vt = {
|
|
310
310
|
id: "slide.operation.append-slide",
|
|
311
311
|
type: D.OPERATION,
|
|
312
312
|
handler: (n, e) => {
|
|
313
313
|
const t = e.unitId;
|
|
314
314
|
return n.get(w).getUnit(t) ? (n.get(T).appendPage(t), !0) : !1;
|
|
315
315
|
}
|
|
316
|
-
},
|
|
316
|
+
}, jt = {
|
|
317
317
|
id: "slide.operation.delete-element",
|
|
318
318
|
type: D.OPERATION,
|
|
319
319
|
handler: (n, e) => {
|
|
@@ -330,14 +330,14 @@ const Dt = {
|
|
|
330
330
|
var V;
|
|
331
331
|
const t = n.get(w), i = (V = t.getCurrentUnitForType(E.UNIVER_SLIDE)) == null ? void 0 : V.getUnitId();
|
|
332
332
|
if (!i) return !1;
|
|
333
|
-
const s = await n.get(
|
|
333
|
+
const s = await n.get(Oi).openFile({
|
|
334
334
|
multiple: !0,
|
|
335
|
-
accept:
|
|
335
|
+
accept: Ei.map((R) => `.${R.replace("image/", "")}`).join(",")
|
|
336
336
|
});
|
|
337
337
|
if (s.length !== 1) return !1;
|
|
338
|
-
const c = await n.get(
|
|
338
|
+
const c = await n.get(xi).saveImage(s[0]);
|
|
339
339
|
if (!c) return !1;
|
|
340
|
-
const { imageId: a, imageSourceType: h, source: l, base64Cache: d } = c, { width: g, height: m, image: p } = await
|
|
340
|
+
const { imageId: a, imageSourceType: h, source: l, base64Cache: d } = c, { width: g, height: m, image: p } = await Ri(d || ""), f = t.getUnit(i);
|
|
341
341
|
if (!f) return !1;
|
|
342
342
|
const v = f.getActivePage(), _ = Object.values(v.pageElements), I = _ != null && _.length ? Math.max(..._.map((R) => R.zIndex)) : 20, b = {
|
|
343
343
|
id: a,
|
|
@@ -372,7 +372,7 @@ var N = function() {
|
|
|
372
372
|
}
|
|
373
373
|
return n;
|
|
374
374
|
}, N.apply(this, arguments);
|
|
375
|
-
},
|
|
375
|
+
}, Qi = function(n, e) {
|
|
376
376
|
var t = {};
|
|
377
377
|
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && e.indexOf(i) < 0 && (t[i] = n[i]);
|
|
378
378
|
if (n != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -380,15 +380,15 @@ var N = function() {
|
|
|
380
380
|
e.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(n, i[r]) && (t[i[r]] = n[i[r]]);
|
|
381
381
|
return t;
|
|
382
382
|
}, k = F(function(n, e) {
|
|
383
|
-
var t = n.icon, i = n.id, r = n.className, s = n.extend, o =
|
|
384
|
-
return
|
|
383
|
+
var t = n.icon, i = n.id, r = n.className, s = n.extend, o = Qi(n, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(i, " ").concat(r || "").trim(), a = Nt("_".concat(nn()));
|
|
384
|
+
return At(t, "".concat(i), { defIds: t.defIds, idSuffix: a.current }, N({ ref: e, className: c }, o), s);
|
|
385
385
|
});
|
|
386
|
-
function
|
|
387
|
-
return W(n.tag, N(N({ key: e },
|
|
388
|
-
return
|
|
386
|
+
function At(n, e, t, i, r) {
|
|
387
|
+
return W(n.tag, N(N({ key: e }, en(n, t, r)), i), (tn(n, t).children || []).map(function(s, o) {
|
|
388
|
+
return At(s, "".concat(e, "-").concat(n.tag, "-").concat(o), t, void 0, r);
|
|
389
389
|
}));
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function en(n, e, t) {
|
|
392
392
|
var i = N({}, n.attrs);
|
|
393
393
|
t != null && t.colorChannel1 && i.fill === "colorChannel1" && (i.fill = t.colorChannel1), n.tag === "mask" && i.id && (i.id = i.id + e.idSuffix), Object.entries(i).forEach(function(s) {
|
|
394
394
|
var o = s[0], c = s[1];
|
|
@@ -400,88 +400,88 @@ function tn(n, e, t) {
|
|
|
400
400
|
typeof c == "string" && (i[o] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
401
401
|
})), i;
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function tn(n, e) {
|
|
404
404
|
var t, i = e.defIds;
|
|
405
405
|
return !i || i.length === 0 ? n : n.tag === "defs" && (!((t = n.children) === null || t === void 0) && t.length) ? N(N({}, n), { children: n.children.map(function(r) {
|
|
406
406
|
return typeof r.attrs.id == "string" && i && i.includes(r.attrs.id) ? N(N({}, r), { attrs: N(N({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
|
|
407
407
|
}) }) : n;
|
|
408
408
|
}
|
|
409
|
-
function
|
|
409
|
+
function nn() {
|
|
410
410
|
return Math.random().toString(36).substring(2, 8);
|
|
411
411
|
}
|
|
412
412
|
k.displayName = "UniverIcon";
|
|
413
|
-
var
|
|
413
|
+
var rn = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "colorChannel1", d: "M11.0363 12.2367V14.0367C11.0363 14.3681 11.3049 14.6367 11.6363 14.6367C11.9676 14.6367 12.2363 14.3681 12.2363 14.0367V12.2367H14.0364C14.3677 12.2367 14.6364 11.9681 14.6364 11.6367C14.6364 11.3054 14.3677 11.0367 14.0364 11.0367H12.2363V9.23672C12.2363 8.90535 11.9676 8.63672 11.6363 8.63672C11.3049 8.63672 11.0363 8.90535 11.0363 9.23672V11.0367H9.23635C8.90498 11.0367 8.63635 11.3054 8.63635 11.6367C8.63635 11.9681 8.90498 12.2367 9.23635 12.2367H11.0363Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2.56365 1.36377C1.90091 1.36377 1.36365 1.90103 1.36365 2.56377V6.16377C1.36365 6.82651 1.90091 7.36377 2.56365 7.36377H6.16365C6.82639 7.36377 7.36365 6.82651 7.36365 6.16377V2.56377C7.36365 1.90103 6.82639 1.36377 6.16365 1.36377H2.56365ZM6.16365 2.56377H2.56365L2.56365 6.16377H6.16365V2.56377Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2.56365 8.63647C1.90091 8.63647 1.36365 9.17373 1.36365 9.83647V13.4365C1.36365 14.0992 1.90091 14.6365 2.56365 14.6365H6.16365C6.82639 14.6365 7.36365 14.0992 7.36365 13.4365V9.83647C7.36365 9.17373 6.82639 8.63647 6.16365 8.63647H2.56365ZM6.16365 9.83647H2.56365L2.56365 13.4365H6.16365V9.83647Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M9.83635 7.36377C9.17361 7.36377 8.63635 6.82651 8.63635 6.16377V2.56377C8.63635 1.90103 9.17361 1.36377 9.83635 1.36377H13.4364C14.0991 1.36377 14.6364 1.90103 14.6364 2.56377V6.16377C14.6364 6.82651 14.0991 7.36377 13.4364 7.36377H9.83635ZM9.83635 6.16377V2.56377L13.4364 2.56377V6.16377H9.83635Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Lt = F(function(n, e) {
|
|
414
414
|
return W(k, Object.assign({}, n, {
|
|
415
415
|
id: "autofill-double-icon",
|
|
416
416
|
ref: e,
|
|
417
|
-
icon:
|
|
417
|
+
icon: rn
|
|
418
418
|
}));
|
|
419
419
|
});
|
|
420
|
-
|
|
421
|
-
var
|
|
420
|
+
Lt.displayName = "AutofillDoubleIcon";
|
|
421
|
+
var sn = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M14.0045 4.4334C14.8881 4.4334 15.6045 3.71705 15.6045 2.8334C15.6045 1.94974 14.8881 1.2334 14.0045 1.2334H3.70449C2.82084 1.2334 2.10449 1.94974 2.10449 2.8334C2.10449 3.71705 2.82084 4.4334 3.70449 4.4334H14.0045ZM14.4045 2.8334C14.4045 3.05431 14.2254 3.2334 14.0045 3.2334H3.70449C3.48358 3.2334 3.30449 3.05431 3.30449 2.8334C3.30449 2.61248 3.48358 2.4334 3.70449 2.4334H14.0045C14.2254 2.4334 14.4045 2.61249 14.4045 2.8334Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.1544 8.5999C15.038 8.5999 15.7544 7.88356 15.7544 6.9999C15.7544 6.11625 15.038 5.3999 14.1544 5.3999H3.85439C2.97074 5.3999 2.25439 6.11625 2.25439 6.9999C2.25439 7.88356 2.97074 8.5999 3.85439 8.5999H14.1544ZM14.5544 6.9999C14.5544 7.22082 14.3753 7.3999 14.1544 7.3999H3.85439C3.63348 7.3999 3.45439 7.22082 3.45439 6.9999C3.45439 6.77899 3.63348 6.5999 3.85439 6.5999H14.1544C14.3753 6.5999 14.5544 6.77899 14.5544 6.9999Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M8.57975 14.5902L6.58023 12.5907C6.34591 12.3564 6.34591 11.9765 6.58023 11.7421C6.81454 11.5078 7.19444 11.5078 7.42876 11.7421L8.40449 12.7179V10.1664C8.40449 9.83504 8.67312 9.56641 9.00449 9.56641C9.33586 9.56641 9.60449 9.83504 9.60449 10.1664V12.7179L10.5802 11.7421C10.8145 11.5078 11.1944 11.5078 11.4288 11.7421C11.6631 11.9765 11.6631 12.3564 11.4288 12.5907L9.42923 14.5902" } }, { tag: "path", attrs: { fill: "currentColor", d: "M8.57975 14.5902C8.58121 14.5917 8.58268 14.5931 8.58416 14.5946C8.64077 14.6502 8.70566 14.6923 8.77482 14.7209C8.84557 14.7502 8.92314 14.7664 9.00449 14.7664C9.08585 14.7664 9.16342 14.7502 9.23416 14.7209C9.30332 14.6923 9.36821 14.6502 9.42482 14.5946" } }] }, Bt = F(function(n, e) {
|
|
422
422
|
return W(k, Object.assign({}, n, {
|
|
423
423
|
id: "bottom-icon",
|
|
424
424
|
ref: e,
|
|
425
|
-
icon:
|
|
425
|
+
icon: sn
|
|
426
426
|
}));
|
|
427
427
|
});
|
|
428
|
-
|
|
429
|
-
var
|
|
428
|
+
Bt.displayName = "BottomIcon";
|
|
429
|
+
var on = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "g", attrs: { clipPath: "url(#graph-icon_clip0_1293_28)" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M6.29541 11.1896C3.83208 10.7489 1.9624 8.59552 1.9624 6.00544C1.9624 3.09673 4.32036 0.73877 7.22907 0.73877C9.93483 0.73877 12.164 2.77918 12.4619 5.40527H13.5621C14.998 5.40527 16.1621 6.56933 16.1621 8.00527V12.6719C16.1621 14.1079 14.998 15.2719 13.5621 15.2719H8.89541C7.45947 15.2719 6.29541 14.1079 6.29541 12.6719V11.1896ZM3.1624 6.00544C3.1624 3.75947 4.98311 1.93877 7.22907 1.93877C9.27112 1.93877 10.9616 3.44388 11.2518 5.40527H8.89541C7.45947 5.40527 6.29541 6.56933 6.29541 8.00527V9.96442C4.49946 9.5425 3.1624 7.93012 3.1624 6.00544ZM7.49541 8.00527C7.49541 7.23207 8.12221 6.60527 8.89541 6.60527H13.5621C14.3353 6.60527 14.9621 7.23207 14.9621 8.00527V12.6719C14.9621 13.4451 14.3353 14.0719 13.5621 14.0719H8.89541C8.12221 14.0719 7.49541 13.4451 7.49541 12.6719V8.00527Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, { tag: "defs", attrs: {}, children: [{ tag: "clipPath", attrs: { id: "graph-icon_clip0_1293_28" }, children: [{ tag: "path", attrs: { fill: "white", d: "M0 0H16V16H0z", transform: "translate(.9)" } }] }] }], defIds: ["graph-icon_clip0_1293_28"] }, $t = F(function(n, e) {
|
|
430
430
|
return W(k, Object.assign({}, n, {
|
|
431
431
|
id: "graph-icon",
|
|
432
432
|
ref: e,
|
|
433
|
-
icon:
|
|
433
|
+
icon: on
|
|
434
434
|
}));
|
|
435
435
|
});
|
|
436
|
-
|
|
437
|
-
var
|
|
436
|
+
$t.displayName = "GraphIcon";
|
|
437
|
+
var cn = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ge = F(function(n, e) {
|
|
438
438
|
return W(k, Object.assign({}, n, {
|
|
439
439
|
id: "more-down-icon",
|
|
440
440
|
ref: e,
|
|
441
|
-
icon:
|
|
441
|
+
icon: cn
|
|
442
442
|
}));
|
|
443
443
|
});
|
|
444
444
|
Ge.displayName = "MoreDownIcon";
|
|
445
|
-
var
|
|
445
|
+
var an = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.25 2.96401C1.25 3.84767 1.96634 4.56401 2.85 4.56401H13.15C14.0337 4.56401 14.75 3.84767 14.75 2.96401C14.75 2.08036 14.0337 1.36401 13.15 1.36401H2.85C1.96635 1.36401 1.25 2.08036 1.25 2.96401ZM2.85 3.36401C2.62909 3.36401 2.45 3.18493 2.45 2.96401C2.45 2.7431 2.62909 2.56401 2.85 2.56401H13.15C13.3709 2.56401 13.55 2.7431 13.55 2.96401C13.55 3.18493 13.3709 3.36401 13.15 3.36401H2.85Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.57564 11.6118C5.80995 11.3774 6.18985 11.3774 6.42417 11.6118L7.3999 12.5875V6.36951C7.3999 6.03814 7.66853 5.76951 7.9999 5.76951C8.33127 5.76951 8.5999 6.03814 8.5999 6.36951V12.5875L9.57564 11.6118C9.80995 11.3774 10.1899 11.3774 10.4242 11.6118C10.6585 11.8461 10.6585 12.226 10.4242 12.4603L8.4324 14.452C8.32324 14.5655 8.16982 14.6362 7.9999 14.6362C7.82998 14.6362 7.67655 14.5655 7.56739 14.452L5.57564 12.4603C5.34132 12.226 5.34132 11.8461 5.57564 11.6118Z" } }] }, Ht = F(function(n, e) {
|
|
446
446
|
return W(k, Object.assign({}, n, {
|
|
447
447
|
id: "move-down-icon",
|
|
448
448
|
ref: e,
|
|
449
|
-
icon:
|
|
449
|
+
icon: an
|
|
450
450
|
}));
|
|
451
451
|
});
|
|
452
|
-
|
|
453
|
-
var
|
|
452
|
+
Ht.displayName = "MoveDownIcon";
|
|
453
|
+
var ln = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "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" } }] }, Ft = F(function(n, e) {
|
|
454
454
|
return W(k, Object.assign({}, n, {
|
|
455
455
|
id: "move-up-icon",
|
|
456
456
|
ref: e,
|
|
457
|
-
icon:
|
|
457
|
+
icon: ln
|
|
458
458
|
}));
|
|
459
459
|
});
|
|
460
|
-
|
|
461
|
-
var
|
|
460
|
+
Ft.displayName = "MoveUpIcon";
|
|
461
|
+
var dn = { 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" } }] }, Wt = F(function(n, e) {
|
|
462
462
|
return W(k, Object.assign({}, n, {
|
|
463
463
|
id: "paint-bucket-double-icon",
|
|
464
464
|
ref: e,
|
|
465
|
-
icon:
|
|
465
|
+
icon: dn
|
|
466
466
|
}));
|
|
467
467
|
});
|
|
468
|
-
|
|
469
|
-
var
|
|
468
|
+
Wt.displayName = "PaintBucketDoubleIcon";
|
|
469
|
+
var un = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "g", attrs: { fill: "currentColor", clipPath: "url(#text-icon_clip0_1293_26)" }, children: [{ tag: "path", attrs: { d: "M2.22891 2.07227C1.89754 2.07227 1.62891 2.34089 1.62891 2.67227C1.62891 3.00364 1.89754 3.27227 2.22891 3.27227H6.29541V14.0056C6.29541 14.337 6.56404 14.6056 6.89541 14.6056C7.22678 14.6056 7.49541 14.337 7.49541 14.0056V3.27227H11.5622C11.8936 3.27227 12.1622 3.00364 12.1622 2.67227C12.1622 2.34089 11.8936 2.07227 11.5622 2.07227H2.22891Z" } }, { tag: "path", attrs: { d: "M10.2289 6.40552C9.89754 6.40552 9.62891 6.67415 9.62891 7.00552C9.62891 7.33689 9.89754 7.60552 10.2289 7.60552H12.2954V14.0055C12.2954 14.3369 12.564 14.6055 12.8954 14.6055C13.2268 14.6055 13.4954 14.3369 13.4954 14.0055V7.60552H15.5622C15.8936 7.60552 16.1622 7.33689 16.1622 7.00552C16.1622 6.67415 15.8936 6.40552 15.5622 6.40552H10.2289Z" } }] }, { tag: "defs", attrs: {}, children: [{ tag: "clipPath", attrs: { id: "text-icon_clip0_1293_26" }, children: [{ tag: "path", attrs: { fill: "white", d: "M0 0H16V16H0z", transform: "translate(.9)" } }] }] }], defIds: ["text-icon_clip0_1293_26"] }, kt = F(function(n, e) {
|
|
470
470
|
return W(k, Object.assign({}, n, {
|
|
471
471
|
id: "text-icon",
|
|
472
472
|
ref: e,
|
|
473
|
-
icon:
|
|
473
|
+
icon: un
|
|
474
474
|
}));
|
|
475
475
|
});
|
|
476
|
-
|
|
477
|
-
var
|
|
476
|
+
kt.displayName = "TextIcon";
|
|
477
|
+
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: "M7.82994 1.40913C7.88746 1.35161 7.95376 1.30821 8.02453 1.27893C8.09527 1.24959 8.17285 1.2334 8.2542 1.2334C8.33555 1.2334 8.41313 1.24959 8.48387 1.27893C8.55464 1.30821 8.62094 1.35161 8.67846 1.40913L10.6785 3.40913C10.9128 3.64345 10.9128 4.02335 10.6785 4.25766C10.4441 4.49198 10.0642 4.49198 9.82994 4.25766L8.8542 3.28193V5.8334C8.8542 6.16477 8.58557 6.4334 8.2542 6.4334C7.92283 6.4334 7.6542 6.16477 7.6542 5.8334V3.28193L6.67846 4.25766C6.44415 4.49198 6.06425 4.49198 5.82994 4.25766C5.59562 4.02335 5.59562 3.64345 5.82994 3.40913L7.82994 1.40913Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.50439 9C1.50439 8.11634 2.22074 7.4 3.10439 7.4H13.4044C14.288 7.4 15.0044 8.11634 15.0044 9C15.0044 9.88366 14.2881 10.6 13.4044 10.6H3.1044C2.22074 10.6 1.50439 9.88366 1.50439 9ZM3.10439 8.6C2.88348 8.6 2.70439 8.77909 2.70439 9C2.70439 9.22091 2.88348 9.4 3.1044 9.4H13.4044C13.6253 9.4 13.8044 9.22091 13.8044 9C13.8044 8.77909 13.6253 8.6 13.4044 8.6H3.10439Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.6543 13.1665C1.6543 12.2828 2.37064 11.5665 3.2543 11.5665H13.5543C14.438 11.5665 15.1543 12.2828 15.1543 13.1665C15.1543 14.0502 14.438 14.7665 13.5543 14.7665H3.2543C2.37064 14.7665 1.6543 14.0502 1.6543 13.1665ZM3.2543 12.7665C3.03338 12.7665 2.8543 12.9456 2.8543 13.1665C2.8543 13.3874 3.03338 13.5665 3.2543 13.5665H13.5543C13.7752 13.5665 13.9543 13.3874 13.9543 13.1665C13.9543 12.9456 13.7752 12.7665 13.5543 12.7665H3.2543Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, zt = F(function(n, e) {
|
|
478
478
|
return W(k, Object.assign({}, n, {
|
|
479
479
|
id: "topmost-icon",
|
|
480
480
|
ref: e,
|
|
481
|
-
icon:
|
|
481
|
+
icon: hn
|
|
482
482
|
}));
|
|
483
483
|
});
|
|
484
|
-
|
|
484
|
+
zt.displayName = "TopmostIcon";
|
|
485
485
|
const H = {
|
|
486
486
|
id: "slide.operation.update-element",
|
|
487
487
|
type: D.OPERATION,
|
|
@@ -489,10 +489,10 @@ const H = {
|
|
|
489
489
|
const { oKey: t, props: i } = e, r = n.get(w), s = e == null ? void 0 : e.unitId, o = r.getUnit(s);
|
|
490
490
|
if (!o) return !1;
|
|
491
491
|
const c = o.getActivePage();
|
|
492
|
-
return c.pageElements[t] =
|
|
492
|
+
return c.pageElements[t] = Ct(c.pageElements[t], i), o.updatePage(c.id, c), !0;
|
|
493
493
|
}
|
|
494
494
|
};
|
|
495
|
-
function
|
|
495
|
+
function vn(n) {
|
|
496
496
|
const { pageId: e, unitId: t } = n, i = O(Q), r = O(T), s = O(U), o = r.getRenderUnitByPageId(e, t), c = o == null ? void 0 : o.scene;
|
|
497
497
|
if (!c) return null;
|
|
498
498
|
const a = c.getTransformer();
|
|
@@ -530,7 +530,7 @@ function gn(n) {
|
|
|
530
530
|
/* forward */
|
|
531
531
|
);
|
|
532
532
|
}, children: /* @__PURE__ */ x("span", { className: "univer-flex univer-items-center univer-gap-1", children: [
|
|
533
|
-
/* @__PURE__ */ u(
|
|
533
|
+
/* @__PURE__ */ u(Ft, {}),
|
|
534
534
|
i.t("image-panel.arrange.forward")
|
|
535
535
|
] }) }) }),
|
|
536
536
|
/* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(Se, { onClick: () => {
|
|
@@ -539,7 +539,7 @@ function gn(n) {
|
|
|
539
539
|
/* backward */
|
|
540
540
|
);
|
|
541
541
|
}, children: /* @__PURE__ */ x("span", { className: "univer-flex univer-items-center univer-gap-1", children: [
|
|
542
|
-
/* @__PURE__ */ u(
|
|
542
|
+
/* @__PURE__ */ u(Ht, {}),
|
|
543
543
|
i.t("image-panel.arrange.backward")
|
|
544
544
|
] }) }) })
|
|
545
545
|
] }),
|
|
@@ -550,7 +550,7 @@ function gn(n) {
|
|
|
550
550
|
/* front */
|
|
551
551
|
);
|
|
552
552
|
}, children: /* @__PURE__ */ x("span", { className: "univer-flex univer-items-center univer-gap-1", children: [
|
|
553
|
-
/* @__PURE__ */ u(
|
|
553
|
+
/* @__PURE__ */ u(zt, {}),
|
|
554
554
|
i.t("image-panel.arrange.front")
|
|
555
555
|
] }) }) }),
|
|
556
556
|
/* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(Se, { onClick: () => {
|
|
@@ -559,13 +559,13 @@ function gn(n) {
|
|
|
559
559
|
/* back */
|
|
560
560
|
);
|
|
561
561
|
}, children: /* @__PURE__ */ x("span", { className: "univer-flex univer-items-center univer-gap-1", children: [
|
|
562
|
-
/* @__PURE__ */ u(
|
|
562
|
+
/* @__PURE__ */ u(Bt, {}),
|
|
563
563
|
i.t("image-panel.arrange.back")
|
|
564
564
|
] }) }) })
|
|
565
565
|
] })
|
|
566
566
|
] });
|
|
567
567
|
}
|
|
568
|
-
function
|
|
568
|
+
function gn(n) {
|
|
569
569
|
var p, f;
|
|
570
570
|
const { pageId: e, unitId: t } = n, i = O(Q), r = O(T), s = O(U), o = r.getRenderUnitByPageId(e, t), c = o == null ? void 0 : o.scene;
|
|
571
571
|
if (!c) return null;
|
|
@@ -594,7 +594,7 @@ function fn(n) {
|
|
|
594
594
|
return /* @__PURE__ */ u(
|
|
595
595
|
"div",
|
|
596
596
|
{
|
|
597
|
-
className: K("univer-relative univer-bottom-0 univer-mt-5 univer-w-full",
|
|
597
|
+
className: K("univer-relative univer-bottom-0 univer-mt-5 univer-w-full", Mt),
|
|
598
598
|
children: /* @__PURE__ */ x("div", { className: "univer-relative univer-w-full", children: [
|
|
599
599
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u(
|
|
600
600
|
"div",
|
|
@@ -604,17 +604,17 @@ function fn(n) {
|
|
|
604
604
|
}
|
|
605
605
|
) }),
|
|
606
606
|
/* @__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
|
-
|
|
607
|
+
Tt,
|
|
608
608
|
{
|
|
609
609
|
overlay: /* @__PURE__ */ u("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ u(
|
|
610
|
-
|
|
610
|
+
ji,
|
|
611
611
|
{
|
|
612
612
|
value: "#fff",
|
|
613
613
|
onChange: m
|
|
614
614
|
}
|
|
615
615
|
) }),
|
|
616
616
|
children: /* @__PURE__ */ x("a", { className: "univer-flex univer-cursor-pointer univer-items-center univer-gap-1", children: [
|
|
617
|
-
/* @__PURE__ */ u(
|
|
617
|
+
/* @__PURE__ */ u(Wt, { className: "univer-fill-primary-600" }),
|
|
618
618
|
/* @__PURE__ */ u(Ge, {})
|
|
619
619
|
] })
|
|
620
620
|
}
|
|
@@ -623,7 +623,7 @@ function fn(n) {
|
|
|
623
623
|
}
|
|
624
624
|
);
|
|
625
625
|
}
|
|
626
|
-
function
|
|
626
|
+
function fn(n) {
|
|
627
627
|
const { pageId: e, unitId: t } = n, i = O(Q), r = O(T), s = O(U), o = r.getRenderUnitByPageId(e, t), c = o == null ? void 0 : o.scene;
|
|
628
628
|
if (!c) return null;
|
|
629
629
|
const a = c.getTransformer();
|
|
@@ -638,13 +638,13 @@ function pn(n) {
|
|
|
638
638
|
angle: f = 0
|
|
639
639
|
} = l, [v, _] = $(d), [I, b] = $(g), [P, M] = $(m), [V, R] = $(p), [z, se] = $(f), L = (C) => {
|
|
640
640
|
const { objects: oe } = C, ce = oe.values().next().value, {
|
|
641
|
-
width:
|
|
642
|
-
height:
|
|
643
|
-
left:
|
|
644
|
-
top:
|
|
645
|
-
angle:
|
|
641
|
+
width: Qt = 0,
|
|
642
|
+
height: ei = 0,
|
|
643
|
+
left: ti = 0,
|
|
644
|
+
top: ii = 0,
|
|
645
|
+
angle: ni = 0
|
|
646
646
|
} = ce;
|
|
647
|
-
_(
|
|
647
|
+
_(Qt), b(ei), M(ti), R(ii), se(ni);
|
|
648
648
|
};
|
|
649
649
|
he(() => {
|
|
650
650
|
const C = a.changeStart$.subscribe((ce) => {
|
|
@@ -706,7 +706,7 @@ function pn(n) {
|
|
|
706
706
|
return /* @__PURE__ */ x(
|
|
707
707
|
"div",
|
|
708
708
|
{
|
|
709
|
-
className: K("univer-relative univer-bottom-0 univer-mt-5 univer-w-full",
|
|
709
|
+
className: K("univer-relative univer-bottom-0 univer-mt-5 univer-w-full", Mt),
|
|
710
710
|
children: [
|
|
711
711
|
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full", children: /* @__PURE__ */ u(
|
|
712
712
|
"div",
|
|
@@ -794,7 +794,7 @@ function pn(n) {
|
|
|
794
794
|
);
|
|
795
795
|
}
|
|
796
796
|
const xe = "COMPONENT_SLIDE_SIDEBAR";
|
|
797
|
-
function
|
|
797
|
+
function pn() {
|
|
798
798
|
var h, l, d;
|
|
799
799
|
const n = O(w), e = O(T), t = n.getCurrentUnitForType(E.UNIVER_SLIDE), i = (h = t == null ? void 0 : t.getActivePage()) == null ? void 0 : h.id;
|
|
800
800
|
if (!i) return null;
|
|
@@ -805,9 +805,9 @@ function mn() {
|
|
|
805
805
|
return null;
|
|
806
806
|
const a = ((d = n.getFocusedUnit()) == null ? void 0 : d.getUnitId()) || "";
|
|
807
807
|
return /* @__PURE__ */ x("section", { className: "univer-p-2 univer-text-center univer-text-sm", children: [
|
|
808
|
-
/* @__PURE__ */ u(
|
|
809
|
-
/* @__PURE__ */ u(
|
|
810
|
-
c.objectType === le.RECT && /* @__PURE__ */ u(
|
|
808
|
+
/* @__PURE__ */ u(vn, { pageId: i, unitId: a }),
|
|
809
|
+
/* @__PURE__ */ u(fn, { pageId: i, unitId: a }),
|
|
810
|
+
c.objectType === le.RECT && /* @__PURE__ */ u(gn, { pageId: i, unitId: a })
|
|
811
811
|
] });
|
|
812
812
|
}
|
|
813
813
|
const Ye = {
|
|
@@ -816,13 +816,13 @@ const Ye = {
|
|
|
816
816
|
handler: async (n) => {
|
|
817
817
|
var r;
|
|
818
818
|
const e = n.get(U), i = (r = n.get(w).getFocusedUnit()) == null ? void 0 : r.getUnitId();
|
|
819
|
-
return e.executeCommand(
|
|
819
|
+
return e.executeCommand(Kt.id, { unitId: i });
|
|
820
820
|
}
|
|
821
|
-
},
|
|
821
|
+
}, Kt = {
|
|
822
822
|
id: "slide.operation.insert-float-shape",
|
|
823
823
|
type: D.OPERATION,
|
|
824
824
|
handler: async (n, e) => {
|
|
825
|
-
const t =
|
|
825
|
+
const t = St(6), i = n.get(w), r = e.unitId, s = i.getUnit(r);
|
|
826
826
|
if (!s) return !1;
|
|
827
827
|
const o = s.getActivePage(), c = Object.values(o.pageElements), a = c != null && c.length ? Math.max(...c.map((g) => g.zIndex)) : 20, h = {
|
|
828
828
|
id: t,
|
|
@@ -852,7 +852,7 @@ const Ye = {
|
|
|
852
852
|
id: "sidebar.operation.slide-shape",
|
|
853
853
|
type: D.COMMAND,
|
|
854
854
|
handler: async (n, e) => {
|
|
855
|
-
const { visible: t, objectType: i } = e, r = n.get(
|
|
855
|
+
const { visible: t, objectType: i } = e, r = n.get(Pt), s = n.get(Q);
|
|
856
856
|
let o = "", c = "";
|
|
857
857
|
return i === le.RECT ? (o = "slide.sidebar.shape", c = xe) : i === le.IMAGE ? (o = "slide.sidebar.image", c = xe) : i === le.RICH_TEXT && (o = "slide.sidebar.text", c = xe), t ? r.open({
|
|
858
858
|
header: { title: s.t(o) },
|
|
@@ -868,13 +868,13 @@ const Ye = {
|
|
|
868
868
|
handler: async (n) => {
|
|
869
869
|
var r;
|
|
870
870
|
const e = n.get(U), i = (r = n.get(w).getFocusedUnit()) == null ? void 0 : r.getUnitId();
|
|
871
|
-
return await e.executeCommand(
|
|
871
|
+
return await e.executeCommand(Zt.id, { unitId: i });
|
|
872
872
|
}
|
|
873
|
-
},
|
|
873
|
+
}, Zt = {
|
|
874
874
|
id: "slide.operation.add-text",
|
|
875
875
|
type: D.OPERATION,
|
|
876
876
|
handler: async (n, e) => {
|
|
877
|
-
const t = e.unitId, i =
|
|
877
|
+
const t = e.unitId, i = St(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);
|
|
878
878
|
if (!l) return !1;
|
|
879
879
|
const d = l.getActivePage(), g = Object.values(d.pageElements), m = g != null && g.length ? Math.max(...g.map((_) => _.zIndex)) : 21, p = {
|
|
880
880
|
id: i,
|
|
@@ -899,17 +899,17 @@ const Ye = {
|
|
|
899
899
|
const f = n.get(T), v = f.createObjectToPage(p, d.id, t);
|
|
900
900
|
return v && f.setObjectActiveByPage(v, d.id, t), !0;
|
|
901
901
|
}
|
|
902
|
-
},
|
|
902
|
+
}, Xt = {
|
|
903
903
|
id: "slide.operation.set-slide-page-thumb",
|
|
904
904
|
type: D.OPERATION,
|
|
905
905
|
handler: (n, e) => (n.get(T).createThumbs(e.unitId), !0)
|
|
906
906
|
};
|
|
907
|
-
function
|
|
907
|
+
function mn() {
|
|
908
908
|
var p, f;
|
|
909
|
-
const n = O(w), e = O(U), t = O(X), i = O(Q), r =
|
|
909
|
+
const n = O(w), e = O(U), t = O(X), i = O(Q), r = Nt(null), s = n.getCurrentUnitForType(E.UNIVER_SLIDE), o = s == null ? void 0 : s.getPages(), c = s == null ? void 0 : s.getPageOrder();
|
|
910
910
|
if (!o || !c)
|
|
911
911
|
return null;
|
|
912
|
-
const a = c.map((v) => o[v]), [h, l] = $((f = (p = s == null ? void 0 : s.getActivePage()) == null ? void 0 : p.id) != null ? f : null), d =
|
|
912
|
+
const a = c.map((v) => o[v]), [h, l] = $((f = (p = s == null ? void 0 : s.getActivePage()) == null ? void 0 : p.id) != null ? f : null), d = Li(() => a.map(() => Bi()), [a]);
|
|
913
913
|
he(() => {
|
|
914
914
|
const v = s == null ? void 0 : s.activePage$.subscribe((_) => {
|
|
915
915
|
var b;
|
|
@@ -926,18 +926,18 @@ function _n() {
|
|
|
926
926
|
const b = a[_];
|
|
927
927
|
(I = t.getRenderById(b.id)) == null || I.engine.setContainer(v.current);
|
|
928
928
|
}
|
|
929
|
-
}), d.length > 0 && e.syncExecuteCommand(
|
|
929
|
+
}), d.length > 0 && e.syncExecuteCommand(Xt.id, { unitId: s == null ? void 0 : s.getUnitId() });
|
|
930
930
|
}, [d, a, t, e, s]);
|
|
931
931
|
const g = at((v) => {
|
|
932
|
-
e.syncExecuteCommand(
|
|
932
|
+
e.syncExecuteCommand(Ut.id, { id: v, unitId: s == null ? void 0 : s.getUnitId() });
|
|
933
933
|
}, [e, s]), m = at(() => {
|
|
934
|
-
e.syncExecuteCommand(
|
|
934
|
+
e.syncExecuteCommand(Vt.id, { unitId: s == null ? void 0 : s.getUnitId() });
|
|
935
935
|
}, [e, s]);
|
|
936
936
|
return /* @__PURE__ */ u(
|
|
937
937
|
"aside",
|
|
938
938
|
{
|
|
939
939
|
ref: r,
|
|
940
|
-
className: K("univer-flex univer-h-full univer-w-64 univer-flex-col univer-overflow-y-auto univer-overflow-x-hidden",
|
|
940
|
+
className: K("univer-flex univer-h-full univer-w-64 univer-flex-col univer-overflow-y-auto univer-overflow-x-hidden", Ai),
|
|
941
941
|
children: /* @__PURE__ */ x("div", { className: "univer-px-4", children: [
|
|
942
942
|
/* @__PURE__ */ u("header", { className: "univer-flex univer-justify-center univer-pt-4", children: /* @__PURE__ */ u(
|
|
943
943
|
"a",
|
|
@@ -971,17 +971,17 @@ function _n() {
|
|
|
971
971
|
}
|
|
972
972
|
);
|
|
973
973
|
}
|
|
974
|
-
const de = li("SLIDE_EDITOR"),
|
|
975
|
-
function
|
|
974
|
+
const de = li("SLIDE_EDITOR"), Gt = "slide.menu.image";
|
|
975
|
+
function _n(n) {
|
|
976
976
|
return {
|
|
977
|
-
id:
|
|
977
|
+
id: Gt,
|
|
978
978
|
type: me.SUBITEMS,
|
|
979
979
|
icon: "AddImageIcon",
|
|
980
980
|
tooltip: "slide.image.insert.title",
|
|
981
981
|
hidden$: pe(n, E.UNIVER_SLIDE)
|
|
982
982
|
};
|
|
983
983
|
}
|
|
984
|
-
function
|
|
984
|
+
function Cn(n) {
|
|
985
985
|
return {
|
|
986
986
|
id: Xe.id,
|
|
987
987
|
title: "slide.image.insert.float",
|
|
@@ -989,10 +989,10 @@ function Sn(n) {
|
|
|
989
989
|
hidden$: pe(n, E.UNIVER_SLIDE)
|
|
990
990
|
};
|
|
991
991
|
}
|
|
992
|
-
const
|
|
993
|
-
function
|
|
992
|
+
const Yt = "slide.menu.shape";
|
|
993
|
+
function Sn(n) {
|
|
994
994
|
return {
|
|
995
|
-
id:
|
|
995
|
+
id: Yt,
|
|
996
996
|
type: me.SUBITEMS,
|
|
997
997
|
icon: "GraphIcon",
|
|
998
998
|
tooltip: "slide.shape.insert.title",
|
|
@@ -1000,7 +1000,7 @@ function In(n) {
|
|
|
1000
1000
|
// disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),
|
|
1001
1001
|
};
|
|
1002
1002
|
}
|
|
1003
|
-
function
|
|
1003
|
+
function In(n) {
|
|
1004
1004
|
return {
|
|
1005
1005
|
id: Ye.id,
|
|
1006
1006
|
title: "slide.shape.insert.rectangle",
|
|
@@ -1008,7 +1008,7 @@ function bn(n) {
|
|
|
1008
1008
|
hidden$: pe(n, E.UNIVER_SLIDE)
|
|
1009
1009
|
};
|
|
1010
1010
|
}
|
|
1011
|
-
function
|
|
1011
|
+
function bn(n) {
|
|
1012
1012
|
return {
|
|
1013
1013
|
id: qe.id,
|
|
1014
1014
|
type: me.BUTTON,
|
|
@@ -1017,26 +1017,26 @@ function En(n) {
|
|
|
1017
1017
|
hidden$: pe(n, E.UNIVER_SLIDE)
|
|
1018
1018
|
};
|
|
1019
1019
|
}
|
|
1020
|
-
const
|
|
1021
|
-
[
|
|
1020
|
+
const En = {
|
|
1021
|
+
[wi.FORMAT]: {
|
|
1022
1022
|
[qe.id]: {
|
|
1023
1023
|
order: 0,
|
|
1024
|
-
menuItemFactory:
|
|
1024
|
+
menuItemFactory: bn
|
|
1025
1025
|
},
|
|
1026
|
-
[
|
|
1026
|
+
[Gt]: {
|
|
1027
1027
|
order: 0,
|
|
1028
|
-
menuItemFactory:
|
|
1028
|
+
menuItemFactory: _n,
|
|
1029
1029
|
[Xe.id]: {
|
|
1030
1030
|
order: 0,
|
|
1031
|
-
menuItemFactory:
|
|
1031
|
+
menuItemFactory: Cn
|
|
1032
1032
|
}
|
|
1033
1033
|
},
|
|
1034
|
-
[
|
|
1034
|
+
[Yt]: {
|
|
1035
1035
|
order: 0,
|
|
1036
|
-
menuItemFactory:
|
|
1036
|
+
menuItemFactory: Sn,
|
|
1037
1037
|
[Ye.id]: {
|
|
1038
1038
|
order: 0,
|
|
1039
|
-
menuItemFactory:
|
|
1039
|
+
menuItemFactory: In
|
|
1040
1040
|
}
|
|
1041
1041
|
}
|
|
1042
1042
|
}
|
|
@@ -1044,8 +1044,8 @@ const xn = {
|
|
|
1044
1044
|
id: "slide.operation.edit-arrow",
|
|
1045
1045
|
type: D.OPERATION,
|
|
1046
1046
|
handler: () => !0
|
|
1047
|
-
},
|
|
1048
|
-
function
|
|
1047
|
+
}, qt = "COMPONENT_SLIDE_IMAGE_POPUP_MENU";
|
|
1048
|
+
function xn(n) {
|
|
1049
1049
|
var p, f;
|
|
1050
1050
|
const e = (f = (p = n.popup) == null ? void 0 : p.extraProps) == null ? void 0 : f.menuItems;
|
|
1051
1051
|
if (!e)
|
|
@@ -1065,7 +1065,7 @@ function Rn(n) {
|
|
|
1065
1065
|
onMouseEnter: a,
|
|
1066
1066
|
onMouseLeave: h,
|
|
1067
1067
|
children: /* @__PURE__ */ u(
|
|
1068
|
-
|
|
1068
|
+
Tt,
|
|
1069
1069
|
{
|
|
1070
1070
|
align: "start",
|
|
1071
1071
|
overlay: /* @__PURE__ */ u(
|
|
@@ -1094,7 +1094,7 @@ function Rn(n) {
|
|
|
1094
1094
|
}),
|
|
1095
1095
|
children: [
|
|
1096
1096
|
/* @__PURE__ */ u(
|
|
1097
|
-
|
|
1097
|
+
Lt,
|
|
1098
1098
|
{
|
|
1099
1099
|
className: "univer-fill-primary-600 univer-text-gray-900 dark:!univer-text-white"
|
|
1100
1100
|
}
|
|
@@ -1108,7 +1108,7 @@ function Rn(n) {
|
|
|
1108
1108
|
}
|
|
1109
1109
|
);
|
|
1110
1110
|
}
|
|
1111
|
-
class
|
|
1111
|
+
class Rn {
|
|
1112
1112
|
constructor() {
|
|
1113
1113
|
S(this, "_state", null);
|
|
1114
1114
|
S(this, "_rect", null);
|
|
@@ -1142,7 +1142,7 @@ class On {
|
|
|
1142
1142
|
this._state$.next(e);
|
|
1143
1143
|
}
|
|
1144
1144
|
}
|
|
1145
|
-
const Je =
|
|
1145
|
+
const Je = It(
|
|
1146
1146
|
"univer.slide-editor-manager.service"
|
|
1147
1147
|
), ye = -1e3, vt = {
|
|
1148
1148
|
width: 0,
|
|
@@ -1150,10 +1150,10 @@ const Je = St(
|
|
|
1150
1150
|
top: ye,
|
|
1151
1151
|
left: ye
|
|
1152
1152
|
};
|
|
1153
|
-
function
|
|
1153
|
+
function On() {
|
|
1154
1154
|
const [n, e] = $({
|
|
1155
1155
|
...vt
|
|
1156
|
-
}), t = O(Je), i = O(Ze), r = O(fe), s =
|
|
1156
|
+
}), t = O(Je), i = O(Ze), r = O(fe), s = yi(
|
|
1157
1157
|
() => r.subscribeContextValue$(st),
|
|
1158
1158
|
!1,
|
|
1159
1159
|
void 0,
|
|
@@ -1204,21 +1204,21 @@ function wn() {
|
|
|
1204
1204
|
);
|
|
1205
1205
|
}
|
|
1206
1206
|
function $e(n) {
|
|
1207
|
-
return n.getContextValue(
|
|
1207
|
+
return n.getContextValue(bt) && n.getContextValue(Re);
|
|
1208
1208
|
}
|
|
1209
|
-
function
|
|
1210
|
-
return n.getContextValue(ui) && n.getContextValue(
|
|
1209
|
+
function wn(n) {
|
|
1210
|
+
return n.getContextValue(ui) && n.getContextValue(bt);
|
|
1211
1211
|
}
|
|
1212
|
-
const
|
|
1212
|
+
const Jt = [
|
|
1213
1213
|
y.ARROW_DOWN,
|
|
1214
1214
|
y.ARROW_UP,
|
|
1215
1215
|
y.ARROW_LEFT,
|
|
1216
1216
|
y.ARROW_RIGHT
|
|
1217
1217
|
];
|
|
1218
|
-
[y.ENTER, y.TAB, ...
|
|
1219
|
-
function
|
|
1218
|
+
[y.ENTER, y.TAB, ...Jt];
|
|
1219
|
+
function yn() {
|
|
1220
1220
|
const n = [];
|
|
1221
|
-
for (const e of
|
|
1221
|
+
for (const e of Jt)
|
|
1222
1222
|
n.push({
|
|
1223
1223
|
id: we.id,
|
|
1224
1224
|
binding: e,
|
|
@@ -1231,7 +1231,7 @@ function Pn() {
|
|
|
1231
1231
|
}
|
|
1232
1232
|
}), n.push({
|
|
1233
1233
|
id: we.id,
|
|
1234
|
-
binding: e |
|
|
1234
|
+
binding: e | Pi.SHIFT,
|
|
1235
1235
|
preconditions: (t) => $e(t),
|
|
1236
1236
|
staticParameters: {
|
|
1237
1237
|
visible: !1,
|
|
@@ -1242,13 +1242,13 @@ function Pn() {
|
|
|
1242
1242
|
});
|
|
1243
1243
|
return n;
|
|
1244
1244
|
}
|
|
1245
|
-
const
|
|
1246
|
-
id:
|
|
1247
|
-
preconditions: (n) => $e(n) ||
|
|
1245
|
+
const Pn = {
|
|
1246
|
+
id: $i.id,
|
|
1247
|
+
preconditions: (n) => $e(n) || wn(n),
|
|
1248
1248
|
binding: y.BACKSPACE
|
|
1249
1249
|
};
|
|
1250
|
-
var
|
|
1251
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1250
|
+
var Tn = Object.getOwnPropertyDescriptor, Mn = (n, e, t, i) => {
|
|
1251
|
+
for (var r = i > 1 ? void 0 : i ? Tn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
1252
1252
|
(o = n[s]) && (r = o(r) || r);
|
|
1253
1253
|
return r;
|
|
1254
1254
|
}, ie = (n, e) => (t, i) => e(t, i, n);
|
|
@@ -1257,24 +1257,24 @@ let Pe = class extends De {
|
|
|
1257
1257
|
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();
|
|
1258
1258
|
}
|
|
1259
1259
|
_initMenus() {
|
|
1260
|
-
this._menuManagerService.mergeMenu(
|
|
1260
|
+
this._menuManagerService.mergeMenu(En);
|
|
1261
1261
|
}
|
|
1262
1262
|
_initCustomComponents() {
|
|
1263
1263
|
const n = this._componentManager;
|
|
1264
|
-
this.disposeWithMe(n.register("TextIcon",
|
|
1264
|
+
this.disposeWithMe(n.register("TextIcon", kt)), this.disposeWithMe(n.register("GraphIcon", $t)), this.disposeWithMe(n.register(qt, xn)), this.disposeWithMe(n.register(xe, pn));
|
|
1265
1265
|
}
|
|
1266
1266
|
_initCommands() {
|
|
1267
1267
|
[
|
|
1268
|
+
Vt,
|
|
1268
1269
|
Ut,
|
|
1269
|
-
|
|
1270
|
-
Zt,
|
|
1270
|
+
Xt,
|
|
1271
1271
|
Xe,
|
|
1272
|
-
|
|
1272
|
+
Zt,
|
|
1273
1273
|
qe,
|
|
1274
|
-
|
|
1274
|
+
Kt,
|
|
1275
1275
|
Ye,
|
|
1276
1276
|
Be,
|
|
1277
|
-
|
|
1277
|
+
jt,
|
|
1278
1278
|
H,
|
|
1279
1279
|
// commands for editor
|
|
1280
1280
|
we
|
|
@@ -1282,35 +1282,35 @@ let Pe = class extends De {
|
|
|
1282
1282
|
}
|
|
1283
1283
|
_initUIComponents() {
|
|
1284
1284
|
this.disposeWithMe(
|
|
1285
|
-
this._uiPartsService.registerComponent(ot.LEFT_SIDEBAR, () => ct(
|
|
1285
|
+
this._uiPartsService.registerComponent(ot.LEFT_SIDEBAR, () => ct(mn, this._injector))
|
|
1286
1286
|
), this.disposeWithMe(
|
|
1287
|
-
this._uiPartsService.registerComponent(ot.CONTENT, () => ct(
|
|
1287
|
+
this._uiPartsService.registerComponent(ot.CONTENT, () => ct(On, this._injector))
|
|
1288
1288
|
);
|
|
1289
1289
|
}
|
|
1290
1290
|
_initShortcuts() {
|
|
1291
1291
|
[
|
|
1292
|
-
|
|
1293
|
-
...
|
|
1292
|
+
Pn,
|
|
1293
|
+
...yn()
|
|
1294
1294
|
].forEach((n) => {
|
|
1295
1295
|
this.disposeWithMe(this._shortcutService.registerShortcut(n));
|
|
1296
1296
|
});
|
|
1297
1297
|
}
|
|
1298
1298
|
};
|
|
1299
|
-
Pe =
|
|
1299
|
+
Pe = Mn([
|
|
1300
1300
|
ie(0, Z(ke)),
|
|
1301
|
-
ie(1,
|
|
1302
|
-
ie(2, Z(
|
|
1303
|
-
ie(3,
|
|
1301
|
+
ie(1, Ti),
|
|
1302
|
+
ie(2, Z(Mi)),
|
|
1303
|
+
ie(3, Ni),
|
|
1304
1304
|
ie(4, U),
|
|
1305
|
-
ie(5,
|
|
1305
|
+
ie(5, Di)
|
|
1306
1306
|
], Pe);
|
|
1307
|
-
const
|
|
1308
|
-
var
|
|
1309
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1307
|
+
const Nn = "slides-ui.config", gt = {};
|
|
1308
|
+
var Dn = Object.getOwnPropertyDescriptor, Un = (n, e, t, i) => {
|
|
1309
|
+
for (var r = i > 1 ? void 0 : i ? Dn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
1310
1310
|
(o = n[s]) && (r = o(r) || r);
|
|
1311
1311
|
return r;
|
|
1312
1312
|
}, Ie = (n, e) => (t, i) => e(t, i, n);
|
|
1313
|
-
function
|
|
1313
|
+
function Vn(n, e) {
|
|
1314
1314
|
const t = ft(n.left, n.top, e), i = ft(n.right, n.bottom, e);
|
|
1315
1315
|
return {
|
|
1316
1316
|
left: t.x,
|
|
@@ -1344,7 +1344,7 @@ let Te = class extends De {
|
|
|
1344
1344
|
right: a + l,
|
|
1345
1345
|
top: h,
|
|
1346
1346
|
bottom: h + d
|
|
1347
|
-
}, f = c.getCanvasElement(), v = f.getBoundingClientRect(), _ =
|
|
1347
|
+
}, f = c.getCanvasElement(), v = f.getBoundingClientRect(), _ = Ii(f.style.width), { scaleX: I, scaleY: b } = o.getAncestorScale(), P = Vn(p, o), { top: M, left: V, width: R } = v, z = R / _;
|
|
1348
1348
|
return {
|
|
1349
1349
|
left: P.left * z * I + V + g,
|
|
1350
1350
|
right: P.right * z * I + V + g,
|
|
@@ -1380,14 +1380,14 @@ let Te = class extends De {
|
|
|
1380
1380
|
};
|
|
1381
1381
|
}
|
|
1382
1382
|
};
|
|
1383
|
-
Te =
|
|
1384
|
-
Ie(0, Z(
|
|
1383
|
+
Te = Un([
|
|
1384
|
+
Ie(0, Z(Ui)),
|
|
1385
1385
|
Ie(1, X),
|
|
1386
1386
|
Ie(2, w),
|
|
1387
1387
|
Ie(3, U)
|
|
1388
1388
|
], Te);
|
|
1389
|
-
var
|
|
1390
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1389
|
+
var jn = Object.getOwnPropertyDescriptor, An = (n, e, t, i) => {
|
|
1390
|
+
for (var r = i > 1 ? void 0 : i ? jn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
1391
1391
|
(o = n[s]) && (r = o(r) || r);
|
|
1392
1392
|
return r;
|
|
1393
1393
|
}, Y = (n, e) => (t, i) => e(t, i, n);
|
|
@@ -1418,7 +1418,7 @@ let Me = class extends ge {
|
|
|
1418
1418
|
if (!c) return;
|
|
1419
1419
|
let a;
|
|
1420
1420
|
this.disposeWithMe(
|
|
1421
|
-
|
|
1421
|
+
Et(
|
|
1422
1422
|
c.createControl$.subscribe(() => {
|
|
1423
1423
|
const l = c.getSelectedObjectMap();
|
|
1424
1424
|
if (l.size > 1) {
|
|
@@ -1430,7 +1430,7 @@ let Me = class extends ge {
|
|
|
1430
1430
|
return;
|
|
1431
1431
|
const g = d.oKey;
|
|
1432
1432
|
a == null || a.dispose(), a = this.disposeWithMe(this._canvasPopManagerService.attachPopupToObject(d, {
|
|
1433
|
-
componentKey:
|
|
1433
|
+
componentKey: qt,
|
|
1434
1434
|
direction: "horizontal",
|
|
1435
1435
|
offset: [2, 0],
|
|
1436
1436
|
extraProps: {
|
|
@@ -1482,7 +1482,7 @@ let Me = class extends ge {
|
|
|
1482
1482
|
}, {
|
|
1483
1483
|
label: "slide.popup.delete",
|
|
1484
1484
|
index: 5,
|
|
1485
|
-
commandId:
|
|
1485
|
+
commandId: jt.id,
|
|
1486
1486
|
commandParams: {
|
|
1487
1487
|
id: t,
|
|
1488
1488
|
unitId: i
|
|
@@ -1491,21 +1491,21 @@ let Me = class extends ge {
|
|
|
1491
1491
|
}];
|
|
1492
1492
|
}
|
|
1493
1493
|
};
|
|
1494
|
-
Me =
|
|
1494
|
+
Me = An([
|
|
1495
1495
|
Y(0, Z(Te)),
|
|
1496
1496
|
Y(1, X),
|
|
1497
1497
|
Y(2, w),
|
|
1498
1498
|
Y(3, fe),
|
|
1499
1499
|
Y(4, Z(T)),
|
|
1500
|
-
Y(5,
|
|
1500
|
+
Y(5, Pt),
|
|
1501
1501
|
Y(6, U)
|
|
1502
1502
|
], Me);
|
|
1503
|
-
var
|
|
1504
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1503
|
+
var Ln = Object.getOwnPropertyDescriptor, Bn = (n, e, t, i) => {
|
|
1504
|
+
for (var r = i > 1 ? void 0 : i ? Ln(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
1505
1505
|
(o = n[s]) && (r = o(r) || r);
|
|
1506
1506
|
return r;
|
|
1507
1507
|
}, Ve = (n, e) => (t, i) => e(t, i, n);
|
|
1508
|
-
const Qe =
|
|
1508
|
+
const Qe = It("univer.slide-editor-bridge.service");
|
|
1509
1509
|
let He = class extends De {
|
|
1510
1510
|
constructor(e, t, i) {
|
|
1511
1511
|
super();
|
|
@@ -1524,7 +1524,7 @@ let He = class extends De {
|
|
|
1524
1524
|
S(this, "visible$", this._visible$.asObservable());
|
|
1525
1525
|
S(this, "_afterVisible$", new J(this._visibleParam));
|
|
1526
1526
|
S(this, "afterVisible$", this._afterVisible$.asObservable());
|
|
1527
|
-
S(this, "endEditing$", new
|
|
1527
|
+
S(this, "endEditing$", new Dt());
|
|
1528
1528
|
S(this, "_currentEditRectInfo");
|
|
1529
1529
|
this._editorService = e, this._contextService = t, this._renderManagerService = i;
|
|
1530
1530
|
}
|
|
@@ -1539,7 +1539,7 @@ let He = class extends De {
|
|
|
1539
1539
|
* @editorInfo editorInfo
|
|
1540
1540
|
*/
|
|
1541
1541
|
setEditorRect(e) {
|
|
1542
|
-
this._currentEditRectInfo = e, this._editorService.getFocusEditor() || (this._editorService.focus(de), this._contextService.setContextValue(Re, !1), this._contextService.setContextValue(
|
|
1542
|
+
this._currentEditRectInfo = e, this._editorService.getFocusEditor() || (this._editorService.focus(de), this._contextService.setContextValue(Re, !1), this._contextService.setContextValue(xt, !1), this._contextService.setContextValue(Rt, !1));
|
|
1543
1543
|
const t = this.getEditRectState();
|
|
1544
1544
|
this._currentEditRectState = t, this._currentEditRectState$.next(t);
|
|
1545
1545
|
}
|
|
@@ -1564,7 +1564,7 @@ let He = class extends De {
|
|
|
1564
1564
|
textRotation: { a: 0, v: 0 },
|
|
1565
1565
|
wrapStrategy: 0,
|
|
1566
1566
|
verticalAlign: Oe.TOP,
|
|
1567
|
-
horizontalAlign:
|
|
1567
|
+
horizontalAlign: Ot.LEFT,
|
|
1568
1568
|
paddingData: { t: 0, b: 1, l: 2, r: 2 }
|
|
1569
1569
|
}, c = t.richTextObj.width, a = t.richTextObj.height, h = t.richTextObj.left, l = t.richTextObj.top, d = {
|
|
1570
1570
|
left: 0,
|
|
@@ -1643,17 +1643,17 @@ let He = class extends De {
|
|
|
1643
1643
|
};
|
|
1644
1644
|
}
|
|
1645
1645
|
};
|
|
1646
|
-
He =
|
|
1646
|
+
He = Bn([
|
|
1647
1647
|
Ve(0, Ze),
|
|
1648
1648
|
Ve(1, fe),
|
|
1649
1649
|
Ve(2, X)
|
|
1650
1650
|
], He);
|
|
1651
|
-
var G = /* @__PURE__ */ ((n) => (n[n.InitialState = 0] = "InitialState", n[n.StartEditor = 1] = "StartEditor", n[n.CursorChange = 2] = "CursorChange", n))(G || {}),
|
|
1652
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1651
|
+
var G = /* @__PURE__ */ ((n) => (n[n.InitialState = 0] = "InitialState", n[n.StartEditor = 1] = "StartEditor", n[n.CursorChange = 2] = "CursorChange", n))(G || {}), $n = Object.getOwnPropertyDescriptor, Hn = (n, e, t, i) => {
|
|
1652
|
+
for (var r = i > 1 ? void 0 : i ? $n(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
1653
1653
|
(o = n[s]) && (r = o(r) || r);
|
|
1654
1654
|
return r;
|
|
1655
1655
|
}, A = (n, e) => (t, i) => e(t, i, n);
|
|
1656
|
-
const pt = -1e3, mt = 5,
|
|
1656
|
+
const pt = -1e3, mt = 5, Fn = 2;
|
|
1657
1657
|
let Fe = class extends De {
|
|
1658
1658
|
constructor(e, t, i, r, s, o, c, a, h, l, d, g) {
|
|
1659
1659
|
super();
|
|
@@ -1705,7 +1705,7 @@ let Fe = class extends De {
|
|
|
1705
1705
|
return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(ht).getViewModel();
|
|
1706
1706
|
}
|
|
1707
1707
|
_initialCursorSync(e) {
|
|
1708
|
-
e.add(this._cellEditorManagerService.focus$.pipe(
|
|
1708
|
+
e.add(this._cellEditorManagerService.focus$.pipe(zi((t) => !!t)).subscribe(() => {
|
|
1709
1709
|
var t;
|
|
1710
1710
|
(t = Le(E.UNIVER_DOC, this._instanceSrv, this._renderManagerService)) == null || t.with(lt).sync();
|
|
1711
1711
|
}));
|
|
@@ -1717,7 +1717,7 @@ let Fe = class extends De {
|
|
|
1717
1717
|
_subscribeToCurrentCell(e) {
|
|
1718
1718
|
e.add(this._editorBridgeService.currentEditRectState$.subscribe((t) => {
|
|
1719
1719
|
var d;
|
|
1720
|
-
if (t == null || this._contextService.getContextValue(
|
|
1720
|
+
if (t == null || this._contextService.getContextValue(xt) || this._contextService.getContextValue(Rt))
|
|
1721
1721
|
return;
|
|
1722
1722
|
const {
|
|
1723
1723
|
position: { startX: i, endX: r },
|
|
@@ -1780,7 +1780,7 @@ let Fe = class extends De {
|
|
|
1780
1780
|
const p = i.getActualSize();
|
|
1781
1781
|
let f = a - c;
|
|
1782
1782
|
return f < p.actualWidth * s + mt * s && (f = p.actualWidth * s + mt * s), d == null || d.updateDocumentDataPageSize(f / s), d == null || d.updateDocumentRenderConfig({
|
|
1783
|
-
horizontalAlign:
|
|
1783
|
+
horizontalAlign: Ot.UNSPECIFIED,
|
|
1784
1784
|
cellValueType: void 0
|
|
1785
1785
|
}), {
|
|
1786
1786
|
actualWidth: f,
|
|
@@ -1802,9 +1802,9 @@ let Fe = class extends De {
|
|
|
1802
1802
|
const d = this._renderContext.engine.getCanvasElement(), g = d.getBoundingClientRect(), m = h(d.style.width), { top: p, left: f, width: v } = g, _ = v / m;
|
|
1803
1803
|
let { startX: I, startY: b } = i;
|
|
1804
1804
|
I += r.left, b += r.top;
|
|
1805
|
-
const { document: P, scene: M, engine: V } = a, R = M.getViewport(dt.VIEW_MAIN), z = document.body.clientHeight - b - r.top -
|
|
1805
|
+
const { document: P, scene: M, engine: V } = a, R = M.getViewport(dt.VIEW_MAIN), z = document.body.clientHeight - b - r.top - Fn * 2, se = document.body.clientWidth - I - r.left;
|
|
1806
1806
|
let L = t, B = R == null ? void 0 : R.getScrollBar();
|
|
1807
|
-
L > z ? (L = z, B == null ? R && new
|
|
1807
|
+
L > z ? (L = z, B == null ? R && new wt(R, { enableHorizontal: !1, barSize: 8 }) : R == null || R.resetCanvasSizeAndUpdateScroll()) : (B = null, (C = R == null ? void 0 : R.getScrollBar()) == null || C.dispose()), e += (B == null ? void 0 : B.barSize) || 0, e = Math.min(e, se), I -= ne, b -= ne, this._addBackground(M, e / o, t / c, s);
|
|
1808
1808
|
const { scaleX: ee, scaleY: te } = M.getPrecisionScale();
|
|
1809
1809
|
M.transformByState({
|
|
1810
1810
|
width: e * _ / o,
|
|
@@ -1833,14 +1833,14 @@ let Fe = class extends De {
|
|
|
1833
1833
|
const s = "_backgroundRectHelperColor_", o = e.getObject(s);
|
|
1834
1834
|
o == null && r == null || (o == null ? e.addObjects(
|
|
1835
1835
|
[
|
|
1836
|
-
new
|
|
1836
|
+
new yt(s, {
|
|
1837
1837
|
width: t,
|
|
1838
1838
|
height: i,
|
|
1839
1839
|
fill: r,
|
|
1840
1840
|
evented: !1
|
|
1841
1841
|
})
|
|
1842
1842
|
],
|
|
1843
|
-
|
|
1843
|
+
Hi
|
|
1844
1844
|
) : r == null ? o.dispose() : (o.setProps({
|
|
1845
1845
|
fill: r
|
|
1846
1846
|
}), o.transformByState({
|
|
@@ -1906,7 +1906,7 @@ let Fe = class extends De {
|
|
|
1906
1906
|
_showEditorByKeyboard(e) {
|
|
1907
1907
|
}
|
|
1908
1908
|
_commandExecutedListener(e) {
|
|
1909
|
-
const t = [we.id], i = [
|
|
1909
|
+
const t = [we.id], i = [Zi.id];
|
|
1910
1910
|
e.add(this._commandService.onCommandExecuted((r) => {
|
|
1911
1911
|
this._editorService.getFocusId() === de && (t.includes(r.id) && this._moveCursorCmdHandler(r), i.includes(r.id) && this._editorBridgeService.isVisible() && this._editingChangedHandler());
|
|
1912
1912
|
}));
|
|
@@ -1925,7 +1925,7 @@ let Fe = class extends De {
|
|
|
1925
1925
|
this._handleEditorVisible({ visible: !0, eventType: 3, unitId: i });
|
|
1926
1926
|
}
|
|
1927
1927
|
_getEditorObject() {
|
|
1928
|
-
return
|
|
1928
|
+
return Wn(this._editorBridgeService.getCurrentEditorId(), this._renderManagerService);
|
|
1929
1929
|
}
|
|
1930
1930
|
async _handleEditorInvisible(e) {
|
|
1931
1931
|
const { keycode: t } = e;
|
|
@@ -1976,40 +1976,40 @@ let Fe = class extends De {
|
|
|
1976
1976
|
if (!t)
|
|
1977
1977
|
return;
|
|
1978
1978
|
const { document: i } = t;
|
|
1979
|
-
e.add(
|
|
1979
|
+
e.add(Et(i.onPointerDown$.subscribeEvent(() => {
|
|
1980
1980
|
this._cursorChange === G.StartEditor && (this._cursorChange = G.CursorChange);
|
|
1981
1981
|
})));
|
|
1982
1982
|
}
|
|
1983
1983
|
// TODO: @JOCS, is it necessary to move these commands MoveSelectionOperation\MoveCursorOperation to shortcut? and use multi-commands?
|
|
1984
1984
|
_moveInEditor(e, t) {
|
|
1985
1985
|
let i = j.LEFT;
|
|
1986
|
-
e === y.ARROW_DOWN ? i = j.DOWN : e === y.ARROW_UP ? i = j.UP : e === y.ARROW_RIGHT && (i = j.RIGHT), t ? this._commandService.executeCommand(
|
|
1986
|
+
e === y.ARROW_DOWN ? i = j.DOWN : e === y.ARROW_UP ? i = j.UP : e === y.ARROW_RIGHT && (i = j.RIGHT), t ? this._commandService.executeCommand(Fi.id, {
|
|
1987
1987
|
direction: i
|
|
1988
|
-
}) : this._commandService.executeCommand(
|
|
1988
|
+
}) : this._commandService.executeCommand(Wi.id, {
|
|
1989
1989
|
direction: i
|
|
1990
1990
|
});
|
|
1991
1991
|
}
|
|
1992
1992
|
};
|
|
1993
|
-
Fe =
|
|
1994
|
-
A(1,
|
|
1993
|
+
Fe = Hn([
|
|
1994
|
+
A(1, Vi),
|
|
1995
1995
|
A(2, gi),
|
|
1996
1996
|
A(3, fe),
|
|
1997
1997
|
A(4, w),
|
|
1998
1998
|
A(5, X),
|
|
1999
1999
|
A(6, Qe),
|
|
2000
2000
|
A(7, Je),
|
|
2001
|
-
A(8, Z(
|
|
2001
|
+
A(8, Z(Ki)),
|
|
2002
2002
|
A(9, U),
|
|
2003
2003
|
A(10, Z(Q)),
|
|
2004
2004
|
A(11, Ze)
|
|
2005
2005
|
], Fe);
|
|
2006
|
-
function
|
|
2006
|
+
function Wn(n, e) {
|
|
2007
2007
|
if (n == null)
|
|
2008
2008
|
return;
|
|
2009
2009
|
const t = e.getRenderById(n);
|
|
2010
2010
|
if (t == null)
|
|
2011
2011
|
return;
|
|
2012
|
-
const { mainComponent: i, scene: r, engine: s, components: o } = t, c = i, a = o.get(
|
|
2012
|
+
const { mainComponent: i, scene: r, engine: s, components: o } = t, c = i, a = o.get(ki.BACKGROUND);
|
|
2013
2013
|
return {
|
|
2014
2014
|
document: c,
|
|
2015
2015
|
docBackground: a,
|
|
@@ -2017,8 +2017,8 @@ function kn(n, e) {
|
|
|
2017
2017
|
engine: s
|
|
2018
2018
|
};
|
|
2019
2019
|
}
|
|
2020
|
-
var
|
|
2021
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
2020
|
+
var kn = Object.getOwnPropertyDescriptor, zn = (n, e, t, i) => {
|
|
2021
|
+
for (var r = i > 1 ? void 0 : i ? kn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
2022
2022
|
(o = n[s]) && (r = o(r) || r);
|
|
2023
2023
|
return r;
|
|
2024
2024
|
}, je = (n, e) => (t, i) => e(t, i, n);
|
|
@@ -2031,7 +2031,7 @@ let We = class extends ge {
|
|
|
2031
2031
|
// private _cursorChange: CursorChange = CursorChange.InitialState;
|
|
2032
2032
|
/** If the corresponding unit is active and prepared for editing. */
|
|
2033
2033
|
// private _isUnitEditing = false;
|
|
2034
|
-
S(this, "setSlideTextEditor$", new
|
|
2034
|
+
S(this, "setSlideTextEditor$", new Dt());
|
|
2035
2035
|
S(this, "_curRichText", null);
|
|
2036
2036
|
S(this, "_d");
|
|
2037
2037
|
this._renderContext = e, this._instanceSrv = t, this._commandService = i, this._editorBridgeService = r, this.disposeWithMe(this._instanceSrv.getCurrentTypeOfUnit$(E.UNIVER_SLIDE).subscribe((s) => {
|
|
@@ -2130,13 +2130,13 @@ let We = class extends ge {
|
|
|
2130
2130
|
this._editorBridgeService.changeVisible({ visible: e, eventType: q.PointerDown, unitId: t });
|
|
2131
2131
|
}
|
|
2132
2132
|
};
|
|
2133
|
-
We =
|
|
2133
|
+
We = zn([
|
|
2134
2134
|
je(1, w),
|
|
2135
2135
|
je(2, U),
|
|
2136
2136
|
je(3, Qe)
|
|
2137
2137
|
], We);
|
|
2138
|
-
var
|
|
2139
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
2138
|
+
var Kn = Object.getOwnPropertyDescriptor, Zn = (n, e, t, i) => {
|
|
2139
|
+
for (var r = i > 1 ? void 0 : i ? Kn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
2140
2140
|
(o = n[s]) && (r = o(r) || r);
|
|
2141
2141
|
return r;
|
|
2142
2142
|
}, Ae = (n, e) => (t, i) => e(t, i, n);
|
|
@@ -2165,34 +2165,34 @@ let Ne = class extends ge {
|
|
|
2165
2165
|
_initContextListener() {
|
|
2166
2166
|
}
|
|
2167
2167
|
};
|
|
2168
|
-
Ne =
|
|
2168
|
+
Ne = Zn([
|
|
2169
2169
|
Ae(0, fe),
|
|
2170
2170
|
Ae(1, w),
|
|
2171
2171
|
Ae(2, X)
|
|
2172
2172
|
], Ne);
|
|
2173
|
-
var
|
|
2174
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
2173
|
+
var Xn = Object.getOwnPropertyDescriptor, Gn = (n, e, t, i) => {
|
|
2174
|
+
for (var r = i > 1 ? void 0 : i ? Xn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
2175
2175
|
(o = n[s]) && (r = o(r) || r);
|
|
2176
2176
|
return r;
|
|
2177
2177
|
}, be = (n, e) => (t, i) => e(t, i, n);
|
|
2178
|
-
const
|
|
2178
|
+
const Yn = "SLIDE_UI";
|
|
2179
2179
|
var Ee;
|
|
2180
2180
|
let _t = (Ee = class extends mi {
|
|
2181
2181
|
constructor(n = gt, e, t, i, r) {
|
|
2182
2182
|
super(), this._config = n, this._injector = e, this._renderManagerService = t, this._univerInstanceService = i, this._configService = r;
|
|
2183
|
-
const { menu: s, ...o } =
|
|
2183
|
+
const { menu: s, ...o } = Ct(
|
|
2184
2184
|
{},
|
|
2185
2185
|
gt,
|
|
2186
2186
|
this._config
|
|
2187
2187
|
);
|
|
2188
|
-
s && this._configService.setConfig("menu", s, { merge: !0 }), this._configService.setConfig(
|
|
2188
|
+
s && this._configService.setConfig("menu", s, { merge: !0 }), this._configService.setConfig(Nn, o);
|
|
2189
2189
|
}
|
|
2190
2190
|
onStarting() {
|
|
2191
2191
|
tt([
|
|
2192
2192
|
[Ne],
|
|
2193
2193
|
[Qe, { useClass: He }],
|
|
2194
2194
|
// used by SlideUIController --> EditorContainer
|
|
2195
|
-
[Je, { useClass:
|
|
2195
|
+
[Je, { useClass: Rn }],
|
|
2196
2196
|
[Te]
|
|
2197
2197
|
], this._config.override).forEach((n) => this._injector.add(n));
|
|
2198
2198
|
}
|
|
@@ -2239,33 +2239,33 @@ let _t = (Ee = class extends mi {
|
|
|
2239
2239
|
} catch {
|
|
2240
2240
|
}
|
|
2241
2241
|
}
|
|
2242
|
-
}, S(Ee, "pluginName",
|
|
2243
|
-
_t =
|
|
2242
|
+
}, S(Ee, "pluginName", Yn), S(Ee, "type", E.UNIVER_SLIDE), Ee);
|
|
2243
|
+
_t = Gn([
|
|
2244
2244
|
be(1, Z(ke)),
|
|
2245
2245
|
be(2, X),
|
|
2246
2246
|
be(3, w),
|
|
2247
|
-
be(4,
|
|
2247
|
+
be(4, _i)
|
|
2248
2248
|
], _t);
|
|
2249
2249
|
export {
|
|
2250
|
-
|
|
2251
|
-
|
|
2250
|
+
Ut as ActivateSlidePageOperation,
|
|
2251
|
+
Vt as AppendSlideOperation,
|
|
2252
2252
|
T as CanvasView,
|
|
2253
|
-
|
|
2253
|
+
jt as DeleteSlideElementOperation,
|
|
2254
2254
|
Qe as ISlideEditorBridgeService,
|
|
2255
2255
|
Xe as InsertSlideFloatImageCommand,
|
|
2256
2256
|
Ye as InsertSlideShapeRectangleCommand,
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2257
|
+
Kt as InsertSlideShapeRectangleOperation,
|
|
2258
|
+
Yt as SHAPE_MENU_ID,
|
|
2259
|
+
Gt as SLIDES_IMAGE_MENU_ID,
|
|
2260
2260
|
de as SLIDE_EDITOR_ID,
|
|
2261
|
-
|
|
2261
|
+
Xt as SetSlidePageThumbOperation,
|
|
2262
2262
|
qe as SlideAddTextCommand,
|
|
2263
|
-
|
|
2263
|
+
Zt as SlideAddTextOperation,
|
|
2264
2264
|
Te as SlideCanvasPopMangerService,
|
|
2265
|
-
|
|
2266
|
-
|
|
2265
|
+
On as SlideEditorContainer,
|
|
2266
|
+
mn as SlideSideBar,
|
|
2267
2267
|
Pe as SlidesUIController,
|
|
2268
|
-
|
|
2268
|
+
En as SlidesUIMenuSchema,
|
|
2269
2269
|
_t as UniverSlidesUIPlugin,
|
|
2270
2270
|
H as UpdateSlideElementOperation
|
|
2271
2271
|
};
|