@univerjs/slides-ui 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +2 -2
- package/lib/es/index.js +134 -131
- package/lib/umd/index.js +2 -2
- package/package.json +14 -14
package/lib/es/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
var dn = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var I = (i, e, t) =>
|
|
4
|
-
import { Inject as X, Injector as ke, IUniverInstanceService as y, RxDisposable as pe, UniverInstanceType as E, debounce as
|
|
5
|
-
import { IRenderManagerService as Y, Viewport as it, ScrollBar as xt, Slide as xn, Rect as yt, Scene as yn, ObjectType as
|
|
2
|
+
var un = (i, e, t) => e in i ? dn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
|
+
var I = (i, e, t) => un(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { Inject as X, Injector as ke, IUniverInstanceService as y, RxDisposable as pe, UniverInstanceType as E, debounce as gn, getColorStyle as hn, CommandType as V, Tools as mn, LocaleService as ee, ICommandService as B, generateRandomId as St, BasicShapes as vn, PageElementType as Ke, Disposable as Ve, DisposableCollection as Ge, IContextService as Ce, toDisposable as It, FOCUSING_COMMON_DRAWINGS as pn, createInternalEditorID as Cn, createIdentifier as bt, EDITOR_ACTIVATED as xe, FOCUSING_EDITOR_STANDALONE as Pt, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE as Et, DocumentDataModel as fn, HorizontalAlign as Rt, VerticalAlign as ye, IUndoRedoService as _n, WrapStrategy as tt, FOCUSING_EDITOR_BUT_HIDDEN as Sn, DEFAULT_EMPTY_DOCUMENT_VALUE as In, Direction as L, DocumentFlavor as bn, FOCUSING_UNIVER_EDITOR as Ot, FORMULA_EDITOR_ACTIVATED as Pn, Plugin as En, merge as Rn, mergeOverrideWithDependencies as nt, IConfigService as On } from "@univerjs/core";
|
|
5
|
+
import { IRenderManagerService as Y, Viewport as it, ScrollBar as xt, Slide as xn, Rect as yt, Scene as yn, ObjectType as ge, pxToNum as Tn, DeviceInputEventType as J, convertTextRotation as rt, FIX_ONE_PIXEL_BLUR_OFFSET as se, fixLineWidthByScale as st } from "@univerjs/engine-render";
|
|
6
6
|
import { ObjectProvider as Mn, SLIDE_KEY as oe } from "@univerjs/slides";
|
|
7
|
-
import { useDependency as x, ISidebarService as Tt, ICanvasPopupService as wn, ILayoutService as Nn, KeyCode as T, ILocalFileService as Dn, useObservable as Un, DISABLE_AUTO_FOCUS_KEY as ot, getMenuHiddenObservable as fe, MenuItemType as _e, RibbonStartGroup as Vn, MetaKeys as Bn, IMenuManagerService as
|
|
8
|
-
import { jsxs as R, jsx as
|
|
7
|
+
import { useDependency as x, ISidebarService as Tt, ICanvasPopupService as wn, ILayoutService as Nn, KeyCode as T, ILocalFileService as Dn, useObservable as Un, DISABLE_AUTO_FOCUS_KEY as ot, getMenuHiddenObservable as fe, MenuItemType as _e, RibbonStartGroup as Vn, MetaKeys as Bn, IMenuManagerService as jn, ComponentManager as Ln, IUIPartsService as An, IShortcutService as $n, BuiltInUIPart as at, connectInjector as ct } from "@univerjs/ui";
|
|
8
|
+
import { jsxs as R, jsx as u } from "react/jsx-runtime";
|
|
9
9
|
import { Button as be, DropdownLegacy as Mt, ColorPicker as Hn, InputNumber as de, Scrollbar as Fn } from "@univerjs/design";
|
|
10
10
|
import wt, { forwardRef as $, useRef as Nt, createElement as H, useState as G, useEffect as me, useMemo as zn, useCallback as lt } from "react";
|
|
11
11
|
import { BehaviorSubject as Q, Subject as Dt, filter as Wn, takeUntil as dt } from "rxjs";
|
|
12
|
-
import { DocSelectionManagerService as kn, DocSkeletonManagerService as
|
|
13
|
-
import { IEditorService as Xe, DocSelectionRenderService as
|
|
12
|
+
import { DocSelectionManagerService as kn, 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 Gn, MoveSelectionOperation as Xn, MoveCursorOperation as Yn, DOCS_VIEW_KEY as Zn, DeleteLeftCommand as qn } from "@univerjs/docs-ui";
|
|
14
14
|
import { DRAWING_IMAGE_ALLOW_IMAGE_LIST as Jn, IImageIoService as Qn, getImageSize as ei } from "@univerjs/drawing";
|
|
15
15
|
var ti = Object.getOwnPropertyDescriptor, ni = (i, e, t, n) => {
|
|
16
16
|
for (var r = n > 1 ? void 0 : n ? ti(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
@@ -21,7 +21,7 @@ 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", gn(() => {
|
|
25
25
|
this.createThumbs();
|
|
26
26
|
}, 300));
|
|
27
27
|
this._renderContext = e, this._injector = t, this._univerInstanceService = n, this._renderManagerService = r, this._objectProvider = this._injector.createInstance(Mn), this._addNewRender();
|
|
@@ -331,7 +331,10 @@ function Vt(i, e, t, n, r) {
|
|
|
331
331
|
}
|
|
332
332
|
function ci(i, e, t) {
|
|
333
333
|
var n = U({}, i.attrs);
|
|
334
|
-
t != null && t.colorChannel1 && n.fill === "colorChannel1" && (n.fill = t.colorChannel1)
|
|
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
|
+
var o = s[0], a = s[1];
|
|
336
|
+
o === "mask" && typeof a == "string" && (n[o] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
337
|
+
});
|
|
335
338
|
var r = e.defIds;
|
|
336
339
|
return !r || r.length === 0 || (i.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + e.idSuffix), Object.entries(n).forEach(function(s) {
|
|
337
340
|
var o = s[0], a = s[1];
|
|
@@ -348,30 +351,30 @@ function di() {
|
|
|
348
351
|
return Math.random().toString(36).substring(2, 8);
|
|
349
352
|
}
|
|
350
353
|
F.displayName = "UniverIcon";
|
|
351
|
-
var
|
|
354
|
+
var ui = { 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) {
|
|
352
355
|
return H(F, Object.assign({}, i, {
|
|
353
356
|
id: "add-image-single",
|
|
354
357
|
ref: e,
|
|
355
|
-
icon:
|
|
358
|
+
icon: ui
|
|
356
359
|
}));
|
|
357
360
|
});
|
|
358
361
|
Bt.displayName = "AddImageSingle";
|
|
359
|
-
var
|
|
362
|
+
var gi = { 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) {
|
|
360
363
|
return H(F, Object.assign({}, i, {
|
|
361
364
|
id: "autofill",
|
|
362
365
|
ref: e,
|
|
363
|
-
icon:
|
|
366
|
+
icon: gi
|
|
364
367
|
}));
|
|
365
368
|
});
|
|
366
|
-
|
|
367
|
-
var hi = { 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" } }] },
|
|
369
|
+
jt.displayName = "Autofill";
|
|
370
|
+
var hi = { 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) {
|
|
368
371
|
return H(F, Object.assign({}, i, {
|
|
369
372
|
id: "bottom-single",
|
|
370
373
|
ref: e,
|
|
371
374
|
icon: hi
|
|
372
375
|
}));
|
|
373
376
|
});
|
|
374
|
-
|
|
377
|
+
Lt.displayName = "BottomSingle";
|
|
375
378
|
var mi = { 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) {
|
|
376
379
|
return H(F, Object.assign({}, i, {
|
|
377
380
|
id: "graph-single",
|
|
@@ -404,7 +407,7 @@ var Ci = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em"
|
|
|
404
407
|
}));
|
|
405
408
|
});
|
|
406
409
|
Ht.displayName = "MoveUpSingle";
|
|
407
|
-
var fi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0
|
|
410
|
+
var fi = { 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) {
|
|
408
411
|
return H(F, Object.assign({}, i, {
|
|
409
412
|
id: "paint-bucket",
|
|
410
413
|
ref: e,
|
|
@@ -450,7 +453,7 @@ const k = {
|
|
|
450
453
|
const a = o.getActivePage();
|
|
451
454
|
return a.pageElements[t] = mn.deepMerge(a.pageElements[t], n), o.updatePage(a.id, a), !0;
|
|
452
455
|
}
|
|
453
|
-
}, Ii = "univer-image-common-panel-grid", bi = "univer-image-common-panel-border", Pi = "univer-image-common-panel-title", Ei = "univer-image-common-panel-row", Ri = "univer-image-common-panel-column", Oi = "univer-image-common-panel-inline", xi = "univer-image-common-panel-span2", yi = "univer-image-common-panel-span3", Ti = "univer-image-common-panel-input", Mi = "univer-slide-panel-color-picker",
|
|
456
|
+
}, Ii = "univer-image-common-panel-grid", bi = "univer-image-common-panel-border", Pi = "univer-image-common-panel-title", Ei = "univer-image-common-panel-row", Ri = "univer-image-common-panel-column", Oi = "univer-image-common-panel-inline", xi = "univer-image-common-panel-span2", yi = "univer-image-common-panel-span3", Ti = "univer-image-common-panel-input", Mi = "univer-slide-panel-color-picker", g = {
|
|
454
457
|
imageCommonPanelGrid: Ii,
|
|
455
458
|
imageCommonPanelBorder: bi,
|
|
456
459
|
imageCommonPanelTitle: Pi,
|
|
@@ -471,8 +474,8 @@ function wi(i) {
|
|
|
471
474
|
if (!l) return null;
|
|
472
475
|
const d = (v) => {
|
|
473
476
|
const f = a.getAllObjects(), [C, p] = f.reduce(([_, b], P) => {
|
|
474
|
-
const w = P.zIndex, D = w < _ ? w : _,
|
|
475
|
-
return [D,
|
|
477
|
+
const w = P.zIndex, D = w < _ ? w : _, j = w > b ? w : b;
|
|
478
|
+
return [D, j];
|
|
476
479
|
}, [0, 0]);
|
|
477
480
|
let m = l.zIndex;
|
|
478
481
|
v === 3 ? m = C - 1 : v === 2 ? m = p + 1 : v === 0 ? m = l.zIndex + 1 : v === 1 && (m = l.zIndex - 1), l.setProps({
|
|
@@ -485,45 +488,45 @@ function wi(i) {
|
|
|
485
488
|
}
|
|
486
489
|
});
|
|
487
490
|
};
|
|
488
|
-
return /* @__PURE__ */ R("div", { className:
|
|
489
|
-
/* @__PURE__ */
|
|
490
|
-
/* @__PURE__ */ R("div", { className:
|
|
491
|
-
/* @__PURE__ */
|
|
491
|
+
return /* @__PURE__ */ R("div", { className: g.imageCommonPanelGrid, children: [
|
|
492
|
+
/* @__PURE__ */ u("div", { className: g.imageCommonPanelRow, children: /* @__PURE__ */ u("div", { className: M(g.imageCommonPanelColumn, g.imageCommonPanelTitle), children: /* @__PURE__ */ u("div", { children: n.t("image-panel.arrange.title") }) }) }),
|
|
493
|
+
/* @__PURE__ */ R("div", { className: g.imageCommonPanelRow, children: [
|
|
494
|
+
/* @__PURE__ */ u("div", { className: M(g.imageCommonPanelColumn, g.imageCommonPanelSpan2), children: /* @__PURE__ */ u(be, { size: "small", onClick: () => {
|
|
492
495
|
d(
|
|
493
496
|
0
|
|
494
497
|
/* forward */
|
|
495
498
|
);
|
|
496
|
-
}, children: /* @__PURE__ */ R("span", { className:
|
|
497
|
-
/* @__PURE__ */
|
|
499
|
+
}, children: /* @__PURE__ */ R("span", { className: g.imageCommonPanelInline, children: [
|
|
500
|
+
/* @__PURE__ */ u(Ht, {}),
|
|
498
501
|
n.t("image-panel.arrange.forward")
|
|
499
502
|
] }) }) }),
|
|
500
|
-
/* @__PURE__ */
|
|
503
|
+
/* @__PURE__ */ u("div", { className: M(g.imageCommonPanelColumn, g.imageCommonPanelSpan2), children: /* @__PURE__ */ u(be, { size: "small", onClick: () => {
|
|
501
504
|
d(
|
|
502
505
|
1
|
|
503
506
|
/* backward */
|
|
504
507
|
);
|
|
505
|
-
}, children: /* @__PURE__ */ R("span", { className:
|
|
506
|
-
/* @__PURE__ */
|
|
508
|
+
}, children: /* @__PURE__ */ R("span", { className: g.imageCommonPanelInline, children: [
|
|
509
|
+
/* @__PURE__ */ u($t, {}),
|
|
507
510
|
n.t("image-panel.arrange.backward")
|
|
508
511
|
] }) }) })
|
|
509
512
|
] }),
|
|
510
|
-
/* @__PURE__ */ R("div", { className:
|
|
511
|
-
/* @__PURE__ */
|
|
513
|
+
/* @__PURE__ */ R("div", { className: g.imageCommonPanelRow, children: [
|
|
514
|
+
/* @__PURE__ */ u("div", { className: M(g.imageCommonPanelColumn, g.imageCommonPanelSpan2), children: /* @__PURE__ */ u(be, { size: "small", onClick: () => {
|
|
512
515
|
d(
|
|
513
516
|
2
|
|
514
517
|
/* front */
|
|
515
518
|
);
|
|
516
|
-
}, children: /* @__PURE__ */ R("span", { className:
|
|
517
|
-
/* @__PURE__ */
|
|
519
|
+
}, children: /* @__PURE__ */ R("span", { className: g.imageCommonPanelInline, children: [
|
|
520
|
+
/* @__PURE__ */ u(Wt, {}),
|
|
518
521
|
n.t("image-panel.arrange.front")
|
|
519
522
|
] }) }) }),
|
|
520
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ u("div", { className: M(g.imageCommonPanelColumn, g.imageCommonPanelSpan2), children: /* @__PURE__ */ u(be, { size: "small", onClick: () => {
|
|
521
524
|
d(
|
|
522
525
|
3
|
|
523
526
|
/* back */
|
|
524
527
|
);
|
|
525
|
-
}, children: /* @__PURE__ */ R("span", { className:
|
|
526
|
-
/* @__PURE__ */
|
|
528
|
+
}, children: /* @__PURE__ */ R("span", { className: g.imageCommonPanelInline, children: [
|
|
529
|
+
/* @__PURE__ */ u(Lt, {}),
|
|
527
530
|
n.t("image-panel.arrange.back")
|
|
528
531
|
] }) }) })
|
|
529
532
|
] })
|
|
@@ -555,28 +558,28 @@ function Ni(i) {
|
|
|
555
558
|
}
|
|
556
559
|
}), v(m);
|
|
557
560
|
}
|
|
558
|
-
return /* @__PURE__ */
|
|
561
|
+
return /* @__PURE__ */ u(
|
|
559
562
|
"div",
|
|
560
563
|
{
|
|
561
|
-
className: M(
|
|
562
|
-
children: /* @__PURE__ */ R("div", { className:
|
|
563
|
-
/* @__PURE__ */
|
|
564
|
-
/* @__PURE__ */
|
|
564
|
+
className: M(g.imageCommonPanelGrid, g.imageCommonPanelBorder),
|
|
565
|
+
children: /* @__PURE__ */ R("div", { className: g.imageCommonPanelGrid, children: [
|
|
566
|
+
/* @__PURE__ */ u("div", { className: g.imageCommonPanelRow, children: /* @__PURE__ */ u("div", { className: M(g.imageCommonPanelColumn, g.imageCommonPanelTitle), children: /* @__PURE__ */ u("div", { children: n.t("slide.panel.fill.title") }) }) }),
|
|
567
|
+
/* @__PURE__ */ u("div", { className: g.imageCommonPanelRow, children: /* @__PURE__ */ u("div", { className: M(g.imageCommonPanelColumn, g.imageCommonPanelSpan2), children: /* @__PURE__ */ u(
|
|
565
568
|
Mt,
|
|
566
569
|
{
|
|
567
570
|
align: {
|
|
568
571
|
offset: [0, 18]
|
|
569
572
|
},
|
|
570
|
-
overlay: /* @__PURE__ */
|
|
573
|
+
overlay: /* @__PURE__ */ u("section", { className: g.slidePanelColorPicker, children: /* @__PURE__ */ u(
|
|
571
574
|
Hn,
|
|
572
575
|
{
|
|
573
576
|
value: "#fff",
|
|
574
577
|
onChange: f
|
|
575
578
|
}
|
|
576
579
|
) }),
|
|
577
|
-
children: /* @__PURE__ */ R("a", { className:
|
|
578
|
-
/* @__PURE__ */
|
|
579
|
-
/* @__PURE__ */
|
|
580
|
+
children: /* @__PURE__ */ R("a", { className: g.uiPluginSheetsBorderPanelButton, children: [
|
|
581
|
+
/* @__PURE__ */ u(Ft, { extend: { colorChannel1: d != null ? d : "rgb(var(--primary-color))" } }),
|
|
582
|
+
/* @__PURE__ */ u("span", { className: g.uiPluginSheetsBorderPanelMoreIcon, children: /* @__PURE__ */ u(Ye, {}) })
|
|
580
583
|
] })
|
|
581
584
|
}
|
|
582
585
|
) }) })
|
|
@@ -597,7 +600,7 @@ function Di(i) {
|
|
|
597
600
|
left: f = 0,
|
|
598
601
|
top: C = 0,
|
|
599
602
|
angle: p = 0
|
|
600
|
-
} = l, [m, _] = G(d), [b, P] = G(v), [w, D] = G(f), [
|
|
603
|
+
} = l, [m, _] = G(d), [b, P] = G(v), [w, D] = G(f), [j, O] = G(C), [K, ae] = G(p), z = (S) => {
|
|
601
604
|
const { objects: ce } = S, le = ce.values().next().value, {
|
|
602
605
|
width: sn = 0,
|
|
603
606
|
height: on = 0,
|
|
@@ -667,16 +670,16 @@ function Di(i) {
|
|
|
667
670
|
return /* @__PURE__ */ R(
|
|
668
671
|
"div",
|
|
669
672
|
{
|
|
670
|
-
className: M(
|
|
673
|
+
className: M(g.imageCommonPanelGrid, g.imageCommonPanelBorder),
|
|
671
674
|
children: [
|
|
672
|
-
/* @__PURE__ */
|
|
673
|
-
/* @__PURE__ */ R("div", { className:
|
|
674
|
-
/* @__PURE__ */
|
|
675
|
-
/* @__PURE__ */
|
|
676
|
-
/* @__PURE__ */
|
|
675
|
+
/* @__PURE__ */ u("div", { className: g.imageCommonPanelRow, children: /* @__PURE__ */ u("div", { className: M(g.imageCommonPanelColumn, g.imageCommonPanelTitle), children: /* @__PURE__ */ u("div", { children: n.t("image-panel.transform.title") }) }) }),
|
|
676
|
+
/* @__PURE__ */ R("div", { className: g.imageCommonPanelRow, children: [
|
|
677
|
+
/* @__PURE__ */ u("div", { className: M(g.imageCommonPanelColumn, g.imageCommonPanelSpan3), children: /* @__PURE__ */ R("label", { children: [
|
|
678
|
+
/* @__PURE__ */ u("div", { className: g.imageCommonPanelRow, children: /* @__PURE__ */ u("div", { className: g.imageCommonPanelColumn, children: n.t("image-panel.transform.width") }) }),
|
|
679
|
+
/* @__PURE__ */ u("div", { className: g.imageCommonPanelRow, children: /* @__PURE__ */ u("div", { className: g.imageCommonPanelColumn, children: /* @__PURE__ */ u(
|
|
677
680
|
de,
|
|
678
681
|
{
|
|
679
|
-
className:
|
|
682
|
+
className: g.imageCommonPanelInput,
|
|
680
683
|
min: 1,
|
|
681
684
|
value: m,
|
|
682
685
|
onChange: (S) => {
|
|
@@ -685,12 +688,12 @@ function Di(i) {
|
|
|
685
688
|
}
|
|
686
689
|
) }) })
|
|
687
690
|
] }) }),
|
|
688
|
-
/* @__PURE__ */
|
|
689
|
-
/* @__PURE__ */
|
|
690
|
-
/* @__PURE__ */
|
|
691
|
+
/* @__PURE__ */ u("div", { className: M(g.imageCommonPanelColumn, g.imageCommonPanelSpan3), children: /* @__PURE__ */ R("label", { children: [
|
|
692
|
+
/* @__PURE__ */ u("div", { className: g.imageCommonPanelRow, children: /* @__PURE__ */ u("div", { className: g.imageCommonPanelColumn, children: n.t("image-panel.transform.height") }) }),
|
|
693
|
+
/* @__PURE__ */ u("div", { className: g.imageCommonPanelRow, children: /* @__PURE__ */ u("div", { className: g.imageCommonPanelColumn, children: /* @__PURE__ */ u(
|
|
691
694
|
de,
|
|
692
695
|
{
|
|
693
|
-
className:
|
|
696
|
+
className: g.imageCommonPanelInput,
|
|
694
697
|
min: 1,
|
|
695
698
|
value: b,
|
|
696
699
|
onChange: (S) => {
|
|
@@ -700,13 +703,13 @@ function Di(i) {
|
|
|
700
703
|
) }) })
|
|
701
704
|
] }) })
|
|
702
705
|
] }),
|
|
703
|
-
/* @__PURE__ */ R("div", { className:
|
|
704
|
-
/* @__PURE__ */
|
|
705
|
-
/* @__PURE__ */
|
|
706
|
-
/* @__PURE__ */
|
|
706
|
+
/* @__PURE__ */ R("div", { className: g.imageCommonPanelRow, children: [
|
|
707
|
+
/* @__PURE__ */ u("div", { className: M(g.imageCommonPanelColumn, g.imageCommonPanelSpan3), children: /* @__PURE__ */ R("label", { children: [
|
|
708
|
+
/* @__PURE__ */ u("div", { className: g.imageCommonPanelRow, children: /* @__PURE__ */ u("div", { className: g.imageCommonPanelColumn, children: n.t("image-panel.transform.x") }) }),
|
|
709
|
+
/* @__PURE__ */ u("div", { className: g.imageCommonPanelRow, children: /* @__PURE__ */ u("div", { className: g.imageCommonPanelColumn, children: /* @__PURE__ */ u(
|
|
707
710
|
de,
|
|
708
711
|
{
|
|
709
|
-
className:
|
|
712
|
+
className: g.imageCommonPanelInput,
|
|
710
713
|
precision: 1,
|
|
711
714
|
min: 0,
|
|
712
715
|
value: w,
|
|
@@ -716,27 +719,27 @@ function Di(i) {
|
|
|
716
719
|
}
|
|
717
720
|
) }) })
|
|
718
721
|
] }) }),
|
|
719
|
-
/* @__PURE__ */
|
|
720
|
-
/* @__PURE__ */
|
|
721
|
-
/* @__PURE__ */
|
|
722
|
+
/* @__PURE__ */ u("div", { className: M(g.imageCommonPanelColumn, g.imageCommonPanelSpan3), children: /* @__PURE__ */ R("label", { children: [
|
|
723
|
+
/* @__PURE__ */ u("div", { className: g.imageCommonPanelRow, children: /* @__PURE__ */ u("div", { className: g.imageCommonPanelColumn, children: n.t("image-panel.transform.y") }) }),
|
|
724
|
+
/* @__PURE__ */ u("div", { className: g.imageCommonPanelRow, children: /* @__PURE__ */ u("div", { className: g.imageCommonPanelColumn, children: /* @__PURE__ */ u(
|
|
722
725
|
de,
|
|
723
726
|
{
|
|
724
|
-
className:
|
|
727
|
+
className: g.imageCommonPanelInput,
|
|
725
728
|
precision: 1,
|
|
726
729
|
min: 0,
|
|
727
|
-
value:
|
|
730
|
+
value: j,
|
|
728
731
|
onChange: (S) => {
|
|
729
732
|
Se(S);
|
|
730
733
|
}
|
|
731
734
|
}
|
|
732
735
|
) }) })
|
|
733
736
|
] }) }),
|
|
734
|
-
/* @__PURE__ */
|
|
735
|
-
/* @__PURE__ */
|
|
736
|
-
/* @__PURE__ */
|
|
737
|
+
/* @__PURE__ */ u("div", { className: M(g.imageCommonPanelColumn, g.imageCommonPanelSpan3), children: /* @__PURE__ */ R("label", { children: [
|
|
738
|
+
/* @__PURE__ */ u("div", { className: g.imageCommonPanelRow, children: /* @__PURE__ */ u("div", { className: g.imageCommonPanelColumn, children: n.t("image-panel.transform.rotate") }) }),
|
|
739
|
+
/* @__PURE__ */ u("div", { className: g.imageCommonPanelRow, children: /* @__PURE__ */ u("div", { className: g.imageCommonPanelColumn, children: /* @__PURE__ */ u(
|
|
737
740
|
de,
|
|
738
741
|
{
|
|
739
|
-
className:
|
|
742
|
+
className: g.imageCommonPanelInput,
|
|
740
743
|
precision: 1,
|
|
741
744
|
value: K,
|
|
742
745
|
onChange: Ie
|
|
@@ -762,9 +765,9 @@ function Bi() {
|
|
|
762
765
|
return null;
|
|
763
766
|
const c = ((d = i.getFocusedUnit()) == null ? void 0 : d.getUnitId()) || "";
|
|
764
767
|
return /* @__PURE__ */ R("section", { className: Vi.imageCommonPanel, children: [
|
|
765
|
-
/* @__PURE__ */
|
|
766
|
-
/* @__PURE__ */
|
|
767
|
-
a.objectType ===
|
|
768
|
+
/* @__PURE__ */ u(wi, { pageId: n, unitId: c }),
|
|
769
|
+
/* @__PURE__ */ u(Di, { pageId: n, unitId: c }),
|
|
770
|
+
a.objectType === ge.RECT && /* @__PURE__ */ u(Ni, { pageId: n, unitId: c })
|
|
768
771
|
] });
|
|
769
772
|
}
|
|
770
773
|
const Ze = {
|
|
@@ -811,7 +814,7 @@ const Ze = {
|
|
|
811
814
|
handler: async (i, e) => {
|
|
812
815
|
const { visible: t, objectType: n } = e, r = i.get(Tt), s = i.get(ee);
|
|
813
816
|
let o = "", a = "";
|
|
814
|
-
return n ===
|
|
817
|
+
return n === ge.RECT ? (o = "slide.sidebar.shape", a = Oe) : n === ge.IMAGE ? (o = "slide.sidebar.image", a = Oe) : n === ge.RICH_TEXT && (o = "slide.sidebar.text", a = Oe), t ? r.open({
|
|
815
818
|
header: { title: s.t(o) },
|
|
816
819
|
children: { label: a },
|
|
817
820
|
onClose: () => {
|
|
@@ -820,8 +823,8 @@ const Ze = {
|
|
|
820
823
|
}) : r.close(), !0;
|
|
821
824
|
}
|
|
822
825
|
}, Gt = "COMPONENT_SLIDE_IMAGE_POPUP_MENU";
|
|
823
|
-
var
|
|
824
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
826
|
+
var ji = Object.getOwnPropertyDescriptor, Li = (i, e, t, n) => {
|
|
827
|
+
for (var r = n > 1 ? void 0 : n ? ji(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
825
828
|
(o = i[s]) && (r = o(r) || r);
|
|
826
829
|
return r;
|
|
827
830
|
}, Pe = (i, e) => (t, n) => e(t, n, i);
|
|
@@ -859,10 +862,10 @@ let Te = class extends Ve {
|
|
|
859
862
|
right: c + l,
|
|
860
863
|
top: h,
|
|
861
864
|
bottom: h + d
|
|
862
|
-
}, p = a.getCanvasElement(), m = p.getBoundingClientRect(), _ = Tn(p.style.width), { scaleX: b, scaleY: P } = o.getAncestorScale(), w = Ai(C, o), { top: D, left:
|
|
865
|
+
}, p = a.getCanvasElement(), m = p.getBoundingClientRect(), _ = Tn(p.style.width), { scaleX: b, scaleY: P } = o.getAncestorScale(), w = Ai(C, o), { top: D, left: j, width: O } = m, K = O / _;
|
|
863
866
|
return {
|
|
864
|
-
left: w.left * K * b +
|
|
865
|
-
right: w.right * K * b +
|
|
867
|
+
left: w.left * K * b + j + v,
|
|
868
|
+
right: w.right * K * b + j + v,
|
|
866
869
|
top: w.top * K * P + D + f,
|
|
867
870
|
bottom: w.bottom * K * P + D + f
|
|
868
871
|
};
|
|
@@ -895,7 +898,7 @@ let Te = class extends Ve {
|
|
|
895
898
|
};
|
|
896
899
|
}
|
|
897
900
|
};
|
|
898
|
-
Te =
|
|
901
|
+
Te = Li([
|
|
899
902
|
Pe(0, X(wn)),
|
|
900
903
|
Pe(1, Y),
|
|
901
904
|
Pe(2, y),
|
|
@@ -1024,7 +1027,7 @@ var Fi = Object.getOwnPropertyDescriptor, zi = (i, e, t, n) => {
|
|
|
1024
1027
|
for (var r = n > 1 ? void 0 : n ? Fi(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
1025
1028
|
(o = i[s]) && (r = o(r) || r);
|
|
1026
1029
|
return r;
|
|
1027
|
-
},
|
|
1030
|
+
}, je = (i, e) => (t, n) => e(t, n, i);
|
|
1028
1031
|
const qe = bt("univer.slide-editor-bridge.service");
|
|
1029
1032
|
let He = class extends Ve {
|
|
1030
1033
|
constructor(e, t, n) {
|
|
@@ -1164,9 +1167,9 @@ let He = class extends Ve {
|
|
|
1164
1167
|
}
|
|
1165
1168
|
};
|
|
1166
1169
|
He = zi([
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
+
je(0, Xe),
|
|
1171
|
+
je(1, Ce),
|
|
1172
|
+
je(2, Y)
|
|
1170
1173
|
], He);
|
|
1171
1174
|
class Wi {
|
|
1172
1175
|
constructor() {
|
|
@@ -1255,16 +1258,16 @@ let Fe = class extends Ve {
|
|
|
1255
1258
|
}
|
|
1256
1259
|
_getEditorSkeleton(e) {
|
|
1257
1260
|
var t;
|
|
1258
|
-
return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(
|
|
1261
|
+
return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(ut).getSkeleton();
|
|
1259
1262
|
}
|
|
1260
1263
|
_getEditorViewModel(e) {
|
|
1261
1264
|
var t;
|
|
1262
|
-
return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(
|
|
1265
|
+
return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(ut).getViewModel();
|
|
1263
1266
|
}
|
|
1264
1267
|
_initialCursorSync(e) {
|
|
1265
1268
|
e.add(this._cellEditorManagerService.focus$.pipe(Wn((t) => !!t)).subscribe(() => {
|
|
1266
1269
|
var n;
|
|
1267
|
-
const t = (n = this._renderManagerService.getCurrentTypeOfRenderer(E.UNIVER_DOC)) == null ? void 0 : n.with(
|
|
1270
|
+
const t = (n = this._renderManagerService.getCurrentTypeOfRenderer(E.UNIVER_DOC)) == null ? void 0 : n.with(gt);
|
|
1268
1271
|
t && t.sync();
|
|
1269
1272
|
}));
|
|
1270
1273
|
}
|
|
@@ -1287,7 +1290,7 @@ let Fe = class extends Ve {
|
|
|
1287
1290
|
startOffset: 0,
|
|
1288
1291
|
endOffset: 0
|
|
1289
1292
|
}]);
|
|
1290
|
-
const d = (v = this._renderManagerService.getCurrentTypeOfRenderer(E.UNIVER_DOC)) == null ? void 0 : v.with(
|
|
1293
|
+
const d = (v = this._renderManagerService.getCurrentTypeOfRenderer(E.UNIVER_DOC)) == null ? void 0 : v.with(gt);
|
|
1291
1294
|
d && d.activate(pt, pt);
|
|
1292
1295
|
}));
|
|
1293
1296
|
}
|
|
@@ -1362,7 +1365,7 @@ let Fe = class extends Ve {
|
|
|
1362
1365
|
const d = this._renderContext.engine.getCanvasElement(), v = d.getBoundingClientRect(), f = h(d.style.width), { top: C, left: p, width: m } = v, _ = m / f;
|
|
1363
1366
|
let { startX: b, startY: P } = n;
|
|
1364
1367
|
b += r.left, P += r.top;
|
|
1365
|
-
const { document: w, scene: D, engine:
|
|
1368
|
+
const { document: w, scene: D, engine: j } = c, O = D.getViewport(ht.VIEW_MAIN), K = document.body.clientHeight - P - r.top - Gi * 2, ae = document.body.clientWidth - b - r.left;
|
|
1366
1369
|
let z = t, W = O == null ? void 0 : O.getScrollBar();
|
|
1367
1370
|
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);
|
|
1368
1371
|
const { scaleX: te, scaleY: ne } = D.getPrecisionScale();
|
|
@@ -1372,7 +1375,7 @@ let Fe = class extends Ve {
|
|
|
1372
1375
|
scaleX: o * _,
|
|
1373
1376
|
scaleY: a * _
|
|
1374
1377
|
}), w.resize(e / o, t / a), setTimeout(() => {
|
|
1375
|
-
|
|
1378
|
+
j.resizeBySize(
|
|
1376
1379
|
st(e, te),
|
|
1377
1380
|
st(z, ne)
|
|
1378
1381
|
);
|
|
@@ -1506,24 +1509,24 @@ let Fe = class extends Ve {
|
|
|
1506
1509
|
}
|
|
1507
1510
|
_moveCursor(e) {
|
|
1508
1511
|
if (e != null)
|
|
1509
|
-
switch (
|
|
1512
|
+
switch (L.LEFT, e) {
|
|
1510
1513
|
case T.ENTER:
|
|
1511
|
-
|
|
1514
|
+
L.DOWN;
|
|
1512
1515
|
break;
|
|
1513
1516
|
case T.TAB:
|
|
1514
|
-
|
|
1517
|
+
L.RIGHT;
|
|
1515
1518
|
break;
|
|
1516
1519
|
case T.ARROW_DOWN:
|
|
1517
|
-
|
|
1520
|
+
L.DOWN;
|
|
1518
1521
|
break;
|
|
1519
1522
|
case T.ARROW_UP:
|
|
1520
|
-
|
|
1523
|
+
L.UP;
|
|
1521
1524
|
break;
|
|
1522
1525
|
case T.ARROW_LEFT:
|
|
1523
|
-
|
|
1526
|
+
L.LEFT;
|
|
1524
1527
|
break;
|
|
1525
1528
|
case T.ARROW_RIGHT:
|
|
1526
|
-
|
|
1529
|
+
L.RIGHT;
|
|
1527
1530
|
break;
|
|
1528
1531
|
}
|
|
1529
1532
|
}
|
|
@@ -1542,8 +1545,8 @@ let Fe = class extends Ve {
|
|
|
1542
1545
|
}
|
|
1543
1546
|
// TODO: @JOCS, is it necessary to move these commands MoveSelectionOperation\MoveCursorOperation to shortcut? and use multi-commands?
|
|
1544
1547
|
_moveInEditor(e, t) {
|
|
1545
|
-
let n =
|
|
1546
|
-
e === T.ARROW_DOWN ? n =
|
|
1548
|
+
let n = L.LEFT;
|
|
1549
|
+
e === T.ARROW_DOWN ? n = L.DOWN : e === T.ARROW_UP ? n = L.UP : e === T.ARROW_RIGHT && (n = L.RIGHT), t ? this._commandService.executeCommand(Xn.id, {
|
|
1547
1550
|
direction: n
|
|
1548
1551
|
}) : this._commandService.executeCommand(Yn.id, {
|
|
1549
1552
|
direction: n
|
|
@@ -1581,7 +1584,7 @@ var Yi = Object.getOwnPropertyDescriptor, Zi = (i, e, t, n) => {
|
|
|
1581
1584
|
for (var r = n > 1 ? void 0 : n ? Yi(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
1582
1585
|
(o = i[s]) && (r = o(r) || r);
|
|
1583
1586
|
return r;
|
|
1584
|
-
},
|
|
1587
|
+
}, Le = (i, e) => (t, n) => e(t, n, i);
|
|
1585
1588
|
let ze = class extends pe {
|
|
1586
1589
|
constructor(e, t, n, r) {
|
|
1587
1590
|
super();
|
|
@@ -1627,7 +1630,7 @@ let ze = class extends pe {
|
|
|
1627
1630
|
})), e.add(o.onDblclick$.subscribeEvent(() => {
|
|
1628
1631
|
a.clearControls();
|
|
1629
1632
|
const h = a.getSelectedObjectMap().values().next().value;
|
|
1630
|
-
h && (h.objectType !==
|
|
1633
|
+
h && (h.objectType !== ge.RICH_TEXT ? this.pickOtherObjects() : this.startEditing(o.sceneKey, h));
|
|
1631
1634
|
})), e.add(this._instanceSrv.focused$.subscribe((c) => {
|
|
1632
1635
|
this.endEditing();
|
|
1633
1636
|
})));
|
|
@@ -1691,9 +1694,9 @@ let ze = class extends pe {
|
|
|
1691
1694
|
}
|
|
1692
1695
|
};
|
|
1693
1696
|
ze = Zi([
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
+
Le(1, y),
|
|
1698
|
+
Le(2, B),
|
|
1699
|
+
Le(3, qe)
|
|
1697
1700
|
], ze);
|
|
1698
1701
|
const Xt = {
|
|
1699
1702
|
id: "slide.operation.activate-slide",
|
|
@@ -1718,8 +1721,8 @@ const Xt = {
|
|
|
1718
1721
|
id: "slide.command.insert-float-image",
|
|
1719
1722
|
type: V.COMMAND,
|
|
1720
1723
|
handler: async (i, e) => {
|
|
1721
|
-
var
|
|
1722
|
-
const t = i.get(y), n = (
|
|
1724
|
+
var j;
|
|
1725
|
+
const t = i.get(y), n = (j = t.getCurrentUnitForType(E.UNIVER_SLIDE)) == null ? void 0 : j.getUnitId();
|
|
1723
1726
|
if (!n) return !1;
|
|
1724
1727
|
const s = await i.get(Dn).openFile({
|
|
1725
1728
|
multiple: !0,
|
|
@@ -1795,7 +1798,7 @@ const Xt = {
|
|
|
1795
1798
|
id: "slide.operation.set-slide-page-thumb",
|
|
1796
1799
|
type: V.OPERATION,
|
|
1797
1800
|
handler: (i, e) => (i.get(N).createThumbs(e.unitId), !0)
|
|
1798
|
-
}, qi = "univer-image-popup-menu", Ji = "univer-image-popup-menu-item", Qi = "univer-image-popup-menu-item-title", er = "univer-btn-container", tr = "univer-btn-container-expand",
|
|
1801
|
+
}, qi = "univer-image-popup-menu", Ji = "univer-image-popup-menu-item", Qi = "univer-image-popup-menu-item-title", er = "univer-btn-container", tr = "univer-btn-container-expand", ue = {
|
|
1799
1802
|
imagePopupMenu: qi,
|
|
1800
1803
|
imagePopupMenuItem: Ji,
|
|
1801
1804
|
imagePopupMenuItemTitle: Qi,
|
|
@@ -1815,22 +1818,22 @@ const Xt = {
|
|
|
1815
1818
|
}, d = (m) => {
|
|
1816
1819
|
t.executeCommand(m.commandId, m.commandParams), s(!1);
|
|
1817
1820
|
}, v = r || o, f = e.filter((m) => !m.disable);
|
|
1818
|
-
return /* @__PURE__ */
|
|
1821
|
+
return /* @__PURE__ */ u(
|
|
1819
1822
|
"div",
|
|
1820
1823
|
{
|
|
1821
1824
|
onMouseEnter: c,
|
|
1822
1825
|
onMouseLeave: h,
|
|
1823
|
-
children: /* @__PURE__ */
|
|
1826
|
+
children: /* @__PURE__ */ u(
|
|
1824
1827
|
Mt,
|
|
1825
1828
|
{
|
|
1826
1829
|
placement: "bottomLeft",
|
|
1827
1830
|
trigger: ["click"],
|
|
1828
|
-
overlay: /* @__PURE__ */
|
|
1831
|
+
overlay: /* @__PURE__ */ u("ul", { className: ue.imagePopupMenu, children: f.map((m) => /* @__PURE__ */ u(
|
|
1829
1832
|
"li",
|
|
1830
1833
|
{
|
|
1831
1834
|
onClick: () => d(m),
|
|
1832
|
-
className:
|
|
1833
|
-
children: /* @__PURE__ */
|
|
1835
|
+
className: ue.imagePopupMenuItem,
|
|
1836
|
+
children: /* @__PURE__ */ u("span", { className: ue.imagePopupMenuItemTitle, children: n.t(m.label) })
|
|
1834
1837
|
},
|
|
1835
1838
|
m.index
|
|
1836
1839
|
)) }),
|
|
@@ -1839,18 +1842,18 @@ const Xt = {
|
|
|
1839
1842
|
children: /* @__PURE__ */ R(
|
|
1840
1843
|
"div",
|
|
1841
1844
|
{
|
|
1842
|
-
className: M(
|
|
1843
|
-
[
|
|
1845
|
+
className: M(ue.btnContainer, {
|
|
1846
|
+
[ue.btnContainerExpand]: r
|
|
1844
1847
|
}),
|
|
1845
1848
|
children: [
|
|
1846
|
-
/* @__PURE__ */
|
|
1847
|
-
|
|
1849
|
+
/* @__PURE__ */ u(
|
|
1850
|
+
jt,
|
|
1848
1851
|
{
|
|
1849
1852
|
style: { color: "#35322B" },
|
|
1850
1853
|
extend: { colorChannel1: "rgb(var(--green-700, #409f11))" }
|
|
1851
1854
|
}
|
|
1852
1855
|
),
|
|
1853
|
-
v && /* @__PURE__ */
|
|
1856
|
+
v && /* @__PURE__ */ u(Ye, { style: { color: "#CCCCCC", fontSize: "8px", marginLeft: "8px" } })
|
|
1854
1857
|
]
|
|
1855
1858
|
}
|
|
1856
1859
|
)
|
|
@@ -1895,8 +1898,8 @@ function lr() {
|
|
|
1895
1898
|
}, [e, s]), f = lt(() => {
|
|
1896
1899
|
e.syncExecuteCommand(Yt.id, { unitId: s == null ? void 0 : s.getUnitId() });
|
|
1897
1900
|
}, [e, s]);
|
|
1898
|
-
return /* @__PURE__ */
|
|
1899
|
-
/* @__PURE__ */
|
|
1901
|
+
return /* @__PURE__ */ u("aside", { className: ie.slideBar, ref: r, children: /* @__PURE__ */ u(Fn, { children: /* @__PURE__ */ R("div", { className: ie.slideBarContent, children: [
|
|
1902
|
+
/* @__PURE__ */ u("header", { className: ie.slideBarContentHeader, children: /* @__PURE__ */ u("a", { onClick: f, children: n.t("slide.append") }) }),
|
|
1900
1903
|
c.map((m, _) => /* @__PURE__ */ R(
|
|
1901
1904
|
"div",
|
|
1902
1905
|
{
|
|
@@ -1905,22 +1908,22 @@ function lr() {
|
|
|
1905
1908
|
}),
|
|
1906
1909
|
onClick: () => v(m.id),
|
|
1907
1910
|
children: [
|
|
1908
|
-
/* @__PURE__ */
|
|
1909
|
-
/* @__PURE__ */
|
|
1911
|
+
/* @__PURE__ */ u("span", { children: _ + 1 }),
|
|
1912
|
+
/* @__PURE__ */ u("div", { ref: d[_], className: ie.slideBarBox })
|
|
1910
1913
|
]
|
|
1911
1914
|
},
|
|
1912
1915
|
m.id
|
|
1913
1916
|
))
|
|
1914
1917
|
] }) }) });
|
|
1915
1918
|
}
|
|
1916
|
-
const dr = "univer-slide-editor-container",
|
|
1919
|
+
const dr = "univer-slide-editor-container", ur = {
|
|
1917
1920
|
slideEditorContainer: dr
|
|
1918
1921
|
}, Ne = -1e3, ft = {
|
|
1919
1922
|
width: 0,
|
|
1920
1923
|
height: 0,
|
|
1921
1924
|
top: Ne,
|
|
1922
1925
|
left: Ne
|
|
1923
|
-
},
|
|
1926
|
+
}, gr = () => {
|
|
1924
1927
|
const [i, e] = G({
|
|
1925
1928
|
...ft
|
|
1926
1929
|
}), t = x(Je), n = x(Xe), r = x(Ce), s = Un(
|
|
@@ -1960,10 +1963,10 @@ const dr = "univer-slide-editor-container", gr = {
|
|
|
1960
1963
|
});
|
|
1961
1964
|
}, []), me(() => {
|
|
1962
1965
|
s || t.setFocus(!0);
|
|
1963
|
-
}, [s, i]), /* @__PURE__ */
|
|
1966
|
+
}, [s, i]), /* @__PURE__ */ u(
|
|
1964
1967
|
"div",
|
|
1965
1968
|
{
|
|
1966
|
-
className:
|
|
1969
|
+
className: ur.slideEditorContainer,
|
|
1967
1970
|
style: {
|
|
1968
1971
|
left: i.left,
|
|
1969
1972
|
top: i.top,
|
|
@@ -2124,7 +2127,7 @@ let De = class extends Ve {
|
|
|
2124
2127
|
this.disposeWithMe(
|
|
2125
2128
|
this._uiPartsService.registerComponent(at.LEFT_SIDEBAR, () => ct(lr, this._injector))
|
|
2126
2129
|
), this.disposeWithMe(
|
|
2127
|
-
this._uiPartsService.registerComponent(at.CONTENT, () => ct(
|
|
2130
|
+
this._uiPartsService.registerComponent(at.CONTENT, () => ct(gr, this._injector))
|
|
2128
2131
|
);
|
|
2129
2132
|
}
|
|
2130
2133
|
_initShortcuts() {
|
|
@@ -2138,8 +2141,8 @@ let De = class extends Ve {
|
|
|
2138
2141
|
};
|
|
2139
2142
|
De = Pr([
|
|
2140
2143
|
re(0, X(ke)),
|
|
2141
|
-
re(1,
|
|
2142
|
-
re(2, X(
|
|
2144
|
+
re(1, jn),
|
|
2145
|
+
re(2, X(Ln)),
|
|
2143
2146
|
re(3, An),
|
|
2144
2147
|
re(4, B),
|
|
2145
2148
|
re(5, $n)
|
|
@@ -2271,7 +2274,7 @@ export {
|
|
|
2271
2274
|
et as SlideAddTextCommand,
|
|
2272
2275
|
Zt as SlideAddTextOperation,
|
|
2273
2276
|
Te as SlideCanvasPopMangerService,
|
|
2274
|
-
|
|
2277
|
+
gr as SlideEditorContainer,
|
|
2275
2278
|
lr as SlideSideBar,
|
|
2276
2279
|
De as SlidesUIController,
|
|
2277
2280
|
fr as SlidesUIMenuSchema,
|