@univerjs/docs-ui 0.13.0-insiders.20251220-0a5ea4d → 0.13.0-insiders.20251223-857805c
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 +477 -489
- package/lib/index.js +477 -489
- package/lib/types/views/page-settings/index.d.ts +0 -4
- package/lib/umd/index.js +11 -11
- package/package.json +9 -9
package/lib/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
var Bc = Object.defineProperty;
|
|
2
2
|
var Mc = (n, e, t) => e in n ? Bc(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
3
|
var O = (n, e, t) => Mc(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { IUniverInstanceService as L, Inject as
|
|
4
|
+
import { IUniverInstanceService as L, Inject as j, Disposable as me, toDisposable as Mn, UniverInstanceType as _, BuildTextUtils as ce, JSONX as W, ObjectRelativeFromV as gt, ObjectRelativeFromH as Co, CommandType as D, sequenceExecuteAsync as wr, ICommandService as T, DataStreamTreeTokenType as V, TextX as Ie, TextXActionType as G, PresetListType as xe, UpdateDocsAttributeType as nn, Tools as ue, generateRandomId as ge, TableRowHeightRule as _c, TableSizeType as Yi, TableTextWrapType as Dc, TableAlignmentType as Pc, MemoryCursor as Nt, SHEET_EDITOR_UNITS as En, PositionedObjectLayoutType as Ro, BlockType as wc, LRUMap as Nc, BaselineOffset as Ve, BooleanNumber as z, ColorKit as Qs, DrawingTypeEnum as Nr, skipParseTagNames as Lc, CustomRangeType as Lr, DataStreamTreeNodeType as sn, createIdentifier as Ki, ILogService as Qr, SliceBodyType as ir, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as bo, DOC_RANGE_TYPE as He, normalizeBody as Qc, getBodySlice as qi, FOCUSING_DOC as _n, EDITOR_ACTIVATED as eo, DashStyleType as Uc, RxDisposable as Ct, ThemeService as Ur, IUndoRedoService as xo, PRESET_LIST_TYPE as Fc, HorizontalAlign as Ue, NamedStyleType as K, RANGE_DIRECTION as De, COLORS as gn, Rectangle as Hc, DocumentFlavor as we, LocaleService as Ye, isInternalEditorID as Rt, IContextService as Fr, Injector as Dn, FOCUSING_EDITOR_STANDALONE as Us, FOCUSING_COMMENT_EDITOR as Fs, isCommentEditorID as kc, VerticalAlign as Vc, DEFAULT_EMPTY_DOCUMENT_VALUE as Xi, PageOrientType as Wc, PAPER_TYPES as jc, PAGE_SIZE as ar, DOCS_ZEN_EDITOR_UNIT_ID_KEY as nt, DEFAULT_STYLES as yo, NAMED_STYLE_MAP as zc, DisposableCollection as In, fromEventSubject as Mt, deepCompare as Gc, FOCUSING_UNIVER_EDITOR as Hr, FOCUSING_COMMON_DRAWINGS as Zi, getPlainText as to, debounce as kr, SpacingRule as Xt, IConfigService as Vr, QuickListTypeMap as jo, Direction as le, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Yc, checkForSubstrings as Kc, createInterceptorKey as Ji, InterceptorManager as qc, UndoCommandId as Hs, RedoCommandId as ks, DependentOn as Xc, Plugin as Zc, merge as Jc, touchDependencies as Vs, mergeOverrideWithDependencies as $c, createInternalEditorID as el } from "@univerjs/core";
|
|
5
5
|
import { DocSelectionManagerService as Y, RichTextEditingMutation as X, DocSkeletonManagerService as de, SetTextSelectionsOperation as Le, DocStateEmitService as tl, DocInterceptorService as nl } from "@univerjs/docs";
|
|
6
|
-
import { IRenderManagerService as pe, DocumentEditArea as ve, hasListGlyph as ol, isIndentByGlyph as rl, isFirstGlyph as sl, getParagraphByGlyph as il, pixelToPt as al, ptToPixel as Ws, parseDataStreamToTree as cl, Liquid as
|
|
7
|
-
import { IClipboardInterfaceService as
|
|
6
|
+
import { IRenderManagerService as pe, DocumentEditArea as ve, hasListGlyph as ol, isIndentByGlyph as rl, isFirstGlyph as sl, getParagraphByGlyph as il, pixelToPt as al, ptToPixel as Ws, parseDataStreamToTree as cl, Liquid as $i, GlyphType as ea, DocumentSkeletonPageType as Oe, getPageFromPath as cr, getTableIdAndSliceIndex as js, NORMAL_TEXT_SELECTION_PLUGIN_STYLE as Sn, getColor as fn, RegularPolygon as ta, Rect as Kn, getOffsetRectForDom as ll, ScrollTimer as dl, CURSOR_TYPE as Dt, getSystemHighlightColor as Al, Vector2 as vn, PageLayoutType as Cn, Shape as ul, Path as zs, pxToNum as na, TRANSFORM_CHANGE_OBSERVABLE_TYPE as oa, getNumberUnitValue as on, Viewport as hl, ScrollBar as lr, Layer as Gs, Documents as gl, DocBackground as fl, getLastLine as pl, lineIterator as ml, getLastColumn as El, UniverRenderEnginePlugin as Il, DeviceInputEventType as ra } from "@univerjs/engine-render";
|
|
7
|
+
import { IClipboardInterfaceService as sa, FILE_PNG_CLIPBOARD_MIME_TYPE as Sl, FILE__WEBP_CLIPBOARD_MIME_TYPE as vl, FILE__JPEG_CLIPBOARD_MIME_TYPE as Cl, FILE__BMP_CLIPBOARD_MIME_TYPE as Rl, HTML_CLIPBOARD_MIME_TYPE as ia, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as aa, CopyCommand as bl, CutCommand as xl, PasteCommand as yl, ILayoutService as Oo, KeyCode as q, IConfirmService as ca, useDependency as J, ComponentManager as rn, ISidebarService as la, getMenuHiddenObservable as se, MenuItemType as Z, COLOR_PICKER_COMPONENT as da, FONT_FAMILY_ITEM_COMPONENT as Ol, FONT_FAMILY_COMPONENT as Tl, FONT_SIZE_LIST as Bl, FONT_SIZE_COMPONENT as Ml, HEADING_LIST as Ys, COMMON_LABEL_COMPONENT as _l, HEADING_ITEM_COMPONENT as Dl, ICanvasPopupService as Pl, IMenuManagerService as Aa, ToolbarItem as wl, MenuManagerPosition as Nl, useObservable as et, RectPopup as Ll, DesktopMenu as Ql, ContextMenuPosition as no, MetaKeys as te, Slider as Ul, useConfigValue as ua, useEvent as mn, ContextMenuGroup as an, RibbonInsertGroup as Fl, RibbonStartGroup as Ks, IUIPartsService as Hl, IShortcutService as To, BuiltInUIPart as qs, connectInjector as Xs, imageMimeTypeSet as kl, IContextMenuService as Vl } from "@univerjs/ui";
|
|
8
8
|
import { ImageSourceType as Wr } from "@univerjs/drawing";
|
|
9
|
-
import { Subject as be, BehaviorSubject as Fe, merge as ha, filter as
|
|
9
|
+
import { Subject as be, BehaviorSubject as Fe, merge as ha, filter as oo, takeUntil as ft, fromEvent as je, Observable as fe, map as Pn, combineLatest as wn, distinctUntilChanged as Wt, throttleTime as Rn, switchMap as Wl, take as jl, first as zl, of as Gl, animationFrameScheduler as Yl } from "rxjs";
|
|
10
10
|
import { useRef as ke, createElement as Be, forwardRef as Me, useState as Ee, useEffect as Ce, useMemo as Te, useCallback as ga, useImperativeHandle as Kl, useLayoutEffect as fa } from "react";
|
|
11
11
|
import { filter as dr, bufferTime as ql, map as Xl } from "rxjs/operators";
|
|
12
12
|
import { jsxs as re, jsx as Q, Fragment as Zl } from "react/jsx-runtime";
|
|
13
|
-
import { Checkbox as Zs, InputNumber as it, Button as Jl, clsx as
|
|
13
|
+
import { Checkbox as Zs, InputNumber as it, Button as Jl, clsx as ze, borderClassName as Nn, Select as pa, scrollbarClassName as $l, Tooltip as ed } from "@univerjs/design";
|
|
14
14
|
var td = Object.getOwnPropertyDescriptor, nd = (n, e, t, o) => {
|
|
15
15
|
for (var r = o > 1 ? void 0 : o ? td(e, t) : e, s = n.length - 1, i; s >= 0; s--)
|
|
16
16
|
(i = n[s]) && (r = i(r) || r);
|
|
@@ -55,7 +55,7 @@ let Pt = class extends me {
|
|
|
55
55
|
};
|
|
56
56
|
Pt = nd([
|
|
57
57
|
Js(0, L),
|
|
58
|
-
Js(1,
|
|
58
|
+
Js(1, j(Y))
|
|
59
59
|
], Pt);
|
|
60
60
|
const od = {
|
|
61
61
|
undo: !0,
|
|
@@ -100,7 +100,7 @@ const od = {
|
|
|
100
100
|
toolbar: !0
|
|
101
101
|
}, sd = "DOC_UI_PLUGIN";
|
|
102
102
|
var $e = /* @__PURE__ */ ((n) => (n.MAIN = "__Document_Render_Main__", n.BACKGROUND = "__Document_Render_Background__", n))($e || {}), We = /* @__PURE__ */ ((n) => (n.VIEW_MAIN = "viewMain", n.VIEW_TOP = "viewTop", n.VIEW_LEFT = "viewLeft", n.VIEW_LEFT_TOP = "viewLeftTop", n))(We || {});
|
|
103
|
-
const id = 0,
|
|
103
|
+
const id = 0, zo = 2, ad = 4, $s = 10, jf = "normalTextSelectionPluginName";
|
|
104
104
|
function pt(n) {
|
|
105
105
|
const { mainComponent: e, scene: t, engine: o, components: r } = n, s = e, i = r.get($e.BACKGROUND);
|
|
106
106
|
return {
|
|
@@ -125,7 +125,7 @@ function cd(n, e) {
|
|
|
125
125
|
engine: a
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function zf(n, e) {
|
|
129
129
|
const t = e.getRenderById(n);
|
|
130
130
|
if (t == null)
|
|
131
131
|
return;
|
|
@@ -187,7 +187,7 @@ function Yf(n, e) {
|
|
|
187
187
|
function Kf(n, e) {
|
|
188
188
|
return e.some((t) => n.startIndex > t.startIndex && n.startIndex < t.endIndex);
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function Bo(n, e, t, o, r) {
|
|
191
191
|
const { textRuns: s = [], dataStream: i } = n, a = r && i.startsWith("="), c = {
|
|
192
192
|
st: 0,
|
|
193
193
|
ed: 0,
|
|
@@ -214,7 +214,7 @@ function Mo(n, e, t, o, r) {
|
|
|
214
214
|
...o
|
|
215
215
|
}), c;
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function jr(n, e, t) {
|
|
218
218
|
if (t) {
|
|
219
219
|
const r = n.find((s) => e >= s.startIndex && e <= s.endIndex + 1);
|
|
220
220
|
return r != null && r.wholeEntity ? null : r;
|
|
@@ -222,7 +222,7 @@ function zr(n, e, t) {
|
|
|
222
222
|
const o = n.find((r) => e > r.startIndex && e <= r.endIndex);
|
|
223
223
|
return o != null && o.wholeEntity ? null : o;
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function zr(n, e) {
|
|
226
226
|
return n.filter((t) => e > t.startIndex && e <= t.endIndex);
|
|
227
227
|
}
|
|
228
228
|
function qf(n) {
|
|
@@ -240,7 +240,7 @@ function Xf(n, e = 0, t = 0) {
|
|
|
240
240
|
height: n.height
|
|
241
241
|
},
|
|
242
242
|
positionH: {
|
|
243
|
-
relativeFrom:
|
|
243
|
+
relativeFrom: Co.MARGIN,
|
|
244
244
|
posOffset: (n.left || 0) - e
|
|
245
245
|
},
|
|
246
246
|
positionV: {
|
|
@@ -257,11 +257,11 @@ const dd = "doc.command.tab", Jt = {
|
|
|
257
257
|
const o = n.get(Pt).onAutoFormat(Jt.id, e);
|
|
258
258
|
return (await wr(o, n.get(T))).result;
|
|
259
259
|
}
|
|
260
|
-
}, Ad = "doc.command.after-space",
|
|
260
|
+
}, Ad = "doc.command.after-space", Mo = {
|
|
261
261
|
id: Ad,
|
|
262
262
|
type: D.COMMAND,
|
|
263
263
|
async handler(n) {
|
|
264
|
-
const t = n.get(Pt).onAutoFormat(
|
|
264
|
+
const t = n.get(Pt).onAutoFormat(Mo.id);
|
|
265
265
|
return (await wr(t, n.get(T))).result;
|
|
266
266
|
}
|
|
267
267
|
}, bn = {
|
|
@@ -276,7 +276,7 @@ var ud = Object.getOwnPropertyDescriptor, hd = (n, e, t, o) => {
|
|
|
276
276
|
for (var r = o > 1 ? void 0 : o ? ud(e, t) : e, s = n.length - 1, i; s >= 0; s--)
|
|
277
277
|
(i = n[s]) && (r = i(r) || r);
|
|
278
278
|
return r;
|
|
279
|
-
},
|
|
279
|
+
}, Go = (n, e) => (t, o) => e(t, o, n);
|
|
280
280
|
const gd = 11, fd = 9, kn = {
|
|
281
281
|
/**
|
|
282
282
|
* fontFamily
|
|
@@ -334,9 +334,9 @@ let at = class extends me {
|
|
|
334
334
|
}
|
|
335
335
|
};
|
|
336
336
|
at = hd([
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
337
|
+
Go(0, j(Y)),
|
|
338
|
+
Go(1, L),
|
|
339
|
+
Go(2, pe)
|
|
340
340
|
], at);
|
|
341
341
|
function Ke(n, e) {
|
|
342
342
|
var o;
|
|
@@ -390,7 +390,7 @@ const Gr = {
|
|
|
390
390
|
const h = l.getUnitId(), { startOffset: u, endOffset: g } = i, p = ((ee = A.paragraphs) != null ? ee : []).find((k) => k.startIndex >= u);
|
|
391
391
|
if (!p)
|
|
392
392
|
return !1;
|
|
393
|
-
const m = u === p.startIndex, I = p.startIndex, S = s.getDefaultStyle(), v = s.getStyleCache(), R =
|
|
393
|
+
const m = u === p.startIndex, I = p.startIndex, S = s.getDefaultStyle(), v = s.getStyleCache(), R = Bo(A, g, S, v), E = {
|
|
394
394
|
dataStream: V.PARAGRAPH,
|
|
395
395
|
paragraphs: ma(
|
|
396
396
|
V.PARAGRAPH,
|
|
@@ -475,7 +475,7 @@ const Gr = {
|
|
|
475
475
|
return y.params.actions = P.editOp(M.serialize(), F), !!r.syncExecuteCommand(y.id, y.params);
|
|
476
476
|
}
|
|
477
477
|
};
|
|
478
|
-
var
|
|
478
|
+
var _o = /* @__PURE__ */ ((n) => (n[n.ABOVE = 0] = "ABOVE", n[n.BELLOW = 1] = "BELLOW", n))(_o || {}), Yr = /* @__PURE__ */ ((n) => (n[n.LEFT = 0] = "LEFT", n[n.RIGHT = 1] = "RIGHT", n))(Yr || {});
|
|
479
479
|
function pd(n, e) {
|
|
480
480
|
let t = V.TABLE_START;
|
|
481
481
|
const o = [], r = [];
|
|
@@ -552,7 +552,7 @@ function Ea(n, e, t) {
|
|
|
552
552
|
textWrap: Dc.NONE,
|
|
553
553
|
position: {
|
|
554
554
|
positionH: {
|
|
555
|
-
relativeFrom:
|
|
555
|
+
relativeFrom: Co.PAGE,
|
|
556
556
|
posOffset: 0
|
|
557
557
|
},
|
|
558
558
|
positionV: {
|
|
@@ -993,7 +993,7 @@ const yd = En, va = {
|
|
|
993
993
|
v.push(At), v.push(Je);
|
|
994
994
|
}
|
|
995
995
|
}
|
|
996
|
-
const ne =
|
|
996
|
+
const ne = jr((P = g.customRanges) != null ? P : [], $, yd.includes(f)), ie = zr((F = g.customDecorations) != null ? F : [], $);
|
|
997
997
|
if (ne && (k.customRanges = [{
|
|
998
998
|
...ne,
|
|
999
999
|
startIndex: 0,
|
|
@@ -1454,7 +1454,7 @@ function $r(n, e) {
|
|
|
1454
1454
|
}
|
|
1455
1455
|
return t;
|
|
1456
1456
|
}
|
|
1457
|
-
const
|
|
1457
|
+
const Do = {
|
|
1458
1458
|
id: "doc.command.delete-left",
|
|
1459
1459
|
type: D.COMMAND,
|
|
1460
1460
|
// eslint-disable-next-line max-lines-per-function, complexity
|
|
@@ -1539,7 +1539,7 @@ const Po = {
|
|
|
1539
1539
|
if (w == null)
|
|
1540
1540
|
return !0;
|
|
1541
1541
|
const N = (F = (P = s.getBody()) == null ? void 0 : P.customBlocks) == null ? void 0 : F.find(($) => $.blockId === b.drawingId);
|
|
1542
|
-
if (w.layoutType ===
|
|
1542
|
+
if (w.layoutType === Ro.INLINE || (N == null ? void 0 : N.blockType) === wc.CUSTOM) {
|
|
1543
1543
|
const $ = s.getUnitId();
|
|
1544
1544
|
r = await o.executeCommand(Zr.id, {
|
|
1545
1545
|
direction: Ne.LEFT,
|
|
@@ -1634,7 +1634,7 @@ const Po = {
|
|
|
1634
1634
|
const b = (v = o.getSnapshot().drawings) == null ? void 0 : v[(S = R.drawingId) != null ? S : ""];
|
|
1635
1635
|
if (b == null)
|
|
1636
1636
|
return !0;
|
|
1637
|
-
if (b.layoutType ===
|
|
1637
|
+
if (b.layoutType === Ro.INLINE) {
|
|
1638
1638
|
const C = o.getUnitId();
|
|
1639
1639
|
I = await s.executeCommand(Zr.id, {
|
|
1640
1640
|
direction: Ne.RIGHT,
|
|
@@ -1762,30 +1762,30 @@ class Ld {
|
|
|
1762
1762
|
this._cache.clear();
|
|
1763
1763
|
}
|
|
1764
1764
|
}
|
|
1765
|
-
const
|
|
1765
|
+
const Yo = new Ld();
|
|
1766
1766
|
function ts(n) {
|
|
1767
1767
|
const e = n.style, t = {}, o = n.tagName.toLowerCase();
|
|
1768
1768
|
switch (o) {
|
|
1769
1769
|
case "b":
|
|
1770
1770
|
case "em":
|
|
1771
1771
|
case "strong": {
|
|
1772
|
-
t.bl =
|
|
1772
|
+
t.bl = z.TRUE;
|
|
1773
1773
|
break;
|
|
1774
1774
|
}
|
|
1775
1775
|
case "s": {
|
|
1776
1776
|
t.st = {
|
|
1777
|
-
s:
|
|
1777
|
+
s: z.TRUE
|
|
1778
1778
|
};
|
|
1779
1779
|
break;
|
|
1780
1780
|
}
|
|
1781
1781
|
case "u": {
|
|
1782
1782
|
t.ul = {
|
|
1783
|
-
s:
|
|
1783
|
+
s: z.TRUE
|
|
1784
1784
|
};
|
|
1785
1785
|
break;
|
|
1786
1786
|
}
|
|
1787
1787
|
case "i": {
|
|
1788
|
-
t.it =
|
|
1788
|
+
t.it = z.TRUE;
|
|
1789
1789
|
break;
|
|
1790
1790
|
}
|
|
1791
1791
|
case "sub":
|
|
@@ -1807,20 +1807,20 @@ function ts(n) {
|
|
|
1807
1807
|
break;
|
|
1808
1808
|
}
|
|
1809
1809
|
case "font-style": {
|
|
1810
|
-
i === "italic" && (t.it =
|
|
1810
|
+
i === "italic" && (t.it = z.TRUE);
|
|
1811
1811
|
break;
|
|
1812
1812
|
}
|
|
1813
1813
|
case "font-weight": {
|
|
1814
|
-
(Number(i) > 400 || String(i) === "bold") && (t.bl =
|
|
1814
|
+
(Number(i) > 400 || String(i) === "bold") && (t.bl = z.TRUE);
|
|
1815
1815
|
break;
|
|
1816
1816
|
}
|
|
1817
1817
|
case "text-decoration": {
|
|
1818
1818
|
/underline/.test(i) ? t.ul = {
|
|
1819
|
-
s:
|
|
1819
|
+
s: z.TRUE
|
|
1820
1820
|
} : /overline/.test(i) ? t.ol = {
|
|
1821
|
-
s:
|
|
1821
|
+
s: z.TRUE
|
|
1822
1822
|
} : /line-through/.test(i) && (t.st = {
|
|
1823
|
-
s:
|
|
1823
|
+
s: z.TRUE
|
|
1824
1824
|
});
|
|
1825
1825
|
break;
|
|
1826
1826
|
}
|
|
@@ -1853,7 +1853,7 @@ function ti(n, e) {
|
|
|
1853
1853
|
const t = n.tagName.toLowerCase();
|
|
1854
1854
|
return typeof e == "string" ? t === e : Array.isArray(e) ? e.some((o) => o === t) : e(n);
|
|
1855
1855
|
}
|
|
1856
|
-
const ni = 660,
|
|
1856
|
+
const ni = 660, vo = class vo {
|
|
1857
1857
|
constructor() {
|
|
1858
1858
|
O(this, "_tableCache", []);
|
|
1859
1859
|
O(this, "_styleCache", /* @__PURE__ */ new Map());
|
|
@@ -1867,7 +1867,7 @@ const ni = 660, Co = class Co {
|
|
|
1867
1867
|
}
|
|
1868
1868
|
convert(e, t = {}) {
|
|
1869
1869
|
var a;
|
|
1870
|
-
const o =
|
|
1870
|
+
const o = vo._pluginList.find((c) => c.checkPasteType(e)), r = Qd(e), i = {
|
|
1871
1871
|
body: {
|
|
1872
1872
|
dataStream: "",
|
|
1873
1873
|
paragraphs: [],
|
|
@@ -1911,7 +1911,7 @@ const ni = 660, Co = class Co {
|
|
|
1911
1911
|
size: { width: f, height: p },
|
|
1912
1912
|
angle: 0,
|
|
1913
1913
|
positionH: {
|
|
1914
|
-
relativeFrom:
|
|
1914
|
+
relativeFrom: Co.PAGE,
|
|
1915
1915
|
posOffset: 0
|
|
1916
1916
|
},
|
|
1917
1917
|
positionV: {
|
|
@@ -1919,7 +1919,7 @@ const ni = 660, Co = class Co {
|
|
|
1919
1919
|
posOffset: 0
|
|
1920
1920
|
}
|
|
1921
1921
|
},
|
|
1922
|
-
layoutType:
|
|
1922
|
+
layoutType: Ro.INLINE,
|
|
1923
1923
|
drawingType: Nr.DRAWING_IMAGE,
|
|
1924
1924
|
unitId: o.id || "",
|
|
1925
1925
|
subUnitId: o.id || ""
|
|
@@ -2012,8 +2012,8 @@ ${V.TABLE_CELL_END}`;
|
|
|
2012
2012
|
}));
|
|
2013
2013
|
}
|
|
2014
2014
|
};
|
|
2015
|
-
O(
|
|
2016
|
-
let en =
|
|
2015
|
+
O(vo, "_pluginList", []);
|
|
2016
|
+
let en = vo;
|
|
2017
2017
|
const Ud = {
|
|
2018
2018
|
name: "univer-doc-paste-plugin-lark",
|
|
2019
2019
|
checkPasteType(n) {
|
|
@@ -2027,7 +2027,7 @@ const Ud = {
|
|
|
2027
2027
|
const e = ts(n);
|
|
2028
2028
|
return {
|
|
2029
2029
|
st: {
|
|
2030
|
-
s:
|
|
2030
|
+
s: z.TRUE
|
|
2031
2031
|
},
|
|
2032
2032
|
...e
|
|
2033
2033
|
};
|
|
@@ -2103,7 +2103,7 @@ const Fd = {
|
|
|
2103
2103
|
filter: ["b"],
|
|
2104
2104
|
getStyle(n) {
|
|
2105
2105
|
const e = ts(n);
|
|
2106
|
-
return { bl:
|
|
2106
|
+
return { bl: z.TRUE, ...e };
|
|
2107
2107
|
}
|
|
2108
2108
|
}
|
|
2109
2109
|
],
|
|
@@ -2145,9 +2145,9 @@ function oi(n, e) {
|
|
|
2145
2145
|
const { st: t, ed: o, ts: r = {} } = e, { ff: s, fs: i, it: a, bl: c, ul: d, st: l, ol: A, bg: h, cl: u, va: g } = r;
|
|
2146
2146
|
let f = n.slice(t, o);
|
|
2147
2147
|
const p = [];
|
|
2148
|
-
return a ===
|
|
2148
|
+
return a === z.TRUE && (f = `<i>${f}</i>`), g === Ve.SUPERSCRIPT ? f = `<sup>${f}</sup>` : g === Ve.SUBSCRIPT && (f = `<sub>${f}</sub>`), (d == null ? void 0 : d.s) === z.TRUE && (f = `<u>${f}</u>`), (l == null ? void 0 : l.s) === z.TRUE && (f = `<s>${f}</s>`), c === z.TRUE && (f = `<strong>${f}</strong>`), s && p.push(`font-family: ${s}`), u && p.push(`color: ${u.rgb}`), i && p.push(`font-size: ${i}pt`), A && p.push("text-decoration: overline"), h && p.push(`background: ${h.rgb}`), p.length ? `<span style="${p.join("; ")};">${f}</span>` : f;
|
|
2149
2149
|
}
|
|
2150
|
-
function
|
|
2150
|
+
function Ko(n, e, t) {
|
|
2151
2151
|
const { dataStream: o, textRuns: r = [] } = n;
|
|
2152
2152
|
if (e === t)
|
|
2153
2153
|
return "";
|
|
@@ -2172,10 +2172,10 @@ function Vd(n, e, t) {
|
|
|
2172
2172
|
const A = (u, g) => {
|
|
2173
2173
|
let f = "", p = 0, m = u, I = a.findIndex((S) => u <= S.startIndex && g >= S.startIndex);
|
|
2174
2174
|
if (I === -1)
|
|
2175
|
-
return f =
|
|
2175
|
+
return f = Ko(o, u, g), { sliceHtml: f, customBlockLength: p };
|
|
2176
2176
|
for (; I !== -1; ) {
|
|
2177
2177
|
const S = a[I];
|
|
2178
|
-
a.splice(I, 1), f +=
|
|
2178
|
+
a.splice(I, 1), f += Ko(o, m, S.startIndex);
|
|
2179
2179
|
const v = r[S.blockId];
|
|
2180
2180
|
if (v)
|
|
2181
2181
|
switch (v.drawingType) {
|
|
@@ -2186,7 +2186,7 @@ function Vd(n, e, t) {
|
|
|
2186
2186
|
}
|
|
2187
2187
|
m = S.startIndex + 1, I = a.findIndex((R) => m <= R.startIndex && g >= R.startIndex);
|
|
2188
2188
|
}
|
|
2189
|
-
return f = f +
|
|
2189
|
+
return f = f + Ko(o, m, g + 1), { sliceHtml: f, customBlockLength: p };
|
|
2190
2190
|
};
|
|
2191
2191
|
c.forEach((u) => {
|
|
2192
2192
|
var v, R;
|
|
@@ -2267,7 +2267,7 @@ function Kt(n, e, t) {
|
|
|
2267
2267
|
throw new Error(`Unknown node type: ${n.nodeType}`);
|
|
2268
2268
|
}
|
|
2269
2269
|
}
|
|
2270
|
-
class
|
|
2270
|
+
class jd {
|
|
2271
2271
|
convert(e) {
|
|
2272
2272
|
if (e.length === 0)
|
|
2273
2273
|
throw new Error("The bodyList length at least to be 1");
|
|
@@ -2277,8 +2277,8 @@ class zd {
|
|
|
2277
2277
|
return t;
|
|
2278
2278
|
}
|
|
2279
2279
|
}
|
|
2280
|
-
var
|
|
2281
|
-
for (var r = o > 1 ? void 0 : o ?
|
|
2280
|
+
var zd = Object.getOwnPropertyDescriptor, Gd = (n, e, t, o) => {
|
|
2281
|
+
for (var r = o > 1 ? void 0 : o ? zd(e, t) : e, s = n.length - 1, i; s >= 0; s--)
|
|
2282
2282
|
(i = n[s]) && (r = i(r) || r);
|
|
2283
2283
|
return r;
|
|
2284
2284
|
}, cn = (n, e) => (t, o) => e(t, o, n);
|
|
@@ -2305,10 +2305,10 @@ let ur = class extends me {
|
|
|
2305
2305
|
super();
|
|
2306
2306
|
O(this, "_clipboardHooks", []);
|
|
2307
2307
|
O(this, "_htmlToUDM", new en());
|
|
2308
|
-
O(this, "_umdToHtml", new
|
|
2308
|
+
O(this, "_umdToHtml", new jd());
|
|
2309
2309
|
this._univerInstanceService = e, this._logService = t, this._commandService = o, this._clipboardInterfaceService = r, this._docSelectionManagerService = s;
|
|
2310
2310
|
}
|
|
2311
|
-
async copy(e =
|
|
2311
|
+
async copy(e = ir.copy, t) {
|
|
2312
2312
|
var a, c;
|
|
2313
2313
|
const { newSnapshotList: o = [], needCache: r = !1, snapshot: s, ranges: i } = (a = this._getDocumentBodyInRanges(e, t)) != null ? a : {};
|
|
2314
2314
|
if (o.length === 0 || s == null)
|
|
@@ -2334,7 +2334,7 @@ let ur = class extends me {
|
|
|
2334
2334
|
if (!t && !o && r.length && (t = await this._createImagePasteHtml(r)), !t && !o)
|
|
2335
2335
|
return this._logService.warn("[DocClipboardController] html and text cannot be both empty!"), !1;
|
|
2336
2336
|
const a = this._genDocDataFromHtmlAndText(t, o, i);
|
|
2337
|
-
if (i ===
|
|
2337
|
+
if (i === bo)
|
|
2338
2338
|
if (o) {
|
|
2339
2339
|
const c = ce.transform.fromPlainText(o);
|
|
2340
2340
|
return this._paste({ body: c });
|
|
@@ -2351,7 +2351,7 @@ let ur = class extends me {
|
|
|
2351
2351
|
} = (A = t[0]) != null ? A : {};
|
|
2352
2352
|
if (r == null && this._logService.error("[DocClipboardController] segmentId is not existed"), t.length === 0 && o.length === 0)
|
|
2353
2353
|
return !1;
|
|
2354
|
-
this.copy(
|
|
2354
|
+
this.copy(ir.cut, e);
|
|
2355
2355
|
try {
|
|
2356
2356
|
let h = 0;
|
|
2357
2357
|
if (o.length > 0)
|
|
@@ -2447,7 +2447,7 @@ let ur = class extends me {
|
|
|
2447
2447
|
}
|
|
2448
2448
|
}
|
|
2449
2449
|
}
|
|
2450
|
-
|
|
2450
|
+
Yo.set(o, A);
|
|
2451
2451
|
}
|
|
2452
2452
|
return this._clipboardInterfaceService.write(r, s);
|
|
2453
2453
|
}
|
|
@@ -2494,11 +2494,11 @@ let ur = class extends me {
|
|
|
2494
2494
|
for (const s of e)
|
|
2495
2495
|
for (const i of s.types)
|
|
2496
2496
|
switch (i) {
|
|
2497
|
-
case
|
|
2497
|
+
case aa: {
|
|
2498
2498
|
o = await s.getType(i).then((a) => a && a.text());
|
|
2499
2499
|
break;
|
|
2500
2500
|
}
|
|
2501
|
-
case
|
|
2501
|
+
case ia: {
|
|
2502
2502
|
t = await s.getType(i).then((a) => a && a.text());
|
|
2503
2503
|
break;
|
|
2504
2504
|
}
|
|
@@ -2524,7 +2524,7 @@ let ur = class extends me {
|
|
|
2524
2524
|
}
|
|
2525
2525
|
const r = Nd(e);
|
|
2526
2526
|
if (r) {
|
|
2527
|
-
const i =
|
|
2527
|
+
const i = Yo.get(r);
|
|
2528
2528
|
if (i)
|
|
2529
2529
|
return i;
|
|
2530
2530
|
}
|
|
@@ -2533,7 +2533,7 @@ let ur = class extends me {
|
|
|
2533
2533
|
o = (i == null ? void 0 : i.getUnitId()) || "";
|
|
2534
2534
|
}
|
|
2535
2535
|
const s = this._htmlToUDM.convert(e, { unitId: o });
|
|
2536
|
-
return r &&
|
|
2536
|
+
return r && Yo.set(r, s), s;
|
|
2537
2537
|
}
|
|
2538
2538
|
async _createImagePasteHtml(e) {
|
|
2539
2539
|
var a, c;
|
|
@@ -2578,7 +2578,7 @@ let ur = class extends me {
|
|
|
2578
2578
|
title: "",
|
|
2579
2579
|
source: A.source,
|
|
2580
2580
|
description: "",
|
|
2581
|
-
layoutType:
|
|
2581
|
+
layoutType: Ro.INLINE,
|
|
2582
2582
|
drawingType: Nr.DRAWING_IMAGE,
|
|
2583
2583
|
transform: {
|
|
2584
2584
|
width: h,
|
|
@@ -2588,7 +2588,7 @@ let ur = class extends me {
|
|
|
2588
2588
|
docTransform: {
|
|
2589
2589
|
angle: 0,
|
|
2590
2590
|
size: { width: h, height: u },
|
|
2591
|
-
positionH: { relativeFrom:
|
|
2591
|
+
positionH: { relativeFrom: Co.CHARACTER, posOffset: 0 },
|
|
2592
2592
|
positionV: { relativeFrom: gt.LINE, posOffset: 0 }
|
|
2593
2593
|
}
|
|
2594
2594
|
};
|
|
@@ -2599,19 +2599,19 @@ ur = Gd([
|
|
|
2599
2599
|
cn(0, L),
|
|
2600
2600
|
cn(1, Qr),
|
|
2601
2601
|
cn(2, T),
|
|
2602
|
-
cn(3,
|
|
2603
|
-
cn(4,
|
|
2602
|
+
cn(3, sa),
|
|
2603
|
+
cn(4, j(Y))
|
|
2604
2604
|
], ur);
|
|
2605
|
-
function
|
|
2605
|
+
function Po(n) {
|
|
2606
2606
|
return n.getContextValue(_n) || n.getContextValue(eo);
|
|
2607
2607
|
}
|
|
2608
|
-
const ns = 999,
|
|
2608
|
+
const ns = 999, ro = {
|
|
2609
2609
|
id: bl.id,
|
|
2610
2610
|
name: "doc.command.copy",
|
|
2611
2611
|
type: D.COMMAND,
|
|
2612
2612
|
multi: !0,
|
|
2613
2613
|
priority: ns,
|
|
2614
|
-
preconditions:
|
|
2614
|
+
preconditions: Po,
|
|
2615
2615
|
handler: async (n) => n.get(Lt).copy()
|
|
2616
2616
|
}, os = {
|
|
2617
2617
|
id: "doc.command.copy-current-paragraph",
|
|
@@ -2619,7 +2619,7 @@ const ns = 999, so = {
|
|
|
2619
2619
|
handler: async (n) => {
|
|
2620
2620
|
const e = n.get(Lt), t = Qn(n);
|
|
2621
2621
|
return t ? e.copy(
|
|
2622
|
-
|
|
2622
|
+
ir.copy,
|
|
2623
2623
|
[{
|
|
2624
2624
|
startOffset: t.paragraphStart,
|
|
2625
2625
|
endOffset: t.paragraphEnd + 1,
|
|
@@ -2633,7 +2633,7 @@ const ns = 999, so = {
|
|
|
2633
2633
|
type: D.COMMAND,
|
|
2634
2634
|
multi: !0,
|
|
2635
2635
|
priority: ns,
|
|
2636
|
-
preconditions:
|
|
2636
|
+
preconditions: Po,
|
|
2637
2637
|
handler: async (n) => n.get(Lt).cut()
|
|
2638
2638
|
}, ss = {
|
|
2639
2639
|
id: "doc.command.cut-current-paragraph",
|
|
@@ -2655,12 +2655,12 @@ const ns = 999, so = {
|
|
|
2655
2655
|
type: D.COMMAND,
|
|
2656
2656
|
multi: !0,
|
|
2657
2657
|
priority: ns,
|
|
2658
|
-
preconditions:
|
|
2658
|
+
preconditions: Po,
|
|
2659
2659
|
handler: async (n) => {
|
|
2660
|
-
const e = n.get(Lt), o = await n.get(
|
|
2660
|
+
const e = n.get(Lt), o = await n.get(sa).read();
|
|
2661
2661
|
return o.length === 0 ? !1 : e.paste(o);
|
|
2662
2662
|
}
|
|
2663
|
-
},
|
|
2663
|
+
}, wo = {
|
|
2664
2664
|
id: "doc.command.horizontal-line",
|
|
2665
2665
|
type: D.COMMAND,
|
|
2666
2666
|
handler: (n, e) => n.get(T).syncExecuteCommand(Gr.id, {
|
|
@@ -2679,7 +2679,7 @@ const ns = 999, so = {
|
|
|
2679
2679
|
type: D.COMMAND,
|
|
2680
2680
|
handler: (n) => {
|
|
2681
2681
|
const e = n.get(T), t = Qn(n);
|
|
2682
|
-
return t ? e.syncExecuteCommand(
|
|
2682
|
+
return t ? e.syncExecuteCommand(wo.id, {
|
|
2683
2683
|
insertRange: {
|
|
2684
2684
|
startOffset: t.startIndex + 1,
|
|
2685
2685
|
endOffset: t.startIndex + 1
|
|
@@ -2727,7 +2727,7 @@ const ns = 999, so = {
|
|
|
2727
2727
|
}, !1), !0;
|
|
2728
2728
|
}
|
|
2729
2729
|
};
|
|
2730
|
-
class
|
|
2730
|
+
class No extends Ct {
|
|
2731
2731
|
constructor(t) {
|
|
2732
2732
|
super();
|
|
2733
2733
|
O(this, "_previousActiveRange", null);
|
|
@@ -2782,7 +2782,7 @@ const Ba = {
|
|
|
2782
2782
|
// eslint-disable-next-line max-lines-per-function
|
|
2783
2783
|
handler: async (n, e) => {
|
|
2784
2784
|
var N, ee, $;
|
|
2785
|
-
const { unitId: t, newText: o, oldTextLen: r, isCompositionEnd: s, isCompositionStart: i } = e, a = n.get(T), c = n.get(pe), d = n.get(L), l = n.get(at), A = (N = c.getRenderById(t)) == null ? void 0 : N.with(
|
|
2785
|
+
const { unitId: t, newText: o, oldTextLen: r, isCompositionEnd: s, isCompositionStart: i } = e, a = n.get(T), c = n.get(pe), d = n.get(L), l = n.get(at), A = (N = c.getRenderById(t)) == null ? void 0 : N.with(No), h = d.getUnit(t, _.UNIVER_DOC);
|
|
2786
2786
|
if (h == null || A == null)
|
|
2787
2787
|
return !1;
|
|
2788
2788
|
const u = A.getActiveRange();
|
|
@@ -2806,13 +2806,13 @@ const Ba = {
|
|
|
2806
2806
|
actions: [],
|
|
2807
2807
|
textRanges: R
|
|
2808
2808
|
}
|
|
2809
|
-
}, b = l.getDefaultStyle(), x = l.getStyleCache(), C =
|
|
2809
|
+
}, b = l.getDefaultStyle(), x = l.getStyleCache(), C = jr((ee = p.customRanges) != null ? ee : [], I + r, En.includes(t)), B = Bo(
|
|
2810
2810
|
p,
|
|
2811
2811
|
i ? S : I + r,
|
|
2812
2812
|
b,
|
|
2813
2813
|
x,
|
|
2814
2814
|
En.includes(t)
|
|
2815
|
-
), y =
|
|
2815
|
+
), y = zr(($ = p.customDecorations) != null ? $ : [], I + r), M = new Ie(), P = W.getInstance();
|
|
2816
2816
|
if (!u.collapsed && i) {
|
|
2817
2817
|
const U = ce.selection.delete([u], p, 0, null, !1);
|
|
2818
2818
|
M.push(...U), E.params.textRanges = [{
|
|
@@ -3112,12 +3112,12 @@ function Yd(n) {
|
|
|
3112
3112
|
}
|
|
3113
3113
|
function Ma(n, e, t) {
|
|
3114
3114
|
if (/bl|it/.test(e))
|
|
3115
|
-
return (n == null ? void 0 : n[e]) ===
|
|
3115
|
+
return (n == null ? void 0 : n[e]) === z.TRUE ? z.FALSE : z.TRUE;
|
|
3116
3116
|
if (/ul|st/.test(e))
|
|
3117
|
-
return Yd(n == null ? void 0 : n[e]) && (n == null ? void 0 : n[e]).s ===
|
|
3118
|
-
s:
|
|
3117
|
+
return Yd(n == null ? void 0 : n[e]) && (n == null ? void 0 : n[e]).s === z.TRUE ? {
|
|
3118
|
+
s: z.FALSE
|
|
3119
3119
|
} : {
|
|
3120
|
-
s:
|
|
3120
|
+
s: z.TRUE
|
|
3121
3121
|
};
|
|
3122
3122
|
if (/va/.test(e))
|
|
3123
3123
|
return t === bt.id ? (n == null ? void 0 : n[e]) === Ve.SUBSCRIPT ? Ve.NORMAL : Ve.SUBSCRIPT : (n == null ? void 0 : n[e]) === Ve.SUPERSCRIPT ? Ve.NORMAL : Ve.SUPERSCRIPT;
|
|
@@ -3146,16 +3146,16 @@ function _a(n, e, t) {
|
|
|
3146
3146
|
return ((C = x.ts) == null ? void 0 : C.ff) != null;
|
|
3147
3147
|
})) == null ? void 0 : A.ts) == null ? void 0 : h.ff) != null ? u : a.ff, a.it = i.length && i.every((x) => {
|
|
3148
3148
|
var C;
|
|
3149
|
-
return ((C = x.ts) == null ? void 0 : C.it) ===
|
|
3150
|
-
}) ?
|
|
3149
|
+
return ((C = x.ts) == null ? void 0 : C.it) === z.TRUE;
|
|
3150
|
+
}) ? z.TRUE : z.FALSE, a.bl = i.length && i.every((x) => {
|
|
3151
3151
|
var C;
|
|
3152
|
-
return ((C = x.ts) == null ? void 0 : C.bl) ===
|
|
3153
|
-
}) ?
|
|
3152
|
+
return ((C = x.ts) == null ? void 0 : C.bl) === z.TRUE;
|
|
3153
|
+
}) ? z.TRUE : z.FALSE, a.ul = i.length && i.every((x) => {
|
|
3154
3154
|
var C, B;
|
|
3155
|
-
return ((B = (C = x.ts) == null ? void 0 : C.ul) == null ? void 0 : B.s) ===
|
|
3155
|
+
return ((B = (C = x.ts) == null ? void 0 : C.ul) == null ? void 0 : B.s) === z.TRUE;
|
|
3156
3156
|
}) ? (g = i[0].ts) == null ? void 0 : g.ul : a.ul, a.st = i.length && i.every((x) => {
|
|
3157
3157
|
var C, B;
|
|
3158
|
-
return ((B = (C = x.ts) == null ? void 0 : C.st) == null ? void 0 : B.s) ===
|
|
3158
|
+
return ((B = (C = x.ts) == null ? void 0 : C.st) == null ? void 0 : B.s) === z.TRUE;
|
|
3159
3159
|
}) ? (f = i[0].ts) == null ? void 0 : f.st : a.st, a.bg = (I = (m = (p = i.find((x) => {
|
|
3160
3160
|
var C;
|
|
3161
3161
|
return ((C = x.ts) == null ? void 0 : C.bg) != null;
|
|
@@ -3269,7 +3269,7 @@ const Da = {
|
|
|
3269
3269
|
id: "doc.command-cover-content",
|
|
3270
3270
|
type: D.COMMAND,
|
|
3271
3271
|
handler: (n, e) => {
|
|
3272
|
-
const { unitId: t, body: o, segmentId: r = "", textRanges: s } = e, i = n.get(L), a = n.get(T), c = n.get(
|
|
3272
|
+
const { unitId: t, body: o, segmentId: r = "", textRanges: s } = e, i = n.get(L), a = n.get(T), c = n.get(xo), d = i.getUniverDocInstance(t), l = d == null ? void 0 : d.getSnapshot().body;
|
|
3273
3273
|
if (d == null || l == null)
|
|
3274
3274
|
return !1;
|
|
3275
3275
|
const A = Pa(t, r, d, l, o);
|
|
@@ -3408,7 +3408,7 @@ const wa = {
|
|
|
3408
3408
|
}), m = W.getInstance(), I = Ae(i, c);
|
|
3409
3409
|
return g.params.actions = m.editOp(p.serialize(), I), !!r.syncExecuteCommand(g.id, g.params);
|
|
3410
3410
|
}
|
|
3411
|
-
},
|
|
3411
|
+
}, Lo = {
|
|
3412
3412
|
id: "doc.command.change-list-type",
|
|
3413
3413
|
type: D.COMMAND,
|
|
3414
3414
|
handler: (n, e) => {
|
|
@@ -3474,7 +3474,7 @@ const gr = {
|
|
|
3474
3474
|
type: D.COMMAND,
|
|
3475
3475
|
handler: (n, e) => {
|
|
3476
3476
|
const t = n.get(T);
|
|
3477
|
-
return e != null && e.value ? t.syncExecuteCommand(
|
|
3477
|
+
return e != null && e.value ? t.syncExecuteCommand(Lo.id, {
|
|
3478
3478
|
listType: e.value,
|
|
3479
3479
|
docRange: e.docRange
|
|
3480
3480
|
}) : t.syncExecuteCommand(Fn.id, {
|
|
@@ -3482,12 +3482,12 @@ const gr = {
|
|
|
3482
3482
|
docRange: e == null ? void 0 : e.docRange
|
|
3483
3483
|
});
|
|
3484
3484
|
}
|
|
3485
|
-
},
|
|
3485
|
+
}, so = {
|
|
3486
3486
|
id: "doc.command.check-list",
|
|
3487
3487
|
type: D.COMMAND,
|
|
3488
3488
|
handler: (n, e) => {
|
|
3489
3489
|
const t = n.get(T);
|
|
3490
|
-
return e != null && e.value ? t.syncExecuteCommand(
|
|
3490
|
+
return e != null && e.value ? t.syncExecuteCommand(Lo.id, {
|
|
3491
3491
|
listType: e.value,
|
|
3492
3492
|
docRange: e.docRange
|
|
3493
3493
|
}) : t.syncExecuteCommand(Fn.id, {
|
|
@@ -3529,7 +3529,7 @@ const gr = {
|
|
|
3529
3529
|
type: D.COMMAND,
|
|
3530
3530
|
handler: (n, e) => {
|
|
3531
3531
|
const t = n.get(T);
|
|
3532
|
-
return e != null && e.value ? t.syncExecuteCommand(
|
|
3532
|
+
return e != null && e.value ? t.syncExecuteCommand(Lo.id, {
|
|
3533
3533
|
listType: e.value
|
|
3534
3534
|
}) : t.syncExecuteCommand(Fn.id, {
|
|
3535
3535
|
listType: xe.ORDER_LIST
|
|
@@ -3724,25 +3724,25 @@ const ls = {
|
|
|
3724
3724
|
const S = Ae(i, c);
|
|
3725
3725
|
return f.params.actions = I.editOp(m.serialize(), S), !!r.syncExecuteCommand(f.id, f.params);
|
|
3726
3726
|
}
|
|
3727
|
-
},
|
|
3727
|
+
}, Qo = {
|
|
3728
3728
|
id: "doc.command.align-left",
|
|
3729
3729
|
type: D.COMMAND,
|
|
3730
3730
|
handler: (n) => n.get(T).syncExecuteCommand(lt.id, {
|
|
3731
3731
|
alignType: Ue.LEFT
|
|
3732
3732
|
})
|
|
3733
|
-
},
|
|
3733
|
+
}, Uo = {
|
|
3734
3734
|
id: "doc.command.align-center",
|
|
3735
3735
|
type: D.COMMAND,
|
|
3736
3736
|
handler: (n) => n.get(T).syncExecuteCommand(lt.id, {
|
|
3737
3737
|
alignType: Ue.CENTER
|
|
3738
3738
|
})
|
|
3739
|
-
},
|
|
3739
|
+
}, Fo = {
|
|
3740
3740
|
id: "doc.command.align-right",
|
|
3741
3741
|
type: D.COMMAND,
|
|
3742
3742
|
handler: (n) => n.get(T).syncExecuteCommand(lt.id, {
|
|
3743
3743
|
alignType: Ue.RIGHT
|
|
3744
3744
|
})
|
|
3745
|
-
},
|
|
3745
|
+
}, Ho = {
|
|
3746
3746
|
id: "doc.command.align-justify",
|
|
3747
3747
|
type: D.COMMAND,
|
|
3748
3748
|
handler: (n) => n.get(T).syncExecuteCommand(lt.id, {
|
|
@@ -3763,7 +3763,7 @@ const ls = {
|
|
|
3763
3763
|
id: "doc.command.set-zoom-ratio",
|
|
3764
3764
|
handler: async (n, e) => {
|
|
3765
3765
|
var A, h, u;
|
|
3766
|
-
const t = n.get(T), o = n.get(
|
|
3766
|
+
const t = n.get(T), o = n.get(xo), r = n.get(L);
|
|
3767
3767
|
let s = (A = r.getCurrentUniverDocInstance()) == null ? void 0 : A.getUnitId();
|
|
3768
3768
|
if (!s) return !1;
|
|
3769
3769
|
let i = 1;
|
|
@@ -3858,7 +3858,7 @@ const ls = {
|
|
|
3858
3858
|
const S = Ae(i, c);
|
|
3859
3859
|
return I.params.actions = p.editOp(f.serialize(), S), !!s.syncExecuteCommand(I.id, I.params);
|
|
3860
3860
|
}
|
|
3861
|
-
},
|
|
3861
|
+
}, qo = {
|
|
3862
3862
|
"#": K.HEADING_1,
|
|
3863
3863
|
"##": K.HEADING_2,
|
|
3864
3864
|
"###": K.HEADING_3,
|
|
@@ -3894,7 +3894,7 @@ const ls = {
|
|
|
3894
3894
|
handler: (n) => n.get(T).syncExecuteCommand(Xe.id, {
|
|
3895
3895
|
value: K.HEADING_5
|
|
3896
3896
|
})
|
|
3897
|
-
},
|
|
3897
|
+
}, io = {
|
|
3898
3898
|
id: "doc.command.normal-text-heading",
|
|
3899
3899
|
type: D.COMMAND,
|
|
3900
3900
|
handler: (n) => n.get(T).syncExecuteCommand(Xe.id, {
|
|
@@ -3977,7 +3977,7 @@ function pr(n) {
|
|
|
3977
3977
|
}
|
|
3978
3978
|
class It {
|
|
3979
3979
|
constructor(e, t) {
|
|
3980
|
-
O(this, "_liquid", new
|
|
3980
|
+
O(this, "_liquid", new $i());
|
|
3981
3981
|
O(this, "_currentStartState", {
|
|
3982
3982
|
page: 0,
|
|
3983
3983
|
section: 0,
|
|
@@ -4020,7 +4020,7 @@ class It {
|
|
|
4020
4020
|
return;
|
|
4021
4021
|
const { x: E, y: b } = this._liquid;
|
|
4022
4022
|
let x, C;
|
|
4023
|
-
const B = v[d], y = v[l], M = v[d - 1], P = (B == null ? void 0 : B.left) || 0, F = (B == null ? void 0 : B.width) || 0, w = (y == null ? void 0 : y.left) || 0, N = (y == null ? void 0 : y.width) || 0, ee = (B == null ? void 0 : B.glyphType) ===
|
|
4023
|
+
const B = v[d], y = v[l], M = v[d - 1], P = (B == null ? void 0 : B.left) || 0, F = (B == null ? void 0 : B.width) || 0, w = (y == null ? void 0 : y.left) || 0, N = (y == null ? void 0 : y.width) || 0, ee = (B == null ? void 0 : B.glyphType) === ea.LIST, { startOffset: $, endOffset: U } = tA(v, d, l, R), H = a.glyph === d && A ? a.isBack : !0, k = c.glyph === l && h ? c.isBack : !1, ne = a === c, ie = H && M != null ? M : B;
|
|
4024
4024
|
if (d === 0 && l === v.length - 1)
|
|
4025
4025
|
x = {
|
|
4026
4026
|
startX: E + P + (ee ? F : 0),
|
|
@@ -4198,9 +4198,9 @@ class It {
|
|
|
4198
4198
|
);
|
|
4199
4199
|
this._liquid.translateSave(), this._liquid.translateLine(he, !0, !1);
|
|
4200
4200
|
for (let Je = Ze; Je <= At; Je++) {
|
|
4201
|
-
const
|
|
4202
|
-
this._liquid.translateSave(), this._liquid.translateDivide(
|
|
4203
|
-
const { glyphGroup: yc } =
|
|
4201
|
+
const Wo = Pe[Je];
|
|
4202
|
+
this._liquid.translateSave(), this._liquid.translateDivide(Wo);
|
|
4203
|
+
const { glyphGroup: yc } = Wo, { start_next: Oc, end_next: Tc } = this._getSelectionRuler(
|
|
4204
4204
|
qt.divide,
|
|
4205
4205
|
e,
|
|
4206
4206
|
t,
|
|
@@ -4208,7 +4208,7 @@ class It {
|
|
|
4208
4208
|
Je
|
|
4209
4209
|
);
|
|
4210
4210
|
let Ns = !1, Ls = !1;
|
|
4211
|
-
E === I && w === P && H === $ && oe === ie && Je === Ze && (Ns = !0), E === S && w === F && H === U && oe === ae && Je === At && (Ls = !0), o && o(Oc, Tc, Ns, Ls,
|
|
4211
|
+
E === I && w === P && H === $ && oe === ie && Je === Ze && (Ns = !0), E === S && w === F && H === U && oe === ae && Je === At && (Ls = !0), o && o(Oc, Tc, Ns, Ls, Wo, he, k, N, y), this._liquid.translateRestore();
|
|
4212
4212
|
}
|
|
4213
4213
|
this._liquid.translateRestore();
|
|
4214
4214
|
}
|
|
@@ -4222,7 +4222,7 @@ function nA(n, e) {
|
|
|
4222
4222
|
const { path: t } = n, { path: o } = e;
|
|
4223
4223
|
if (t.length !== o.length || t.indexOf("cells") === -1)
|
|
4224
4224
|
return !1;
|
|
4225
|
-
const r = t.indexOf("skeTables") + 1, s = t.indexOf("rows") + 1, i = t.indexOf("cells") + 1, { tableId: a, sliceIndex: c } =
|
|
4225
|
+
const r = t.indexOf("skeTables") + 1, s = t.indexOf("rows") + 1, i = t.indexOf("cells") + 1, { tableId: a, sliceIndex: c } = js(t[r]), { tableId: d, sliceIndex: l } = js(o[r]);
|
|
4226
4226
|
if (a !== d)
|
|
4227
4227
|
return !1;
|
|
4228
4228
|
const A = t[s], h = o[s], u = t[i], g = o[i];
|
|
@@ -4243,7 +4243,7 @@ function ka(n, e, t) {
|
|
|
4243
4243
|
const d = a.parent, l = c.parent, A = d.cells.indexOf(a), h = l.cells.indexOf(c);
|
|
4244
4244
|
return A === h && d.index === l.index;
|
|
4245
4245
|
}
|
|
4246
|
-
function
|
|
4246
|
+
function Xo(n, e) {
|
|
4247
4247
|
if (Ha(n, e))
|
|
4248
4248
|
return ms(n, e);
|
|
4249
4249
|
const { path: t } = n, { path: o } = e, r = t[t.length - 5], s = o[o.length - 5];
|
|
@@ -4254,19 +4254,19 @@ function Zo(n, e) {
|
|
|
4254
4254
|
const i = t[t.length - 3], a = o[o.length - 3], c = t[t.length - 1], d = o[o.length - 1];
|
|
4255
4255
|
return i < a ? !0 : i > a ? !1 : c <= d;
|
|
4256
4256
|
}
|
|
4257
|
-
function
|
|
4257
|
+
function jt(n) {
|
|
4258
4258
|
return n.sections[0].columns[0].lines.length === 0;
|
|
4259
4259
|
}
|
|
4260
4260
|
function oA(n, e, t) {
|
|
4261
4261
|
let o = e, r = t, s = n[o], i = n[r];
|
|
4262
|
-
for (; o < r && (
|
|
4263
|
-
|
|
4264
|
-
if (!
|
|
4262
|
+
for (; o < r && (jt(s) || jt(i)); )
|
|
4263
|
+
jt(s) ? (o++, s = n[o]) : jt(i) && (r--, i = n[r]);
|
|
4264
|
+
if (!jt(s) && !jt(i))
|
|
4265
4265
|
return [s, i];
|
|
4266
4266
|
}
|
|
4267
4267
|
class Va {
|
|
4268
4268
|
constructor(e, t) {
|
|
4269
|
-
O(this, "_liquid", new
|
|
4269
|
+
O(this, "_liquid", new $i());
|
|
4270
4270
|
this._documentOffsetConfig = e, this._docSkeleton = t;
|
|
4271
4271
|
}
|
|
4272
4272
|
// eslint-disable-next-line max-lines-per-function
|
|
@@ -4376,7 +4376,7 @@ class Va {
|
|
|
4376
4376
|
};
|
|
4377
4377
|
}
|
|
4378
4378
|
}
|
|
4379
|
-
const rA = "__TestSelectionRange__", sA = "__TestSelectionAnchor__", mi = 6,
|
|
4379
|
+
const rA = "__TestSelectionRange__", sA = "__TestSelectionAnchor__", mi = 6, Zo = 500, iA = 500, mr = 3;
|
|
4380
4380
|
function Jn(n) {
|
|
4381
4381
|
const e = n[0], t = e[0], o = e[2], { x: r, y: s } = t, { x: i, y: a } = o;
|
|
4382
4382
|
return {
|
|
@@ -4415,11 +4415,11 @@ class Zt {
|
|
|
4415
4415
|
_anchorBlink() {
|
|
4416
4416
|
setTimeout(() => {
|
|
4417
4417
|
this._anchorShape && this._anchorShape.visible && this.deactivateStatic();
|
|
4418
|
-
},
|
|
4418
|
+
}, Zo), this._anchorBlinkTimer = setInterval(() => {
|
|
4419
4419
|
this._anchorShape && this._anchorShape.visible && (this.activeStatic(), setTimeout(() => {
|
|
4420
4420
|
this.deactivateStatic();
|
|
4421
|
-
},
|
|
4422
|
-
}, iA +
|
|
4421
|
+
}, Zo));
|
|
4422
|
+
}, iA + Zo);
|
|
4423
4423
|
}
|
|
4424
4424
|
// The start position of the range
|
|
4425
4425
|
get startOffset() {
|
|
@@ -4568,7 +4568,7 @@ class Zt {
|
|
|
4568
4568
|
this._rangeShape.translate(t, o), this._rangeShape.updatePointGroup(e), this._rangeShape.show();
|
|
4569
4569
|
return;
|
|
4570
4570
|
}
|
|
4571
|
-
const r = 0.3, s = new
|
|
4571
|
+
const r = 0.3, s = new ta(rA + ge(mi), {
|
|
4572
4572
|
pointsGroup: e,
|
|
4573
4573
|
fill: ((i = this.style) == null ? void 0 : i.fill) || fn(gn.black, r),
|
|
4574
4574
|
left: t,
|
|
@@ -4586,7 +4586,7 @@ class Zt {
|
|
|
4586
4586
|
c < d && (a -= d - c, c = d);
|
|
4587
4587
|
const l = 12;
|
|
4588
4588
|
let A = i + t;
|
|
4589
|
-
const h = a + o, u = ((f = r == null ? void 0 : r.ts) == null ? void 0 : f.it) ===
|
|
4589
|
+
const h = a + o, u = ((f = r == null ? void 0 : r.ts) == null ? void 0 : f.it) === z.TRUE;
|
|
4590
4590
|
if (u && (A += c * Math.tan(l * Math.PI / 180) / 2), this._anchorShape) {
|
|
4591
4591
|
this._anchorShape.transformByState({ left: A, top: h, height: c }), this._anchorShape.show(), u ? this._anchorShape.skew(-l, 0) : this._anchorShape.skew(0, 0);
|
|
4592
4592
|
return;
|
|
@@ -4606,7 +4606,7 @@ class Zt {
|
|
|
4606
4606
|
}
|
|
4607
4607
|
}
|
|
4608
4608
|
const aA = "__DocTableRectRange__", cA = 6;
|
|
4609
|
-
function
|
|
4609
|
+
function Jo(n, e, t, o, r, s = Sn, i = "", a = -1) {
|
|
4610
4610
|
const c = e.getOffsetConfig(), l = new Va(c, t).getNodePositionGroup(o, r);
|
|
4611
4611
|
return (l != null ? l : []).map((A) => new Wa(
|
|
4612
4612
|
n,
|
|
@@ -4691,15 +4691,15 @@ class Wa {
|
|
|
4691
4691
|
}
|
|
4692
4692
|
get startNodePosition() {
|
|
4693
4693
|
const { anchorNodePosition: e, focusNodePosition: t } = this;
|
|
4694
|
-
return
|
|
4694
|
+
return Xo(e, t) ? e : t;
|
|
4695
4695
|
}
|
|
4696
4696
|
get endNodePosition() {
|
|
4697
4697
|
const { anchorNodePosition: e, focusNodePosition: t } = this;
|
|
4698
|
-
return
|
|
4698
|
+
return Xo(e, t) ? t : e;
|
|
4699
4699
|
}
|
|
4700
4700
|
get direction() {
|
|
4701
4701
|
const { anchorNodePosition: e, focusNodePosition: t } = this;
|
|
4702
|
-
return
|
|
4702
|
+
return Xo(e, t) ? De.FORWARD : De.BACKWARD;
|
|
4703
4703
|
}
|
|
4704
4704
|
isActive() {
|
|
4705
4705
|
return this._current === !0;
|
|
@@ -4746,7 +4746,7 @@ class Wa {
|
|
|
4746
4746
|
this._rangeShape.translate(t, o), this._rangeShape.updatePointGroup(e), this._rangeShape.show();
|
|
4747
4747
|
return;
|
|
4748
4748
|
}
|
|
4749
|
-
const r = 0.3, s = new
|
|
4749
|
+
const r = 0.3, s = new ta(aA + ge(cA), {
|
|
4750
4750
|
pointsGroup: e,
|
|
4751
4751
|
fill: ((i = this.style) == null ? void 0 : i.fill) || fn(gn.black, r),
|
|
4752
4752
|
left: t,
|
|
@@ -4790,7 +4790,7 @@ function Er(n, e, t, o, r, s, i, a) {
|
|
|
4790
4790
|
rectRanges: d
|
|
4791
4791
|
};
|
|
4792
4792
|
{
|
|
4793
|
-
const S =
|
|
4793
|
+
const S = Jo(
|
|
4794
4794
|
...l
|
|
4795
4795
|
);
|
|
4796
4796
|
return d.push(...S), {
|
|
@@ -4800,7 +4800,7 @@ function Er(n, e, t, o, r, s, i, a) {
|
|
|
4800
4800
|
}
|
|
4801
4801
|
}
|
|
4802
4802
|
if (nA(n, e)) {
|
|
4803
|
-
const S =
|
|
4803
|
+
const S = Jo(
|
|
4804
4804
|
...l
|
|
4805
4805
|
);
|
|
4806
4806
|
return d.push(...S), {
|
|
@@ -4834,7 +4834,7 @@ function Er(n, e, t, o, r, s, i, a) {
|
|
|
4834
4834
|
}
|
|
4835
4835
|
if (w && N) {
|
|
4836
4836
|
const U = g === De.FORWARD ? w : N, H = g === De.FORWARD ? N : w;
|
|
4837
|
-
d.push(
|
|
4837
|
+
d.push(...Jo(
|
|
4838
4838
|
t,
|
|
4839
4839
|
o,
|
|
4840
4840
|
r,
|
|
@@ -4951,7 +4951,7 @@ let Re = class extends Ct {
|
|
|
4951
4951
|
O(this, "onSelectionStart$", this._onSelectionStart$.asObservable());
|
|
4952
4952
|
O(this, "onChangeByEvent$", ha(
|
|
4953
4953
|
this._onInput$,
|
|
4954
|
-
this._onKeydown$.pipe(
|
|
4954
|
+
this._onKeydown$.pipe(oo((e) => e.event.keyCode === q.BACKSPACE)),
|
|
4955
4955
|
this._onCompositionend$
|
|
4956
4956
|
));
|
|
4957
4957
|
O(this, "_onPaste$", new be());
|
|
@@ -5342,7 +5342,7 @@ let Re = class extends Ct {
|
|
|
5342
5342
|
if (i == null)
|
|
5343
5343
|
return;
|
|
5344
5344
|
let c = o < 0.5;
|
|
5345
|
-
return t.glyphType ===
|
|
5345
|
+
return t.glyphType === ea.LIST && (c = !0), {
|
|
5346
5346
|
...i,
|
|
5347
5347
|
isBack: c
|
|
5348
5348
|
};
|
|
@@ -5531,13 +5531,13 @@ let Re = class extends Ct {
|
|
|
5531
5531
|
// eslint-disable-next-line max-lines-per-function
|
|
5532
5532
|
_initInputEvents() {
|
|
5533
5533
|
this.disposeWithMe(
|
|
5534
|
-
|
|
5534
|
+
je(this._input, "keydown").subscribe((e) => {
|
|
5535
5535
|
this._isIMEInputApply || this._eventHandle(e, (t) => {
|
|
5536
5536
|
this._onKeydown$.next(t);
|
|
5537
5537
|
});
|
|
5538
5538
|
})
|
|
5539
5539
|
), this.disposeWithMe(
|
|
5540
|
-
|
|
5540
|
+
je(this._input, "input").subscribe((e) => {
|
|
5541
5541
|
if (!(e.inputType === "historyUndo" || e.inputType === "historyRedo")) {
|
|
5542
5542
|
if (this._rectRangeList.length > 0)
|
|
5543
5543
|
return e.stopPropagation(), e.preventDefault();
|
|
@@ -5547,7 +5547,7 @@ let Re = class extends Ct {
|
|
|
5547
5547
|
}
|
|
5548
5548
|
})
|
|
5549
5549
|
), this.disposeWithMe(
|
|
5550
|
-
|
|
5550
|
+
je(this._input, "compositionstart").subscribe((e) => {
|
|
5551
5551
|
if (this._rectRangeList.length > 0)
|
|
5552
5552
|
return e.stopPropagation(), e.preventDefault();
|
|
5553
5553
|
this._isIMEInputApply = !0, this._eventHandle(e, (t) => {
|
|
@@ -5555,31 +5555,31 @@ let Re = class extends Ct {
|
|
|
5555
5555
|
});
|
|
5556
5556
|
})
|
|
5557
5557
|
), this.disposeWithMe(
|
|
5558
|
-
|
|
5558
|
+
je(this._input, "compositionend").subscribe((e) => {
|
|
5559
5559
|
this._isIMEInputApply = !1, this._eventHandle(e, (t) => {
|
|
5560
5560
|
this._onCompositionend$.next(t);
|
|
5561
5561
|
});
|
|
5562
5562
|
})
|
|
5563
5563
|
), this.disposeWithMe(
|
|
5564
|
-
|
|
5564
|
+
je(this._input, "compositionupdate").subscribe((e) => {
|
|
5565
5565
|
this._eventHandle(e, (t) => {
|
|
5566
5566
|
this._onInputBefore$.next(t), this._onCompositionupdate$.next(t);
|
|
5567
5567
|
});
|
|
5568
5568
|
})
|
|
5569
5569
|
), this.disposeWithMe(
|
|
5570
|
-
|
|
5570
|
+
je(this._input, "paste").subscribe((e) => {
|
|
5571
5571
|
this._eventHandle(e, (t) => {
|
|
5572
5572
|
this._onPaste$.next(t);
|
|
5573
5573
|
});
|
|
5574
5574
|
})
|
|
5575
5575
|
), this.disposeWithMe(
|
|
5576
|
-
|
|
5576
|
+
je(this._input, "focus").subscribe((e) => {
|
|
5577
5577
|
this._eventHandle(e, (t) => {
|
|
5578
5578
|
this._onFocus$.next(t);
|
|
5579
5579
|
});
|
|
5580
5580
|
})
|
|
5581
5581
|
), this.disposeWithMe(
|
|
5582
|
-
|
|
5582
|
+
je(this._input, "blur").subscribe((e) => {
|
|
5583
5583
|
this._eventHandle(e, (t) => {
|
|
5584
5584
|
this._onBlur$.next(t);
|
|
5585
5585
|
});
|
|
@@ -5627,12 +5627,12 @@ let Re = class extends Ct {
|
|
|
5627
5627
|
}
|
|
5628
5628
|
};
|
|
5629
5629
|
Re = gA([
|
|
5630
|
-
Vn(1,
|
|
5630
|
+
Vn(1, Oo),
|
|
5631
5631
|
Vn(2, Qr),
|
|
5632
5632
|
Vn(3, L),
|
|
5633
|
-
Vn(4,
|
|
5633
|
+
Vn(4, j(de))
|
|
5634
5634
|
], Re);
|
|
5635
|
-
const
|
|
5635
|
+
const ko = {
|
|
5636
5636
|
id: "doc.command.switch-mode",
|
|
5637
5637
|
type: D.COMMAND,
|
|
5638
5638
|
// eslint-disable-next-line max-lines-per-function, complexity
|
|
@@ -5681,7 +5681,7 @@ const Vo = {
|
|
|
5681
5681
|
}
|
|
5682
5682
|
return u.params.actions = f.reduce((b, x) => W.compose(b, x), null), !!e.syncExecuteCommand(u.id, u.params);
|
|
5683
5683
|
}
|
|
5684
|
-
}, fA = "doc.command.create-table",
|
|
5684
|
+
}, fA = "doc.command.create-table", ja = {
|
|
5685
5685
|
id: fA,
|
|
5686
5686
|
type: D.COMMAND,
|
|
5687
5687
|
// eslint-disable-next-line max-lines-per-function
|
|
@@ -5722,7 +5722,7 @@ const Vo = {
|
|
|
5722
5722
|
},
|
|
5723
5723
|
len: 1
|
|
5724
5724
|
});
|
|
5725
|
-
const B = a.getDefaultStyle(), y = a.getStyleCache(), M =
|
|
5725
|
+
const B = a.getDefaultStyle(), y = a.getStyleCache(), M = Bo(
|
|
5726
5726
|
h,
|
|
5727
5727
|
p,
|
|
5728
5728
|
B,
|
|
@@ -5903,11 +5903,11 @@ const Vo = {
|
|
|
5903
5903
|
}, vs = "doc.command.table-insert-row", Cs = "doc.command.table-insert-column", pA = "doc.command.table-insert-row-above", mA = "doc.command.table-insert-row-bellow", EA = "doc.command.table-insert-column-left", IA = "doc.command.table-insert-column-right", Rs = {
|
|
5904
5904
|
id: pA,
|
|
5905
5905
|
type: D.COMMAND,
|
|
5906
|
-
handler: async (n) => n.get(T).executeCommand(vs, { position:
|
|
5906
|
+
handler: async (n) => n.get(T).executeCommand(vs, { position: _o.ABOVE })
|
|
5907
5907
|
}, bs = {
|
|
5908
5908
|
id: mA,
|
|
5909
5909
|
type: D.COMMAND,
|
|
5910
|
-
handler: async (n) => n.get(T).executeCommand(vs, { position:
|
|
5910
|
+
handler: async (n) => n.get(T).executeCommand(vs, { position: _o.BELLOW })
|
|
5911
5911
|
}, xs = {
|
|
5912
5912
|
id: EA,
|
|
5913
5913
|
type: D.COMMAND,
|
|
@@ -5916,7 +5916,7 @@ const Vo = {
|
|
|
5916
5916
|
id: IA,
|
|
5917
5917
|
type: D.COMMAND,
|
|
5918
5918
|
handler: async (n) => n.get(T).executeCommand(Cs, { position: Yr.RIGHT })
|
|
5919
|
-
},
|
|
5919
|
+
}, za = {
|
|
5920
5920
|
id: vs,
|
|
5921
5921
|
type: D.COMMAND,
|
|
5922
5922
|
// eslint-disable-next-line max-lines-per-function
|
|
@@ -6035,22 +6035,22 @@ const Vo = {
|
|
|
6035
6035
|
}];
|
|
6036
6036
|
return o.replaceDocRanges(m), !0;
|
|
6037
6037
|
}
|
|
6038
|
-
return t === !1 ? await s.executeCommand(
|
|
6039
|
-
position:
|
|
6038
|
+
return t === !1 ? await s.executeCommand(za.id, {
|
|
6039
|
+
position: _o.BELLOW
|
|
6040
6040
|
}) : !0;
|
|
6041
6041
|
}
|
|
6042
|
-
}, Ya = "COMPONENT_DOC_CREATE_TABLE_CONFIRM",
|
|
6042
|
+
}, Ya = "COMPONENT_DOC_CREATE_TABLE_CONFIRM", $o = "doc.component.create-table-confirm", Os = {
|
|
6043
6043
|
id: "doc.operation.create-table",
|
|
6044
6044
|
type: D.COMMAND,
|
|
6045
6045
|
handler: async (n) => {
|
|
6046
|
-
const e = n.get(Ye), t = n.get(
|
|
6046
|
+
const e = n.get(Ye), t = n.get(ca), o = n.get(T), r = {
|
|
6047
6047
|
rowCount: 3,
|
|
6048
6048
|
colCount: 5
|
|
6049
6049
|
}, s = (i, a) => {
|
|
6050
6050
|
r.rowCount = i, r.colCount = a;
|
|
6051
6051
|
};
|
|
6052
6052
|
return await t.open({
|
|
6053
|
-
id:
|
|
6053
|
+
id: $o,
|
|
6054
6054
|
children: {
|
|
6055
6055
|
label: {
|
|
6056
6056
|
name: Ya,
|
|
@@ -6063,10 +6063,10 @@ const Vo = {
|
|
|
6063
6063
|
width: "auto",
|
|
6064
6064
|
title: { title: e.t("toolbar.table.insert") },
|
|
6065
6065
|
onConfirm: () => {
|
|
6066
|
-
o.executeCommand(
|
|
6066
|
+
o.executeCommand(ja.id, r), t.close($o);
|
|
6067
6067
|
},
|
|
6068
6068
|
onClose: () => {
|
|
6069
|
-
t.close(
|
|
6069
|
+
t.close($o);
|
|
6070
6070
|
}
|
|
6071
6071
|
}), !0;
|
|
6072
6072
|
}
|
|
@@ -7050,7 +7050,7 @@ let Sr = class extends me {
|
|
|
7050
7050
|
// I moved from the layout service. https://github.com/dream-num/univer-pro/issues/1708
|
|
7051
7051
|
_initUniverFocusListener() {
|
|
7052
7052
|
this.disposeWithMe(
|
|
7053
|
-
|
|
7053
|
+
je(window, "focusin").subscribe((e) => {
|
|
7054
7054
|
const t = e.target;
|
|
7055
7055
|
this._blurSheetEditor(t);
|
|
7056
7056
|
})
|
|
@@ -7141,7 +7141,7 @@ let Sr = class extends me {
|
|
|
7141
7141
|
return {
|
|
7142
7142
|
id: e,
|
|
7143
7143
|
body: {
|
|
7144
|
-
dataStream: `${
|
|
7144
|
+
dataStream: `${Xi}`,
|
|
7145
7145
|
textRuns: [],
|
|
7146
7146
|
paragraphs: [
|
|
7147
7147
|
{
|
|
@@ -7164,14 +7164,14 @@ let Sr = class extends me {
|
|
|
7164
7164
|
Sr = VA([
|
|
7165
7165
|
Ot(0, L),
|
|
7166
7166
|
Ot(1, pe),
|
|
7167
|
-
Ot(2,
|
|
7167
|
+
Ot(2, j(Y)),
|
|
7168
7168
|
Ot(3, Fr),
|
|
7169
7169
|
Ot(4, T),
|
|
7170
|
-
Ot(5,
|
|
7171
|
-
Ot(6,
|
|
7170
|
+
Ot(5, xo),
|
|
7171
|
+
Ot(6, j(Dn))
|
|
7172
7172
|
], Sr);
|
|
7173
7173
|
const Ge = Ki("univer.editor.service"), vr = "COMPONENT_DOC_HEADER_FOOTER_PANEL";
|
|
7174
|
-
function
|
|
7174
|
+
function jA(n, e, t) {
|
|
7175
7175
|
const {
|
|
7176
7176
|
useFirstPageHeaderFooter: o,
|
|
7177
7177
|
evenAndOddHeaders: r,
|
|
@@ -7182,14 +7182,14 @@ function zA(n, e, t) {
|
|
|
7182
7182
|
evenPageHeaderId: d,
|
|
7183
7183
|
evenPageFooterId: l
|
|
7184
7184
|
} = n;
|
|
7185
|
-
return e === ve.HEADER ? o ===
|
|
7185
|
+
return e === ve.HEADER ? o === z.TRUE ? t === 0 ? a : r === z.TRUE && t % 2 === 1 ? d : s : r === z.TRUE && t % 2 === 1 ? d : s : o === z.TRUE ? t === 0 ? c : r === z.TRUE && t % 2 === 1 ? l : i : r === z.TRUE && t % 2 === 1 ? l : i;
|
|
7186
7186
|
}
|
|
7187
|
-
const
|
|
7188
|
-
const e = J(Ye), t = J(L), o = J(pe), r = J(T), s = J(
|
|
7187
|
+
const zA = (n) => {
|
|
7188
|
+
const e = J(Ye), t = J(L), o = J(pe), r = J(T), s = J(Oo), { unitId: i } = n, a = o.getRenderById(i).with(Re), [c, d] = Ee({}), l = (u, g) => {
|
|
7189
7189
|
var b;
|
|
7190
7190
|
d((x) => ({
|
|
7191
7191
|
...x,
|
|
7192
|
-
[g]: u ?
|
|
7192
|
+
[g]: u ? z.TRUE : z.FALSE
|
|
7193
7193
|
}));
|
|
7194
7194
|
const f = t.getUniverDocInstance(i), p = f == null ? void 0 : f.getSnapshot().documentStyle, m = (b = o.getRenderById(i)) == null ? void 0 : b.with(de), I = m == null ? void 0 : m.getViewModel();
|
|
7195
7195
|
if (p == null || I == null)
|
|
@@ -7204,14 +7204,14 @@ const jA = (n) => {
|
|
|
7204
7204
|
unitId: i,
|
|
7205
7205
|
segmentId: C,
|
|
7206
7206
|
headerFooterProps: {
|
|
7207
|
-
[g]: u ?
|
|
7207
|
+
[g]: u ? z.TRUE : z.FALSE
|
|
7208
7208
|
}
|
|
7209
7209
|
});
|
|
7210
7210
|
} else {
|
|
7211
|
-
const x = a.getSegmentPage(), C = a.getSegment(), B =
|
|
7211
|
+
const x = a.getSegmentPage(), C = a.getSegment(), B = jA(
|
|
7212
7212
|
{
|
|
7213
7213
|
...p,
|
|
7214
|
-
[g]: u ?
|
|
7214
|
+
[g]: u ? z.TRUE : z.FALSE
|
|
7215
7215
|
},
|
|
7216
7216
|
S,
|
|
7217
7217
|
x
|
|
@@ -7219,7 +7219,7 @@ const jA = (n) => {
|
|
|
7219
7219
|
B && B !== C && a.setSegment(B), r.executeCommand($n, {
|
|
7220
7220
|
unitId: i,
|
|
7221
7221
|
headerFooterProps: {
|
|
7222
|
-
[g]: u ?
|
|
7222
|
+
[g]: u ? z.TRUE : z.FALSE
|
|
7223
7223
|
}
|
|
7224
7224
|
});
|
|
7225
7225
|
}
|
|
@@ -7245,8 +7245,8 @@ const jA = (n) => {
|
|
|
7245
7245
|
const {
|
|
7246
7246
|
marginHeader: f = 0,
|
|
7247
7247
|
marginFooter: p = 0,
|
|
7248
|
-
useFirstPageHeaderFooter: m =
|
|
7249
|
-
evenAndOddHeaders: I =
|
|
7248
|
+
useFirstPageHeaderFooter: m = z.FALSE,
|
|
7249
|
+
evenAndOddHeaders: I = z.FALSE
|
|
7250
7250
|
} = g;
|
|
7251
7251
|
d({
|
|
7252
7252
|
marginHeader: f,
|
|
@@ -7260,7 +7260,7 @@ const jA = (n) => {
|
|
|
7260
7260
|
/* @__PURE__ */ Q("div", { children: /* @__PURE__ */ Q(
|
|
7261
7261
|
Zs,
|
|
7262
7262
|
{
|
|
7263
|
-
checked: c.useFirstPageHeaderFooter ===
|
|
7263
|
+
checked: c.useFirstPageHeaderFooter === z.TRUE,
|
|
7264
7264
|
onChange: (u) => {
|
|
7265
7265
|
l(u, "useFirstPageHeaderFooter");
|
|
7266
7266
|
},
|
|
@@ -7270,7 +7270,7 @@ const jA = (n) => {
|
|
|
7270
7270
|
/* @__PURE__ */ Q("div", { children: /* @__PURE__ */ Q(
|
|
7271
7271
|
Zs,
|
|
7272
7272
|
{
|
|
7273
|
-
checked: c.evenAndOddHeaders ===
|
|
7273
|
+
checked: c.evenAndOddHeaders === z.TRUE,
|
|
7274
7274
|
onChange: (u) => {
|
|
7275
7275
|
l(u, "evenAndOddHeaders");
|
|
7276
7276
|
},
|
|
@@ -7326,15 +7326,15 @@ const jA = (n) => {
|
|
|
7326
7326
|
return () => {
|
|
7327
7327
|
A.unsubscribe();
|
|
7328
7328
|
};
|
|
7329
|
-
}, []), /* @__PURE__ */ Q("div", { className: "univer-text-sm", children: a ? /* @__PURE__ */ Q(
|
|
7330
|
-
}, Si = 18, vi = 200,
|
|
7329
|
+
}, []), /* @__PURE__ */ Q("div", { className: "univer-text-sm", children: a ? /* @__PURE__ */ Q(zA, { unitId: r }) : /* @__PURE__ */ Q("div", { className: "univer-text-gray-400", children: n.t("headerFooter.disableText") }) });
|
|
7330
|
+
}, Si = 18, vi = 200, er = 6, YA = 4;
|
|
7331
7331
|
function KA(n, e) {
|
|
7332
7332
|
let { radius: t, width: o, height: r } = e;
|
|
7333
7333
|
t = t != null ? t : 0, o = o != null ? o : 30, r = r != null ? r : 30;
|
|
7334
7334
|
let s = 0;
|
|
7335
7335
|
s = Math.min(t, o / 2, r / 2), n.beginPath(), n.moveTo(0, 0), n.lineTo(o, 0), n.lineTo(o, r - s), n.arc(o - s, r - s, s, 0, Math.PI / 2, !1), n.lineTo(0, r), n.lineTo(0, 0), n.closePath(), e.fill && (n.save(), n.fillStyle = e.fill, e.fillRule === "evenodd" ? n.fill("evenodd") : n.fill(), n.restore());
|
|
7336
7336
|
}
|
|
7337
|
-
class
|
|
7337
|
+
class ao extends ul {
|
|
7338
7338
|
constructor(t, o) {
|
|
7339
7339
|
super(t, o);
|
|
7340
7340
|
O(this, "color");
|
|
@@ -7345,7 +7345,7 @@ class co extends ul {
|
|
|
7345
7345
|
const { text: r, color: s } = o;
|
|
7346
7346
|
t.save(), t.font = "13px Source Han Sans CN";
|
|
7347
7347
|
const i = t.measureText(r).width, a = Math.min(
|
|
7348
|
-
i + 2 *
|
|
7348
|
+
i + 2 * er,
|
|
7349
7349
|
vi
|
|
7350
7350
|
);
|
|
7351
7351
|
KA(t, {
|
|
@@ -7354,7 +7354,7 @@ class co extends ul {
|
|
|
7354
7354
|
radius: 4,
|
|
7355
7355
|
fill: s
|
|
7356
7356
|
}), t.fillStyle = "rgba(58, 96, 247, 1)";
|
|
7357
|
-
const c =
|
|
7357
|
+
const c = er, d = Si - YA, l = vi - 2 * er;
|
|
7358
7358
|
if (i > l) {
|
|
7359
7359
|
let A = "", h = 0;
|
|
7360
7360
|
for (const u of r) {
|
|
@@ -7372,7 +7372,7 @@ class co extends ul {
|
|
|
7372
7372
|
t.restore();
|
|
7373
7373
|
}
|
|
7374
7374
|
_draw(t) {
|
|
7375
|
-
|
|
7375
|
+
ao.drawWith(t, this);
|
|
7376
7376
|
}
|
|
7377
7377
|
}
|
|
7378
7378
|
var qA = Object.getOwnPropertyDescriptor, XA = (n, e, t, o) => {
|
|
@@ -7400,10 +7400,10 @@ function ZA(n, e, t) {
|
|
|
7400
7400
|
headerFooterId: null
|
|
7401
7401
|
};
|
|
7402
7402
|
case ve.HEADER:
|
|
7403
|
-
return A ===
|
|
7403
|
+
return A === z.TRUE && !c ? {
|
|
7404
7404
|
createType: 0,
|
|
7405
7405
|
headerFooterId: null
|
|
7406
|
-
} : l ===
|
|
7406
|
+
} : l === z.TRUE && t % 2 === 0 && !i ? {
|
|
7407
7407
|
createType: 4,
|
|
7408
7408
|
headerFooterId: null
|
|
7409
7409
|
} : r ? {
|
|
@@ -7414,10 +7414,10 @@ function ZA(n, e, t) {
|
|
|
7414
7414
|
headerFooterId: null
|
|
7415
7415
|
};
|
|
7416
7416
|
case ve.FOOTER:
|
|
7417
|
-
return A ===
|
|
7417
|
+
return A === z.TRUE && !d ? {
|
|
7418
7418
|
createType: 1,
|
|
7419
7419
|
headerFooterId: null
|
|
7420
|
-
} : l ===
|
|
7420
|
+
} : l === z.TRUE && t % 2 === 0 && !a ? {
|
|
7421
7421
|
createType: 5,
|
|
7422
7422
|
headerFooterId: null
|
|
7423
7423
|
} : s ? {
|
|
@@ -7562,10 +7562,10 @@ let Cr = class extends me {
|
|
|
7562
7562
|
strokeWidth: 1,
|
|
7563
7563
|
stroke: Ci
|
|
7564
7564
|
};
|
|
7565
|
-
|
|
7565
|
+
zs.drawWith(g, S), zs.drawWith(g, v), g.translate(0, m + 1), ao.drawWith(g, {
|
|
7566
7566
|
text: e.t("headerFooter.header"),
|
|
7567
7567
|
color: Ri
|
|
7568
|
-
}), g.translate(0, p - m - I),
|
|
7568
|
+
}), g.translate(0, p - m - I), ao.drawWith(g, {
|
|
7569
7569
|
text: e.t("headerFooter.footer"),
|
|
7570
7570
|
color: Ri
|
|
7571
7571
|
});
|
|
@@ -7590,10 +7590,10 @@ Cr = XA([
|
|
|
7590
7590
|
ut(2, Ge),
|
|
7591
7591
|
ut(3, L),
|
|
7592
7592
|
ut(4, pe),
|
|
7593
|
-
ut(5,
|
|
7594
|
-
ut(6,
|
|
7595
|
-
ut(7,
|
|
7596
|
-
ut(8,
|
|
7593
|
+
ut(5, j(de)),
|
|
7594
|
+
ut(6, j(Re)),
|
|
7595
|
+
ut(7, j(Ye)),
|
|
7596
|
+
ut(8, j(rn))
|
|
7597
7597
|
], Cr);
|
|
7598
7598
|
const Ts = {
|
|
7599
7599
|
id: "sidebar.operation.doc-header-footer-panel",
|
|
@@ -7648,7 +7648,7 @@ function bi() {
|
|
|
7648
7648
|
]
|
|
7649
7649
|
};
|
|
7650
7650
|
}
|
|
7651
|
-
function
|
|
7651
|
+
function tr(n, e, t, o) {
|
|
7652
7652
|
const r = W.getInstance(), s = 6, i = n != null ? n : ge(s), a = e === Qe.DEFAULT_HEADER || e === Qe.FIRST_PAGE_HEADER || e === Qe.EVEN_PAGE_HEADER, c = r.insertOp([a ? "headers" : "footers", i], {
|
|
7653
7653
|
[a ? "headerId" : "footerId"]: i,
|
|
7654
7654
|
body: bi()
|
|
@@ -7716,17 +7716,17 @@ const $n = "doc.command.core-header-footer", Ac = {
|
|
|
7716
7716
|
};
|
|
7717
7717
|
g && (p.params.noNeedSetTextRange = !0);
|
|
7718
7718
|
const m = W.getInstance(), I = [];
|
|
7719
|
-
return a != null &&
|
|
7719
|
+
return a != null && tr(i, a, u, I), c != null && Object.keys(c).forEach((R) => {
|
|
7720
7720
|
const E = c[R], b = u[R];
|
|
7721
7721
|
if (E === b)
|
|
7722
7722
|
return;
|
|
7723
7723
|
let x;
|
|
7724
|
-
if (b === void 0 ? x = m.insertOp(["documentStyle", R], E) : x = m.replaceOp(["documentStyle", R], b, E), I.push(x), R === "useFirstPageHeaderFooter" && E ===
|
|
7724
|
+
if (b === void 0 ? x = m.insertOp(["documentStyle", R], E) : x = m.replaceOp(["documentStyle", R], b, E), I.push(x), R === "useFirstPageHeaderFooter" && E === z.TRUE && !u.firstPageHeaderId) {
|
|
7725
7725
|
const C = h === ve.HEADER ? Qe.FIRST_PAGE_HEADER : Qe.FIRST_PAGE_FOOTER;
|
|
7726
|
-
|
|
7727
|
-
} else if (R === "evenAndOddHeaders" && E ===
|
|
7726
|
+
tr(i, C, u, I);
|
|
7727
|
+
} else if (R === "evenAndOddHeaders" && E === z.TRUE && !u.evenPageHeaderId) {
|
|
7728
7728
|
const C = h === ve.HEADER ? Qe.EVEN_PAGE_HEADER : Qe.EVEN_PAGE_FOOTER;
|
|
7729
|
-
|
|
7729
|
+
tr(i, C, u, I);
|
|
7730
7730
|
}
|
|
7731
7731
|
}), I.length === 0 ? !1 : (p.params.actions = I.reduce((R, E) => W.compose(R, E), null), !!t.syncExecuteCommand(p.id, p.params));
|
|
7732
7732
|
}
|
|
@@ -7761,7 +7761,7 @@ const $n = "doc.command.core-header-footer", Ac = {
|
|
|
7761
7761
|
return /* @__PURE__ */ Q("div", { className: "univer-grid univer-grid-cols-3 univer-gap-2 univer-p-1.5", children: o.map((r) => /* @__PURE__ */ Q(
|
|
7762
7762
|
"a",
|
|
7763
7763
|
{
|
|
7764
|
-
className:
|
|
7764
|
+
className: ze("univer-block univer-h-20 univer-w-[72px] univer-cursor-pointer univer-overflow-hidden univer-rounded univer-transition-all hover:univer-border-primary-500", Nn, {
|
|
7765
7765
|
"univer-border-primary-500": e === r.value
|
|
7766
7766
|
}),
|
|
7767
7767
|
onClick: () => {
|
|
@@ -7841,27 +7841,23 @@ const $n = "doc.command.core-header-footer", Ac = {
|
|
|
7841
7841
|
options: eu
|
|
7842
7842
|
}
|
|
7843
7843
|
), gc = `${uc}_ORDER_LIST_TYPE_COMPONENT`, fc = `${uc}_BULLET_LIST_TYPE_COMPONENT`, nu = (n) => {
|
|
7844
|
-
const t = Object.keys(
|
|
7845
|
-
const { width: r, height: s } =
|
|
7844
|
+
const t = Object.keys(ar).find((o) => {
|
|
7845
|
+
const { width: r, height: s } = ar[o];
|
|
7846
7846
|
return n.width === r && n.height === s;
|
|
7847
7847
|
});
|
|
7848
7848
|
return t != null ? t : "A4";
|
|
7849
7849
|
};
|
|
7850
7850
|
function ou(n) {
|
|
7851
7851
|
const { hooks: e } = n, r = J(L).getCurrentUnitOfType(_.UNIVER_DOC).getDocumentStyle(), s = J(Ye), [i, a] = Ee(() => {
|
|
7852
|
-
var l, A, h, u, g
|
|
7852
|
+
var l, A, h, u, g;
|
|
7853
7853
|
return {
|
|
7854
7854
|
paperSize: nu(r.pageSize),
|
|
7855
|
-
|
|
7856
|
-
width: (A = (l = r.pageSize) == null ? void 0 : l.width) != null ? A : 0,
|
|
7857
|
-
height: (u = (h = r.pageSize) == null ? void 0 : h.height) != null ? u : 0
|
|
7858
|
-
},
|
|
7859
|
-
orientation: (g = r.pageOrient) != null ? g : Wc.PORTRAIT,
|
|
7855
|
+
orientation: (l = r.pageOrient) != null ? l : Wc.PORTRAIT,
|
|
7860
7856
|
margins: {
|
|
7861
|
-
top: (
|
|
7862
|
-
bottom: (
|
|
7863
|
-
left: (
|
|
7864
|
-
right: (
|
|
7857
|
+
top: (A = r.marginTop) != null ? A : 0,
|
|
7858
|
+
bottom: (h = r.marginBottom) != null ? h : 0,
|
|
7859
|
+
left: (u = r.marginLeft) != null ? u : 0,
|
|
7860
|
+
right: (g = r.marginRight) != null ? g : 0
|
|
7865
7861
|
}
|
|
7866
7862
|
};
|
|
7867
7863
|
});
|
|
@@ -7869,7 +7865,7 @@ function ou(n) {
|
|
|
7869
7865
|
e.beforeClose = () => i, e.beforeConfirm = () => i;
|
|
7870
7866
|
}, [i]);
|
|
7871
7867
|
const c = (l) => {
|
|
7872
|
-
a((A) => ({ ...A, paperSize: l
|
|
7868
|
+
a((A) => ({ ...A, paperSize: l }));
|
|
7873
7869
|
}, d = (l, A) => {
|
|
7874
7870
|
a((h) => ({
|
|
7875
7871
|
...h,
|
|
@@ -7893,7 +7889,7 @@ function ou(n) {
|
|
|
7893
7889
|
{
|
|
7894
7890
|
value: i.paperSize,
|
|
7895
7891
|
onChange: c,
|
|
7896
|
-
options:
|
|
7892
|
+
options: jc.map((l) => ({
|
|
7897
7893
|
label: s.t(`page-settings.page-size.${l.toLocaleLowerCase()}`),
|
|
7898
7894
|
value: l
|
|
7899
7895
|
}))
|
|
@@ -7915,8 +7911,6 @@ function ou(n) {
|
|
|
7915
7911
|
/* @__PURE__ */ Q(
|
|
7916
7912
|
it,
|
|
7917
7913
|
{
|
|
7918
|
-
precision: 2,
|
|
7919
|
-
max: i.pageSise.height / 2,
|
|
7920
7914
|
value: i.margins.top,
|
|
7921
7915
|
onChange: (l) => d("top", l)
|
|
7922
7916
|
}
|
|
@@ -7927,8 +7921,6 @@ function ou(n) {
|
|
|
7927
7921
|
/* @__PURE__ */ Q(
|
|
7928
7922
|
it,
|
|
7929
7923
|
{
|
|
7930
|
-
precision: 2,
|
|
7931
|
-
max: i.pageSise.height / 2,
|
|
7932
7924
|
value: i.margins.bottom,
|
|
7933
7925
|
onChange: (l) => d("bottom", l)
|
|
7934
7926
|
}
|
|
@@ -7941,8 +7933,6 @@ function ou(n) {
|
|
|
7941
7933
|
/* @__PURE__ */ Q(
|
|
7942
7934
|
it,
|
|
7943
7935
|
{
|
|
7944
|
-
precision: 2,
|
|
7945
|
-
max: i.pageSise.width / 2,
|
|
7946
7936
|
value: i.margins.left,
|
|
7947
7937
|
onChange: (l) => d("left", l)
|
|
7948
7938
|
}
|
|
@@ -7953,8 +7943,6 @@ function ou(n) {
|
|
|
7953
7943
|
/* @__PURE__ */ Q(
|
|
7954
7944
|
it,
|
|
7955
7945
|
{
|
|
7956
|
-
precision: 2,
|
|
7957
|
-
max: i.pageSise.width / 2,
|
|
7958
7946
|
value: i.margins.right,
|
|
7959
7947
|
onChange: (l) => d("right", l)
|
|
7960
7948
|
}
|
|
@@ -8037,7 +8025,7 @@ const Rr = "docs.component.page-setting", pc = {
|
|
|
8037
8025
|
id: "docs.operation.open-page-setting",
|
|
8038
8026
|
type: D.OPERATION,
|
|
8039
8027
|
handler: (n) => {
|
|
8040
|
-
const e = n.get(
|
|
8028
|
+
const e = n.get(ca), t = n.get(T), o = n.get(Ye), r = e.open({
|
|
8041
8029
|
id: Rr,
|
|
8042
8030
|
title: {
|
|
8043
8031
|
label: o.t("page-settings.document-setting")
|
|
@@ -8051,7 +8039,7 @@ const Rr = "docs.component.page-setting", pc = {
|
|
|
8051
8039
|
},
|
|
8052
8040
|
onConfirm: (s) => {
|
|
8053
8041
|
if (r.dispose(), !s) return;
|
|
8054
|
-
const i =
|
|
8042
|
+
const i = ar[s.paperSize];
|
|
8055
8043
|
t.executeCommand(pc.id, {
|
|
8056
8044
|
pageOrient: s.orientation,
|
|
8057
8045
|
marginTop: s.margins.top,
|
|
@@ -8189,7 +8177,7 @@ function au(n) {
|
|
|
8189
8177
|
return;
|
|
8190
8178
|
}
|
|
8191
8179
|
const i = (a = s.ts) == null ? void 0 : a.bl;
|
|
8192
|
-
t.next(i ===
|
|
8180
|
+
t.next(i === z.TRUE);
|
|
8193
8181
|
}, r = e.onCommandExecuted((s) => {
|
|
8194
8182
|
const i = s.id;
|
|
8195
8183
|
(i === Le.id || i === xt.id) && o();
|
|
@@ -8217,7 +8205,7 @@ function cu(n) {
|
|
|
8217
8205
|
return;
|
|
8218
8206
|
}
|
|
8219
8207
|
const i = (a = s.ts) == null ? void 0 : a.it;
|
|
8220
|
-
t.next(i ===
|
|
8208
|
+
t.next(i === z.TRUE);
|
|
8221
8209
|
}, r = e.onCommandExecuted((s) => {
|
|
8222
8210
|
const i = s.id;
|
|
8223
8211
|
(i === Le.id || i === xt.id) && o();
|
|
@@ -8245,7 +8233,7 @@ function lu(n) {
|
|
|
8245
8233
|
return;
|
|
8246
8234
|
}
|
|
8247
8235
|
const i = (a = s.ts) == null ? void 0 : a.ul;
|
|
8248
|
-
t.next((i == null ? void 0 : i.s) ===
|
|
8236
|
+
t.next((i == null ? void 0 : i.s) === z.TRUE);
|
|
8249
8237
|
}, r = e.onCommandExecuted((s) => {
|
|
8250
8238
|
const i = s.id;
|
|
8251
8239
|
(i === Le.id || i === xt.id) && o();
|
|
@@ -8273,7 +8261,7 @@ function du(n) {
|
|
|
8273
8261
|
return;
|
|
8274
8262
|
}
|
|
8275
8263
|
const i = (a = s.ts) == null ? void 0 : a.st;
|
|
8276
|
-
t.next((i == null ? void 0 : i.s) ===
|
|
8264
|
+
t.next((i == null ? void 0 : i.s) === z.TRUE);
|
|
8277
8265
|
}, r = e.onCommandExecuted((s) => {
|
|
8278
8266
|
const i = s.id;
|
|
8279
8267
|
(i === Le.id || i === xt.id) && o();
|
|
@@ -8357,7 +8345,7 @@ function hu(n) {
|
|
|
8357
8345
|
}],
|
|
8358
8346
|
// disabled$: getCurrentSheetDisabled$(accessor),
|
|
8359
8347
|
value$: new fe((t) => {
|
|
8360
|
-
const o =
|
|
8348
|
+
const o = yo.ff, r = () => {
|
|
8361
8349
|
var c;
|
|
8362
8350
|
const i = ot(n);
|
|
8363
8351
|
if (i == null) {
|
|
@@ -8393,7 +8381,7 @@ function gu(n) {
|
|
|
8393
8381
|
selections: Bl,
|
|
8394
8382
|
// disabled$,
|
|
8395
8383
|
value$: new fe((t) => {
|
|
8396
|
-
const o =
|
|
8384
|
+
const o = yo.fs, r = () => {
|
|
8397
8385
|
var c;
|
|
8398
8386
|
const i = ot(n);
|
|
8399
8387
|
if (i == null) {
|
|
@@ -8469,7 +8457,7 @@ function pu(n) {
|
|
|
8469
8457
|
selectable: !1
|
|
8470
8458
|
},
|
|
8471
8459
|
value$: new fe((o) => {
|
|
8472
|
-
const r =
|
|
8460
|
+
const r = yo.cl.rgb, s = () => {
|
|
8473
8461
|
var d, l;
|
|
8474
8462
|
const a = ot(n);
|
|
8475
8463
|
if (!a) {
|
|
@@ -8531,7 +8519,7 @@ function Su(n) {
|
|
|
8531
8519
|
function vu(n) {
|
|
8532
8520
|
const e = n.get(T);
|
|
8533
8521
|
return {
|
|
8534
|
-
id:
|
|
8522
|
+
id: Qo.id,
|
|
8535
8523
|
type: Z.BUTTON,
|
|
8536
8524
|
icon: "LeftJustifyingIcon",
|
|
8537
8525
|
tooltip: "toolbar.alignLeft",
|
|
@@ -8556,7 +8544,7 @@ function vu(n) {
|
|
|
8556
8544
|
function Cu(n) {
|
|
8557
8545
|
const e = n.get(T);
|
|
8558
8546
|
return {
|
|
8559
|
-
id:
|
|
8547
|
+
id: Uo.id,
|
|
8560
8548
|
type: Z.BUTTON,
|
|
8561
8549
|
icon: "HorizontallyIcon",
|
|
8562
8550
|
tooltip: "toolbar.alignCenter",
|
|
@@ -8581,7 +8569,7 @@ function Cu(n) {
|
|
|
8581
8569
|
function Ru(n) {
|
|
8582
8570
|
const e = n.get(T);
|
|
8583
8571
|
return {
|
|
8584
|
-
id:
|
|
8572
|
+
id: Fo.id,
|
|
8585
8573
|
type: Z.BUTTON,
|
|
8586
8574
|
icon: "RightJustifyingIcon",
|
|
8587
8575
|
tooltip: "toolbar.alignRight",
|
|
@@ -8606,7 +8594,7 @@ function Ru(n) {
|
|
|
8606
8594
|
function bu(n) {
|
|
8607
8595
|
const e = n.get(T);
|
|
8608
8596
|
return {
|
|
8609
|
-
id:
|
|
8597
|
+
id: Ho.id,
|
|
8610
8598
|
type: Z.BUTTON,
|
|
8611
8599
|
icon: "AlignTextBothIcon",
|
|
8612
8600
|
tooltip: "toolbar.alignJustify",
|
|
@@ -8630,7 +8618,7 @@ function bu(n) {
|
|
|
8630
8618
|
}
|
|
8631
8619
|
function xu(n) {
|
|
8632
8620
|
return {
|
|
8633
|
-
id:
|
|
8621
|
+
id: wo.id,
|
|
8634
8622
|
type: Z.BUTTON,
|
|
8635
8623
|
icon: "ReduceIcon",
|
|
8636
8624
|
tooltip: "toolbar.horizontalLine",
|
|
@@ -8712,7 +8700,7 @@ function yi(n) {
|
|
|
8712
8700
|
}
|
|
8713
8701
|
function Oi(n) {
|
|
8714
8702
|
return {
|
|
8715
|
-
id:
|
|
8703
|
+
id: so.id,
|
|
8716
8704
|
type: Z.BUTTON,
|
|
8717
8705
|
icon: "TodoListDoubleIcon",
|
|
8718
8706
|
tooltip: "toolbar.checklist",
|
|
@@ -8724,7 +8712,7 @@ function Oi(n) {
|
|
|
8724
8712
|
function yu(n) {
|
|
8725
8713
|
const e = n.get(T), t = n.get(L);
|
|
8726
8714
|
return {
|
|
8727
|
-
id:
|
|
8715
|
+
id: ko.id,
|
|
8728
8716
|
type: Z.BUTTON,
|
|
8729
8717
|
icon: "KeyboardIcon",
|
|
8730
8718
|
tooltip: "toolbar.documentFlavor",
|
|
@@ -8765,7 +8753,7 @@ function Tu(n) {
|
|
|
8765
8753
|
selectable: !1
|
|
8766
8754
|
},
|
|
8767
8755
|
value$: new fe((o) => {
|
|
8768
|
-
const r =
|
|
8756
|
+
const r = yo.bg.rgb, s = () => {
|
|
8769
8757
|
var d, l;
|
|
8770
8758
|
const a = ot(n);
|
|
8771
8759
|
if (!a) {
|
|
@@ -8796,7 +8784,7 @@ function Tu(n) {
|
|
|
8796
8784
|
}
|
|
8797
8785
|
function ot(n) {
|
|
8798
8786
|
var g, f, p, m;
|
|
8799
|
-
const e = n.get(L), t = n.get(Y), o = n.get(at), r = e.getCurrentUnitForType(_.UNIVER_DOC), s = t.getDocRanges(), i = (g = s.find((I) => I.isActive)) != null ? g : s[0], a = o.getDefaultStyle(), c = (f = o.getStyleCache()) != null ? f : {}, d = Vt(n), l = (p = d == null ? void 0 : d.paragraphStyle) != null && p.namedStyleType ?
|
|
8787
|
+
const e = n.get(L), t = n.get(Y), o = n.get(at), r = e.getCurrentUnitForType(_.UNIVER_DOC), s = t.getDocRanges(), i = (g = s.find((I) => I.isActive)) != null ? g : s[0], a = o.getDefaultStyle(), c = (f = o.getStyleCache()) != null ? f : {}, d = Vt(n), l = (p = d == null ? void 0 : d.paragraphStyle) != null && p.namedStyleType ? zc[(m = d == null ? void 0 : d.paragraphStyle) == null ? void 0 : m.namedStyleType] : null;
|
|
8800
8788
|
if (r == null || i == null)
|
|
8801
8789
|
return {
|
|
8802
8790
|
ts: {
|
|
@@ -8856,10 +8844,10 @@ const Mu = {
|
|
|
8856
8844
|
[K.HEADING_3]: gs,
|
|
8857
8845
|
[K.HEADING_4]: fs,
|
|
8858
8846
|
[K.HEADING_5]: ps,
|
|
8859
|
-
[K.NORMAL_TEXT]:
|
|
8847
|
+
[K.NORMAL_TEXT]: io,
|
|
8860
8848
|
[K.TITLE]: Ua,
|
|
8861
8849
|
[K.SUBTITLE]: Fa,
|
|
8862
|
-
[K.NAMED_STYLE_TYPE_UNSPECIFIED]:
|
|
8850
|
+
[K.NAMED_STYLE_TYPE_UNSPECIFIED]: io
|
|
8863
8851
|
}, Ec = {
|
|
8864
8852
|
[K.HEADING_1]: { key: "H1Icon", component: ec },
|
|
8865
8853
|
[K.HEADING_2]: { key: "H2Icon", component: tc },
|
|
@@ -8935,7 +8923,7 @@ const Qu = (n) => ({
|
|
|
8935
8923
|
icon: "ReduceIcon",
|
|
8936
8924
|
title: "toolbar.horizontalLine"
|
|
8937
8925
|
}), Ic = "doc.menu.insert-bellow";
|
|
8938
|
-
function
|
|
8926
|
+
function ju(n) {
|
|
8939
8927
|
return {
|
|
8940
8928
|
id: Ic,
|
|
8941
8929
|
type: Z.SUBITEMS,
|
|
@@ -8943,8 +8931,8 @@ function zu(n) {
|
|
|
8943
8931
|
};
|
|
8944
8932
|
}
|
|
8945
8933
|
const Ti = 4;
|
|
8946
|
-
var
|
|
8947
|
-
for (var r = o > 1 ? void 0 : o ?
|
|
8934
|
+
var zu = Object.getOwnPropertyDescriptor, Gu = (n, e, t, o) => {
|
|
8935
|
+
for (var r = o > 1 ? void 0 : o ? zu(e, t) : e, s = n.length - 1, i; s >= 0; s--)
|
|
8948
8936
|
(i = n[s]) && (r = i(r) || r);
|
|
8949
8937
|
return r;
|
|
8950
8938
|
}, Wn = (n, e) => (t, o) => e(t, o, n);
|
|
@@ -8983,11 +8971,11 @@ function Mi(n, e, t) {
|
|
|
8983
8971
|
y: d
|
|
8984
8972
|
};
|
|
8985
8973
|
}
|
|
8986
|
-
const
|
|
8974
|
+
const nr = (n, e) => {
|
|
8987
8975
|
const { scene: t, mainComponent: o, engine: r } = e, s = e.with(de).getSkeleton(), i = s.findNodePositionByCharIndex(n.startOffset, !0, n.segmentId, n.segmentPage), a = n.collapsed ? n.startOffset : n.endOffset - 1, c = s.findNodePositionByCharIndex(a, !0, n.segmentId, n.segmentPage), d = o;
|
|
8988
8976
|
if (!c || !i)
|
|
8989
8977
|
return;
|
|
8990
|
-
const l = d.getOffsetConfig(), { docsLeft: A, docsTop: h } = l, u = r.getCanvasElement(), g = u.getBoundingClientRect(), f =
|
|
8978
|
+
const l = d.getOffsetConfig(), { docsLeft: A, docsTop: h } = l, u = r.getCanvasElement(), g = u.getBoundingClientRect(), f = na(u.style.width), { top: p, left: m, width: I } = g, S = I / f, { scaleX: v, scaleY: R } = t.getAncestorScale(), E = new It(l, s), { borderBoxPointGroup: b } = E.getRangePointData(i, c);
|
|
8991
8979
|
return Es(b).map((B) => Sc(B, t)).map((B) => ({
|
|
8992
8980
|
left: (B.left + A * v) * S + m,
|
|
8993
8981
|
right: (B.right + A * v) * S + m,
|
|
@@ -9001,7 +8989,7 @@ let Bn = class extends me {
|
|
|
9001
8989
|
}
|
|
9002
8990
|
_createRectPositionObserver(n, e) {
|
|
9003
8991
|
const t = () => {
|
|
9004
|
-
const { scene: a, engine: c } = e, d = typeof n == "function" ? n() : n, l = c.getCanvasElement(), A = l.getBoundingClientRect(), h =
|
|
8992
|
+
const { scene: a, engine: c } = e, d = typeof n == "function" ? n() : n, l = c.getCanvasElement(), A = l.getBoundingClientRect(), h = na(l.style.width), u = Sc(d, a), { top: g, left: f, width: p } = A, m = p / h;
|
|
9005
8993
|
return {
|
|
9006
8994
|
left: u.left * m + f,
|
|
9007
8995
|
right: u.right * m + f,
|
|
@@ -9038,16 +9026,16 @@ let Bn = class extends me {
|
|
|
9038
9026
|
}
|
|
9039
9027
|
_createRangePositionObserver(n, e) {
|
|
9040
9028
|
var i;
|
|
9041
|
-
const t = (i =
|
|
9029
|
+
const t = (i = nr(n, e)) != null ? i : [], o = new Fe(t), r = new In();
|
|
9042
9030
|
r.add(this._commandService.onCommandExecuted((a) => {
|
|
9043
9031
|
if ((a.id === tt.id || a.id === X.id) && a.params.unitId === e.unitId) {
|
|
9044
|
-
const d =
|
|
9032
|
+
const d = nr(n, e);
|
|
9045
9033
|
d && o.next(d);
|
|
9046
9034
|
}
|
|
9047
9035
|
}));
|
|
9048
9036
|
const s = e.scene.getViewport(We.VIEW_MAIN);
|
|
9049
9037
|
return s && r.add(s.onScrollAfter$.subscribeEvent(() => {
|
|
9050
|
-
const a =
|
|
9038
|
+
const a = nr(n, e);
|
|
9051
9039
|
a && o.next(a);
|
|
9052
9040
|
})), {
|
|
9053
9041
|
positions: t,
|
|
@@ -9136,7 +9124,7 @@ let Bn = class extends me {
|
|
|
9136
9124
|
// #endregion
|
|
9137
9125
|
};
|
|
9138
9126
|
Bn = Gu([
|
|
9139
|
-
Wn(0,
|
|
9127
|
+
Wn(0, j(Pl)),
|
|
9140
9128
|
Wn(1, pe),
|
|
9141
9129
|
Wn(2, L),
|
|
9142
9130
|
Wn(3, T)
|
|
@@ -9290,7 +9278,7 @@ let wt = class extends me {
|
|
|
9290
9278
|
this._customRangeDirty = !0, this._bulletDirty = !0, this._paragraphDirty = !0;
|
|
9291
9279
|
})), this.disposeWithMe(
|
|
9292
9280
|
Mt(this._context.engine.onTransformChange$).pipe(
|
|
9293
|
-
|
|
9281
|
+
oo((e) => e.type === oa.resize)
|
|
9294
9282
|
).subscribe(() => {
|
|
9295
9283
|
this._customRangeDirty = !0, this._bulletDirty = !0, this._paragraphDirty = !0;
|
|
9296
9284
|
})
|
|
@@ -9317,8 +9305,8 @@ let wt = class extends me {
|
|
|
9317
9305
|
}));
|
|
9318
9306
|
const e = Mt(this._context.mainComponent.onPointerDown$), t = Mt(this._context.scene.onPointerUp$);
|
|
9319
9307
|
this.disposeWithMe(e.pipe(
|
|
9320
|
-
Wl((o) => t.pipe(
|
|
9321
|
-
|
|
9308
|
+
Wl((o) => t.pipe(jl(1), Pn((r) => ({ down: o, up: r })))),
|
|
9309
|
+
oo(({ down: o, up: r }) => o.target === r.target && r.timeStamp - o.timeStamp < 300)
|
|
9322
9310
|
).subscribe(({ down: o }) => {
|
|
9323
9311
|
if (o.button === 2)
|
|
9324
9312
|
return;
|
|
@@ -9564,7 +9552,7 @@ let wt = class extends me {
|
|
|
9564
9552
|
}
|
|
9565
9553
|
};
|
|
9566
9554
|
wt = Ku([
|
|
9567
|
-
qu(1,
|
|
9555
|
+
qu(1, j(de))
|
|
9568
9556
|
], wt);
|
|
9569
9557
|
const Ju = [
|
|
9570
9558
|
ct.id,
|
|
@@ -9596,7 +9584,7 @@ function $u(n) {
|
|
|
9596
9584
|
}, [t]), /* @__PURE__ */ Q(
|
|
9597
9585
|
"div",
|
|
9598
9586
|
{
|
|
9599
|
-
className:
|
|
9587
|
+
className: ze("univer-box-border univer-flex univer-rounded univer-bg-white univer-py-1.5 univer-shadow-sm dark:!univer-border-gray-700 dark:!univer-bg-gray-900", Nn),
|
|
9600
9588
|
children: o.map((s) => s.item && /* @__PURE__ */ Q("div", { className: "univer-flex univer-flex-nowrap univer-gap-2 univer-px-2", children: /* @__PURE__ */ Q(wl, { ...s.item }, s.key) }, s.key))
|
|
9601
9589
|
}
|
|
9602
9590
|
);
|
|
@@ -9617,7 +9605,7 @@ const oh = [
|
|
|
9617
9605
|
V.CUSTOM_BLOCK,
|
|
9618
9606
|
V.PARAGRAPH
|
|
9619
9607
|
];
|
|
9620
|
-
let
|
|
9608
|
+
let co = class extends me {
|
|
9621
9609
|
constructor(e, t, o, r, s, i) {
|
|
9622
9610
|
super();
|
|
9623
9611
|
O(this, "_floatMenu", null);
|
|
@@ -9678,19 +9666,19 @@ let lo = class extends me {
|
|
|
9678
9666
|
}, Mn(() => this._hideFloatMenu());
|
|
9679
9667
|
}
|
|
9680
9668
|
};
|
|
9681
|
-
|
|
9682
|
-
ln(1,
|
|
9683
|
-
ln(2,
|
|
9684
|
-
ln(3,
|
|
9685
|
-
ln(4,
|
|
9686
|
-
ln(5,
|
|
9687
|
-
],
|
|
9669
|
+
co = th([
|
|
9670
|
+
ln(1, j(Y)),
|
|
9671
|
+
ln(2, j(Bn)),
|
|
9672
|
+
ln(3, j(rn)),
|
|
9673
|
+
ln(4, j(L)),
|
|
9674
|
+
ln(5, j(Re))
|
|
9675
|
+
], co);
|
|
9688
9676
|
var rh = Object.getOwnPropertyDescriptor, sh = (n, e, t, o) => {
|
|
9689
9677
|
for (var r = o > 1 ? void 0 : o ? rh(e, t) : e, s = n.length - 1, i; s >= 0; s--)
|
|
9690
9678
|
(i = n[s]) && (r = i(r) || r);
|
|
9691
9679
|
return r;
|
|
9692
9680
|
}, dn = (n, e) => (t, o) => e(t, o, n);
|
|
9693
|
-
let
|
|
9681
|
+
let lo = class extends me {
|
|
9694
9682
|
constructor(e, t, o, r, s, i) {
|
|
9695
9683
|
super();
|
|
9696
9684
|
O(this, "_paragrahMenu", null);
|
|
@@ -9752,7 +9740,7 @@ let Ao = class extends me {
|
|
|
9752
9740
|
componentKey: "doc.paragraph.menu",
|
|
9753
9741
|
direction: "left-center",
|
|
9754
9742
|
onClickOutside: () => {
|
|
9755
|
-
this._docSelectionManagerService.textSelection$.pipe(
|
|
9743
|
+
this._docSelectionManagerService.textSelection$.pipe(zl()).subscribe(() => {
|
|
9756
9744
|
this._isCursorInActiveParagraph() || this.hideParagraphMenu(!0);
|
|
9757
9745
|
});
|
|
9758
9746
|
},
|
|
@@ -9770,16 +9758,16 @@ let Ao = class extends me {
|
|
|
9770
9758
|
this._paragrahMenu && (this._paragrahMenu.disposable.canDispose() || e) && (this._paragrahMenu.disposable.dispose(), this._paragrahMenu = null);
|
|
9771
9759
|
}
|
|
9772
9760
|
};
|
|
9773
|
-
|
|
9774
|
-
dn(1,
|
|
9775
|
-
dn(2,
|
|
9776
|
-
dn(3,
|
|
9777
|
-
dn(4,
|
|
9778
|
-
dn(5,
|
|
9779
|
-
],
|
|
9761
|
+
lo = sh([
|
|
9762
|
+
dn(1, j(Y)),
|
|
9763
|
+
dn(2, j(wt)),
|
|
9764
|
+
dn(3, j(Bn)),
|
|
9765
|
+
dn(4, j(de)),
|
|
9766
|
+
dn(5, j(co))
|
|
9767
|
+
], lo);
|
|
9780
9768
|
const ih = ({ popup: n }) => {
|
|
9781
9769
|
var E, b;
|
|
9782
|
-
const [e, t] = Ee(!1), o = ke(null), r = J(T), s = J(
|
|
9770
|
+
const [e, t] = Ee(!1), o = ke(null), r = J(T), s = J(Oo), i = ke(null), a = ke(!1), c = J(pe), d = J(L), l = c.getRenderById(n.unitId), A = d.getUnit(n.unitId, _.UNIVER_DOC), h = l == null ? void 0 : l.with(lo), u = l == null ? void 0 : l.with(wt), g = et(u == null ? void 0 : u.hoverParagraph$), f = et(u == null ? void 0 : u.hoverParagraphLeft$), p = (E = g != null ? g : f) == null ? void 0 : E.startIndex, m = Te(() => {
|
|
9783
9771
|
var x, C;
|
|
9784
9772
|
return (C = (x = A == null ? void 0 : A.getBody()) == null ? void 0 : x.paragraphs) == null ? void 0 : C.find((B) => B.startIndex === p);
|
|
9785
9773
|
}, [A, g]), I = (b = m == null ? void 0 : m.paragraphStyle) == null ? void 0 : b.namedStyleType, S = Ec[I != null ? I : K.NORMAL_TEXT], v = Te(() => new Fe({
|
|
@@ -9796,7 +9784,7 @@ const ih = ({ popup: n }) => {
|
|
|
9796
9784
|
{
|
|
9797
9785
|
"data-u-comp": "paragraph-menu",
|
|
9798
9786
|
ref: i,
|
|
9799
|
-
className:
|
|
9787
|
+
className: ze("univer-mr-1 univer-inline-flex univer-h-7 univer-cursor-pointer univer-items-center univer-gap-1 univer-rounded-full univer-px-2.5 univer-py-0 hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-600", Nn, {
|
|
9800
9788
|
"univer-bg-gray-100 dark:!univer-bg-gray-700": e,
|
|
9801
9789
|
"univer-bg-white dark:!univer-bg-gray-700": !e
|
|
9802
9790
|
}),
|
|
@@ -9857,7 +9845,7 @@ const ih = ({ popup: n }) => {
|
|
|
9857
9845
|
Ql,
|
|
9858
9846
|
{
|
|
9859
9847
|
style: { width: 212 },
|
|
9860
|
-
menuType:
|
|
9848
|
+
menuType: no.PARAGRAPH,
|
|
9861
9849
|
onOptionSelect: (x) => {
|
|
9862
9850
|
const { label: C, commandId: B, value: y } = x;
|
|
9863
9851
|
r && r.executeCommand(B != null ? B : C, { value: y }), s.focus(), R();
|
|
@@ -9871,10 +9859,10 @@ const ih = ({ popup: n }) => {
|
|
|
9871
9859
|
] });
|
|
9872
9860
|
};
|
|
9873
9861
|
function Se(n) {
|
|
9874
|
-
return n.getContextValue(_n) && n.getContextValue(Hr) && !n.getContextValue(
|
|
9862
|
+
return n.getContextValue(_n) && n.getContextValue(Hr) && !n.getContextValue(Zi);
|
|
9875
9863
|
}
|
|
9876
9864
|
function ah(n) {
|
|
9877
|
-
return n.getContextValue(_n) && n.getContextValue(Hr) && !n.getContextValue(
|
|
9865
|
+
return n.getContextValue(_n) && n.getContextValue(Hr) && !n.getContextValue(Zi);
|
|
9878
9866
|
}
|
|
9879
9867
|
const ch = {
|
|
9880
9868
|
id: Jt.id,
|
|
@@ -9912,19 +9900,19 @@ const ch = {
|
|
|
9912
9900
|
binding: q.PERIOD | te.CTRL_COMMAND,
|
|
9913
9901
|
preconditions: Se
|
|
9914
9902
|
}, ph = {
|
|
9915
|
-
id:
|
|
9903
|
+
id: Qo.id,
|
|
9916
9904
|
binding: q.L | te.CTRL_COMMAND | te.SHIFT,
|
|
9917
9905
|
preconditions: Se
|
|
9918
9906
|
}, mh = {
|
|
9919
|
-
id:
|
|
9907
|
+
id: Fo.id,
|
|
9920
9908
|
binding: q.R | te.CTRL_COMMAND | te.SHIFT,
|
|
9921
9909
|
preconditions: Se
|
|
9922
9910
|
}, Eh = {
|
|
9923
|
-
id:
|
|
9911
|
+
id: Uo.id,
|
|
9924
9912
|
binding: q.E | te.CTRL_COMMAND | te.SHIFT,
|
|
9925
9913
|
preconditions: Se
|
|
9926
9914
|
}, Ih = {
|
|
9927
|
-
id:
|
|
9915
|
+
id: Ho.id,
|
|
9928
9916
|
binding: q.J | te.CTRL_COMMAND | te.SHIFT,
|
|
9929
9917
|
preconditions: Se
|
|
9930
9918
|
}, Sh = {
|
|
@@ -9935,7 +9923,7 @@ const ch = {
|
|
|
9935
9923
|
id: yn.id,
|
|
9936
9924
|
binding: q.Digit8 | te.CTRL_COMMAND | te.SHIFT,
|
|
9937
9925
|
preconditions: Se
|
|
9938
|
-
},
|
|
9926
|
+
}, Vo = "docs-ui.config", Pi = {
|
|
9939
9927
|
layout: {
|
|
9940
9928
|
docContainerConfig: rd,
|
|
9941
9929
|
toolbarConfig: od
|
|
@@ -9978,7 +9966,7 @@ function xh(n) {
|
|
|
9978
9966
|
}
|
|
9979
9967
|
function yh() {
|
|
9980
9968
|
var r, s, i;
|
|
9981
|
-
const n = J(L), e = ua(
|
|
9969
|
+
const n = J(L), e = ua(Vo), t = et(() => n.getCurrentTypeOfUnit$(_.UNIVER_SHEET), void 0, void 0, []), o = (i = (s = (r = e == null ? void 0 : e.layout) == null ? void 0 : r.docContainerConfig) == null ? void 0 : s.footer) != null ? i : !0;
|
|
9982
9970
|
return t ? null : o && /* @__PURE__ */ re(
|
|
9983
9971
|
"div",
|
|
9984
9972
|
{
|
|
@@ -10008,12 +9996,12 @@ const Oh = "univer-font-[500] univer-truncate univer-h-[24px] univer-mb-2 univer
|
|
|
10008
9996
|
}), []);
|
|
10009
9997
|
return Kl(e, () => S), Ce(() => {
|
|
10010
9998
|
c && S.scrollTo(c);
|
|
10011
|
-
}, [c, S]), /* @__PURE__ */ re("div", { className:
|
|
9999
|
+
}, [c, S]), /* @__PURE__ */ re("div", { className: ze("univer-relative", h), style: u, children: [
|
|
10012
10000
|
/* @__PURE__ */ Q(
|
|
10013
10001
|
"div",
|
|
10014
10002
|
{
|
|
10015
10003
|
onClick: () => l == null ? void 0 : l(!d),
|
|
10016
|
-
className:
|
|
10004
|
+
className: ze("univer-absolute univer-left-5 univer-top-4 univer-z-[100] univer-flex univer-h-8 univer-w-8 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-full univer-bg-white univer-text-gray-800 univer-shadow-sm dark:!univer-bg-gray-600 dark:!univer-text-gray-200", g),
|
|
10017
10005
|
style: f,
|
|
10018
10006
|
children: d ? /* @__PURE__ */ Q(ic, {}) : /* @__PURE__ */ Q(Xa, {})
|
|
10019
10007
|
}
|
|
@@ -10021,7 +10009,7 @@ const Oh = "univer-font-[500] univer-truncate univer-h-[24px] univer-mb-2 univer
|
|
|
10021
10009
|
/* @__PURE__ */ Q(
|
|
10022
10010
|
"div",
|
|
10023
10011
|
{
|
|
10024
|
-
className:
|
|
10012
|
+
className: ze(
|
|
10025
10013
|
r,
|
|
10026
10014
|
`
|
|
10027
10015
|
univer-absolute univer-left-0 univer-top-0 univer-box-border univer-flex univer-min-w-[180px]
|
|
@@ -10043,12 +10031,12 @@ const Oh = "univer-font-[500] univer-truncate univer-h-[24px] univer-mb-2 univer
|
|
|
10043
10031
|
"div",
|
|
10044
10032
|
{
|
|
10045
10033
|
ref: m,
|
|
10046
|
-
className:
|
|
10034
|
+
className: ze("univer-flex-1 univer-overflow-y-auto univer-overflow-x-hidden", $l),
|
|
10047
10035
|
children: t == null ? void 0 : t.map((v) => /* @__PURE__ */ Q(
|
|
10048
10036
|
"div",
|
|
10049
10037
|
{
|
|
10050
10038
|
id: `univer-side-menu-${v.id}`,
|
|
10051
|
-
className:
|
|
10039
|
+
className: ze(
|
|
10052
10040
|
Oh,
|
|
10053
10041
|
{
|
|
10054
10042
|
[Th]: v.isTitle,
|
|
@@ -10112,7 +10100,7 @@ function Ph(n, e, t, o) {
|
|
|
10112
10100
|
const wi = "__title";
|
|
10113
10101
|
function wh() {
|
|
10114
10102
|
var e, t, o;
|
|
10115
|
-
const n = ua(
|
|
10103
|
+
const n = ua(Vo);
|
|
10116
10104
|
return (o = (t = (e = n == null ? void 0 : n.layout) == null ? void 0 : e.docContainerConfig) == null ? void 0 : t.sideMenu) == null || o ? /* @__PURE__ */ Q(Nh, {}) : null;
|
|
10117
10105
|
}
|
|
10118
10106
|
function Nh() {
|
|
@@ -10136,7 +10124,7 @@ function Nh() {
|
|
|
10136
10124
|
const { paragraphStart: ne, paragraphEnd: ie } = k;
|
|
10137
10125
|
return {
|
|
10138
10126
|
id: U.paragraphStyle.headingId,
|
|
10139
|
-
text:
|
|
10127
|
+
text: to(r.slice(ne, ie)),
|
|
10140
10128
|
level: H,
|
|
10141
10129
|
isTitle: ((ae = U.paragraphStyle) == null ? void 0 : ae.namedStyleType) === K.TITLE
|
|
10142
10130
|
};
|
|
@@ -10319,7 +10307,7 @@ const rt = {
|
|
|
10319
10307
|
return [t, (s) => (o(s), e.executeCommand(rt.id, {
|
|
10320
10308
|
paragraph: { spaceAbove: { v: s } }
|
|
10321
10309
|
}))];
|
|
10322
|
-
},
|
|
10310
|
+
}, jh = (n) => {
|
|
10323
10311
|
const e = J(T), [t, o] = Ee(() => {
|
|
10324
10312
|
var i;
|
|
10325
10313
|
const s = n[0];
|
|
@@ -10328,7 +10316,7 @@ const rt = {
|
|
|
10328
10316
|
return [t, (s) => (o(s), e.executeCommand(rt.id, {
|
|
10329
10317
|
paragraph: { spaceBelow: { v: s } }
|
|
10330
10318
|
}))];
|
|
10331
|
-
},
|
|
10319
|
+
}, zh = (n) => {
|
|
10332
10320
|
const e = J(T), t = J(pe), o = J(L), r = Te(() => {
|
|
10333
10321
|
var g;
|
|
10334
10322
|
const u = o.getCurrentUnitForType(_.UNIVER_DOC);
|
|
@@ -10399,17 +10387,17 @@ function Gh() {
|
|
|
10399
10387
|
{ label: n.t("toolbar.alignCenter"), value: String(Ue.CENTER), icon: /* @__PURE__ */ Q(sc, {}) },
|
|
10400
10388
|
{ label: n.t("toolbar.alignRight"), value: String(Ue.RIGHT), icon: /* @__PURE__ */ Q(cc, {}) },
|
|
10401
10389
|
{ label: n.t("toolbar.alignJustify"), value: String(Ue.JUSTIFIED), icon: /* @__PURE__ */ Q(qa, {}) }
|
|
10402
|
-
], []), t = Qh(), [o, r] = Uh(t, e[0].value), [s, i] = Fh(t), [a, c] = Hh(t), [d, l] = kh(t), [A, h] = Vh(t), [u, g] = Wh(t), [f, p] =
|
|
10390
|
+
], []), t = Qh(), [o, r] = Uh(t, e[0].value), [s, i] = Fh(t), [a, c] = Hh(t), [d, l] = kh(t), [A, h] = Vh(t), [u, g] = Wh(t), [f, p] = jh(t), { lineSpacing: [m, I], spacingRule: [S, v] } = zh(t), R = Te(() => S === Xt.AUTO ? { min: 1, max: 5, step: m < 2 ? 0.5 : 1 } : { min: 1, max: 100 }, [S, m]);
|
|
10403
10391
|
return /* @__PURE__ */ re("div", { children: [
|
|
10404
10392
|
/* @__PURE__ */ Q("div", { className: "univer-t-4 univer-text-sm univer-font-medium", children: n.t("doc.paragraphSetting.alignment") }),
|
|
10405
10393
|
/* @__PURE__ */ Q(
|
|
10406
10394
|
"div",
|
|
10407
10395
|
{
|
|
10408
|
-
className:
|
|
10396
|
+
className: ze("univer-mt-4 univer-box-border univer-flex univer-w-full univer-items-center univer-justify-between univer-gap-1 univer-rounded-md univer-p-1", Nn),
|
|
10409
10397
|
children: e.map((E) => /* @__PURE__ */ Q(ed, { title: E.label, placement: "bottom", children: /* @__PURE__ */ Q(
|
|
10410
10398
|
"span",
|
|
10411
10399
|
{
|
|
10412
|
-
className:
|
|
10400
|
+
className: ze("hover:univer-bg-black/60 univer-flex univer-cursor-pointer univer-items-center univer-justify-center univer-rounded univer-bg-none univer-px-3 univer-py-1", {
|
|
10413
10401
|
"univer-bg-blend-color-dodge/90": o === E.value
|
|
10414
10402
|
}),
|
|
10415
10403
|
onClick: () => r(E.value),
|
|
@@ -10518,7 +10506,7 @@ var qh = Object.getOwnPropertyDescriptor, Xh = (n, e, t, o) => {
|
|
|
10518
10506
|
for (var r = o > 1 ? void 0 : o ? qh(e, t) : e, s = n.length - 1, i; s >= 0; s--)
|
|
10519
10507
|
(i = n[s]) && (r = i(r) || r);
|
|
10520
10508
|
return r;
|
|
10521
|
-
},
|
|
10509
|
+
}, or = (n, e) => (t, o) => e(t, o, n);
|
|
10522
10510
|
const Ni = "doc_ui_paragraph-setting-panel";
|
|
10523
10511
|
let tn = class extends me {
|
|
10524
10512
|
constructor(e, t, o) {
|
|
@@ -10545,9 +10533,9 @@ let tn = class extends me {
|
|
|
10545
10533
|
}
|
|
10546
10534
|
};
|
|
10547
10535
|
tn = Xh([
|
|
10548
|
-
|
|
10549
|
-
|
|
10550
|
-
|
|
10536
|
+
or(0, T),
|
|
10537
|
+
or(1, j(rn)),
|
|
10538
|
+
or(2, j(la))
|
|
10551
10539
|
], tn);
|
|
10552
10540
|
const Ds = {
|
|
10553
10541
|
id: "sidebar.operation.doc-paragraph-setting-panel",
|
|
@@ -10596,8 +10584,8 @@ const dt = (n) => {
|
|
|
10596
10584
|
return Li(o, e, t), () => r.unsubscribe();
|
|
10597
10585
|
});
|
|
10598
10586
|
}, Jh = (n) => ({
|
|
10599
|
-
id:
|
|
10600
|
-
commandId:
|
|
10587
|
+
id: ro.name,
|
|
10588
|
+
commandId: ro.id,
|
|
10601
10589
|
type: Z.BUTTON,
|
|
10602
10590
|
icon: "CopyDoubleIcon",
|
|
10603
10591
|
title: "rightClick.copy",
|
|
@@ -10623,7 +10611,7 @@ const dt = (n) => {
|
|
|
10623
10611
|
title: "rightClick.paste",
|
|
10624
10612
|
hidden$: se(n, _.UNIVER_DOC)
|
|
10625
10613
|
}), ng = (n) => ({
|
|
10626
|
-
id:
|
|
10614
|
+
id: Do.id,
|
|
10627
10615
|
type: Z.BUTTON,
|
|
10628
10616
|
icon: "PasteSpecialDoubleIcon",
|
|
10629
10617
|
title: "rightClick.delete",
|
|
@@ -10771,23 +10759,23 @@ const ug = {
|
|
|
10771
10759
|
}
|
|
10772
10760
|
},
|
|
10773
10761
|
[Ks.LAYOUT]: {
|
|
10774
|
-
[
|
|
10762
|
+
[Qo.id]: {
|
|
10775
10763
|
order: 2,
|
|
10776
10764
|
menuItemFactory: vu
|
|
10777
10765
|
},
|
|
10778
|
-
[
|
|
10766
|
+
[Uo.id]: {
|
|
10779
10767
|
order: 3,
|
|
10780
10768
|
menuItemFactory: Cu
|
|
10781
10769
|
},
|
|
10782
|
-
[
|
|
10770
|
+
[Fo.id]: {
|
|
10783
10771
|
order: 4,
|
|
10784
10772
|
menuItemFactory: Ru
|
|
10785
10773
|
},
|
|
10786
|
-
[
|
|
10774
|
+
[Ho.id]: {
|
|
10787
10775
|
order: 5,
|
|
10788
10776
|
menuItemFactory: bu
|
|
10789
10777
|
},
|
|
10790
|
-
[
|
|
10778
|
+
[wo.id]: {
|
|
10791
10779
|
order: 6,
|
|
10792
10780
|
menuItemFactory: xu
|
|
10793
10781
|
},
|
|
@@ -10799,7 +10787,7 @@ const ug = {
|
|
|
10799
10787
|
order: 8,
|
|
10800
10788
|
menuItemFactory: yi
|
|
10801
10789
|
},
|
|
10802
|
-
[
|
|
10790
|
+
[so.id]: {
|
|
10803
10791
|
order: 9,
|
|
10804
10792
|
menuItemFactory: Oi
|
|
10805
10793
|
},
|
|
@@ -10807,7 +10795,7 @@ const ug = {
|
|
|
10807
10795
|
order: 10,
|
|
10808
10796
|
menuItemFactory: mu
|
|
10809
10797
|
},
|
|
10810
|
-
[
|
|
10798
|
+
[ko.id]: {
|
|
10811
10799
|
order: 11,
|
|
10812
10800
|
menuItemFactory: yu
|
|
10813
10801
|
},
|
|
@@ -10826,9 +10814,9 @@ const ug = {
|
|
|
10826
10814
|
}
|
|
10827
10815
|
}
|
|
10828
10816
|
},
|
|
10829
|
-
[
|
|
10817
|
+
[no.MAIN_AREA]: {
|
|
10830
10818
|
[an.FORMAT]: {
|
|
10831
|
-
[
|
|
10819
|
+
[ro.name]: {
|
|
10832
10820
|
order: 0,
|
|
10833
10821
|
menuItemFactory: Jh
|
|
10834
10822
|
},
|
|
@@ -10840,7 +10828,7 @@ const ug = {
|
|
|
10840
10828
|
order: 2,
|
|
10841
10829
|
menuItemFactory: tg
|
|
10842
10830
|
},
|
|
10843
|
-
[
|
|
10831
|
+
[Do.id]: {
|
|
10844
10832
|
order: 3,
|
|
10845
10833
|
menuItemFactory: ng
|
|
10846
10834
|
}
|
|
@@ -10888,7 +10876,7 @@ const ug = {
|
|
|
10888
10876
|
}
|
|
10889
10877
|
}
|
|
10890
10878
|
},
|
|
10891
|
-
[
|
|
10879
|
+
[no.PARAGRAPH]: {
|
|
10892
10880
|
[an.QUICK]: {
|
|
10893
10881
|
[us.id]: {
|
|
10894
10882
|
order: 0,
|
|
@@ -10910,7 +10898,7 @@ const ug = {
|
|
|
10910
10898
|
order: 4,
|
|
10911
10899
|
menuItemFactory: Nu
|
|
10912
10900
|
},
|
|
10913
|
-
[
|
|
10901
|
+
[io.id]: {
|
|
10914
10902
|
order: 5,
|
|
10915
10903
|
menuItemFactory: Lu
|
|
10916
10904
|
},
|
|
@@ -10922,7 +10910,7 @@ const ug = {
|
|
|
10922
10910
|
order: 7,
|
|
10923
10911
|
menuItemFactory: yi
|
|
10924
10912
|
},
|
|
10925
|
-
[
|
|
10913
|
+
[so.id]: {
|
|
10926
10914
|
order: 8,
|
|
10927
10915
|
menuItemFactory: Oi
|
|
10928
10916
|
}
|
|
@@ -10944,7 +10932,7 @@ const ug = {
|
|
|
10944
10932
|
[an.LAYOUT]: {
|
|
10945
10933
|
// title: 'rightClick.insertBellow',
|
|
10946
10934
|
[Ic]: {
|
|
10947
|
-
menuItemFactory:
|
|
10935
|
+
menuItemFactory: ju,
|
|
10948
10936
|
[ls.id]: {
|
|
10949
10937
|
order: 0,
|
|
10950
10938
|
menuItemFactory: Hu
|
|
@@ -10970,7 +10958,7 @@ var hg = Object.getOwnPropertyDescriptor, gg = (n, e, t, o) => {
|
|
|
10970
10958
|
(i = n[s]) && (r = i(r) || r);
|
|
10971
10959
|
return r;
|
|
10972
10960
|
}, st = (n, e) => (t, o) => e(t, o, n);
|
|
10973
|
-
let
|
|
10961
|
+
let Ao = class extends me {
|
|
10974
10962
|
constructor(n, e, t, o, r, s, i, a, c) {
|
|
10975
10963
|
super(), this._injector = n, this._componentManager = e, this._commandService = t, this._layoutService = o, this._menuManagerService = r, this._uiPartsService = s, this._univerInstanceService = i, this._shortcutService = a, this._configService = c, this._init();
|
|
10976
10964
|
}
|
|
@@ -11032,24 +11020,24 @@ let uo = class extends me {
|
|
|
11032
11020
|
);
|
|
11033
11021
|
}
|
|
11034
11022
|
};
|
|
11035
|
-
|
|
11036
|
-
st(0,
|
|
11037
|
-
st(1,
|
|
11023
|
+
Ao = gg([
|
|
11024
|
+
st(0, j(Dn)),
|
|
11025
|
+
st(1, j(rn)),
|
|
11038
11026
|
st(2, T),
|
|
11039
|
-
st(3,
|
|
11027
|
+
st(3, Oo),
|
|
11040
11028
|
st(4, Aa),
|
|
11041
11029
|
st(5, Hl),
|
|
11042
11030
|
st(6, L),
|
|
11043
|
-
st(7,
|
|
11031
|
+
st(7, To),
|
|
11044
11032
|
st(8, Vr)
|
|
11045
|
-
],
|
|
11033
|
+
], Ao);
|
|
11046
11034
|
var fg = Object.getOwnPropertyDescriptor, pg = (n, e, t, o) => {
|
|
11047
11035
|
for (var r = o > 1 ? void 0 : o ? fg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
|
|
11048
11036
|
(i = n[s]) && (r = i(r) || r);
|
|
11049
11037
|
return r;
|
|
11050
|
-
},
|
|
11038
|
+
}, rr = (n, e) => (t, o) => e(t, o, n);
|
|
11051
11039
|
const Qi = 1.5;
|
|
11052
|
-
let
|
|
11040
|
+
let uo = class extends Ct {
|
|
11053
11041
|
constructor(n, e, t, o) {
|
|
11054
11042
|
super(), this._context = n, this._textSelectionManagerService = e, this._editorService = t, this._docSkeletonManagerService = o, this._init();
|
|
11055
11043
|
}
|
|
@@ -11058,7 +11046,7 @@ let ho = class extends Ct {
|
|
|
11058
11046
|
if (n == null)
|
|
11059
11047
|
return;
|
|
11060
11048
|
const { isEditing: e, unitId: t } = n;
|
|
11061
|
-
t !== this._context.unitId || !e || this._context.unitId !==
|
|
11049
|
+
t !== this._context.unitId || !e || this._context.unitId !== bo && this._scrollToSelection();
|
|
11062
11050
|
});
|
|
11063
11051
|
}
|
|
11064
11052
|
scrollToRange(n) {
|
|
@@ -11097,16 +11085,16 @@ let ho = class extends Ct {
|
|
|
11097
11085
|
e && this.scrollToNode(t);
|
|
11098
11086
|
}
|
|
11099
11087
|
};
|
|
11100
|
-
|
|
11101
|
-
|
|
11102
|
-
|
|
11103
|
-
|
|
11104
|
-
],
|
|
11088
|
+
uo = pg([
|
|
11089
|
+
rr(1, j(Y)),
|
|
11090
|
+
rr(2, Ge),
|
|
11091
|
+
rr(3, j(de))
|
|
11092
|
+
], uo);
|
|
11105
11093
|
var mg = Object.getOwnPropertyDescriptor, Eg = (n, e, t, o) => {
|
|
11106
11094
|
for (var r = o > 1 ? void 0 : o ? mg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
|
|
11107
11095
|
(i = n[s]) && (r = i(r) || r);
|
|
11108
11096
|
return r;
|
|
11109
|
-
},
|
|
11097
|
+
}, zt = (n, e) => (t, o) => e(t, o, n);
|
|
11110
11098
|
let br = class extends Ct {
|
|
11111
11099
|
constructor(n, e, t, o, r, s, i) {
|
|
11112
11100
|
super(), this._context = n, this._commandService = e, this._docSelectionRenderService = t, this._docSkeletonManagerService = o, this._editorService = r, this._renderManagerService = s, this._univerInstanceService = i, this._addNewRender(), this._initRenderRefresh(), this._initCommandListener();
|
|
@@ -11144,7 +11132,7 @@ let br = class extends Ct {
|
|
|
11144
11132
|
} else
|
|
11145
11133
|
t.onMouseWheel(a, s);
|
|
11146
11134
|
}), new lr(t), n.addLayer(
|
|
11147
|
-
new Gs(n, [],
|
|
11135
|
+
new Gs(n, [], zo),
|
|
11148
11136
|
new Gs(n, [], ad)
|
|
11149
11137
|
), this._addComponent();
|
|
11150
11138
|
const o = () => n.render();
|
|
@@ -11159,7 +11147,7 @@ let br = class extends Ct {
|
|
|
11159
11147
|
}, i = new gl($e.MAIN, void 0, s);
|
|
11160
11148
|
i.zIndex = $s;
|
|
11161
11149
|
const a = new fl($e.BACKGROUND, void 0, s);
|
|
11162
|
-
a.zIndex = $s, this._context.mainComponent = i, t.set($e.MAIN, i), t.set($e.BACKGROUND, a), n.addObjects([i],
|
|
11150
|
+
a.zIndex = $s, this._context.mainComponent = i, t.set($e.MAIN, i), t.set($e.BACKGROUND, a), n.addObjects([i], zo), n.addObjects([a], id), this._editorService.getEditor(e.getUnitId()) == null && n.enableLayerCache(zo);
|
|
11163
11151
|
}
|
|
11164
11152
|
_initRenderRefresh() {
|
|
11165
11153
|
this._docSkeletonManagerService.currentSkeletonBefore$.pipe(ft(this.dispose$)).subscribe((n) => {
|
|
@@ -11210,12 +11198,12 @@ let br = class extends Ct {
|
|
|
11210
11198
|
}
|
|
11211
11199
|
};
|
|
11212
11200
|
br = Eg([
|
|
11213
|
-
|
|
11214
|
-
|
|
11215
|
-
|
|
11216
|
-
|
|
11217
|
-
|
|
11218
|
-
|
|
11201
|
+
zt(1, T),
|
|
11202
|
+
zt(2, j(Re)),
|
|
11203
|
+
zt(3, j(de)),
|
|
11204
|
+
zt(4, Ge),
|
|
11205
|
+
zt(5, pe),
|
|
11206
|
+
zt(6, L)
|
|
11219
11207
|
], br);
|
|
11220
11208
|
function Ig(n) {
|
|
11221
11209
|
let { pageWidth: e, pageHeight: t } = n;
|
|
@@ -11231,7 +11219,7 @@ var Sg = Object.getOwnPropertyDescriptor, vg = (n, e, t, o) => {
|
|
|
11231
11219
|
for (var r = o > 1 ? void 0 : o ? Sg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
|
|
11232
11220
|
(i = n[s]) && (r = i(r) || r);
|
|
11233
11221
|
return r;
|
|
11234
|
-
},
|
|
11222
|
+
}, sr = (n, e) => (t, o) => e(t, o, n);
|
|
11235
11223
|
let xr = class {
|
|
11236
11224
|
constructor(n, e, t) {
|
|
11237
11225
|
O(this, "_docContainer");
|
|
@@ -11255,7 +11243,7 @@ let xr = class {
|
|
|
11255
11243
|
getUIConfig() {
|
|
11256
11244
|
return {
|
|
11257
11245
|
injector: this._injector,
|
|
11258
|
-
config: this._configService.getConfig(
|
|
11246
|
+
config: this._configService.getConfig(Vo),
|
|
11259
11247
|
changeLocale: this.changeLocale,
|
|
11260
11248
|
getComponent: this.getComponent
|
|
11261
11249
|
};
|
|
@@ -11272,31 +11260,31 @@ let xr = class {
|
|
|
11272
11260
|
}
|
|
11273
11261
|
};
|
|
11274
11262
|
xr = vg([
|
|
11275
|
-
|
|
11276
|
-
|
|
11277
|
-
|
|
11263
|
+
sr(0, j(Ye)),
|
|
11264
|
+
sr(1, j(Dn)),
|
|
11265
|
+
sr(2, Vr)
|
|
11278
11266
|
], xr);
|
|
11279
11267
|
var Cg = Object.getOwnPropertyDescriptor, Rg = (n, e, t, o) => {
|
|
11280
11268
|
for (var r = o > 1 ? void 0 : o ? Cg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
|
|
11281
11269
|
(i = n[s]) && (r = i(r) || r);
|
|
11282
11270
|
return r;
|
|
11283
11271
|
}, bg = (n, e) => (t, o) => e(t, o, n);
|
|
11284
|
-
let
|
|
11272
|
+
let ho = class extends Ct {
|
|
11285
11273
|
constructor(e) {
|
|
11286
11274
|
super();
|
|
11287
11275
|
O(this, "_docContainerController");
|
|
11288
11276
|
this._injector = e, this._docContainerController = this._injector.createInstance(xr);
|
|
11289
11277
|
}
|
|
11290
11278
|
};
|
|
11291
|
-
|
|
11292
|
-
bg(0,
|
|
11293
|
-
],
|
|
11279
|
+
ho = Rg([
|
|
11280
|
+
bg(0, j(Dn))
|
|
11281
|
+
], ho);
|
|
11294
11282
|
var xg = Object.getOwnPropertyDescriptor, yg = (n, e, t, o) => {
|
|
11295
11283
|
for (var r = o > 1 ? void 0 : o ? xg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
|
|
11296
11284
|
(i = n[s]) && (r = i(r) || r);
|
|
11297
11285
|
return r;
|
|
11298
11286
|
}, Ui = (n, e) => (t, o) => e(t, o, n);
|
|
11299
|
-
let
|
|
11287
|
+
let go = class extends me {
|
|
11300
11288
|
constructor(n, e) {
|
|
11301
11289
|
super(), this._docAutoFormatService = n, this._renderManagerService = e, this._initListTabAutoFormat(), this._initSpaceAutoFormat(), this._initDefaultEnterFormat(), this._initExitListAutoFormat();
|
|
11302
11290
|
}
|
|
@@ -11352,14 +11340,14 @@ let fo = class extends me {
|
|
|
11352
11340
|
_initSpaceAutoFormat() {
|
|
11353
11341
|
this.disposeWithMe(
|
|
11354
11342
|
this._docAutoFormatService.registerAutoFormat({
|
|
11355
|
-
id:
|
|
11343
|
+
id: Mo.id,
|
|
11356
11344
|
match: (n) => {
|
|
11357
11345
|
var s;
|
|
11358
11346
|
const { selection: e, paragraphs: t, unit: o } = n;
|
|
11359
11347
|
if (!e.collapsed || t.length !== 1 || !e.collapsed)
|
|
11360
11348
|
return !1;
|
|
11361
11349
|
const r = (s = o.getBody()) == null ? void 0 : s.dataStream.slice(t[0].paragraphStart, e.startOffset - 1);
|
|
11362
|
-
return !!(r && (Object.keys(jo).includes(r) || Object.keys(
|
|
11350
|
+
return !!(r && (Object.keys(jo).includes(r) || Object.keys(qo).includes(r)));
|
|
11363
11351
|
},
|
|
11364
11352
|
getMutations(n) {
|
|
11365
11353
|
var s;
|
|
@@ -11374,8 +11362,8 @@ let fo = class extends me {
|
|
|
11374
11362
|
}
|
|
11375
11363
|
}];
|
|
11376
11364
|
}
|
|
11377
|
-
if (r && Object.keys(
|
|
11378
|
-
const i =
|
|
11365
|
+
if (r && Object.keys(qo).includes(r)) {
|
|
11366
|
+
const i = qo[r];
|
|
11379
11367
|
return [{
|
|
11380
11368
|
id: Qa.id,
|
|
11381
11369
|
params: {
|
|
@@ -11428,10 +11416,10 @@ let fo = class extends me {
|
|
|
11428
11416
|
);
|
|
11429
11417
|
}
|
|
11430
11418
|
};
|
|
11431
|
-
|
|
11432
|
-
Ui(0,
|
|
11419
|
+
go = yg([
|
|
11420
|
+
Ui(0, j(Pt)),
|
|
11433
11421
|
Ui(1, pe)
|
|
11434
|
-
],
|
|
11422
|
+
], go);
|
|
11435
11423
|
function Og(n) {
|
|
11436
11424
|
return n.rows[0].cells[0].sections[0].columns[0].lines[0];
|
|
11437
11425
|
}
|
|
@@ -11541,8 +11529,8 @@ var Pg = Object.getOwnPropertyDescriptor, wg = (n, e, t, o) => {
|
|
|
11541
11529
|
for (var r = o > 1 ? void 0 : o ? Pg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
|
|
11542
11530
|
(i = n[s]) && (r = i(r) || r);
|
|
11543
11531
|
return r;
|
|
11544
|
-
},
|
|
11545
|
-
let
|
|
11532
|
+
}, jn = (n, e) => (t, o) => e(t, o, n);
|
|
11533
|
+
let fo = class extends me {
|
|
11546
11534
|
constructor(e, t, o, r) {
|
|
11547
11535
|
super();
|
|
11548
11536
|
O(this, "_onInputSubscription");
|
|
@@ -11832,7 +11820,7 @@ let po = class extends me {
|
|
|
11832
11820
|
}
|
|
11833
11821
|
_scrollToFocusNodePosition(e, t) {
|
|
11834
11822
|
var r;
|
|
11835
|
-
const o = (r = this._renderManagerService.getRenderById(e)) == null ? void 0 : r.with(
|
|
11823
|
+
const o = (r = this._renderManagerService.getRenderById(e)) == null ? void 0 : r.with(uo);
|
|
11836
11824
|
o != null && o.scrollToRange({
|
|
11837
11825
|
startOffset: t,
|
|
11838
11826
|
endOffset: t,
|
|
@@ -11843,12 +11831,12 @@ let po = class extends me {
|
|
|
11843
11831
|
return cd(this._univerInstanceService, this._renderManagerService);
|
|
11844
11832
|
}
|
|
11845
11833
|
};
|
|
11846
|
-
|
|
11847
|
-
|
|
11848
|
-
|
|
11849
|
-
|
|
11850
|
-
|
|
11851
|
-
],
|
|
11834
|
+
fo = wg([
|
|
11835
|
+
jn(0, L),
|
|
11836
|
+
jn(1, pe),
|
|
11837
|
+
jn(2, j(Y)),
|
|
11838
|
+
jn(3, T)
|
|
11839
|
+
], fo);
|
|
11852
11840
|
function Hi(n, e) {
|
|
11853
11841
|
var o, r;
|
|
11854
11842
|
let t = null;
|
|
@@ -11921,7 +11909,7 @@ var Lg = Object.getOwnPropertyDescriptor, Qg = (n, e, t, o) => {
|
|
|
11921
11909
|
(i = n[s]) && (r = i(r) || r);
|
|
11922
11910
|
return r;
|
|
11923
11911
|
}, ki = (n, e) => (t, o) => e(t, o, n);
|
|
11924
|
-
let
|
|
11912
|
+
let po = class extends me {
|
|
11925
11913
|
constructor(n, e) {
|
|
11926
11914
|
super(), this._commandService = n, this._componentManager = e, this._initialize();
|
|
11927
11915
|
}
|
|
@@ -11940,15 +11928,15 @@ let mo = class extends me {
|
|
|
11940
11928
|
_init() {
|
|
11941
11929
|
}
|
|
11942
11930
|
};
|
|
11943
|
-
|
|
11931
|
+
po = Qg([
|
|
11944
11932
|
ki(0, T),
|
|
11945
|
-
ki(1,
|
|
11946
|
-
],
|
|
11933
|
+
ki(1, j(rn))
|
|
11934
|
+
], po);
|
|
11947
11935
|
var Ug = Object.getOwnPropertyDescriptor, Fg = (n, e, t, o) => {
|
|
11948
11936
|
for (var r = o > 1 ? void 0 : o ? Ug(e, t) : e, s = n.length - 1, i; s >= 0; s--)
|
|
11949
11937
|
(i = n[s]) && (r = i(r) || r);
|
|
11950
11938
|
return r;
|
|
11951
|
-
},
|
|
11939
|
+
}, zn = (n, e) => (t, o) => e(t, o, n);
|
|
11952
11940
|
let yr = class extends me {
|
|
11953
11941
|
constructor(n, e, t, o, r) {
|
|
11954
11942
|
super(), this._context = n, this._docSkeletonManagerService = e, this._commandService = t, this._docEventManagerService = o, this._textSelectionManagerService = r, this._initPointerDownObserver(), this._initHoverCursor();
|
|
@@ -11977,17 +11965,17 @@ let yr = class extends me {
|
|
|
11977
11965
|
}
|
|
11978
11966
|
};
|
|
11979
11967
|
yr = Fg([
|
|
11980
|
-
|
|
11981
|
-
|
|
11982
|
-
|
|
11983
|
-
|
|
11968
|
+
zn(1, j(de)),
|
|
11969
|
+
zn(2, T),
|
|
11970
|
+
zn(3, j(wt)),
|
|
11971
|
+
zn(4, j(Y))
|
|
11984
11972
|
], yr);
|
|
11985
11973
|
var Hg = Object.getOwnPropertyDescriptor, kg = (n, e, t, o) => {
|
|
11986
11974
|
for (var r = o > 1 ? void 0 : o ? Hg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
|
|
11987
11975
|
(i = n[s]) && (r = i(r) || r);
|
|
11988
11976
|
return r;
|
|
11989
11977
|
}, An = (n, e) => (t, o) => e(t, o, n);
|
|
11990
|
-
let
|
|
11978
|
+
let mo = class extends Ct {
|
|
11991
11979
|
constructor(n, e, t, o, r, s) {
|
|
11992
11980
|
super(), this._context = n, this._commandService = e, this._docClipboardService = t, this._docSelectionRenderService = o, this._contextService = r, this._editorService = s, this._init();
|
|
11993
11981
|
}
|
|
@@ -11998,42 +11986,42 @@ let Eo = class extends Ct {
|
|
|
11998
11986
|
var n;
|
|
11999
11987
|
(n = this._docSelectionRenderService) == null || n.onPaste$.pipe(ft(this.dispose$)).subscribe((e) => {
|
|
12000
11988
|
var a, c, d;
|
|
12001
|
-
if (!
|
|
11989
|
+
if (!Po(this._contextService))
|
|
12002
11990
|
return;
|
|
12003
11991
|
e.event.preventDefault();
|
|
12004
11992
|
const t = e.event;
|
|
12005
|
-
let o = (a = t.clipboardData) == null ? void 0 : a.getData(
|
|
12006
|
-
const r = (c = t.clipboardData) == null ? void 0 : c.getData(
|
|
11993
|
+
let o = (a = t.clipboardData) == null ? void 0 : a.getData(ia);
|
|
11994
|
+
const r = (c = t.clipboardData) == null ? void 0 : c.getData(aa), s = [...((d = t.clipboardData) == null ? void 0 : d.items) || []].filter((l) => kl.has(l.type)).map((l) => l.getAsFile()).filter((l) => !!l);
|
|
12007
11995
|
this._editorService.getEditor(this._context.unitId) && (o != null ? o : "").indexOf("</table>") > -1 && (o = ""), this._docClipboardService.legacyPaste({ html: o, text: r, files: s });
|
|
12008
11996
|
});
|
|
12009
11997
|
}
|
|
12010
11998
|
};
|
|
12011
|
-
|
|
11999
|
+
mo = kg([
|
|
12012
12000
|
An(1, T),
|
|
12013
12001
|
An(2, Lt),
|
|
12014
|
-
An(3,
|
|
12002
|
+
An(3, j(Re)),
|
|
12015
12003
|
An(4, Fr),
|
|
12016
12004
|
An(5, Ge)
|
|
12017
|
-
],
|
|
12005
|
+
], mo);
|
|
12018
12006
|
var Vg = Object.getOwnPropertyDescriptor, Wg = (n, e, t, o) => {
|
|
12019
12007
|
for (var r = o > 1 ? void 0 : o ? Vg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
|
|
12020
12008
|
(i = n[s]) && (r = i(r) || r);
|
|
12021
12009
|
return r;
|
|
12022
12010
|
}, Vi = (n, e) => (t, o) => e(t, o, n);
|
|
12023
|
-
const
|
|
12024
|
-
|
|
12011
|
+
const jg = [
|
|
12012
|
+
Xi,
|
|
12025
12013
|
Yc,
|
|
12026
|
-
|
|
12014
|
+
bo,
|
|
12027
12015
|
nt
|
|
12028
12016
|
];
|
|
12029
12017
|
let Or = class extends me {
|
|
12030
12018
|
constructor(n, e, t) {
|
|
12031
|
-
super(), this._context = n, this._contextMenuService = e, this._commandService = t,
|
|
12019
|
+
super(), this._context = n, this._contextMenuService = e, this._commandService = t, jg.includes(this._context.unitId) || (this._initPointerDown(), this._initEditChange());
|
|
12032
12020
|
}
|
|
12033
12021
|
_initPointerDown() {
|
|
12034
12022
|
var t, o;
|
|
12035
12023
|
const e = ((o = (t = this._context) == null ? void 0 : t.mainComponent) == null ? void 0 : o.onPointerDown$).subscribeEvent((r) => {
|
|
12036
|
-
r.button === 2 && this._contextMenuService.triggerContextMenu(r,
|
|
12024
|
+
r.button === 2 && this._contextMenuService.triggerContextMenu(r, no.MAIN_AREA);
|
|
12037
12025
|
});
|
|
12038
12026
|
this.disposeWithMe(e);
|
|
12039
12027
|
}
|
|
@@ -12049,12 +12037,12 @@ Or = Wg([
|
|
|
12049
12037
|
Vi(1, Vl),
|
|
12050
12038
|
Vi(2, T)
|
|
12051
12039
|
], Or);
|
|
12052
|
-
var
|
|
12053
|
-
for (var r = o > 1 ? void 0 : o ?
|
|
12040
|
+
var zg = Object.getOwnPropertyDescriptor, Gg = (n, e, t, o) => {
|
|
12041
|
+
for (var r = o > 1 ? void 0 : o ? zg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
|
|
12054
12042
|
(i = n[s]) && (r = i(r) || r);
|
|
12055
12043
|
return r;
|
|
12056
12044
|
}, Gt = (n, e) => (t, o) => e(t, o, n);
|
|
12057
|
-
let
|
|
12045
|
+
let Eo = class extends me {
|
|
12058
12046
|
constructor(e, t, o, r, s, i, a) {
|
|
12059
12047
|
super();
|
|
12060
12048
|
O(this, "_initialEditors", /* @__PURE__ */ new Set());
|
|
@@ -12108,7 +12096,7 @@ let Io = class extends me {
|
|
|
12108
12096
|
"univer-formula-help-param"
|
|
12109
12097
|
];
|
|
12110
12098
|
this.disposeWithMe(
|
|
12111
|
-
|
|
12099
|
+
je(window, "mousedown").subscribe((o) => {
|
|
12112
12100
|
const s = o.target.classList[0] || "";
|
|
12113
12101
|
Kc(s, e) && o.stopPropagation();
|
|
12114
12102
|
})
|
|
@@ -12121,7 +12109,7 @@ let Io = class extends me {
|
|
|
12121
12109
|
const r = o.getUnitId(), s = this._renderManagerService.getRenderById(r), i = s == null ? void 0 : s.engine.getCanvas().getCanvasEle();
|
|
12122
12110
|
if (i == null)
|
|
12123
12111
|
return;
|
|
12124
|
-
const a =
|
|
12112
|
+
const a = je(i, "mousedown").subscribe((c) => {
|
|
12125
12113
|
c.stopPropagation();
|
|
12126
12114
|
});
|
|
12127
12115
|
t.add(a);
|
|
@@ -12146,14 +12134,14 @@ let Io = class extends me {
|
|
|
12146
12134
|
);
|
|
12147
12135
|
}
|
|
12148
12136
|
};
|
|
12149
|
-
|
|
12137
|
+
Eo = Gg([
|
|
12150
12138
|
Gt(1, L),
|
|
12151
12139
|
Gt(2, Ge),
|
|
12152
12140
|
Gt(3, T),
|
|
12153
|
-
Gt(4,
|
|
12154
|
-
Gt(5,
|
|
12141
|
+
Gt(4, j(Re)),
|
|
12142
|
+
Gt(5, j(de)),
|
|
12155
12143
|
Gt(6, pe)
|
|
12156
|
-
],
|
|
12144
|
+
], Eo);
|
|
12157
12145
|
var Yg = Object.getOwnPropertyDescriptor, Kg = (n, e, t, o) => {
|
|
12158
12146
|
for (var r = o > 1 ? void 0 : o ? Yg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
|
|
12159
12147
|
(i = n[s]) && (r = i(r) || r);
|
|
@@ -12215,9 +12203,9 @@ let Tr = class extends me {
|
|
|
12215
12203
|
}
|
|
12216
12204
|
};
|
|
12217
12205
|
Tr = Kg([
|
|
12218
|
-
Gn(1,
|
|
12219
|
-
Gn(2,
|
|
12220
|
-
Gn(3,
|
|
12206
|
+
Gn(1, j(Re)),
|
|
12207
|
+
Gn(2, j(No)),
|
|
12208
|
+
Gn(3, j(de)),
|
|
12221
12209
|
Gn(4, T)
|
|
12222
12210
|
], Tr);
|
|
12223
12211
|
var qg = Object.getOwnPropertyDescriptor, Xg = (n, e, t, o) => {
|
|
@@ -12246,7 +12234,7 @@ let Br = class extends me {
|
|
|
12246
12234
|
const { unitId: t } = this._context, { event: o, content: r = "", activeRange: s } = e, i = o, a = this._docSkeletonManagerService.getSkeleton();
|
|
12247
12235
|
if (i.data == null || a == null || s == null)
|
|
12248
12236
|
return;
|
|
12249
|
-
const { segmentId: c } = s, l = this._context.unit.getSelfOrHeaderFooterModel(c).getBody(), A = this._docMenuStyleService.getDefaultStyle(), h = this._docMenuStyleService.getStyleCache(), u =
|
|
12237
|
+
const { segmentId: c } = s, l = this._context.unit.getSelfOrHeaderFooterModel(c).getBody(), A = this._docMenuStyleService.getDefaultStyle(), h = this._docMenuStyleService.getStyleCache(), u = jr((p = l == null ? void 0 : l.customRanges) != null ? p : [], s.endOffset, En.includes(t)), g = Bo(l, s.endOffset, A, h, En.includes(t)), f = zr((m = l == null ? void 0 : l.customDecorations) != null ? m : [], s.endOffset);
|
|
12250
12238
|
await this._commandService.executeCommand(Ca.id, {
|
|
12251
12239
|
unitId: t,
|
|
12252
12240
|
body: {
|
|
@@ -12271,15 +12259,15 @@ let Br = class extends me {
|
|
|
12271
12259
|
},
|
|
12272
12260
|
range: s,
|
|
12273
12261
|
segmentId: c
|
|
12274
|
-
}), r === " " && await this._commandService.executeCommand(
|
|
12262
|
+
}), r === " " && await this._commandService.executeCommand(Mo.id);
|
|
12275
12263
|
});
|
|
12276
12264
|
}
|
|
12277
12265
|
};
|
|
12278
12266
|
Br = Xg([
|
|
12279
|
-
Yn(1,
|
|
12280
|
-
Yn(2,
|
|
12267
|
+
Yn(1, j(Re)),
|
|
12268
|
+
Yn(2, j(de)),
|
|
12281
12269
|
Yn(3, T),
|
|
12282
|
-
Yn(4,
|
|
12270
|
+
Yn(4, j(at))
|
|
12283
12271
|
], Br);
|
|
12284
12272
|
class ws extends me {
|
|
12285
12273
|
constructor(e) {
|
|
@@ -12314,7 +12302,7 @@ let Mr = class extends me {
|
|
|
12314
12302
|
_initResize() {
|
|
12315
12303
|
this.disposeWithMe(
|
|
12316
12304
|
Mt(this._context.engine.onTransformChange$).pipe(
|
|
12317
|
-
|
|
12305
|
+
oo((n) => n.type === oa.resize),
|
|
12318
12306
|
Rn(0, Yl)
|
|
12319
12307
|
).subscribe(() => {
|
|
12320
12308
|
this._docPageLayoutService.calculatePagePosition(), this._textSelectionManagerService.refreshSelection();
|
|
@@ -12323,8 +12311,8 @@ let Mr = class extends me {
|
|
|
12323
12311
|
}
|
|
12324
12312
|
};
|
|
12325
12313
|
Mr = Jg([
|
|
12326
|
-
Wi(1,
|
|
12327
|
-
Wi(2,
|
|
12314
|
+
Wi(1, j(ws)),
|
|
12315
|
+
Wi(2, j(Y))
|
|
12328
12316
|
], Mr);
|
|
12329
12317
|
var $g = Object.getOwnPropertyDescriptor, ef = (n, e, t, o) => {
|
|
12330
12318
|
for (var r = o > 1 ? void 0 : o ? $g(e, t) : e, s = n.length - 1, i; s >= 0; s--)
|
|
@@ -12456,9 +12444,9 @@ _r = ef([
|
|
|
12456
12444
|
Yt(1, T),
|
|
12457
12445
|
Yt(2, Ge),
|
|
12458
12446
|
Yt(3, L),
|
|
12459
|
-
Yt(4,
|
|
12460
|
-
Yt(5,
|
|
12461
|
-
Yt(6,
|
|
12447
|
+
Yt(4, j(Re)),
|
|
12448
|
+
Yt(5, j(de)),
|
|
12449
|
+
Yt(6, j(Y))
|
|
12462
12450
|
], _r);
|
|
12463
12451
|
var tf = Object.getOwnPropertyDescriptor, nf = (n, e, t, o) => {
|
|
12464
12452
|
for (var r = o > 1 ? void 0 : o ? tf(e, t) : e, s = n.length - 1, i; s >= 0; s--)
|
|
@@ -12469,7 +12457,7 @@ let Dr = class extends me {
|
|
|
12469
12457
|
constructor(e, t, o, r, s, i, a, c, d) {
|
|
12470
12458
|
super();
|
|
12471
12459
|
O(this, "_isSheetEditor", !1);
|
|
12472
|
-
this._context = e, this._contextService = t, this._docSkeletonManagerService = o, this._univerInstanceService = r, this._commandService = s, this._textSelectionManagerService = i, this._editorService = a, this._docPageLayoutService = c, this._renderManagerService = d, this._initSkeletonListener(), this._initCommandExecutedListener(), this._initRenderRefresher(), this._isSheetEditor = this._context.unitId ===
|
|
12460
|
+
this._context = e, this._contextService = t, this._docSkeletonManagerService = o, this._univerInstanceService = r, this._commandService = s, this._textSelectionManagerService = i, this._editorService = a, this._docPageLayoutService = c, this._renderManagerService = d, this._initSkeletonListener(), this._initCommandExecutedListener(), this._initRenderRefresher(), this._isSheetEditor = this._context.unitId === bo;
|
|
12473
12461
|
const l = this._univerInstanceService.getCurrentUnitOfType(_.UNIVER_SHEET), A = l && this._renderManagerService.getRenderById(l.getUnitId());
|
|
12474
12462
|
setTimeout(() => this.updateViewZoom(A && this._isSheetEditor ? A.scene.scaleX : 1, !0), 20), Rt(this._context.unitId) || this._initZoomEventListener();
|
|
12475
12463
|
}
|
|
@@ -12519,7 +12507,7 @@ let Dr = class extends me {
|
|
|
12519
12507
|
}
|
|
12520
12508
|
})), this.disposeWithMe(
|
|
12521
12509
|
this._commandService.beforeCommandExecuted((t) => {
|
|
12522
|
-
t.id ===
|
|
12510
|
+
t.id === ko.id && this._commandService.executeCommand(Xn.id, {
|
|
12523
12511
|
zoomRatio: 1,
|
|
12524
12512
|
unitId: this._context.unitId
|
|
12525
12513
|
});
|
|
@@ -12553,15 +12541,15 @@ let Dr = class extends me {
|
|
|
12553
12541
|
};
|
|
12554
12542
|
Dr = nf([
|
|
12555
12543
|
ht(1, Fr),
|
|
12556
|
-
ht(2,
|
|
12544
|
+
ht(2, j(de)),
|
|
12557
12545
|
ht(3, L),
|
|
12558
12546
|
ht(4, T),
|
|
12559
|
-
ht(5,
|
|
12547
|
+
ht(5, j(Y)),
|
|
12560
12548
|
ht(6, Ge),
|
|
12561
|
-
ht(7,
|
|
12549
|
+
ht(7, j(ws)),
|
|
12562
12550
|
ht(8, pe)
|
|
12563
12551
|
], Dr);
|
|
12564
|
-
const of =
|
|
12552
|
+
const of = Ji("PRINTING_COMPONENT_COLLECT"), rf = Ji("PRINTING_DOM_COLLECT");
|
|
12565
12553
|
class sf extends me {
|
|
12566
12554
|
constructor() {
|
|
12567
12555
|
super();
|
|
@@ -12590,8 +12578,8 @@ var af = Object.getOwnPropertyDescriptor, cf = (n, e, t, o) => {
|
|
|
12590
12578
|
(i = n[s]) && (r = i(r) || r);
|
|
12591
12579
|
return r;
|
|
12592
12580
|
}, un = (n, e) => (t, o) => e(t, o, n);
|
|
12593
|
-
const
|
|
12594
|
-
let
|
|
12581
|
+
const ji = 300;
|
|
12582
|
+
let Io = class extends Ct {
|
|
12595
12583
|
constructor(e, t, o, r, s) {
|
|
12596
12584
|
super();
|
|
12597
12585
|
O(this, "_docStateChange$", new Fe(null));
|
|
@@ -12635,7 +12623,7 @@ let So = class extends Ct {
|
|
|
12635
12623
|
var a;
|
|
12636
12624
|
if (e == null)
|
|
12637
12625
|
return;
|
|
12638
|
-
const { isCompositionEnd: t, isSync: o, syncer: r, ...s } = e, i = (a = this._renderManagerService.getRenderById(o ? r : e.unitId)) == null ? void 0 : a.with(
|
|
12626
|
+
const { isCompositionEnd: t, isSync: o, syncer: r, ...s } = e, i = (a = this._renderManagerService.getRenderById(o ? r : e.unitId)) == null ? void 0 : a.with(No);
|
|
12639
12627
|
if (i != null) {
|
|
12640
12628
|
if (t) {
|
|
12641
12629
|
const c = i.fetchComposedUndoRedoMutationParams();
|
|
@@ -12660,9 +12648,9 @@ let So = class extends Ct {
|
|
|
12660
12648
|
a.set(r, [e]);
|
|
12661
12649
|
i ? t === "history" ? (this._historyTimer && clearTimeout(this._historyTimer), this._historyTimer = setTimeout(() => {
|
|
12662
12650
|
c(r);
|
|
12663
|
-
},
|
|
12651
|
+
}, ji)) : (this._changeStateCacheTimer && clearTimeout(this._changeStateCacheTimer), this._changeStateCacheTimer = setTimeout(() => {
|
|
12664
12652
|
c(r);
|
|
12665
|
-
},
|
|
12653
|
+
}, ji)) : c(r);
|
|
12666
12654
|
}
|
|
12667
12655
|
_pushHistory(e) {
|
|
12668
12656
|
const t = this._undoRedoService, o = this._historyStateCache.get(e);
|
|
@@ -12710,20 +12698,20 @@ let So = class extends Ct {
|
|
|
12710
12698
|
t.length = 0, this._docStateChange$.next(u);
|
|
12711
12699
|
}
|
|
12712
12700
|
};
|
|
12713
|
-
|
|
12714
|
-
un(0,
|
|
12701
|
+
Io = cf([
|
|
12702
|
+
un(0, j(xo)),
|
|
12715
12703
|
un(1, T),
|
|
12716
12704
|
un(2, L),
|
|
12717
|
-
un(3,
|
|
12705
|
+
un(3, j(tl)),
|
|
12718
12706
|
un(4, pe)
|
|
12719
|
-
],
|
|
12707
|
+
], Io);
|
|
12720
12708
|
var lf = Object.getOwnPropertyDescriptor, df = (n, e, t, o) => {
|
|
12721
12709
|
for (var r = o > 1 ? void 0 : o ? lf(e, t) : e, s = n.length - 1, i; s >= 0; s--)
|
|
12722
12710
|
(i = n[s]) && (r = i(r) || r);
|
|
12723
12711
|
return r;
|
|
12724
|
-
},
|
|
12712
|
+
}, zi = (n, e) => (t, o) => e(t, o, n);
|
|
12725
12713
|
const Gi = "univer-doc-main-canvas";
|
|
12726
|
-
let
|
|
12714
|
+
let So = class extends Ct {
|
|
12727
12715
|
constructor(n, e) {
|
|
12728
12716
|
super(), this._instanceSrv = n, this._renderManagerService = e, this._init();
|
|
12729
12717
|
}
|
|
@@ -12745,16 +12733,16 @@ let vo = class extends Ct {
|
|
|
12745
12733
|
this._renderManagerService.removeRender(e);
|
|
12746
12734
|
}
|
|
12747
12735
|
};
|
|
12748
|
-
|
|
12749
|
-
|
|
12750
|
-
|
|
12751
|
-
],
|
|
12736
|
+
So = df([
|
|
12737
|
+
zi(0, L),
|
|
12738
|
+
zi(1, pe)
|
|
12739
|
+
], So);
|
|
12752
12740
|
const Af = {
|
|
12753
12741
|
id: bn.id,
|
|
12754
12742
|
preconditions: ah,
|
|
12755
12743
|
binding: q.ENTER
|
|
12756
12744
|
}, uf = {
|
|
12757
|
-
id:
|
|
12745
|
+
id: Do.id,
|
|
12758
12746
|
preconditions: Se,
|
|
12759
12747
|
binding: q.BACKSPACE
|
|
12760
12748
|
}, hf = {
|
|
@@ -12836,29 +12824,29 @@ let Pr = class extends Zc {
|
|
|
12836
12824
|
Pi,
|
|
12837
12825
|
this._config
|
|
12838
12826
|
);
|
|
12839
|
-
i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(
|
|
12827
|
+
i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Vo, a), this._initDependencies(e), this._initializeShortcut(), this._initCommand();
|
|
12840
12828
|
}
|
|
12841
12829
|
onReady() {
|
|
12842
12830
|
this._initRenderBasics(), this._markDocAsFocused(), Vs(this._injector, [
|
|
12843
|
-
[
|
|
12844
|
-
[
|
|
12831
|
+
[Io],
|
|
12832
|
+
[So]
|
|
12845
12833
|
]);
|
|
12846
12834
|
}
|
|
12847
12835
|
onRendered() {
|
|
12848
12836
|
this._initUI(), this._initRenderModules(), Vs(this._injector, [
|
|
12837
|
+
[go],
|
|
12849
12838
|
[fo],
|
|
12850
|
-
[po],
|
|
12851
12839
|
[tn],
|
|
12852
|
-
[
|
|
12840
|
+
[po],
|
|
12853
12841
|
// FIXME: LifecycleStages.Rendered must be used, otherwise the menu cannot be added to the DOM, but the sheet ui
|
|
12854
12842
|
// plugin can be added in LifecycleStages.Ready
|
|
12855
|
-
[
|
|
12843
|
+
[Ao]
|
|
12856
12844
|
]);
|
|
12857
12845
|
}
|
|
12858
12846
|
// eslint-disable-next-line max-lines-per-function
|
|
12859
12847
|
_initCommand() {
|
|
12860
12848
|
[
|
|
12861
|
-
|
|
12849
|
+
Do,
|
|
12862
12850
|
xa,
|
|
12863
12851
|
Qt,
|
|
12864
12852
|
Ut,
|
|
@@ -12883,14 +12871,14 @@ let Pr = class extends Zc {
|
|
|
12883
12871
|
On,
|
|
12884
12872
|
yn,
|
|
12885
12873
|
Fn,
|
|
12874
|
+
Qo,
|
|
12886
12875
|
Uo,
|
|
12887
12876
|
Fo,
|
|
12888
|
-
Ho,
|
|
12889
12877
|
lt,
|
|
12890
|
-
|
|
12891
|
-
|
|
12892
|
-
za,
|
|
12878
|
+
Ho,
|
|
12879
|
+
wo,
|
|
12893
12880
|
ja,
|
|
12881
|
+
za,
|
|
12894
12882
|
Rs,
|
|
12895
12883
|
bs,
|
|
12896
12884
|
SA,
|
|
@@ -12902,15 +12890,15 @@ let Pr = class extends Zc {
|
|
|
12902
12890
|
Ms,
|
|
12903
12891
|
Ga,
|
|
12904
12892
|
Jt,
|
|
12905
|
-
|
|
12893
|
+
Mo,
|
|
12906
12894
|
bn,
|
|
12907
12895
|
gr,
|
|
12908
|
-
|
|
12909
|
-
|
|
12896
|
+
Lo,
|
|
12897
|
+
so,
|
|
12910
12898
|
Na,
|
|
12911
12899
|
La,
|
|
12912
12900
|
Ba,
|
|
12913
|
-
|
|
12901
|
+
ko,
|
|
12914
12902
|
rt,
|
|
12915
12903
|
va,
|
|
12916
12904
|
$t,
|
|
@@ -12935,7 +12923,7 @@ let Pr = class extends Zc {
|
|
|
12935
12923
|
gs,
|
|
12936
12924
|
fs,
|
|
12937
12925
|
ps,
|
|
12938
|
-
|
|
12926
|
+
io,
|
|
12939
12927
|
Ua,
|
|
12940
12928
|
Fa,
|
|
12941
12929
|
ls,
|
|
@@ -12946,7 +12934,7 @@ let Pr = class extends Zc {
|
|
|
12946
12934
|
_s
|
|
12947
12935
|
].forEach((n) => {
|
|
12948
12936
|
this.disposeWithMe(this._commandService.registerCommand(n));
|
|
12949
|
-
}), [
|
|
12937
|
+
}), [ro, rs, is].forEach((n) => this.disposeWithMe(this._commandService.registerMultipleCommand(n)));
|
|
12950
12938
|
}
|
|
12951
12939
|
_initializeShortcut() {
|
|
12952
12940
|
[
|
|
@@ -12964,25 +12952,25 @@ let Pr = class extends Zc {
|
|
|
12964
12952
|
Af,
|
|
12965
12953
|
lh
|
|
12966
12954
|
].forEach((n) => {
|
|
12967
|
-
this._injector.get(
|
|
12955
|
+
this._injector.get(To).registerShortcut(n);
|
|
12968
12956
|
});
|
|
12969
12957
|
}
|
|
12970
12958
|
_initDependencies(n) {
|
|
12971
12959
|
$c([
|
|
12972
12960
|
[sf],
|
|
12973
|
-
[Eo],
|
|
12974
|
-
[Io],
|
|
12975
|
-
[uo],
|
|
12976
|
-
[fo],
|
|
12977
12961
|
[mo],
|
|
12978
|
-
[
|
|
12962
|
+
[Eo],
|
|
12963
|
+
[Ao],
|
|
12979
12964
|
[go],
|
|
12965
|
+
[po],
|
|
12966
|
+
[fo],
|
|
12967
|
+
[ho],
|
|
12980
12968
|
[tn],
|
|
12981
12969
|
[Ge, { useClass: Sr }],
|
|
12982
12970
|
[Lt, { useClass: ur }],
|
|
12983
12971
|
[Bn],
|
|
12984
|
-
[vo],
|
|
12985
12972
|
[So],
|
|
12973
|
+
[Io],
|
|
12986
12974
|
[Pt],
|
|
12987
12975
|
[at]
|
|
12988
12976
|
], this._config.override).forEach((t) => n.add(t));
|
|
@@ -12999,7 +12987,7 @@ let Pr = class extends Zc {
|
|
|
12999
12987
|
}
|
|
13000
12988
|
}
|
|
13001
12989
|
_initUI() {
|
|
13002
|
-
this._injector.get(
|
|
12990
|
+
this._injector.get(ho);
|
|
13003
12991
|
}
|
|
13004
12992
|
_initRenderBasics() {
|
|
13005
12993
|
[
|
|
@@ -13007,7 +12995,7 @@ let Pr = class extends Zc {
|
|
|
13007
12995
|
[Re],
|
|
13008
12996
|
[nl],
|
|
13009
12997
|
[ws],
|
|
13010
|
-
[
|
|
12998
|
+
[No],
|
|
13011
12999
|
[br],
|
|
13012
13000
|
[Dr]
|
|
13013
13001
|
].forEach((n) => {
|
|
@@ -13017,18 +13005,18 @@ let Pr = class extends Zc {
|
|
|
13017
13005
|
_initRenderModules() {
|
|
13018
13006
|
[
|
|
13019
13007
|
[wt],
|
|
13008
|
+
[co],
|
|
13020
13009
|
[lo],
|
|
13021
|
-
[
|
|
13022
|
-
[ho],
|
|
13010
|
+
[uo],
|
|
13023
13011
|
[_r],
|
|
13024
13012
|
[Cr],
|
|
13025
13013
|
[Mr],
|
|
13026
13014
|
[Or],
|
|
13027
13015
|
[yr],
|
|
13028
|
-
[
|
|
13016
|
+
[mo],
|
|
13029
13017
|
[Br],
|
|
13030
13018
|
[Tr],
|
|
13031
|
-
[
|
|
13019
|
+
[Eo]
|
|
13032
13020
|
].forEach((n) => {
|
|
13033
13021
|
this._renderManagerSrv.registerRenderModule(_.UNIVER_DOC, n);
|
|
13034
13022
|
});
|
|
@@ -13037,14 +13025,14 @@ let Pr = class extends Zc {
|
|
|
13037
13025
|
Of(Pr, "pluginName", sd);
|
|
13038
13026
|
Pr = yf([
|
|
13039
13027
|
Xc(Il),
|
|
13040
|
-
hn(1,
|
|
13028
|
+
hn(1, j(Dn)),
|
|
13041
13029
|
hn(2, pe),
|
|
13042
13030
|
hn(3, T),
|
|
13043
13031
|
hn(4, Qr),
|
|
13044
13032
|
hn(5, Vr)
|
|
13045
13033
|
], Pr);
|
|
13046
13034
|
function Tf(n, e, t) {
|
|
13047
|
-
const o = J(T), r = J(
|
|
13035
|
+
const o = J(T), r = J(To), s = Te(() => ge(4), []);
|
|
13048
13036
|
Ce(() => {
|
|
13049
13037
|
if (!t || !n || !e)
|
|
13050
13038
|
return;
|
|
@@ -13062,7 +13050,7 @@ function Tf(n, e, t) {
|
|
|
13062
13050
|
preconditions: () => !0,
|
|
13063
13051
|
priority: 901,
|
|
13064
13052
|
staticParameters: {
|
|
13065
|
-
eventType:
|
|
13053
|
+
eventType: ra.Keyboard,
|
|
13066
13054
|
keyCode: d.keyCode,
|
|
13067
13055
|
metaKey: d.metaKey
|
|
13068
13056
|
}
|
|
@@ -13171,7 +13159,7 @@ function Mf(n) {
|
|
|
13171
13159
|
}, []), a;
|
|
13172
13160
|
}
|
|
13173
13161
|
const _f = (n, e, t, o) => {
|
|
13174
|
-
const r = J(T), s = J(
|
|
13162
|
+
const r = J(T), s = J(To), i = ke(e);
|
|
13175
13163
|
i.current = e;
|
|
13176
13164
|
const a = ke(o);
|
|
13177
13165
|
a.current = o, Ce(() => {
|
|
@@ -13219,7 +13207,7 @@ const _f = (n, e, t, o) => {
|
|
|
13219
13207
|
preconditions: () => !0,
|
|
13220
13208
|
priority: 900,
|
|
13221
13209
|
staticParameters: {
|
|
13222
|
-
eventType:
|
|
13210
|
+
eventType: ra.Keyboard,
|
|
13223
13211
|
keyCode: u
|
|
13224
13212
|
}
|
|
13225
13213
|
})).forEach((u) => {
|
|
@@ -13238,7 +13226,7 @@ function Df(n, e) {
|
|
|
13238
13226
|
if (r.id === X.id) {
|
|
13239
13227
|
if (r.params.unitId !== n.getEditorId()) return;
|
|
13240
13228
|
const c = n.getDocumentData();
|
|
13241
|
-
e(c,
|
|
13229
|
+
e(c, to((i = (s = c.body) == null ? void 0 : s.dataStream) != null ? i : ""));
|
|
13242
13230
|
}
|
|
13243
13231
|
});
|
|
13244
13232
|
return () => {
|
|
@@ -13288,7 +13276,7 @@ const Zf = (n) => {
|
|
|
13288
13276
|
const U = mn((k) => {
|
|
13289
13277
|
var ae, oe;
|
|
13290
13278
|
const ne = y == null ? void 0 : y.with(de), ie = ne == null ? void 0 : ne.getSkeleton().getActualSize();
|
|
13291
|
-
ie && (A == null || A(ie.actualHeight), E(Math.max(u, Math.min(ie.actualHeight + 10, g)))), h == null || h(k,
|
|
13279
|
+
ie && (A == null || A(ie.actualHeight), E(Math.max(u, Math.min(ie.actualHeight + 10, g)))), h == null || h(k, to((oe = (ae = k.body) == null ? void 0 : ae.dataStream) != null ? oe : "")), $();
|
|
13292
13280
|
});
|
|
13293
13281
|
return Ce(() => {
|
|
13294
13282
|
var ne, ie;
|
|
@@ -13301,7 +13289,7 @@ const Zf = (n) => {
|
|
|
13301
13289
|
}, [C]), et(C == null ? void 0 : C.blur$), et(C == null ? void 0 : C.focus$), Ce(() => {
|
|
13302
13290
|
var ne, ie;
|
|
13303
13291
|
const k = C == null ? void 0 : C.getDocumentData();
|
|
13304
|
-
S == null || S(F,
|
|
13292
|
+
S == null || S(F, to((ie = (ne = k == null ? void 0 : k.body) == null ? void 0 : ne.dataStream) != null ? ie : ""));
|
|
13305
13293
|
}, [F, S]), Ce(() => {
|
|
13306
13294
|
const k = (ie) => {
|
|
13307
13295
|
var oe, he;
|
|
@@ -13315,7 +13303,7 @@ const Zf = (n) => {
|
|
|
13315
13303
|
}, [C, x, I, v]), _f(F && a, !1, C), Tf(F, i, C), Df(C, U), /* @__PURE__ */ Q("div", { className: e, style: c, children: /* @__PURE__ */ re(
|
|
13316
13304
|
"div",
|
|
13317
13305
|
{
|
|
13318
|
-
className:
|
|
13306
|
+
className: ze("univer-relative univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-around univer-gap-2 univer-rounded-md univer-pb-0.5 univer-pl-1.5 univer-pr-2 univer-pt-1.5", Nn, {
|
|
13319
13307
|
"univer-border-primary-500": F
|
|
13320
13308
|
}),
|
|
13321
13309
|
style: { height: R },
|
|
@@ -13342,25 +13330,25 @@ const Zf = (n) => {
|
|
|
13342
13330
|
) });
|
|
13343
13331
|
};
|
|
13344
13332
|
export {
|
|
13345
|
-
|
|
13346
|
-
|
|
13347
|
-
|
|
13348
|
-
|
|
13333
|
+
Mo as AfterSpaceCommand,
|
|
13334
|
+
Uo as AlignCenterCommand,
|
|
13335
|
+
Ho as AlignJustifyCommand,
|
|
13336
|
+
Qo as AlignLeftCommand,
|
|
13349
13337
|
lt as AlignOperationCommand,
|
|
13350
|
-
|
|
13338
|
+
Fo as AlignRightCommand,
|
|
13351
13339
|
Gr as BreakLineCommand,
|
|
13352
13340
|
yn as BulletListCommand,
|
|
13353
13341
|
gr as ChangeListNestingLevelCommand,
|
|
13354
13342
|
qn as ChangeListNestingLevelType,
|
|
13355
|
-
|
|
13356
|
-
|
|
13343
|
+
Lo as ChangeListTypeCommand,
|
|
13344
|
+
so as CheckListCommand,
|
|
13357
13345
|
Xd as CoverContentCommand,
|
|
13358
|
-
|
|
13346
|
+
ja as CreateDocTableCommand,
|
|
13359
13347
|
$t as CutContentCommand,
|
|
13360
13348
|
id as DOCS_COMPONENT_BACKGROUND_LAYER_INDEX,
|
|
13361
13349
|
$s as DOCS_COMPONENT_DEFAULT_Z_INDEX,
|
|
13362
13350
|
ad as DOCS_COMPONENT_HEADER_LAYER_INDEX,
|
|
13363
|
-
|
|
13351
|
+
zo as DOCS_COMPONENT_MAIN_LAYER_INDEX,
|
|
13364
13352
|
$e as DOCS_VIEW_KEY,
|
|
13365
13353
|
sd as DOC_UI_PLUGIN_NAME,
|
|
13366
13354
|
Ti as DOC_VERTICAL_PADDING,
|
|
@@ -13368,22 +13356,22 @@ export {
|
|
|
13368
13356
|
od as DefaultToolbarConfig,
|
|
13369
13357
|
xn as DeleteCommand,
|
|
13370
13358
|
Zr as DeleteCustomBlockCommand,
|
|
13371
|
-
|
|
13359
|
+
Do as DeleteLeftCommand,
|
|
13372
13360
|
xa as DeleteRightCommand,
|
|
13373
13361
|
Pt as DocAutoFormatService,
|
|
13374
|
-
|
|
13362
|
+
uo as DocBackScrollRenderController,
|
|
13375
13363
|
Bn as DocCanvasPopManagerService,
|
|
13376
|
-
|
|
13364
|
+
ro as DocCopyCommand,
|
|
13377
13365
|
Os as DocCreateTableOperation,
|
|
13378
13366
|
rs as DocCutCommand,
|
|
13379
13367
|
wt as DocEventManagerService,
|
|
13380
|
-
|
|
13368
|
+
No as DocIMEInputManagerService,
|
|
13381
13369
|
is as DocPasteCommand,
|
|
13382
13370
|
sf as DocPrintInterceptorService,
|
|
13383
13371
|
br as DocRenderController,
|
|
13384
13372
|
Ta as DocSelectAllCommand,
|
|
13385
13373
|
Re as DocSelectionRenderService,
|
|
13386
|
-
|
|
13374
|
+
Io as DocStateChangeManagerService,
|
|
13387
13375
|
Ss as DocTableDeleteColumnsCommand,
|
|
13388
13376
|
Is as DocTableDeleteRowsCommand,
|
|
13389
13377
|
Hn as DocTableDeleteTableCommand,
|
|
@@ -13392,16 +13380,16 @@ export {
|
|
|
13392
13380
|
ys as DocTableInsertColumnRightCommand,
|
|
13393
13381
|
Rs as DocTableInsertRowAboveCommand,
|
|
13394
13382
|
bs as DocTableInsertRowBellowCommand,
|
|
13395
|
-
|
|
13383
|
+
za as DocTableInsertRowCommand,
|
|
13396
13384
|
Ga as DocTableTabCommand,
|
|
13397
|
-
|
|
13398
|
-
|
|
13385
|
+
Ao as DocUIController,
|
|
13386
|
+
So as DocsRenderService,
|
|
13399
13387
|
ug as DocsUIMenuSchema,
|
|
13400
13388
|
HA as Editor,
|
|
13401
13389
|
_d as EditorInsertTextCommandId,
|
|
13402
13390
|
Sr as EditorService,
|
|
13403
13391
|
bn as EnterCommand,
|
|
13404
|
-
|
|
13392
|
+
wo as HorizontalLineCommand,
|
|
13405
13393
|
Lt as IDocClipboardService,
|
|
13406
13394
|
Ge as IEditorService,
|
|
13407
13395
|
Ba as IMEInputCommand,
|
|
@@ -13412,7 +13400,7 @@ export {
|
|
|
13412
13400
|
Jr as MergeTwoParagraphCommand,
|
|
13413
13401
|
St as MoveCursorOperation,
|
|
13414
13402
|
vt as MoveSelectionOperation,
|
|
13415
|
-
|
|
13403
|
+
jf as NORMAL_TEXT_SELECTION_PLUGIN_NAME,
|
|
13416
13404
|
It as NodePositionConvertToCursor,
|
|
13417
13405
|
Va as NodePositionConvertToRectRange,
|
|
13418
13406
|
On as OrderListCommand,
|
|
@@ -13441,7 +13429,7 @@ export {
|
|
|
13441
13429
|
mt as SetInlineFormatTextColorCommand,
|
|
13442
13430
|
Ft as SetInlineFormatUnderlineCommand,
|
|
13443
13431
|
Xe as SetParagraphNamedStyleCommand,
|
|
13444
|
-
|
|
13432
|
+
ko as SwitchDocModeCommand,
|
|
13445
13433
|
mr as TEXT_RANGE_LAYER_INDEX,
|
|
13446
13434
|
Jt as TabCommand,
|
|
13447
13435
|
Zt as TextRange,
|
|
@@ -13451,9 +13439,9 @@ export {
|
|
|
13451
13439
|
We as VIEWPORT_KEY,
|
|
13452
13440
|
Gf as addCustomDecorationBySelectionFactory,
|
|
13453
13441
|
ld as addCustomDecorationFactory,
|
|
13454
|
-
|
|
13442
|
+
nr as calcDocRangePositions,
|
|
13455
13443
|
Wd as convertBodyToHtml,
|
|
13456
|
-
|
|
13444
|
+
Jo as convertPositionsToRectRanges,
|
|
13457
13445
|
Yf as deleteCustomDecorationFactory,
|
|
13458
13446
|
qf as docDrawingPositionToTransform,
|
|
13459
13447
|
Ea as genTableSource,
|
|
@@ -13465,7 +13453,7 @@ export {
|
|
|
13465
13453
|
bd as getCustomBlockIdsInSelections,
|
|
13466
13454
|
Md as getCutActionsFromDocRanges,
|
|
13467
13455
|
cd as getDocObject,
|
|
13468
|
-
|
|
13456
|
+
zf as getDocObjectById,
|
|
13469
13457
|
Kr as getEmptyTableCell,
|
|
13470
13458
|
qr as getEmptyTableRow,
|
|
13471
13459
|
Es as getLineBounding,
|