@univerjs/docs-ui 0.5.3 → 0.5.4
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 +13 -13
- package/lib/es/facade.js +4 -6
- package/lib/es/index.js +408 -408
- package/lib/types/facade/f-document.d.ts +1 -3
- package/lib/umd/index.js +14 -14
- package/package.json +13 -12
package/lib/es/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
var ec = Object.defineProperty;
|
|
2
2
|
var tc = (n, e, t) => e in n ? ec(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
3
|
var b = (n, e, t) => tc(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { Inject as k, Disposable as me, toDisposable as Ao, UniverInstanceType as P, BuildTextUtils as Qe, IUniverInstanceService as Q, JSONX as V, ObjectRelativeFromH as uo, ObjectRelativeFromV as St, CommandType as N, ICommandService as T, Tools as K, IUndoRedoService as ho, TextX as
|
|
5
|
-
import { DocSelectionManagerService as W, RichTextEditingMutation as X, DocSkeletonManagerService as de, SetTextSelectionsOperation as Ve, DocStateEmitService as
|
|
6
|
-
import { IRenderManagerService as Re, Liquid as Qi, GlyphType as Ui, DocumentSkeletonPageType as be, getPageFromPath as ts, getTableIdAndSliceIndex as _r, NORMAL_TEXT_SELECTION_PLUGIN_STYLE as
|
|
4
|
+
import { Inject as k, Disposable as me, toDisposable as Ao, UniverInstanceType as P, BuildTextUtils as Qe, IUniverInstanceService as Q, JSONX as V, ObjectRelativeFromH as uo, ObjectRelativeFromV as St, CommandType as N, ICommandService as T, Tools as K, IUndoRedoService as ho, TextX as ve, TextXActionType as j, DOC_RANGE_TYPE as dt, RANGE_DIRECTION as Pe, COLORS as pn, BooleanNumber as L, Rectangle as nc, RxDisposable as vt, DataStreamTreeTokenType as U, ILogService as Ts, DEFAULT_STYLES as Bs, createIdentifier as _s, EDITOR_ACTIVATED as En, FOCUSING_EDITOR_STANDALONE as No, isInternalEditorID as go, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE as $o, FOCUSING_EDITOR_INPUT_FORMULA as oc, DEFAULT_EMPTY_DOCUMENT_VALUE as Ms, VerticalAlign as sc, HorizontalAlign as Le, IContextService as Ps, DocumentFlavor as De, useDependency as se, LocaleService as Xe, debounce as es, PresetListType as we, sequenceExecuteAsync as Ds, FOCUSING_DOC as Tn, FOCUSING_UNIVER_EDITOR as ws, FOCUSING_COMMON_DRAWINGS as _i, MemoryCursor as Qt, BaselineOffset as je, getBodySlice as Mi, PRESET_LIST_TYPE as rc, GridType as ic, sortRulesFactory as ac, UpdateDocsAttributeType as fo, useObservable as Pi, TableRowHeightRule as cc, TableSizeType as Di, generateRandomId as In, TableAlignmentType as lc, TableTextWrapType as Ac, SHEET_EDITOR_UNITS as Ns, PositionedObjectLayoutType as po, LRUMap as dc, ColorKit as br, DrawingTypeEnum as Qs, skipParseTagNames as uc, CustomRangeType as wi, DataStreamTreeNodeType as An, SliceBodyType as xr, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as Us, normalizeBody as hc, SpacingRule as Yt, ThemeService as Ni, DOCS_ZEN_EDITOR_UNIT_ID_KEY as gt, Injector as mo, connectInjector as gc, IConfigService as Ls, QuickListTypeMap as Qo, Direction as ce, DisposableCollection as Or, fromEventSubject as mn, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as fc, checkForSubstrings as pc, UndoCommandId as yr, RedoCommandId as Tr, DependentOn as mc, Plugin as Sc, merge as Ec, touchDependencies as Br, mergeOverrideWithDependencies as Ic } from "@univerjs/core";
|
|
5
|
+
import { DocSelectionManagerService as W, RichTextEditingMutation as X, DocSkeletonManagerService as de, SetTextSelectionsOperation as Ve, DocStateEmitService as Cc, DocInterceptorService as vc } from "@univerjs/docs";
|
|
6
|
+
import { IRenderManagerService as Re, Liquid as Qi, GlyphType as Ui, DocumentSkeletonPageType as be, getPageFromPath as ts, getTableIdAndSliceIndex as _r, NORMAL_TEXT_SELECTION_PLUGIN_STYLE as Cn, getColor as Sn, RegularPolygon as Li, Rect as jn, getOffsetRectForDom as Rc, ScrollTimer as bc, CURSOR_TYPE as Mt, getSystemHighlightColor as xc, Vector2 as vn, PageLayoutType as Rn, DocumentEditArea as Se, Shape as Oc, Path as Mr, getCharSpaceApply as yc, getNumberUnitValue as nt, hasListGlyph as Tc, isIndentByGlyph as Bc, isFirstGlyph as _c, getParagraphByGlyph as Mc, pixelToPt as Pc, ptToPixel as Pr, parseDataStreamToTree as Dc, Viewport as wc, ScrollBar as ns, Layer as Dr, Documents as Nc, DocBackground as Qc, lineIterator as Uc, getLastColumn as Lc, getLastLine as Fc, pxToNum as Fi, TRANSFORM_CHANGE_OBSERVABLE_TYPE as Hi, UniverRenderEnginePlugin as Hc } from "@univerjs/engine-render";
|
|
7
7
|
import * as Vc from "react";
|
|
8
8
|
import kc, { useState as he, useRef as et, useEffect as Oe, forwardRef as st, createElement as rt, useMemo as Pt, useCallback as jc } from "react";
|
|
9
9
|
import { LexerTreeBuilder as Wc, operatorToken as zc, isReferenceStrings as Yc, serializeRange as Gc, serializeRangeWithSheet as qc, serializeRangeWithSpreadsheet as Kc, isReferenceStringWithEffectiveColumn as wr, getRangeWithRefsString as Xc } from "@univerjs/engine-formula";
|
|
10
10
|
import { Subject as le, BehaviorSubject as qe, takeUntil as Et, fromEvent as Ge, merge as Jc, combineLatest as So, Observable as Ee, map as Bn, distinctUntilChanged as Nr, filter as os, throttleTime as Vi, switchMap as Zc, take as $c, animationFrameScheduler as el } from "rxjs";
|
|
11
11
|
import { ILayoutService as Fs, KeyCode as ae, useEvent as tl, ComponentManager as Eo, ISidebarService as ki, MetaKeys as ge, IClipboardInterfaceService as ji, FILE_PNG_CLIPBOARD_MIME_TYPE as Wi, FILE__WEBP_CLIPBOARD_MIME_TYPE as zi, FILE__JPEG_CLIPBOARD_MIME_TYPE as Yi, FILE__BMP_CLIPBOARD_MIME_TYPE as Gi, HTML_CLIPBOARD_MIME_TYPE as qi, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as Ki, CopyCommand as nl, CutCommand as ol, PasteCommand as sl, IConfirmService as rl, MenuItemType as J, getMenuHiddenObservable as ee, FONT_FAMILY_LIST as il, FONT_SIZE_LIST as al, RibbonStartGroup as Qr, ContextMenuPosition as Xi, ContextMenuGroup as Ur, FontFamily as cl, FontFamilyItem as ll, FontSize as Al, BuiltInUIPart as dl, IMenuManagerService as ul, IUIPartsService as hl, IShortcutService as Ji, ICanvasPopupService as gl, IContextMenuService as fl } from "@univerjs/ui";
|
|
12
12
|
import { filter as ss, bufferTime as pl, map as ml } from "rxjs/operators";
|
|
13
|
-
import { Tooltip as Zi, Dialog as Sl, Button as Wn, Input as El, Checkbox as Lr, InputNumber as bn, Slider as Il, Select as
|
|
13
|
+
import { Tooltip as Zi, Dialog as Sl, Button as Wn, Input as El, Checkbox as Lr, InputNumber as bn, Slider as Il, Select as Cl, ColorPicker as vl } from "@univerjs/design";
|
|
14
14
|
import { ImageSourceType as Hs } from "@univerjs/drawing";
|
|
15
15
|
var Rl = Object.defineProperty, bl = Object.getOwnPropertyDescriptor, xl = (n, e, t, o) => {
|
|
16
16
|
for (var s = o > 1 ? void 0 : o ? bl(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
@@ -318,10 +318,10 @@ const $i = {
|
|
|
318
318
|
return !1;
|
|
319
319
|
const { body: h, tableSource: u, footers: f, headers: g, lists: p, drawings: m, drawingsOrder: S } = o, {
|
|
320
320
|
body: I,
|
|
321
|
-
tableSource:
|
|
321
|
+
tableSource: v,
|
|
322
322
|
footers: R,
|
|
323
323
|
headers: E,
|
|
324
|
-
lists:
|
|
324
|
+
lists: C,
|
|
325
325
|
drawings: y,
|
|
326
326
|
drawingsOrder: O
|
|
327
327
|
} = d;
|
|
@@ -346,8 +346,8 @@ const $i = {
|
|
|
346
346
|
const w = _.replaceOp(["body"], I, h);
|
|
347
347
|
w != null && x.push(w);
|
|
348
348
|
}
|
|
349
|
-
if (!K.diffValue(u,
|
|
350
|
-
const w = _.replaceOp(["tableSource"],
|
|
349
|
+
if (!K.diffValue(u, v)) {
|
|
350
|
+
const w = _.replaceOp(["tableSource"], v, u);
|
|
351
351
|
w != null && x.push(w);
|
|
352
352
|
}
|
|
353
353
|
if (!K.diffValue(f, R)) {
|
|
@@ -358,8 +358,8 @@ const $i = {
|
|
|
358
358
|
const w = _.replaceOp(["headers"], E, g);
|
|
359
359
|
w != null && x.push(w);
|
|
360
360
|
}
|
|
361
|
-
if (!K.diffValue(p,
|
|
362
|
-
const w = _.replaceOp(["lists"],
|
|
361
|
+
if (!K.diffValue(p, C)) {
|
|
362
|
+
const w = _.replaceOp(["lists"], C, p);
|
|
363
363
|
w != null && x.push(w);
|
|
364
364
|
}
|
|
365
365
|
if (!K.diffValue(m, y)) {
|
|
@@ -400,7 +400,7 @@ const $i = {
|
|
|
400
400
|
}
|
|
401
401
|
};
|
|
402
402
|
function Ll(n, e, t, o) {
|
|
403
|
-
const s = new
|
|
403
|
+
const s = new ve(), r = V.getInstance(), i = (t == null ? void 0 : t.dataStream.length) - 2;
|
|
404
404
|
i > 0 && s.push({
|
|
405
405
|
t: j.DELETE,
|
|
406
406
|
len: i
|
|
@@ -486,7 +486,7 @@ function is(n) {
|
|
|
486
486
|
y: t
|
|
487
487
|
}), r;
|
|
488
488
|
}
|
|
489
|
-
class
|
|
489
|
+
class Ct {
|
|
490
490
|
constructor(e, t) {
|
|
491
491
|
b(this, "_liquid", new Qi());
|
|
492
492
|
b(this, "_currentStartState", {
|
|
@@ -526,36 +526,36 @@ class vt {
|
|
|
526
526
|
);
|
|
527
527
|
const { start: a, end: c } = rs(e, t);
|
|
528
528
|
return this._selectionIterator(a, c, (l, A, d, h, u, f) => {
|
|
529
|
-
const { lineHeight: g, asc: p, paddingTop: m, marginTop: S, marginBottom: I } = f, { glyphGroup:
|
|
530
|
-
if (
|
|
529
|
+
const { lineHeight: g, asc: p, paddingTop: m, marginTop: S, marginBottom: I } = f, { glyphGroup: v, st: R } = u;
|
|
530
|
+
if (v.length === 0)
|
|
531
531
|
return;
|
|
532
|
-
const { x: E, y:
|
|
532
|
+
const { x: E, y: C } = this._liquid;
|
|
533
533
|
let y, O;
|
|
534
|
-
const D =
|
|
535
|
-
if (l === 0 && A ===
|
|
534
|
+
const D = v[l], x = v[A], _ = v[l - 1], M = (D == null ? void 0 : D.left) || 0, w = (D == null ? void 0 : D.width) || 0, F = (x == null ? void 0 : x.left) || 0, H = (x == null ? void 0 : x.width) || 0, te = (D == null ? void 0 : D.glyphType) === Ui.LIST, { startOffset: Z, endOffset: G } = Fl(v, l, A, R), z = a.glyph === l && d ? a.isBack : !0, ne = c.glyph === A && h ? c.isBack : !1, ue = a === c, re = z && _ != null ? _ : D;
|
|
535
|
+
if (l === 0 && A === v.length - 1)
|
|
536
536
|
y = {
|
|
537
537
|
startX: E + M + (te ? w : 0),
|
|
538
|
-
startY:
|
|
538
|
+
startY: C,
|
|
539
539
|
endX: E + F + (ne ? 0 : H),
|
|
540
|
-
endY:
|
|
540
|
+
endY: C + g - S - I
|
|
541
541
|
}, O = {
|
|
542
542
|
startX: E + M + (te ? w : 0),
|
|
543
|
-
startY:
|
|
543
|
+
startY: C + m + p - re.bBox.ba,
|
|
544
544
|
endX: E + F + (ne ? 0 : H),
|
|
545
|
-
endY:
|
|
545
|
+
endY: C + m + p + re.bBox.bd
|
|
546
546
|
};
|
|
547
547
|
else {
|
|
548
548
|
const Y = z && !te;
|
|
549
549
|
y = {
|
|
550
550
|
startX: E + M + (Y ? 0 : w),
|
|
551
|
-
startY:
|
|
551
|
+
startY: C,
|
|
552
552
|
endX: E + F + (ne ? 0 : H),
|
|
553
|
-
endY:
|
|
553
|
+
endY: C + g - S - I
|
|
554
554
|
}, O = {
|
|
555
555
|
startX: E + M + (Y ? 0 : w),
|
|
556
|
-
startY:
|
|
556
|
+
startY: C + m + p - re.bBox.ba,
|
|
557
557
|
endX: E + F + (ne ? 0 : H),
|
|
558
|
-
endY:
|
|
558
|
+
endY: C + m + p + re.bBox.bd
|
|
559
559
|
};
|
|
560
560
|
}
|
|
561
561
|
o.push(is(y)), s.push(is(O)), r.push({
|
|
@@ -626,7 +626,7 @@ class vt {
|
|
|
626
626
|
}
|
|
627
627
|
// eslint-disable-next-line max-lines-per-function, complexity
|
|
628
628
|
_selectionIterator(e, t, o) {
|
|
629
|
-
var
|
|
629
|
+
var v, R;
|
|
630
630
|
const s = this._docSkeleton;
|
|
631
631
|
if (!s)
|
|
632
632
|
return [];
|
|
@@ -640,15 +640,15 @@ class vt {
|
|
|
640
640
|
return [];
|
|
641
641
|
const { pageLayoutType: g, pageMarginLeft: p, pageMarginTop: m } = this._documentOffsetConfig, S = r === be.BODY || r === be.CELL ? d : h;
|
|
642
642
|
for (let E = 0; E < S; E++) {
|
|
643
|
-
const
|
|
644
|
-
this._liquid.translatePage(
|
|
643
|
+
const C = c[E];
|
|
644
|
+
this._liquid.translatePage(C, g, p, m);
|
|
645
645
|
}
|
|
646
646
|
const I = r === be.BODY || r === be.CELL ? u : f;
|
|
647
647
|
for (let E = S; E <= I; E++) {
|
|
648
|
-
const
|
|
649
|
-
let x =
|
|
650
|
-
if (r === be.HEADER ? x = (
|
|
651
|
-
this._liquid.translatePage(
|
|
648
|
+
const C = c[E], { headerId: y, footerId: O, pageWidth: D } = C;
|
|
649
|
+
let x = C;
|
|
650
|
+
if (r === be.HEADER ? x = (v = l.get(y)) == null ? void 0 : v.get(D) : r === be.FOOTER ? x = (R = A.get(O)) == null ? void 0 : R.get(D) : r === be.CELL && (x = ts(a, i)), x == null) {
|
|
651
|
+
this._liquid.translatePage(C, g, p, m);
|
|
652
652
|
continue;
|
|
653
653
|
}
|
|
654
654
|
const _ = x.sections, { start_next: M, end_next: w } = this._getSelectionRuler(
|
|
@@ -662,23 +662,23 @@ class vt {
|
|
|
662
662
|
case be.HEADER:
|
|
663
663
|
this._liquid.translatePagePadding({
|
|
664
664
|
...x,
|
|
665
|
-
marginLeft:
|
|
665
|
+
marginLeft: C.marginLeft
|
|
666
666
|
// Because header or footer margin Left is 0.
|
|
667
667
|
});
|
|
668
668
|
break;
|
|
669
669
|
case be.FOOTER: {
|
|
670
|
-
const F =
|
|
671
|
-
this._liquid.translate(
|
|
670
|
+
const F = C.pageHeight - x.height - x.marginBottom;
|
|
671
|
+
this._liquid.translate(C.marginLeft, F);
|
|
672
672
|
break;
|
|
673
673
|
}
|
|
674
674
|
case be.CELL: {
|
|
675
|
-
this._liquid.translatePagePadding(
|
|
675
|
+
this._liquid.translatePagePadding(C);
|
|
676
676
|
const F = x.parent, H = F.parent, { left: te } = x, { top: Z, left: G } = H, { top: z } = F;
|
|
677
677
|
this._liquid.translate(G + te, Z + z), this._liquid.translatePagePadding(x);
|
|
678
678
|
break;
|
|
679
679
|
}
|
|
680
680
|
default:
|
|
681
|
-
this._liquid.translatePagePadding(
|
|
681
|
+
this._liquid.translatePagePadding(C);
|
|
682
682
|
break;
|
|
683
683
|
}
|
|
684
684
|
for (let F = M; F <= w; F++) {
|
|
@@ -725,7 +725,7 @@ class vt {
|
|
|
725
725
|
}
|
|
726
726
|
}
|
|
727
727
|
}
|
|
728
|
-
this._liquid.translateRestore(), this._liquid.translatePage(
|
|
728
|
+
this._liquid.translateRestore(), this._liquid.translatePage(C, g, p, m);
|
|
729
729
|
}
|
|
730
730
|
}
|
|
731
731
|
}
|
|
@@ -744,11 +744,11 @@ function na(n, e) {
|
|
|
744
744
|
return t.indexOf("cells") === -1 || o.indexOf("cells") === -1 || t.length !== o.length ? !1 : K.diffValue(t, o);
|
|
745
745
|
}
|
|
746
746
|
function oa(n, e, t) {
|
|
747
|
-
var u, f, g, p, m, S, I,
|
|
747
|
+
var u, f, g, p, m, S, I, v;
|
|
748
748
|
const { path: o } = e, { path: s } = t;
|
|
749
749
|
if (o.indexOf("cells") === -1 || s.indexOf("cells") === -1)
|
|
750
750
|
return !1;
|
|
751
|
-
const r = n.findGlyphByPosition(e), i = n.findGlyphByPosition(t), a = (p = (g = (f = (u = r == null ? void 0 : r.parent) == null ? void 0 : u.parent) == null ? void 0 : f.parent) == null ? void 0 : g.parent) == null ? void 0 : p.parent, c = (
|
|
751
|
+
const r = n.findGlyphByPosition(e), i = n.findGlyphByPosition(t), a = (p = (g = (f = (u = r == null ? void 0 : r.parent) == null ? void 0 : u.parent) == null ? void 0 : f.parent) == null ? void 0 : g.parent) == null ? void 0 : p.parent, c = (v = (I = (S = (m = i == null ? void 0 : i.parent) == null ? void 0 : m.parent) == null ? void 0 : S.parent) == null ? void 0 : I.parent) == null ? void 0 : v.parent;
|
|
752
752
|
if (a == null || c == null)
|
|
753
753
|
return !1;
|
|
754
754
|
const l = a.parent, A = c.parent, d = l.cells.indexOf(a), h = A.cells.indexOf(c);
|
|
@@ -797,24 +797,24 @@ class sa {
|
|
|
797
797
|
} = A;
|
|
798
798
|
this._liquid.reset();
|
|
799
799
|
const { pageLayoutType: p, pageMarginLeft: m, pageMarginTop: S } = this._documentOffsetConfig, I = l === be.BODY || l === be.CELL ? c : a;
|
|
800
|
-
for (let
|
|
801
|
-
const R = i[
|
|
800
|
+
for (let v = 0; v < I; v++) {
|
|
801
|
+
const R = i[v];
|
|
802
802
|
this._liquid.translatePage(R, p, m, S);
|
|
803
803
|
}
|
|
804
|
-
for (let
|
|
805
|
-
const R = i[
|
|
804
|
+
for (let v = I; v < i.length; v++) {
|
|
805
|
+
const R = i[v];
|
|
806
806
|
this._liquid.translatePagePadding(R);
|
|
807
807
|
const { skeTables: E } = R;
|
|
808
|
-
let
|
|
808
|
+
let C = null;
|
|
809
809
|
for (const [x, _] of E.entries())
|
|
810
|
-
x.startsWith(d) && (
|
|
811
|
-
if (
|
|
810
|
+
x.startsWith(d) && (C = _);
|
|
811
|
+
if (C == null) {
|
|
812
812
|
this._liquid.restorePagePadding(R), this._liquid.translatePage(R, p, m, S);
|
|
813
813
|
continue;
|
|
814
814
|
}
|
|
815
|
-
this._liquid.translateSave(), this._liquid.translate(0,
|
|
816
|
-
const { x: y, y: O } = this._liquid, { left: D } =
|
|
817
|
-
for (const x of
|
|
815
|
+
this._liquid.translateSave(), this._liquid.translate(0, C.top);
|
|
816
|
+
const { x: y, y: O } = this._liquid, { left: D } = C;
|
|
817
|
+
for (const x of C.rows)
|
|
818
818
|
if (x.index >= h && x.index <= f) {
|
|
819
819
|
const _ = Vl(x.cells, u, g);
|
|
820
820
|
if (_ == null)
|
|
@@ -859,12 +859,12 @@ class sa {
|
|
|
859
859
|
});
|
|
860
860
|
} else
|
|
861
861
|
for (let p = l; p <= d; p++) {
|
|
862
|
-
const m = u.children[p], S = m.children[A], I = m.children[h],
|
|
863
|
-
if (
|
|
862
|
+
const m = u.children[p], S = m.children[A], I = m.children[h], v = this._docSkeleton.findNodePositionByCharIndex(S.startIndex + 1), R = this._docSkeleton.findNodePositionByCharIndex(I.endIndex - 2);
|
|
863
|
+
if (v == null || R == null)
|
|
864
864
|
return;
|
|
865
865
|
o.push({
|
|
866
|
-
anchor: i ?
|
|
867
|
-
focus: i ? R :
|
|
866
|
+
anchor: i ? v : R,
|
|
867
|
+
focus: i ? R : v
|
|
868
868
|
});
|
|
869
869
|
}
|
|
870
870
|
return o;
|
|
@@ -911,7 +911,7 @@ function Ws(n) {
|
|
|
911
911
|
});
|
|
912
912
|
}
|
|
913
913
|
class Gt {
|
|
914
|
-
constructor(e, t, o, s, r, i =
|
|
914
|
+
constructor(e, t, o, s, r, i = Cn, a = "", c = -1) {
|
|
915
915
|
b(this, "rangeType", dt.TEXT);
|
|
916
916
|
// Identifies whether the range is the current one, most of which is the last range.
|
|
917
917
|
b(this, "_current", !1);
|
|
@@ -984,7 +984,7 @@ class Gt {
|
|
|
984
984
|
const e = this.anchorNodePosition, t = this.focusNodePosition;
|
|
985
985
|
if (this._isEmpty())
|
|
986
986
|
return;
|
|
987
|
-
const o = this._document.getOffsetConfig(), { docsLeft: s, docsTop: r } = o, i = new
|
|
987
|
+
const o = this._document.getOffsetConfig(), { docsLeft: s, docsTop: r } = o, i = new Ct(o, this._docSkeleton);
|
|
988
988
|
if (this._isCollapsed()) {
|
|
989
989
|
const { contentBoxPointGroup: A, cursorList: d } = i.getRangePointData(e, e);
|
|
990
990
|
if (this._setCursorList(d), A.length === 0)
|
|
@@ -1044,7 +1044,7 @@ class Gt {
|
|
|
1044
1044
|
const { _document: e, _docSkeleton: t } = this, o = this.anchorNodePosition, s = this.focusNodePosition;
|
|
1045
1045
|
if ((d = this._anchorShape) == null || d.hide(), (h = this._rangeShape) == null || h.hide(), this._isEmpty())
|
|
1046
1046
|
return;
|
|
1047
|
-
const r = e.getOffsetConfig(), { docsLeft: i, docsTop: a } = r, c = new
|
|
1047
|
+
const r = e.getOffsetConfig(), { docsLeft: i, docsTop: a } = r, c = new Ct(r, t);
|
|
1048
1048
|
if (this._isCollapsed()) {
|
|
1049
1049
|
const { contentBoxPointGroup: u, cursorList: f } = c.getRangePointData(o, o);
|
|
1050
1050
|
if (this._setCursorList(f), u.length > 0) {
|
|
@@ -1099,7 +1099,7 @@ class Gt {
|
|
|
1099
1099
|
let d = i + t;
|
|
1100
1100
|
const h = a + o, u = ((g = s == null ? void 0 : s.ts) == null ? void 0 : g.it) === L.TRUE;
|
|
1101
1101
|
if (u && (d += c * Math.tan(A * Math.PI / 180) / 2), this._anchorShape) {
|
|
1102
|
-
this._anchorShape.transformByState({ left: d, top: h, height: c }), this._anchorShape.show(), u ? this._anchorShape.skew(-
|
|
1102
|
+
this._anchorShape.transformByState({ left: d, top: h, height: c }), this._anchorShape.show(), u ? this._anchorShape.skew(-12, 0) : this._anchorShape.skew(0, 0);
|
|
1103
1103
|
return;
|
|
1104
1104
|
}
|
|
1105
1105
|
const f = new jn(jl + K.generateRandomId(Wr), {
|
|
@@ -1110,14 +1110,14 @@ class Gt {
|
|
|
1110
1110
|
stroke: ((m = this.style) == null ? void 0 : m.strokeActive) || Sn(pn.black, 1),
|
|
1111
1111
|
evented: !1
|
|
1112
1112
|
});
|
|
1113
|
-
u && f.skew(-
|
|
1113
|
+
u && f.skew(-12, 0), this._anchorShape = f, this._scene.addObject(f, as), this.activeStatic();
|
|
1114
1114
|
}
|
|
1115
1115
|
_setCursorList(e) {
|
|
1116
1116
|
e.length !== 0 && (this._cursorList = e);
|
|
1117
1117
|
}
|
|
1118
1118
|
}
|
|
1119
1119
|
const zl = "__DocTableRectRange__", Yl = 6;
|
|
1120
|
-
function Vo(n, e, t, o, s, r =
|
|
1120
|
+
function Vo(n, e, t, o, s, r = Cn, i = "", a = -1) {
|
|
1121
1121
|
const c = e.getOffsetConfig(), A = new sa(c, t).getNodePositionGroup(o, s);
|
|
1122
1122
|
return (A != null ? A : []).map((d) => new ra(
|
|
1123
1123
|
n,
|
|
@@ -1131,7 +1131,7 @@ function Vo(n, e, t, o, s, r = vn, i = "", a = -1) {
|
|
|
1131
1131
|
));
|
|
1132
1132
|
}
|
|
1133
1133
|
class ra {
|
|
1134
|
-
constructor(e, t, o, s, r, i =
|
|
1134
|
+
constructor(e, t, o, s, r, i = Cn, a = "", c = -1) {
|
|
1135
1135
|
b(this, "rangeType", dt.RECT);
|
|
1136
1136
|
// The rendered rect range
|
|
1137
1137
|
b(this, "_rangeShape");
|
|
@@ -1325,8 +1325,8 @@ function cs(n, e, t, o, s, r, i, a) {
|
|
|
1325
1325
|
const f = h <= u ? Pe.FORWARD : Pe.BACKWARD, g = Math.min(h, u), p = Math.max(h, u);
|
|
1326
1326
|
let m = g, S = p;
|
|
1327
1327
|
for (const I of d.getChildren())
|
|
1328
|
-
for (const
|
|
1329
|
-
const { startIndex: R, endIndex: E, children:
|
|
1328
|
+
for (const v of I.children) {
|
|
1329
|
+
const { startIndex: R, endIndex: E, children: C } = v, y = I.children.indexOf(v), O = I.children[y + 1], D = C[0];
|
|
1330
1330
|
let x = !1;
|
|
1331
1331
|
if (D) {
|
|
1332
1332
|
const { startIndex: _, endIndex: M, children: w } = D;
|
|
@@ -1443,7 +1443,7 @@ var Jl = Object.defineProperty, Zl = Object.getOwnPropertyDescriptor, $l = (n, e
|
|
|
1443
1443
|
(i = n[r]) && (s = (o ? i(e, t, s) : i(s)) || s);
|
|
1444
1444
|
return o && s && Jl(e, t, s), s;
|
|
1445
1445
|
}, Qn = (n, e) => (t, o) => e(t, o, n);
|
|
1446
|
-
let Be = class extends
|
|
1446
|
+
let Be = class extends vt {
|
|
1447
1447
|
constructor(e, t, o, s, r) {
|
|
1448
1448
|
super();
|
|
1449
1449
|
b(this, "_onInputBefore$", new le());
|
|
@@ -1485,7 +1485,7 @@ let Be = class extends Ct {
|
|
|
1485
1485
|
b(this, "_focusNodePosition", null);
|
|
1486
1486
|
b(this, "_currentSegmentId", "");
|
|
1487
1487
|
b(this, "_currentSegmentPage", -1);
|
|
1488
|
-
b(this, "_selectionStyle",
|
|
1488
|
+
b(this, "_selectionStyle", Cn);
|
|
1489
1489
|
b(this, "_viewPortObserverMap", /* @__PURE__ */ new Map());
|
|
1490
1490
|
b(this, "_isIMEInputApply", !1);
|
|
1491
1491
|
b(this, "_scenePointerMoveSubs", []);
|
|
@@ -1520,7 +1520,7 @@ let Be = class extends Ct {
|
|
|
1520
1520
|
setReserveRangesStatus(e) {
|
|
1521
1521
|
this._reserveRanges = e;
|
|
1522
1522
|
}
|
|
1523
|
-
_setRangeStyle(e =
|
|
1523
|
+
_setRangeStyle(e = Cn) {
|
|
1524
1524
|
this._selectionStyle = e;
|
|
1525
1525
|
}
|
|
1526
1526
|
// eslint-disable-next-line max-lines-per-function
|
|
@@ -1972,7 +1972,7 @@ let Be = class extends Ct {
|
|
|
1972
1972
|
this.focus();
|
|
1973
1973
|
return;
|
|
1974
1974
|
}
|
|
1975
|
-
const { left: s, top: r } = o, i = this.activeViewPort.getAbsoluteVector(
|
|
1975
|
+
const { left: s, top: r } = o, i = this.activeViewPort.getAbsoluteVector(vn.FromArray([s, r])), { x: a, y: c } = i;
|
|
1976
1976
|
let { left: l, top: A } = this._getCanvasOffset();
|
|
1977
1977
|
l += a, A += c, this.activate(l, A, e);
|
|
1978
1978
|
}
|
|
@@ -2112,7 +2112,7 @@ let Be = class extends Ct {
|
|
|
2112
2112
|
const o = this._context.mainComponent, { documentTransform: s } = o.getOffsetConfig();
|
|
2113
2113
|
if (this.activeViewPort == null || s == null)
|
|
2114
2114
|
return;
|
|
2115
|
-
const r = this.activeViewPort.transformVector2SceneCoord(
|
|
2115
|
+
const r = this.activeViewPort.transformVector2SceneCoord(vn.FromArray([e, t]));
|
|
2116
2116
|
if (r)
|
|
2117
2117
|
return s.clone().invert().applyPoint(r);
|
|
2118
2118
|
}
|
|
@@ -2813,10 +2813,10 @@ function hA(n) {
|
|
|
2813
2813
|
onChange: m,
|
|
2814
2814
|
onActive: S,
|
|
2815
2815
|
onValid: I,
|
|
2816
|
-
isValueValid:
|
|
2816
|
+
isValueValid: v = !0,
|
|
2817
2817
|
placeholder: R,
|
|
2818
2818
|
disabled: E
|
|
2819
|
-
} = n,
|
|
2819
|
+
} = n, C = se(Ke), y = se(Xe), [O, D] = he(""), [x, _] = he(""), [M, w] = he(v), [F, H] = he([0, 0]), te = et(null), [Z, G] = he(!1);
|
|
2820
2820
|
if (!go(e))
|
|
2821
2821
|
throw new Error("Invalid editor ID");
|
|
2822
2822
|
Oe(() => {
|
|
@@ -2824,12 +2824,12 @@ function hA(n) {
|
|
|
2824
2824
|
if (!Y)
|
|
2825
2825
|
return;
|
|
2826
2826
|
const q = new ResizeObserver(() => {
|
|
2827
|
-
s !== !0 &&
|
|
2827
|
+
s !== !0 && C.resize(e), o && o(Y);
|
|
2828
2828
|
});
|
|
2829
2829
|
q.observe(Y);
|
|
2830
2830
|
const $ = t != null ? t : dA(e, a);
|
|
2831
2831
|
$.id !== e && ($.id = e);
|
|
2832
|
-
const Ie =
|
|
2832
|
+
const Ie = C.register(
|
|
2833
2833
|
{
|
|
2834
2834
|
editorUnitId: e,
|
|
2835
2835
|
initialSnapshot: $,
|
|
@@ -2848,36 +2848,36 @@ function hA(n) {
|
|
|
2848
2848
|
},
|
|
2849
2849
|
Y
|
|
2850
2850
|
);
|
|
2851
|
-
|
|
2851
|
+
C.setValueNoRefresh(a || "", e), D(R || "");
|
|
2852
2852
|
const ye = es((Me) => {
|
|
2853
2853
|
G(Me), S && S(Me);
|
|
2854
2854
|
}, 30), Fe = 160, Te = es((Me) => {
|
|
2855
|
-
const ke = Me.getEditorId(), Ye =
|
|
2855
|
+
const ke = Me.getEditorId(), Ye = C.checkValueLegality(ke);
|
|
2856
2856
|
setTimeout(() => {
|
|
2857
2857
|
const ct = Me.getBoundingClientRect();
|
|
2858
2858
|
H([ct.left, ct.top - 16]), ct.left + ct.top > 0 && w(Ye), Me.onlyInputFormula() ? _(y.t("textEditor.formulaError")) : _(y.t("textEditor.rangeError"));
|
|
2859
|
-
}, Fe),
|
|
2860
|
-
}, 30), ze =
|
|
2859
|
+
}, Fe), C.getValue(ke) !== a && (I && I(Ye), m && m(C.getValue(e)));
|
|
2860
|
+
}, 30), ze = C.focusStyle$.subscribe((Me) => {
|
|
2861
2861
|
let ke = !1;
|
|
2862
2862
|
Me === e && (ke = !0), ye(ke), setTimeout(() => {
|
|
2863
2863
|
if (!Ql(Y))
|
|
2864
2864
|
w(!0);
|
|
2865
2865
|
else {
|
|
2866
|
-
const Ye =
|
|
2866
|
+
const Ye = C.getEditor(e);
|
|
2867
2867
|
Ye && Te(Ye);
|
|
2868
2868
|
}
|
|
2869
2869
|
}, Fe);
|
|
2870
|
-
}), xt =
|
|
2870
|
+
}), xt = C.valueChange$.subscribe((Me) => {
|
|
2871
2871
|
if (Me.isSheetEditor() || Me.getEditorId() !== e)
|
|
2872
2872
|
return;
|
|
2873
|
-
const ke =
|
|
2873
|
+
const ke = C.getFocusEditor();
|
|
2874
2874
|
ke && ke.getEditorId() !== e || Te(Me);
|
|
2875
2875
|
});
|
|
2876
2876
|
return () => {
|
|
2877
2877
|
q.unobserve(Y), q.disconnect(), Ie.dispose(), ze == null || ze.unsubscribe(), xt == null || xt.unsubscribe();
|
|
2878
2878
|
};
|
|
2879
2879
|
}, []), Oe(() => {
|
|
2880
|
-
const Y =
|
|
2880
|
+
const Y = C.getEditor(e);
|
|
2881
2881
|
Y != null && Y.update({
|
|
2882
2882
|
readonly: l,
|
|
2883
2883
|
isSingle: c,
|
|
@@ -2889,12 +2889,12 @@ function hA(n) {
|
|
|
2889
2889
|
openForSheetUnitId: g
|
|
2890
2890
|
});
|
|
2891
2891
|
}, [l, c, f, u, d, h, p, g]), Oe(() => {
|
|
2892
|
-
a != null &&
|
|
2892
|
+
a != null && C.setValueNoRefresh(a, e);
|
|
2893
2893
|
}, [a]), Oe(() => {
|
|
2894
|
-
w(
|
|
2895
|
-
}, [
|
|
2894
|
+
w(v);
|
|
2895
|
+
}, [v]);
|
|
2896
2896
|
function z() {
|
|
2897
|
-
const Y =
|
|
2897
|
+
const Y = C.getValue(e);
|
|
2898
2898
|
return !(Y == null || Y === "");
|
|
2899
2899
|
}
|
|
2900
2900
|
const ne = Object.fromEntries(
|
|
@@ -2975,19 +2975,19 @@ var IA = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em"
|
|
|
2975
2975
|
}));
|
|
2976
2976
|
});
|
|
2977
2977
|
la.displayName = "DeleteSingle";
|
|
2978
|
-
var
|
|
2978
|
+
var CA = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.9999 1.89941C1.66853 1.89941 1.3999 2.16804 1.3999 2.49941 1.3999 2.83078 1.66853 3.09941 1.9999 3.09941H13.9999C14.3313 3.09941 14.5999 2.83078 14.5999 2.49941 14.5999 2.16804 14.3313 1.89941 13.9999 1.89941H1.9999zM3.33315 5.56641C3.00178 5.56641 2.73315 5.83504 2.73315 6.16641 2.73315 6.49778 3.00178 6.76641 3.33315 6.76641H12.6665C12.9979 6.76641 13.2665 6.49778 13.2665 6.16641 13.2665 5.83504 12.9979 5.56641 12.6665 5.56641H3.33315zM1.3999 9.8334C1.3999 9.50203 1.66853 9.2334 1.9999 9.2334H13.9999C14.3313 9.2334 14.5999 9.50203 14.5999 9.8334 14.5999 10.1648 14.3313 10.4334 13.9999 10.4334H1.9999C1.66853 10.4334 1.3999 10.1648 1.3999 9.8334zM3.33315 12.9004C3.00178 12.9004 2.73315 13.169 2.73315 13.5004 2.73315 13.8318 3.00178 14.1004 3.33315 14.1004H12.6665C12.9979 14.1004 13.2665 13.8318 13.2665 13.5004 13.2665 13.169 12.9979 12.9004 12.6665 12.9004H3.33315z" } }] }, Aa = st(function(n, e) {
|
|
2979
2979
|
return rt(it, Object.assign({}, n, {
|
|
2980
2980
|
id: "horizontally-single",
|
|
2981
2981
|
ref: e,
|
|
2982
|
-
icon:
|
|
2982
|
+
icon: CA
|
|
2983
2983
|
}));
|
|
2984
2984
|
});
|
|
2985
2985
|
Aa.displayName = "HorizontallySingle";
|
|
2986
|
-
var
|
|
2986
|
+
var vA = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z" } }] }, da = st(function(n, e) {
|
|
2987
2987
|
return rt(it, Object.assign({}, n, {
|
|
2988
2988
|
id: "increase-single",
|
|
2989
2989
|
ref: e,
|
|
2990
|
-
icon:
|
|
2990
|
+
icon: vA
|
|
2991
2991
|
}));
|
|
2992
2992
|
});
|
|
2993
2993
|
da.displayName = "IncreaseSingle";
|
|
@@ -3087,22 +3087,22 @@ const ma = _s(
|
|
|
3087
3087
|
pointerEvents: "none"
|
|
3088
3088
|
};
|
|
3089
3089
|
function Kf(n) {
|
|
3090
|
-
const { dialogOnly: e, onChange: t, id: o, value: s = "", width: r = 220, placeholder: i = "", size: a = "middle", onActive: c, onValid: l, isSingleChoice: A = !1, openForSheetUnitId: d, openForSheetSubUnitId: h, isReadonly: u = !1, className: f, textEditorClassName: g, onSelectorVisibleChange: p } = n, m = tl(p), [S, I] = he([""]),
|
|
3090
|
+
const { dialogOnly: e, onChange: t, id: o, value: s = "", width: r = 220, placeholder: i = "", size: a = "middle", onActive: c, onValid: l, isSingleChoice: A = !1, openForSheetUnitId: d, openForSheetSubUnitId: h, isReadonly: u = !1, className: f, textEditorClassName: g, onSelectorVisibleChange: p } = n, m = tl(p), [S, I] = he([""]), v = (oe) => {
|
|
3091
3091
|
I((Ae) => [...Ae, oe]);
|
|
3092
3092
|
}, R = (oe) => {
|
|
3093
3093
|
I(
|
|
3094
|
-
(Ae) => Ae.filter((
|
|
3094
|
+
(Ae) => Ae.filter((Ce, ln) => ln !== oe)
|
|
3095
3095
|
);
|
|
3096
3096
|
}, E = (oe, Ae) => {
|
|
3097
3097
|
I(
|
|
3098
|
-
(
|
|
3098
|
+
(Ce) => Ce.map(
|
|
3099
3099
|
(ln, Ot) => Ot === oe ? Ae : ln
|
|
3100
3100
|
)
|
|
3101
3101
|
);
|
|
3102
|
-
},
|
|
3102
|
+
}, C = (oe) => {
|
|
3103
3103
|
I((Ae) => {
|
|
3104
|
-
const
|
|
3105
|
-
return
|
|
3104
|
+
const Ce = [...Ae];
|
|
3105
|
+
return Ce.length > 0 && (Ce[Ce.length - 1] = oe), Ce;
|
|
3106
3106
|
});
|
|
3107
3107
|
}, y = se(Ke), O = se(ma), D = se(Q), [x, _] = he(!1), M = se(Xe), [w, F] = he(!1), [H, te] = he(!0), [Z, G] = he(s), [z, ne] = he(-1), ue = et(null), re = et(-1), Y = et(d), q = et(h), $ = et(A), Ie = et(u);
|
|
3108
3108
|
Oe(() => {
|
|
@@ -3113,20 +3113,20 @@ function Kf(n) {
|
|
|
3113
3113
|
y.resize(o);
|
|
3114
3114
|
});
|
|
3115
3115
|
Ae.observe(oe);
|
|
3116
|
-
let
|
|
3116
|
+
let Ce = 1;
|
|
3117
3117
|
const ln = O.selectionChange$.subscribe((Ot) => {
|
|
3118
3118
|
if (O.getCurrentSelectorId() !== o)
|
|
3119
3119
|
return;
|
|
3120
3120
|
if (Ot.length === 0) {
|
|
3121
|
-
|
|
3121
|
+
Ce = 0;
|
|
3122
3122
|
return;
|
|
3123
3123
|
}
|
|
3124
|
-
const Rr = Ot.length -
|
|
3125
|
-
if (
|
|
3124
|
+
const Rr = Ot.length - Ce;
|
|
3125
|
+
if (Ce = Ot.length, Rr < 0)
|
|
3126
3126
|
return;
|
|
3127
3127
|
const lt = Ot[Ot.length - 1];
|
|
3128
3128
|
let Lt = "";
|
|
3129
|
-
lt.unitId === Y.current && lt.sheetId === q.current ? Lt = Gc(lt.range) : lt.unitId === Y.current ? Lt = qc(lt.sheetName, lt.range) : Lt = Kc(lt.unitId, lt.sheetName, lt.range), Rr >= 1 && !$.current ? (
|
|
3129
|
+
lt.unitId === Y.current && lt.sheetId === q.current ? Lt = Gc(lt.range) : lt.unitId === Y.current ? Lt = qc(lt.sheetName, lt.range) : Lt = Kc(lt.unitId, lt.sheetName, lt.range), Rr >= 1 && !$.current ? (v(Lt), ne(-1)) : re.current === -1 ? C(Lt) : E(re.current, Lt);
|
|
3130
3130
|
});
|
|
3131
3131
|
return () => {
|
|
3132
3132
|
ln.unsubscribe(), Ae.unobserve(oe);
|
|
@@ -3158,20 +3158,20 @@ function Kf(n) {
|
|
|
3158
3158
|
return;
|
|
3159
3159
|
}
|
|
3160
3160
|
let oe = "";
|
|
3161
|
-
const Ae = S.filter((
|
|
3161
|
+
const Ae = S.filter((Ce) => wr(Ce.trim()));
|
|
3162
3162
|
if (Ae.length === 1) {
|
|
3163
|
-
const
|
|
3164
|
-
wr(
|
|
3163
|
+
const Ce = Ae[0];
|
|
3164
|
+
wr(Ce.trim()) && (oe = Ce.trim());
|
|
3165
3165
|
} else
|
|
3166
3166
|
oe = Ae.join(",");
|
|
3167
3167
|
y.setValue(oe, o), Ye(oe), ye();
|
|
3168
3168
|
}
|
|
3169
3169
|
function Me() {
|
|
3170
|
-
|
|
3170
|
+
v(""), ne(-1);
|
|
3171
3171
|
}
|
|
3172
3172
|
function ke(oe) {
|
|
3173
|
-
var Ae,
|
|
3174
|
-
return ((
|
|
3173
|
+
var Ae, Ce;
|
|
3174
|
+
return ((Ce = (Ae = D.getCurrentUnitForType(P.UNIVER_SHEET)) == null ? void 0 : Ae.getSheetBySheetName(oe)) == null ? void 0 : Ce.getSheetId()) || "";
|
|
3175
3175
|
}
|
|
3176
3176
|
function Ye(oe) {
|
|
3177
3177
|
if (G(oe || ""), oe == null) {
|
|
@@ -3223,7 +3223,7 @@ function Kf(n) {
|
|
|
3223
3223
|
affixWrapperStyle: { width: "100%" },
|
|
3224
3224
|
onClick: () => ne(Ae),
|
|
3225
3225
|
value: oe,
|
|
3226
|
-
onChange: (
|
|
3226
|
+
onChange: (Ce) => E(Ae, Ce)
|
|
3227
3227
|
},
|
|
3228
3228
|
`input${Ae}`
|
|
3229
3229
|
) }),
|
|
@@ -3274,19 +3274,19 @@ function qA(n, e, t) {
|
|
|
3274
3274
|
}
|
|
3275
3275
|
const KA = (n) => {
|
|
3276
3276
|
const e = se(Xe), t = se(Q), o = se(Re), s = se(T), r = se(Fs), { unitId: i } = n, a = o.getRenderById(i).with(Be), [c, l] = he({}), A = (u, f) => {
|
|
3277
|
-
var
|
|
3277
|
+
var C;
|
|
3278
3278
|
l((y) => ({
|
|
3279
3279
|
...y,
|
|
3280
3280
|
[f]: u ? L.TRUE : L.FALSE
|
|
3281
3281
|
}));
|
|
3282
|
-
const g = t.getUniverDocInstance(i), p = g == null ? void 0 : g.getSnapshot().documentStyle, m = (
|
|
3282
|
+
const g = t.getUniverDocInstance(i), p = g == null ? void 0 : g.getSnapshot().documentStyle, m = (C = o.getRenderById(i)) == null ? void 0 : C.with(de), S = m == null ? void 0 : m.getViewModel();
|
|
3283
3283
|
if (p == null || S == null)
|
|
3284
3284
|
return;
|
|
3285
3285
|
const I = S.getEditArea();
|
|
3286
|
-
let
|
|
3286
|
+
let v = !1;
|
|
3287
3287
|
const R = a.getSegmentPage();
|
|
3288
3288
|
let E = !1;
|
|
3289
|
-
if (f === "useFirstPageHeaderFooter" && u === !0 && ((I === Se.HEADER && !p.firstPageHeaderId || I === Se.FOOTER && !p.firstPageFooterId) && (
|
|
3289
|
+
if (f === "useFirstPageHeaderFooter" && u === !0 && ((I === Se.HEADER && !p.firstPageHeaderId || I === Se.FOOTER && !p.firstPageFooterId) && (v = !0), v && R === 0 && (E = !0)), f === "evenAndOddHeaders" && u === !0 && ((I === Se.HEADER && !p.evenPageHeaderId || I === Se.FOOTER && !p.evenPageFooterId) && (v = !0), v && R % 2 === 1 && (E = !0)), v) {
|
|
3290
3290
|
const O = K.generateRandomId(6);
|
|
3291
3291
|
E && a.setSegment(O), s.executeCommand(Gn, {
|
|
3292
3292
|
unitId: i,
|
|
@@ -3588,7 +3588,7 @@ let ds = class extends me {
|
|
|
3588
3588
|
const o = It(this._context), { document: s, scene: r } = o, { documentTransform: i } = s.getOffsetConfig(), a = r.getViewports()[0];
|
|
3589
3589
|
if (a == null)
|
|
3590
3590
|
return;
|
|
3591
|
-
const c = a.transformVector2SceneCoord(
|
|
3591
|
+
const c = a.transformVector2SceneCoord(vn.FromArray([e, t]));
|
|
3592
3592
|
return i.clone().invert().applyPoint(c);
|
|
3593
3593
|
}
|
|
3594
3594
|
// eslint-disable-next-line max-lines-per-function
|
|
@@ -3782,8 +3782,8 @@ const Gn = "doc.command.core-header-footer", Ia = {
|
|
|
3782
3782
|
type: N.COMMAND,
|
|
3783
3783
|
// eslint-disable-next-line max-lines-per-function
|
|
3784
3784
|
handler: async (n, e) => {
|
|
3785
|
-
var
|
|
3786
|
-
const t = n.get(T), o = n.get(Q), s = n.get(Re), { unitId: r, segmentId: i, createType: a, headerFooterProps: c } = e, l = (
|
|
3785
|
+
var v;
|
|
3786
|
+
const t = n.get(T), o = n.get(Q), s = n.get(Re), { unitId: r, segmentId: i, createType: a, headerFooterProps: c } = e, l = (v = s.getRenderById(r)) == null ? void 0 : v.with(de), A = o.getUniverDocInstance(r), d = l == null ? void 0 : l.getViewModel();
|
|
3787
3787
|
if (A == null || d == null)
|
|
3788
3788
|
return !1;
|
|
3789
3789
|
const h = d.getEditArea(), { documentStyle: u } = A.getSnapshot(), f = (c == null ? void 0 : c.marginFooter) != null || (c == null ? void 0 : c.marginHeader) != null, g = [{
|
|
@@ -3802,11 +3802,11 @@ const Gn = "doc.command.core-header-footer", Ia = {
|
|
|
3802
3802
|
f && (p.params.noNeedSetTextRange = !0);
|
|
3803
3803
|
const m = V.getInstance(), S = [];
|
|
3804
3804
|
return a != null && jo(i, a, u, S), c != null && Object.keys(c).forEach((R) => {
|
|
3805
|
-
const E = c[R],
|
|
3806
|
-
if (E ===
|
|
3805
|
+
const E = c[R], C = u[R];
|
|
3806
|
+
if (E === C)
|
|
3807
3807
|
return;
|
|
3808
3808
|
let y;
|
|
3809
|
-
if (
|
|
3809
|
+
if (C === void 0 ? y = m.insertOp(["documentStyle", R], E) : y = m.replaceOp(["documentStyle", R], C, E), S.push(y), R === "useFirstPageHeaderFooter" && E === L.TRUE && !u.firstPageHeaderId) {
|
|
3810
3810
|
const O = h === Se.HEADER ? Ue.FIRST_PAGE_HEADER : Ue.FIRST_PAGE_FOOTER;
|
|
3811
3811
|
jo(i, O, u, S);
|
|
3812
3812
|
} else if (R === "evenAndOddHeaders" && E === L.TRUE && !u.evenPageHeaderId) {
|
|
@@ -3841,7 +3841,7 @@ const Gn = "doc.command.core-header-footer", Ia = {
|
|
|
3841
3841
|
]);
|
|
3842
3842
|
}), t.executeCommand(zs.id, { value: "close" }), !0);
|
|
3843
3843
|
}
|
|
3844
|
-
}, nn = "UI_PLUGIN_DOCS", qs = `${nn}_COLOR_PICKER_COMPONENT`,
|
|
3844
|
+
}, nn = "UI_PLUGIN_DOCS", qs = `${nn}_COLOR_PICKER_COMPONENT`, Ca = `${nn}_FONT_FAMILY_COMPONENT`, va = `${nn}_FONT_FAMILY_ITEM_COMPONENT`, Ra = `${nn}_FONT_SIZE_COMPONENT`, od = "univer-doc-list-type-picker", sd = "univer-doc-list-type-picker-item", rd = "univer-doc-list-type-picker-item-active", Wo = {
|
|
3845
3845
|
docListTypePicker: od,
|
|
3846
3846
|
docListTypePickerItem: sd,
|
|
3847
3847
|
docListTypePickerItemActive: rd
|
|
@@ -3929,11 +3929,11 @@ const Gn = "doc.command.core-header-footer", Ia = {
|
|
|
3929
3929
|
const o = n.get(Dt).onAutoFormat(qt.id, e);
|
|
3930
3930
|
return (await Ds(o, n.get(T))).result;
|
|
3931
3931
|
}
|
|
3932
|
-
}, dd = "doc.command.after-space",
|
|
3932
|
+
}, dd = "doc.command.after-space", Co = {
|
|
3933
3933
|
id: dd,
|
|
3934
3934
|
type: N.COMMAND,
|
|
3935
3935
|
async handler(n) {
|
|
3936
|
-
const t = n.get(Dt).onAutoFormat(
|
|
3936
|
+
const t = n.get(Dt).onAutoFormat(Co.id);
|
|
3937
3937
|
return (await Ds(t, n.get(T))).result;
|
|
3938
3938
|
}
|
|
3939
3939
|
}, xn = {
|
|
@@ -4196,13 +4196,13 @@ const Zr = "doc.command.set-inline-format-bold", on = {
|
|
|
4196
4196
|
case Ut.id:
|
|
4197
4197
|
// fallthrough
|
|
4198
4198
|
case cn.id: {
|
|
4199
|
-
const E = a.getDefaultStyle(),
|
|
4199
|
+
const E = a.getDefaultStyle(), C = Ta(
|
|
4200
4200
|
h,
|
|
4201
4201
|
l,
|
|
4202
4202
|
E
|
|
4203
4203
|
);
|
|
4204
|
-
f =
|
|
4205
|
-
|
|
4204
|
+
f = Cd(
|
|
4205
|
+
C,
|
|
4206
4206
|
o
|
|
4207
4207
|
);
|
|
4208
4208
|
break;
|
|
@@ -4235,13 +4235,13 @@ const Zr = "doc.command.set-inline-format-bold", on = {
|
|
|
4235
4235
|
actions: [],
|
|
4236
4236
|
textRanges: c
|
|
4237
4237
|
}
|
|
4238
|
-
}, p = new
|
|
4238
|
+
}, p = new ve(), m = V.getInstance(), S = new Qt();
|
|
4239
4239
|
S.reset();
|
|
4240
4240
|
for (const E of c) {
|
|
4241
|
-
let { startOffset:
|
|
4242
|
-
if (
|
|
4241
|
+
let { startOffset: C, endOffset: y, rangeType: O } = E;
|
|
4242
|
+
if (C == null || y == null)
|
|
4243
4243
|
continue;
|
|
4244
|
-
if (O === dt.RECT && (
|
|
4244
|
+
if (O === dt.RECT && (C = C - 1), C === y) {
|
|
4245
4245
|
const _ = a.getStyleCache(), M = us[o];
|
|
4246
4246
|
a.setStyleCache(
|
|
4247
4247
|
{
|
|
@@ -4259,20 +4259,20 @@ const Zr = "doc.command.set-inline-format-bold", on = {
|
|
|
4259
4259
|
textRuns: [
|
|
4260
4260
|
{
|
|
4261
4261
|
st: 0,
|
|
4262
|
-
ed: y -
|
|
4262
|
+
ed: y - C,
|
|
4263
4263
|
ts: {
|
|
4264
4264
|
[us[o]]: f
|
|
4265
4265
|
}
|
|
4266
4266
|
}
|
|
4267
4267
|
]
|
|
4268
|
-
}, x =
|
|
4268
|
+
}, x = C - S.cursor;
|
|
4269
4269
|
x !== 0 && p.push({
|
|
4270
4270
|
t: j.RETAIN,
|
|
4271
4271
|
len: x
|
|
4272
4272
|
}), p.push({
|
|
4273
4273
|
t: j.RETAIN,
|
|
4274
4274
|
body: D,
|
|
4275
|
-
len: y -
|
|
4275
|
+
len: y - C
|
|
4276
4276
|
}), S.reset(), S.moveCursor(y);
|
|
4277
4277
|
}
|
|
4278
4278
|
const I = fe(d, A);
|
|
@@ -4295,13 +4295,13 @@ function ya(n, e, t) {
|
|
|
4295
4295
|
return t === Ut.id ? (n == null ? void 0 : n[e]) === je.SUBSCRIPT ? je.NORMAL : je.SUBSCRIPT : (n == null ? void 0 : n[e]) === je.SUPERSCRIPT ? je.NORMAL : je.SUPERSCRIPT;
|
|
4296
4296
|
}
|
|
4297
4297
|
function Ta(n, e, t) {
|
|
4298
|
-
var l, A, d, h, u, f, g, p, m, S, I,
|
|
4298
|
+
var l, A, d, h, u, f, g, p, m, S, I, v, R, E;
|
|
4299
4299
|
const { startOffset: o, endOffset: s, collapsed: r } = e;
|
|
4300
4300
|
if (r) {
|
|
4301
|
-
const
|
|
4301
|
+
const C = (l = n.textRuns) != null ? l : [];
|
|
4302
4302
|
let y = null;
|
|
4303
|
-
for (let O =
|
|
4304
|
-
const D =
|
|
4303
|
+
for (let O = C.length - 1; O >= 0; O--) {
|
|
4304
|
+
const D = C[O];
|
|
4305
4305
|
if (D.st < o && o <= D.ed) {
|
|
4306
4306
|
y = D;
|
|
4307
4307
|
break;
|
|
@@ -4310,48 +4310,48 @@ function Ta(n, e, t) {
|
|
|
4310
4310
|
return y != null && y.ts ? { ...t, ...y.ts } : t;
|
|
4311
4311
|
}
|
|
4312
4312
|
const { textRuns: i = [] } = Mi(n, o, s), a = K.deepClone(t);
|
|
4313
|
-
a.fs = Math.max(a.fs, ...i.map((
|
|
4313
|
+
a.fs = Math.max(a.fs, ...i.map((C) => {
|
|
4314
4314
|
var y, O;
|
|
4315
|
-
return (O = (y =
|
|
4316
|
-
})), a.ff = (h = (d = (A = i.find((
|
|
4315
|
+
return (O = (y = C == null ? void 0 : C.ts) == null ? void 0 : y.fs) != null ? O : a.fs;
|
|
4316
|
+
})), a.ff = (h = (d = (A = i.find((C) => {
|
|
4317
4317
|
var y;
|
|
4318
|
-
return ((y =
|
|
4319
|
-
})) == null ? void 0 : A.ts) == null ? void 0 : d.ff) != null ? h : a.ff, a.it = i.length && i.every((
|
|
4318
|
+
return ((y = C.ts) == null ? void 0 : y.ff) != null;
|
|
4319
|
+
})) == null ? void 0 : A.ts) == null ? void 0 : d.ff) != null ? h : a.ff, a.it = i.length && i.every((C) => {
|
|
4320
4320
|
var y;
|
|
4321
|
-
return ((y =
|
|
4322
|
-
}) ? L.TRUE : L.FALSE, a.bl = i.length && i.every((
|
|
4321
|
+
return ((y = C.ts) == null ? void 0 : y.it) === L.TRUE;
|
|
4322
|
+
}) ? L.TRUE : L.FALSE, a.bl = i.length && i.every((C) => {
|
|
4323
4323
|
var y;
|
|
4324
|
-
return ((y =
|
|
4325
|
-
}) ? L.TRUE : L.FALSE, a.ul = i.length && i.every((
|
|
4324
|
+
return ((y = C.ts) == null ? void 0 : y.bl) === L.TRUE;
|
|
4325
|
+
}) ? L.TRUE : L.FALSE, a.ul = i.length && i.every((C) => {
|
|
4326
4326
|
var y, O;
|
|
4327
|
-
return ((O = (y =
|
|
4328
|
-
}) ? (u = i[0].ts) == null ? void 0 : u.ul : a.ul, a.st = i.length && i.every((
|
|
4327
|
+
return ((O = (y = C.ts) == null ? void 0 : y.ul) == null ? void 0 : O.s) === L.TRUE;
|
|
4328
|
+
}) ? (u = i[0].ts) == null ? void 0 : u.ul : a.ul, a.st = i.length && i.every((C) => {
|
|
4329
4329
|
var y, O;
|
|
4330
|
-
return ((O = (y =
|
|
4331
|
-
}) ? (f = i[0].ts) == null ? void 0 : f.st : a.st, a.bg = (m = (p = (g = i.find((
|
|
4330
|
+
return ((O = (y = C.ts) == null ? void 0 : y.st) == null ? void 0 : O.s) === L.TRUE;
|
|
4331
|
+
}) ? (f = i[0].ts) == null ? void 0 : f.st : a.st, a.bg = (m = (p = (g = i.find((C) => {
|
|
4332
4332
|
var y;
|
|
4333
|
-
return ((y =
|
|
4334
|
-
})) == null ? void 0 : g.ts) == null ? void 0 : p.bg) != null ? m : a.bg, a.cl = (
|
|
4333
|
+
return ((y = C.ts) == null ? void 0 : y.bg) != null;
|
|
4334
|
+
})) == null ? void 0 : g.ts) == null ? void 0 : p.bg) != null ? m : a.bg, a.cl = (v = (I = (S = i.find((C) => {
|
|
4335
4335
|
var y;
|
|
4336
|
-
return ((y =
|
|
4337
|
-
})) == null ? void 0 : S.ts) == null ? void 0 : I.cl) != null ?
|
|
4338
|
-
const c = i.filter((
|
|
4336
|
+
return ((y = C.ts) == null ? void 0 : y.cl) != null;
|
|
4337
|
+
})) == null ? void 0 : S.ts) == null ? void 0 : I.cl) != null ? v : a.cl;
|
|
4338
|
+
const c = i.filter((C) => {
|
|
4339
4339
|
var y;
|
|
4340
|
-
return ((y =
|
|
4340
|
+
return ((y = C == null ? void 0 : C.ts) == null ? void 0 : y.va) != null;
|
|
4341
4341
|
});
|
|
4342
4342
|
if (c.length > 0 && c.length === i.length) {
|
|
4343
|
-
const
|
|
4343
|
+
const C = (R = c[0].ts) == null ? void 0 : R.va;
|
|
4344
4344
|
let y = !0;
|
|
4345
4345
|
for (let O = 1; O < c.length; O++)
|
|
4346
|
-
if (((E = c[O].ts) == null ? void 0 : E.va) !==
|
|
4346
|
+
if (((E = c[O].ts) == null ? void 0 : E.va) !== C) {
|
|
4347
4347
|
y = !1;
|
|
4348
4348
|
break;
|
|
4349
4349
|
}
|
|
4350
|
-
y && (a.va =
|
|
4350
|
+
y && (a.va = C);
|
|
4351
4351
|
}
|
|
4352
4352
|
return a;
|
|
4353
4353
|
}
|
|
4354
|
-
function
|
|
4354
|
+
function Cd(n, e) {
|
|
4355
4355
|
const t = us[e];
|
|
4356
4356
|
return ya(n, t, e);
|
|
4357
4357
|
}
|
|
@@ -4384,7 +4384,7 @@ const Mn = {
|
|
|
4384
4384
|
}), g = V.getInstance(), p = fe(i, c);
|
|
4385
4385
|
return h.params.actions = g.editOp(f.serialize(), p), !!s.syncExecuteCommand(h.id, h.params);
|
|
4386
4386
|
}
|
|
4387
|
-
},
|
|
4387
|
+
}, vo = {
|
|
4388
4388
|
id: "doc.command.change-list-type",
|
|
4389
4389
|
type: N.COMMAND,
|
|
4390
4390
|
handler: (n, e) => {
|
|
@@ -4450,7 +4450,7 @@ const hs = {
|
|
|
4450
4450
|
type: N.COMMAND,
|
|
4451
4451
|
handler: (n, e) => {
|
|
4452
4452
|
const t = n.get(T);
|
|
4453
|
-
return e != null && e.value ? t.syncExecuteCommand(
|
|
4453
|
+
return e != null && e.value ? t.syncExecuteCommand(vo.id, {
|
|
4454
4454
|
listType: e.value
|
|
4455
4455
|
}) : t.syncExecuteCommand(Mn.id, {
|
|
4456
4456
|
listType: we.BULLET_LIST
|
|
@@ -4461,7 +4461,7 @@ const hs = {
|
|
|
4461
4461
|
type: N.COMMAND,
|
|
4462
4462
|
handler: (n, e) => {
|
|
4463
4463
|
const t = n.get(T);
|
|
4464
|
-
return e != null && e.value ? t.syncExecuteCommand(
|
|
4464
|
+
return e != null && e.value ? t.syncExecuteCommand(vo.id, {
|
|
4465
4465
|
listType: e.value
|
|
4466
4466
|
}) : t.syncExecuteCommand(Mn.id, {
|
|
4467
4467
|
listType: we.CHECK_LIST
|
|
@@ -4501,7 +4501,7 @@ const hs = {
|
|
|
4501
4501
|
type: N.COMMAND,
|
|
4502
4502
|
handler: (n, e) => {
|
|
4503
4503
|
const t = n.get(T);
|
|
4504
|
-
return e != null && e.value ? t.syncExecuteCommand(
|
|
4504
|
+
return e != null && e.value ? t.syncExecuteCommand(vo.id, {
|
|
4505
4505
|
listType: e.value
|
|
4506
4506
|
}) : t.syncExecuteCommand(Mn.id, {
|
|
4507
4507
|
listType: we.ORDER_LIST
|
|
@@ -4518,7 +4518,7 @@ const hs = {
|
|
|
4518
4518
|
const t = n.get(W), o = n.get(Q), s = n.get(T), r = o.getCurrentUnitForType(P.UNIVER_DOC), i = t.getActiveTextRange();
|
|
4519
4519
|
if (r == null || i == null)
|
|
4520
4520
|
return !1;
|
|
4521
|
-
const { segmentId: a } = i, { listType: c, paragraph: l } = e, { paragraphStart: A, paragraphEnd: d } = l, h = new
|
|
4521
|
+
const { segmentId: a } = i, { listType: c, paragraph: l } = e, { paragraphStart: A, paragraphEnd: d } = l, h = new ve(), u = V.getInstance(), { defaultTabStop: f = 36 } = r.getSnapshot().documentStyle, g = (ue = (ne = r.getSelfOrHeaderFooterModel(a).getBody()) == null ? void 0 : ne.sectionBreaks) != null ? ue : [], { startIndex: p, paragraphStyle: m = {} } = l, { indentFirstLine: S, snapToGrid: I, indentStart: v } = m, R = rc[c].nestingLevel[0].paragraphProperties || {}, { hanging: E, indentStart: C } = R, y = R.textStyle, { charSpace: O, gridType: D } = vd(p, g) || { charSpace: 0, gridType: ic.LINES }, x = yc(O, f, D, I);
|
|
4522
4522
|
let M = K.generateRandomId(6);
|
|
4523
4523
|
const w = (Y = (re = r.getBody()) == null ? void 0 : re.paragraphs) != null ? Y : [], F = w.findIndex(($) => $.startIndex === l.startIndex), H = w[F - 1], te = w[F + 1];
|
|
4524
4524
|
H && H.bullet && H.bullet.listType.indexOf(c) === 0 ? M = H.bullet.listId : te && te.bullet && te.bullet.listType.indexOf(c) === 0 && (M = te.bullet.listId);
|
|
@@ -4557,7 +4557,7 @@ const hs = {
|
|
|
4557
4557
|
},
|
|
4558
4558
|
indentFirstLine: void 0,
|
|
4559
4559
|
hanging: E,
|
|
4560
|
-
indentStart: { v: nt(
|
|
4560
|
+
indentStart: { v: nt(C, x) - nt(E, x) + nt(S, x) + nt(v, x) }
|
|
4561
4561
|
},
|
|
4562
4562
|
bullet: {
|
|
4563
4563
|
...(q = l.bullet) != null ? q : {
|
|
@@ -4594,7 +4594,7 @@ function Pn(n, e) {
|
|
|
4594
4594
|
}
|
|
4595
4595
|
return t;
|
|
4596
4596
|
}
|
|
4597
|
-
function
|
|
4597
|
+
function vd(n, e) {
|
|
4598
4598
|
const t = e.sort(ac("startIndex"));
|
|
4599
4599
|
for (let o = 0; o < t.length; o++) {
|
|
4600
4600
|
const s = e[o];
|
|
@@ -4617,9 +4617,9 @@ const ft = {
|
|
|
4617
4617
|
const c = a[0].segmentId, l = (I = i.getSelfOrHeaderFooterModel(c).getBody()) == null ? void 0 : I.paragraphs;
|
|
4618
4618
|
if (l == null)
|
|
4619
4619
|
return !1;
|
|
4620
|
-
const A = Pn(a, l), d = i.getUnitId(), h = A.every((
|
|
4620
|
+
const A = Pn(a, l), d = i.getUnitId(), h = A.every((v) => {
|
|
4621
4621
|
var R;
|
|
4622
|
-
return ((R =
|
|
4622
|
+
return ((R = v.paragraphStyle) == null ? void 0 : R.horizontalAlign) === r;
|
|
4623
4623
|
}), u = {
|
|
4624
4624
|
id: X.id,
|
|
4625
4625
|
params: {
|
|
@@ -4629,15 +4629,15 @@ const ft = {
|
|
|
4629
4629
|
}
|
|
4630
4630
|
}, f = new Qt();
|
|
4631
4631
|
f.reset();
|
|
4632
|
-
const g = new
|
|
4633
|
-
for (const
|
|
4634
|
-
const { startIndex: R } =
|
|
4632
|
+
const g = new ve(), p = V.getInstance();
|
|
4633
|
+
for (const v of A) {
|
|
4634
|
+
const { startIndex: R } = v;
|
|
4635
4635
|
g.push({
|
|
4636
4636
|
t: j.RETAIN,
|
|
4637
4637
|
len: R - f.cursor
|
|
4638
4638
|
});
|
|
4639
4639
|
const E = {
|
|
4640
|
-
...
|
|
4640
|
+
...v.paragraphStyle,
|
|
4641
4641
|
horizontalAlign: h ? Le.UNSPECIFIED : r
|
|
4642
4642
|
};
|
|
4643
4643
|
g.push({
|
|
@@ -4647,7 +4647,7 @@ const ft = {
|
|
|
4647
4647
|
dataStream: "",
|
|
4648
4648
|
paragraphs: [
|
|
4649
4649
|
{
|
|
4650
|
-
...
|
|
4650
|
+
...v,
|
|
4651
4651
|
paragraphStyle: E,
|
|
4652
4652
|
startIndex: 0
|
|
4653
4653
|
}
|
|
@@ -5015,9 +5015,9 @@ function Kd(n, e, t) {
|
|
|
5015
5015
|
if (a < I.startIndex || a > I.endIndex)
|
|
5016
5016
|
continue;
|
|
5017
5017
|
A = I;
|
|
5018
|
-
for (const
|
|
5019
|
-
for (const R of
|
|
5020
|
-
const E =
|
|
5018
|
+
for (const v of I.children) {
|
|
5019
|
+
for (const R of v.children) {
|
|
5020
|
+
const E = v.children.indexOf(R);
|
|
5021
5021
|
if (a >= R.startIndex && a <= R.endIndex) {
|
|
5022
5022
|
d = E;
|
|
5023
5023
|
break;
|
|
@@ -5072,8 +5072,8 @@ function Ma(n, e) {
|
|
|
5072
5072
|
continue;
|
|
5073
5073
|
A = S.startIndex + 3;
|
|
5074
5074
|
for (const I of S.children) {
|
|
5075
|
-
const
|
|
5076
|
-
t >= R && t <= E ? (c = R, a.push(
|
|
5075
|
+
const v = S.children.indexOf(I), { startIndex: R, endIndex: E } = I;
|
|
5076
|
+
t >= R && t <= E ? (c = R, a.push(v), l += E - R + 1) : (R > t && E < o || o >= R && o <= E) && (a.push(v), l += E - R + 1), a.length === S.children.length && (d = !0);
|
|
5077
5077
|
}
|
|
5078
5078
|
}
|
|
5079
5079
|
if (a.length)
|
|
@@ -5099,15 +5099,15 @@ function Jd(n, e) {
|
|
|
5099
5099
|
let A = -1, d = -1, h = -1;
|
|
5100
5100
|
for (const m of r.getChildren()) {
|
|
5101
5101
|
for (const S of m.children) {
|
|
5102
|
-
const { children: I } = S,
|
|
5103
|
-
if (
|
|
5104
|
-
if (t <
|
|
5102
|
+
const { children: I } = S, v = I[0];
|
|
5103
|
+
if (v) {
|
|
5104
|
+
if (t < v.startIndex || o > v.endIndex)
|
|
5105
5105
|
continue;
|
|
5106
|
-
c =
|
|
5107
|
-
for (const R of
|
|
5106
|
+
c = v;
|
|
5107
|
+
for (const R of v.children)
|
|
5108
5108
|
for (const E of R.children) {
|
|
5109
|
-
const
|
|
5110
|
-
t >= E.startIndex && t <= E.endIndex && (d =
|
|
5109
|
+
const C = R.children.indexOf(E);
|
|
5110
|
+
t >= E.startIndex && t <= E.endIndex && (d = C), o >= E.startIndex && o <= E.endIndex && (h = C);
|
|
5111
5111
|
}
|
|
5112
5112
|
}
|
|
5113
5113
|
if (c)
|
|
@@ -5168,16 +5168,16 @@ function Zd(n, e) {
|
|
|
5168
5168
|
let c = null, l = -1, A = -1, d = -1, h = -1;
|
|
5169
5169
|
for (const m of r.getChildren()) {
|
|
5170
5170
|
for (const S of m.children) {
|
|
5171
|
-
const { children: I } = S,
|
|
5172
|
-
if (
|
|
5173
|
-
if (t <
|
|
5171
|
+
const { children: I } = S, v = I[0];
|
|
5172
|
+
if (v) {
|
|
5173
|
+
if (t < v.startIndex || o > v.endIndex)
|
|
5174
5174
|
continue;
|
|
5175
|
-
c =
|
|
5176
|
-
for (const R of
|
|
5177
|
-
const E =
|
|
5178
|
-
for (const
|
|
5179
|
-
const y = R.children.indexOf(
|
|
5180
|
-
t >=
|
|
5175
|
+
c = v;
|
|
5176
|
+
for (const R of v.children) {
|
|
5177
|
+
const E = v.children.indexOf(R);
|
|
5178
|
+
for (const C of R.children) {
|
|
5179
|
+
const y = R.children.indexOf(C);
|
|
5180
|
+
t >= C.startIndex && t <= C.endIndex && (A = E, d = y), o >= C.startIndex && o <= C.endIndex && (h = y);
|
|
5181
5181
|
}
|
|
5182
5182
|
}
|
|
5183
5183
|
}
|
|
@@ -5291,7 +5291,7 @@ const tu = Ns, Da = {
|
|
|
5291
5291
|
}
|
|
5292
5292
|
}, m = new Qt();
|
|
5293
5293
|
m.reset();
|
|
5294
|
-
const S = new
|
|
5294
|
+
const S = new ve(), I = V.getInstance(), v = [], R = !!((O = A.tables) != null && O.length), E = !!((D = A.customBlocks) != null && D.length);
|
|
5295
5295
|
if (R && t || R && eu(c) || c.length && (l != null && l.length))
|
|
5296
5296
|
return !1;
|
|
5297
5297
|
for (let F = 0; F < c.length; F++) {
|
|
@@ -5303,7 +5303,7 @@ const tu = Ns, Da = {
|
|
|
5303
5303
|
const Ie = K.deepClone(d[q]);
|
|
5304
5304
|
Ie.tableId = $;
|
|
5305
5305
|
const ye = I.insertOp(["tableSource", $], Ie);
|
|
5306
|
-
|
|
5306
|
+
v.push(ye);
|
|
5307
5307
|
}
|
|
5308
5308
|
if (E && h) {
|
|
5309
5309
|
const Y = (_ = (x = u.getSnapshot().drawingsOrder) == null ? void 0 : x.length) != null ? _ : 0;
|
|
@@ -5313,7 +5313,7 @@ const tu = Ns, Da = {
|
|
|
5313
5313
|
const ye = K.deepClone(h[$]);
|
|
5314
5314
|
ye.drawingId = Ie;
|
|
5315
5315
|
const Fe = I.insertOp(["drawings", Ie], ye), Te = I.insertOp(["drawingsOrder", Y], Ie);
|
|
5316
|
-
|
|
5316
|
+
v.push(Fe), v.push(Te);
|
|
5317
5317
|
}
|
|
5318
5318
|
}
|
|
5319
5319
|
const ue = Vs((M = f.customRanges) != null ? M : [], Z, tu.includes(g)), re = ks((w = f.customDecorations) != null ? w : [], Z);
|
|
@@ -5340,8 +5340,8 @@ const tu = Ns, Da = {
|
|
|
5340
5340
|
}
|
|
5341
5341
|
m.reset(), m.moveCursor(Z);
|
|
5342
5342
|
}
|
|
5343
|
-
const
|
|
5344
|
-
return
|
|
5343
|
+
const C = fe(u, t);
|
|
5344
|
+
return v.push(I.editOp(S.serialize(), C)), p.params.actions = v.reduce((F, H) => V.compose(F, H), null), !!r.syncExecuteCommand(p.id, p.params);
|
|
5345
5345
|
}
|
|
5346
5346
|
};
|
|
5347
5347
|
function nu(n, e) {
|
|
@@ -5354,14 +5354,14 @@ function nu(n, e) {
|
|
|
5354
5354
|
}
|
|
5355
5355
|
function ou(n, e, t) {
|
|
5356
5356
|
var f, g;
|
|
5357
|
-
const o = e.getSelfOrHeaderFooterModel(t).getBody(), s = new
|
|
5357
|
+
const o = e.getSelfOrHeaderFooterModel(t).getBody(), s = new ve(), r = V.getInstance(), i = [];
|
|
5358
5358
|
if (o == null)
|
|
5359
5359
|
return i;
|
|
5360
5360
|
const { tables: a = [] } = o, c = new Qt();
|
|
5361
5361
|
c.reset();
|
|
5362
5362
|
for (let p = 0; p < n.length; p++) {
|
|
5363
|
-
const m = nu(n[p], a), { startOffset: S, endOffset: I, collapsed:
|
|
5364
|
-
|
|
5363
|
+
const m = nu(n[p], a), { startOffset: S, endOffset: I, collapsed: v } = m, R = S - c.cursor;
|
|
5364
|
+
v ? s.push({
|
|
5365
5365
|
t: j.RETAIN,
|
|
5366
5366
|
len: R
|
|
5367
5367
|
}) : s.push(...Qe.selection.delete([m], o, c.cursor, null, !1)), c.reset(), c.moveCursor(I);
|
|
@@ -5374,8 +5374,8 @@ function ou(n, e, t) {
|
|
|
5374
5374
|
const m = d[p], S = h.indexOf(p);
|
|
5375
5375
|
if (m == null || S < 0)
|
|
5376
5376
|
continue;
|
|
5377
|
-
const I = r.removeOp(["drawings", p], m),
|
|
5378
|
-
i.push(I), i.push(
|
|
5377
|
+
const I = r.removeOp(["drawings", p], m), v = r.removeOp(["drawingsOrder", S], p);
|
|
5378
|
+
i.push(I), i.push(v);
|
|
5379
5379
|
}
|
|
5380
5380
|
return i.reduce((p, m) => V.compose(p, m), null);
|
|
5381
5381
|
}
|
|
@@ -5383,7 +5383,7 @@ function su(n, e, t, o) {
|
|
|
5383
5383
|
const s = [];
|
|
5384
5384
|
if (e.getSelfOrHeaderFooterModel(o).getBody() == null)
|
|
5385
5385
|
return s;
|
|
5386
|
-
const i = new
|
|
5386
|
+
const i = new ve(), a = V.getInstance(), c = new Qt();
|
|
5387
5387
|
c.reset();
|
|
5388
5388
|
for (const A of n) {
|
|
5389
5389
|
const { startOffset: d, endOffset: h, spanEntireRow: u, spanEntireTable: f } = A;
|
|
@@ -5414,8 +5414,8 @@ function su(n, e, t, o) {
|
|
|
5414
5414
|
t: j.DELETE,
|
|
5415
5415
|
len: S
|
|
5416
5416
|
});
|
|
5417
|
-
for (const
|
|
5418
|
-
const R = a.removeOp(["tableSource", I, "tableRows",
|
|
5417
|
+
for (const v of m.reverse()) {
|
|
5418
|
+
const R = a.removeOp(["tableSource", I, "tableRows", v]);
|
|
5419
5419
|
s.push(R);
|
|
5420
5420
|
}
|
|
5421
5421
|
c.moveCursorTo(p + S);
|
|
@@ -5505,7 +5505,7 @@ const iu = "doc.command.insert-text", or = {
|
|
|
5505
5505
|
textRanges: p,
|
|
5506
5506
|
debounce: !0
|
|
5507
5507
|
}
|
|
5508
|
-
}, S = new
|
|
5508
|
+
}, S = new ve(), I = V.getInstance();
|
|
5509
5509
|
if (f)
|
|
5510
5510
|
u > 0 && S.push({
|
|
5511
5511
|
t: j.RETAIN,
|
|
@@ -5516,16 +5516,16 @@ const iu = "doc.command.insert-text", or = {
|
|
|
5516
5516
|
len: r.dataStream.length
|
|
5517
5517
|
});
|
|
5518
5518
|
else {
|
|
5519
|
-
const
|
|
5520
|
-
S.push(...
|
|
5519
|
+
const C = Qe.selection.delete([o], h, 0, r);
|
|
5520
|
+
S.push(...C);
|
|
5521
5521
|
}
|
|
5522
5522
|
m.params.textRanges = [{
|
|
5523
5523
|
startOffset: u + g,
|
|
5524
5524
|
endOffset: u + g,
|
|
5525
5525
|
collapsed: f
|
|
5526
5526
|
}];
|
|
5527
|
-
const
|
|
5528
|
-
return m.params.actions = I.editOp(S.serialize(),
|
|
5527
|
+
const v = fe(A, s);
|
|
5528
|
+
return m.params.actions = I.editOp(S.serialize(), v), !!t.syncExecuteCommand(m.id, m.params);
|
|
5529
5529
|
}
|
|
5530
5530
|
}, On = {
|
|
5531
5531
|
id: "doc.command.delete-text",
|
|
@@ -5551,7 +5551,7 @@ const iu = "doc.command.insert-text", or = {
|
|
|
5551
5551
|
}],
|
|
5552
5552
|
debounce: !0
|
|
5553
5553
|
}
|
|
5554
|
-
}, p = new
|
|
5554
|
+
}, p = new ve(), m = V.getInstance();
|
|
5555
5555
|
p.push({
|
|
5556
5556
|
t: j.RETAIN,
|
|
5557
5557
|
len: h - 0
|
|
@@ -5576,7 +5576,7 @@ const iu = "doc.command.insert-text", or = {
|
|
|
5576
5576
|
actions: [],
|
|
5577
5577
|
textRanges: a
|
|
5578
5578
|
}
|
|
5579
|
-
}, h = new
|
|
5579
|
+
}, h = new ve(), u = V.getInstance(), { startOffset: f, endOffset: g } = t;
|
|
5580
5580
|
h.push({
|
|
5581
5581
|
t: j.RETAIN,
|
|
5582
5582
|
len: f
|
|
@@ -5611,7 +5611,7 @@ const iu = "doc.command.insert-text", or = {
|
|
|
5611
5611
|
textRanges: g,
|
|
5612
5612
|
prevTextRanges: [c]
|
|
5613
5613
|
}
|
|
5614
|
-
}, m = new
|
|
5614
|
+
}, m = new ve(), S = V.getInstance(), I = [];
|
|
5615
5615
|
d > 0 && m.push({
|
|
5616
5616
|
t: j.RETAIN,
|
|
5617
5617
|
len: a === Ne.LEFT ? d - 1 : d
|
|
@@ -5619,9 +5619,9 @@ const iu = "doc.command.insert-text", or = {
|
|
|
5619
5619
|
t: j.DELETE,
|
|
5620
5620
|
len: 1
|
|
5621
5621
|
});
|
|
5622
|
-
const
|
|
5623
|
-
I.push(S.editOp(m.serialize(),
|
|
5624
|
-
const R = ((x = i.getDrawings()) != null ? x : {})[A],
|
|
5622
|
+
const v = fe(i, h);
|
|
5623
|
+
I.push(S.editOp(m.serialize(), v));
|
|
5624
|
+
const R = ((x = i.getDrawings()) != null ? x : {})[A], C = i.getDrawingsOrder().indexOf(A), y = S.removeOp(["drawings", A], R), O = S.removeOp(["drawingsOrder", C], A);
|
|
5625
5625
|
return I.push(y), I.push(O), p.params.actions = I.reduce((_, M) => V.compose(_, M), null), !!s.syncExecuteCommand(p.id, p.params);
|
|
5626
5626
|
}
|
|
5627
5627
|
}, rr = {
|
|
@@ -5649,10 +5649,10 @@ const iu = "doc.command.insert-text", or = {
|
|
|
5649
5649
|
}
|
|
5650
5650
|
if (S == null || I == null)
|
|
5651
5651
|
return !1;
|
|
5652
|
-
const
|
|
5652
|
+
const v = r === Ne.LEFT ? g - 1 : g, R = [
|
|
5653
5653
|
{
|
|
5654
|
-
startOffset:
|
|
5655
|
-
endOffset:
|
|
5654
|
+
startOffset: v,
|
|
5655
|
+
endOffset: v,
|
|
5656
5656
|
style: A
|
|
5657
5657
|
}
|
|
5658
5658
|
], E = {
|
|
@@ -5663,17 +5663,17 @@ const iu = "doc.command.insert-text", or = {
|
|
|
5663
5663
|
textRanges: R,
|
|
5664
5664
|
prevTextRanges: [i]
|
|
5665
5665
|
}
|
|
5666
|
-
},
|
|
5667
|
-
S.startIndex > 0 &&
|
|
5666
|
+
}, C = new ve(), y = V.getInstance();
|
|
5667
|
+
S.startIndex > 0 && C.push({
|
|
5668
5668
|
t: j.RETAIN,
|
|
5669
5669
|
len: S.startIndex
|
|
5670
|
-
}),
|
|
5670
|
+
}), C.push({
|
|
5671
5671
|
t: j.DELETE,
|
|
5672
5672
|
len: 1
|
|
5673
|
-
}), I.startIndex > S.startIndex + 1 &&
|
|
5673
|
+
}), I.startIndex > S.startIndex + 1 && C.push({
|
|
5674
5674
|
t: j.RETAIN,
|
|
5675
5675
|
len: I.startIndex - S.startIndex - 1
|
|
5676
|
-
}),
|
|
5676
|
+
}), C.push({
|
|
5677
5677
|
t: j.RETAIN,
|
|
5678
5678
|
len: 1,
|
|
5679
5679
|
coverType: fo.REPLACE,
|
|
@@ -5688,7 +5688,7 @@ const iu = "doc.command.insert-text", or = {
|
|
|
5688
5688
|
}
|
|
5689
5689
|
});
|
|
5690
5690
|
const O = fe(d, l);
|
|
5691
|
-
return E.params.actions = y.editOp(
|
|
5691
|
+
return E.params.actions = y.editOp(C.serialize(), O), !!s.syncExecuteCommand(E.id, E.params);
|
|
5692
5692
|
}
|
|
5693
5693
|
};
|
|
5694
5694
|
function ir(n, e) {
|
|
@@ -5742,15 +5742,15 @@ const _o = {
|
|
|
5742
5742
|
const { segmentId: h, style: u, segmentPage: f } = c, g = r.getSelfOrHeaderFooterModel(h).getBody();
|
|
5743
5743
|
if (g == null)
|
|
5744
5744
|
return !1;
|
|
5745
|
-
const p = c, { startOffset: m, collapsed: S } = p, I = d.findNodeByCharIndex(m, h, f),
|
|
5745
|
+
const p = c, { startOffset: m, collapsed: S } = p, I = d.findNodeByCharIndex(m, h, f), v = Tc(I), R = Bc(I, g);
|
|
5746
5746
|
let E = m;
|
|
5747
|
-
const
|
|
5748
|
-
if (_c(I) &&
|
|
5747
|
+
const C = d.findNodeByCharIndex(m - 1, h, f);
|
|
5748
|
+
if (_c(I) && C !== I && (v === !0 || R === !0) && S) {
|
|
5749
5749
|
const x = Mc(I, g);
|
|
5750
5750
|
if (x == null)
|
|
5751
5751
|
return !1;
|
|
5752
5752
|
const _ = x == null ? void 0 : x.startIndex, M = { startIndex: 0 }, w = x.paragraphStyle;
|
|
5753
|
-
if (
|
|
5753
|
+
if (v === !0) {
|
|
5754
5754
|
const H = x.paragraphStyle;
|
|
5755
5755
|
if (H) {
|
|
5756
5756
|
M.paragraphStyle = H;
|
|
@@ -5783,15 +5783,15 @@ const _o = {
|
|
|
5783
5783
|
segmentId: h
|
|
5784
5784
|
});
|
|
5785
5785
|
} else if (S === !0) {
|
|
5786
|
-
if (
|
|
5786
|
+
if (C == null)
|
|
5787
5787
|
return !0;
|
|
5788
|
-
if (
|
|
5788
|
+
if (C.content === "\r")
|
|
5789
5789
|
s = await o.executeCommand(rr.id, {
|
|
5790
5790
|
direction: Ne.LEFT,
|
|
5791
5791
|
range: p
|
|
5792
5792
|
});
|
|
5793
|
-
else if (
|
|
5794
|
-
const x = (D = r.getSnapshot().drawings) == null ? void 0 : D[(O =
|
|
5793
|
+
else if (C.streamType === "\b") {
|
|
5794
|
+
const x = (D = r.getSnapshot().drawings) == null ? void 0 : D[(O = C.drawingId) != null ? O : ""];
|
|
5795
5795
|
if (x == null)
|
|
5796
5796
|
return !0;
|
|
5797
5797
|
if (x.layoutType === po.INLINE) {
|
|
@@ -5800,13 +5800,13 @@ const _o = {
|
|
|
5800
5800
|
direction: Ne.LEFT,
|
|
5801
5801
|
range: c,
|
|
5802
5802
|
unitId: M,
|
|
5803
|
-
drawingId:
|
|
5803
|
+
drawingId: C.drawingId
|
|
5804
5804
|
});
|
|
5805
5805
|
} else {
|
|
5806
5806
|
const M = d.findNodeByCharIndex(m - 2);
|
|
5807
5807
|
if (M == null)
|
|
5808
5808
|
return !0;
|
|
5809
|
-
E -=
|
|
5809
|
+
E -= C.count, E -= M.count;
|
|
5810
5810
|
const w = [
|
|
5811
5811
|
{
|
|
5812
5812
|
startOffset: E,
|
|
@@ -5828,12 +5828,12 @@ const _o = {
|
|
|
5828
5828
|
});
|
|
5829
5829
|
}
|
|
5830
5830
|
} else
|
|
5831
|
-
E -=
|
|
5831
|
+
E -= C.count, s = await o.executeCommand(On.id, {
|
|
5832
5832
|
unitId: r.getUnitId(),
|
|
5833
5833
|
range: p,
|
|
5834
5834
|
segmentId: h,
|
|
5835
5835
|
direction: Ne.LEFT,
|
|
5836
|
-
len:
|
|
5836
|
+
len: C.count
|
|
5837
5837
|
});
|
|
5838
5838
|
} else {
|
|
5839
5839
|
const x = Qa(p, [p]);
|
|
@@ -5850,13 +5850,13 @@ const _o = {
|
|
|
5850
5850
|
type: N.COMMAND,
|
|
5851
5851
|
// eslint-disable-next-line max-lines-per-function, complexity
|
|
5852
5852
|
handler: async (n) => {
|
|
5853
|
-
var I,
|
|
5853
|
+
var I, v;
|
|
5854
5854
|
const e = n.get(W), o = n.get(Q).getCurrentUniverDocInstance();
|
|
5855
5855
|
if (!o)
|
|
5856
5856
|
return !1;
|
|
5857
5857
|
const s = Je(n, o.getUnitId()), r = n.get(T), i = e.getActiveTextRange(), a = e.getRectRanges(), c = e.getTextRanges(), l = s == null ? void 0 : s.getSkeleton();
|
|
5858
5858
|
if (a != null && a.length) {
|
|
5859
|
-
const R = ir(c, a), E = a[0].segmentId,
|
|
5859
|
+
const R = ir(c, a), E = a[0].segmentId, C = [
|
|
5860
5860
|
{
|
|
5861
5861
|
startOffset: R,
|
|
5862
5862
|
endOffset: R
|
|
@@ -5864,7 +5864,7 @@ const _o = {
|
|
|
5864
5864
|
];
|
|
5865
5865
|
return r.executeCommand($t.id, {
|
|
5866
5866
|
segmentId: E,
|
|
5867
|
-
textRanges:
|
|
5867
|
+
textRanges: C
|
|
5868
5868
|
});
|
|
5869
5869
|
}
|
|
5870
5870
|
if (i == null || l == null || c == null)
|
|
@@ -5886,10 +5886,10 @@ const _o = {
|
|
|
5886
5886
|
range: i
|
|
5887
5887
|
});
|
|
5888
5888
|
else if (R.streamType === "\b") {
|
|
5889
|
-
const
|
|
5890
|
-
if (
|
|
5889
|
+
const C = (v = o.getSnapshot().drawings) == null ? void 0 : v[(I = R.drawingId) != null ? I : ""];
|
|
5890
|
+
if (C == null)
|
|
5891
5891
|
return !0;
|
|
5892
|
-
if (
|
|
5892
|
+
if (C.layoutType === po.INLINE) {
|
|
5893
5893
|
const O = o.getUnitId();
|
|
5894
5894
|
S = await r.executeCommand(sr.id, {
|
|
5895
5895
|
direction: Ne.RIGHT,
|
|
@@ -5921,7 +5921,7 @@ const _o = {
|
|
|
5921
5921
|
});
|
|
5922
5922
|
}
|
|
5923
5923
|
} else {
|
|
5924
|
-
const
|
|
5924
|
+
const C = [
|
|
5925
5925
|
{
|
|
5926
5926
|
startOffset: g,
|
|
5927
5927
|
endOffset: g,
|
|
@@ -5933,7 +5933,7 @@ const _o = {
|
|
|
5933
5933
|
range: f,
|
|
5934
5934
|
segmentId: A,
|
|
5935
5935
|
direction: Ne.RIGHT,
|
|
5936
|
-
textRanges:
|
|
5936
|
+
textRanges: C,
|
|
5937
5937
|
len: R.count
|
|
5938
5938
|
});
|
|
5939
5939
|
}
|
|
@@ -6075,7 +6075,7 @@ function di(n, e) {
|
|
|
6075
6075
|
const t = n.tagName.toLowerCase();
|
|
6076
6076
|
return typeof e == "string" ? t === e : Array.isArray(e) ? e.some((o) => o === t) : e(n);
|
|
6077
6077
|
}
|
|
6078
|
-
const ui =
|
|
6078
|
+
const ui = 660, lo = class lo {
|
|
6079
6079
|
constructor() {
|
|
6080
6080
|
b(this, "_tableCache", []);
|
|
6081
6081
|
b(this, "_styleCache", /* @__PURE__ */ new Map());
|
|
@@ -6398,11 +6398,11 @@ function mu(n, e, t) {
|
|
|
6398
6398
|
for (; S !== -1; ) {
|
|
6399
6399
|
const I = a[S];
|
|
6400
6400
|
a.splice(S, 1), g += Go(o, m, I.startIndex);
|
|
6401
|
-
const
|
|
6402
|
-
if (
|
|
6403
|
-
switch (
|
|
6401
|
+
const v = s[I.blockId];
|
|
6402
|
+
if (v)
|
|
6403
|
+
switch (v.drawingType) {
|
|
6404
6404
|
case Qs.DRAWING_IMAGE: {
|
|
6405
|
-
g += pu(
|
|
6405
|
+
g += pu(v), p++;
|
|
6406
6406
|
break;
|
|
6407
6407
|
}
|
|
6408
6408
|
}
|
|
@@ -6411,13 +6411,13 @@ function mu(n, e, t) {
|
|
|
6411
6411
|
return g = g + Go(o, m, f + 1), { sliceHtml: g, customBlockLength: p };
|
|
6412
6412
|
};
|
|
6413
6413
|
c.forEach((u) => {
|
|
6414
|
-
var
|
|
6414
|
+
var v, R;
|
|
6415
6415
|
const { startIndex: f, endIndex: g, rangeType: p, rangeId: m } = u, S = d(l, f);
|
|
6416
6416
|
A += S.sliceHtml;
|
|
6417
6417
|
const I = d(f, g + 1);
|
|
6418
6418
|
switch (p) {
|
|
6419
6419
|
case wi.HYPERLINK: {
|
|
6420
|
-
A += `<a data-rangeid="${m}" href="${(R = (
|
|
6420
|
+
A += `<a data-rangeid="${m}" href="${(R = (v = u.properties) == null ? void 0 : v.url) != null ? R : ""}">${I.sliceHtml}</a>`;
|
|
6421
6421
|
break;
|
|
6422
6422
|
}
|
|
6423
6423
|
default: {
|
|
@@ -6499,8 +6499,8 @@ class Eu {
|
|
|
6499
6499
|
return t;
|
|
6500
6500
|
}
|
|
6501
6501
|
}
|
|
6502
|
-
var Iu = Object.defineProperty,
|
|
6503
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
6502
|
+
var Iu = Object.defineProperty, Cu = Object.getOwnPropertyDescriptor, vu = (n, e, t, o) => {
|
|
6503
|
+
for (var s = o > 1 ? void 0 : o ? Cu(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
6504
6504
|
(i = n[r]) && (s = (o ? i(e, t, s) : i(s)) || s);
|
|
6505
6505
|
return o && s && Iu(e, t, s), s;
|
|
6506
6506
|
}, un = (n, e) => (t, o) => e(t, o, n);
|
|
@@ -6807,7 +6807,7 @@ let fs = class extends me {
|
|
|
6807
6807
|
})), this._umdToHtml.convert([t]);
|
|
6808
6808
|
}
|
|
6809
6809
|
};
|
|
6810
|
-
fs =
|
|
6810
|
+
fs = vu([
|
|
6811
6811
|
un(0, Q),
|
|
6812
6812
|
un(1, Ts),
|
|
6813
6813
|
un(2, T),
|
|
@@ -6849,7 +6849,7 @@ const cr = 999, Jn = {
|
|
|
6849
6849
|
type: N.COMMAND,
|
|
6850
6850
|
// eslint-disable-next-line max-lines-per-function, complexity
|
|
6851
6851
|
handler: async (n) => {
|
|
6852
|
-
var S, I,
|
|
6852
|
+
var S, I, v, R, E;
|
|
6853
6853
|
const e = n.get(T), t = n.get(Re), o = n.get(W), r = n.get(Q).getCurrentUniverDocInstance();
|
|
6854
6854
|
if (r == null)
|
|
6855
6855
|
return !1;
|
|
@@ -6870,7 +6870,7 @@ const cr = 999, Jn = {
|
|
|
6870
6870
|
else
|
|
6871
6871
|
return !1;
|
|
6872
6872
|
if (d !== De.MODERN) {
|
|
6873
|
-
const
|
|
6873
|
+
const C = r.getSnapshot(), { drawings: y = {}, body: O } = C, D = (v = O == null ? void 0 : O.customBlocks) != null ? v : [];
|
|
6874
6874
|
for (const x in y) {
|
|
6875
6875
|
const _ = y[x], M = D.find(($) => $.blockId === x);
|
|
6876
6876
|
if (M == null)
|
|
@@ -6891,7 +6891,7 @@ const cr = 999, Jn = {
|
|
|
6891
6891
|
q && g.push(q);
|
|
6892
6892
|
}
|
|
6893
6893
|
}
|
|
6894
|
-
return u.params.actions = g.reduce((
|
|
6894
|
+
return u.params.actions = g.reduce((C, y) => V.compose(C, y), null), !!e.syncExecuteCommand(u.id, u.params);
|
|
6895
6895
|
}
|
|
6896
6896
|
}, dr = {
|
|
6897
6897
|
id: "doc.table.delete-rows",
|
|
@@ -6907,22 +6907,22 @@ const cr = 999, Jn = {
|
|
|
6907
6907
|
const A = Je(n, c.getUnitId());
|
|
6908
6908
|
if (A == null)
|
|
6909
6909
|
return !1;
|
|
6910
|
-
const d = A.getViewModel(), h = c == null ? void 0 : c.getUnitId(), u = new
|
|
6910
|
+
const d = A.getViewModel(), h = c == null ? void 0 : c.getUnitId(), u = new ve(), f = V.getInstance(), g = Ma(i, d);
|
|
6911
6911
|
if (g == null)
|
|
6912
6912
|
return !1;
|
|
6913
|
-
const { offset: p, rowIndexes: m, len: S, tableId: I, cursor:
|
|
6913
|
+
const { offset: p, rowIndexes: m, len: S, tableId: I, cursor: v, selectWholeTable: R } = g;
|
|
6914
6914
|
if (R)
|
|
6915
6915
|
return o.executeCommand(Nn.id);
|
|
6916
|
-
const E = [],
|
|
6917
|
-
startOffset:
|
|
6918
|
-
endOffset:
|
|
6916
|
+
const E = [], C = [{
|
|
6917
|
+
startOffset: v,
|
|
6918
|
+
endOffset: v,
|
|
6919
6919
|
collapsed: !0
|
|
6920
6920
|
}], y = {
|
|
6921
6921
|
id: X.id,
|
|
6922
6922
|
params: {
|
|
6923
6923
|
unitId: h,
|
|
6924
6924
|
actions: [],
|
|
6925
|
-
textRanges:
|
|
6925
|
+
textRanges: C
|
|
6926
6926
|
}
|
|
6927
6927
|
};
|
|
6928
6928
|
p > 0 && u.push({
|
|
@@ -6954,13 +6954,13 @@ const cr = 999, Jn = {
|
|
|
6954
6954
|
const A = Je(n, c.getUnitId());
|
|
6955
6955
|
if (A == null)
|
|
6956
6956
|
return !1;
|
|
6957
|
-
const d = A.getViewModel(), h = c == null ? void 0 : c.getUnitId(), u = new
|
|
6957
|
+
const d = A.getViewModel(), h = c == null ? void 0 : c.getUnitId(), u = new ve(), f = V.getInstance(), g = Jd(i, d);
|
|
6958
6958
|
if (g == null)
|
|
6959
6959
|
return !1;
|
|
6960
|
-
const { offsets: p, columnIndexes: m, tableId: S, cursor: I, rowCount:
|
|
6960
|
+
const { offsets: p, columnIndexes: m, tableId: S, cursor: I, rowCount: v, selectWholeTable: R } = g;
|
|
6961
6961
|
if (R)
|
|
6962
6962
|
return o.executeCommand(Nn.id);
|
|
6963
|
-
const E = [],
|
|
6963
|
+
const E = [], C = [{
|
|
6964
6964
|
startOffset: I,
|
|
6965
6965
|
endOffset: I,
|
|
6966
6966
|
collapsed: !0
|
|
@@ -6969,7 +6969,7 @@ const cr = 999, Jn = {
|
|
|
6969
6969
|
params: {
|
|
6970
6970
|
unitId: h,
|
|
6971
6971
|
actions: [],
|
|
6972
|
-
textRanges:
|
|
6972
|
+
textRanges: C
|
|
6973
6973
|
}
|
|
6974
6974
|
};
|
|
6975
6975
|
for (const x of p) {
|
|
@@ -6984,7 +6984,7 @@ const cr = 999, Jn = {
|
|
|
6984
6984
|
}
|
|
6985
6985
|
const O = fe(c, a);
|
|
6986
6986
|
E.push(f.editOp(u.serialize(), O)), m.reverse();
|
|
6987
|
-
for (let x = 0; x <
|
|
6987
|
+
for (let x = 0; x < v; x++)
|
|
6988
6988
|
for (const _ of m) {
|
|
6989
6989
|
const M = f.removeOp(["tableSource", S, "tableRows", x, "tableCells", _]);
|
|
6990
6990
|
E.push(M);
|
|
@@ -7009,10 +7009,10 @@ const cr = 999, Jn = {
|
|
|
7009
7009
|
const A = Je(n, c.getUnitId());
|
|
7010
7010
|
if (A == null)
|
|
7011
7011
|
return !1;
|
|
7012
|
-
const d = A.getViewModel(), h = c == null ? void 0 : c.getUnitId(), u = new
|
|
7012
|
+
const d = A.getViewModel(), h = c == null ? void 0 : c.getUnitId(), u = new ve(), f = V.getInstance(), g = Pa(i, d);
|
|
7013
7013
|
if (g == null)
|
|
7014
7014
|
return !1;
|
|
7015
|
-
const { offset: p, len: m, tableId: S, cursor: I } = g,
|
|
7015
|
+
const { offset: p, len: m, tableId: S, cursor: I } = g, v = [], R = [{
|
|
7016
7016
|
startOffset: I,
|
|
7017
7017
|
endOffset: I,
|
|
7018
7018
|
collapsed: !0
|
|
@@ -7031,10 +7031,10 @@ const cr = 999, Jn = {
|
|
|
7031
7031
|
t: j.DELETE,
|
|
7032
7032
|
len: m
|
|
7033
7033
|
});
|
|
7034
|
-
const
|
|
7035
|
-
|
|
7034
|
+
const C = fe(c, a);
|
|
7035
|
+
v.push(f.editOp(u.serialize(), C));
|
|
7036
7036
|
const y = f.removeOp(["tableSource", S]);
|
|
7037
|
-
return
|
|
7037
|
+
return v.push(y), E.params.actions = v.reduce((D, x) => V.compose(D, x), null), !!o.syncExecuteCommand(E.id, E.params);
|
|
7038
7038
|
}
|
|
7039
7039
|
}, hr = "doc.command.table-insert-row", gr = "doc.command.table-insert-column", Ru = "doc.command.table-insert-row-above", bu = "doc.command.table-insert-row-bellow", xu = "doc.command.table-insert-column-left", Ou = "doc.command.table-insert-column-right", fr = {
|
|
7040
7040
|
id: Ru,
|
|
@@ -7066,12 +7066,12 @@ const cr = 999, Jn = {
|
|
|
7066
7066
|
const h = Je(n, A.getUnitId());
|
|
7067
7067
|
if (h == null)
|
|
7068
7068
|
return !1;
|
|
7069
|
-
const u = h.getViewModel(), f = A == null ? void 0 : A.getUnitId(), g = new
|
|
7069
|
+
const u = h.getViewModel(), f = A == null ? void 0 : A.getUnitId(), g = new ve(), p = V.getInstance(), m = qd(c, t, u);
|
|
7070
7070
|
if (m == null)
|
|
7071
7071
|
return !1;
|
|
7072
|
-
const { offset: S, colCount: I, tableId:
|
|
7073
|
-
startOffset:
|
|
7074
|
-
endOffset:
|
|
7072
|
+
const { offset: S, colCount: I, tableId: v, insertRowIndex: R } = m, E = [], C = S + 2, y = [{
|
|
7073
|
+
startOffset: C,
|
|
7074
|
+
endOffset: C,
|
|
7075
7075
|
collapsed: !0
|
|
7076
7076
|
}], O = {
|
|
7077
7077
|
id: X.id,
|
|
@@ -7093,7 +7093,7 @@ const cr = 999, Jn = {
|
|
|
7093
7093
|
});
|
|
7094
7094
|
const x = fe(A, l);
|
|
7095
7095
|
E.push(p.editOp(g.serialize(), x));
|
|
7096
|
-
const _ = tr(I), M = p.insertOp(["tableSource",
|
|
7096
|
+
const _ = tr(I), M = p.insertOp(["tableSource", v, "tableRows", R], _);
|
|
7097
7097
|
return E.push(M), O.params.actions = E.reduce((F, H) => V.compose(F, H), null), !!r.syncExecuteCommand(O.id, O.params);
|
|
7098
7098
|
}
|
|
7099
7099
|
}, yu = {
|
|
@@ -7111,12 +7111,12 @@ const cr = 999, Jn = {
|
|
|
7111
7111
|
const h = Je(n, A.getUnitId());
|
|
7112
7112
|
if (h == null)
|
|
7113
7113
|
return !1;
|
|
7114
|
-
const u = h.getViewModel(), f = A == null ? void 0 : A.getUnitId(), g = new
|
|
7114
|
+
const u = h.getViewModel(), f = A == null ? void 0 : A.getUnitId(), g = new ve(), p = V.getInstance(), m = Kd(c, t, u);
|
|
7115
7115
|
if (m == null)
|
|
7116
7116
|
return !1;
|
|
7117
|
-
const { offsets: S, columnIndex: I, tableId:
|
|
7118
|
-
startOffset:
|
|
7119
|
-
endOffset:
|
|
7117
|
+
const { offsets: S, columnIndex: I, tableId: v, rowCount: R } = m, E = [], C = S[0] + 1, y = [{
|
|
7118
|
+
startOffset: C,
|
|
7119
|
+
endOffset: C,
|
|
7120
7120
|
collapsed: !0
|
|
7121
7121
|
}], O = {
|
|
7122
7122
|
id: X.id,
|
|
@@ -7141,15 +7141,15 @@ const cr = 999, Jn = {
|
|
|
7141
7141
|
const D = fe(A, l);
|
|
7142
7142
|
E.push(p.editOp(g.serialize(), D));
|
|
7143
7143
|
for (let q = 0; q < R; q++) {
|
|
7144
|
-
const $ = er(), Ie = p.insertOp(["tableSource",
|
|
7144
|
+
const $ = er(), Ie = p.insertOp(["tableSource", v, "tableRows", q, "tableCells", I], $);
|
|
7145
7145
|
E.push(Ie);
|
|
7146
7146
|
}
|
|
7147
|
-
const x = A.getSnapshot(), _ = x.documentStyle, { marginLeft: M = 0, marginRight: w = 0 } = _, F = ((re = (ue = _.pageSize) == null ? void 0 : ue.width) != null ? re : 800) - M - w, H = (Y = x == null ? void 0 : x.tableSource) == null ? void 0 : Y[
|
|
7147
|
+
const x = A.getSnapshot(), _ = x.documentStyle, { marginLeft: M = 0, marginRight: w = 0 } = _, F = ((re = (ue = _.pageSize) == null ? void 0 : ue.width) != null ? re : 800) - M - w, H = (Y = x == null ? void 0 : x.tableSource) == null ? void 0 : Y[v].tableColumns, { newColWidth: te, widths: Z } = Xd(F, H, I);
|
|
7148
7148
|
for (let q = 0; q < Z.length; q++) {
|
|
7149
|
-
const $ = p.replaceOp(["tableSource",
|
|
7149
|
+
const $ = p.replaceOp(["tableSource", v, "tableColumns", q, "size", "width", "v"], H[q].size.width.v, Z[q]);
|
|
7150
7150
|
E.push($);
|
|
7151
7151
|
}
|
|
7152
|
-
const G = nr(te), z = p.insertOp(["tableSource",
|
|
7152
|
+
const G = nr(te), z = p.insertOp(["tableSource", v, "tableColumns", I], G);
|
|
7153
7153
|
return E.push(z), O.params.actions = E.reduce((q, $) => V.compose(q, $), null), !!r.syncExecuteCommand(O.id, O.params);
|
|
7154
7154
|
}
|
|
7155
7155
|
}, Fa = "COMPONENT_DOC_CREATE_TABLE_CONFIRM";
|
|
@@ -7169,7 +7169,7 @@ const Va = {
|
|
|
7169
7169
|
type: N.COMMAND,
|
|
7170
7170
|
// eslint-disable-next-line max-lines-per-function
|
|
7171
7171
|
handler: async (n) => {
|
|
7172
|
-
var E,
|
|
7172
|
+
var E, C, y;
|
|
7173
7173
|
const e = n.get(W), t = n.get(Q), o = n.get(T), s = n.get(ht), r = e.getActiveTextRange(), i = e.getRectRanges();
|
|
7174
7174
|
if (r == null)
|
|
7175
7175
|
return !1;
|
|
@@ -7186,7 +7186,7 @@ const Va = {
|
|
|
7186
7186
|
const A = c.getUnitId(), { startOffset: d, endOffset: h } = r, f = ((E = l.paragraphs) != null ? E : []).find((O) => O.startIndex >= d);
|
|
7187
7187
|
if (!f)
|
|
7188
7188
|
return !1;
|
|
7189
|
-
const g = f.startIndex, p = s.getDefaultStyle(), m = s.getStyleCache(), S = Io((
|
|
7189
|
+
const g = f.startIndex, p = s.getDefaultStyle(), m = s.getStyleCache(), S = Io((C = l.textRuns) != null ? C : [], h, p, m), I = {
|
|
7190
7190
|
dataStream: U.PARAGRAPH,
|
|
7191
7191
|
paragraphs: Ha(U.PARAGRAPH, f),
|
|
7192
7192
|
textRuns: [{
|
|
@@ -7196,14 +7196,14 @@ const Va = {
|
|
|
7196
7196
|
...S.ts
|
|
7197
7197
|
}
|
|
7198
7198
|
}]
|
|
7199
|
-
},
|
|
7199
|
+
}, v = {
|
|
7200
7200
|
startOffset: d,
|
|
7201
7201
|
endOffset: h,
|
|
7202
7202
|
collapsed: d === h
|
|
7203
7203
|
}, R = await o.executeCommand(or.id, {
|
|
7204
7204
|
unitId: A,
|
|
7205
7205
|
body: I,
|
|
7206
|
-
range:
|
|
7206
|
+
range: v,
|
|
7207
7207
|
segmentId: a
|
|
7208
7208
|
});
|
|
7209
7209
|
if (((y = f.bullet) == null ? void 0 : y.listType) === we.CHECK_LIST_CHECKED) {
|
|
@@ -7237,9 +7237,9 @@ const Va = {
|
|
|
7237
7237
|
const { startOffset: p } = c, S = ((Y = h.paragraphs) != null ? Y : []).find((Te) => Te.startIndex >= p), I = g.findNodeByCharIndex(p, l, A);
|
|
7238
7238
|
if (I == null)
|
|
7239
7239
|
return !1;
|
|
7240
|
-
const
|
|
7241
|
-
startOffset:
|
|
7242
|
-
endOffset:
|
|
7240
|
+
const v = new ve(), R = V.getInstance(), E = [], C = p + 4, y = [{
|
|
7241
|
+
startOffset: C,
|
|
7242
|
+
endOffset: C,
|
|
7243
7243
|
collapsed: !0
|
|
7244
7244
|
}], O = {
|
|
7245
7245
|
id: X.id,
|
|
@@ -7249,10 +7249,10 @@ const Va = {
|
|
|
7249
7249
|
textRanges: y
|
|
7250
7250
|
}
|
|
7251
7251
|
};
|
|
7252
|
-
p > 0 &&
|
|
7252
|
+
p > 0 && v.push({
|
|
7253
7253
|
t: j.RETAIN,
|
|
7254
7254
|
len: p
|
|
7255
|
-
}),
|
|
7255
|
+
}), v.push({
|
|
7256
7256
|
t: j.INSERT,
|
|
7257
7257
|
body: {
|
|
7258
7258
|
dataStream: U.PARAGRAPH,
|
|
@@ -7269,7 +7269,7 @@ const Va = {
|
|
|
7269
7269
|
if (H == null)
|
|
7270
7270
|
return !1;
|
|
7271
7271
|
const { pageWidth: te, marginLeft: Z, marginRight: G } = H, z = _a(t, o, te - Z - G);
|
|
7272
|
-
|
|
7272
|
+
v.push({
|
|
7273
7273
|
t: j.INSERT,
|
|
7274
7274
|
body: {
|
|
7275
7275
|
dataStream: M,
|
|
@@ -7291,7 +7291,7 @@ const Va = {
|
|
|
7291
7291
|
len: M.length
|
|
7292
7292
|
});
|
|
7293
7293
|
const ne = fe(d, l);
|
|
7294
|
-
E.push(R.editOp(
|
|
7294
|
+
E.push(R.editOp(v.serialize(), ne));
|
|
7295
7295
|
const ue = R.insertOp(["tableSource", z.tableId], z);
|
|
7296
7296
|
return E.push(ue), O.params.actions = E.reduce((Te, ze) => V.compose(Te, ze), null), !!i.syncExecuteCommand(O.id, O.params);
|
|
7297
7297
|
}
|
|
@@ -7343,12 +7343,12 @@ const Va = {
|
|
|
7343
7343
|
}
|
|
7344
7344
|
}, h = new Qt();
|
|
7345
7345
|
h.reset();
|
|
7346
|
-
const u = new
|
|
7346
|
+
const u = new ve(), f = V.getInstance();
|
|
7347
7347
|
for (const I of A) {
|
|
7348
|
-
const { startIndex:
|
|
7348
|
+
const { startIndex: v } = I;
|
|
7349
7349
|
u.push({
|
|
7350
7350
|
t: j.RETAIN,
|
|
7351
|
-
len:
|
|
7351
|
+
len: v - h.cursor
|
|
7352
7352
|
});
|
|
7353
7353
|
const R = {
|
|
7354
7354
|
...I.paragraphStyle,
|
|
@@ -7368,7 +7368,7 @@ const Va = {
|
|
|
7368
7368
|
]
|
|
7369
7369
|
},
|
|
7370
7370
|
coverType: fo.REPLACE
|
|
7371
|
-
}), h.moveCursorTo(
|
|
7371
|
+
}), h.moveCursorTo(v + 1);
|
|
7372
7372
|
}
|
|
7373
7373
|
const g = fe(r, a);
|
|
7374
7374
|
return d.params.actions = f.editOp(u.serialize(), g), !!s.syncExecuteCommand(d.id, d.params);
|
|
@@ -7531,7 +7531,7 @@ function Gu() {
|
|
|
7531
7531
|
{ label: n.t("toolbar.alignJustify"), value: String(Le.JUSTIFIED), icon: /* @__PURE__ */ B.jsx(aa, {}) }
|
|
7532
7532
|
],
|
|
7533
7533
|
[]
|
|
7534
|
-
), t = _u(), [o, s] = Mu(t, e[0].value), [r, i] = Pu(t), [a, c] = Du(t), [l, A] = wu(t), [d, h] = Nu(t), [u, f] = Qu(t), [g, p] = Uu(t), { lineSpacing: [m, S], spacingRule: [I,
|
|
7534
|
+
), t = _u(), [o, s] = Mu(t, e[0].value), [r, i] = Pu(t), [a, c] = Du(t), [l, A] = wu(t), [d, h] = Nu(t), [u, f] = Qu(t), [g, p] = Uu(t), { lineSpacing: [m, S], spacingRule: [I, v] } = Lu(t), R = Pt(() => I === Yt.AUTO ? { min: 1, max: 5, step: m < 2 ? 0.5 : 1 } : { min: 1, max: 100 }, [I, m]);
|
|
7535
7535
|
return /* @__PURE__ */ B.jsxs("div", { className: ie.paragraphSetting, children: [
|
|
7536
7536
|
/* @__PURE__ */ B.jsx("div", { className: ie.paragraphSettingTitle, children: n.t("doc.paragraphSetting.alignment") }),
|
|
7537
7537
|
/* @__PURE__ */ B.jsx(
|
|
@@ -7613,14 +7613,14 @@ function Gu() {
|
|
|
7613
7613
|
style: { width: 162 },
|
|
7614
7614
|
children: [
|
|
7615
7615
|
/* @__PURE__ */ B.jsx(
|
|
7616
|
-
|
|
7616
|
+
Cl,
|
|
7617
7617
|
{
|
|
7618
7618
|
value: `${I}`,
|
|
7619
7619
|
options: [
|
|
7620
7620
|
{ label: n.t("doc.paragraphSetting.multiSpace"), value: `${Yt.AUTO}` },
|
|
7621
7621
|
{ label: n.t("doc.paragraphSetting.fixedValue"), value: `${Yt.AT_LEAST}` }
|
|
7622
7622
|
],
|
|
7623
|
-
onChange: (E) =>
|
|
7623
|
+
onChange: (E) => v(Number(E))
|
|
7624
7624
|
}
|
|
7625
7625
|
),
|
|
7626
7626
|
/* @__PURE__ */ B.jsx(
|
|
@@ -7693,7 +7693,7 @@ const Ir = {
|
|
|
7693
7693
|
id: "sidebar.operation.doc-paragraph-setting-panel",
|
|
7694
7694
|
type: N.OPERATION,
|
|
7695
7695
|
handler: (n) => (n.get(tn).openPanel(), !0)
|
|
7696
|
-
},
|
|
7696
|
+
}, Cr = (n) => {
|
|
7697
7697
|
const e = n.get(W);
|
|
7698
7698
|
return new Ee((t) => {
|
|
7699
7699
|
const o = e.textSelection$.subscribe(() => {
|
|
@@ -7742,7 +7742,7 @@ const pt = (n) => {
|
|
|
7742
7742
|
type: J.BUTTON,
|
|
7743
7743
|
icon: "Copy",
|
|
7744
7744
|
title: "rightClick.copy",
|
|
7745
|
-
disabled$:
|
|
7745
|
+
disabled$: Cr(n),
|
|
7746
7746
|
hidden$: ee(n, P.UNIVER_DOC)
|
|
7747
7747
|
}), th = (n) => ({
|
|
7748
7748
|
id: Ir.id,
|
|
@@ -7755,7 +7755,7 @@ const pt = (n) => {
|
|
|
7755
7755
|
type: J.BUTTON,
|
|
7756
7756
|
icon: "Copy",
|
|
7757
7757
|
title: "rightClick.cut",
|
|
7758
|
-
disabled$:
|
|
7758
|
+
disabled$: Cr(n),
|
|
7759
7759
|
hidden$: ee(n, P.UNIVER_DOC)
|
|
7760
7760
|
}), oh = (n) => ({
|
|
7761
7761
|
id: Ar.id,
|
|
@@ -7768,7 +7768,7 @@ const pt = (n) => {
|
|
|
7768
7768
|
type: J.BUTTON,
|
|
7769
7769
|
icon: "PasteSpecial",
|
|
7770
7770
|
title: "rightClick.delete",
|
|
7771
|
-
disabled$:
|
|
7771
|
+
disabled$: Cr(n),
|
|
7772
7772
|
hidden$: ee(n, P.UNIVER_DOC)
|
|
7773
7773
|
}), ja = "doc.menu.table-insert";
|
|
7774
7774
|
function rh(n) {
|
|
@@ -8080,7 +8080,7 @@ function Ih(n) {
|
|
|
8080
8080
|
hidden$: ee(n, P.UNIVER_DOC)
|
|
8081
8081
|
};
|
|
8082
8082
|
}
|
|
8083
|
-
function
|
|
8083
|
+
function Ch(n) {
|
|
8084
8084
|
const e = n.get(T);
|
|
8085
8085
|
return {
|
|
8086
8086
|
id: Ut.id,
|
|
@@ -8107,7 +8107,7 @@ function vh(n) {
|
|
|
8107
8107
|
hidden$: ee(n, P.UNIVER_DOC)
|
|
8108
8108
|
};
|
|
8109
8109
|
}
|
|
8110
|
-
function
|
|
8110
|
+
function vh(n) {
|
|
8111
8111
|
const e = n.get(T);
|
|
8112
8112
|
return {
|
|
8113
8113
|
id: cn.id,
|
|
@@ -8140,10 +8140,10 @@ function Rh(n) {
|
|
|
8140
8140
|
id: Xt.id,
|
|
8141
8141
|
tooltip: "toolbar.font",
|
|
8142
8142
|
type: J.SELECTOR,
|
|
8143
|
-
label:
|
|
8143
|
+
label: Ca,
|
|
8144
8144
|
selections: il.map((t) => ({
|
|
8145
8145
|
label: {
|
|
8146
|
-
name:
|
|
8146
|
+
name: va,
|
|
8147
8147
|
hoverable: !0
|
|
8148
8148
|
},
|
|
8149
8149
|
value: t.value
|
|
@@ -8559,11 +8559,11 @@ const Hh = {
|
|
|
8559
8559
|
},
|
|
8560
8560
|
[Ut.id]: {
|
|
8561
8561
|
order: 4,
|
|
8562
|
-
menuItemFactory:
|
|
8562
|
+
menuItemFactory: Ch
|
|
8563
8563
|
},
|
|
8564
8564
|
[cn.id]: {
|
|
8565
8565
|
order: 5,
|
|
8566
|
-
menuItemFactory:
|
|
8566
|
+
menuItemFactory: vh
|
|
8567
8567
|
},
|
|
8568
8568
|
[Kt.id]: {
|
|
8569
8569
|
order: 6,
|
|
@@ -8706,7 +8706,7 @@ let Zn = class extends me {
|
|
|
8706
8706
|
}
|
|
8707
8707
|
_initCustomComponents() {
|
|
8708
8708
|
const n = this._componentManager;
|
|
8709
|
-
this.disposeWithMe(n.register(qs,
|
|
8709
|
+
this.disposeWithMe(n.register(qs, vl)), this.disposeWithMe(n.register(Ca, cl)), this.disposeWithMe(n.register(va, ll)), this.disposeWithMe(n.register(Ra, Al)), this.disposeWithMe(n.register(Oa, ld)), this.disposeWithMe(n.register(xa, ad)), this.disposeWithMe(n.register("TodoList", fa));
|
|
8710
8710
|
}
|
|
8711
8711
|
// TODO: @zhangwei, why add workbook to docs-ui?
|
|
8712
8712
|
_initUiParts() {
|
|
@@ -8771,7 +8771,7 @@ var Wh = Object.defineProperty, zh = Object.getOwnPropertyDescriptor, Yh = (n, e
|
|
|
8771
8771
|
return o && s && Wh(e, t, s), s;
|
|
8772
8772
|
}, Xo = (n, e) => (t, o) => e(t, o, n);
|
|
8773
8773
|
const mi = 1.5;
|
|
8774
|
-
let $n = class extends
|
|
8774
|
+
let $n = class extends vt {
|
|
8775
8775
|
constructor(n, e, t, o) {
|
|
8776
8776
|
super(), this._context = n, this._textSelectionManagerService = e, this._editorService = t, this._docSkeletonManagerService = o, this._init();
|
|
8777
8777
|
}
|
|
@@ -8795,18 +8795,18 @@ let $n = class extends Ct {
|
|
|
8795
8795
|
const { unitId: e, scene: t, mainComponent: o } = this._context, s = this._docSkeletonManagerService.getSkeleton();
|
|
8796
8796
|
if (o == null || s == null)
|
|
8797
8797
|
return;
|
|
8798
|
-
const r = o.getOffsetConfig(), { docsLeft: i, docsTop: a } = r, c = new
|
|
8798
|
+
const r = o.getOffsetConfig(), { docsLeft: i, docsTop: a } = r, c = new Ct(r, s), { contentBoxPointGroup: l } = c.getRangePointData(n, n), { left: A, top: d, height: h } = Yn(l), u = A + i, f = d + a, g = t.getViewport(ut.VIEW_MAIN), p = this._editorService.getEditor(e);
|
|
8799
8799
|
if (g == null)
|
|
8800
8800
|
return;
|
|
8801
8801
|
const {
|
|
8802
8802
|
left: m,
|
|
8803
8803
|
top: S,
|
|
8804
8804
|
right: I,
|
|
8805
|
-
bottom:
|
|
8805
|
+
bottom: v
|
|
8806
8806
|
} = g.getBounding().viewBound;
|
|
8807
8807
|
let R = 0, E = 0;
|
|
8808
|
-
const
|
|
8809
|
-
f < S ? R = f - S -
|
|
8808
|
+
const C = p ? (O = p.params.backScrollOffset) != null ? O : 0 : 100;
|
|
8809
|
+
f < S ? R = f - S - C : f > v - h && (R = f - v + h + C), u < m ? E = u - m : u > I - mi && (E = u - I + mi);
|
|
8810
8810
|
const y = g.transViewportScroll2ScrollValue(E, R);
|
|
8811
8811
|
g.scrollByBarDeltaValue(y);
|
|
8812
8812
|
}
|
|
@@ -8829,7 +8829,7 @@ var Gh = Object.defineProperty, qh = Object.getOwnPropertyDescriptor, Kh = (n, e
|
|
|
8829
8829
|
(i = n[r]) && (s = (o ? i(e, t, s) : i(s)) || s);
|
|
8830
8830
|
return o && s && Gh(e, t, s), s;
|
|
8831
8831
|
}, Vt = (n, e) => (t, o) => e(t, o, n);
|
|
8832
|
-
let ps = class extends
|
|
8832
|
+
let ps = class extends vt {
|
|
8833
8833
|
constructor(n, e, t, o, s, r, i) {
|
|
8834
8834
|
super(), this._context = n, this._commandService = e, this._docSelectionRenderService = t, this._docSkeletonManagerService = o, this._editorService = s, this._renderManagerService = r, this._univerInstanceService = i, this._addNewRender(), this._initRenderRefresh(), this._initCommandListener();
|
|
8835
8835
|
}
|
|
@@ -8977,7 +8977,7 @@ const Ya = {
|
|
|
8977
8977
|
}, !1), !0;
|
|
8978
8978
|
}
|
|
8979
8979
|
};
|
|
8980
|
-
class wo extends
|
|
8980
|
+
class wo extends vt {
|
|
8981
8981
|
constructor(t) {
|
|
8982
8982
|
super();
|
|
8983
8983
|
b(this, "_previousActiveRange", null);
|
|
@@ -9042,10 +9042,10 @@ const Jh = Ns, Ga = {
|
|
|
9042
9042
|
if (p == null)
|
|
9043
9043
|
return !1;
|
|
9044
9044
|
Object.assign(u, u);
|
|
9045
|
-
const { startOffset: S, endOffset: I } = u,
|
|
9045
|
+
const { startOffset: S, endOffset: I } = u, v = o.length, R = [
|
|
9046
9046
|
{
|
|
9047
|
-
startOffset: S +
|
|
9048
|
-
endOffset: S +
|
|
9047
|
+
startOffset: S + v,
|
|
9048
|
+
endOffset: S + v,
|
|
9049
9049
|
collapsed: !0,
|
|
9050
9050
|
style: f
|
|
9051
9051
|
}
|
|
@@ -9056,17 +9056,17 @@ const Jh = Ns, Ga = {
|
|
|
9056
9056
|
actions: [],
|
|
9057
9057
|
textRanges: R
|
|
9058
9058
|
}
|
|
9059
|
-
},
|
|
9059
|
+
}, C = A.getDefaultStyle(), y = A.getStyleCache(), O = Vs((te = p.customRanges) != null ? te : [], S + s, Jh.includes(t)), D = Io(
|
|
9060
9060
|
(Z = p.textRuns) != null ? Z : [],
|
|
9061
9061
|
i ? I : S + s,
|
|
9062
|
-
|
|
9062
|
+
C,
|
|
9063
9063
|
y
|
|
9064
|
-
), x = ks((G = p.customDecorations) != null ? G : [], S + s), _ = new
|
|
9064
|
+
), x = ks((G = p.customDecorations) != null ? G : [], S + s), _ = new ve(), M = V.getInstance();
|
|
9065
9065
|
if (!u.collapsed && i) {
|
|
9066
9066
|
const z = Qe.selection.delete([u], p, 0, null, !1);
|
|
9067
9067
|
_.push(...z), E.params.textRanges = [{
|
|
9068
|
-
startOffset: S +
|
|
9069
|
-
endOffset: S +
|
|
9068
|
+
startOffset: S + v,
|
|
9069
|
+
endOffset: S + v,
|
|
9070
9070
|
collapsed: !0
|
|
9071
9071
|
}];
|
|
9072
9072
|
} else
|
|
@@ -9210,7 +9210,7 @@ var tg = Object.defineProperty, ng = Object.getOwnPropertyDescriptor, og = (n, e
|
|
|
9210
9210
|
(i = n[r]) && (s = (o ? i(e, t, s) : i(s)) || s);
|
|
9211
9211
|
return o && s && tg(e, t, s), s;
|
|
9212
9212
|
}, sg = (n, e) => (t, o) => e(t, o, n);
|
|
9213
|
-
let eo = class extends
|
|
9213
|
+
let eo = class extends vt {
|
|
9214
9214
|
constructor(e) {
|
|
9215
9215
|
super();
|
|
9216
9216
|
b(this, "_docContainerController");
|
|
@@ -9281,7 +9281,7 @@ let to = class extends me {
|
|
|
9281
9281
|
_initListSpaceAutoFormat() {
|
|
9282
9282
|
this.disposeWithMe(
|
|
9283
9283
|
this._docAutoFormatService.registerAutoFormat({
|
|
9284
|
-
id:
|
|
9284
|
+
id: Co.id,
|
|
9285
9285
|
match: (n) => {
|
|
9286
9286
|
var r;
|
|
9287
9287
|
const { selection: e, paragraphs: t, unit: o } = n;
|
|
@@ -9492,7 +9492,7 @@ let no = class extends me {
|
|
|
9492
9492
|
}
|
|
9493
9493
|
// eslint-disable-next-line max-lines-per-function, complexity
|
|
9494
9494
|
_handleShiftMoveSelection(e) {
|
|
9495
|
-
var I,
|
|
9495
|
+
var I, v, R;
|
|
9496
9496
|
const t = this._textSelectionManagerService.getActiveTextRange(), o = this._textSelectionManagerService.getTextRanges(), s = this._univerInstanceService.getCurrentUniverDocInstance();
|
|
9497
9497
|
if (s == null)
|
|
9498
9498
|
return;
|
|
@@ -9511,13 +9511,13 @@ let no = class extends me {
|
|
|
9511
9511
|
segmentPage: g
|
|
9512
9512
|
} = t;
|
|
9513
9513
|
if (o.length > 1) {
|
|
9514
|
-
let E = Number.POSITIVE_INFINITY,
|
|
9514
|
+
let E = Number.POSITIVE_INFINITY, C = Number.NEGATIVE_INFINITY;
|
|
9515
9515
|
for (const y of o)
|
|
9516
|
-
E = Math.min(E, y.startOffset),
|
|
9516
|
+
E = Math.min(E, y.startOffset), C = Math.max(C, y.endOffset);
|
|
9517
9517
|
this._textSelectionManagerService.replaceTextRanges([
|
|
9518
9518
|
{
|
|
9519
|
-
startOffset: e === ce.LEFT || e === ce.UP ?
|
|
9520
|
-
endOffset: e === ce.LEFT || e === ce.UP ? E :
|
|
9519
|
+
startOffset: e === ce.LEFT || e === ce.UP ? C : E,
|
|
9520
|
+
endOffset: e === ce.LEFT || e === ce.UP ? E : C,
|
|
9521
9521
|
style: l
|
|
9522
9522
|
}
|
|
9523
9523
|
], !1);
|
|
@@ -9525,10 +9525,10 @@ let no = class extends me {
|
|
|
9525
9525
|
}
|
|
9526
9526
|
const p = A || d === Pe.FORWARD ? a : c;
|
|
9527
9527
|
let m = A || d === Pe.FORWARD ? c : a;
|
|
9528
|
-
const S = (
|
|
9528
|
+
const S = (v = s.getSelfOrHeaderFooterModel(h).getBody().dataStream.length) != null ? v : Number.POSITIVE_INFINITY;
|
|
9529
9529
|
if (e === ce.LEFT || e === ce.RIGHT) {
|
|
9530
|
-
const E = r.findNodeByCharIndex(m - 1, h, g),
|
|
9531
|
-
m = e === ce.RIGHT ? m +
|
|
9530
|
+
const E = r.findNodeByCharIndex(m - 1, h, g), C = r.findNodeByCharIndex(m, h, g);
|
|
9531
|
+
m = e === ce.RIGHT ? m + C.count : m - ((R = E == null ? void 0 : E.count) != null ? R : 0), m = Math.min(S - 2, Math.max(0, m)), this._textSelectionManagerService.replaceTextRanges([
|
|
9532
9532
|
{
|
|
9533
9533
|
startOffset: p,
|
|
9534
9534
|
endOffset: m,
|
|
@@ -9536,7 +9536,7 @@ let no = class extends me {
|
|
|
9536
9536
|
}
|
|
9537
9537
|
], !1), this._scrollToFocusNodePosition(s.getUnitId(), m);
|
|
9538
9538
|
} else {
|
|
9539
|
-
const E = r.findNodeByCharIndex(m, h, g),
|
|
9539
|
+
const E = r.findNodeByCharIndex(m, h, g), C = i.document.getOffsetConfig(), y = A ? u : d === Pe.FORWARD ? f : u, O = this._getTopOrBottomPosition(r, E, y, e === ce.DOWN, !0);
|
|
9540
9540
|
if (O == null) {
|
|
9541
9541
|
const x = e === ce.UP ? 0 : S - 2;
|
|
9542
9542
|
if (x === m)
|
|
@@ -9550,7 +9550,7 @@ let no = class extends me {
|
|
|
9550
9550
|
], !1);
|
|
9551
9551
|
return;
|
|
9552
9552
|
}
|
|
9553
|
-
const D = new
|
|
9553
|
+
const D = new Ct(C, r).getRangePointData(
|
|
9554
9554
|
O,
|
|
9555
9555
|
O
|
|
9556
9556
|
).cursorList[0];
|
|
@@ -9565,7 +9565,7 @@ let no = class extends me {
|
|
|
9565
9565
|
}
|
|
9566
9566
|
// eslint-disable-next-line max-lines-per-function, complexity
|
|
9567
9567
|
_handleMoveCursor(e) {
|
|
9568
|
-
var S, I,
|
|
9568
|
+
var S, I, v, R;
|
|
9569
9569
|
const t = this._textSelectionManagerService.getActiveTextRange(), o = this._textSelectionManagerService.getTextRanges(), s = this._univerInstanceService.getCurrentUniverDocInstance();
|
|
9570
9570
|
if (s == null)
|
|
9571
9571
|
return !1;
|
|
@@ -9575,7 +9575,7 @@ let no = class extends me {
|
|
|
9575
9575
|
const { startOffset: a, endOffset: c, style: l, collapsed: A, segmentId: d, startNodePosition: h, endNodePosition: u, segmentPage: f } = t, g = s.getSelfOrHeaderFooterModel(d).getBody();
|
|
9576
9576
|
if (g == null)
|
|
9577
9577
|
return;
|
|
9578
|
-
const p = (I = g.dataStream.length) != null ? I : Number.POSITIVE_INFINITY, m = (
|
|
9578
|
+
const p = (I = g.dataStream.length) != null ? I : Number.POSITIVE_INFINITY, m = (v = s.getCustomRanges()) != null ? v : [];
|
|
9579
9579
|
if (e === ce.LEFT || e === ce.RIGHT) {
|
|
9580
9580
|
let E;
|
|
9581
9581
|
if (!t.collapsed || o.length > 1) {
|
|
@@ -9587,7 +9587,7 @@ let no = class extends me {
|
|
|
9587
9587
|
const O = r.findNodeByCharIndex(a - 1, d, f), D = r.findNodeByCharIndex(a, d, f), x = r.findNodeByCharIndex(a + 1, d, f);
|
|
9588
9588
|
e === ce.LEFT ? E = Math.max(0, a - ((R = O == null ? void 0 : O.count) != null ? R : 1)) : E = Math.min(p - 2, c + D.count + ((x == null ? void 0 : x.streamType) === U.SECTION_BREAK ? 1 : 0));
|
|
9589
9589
|
}
|
|
9590
|
-
const
|
|
9590
|
+
const C = [
|
|
9591
9591
|
U.TABLE_START,
|
|
9592
9592
|
U.TABLE_END,
|
|
9593
9593
|
U.TABLE_ROW_START,
|
|
@@ -9597,10 +9597,10 @@ let no = class extends me {
|
|
|
9597
9597
|
U.SECTION_BREAK
|
|
9598
9598
|
];
|
|
9599
9599
|
if (e === ce.LEFT)
|
|
9600
|
-
for (;
|
|
9600
|
+
for (; C.includes(g.dataStream[E]); )
|
|
9601
9601
|
E--;
|
|
9602
9602
|
else
|
|
9603
|
-
for (;
|
|
9603
|
+
for (; C.includes(g.dataStream[E]); )
|
|
9604
9604
|
E++;
|
|
9605
9605
|
m.filter((O) => O.wholeEntity && O.startIndex < E && O.endIndex >= E).forEach((O) => {
|
|
9606
9606
|
e === ce.LEFT ? E = Math.min(O.startIndex, E) : E = Math.max(O.endIndex + 1, E);
|
|
@@ -9612,9 +9612,9 @@ let no = class extends me {
|
|
|
9612
9612
|
}
|
|
9613
9613
|
], !1), this._scrollToFocusNodePosition(s.getUnitId(), E);
|
|
9614
9614
|
} else {
|
|
9615
|
-
const E = r.findNodeByCharIndex(a, d, f),
|
|
9615
|
+
const E = r.findNodeByCharIndex(a, d, f), C = r.findNodeByCharIndex(c, d, f), y = i.document.getOffsetConfig(), O = this._getTopOrBottomPosition(
|
|
9616
9616
|
r,
|
|
9617
|
-
e === ce.UP || A ? E :
|
|
9617
|
+
e === ce.UP || A ? E : C,
|
|
9618
9618
|
e === ce.UP || A ? h : u,
|
|
9619
9619
|
e === ce.DOWN
|
|
9620
9620
|
);
|
|
@@ -9629,7 +9629,7 @@ let no = class extends me {
|
|
|
9629
9629
|
], !1);
|
|
9630
9630
|
return;
|
|
9631
9631
|
}
|
|
9632
|
-
const D = new
|
|
9632
|
+
const D = new Ct(y, r).getRangePointData(
|
|
9633
9633
|
O,
|
|
9634
9634
|
O
|
|
9635
9635
|
).cursorList[0];
|
|
@@ -9678,7 +9678,7 @@ let no = class extends me {
|
|
|
9678
9678
|
}
|
|
9679
9679
|
// eslint-disable-next-line max-lines-per-function, complexity
|
|
9680
9680
|
_getNextOrPrevLine(e, t, o = !1) {
|
|
9681
|
-
var g, p, m, S, I,
|
|
9681
|
+
var g, p, m, S, I, v, R, E, C, y, O, D;
|
|
9682
9682
|
const s = e.parent, r = s == null ? void 0 : s.parent, i = r == null ? void 0 : r.parent, a = i == null ? void 0 : i.parent, c = a == null ? void 0 : a.parent;
|
|
9683
9683
|
if (s == null || r == null || i == null || a == null || c == null)
|
|
9684
9684
|
return;
|
|
@@ -9725,7 +9725,7 @@ let no = class extends me {
|
|
|
9725
9725
|
if (t === !0)
|
|
9726
9726
|
A = (I = (S = c.sections[h - 1]) == null ? void 0 : S.columns[0]) == null ? void 0 : I.lines[0];
|
|
9727
9727
|
else {
|
|
9728
|
-
const x = (R = (
|
|
9728
|
+
const x = (R = (v = c.sections) == null ? void 0 : v[h - 1]) == null ? void 0 : R.columns, _ = x == null ? void 0 : x[x.length - 1], M = _ == null ? void 0 : _.lines;
|
|
9729
9729
|
A = M == null ? void 0 : M[M.length - 1];
|
|
9730
9730
|
}
|
|
9731
9731
|
if (A != null)
|
|
@@ -9738,7 +9738,7 @@ let no = class extends me {
|
|
|
9738
9738
|
const f = u.pages.indexOf(c);
|
|
9739
9739
|
if (f !== -1) {
|
|
9740
9740
|
if (t === !0)
|
|
9741
|
-
A = (y = (
|
|
9741
|
+
A = (y = (C = (E = u.pages[f + 1]) == null ? void 0 : E.sections[0]) == null ? void 0 : C.columns[0]) == null ? void 0 : y.lines[0];
|
|
9742
9742
|
else {
|
|
9743
9743
|
const x = (O = u.pages[f - 1]) == null ? void 0 : O.sections;
|
|
9744
9744
|
if (x == null)
|
|
@@ -9796,7 +9796,7 @@ const mg = "univer-create", Sg = "univer-create-item", Eg = "univer-create-label
|
|
|
9796
9796
|
createItem: Sg,
|
|
9797
9797
|
createLabel: Eg,
|
|
9798
9798
|
createInput: Ig
|
|
9799
|
-
},
|
|
9799
|
+
}, Cg = ({
|
|
9800
9800
|
handleRowColChange: n,
|
|
9801
9801
|
tableCreateParams: e
|
|
9802
9802
|
}) => {
|
|
@@ -9841,11 +9841,11 @@ const mg = "univer-create", Sg = "univer-create-item", Eg = "univer-create-label
|
|
|
9841
9841
|
] })
|
|
9842
9842
|
] });
|
|
9843
9843
|
};
|
|
9844
|
-
var
|
|
9844
|
+
var vg = Object.defineProperty, Rg = Object.getOwnPropertyDescriptor, bg = (n, e, t, o) => {
|
|
9845
9845
|
for (var s = o > 1 ? void 0 : o ? Rg(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
9846
9846
|
(i = n[r]) && (s = (o ? i(e, t, s) : i(s)) || s);
|
|
9847
|
-
return o && s &&
|
|
9848
|
-
},
|
|
9847
|
+
return o && s && vg(e, t, s), s;
|
|
9848
|
+
}, Ci = (n, e) => (t, o) => e(t, o, n);
|
|
9849
9849
|
let oo = class extends me {
|
|
9850
9850
|
constructor(n, e) {
|
|
9851
9851
|
super(), this._commandService = n, this._componentManager = e, this._initialize();
|
|
@@ -9860,16 +9860,16 @@ let oo = class extends me {
|
|
|
9860
9860
|
}
|
|
9861
9861
|
_initCustomComponents() {
|
|
9862
9862
|
const n = this._componentManager;
|
|
9863
|
-
this.disposeWithMe(n.register(Fa,
|
|
9863
|
+
this.disposeWithMe(n.register(Fa, Cg));
|
|
9864
9864
|
}
|
|
9865
9865
|
_init() {
|
|
9866
9866
|
}
|
|
9867
9867
|
};
|
|
9868
9868
|
oo = bg([
|
|
9869
|
-
|
|
9870
|
-
|
|
9869
|
+
Ci(0, T),
|
|
9870
|
+
Ci(1, k(Eo))
|
|
9871
9871
|
], oo);
|
|
9872
|
-
const
|
|
9872
|
+
const vi = 4;
|
|
9873
9873
|
var xg = Object.defineProperty, Og = Object.getOwnPropertyDescriptor, yg = (n, e, t, o) => {
|
|
9874
9874
|
for (var s = o > 1 ? void 0 : o ? Og(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
9875
9875
|
(i = n[r]) && (s = (o ? i(e, t, s) : i(s)) || s);
|
|
@@ -9914,12 +9914,12 @@ const Zo = (n, e) => {
|
|
|
9914
9914
|
const { scene: t, mainComponent: o, engine: s } = e, r = e.with(de).getSkeleton(), i = r.findNodePositionByCharIndex(n.startOffset, !0, n.segmentId, n.segmentPage), a = r.findNodePositionByCharIndex(n.endOffset, !0, n.segmentId, n.segmentPage), c = o;
|
|
9915
9915
|
if (!a || !i)
|
|
9916
9916
|
return;
|
|
9917
|
-
const l = c.getOffsetConfig(), { docsLeft: A, docsTop: d } = l, h = s.getCanvasElement(), u = h.getBoundingClientRect(), f = Fi(h.style.width), { top: g, left: p, width: m } = u, S = m / f, { scaleX: I, scaleY:
|
|
9917
|
+
const l = c.getOffsetConfig(), { docsLeft: A, docsTop: d } = l, h = s.getCanvasElement(), u = h.getBoundingClientRect(), f = Fi(h.style.width), { top: g, left: p, width: m } = u, S = m / f, { scaleX: I, scaleY: v } = t.getAncestorScale(), R = new Ct(l, r), { borderBoxPointGroup: E } = R.getRangePointData(i, a);
|
|
9918
9918
|
return Ws(E).map((O) => Za(O, t)).map((O) => ({
|
|
9919
9919
|
left: (O.left + A * I) * S + p,
|
|
9920
9920
|
right: (O.right + A * I) * S + p,
|
|
9921
|
-
top: (O.top + d *
|
|
9922
|
-
bottom: (O.bottom + d *
|
|
9921
|
+
top: (O.top + d * v) * S + g,
|
|
9922
|
+
bottom: (O.bottom + d * v) * S + g
|
|
9923
9923
|
}));
|
|
9924
9924
|
};
|
|
9925
9925
|
let Es = class extends me {
|
|
@@ -9933,7 +9933,7 @@ let Es = class extends me {
|
|
|
9933
9933
|
right: l + d,
|
|
9934
9934
|
top: A,
|
|
9935
9935
|
bottom: A + h
|
|
9936
|
-
}, f = c.getCanvasElement(), g = f.getBoundingClientRect(), p = Fi(f.style.width), m = Za(u, a), { top: S, left: I, width:
|
|
9936
|
+
}, f = c.getCanvasElement(), g = f.getBoundingClientRect(), p = Fi(f.style.width), m = Za(u, a), { top: S, left: I, width: v } = g, R = v / p;
|
|
9937
9937
|
return {
|
|
9938
9938
|
left: m.left * R + I,
|
|
9939
9939
|
right: m.right * R + I,
|
|
@@ -10057,10 +10057,10 @@ const Pg = (n, e, t, o) => {
|
|
|
10057
10057
|
const a = t.findNodePositionByCharIndex(i, !0, n.segmentId, o);
|
|
10058
10058
|
if (!a || !s)
|
|
10059
10059
|
return;
|
|
10060
|
-
const c = e.getOffsetConfig(), l = new
|
|
10060
|
+
const c = e.getOffsetConfig(), l = new Ct(c, t), { borderBoxPointGroup: A } = l.getRangePointData(s, a);
|
|
10061
10061
|
return Ws(A).map((m) => ({
|
|
10062
|
-
top: m.top + c.docsTop -
|
|
10063
|
-
bottom: m.bottom + c.docsTop +
|
|
10062
|
+
top: m.top + c.docsTop - vi,
|
|
10063
|
+
bottom: m.bottom + c.docsTop + vi,
|
|
10064
10064
|
left: m.left + c.docsLeft,
|
|
10065
10065
|
right: m.right + c.docsLeft
|
|
10066
10066
|
}));
|
|
@@ -10068,7 +10068,7 @@ const Pg = (n, e, t, o) => {
|
|
|
10068
10068
|
const s = t.findPositionByGlyph(n, o);
|
|
10069
10069
|
if (!s)
|
|
10070
10070
|
return;
|
|
10071
|
-
const r = e.getOffsetConfig(), i = { ...s, isBack: !0 }, a = new
|
|
10071
|
+
const r = e.getOffsetConfig(), i = { ...s, isBack: !0 }, a = new Ct(r, t), { borderBoxPointGroup: c } = a.getRangePointData(i, i), A = Ws(c)[0];
|
|
10072
10072
|
return {
|
|
10073
10073
|
top: A.top + r.docsTop,
|
|
10074
10074
|
bottom: A.bottom + r.docsTop,
|
|
@@ -10207,15 +10207,15 @@ let so = class extends me {
|
|
|
10207
10207
|
const S = [...m.sections];
|
|
10208
10208
|
if (m.skeTables) {
|
|
10209
10209
|
const I = Array.from(m.skeTables.values());
|
|
10210
|
-
S.push(...I.map((
|
|
10210
|
+
S.push(...I.map((v) => v.rows.map((R) => R.cells.map((E) => E.sections))).flat(4));
|
|
10211
10211
|
}
|
|
10212
10212
|
for (const I of S)
|
|
10213
|
-
for (const
|
|
10214
|
-
for (const R of
|
|
10213
|
+
for (const v of I.columns)
|
|
10214
|
+
for (const R of v.lines)
|
|
10215
10215
|
if (R.paragraphStart) {
|
|
10216
|
-
const E = s.find((
|
|
10216
|
+
const E = s.find((C) => C.startIndex === R.paragraphIndex);
|
|
10217
10217
|
if (E) {
|
|
10218
|
-
const
|
|
10218
|
+
const C = R, y = (p = (g = (f = C == null ? void 0 : C.divides) == null ? void 0 : f[0]) == null ? void 0 : g.glyphGroup) == null ? void 0 : p[0];
|
|
10219
10219
|
if (!y)
|
|
10220
10220
|
continue;
|
|
10221
10221
|
const O = Dg(y, this._documents, this._skeleton, t);
|
|
@@ -10283,7 +10283,7 @@ let Is = class extends me {
|
|
|
10283
10283
|
);
|
|
10284
10284
|
}
|
|
10285
10285
|
_getTransformCoordForDocumentOffset(n, e, t, o) {
|
|
10286
|
-
const { documentTransform: s } = n.getOffsetConfig(), r = e.transformVector2SceneCoord(
|
|
10286
|
+
const { documentTransform: s } = n.getOffsetConfig(), r = e.transformVector2SceneCoord(vn.FromArray([t, o]));
|
|
10287
10287
|
if (r)
|
|
10288
10288
|
return s.clone().invert().applyPoint(r);
|
|
10289
10289
|
}
|
|
@@ -10299,7 +10299,7 @@ var Ug = Object.defineProperty, Lg = Object.getOwnPropertyDescriptor, Fg = (n, e
|
|
|
10299
10299
|
(i = n[r]) && (s = (o ? i(e, t, s) : i(s)) || s);
|
|
10300
10300
|
return o && s && Ug(e, t, s), s;
|
|
10301
10301
|
}, hn = (n, e) => (t, o) => e(t, o, n);
|
|
10302
|
-
let ro = class extends
|
|
10302
|
+
let ro = class extends vt {
|
|
10303
10303
|
constructor(n, e, t, o, s, r) {
|
|
10304
10304
|
super(), this._context = n, this._commandService = e, this._docClipboardService = t, this._docSelectionRenderService = o, this._contextService = s, this._editorService = r, this._init();
|
|
10305
10305
|
}
|
|
@@ -10343,7 +10343,7 @@ const jg = [
|
|
|
10343
10343
|
Us,
|
|
10344
10344
|
gt
|
|
10345
10345
|
];
|
|
10346
|
-
let
|
|
10346
|
+
let Cs = class extends me {
|
|
10347
10347
|
constructor(n, e, t) {
|
|
10348
10348
|
super(), this._context = n, this._contextMenuService = e, this._commandService = t, jg.includes(this._context.unitId) || (this._initPointerDown(), this._initEditChange());
|
|
10349
10349
|
}
|
|
@@ -10362,10 +10362,10 @@ let vs = class extends me {
|
|
|
10362
10362
|
);
|
|
10363
10363
|
}
|
|
10364
10364
|
};
|
|
10365
|
-
|
|
10365
|
+
Cs = kg([
|
|
10366
10366
|
xi(1, fl),
|
|
10367
10367
|
xi(2, T)
|
|
10368
|
-
],
|
|
10368
|
+
], Cs);
|
|
10369
10369
|
var Wg = Object.defineProperty, zg = Object.getOwnPropertyDescriptor, Yg = (n, e, t, o) => {
|
|
10370
10370
|
for (var s = o > 1 ? void 0 : o ? zg(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
10371
10371
|
(i = n[r]) && (s = (o ? i(e, t, s) : i(s)) || s);
|
|
@@ -10389,7 +10389,7 @@ let io = class extends me {
|
|
|
10389
10389
|
}
|
|
10390
10390
|
// eslint-disable-next-line complexity
|
|
10391
10391
|
_resize(e) {
|
|
10392
|
-
var I,
|
|
10392
|
+
var I, v;
|
|
10393
10393
|
if (e == null)
|
|
10394
10394
|
return;
|
|
10395
10395
|
const t = this._editorService.getEditor(e);
|
|
@@ -10411,7 +10411,7 @@ let io = class extends me {
|
|
|
10411
10411
|
l.transformByState({
|
|
10412
10412
|
width: m,
|
|
10413
10413
|
height: S
|
|
10414
|
-
}), A == null || A.resize(m, S), t.isSingle() ? h > u ? p == null ? g && new ns(g, { barSize: 8, enableVertical: !1 }) : g == null || g.resetCanvasSizeAndUpdateScroll() : (p = null, g == null || g.scrollToBarPos({ x: 0, y: 0 }), (
|
|
10414
|
+
}), A == null || A.resize(m, S), t.isSingle() ? h > u ? p == null ? g && new ns(g, { barSize: 8, enableVertical: !1 }) : g == null || g.resetCanvasSizeAndUpdateScroll() : (p = null, g == null || g.scrollToBarPos({ x: 0, y: 0 }), (v = g == null ? void 0 : g.getScrollBar()) == null || v.dispose()) : d > f ? p == null ? g && new ns(g, { enableHorizontal: !1, barSize: 8 }) : g == null || g.resetCanvasSizeAndUpdateScroll() : (p = null, g == null || g.scrollToBarPos({ x: 0, y: 0 }), (I = g == null ? void 0 : g.getScrollBar()) == null || I.dispose());
|
|
10415
10415
|
}
|
|
10416
10416
|
_initialSetValue() {
|
|
10417
10417
|
this.disposeWithMe(
|
|
@@ -10511,7 +10511,7 @@ var Gg = Object.defineProperty, qg = Object.getOwnPropertyDescriptor, Kg = (n, e
|
|
|
10511
10511
|
(i = n[r]) && (s = (o ? i(e, t, s) : i(s)) || s);
|
|
10512
10512
|
return o && s && Gg(e, t, s), s;
|
|
10513
10513
|
}, Vn = (n, e) => (t, o) => e(t, o, n);
|
|
10514
|
-
let
|
|
10514
|
+
let vs = class extends me {
|
|
10515
10515
|
constructor(e, t, o, s, r) {
|
|
10516
10516
|
super();
|
|
10517
10517
|
b(this, "_previousIMEContent", "");
|
|
@@ -10566,12 +10566,12 @@ let Cs = class extends me {
|
|
|
10566
10566
|
this._previousIMEContent = "", this._isCompositionStart = !0, this._docImeInputManagerService.clearUndoRedoMutationParamsCache(), this._docImeInputManagerService.setActiveRange(null);
|
|
10567
10567
|
}
|
|
10568
10568
|
};
|
|
10569
|
-
|
|
10569
|
+
vs = Kg([
|
|
10570
10570
|
Vn(1, k(Be)),
|
|
10571
10571
|
Vn(2, k(wo)),
|
|
10572
10572
|
Vn(3, k(de)),
|
|
10573
10573
|
Vn(4, T)
|
|
10574
|
-
],
|
|
10574
|
+
], vs);
|
|
10575
10575
|
var Xg = Object.defineProperty, Jg = Object.getOwnPropertyDescriptor, Zg = (n, e, t, o) => {
|
|
10576
10576
|
for (var s = o > 1 ? void 0 : o ? Jg(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
10577
10577
|
(i = n[r]) && (s = (o ? i(e, t, s) : i(s)) || s);
|
|
@@ -10623,7 +10623,7 @@ let Rs = class extends me {
|
|
|
10623
10623
|
},
|
|
10624
10624
|
range: r,
|
|
10625
10625
|
segmentId: c
|
|
10626
|
-
}), s === " " && await this._commandService.executeCommand(
|
|
10626
|
+
}), s === " " && await this._commandService.executeCommand(Co.id);
|
|
10627
10627
|
});
|
|
10628
10628
|
}
|
|
10629
10629
|
};
|
|
@@ -10633,13 +10633,13 @@ Rs = Zg([
|
|
|
10633
10633
|
kn(3, T),
|
|
10634
10634
|
kn(4, k(ht))
|
|
10635
10635
|
], Rs);
|
|
10636
|
-
class
|
|
10636
|
+
class vr extends me {
|
|
10637
10637
|
constructor(e) {
|
|
10638
10638
|
super(), this._context = e;
|
|
10639
10639
|
}
|
|
10640
10640
|
calculatePagePosition() {
|
|
10641
|
-
var
|
|
10642
|
-
const e = It(this._context), o = (R = (
|
|
10641
|
+
var v, R;
|
|
10642
|
+
const e = It(this._context), o = (R = (v = this._context.unit.getSettings()) == null ? void 0 : v.zoomRatio) != null ? R : 1, { document: s, scene: r, docBackground: i } = e, a = r == null ? void 0 : r.getParent(), { width: c, height: l, pageMarginLeft: A, pageMarginTop: d } = s;
|
|
10643
10643
|
if (a == null || c === Number.POSITIVE_INFINITY || l === Number.POSITIVE_INFINITY)
|
|
10644
10644
|
return;
|
|
10645
10645
|
const { width: h, height: u } = a;
|
|
@@ -10675,7 +10675,7 @@ let bs = class extends me {
|
|
|
10675
10675
|
}
|
|
10676
10676
|
};
|
|
10677
10677
|
bs = tf([
|
|
10678
|
-
Oi(1, k(
|
|
10678
|
+
Oi(1, k(vr)),
|
|
10679
10679
|
Oi(2, k(W))
|
|
10680
10680
|
], bs);
|
|
10681
10681
|
var nf = Object.defineProperty, of = Object.getOwnPropertyDescriptor, sf = (n, e, t, o) => {
|
|
@@ -10760,7 +10760,7 @@ let xs = class extends me {
|
|
|
10760
10760
|
const o = It(this._context), { document: s, scene: r } = o, { documentTransform: i } = s.getOffsetConfig(), a = r.getViewports()[0];
|
|
10761
10761
|
if (a == null)
|
|
10762
10762
|
return;
|
|
10763
|
-
const c = a.transformVector2SceneCoord(
|
|
10763
|
+
const c = a.transformVector2SceneCoord(vn.FromArray([e, t]));
|
|
10764
10764
|
return i.clone().invert().applyPoint(c);
|
|
10765
10765
|
}
|
|
10766
10766
|
_isEditorReadOnly(e) {
|
|
@@ -10886,7 +10886,7 @@ Os = cf([
|
|
|
10886
10886
|
_t(4, T),
|
|
10887
10887
|
_t(5, k(W)),
|
|
10888
10888
|
_t(6, Ke),
|
|
10889
|
-
_t(7, k(
|
|
10889
|
+
_t(7, k(vr))
|
|
10890
10890
|
], Os);
|
|
10891
10891
|
var lf = Object.defineProperty, Af = Object.getOwnPropertyDescriptor, df = (n, e, t, o) => {
|
|
10892
10892
|
for (var s = o > 1 ? void 0 : o ? Af(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
@@ -10894,7 +10894,7 @@ var lf = Object.defineProperty, Af = Object.getOwnPropertyDescriptor, df = (n, e
|
|
|
10894
10894
|
return o && s && lf(e, t, s), s;
|
|
10895
10895
|
}, gn = (n, e) => (t, o) => e(t, o, n);
|
|
10896
10896
|
const yi = 300;
|
|
10897
|
-
let ao = class extends
|
|
10897
|
+
let ao = class extends vt {
|
|
10898
10898
|
constructor(e, t, o, s, r) {
|
|
10899
10899
|
super();
|
|
10900
10900
|
b(this, "_docStateChange$", new qe(null));
|
|
@@ -11017,7 +11017,7 @@ ao = df([
|
|
|
11017
11017
|
gn(0, k(ho)),
|
|
11018
11018
|
gn(1, T),
|
|
11019
11019
|
gn(2, Q),
|
|
11020
|
-
gn(3, k(
|
|
11020
|
+
gn(3, k(Cc)),
|
|
11021
11021
|
gn(4, Re)
|
|
11022
11022
|
], ao);
|
|
11023
11023
|
var uf = Object.defineProperty, hf = Object.getOwnPropertyDescriptor, gf = (n, e, t, o) => {
|
|
@@ -11026,7 +11026,7 @@ var uf = Object.defineProperty, hf = Object.getOwnPropertyDescriptor, gf = (n, e
|
|
|
11026
11026
|
return o && s && uf(e, t, s), s;
|
|
11027
11027
|
}, Ti = (n, e) => (t, o) => e(t, o, n);
|
|
11028
11028
|
const Bi = "univer-doc-main-canvas";
|
|
11029
|
-
let co = class extends
|
|
11029
|
+
let co = class extends vt {
|
|
11030
11030
|
constructor(n, e) {
|
|
11031
11031
|
super(), this._instanceSrv = n, this._renderManagerService = e, this._init();
|
|
11032
11032
|
}
|
|
@@ -11085,14 +11085,14 @@ const ff = {
|
|
|
11085
11085
|
staticParameters: {
|
|
11086
11086
|
direction: ce.LEFT
|
|
11087
11087
|
}
|
|
11088
|
-
},
|
|
11088
|
+
}, Cf = {
|
|
11089
11089
|
id: wt.id,
|
|
11090
11090
|
binding: ae.ARROW_RIGHT,
|
|
11091
11091
|
preconditions: pe,
|
|
11092
11092
|
staticParameters: {
|
|
11093
11093
|
direction: ce.RIGHT
|
|
11094
11094
|
}
|
|
11095
|
-
},
|
|
11095
|
+
}, vf = {
|
|
11096
11096
|
id: Nt.id,
|
|
11097
11097
|
binding: ae.ARROW_UP | ge.SHIFT,
|
|
11098
11098
|
preconditions: pe,
|
|
@@ -11202,10 +11202,10 @@ let ys = class extends Sc {
|
|
|
11202
11202
|
Gs,
|
|
11203
11203
|
qa,
|
|
11204
11204
|
qt,
|
|
11205
|
-
|
|
11205
|
+
Co,
|
|
11206
11206
|
xn,
|
|
11207
11207
|
hs,
|
|
11208
|
-
|
|
11208
|
+
vo,
|
|
11209
11209
|
Ks,
|
|
11210
11210
|
Xs,
|
|
11211
11211
|
Ba,
|
|
@@ -11230,9 +11230,9 @@ let ys = class extends Sc {
|
|
|
11230
11230
|
[
|
|
11231
11231
|
Sf,
|
|
11232
11232
|
Ef,
|
|
11233
|
-
vf,
|
|
11234
|
-
If,
|
|
11235
11233
|
Cf,
|
|
11234
|
+
If,
|
|
11235
|
+
vf,
|
|
11236
11236
|
Rf,
|
|
11237
11237
|
bf,
|
|
11238
11238
|
xf,
|
|
@@ -11283,8 +11283,8 @@ let ys = class extends Sc {
|
|
|
11283
11283
|
[
|
|
11284
11284
|
[de],
|
|
11285
11285
|
[Be],
|
|
11286
|
-
[
|
|
11287
|
-
[
|
|
11286
|
+
[vc],
|
|
11287
|
+
[vr],
|
|
11288
11288
|
[wo],
|
|
11289
11289
|
[ps],
|
|
11290
11290
|
[Os]
|
|
@@ -11299,11 +11299,11 @@ let ys = class extends Sc {
|
|
|
11299
11299
|
[xs],
|
|
11300
11300
|
[ds],
|
|
11301
11301
|
[bs],
|
|
11302
|
-
[
|
|
11302
|
+
[Cs],
|
|
11303
11303
|
[Is],
|
|
11304
11304
|
[ro],
|
|
11305
11305
|
[Rs],
|
|
11306
|
-
[
|
|
11306
|
+
[vs],
|
|
11307
11307
|
[io]
|
|
11308
11308
|
].forEach((n) => {
|
|
11309
11309
|
this._renderManagerSrv.registerRenderModule(P.UNIVER_DOC, n);
|
|
@@ -11320,7 +11320,7 @@ ys = Bf([
|
|
|
11320
11320
|
fn(5, Ls)
|
|
11321
11321
|
], ys);
|
|
11322
11322
|
export {
|
|
11323
|
-
|
|
11323
|
+
Co as AfterSpaceCommand,
|
|
11324
11324
|
Oo as AlignCenterCommand,
|
|
11325
11325
|
To as AlignJustifyCommand,
|
|
11326
11326
|
xo as AlignLeftCommand,
|
|
@@ -11330,7 +11330,7 @@ export {
|
|
|
11330
11330
|
Ro as BulletListCommand,
|
|
11331
11331
|
hs as ChangeListNestingLevelCommand,
|
|
11332
11332
|
qn as ChangeListNestingLevelType,
|
|
11333
|
-
|
|
11333
|
+
vo as ChangeListTypeCommand,
|
|
11334
11334
|
Ks as CheckListCommand,
|
|
11335
11335
|
ea as CoverContentCommand,
|
|
11336
11336
|
ka as CreateDocTableCommand,
|
|
@@ -11341,7 +11341,7 @@ export {
|
|
|
11341
11341
|
Uo as DOCS_COMPONENT_MAIN_LAYER_INDEX,
|
|
11342
11342
|
tt as DOCS_VIEW_KEY,
|
|
11343
11343
|
Bl as DOC_UI_PLUGIN_NAME,
|
|
11344
|
-
|
|
11344
|
+
vi as DOC_VERTICAL_PADDING,
|
|
11345
11345
|
Tl as DefaultDocContainerConfig,
|
|
11346
11346
|
yl as DefaultToolbarConfig,
|
|
11347
11347
|
On as DeleteCommand,
|
|
@@ -11390,7 +11390,7 @@ export {
|
|
|
11390
11390
|
wt as MoveCursorOperation,
|
|
11391
11391
|
Nt as MoveSelectionOperation,
|
|
11392
11392
|
kf as NORMAL_TEXT_SELECTION_PLUGIN_NAME,
|
|
11393
|
-
|
|
11393
|
+
Ct as NodePositionConvertToCursor,
|
|
11394
11394
|
sa as NodePositionConvertToRectRange,
|
|
11395
11395
|
bo as OrderListCommand,
|
|
11396
11396
|
hu as PastePluginLark,
|