@univerjs/sheets 0.6.6 → 0.6.7-experimental.20250328-3aaa828
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/facade.js +1 -1
- package/lib/cjs/index.js +2 -2
- package/lib/es/facade.js +30 -4
- package/lib/es/index.js +750 -736
- package/lib/facade.js +6204 -0
- package/lib/index.js +12266 -0
- package/lib/locale/en-US.js +17 -0
- package/lib/locale/fa-IR.js +17 -0
- package/lib/locale/fr-FR.js +17 -0
- package/lib/locale/ru-RU.js +17 -0
- package/lib/locale/vi-VN.js +17 -0
- package/lib/locale/zh-CN.js +17 -0
- package/lib/locale/zh-TW.js +17 -0
- package/lib/types/facade/f-range.d.ts +23 -2
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +3 -3
- package/package.json +11 -11
- package/LICENSE +0 -176
package/lib/es/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var ii = Object.defineProperty;
|
|
2
2
|
var ai = (n, e, t) => e in n ? ii(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
3
|
var R = (n, e, t) => ai(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { Tools as
|
|
5
|
-
import { SetDefinedNameMutation as zt, RemoveDefinedNameMutation as Sn, SetDefinedNameMutationFactory as Di, SetFormulaCalculationResultMutation as Ai, handleNumfmtInCell as xi, IDefinedNamesService as
|
|
4
|
+
import { Tools as O, CommandType as v, ICommandService as E, IUndoRedoService as V, createInterceptorKey as ut, Disposable as ue, UniverInstanceType as B, InterceptorEffectEnum as ce, InterceptorManager as Ro, toDisposable as Pe, remove as ze, composeInterceptors as ui, DisposableCollection as Gt, IUniverInstanceService as M, BooleanNumber as te, HorizontalAlign as po, BorderStyleTypes as Ss, Inject as $, IResourceManagerService as on, RTree as li, generateRandomId as ci, insertMatrixArray as Cn, sliceMatrixArray as ws, concatMatrixArray as Is, spliceArray as vs, normalizeTextRuns as di, CellValueType as ie, isRealNum as Co, isBooleanString as Ms, isSafeNumeric as hi, ObjectMatrix as G, sequenceExecute as z, RxDisposable as _s, LocaleService as Ye, RANGE_TYPE as L, selectionToArray as mi, Rectangle as N, createIdentifier as So, IContextService as ys, ErrorService as Ut, Range as K, cellToRange as bs, PermissionStatus as J, IPermissionService as Fe, isICellData as Es, Dimension as fe, getArrayLength as Us, Direction as pe, mergeWorksheetSnapshotWithDefault as gi, moveMatrixArray as ks, BorderType as le, FontWeight as fi, FontItalic as Ri, Injector as Hn, ILogService as Ts, DocumentDataModel as pi, BuildTextUtils as Ci, TextX as Si, IConfigService as Ps, Optional as wi, queryObjectMatrix as qe, CustomCommandExecutionError as Ii, IAuthzIoService as vi, UserManagerService as Mi, LRUMap as _i, DependentOn as yi, Plugin as bi, merge as Ei, IS_ROW_STYLE_PRECEDE_COLUMN_STYLE as Ui, AUTO_HEIGHT_FOR_MERGED_CELLS as ki, registerDependencies as Ti, mergeOverrideWithDependencies as Pi, touchDependencies as cn, createRowColIter as Ni, CellModeEnum as Oi } from "@univerjs/core";
|
|
5
|
+
import { SetDefinedNameMutation as zt, RemoveDefinedNameMutation as Sn, SetDefinedNameMutationFactory as Di, SetFormulaCalculationResultMutation as Ai, handleNumfmtInCell as xi, IDefinedNamesService as Ns, stripErrorMargin as Wi, LexerTreeBuilder as $i, operatorToken as Vi, deserializeRangeWithSheet as Li, sequenceNodeType as Hi, deserializeRangeWithSheetWithCache as Bi, UniverFormulaEnginePlugin as Fi } from "@univerjs/engine-formula";
|
|
6
6
|
import { DataSyncPrimaryController as ji } from "@univerjs/rpc";
|
|
7
|
-
import { Subject as Le, BehaviorSubject as dt, merge as Wt, shareReplay as Gi, takeUntil as lo, switchMap as Ke, of as Dt, distinctUntilChanged as zi, skip as
|
|
7
|
+
import { Subject as Le, BehaviorSubject as dt, merge as Wt, shareReplay as Gi, takeUntil as lo, switchMap as Ke, of as Dt, distinctUntilChanged as zi, skip as Os, map as co, first as Ki, filter as jo } from "rxjs";
|
|
8
8
|
import { isTextFormat as to } from "@univerjs/engine-numfmt";
|
|
9
9
|
import { takeUntil as Go, filter as zo, map as Ji } from "rxjs/operators";
|
|
10
10
|
var Yi = /* @__PURE__ */ ((n) => (n.OthersCanView = "othersCanView", n.NoOneElseCanView = "noOneElseCanView", n))(Yi || {}), qi = /* @__PURE__ */ ((n) => (n.DesignedUserCanEdit = "designedUserCanEdit", n.OnlyMe = "onlyMe", n))(qi || {});
|
|
@@ -89,10 +89,10 @@ class me {
|
|
|
89
89
|
this._model.delete(e);
|
|
90
90
|
}
|
|
91
91
|
createRuleId(e, t) {
|
|
92
|
-
let o =
|
|
92
|
+
let o = O.generateRandomId(4);
|
|
93
93
|
const s = this._ensureRuleMap(e, t);
|
|
94
94
|
for (; s.has(o); )
|
|
95
|
-
o =
|
|
95
|
+
o = O.generateRandomId(4);
|
|
96
96
|
return o;
|
|
97
97
|
}
|
|
98
98
|
getTargetByPermissionId(e, t) {
|
|
@@ -105,7 +105,7 @@ class me {
|
|
|
105
105
|
return null;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
const
|
|
108
|
+
const Dd = (n, e) => {
|
|
109
109
|
const t = n.get(me), o = e.ruleIds.map((r) => t.getRule(e.unitId, e.subUnitId, r)).filter((r) => !!r);
|
|
110
110
|
return { id: Ae.id, params: { subUnitId: e.subUnitId, unitId: e.unitId, rules: o } };
|
|
111
111
|
}, Je = {
|
|
@@ -117,7 +117,7 @@ const Od = (n, e) => {
|
|
|
117
117
|
r.deleteRule(t, o, i);
|
|
118
118
|
}), !0;
|
|
119
119
|
}
|
|
120
|
-
},
|
|
120
|
+
}, Ad = (n) => {
|
|
121
121
|
const e = { ...n, ruleIds: n.rules.map((t) => t.id) };
|
|
122
122
|
return { id: Je.id, params: e };
|
|
123
123
|
}, Ae = {
|
|
@@ -450,7 +450,7 @@ let F = class extends ue {
|
|
|
450
450
|
worksheet: t,
|
|
451
451
|
row: o,
|
|
452
452
|
col: s,
|
|
453
|
-
origin:
|
|
453
|
+
origin: O.deepClone(r)
|
|
454
454
|
};
|
|
455
455
|
return this.writeCellInterceptor.fetchThroughInterceptors(no)(r, i);
|
|
456
456
|
}
|
|
@@ -1339,9 +1339,9 @@ function Ea(n, e, t) {
|
|
|
1339
1339
|
const o = n.getStyleByCell(e);
|
|
1340
1340
|
o == null && delete e.s, typeof t.s == "string" && (t.s = n.get(t.s));
|
|
1341
1341
|
const s = fn(o, t.s ? t.s : null);
|
|
1342
|
-
s && (
|
|
1342
|
+
s && (O.removeNull(s), Object.entries(s).forEach(([a, u]) => {
|
|
1343
1343
|
typeof u == "object" && u !== null && Object.keys(u).length === 0 && delete s[a];
|
|
1344
|
-
})),
|
|
1344
|
+
})), O.isEmptyObject(s) ? delete e.s : e.s = n.setValue(s);
|
|
1345
1345
|
const r = t.v ? `${t.v}\r
|
|
1346
1346
|
` : "";
|
|
1347
1347
|
!t.p && e.p && (r && r !== ((i = e.p.body) == null ? void 0 : i.dataStream) ? delete e.p : Ta(e.p, t.s ? t.s : null));
|
|
@@ -1364,7 +1364,7 @@ function ka(n, e) {
|
|
|
1364
1364
|
function fn(n, e, t = !1) {
|
|
1365
1365
|
if (e === null) return e;
|
|
1366
1366
|
if (e === void 0) return n;
|
|
1367
|
-
const o =
|
|
1367
|
+
const o = O.deepClone(n) || {};
|
|
1368
1368
|
for (const s in e)
|
|
1369
1369
|
t && ["bd", "tr", "td", "ht", "vt", "tb", "pd", "bg"].includes(s) || (s in o && s === "bd" ? o[s] = Object.assign(o[s], e[s]) : o[s] = e[s]);
|
|
1370
1370
|
return "cl" in o && ("ul" in o && o.ul && (o.ul.cl = o.cl), "ol" in o && o.ol && (o.ol.cl = o.cl), "st" in o && o.st && (o.st.cl = o.cl)), o;
|
|
@@ -1386,10 +1386,10 @@ function Ta(n, e) {
|
|
|
1386
1386
|
st: t,
|
|
1387
1387
|
ed: u
|
|
1388
1388
|
}, m = fn({}, e, !0);
|
|
1389
|
-
m &&
|
|
1389
|
+
m && O.removeNull(m), O.isEmptyObject(m) || (h.ts = m), o.push(h);
|
|
1390
1390
|
}
|
|
1391
1391
|
const d = fn(c, e, !0);
|
|
1392
|
-
d &&
|
|
1392
|
+
d && O.removeNull(d), O.isEmptyObject(d) ? delete a.ts : a.ts = d, o.push(a), t = xs(s, l);
|
|
1393
1393
|
}
|
|
1394
1394
|
const r = n.body.dataStream.endsWith(`\r
|
|
1395
1395
|
`) ? n.body.dataStream.length - 2 : n.body.dataStream.length;
|
|
@@ -1398,7 +1398,7 @@ function Ta(n, e) {
|
|
|
1398
1398
|
st: t,
|
|
1399
1399
|
ed: r
|
|
1400
1400
|
}, u = fn({}, e, !0);
|
|
1401
|
-
u &&
|
|
1401
|
+
u && O.removeNull(u), O.isEmptyObject(u) || (a.ts = u), o.push(a);
|
|
1402
1402
|
}
|
|
1403
1403
|
n.body.textRuns = di(o);
|
|
1404
1404
|
}
|
|
@@ -1416,12 +1416,12 @@ function Pa(n, e, t) {
|
|
|
1416
1416
|
}
|
|
1417
1417
|
return ie.FORCE_STRING;
|
|
1418
1418
|
}
|
|
1419
|
-
return
|
|
1419
|
+
return Na(o) ? to((i = o == null ? void 0 : o.n) == null ? void 0 : i.pattern) ? ie.STRING : Xo(e, t) : to((a = s == null ? void 0 : s.n) == null ? void 0 : a.pattern) ? ie.STRING : Xo(e, t);
|
|
1420
1420
|
}
|
|
1421
1421
|
function Xo(n, e) {
|
|
1422
1422
|
return n.v !== void 0 ? Zo(n.v, n.t) : Zo(e.v, e.t);
|
|
1423
1423
|
}
|
|
1424
|
-
function
|
|
1424
|
+
function Na(n) {
|
|
1425
1425
|
var e;
|
|
1426
1426
|
return !!((e = n == null ? void 0 : n.n) != null && e.pattern);
|
|
1427
1427
|
}
|
|
@@ -1429,9 +1429,9 @@ function Zo(n, e) {
|
|
|
1429
1429
|
return n === null ? null : typeof n == "string" ? Co(n) ? (+n == 0 || +n == 1) && e === ie.BOOLEAN ? ie.BOOLEAN : ie.NUMBER : Ms(n) ? ie.BOOLEAN : ie.STRING : typeof n == "number" ? (n === 0 || n === 1) && e === ie.BOOLEAN ? ie.BOOLEAN : ie.NUMBER : typeof n == "boolean" ? ie.BOOLEAN : ie.FORCE_STRING;
|
|
1430
1430
|
}
|
|
1431
1431
|
function Qo(n, e) {
|
|
1432
|
-
return n === ie.NUMBER ? Number(e.v) : n === ie.BOOLEAN ?
|
|
1432
|
+
return n === ie.NUMBER ? Number(e.v) : n === ie.BOOLEAN ? Oa(e.v) ? 1 : 0 : n === ie.STRING || n === ie.FORCE_STRING ? `${e.v}` : e.v;
|
|
1433
1433
|
}
|
|
1434
|
-
function
|
|
1434
|
+
function Oa(n) {
|
|
1435
1435
|
if (typeof n == "string") {
|
|
1436
1436
|
if (n.toUpperCase() === "TRUE")
|
|
1437
1437
|
return !0;
|
|
@@ -1464,7 +1464,7 @@ const be = (n, e) => {
|
|
|
1464
1464
|
throw new Error("worksheet is null error!");
|
|
1465
1465
|
const u = a.getCellMatrix(), l = i.getStyles(), c = new G();
|
|
1466
1466
|
return new G(s).forValue((h, m, g) => {
|
|
1467
|
-
const f =
|
|
1467
|
+
const f = O.deepClone(u == null ? void 0 : u.getValue(h, m)) || {}, p = l.getStyleByCell(f), C = l.getStyleByCell(g);
|
|
1468
1468
|
f.s = Ua(p, C), c.setValue(h, m, Da(f));
|
|
1469
1469
|
}), {
|
|
1470
1470
|
...e,
|
|
@@ -1484,16 +1484,30 @@ const be = (n, e) => {
|
|
|
1484
1484
|
const u = a.getCellMatrix(), l = i.getStyles();
|
|
1485
1485
|
return new G(t).forValue((d, h, m) => {
|
|
1486
1486
|
if (!m)
|
|
1487
|
-
u
|
|
1487
|
+
u.realDeleteValue(d, h);
|
|
1488
1488
|
else {
|
|
1489
|
-
|
|
1490
|
-
|
|
1489
|
+
let g = u.getValue(d, h) || {};
|
|
1490
|
+
g = Aa(m, g, l), O.isEmptyObject(g) ? u.realDeleteValue(d, h) : u.setValue(d, h, g);
|
|
1491
1491
|
}
|
|
1492
1492
|
}), !0;
|
|
1493
1493
|
}
|
|
1494
|
-
}
|
|
1494
|
+
};
|
|
1495
|
+
function Aa(n, e, t) {
|
|
1496
|
+
const o = /* @__PURE__ */ new Set(["f", "p", "si", "custom"]), s = Pa(t, n, e);
|
|
1497
|
+
return Object.keys(n).forEach((r) => {
|
|
1498
|
+
const i = r;
|
|
1499
|
+
if (o.has(i)) {
|
|
1500
|
+
const a = n[i];
|
|
1501
|
+
xa(e, i, a);
|
|
1502
|
+
} else i === "v" ? n.v !== void 0 && (e.v = Qo(s, n)) : i === "s" && Ea(t, e, n);
|
|
1503
|
+
}), e.v !== void 0 && (e.t = s, e.v = Qo(s, e)), e.v === null && (delete e.t, delete e.v), e;
|
|
1504
|
+
}
|
|
1505
|
+
function xa(n, e, t) {
|
|
1506
|
+
t === void 0 || (t === null ? delete n[e] : n[e] = t);
|
|
1507
|
+
}
|
|
1508
|
+
const Wa = "sheet.command.append-row", $a = {
|
|
1495
1509
|
type: v.COMMAND,
|
|
1496
|
-
id:
|
|
1510
|
+
id: Wa,
|
|
1497
1511
|
handler: (n, e) => {
|
|
1498
1512
|
const t = n.get(E), o = n.get(V), { unitId: s, subUnitId: r, cellValue: i, insertRowNums: a, insertColumnNums: u, maxRows: l, maxColumns: c } = e, d = {
|
|
1499
1513
|
unitId: s,
|
|
@@ -1541,13 +1555,13 @@ const be = (n, e) => {
|
|
|
1541
1555
|
redoMutations: m
|
|
1542
1556
|
}), !0) : !1;
|
|
1543
1557
|
}
|
|
1544
|
-
},
|
|
1558
|
+
}, Va = (n, e, t = "") => n.reduce(
|
|
1545
1559
|
(o, s) => {
|
|
1546
1560
|
const r = s && s[e];
|
|
1547
1561
|
return typeof r != "string" ? (console.warn(s, `${e} is not string`), o) : (r ? (o[r] || (o[r] = []), o[r].push(s)) : o[t].push(s), o);
|
|
1548
1562
|
},
|
|
1549
1563
|
{}
|
|
1550
|
-
),
|
|
1564
|
+
), La = (n = 0) => {
|
|
1551
1565
|
let e = n;
|
|
1552
1566
|
return function() {
|
|
1553
1567
|
return e++;
|
|
@@ -1562,7 +1576,7 @@ function Ws(n) {
|
|
|
1562
1576
|
e.setValue(a, u, null);
|
|
1563
1577
|
}), e.clone();
|
|
1564
1578
|
}
|
|
1565
|
-
function
|
|
1579
|
+
function Ha(n) {
|
|
1566
1580
|
const e = new G();
|
|
1567
1581
|
return n.forEach((t) => {
|
|
1568
1582
|
const { startRow: o, startColumn: s, endRow: r, endColumn: i } = t;
|
|
@@ -1577,7 +1591,7 @@ function Va(n) {
|
|
|
1577
1591
|
});
|
|
1578
1592
|
}), e.clone();
|
|
1579
1593
|
}
|
|
1580
|
-
function
|
|
1594
|
+
function Ba(n) {
|
|
1581
1595
|
const e = new G();
|
|
1582
1596
|
return n.forEach((t) => {
|
|
1583
1597
|
const { startRow: o, startColumn: s, endRow: r, endColumn: i } = t;
|
|
@@ -1588,7 +1602,7 @@ function La(n) {
|
|
|
1588
1602
|
});
|
|
1589
1603
|
}), e.clone();
|
|
1590
1604
|
}
|
|
1591
|
-
function
|
|
1605
|
+
function Fa(n, e, t, o, s) {
|
|
1592
1606
|
const r = e.get(M), i = t ? r.getUnit(t, B.UNIVER_SHEET) : r.getCurrentUnitForType(B.UNIVER_SHEET), a = o ? i == null ? void 0 : i.getSheetBySheetId(o) : i == null ? void 0 : i.getActiveSheet();
|
|
1593
1607
|
if (!a)
|
|
1594
1608
|
return null;
|
|
@@ -1605,7 +1619,7 @@ function Ha(n, e, t, o, s) {
|
|
|
1605
1619
|
function Fn(n, e, t, o) {
|
|
1606
1620
|
const s = [], r = [];
|
|
1607
1621
|
for (const h of n) {
|
|
1608
|
-
const m =
|
|
1622
|
+
const m = Fa(h, e, t, o, !0);
|
|
1609
1623
|
m && (s.push(...m.rows), r.push(...m.cols));
|
|
1610
1624
|
}
|
|
1611
1625
|
const i = Array.from(new Set(s)).sort((h, m) => h - m), a = Array.from(new Set(r)).sort((h, m) => h - m), u = [];
|
|
@@ -1628,7 +1642,7 @@ function Fn(n, e, t, o) {
|
|
|
1628
1642
|
return u;
|
|
1629
1643
|
}
|
|
1630
1644
|
var Ce = /* @__PURE__ */ ((n) => (n[n.MOVE_START = 0] = "MOVE_START", n[n.MOVING = 1] = "MOVING", n[n.MOVE_END = 2] = "MOVE_END", n[n.ONLY_SET = 3] = "ONLY_SET", n))(Ce || {});
|
|
1631
|
-
class
|
|
1645
|
+
class ja extends ue {
|
|
1632
1646
|
constructor(t) {
|
|
1633
1647
|
super();
|
|
1634
1648
|
/**
|
|
@@ -1713,11 +1727,11 @@ class Ba extends ue {
|
|
|
1713
1727
|
return t[t.length - 1];
|
|
1714
1728
|
}
|
|
1715
1729
|
}
|
|
1716
|
-
var
|
|
1717
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
1730
|
+
var Ga = Object.getOwnPropertyDescriptor, za = (n, e, t, o) => {
|
|
1731
|
+
for (var s = o > 1 ? void 0 : o ? Ga(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
1718
1732
|
(i = n[r]) && (s = i(s) || s);
|
|
1719
1733
|
return s;
|
|
1720
|
-
},
|
|
1734
|
+
}, Ka = (n, e) => (t, o) => e(t, o, n);
|
|
1721
1735
|
let H = class extends _s {
|
|
1722
1736
|
constructor(e) {
|
|
1723
1737
|
super();
|
|
@@ -1757,7 +1771,7 @@ let H = class extends _s {
|
|
|
1757
1771
|
const e = this._instanceSrv.getCurrentTypeOfUnit$(B.UNIVER_SHEET).pipe(Gi(1), lo(this.dispose$));
|
|
1758
1772
|
this.selectionMoveStart$ = e.pipe(Ke((t) => t ? this._ensureWorkbookSelection(t.getUnitId()).selectionMoveStart$ : Dt())), this.selectionMoving$ = e.pipe(Ke((t) => t ? this._ensureWorkbookSelection(t.getUnitId()).selectionMoving$ : Dt())), this.selectionMoveEnd$ = e.pipe(Ke((t) => t ? this._ensureWorkbookSelection(t.getUnitId()).selectionMoveEnd$ : Dt([]))), this.selectionSet$ = e.pipe(Ke((t) => t ? this._ensureWorkbookSelection(t.getUnitId()).selectionSet$ : Dt([]))), this.selectionChanged$ = e.pipe(Ke((t) => t ? this._ensureWorkbookSelection(t.getUnitId()).selectionChanged$ : Dt([]))).pipe(
|
|
1759
1773
|
zi((t, o) => t.length !== o.length ? !1 : t.length === 0 && o.length === 0 ? !0 : t.every((s, r) => JSON.stringify(s) === JSON.stringify(o[r]))),
|
|
1760
|
-
|
|
1774
|
+
Os(1)
|
|
1761
1775
|
), this._instanceSrv.getTypeOfUnitDisposed$(B.UNIVER_SHEET).pipe(lo(this.dispose$)).subscribe((t) => {
|
|
1762
1776
|
this._removeWorkbookSelection(t.getUnitId());
|
|
1763
1777
|
});
|
|
@@ -1836,7 +1850,7 @@ let H = class extends _s {
|
|
|
1836
1850
|
const o = this._instanceSrv.getUnit(e);
|
|
1837
1851
|
if (!o)
|
|
1838
1852
|
throw new Error(`[SheetsSelectionsService]: cannot resolve unit with id "${e}"!`);
|
|
1839
|
-
t = new
|
|
1853
|
+
t = new ja(o), this._workbookSelections.set(e, t);
|
|
1840
1854
|
}
|
|
1841
1855
|
return t;
|
|
1842
1856
|
}
|
|
@@ -1844,10 +1858,10 @@ let H = class extends _s {
|
|
|
1844
1858
|
this._workbookSelections.delete(e);
|
|
1845
1859
|
}
|
|
1846
1860
|
};
|
|
1847
|
-
H =
|
|
1848
|
-
|
|
1861
|
+
H = za([
|
|
1862
|
+
Ka(0, M)
|
|
1849
1863
|
], H);
|
|
1850
|
-
const
|
|
1864
|
+
const xd = "DISABLE_NORMAL_SELECTIONS", Wd = "SELECTIONS_ENABLED", Ja = "REF_SELECTIONS_ENABLED", Io = {
|
|
1851
1865
|
id: "sheet.command.clear-selection-all",
|
|
1852
1866
|
type: v.COMMAND,
|
|
1853
1867
|
handler: (n, e) => {
|
|
@@ -1898,7 +1912,7 @@ const Dd = "DISABLE_NORMAL_SELECTIONS", Ad = "SELECTIONS_ENABLED", za = "REF_SEL
|
|
|
1898
1912
|
const h = Fn(d, n, u, c), m = {
|
|
1899
1913
|
subUnitId: c,
|
|
1900
1914
|
unitId: u,
|
|
1901
|
-
cellValue:
|
|
1915
|
+
cellValue: Ha(h)
|
|
1902
1916
|
}, g = be(
|
|
1903
1917
|
n,
|
|
1904
1918
|
m
|
|
@@ -1926,7 +1940,7 @@ const Dd = "DISABLE_NORMAL_SELECTIONS", Ad = "SELECTIONS_ENABLED", za = "REF_SEL
|
|
|
1926
1940
|
const h = Fn(d, n, u, c), m = [], g = [], f = {
|
|
1927
1941
|
subUnitId: c,
|
|
1928
1942
|
unitId: u,
|
|
1929
|
-
cellValue:
|
|
1943
|
+
cellValue: Ba(h)
|
|
1930
1944
|
}, p = be(
|
|
1931
1945
|
n,
|
|
1932
1946
|
f
|
|
@@ -1958,7 +1972,7 @@ const Dd = "DISABLE_NORMAL_SELECTIONS", Ad = "SELECTIONS_ENABLED", za = "REF_SEL
|
|
|
1958
1972
|
const t = n.get(M), { sheet: o, index: s, unitId: r } = e, i = t.getUniverSheetInstance(r);
|
|
1959
1973
|
return i ? i.addWorksheet(o.id, s, o) : !1;
|
|
1960
1974
|
}
|
|
1961
|
-
},
|
|
1975
|
+
}, Ya = (n, e) => {
|
|
1962
1976
|
const t = n.get(M), { subUnitId: o, unitId: s } = e, r = kt(t, e);
|
|
1963
1977
|
if (!r)
|
|
1964
1978
|
throw new Error("[RemoveSheetUndoMutationFactory]: Worksheet is null error!");
|
|
@@ -1983,8 +1997,8 @@ const Dd = "DISABLE_NORMAL_SELECTIONS", Ad = "SELECTIONS_ENABLED", za = "REF_SEL
|
|
|
1983
1997
|
const t = n.get(E), o = n.get(V), s = n.get(M), r = n.get(F), i = n.get(Ye), a = k(s, e);
|
|
1984
1998
|
if (!a)
|
|
1985
1999
|
return !1;
|
|
1986
|
-
const { workbook: u, worksheet: l, unitId: c, subUnitId: d } = a, h =
|
|
1987
|
-
h.name =
|
|
2000
|
+
const { workbook: u, worksheet: l, unitId: c, subUnitId: d } = a, h = O.deepClone(l.getConfig());
|
|
2001
|
+
h.name = qa(u, i, h.name), h.id = O.generateRandomId();
|
|
1988
2002
|
const g = {
|
|
1989
2003
|
index: u.getSheetIndex(l) + 1,
|
|
1990
2004
|
sheet: h,
|
|
@@ -2011,7 +2025,7 @@ const Dd = "DISABLE_NORMAL_SELECTIONS", Ad = "SELECTIONS_ENABLED", za = "REF_SEL
|
|
|
2011
2025
|
}), !0) : !1;
|
|
2012
2026
|
}
|
|
2013
2027
|
};
|
|
2014
|
-
function
|
|
2028
|
+
function qa(n, e, t) {
|
|
2015
2029
|
let o = t + e.t("sheets.tabs.sheetCopy", ""), s = 2;
|
|
2016
2030
|
for (; n.checkSheetName(o); )
|
|
2017
2031
|
o = t + e.t("sheets.tabs.sheetCopy", `${s}`), s++;
|
|
@@ -2048,14 +2062,14 @@ function jn(n, e, t = !0) {
|
|
|
2048
2062
|
endRow: i + u.rowSpan - 1,
|
|
2049
2063
|
endColumn: a + u.colSpan - 1
|
|
2050
2064
|
};
|
|
2051
|
-
|
|
2065
|
+
N.contains(n, l) || s.push(l);
|
|
2052
2066
|
}
|
|
2053
2067
|
}), s.length === 0)
|
|
2054
2068
|
return n;
|
|
2055
|
-
const r =
|
|
2069
|
+
const r = N.union(n, ...s);
|
|
2056
2070
|
return t ? jn(r, e, t) : r;
|
|
2057
2071
|
}
|
|
2058
|
-
function
|
|
2072
|
+
function $d(n, e, t) {
|
|
2059
2073
|
let o = null;
|
|
2060
2074
|
return t.getMatrixWithMergedCells(n, e, n, e).forValue((r, i, a) => (o = {
|
|
2061
2075
|
actualRow: r,
|
|
@@ -2079,7 +2093,7 @@ function xd(n, e, t) {
|
|
|
2079
2093
|
rangeType: L.NORMAL
|
|
2080
2094
|
};
|
|
2081
2095
|
}
|
|
2082
|
-
function
|
|
2096
|
+
function Vd(n, e, t) {
|
|
2083
2097
|
const { startRow: o, startColumn: s, endRow: r, endColumn: i } = n;
|
|
2084
2098
|
return Number.isNaN(o) && (n.startRow = 0), Number.isNaN(r) && (n.endRow = e - 1), Number.isNaN(s) && (n.startColumn = 0), Number.isNaN(i) && (n.endColumn = t - 1), n;
|
|
2085
2099
|
}
|
|
@@ -2113,13 +2127,13 @@ const Ze = (n, e, t) => ({
|
|
|
2113
2127
|
selections: [{ range: n, primary: Se(n, t) }]
|
|
2114
2128
|
}
|
|
2115
2129
|
});
|
|
2116
|
-
function
|
|
2130
|
+
function Ld(n) {
|
|
2117
2131
|
if (!n)
|
|
2118
2132
|
return !1;
|
|
2119
2133
|
const { range: e, primary: t } = n;
|
|
2120
|
-
return
|
|
2134
|
+
return N.equals(e, t);
|
|
2121
2135
|
}
|
|
2122
|
-
function
|
|
2136
|
+
function Xa(n) {
|
|
2123
2137
|
function e(t, o) {
|
|
2124
2138
|
function s(r) {
|
|
2125
2139
|
for (let i = r.startRow; i <= r.endRow; i++)
|
|
@@ -2143,12 +2157,12 @@ function lt(n, e, t, o, s, r, i) {
|
|
|
2143
2157
|
}
|
|
2144
2158
|
return a;
|
|
2145
2159
|
}
|
|
2146
|
-
var
|
|
2147
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
2160
|
+
var Za = Object.getOwnPropertyDescriptor, Qa = (n, e, t, o) => {
|
|
2161
|
+
for (var s = o > 1 ? void 0 : o ? Za(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
2148
2162
|
(i = n[r]) && (s = i(s) || s);
|
|
2149
2163
|
return s;
|
|
2150
|
-
},
|
|
2151
|
-
const
|
|
2164
|
+
}, eu = (n, e) => (t, o) => e(t, o, n);
|
|
2165
|
+
const tu = So("sheets-formula.ref-selections.service");
|
|
2152
2166
|
let ts = class extends H {
|
|
2153
2167
|
constructor(n) {
|
|
2154
2168
|
super(n);
|
|
@@ -2168,12 +2182,12 @@ let ts = class extends H {
|
|
|
2168
2182
|
})), e.pipe(co((t) => t.map((o) => this._ensureWorkbookSelection(o.getUnitId()))));
|
|
2169
2183
|
}
|
|
2170
2184
|
};
|
|
2171
|
-
ts =
|
|
2172
|
-
|
|
2185
|
+
ts = Qa([
|
|
2186
|
+
eu(0, M)
|
|
2173
2187
|
], ts);
|
|
2174
|
-
function
|
|
2175
|
-
const o = n.get(ys).getContextValue(
|
|
2176
|
-
return n.get(o && !e ?
|
|
2188
|
+
function nu(n, e) {
|
|
2189
|
+
const o = n.get(ys).getContextValue(Ja);
|
|
2190
|
+
return n.get(o && !e ? tu : H);
|
|
2177
2191
|
}
|
|
2178
2192
|
const re = {
|
|
2179
2193
|
id: "sheet.operation.set-selections",
|
|
@@ -2181,9 +2195,9 @@ const re = {
|
|
|
2181
2195
|
handler: (n, e) => {
|
|
2182
2196
|
if (!e) return !1;
|
|
2183
2197
|
const { selections: t, type: o, unitId: s, subUnitId: r } = e;
|
|
2184
|
-
return
|
|
2198
|
+
return nu(n).setSelections(s, r, [...t], o), !0;
|
|
2185
2199
|
}
|
|
2186
|
-
},
|
|
2200
|
+
}, ou = {
|
|
2187
2201
|
id: "sheet.command.select-range",
|
|
2188
2202
|
type: v.COMMAND,
|
|
2189
2203
|
handler: (n, e) => {
|
|
@@ -2228,7 +2242,7 @@ const re = {
|
|
|
2228
2242
|
params: {
|
|
2229
2243
|
unitId: h,
|
|
2230
2244
|
subUnitId: d,
|
|
2231
|
-
selections: [{ range: e.toRange, primary:
|
|
2245
|
+
selections: [{ range: e.toRange, primary: su(e.fromRange, e.toRange, c) }],
|
|
2232
2246
|
type: Ce.MOVE_END
|
|
2233
2247
|
}
|
|
2234
2248
|
}
|
|
@@ -2260,22 +2274,22 @@ function _o(n, e, t, o = !1) {
|
|
|
2260
2274
|
const s = [], r = [], { range: i, subUnitId: a, unitId: u } = e, { range: l, subUnitId: c } = t, h = n.get(M).getUniverSheetInstance(u), m = h == null ? void 0 : h.getSheetBySheetId(c), g = h == null ? void 0 : h.getSheetBySheetId(a), f = m == null ? void 0 : m.getCellMatrix(), p = g == null ? void 0 : g.getCellMatrix();
|
|
2261
2275
|
if (m && g && f && p) {
|
|
2262
2276
|
const C = jn(l, m, !1);
|
|
2263
|
-
if (!
|
|
2277
|
+
if (!N.equals(l, C) && !o)
|
|
2264
2278
|
return null;
|
|
2265
2279
|
const S = new G(), I = new G(), w = new G();
|
|
2266
2280
|
K.foreach(i, (P, U) => {
|
|
2267
2281
|
const x = p.getValue(P, U);
|
|
2268
|
-
if (S.setValue(P, U,
|
|
2282
|
+
if (S.setValue(P, U, O.deepClone(x)), x) {
|
|
2269
2283
|
const j = h == null ? void 0 : h.getStyles().get(x.s);
|
|
2270
|
-
w.setValue(P, U,
|
|
2284
|
+
w.setValue(P, U, O.deepClone(j));
|
|
2271
2285
|
}
|
|
2272
2286
|
I.setValue(P, U, null);
|
|
2273
2287
|
});
|
|
2274
2288
|
const y = new G(), b = new G();
|
|
2275
2289
|
K.foreach(l, (P, U) => {
|
|
2276
|
-
y.setValue(P, U,
|
|
2290
|
+
y.setValue(P, U, O.deepClone(f.getValue(P, U)));
|
|
2277
2291
|
}), K.foreach(i, (P, U) => {
|
|
2278
|
-
const x = bs(P, U), j =
|
|
2292
|
+
const x = bs(P, U), j = N.getRelativeRange(x, i), Z = N.getPositionRange(j, l), Q = O.deepClone(w.getValue(P, U)), ee = O.deepClone(S.getValue(P, U));
|
|
2279
2293
|
ee && Q && (ee.s = Q), b.setValue(Z.startRow, Z.startColumn, ee);
|
|
2280
2294
|
});
|
|
2281
2295
|
const D = {
|
|
@@ -2310,7 +2324,7 @@ function _o(n, e, t, o = !1) {
|
|
|
2310
2324
|
undos: r
|
|
2311
2325
|
};
|
|
2312
2326
|
}
|
|
2313
|
-
function
|
|
2327
|
+
function su(n, e, t) {
|
|
2314
2328
|
const o = n.startRow, s = n.startColumn, r = t.getMergedCell(o, s), i = Se(e, t);
|
|
2315
2329
|
if (r) {
|
|
2316
2330
|
const a = r.endRow - r.startRow + 1, u = r.endColumn - r.startColumn + 1;
|
|
@@ -2319,7 +2333,7 @@ function nu(n, e, t) {
|
|
|
2319
2333
|
return i;
|
|
2320
2334
|
}
|
|
2321
2335
|
var wn = /* @__PURE__ */ ((n) => (n[n.UNIVER_UNKNOWN = 0] = "UNIVER_UNKNOWN", n[n.UNIVER_DOC = 1] = "UNIVER_DOC", n[n.UNIVER_SHEET = 2] = "UNIVER_SHEET", n[n.UNIVER_SLIDE = 3] = "UNIVER_SLIDE", n[n.UNIVER_PROJECT = 4] = "UNIVER_PROJECT", n[n.UNRECOGNIZED = -1] = "UNRECOGNIZED", n))(wn || {}), _ = /* @__PURE__ */ ((n) => (n[n.View = 0] = "View", n[n.Edit = 1] = "Edit", n[n.ManageCollaborator = 2] = "ManageCollaborator", n[n.Print = 3] = "Print", n[n.Duplicate = 4] = "Duplicate", n[n.Comment = 5] = "Comment", n[n.Copy = 6] = "Copy", n[n.Share = 7] = "Share", n[n.Export = 8] = "Export", n[n.MoveWorksheet = 9] = "MoveWorksheet", n[n.DeleteWorksheet = 10] = "DeleteWorksheet", n[n.HideWorksheet = 11] = "HideWorksheet", n[n.RenameWorksheet = 12] = "RenameWorksheet", n[n.CreateWorksheet = 13] = "CreateWorksheet", n[n.SetWorksheetStyle = 14] = "SetWorksheetStyle", n[n.EditWorksheetCell = 15] = "EditWorksheetCell", n[n.InsertHyperlink = 16] = "InsertHyperlink", n[n.Sort = 17] = "Sort", n[n.Filter = 18] = "Filter", n[n.PivotTable = 19] = "PivotTable", n[n.FloatImg = 20] = "FloatImg", n[n.History = 21] = "History", n[n.RwHgtClWdt = 22] = "RwHgtClWdt", n[n.ViemRwHgtClWdt = 23] = "ViemRwHgtClWdt", n[n.ViewFilter = 24] = "ViewFilter", n[n.MoveSheet = 25] = "MoveSheet", n[n.DeleteSheet = 26] = "DeleteSheet", n[n.HideSheet = 27] = "HideSheet", n[n.CopySheet = 28] = "CopySheet", n[n.RenameSheet = 29] = "RenameSheet", n[n.CreateSheet = 30] = "CreateSheet", n[n.SelectProtectedCells = 31] = "SelectProtectedCells", n[n.SelectUnProtectedCells = 32] = "SelectUnProtectedCells", n[n.SetCellStyle = 33] = "SetCellStyle", n[n.SetCellValue = 34] = "SetCellValue", n[n.SetRowStyle = 35] = "SetRowStyle", n[n.SetColumnStyle = 36] = "SetColumnStyle", n[n.InsertRow = 37] = "InsertRow", n[n.InsertColumn = 38] = "InsertColumn", n[n.DeleteRow = 39] = "DeleteRow", n[n.DeleteColumn = 40] = "DeleteColumn", n[n.EditExtraObject = 41] = "EditExtraObject", n[n.Delete = 42] = "Delete", n[n.RecoverHistory = 43] = "RecoverHistory", n[n.ViewHistory = 44] = "ViewHistory", n[n.CreatePermissionObject = 45] = "CreatePermissionObject", n[n.UNRECOGNIZED = -1] = "UNRECOGNIZED", n))(_ || {}), A = /* @__PURE__ */ ((n) => (n[n.Unkonwn = 0] = "Unkonwn", n[n.Workbook = 1] = "Workbook", n[n.Worksheet = 2] = "Worksheet", n[n.SelectRange = 3] = "SelectRange", n[n.Document = 4] = "Document", n[n.Slide = 5] = "Slide", n[n.UNRECOGNIZED = -1] = "UNRECOGNIZED", n))(A || {});
|
|
2322
|
-
class
|
|
2336
|
+
class Ne {
|
|
2323
2337
|
constructor(e, t, o) {
|
|
2324
2338
|
R(this, "type", A.SelectRange);
|
|
2325
2339
|
R(this, "subType", _.Edit);
|
|
@@ -2365,7 +2379,7 @@ class Bs {
|
|
|
2365
2379
|
this.unitId = e, this.unitId = e, this.id = `${this.type}.${_.Copy}_${e}`;
|
|
2366
2380
|
}
|
|
2367
2381
|
}
|
|
2368
|
-
class
|
|
2382
|
+
class ru {
|
|
2369
2383
|
constructor(e) {
|
|
2370
2384
|
R(this, "id");
|
|
2371
2385
|
R(this, "value", !0);
|
|
@@ -2445,7 +2459,7 @@ class bo {
|
|
|
2445
2459
|
this.unitId = e, this.unitId = e, this.id = `${this.type}.${_.HideSheet}_${e}`;
|
|
2446
2460
|
}
|
|
2447
2461
|
}
|
|
2448
|
-
class
|
|
2462
|
+
class iu {
|
|
2449
2463
|
constructor(e) {
|
|
2450
2464
|
R(this, "id");
|
|
2451
2465
|
R(this, "value", !0);
|
|
@@ -2575,7 +2589,7 @@ class nr {
|
|
|
2575
2589
|
this.unitId = e, this.subUnitId = t, this.id = `${this.type}.${_.DeleteRow}_${e}_${t}`;
|
|
2576
2590
|
}
|
|
2577
2591
|
}
|
|
2578
|
-
class
|
|
2592
|
+
class Oe {
|
|
2579
2593
|
constructor(e, t) {
|
|
2580
2594
|
R(this, "value", !0);
|
|
2581
2595
|
R(this, "type", A.Worksheet);
|
|
@@ -2655,7 +2669,7 @@ class lr {
|
|
|
2655
2669
|
this.unitId = e, this.subUnitId = t, this.id = `${this.type}.${_.PivotTable}_${e}_${t}`;
|
|
2656
2670
|
}
|
|
2657
2671
|
}
|
|
2658
|
-
class
|
|
2672
|
+
class Hd {
|
|
2659
2673
|
constructor(e, t) {
|
|
2660
2674
|
R(this, "value", !0);
|
|
2661
2675
|
R(this, "type", A.Worksheet);
|
|
@@ -2665,7 +2679,7 @@ class Vd {
|
|
|
2665
2679
|
this.unitId = e, this.subUnitId = t, this.id = `${this.type}.${_.SelectProtectedCells}_${e}_${t}`;
|
|
2666
2680
|
}
|
|
2667
2681
|
}
|
|
2668
|
-
class
|
|
2682
|
+
class Bd {
|
|
2669
2683
|
constructor(e, t) {
|
|
2670
2684
|
R(this, "value", !0);
|
|
2671
2685
|
R(this, "type", A.Worksheet);
|
|
@@ -2743,10 +2757,10 @@ const sn = {
|
|
|
2743
2757
|
const t = n.get(E), o = n.get(V), s = n.get(M), r = n.get(H), i = n.get(F), a = n.get(Fe), u = k(s, e);
|
|
2744
2758
|
if (!u) return !1;
|
|
2745
2759
|
const { subUnitId: l, unitId: c, workbook: d, worksheet: h } = u, { value: m, range: g, redoUndoId: f } = e, p = g ? [g] : (P = r.getCurrentSelections()) == null ? void 0 : P.map((U) => U.range);
|
|
2746
|
-
if (!p || !p.length || !a.getPermissionPoint(new
|
|
2760
|
+
if (!p || !p.length || !a.getPermissionPoint(new Oe(c, l).id)) return !1;
|
|
2747
2761
|
const C = new G();
|
|
2748
2762
|
let S;
|
|
2749
|
-
if (
|
|
2763
|
+
if (O.isArray(m))
|
|
2750
2764
|
for (let U = 0; U < p.length; U++) {
|
|
2751
2765
|
const { startRow: x, startColumn: j, endRow: Z, endColumn: Q } = p[U];
|
|
2752
2766
|
for (let ee = 0; ee <= Z - x; ee++)
|
|
@@ -2780,7 +2794,7 @@ const sn = {
|
|
|
2780
2794
|
redoMutations: [
|
|
2781
2795
|
{ id: X.id, params: I },
|
|
2782
2796
|
...D,
|
|
2783
|
-
|
|
2797
|
+
O.deepClone(U)
|
|
2784
2798
|
],
|
|
2785
2799
|
id: f
|
|
2786
2800
|
}), !0;
|
|
@@ -2934,7 +2948,7 @@ function mr(n, e) {
|
|
|
2934
2948
|
undo: o
|
|
2935
2949
|
};
|
|
2936
2950
|
}
|
|
2937
|
-
function
|
|
2951
|
+
function Fd(n, e, t, o, s, r) {
|
|
2938
2952
|
const { startRow: i, endRow: a, startColumn: u, endColumn: l } = e;
|
|
2939
2953
|
if (s === fe.ROWS) {
|
|
2940
2954
|
const c = a - i + 1;
|
|
@@ -2958,7 +2972,7 @@ function Hd(n, e, t, o, s, r) {
|
|
|
2958
2972
|
r && r[d] && r[d][h] ? n.setValue(d, h, r[d][h]) : n.realDeleteValue(d, h);
|
|
2959
2973
|
}
|
|
2960
2974
|
}
|
|
2961
|
-
function
|
|
2975
|
+
function jd(n, e, t, o, s) {
|
|
2962
2976
|
const { startRow: r, endRow: i, startColumn: a, endColumn: u } = e, l = i - r + 1, c = u - a + 1;
|
|
2963
2977
|
if (s === fe.ROWS)
|
|
2964
2978
|
for (let d = r; d <= t; d++)
|
|
@@ -3003,7 +3017,7 @@ const gr = "sheet.command.delete-range-move-left", Pt = {
|
|
|
3003
3017
|
}
|
|
3004
3018
|
// all subsequent mutations should succeed inorder to make the whole process succeed
|
|
3005
3019
|
// Promise.all([]).then(() => true),
|
|
3006
|
-
}, fr = "sheet.command.delete-range-move-up",
|
|
3020
|
+
}, fr = "sheet.command.delete-range-move-up", Nt = {
|
|
3007
3021
|
type: v.COMMAND,
|
|
3008
3022
|
id: fr,
|
|
3009
3023
|
handler: async (n, e) => {
|
|
@@ -3019,7 +3033,7 @@ const gr = "sheet.command.delete-range-move-left", Pt = {
|
|
|
3019
3033
|
unitId: u,
|
|
3020
3034
|
shiftDimension: fe.ROWS
|
|
3021
3035
|
}, g = i.onCommandExecute({
|
|
3022
|
-
id:
|
|
3036
|
+
id: Nt.id,
|
|
3023
3037
|
params: { range: h }
|
|
3024
3038
|
}), { redo: f, undo: p } = mr(
|
|
3025
3039
|
n,
|
|
@@ -3033,7 +3047,7 @@ const gr = "sheet.command.delete-range-move-left", Pt = {
|
|
|
3033
3047
|
}
|
|
3034
3048
|
// all subsequent mutations should succeed inorder to make the whole process succeed
|
|
3035
3049
|
// Promise.all([]).then(() => true),
|
|
3036
|
-
},
|
|
3050
|
+
}, au = {
|
|
3037
3051
|
type: v.COMMAND,
|
|
3038
3052
|
id: "sheet.command.delete-range-protection",
|
|
3039
3053
|
async handler(n, e) {
|
|
@@ -3050,7 +3064,7 @@ const gr = "sheet.command.delete-range-move-left", Pt = {
|
|
|
3050
3064
|
undoMutations: [{ id: Ae.id, params: { unitId: s, subUnitId: r, rules: [i] } }]
|
|
3051
3065
|
}), !0;
|
|
3052
3066
|
}
|
|
3053
|
-
},
|
|
3067
|
+
}, uu = {
|
|
3054
3068
|
type: v.COMMAND,
|
|
3055
3069
|
id: "sheet.command.delete-worksheet-protection",
|
|
3056
3070
|
handler(n, e) {
|
|
@@ -3068,7 +3082,7 @@ const gr = "sheet.command.delete-range-move-left", Pt = {
|
|
|
3068
3082
|
undoMutations: u
|
|
3069
3083
|
}), !0;
|
|
3070
3084
|
}
|
|
3071
|
-
},
|
|
3085
|
+
}, lu = {
|
|
3072
3086
|
type: v.COMMAND,
|
|
3073
3087
|
id: "sheet.command.remove-worksheet-range-theme-style",
|
|
3074
3088
|
handler: (n, e) => {
|
|
@@ -3079,7 +3093,7 @@ const gr = "sheet.command.delete-range-move-left", Pt = {
|
|
|
3079
3093
|
redoMutations: [{ id: Jt.id, params: e }]
|
|
3080
3094
|
}), !0) : !1;
|
|
3081
3095
|
}
|
|
3082
|
-
},
|
|
3096
|
+
}, cu = {
|
|
3083
3097
|
id: "sheet.command.insert-defined-name",
|
|
3084
3098
|
type: v.COMMAND,
|
|
3085
3099
|
handler: (n, e) => {
|
|
@@ -3094,7 +3108,7 @@ const gr = "sheet.command.delete-range-move-left", Pt = {
|
|
|
3094
3108
|
redoMutations: [{ id: zt.id, params: s }]
|
|
3095
3109
|
}), !0) : !1;
|
|
3096
3110
|
}
|
|
3097
|
-
},
|
|
3111
|
+
}, du = "sheet.command.insert-range-move-down", rn = {
|
|
3098
3112
|
type: v.COMMAND,
|
|
3099
3113
|
id: "sheet.command.insert-range-move-down",
|
|
3100
3114
|
// eslint-disable-next-line max-lines-per-function
|
|
@@ -3289,7 +3303,7 @@ const gr = "sheet.command.delete-range-move-left", Pt = {
|
|
|
3289
3303
|
redoMutations: w
|
|
3290
3304
|
}), !0) : !1;
|
|
3291
3305
|
}
|
|
3292
|
-
},
|
|
3306
|
+
}, hu = {
|
|
3293
3307
|
type: v.COMMAND,
|
|
3294
3308
|
id: "sheet.command.insert-row-before",
|
|
3295
3309
|
handler: async (n) => {
|
|
@@ -3317,7 +3331,7 @@ const gr = "sheet.command.delete-range-move-left", Pt = {
|
|
|
3317
3331
|
};
|
|
3318
3332
|
return n.get(E).executeCommand(Qe.id, m);
|
|
3319
3333
|
}
|
|
3320
|
-
},
|
|
3334
|
+
}, mu = {
|
|
3321
3335
|
type: v.COMMAND,
|
|
3322
3336
|
id: "sheet.command.insert-row-after",
|
|
3323
3337
|
handler: async (n) => {
|
|
@@ -3346,7 +3360,7 @@ const gr = "sheet.command.delete-range-move-left", Pt = {
|
|
|
3346
3360
|
};
|
|
3347
3361
|
return n.get(E).executeCommand(Qe.id, g);
|
|
3348
3362
|
}
|
|
3349
|
-
},
|
|
3363
|
+
}, gu = {
|
|
3350
3364
|
type: v.COMMAND,
|
|
3351
3365
|
id: "sheet.command.insert-multi-rows-above",
|
|
3352
3366
|
handler: async (n, e) => {
|
|
@@ -3375,7 +3389,7 @@ const gr = "sheet.command.delete-range-move-left", Pt = {
|
|
|
3375
3389
|
};
|
|
3376
3390
|
return n.get(E).executeCommand(Qe.id, p);
|
|
3377
3391
|
}
|
|
3378
|
-
},
|
|
3392
|
+
}, fu = {
|
|
3379
3393
|
type: v.COMMAND,
|
|
3380
3394
|
id: "sheet.command.insert-multi-rows-after",
|
|
3381
3395
|
handler: async (n, e) => {
|
|
@@ -3457,7 +3471,7 @@ const gr = "sheet.command.delete-range-move-left", Pt = {
|
|
|
3457
3471
|
redoMutations: I.filter(Boolean)
|
|
3458
3472
|
}), !0) : !1;
|
|
3459
3473
|
}
|
|
3460
|
-
},
|
|
3474
|
+
}, Ru = {
|
|
3461
3475
|
type: v.COMMAND,
|
|
3462
3476
|
id: "sheet.command.insert-col-before",
|
|
3463
3477
|
handler: async (n) => {
|
|
@@ -3485,7 +3499,7 @@ const gr = "sheet.command.delete-range-move-left", Pt = {
|
|
|
3485
3499
|
};
|
|
3486
3500
|
return n.get(E).executeCommand(et.id, m);
|
|
3487
3501
|
}
|
|
3488
|
-
},
|
|
3502
|
+
}, pu = {
|
|
3489
3503
|
type: v.COMMAND,
|
|
3490
3504
|
id: "sheet.command.insert-col-after",
|
|
3491
3505
|
handler: async (n) => {
|
|
@@ -3512,7 +3526,7 @@ const gr = "sheet.command.delete-range-move-left", Pt = {
|
|
|
3512
3526
|
};
|
|
3513
3527
|
return n.get(E).executeCommand(et.id, g);
|
|
3514
3528
|
}
|
|
3515
|
-
},
|
|
3529
|
+
}, Cu = {
|
|
3516
3530
|
type: v.COMMAND,
|
|
3517
3531
|
id: "sheet.command.insert-multi-cols-before",
|
|
3518
3532
|
handler: async (n, e) => {
|
|
@@ -3540,7 +3554,7 @@ const gr = "sheet.command.delete-range-move-left", Pt = {
|
|
|
3540
3554
|
};
|
|
3541
3555
|
return n.get(E).executeCommand(et.id, f);
|
|
3542
3556
|
}
|
|
3543
|
-
},
|
|
3557
|
+
}, Su = {
|
|
3544
3558
|
type: v.COMMAND,
|
|
3545
3559
|
id: "sheet.command.insert-multi-cols-right",
|
|
3546
3560
|
handler: async (n, e) => {
|
|
@@ -3567,7 +3581,7 @@ const gr = "sheet.command.delete-range-move-left", Pt = {
|
|
|
3567
3581
|
};
|
|
3568
3582
|
return n.get(E).executeCommand(et.id, f);
|
|
3569
3583
|
}
|
|
3570
|
-
},
|
|
3584
|
+
}, wu = {
|
|
3571
3585
|
id: "sheet.command.insert-sheet",
|
|
3572
3586
|
type: v.COMMAND,
|
|
3573
3587
|
handler: (n, e) => {
|
|
@@ -3577,7 +3591,7 @@ const gr = "sheet.command.delete-range-move-left", Pt = {
|
|
|
3577
3591
|
const { unitId: a, workbook: u } = i;
|
|
3578
3592
|
let l = u.getSheets().length;
|
|
3579
3593
|
const c = e == null ? void 0 : e.sheet, d = c == null ? void 0 : c.id, h = gi(c || {});
|
|
3580
|
-
e ? (l = (p = e.index) != null ? p : l, h.id = d ||
|
|
3594
|
+
e ? (l = (p = e.index) != null ? p : l, h.id = d || O.generateRandomId(), h.name = (c == null ? void 0 : c.name) || u.generateNewSheetName(`${r.t("sheets.tabs.sheet")}`)) : (h.id = O.generateRandomId(), h.name = u.generateNewSheetName(`${r.t("sheets.tabs.sheet")}`));
|
|
3581
3595
|
const m = {
|
|
3582
3596
|
index: l,
|
|
3583
3597
|
sheet: h,
|
|
@@ -3593,12 +3607,12 @@ const gr = "sheet.command.delete-range-move-left", Pt = {
|
|
|
3593
3607
|
}), !0) : !1;
|
|
3594
3608
|
}
|
|
3595
3609
|
};
|
|
3596
|
-
function
|
|
3610
|
+
function Iu(n, e) {
|
|
3597
3611
|
const { unitId: t, subUnitId: o, sourceRange: s, targetRange: r } = e, i = s.startRow > r.startRow, a = s.endRow - s.startRow + 1;
|
|
3598
3612
|
return i ? {
|
|
3599
3613
|
unitId: t,
|
|
3600
3614
|
subUnitId: o,
|
|
3601
|
-
sourceRange:
|
|
3615
|
+
sourceRange: N.clone(r),
|
|
3602
3616
|
targetRange: {
|
|
3603
3617
|
...s,
|
|
3604
3618
|
endRow: s.endRow + a,
|
|
@@ -3607,7 +3621,7 @@ function Su(n, e) {
|
|
|
3607
3621
|
} : {
|
|
3608
3622
|
unitId: t,
|
|
3609
3623
|
subUnitId: o,
|
|
3610
|
-
targetRange:
|
|
3624
|
+
targetRange: N.clone(s),
|
|
3611
3625
|
sourceRange: {
|
|
3612
3626
|
...r,
|
|
3613
3627
|
endRow: r.endRow - a,
|
|
@@ -3629,12 +3643,12 @@ const it = {
|
|
|
3629
3643
|
return ks(l, c, d, h), u.getCellMatrix().moveRows(l, c, d), !0;
|
|
3630
3644
|
}
|
|
3631
3645
|
};
|
|
3632
|
-
function
|
|
3646
|
+
function vu(n, e) {
|
|
3633
3647
|
const { unitId: t, subUnitId: o, sourceRange: s, targetRange: r } = e, i = s.startColumn > r.startColumn, a = s.endColumn - s.startColumn + 1;
|
|
3634
3648
|
return i ? {
|
|
3635
3649
|
unitId: t,
|
|
3636
3650
|
subUnitId: o,
|
|
3637
|
-
sourceRange:
|
|
3651
|
+
sourceRange: N.clone(r),
|
|
3638
3652
|
targetRange: {
|
|
3639
3653
|
...s,
|
|
3640
3654
|
endColumn: s.endColumn + a,
|
|
@@ -3643,7 +3657,7 @@ function wu(n, e) {
|
|
|
3643
3657
|
} : {
|
|
3644
3658
|
unitId: t,
|
|
3645
3659
|
subUnitId: o,
|
|
3646
|
-
targetRange:
|
|
3660
|
+
targetRange: N.clone(s),
|
|
3647
3661
|
sourceRange: {
|
|
3648
3662
|
...r,
|
|
3649
3663
|
startColumn: r.startColumn - a,
|
|
@@ -3665,10 +3679,10 @@ const at = {
|
|
|
3665
3679
|
return ks(l, c, d, h), u.getCellMatrix().moveColumns(l, c, d), !0;
|
|
3666
3680
|
}
|
|
3667
3681
|
};
|
|
3668
|
-
function
|
|
3682
|
+
function Mu(n, e) {
|
|
3669
3683
|
return e.getMergeData().some((t) => t.startRow < n && n <= t.endRow);
|
|
3670
3684
|
}
|
|
3671
|
-
function
|
|
3685
|
+
function _u(n, e) {
|
|
3672
3686
|
return e.getMergeData().some((t) => t.startColumn < n && n <= t.endColumn);
|
|
3673
3687
|
}
|
|
3674
3688
|
const wr = "sheet.command.move-rows", Kn = {
|
|
@@ -3689,9 +3703,9 @@ const wr = "sheet.command.move-rows", Kn = {
|
|
|
3689
3703
|
const u = n.get(F), l = n.get(M), c = k(l, e);
|
|
3690
3704
|
if (!c) return !1;
|
|
3691
3705
|
const { workbook: d, worksheet: h } = c, m = d.getUnitId(), g = h.getSheetId(), f = n.get(Ut), p = n.get(Ye), C = a[0].range, S = a[0].primary, I = jn(C, h, !1);
|
|
3692
|
-
if (!
|
|
3706
|
+
if (!N.equals(C, I))
|
|
3693
3707
|
return f.emit(p.t("sheets.info.partOfCell")), !1;
|
|
3694
|
-
if (
|
|
3708
|
+
if (Mu(s, h))
|
|
3695
3709
|
return f.emit(p.t("sheets.info.acrossMergedCell")), !1;
|
|
3696
3710
|
const w = {
|
|
3697
3711
|
...C,
|
|
@@ -3702,7 +3716,7 @@ const wr = "sheet.command.move-rows", Kn = {
|
|
|
3702
3716
|
subUnitId: g,
|
|
3703
3717
|
sourceRange: C,
|
|
3704
3718
|
targetRange: w
|
|
3705
|
-
}, b =
|
|
3719
|
+
}, b = Iu(n, y), D = n.get(E), T = u.onCommandExecute({ id: Kn.id, params: e }), P = [
|
|
3706
3720
|
...(j = T.preRedos) != null ? j : [],
|
|
3707
3721
|
{ id: it.id, params: y }
|
|
3708
3722
|
], U = [
|
|
@@ -3755,9 +3769,9 @@ const wr = "sheet.command.move-rows", Kn = {
|
|
|
3755
3769
|
const u = n.get(F), l = n.get(M), c = k(l, e);
|
|
3756
3770
|
if (!c) return !1;
|
|
3757
3771
|
const { workbook: d, worksheet: h } = c, m = d.getUnitId(), g = h.getSheetId(), f = n.get(Ut), p = n.get(Ye), C = a[0].range, S = a[0].primary, I = jn(C, h, !1);
|
|
3758
|
-
if (!
|
|
3772
|
+
if (!N.equals(C, I))
|
|
3759
3773
|
return f.emit(p.t("sheets.info.partOfCell")), !1;
|
|
3760
|
-
if (
|
|
3774
|
+
if (_u(s, h))
|
|
3761
3775
|
return f.emit(p.t("sheets.info.acrossMergedCell")), !1;
|
|
3762
3776
|
const w = {
|
|
3763
3777
|
...C,
|
|
@@ -3768,7 +3782,7 @@ const wr = "sheet.command.move-rows", Kn = {
|
|
|
3768
3782
|
subUnitId: g,
|
|
3769
3783
|
sourceRange: C,
|
|
3770
3784
|
targetRange: w
|
|
3771
|
-
}, b =
|
|
3785
|
+
}, b = vu(n, y), D = n.get(E), T = u.onCommandExecute({ id: Jn.id, params: e }), P = [
|
|
3772
3786
|
...(j = T.preRedos) != null ? j : [],
|
|
3773
3787
|
{ id: at.id, params: y }
|
|
3774
3788
|
], U = [
|
|
@@ -3823,7 +3837,7 @@ const qt = {
|
|
|
3823
3837
|
const { unitId: t, themeName: o } = e, s = n.get(M), r = k(s), i = n.get(Be);
|
|
3824
3838
|
return r ? (i.unregisterRangeThemeStyle(t, o), !0) : !1;
|
|
3825
3839
|
}
|
|
3826
|
-
},
|
|
3840
|
+
}, yu = {
|
|
3827
3841
|
id: "sheet.command.register-worksheet-range-theme-style",
|
|
3828
3842
|
type: v.COMMAND,
|
|
3829
3843
|
handler: (n, e) => {
|
|
@@ -3869,7 +3883,7 @@ const qt = {
|
|
|
3869
3883
|
redoMutations: a.filter(Boolean)
|
|
3870
3884
|
}), !0) : !1;
|
|
3871
3885
|
}
|
|
3872
|
-
},
|
|
3886
|
+
}, No = "sheet.command.remove-row", _r = {
|
|
3873
3887
|
type: v.COMMAND,
|
|
3874
3888
|
id: "sheet.command.remove-row-by-range",
|
|
3875
3889
|
handler: (n, e) => {
|
|
@@ -3892,7 +3906,7 @@ const qt = {
|
|
|
3892
3906
|
subUnitId: l,
|
|
3893
3907
|
cellValue: w.getMatrix()
|
|
3894
3908
|
}, b = i.onCommandExecute({
|
|
3895
|
-
id:
|
|
3909
|
+
id: No,
|
|
3896
3910
|
params: { range: f }
|
|
3897
3911
|
});
|
|
3898
3912
|
C.push(...(D = b.preRedos) != null ? D : []), C.push({ id: Ge.id, params: S }), C.push(...(T = b.redos) != null ? T : []), p.push(...(P = b.preUndos) != null ? P : []), p.push({ id: je.id, params: I }), p.push({ id: X.id, params: y }), p.push(...(U = b.undos) != null ? U : []), h.push(...C), d.unshift(...p);
|
|
@@ -3906,7 +3920,7 @@ const qt = {
|
|
|
3906
3920
|
}
|
|
3907
3921
|
}, Yn = {
|
|
3908
3922
|
type: v.COMMAND,
|
|
3909
|
-
id:
|
|
3923
|
+
id: No,
|
|
3910
3924
|
handler: async (n, e) => {
|
|
3911
3925
|
var h;
|
|
3912
3926
|
const t = n.get(H), o = n.get(F), s = n.get(E);
|
|
@@ -3928,7 +3942,7 @@ const qt = {
|
|
|
3928
3942
|
subUnitId: l
|
|
3929
3943
|
}) : !1;
|
|
3930
3944
|
}
|
|
3931
|
-
},
|
|
3945
|
+
}, Oo = "sheet.command.remove-col", yr = {
|
|
3932
3946
|
type: v.COMMAND,
|
|
3933
3947
|
id: "sheet.command.remove-col-by-range",
|
|
3934
3948
|
handler: (n, e) => {
|
|
@@ -3946,7 +3960,7 @@ const qt = {
|
|
|
3946
3960
|
subUnitId: l,
|
|
3947
3961
|
cellValue: h.getMatrix()
|
|
3948
3962
|
}, g = i.onCommandExecute({
|
|
3949
|
-
id:
|
|
3963
|
+
id: Oo,
|
|
3950
3964
|
params: { range: a }
|
|
3951
3965
|
}), f = n.get(E);
|
|
3952
3966
|
return z(
|
|
@@ -3974,7 +3988,7 @@ const qt = {
|
|
|
3974
3988
|
}
|
|
3975
3989
|
}, qn = {
|
|
3976
3990
|
type: v.COMMAND,
|
|
3977
|
-
id:
|
|
3991
|
+
id: Oo,
|
|
3978
3992
|
handler: async (n, e) => {
|
|
3979
3993
|
var h;
|
|
3980
3994
|
const t = n.get(H), o = n.get(F), s = n.get(E);
|
|
@@ -4009,7 +4023,7 @@ const qt = {
|
|
|
4009
4023
|
subUnitId: u,
|
|
4010
4024
|
unitId: a,
|
|
4011
4025
|
subUnitName: c.getName()
|
|
4012
|
-
}, h =
|
|
4026
|
+
}, h = Ya(
|
|
4013
4027
|
n,
|
|
4014
4028
|
d
|
|
4015
4029
|
), m = r.onCommandExecute({
|
|
@@ -4028,7 +4042,7 @@ const qt = {
|
|
|
4028
4042
|
return {
|
|
4029
4043
|
unitId: e.unitId,
|
|
4030
4044
|
subUnitId: e.subUnitId,
|
|
4031
|
-
ranges:
|
|
4045
|
+
ranges: O.deepClone(e.ranges)
|
|
4032
4046
|
};
|
|
4033
4047
|
}, ne = {
|
|
4034
4048
|
id: "sheet.mutation.add-worksheet-merge",
|
|
@@ -4055,7 +4069,7 @@ const qt = {
|
|
|
4055
4069
|
for (let l = 0; l < a.length; l++)
|
|
4056
4070
|
for (let c = i.length - 1; c >= 0; c--) {
|
|
4057
4071
|
const d = i[c], h = a[l];
|
|
4058
|
-
|
|
4072
|
+
N.intersects(d, h) && u.push(i[c]);
|
|
4059
4073
|
}
|
|
4060
4074
|
return {
|
|
4061
4075
|
unitId: e.unitId,
|
|
@@ -4075,11 +4089,11 @@ const qt = {
|
|
|
4075
4089
|
for (let u = 0; u < a.length; u++)
|
|
4076
4090
|
for (let l = i.length - 1; l >= 0; l--) {
|
|
4077
4091
|
const c = i[l], d = a[u];
|
|
4078
|
-
|
|
4092
|
+
N.intersects(c, d) && i.splice(l, 1);
|
|
4079
4093
|
}
|
|
4080
4094
|
return s.getSpanModel().rebuild(i), !0;
|
|
4081
4095
|
}
|
|
4082
|
-
},
|
|
4096
|
+
}, bu = {
|
|
4083
4097
|
type: v.COMMAND,
|
|
4084
4098
|
id: "sheet.command.remove-worksheet-merge",
|
|
4085
4099
|
// eslint-disable-next-line max-lines-per-function
|
|
@@ -4093,14 +4107,14 @@ const qt = {
|
|
|
4093
4107
|
unitId: l,
|
|
4094
4108
|
subUnitId: u,
|
|
4095
4109
|
ranges: i
|
|
4096
|
-
}, m = c.getConfig().mergeData.filter((j) => i.some((Z) =>
|
|
4110
|
+
}, m = c.getConfig().mergeData.filter((j) => i.some((Z) => N.intersects(Z, j)));
|
|
4097
4111
|
if (!m.length) return !1;
|
|
4098
4112
|
const g = we(
|
|
4099
4113
|
n,
|
|
4100
4114
|
d
|
|
4101
4115
|
), f = t.getCurrentSelections();
|
|
4102
4116
|
if (!(f != null && f.length)) return !1;
|
|
4103
|
-
const p =
|
|
4117
|
+
const p = O.deepClone(f), C = O.deepClone(f), S = C[C.length - 1], { startRow: I, startColumn: w } = S.range;
|
|
4104
4118
|
S.primary = {
|
|
4105
4119
|
startRow: I,
|
|
4106
4120
|
startColumn: w,
|
|
@@ -4111,7 +4125,7 @@ const qt = {
|
|
|
4111
4125
|
isMerged: !1,
|
|
4112
4126
|
isMergedMainCell: !1
|
|
4113
4127
|
};
|
|
4114
|
-
const y =
|
|
4128
|
+
const y = Eu(c, m), b = {
|
|
4115
4129
|
unitId: l,
|
|
4116
4130
|
subUnitId: u,
|
|
4117
4131
|
cellValue: y.redoParams.getMatrix()
|
|
@@ -4135,7 +4149,7 @@ const qt = {
|
|
|
4135
4149
|
}), !0) : !1;
|
|
4136
4150
|
}
|
|
4137
4151
|
};
|
|
4138
|
-
function
|
|
4152
|
+
function Eu(n, e) {
|
|
4139
4153
|
const t = new G(), o = new G();
|
|
4140
4154
|
return e.forEach((s) => {
|
|
4141
4155
|
const { startRow: r, startColumn: i, endColumn: a, endRow: u } = s, l = n.getCellMatrix().getValue(r, i);
|
|
@@ -4148,7 +4162,7 @@ function yu(n, e) {
|
|
|
4148
4162
|
undoParams: o
|
|
4149
4163
|
};
|
|
4150
4164
|
}
|
|
4151
|
-
const
|
|
4165
|
+
const Uu = (n) => {
|
|
4152
4166
|
const { order: e } = n, t = {};
|
|
4153
4167
|
return Object.keys(e).forEach((o) => {
|
|
4154
4168
|
t[e[Number(o)]] = Number(o);
|
|
@@ -4166,7 +4180,7 @@ const bu = (n) => {
|
|
|
4166
4180
|
const l = new G();
|
|
4167
4181
|
K.foreach(s, (d, h) => {
|
|
4168
4182
|
if (r.hasOwnProperty(d)) {
|
|
4169
|
-
const m = r[d], g =
|
|
4183
|
+
const m = r[d], g = O.deepClone(u.getCellRaw(m, h));
|
|
4170
4184
|
l.setValue(d, h, g);
|
|
4171
4185
|
}
|
|
4172
4186
|
});
|
|
@@ -4190,7 +4204,7 @@ const bu = (n) => {
|
|
|
4190
4204
|
}
|
|
4191
4205
|
}, u = {
|
|
4192
4206
|
id: vn.id,
|
|
4193
|
-
params:
|
|
4207
|
+
params: Uu(a.params)
|
|
4194
4208
|
}, l = n.get(F), c = l.onCommandExecute({ id: ho.id, params: e }), d = [
|
|
4195
4209
|
...(f = c.preRedos) != null ? f : [],
|
|
4196
4210
|
a,
|
|
@@ -4207,7 +4221,7 @@ const bu = (n) => {
|
|
|
4207
4221
|
}), !0) : !1;
|
|
4208
4222
|
}
|
|
4209
4223
|
};
|
|
4210
|
-
class
|
|
4224
|
+
class Ot {
|
|
4211
4225
|
constructor() {
|
|
4212
4226
|
R(this, "_borderInfo", {
|
|
4213
4227
|
type: le.ALL,
|
|
@@ -4254,7 +4268,7 @@ const Ao = (n, e, t, o) => {
|
|
|
4254
4268
|
let l = t;
|
|
4255
4269
|
if (u && (t.bc_tr || t.ml_tr || t.bl_tr || t.tl_mr || t.tl_bc || t.tl_br)) {
|
|
4256
4270
|
if (o) {
|
|
4257
|
-
const h =
|
|
4271
|
+
const h = O.deepClone(
|
|
4258
4272
|
(c = s.getValue(u.startRow, u.startColumn)) == null ? void 0 : c.s
|
|
4259
4273
|
);
|
|
4260
4274
|
l = h != null && h.bd ? Object.assign(h.bd, t) : t;
|
|
@@ -4266,13 +4280,13 @@ const Ao = (n, e, t, o) => {
|
|
|
4266
4280
|
});
|
|
4267
4281
|
} else {
|
|
4268
4282
|
if (o) {
|
|
4269
|
-
const h =
|
|
4283
|
+
const h = O.deepClone((d = s.getValue(i, a)) == null ? void 0 : d.s);
|
|
4270
4284
|
l = h != null && h.bd ? Object.assign(h.bd, t) : t;
|
|
4271
4285
|
}
|
|
4272
4286
|
s.setValue(i, a, { s: { bd: l } });
|
|
4273
4287
|
}
|
|
4274
4288
|
});
|
|
4275
|
-
},
|
|
4289
|
+
}, ku = (n) => {
|
|
4276
4290
|
const e = {
|
|
4277
4291
|
startRow: n.startRow - 1,
|
|
4278
4292
|
startColumn: n.startColumn,
|
|
@@ -4325,7 +4339,7 @@ const Ao = (n, e, t, o) => {
|
|
|
4325
4339
|
rightRange: u
|
|
4326
4340
|
};
|
|
4327
4341
|
};
|
|
4328
|
-
function
|
|
4342
|
+
function Tu(n, e, t) {
|
|
4329
4343
|
const { style: o, color: s, type: r } = n.getBorderInfo(), i = r === le.TOP || r === le.ALL || r === le.OUTSIDE, a = r === le.LEFT || r === le.ALL || r === le.OUTSIDE, u = r === le.BOTTOM || r === le.ALL || r === le.OUTSIDE, l = r === le.RIGHT || r === le.ALL || r === le.OUTSIDE, c = r === le.VERTICAL || r === le.ALL || r === le.INSIDE, d = r === le.HORIZONTAL || r === le.ALL || r === le.INSIDE, h = r.indexOf("tlbr") > -1, m = r.indexOf("tlbc") > -1, g = r.indexOf("tlmr") > -1, f = r.indexOf("bltr") > -1, p = r.indexOf("mltr") > -1, C = r.indexOf("bctr") > -1, S = t[0], {
|
|
4330
4344
|
topRangeOut: I,
|
|
4331
4345
|
leftRangeOut: w,
|
|
@@ -4335,7 +4349,7 @@ function Uu(n, e, t) {
|
|
|
4335
4349
|
leftRange: T,
|
|
4336
4350
|
bottomRange: P,
|
|
4337
4351
|
rightRange: U
|
|
4338
|
-
} =
|
|
4352
|
+
} = ku(S), x = new G(), { worksheet: j, unitId: Z, subUnitId: Q } = e;
|
|
4339
4353
|
return {
|
|
4340
4354
|
worksheet: j,
|
|
4341
4355
|
unitId: Z,
|
|
@@ -4373,7 +4387,7 @@ function Uu(n, e, t) {
|
|
|
4373
4387
|
}
|
|
4374
4388
|
};
|
|
4375
4389
|
}
|
|
4376
|
-
const
|
|
4390
|
+
const Pu = (n) => {
|
|
4377
4391
|
const { range: e, mr: t, borderStyle: o, vertical: s, horizontal: r, worksheet: i } = n;
|
|
4378
4392
|
s && Mn(e, (a, u) => {
|
|
4379
4393
|
var c, d, h;
|
|
@@ -4382,7 +4396,7 @@ const ku = (n) => {
|
|
|
4382
4396
|
const m = (c = t.getValue(l.startRow, l.startColumn)) == null ? void 0 : c.s;
|
|
4383
4397
|
l.startColumn !== e.startColumn && t.setValue(a, u, {
|
|
4384
4398
|
s: {
|
|
4385
|
-
bd: m != null && m.bd ? Object.assign(m.bd, { l:
|
|
4399
|
+
bd: m != null && m.bd ? Object.assign(m.bd, { l: O.deepClone(o) }) : { l: O.deepClone(o) }
|
|
4386
4400
|
}
|
|
4387
4401
|
});
|
|
4388
4402
|
} else {
|
|
@@ -4390,7 +4404,7 @@ const ku = (n) => {
|
|
|
4390
4404
|
const m = (d = t.getValue(a, u)) == null ? void 0 : d.s;
|
|
4391
4405
|
t.setValue(a, u, {
|
|
4392
4406
|
s: {
|
|
4393
|
-
bd: m != null && m.bd ? Object.assign(m.bd, { r:
|
|
4407
|
+
bd: m != null && m.bd ? Object.assign(m.bd, { r: O.deepClone(o) }) : { r: O.deepClone(o) }
|
|
4394
4408
|
}
|
|
4395
4409
|
});
|
|
4396
4410
|
}
|
|
@@ -4398,7 +4412,7 @@ const ku = (n) => {
|
|
|
4398
4412
|
const m = (h = t.getValue(a, u)) == null ? void 0 : h.s;
|
|
4399
4413
|
t.setValue(a, u, {
|
|
4400
4414
|
s: {
|
|
4401
|
-
bd: m != null && m.bd ? Object.assign(m.bd, { l:
|
|
4415
|
+
bd: m != null && m.bd ? Object.assign(m.bd, { l: O.deepClone(o) }) : { l: O.deepClone(o) }
|
|
4402
4416
|
}
|
|
4403
4417
|
});
|
|
4404
4418
|
}
|
|
@@ -4410,7 +4424,7 @@ const ku = (n) => {
|
|
|
4410
4424
|
const m = (c = t.getValue(l.startRow, l.startColumn)) == null ? void 0 : c.s;
|
|
4411
4425
|
l.startRow !== e.startRow && t.setValue(a, u, {
|
|
4412
4426
|
s: {
|
|
4413
|
-
bd: m != null && m.bd ? Object.assign(m.bd, { t:
|
|
4427
|
+
bd: m != null && m.bd ? Object.assign(m.bd, { t: O.deepClone(o) }) : { t: O.deepClone(o) }
|
|
4414
4428
|
}
|
|
4415
4429
|
});
|
|
4416
4430
|
} else {
|
|
@@ -4418,7 +4432,7 @@ const ku = (n) => {
|
|
|
4418
4432
|
const m = (d = t.getValue(a, u)) == null ? void 0 : d.s;
|
|
4419
4433
|
t.setValue(a, u, {
|
|
4420
4434
|
s: {
|
|
4421
|
-
bd: m != null && m.bd ? Object.assign(m.bd, { b:
|
|
4435
|
+
bd: m != null && m.bd ? Object.assign(m.bd, { b: O.deepClone(o) }) : { b: O.deepClone(o) }
|
|
4422
4436
|
}
|
|
4423
4437
|
});
|
|
4424
4438
|
}
|
|
@@ -4426,25 +4440,25 @@ const ku = (n) => {
|
|
|
4426
4440
|
const m = (h = t.getValue(a, u)) == null ? void 0 : h.s;
|
|
4427
4441
|
t.setValue(a, u, {
|
|
4428
4442
|
s: {
|
|
4429
|
-
bd: m != null && m.bd ? Object.assign(m.bd, { t:
|
|
4443
|
+
bd: m != null && m.bd ? Object.assign(m.bd, { t: O.deepClone(o) }) : { t: O.deepClone(o) }
|
|
4430
4444
|
}
|
|
4431
4445
|
});
|
|
4432
4446
|
}
|
|
4433
4447
|
}
|
|
4434
4448
|
});
|
|
4435
4449
|
};
|
|
4436
|
-
function
|
|
4450
|
+
function Nu(n) {
|
|
4437
4451
|
const { borderStyle: e, tl_br: t, tl_bc: o, tl_mr: s, bl_tr: r, ml_tr: i, bc_tr: a } = n, u = (l, c, d) => {
|
|
4438
4452
|
Ao(n, l, c, d);
|
|
4439
4453
|
};
|
|
4440
|
-
t && u(n.range, { tl_br:
|
|
4454
|
+
t && u(n.range, { tl_br: O.deepClone(e) }, !0), o && u(n.range, { tl_bc: O.deepClone(e) }, !0), s && u(n.range, { tl_mr: O.deepClone(e) }, !0), r && u(n.range, { bl_tr: O.deepClone(e) }, !0), i && u(n.range, { ml_tr: O.deepClone(e) }, !0), a && u(n.range, { bc_tr: O.deepClone(e) }, !0);
|
|
4441
4455
|
}
|
|
4442
|
-
const
|
|
4456
|
+
const Ou = (n) => {
|
|
4443
4457
|
const { top: e, left: t, right: o, bottom: s, borderStyle: r, bottomRange: i, topRange: a, leftRange: u, rightRange: l, bottomRangeOut: c, topRangeOut: d, leftRangeOut: h, rightRangeOut: m } = n, g = (f, p, C) => {
|
|
4444
4458
|
Ao(n, f, p, C);
|
|
4445
4459
|
};
|
|
4446
|
-
e && (g(d, { b: null }), g(a, { t:
|
|
4447
|
-
},
|
|
4460
|
+
e && (g(d, { b: null }), g(a, { t: O.deepClone(r) }, !0)), s && (g(c, { t: null }), g(i, { b: O.deepClone(r) }, !0)), t && (g(h, { r: null }), g(u, { l: O.deepClone(r) }, !0)), o && (g(m, { l: null }), g(l, { r: O.deepClone(r) }, !0));
|
|
4461
|
+
}, Du = (n) => {
|
|
4448
4462
|
const { range: e, worksheet: t, mr: o, top: s, bottom: r, left: i, right: a, vertical: u, horizontal: l, tl_br: c, tl_bc: d, tl_mr: h, bl_tr: m, ml_tr: g, bc_tr: f, topRange: p, bottomRange: C, leftRange: S, rightRange: I, topRangeOut: w, bottomRangeOut: y, leftRangeOut: b, rightRangeOut: D } = n, T = (P, U, x) => {
|
|
4449
4463
|
Ao(n, P, U, x);
|
|
4450
4464
|
};
|
|
@@ -4524,15 +4538,15 @@ const Pu = (n) => {
|
|
|
4524
4538
|
type: v.COMMAND,
|
|
4525
4539
|
handler: (n, e) => {
|
|
4526
4540
|
var C;
|
|
4527
|
-
const t = n.get(E), o = n.get(V), s = n.get(M), r = n.get(H), i = n.get(
|
|
4541
|
+
const t = n.get(E), o = n.get(V), s = n.get(M), r = n.get(H), i = n.get(Ot), a = k(s, e);
|
|
4528
4542
|
if (!a) return !1;
|
|
4529
4543
|
const u = (e == null ? void 0 : e.ranges) || ((C = r.getCurrentSelections()) == null ? void 0 : C.map((S) => S.range));
|
|
4530
4544
|
if (!(u != null && u.length))
|
|
4531
4545
|
return !1;
|
|
4532
4546
|
const { activeBorderType: l } = i.getBorderInfo();
|
|
4533
4547
|
if (!l) return !1;
|
|
4534
|
-
const c =
|
|
4535
|
-
|
|
4548
|
+
const c = Tu(i, a, u);
|
|
4549
|
+
Pu(c), Ou(c), Nu(c), Du(c);
|
|
4536
4550
|
const { unitId: d, subUnitId: h, mr: m } = c, g = {
|
|
4537
4551
|
unitId: d,
|
|
4538
4552
|
subUnitId: h,
|
|
@@ -4547,33 +4561,33 @@ const Pu = (n) => {
|
|
|
4547
4561
|
redoMutations: [{ id: X.id, params: g }]
|
|
4548
4562
|
}), !0) : !1;
|
|
4549
4563
|
}
|
|
4550
|
-
},
|
|
4564
|
+
}, Au = {
|
|
4551
4565
|
id: "sheet.command.set-border-position",
|
|
4552
4566
|
type: v.COMMAND,
|
|
4553
4567
|
handler: (n, e) => {
|
|
4554
4568
|
if (!e.value) return !1;
|
|
4555
4569
|
const t = n.get(E);
|
|
4556
|
-
return n.get(
|
|
4570
|
+
return n.get(Ot).setType(e.value), t.syncExecuteCommand(an.id);
|
|
4557
4571
|
}
|
|
4558
|
-
},
|
|
4572
|
+
}, xu = {
|
|
4559
4573
|
id: "sheet.command.set-border-style",
|
|
4560
4574
|
type: v.COMMAND,
|
|
4561
4575
|
handler: (n, e) => {
|
|
4562
4576
|
const t = n.get(E);
|
|
4563
|
-
return n.get(
|
|
4577
|
+
return n.get(Ot).setStyle(e.value), t.syncExecuteCommand(an.id);
|
|
4564
4578
|
}
|
|
4565
|
-
},
|
|
4579
|
+
}, Wu = {
|
|
4566
4580
|
id: "sheet.command.set-border-color",
|
|
4567
4581
|
type: v.COMMAND,
|
|
4568
4582
|
handler: (n, e) => {
|
|
4569
4583
|
const t = n.get(E);
|
|
4570
|
-
return n.get(
|
|
4584
|
+
return n.get(Ot).setColor(e.value), t.syncExecuteCommand(an.id);
|
|
4571
4585
|
}
|
|
4572
|
-
},
|
|
4586
|
+
}, $u = {
|
|
4573
4587
|
id: "sheet.command.set-border-basic",
|
|
4574
4588
|
type: v.COMMAND,
|
|
4575
4589
|
handler: (n, e) => {
|
|
4576
|
-
const { unitId: t, subUnitId: o, value: s, ranges: r } = e, { type: i, color: a, style: u } = s, l = n.get(E), c = n.get(
|
|
4590
|
+
const { unitId: t, subUnitId: o, value: s, ranges: r } = e, { type: i, color: a, style: u } = s, l = n.get(E), c = n.get(Ot);
|
|
4577
4591
|
return c.setType(i), a && c.setColor(a), c.setStyle(u), l.syncExecuteCommand(an.id, {
|
|
4578
4592
|
unitId: t,
|
|
4579
4593
|
subUnitId: o,
|
|
@@ -4581,29 +4595,29 @@ const Pu = (n) => {
|
|
|
4581
4595
|
});
|
|
4582
4596
|
}
|
|
4583
4597
|
};
|
|
4584
|
-
function
|
|
4598
|
+
function Vu(n, e) {
|
|
4585
4599
|
if (n == null)
|
|
4586
4600
|
return n;
|
|
4587
|
-
const t =
|
|
4601
|
+
const t = O.deepClone(n);
|
|
4588
4602
|
if (e == null)
|
|
4589
4603
|
return t;
|
|
4590
4604
|
const o = {};
|
|
4591
4605
|
return "h" in e && (o.h = t.h), "ia" in e && (o.ia = t.ia), "ah" in e && (o.ah = t.ah), "hd" in e && (o.hd = t.hd), "s" in e && (o.s = t.s), "custom" in e && (o.custom = t.custom), o;
|
|
4592
4606
|
}
|
|
4593
|
-
function
|
|
4607
|
+
function Lu(n, e) {
|
|
4594
4608
|
if (n == null)
|
|
4595
4609
|
return n;
|
|
4596
|
-
const t =
|
|
4610
|
+
const t = O.deepClone(n);
|
|
4597
4611
|
if (e == null)
|
|
4598
4612
|
return t;
|
|
4599
4613
|
const o = {};
|
|
4600
4614
|
return "w" in e && (o.w = t.w), "hd" in e && (o.hd = t.hd), "s" in e && (o.s = t.s), "custom" in e && (o.custom = t.custom), o;
|
|
4601
4615
|
}
|
|
4602
|
-
const
|
|
4616
|
+
const Hu = (n, e) => {
|
|
4603
4617
|
const { unitId: t, subUnitId: o, columnData: s } = n, r = {}, i = e.getColumnManager();
|
|
4604
4618
|
for (const a in s) {
|
|
4605
4619
|
const u = s[a], l = i.getColumn(Number(a));
|
|
4606
|
-
r[a] =
|
|
4620
|
+
r[a] = Lu(l, u);
|
|
4607
4621
|
}
|
|
4608
4622
|
return {
|
|
4609
4623
|
unitId: t,
|
|
@@ -4628,7 +4642,7 @@ const Vu = (n, e) => {
|
|
|
4628
4642
|
}
|
|
4629
4643
|
return !0;
|
|
4630
4644
|
}
|
|
4631
|
-
},
|
|
4645
|
+
}, Bu = {
|
|
4632
4646
|
type: v.COMMAND,
|
|
4633
4647
|
id: "sheet.command.set-col-data",
|
|
4634
4648
|
handler: (n, e) => {
|
|
@@ -4638,14 +4652,14 @@ const Vu = (n, e) => {
|
|
|
4638
4652
|
subUnitId: u,
|
|
4639
4653
|
unitId: a,
|
|
4640
4654
|
columnData: i
|
|
4641
|
-
}, d =
|
|
4655
|
+
}, d = Hu(c, l);
|
|
4642
4656
|
return t.syncExecuteCommand(Lt.id, c) ? (o.pushUndoRedo({
|
|
4643
4657
|
unitID: a,
|
|
4644
4658
|
undoMutations: [{ id: Lt.id, params: d }],
|
|
4645
4659
|
redoMutations: [{ id: Lt.id, params: c }]
|
|
4646
4660
|
}), !0) : !1;
|
|
4647
4661
|
}
|
|
4648
|
-
},
|
|
4662
|
+
}, Fu = (n, e) => {
|
|
4649
4663
|
if (n.get(M).getUniverSheetInstance(e.unitId) == null)
|
|
4650
4664
|
throw new Error("universheet is null error!");
|
|
4651
4665
|
return {
|
|
@@ -4670,7 +4684,7 @@ const Vu = (n, e) => {
|
|
|
4670
4684
|
}
|
|
4671
4685
|
return !0;
|
|
4672
4686
|
}
|
|
4673
|
-
},
|
|
4687
|
+
}, ju = (n, e) => {
|
|
4674
4688
|
if (n.get(M).getUniverSheetInstance(e.unitId) == null)
|
|
4675
4689
|
throw new Error("universheet is null error!");
|
|
4676
4690
|
return {
|
|
@@ -4711,7 +4725,7 @@ const Vu = (n, e) => {
|
|
|
4711
4725
|
subUnitId: o,
|
|
4712
4726
|
reveal: !0,
|
|
4713
4727
|
selections: s.map((I) => ({ range: I, primary: Se(I, l), style: null }))
|
|
4714
|
-
}, h =
|
|
4728
|
+
}, h = ju(n, c), m = {
|
|
4715
4729
|
unitId: t,
|
|
4716
4730
|
subUnitId: o,
|
|
4717
4731
|
selections: kr(s).map((I) => ({
|
|
@@ -4768,7 +4782,7 @@ const Vu = (n, e) => {
|
|
|
4768
4782
|
const a = k(s, e);
|
|
4769
4783
|
if (!a) return !1;
|
|
4770
4784
|
const { worksheet: u, unitId: l, subUnitId: c } = a;
|
|
4771
|
-
i =
|
|
4785
|
+
i = Gu(a.worksheet, i);
|
|
4772
4786
|
const d = { unitId: l, subUnitId: c, ranges: i }, h = {
|
|
4773
4787
|
unitId: l,
|
|
4774
4788
|
subUnitId: c,
|
|
@@ -4777,7 +4791,7 @@ const Vu = (n, e) => {
|
|
|
4777
4791
|
primary: Se(b, u),
|
|
4778
4792
|
style: null
|
|
4779
4793
|
}))
|
|
4780
|
-
}, m =
|
|
4794
|
+
}, m = Fu(n, d), g = {
|
|
4781
4795
|
unitId: l,
|
|
4782
4796
|
subUnitId: c,
|
|
4783
4797
|
reveal: !0,
|
|
@@ -4809,7 +4823,7 @@ const Vu = (n, e) => {
|
|
|
4809
4823
|
}), !0) : !1;
|
|
4810
4824
|
}
|
|
4811
4825
|
};
|
|
4812
|
-
function
|
|
4826
|
+
function Gu(n, e) {
|
|
4813
4827
|
const t = n.getRowCount() - 1, o = n.getHiddenCols(), s = [];
|
|
4814
4828
|
return e.forEach((r) => {
|
|
4815
4829
|
const i = o.filter((a) => a.startColumn >= r.startColumn && a.endColumn <= r.endColumn);
|
|
@@ -4823,7 +4837,7 @@ function Fu(n, e) {
|
|
|
4823
4837
|
}), s;
|
|
4824
4838
|
}
|
|
4825
4839
|
function kr(n) {
|
|
4826
|
-
return
|
|
4840
|
+
return zu(n).map((t) => {
|
|
4827
4841
|
const o = t.startColumn === 0 ? t.endColumn + 1 : t.startColumn - 1;
|
|
4828
4842
|
return {
|
|
4829
4843
|
...t,
|
|
@@ -4832,7 +4846,7 @@ function kr(n) {
|
|
|
4832
4846
|
};
|
|
4833
4847
|
});
|
|
4834
4848
|
}
|
|
4835
|
-
function
|
|
4849
|
+
function zu(n) {
|
|
4836
4850
|
const e = [];
|
|
4837
4851
|
let t;
|
|
4838
4852
|
return n.sort((o, s) => o.startColumn - s.startColumn).forEach((o) => {
|
|
@@ -4894,7 +4908,7 @@ const Tr = {
|
|
|
4894
4908
|
const r = s.getConfig(), { startRow: i, startColumn: a, ySplit: u, xSplit: l } = e;
|
|
4895
4909
|
return r.freeze = { startRow: i, startColumn: a, ySplit: u, xSplit: l }, !0;
|
|
4896
4910
|
}
|
|
4897
|
-
},
|
|
4911
|
+
}, Ku = {
|
|
4898
4912
|
type: v.COMMAND,
|
|
4899
4913
|
id: "sheet.command.set-frozen",
|
|
4900
4914
|
handler: (n, e) => {
|
|
@@ -4914,7 +4928,7 @@ const Tr = {
|
|
|
4914
4928
|
redoMutations: [{ id: ht.id, params: m }]
|
|
4915
4929
|
}), !0) : !1;
|
|
4916
4930
|
}
|
|
4917
|
-
},
|
|
4931
|
+
}, Ju = {
|
|
4918
4932
|
type: v.COMMAND,
|
|
4919
4933
|
id: "sheet.command.cancel-frozen",
|
|
4920
4934
|
handler: (n, e) => {
|
|
@@ -4943,7 +4957,7 @@ const Tr = {
|
|
|
4943
4957
|
const { worksheet: o } = t, s = o.getConfig();
|
|
4944
4958
|
return s.gridlinesColor = e.color, !0;
|
|
4945
4959
|
}
|
|
4946
|
-
},
|
|
4960
|
+
}, Yu = {
|
|
4947
4961
|
type: v.COMMAND,
|
|
4948
4962
|
id: "sheet.command.set-gridlines-color",
|
|
4949
4963
|
handler: (n, e) => {
|
|
@@ -4973,7 +4987,7 @@ const Tr = {
|
|
|
4973
4987
|
const { unitId: t, subUnitId: o, rule: s, ruleId: r } = e;
|
|
4974
4988
|
return n.get(me).setRule(t, o, r, s), !0;
|
|
4975
4989
|
}
|
|
4976
|
-
},
|
|
4990
|
+
}, Gd = (n, e) => {
|
|
4977
4991
|
const { unitId: t, subUnitId: o, ruleId: s } = e, i = n.get(me).getRule(t, o, s);
|
|
4978
4992
|
return i ? {
|
|
4979
4993
|
id: ge.id,
|
|
@@ -4989,7 +5003,7 @@ const Tr = {
|
|
|
4989
5003
|
const { unitId: t, subUnitId: o, rule: s } = e;
|
|
4990
5004
|
return n.get(Xe).setRule(t, o, s), !0;
|
|
4991
5005
|
}
|
|
4992
|
-
},
|
|
5006
|
+
}, qu = {
|
|
4993
5007
|
type: v.COMMAND,
|
|
4994
5008
|
id: "sheet.command.set-protection",
|
|
4995
5009
|
async handler(n, e) {
|
|
@@ -5002,11 +5016,11 @@ const Tr = {
|
|
|
5002
5016
|
redoMutations: l
|
|
5003
5017
|
}), !0;
|
|
5004
5018
|
}
|
|
5005
|
-
},
|
|
5019
|
+
}, Xu = (n, e) => {
|
|
5006
5020
|
const { unitId: t, subUnitId: o, rowData: s } = n, r = {}, i = e.getRowManager();
|
|
5007
5021
|
for (const a in s) {
|
|
5008
5022
|
const u = s[a], l = i.getRow(Number(a));
|
|
5009
|
-
r[a] =
|
|
5023
|
+
r[a] = Vu(l, u);
|
|
5010
5024
|
}
|
|
5011
5025
|
return {
|
|
5012
5026
|
unitId: t,
|
|
@@ -5031,7 +5045,7 @@ const Tr = {
|
|
|
5031
5045
|
}
|
|
5032
5046
|
return !0;
|
|
5033
5047
|
}
|
|
5034
|
-
},
|
|
5048
|
+
}, Zu = {
|
|
5035
5049
|
type: v.COMMAND,
|
|
5036
5050
|
id: "sheet.command.set-row-data",
|
|
5037
5051
|
handler: (n, e) => {
|
|
@@ -5041,14 +5055,14 @@ const Tr = {
|
|
|
5041
5055
|
subUnitId: u,
|
|
5042
5056
|
unitId: a,
|
|
5043
5057
|
rowData: i
|
|
5044
|
-
}, d =
|
|
5058
|
+
}, d = Xu(c, l);
|
|
5045
5059
|
return t.syncExecuteCommand(Bt.id, c) ? (o.pushUndoRedo({
|
|
5046
5060
|
unitID: a,
|
|
5047
5061
|
undoMutations: [{ id: Bt.id, params: d }],
|
|
5048
5062
|
redoMutations: [{ id: Bt.id, params: c }]
|
|
5049
5063
|
}), !0) : !1;
|
|
5050
5064
|
}
|
|
5051
|
-
},
|
|
5065
|
+
}, Qu = (n, e) => {
|
|
5052
5066
|
if (n.get(M).getUniverSheetInstance(e.unitId) == null)
|
|
5053
5067
|
throw new Error("universheet is null error!");
|
|
5054
5068
|
return {
|
|
@@ -5073,7 +5087,7 @@ const Tr = {
|
|
|
5073
5087
|
}
|
|
5074
5088
|
return !0;
|
|
5075
5089
|
}
|
|
5076
|
-
},
|
|
5090
|
+
}, el = (n, e) => {
|
|
5077
5091
|
if (n.get(M).getUniverSheetInstance(e.unitId) == null)
|
|
5078
5092
|
throw new Error("universheet is null error!");
|
|
5079
5093
|
return {
|
|
@@ -5114,7 +5128,7 @@ const Tr = {
|
|
|
5114
5128
|
primary: Se(w, l),
|
|
5115
5129
|
style: null
|
|
5116
5130
|
}))
|
|
5117
|
-
}, h =
|
|
5131
|
+
}, h = Qu(n, c), m = {
|
|
5118
5132
|
unitId: t,
|
|
5119
5133
|
subUnitId: o,
|
|
5120
5134
|
selections: Dr(s).map((w) => ({
|
|
@@ -5148,7 +5162,7 @@ const Tr = {
|
|
|
5148
5162
|
]
|
|
5149
5163
|
}), !0;
|
|
5150
5164
|
}
|
|
5151
|
-
},
|
|
5165
|
+
}, Nr = {
|
|
5152
5166
|
type: v.COMMAND,
|
|
5153
5167
|
id: "sheet.command.set-selected-rows-visible",
|
|
5154
5168
|
handler: async (n) => {
|
|
@@ -5164,7 +5178,7 @@ const Tr = {
|
|
|
5164
5178
|
ranges: l
|
|
5165
5179
|
});
|
|
5166
5180
|
}
|
|
5167
|
-
},
|
|
5181
|
+
}, Or = {
|
|
5168
5182
|
type: v.COMMAND,
|
|
5169
5183
|
id: "sheet.command.set-rows-hidden",
|
|
5170
5184
|
handler: (n, e) => {
|
|
@@ -5174,7 +5188,7 @@ const Tr = {
|
|
|
5174
5188
|
if (!(a != null && a.length)) return !1;
|
|
5175
5189
|
const u = k(r, e);
|
|
5176
5190
|
if (!u) return !1;
|
|
5177
|
-
a =
|
|
5191
|
+
a = tl(u.worksheet, a);
|
|
5178
5192
|
const { unitId: l, subUnitId: c, worksheet: d } = u, h = { unitId: l, subUnitId: c, ranges: a }, m = {
|
|
5179
5193
|
unitId: l,
|
|
5180
5194
|
subUnitId: c,
|
|
@@ -5183,7 +5197,7 @@ const Tr = {
|
|
|
5183
5197
|
primary: Se(T, d),
|
|
5184
5198
|
style: null
|
|
5185
5199
|
}))
|
|
5186
|
-
}, g =
|
|
5200
|
+
}, g = el(n, h), f = {
|
|
5187
5201
|
unitId: l,
|
|
5188
5202
|
subUnitId: c,
|
|
5189
5203
|
reveal: !0,
|
|
@@ -5192,7 +5206,7 @@ const Tr = {
|
|
|
5192
5206
|
primary: Se(T, d),
|
|
5193
5207
|
style: null
|
|
5194
5208
|
}))
|
|
5195
|
-
}, p = i.onCommandExecute({ id:
|
|
5209
|
+
}, p = i.onCommandExecute({ id: Or.id, params: h });
|
|
5196
5210
|
return z([
|
|
5197
5211
|
...(w = p.preRedos) != null ? w : [],
|
|
5198
5212
|
{ id: en.id, params: h },
|
|
@@ -5215,7 +5229,7 @@ const Tr = {
|
|
|
5215
5229
|
}), !0;
|
|
5216
5230
|
}
|
|
5217
5231
|
};
|
|
5218
|
-
function
|
|
5232
|
+
function tl(n, e) {
|
|
5219
5233
|
const t = n.getMaxColumns() - 1, o = n.getHiddenRows(), s = [];
|
|
5220
5234
|
return e.forEach((r) => {
|
|
5221
5235
|
const i = o.filter((a) => a.startRow >= r.startRow && a.endRow <= r.endRow);
|
|
@@ -5229,7 +5243,7 @@ function Qu(n, e) {
|
|
|
5229
5243
|
}), s;
|
|
5230
5244
|
}
|
|
5231
5245
|
function Dr(n) {
|
|
5232
|
-
return
|
|
5246
|
+
return nl(n).map((t) => {
|
|
5233
5247
|
const o = t.startRow === 0 ? t.endRow + 1 : t.startRow - 1;
|
|
5234
5248
|
return {
|
|
5235
5249
|
...t,
|
|
@@ -5238,7 +5252,7 @@ function Dr(n) {
|
|
|
5238
5252
|
};
|
|
5239
5253
|
});
|
|
5240
5254
|
}
|
|
5241
|
-
function
|
|
5255
|
+
function nl(n) {
|
|
5242
5256
|
const e = [];
|
|
5243
5257
|
let t;
|
|
5244
5258
|
return n.sort((o, s) => o.startRow - s.startRow).forEach((o) => {
|
|
@@ -5259,8 +5273,8 @@ const Re = {
|
|
|
5259
5273
|
const { unitId: s, subUnitId: r, worksheet: i } = o, { range: a, style: u } = e, l = n.get(E), c = n.get(V), d = n.get(H), h = a ? [a] : (y = d.getCurrentSelections()) == null ? void 0 : y.map((b) => b.range);
|
|
5260
5274
|
if (!(h != null && h.length))
|
|
5261
5275
|
return !1;
|
|
5262
|
-
const m = new G(), g =
|
|
5263
|
-
if (
|
|
5276
|
+
const m = new G(), g = Xa(i);
|
|
5277
|
+
if (O.isArray(u.value))
|
|
5264
5278
|
for (let b = 0; b < h.length; b++)
|
|
5265
5279
|
g.forOperableEach(h[b], (D, T, P) => {
|
|
5266
5280
|
m.setValue(D, T, {
|
|
@@ -5298,7 +5312,7 @@ const Re = {
|
|
|
5298
5312
|
redoMutations: [{ id: X.id, params: f }, ...I]
|
|
5299
5313
|
}), !0) : !1;
|
|
5300
5314
|
}
|
|
5301
|
-
},
|
|
5315
|
+
}, zd = {
|
|
5302
5316
|
type: v.COMMAND,
|
|
5303
5317
|
id: "sheet.command.set-bold",
|
|
5304
5318
|
handler: (n) => {
|
|
@@ -5314,7 +5328,7 @@ const Re = {
|
|
|
5314
5328
|
};
|
|
5315
5329
|
return n.get(E).syncExecuteCommand(Re.id, a);
|
|
5316
5330
|
}
|
|
5317
|
-
},
|
|
5331
|
+
}, Kd = {
|
|
5318
5332
|
type: v.COMMAND,
|
|
5319
5333
|
id: "sheet.command.set-italic",
|
|
5320
5334
|
handler: (n) => {
|
|
@@ -5336,7 +5350,7 @@ const Re = {
|
|
|
5336
5350
|
};
|
|
5337
5351
|
return n.get(E).syncExecuteCommand(Re.id, r);
|
|
5338
5352
|
}
|
|
5339
|
-
},
|
|
5353
|
+
}, Jd = {
|
|
5340
5354
|
type: v.COMMAND,
|
|
5341
5355
|
id: "sheet.command.set-underline",
|
|
5342
5356
|
handler: (n) => {
|
|
@@ -5357,7 +5371,7 @@ const Re = {
|
|
|
5357
5371
|
};
|
|
5358
5372
|
return n.get(E).syncExecuteCommand(Re.id, r);
|
|
5359
5373
|
}
|
|
5360
|
-
},
|
|
5374
|
+
}, Yd = {
|
|
5361
5375
|
type: v.COMMAND,
|
|
5362
5376
|
id: "sheet.command.set-stroke",
|
|
5363
5377
|
handler: (n) => {
|
|
@@ -5376,7 +5390,7 @@ const Re = {
|
|
|
5376
5390
|
};
|
|
5377
5391
|
return n.get(E).syncExecuteCommand(Re.id, r);
|
|
5378
5392
|
}
|
|
5379
|
-
},
|
|
5393
|
+
}, qd = {
|
|
5380
5394
|
type: v.COMMAND,
|
|
5381
5395
|
id: "sheet.command.set-overline",
|
|
5382
5396
|
handler: (n) => {
|
|
@@ -5397,7 +5411,7 @@ const Re = {
|
|
|
5397
5411
|
};
|
|
5398
5412
|
return n.get(E).syncExecuteCommand(Re.id, r);
|
|
5399
5413
|
}
|
|
5400
|
-
},
|
|
5414
|
+
}, Xd = {
|
|
5401
5415
|
type: v.COMMAND,
|
|
5402
5416
|
id: "sheet.command.set-font-family",
|
|
5403
5417
|
handler: (n, e) => {
|
|
@@ -5411,7 +5425,7 @@ const Re = {
|
|
|
5411
5425
|
};
|
|
5412
5426
|
return t.syncExecuteCommand(Re.id, o);
|
|
5413
5427
|
}
|
|
5414
|
-
},
|
|
5428
|
+
}, Zd = {
|
|
5415
5429
|
type: v.COMMAND,
|
|
5416
5430
|
id: "sheet.command.set-font-size",
|
|
5417
5431
|
handler: (n, e) => {
|
|
@@ -5425,7 +5439,7 @@ const Re = {
|
|
|
5425
5439
|
};
|
|
5426
5440
|
return t.syncExecuteCommand(Re.id, o);
|
|
5427
5441
|
}
|
|
5428
|
-
},
|
|
5442
|
+
}, ol = {
|
|
5429
5443
|
type: v.COMMAND,
|
|
5430
5444
|
id: "sheet.command.set-text-color",
|
|
5431
5445
|
handler: (n, e) => {
|
|
@@ -5441,7 +5455,7 @@ const Re = {
|
|
|
5441
5455
|
};
|
|
5442
5456
|
return t.syncExecuteCommand(Re.id, o);
|
|
5443
5457
|
}
|
|
5444
|
-
},
|
|
5458
|
+
}, sl = {
|
|
5445
5459
|
type: v.COMMAND,
|
|
5446
5460
|
id: "sheet.command.reset-text-color",
|
|
5447
5461
|
handler: (n) => {
|
|
@@ -5456,7 +5470,7 @@ const Re = {
|
|
|
5456
5470
|
};
|
|
5457
5471
|
return e.syncExecuteCommand(Re.id, t);
|
|
5458
5472
|
}
|
|
5459
|
-
},
|
|
5473
|
+
}, rl = {
|
|
5460
5474
|
type: v.COMMAND,
|
|
5461
5475
|
id: "sheet.command.set-background-color",
|
|
5462
5476
|
handler: (n, e) => {
|
|
@@ -5472,7 +5486,7 @@ const Re = {
|
|
|
5472
5486
|
};
|
|
5473
5487
|
return t.syncExecuteCommand(Re.id, o);
|
|
5474
5488
|
}
|
|
5475
|
-
},
|
|
5489
|
+
}, il = {
|
|
5476
5490
|
type: v.COMMAND,
|
|
5477
5491
|
id: "sheet.command.reset-background-color",
|
|
5478
5492
|
handler: (n) => {
|
|
@@ -5487,7 +5501,7 @@ const Re = {
|
|
|
5487
5501
|
};
|
|
5488
5502
|
return e.syncExecuteCommand(Re.id, t);
|
|
5489
5503
|
}
|
|
5490
|
-
},
|
|
5504
|
+
}, al = {
|
|
5491
5505
|
type: v.COMMAND,
|
|
5492
5506
|
id: "sheet.command.set-vertical-text-align",
|
|
5493
5507
|
handler: (n, e) => {
|
|
@@ -5504,7 +5518,7 @@ const Re = {
|
|
|
5504
5518
|
};
|
|
5505
5519
|
return t.syncExecuteCommand(Re.id, o);
|
|
5506
5520
|
}
|
|
5507
|
-
},
|
|
5521
|
+
}, ul = {
|
|
5508
5522
|
type: v.COMMAND,
|
|
5509
5523
|
id: "sheet.command.set-horizontal-text-align",
|
|
5510
5524
|
handler: (n, e) => {
|
|
@@ -5521,7 +5535,7 @@ const Re = {
|
|
|
5521
5535
|
};
|
|
5522
5536
|
return t.syncExecuteCommand(Re.id, o);
|
|
5523
5537
|
}
|
|
5524
|
-
},
|
|
5538
|
+
}, ll = {
|
|
5525
5539
|
type: v.COMMAND,
|
|
5526
5540
|
id: "sheet.command.set-text-wrap",
|
|
5527
5541
|
handler: (n, e) => {
|
|
@@ -5538,7 +5552,7 @@ const Re = {
|
|
|
5538
5552
|
};
|
|
5539
5553
|
return t.syncExecuteCommand(Re.id, o);
|
|
5540
5554
|
}
|
|
5541
|
-
},
|
|
5555
|
+
}, cl = {
|
|
5542
5556
|
type: v.COMMAND,
|
|
5543
5557
|
id: "sheet.command.set-text-rotation",
|
|
5544
5558
|
handler: (n, e) => {
|
|
@@ -5555,10 +5569,10 @@ const Re = {
|
|
|
5555
5569
|
};
|
|
5556
5570
|
return o.syncExecuteCommand(Re.id, s);
|
|
5557
5571
|
}
|
|
5558
|
-
},
|
|
5572
|
+
}, dl = (n, e) => {
|
|
5559
5573
|
const r = n.get(M).getUniverSheetInstance(e.unitId).getSheetBySheetId(e.subUnitId).getConfig().tabColor;
|
|
5560
5574
|
return {
|
|
5561
|
-
...
|
|
5575
|
+
...O.deepClone(e),
|
|
5562
5576
|
color: r
|
|
5563
5577
|
};
|
|
5564
5578
|
}, Rn = {
|
|
@@ -5570,7 +5584,7 @@ const Re = {
|
|
|
5570
5584
|
const o = t.getSheetBySheetId(e.subUnitId);
|
|
5571
5585
|
return o ? (o.getConfig().tabColor = e.color, !0) : !1;
|
|
5572
5586
|
}
|
|
5573
|
-
},
|
|
5587
|
+
}, hl = {
|
|
5574
5588
|
type: v.COMMAND,
|
|
5575
5589
|
id: "sheet.command.set-tab-color",
|
|
5576
5590
|
handler: (n, e) => {
|
|
@@ -5580,7 +5594,7 @@ const Re = {
|
|
|
5580
5594
|
color: e.value,
|
|
5581
5595
|
unitId: r,
|
|
5582
5596
|
subUnitId: i
|
|
5583
|
-
}, u =
|
|
5597
|
+
}, u = dl(n, a);
|
|
5584
5598
|
return t.syncExecuteCommand(Rn.id, a) ? (o.pushUndoRedo({
|
|
5585
5599
|
unitID: r,
|
|
5586
5600
|
undoMutations: [{ id: Rn.id, params: u }],
|
|
@@ -5625,7 +5639,7 @@ const Re = {
|
|
|
5625
5639
|
return t.setActiveSheet(s), !0;
|
|
5626
5640
|
return !1;
|
|
5627
5641
|
}
|
|
5628
|
-
},
|
|
5642
|
+
}, ml = 4, Wr = {
|
|
5629
5643
|
type: v.COMMAND,
|
|
5630
5644
|
id: "sheet.command.set-worksheet-activate",
|
|
5631
5645
|
handler: (n, e, t) => {
|
|
@@ -5639,7 +5653,7 @@ const Re = {
|
|
|
5639
5653
|
subUnitId: i
|
|
5640
5654
|
}, t);
|
|
5641
5655
|
a(u);
|
|
5642
|
-
},
|
|
5656
|
+
}, ml);
|
|
5643
5657
|
});
|
|
5644
5658
|
}
|
|
5645
5659
|
}, $r = (n, e) => {
|
|
@@ -5703,7 +5717,7 @@ const Re = {
|
|
|
5703
5717
|
} else p === L.COLUMN ? C = {
|
|
5704
5718
|
subUnitId: l,
|
|
5705
5719
|
unitId: u,
|
|
5706
|
-
ranges: f.map((D) =>
|
|
5720
|
+
ranges: f.map((D) => N.clone(D.range)),
|
|
5707
5721
|
colWidth: m
|
|
5708
5722
|
} : C = {
|
|
5709
5723
|
subUnitId: l,
|
|
@@ -5772,7 +5786,7 @@ const Ft = {
|
|
|
5772
5786
|
const { worksheet: r } = s;
|
|
5773
5787
|
return r ? (r.setDefaultCellStyle(t), !0) : !1;
|
|
5774
5788
|
}
|
|
5775
|
-
},
|
|
5789
|
+
}, gl = (n, e) => {
|
|
5776
5790
|
const t = kt(n.get(M), e);
|
|
5777
5791
|
if (!t)
|
|
5778
5792
|
throw new Error("[SetWorksheetDefaultStyleMutationFactory]: worksheet is null error!");
|
|
@@ -5782,11 +5796,11 @@ const Ft = {
|
|
|
5782
5796
|
subUnitId: o.getSheetId(),
|
|
5783
5797
|
defaultStyle: o.getDefaultCellStyle()
|
|
5784
5798
|
};
|
|
5785
|
-
},
|
|
5799
|
+
}, fl = {
|
|
5786
5800
|
type: v.COMMAND,
|
|
5787
5801
|
id: "sheet.command.set-worksheet-default-style",
|
|
5788
5802
|
handler: (n, e) => {
|
|
5789
|
-
const t = n.get(E), o = n.get(V), { unitId: s } = e, r =
|
|
5803
|
+
const t = n.get(E), o = n.get(V), { unitId: s } = e, r = gl(n, e);
|
|
5790
5804
|
return t.syncExecuteCommand(Ft.id, e) ? (o.pushUndoRedo({
|
|
5791
5805
|
unitID: s,
|
|
5792
5806
|
undoMutations: [{ id: Ft.id, params: r }],
|
|
@@ -5813,7 +5827,7 @@ const Ft = {
|
|
|
5813
5827
|
const o = t.getSheetBySheetId(e.subUnitId);
|
|
5814
5828
|
return o ? (o.getConfig().hidden = e.hidden, !0) : !1;
|
|
5815
5829
|
}
|
|
5816
|
-
},
|
|
5830
|
+
}, Rl = {
|
|
5817
5831
|
type: v.COMMAND,
|
|
5818
5832
|
id: "sheet.command.set-worksheet-hidden",
|
|
5819
5833
|
handler: (n, e) => {
|
|
@@ -5832,7 +5846,7 @@ const Ft = {
|
|
|
5832
5846
|
redoMutations: [{ id: mt.id, params: h }]
|
|
5833
5847
|
}), !0) : !1;
|
|
5834
5848
|
}
|
|
5835
|
-
},
|
|
5849
|
+
}, pl = (n, e) => {
|
|
5836
5850
|
const t = kt(n.get(M), e);
|
|
5837
5851
|
if (!t)
|
|
5838
5852
|
throw new Error("[SetWorksheetNameMutationFactory]: worksheet is null error!");
|
|
@@ -5863,7 +5877,7 @@ const Ft = {
|
|
|
5863
5877
|
subUnitId: a,
|
|
5864
5878
|
name: e.name,
|
|
5865
5879
|
unitId: i
|
|
5866
|
-
}, l =
|
|
5880
|
+
}, l = pl(
|
|
5867
5881
|
n,
|
|
5868
5882
|
u
|
|
5869
5883
|
), c = s.onCommandExecute({
|
|
@@ -5884,8 +5898,8 @@ const Ft = {
|
|
|
5884
5898
|
redoMutations: d
|
|
5885
5899
|
}), !0) : !1;
|
|
5886
5900
|
}
|
|
5887
|
-
},
|
|
5888
|
-
...
|
|
5901
|
+
}, Cl = (n, e) => ({
|
|
5902
|
+
...O.deepClone(e),
|
|
5889
5903
|
toOrder: e.fromOrder,
|
|
5890
5904
|
fromOrder: e.toOrder
|
|
5891
5905
|
}), pn = {
|
|
@@ -5908,7 +5922,7 @@ const Ft = {
|
|
|
5908
5922
|
toOrder: e.order,
|
|
5909
5923
|
unitId: i,
|
|
5910
5924
|
subUnitId: a
|
|
5911
|
-
}, c =
|
|
5925
|
+
}, c = Cl(n, l);
|
|
5912
5926
|
return t.syncExecuteCommand(pn.id, l) ? (o.pushUndoRedo({
|
|
5913
5927
|
unitID: i,
|
|
5914
5928
|
undoMutations: [{ id: pn.id, params: c }],
|
|
@@ -5997,7 +6011,7 @@ class Br {
|
|
|
5997
6011
|
this.unitId = e, this.subUnitId = t, this.permissionId = o, this.id = `${A.SelectRange}.${_.ManageCollaborator}.${o}`;
|
|
5998
6012
|
}
|
|
5999
6013
|
}
|
|
6000
|
-
const ve = () => [yo,
|
|
6014
|
+
const ve = () => [yo, Ne, Br, Hr], ct = [_.Edit, _.View, _.ManageCollaborator, _.Delete], Qd = (n = "unitId", e = "subUnitId", t = "permissionId") => ve().reduce((o, s) => {
|
|
6001
6015
|
const r = new s(n, e, t);
|
|
6002
6016
|
return o[r.subType] = r.value, o;
|
|
6003
6017
|
}, {}), tn = () => [
|
|
@@ -6015,11 +6029,11 @@ const ve = () => [yo, Oe, Br, Hr], ct = [_.Edit, _.View, _.ManageCollaborator, _
|
|
|
6015
6029
|
zs,
|
|
6016
6030
|
qs,
|
|
6017
6031
|
Uo,
|
|
6018
|
-
|
|
6032
|
+
ru,
|
|
6019
6033
|
Zs,
|
|
6020
6034
|
Ys,
|
|
6021
6035
|
Fs
|
|
6022
|
-
],
|
|
6036
|
+
], Sl = [
|
|
6023
6037
|
_.Edit,
|
|
6024
6038
|
_.Print,
|
|
6025
6039
|
_.Comment,
|
|
@@ -6039,7 +6053,7 @@ const ve = () => [yo, Oe, Br, Hr], ct = [_.Edit, _.View, _.ManageCollaborator, _
|
|
|
6039
6053
|
_.ViewHistory,
|
|
6040
6054
|
_.CreatePermissionObject
|
|
6041
6055
|
], Ie = () => [
|
|
6042
|
-
|
|
6056
|
+
Oe,
|
|
6043
6057
|
Gn,
|
|
6044
6058
|
ur,
|
|
6045
6059
|
tr
|
|
@@ -6074,12 +6088,12 @@ const ve = () => [yo, Oe, Br, Hr], ct = [_.Edit, _.View, _.ManageCollaborator, _
|
|
|
6074
6088
|
_.SetRowStyle,
|
|
6075
6089
|
_.Sort
|
|
6076
6090
|
];
|
|
6077
|
-
var
|
|
6078
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
6091
|
+
var wl = Object.getOwnPropertyDescriptor, Il = (n, e, t, o) => {
|
|
6092
|
+
for (var s = o > 1 ? void 0 : o ? wl(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
6079
6093
|
(i = n[r]) && (s = i(s) || s);
|
|
6080
6094
|
return s;
|
|
6081
6095
|
}, tt = (n, e) => (t, o) => e(t, o, n);
|
|
6082
|
-
const
|
|
6096
|
+
const vl = "SHEET_WORKSHEET_PROTECTION_PLUGIN", Ml = "SHEET_WORKSHEET_PROTECTION_POINT_PLUGIN";
|
|
6083
6097
|
let bn = class extends _s {
|
|
6084
6098
|
constructor(n, e, t, o, s, r, i, a) {
|
|
6085
6099
|
super(), this._permissionService = n, this._univerInstanceService = e, this._injector = t, this._worksheetProtectionRuleModel = o, this._worksheetProtectionPointRuleModel = s, this._resourceManagerService = r, this._rangeProtectionRuleModel = i, this._logService = a, this._init(), this._initRuleChange(), this._initRuleSnapshot(), this._initPointSnapshot();
|
|
@@ -6163,7 +6177,7 @@ let bn = class extends _s {
|
|
|
6163
6177
|
this._resourceManagerService.registerPluginResource({
|
|
6164
6178
|
toJson: n,
|
|
6165
6179
|
parseJson: e,
|
|
6166
|
-
pluginName:
|
|
6180
|
+
pluginName: vl,
|
|
6167
6181
|
businesses: [wn.UNIVER_SHEET],
|
|
6168
6182
|
onLoad: (t, o) => {
|
|
6169
6183
|
this._worksheetProtectionRuleModel.fromObject(o), Object.keys(o).forEach((s) => {
|
|
@@ -6206,7 +6220,7 @@ let bn = class extends _s {
|
|
|
6206
6220
|
this._resourceManagerService.registerPluginResource({
|
|
6207
6221
|
toJson: n,
|
|
6208
6222
|
parseJson: e,
|
|
6209
|
-
pluginName:
|
|
6223
|
+
pluginName: Ml,
|
|
6210
6224
|
businesses: [wn.UNIVER_SHEET],
|
|
6211
6225
|
onLoad: (t, o) => {
|
|
6212
6226
|
this._worksheetProtectionPointRuleModel.fromObject(o), Object.keys(o).forEach((s) => {
|
|
@@ -6223,7 +6237,7 @@ let bn = class extends _s {
|
|
|
6223
6237
|
);
|
|
6224
6238
|
}
|
|
6225
6239
|
};
|
|
6226
|
-
bn =
|
|
6240
|
+
bn = Il([
|
|
6227
6241
|
tt(0, $(Fe)),
|
|
6228
6242
|
tt(1, $(M)),
|
|
6229
6243
|
tt(2, $(Hn)),
|
|
@@ -6240,7 +6254,7 @@ const $o = {
|
|
|
6240
6254
|
const { rule: t } = e;
|
|
6241
6255
|
return n.get(ln).addRule(t), !0;
|
|
6242
6256
|
}
|
|
6243
|
-
},
|
|
6257
|
+
}, _l = {
|
|
6244
6258
|
type: v.COMMAND,
|
|
6245
6259
|
id: "sheet.command.set-worksheet-permission-points",
|
|
6246
6260
|
async handler(n, e) {
|
|
@@ -6253,7 +6267,7 @@ const $o = {
|
|
|
6253
6267
|
subUnitId: o.subUnitId
|
|
6254
6268
|
}), !0;
|
|
6255
6269
|
}
|
|
6256
|
-
},
|
|
6270
|
+
}, yl = {
|
|
6257
6271
|
type: v.COMMAND,
|
|
6258
6272
|
id: "sheet.command.set-worksheet-protection",
|
|
6259
6273
|
async handler(n, e) {
|
|
@@ -6274,7 +6288,7 @@ const $o = {
|
|
|
6274
6288
|
}
|
|
6275
6289
|
return !0;
|
|
6276
6290
|
}
|
|
6277
|
-
},
|
|
6291
|
+
}, bl = 2e3, Fr = (n, e) => {
|
|
6278
6292
|
const { unitId: t, subUnitId: o, ranges: s } = n, r = {}, i = e.getRowManager();
|
|
6279
6293
|
for (const { startRow: a, endRow: u } of s)
|
|
6280
6294
|
for (let l = a; l < u + 1; l++) {
|
|
@@ -6300,7 +6314,7 @@ const $o = {
|
|
|
6300
6314
|
ranges: s,
|
|
6301
6315
|
autoHeightInfo: r
|
|
6302
6316
|
};
|
|
6303
|
-
},
|
|
6317
|
+
}, eh = (n, e) => {
|
|
6304
6318
|
const { unitId: t, subUnitId: o, rowsAutoHeightInfo: s } = n, r = [], i = e.getRowManager();
|
|
6305
6319
|
for (const a of s) {
|
|
6306
6320
|
const { row: u } = a, { ah: l } = i.getRowOrCreate(u);
|
|
@@ -6322,7 +6336,7 @@ const $o = {
|
|
|
6322
6336
|
for (const { startRow: c, endRow: d } of t)
|
|
6323
6337
|
for (let h = c; h <= d; h++) {
|
|
6324
6338
|
const m = a.getRowOrCreate(h);
|
|
6325
|
-
typeof o == "number" ? m.h = o : m.h = (l = o[h]) != null ? l : u, m.h = Math.min(
|
|
6339
|
+
typeof o == "number" ? m.h = o : m.h = (l = o[h]) != null ? l : u, m.h = Math.min(bl, m.h);
|
|
6326
6340
|
}
|
|
6327
6341
|
return !0;
|
|
6328
6342
|
}
|
|
@@ -6383,7 +6397,7 @@ const $o = {
|
|
|
6383
6397
|
} else f === L.ROW ? p = {
|
|
6384
6398
|
subUnitId: a,
|
|
6385
6399
|
unitId: u,
|
|
6386
|
-
ranges: g.map((x) =>
|
|
6400
|
+
ranges: g.map((x) => N.clone(x.range)),
|
|
6387
6401
|
rowHeight: h
|
|
6388
6402
|
} : p = {
|
|
6389
6403
|
subUnitId: a,
|
|
@@ -6569,8 +6583,8 @@ const $o = {
|
|
|
6569
6583
|
}), !0) : !1;
|
|
6570
6584
|
}
|
|
6571
6585
|
};
|
|
6572
|
-
var
|
|
6573
|
-
class
|
|
6586
|
+
var El = /* @__PURE__ */ ((n) => (n[n.Tab = 1] = "Tab", n[n.Comma = 2] = "Comma", n[n.Semicolon = 4] = "Semicolon", n[n.Space = 8] = "Space", n[n.Custom = 16] = "Custom", n))(El || {});
|
|
6587
|
+
class Ul {
|
|
6574
6588
|
constructor() {
|
|
6575
6589
|
R(this, "_tabCount", 0);
|
|
6576
6590
|
R(this, "_commaCount", 0);
|
|
@@ -6601,44 +6615,44 @@ class bl {
|
|
|
6601
6615
|
return e === 0 || e === this._tabCount ? 1 : e === this._commaCount ? 2 : e === this._semicolonCount ? 4 : e === this._spaceCount ? 8 : 1;
|
|
6602
6616
|
}
|
|
6603
6617
|
}
|
|
6604
|
-
function
|
|
6618
|
+
function kl(n, e, t) {
|
|
6605
6619
|
const o = [];
|
|
6606
6620
|
t !== void 0 && (n & 16) > 0 && o.push(t), (n & 1) > 0 && o.push(" "), (n & 2) > 0 && o.push(","), (n & 4) > 0 && o.push(";"), (n & 8) > 0 && o.push(" ");
|
|
6607
6621
|
let s = "";
|
|
6608
6622
|
for (const i of o)
|
|
6609
|
-
s +=
|
|
6623
|
+
s += Tl(i);
|
|
6610
6624
|
let r = "[".concat(s, "]");
|
|
6611
6625
|
return e && (r += "+"), new RegExp(r);
|
|
6612
6626
|
}
|
|
6613
|
-
function
|
|
6627
|
+
function Tl(n) {
|
|
6614
6628
|
return n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
6615
6629
|
}
|
|
6616
|
-
const
|
|
6630
|
+
const Pl = (n) => {
|
|
6617
6631
|
var t;
|
|
6618
6632
|
return ((t = n.body) == null ? void 0 : t.dataStream.replace(/\r\n$/, "")) || "";
|
|
6619
6633
|
};
|
|
6620
|
-
function
|
|
6634
|
+
function Nl(n) {
|
|
6621
6635
|
if (n != null) {
|
|
6622
6636
|
if (n.p)
|
|
6623
|
-
return
|
|
6637
|
+
return Pl(n.p);
|
|
6624
6638
|
if (n.v && typeof n.v == "string")
|
|
6625
6639
|
return n.v;
|
|
6626
6640
|
if (n.t && (n.t === ie.FORCE_STRING || n.t === ie.STRING))
|
|
6627
6641
|
return String(n.v);
|
|
6628
6642
|
}
|
|
6629
6643
|
}
|
|
6630
|
-
function
|
|
6644
|
+
function Ol(n, e, t, o, s = !1) {
|
|
6631
6645
|
const r = K.transformRange(e, n), { startColumn: i, startRow: a, endColumn: u, endRow: l } = r;
|
|
6632
6646
|
if (i !== u)
|
|
6633
6647
|
throw new Error("The range must be in the same column.");
|
|
6634
6648
|
if (t && (t & 16) > 0 && (o === void 0 || o.length !== 1))
|
|
6635
6649
|
throw new Error("The custom delimiter must a character.");
|
|
6636
|
-
const c = t === void 0, d = c ? new
|
|
6650
|
+
const c = t === void 0, d = c ? new Ul() : null, h = [];
|
|
6637
6651
|
for (let I = a; I <= l; I++) {
|
|
6638
|
-
const w = n.getCell(I, i), y =
|
|
6652
|
+
const w = n.getCell(I, i), y = Nl(w);
|
|
6639
6653
|
h.push(y), d && d.update(y);
|
|
6640
6654
|
}
|
|
6641
|
-
const m = c ? d.getDelimiter() : t, g =
|
|
6655
|
+
const m = c ? d.getDelimiter() : t, g = kl(m, s, o);
|
|
6642
6656
|
let f = -1, p = 0, C = 0;
|
|
6643
6657
|
const S = [];
|
|
6644
6658
|
for (const I of h) {
|
|
@@ -6655,7 +6669,7 @@ function Pl(n, e, t, o, s = !1) {
|
|
|
6655
6669
|
lastRow: p
|
|
6656
6670
|
};
|
|
6657
6671
|
}
|
|
6658
|
-
const
|
|
6672
|
+
const Dl = {
|
|
6659
6673
|
type: v.COMMAND,
|
|
6660
6674
|
id: "sheet.command.split-text-to-columns",
|
|
6661
6675
|
// eslint-disable-next-line max-lines-per-function
|
|
@@ -6666,7 +6680,7 @@ const Ol = {
|
|
|
6666
6680
|
if (!h) return !1;
|
|
6667
6681
|
const m = h.getSheetBySheetId(o);
|
|
6668
6682
|
if (!m) return !1;
|
|
6669
|
-
const { lastRow: g, rs: f, maxLength: p } =
|
|
6683
|
+
const { lastRow: g, rs: f, maxLength: p } = Ol(m, s, r, i, a), C = m.getColumnCount(), { startColumn: S } = K.transformRange(s, m);
|
|
6670
6684
|
if (s.startColumn !== s.endColumn)
|
|
6671
6685
|
return !1;
|
|
6672
6686
|
const I = [], w = [], y = S + p + 1 - C;
|
|
@@ -6725,7 +6739,7 @@ const Ol = {
|
|
|
6725
6739
|
redoMutations: I
|
|
6726
6740
|
}), !0) : !1;
|
|
6727
6741
|
}
|
|
6728
|
-
},
|
|
6742
|
+
}, Al = {
|
|
6729
6743
|
id: "sheet.command.toggle-cell-checkbox",
|
|
6730
6744
|
type: v.COMMAND,
|
|
6731
6745
|
handler: (n, e) => {
|
|
@@ -6737,7 +6751,7 @@ const Ol = {
|
|
|
6737
6751
|
const h = l.getCell(s, r);
|
|
6738
6752
|
if (!(h != null && h.p))
|
|
6739
6753
|
return !1;
|
|
6740
|
-
const m =
|
|
6754
|
+
const m = O.deepClone(h.p), g = new pi(m), f = Ci.paragraph.bullet.toggleChecklist({
|
|
6741
6755
|
document: g,
|
|
6742
6756
|
paragraphIndex: i
|
|
6743
6757
|
});
|
|
@@ -6777,7 +6791,7 @@ const Ol = {
|
|
|
6777
6791
|
const { worksheet: o } = t, s = o.getConfig();
|
|
6778
6792
|
return s.showGridlines = e.showGridlines, !0;
|
|
6779
6793
|
}
|
|
6780
|
-
},
|
|
6794
|
+
}, xl = {
|
|
6781
6795
|
type: v.COMMAND,
|
|
6782
6796
|
id: "sheet.command.toggle-gridlines",
|
|
6783
6797
|
handler: (n, e) => {
|
|
@@ -6800,7 +6814,7 @@ const Ol = {
|
|
|
6800
6814
|
redoMutations: [{ id: jt.id, params: c }]
|
|
6801
6815
|
}), !0) : !1;
|
|
6802
6816
|
}
|
|
6803
|
-
},
|
|
6817
|
+
}, Wl = {
|
|
6804
6818
|
id: "sheet.command.unregister-worksheet-range-theme-style",
|
|
6805
6819
|
type: v.COMMAND,
|
|
6806
6820
|
handler: (n, e) => {
|
|
@@ -6823,11 +6837,11 @@ const Ol = {
|
|
|
6823
6837
|
redoMutations: [{ id: Po.id, params: l }]
|
|
6824
6838
|
}), !0;
|
|
6825
6839
|
}
|
|
6826
|
-
},
|
|
6840
|
+
}, $l = {
|
|
6827
6841
|
id: "sheet.mutation.empty",
|
|
6828
6842
|
type: v.MUTATION,
|
|
6829
6843
|
handler: () => !0
|
|
6830
|
-
},
|
|
6844
|
+
}, Vl = (n) => {
|
|
6831
6845
|
const e = new G();
|
|
6832
6846
|
return n.forEach((t) => {
|
|
6833
6847
|
K.foreach(t, (o, s) => {
|
|
@@ -6837,7 +6851,7 @@ const Ol = {
|
|
|
6837
6851
|
const s = e.getValue(t - 1, o);
|
|
6838
6852
|
s && e.setValue(t, o, s + 1);
|
|
6839
6853
|
}), e;
|
|
6840
|
-
},
|
|
6854
|
+
}, Ll = (n) => {
|
|
6841
6855
|
const e = n;
|
|
6842
6856
|
return e.forValue((t, o) => {
|
|
6843
6857
|
const s = n.getValue(t - 1, o);
|
|
@@ -6867,7 +6881,7 @@ const Ol = {
|
|
|
6867
6881
|
u.startColumn = l, u.startRow = o - a + 1, t(c, u);
|
|
6868
6882
|
}
|
|
6869
6883
|
}), e;
|
|
6870
|
-
},
|
|
6884
|
+
}, Hl = (n, e) => {
|
|
6871
6885
|
K.foreach(e, (t, o) => {
|
|
6872
6886
|
n.realDeleteValue(t, o);
|
|
6873
6887
|
});
|
|
@@ -6885,13 +6899,13 @@ const Ol = {
|
|
|
6885
6899
|
const e = [];
|
|
6886
6900
|
let t = ns(n);
|
|
6887
6901
|
for (; t.area > 0; )
|
|
6888
|
-
t.range && (e.push(t.range),
|
|
6902
|
+
t.range && (e.push(t.range), Hl(n, t.range)), t = ns(n);
|
|
6889
6903
|
return e;
|
|
6890
6904
|
}, Kr = (n) => {
|
|
6891
|
-
const e =
|
|
6905
|
+
const e = Vl(n);
|
|
6892
6906
|
return zr(e);
|
|
6893
6907
|
};
|
|
6894
|
-
class
|
|
6908
|
+
class th {
|
|
6895
6909
|
constructor() {
|
|
6896
6910
|
R(this, "_matrix", new G());
|
|
6897
6911
|
}
|
|
@@ -6910,11 +6924,11 @@ class Qd {
|
|
|
6910
6924
|
}), this;
|
|
6911
6925
|
}
|
|
6912
6926
|
merge() {
|
|
6913
|
-
const e =
|
|
6927
|
+
const e = Ll(this._matrix);
|
|
6914
6928
|
return zr(e);
|
|
6915
6929
|
}
|
|
6916
6930
|
}
|
|
6917
|
-
const Mt = So("INumfmtService"),
|
|
6931
|
+
const Mt = So("INumfmtService"), nh = (n, e) => {
|
|
6918
6932
|
const t = n.get(Mt), { values: o, unitId: s, subUnitId: r } = e, i = [], a = [];
|
|
6919
6933
|
Object.keys(o).forEach((l) => {
|
|
6920
6934
|
o[l].ranges.forEach((d) => {
|
|
@@ -6974,7 +6988,7 @@ const Mt = So("INumfmtService"), eh = (n, e) => {
|
|
|
6974
6988
|
const { unitId: t, subUnitId: o, ranges: s } = e;
|
|
6975
6989
|
return n.get(Mt).deleteValues(t, o, s), !0;
|
|
6976
6990
|
}
|
|
6977
|
-
},
|
|
6991
|
+
}, oh = (n, e) => {
|
|
6978
6992
|
const t = n.get(Mt), { ranges: o, unitId: s, subUnitId: r } = e, i = [];
|
|
6979
6993
|
if (o.forEach((u) => {
|
|
6980
6994
|
K.foreach(u, (l, c) => {
|
|
@@ -6993,7 +7007,7 @@ const Mt = So("INumfmtService"), eh = (n, e) => {
|
|
|
6993
7007
|
l.ranges = Kr(l.ranges);
|
|
6994
7008
|
}), [{ id: Fo.id, params: a }];
|
|
6995
7009
|
}, mo = (n, e, t) => {
|
|
6996
|
-
const o =
|
|
7010
|
+
const o = Va(t, "pattern"), s = {}, r = {}, i = La();
|
|
6997
7011
|
return Object.keys(o).forEach((a) => {
|
|
6998
7012
|
const u = o[a], l = i();
|
|
6999
7013
|
s[l] = {
|
|
@@ -7002,13 +7016,13 @@ const Mt = So("INumfmtService"), eh = (n, e) => {
|
|
|
7002
7016
|
r[l] || (r[l] = { ranges: [] }), r[l].ranges.push(bs(c.row, c.col));
|
|
7003
7017
|
});
|
|
7004
7018
|
}), { unitId: n, subUnitId: e, refMap: s, values: r };
|
|
7005
|
-
},
|
|
7019
|
+
}, Bl = {
|
|
7006
7020
|
id: "sheet.operation.scroll-to-cell",
|
|
7007
7021
|
type: v.OPERATION,
|
|
7008
7022
|
handler: () => !0
|
|
7009
|
-
}, Yr = "ONLY_REGISTER_FORMULA_RELATED_MUTATIONS_KEY",
|
|
7010
|
-
var
|
|
7011
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
7023
|
+
}, Yr = "ONLY_REGISTER_FORMULA_RELATED_MUTATIONS_KEY", Fl = "maxCellsPerSheet", jl = 3e6;
|
|
7024
|
+
var Gl = Object.getOwnPropertyDescriptor, zl = (n, e, t, o) => {
|
|
7025
|
+
for (var s = o > 1 ? void 0 : o ? Gl(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
7012
7026
|
(i = n[r]) && (s = i(s) || s);
|
|
7013
7027
|
return s;
|
|
7014
7028
|
}, ro = (n, e) => (t, o) => e(t, o, n);
|
|
@@ -7034,7 +7048,7 @@ let En = class extends ue {
|
|
|
7034
7048
|
yn,
|
|
7035
7049
|
Fo,
|
|
7036
7050
|
vn,
|
|
7037
|
-
|
|
7051
|
+
$l,
|
|
7038
7052
|
en,
|
|
7039
7053
|
// formula SUBTOTAL
|
|
7040
7054
|
Qt
|
|
@@ -7042,30 +7056,30 @@ let En = class extends ue {
|
|
|
7042
7056
|
var i;
|
|
7043
7057
|
this._commandService.registerCommand(r), (i = this._dataSyncPrimaryController) == null || i.registerSyncingMutations(r);
|
|
7044
7058
|
}), ((s = this._configService.getConfig(Yr)) != null ? s : !1) || [
|
|
7045
|
-
|
|
7059
|
+
$a,
|
|
7046
7060
|
Io,
|
|
7047
7061
|
vo,
|
|
7048
7062
|
Mo,
|
|
7049
7063
|
Vs,
|
|
7050
7064
|
Pt,
|
|
7051
|
-
|
|
7065
|
+
Nt,
|
|
7052
7066
|
xo,
|
|
7053
7067
|
Lo,
|
|
7054
|
-
fu,
|
|
7055
|
-
gu,
|
|
7056
|
-
Ru,
|
|
7057
7068
|
pu,
|
|
7069
|
+
Ru,
|
|
7070
|
+
Cu,
|
|
7071
|
+
Su,
|
|
7058
7072
|
Sr,
|
|
7059
7073
|
et,
|
|
7060
7074
|
rn,
|
|
7061
7075
|
zn,
|
|
7062
|
-
du,
|
|
7063
|
-
cu,
|
|
7064
7076
|
mu,
|
|
7065
7077
|
hu,
|
|
7078
|
+
fu,
|
|
7079
|
+
gu,
|
|
7066
7080
|
pr,
|
|
7067
7081
|
Qe,
|
|
7068
|
-
|
|
7082
|
+
wu,
|
|
7069
7083
|
Jn,
|
|
7070
7084
|
wt,
|
|
7071
7085
|
Kn,
|
|
@@ -7075,45 +7089,45 @@ let En = class extends ue {
|
|
|
7075
7089
|
Yn,
|
|
7076
7090
|
Do,
|
|
7077
7091
|
ho,
|
|
7078
|
-
|
|
7092
|
+
bu,
|
|
7093
|
+
il,
|
|
7079
7094
|
sl,
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
Au,
|
|
7095
|
+
rl,
|
|
7096
|
+
$u,
|
|
7097
|
+
Wu,
|
|
7084
7098
|
an,
|
|
7085
|
-
|
|
7086
|
-
|
|
7099
|
+
Au,
|
|
7100
|
+
xu,
|
|
7087
7101
|
Ur,
|
|
7088
7102
|
Xt,
|
|
7089
7103
|
Zt,
|
|
7090
7104
|
_n,
|
|
7091
|
-
|
|
7105
|
+
Bu,
|
|
7092
7106
|
Lt,
|
|
7093
|
-
|
|
7107
|
+
Ku,
|
|
7094
7108
|
ht,
|
|
7095
|
-
|
|
7096
|
-
|
|
7109
|
+
Ju,
|
|
7110
|
+
ul,
|
|
7097
7111
|
sn,
|
|
7098
7112
|
Ho,
|
|
7099
|
-
|
|
7100
|
-
|
|
7113
|
+
Or,
|
|
7114
|
+
Zu,
|
|
7101
7115
|
Bt,
|
|
7102
7116
|
Er,
|
|
7103
|
-
|
|
7117
|
+
Nr,
|
|
7104
7118
|
Xn,
|
|
7105
7119
|
Zn,
|
|
7106
7120
|
Re,
|
|
7107
|
-
|
|
7121
|
+
hl,
|
|
7108
7122
|
Rn,
|
|
7109
|
-
|
|
7110
|
-
|
|
7123
|
+
ol,
|
|
7124
|
+
cl,
|
|
7125
|
+
ll,
|
|
7111
7126
|
al,
|
|
7112
|
-
rl,
|
|
7113
7127
|
xr,
|
|
7114
7128
|
Wr,
|
|
7115
7129
|
un,
|
|
7116
|
-
|
|
7130
|
+
Rl,
|
|
7117
7131
|
mt,
|
|
7118
7132
|
Wo,
|
|
7119
7133
|
Lr,
|
|
@@ -7124,55 +7138,55 @@ let En = class extends ue {
|
|
|
7124
7138
|
xe,
|
|
7125
7139
|
st,
|
|
7126
7140
|
// SetWorksheetColIsAutoWidthCommand,
|
|
7127
|
-
|
|
7141
|
+
ou,
|
|
7128
7142
|
re,
|
|
7129
|
-
|
|
7130
|
-
|
|
7143
|
+
Bl,
|
|
7144
|
+
cu,
|
|
7131
7145
|
Mr,
|
|
7132
7146
|
Tr,
|
|
7133
7147
|
Gr,
|
|
7134
|
-
|
|
7148
|
+
xl,
|
|
7135
7149
|
jt,
|
|
7136
|
-
|
|
7150
|
+
Yu,
|
|
7137
7151
|
Ht,
|
|
7138
7152
|
// permissions range protection
|
|
7139
|
-
|
|
7153
|
+
_l,
|
|
7140
7154
|
gt,
|
|
7141
7155
|
It,
|
|
7142
7156
|
vt,
|
|
7143
7157
|
$o,
|
|
7144
7158
|
Xi,
|
|
7145
|
-
|
|
7146
|
-
|
|
7159
|
+
qu,
|
|
7160
|
+
au,
|
|
7147
7161
|
Zi,
|
|
7148
|
-
|
|
7149
|
-
|
|
7162
|
+
uu,
|
|
7163
|
+
yl,
|
|
7150
7164
|
Ae,
|
|
7151
7165
|
Je,
|
|
7152
7166
|
ge,
|
|
7153
|
-
|
|
7167
|
+
Al,
|
|
7154
7168
|
Ft,
|
|
7155
|
-
|
|
7156
|
-
|
|
7169
|
+
fl,
|
|
7170
|
+
Dl,
|
|
7157
7171
|
// range theme
|
|
7158
7172
|
Jt,
|
|
7159
7173
|
Kt,
|
|
7160
7174
|
Po,
|
|
7161
7175
|
qt,
|
|
7162
|
-
|
|
7163
|
-
|
|
7176
|
+
Wl,
|
|
7177
|
+
yu,
|
|
7164
7178
|
_a,
|
|
7165
|
-
|
|
7166
|
-
].forEach((r) => this.disposeWithMe(this._commandService.registerCommand(r))), this._configService.setConfig(
|
|
7179
|
+
lu
|
|
7180
|
+
].forEach((r) => this.disposeWithMe(this._commandService.registerCommand(r))), this._configService.setConfig(Fl, jl);
|
|
7167
7181
|
}
|
|
7168
7182
|
};
|
|
7169
|
-
En =
|
|
7183
|
+
En = zl([
|
|
7170
7184
|
ro(0, E),
|
|
7171
7185
|
ro(1, Ps),
|
|
7172
7186
|
ro(2, wi(ji))
|
|
7173
7187
|
], En);
|
|
7174
|
-
var
|
|
7175
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
7188
|
+
var Kl = Object.getOwnPropertyDescriptor, Jl = (n, e, t, o) => {
|
|
7189
|
+
for (var s = o > 1 ? void 0 : o ? Kl(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
7176
7190
|
(i = n[r]) && (s = i(s) || s);
|
|
7177
7191
|
return s;
|
|
7178
7192
|
}, os = (n, e) => (t, o) => e(t, o, n);
|
|
@@ -7229,17 +7243,17 @@ let Un = class extends ue {
|
|
|
7229
7243
|
}), a.getMatrix();
|
|
7230
7244
|
}
|
|
7231
7245
|
};
|
|
7232
|
-
Un =
|
|
7246
|
+
Un = Jl([
|
|
7233
7247
|
os(0, $(M)),
|
|
7234
7248
|
os(1, E)
|
|
7235
7249
|
], Un);
|
|
7236
|
-
const
|
|
7237
|
-
var
|
|
7238
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
7250
|
+
const Yl = "sheets.config", ss = {};
|
|
7251
|
+
var ql = Object.getOwnPropertyDescriptor, Xl = (n, e, t, o) => {
|
|
7252
|
+
for (var s = o > 1 ? void 0 : o ? ql(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
7239
7253
|
(i = n[r]) && (s = i(s) || s);
|
|
7240
7254
|
return s;
|
|
7241
7255
|
}, rs = (n, e) => (t, o) => e(t, o, n);
|
|
7242
|
-
const
|
|
7256
|
+
const Zl = "SHEET_DEFINED_NAME_PLUGIN", sh = "AllDefaultWorkbook";
|
|
7243
7257
|
let kn = class extends ue {
|
|
7244
7258
|
constructor(n, e) {
|
|
7245
7259
|
super(), this._definedNamesService = n, this._resourceManagerService = e, this._initialize();
|
|
@@ -7262,7 +7276,7 @@ let kn = class extends ue {
|
|
|
7262
7276
|
};
|
|
7263
7277
|
this.disposeWithMe(
|
|
7264
7278
|
this._resourceManagerService.registerPluginResource({
|
|
7265
|
-
pluginName:
|
|
7279
|
+
pluginName: Zl,
|
|
7266
7280
|
businesses: [B.UNIVER_SHEET],
|
|
7267
7281
|
toJson: (t) => n(t),
|
|
7268
7282
|
parseJson: (t) => e(t),
|
|
@@ -7276,19 +7290,19 @@ let kn = class extends ue {
|
|
|
7276
7290
|
);
|
|
7277
7291
|
}
|
|
7278
7292
|
};
|
|
7279
|
-
kn =
|
|
7280
|
-
rs(0,
|
|
7293
|
+
kn = Xl([
|
|
7294
|
+
rs(0, Ns),
|
|
7281
7295
|
rs(1, on)
|
|
7282
7296
|
], kn);
|
|
7283
7297
|
const W = {
|
|
7284
7298
|
MoveRangeCommandId: Ls,
|
|
7285
7299
|
InsertRowCommandId: Rr,
|
|
7286
7300
|
InsertColCommandId: Cr,
|
|
7287
|
-
RemoveColCommandId:
|
|
7288
|
-
RemoveRowCommandId:
|
|
7301
|
+
RemoveColCommandId: Oo,
|
|
7302
|
+
RemoveRowCommandId: No,
|
|
7289
7303
|
DeleteRangeMoveLeftCommandId: gr,
|
|
7290
7304
|
DeleteRangeMoveUpCommandId: fr,
|
|
7291
|
-
InsertRangeMoveDownCommandId:
|
|
7305
|
+
InsertRangeMoveDownCommandId: du,
|
|
7292
7306
|
InsertRangeMoveRightCommandId: To,
|
|
7293
7307
|
MoveColsCommandId: Ir,
|
|
7294
7308
|
MoveRowsCommandId: wr,
|
|
@@ -7357,7 +7371,7 @@ const dn = Number.MAX_SAFE_INTEGER, He = (n) => {
|
|
|
7357
7371
|
length: a.length || 0
|
|
7358
7372
|
}
|
|
7359
7373
|
];
|
|
7360
|
-
},
|
|
7374
|
+
}, Ql = (n, e) => {
|
|
7361
7375
|
const { fromRange: t, toRange: o } = n.params || {};
|
|
7362
7376
|
if (!t || !o)
|
|
7363
7377
|
return [e];
|
|
@@ -7365,7 +7379,7 @@ const dn = Number.MAX_SAFE_INTEGER, He = (n) => {
|
|
|
7365
7379
|
return K.foreach(e, (l, c) => {
|
|
7366
7380
|
a.setValue(l, c, 1);
|
|
7367
7381
|
}), a.moveRows(s, r, i), qe(a, (l) => l === 1);
|
|
7368
|
-
},
|
|
7382
|
+
}, ec = (n, e) => {
|
|
7369
7383
|
const { range: t, order: o } = n.params || {};
|
|
7370
7384
|
if (!t || !o)
|
|
7371
7385
|
return [e];
|
|
@@ -7403,7 +7417,7 @@ const dn = Number.MAX_SAFE_INTEGER, He = (n) => {
|
|
|
7403
7417
|
length: a.length || 0
|
|
7404
7418
|
}
|
|
7405
7419
|
];
|
|
7406
|
-
},
|
|
7420
|
+
}, tc = (n, e) => {
|
|
7407
7421
|
const { fromRange: t, toRange: o } = n.params || {};
|
|
7408
7422
|
if (!t || !o)
|
|
7409
7423
|
return [e];
|
|
@@ -7411,19 +7425,19 @@ const dn = Number.MAX_SAFE_INTEGER, He = (n) => {
|
|
|
7411
7425
|
return K.foreach(e, (u, l) => {
|
|
7412
7426
|
a.setValue(u, l, 1);
|
|
7413
7427
|
}), a.moveColumns(s, r, i), qe(a, (u) => u === 1);
|
|
7414
|
-
},
|
|
7428
|
+
}, nc = (n, e) => {
|
|
7415
7429
|
var r, i;
|
|
7416
7430
|
const t = (r = n.params) == null ? void 0 : r.toRange, o = (i = n.params) == null ? void 0 : i.fromRange;
|
|
7417
7431
|
if (!t || !o)
|
|
7418
7432
|
return [];
|
|
7419
7433
|
const s = [];
|
|
7420
|
-
if (
|
|
7434
|
+
if (N.contains(t, e) && s.push({
|
|
7421
7435
|
type: q.Delete
|
|
7422
|
-
}),
|
|
7436
|
+
}), N.contains(o, e)) {
|
|
7423
7437
|
s.push({
|
|
7424
7438
|
type: q.Delete
|
|
7425
7439
|
});
|
|
7426
|
-
const a =
|
|
7440
|
+
const a = N.getRelativeRange(e, o), u = N.getPositionRange(a, t);
|
|
7427
7441
|
return [
|
|
7428
7442
|
{
|
|
7429
7443
|
type: q.Set,
|
|
@@ -7432,22 +7446,22 @@ const dn = Number.MAX_SAFE_INTEGER, He = (n) => {
|
|
|
7432
7446
|
];
|
|
7433
7447
|
}
|
|
7434
7448
|
return s;
|
|
7435
|
-
},
|
|
7449
|
+
}, oc = (n, e) => {
|
|
7436
7450
|
var d, h;
|
|
7437
7451
|
const t = (d = n.params) == null ? void 0 : d.toRange, o = (h = n.params) == null ? void 0 : h.fromRange;
|
|
7438
7452
|
if (!t || !o)
|
|
7439
7453
|
return [e];
|
|
7440
|
-
if (!
|
|
7454
|
+
if (!N.intersects(o, e) && !N.intersects(t, e))
|
|
7441
7455
|
return [e];
|
|
7442
|
-
if (
|
|
7443
|
-
const m =
|
|
7444
|
-
return [
|
|
7456
|
+
if (N.contains(o, e)) {
|
|
7457
|
+
const m = N.getRelativeRange(e, o);
|
|
7458
|
+
return [N.getPositionRange(m, t)];
|
|
7445
7459
|
}
|
|
7446
7460
|
const s = new G();
|
|
7447
7461
|
K.foreach(e, (m, g) => {
|
|
7448
7462
|
s.setValue(m, g, 1);
|
|
7449
7463
|
});
|
|
7450
|
-
const r = new G(), i =
|
|
7464
|
+
const r = new G(), i = N.getIntersects(o, e);
|
|
7451
7465
|
i && K.foreach(i, (m, g) => {
|
|
7452
7466
|
s.getValue(m, g) && (s.setValue(m, g, void 0), r.setValue(m, g, 1));
|
|
7453
7467
|
});
|
|
@@ -7470,14 +7484,14 @@ const dn = Number.MAX_SAFE_INTEGER, He = (n) => {
|
|
|
7470
7484
|
o.startColumn < t.startColumn && o.endColumn >= t.startColumn && o.endColumn <= t.endColumn || // 6
|
|
7471
7485
|
o.startColumn < t.startColumn && o.endColumn >= t.endColumn
|
|
7472
7486
|
) {
|
|
7473
|
-
const i =
|
|
7487
|
+
const i = N.getIntersects(o, t);
|
|
7474
7488
|
if (i)
|
|
7475
7489
|
return { step: 0, length: -s(i) };
|
|
7476
7490
|
}
|
|
7477
7491
|
if (o.startColumn >= t.startColumn && o.endColumn <= t.endColumn && r(t) >= r(o))
|
|
7478
7492
|
return null;
|
|
7479
7493
|
if (o.startColumn >= t.startColumn && o.startColumn <= t.endColumn && o.endColumn > t.endColumn) {
|
|
7480
|
-
const i =
|
|
7494
|
+
const i = N.getIntersects(o, t);
|
|
7481
7495
|
if (i) {
|
|
7482
7496
|
const a = -s(i);
|
|
7483
7497
|
return { step: -(s(t) - s(i)), length: a };
|
|
@@ -7504,7 +7518,7 @@ const dn = Number.MAX_SAFE_INTEGER, He = (n) => {
|
|
|
7504
7518
|
});
|
|
7505
7519
|
}
|
|
7506
7520
|
return o;
|
|
7507
|
-
},
|
|
7521
|
+
}, sc = (n, e) => {
|
|
7508
7522
|
var r;
|
|
7509
7523
|
const t = (r = n.params) == null ? void 0 : r.range;
|
|
7510
7524
|
if (!t)
|
|
@@ -7521,11 +7535,11 @@ const dn = Number.MAX_SAFE_INTEGER, He = (n) => {
|
|
|
7521
7535
|
});
|
|
7522
7536
|
}
|
|
7523
7537
|
return o;
|
|
7524
|
-
},
|
|
7538
|
+
}, rc = (n, e) => {
|
|
7525
7539
|
const { range: t, order: o } = n.params || {};
|
|
7526
7540
|
if (!t || !o)
|
|
7527
7541
|
return [];
|
|
7528
|
-
if (
|
|
7542
|
+
if (N.contains(t, e) && e.endRow === e.startRow) {
|
|
7529
7543
|
const s = [], r = e.startRow;
|
|
7530
7544
|
for (const i in o)
|
|
7531
7545
|
if (o[i] === r) {
|
|
@@ -7572,15 +7586,15 @@ const dn = Number.MAX_SAFE_INTEGER, He = (n) => {
|
|
|
7572
7586
|
)
|
|
7573
7587
|
) : { step: 0, length: 0 };
|
|
7574
7588
|
};
|
|
7575
|
-
function
|
|
7589
|
+
function ic(n, e, t) {
|
|
7576
7590
|
const o = [];
|
|
7577
|
-
if (
|
|
7591
|
+
if (N.contains(e, t) && o.push({
|
|
7578
7592
|
type: q.Delete
|
|
7579
|
-
}),
|
|
7593
|
+
}), N.contains(n, t)) {
|
|
7580
7594
|
o.push({
|
|
7581
7595
|
type: q.Delete
|
|
7582
7596
|
});
|
|
7583
|
-
const s =
|
|
7597
|
+
const s = N.getRelativeRange(t, n), r = N.getPositionRange(s, e);
|
|
7584
7598
|
return [
|
|
7585
7599
|
{
|
|
7586
7600
|
type: q.Set,
|
|
@@ -7590,7 +7604,7 @@ function sc(n, e, t) {
|
|
|
7590
7604
|
}
|
|
7591
7605
|
return o;
|
|
7592
7606
|
}
|
|
7593
|
-
const
|
|
7607
|
+
const ac = (n, e) => {
|
|
7594
7608
|
var a;
|
|
7595
7609
|
const t = (a = n.params) == null ? void 0 : a.range;
|
|
7596
7610
|
if (!t)
|
|
@@ -7601,7 +7615,7 @@ const rc = (n, e) => {
|
|
|
7601
7615
|
step: r,
|
|
7602
7616
|
length: i
|
|
7603
7617
|
}), o;
|
|
7604
|
-
},
|
|
7618
|
+
}, uc = (n, e) => {
|
|
7605
7619
|
var a;
|
|
7606
7620
|
const t = (a = n.params) == null ? void 0 : a.range;
|
|
7607
7621
|
if (!t)
|
|
@@ -7612,7 +7626,7 @@ const rc = (n, e) => {
|
|
|
7612
7626
|
step: r,
|
|
7613
7627
|
length: i
|
|
7614
7628
|
}), o;
|
|
7615
|
-
},
|
|
7629
|
+
}, lc = (n, e) => {
|
|
7616
7630
|
var a;
|
|
7617
7631
|
const t = (a = n.params) == null ? void 0 : a.range;
|
|
7618
7632
|
if (!t)
|
|
@@ -7623,7 +7637,7 @@ const rc = (n, e) => {
|
|
|
7623
7637
|
step: r,
|
|
7624
7638
|
length: i
|
|
7625
7639
|
}), o;
|
|
7626
|
-
},
|
|
7640
|
+
}, cc = (n, e) => {
|
|
7627
7641
|
var u;
|
|
7628
7642
|
const t = (u = n.params) == null ? void 0 : u.range;
|
|
7629
7643
|
if (!t)
|
|
@@ -7632,7 +7646,7 @@ const rc = (n, e) => {
|
|
|
7632
7646
|
...t,
|
|
7633
7647
|
startRow: t.startRow,
|
|
7634
7648
|
endRow: Number.POSITIVE_INFINITY
|
|
7635
|
-
}, r =
|
|
7649
|
+
}, r = N.subtract(e, s), i = N.getIntersects(s, e);
|
|
7636
7650
|
if (!i)
|
|
7637
7651
|
return [e];
|
|
7638
7652
|
const a = new G();
|
|
@@ -7643,7 +7657,7 @@ const rc = (n, e) => {
|
|
|
7643
7657
|
}), i && K.foreach(i, (l, c) => {
|
|
7644
7658
|
a.setValue(l + o, c, 1);
|
|
7645
7659
|
}), qe(a, (l) => l === 1);
|
|
7646
|
-
},
|
|
7660
|
+
}, dc = (n, e) => {
|
|
7647
7661
|
var a;
|
|
7648
7662
|
const t = (a = n.params) == null ? void 0 : a.range;
|
|
7649
7663
|
if (!t)
|
|
@@ -7654,7 +7668,7 @@ const rc = (n, e) => {
|
|
|
7654
7668
|
step: r,
|
|
7655
7669
|
length: i
|
|
7656
7670
|
}), o;
|
|
7657
|
-
},
|
|
7671
|
+
}, hc = (n, e) => {
|
|
7658
7672
|
var u;
|
|
7659
7673
|
const t = (u = n.params) == null ? void 0 : u.range;
|
|
7660
7674
|
if (!t)
|
|
@@ -7663,7 +7677,7 @@ const rc = (n, e) => {
|
|
|
7663
7677
|
...t,
|
|
7664
7678
|
startColumn: t.startColumn,
|
|
7665
7679
|
endColumn: Number.POSITIVE_INFINITY
|
|
7666
|
-
}, r =
|
|
7680
|
+
}, r = N.subtract(e, s), i = N.getIntersects(s, e);
|
|
7667
7681
|
if (!i)
|
|
7668
7682
|
return [e];
|
|
7669
7683
|
const a = new G();
|
|
@@ -7674,7 +7688,7 @@ const rc = (n, e) => {
|
|
|
7674
7688
|
}), i && K.foreach(i, (l, c) => {
|
|
7675
7689
|
a.setValue(l, c + o, 1);
|
|
7676
7690
|
}), qe(a, (l) => l === 1);
|
|
7677
|
-
},
|
|
7691
|
+
}, mc = (n, e) => {
|
|
7678
7692
|
var r;
|
|
7679
7693
|
const t = (r = n.params) == null ? void 0 : r.range;
|
|
7680
7694
|
if (!t)
|
|
@@ -7691,7 +7705,7 @@ const rc = (n, e) => {
|
|
|
7691
7705
|
});
|
|
7692
7706
|
}
|
|
7693
7707
|
return o;
|
|
7694
|
-
},
|
|
7708
|
+
}, gc = (n, e) => {
|
|
7695
7709
|
var l;
|
|
7696
7710
|
const t = (l = n.params) == null ? void 0 : l.range;
|
|
7697
7711
|
if (!t)
|
|
@@ -7701,7 +7715,7 @@ const rc = (n, e) => {
|
|
|
7701
7715
|
endRow: t.endRow,
|
|
7702
7716
|
startColumn: t.startColumn,
|
|
7703
7717
|
endColumn: Number.POSITIVE_INFINITY
|
|
7704
|
-
}, s = t.endColumn - t.startColumn + 1, r =
|
|
7718
|
+
}, s = t.endColumn - t.startColumn + 1, r = N.getIntersects(t, e), i = N.subtract(e, o), a = N.getIntersects(o, e);
|
|
7705
7719
|
if (!r && !a)
|
|
7706
7720
|
return [e];
|
|
7707
7721
|
const u = new G();
|
|
@@ -7714,7 +7728,7 @@ const rc = (n, e) => {
|
|
|
7714
7728
|
u.setValue(d, h, 1);
|
|
7715
7729
|
});
|
|
7716
7730
|
}), qe(u, (c) => c === 1);
|
|
7717
|
-
},
|
|
7731
|
+
}, fc = (n, e) => {
|
|
7718
7732
|
var r;
|
|
7719
7733
|
const t = (r = n.params) == null ? void 0 : r.range;
|
|
7720
7734
|
if (!t)
|
|
@@ -7731,7 +7745,7 @@ const rc = (n, e) => {
|
|
|
7731
7745
|
});
|
|
7732
7746
|
}
|
|
7733
7747
|
return o;
|
|
7734
|
-
},
|
|
7748
|
+
}, Rc = (n, e) => {
|
|
7735
7749
|
var l;
|
|
7736
7750
|
const t = (l = n.params) == null ? void 0 : l.range;
|
|
7737
7751
|
if (!t)
|
|
@@ -7740,7 +7754,7 @@ const rc = (n, e) => {
|
|
|
7740
7754
|
...t,
|
|
7741
7755
|
startRow: t.startRow,
|
|
7742
7756
|
endRow: Number.POSITIVE_INFINITY
|
|
7743
|
-
}, s = t.endRow - t.startRow + 1, r =
|
|
7757
|
+
}, s = t.endRow - t.startRow + 1, r = N.getIntersects(t, e), i = N.subtract(e, o), a = N.getIntersects(o, e);
|
|
7744
7758
|
if (!r && !a)
|
|
7745
7759
|
return [e];
|
|
7746
7760
|
const u = new G();
|
|
@@ -7753,7 +7767,7 @@ const rc = (n, e) => {
|
|
|
7753
7767
|
u.setValue(d, h, 1);
|
|
7754
7768
|
});
|
|
7755
7769
|
}), qe(u, (c) => c === 1);
|
|
7756
|
-
},
|
|
7770
|
+
}, pc = (n, e) => {
|
|
7757
7771
|
var s;
|
|
7758
7772
|
const t = (s = n.ranges) != null ? s : [n.range], o = new G();
|
|
7759
7773
|
return K.foreach(e, (r, i) => {
|
|
@@ -7762,7 +7776,7 @@ const rc = (n, e) => {
|
|
|
7762
7776
|
const i = r.startRow, u = r.endRow - i + 1;
|
|
7763
7777
|
o.removeRows(i, u);
|
|
7764
7778
|
}), qe(o, (r) => r === 1);
|
|
7765
|
-
},
|
|
7779
|
+
}, Cc = (n, e) => {
|
|
7766
7780
|
const t = n.params, o = t.range.startRow, s = t.range.endRow - t.range.startRow + 1;
|
|
7767
7781
|
return e.startRow >= o ? [{
|
|
7768
7782
|
startRow: e.startRow + s,
|
|
@@ -7775,7 +7789,7 @@ const rc = (n, e) => {
|
|
|
7775
7789
|
startColumn: e.startColumn,
|
|
7776
7790
|
endColumn: e.endColumn
|
|
7777
7791
|
}];
|
|
7778
|
-
},
|
|
7792
|
+
}, Sc = (n, e) => {
|
|
7779
7793
|
const t = n.params, o = t.range.startColumn, s = t.range.endColumn - t.range.startColumn + 1;
|
|
7780
7794
|
return e.startColumn >= o ? [{
|
|
7781
7795
|
startRow: e.startRow,
|
|
@@ -7818,27 +7832,27 @@ const rc = (n, e) => {
|
|
|
7818
7832
|
let t = [];
|
|
7819
7833
|
switch (e.id) {
|
|
7820
7834
|
case W.DeleteRangeMoveLeftCommandId: {
|
|
7821
|
-
t =
|
|
7835
|
+
t = mc(e, n);
|
|
7822
7836
|
break;
|
|
7823
7837
|
}
|
|
7824
7838
|
case W.DeleteRangeMoveUpCommandId: {
|
|
7825
|
-
t =
|
|
7839
|
+
t = fc(e, n);
|
|
7826
7840
|
break;
|
|
7827
7841
|
}
|
|
7828
7842
|
case W.InsertColCommandId: {
|
|
7829
|
-
t =
|
|
7843
|
+
t = uc(e, n);
|
|
7830
7844
|
break;
|
|
7831
7845
|
}
|
|
7832
7846
|
case W.InsertRangeMoveDownCommandId: {
|
|
7833
|
-
t =
|
|
7847
|
+
t = lc(e, n);
|
|
7834
7848
|
break;
|
|
7835
7849
|
}
|
|
7836
7850
|
case W.InsertRangeMoveRightCommandId: {
|
|
7837
|
-
t =
|
|
7851
|
+
t = dc(e, n);
|
|
7838
7852
|
break;
|
|
7839
7853
|
}
|
|
7840
7854
|
case W.InsertRowCommandId: {
|
|
7841
|
-
t =
|
|
7855
|
+
t = ac(e, n);
|
|
7842
7856
|
break;
|
|
7843
7857
|
}
|
|
7844
7858
|
case W.MoveColsCommandId: {
|
|
@@ -7846,7 +7860,7 @@ const rc = (n, e) => {
|
|
|
7846
7860
|
break;
|
|
7847
7861
|
}
|
|
7848
7862
|
case W.MoveRangeCommandId: {
|
|
7849
|
-
t =
|
|
7863
|
+
t = nc(e, n);
|
|
7850
7864
|
break;
|
|
7851
7865
|
}
|
|
7852
7866
|
case W.MoveRowsCommandId: {
|
|
@@ -7858,49 +7872,49 @@ const rc = (n, e) => {
|
|
|
7858
7872
|
break;
|
|
7859
7873
|
}
|
|
7860
7874
|
case W.RemoveRowCommandId: {
|
|
7861
|
-
t =
|
|
7875
|
+
t = sc(e, n);
|
|
7862
7876
|
break;
|
|
7863
7877
|
}
|
|
7864
7878
|
case W.ReorderRangeCommandId: {
|
|
7865
|
-
t =
|
|
7879
|
+
t = rc(e, n);
|
|
7866
7880
|
break;
|
|
7867
7881
|
}
|
|
7868
7882
|
}
|
|
7869
7883
|
return bt(t, n);
|
|
7870
|
-
},
|
|
7884
|
+
}, rh = (n, e, t) => [Pt.id, Nt.id].includes(e.id) || Qr(e, t).some((r) => N.intersects(r, n)) ? is(n, e) : n, as = (n, e) => {
|
|
7871
7885
|
let t = [];
|
|
7872
7886
|
switch (e.id) {
|
|
7873
7887
|
case W.DeleteRangeMoveLeftCommandId:
|
|
7874
|
-
return hc(e, n);
|
|
7875
|
-
case W.DeleteRangeMoveUpCommandId:
|
|
7876
7888
|
return gc(e, n);
|
|
7889
|
+
case W.DeleteRangeMoveUpCommandId:
|
|
7890
|
+
return Rc(e, n);
|
|
7877
7891
|
case W.InsertRangeMoveDownCommandId:
|
|
7878
|
-
return uc(e, n);
|
|
7879
|
-
case W.InsertRangeMoveRightCommandId:
|
|
7880
7892
|
return cc(e, n);
|
|
7893
|
+
case W.InsertRangeMoveRightCommandId:
|
|
7894
|
+
return hc(e, n);
|
|
7881
7895
|
case W.InsertColCommandId:
|
|
7882
|
-
return
|
|
7896
|
+
return Sc(e, n);
|
|
7883
7897
|
case W.InsertRowCommandId:
|
|
7884
|
-
return
|
|
7898
|
+
return Cc(e, n);
|
|
7885
7899
|
case W.MoveColsCommandId:
|
|
7886
|
-
return Ql(e, n);
|
|
7887
|
-
case W.MoveRangeCommandId:
|
|
7888
7900
|
return tc(e, n);
|
|
7901
|
+
case W.MoveRangeCommandId:
|
|
7902
|
+
return oc(e, n);
|
|
7889
7903
|
case W.MoveRowsCommandId:
|
|
7890
|
-
return
|
|
7904
|
+
return Ql(e, n);
|
|
7891
7905
|
case W.ReorderRangeCommandId:
|
|
7892
|
-
return
|
|
7906
|
+
return ec(e, n);
|
|
7893
7907
|
case W.RemoveColCommandId: {
|
|
7894
7908
|
t = Zr(e, n);
|
|
7895
7909
|
break;
|
|
7896
7910
|
}
|
|
7897
7911
|
case W.RemoveRowCommandId:
|
|
7898
|
-
return
|
|
7912
|
+
return pc(e.params, n);
|
|
7899
7913
|
}
|
|
7900
7914
|
const o = bt(t, n);
|
|
7901
7915
|
return o ? [o] : [];
|
|
7902
|
-
},
|
|
7903
|
-
function
|
|
7916
|
+
}, ih = (n, e, t) => [Pt.id, Nt.id, rn.id, To].includes(e.id) || Qr(e, t).some((r) => N.intersects(r, n)) ? as(n, e) : n;
|
|
7917
|
+
function wc(n, e) {
|
|
7904
7918
|
const { id: t, params: o } = e;
|
|
7905
7919
|
let s = {
|
|
7906
7920
|
length: 0,
|
|
@@ -7940,7 +7954,7 @@ function Cc(n, e) {
|
|
|
7940
7954
|
case ft.id:
|
|
7941
7955
|
{
|
|
7942
7956
|
const r = o.fromRange || new G(o.from).getRange(), i = o.toRange || new G(o.to).getRange();
|
|
7943
|
-
s =
|
|
7957
|
+
s = ic(
|
|
7944
7958
|
r,
|
|
7945
7959
|
i,
|
|
7946
7960
|
n
|
|
@@ -8027,7 +8041,7 @@ function Qr(n, e) {
|
|
|
8027
8041
|
}
|
|
8028
8042
|
}
|
|
8029
8043
|
}
|
|
8030
|
-
function
|
|
8044
|
+
function Ic(n) {
|
|
8031
8045
|
switch (n.id) {
|
|
8032
8046
|
case at.id: {
|
|
8033
8047
|
const e = n.params;
|
|
@@ -8081,7 +8095,7 @@ function Sc(n) {
|
|
|
8081
8095
|
return [n.params.range];
|
|
8082
8096
|
}
|
|
8083
8097
|
}
|
|
8084
|
-
function
|
|
8098
|
+
function ah(n, e) {
|
|
8085
8099
|
var s, r, i, a, u, l;
|
|
8086
8100
|
const t = n.get(M), o = n.get(H);
|
|
8087
8101
|
switch (e.id) {
|
|
@@ -8255,13 +8269,13 @@ function rh(n, e) {
|
|
|
8255
8269
|
}
|
|
8256
8270
|
}
|
|
8257
8271
|
}
|
|
8258
|
-
var
|
|
8259
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
8272
|
+
var vc = Object.getOwnPropertyDescriptor, Mc = (n, e, t, o) => {
|
|
8273
|
+
for (var s = o > 1 ? void 0 : o ? vc(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
8260
8274
|
(i = n[r]) && (s = i(s) || s);
|
|
8261
8275
|
return s;
|
|
8262
8276
|
}, hn = (n, e) => (t, o) => e(t, o, n);
|
|
8263
|
-
const
|
|
8264
|
-
class
|
|
8277
|
+
const _c = ut("MERGE_REDO"), yc = ut("MERGE_UNDO"), us = Math.floor(Number.MAX_SAFE_INTEGER / 10);
|
|
8278
|
+
class bc extends ue {
|
|
8265
8279
|
constructor(e, t, o, s, r = !1) {
|
|
8266
8280
|
super(), this._unitId = e, this._subUnitId = t, this._range = o, this._callback = s, this._skipIntersects = r;
|
|
8267
8281
|
}
|
|
@@ -8280,12 +8294,12 @@ class _c extends ue {
|
|
|
8280
8294
|
if (this._skipIntersects) {
|
|
8281
8295
|
if (e.id === Tt.id)
|
|
8282
8296
|
return;
|
|
8283
|
-
const i =
|
|
8284
|
-
if (i != null && i.some((a) =>
|
|
8297
|
+
const i = Ic(e);
|
|
8298
|
+
if (i != null && i.some((a) => N.intersects(a, this._range)))
|
|
8285
8299
|
return;
|
|
8286
8300
|
}
|
|
8287
|
-
const t =
|
|
8288
|
-
if (t &&
|
|
8301
|
+
const t = wc(this._range, e);
|
|
8302
|
+
if (t && N.equals(t, this._range))
|
|
8289
8303
|
return !1;
|
|
8290
8304
|
const o = this._range;
|
|
8291
8305
|
this._range = t, this._callback(o, t);
|
|
@@ -8294,10 +8308,10 @@ class _c extends ue {
|
|
|
8294
8308
|
let Et = class extends ue {
|
|
8295
8309
|
constructor(e, t, o, s) {
|
|
8296
8310
|
super();
|
|
8297
|
-
R(this, "interceptor", new Ro({ MERGE_REDO:
|
|
8311
|
+
R(this, "interceptor", new Ro({ MERGE_REDO: _c, MERGE_UNDO: yc }));
|
|
8298
8312
|
R(this, "_watchRanges", /* @__PURE__ */ new Set());
|
|
8299
8313
|
R(this, "_refRangeManagerMap", /* @__PURE__ */ new Map());
|
|
8300
|
-
R(this, "_serializer",
|
|
8314
|
+
R(this, "_serializer", Ec());
|
|
8301
8315
|
// eslint-disable-next-line max-lines-per-function
|
|
8302
8316
|
R(this, "_onRefRangeChange", () => {
|
|
8303
8317
|
this._sheetInterceptorService.interceptCommand({
|
|
@@ -8446,7 +8460,7 @@ let Et = class extends ue {
|
|
|
8446
8460
|
endColumn: +c.endColumn,
|
|
8447
8461
|
rangeType: c.rangeType && +c.rangeType
|
|
8448
8462
|
};
|
|
8449
|
-
e.some((h) =>
|
|
8463
|
+
e.some((h) => N.intersects(h, d)) && l && l.forEach((h) => {
|
|
8450
8464
|
i.add(h);
|
|
8451
8465
|
});
|
|
8452
8466
|
}), [...i];
|
|
@@ -8490,7 +8504,7 @@ let Et = class extends ue {
|
|
|
8490
8504
|
for (const d of this._watchRanges)
|
|
8491
8505
|
d.onMutation(c);
|
|
8492
8506
|
}));
|
|
8493
|
-
const a = new
|
|
8507
|
+
const a = new bc(e, t, o, s, r);
|
|
8494
8508
|
this._watchRanges.add(a);
|
|
8495
8509
|
const u = Pe(() => {
|
|
8496
8510
|
this._watchRanges.delete(a), this._watchRanges.size === 0 && (i == null || i.dispose(), i = null);
|
|
@@ -8500,7 +8514,7 @@ let Et = class extends ue {
|
|
|
8500
8514
|
});
|
|
8501
8515
|
}
|
|
8502
8516
|
};
|
|
8503
|
-
Et =
|
|
8517
|
+
Et = Mc([
|
|
8504
8518
|
hn(0, E),
|
|
8505
8519
|
hn(1, $(F)),
|
|
8506
8520
|
hn(2, $(M)),
|
|
@@ -8520,7 +8534,7 @@ function ds(n) {
|
|
|
8520
8534
|
function hs(n, e) {
|
|
8521
8535
|
return `${n}_${e}`;
|
|
8522
8536
|
}
|
|
8523
|
-
function
|
|
8537
|
+
function Ec() {
|
|
8524
8538
|
const n = ["startRow", "startColumn", "endRow", "endColumn", "rangeType"], e = "_";
|
|
8525
8539
|
return {
|
|
8526
8540
|
deserialize: (t) => {
|
|
@@ -8542,12 +8556,12 @@ function yc() {
|
|
|
8542
8556
|
}, "")
|
|
8543
8557
|
};
|
|
8544
8558
|
}
|
|
8545
|
-
var
|
|
8546
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
8559
|
+
var Uc = Object.getOwnPropertyDescriptor, kc = (n, e, t, o) => {
|
|
8560
|
+
for (var s = o > 1 ? void 0 : o ? Uc(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
8547
8561
|
(i = n[r]) && (s = i(s) || s);
|
|
8548
8562
|
return s;
|
|
8549
8563
|
}, St = (n, e) => (t, o) => e(t, o, n);
|
|
8550
|
-
const
|
|
8564
|
+
const Tc = [We.id, je.id, ye.id, Ge.id], Pc = [it.id, at.id];
|
|
8551
8565
|
function ei(n, e) {
|
|
8552
8566
|
let t = n;
|
|
8553
8567
|
if (e !== void 0) {
|
|
@@ -8579,12 +8593,12 @@ function ei(n, e) {
|
|
|
8579
8593
|
}
|
|
8580
8594
|
return t;
|
|
8581
8595
|
}
|
|
8582
|
-
const
|
|
8596
|
+
const Nc = ut("mergeCellPermissionCheck");
|
|
8583
8597
|
let Pn = class extends ue {
|
|
8584
8598
|
constructor(e, t, o, s, r, i) {
|
|
8585
8599
|
super();
|
|
8586
8600
|
R(this, "disposableCollection", new Gt());
|
|
8587
|
-
R(this, "interceptor", new Ro({ MERGE_CELL_INTERCEPTOR_CHECK:
|
|
8601
|
+
R(this, "interceptor", new Ro({ MERGE_CELL_INTERCEPTOR_CHECK: Nc }));
|
|
8588
8602
|
this._commandService = e, this._refRangeService = t, this._univerInstanceService = o, this._injector = s, this._sheetInterceptorService = r, this._selectionManagerService = i, this._onRefRangeChange(), this._initCommandInterceptor(), this._commandExecutedListener();
|
|
8589
8603
|
}
|
|
8590
8604
|
_initCommandInterceptor() {
|
|
@@ -8600,7 +8614,7 @@ let Pn = class extends ue {
|
|
|
8600
8614
|
return { redos: [], undos: [] };
|
|
8601
8615
|
const a = i.getSheetId(), u = i.getConfig().mergeData, l = (o = e._selectionManagerService.getCurrentSelections()) == null ? void 0 : o.map((c) => c.range);
|
|
8602
8616
|
if (l && l.length > 0 && l.some(
|
|
8603
|
-
(d) => u.some((h) =>
|
|
8617
|
+
(d) => u.some((h) => N.intersects(h, d))
|
|
8604
8618
|
)) {
|
|
8605
8619
|
const d = {
|
|
8606
8620
|
unitId: r,
|
|
@@ -8625,7 +8639,7 @@ let Pn = class extends ue {
|
|
|
8625
8639
|
const u = k(this._univerInstanceService, { unitId: t, subUnitId: o });
|
|
8626
8640
|
if (!u)
|
|
8627
8641
|
return a;
|
|
8628
|
-
const { worksheet: l } = u, d = l.getMergeData().filter((h) => s.some((m) =>
|
|
8642
|
+
const { worksheet: l } = u, d = l.getMergeData().filter((h) => s.some((m) => N.intersects(h, m)));
|
|
8629
8643
|
return d.length ? (r.push({
|
|
8630
8644
|
id: oe.id,
|
|
8631
8645
|
params: {
|
|
@@ -8682,7 +8696,7 @@ let Pn = class extends ue {
|
|
|
8682
8696
|
const s = e.params;
|
|
8683
8697
|
return this._handleInsertRangeMoveDownCommand(s, t, o);
|
|
8684
8698
|
}
|
|
8685
|
-
case
|
|
8699
|
+
case Nt.id: {
|
|
8686
8700
|
const s = e.params;
|
|
8687
8701
|
return this._handleDeleteRangeMoveUpCommand(s, t, o);
|
|
8688
8702
|
}
|
|
@@ -8782,8 +8796,8 @@ let Pn = class extends ue {
|
|
|
8782
8796
|
const r = Ue(s, o);
|
|
8783
8797
|
if (!r)
|
|
8784
8798
|
return this._handleNull();
|
|
8785
|
-
const i = r.getMergeData(), a = i.filter((m) =>
|
|
8786
|
-
(m) => !i.some((g) =>
|
|
8799
|
+
const i = r.getMergeData(), a = i.filter((m) => N.intersects(m, e.fromRange)), u = i.filter((m) => N.intersects(m, e.toRange)), l = a.map((m) => N.getRelativeRange(m, e.fromRange)).map((m) => N.getPositionRange(m, e.toRange)), c = ei(l).filter(
|
|
8800
|
+
(m) => !i.some((g) => N.equals(m, g))
|
|
8787
8801
|
), d = [
|
|
8788
8802
|
{
|
|
8789
8803
|
id: oe.id,
|
|
@@ -8844,10 +8858,10 @@ let Pn = class extends ue {
|
|
|
8844
8858
|
const r = Ue(s, o);
|
|
8845
8859
|
if (!r)
|
|
8846
8860
|
return this._handleNull();
|
|
8847
|
-
const { range: i } = e, { startRow: a, endRow: u } = i, l =
|
|
8861
|
+
const { range: i } = e, { startRow: a, endRow: u } = i, l = O.deepClone(r.getMergeData()).reduce((C, S) => (a > S.startRow && a <= S.endRow && C.push(S), C), []);
|
|
8848
8862
|
if (l.length === 0)
|
|
8849
8863
|
return this._handleNull();
|
|
8850
|
-
const c =
|
|
8864
|
+
const c = O.deepClone(r.getMergeData()).reduce((C, S) => {
|
|
8851
8865
|
if (a > S.startRow && a <= S.endRow) {
|
|
8852
8866
|
const I = u - a + 1;
|
|
8853
8867
|
S.endRow += I, this._checkIsMergeCell(S) && C.push(S);
|
|
@@ -8883,10 +8897,10 @@ let Pn = class extends ue {
|
|
|
8883
8897
|
const i = Ue(r, o);
|
|
8884
8898
|
if (!i)
|
|
8885
8899
|
return this._handleNull();
|
|
8886
|
-
const { startColumn: a, endColumn: u } = s, l =
|
|
8900
|
+
const { startColumn: a, endColumn: u } = s, l = O.deepClone(i.getMergeData()).reduce((C, S) => (a > S.startColumn && a <= S.endColumn && C.push(S), C), []);
|
|
8887
8901
|
if (l.length === 0)
|
|
8888
8902
|
return this._handleNull();
|
|
8889
|
-
const c =
|
|
8903
|
+
const c = O.deepClone(i.getMergeData()).reduce((C, S) => {
|
|
8890
8904
|
if (a > S.startColumn && a <= S.endColumn) {
|
|
8891
8905
|
const I = u - a + 1;
|
|
8892
8906
|
S.endColumn += I, this._checkIsMergeCell(S) && C.push(S);
|
|
@@ -8922,11 +8936,11 @@ let Pn = class extends ue {
|
|
|
8922
8936
|
const r = Ue(s, o);
|
|
8923
8937
|
if (!r)
|
|
8924
8938
|
return this._handleNull();
|
|
8925
|
-
const { range: i } = e, { startColumn: a, endColumn: u } = i, l =
|
|
8939
|
+
const { range: i } = e, { startColumn: a, endColumn: u } = i, l = O.deepClone(r.getMergeData()).reduce((I, w) => (N.intersects(i, w) && I.push(w), I), []);
|
|
8926
8940
|
if (l.length === 0)
|
|
8927
8941
|
return this._handleNull();
|
|
8928
|
-
const c =
|
|
8929
|
-
if (
|
|
8942
|
+
const c = O.deepClone(r.getMergeData()).reduce((I, w) => {
|
|
8943
|
+
if (N.intersects(i, w)) {
|
|
8930
8944
|
if (a <= w.startColumn && u >= w.endColumn)
|
|
8931
8945
|
return I;
|
|
8932
8946
|
a >= w.startColumn && u <= w.endColumn ? w.endColumn -= u - a + 1 : a < w.startColumn ? (w.startColumn = a, w.endColumn -= u - a + 1) : u > w.endColumn && (w.endColumn = a - 1), this._checkIsMergeCell(w) && I.push(w);
|
|
@@ -8956,11 +8970,11 @@ let Pn = class extends ue {
|
|
|
8956
8970
|
const i = Ue(r, o);
|
|
8957
8971
|
if (!i)
|
|
8958
8972
|
return this._handleNull();
|
|
8959
|
-
const { startRow: a, endRow: u } = s, l =
|
|
8973
|
+
const { startRow: a, endRow: u } = s, l = O.deepClone(i.getMergeData()).reduce((I, w) => (N.intersects(s, w) && I.push(w), I), []);
|
|
8960
8974
|
if (l.length === 0)
|
|
8961
8975
|
return this._handleNull();
|
|
8962
|
-
const c =
|
|
8963
|
-
if (
|
|
8976
|
+
const c = O.deepClone(i.getMergeData()).reduce((I, w) => {
|
|
8977
|
+
if (N.intersects(s, w)) {
|
|
8964
8978
|
if (a <= w.startRow && u >= w.endRow)
|
|
8965
8979
|
return I;
|
|
8966
8980
|
a >= w.startRow && u <= w.endRow ? w.endRow -= u - a + 1 : a < w.startRow ? (w.startRow = a, w.endRow -= u - a + 1) : u > w.endRow && (w.endRow = a - 1), this._checkIsMergeCell(w) && I.push(w);
|
|
@@ -8993,7 +9007,7 @@ let Pn = class extends ue {
|
|
|
8993
9007
|
const i = e.range, a = r.getMaxColumns() - 1, u = r.getMergeData(), l = [], c = [];
|
|
8994
9008
|
u.forEach((f) => {
|
|
8995
9009
|
const { startRow: p, endRow: C, startColumn: S, endColumn: I } = i;
|
|
8996
|
-
if (
|
|
9010
|
+
if (N.intersects(
|
|
8997
9011
|
{
|
|
8998
9012
|
startRow: p,
|
|
8999
9013
|
startColumn: S,
|
|
@@ -9001,7 +9015,7 @@ let Pn = class extends ue {
|
|
|
9001
9015
|
endColumn: a
|
|
9002
9016
|
},
|
|
9003
9017
|
f
|
|
9004
|
-
) && (l.push(f),
|
|
9018
|
+
) && (l.push(f), N.contains(
|
|
9005
9019
|
{
|
|
9006
9020
|
startRow: p,
|
|
9007
9021
|
startColumn: S,
|
|
@@ -9065,7 +9079,7 @@ let Pn = class extends ue {
|
|
|
9065
9079
|
const i = e.range, a = r.getMaxRows() - 1, u = r.getMergeData(), l = [], c = [];
|
|
9066
9080
|
u.forEach((I) => {
|
|
9067
9081
|
const { startRow: w, startColumn: y, endColumn: b, endRow: D } = i;
|
|
9068
|
-
if (
|
|
9082
|
+
if (N.intersects({ startRow: w, startColumn: y, endRow: a, endColumn: b }, I) && (l.push(I), N.contains({ startRow: w, startColumn: y, endRow: a, endColumn: b }, I))) {
|
|
9069
9083
|
const U = D - w + 1;
|
|
9070
9084
|
c.push({
|
|
9071
9085
|
startRow: I.startRow + U,
|
|
@@ -9122,8 +9136,8 @@ let Pn = class extends ue {
|
|
|
9122
9136
|
const i = e.range, a = r.getMaxRows() - 1, u = r.getMergeData(), l = [], c = [];
|
|
9123
9137
|
u.forEach((I) => {
|
|
9124
9138
|
const { startRow: w, startColumn: y, endColumn: b, endRow: D } = i;
|
|
9125
|
-
if (
|
|
9126
|
-
const U = D - w + 1, x =
|
|
9139
|
+
if (N.intersects({ startRow: w, startColumn: y, endRow: a, endColumn: b }, I) && (l.push(I), N.contains({ startRow: w, startColumn: y, endRow: a, endColumn: b }, I))) {
|
|
9140
|
+
const U = D - w + 1, x = N.moveVertical(I, -U);
|
|
9127
9141
|
c.push(x);
|
|
9128
9142
|
}
|
|
9129
9143
|
});
|
|
@@ -9174,7 +9188,7 @@ let Pn = class extends ue {
|
|
|
9174
9188
|
const i = e.range, a = r.getMaxColumns() - 1, u = r.getMergeData(), l = [], c = [];
|
|
9175
9189
|
u.forEach((f) => {
|
|
9176
9190
|
const { startRow: p, endRow: C, startColumn: S, endColumn: I } = i;
|
|
9177
|
-
if (
|
|
9191
|
+
if (N.intersects(
|
|
9178
9192
|
{
|
|
9179
9193
|
startRow: p,
|
|
9180
9194
|
startColumn: S,
|
|
@@ -9182,7 +9196,7 @@ let Pn = class extends ue {
|
|
|
9182
9196
|
endColumn: a
|
|
9183
9197
|
},
|
|
9184
9198
|
f
|
|
9185
|
-
) && (l.push(f),
|
|
9199
|
+
) && (l.push(f), N.contains(
|
|
9186
9200
|
{
|
|
9187
9201
|
startRow: p,
|
|
9188
9202
|
startColumn: S,
|
|
@@ -9238,7 +9252,7 @@ let Pn = class extends ue {
|
|
|
9238
9252
|
}
|
|
9239
9253
|
_commandExecutedListener() {
|
|
9240
9254
|
this.disposeWithMe(this._commandService.onCommandExecuted((e) => {
|
|
9241
|
-
if (
|
|
9255
|
+
if (Pc.includes(e.id)) {
|
|
9242
9256
|
if (!e.params) return;
|
|
9243
9257
|
const t = this._univerInstanceService.getUniverSheetInstance(e.params.unitId);
|
|
9244
9258
|
if (!t) return;
|
|
@@ -9247,14 +9261,14 @@ let Pn = class extends ue {
|
|
|
9247
9261
|
const { sourceRange: s, targetRange: r } = e.params, i = s.startColumn === r.startColumn && s.endColumn === r.endColumn, a = i ? s.endRow - s.startRow + 1 : s.endColumn - s.startColumn + 1, u = i ? s.startRow : s.startColumn, l = i ? r.startRow : r.startColumn, c = o.getConfig().mergeData, d = [];
|
|
9248
9262
|
c.forEach((f) => {
|
|
9249
9263
|
let { startRow: p, endRow: C, startColumn: S, endColumn: I, rangeType: w } = f;
|
|
9250
|
-
|
|
9264
|
+
N.intersects(f, s) || (i ? u < p && l > C ? (p -= a, C -= a) : u > C && l <= p && (p += a, C += a) : u < S && l > I ? (S -= a, I -= a) : u > I && l <= S && (S += a, I += a)), f.startRow === f.endRow && f.startColumn === f.endColumn || d.push({ startRow: p, endRow: C, startColumn: S, endColumn: I, rangeType: w });
|
|
9251
9265
|
}), o.setMergeData(d), this.disposableCollection.dispose();
|
|
9252
9266
|
const { unitId: h, subUnitId: m } = e.params, g = (f) => this.refRangeHandle(f, h, m);
|
|
9253
9267
|
d.forEach((f) => {
|
|
9254
9268
|
this.disposableCollection.add(this._refRangeService.registerRefRange(f, g, h, m));
|
|
9255
9269
|
});
|
|
9256
9270
|
}
|
|
9257
|
-
if (
|
|
9271
|
+
if (Tc.includes(e.id)) {
|
|
9258
9272
|
const t = this._univerInstanceService.getUniverSheetInstance(e.params.unitId);
|
|
9259
9273
|
if (!t) return;
|
|
9260
9274
|
const o = t.getSheetBySheetId(e.params.subUnitId);
|
|
@@ -9274,7 +9288,7 @@ let Pn = class extends ue {
|
|
|
9274
9288
|
}));
|
|
9275
9289
|
}
|
|
9276
9290
|
};
|
|
9277
|
-
Pn =
|
|
9291
|
+
Pn = kc([
|
|
9278
9292
|
St(0, $(E)),
|
|
9279
9293
|
St(1, $(Et)),
|
|
9280
9294
|
St(2, $(M)),
|
|
@@ -9288,12 +9302,12 @@ function Ee(n, e) {
|
|
|
9288
9302
|
function Ue(n, e) {
|
|
9289
9303
|
return e ? n.getSheetBySheetId(e) : n.getActiveSheet();
|
|
9290
9304
|
}
|
|
9291
|
-
var
|
|
9292
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
9305
|
+
var Oc = Object.getOwnPropertyDescriptor, Dc = (n, e, t, o) => {
|
|
9306
|
+
for (var s = o > 1 ? void 0 : o ? Oc(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
9293
9307
|
(i = n[r]) && (s = i(s) || s);
|
|
9294
9308
|
return s;
|
|
9295
|
-
},
|
|
9296
|
-
let
|
|
9309
|
+
}, Ac = (n, e) => (t, o) => e(t, o, n);
|
|
9310
|
+
let Nn = class extends ue {
|
|
9297
9311
|
constructor(n) {
|
|
9298
9312
|
super(), this._sheetInterceptorService = n, this._initialize();
|
|
9299
9313
|
}
|
|
@@ -9317,15 +9331,15 @@ let On = class extends ue {
|
|
|
9317
9331
|
);
|
|
9318
9332
|
}
|
|
9319
9333
|
};
|
|
9320
|
-
|
|
9321
|
-
|
|
9322
|
-
],
|
|
9323
|
-
var
|
|
9324
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
9334
|
+
Nn = Dc([
|
|
9335
|
+
Ac(0, $(F))
|
|
9336
|
+
], Nn);
|
|
9337
|
+
var xc = Object.getOwnPropertyDescriptor, Wc = (n, e, t, o) => {
|
|
9338
|
+
for (var s = o > 1 ? void 0 : o ? xc(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
9325
9339
|
(i = n[r]) && (s = i(s) || s);
|
|
9326
9340
|
return s;
|
|
9327
9341
|
}, Ve = (n, e) => (t, o) => e(t, o, n);
|
|
9328
|
-
let
|
|
9342
|
+
let On = class extends ue {
|
|
9329
9343
|
constructor(e, t, o, s, r, i, a, u, l, c) {
|
|
9330
9344
|
super();
|
|
9331
9345
|
R(this, "disposableCollection", new Gt());
|
|
@@ -9342,15 +9356,15 @@ let Nn = class extends ue {
|
|
|
9342
9356
|
case sn.id:
|
|
9343
9357
|
Es(t.value) && t.value.f ? (o = this._permissionCheckWithFormula(t), s = this._localeService.t("permission.dialog.formulaErr")) : o = this._permissionCheckBySetRangeValue({
|
|
9344
9358
|
workbookTypes: [Me],
|
|
9345
|
-
rangeTypes: [
|
|
9346
|
-
worksheetTypes: [In,
|
|
9359
|
+
rangeTypes: [Ne],
|
|
9360
|
+
worksheetTypes: [In, Oe]
|
|
9347
9361
|
}, t);
|
|
9348
9362
|
break;
|
|
9349
9363
|
case vo.id:
|
|
9350
9364
|
o = this.permissionCheckWithRanges({
|
|
9351
9365
|
workbookTypes: [Me],
|
|
9352
|
-
rangeTypes: [
|
|
9353
|
-
worksheetTypes: [In,
|
|
9366
|
+
rangeTypes: [Ne],
|
|
9367
|
+
worksheetTypes: [In, Oe]
|
|
9354
9368
|
}), s = this._localeService.t("permission.dialog.editErr");
|
|
9355
9369
|
break;
|
|
9356
9370
|
case xo.id:
|
|
@@ -9388,29 +9402,29 @@ let Nn = class extends ue {
|
|
|
9388
9402
|
case Xn.id:
|
|
9389
9403
|
o = this.permissionCheckWithRanges({
|
|
9390
9404
|
workbookTypes: [Me],
|
|
9391
|
-
rangeTypes: [
|
|
9392
|
-
worksheetTypes: [
|
|
9405
|
+
rangeTypes: [Ne],
|
|
9406
|
+
worksheetTypes: [Oe, $t]
|
|
9393
9407
|
}, t.ranges), s = this._localeService.t("permission.dialog.setRowColStyleErr");
|
|
9394
9408
|
break;
|
|
9395
9409
|
case Zn.id:
|
|
9396
9410
|
o = this.permissionCheckWithRanges({
|
|
9397
9411
|
workbookTypes: [Me],
|
|
9398
|
-
rangeTypes: [
|
|
9399
|
-
worksheetTypes: [
|
|
9412
|
+
rangeTypes: [Ne],
|
|
9413
|
+
worksheetTypes: [Oe, Vt]
|
|
9400
9414
|
}, t.ranges), s = this._localeService.t("permission.dialog.setRowColStyleErr");
|
|
9401
9415
|
break;
|
|
9402
9416
|
case Er.id:
|
|
9403
9417
|
o = this.permissionCheckWithRanges({
|
|
9404
9418
|
workbookTypes: [Me],
|
|
9405
|
-
rangeTypes: [
|
|
9406
|
-
worksheetTypes: [
|
|
9419
|
+
rangeTypes: [Ne],
|
|
9420
|
+
worksheetTypes: [Oe, $t]
|
|
9407
9421
|
}), s = this._localeService.t("permission.dialog.setRowColStyleErr");
|
|
9408
9422
|
break;
|
|
9409
|
-
case
|
|
9423
|
+
case Nr.id:
|
|
9410
9424
|
o = this.permissionCheckWithRanges({
|
|
9411
9425
|
workbookTypes: [Me],
|
|
9412
|
-
rangeTypes: [
|
|
9413
|
-
worksheetTypes: [
|
|
9426
|
+
rangeTypes: [Ne],
|
|
9427
|
+
worksheetTypes: [Oe, Vt]
|
|
9414
9428
|
}), s = this._localeService.t("permission.dialog.setRowColStyleErr");
|
|
9415
9429
|
break;
|
|
9416
9430
|
case zn.id:
|
|
@@ -9422,7 +9436,7 @@ let Nn = class extends ue {
|
|
|
9422
9436
|
case Pt.id:
|
|
9423
9437
|
o = this._permissionCheckWithInsertRangeMove("left"), s = this._localeService.t("permission.dialog.insertOrDeleteMoveRangeErr");
|
|
9424
9438
|
break;
|
|
9425
|
-
case
|
|
9439
|
+
case Nt.id:
|
|
9426
9440
|
o = this._permissionCheckWithInsertRangeMove("top"), s = this._localeService.t("permission.dialog.insertOrDeleteMoveRangeErr");
|
|
9427
9441
|
break;
|
|
9428
9442
|
}
|
|
@@ -9454,8 +9468,8 @@ let Nn = class extends ue {
|
|
|
9454
9468
|
const t = k(this._univerInstanceService);
|
|
9455
9469
|
if (!t)
|
|
9456
9470
|
return !1;
|
|
9457
|
-
const { worksheet: o, unitId: s, subUnitId: r } = t, i =
|
|
9458
|
-
return !(!i || (e === "top" || e === "bottom" ? i.endRow = o.getRowCount() - 1 : (e === "left" || e === "right") && (i.endColumn = o.getColumnCount() - 1), this._rangeProtectionRuleModel.getSubunitRuleList(s, r).map((c) => c.ranges).flat().some((c) =>
|
|
9471
|
+
const { worksheet: o, unitId: s, subUnitId: r } = t, i = O.deepClone((l = this._selectionManagerService.getCurrentLastSelection()) == null ? void 0 : l.range);
|
|
9472
|
+
return !(!i || (e === "top" || e === "bottom" ? i.endRow = o.getRowCount() - 1 : (e === "left" || e === "right") && (i.endColumn = o.getColumnCount() - 1), this._rangeProtectionRuleModel.getSubunitRuleList(s, r).map((c) => c.ranges).flat().some((c) => N.getIntersects(i, c))));
|
|
9459
9473
|
}
|
|
9460
9474
|
_permissionCheckByWorksheetCommand(e, t, o) {
|
|
9461
9475
|
var l, c;
|
|
@@ -9506,7 +9520,7 @@ let Nn = class extends ue {
|
|
|
9506
9520
|
return !1;
|
|
9507
9521
|
const { workbookTypes: l, worksheetTypes: c, rangeTypes: d } = e, h = [];
|
|
9508
9522
|
return l && h.push(...l.map((g) => new g(o).id)), c && h.push(...c.map((g) => new g(o, s).id)), d && this._rangeProtectionRuleModel.getSubunitRuleList(o, s).forEach((g) => {
|
|
9509
|
-
u.some((p) => g.ranges.some((C) =>
|
|
9523
|
+
u.some((p) => g.ranges.some((C) => N.intersects(C, p))) && h.push(...d.map((p) => new p(o, s, g.permissionId).id));
|
|
9510
9524
|
}), h.length ? this._permissionService.composePermission(h).every((g) => g.value) : !0;
|
|
9511
9525
|
}
|
|
9512
9526
|
_permissionCheckByMoveCommand(e) {
|
|
@@ -9515,7 +9529,7 @@ let Nn = class extends ue {
|
|
|
9515
9529
|
return !1;
|
|
9516
9530
|
const { worksheet: o, unitId: s, subUnitId: r } = t, i = e.toRange;
|
|
9517
9531
|
i.endRow === o.getRowCount() - 1 ? i.endColumn = i.startColumn : i.endRow = i.startRow;
|
|
9518
|
-
const a = this._rangeProtectionRuleModel.getSubunitRuleList(s, r).reduce((u, l) => [...u, ...l.ranges], []).filter((u) =>
|
|
9532
|
+
const a = this._rangeProtectionRuleModel.getSubunitRuleList(s, r).reduce((u, l) => [...u, ...l.ranges], []).filter((u) => N.intersects(u, i));
|
|
9519
9533
|
return a.length > 0 ? !1 : (a.forEach((u) => {
|
|
9520
9534
|
var l, c;
|
|
9521
9535
|
for (let d = u.startRow; d <= u.endRow; d++)
|
|
@@ -9530,7 +9544,7 @@ let Nn = class extends ue {
|
|
|
9530
9544
|
const t = k(this._univerInstanceService);
|
|
9531
9545
|
if (!t)
|
|
9532
9546
|
return !1;
|
|
9533
|
-
const { worksheet: o, unitId: s, subUnitId: r } = t, i = e.toRange, a = this._rangeProtectionRuleModel.getSubunitRuleList(s, r).reduce((u, l) => [...u, ...l.ranges], []).filter((u) =>
|
|
9547
|
+
const { worksheet: o, unitId: s, subUnitId: r } = t, i = e.toRange, a = this._rangeProtectionRuleModel.getSubunitRuleList(s, r).reduce((u, l) => [...u, ...l.ranges], []).filter((u) => N.intersects(u, i));
|
|
9534
9548
|
return a.length > 0 ? !1 : (a.forEach((u) => {
|
|
9535
9549
|
var l, c;
|
|
9536
9550
|
for (let d = u.startRow; d <= u.endRow; d++)
|
|
@@ -9607,14 +9621,14 @@ let Nn = class extends ue {
|
|
|
9607
9621
|
const c = k(this._univerInstanceService);
|
|
9608
9622
|
if (!c)
|
|
9609
9623
|
return !1;
|
|
9610
|
-
const d = e.unitId || c.unitId, h = e.subUnitId || c.subUnitId, g = this._rangeProtectionRuleModel.getSubunitRuleList(d, h).filter((p) => p.ranges.some((C) =>
|
|
9624
|
+
const d = e.unitId || c.unitId, h = e.subUnitId || c.subUnitId, g = this._rangeProtectionRuleModel.getSubunitRuleList(d, h).filter((p) => p.ranges.some((C) => N.intersects(C, o))).map((p) => new Ne(d, h, p.permissionId).id);
|
|
9611
9625
|
if (!this._permissionService.composePermission(g).every((p) => p.value))
|
|
9612
9626
|
return !1;
|
|
9613
9627
|
}
|
|
9614
9628
|
return !0;
|
|
9615
9629
|
}
|
|
9616
9630
|
};
|
|
9617
|
-
|
|
9631
|
+
On = Wc([
|
|
9618
9632
|
Ve(0, E),
|
|
9619
9633
|
Ve(1, M),
|
|
9620
9634
|
Ve(2, Fe),
|
|
@@ -9624,10 +9638,10 @@ Nn = Ac([
|
|
|
9624
9638
|
Ve(6, $(Ye)),
|
|
9625
9639
|
Ve(7, $($i)),
|
|
9626
9640
|
Ve(8, ys),
|
|
9627
|
-
Ve(9,
|
|
9628
|
-
],
|
|
9629
|
-
var
|
|
9630
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
9641
|
+
Ve(9, Ns)
|
|
9642
|
+
], On);
|
|
9643
|
+
var $c = Object.getOwnPropertyDescriptor, Vc = (n, e, t, o) => {
|
|
9644
|
+
for (var s = o > 1 ? void 0 : o ? $c(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
9631
9645
|
(i = n[r]) && (s = i(s) || s);
|
|
9632
9646
|
return s;
|
|
9633
9647
|
}, io = (n, e) => (t, o) => e(t, o, n);
|
|
@@ -9726,7 +9740,7 @@ let Rt = class extends ue {
|
|
|
9726
9740
|
}
|
|
9727
9741
|
_getSelectionActions(e, t, o) {
|
|
9728
9742
|
var l, c, d, h, m, g, f, p, C, S, I, w;
|
|
9729
|
-
const s = (d = (c = this._permissionService.getPermissionPoint((l = new
|
|
9743
|
+
const s = (d = (c = this._permissionService.getPermissionPoint((l = new Ne(e, t, o.permissionId)) == null ? void 0 : l.id)) == null ? void 0 : c.value) != null ? d : !0, r = (g = (m = this._permissionService.getPermissionPoint((h = new yo(e, t, o.permissionId)) == null ? void 0 : h.id)) == null ? void 0 : m.value) != null ? g : !0, i = (C = (p = this._permissionService.getPermissionPoint((f = new Br(e, t, o.permissionId)) == null ? void 0 : f.id)) == null ? void 0 : p.value) != null ? C : !1, a = (w = (I = this._permissionService.getPermissionPoint((S = new Hr(e, t, o.permissionId)) == null ? void 0 : S.id)) == null ? void 0 : I.value) != null ? w : !1;
|
|
9730
9744
|
return {
|
|
9731
9745
|
[_.Edit]: s,
|
|
9732
9746
|
[_.View]: r,
|
|
@@ -9855,13 +9869,13 @@ let Rt = class extends ue {
|
|
|
9855
9869
|
});
|
|
9856
9870
|
}
|
|
9857
9871
|
};
|
|
9858
|
-
Rt =
|
|
9872
|
+
Rt = Vc([
|
|
9859
9873
|
io(0, $(me)),
|
|
9860
9874
|
io(1, $(Fe)),
|
|
9861
9875
|
io(2, $(M))
|
|
9862
9876
|
], Rt);
|
|
9863
|
-
var
|
|
9864
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
9877
|
+
var Lc = Object.getOwnPropertyDescriptor, Hc = (n, e, t, o) => {
|
|
9878
|
+
for (var s = o > 1 ? void 0 : o ? Lc(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
9865
9879
|
(i = n[r]) && (s = i(s) || s);
|
|
9866
9880
|
return s;
|
|
9867
9881
|
}, ke = (n, e) => (t, o) => e(t, o, n);
|
|
@@ -9933,7 +9947,7 @@ let Dn = class extends ue {
|
|
|
9933
9947
|
objectID: e,
|
|
9934
9948
|
objectType: A.Workbook,
|
|
9935
9949
|
unitID: e,
|
|
9936
|
-
actions:
|
|
9950
|
+
actions: Sl
|
|
9937
9951
|
}).then((o) => {
|
|
9938
9952
|
tn().forEach((s) => {
|
|
9939
9953
|
const r = new s(e), i = r.subType, a = o.find((u) => u.action === i);
|
|
@@ -10018,7 +10032,7 @@ let Dn = class extends ue {
|
|
|
10018
10032
|
_initUserChange() {
|
|
10019
10033
|
this.disposeWithMe(
|
|
10020
10034
|
// When the user changes, the permission points are updated. The first modification needs to be filtered here because it is a Behavior type, but in fact the user information is ready when this controller is initialized.
|
|
10021
|
-
this._userManagerService.currentUser$.pipe(
|
|
10035
|
+
this._userManagerService.currentUser$.pipe(Os(1)).subscribe(() => {
|
|
10022
10036
|
const n = this._permissionService.getAllPermissionPoint();
|
|
10023
10037
|
this._permissionService.clearPermissionMap(), this._worksheetProtectionRuleModel.changeRuleInitState(!1), this._univerInstanceService.getAllUnitsForType(B.UNIVER_SHEET).forEach((t) => {
|
|
10024
10038
|
const o = t.getUnitId();
|
|
@@ -10105,7 +10119,7 @@ let Dn = class extends ue {
|
|
|
10105
10119
|
);
|
|
10106
10120
|
}
|
|
10107
10121
|
};
|
|
10108
|
-
Dn =
|
|
10122
|
+
Dn = Hc([
|
|
10109
10123
|
ke(0, M),
|
|
10110
10124
|
ke(1, Fe),
|
|
10111
10125
|
ke(2, vi),
|
|
@@ -10118,8 +10132,8 @@ Dn = Vc([
|
|
|
10118
10132
|
ke(9, $(E)),
|
|
10119
10133
|
ke(10, $(Rt))
|
|
10120
10134
|
], Dn);
|
|
10121
|
-
var
|
|
10122
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
10135
|
+
var Bc = Object.getOwnPropertyDescriptor, Fc = (n, e, t, o) => {
|
|
10136
|
+
for (var s = o > 1 ? void 0 : o ? Bc(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
10123
10137
|
(i = n[r]) && (s = i(s) || s);
|
|
10124
10138
|
return s;
|
|
10125
10139
|
}, mn = (n, e) => (t, o) => e(t, o, n);
|
|
@@ -10153,7 +10167,7 @@ let An = class extends ue {
|
|
|
10153
10167
|
if (r != null && r.permissionId) {
|
|
10154
10168
|
const d = [{
|
|
10155
10169
|
[_.View]: (a = (i = this._permissionService.getPermissionPoint(new Gn(o, s).id)) == null ? void 0 : i.value) != null ? a : !1,
|
|
10156
|
-
[_.Edit]: (l = (u = this._permissionService.getPermissionPoint(new
|
|
10170
|
+
[_.Edit]: (l = (u = this._permissionService.getPermissionPoint(new Oe(o, s).id)) == null ? void 0 : u.value) != null ? l : !1
|
|
10157
10171
|
}], h = !((c = d[0]) != null && c[_.View]), m = { ...n, hasWorksheetRule: !0, selectionProtection: d };
|
|
10158
10172
|
return h ? (delete m.s, delete m.v, delete m.p, m) : t(m);
|
|
10159
10173
|
}
|
|
@@ -10162,14 +10176,14 @@ let An = class extends ue {
|
|
|
10162
10176
|
}));
|
|
10163
10177
|
}
|
|
10164
10178
|
};
|
|
10165
|
-
An =
|
|
10179
|
+
An = Fc([
|
|
10166
10180
|
mn(0, Fe),
|
|
10167
10181
|
mn(1, $(Xe)),
|
|
10168
10182
|
mn(2, $(F)),
|
|
10169
10183
|
mn(3, $(Rt))
|
|
10170
10184
|
], An);
|
|
10171
|
-
var
|
|
10172
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
10185
|
+
var jc = Object.getOwnPropertyDescriptor, Gc = (n, e, t, o) => {
|
|
10186
|
+
for (var s = o > 1 ? void 0 : o ? jc(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
10173
10187
|
(i = n[r]) && (s = i(s) || s);
|
|
10174
10188
|
return s;
|
|
10175
10189
|
}, ms = (n, e) => (t, o) => e(t, o, n);
|
|
@@ -10233,12 +10247,12 @@ let nn = class {
|
|
|
10233
10247
|
this._cache.clear();
|
|
10234
10248
|
}
|
|
10235
10249
|
};
|
|
10236
|
-
nn =
|
|
10250
|
+
nn = Gc([
|
|
10237
10251
|
ms(0, $(me)),
|
|
10238
10252
|
ms(1, $(Fe))
|
|
10239
10253
|
], nn);
|
|
10240
10254
|
const gs = So("univer.exclusive-range-service");
|
|
10241
|
-
class
|
|
10255
|
+
class zc extends ue {
|
|
10242
10256
|
constructor() {
|
|
10243
10257
|
super(...arguments);
|
|
10244
10258
|
/**
|
|
@@ -10292,7 +10306,7 @@ class jc extends ue {
|
|
|
10292
10306
|
const d = u.get(c);
|
|
10293
10307
|
if (d) {
|
|
10294
10308
|
for (const h of d)
|
|
10295
|
-
if (
|
|
10309
|
+
if (N.intersects(r, h.range)) {
|
|
10296
10310
|
o.push(c);
|
|
10297
10311
|
break;
|
|
10298
10312
|
}
|
|
@@ -10301,8 +10315,8 @@ class jc extends ue {
|
|
|
10301
10315
|
}), o;
|
|
10302
10316
|
}
|
|
10303
10317
|
}
|
|
10304
|
-
var
|
|
10305
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
10318
|
+
var Kc = Object.getOwnPropertyDescriptor, Jc = (n, e, t, o) => {
|
|
10319
|
+
for (var s = o > 1 ? void 0 : o ? Kc(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
10306
10320
|
(i = n[r]) && (s = i(s) || s);
|
|
10307
10321
|
return s;
|
|
10308
10322
|
}, ao = (n, e) => (t, o) => e(t, o, n);
|
|
@@ -10369,13 +10383,13 @@ let go = class extends ue {
|
|
|
10369
10383
|
});
|
|
10370
10384
|
}
|
|
10371
10385
|
};
|
|
10372
|
-
go =
|
|
10386
|
+
go = Jc([
|
|
10373
10387
|
ao(0, on),
|
|
10374
10388
|
ao(1, M),
|
|
10375
10389
|
ao(2, Ts)
|
|
10376
10390
|
], go);
|
|
10377
|
-
var
|
|
10378
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
10391
|
+
var Yc = Object.getOwnPropertyDescriptor, qc = (n, e, t, o) => {
|
|
10392
|
+
for (var s = o > 1 ? void 0 : o ? Yc(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
10379
10393
|
(i = n[r]) && (s = i(s) || s);
|
|
10380
10394
|
return s;
|
|
10381
10395
|
}, nt = (n, e) => (t, o) => e(t, o, n);
|
|
@@ -10438,13 +10452,13 @@ let xn = class extends ue {
|
|
|
10438
10452
|
return { redos: [], undos: [] };
|
|
10439
10453
|
}
|
|
10440
10454
|
_getRefRangeMutationsByDeleteCols(e, t, o) {
|
|
10441
|
-
const s = this._selectionProtectionRuleModel.getSubunitRuleList(t, o).filter((i) => i.ranges.some((a) =>
|
|
10455
|
+
const s = this._selectionProtectionRuleModel.getSubunitRuleList(t, o).filter((i) => i.ranges.some((a) => N.intersects(a, e.range))), r = e.range;
|
|
10442
10456
|
if (s.length) {
|
|
10443
10457
|
const i = [], a = [];
|
|
10444
10458
|
return s.forEach((u) => {
|
|
10445
|
-
const l =
|
|
10446
|
-
if (
|
|
10447
|
-
const m =
|
|
10459
|
+
const l = O.deepClone(u), c = l.ranges.reduce((d, h) => {
|
|
10460
|
+
if (N.intersects(h, r)) {
|
|
10461
|
+
const m = O.deepClone(h), { startColumn: g, endColumn: f } = r;
|
|
10448
10462
|
if (g <= m.startColumn && f >= m.endColumn)
|
|
10449
10463
|
return d;
|
|
10450
10464
|
g >= m.startColumn && f <= m.endColumn ? m.endColumn -= f - g + 1 : g < m.startColumn ? (m.startColumn = g, m.endColumn -= f - g + 1) : f > m.endColumn && (m.endColumn = g - 1), this._checkIsRightRange(m) && d.push(m);
|
|
@@ -10457,13 +10471,13 @@ let xn = class extends ue {
|
|
|
10457
10471
|
return { undos: [], redos: [] };
|
|
10458
10472
|
}
|
|
10459
10473
|
_getRefRangeMutationsByDeleteRows(e, t, o) {
|
|
10460
|
-
const s = this._selectionProtectionRuleModel.getSubunitRuleList(t, o).filter((i) => i.ranges.some((a) =>
|
|
10474
|
+
const s = this._selectionProtectionRuleModel.getSubunitRuleList(t, o).filter((i) => i.ranges.some((a) => N.intersects(a, e.range))), r = e.range;
|
|
10461
10475
|
if (s.length) {
|
|
10462
10476
|
const i = [], a = [];
|
|
10463
10477
|
return s.forEach((u) => {
|
|
10464
|
-
const l =
|
|
10465
|
-
if (
|
|
10466
|
-
const m =
|
|
10478
|
+
const l = O.deepClone(u), c = l.ranges.reduce((d, h) => {
|
|
10479
|
+
if (N.intersects(h, r)) {
|
|
10480
|
+
const m = O.deepClone(h), { startRow: g, endRow: f } = r;
|
|
10467
10481
|
if (g <= m.startRow && f >= m.endRow)
|
|
10468
10482
|
return d;
|
|
10469
10483
|
g >= m.startRow && f <= m.endRow ? m.endRow -= f - g + 1 : g < m.startRow ? (m.startRow = g, m.endRow -= f - g + 1) : f > m.endRow && (m.endRow = g - 1), this._checkIsRightRange(m) && d.push(m);
|
|
@@ -10480,7 +10494,7 @@ let xn = class extends ue {
|
|
|
10480
10494
|
if (i.length) {
|
|
10481
10495
|
const a = [], u = [];
|
|
10482
10496
|
return i.forEach((l) => {
|
|
10483
|
-
const c =
|
|
10497
|
+
const c = O.deepClone(l);
|
|
10484
10498
|
let d = !1;
|
|
10485
10499
|
c.ranges.forEach((h) => {
|
|
10486
10500
|
s > h.startColumn && s <= h.endColumn && (h.endColumn += r, d = !0);
|
|
@@ -10494,7 +10508,7 @@ let xn = class extends ue {
|
|
|
10494
10508
|
if (i.length) {
|
|
10495
10509
|
const a = [], u = [];
|
|
10496
10510
|
return i.forEach((l) => {
|
|
10497
|
-
const c =
|
|
10511
|
+
const c = O.deepClone(l);
|
|
10498
10512
|
let d = !1;
|
|
10499
10513
|
c.ranges.forEach((h) => {
|
|
10500
10514
|
s > h.startRow && s <= h.endRow && (h.endRow += r, d = !0);
|
|
@@ -10508,7 +10522,7 @@ let xn = class extends ue {
|
|
|
10508
10522
|
if (a.length) {
|
|
10509
10523
|
const u = [], l = [];
|
|
10510
10524
|
return a.forEach((c) => {
|
|
10511
|
-
const d =
|
|
10525
|
+
const d = O.deepClone(c), m = e.fromRange.startRow;
|
|
10512
10526
|
let g = !1;
|
|
10513
10527
|
d.ranges.forEach((f) => {
|
|
10514
10528
|
r > f.startRow && r <= f.endRow && (m < f.startRow && (f.startRow = f.startRow - i, f.endRow = f.endRow - i), f.endRow += i, g = !0);
|
|
@@ -10522,7 +10536,7 @@ let xn = class extends ue {
|
|
|
10522
10536
|
if (a.length) {
|
|
10523
10537
|
const u = [], l = [];
|
|
10524
10538
|
return a.forEach((c) => {
|
|
10525
|
-
const d =
|
|
10539
|
+
const d = O.deepClone(c), m = e.fromRange.startColumn;
|
|
10526
10540
|
let g = !1;
|
|
10527
10541
|
d.ranges.forEach((f) => {
|
|
10528
10542
|
r > f.startColumn && r <= f.endColumn && (m < f.startColumn && (f.startColumn = f.startColumn - i, f.endColumn = f.endColumn - i), f.endColumn += i, g = !0);
|
|
@@ -10543,7 +10557,7 @@ let xn = class extends ue {
|
|
|
10543
10557
|
this._selectionProtectionRuleModel.getSubunitRuleList(t.getUnitId(), o.getSheetId()).forEach((f) => {
|
|
10544
10558
|
f.ranges.forEach((C) => {
|
|
10545
10559
|
let { startRow: S, endRow: I, startColumn: w, endColumn: y } = C;
|
|
10546
|
-
|
|
10560
|
+
N.intersects(C, s) || (i ? u < S && l > I ? (S -= a, I -= a) : u > I && l <= S && (S += a, I += a) : u < w && l > y ? (w -= a, y -= a) : u > y && l <= w && (w += a, y += a)), this._checkIsRightRange({ startRow: S, endRow: I, startColumn: w, endColumn: y }) && (C.startColumn = w, C.endColumn = y, C.startRow = S, C.endRow = I);
|
|
10547
10561
|
});
|
|
10548
10562
|
}), this.disposableCollection.dispose();
|
|
10549
10563
|
const { unitId: d, subUnitId: h } = e.params, m = (f) => this.refRangeHandle(f, d, h);
|
|
@@ -10605,7 +10619,7 @@ let xn = class extends ue {
|
|
|
10605
10619
|
);
|
|
10606
10620
|
}
|
|
10607
10621
|
};
|
|
10608
|
-
xn =
|
|
10622
|
+
xn = qc([
|
|
10609
10623
|
nt(0, $(me)),
|
|
10610
10624
|
nt(1, $(M)),
|
|
10611
10625
|
nt(2, E),
|
|
@@ -10615,12 +10629,12 @@ xn = Jc([
|
|
|
10615
10629
|
nt(6, $(F)),
|
|
10616
10630
|
nt(7, $(me))
|
|
10617
10631
|
], xn);
|
|
10618
|
-
var
|
|
10619
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
10632
|
+
var Xc = Object.getOwnPropertyDescriptor, Zc = (n, e, t, o) => {
|
|
10633
|
+
for (var s = o > 1 ? void 0 : o ? Xc(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
10620
10634
|
(i = n[r]) && (s = i(s) || s);
|
|
10621
10635
|
return s;
|
|
10622
10636
|
}, At = (n, e) => (t, o) => e(t, o, n);
|
|
10623
|
-
const
|
|
10637
|
+
const Qc = "SHEET_RANGE_PROTECTION_PLUGIN";
|
|
10624
10638
|
let Wn = class extends ue {
|
|
10625
10639
|
constructor(n, e, t, o, s) {
|
|
10626
10640
|
super(), this._selectionProtectionRuleModel = n, this._permissionService = e, this._resourceManagerService = t, this._selectionProtectionCache = o, this._univerInstanceService = s, this._initSnapshot(), this._initRuleChange();
|
|
@@ -10673,7 +10687,7 @@ let Wn = class extends ue {
|
|
|
10673
10687
|
this._resourceManagerService.registerPluginResource({
|
|
10674
10688
|
toJson: n,
|
|
10675
10689
|
parseJson: e,
|
|
10676
|
-
pluginName:
|
|
10690
|
+
pluginName: Qc,
|
|
10677
10691
|
businesses: [wn.UNIVER_SHEET],
|
|
10678
10692
|
onLoad: (t, o) => {
|
|
10679
10693
|
const s = this._selectionProtectionRuleModel.toObject();
|
|
@@ -10703,15 +10717,15 @@ let Wn = class extends ue {
|
|
|
10703
10717
|
);
|
|
10704
10718
|
}
|
|
10705
10719
|
};
|
|
10706
|
-
Wn =
|
|
10720
|
+
Wn = Zc([
|
|
10707
10721
|
At(0, $(me)),
|
|
10708
10722
|
At(1, $(Fe)),
|
|
10709
10723
|
At(2, $(on)),
|
|
10710
10724
|
At(3, $(Rt)),
|
|
10711
10725
|
At(4, $(M))
|
|
10712
10726
|
], Wn);
|
|
10713
|
-
var
|
|
10714
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
10727
|
+
var ed = Object.getOwnPropertyDescriptor, td = (n, e, t, o) => {
|
|
10728
|
+
for (var s = o > 1 ? void 0 : o ? ed(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
10715
10729
|
(i = n[r]) && (s = i(s) || s);
|
|
10716
10730
|
return s;
|
|
10717
10731
|
}, xt = (n, e) => (t, o) => e(t, o, n);
|
|
@@ -10751,18 +10765,18 @@ let $n = class extends ue {
|
|
|
10751
10765
|
}));
|
|
10752
10766
|
}
|
|
10753
10767
|
};
|
|
10754
|
-
$n =
|
|
10768
|
+
$n = td([
|
|
10755
10769
|
xt(0, $(Fe)),
|
|
10756
10770
|
xt(1, $(M)),
|
|
10757
10771
|
xt(2, $(me)),
|
|
10758
10772
|
xt(3, $(Xe)),
|
|
10759
10773
|
xt(4, $(ln))
|
|
10760
10774
|
], $n);
|
|
10761
|
-
var
|
|
10762
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
10775
|
+
var nd = Object.getOwnPropertyDescriptor, od = (n, e, t, o) => {
|
|
10776
|
+
for (var s = o > 1 ? void 0 : o ? nd(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
10763
10777
|
(i = n[r]) && (s = i(s) || s);
|
|
10764
10778
|
return s;
|
|
10765
|
-
},
|
|
10779
|
+
}, sd = (n, e) => (t, o) => e(t, o, n);
|
|
10766
10780
|
let fo = class extends ue {
|
|
10767
10781
|
constructor(n) {
|
|
10768
10782
|
super(), this._sheetRangeThemeModel = n;
|
|
@@ -10808,14 +10822,14 @@ let fo = class extends ue {
|
|
|
10808
10822
|
return this._sheetRangeThemeModel.getRegisteredRangeThemes();
|
|
10809
10823
|
}
|
|
10810
10824
|
};
|
|
10811
|
-
fo =
|
|
10812
|
-
|
|
10825
|
+
fo = od([
|
|
10826
|
+
sd(0, $(Be))
|
|
10813
10827
|
], fo);
|
|
10814
|
-
var
|
|
10815
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
10828
|
+
var rd = Object.getOwnPropertyDescriptor, id = (n, e, t, o) => {
|
|
10829
|
+
for (var s = o > 1 ? void 0 : o ? rd(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
10816
10830
|
(i = n[r]) && (s = i(s) || s);
|
|
10817
10831
|
return s;
|
|
10818
|
-
},
|
|
10832
|
+
}, ad = (n, e) => (t, o) => e(t, o, n);
|
|
10819
10833
|
let Vn = class extends ue {
|
|
10820
10834
|
constructor(e) {
|
|
10821
10835
|
super();
|
|
@@ -10835,15 +10849,15 @@ let Vn = class extends ue {
|
|
|
10835
10849
|
this._sheetSkeletonStore.has(e) && this._sheetSkeletonStore.get(e).delete(t);
|
|
10836
10850
|
}
|
|
10837
10851
|
};
|
|
10838
|
-
Vn =
|
|
10839
|
-
|
|
10852
|
+
Vn = id([
|
|
10853
|
+
ad(0, $(Hn))
|
|
10840
10854
|
], Vn);
|
|
10841
|
-
var
|
|
10842
|
-
for (var s = o > 1 ? void 0 : o ?
|
|
10855
|
+
var ud = Object.defineProperty, ld = Object.getOwnPropertyDescriptor, cd = (n, e, t) => e in n ? ud(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, dd = (n, e, t, o) => {
|
|
10856
|
+
for (var s = o > 1 ? void 0 : o ? ld(e, t) : e, r = n.length - 1, i; r >= 0; r--)
|
|
10843
10857
|
(i = n[r]) && (s = i(s) || s);
|
|
10844
10858
|
return s;
|
|
10845
|
-
}, ps = (n, e) => (t, o) => e(t, o, n), ti = (n, e, t) =>
|
|
10846
|
-
const
|
|
10859
|
+
}, ps = (n, e) => (t, o) => e(t, o, n), ti = (n, e, t) => cd(n, typeof e != "symbol" ? e + "" : e, t);
|
|
10860
|
+
const hd = "SHEET_PLUGIN";
|
|
10847
10861
|
let Ln = class extends bi {
|
|
10848
10862
|
constructor(n = ss, e, t) {
|
|
10849
10863
|
super(), this._config = n, this._injector = e, this._configService = t;
|
|
@@ -10852,7 +10866,7 @@ let Ln = class extends bi {
|
|
|
10852
10866
|
ss,
|
|
10853
10867
|
this._config
|
|
10854
10868
|
);
|
|
10855
|
-
this._configService.setConfig(
|
|
10869
|
+
this._configService.setConfig(Yl, o), this._initConfig(), this._initDependencies();
|
|
10856
10870
|
}
|
|
10857
10871
|
_initConfig() {
|
|
10858
10872
|
var n, e, t;
|
|
@@ -10862,7 +10876,7 @@ let Ln = class extends bi {
|
|
|
10862
10876
|
var e;
|
|
10863
10877
|
const n = [
|
|
10864
10878
|
// services
|
|
10865
|
-
[
|
|
10879
|
+
[Ot],
|
|
10866
10880
|
[H],
|
|
10867
10881
|
[Et],
|
|
10868
10882
|
[$n],
|
|
@@ -10873,7 +10887,7 @@ let Ln = class extends bi {
|
|
|
10873
10887
|
// controllers
|
|
10874
10888
|
[En],
|
|
10875
10889
|
[Pn],
|
|
10876
|
-
[
|
|
10890
|
+
[Nn],
|
|
10877
10891
|
[kn],
|
|
10878
10892
|
// permission
|
|
10879
10893
|
[bn],
|
|
@@ -10881,7 +10895,7 @@ let Ln = class extends bi {
|
|
|
10881
10895
|
[ln],
|
|
10882
10896
|
[An],
|
|
10883
10897
|
[Dn],
|
|
10884
|
-
[
|
|
10898
|
+
[On],
|
|
10885
10899
|
// range theme
|
|
10886
10900
|
[Be],
|
|
10887
10901
|
// range protection
|
|
@@ -10891,7 +10905,7 @@ let Ln = class extends bi {
|
|
|
10891
10905
|
[xn],
|
|
10892
10906
|
[Wn],
|
|
10893
10907
|
[gs, {
|
|
10894
|
-
useClass:
|
|
10908
|
+
useClass: zc,
|
|
10895
10909
|
deps: [H]
|
|
10896
10910
|
}]
|
|
10897
10911
|
];
|
|
@@ -10922,23 +10936,23 @@ let Ln = class extends bi {
|
|
|
10922
10936
|
[Un],
|
|
10923
10937
|
[kn],
|
|
10924
10938
|
[Be],
|
|
10925
|
-
[
|
|
10939
|
+
[Nn],
|
|
10926
10940
|
[nn],
|
|
10927
10941
|
[xn],
|
|
10928
10942
|
[Et],
|
|
10929
|
-
[
|
|
10943
|
+
[On]
|
|
10930
10944
|
]);
|
|
10931
10945
|
}
|
|
10932
10946
|
};
|
|
10933
|
-
ti(Ln, "pluginName",
|
|
10947
|
+
ti(Ln, "pluginName", hd);
|
|
10934
10948
|
ti(Ln, "type", B.UNIVER_SHEET);
|
|
10935
|
-
Ln =
|
|
10949
|
+
Ln = dd([
|
|
10936
10950
|
yi(Fi),
|
|
10937
10951
|
ps(1, $(Hn)),
|
|
10938
10952
|
ps(2, Ps)
|
|
10939
10953
|
], Ln);
|
|
10940
|
-
var
|
|
10941
|
-
const
|
|
10954
|
+
var md = /* @__PURE__ */ ((n) => (n.SET_WORKSHEET_ROW_HEIGHT = "sheet.mutation.set-worksheet-row-height", n.SET_WORKSHEET_ROW_IS_AUTO_HEIGHT = "sheet.mutation.set-worksheet-row-is-auto-height", n.SET_WORKSHEET_ROW_AUTO_HEIGHT = "sheet.mutation.set-worksheet-row-auto-height", n.SET_WORKSHEET_COL_WIDTH = "sheet.mutation.set-worksheet-col-width", n.SET_WORKSHEET_ACTIVE = "sheet.operation.set-worksheet-active", n.MOVE_ROWS = "sheet.mutation.move-rows", n.MOVE_COLUMNS = "sheet.mutation.move-columns", n.SET_COL_HIDDEN = "sheet.mutation.set-col-hidden", n.SET_COL_VISIBLE = "sheet.mutation.set-col-visible", n.SET_ROW_HIDDEN = "sheet.mutation.set-row-hidden", n.SET_ROW_VISIBLE = "sheet.mutation.set-row-visible", n.INSERT_COL = "sheet.mutation.insert-col", n.INSERT_ROW = "sheet.mutation.insert-row", n.REMOVE_COL = "sheet.mutation.remove-col", n.REMOVE_ROW = "sheet.mutation.remove-row", n.TOGGLE_GRIDLINES = "sheet.mutation.toggle-gridlines", n.SET_GRIDLINES_COLOR = "sheet.mutation.set-gridlines-color", n))(md || {}), gd = /* @__PURE__ */ ((n) => (n.SET_RANGE_VALUES = "sheet.mutation.set-range-values", n.MOVE_RANGE = "sheet.mutation.move-range", n.REMOVE_WORKSHEET_MERGE = "sheet.mutation.remove-worksheet-merge", n.ADD_WORKSHEET_MERGE = "sheet.mutation.add-worksheet-merge", n.REORDER_RANGE = "sheet.mutation.reorder-range", n.SET_WORKSHEET_DEFAULT_STYLE = "sheet.mutation.set-worksheet-default-style", n.SET_ROW_DATA = "sheet.mutation.set-row-data", n.SET_COL_DATA = "sheet.mutation.set-col-data", n.SET_WORKSHEET_RANGE_THEME_STYLE = "sheet.mutation.set-worksheet-range-theme-style", n.DELETE_WORKSHEET_RANGE_THEME_STYLE = "sheet.mutation.delete-worksheet-range-theme-style", n))(gd || {});
|
|
10955
|
+
const uh = [
|
|
10942
10956
|
rt.id,
|
|
10943
10957
|
xe.id,
|
|
10944
10958
|
jr.id,
|
|
@@ -10956,7 +10970,7 @@ const ih = [
|
|
|
10956
10970
|
Ge.id,
|
|
10957
10971
|
jt.id,
|
|
10958
10972
|
Ht.id
|
|
10959
|
-
],
|
|
10973
|
+
], lh = [
|
|
10960
10974
|
X.id,
|
|
10961
10975
|
ft.id,
|
|
10962
10976
|
oe.id,
|
|
@@ -10968,7 +10982,7 @@ const ih = [
|
|
|
10968
10982
|
Kt.id,
|
|
10969
10983
|
Jt.id
|
|
10970
10984
|
];
|
|
10971
|
-
function
|
|
10985
|
+
function ch(n) {
|
|
10972
10986
|
switch (n.id) {
|
|
10973
10987
|
case "sheet.mutation.set-range-values": {
|
|
10974
10988
|
const e = n.params, t = new G(e.cellValue).getDataRange();
|
|
@@ -11061,7 +11075,7 @@ function uh(n) {
|
|
|
11061
11075
|
return [];
|
|
11062
11076
|
}
|
|
11063
11077
|
}
|
|
11064
|
-
function
|
|
11078
|
+
function dh(n, e) {
|
|
11065
11079
|
switch (n.id) {
|
|
11066
11080
|
case "sheet.mutation.set-worksheet-row-height":
|
|
11067
11081
|
case "sheet.mutation.set-worksheet-row-is-auto-height": {
|
|
@@ -11189,8 +11203,8 @@ function lh(n, e) {
|
|
|
11189
11203
|
return [];
|
|
11190
11204
|
}
|
|
11191
11205
|
}
|
|
11192
|
-
const
|
|
11193
|
-
function
|
|
11206
|
+
const hh = 1.5, mh = "rgba(255, 255, 255, 0.01)";
|
|
11207
|
+
function gh(n) {
|
|
11194
11208
|
const { rangeWithCoord: e, primaryWithCoord: t, style: o } = n, s = {
|
|
11195
11209
|
range: {
|
|
11196
11210
|
startRow: e.startRow,
|
|
@@ -11204,9 +11218,9 @@ function hh(n) {
|
|
|
11204
11218
|
primary: null,
|
|
11205
11219
|
style: o
|
|
11206
11220
|
};
|
|
11207
|
-
return t != null && (s.primary =
|
|
11221
|
+
return t != null && (s.primary = fd(t)), s;
|
|
11208
11222
|
}
|
|
11209
|
-
function
|
|
11223
|
+
function fd(n) {
|
|
11210
11224
|
const { actualRow: e, actualColumn: t, isMerged: o, isMergedMainCell: s } = n, { startRow: r, startColumn: i, endRow: a, endColumn: u } = n.mergeInfo;
|
|
11211
11225
|
return {
|
|
11212
11226
|
actualRow: e,
|
|
@@ -11219,7 +11233,7 @@ function md(n) {
|
|
|
11219
11233
|
endColumn: u
|
|
11220
11234
|
};
|
|
11221
11235
|
}
|
|
11222
|
-
const
|
|
11236
|
+
const fh = (n, e, t) => {
|
|
11223
11237
|
const s = n.get(H).getCurrentSelections(), { value: r, selections: i, unitId: a, subUnitId: u } = e;
|
|
11224
11238
|
if (s) {
|
|
11225
11239
|
const c = s[(s == null ? void 0 : s.length) - 1].primary;
|
|
@@ -11260,7 +11274,7 @@ const mh = (n, e, t) => {
|
|
|
11260
11274
|
return null;
|
|
11261
11275
|
}
|
|
11262
11276
|
return null;
|
|
11263
|
-
},
|
|
11277
|
+
}, Rh = (n, e) => {
|
|
11264
11278
|
const o = n.get(H).getCurrentSelections(), { unitId: s, subUnitId: r } = e;
|
|
11265
11279
|
if (o && o[(o == null ? void 0 : o.length) - 1].primary) {
|
|
11266
11280
|
const u = {
|
|
@@ -11282,14 +11296,14 @@ function Cs(n) {
|
|
|
11282
11296
|
function Qn(n, e) {
|
|
11283
11297
|
return n && n.spanAnchor ? Cs(e.getValue(n.spanAnchor.startRow, n.spanAnchor.startColumn)) : Cs(n);
|
|
11284
11298
|
}
|
|
11285
|
-
function
|
|
11299
|
+
function Rd(n, e, t, o, s) {
|
|
11286
11300
|
const r = n.getCellMatrix(), i = n.getSpanModel().getMergedCellRange(e, t, o, s), a = new G();
|
|
11287
11301
|
return r.forValue((u, l) => {
|
|
11288
11302
|
const c = r.getValue(u, l);
|
|
11289
11303
|
c && a.setValue(u, l, c);
|
|
11290
11304
|
}), i.forEach((u) => {
|
|
11291
11305
|
const { startColumn: l, startRow: c, endColumn: d, endRow: h } = u;
|
|
11292
|
-
|
|
11306
|
+
Ni(c, h, l, d).forEach((m, g) => {
|
|
11293
11307
|
m === c && g === l && a.setValue(m, g, {
|
|
11294
11308
|
...r.getValue(m, g),
|
|
11295
11309
|
spanAnchor: { startRow: c, endRow: h, startColumn: l, endColumn: d }
|
|
@@ -11299,7 +11313,7 @@ function gd(n, e, t, o, s) {
|
|
|
11299
11313
|
});
|
|
11300
11314
|
}), a;
|
|
11301
11315
|
}
|
|
11302
|
-
function
|
|
11316
|
+
function pd(n, e, t, o) {
|
|
11303
11317
|
const { startRow: s, startColumn: r, endRow: i } = n;
|
|
11304
11318
|
let a = null, u = !1;
|
|
11305
11319
|
for (let l = s; l <= i; l++) {
|
|
@@ -11328,7 +11342,7 @@ function fd(n, e, t, o) {
|
|
|
11328
11342
|
range: n
|
|
11329
11343
|
};
|
|
11330
11344
|
}
|
|
11331
|
-
function
|
|
11345
|
+
function Cd(n, e, t, o) {
|
|
11332
11346
|
const { startRow: s, endColumn: r, endRow: i } = n;
|
|
11333
11347
|
let a = null, u = !1;
|
|
11334
11348
|
for (let l = s; l <= i; l++) {
|
|
@@ -11357,7 +11371,7 @@ function Rd(n, e, t, o) {
|
|
|
11357
11371
|
range: n
|
|
11358
11372
|
};
|
|
11359
11373
|
}
|
|
11360
|
-
function
|
|
11374
|
+
function Sd(n, e, t, o) {
|
|
11361
11375
|
const { startRow: s, startColumn: r, endColumn: i } = n;
|
|
11362
11376
|
let a = null, u = !1;
|
|
11363
11377
|
for (let l = r; l <= i; l++) {
|
|
@@ -11386,7 +11400,7 @@ function pd(n, e, t, o) {
|
|
|
11386
11400
|
range: n
|
|
11387
11401
|
};
|
|
11388
11402
|
}
|
|
11389
|
-
function
|
|
11403
|
+
function wd(n, e, t, o) {
|
|
11390
11404
|
const { startColumn: s, endColumn: r, endRow: i } = n;
|
|
11391
11405
|
let a = null, u = !1;
|
|
11392
11406
|
for (let l = s; l <= r; l++) {
|
|
@@ -11415,41 +11429,41 @@ function Cd(n, e, t, o) {
|
|
|
11415
11429
|
range: n
|
|
11416
11430
|
};
|
|
11417
11431
|
}
|
|
11418
|
-
function
|
|
11419
|
-
const o = t.getMaxRows(), s = t.getMaxColumns(), r =
|
|
11432
|
+
function ph(n, e, t) {
|
|
11433
|
+
const o = t.getMaxRows(), s = t.getMaxColumns(), r = Rd(t, 0, 0, o - 1, s - 1), i = t.getSnapshot().mergeData.length > 0, { left: a, right: u, up: l, down: c } = e;
|
|
11420
11434
|
let d = !0, h = { ...n };
|
|
11421
11435
|
const m = [];
|
|
11422
11436
|
for (; d; ) {
|
|
11423
11437
|
if (d = !1, l && h.startRow !== 0) {
|
|
11424
|
-
const { hasValue: g, range: f, spanAnchor: p } =
|
|
11438
|
+
const { hasValue: g, range: f, spanAnchor: p } = Sd(h, r, 1, i);
|
|
11425
11439
|
if (p && m.push(p), g) {
|
|
11426
11440
|
h = f, d = !0;
|
|
11427
11441
|
continue;
|
|
11428
11442
|
}
|
|
11429
11443
|
}
|
|
11430
11444
|
if (c && h.endRow !== o - 1) {
|
|
11431
|
-
const { hasValue: g, range: f, spanAnchor: p } =
|
|
11445
|
+
const { hasValue: g, range: f, spanAnchor: p } = wd(h, r, 1, i);
|
|
11432
11446
|
if (p && m.push(p), g) {
|
|
11433
11447
|
h = f, d = !0;
|
|
11434
11448
|
continue;
|
|
11435
11449
|
}
|
|
11436
11450
|
}
|
|
11437
11451
|
if (a && h.startColumn !== 0) {
|
|
11438
|
-
const { hasValue: g, range: f, spanAnchor: p } =
|
|
11452
|
+
const { hasValue: g, range: f, spanAnchor: p } = pd(h, r, 1, i);
|
|
11439
11453
|
if (p && m.push(p), g) {
|
|
11440
11454
|
h = f, d = !0;
|
|
11441
11455
|
continue;
|
|
11442
11456
|
}
|
|
11443
11457
|
}
|
|
11444
11458
|
if (u && h.endColumn !== s - 1) {
|
|
11445
|
-
const { hasValue: g, range: f, spanAnchor: p } =
|
|
11459
|
+
const { hasValue: g, range: f, spanAnchor: p } = Cd(h, r, 1, i);
|
|
11446
11460
|
if (p && m.push(p), g) {
|
|
11447
11461
|
h = f, d = !0;
|
|
11448
11462
|
continue;
|
|
11449
11463
|
}
|
|
11450
11464
|
}
|
|
11451
11465
|
}
|
|
11452
|
-
return m.length > 0 && (h =
|
|
11466
|
+
return m.length > 0 && (h = N.union(h, ...m)), h;
|
|
11453
11467
|
}
|
|
11454
11468
|
const ni = (n, e, t, o = 1, s = !0, r = !0) => {
|
|
11455
11469
|
const i = K.transformRange(n, e), { startRow: a, endRow: u } = i;
|
|
@@ -11520,7 +11534,7 @@ function gn(n, e, t) {
|
|
|
11520
11534
|
rangeType: L.NORMAL
|
|
11521
11535
|
};
|
|
11522
11536
|
}
|
|
11523
|
-
const
|
|
11537
|
+
const Id = (n, e, t, o, s = 1) => {
|
|
11524
11538
|
switch (o) {
|
|
11525
11539
|
case pe.UP:
|
|
11526
11540
|
return ni(n, e, t, s);
|
|
@@ -11531,7 +11545,7 @@ const Sd = (n, e, t, o, s = 1) => {
|
|
|
11531
11545
|
case pe.RIGHT:
|
|
11532
11546
|
return ri(n, e, t, s);
|
|
11533
11547
|
}
|
|
11534
|
-
},
|
|
11548
|
+
}, Ch = (n, e, t) => {
|
|
11535
11549
|
let o, s = -1, r;
|
|
11536
11550
|
for (let C = 0; C < n.length; C++)
|
|
11537
11551
|
if (n[C].primary) {
|
|
@@ -11544,8 +11558,8 @@ const Sd = (n, e, t, o, s = 1) => {
|
|
|
11544
11558
|
if (!o || !r)
|
|
11545
11559
|
return null;
|
|
11546
11560
|
const l = { ...r }, { startRow: c, startColumn: d, endRow: h, endColumn: m } = o.range, g = i ? l.startRow === c && l.startColumn === d : l.endRow === h && l.endColumn === m, f = g && i;
|
|
11547
|
-
if (!
|
|
11548
|
-
const C = g ? u.range :
|
|
11561
|
+
if (!N.equals(o.range, l)) {
|
|
11562
|
+
const C = g ? u.range : Id(o.range, t, l, e);
|
|
11549
11563
|
if (!C)
|
|
11550
11564
|
return null;
|
|
11551
11565
|
const S = f ? gn(C.endRow, C.endColumn, t) : gn(C.startRow, C.startColumn, t);
|
|
@@ -11563,7 +11577,7 @@ const Sd = (n, e, t, o, s = 1) => {
|
|
|
11563
11577
|
endRow: p.endRow,
|
|
11564
11578
|
endColumn: p.endColumn
|
|
11565
11579
|
};
|
|
11566
|
-
},
|
|
11580
|
+
}, Sh = {
|
|
11567
11581
|
/**
|
|
11568
11582
|
* The permission point for adding or editing workbook comments
|
|
11569
11583
|
*/
|
|
@@ -11603,7 +11617,7 @@ const Sd = (n, e, t, o, s = 1) => {
|
|
|
11603
11617
|
/**
|
|
11604
11618
|
* The permission point for viewing and managing workbook history
|
|
11605
11619
|
*/
|
|
11606
|
-
WorkbookHistoryPermission:
|
|
11620
|
+
WorkbookHistoryPermission: iu,
|
|
11607
11621
|
/**
|
|
11608
11622
|
* The permission point for managing collaborators in a workbook
|
|
11609
11623
|
*/
|
|
@@ -11659,7 +11673,7 @@ const Sd = (n, e, t, o, s = 1) => {
|
|
|
11659
11673
|
/**
|
|
11660
11674
|
* The permission point for editing the content of a worksheet
|
|
11661
11675
|
*/
|
|
11662
|
-
WorksheetEditPermission:
|
|
11676
|
+
WorksheetEditPermission: Oe,
|
|
11663
11677
|
/**
|
|
11664
11678
|
* The permission point for applying filters in a worksheet
|
|
11665
11679
|
*/
|
|
@@ -11711,28 +11725,28 @@ const Sd = (n, e, t, o, s = 1) => {
|
|
|
11711
11725
|
/**
|
|
11712
11726
|
* The permission point for editing the range protection settings
|
|
11713
11727
|
*/
|
|
11714
|
-
RangeProtectionPermissionEditPoint:
|
|
11728
|
+
RangeProtectionPermissionEditPoint: Ne,
|
|
11715
11729
|
/**
|
|
11716
11730
|
* The permission point for viewing the range protection settings
|
|
11717
11731
|
*/
|
|
11718
11732
|
RangeProtectionPermissionViewPoint: yo
|
|
11719
|
-
},
|
|
11733
|
+
}, wh = (n, e, t, o) => {
|
|
11720
11734
|
const s = n.get(Fe), r = n.get(me), i = s.getPermissionPoint(new Me(e).id);
|
|
11721
11735
|
if (!(i != null && i.value))
|
|
11722
11736
|
return !1;
|
|
11723
|
-
const a = s.getPermissionPoint(new
|
|
11737
|
+
const a = s.getPermissionPoint(new Oe(e, t).id);
|
|
11724
11738
|
if (!(a != null && a.value))
|
|
11725
11739
|
return !1;
|
|
11726
|
-
const l = r.getSubunitRuleList(e, t).filter((c) => c.ranges.some((d) => o.some((h) =>
|
|
11740
|
+
const l = r.getSubunitRuleList(e, t).filter((c) => c.ranges.some((d) => o.some((h) => N.intersects(d, h))));
|
|
11727
11741
|
return l.length ? l.every((c) => {
|
|
11728
|
-
const d = c.permissionId, h = s.getPermissionPoint(new
|
|
11742
|
+
const d = c.permissionId, h = s.getPermissionPoint(new Ne(e, t, d).id);
|
|
11729
11743
|
return !!(h != null && h.value);
|
|
11730
11744
|
}) : !0;
|
|
11731
11745
|
};
|
|
11732
|
-
function
|
|
11733
|
-
return e.some((t) =>
|
|
11746
|
+
function vd(n, e) {
|
|
11747
|
+
return e.some((t) => Md(n, t));
|
|
11734
11748
|
}
|
|
11735
|
-
function
|
|
11749
|
+
function Md(n, e) {
|
|
11736
11750
|
const { startRow: t, startColumn: o, endColumn: s, endRow: r } = e, i = n.getMatrixWithMergedCells(t, o, r, s);
|
|
11737
11751
|
let a = !1;
|
|
11738
11752
|
return i.forValue((u, l, c) => {
|
|
@@ -11740,10 +11754,10 @@ function Id(n, e) {
|
|
|
11740
11754
|
return a = !0, !1;
|
|
11741
11755
|
}), a;
|
|
11742
11756
|
}
|
|
11743
|
-
function
|
|
11757
|
+
function _d(n, e, t, o) {
|
|
11744
11758
|
const s = [], r = [], i = t.getSheetId();
|
|
11745
11759
|
return o.forEach((a) => {
|
|
11746
|
-
const u =
|
|
11760
|
+
const u = yd(t, a), l = {
|
|
11747
11761
|
unitId: e,
|
|
11748
11762
|
subUnitId: i,
|
|
11749
11763
|
cellValue: u.getData()
|
|
@@ -11757,8 +11771,8 @@ function vd(n, e, t, o) {
|
|
|
11757
11771
|
redos: r
|
|
11758
11772
|
};
|
|
11759
11773
|
}
|
|
11760
|
-
function
|
|
11761
|
-
const { startRow: t, startColumn: o, endColumn: s, endRow: r } = e, i = n.getMatrixWithMergedCells(t, o, r, s,
|
|
11774
|
+
function yd(n, e) {
|
|
11775
|
+
const { startRow: t, startColumn: o, endColumn: s, endRow: r } = e, i = n.getMatrixWithMergedCells(t, o, r, s, Oi.Intercepted), a = new G();
|
|
11762
11776
|
return i.forValue((u, l, c) => {
|
|
11763
11777
|
c && (u !== t || l !== o) && a.setValue(u, l, null);
|
|
11764
11778
|
}), a;
|
|
@@ -11767,7 +11781,7 @@ const eo = {
|
|
|
11767
11781
|
type: v.COMMAND,
|
|
11768
11782
|
id: "sheet.command.add-worksheet-merge",
|
|
11769
11783
|
handler: (n, e) => {
|
|
11770
|
-
const t = n.get(E), o = n.get(V), s = n.get(M), r = e.unitId, i = e.subUnitId, a = e.selections, u = ei(a, e.value), l = s.getUniverSheetInstance(r).getSheetBySheetId(i), c = [], d = [], h =
|
|
11784
|
+
const t = n.get(E), o = n.get(V), s = n.get(M), r = e.unitId, i = e.subUnitId, a = e.selections, u = ei(a, e.value), l = s.getUniverSheetInstance(r).getSheetBySheetId(i), c = [], d = [], h = vd(l, u), m = {
|
|
11771
11785
|
unitId: r,
|
|
11772
11786
|
subUnitId: i,
|
|
11773
11787
|
ranges: u
|
|
@@ -11779,7 +11793,7 @@ const eo = {
|
|
|
11779
11793
|
c.push({ id: oe.id, params: m }), c.push({ id: ne.id, params: g });
|
|
11780
11794
|
const f = we(n, m), p = Te(n, g);
|
|
11781
11795
|
if (d.push({ id: oe.id, params: p }), d.push({ id: ne.id, params: f }), h) {
|
|
11782
|
-
const S =
|
|
11796
|
+
const S = _d(n, r, l, u);
|
|
11783
11797
|
c.unshift(...S.redos), d.push(...S.undos);
|
|
11784
11798
|
}
|
|
11785
11799
|
return z(c, t).result ? (o.pushUndoRedo({
|
|
@@ -11788,7 +11802,7 @@ const eo = {
|
|
|
11788
11802
|
redoMutations: c
|
|
11789
11803
|
}), !0) : !1;
|
|
11790
11804
|
}
|
|
11791
|
-
},
|
|
11805
|
+
}, Ih = {
|
|
11792
11806
|
type: v.COMMAND,
|
|
11793
11807
|
id: "sheet.command.add-worksheet-merge-all",
|
|
11794
11808
|
handler: async (n) => {
|
|
@@ -11807,7 +11821,7 @@ const eo = {
|
|
|
11807
11821
|
subUnitId: u
|
|
11808
11822
|
});
|
|
11809
11823
|
}
|
|
11810
|
-
},
|
|
11824
|
+
}, vh = {
|
|
11811
11825
|
type: v.COMMAND,
|
|
11812
11826
|
id: "sheet.command.add-worksheet-merge-vertical",
|
|
11813
11827
|
handler: async (n) => {
|
|
@@ -11827,7 +11841,7 @@ const eo = {
|
|
|
11827
11841
|
subUnitId: u
|
|
11828
11842
|
});
|
|
11829
11843
|
}
|
|
11830
|
-
},
|
|
11844
|
+
}, Mh = {
|
|
11831
11845
|
type: v.COMMAND,
|
|
11832
11846
|
id: "sheet.command.add-worksheet-merge-horizontal",
|
|
11833
11847
|
handler: async (n) => {
|
|
@@ -11848,11 +11862,11 @@ const eo = {
|
|
|
11848
11862
|
});
|
|
11849
11863
|
}
|
|
11850
11864
|
};
|
|
11851
|
-
function
|
|
11865
|
+
function _h(n, e, t, o, s) {
|
|
11852
11866
|
const r = n.get(M), i = k(r, { unitId: e, subUnitId: t });
|
|
11853
11867
|
if (!i) return;
|
|
11854
11868
|
const { worksheet: a } = i;
|
|
11855
|
-
if (a.getMergeData().some((d) => o.some((h) =>
|
|
11869
|
+
if (a.getMergeData().some((d) => o.some((h) => N.intersects(h, d))))
|
|
11856
11870
|
throw new Error("The ranges to be merged overlap with the existing merged cells");
|
|
11857
11871
|
n.get(E).executeCommand(eo.id, {
|
|
11858
11872
|
unitId: e,
|
|
@@ -11861,10 +11875,10 @@ function vh(n, e, t, o, s) {
|
|
|
11861
11875
|
defaultMerge: s
|
|
11862
11876
|
});
|
|
11863
11877
|
}
|
|
11864
|
-
const
|
|
11878
|
+
const bd = (n, e) => {
|
|
11865
11879
|
const r = n.get(M).getUniverSheetInstance(e.unitId).getSheetBySheetId(e.subUnitId).getConfig().rightToLeft;
|
|
11866
11880
|
return {
|
|
11867
|
-
...
|
|
11881
|
+
...O.deepClone(e),
|
|
11868
11882
|
rightToLeft: r
|
|
11869
11883
|
};
|
|
11870
11884
|
}, uo = {
|
|
@@ -11878,7 +11892,7 @@ const _d = (n, e) => {
|
|
|
11878
11892
|
const s = o.getConfig();
|
|
11879
11893
|
return s.rightToLeft = e.rightToLeft, !0;
|
|
11880
11894
|
}
|
|
11881
|
-
},
|
|
11895
|
+
}, yh = {
|
|
11882
11896
|
type: v.COMMAND,
|
|
11883
11897
|
id: "sheet.command.set-worksheet-right-to-left",
|
|
11884
11898
|
handler: async (n, e) => {
|
|
@@ -11892,7 +11906,7 @@ const _d = (n, e) => {
|
|
|
11892
11906
|
rightToLeft: a,
|
|
11893
11907
|
unitId: r,
|
|
11894
11908
|
subUnitId: i
|
|
11895
|
-
}, l =
|
|
11909
|
+
}, l = bd(
|
|
11896
11910
|
n,
|
|
11897
11911
|
u
|
|
11898
11912
|
);
|
|
@@ -11910,94 +11924,94 @@ const _d = (n, e) => {
|
|
|
11910
11924
|
};
|
|
11911
11925
|
export {
|
|
11912
11926
|
no as AFTER_CELL_EDIT,
|
|
11913
|
-
|
|
11927
|
+
fh as AddMergeRedoSelectionsOperationFactory,
|
|
11914
11928
|
Te as AddMergeUndoMutationFactory,
|
|
11915
|
-
|
|
11929
|
+
Rh as AddMergeUndoSelectionsOperationFactory,
|
|
11916
11930
|
Xi as AddRangeProtectionCommand,
|
|
11917
11931
|
Ae as AddRangeProtectionMutation,
|
|
11918
|
-
|
|
11932
|
+
Ih as AddWorksheetMergeAllCommand,
|
|
11919
11933
|
eo as AddWorksheetMergeCommand,
|
|
11920
|
-
|
|
11934
|
+
Mh as AddWorksheetMergeHorizontalCommand,
|
|
11921
11935
|
ne as AddWorksheetMergeMutation,
|
|
11922
|
-
|
|
11936
|
+
vh as AddWorksheetMergeVerticalCommand,
|
|
11923
11937
|
Zi as AddWorksheetProtectionCommand,
|
|
11924
11938
|
gt as AddWorksheetProtectionMutation,
|
|
11925
|
-
|
|
11939
|
+
$a as AppendRowCommand,
|
|
11926
11940
|
Jo as BEFORE_CELL_EDIT,
|
|
11927
|
-
|
|
11928
|
-
|
|
11929
|
-
|
|
11930
|
-
|
|
11941
|
+
Ot as BorderStyleManagerService,
|
|
11942
|
+
uh as COMMAND_LISTENER_SKELETON_CHANGE,
|
|
11943
|
+
lh as COMMAND_LISTENER_VALUE_CHANGE,
|
|
11944
|
+
Ju as CancelFrozenCommand,
|
|
11931
11945
|
Io as ClearSelectionAllCommand,
|
|
11932
11946
|
vo as ClearSelectionContentCommand,
|
|
11933
11947
|
Mo as ClearSelectionFormatCommand,
|
|
11934
11948
|
Vs as CopySheetCommand,
|
|
11935
|
-
|
|
11949
|
+
xd as DISABLE_NORMAL_SELECTIONS,
|
|
11936
11950
|
kn as DefinedNameDataController,
|
|
11937
11951
|
Pt as DeleteRangeMoveLeftCommand,
|
|
11938
|
-
|
|
11939
|
-
|
|
11952
|
+
Nt as DeleteRangeMoveUpCommand,
|
|
11953
|
+
au as DeleteRangeProtectionCommand,
|
|
11940
11954
|
Je as DeleteRangeProtectionMutation,
|
|
11941
|
-
|
|
11955
|
+
uu as DeleteWorksheetProtectionCommand,
|
|
11942
11956
|
vt as DeleteWorksheetProtectionMutation,
|
|
11943
|
-
|
|
11957
|
+
lu as DeleteWorksheetRangeThemeStyleCommand,
|
|
11944
11958
|
Jt as DeleteWorksheetRangeThemeStyleMutation,
|
|
11945
11959
|
Ma as DeleteWorksheetRangeThemeStyleMutationFactory,
|
|
11946
11960
|
xo as DeltaColumnWidthCommand,
|
|
11947
11961
|
Lo as DeltaRowHeightCommand,
|
|
11948
11962
|
qi as EditStateEnum,
|
|
11949
11963
|
W as EffectRefRangId,
|
|
11950
|
-
|
|
11951
|
-
|
|
11952
|
-
|
|
11953
|
-
|
|
11954
|
-
|
|
11964
|
+
$l as EmptyMutation,
|
|
11965
|
+
zc as ExclusiveRangeService,
|
|
11966
|
+
Ad as FactoryAddRangeProtectionMutation,
|
|
11967
|
+
Dd as FactoryDeleteRangeProtectionMutation,
|
|
11968
|
+
Gd as FactorySetRangeProtectionMutation,
|
|
11955
11969
|
gs as IExclusiveRangeService,
|
|
11956
11970
|
ot as INTERCEPTOR_POINT,
|
|
11957
11971
|
Mt as INumfmtService,
|
|
11958
|
-
|
|
11959
|
-
|
|
11960
|
-
|
|
11972
|
+
tu as IRefSelectionsService,
|
|
11973
|
+
pu as InsertColAfterCommand,
|
|
11974
|
+
Ru as InsertColBeforeCommand,
|
|
11961
11975
|
Sr as InsertColByRangeCommand,
|
|
11962
11976
|
et as InsertColCommand,
|
|
11963
11977
|
We as InsertColMutation,
|
|
11964
11978
|
Bn as InsertColMutationUndoFactory,
|
|
11965
|
-
|
|
11966
|
-
|
|
11967
|
-
|
|
11968
|
-
|
|
11969
|
-
|
|
11979
|
+
cu as InsertDefinedNameCommand,
|
|
11980
|
+
Cu as InsertMultiColsLeftCommand,
|
|
11981
|
+
Su as InsertMultiColsRightCommand,
|
|
11982
|
+
gu as InsertMultiRowsAboveCommand,
|
|
11983
|
+
fu as InsertMultiRowsAfterCommand,
|
|
11970
11984
|
rn as InsertRangeMoveDownCommand,
|
|
11971
11985
|
zn as InsertRangeMoveRightCommand,
|
|
11972
|
-
|
|
11973
|
-
|
|
11986
|
+
mu as InsertRowAfterCommand,
|
|
11987
|
+
hu as InsertRowBeforeCommand,
|
|
11974
11988
|
pr as InsertRowByRangeCommand,
|
|
11975
11989
|
Qe as InsertRowCommand,
|
|
11976
11990
|
je as InsertRowMutation,
|
|
11977
11991
|
wo as InsertRowMutationUndoFactory,
|
|
11978
|
-
|
|
11992
|
+
wu as InsertSheetCommand,
|
|
11979
11993
|
Yt as InsertSheetMutation,
|
|
11980
11994
|
$s as InsertSheetUndoMutationFactory,
|
|
11981
11995
|
ta as InterceptCellContentPriority,
|
|
11982
|
-
|
|
11983
|
-
|
|
11996
|
+
Fl as MAX_CELL_PER_SHEET_KEY,
|
|
11997
|
+
Nc as MERGE_CELL_INTERCEPTOR_CHECK,
|
|
11984
11998
|
Pn as MergeCellController,
|
|
11985
11999
|
Jn as MoveColsCommand,
|
|
11986
12000
|
at as MoveColsMutation,
|
|
11987
|
-
|
|
12001
|
+
vu as MoveColsMutationUndoFactory,
|
|
11988
12002
|
wt as MoveRangeCommand,
|
|
11989
12003
|
ft as MoveRangeMutation,
|
|
11990
12004
|
Kn as MoveRowsCommand,
|
|
11991
12005
|
it as MoveRowsMutation,
|
|
11992
|
-
|
|
12006
|
+
Iu as MoveRowsMutationUndoFactory,
|
|
11993
12007
|
go as NumfmtService,
|
|
11994
12008
|
q as OperatorType,
|
|
11995
|
-
|
|
11996
|
-
|
|
11997
|
-
|
|
12009
|
+
Sh as PermissionPointsDefinitions,
|
|
12010
|
+
Ja as REF_SELECTIONS_ENABLED,
|
|
12011
|
+
th as RangeMergeUtil,
|
|
11998
12012
|
Rt as RangeProtectionCache,
|
|
11999
12013
|
Hr as RangeProtectionPermissionDeleteProtectionPoint,
|
|
12000
|
-
|
|
12014
|
+
Ne as RangeProtectionPermissionEditPoint,
|
|
12001
12015
|
Br as RangeProtectionPermissionManageCollaPoint,
|
|
12002
12016
|
yo as RangeProtectionPermissionViewPoint,
|
|
12003
12017
|
xn as RangeProtectionRefRangeService,
|
|
@@ -12007,7 +12021,7 @@ export {
|
|
|
12007
12021
|
pt as RangeThemeStyle,
|
|
12008
12022
|
Et as RefRangeService,
|
|
12009
12023
|
ts as RefSelectionsService,
|
|
12010
|
-
|
|
12024
|
+
yu as RegisterWorksheetRangeThemeStyleCommand,
|
|
12011
12025
|
qt as RegisterWorksheetRangeThemeStyleMutation,
|
|
12012
12026
|
yr as RemoveColByRangeCommand,
|
|
12013
12027
|
qn as RemoveColCommand,
|
|
@@ -12020,126 +12034,126 @@ export {
|
|
|
12020
12034
|
Ge as RemoveRowMutation,
|
|
12021
12035
|
Do as RemoveSheetCommand,
|
|
12022
12036
|
Tt as RemoveSheetMutation,
|
|
12023
|
-
|
|
12024
|
-
|
|
12037
|
+
Ya as RemoveSheetUndoMutationFactory,
|
|
12038
|
+
bu as RemoveWorksheetMergeCommand,
|
|
12025
12039
|
oe as RemoveWorksheetMergeMutation,
|
|
12026
12040
|
ho as ReorderRangeCommand,
|
|
12027
12041
|
vn as ReorderRangeMutation,
|
|
12028
|
-
|
|
12029
|
-
|
|
12030
|
-
|
|
12031
|
-
|
|
12032
|
-
|
|
12033
|
-
|
|
12034
|
-
|
|
12035
|
-
|
|
12036
|
-
|
|
12042
|
+
Uu as ReorderRangeUndoMutationFactory,
|
|
12043
|
+
il as ResetBackgroundColorCommand,
|
|
12044
|
+
sl as ResetTextColorCommand,
|
|
12045
|
+
sh as SCOPE_WORKBOOK_VALUE_DEFINED_NAME,
|
|
12046
|
+
Wd as SELECTIONS_ENABLED,
|
|
12047
|
+
mh as SELECTION_CONTROL_BORDER_BUFFER_COLOR,
|
|
12048
|
+
hh as SELECTION_CONTROL_BORDER_BUFFER_WIDTH,
|
|
12049
|
+
Bl as ScrollToCellOperation,
|
|
12050
|
+
ou as SelectRangeCommand,
|
|
12037
12051
|
Ce as SelectionMoveType,
|
|
12038
|
-
|
|
12039
|
-
|
|
12040
|
-
|
|
12041
|
-
|
|
12052
|
+
rl as SetBackgroundColorCommand,
|
|
12053
|
+
zd as SetBoldCommand,
|
|
12054
|
+
$u as SetBorderBasicCommand,
|
|
12055
|
+
Wu as SetBorderColorCommand,
|
|
12042
12056
|
an as SetBorderCommand,
|
|
12043
|
-
|
|
12044
|
-
|
|
12045
|
-
|
|
12057
|
+
Au as SetBorderPositionCommand,
|
|
12058
|
+
xu as SetBorderStyleCommand,
|
|
12059
|
+
Bu as SetColDataCommand,
|
|
12046
12060
|
Lt as SetColDataMutation,
|
|
12047
|
-
|
|
12061
|
+
Hu as SetColDataMutationFactory,
|
|
12048
12062
|
Ur as SetColHiddenCommand,
|
|
12049
12063
|
Xt as SetColHiddenMutation,
|
|
12050
12064
|
Zt as SetColVisibleMutation,
|
|
12051
12065
|
_n as SetColWidthCommand,
|
|
12052
12066
|
Tr as SetDefinedNameCommand,
|
|
12053
|
-
|
|
12054
|
-
|
|
12055
|
-
|
|
12067
|
+
Xd as SetFontFamilyCommand,
|
|
12068
|
+
Zd as SetFontSizeCommand,
|
|
12069
|
+
Ku as SetFrozenCommand,
|
|
12056
12070
|
ht as SetFrozenMutation,
|
|
12057
12071
|
Pr as SetFrozenMutationFactory,
|
|
12058
|
-
|
|
12072
|
+
Yu as SetGridlinesColorCommand,
|
|
12059
12073
|
Ht as SetGridlinesColorMutation,
|
|
12060
|
-
|
|
12061
|
-
|
|
12074
|
+
ul as SetHorizontalTextAlignCommand,
|
|
12075
|
+
Kd as SetItalicCommand,
|
|
12062
12076
|
Fo as SetNumfmtMutation,
|
|
12063
|
-
|
|
12064
|
-
|
|
12077
|
+
qd as SetOverlineCommand,
|
|
12078
|
+
qu as SetProtectionCommand,
|
|
12065
12079
|
ge as SetRangeProtectionMutation,
|
|
12066
12080
|
sn as SetRangeValuesCommand,
|
|
12067
12081
|
X as SetRangeValuesMutation,
|
|
12068
12082
|
be as SetRangeValuesUndoMutationFactory,
|
|
12069
|
-
|
|
12083
|
+
Zu as SetRowDataCommand,
|
|
12070
12084
|
Bt as SetRowDataMutation,
|
|
12071
|
-
|
|
12085
|
+
Xu as SetRowDataMutationFactory,
|
|
12072
12086
|
Ho as SetRowHeightCommand,
|
|
12073
|
-
|
|
12087
|
+
Or as SetRowHiddenCommand,
|
|
12074
12088
|
en as SetRowHiddenMutation,
|
|
12075
12089
|
Qt as SetRowVisibleMutation,
|
|
12076
12090
|
Er as SetSelectedColsVisibleCommand,
|
|
12077
|
-
|
|
12091
|
+
Nr as SetSelectedRowsVisibleCommand,
|
|
12078
12092
|
re as SetSelectionsOperation,
|
|
12079
12093
|
Xn as SetSpecificColsVisibleCommand,
|
|
12080
12094
|
Zn as SetSpecificRowsVisibleCommand,
|
|
12081
|
-
|
|
12095
|
+
Yd as SetStrikeThroughCommand,
|
|
12082
12096
|
Re as SetStyleCommand,
|
|
12083
|
-
|
|
12097
|
+
hl as SetTabColorCommand,
|
|
12084
12098
|
Rn as SetTabColorMutation,
|
|
12085
|
-
|
|
12086
|
-
|
|
12087
|
-
|
|
12088
|
-
|
|
12089
|
-
|
|
12099
|
+
ol as SetTextColorCommand,
|
|
12100
|
+
cl as SetTextRotationCommand,
|
|
12101
|
+
ll as SetTextWrapCommand,
|
|
12102
|
+
Jd as SetUnderlineCommand,
|
|
12103
|
+
al as SetVerticalTextAlignCommand,
|
|
12090
12104
|
xr as SetWorkbookNameCommand,
|
|
12091
12105
|
Ar as SetWorkbookNameMutation,
|
|
12092
12106
|
Wr as SetWorksheetActivateCommand,
|
|
12093
12107
|
un as SetWorksheetActiveOperation,
|
|
12094
12108
|
st as SetWorksheetColWidthMutation,
|
|
12095
12109
|
$r as SetWorksheetColWidthMutationFactory,
|
|
12096
|
-
|
|
12110
|
+
fl as SetWorksheetDefaultStyleCommand,
|
|
12097
12111
|
Ft as SetWorksheetDefaultStyleMutation,
|
|
12098
|
-
|
|
12099
|
-
|
|
12112
|
+
gl as SetWorksheetDefaultStyleMutationFactory,
|
|
12113
|
+
Rl as SetWorksheetHideCommand,
|
|
12100
12114
|
mt as SetWorksheetHideMutation,
|
|
12101
12115
|
Wo as SetWorksheetNameCommand,
|
|
12102
12116
|
yn as SetWorksheetNameMutation,
|
|
12103
12117
|
Lr as SetWorksheetOrderCommand,
|
|
12104
12118
|
pn as SetWorksheetOrderMutation,
|
|
12105
|
-
|
|
12119
|
+
_l as SetWorksheetPermissionPointsCommand,
|
|
12106
12120
|
$o as SetWorksheetPermissionPointsMutation,
|
|
12107
|
-
|
|
12121
|
+
yl as SetWorksheetProtectionCommand,
|
|
12108
12122
|
It as SetWorksheetProtectionMutation,
|
|
12109
12123
|
_a as SetWorksheetRangeThemeStyleCommand,
|
|
12110
12124
|
Kt as SetWorksheetRangeThemeStyleMutation,
|
|
12111
12125
|
va as SetWorksheetRangeThemeStyleMutationFactory,
|
|
12112
|
-
|
|
12126
|
+
yh as SetWorksheetRightToLeftCommand,
|
|
12113
12127
|
uo as SetWorksheetRightToLeftMutation,
|
|
12114
12128
|
jr as SetWorksheetRowAutoHeightMutation,
|
|
12115
|
-
|
|
12129
|
+
eh as SetWorksheetRowAutoHeightMutationFactory,
|
|
12116
12130
|
rt as SetWorksheetRowHeightMutation,
|
|
12117
12131
|
Bo as SetWorksheetRowIsAutoHeightCommand,
|
|
12118
12132
|
xe as SetWorksheetRowIsAutoHeightMutation,
|
|
12119
12133
|
Gr as SetWorksheetShowCommand,
|
|
12120
12134
|
F as SheetInterceptorService,
|
|
12121
|
-
|
|
12135
|
+
On as SheetPermissionCheckController,
|
|
12122
12136
|
Dn as SheetPermissionInitController,
|
|
12123
12137
|
fo as SheetRangeThemeService,
|
|
12124
|
-
|
|
12138
|
+
md as SheetSkeletonChangeType,
|
|
12125
12139
|
Vn as SheetSkeletonService,
|
|
12126
|
-
|
|
12140
|
+
gd as SheetValueChangeType,
|
|
12127
12141
|
H as SheetsSelectionsService,
|
|
12128
|
-
|
|
12129
|
-
|
|
12130
|
-
|
|
12131
|
-
|
|
12142
|
+
El as SplitDelimiterEnum,
|
|
12143
|
+
Dl as SplitTextToColumnsCommand,
|
|
12144
|
+
Al as ToggleCellCheckboxCommand,
|
|
12145
|
+
xl as ToggleGridlinesCommand,
|
|
12132
12146
|
jt as ToggleGridlinesMutation,
|
|
12133
12147
|
_ as UnitAction,
|
|
12134
12148
|
A as UnitObject,
|
|
12135
12149
|
Ln as UniverSheetsPlugin,
|
|
12136
|
-
|
|
12150
|
+
Wl as UnregisterWorksheetRangeThemeStyleCommand,
|
|
12137
12151
|
Po as UnregisterWorksheetRangeThemeStyleMutation,
|
|
12138
12152
|
oo as VALIDATE_CELL,
|
|
12139
12153
|
Yi as ViewStateEnum,
|
|
12140
12154
|
Hs as WorkbookCommentPermission,
|
|
12141
12155
|
Bs as WorkbookCopyPermission,
|
|
12142
|
-
|
|
12156
|
+
ru as WorkbookCopySheetPermission,
|
|
12143
12157
|
Fs as WorkbookCreateProtectPermission,
|
|
12144
12158
|
js as WorkbookCreateSheetPermission,
|
|
12145
12159
|
Gs as WorkbookDeleteSheetPermission,
|
|
@@ -12147,14 +12161,14 @@ export {
|
|
|
12147
12161
|
Me as WorkbookEditablePermission,
|
|
12148
12162
|
Ks as WorkbookExportPermission,
|
|
12149
12163
|
bo as WorkbookHideSheetPermission,
|
|
12150
|
-
|
|
12164
|
+
iu as WorkbookHistoryPermission,
|
|
12151
12165
|
Eo as WorkbookManageCollaboratorPermission,
|
|
12152
12166
|
Uo as WorkbookMoveSheetPermission,
|
|
12153
12167
|
$n as WorkbookPermissionService,
|
|
12154
12168
|
Js as WorkbookPrintPermission,
|
|
12155
12169
|
Ys as WorkbookRecoverHistoryPermission,
|
|
12156
12170
|
ko as WorkbookRenameSheetPermission,
|
|
12157
|
-
|
|
12171
|
+
ja as WorkbookSelectionModel,
|
|
12158
12172
|
qs as WorkbookSharePermission,
|
|
12159
12173
|
Zs as WorkbookViewHistoryPermission,
|
|
12160
12174
|
Xs as WorkbookViewPermission,
|
|
@@ -12163,7 +12177,7 @@ export {
|
|
|
12163
12177
|
tr as WorksheetDeleteProtectionPermission,
|
|
12164
12178
|
nr as WorksheetDeleteRowPermission,
|
|
12165
12179
|
or as WorksheetEditExtraObjectPermission,
|
|
12166
|
-
|
|
12180
|
+
Oe as WorksheetEditPermission,
|
|
12167
12181
|
sr as WorksheetFilterPermission,
|
|
12168
12182
|
rr as WorksheetInsertColumnPermission,
|
|
12169
12183
|
ir as WorksheetInsertHyperlinkPermission,
|
|
@@ -12173,80 +12187,80 @@ export {
|
|
|
12173
12187
|
lr as WorksheetPivotTablePermission,
|
|
12174
12188
|
ln as WorksheetProtectionPointModel,
|
|
12175
12189
|
Xe as WorksheetProtectionRuleModel,
|
|
12176
|
-
|
|
12177
|
-
|
|
12190
|
+
Hd as WorksheetSelectProtectedCellsPermission,
|
|
12191
|
+
Bd as WorksheetSelectUnProtectedCellsPermission,
|
|
12178
12192
|
cr as WorksheetSetCellStylePermission,
|
|
12179
12193
|
In as WorksheetSetCellValuePermission,
|
|
12180
12194
|
$t as WorksheetSetColumnStylePermission,
|
|
12181
12195
|
Vt as WorksheetSetRowStylePermission,
|
|
12182
12196
|
dr as WorksheetSortPermission,
|
|
12183
12197
|
Gn as WorksheetViewPermission,
|
|
12184
|
-
|
|
12185
|
-
|
|
12198
|
+
_h as addMergeCellsUtil,
|
|
12199
|
+
wc as adjustRangeOnMutation,
|
|
12186
12200
|
jn as alignToMergedCellsBorders,
|
|
12187
12201
|
ct as baseProtectionActions,
|
|
12188
12202
|
Zo as checkCellValueType,
|
|
12189
|
-
|
|
12190
|
-
|
|
12191
|
-
|
|
12203
|
+
wh as checkRangesEditablePermission,
|
|
12204
|
+
fd as convertPrimaryWithCoordToPrimary,
|
|
12205
|
+
gh as convertSelectionDataToRange,
|
|
12192
12206
|
lt as copyRangeStyles,
|
|
12193
|
-
|
|
12194
|
-
|
|
12195
|
-
|
|
12207
|
+
Ll as createTopMatrixFromMatrix,
|
|
12208
|
+
Vl as createTopMatrixFromRanges,
|
|
12209
|
+
Sl as defaultWorkbookPermissionPoints,
|
|
12196
12210
|
so as defaultWorksheetPermissionPoint,
|
|
12197
|
-
|
|
12198
|
-
|
|
12199
|
-
|
|
12211
|
+
ph as expandToContinuousRange,
|
|
12212
|
+
oh as factoryRemoveNumfmtUndoMutation,
|
|
12213
|
+
nh as factorySetNumfmtUndoMutation,
|
|
12200
12214
|
zr as findAllRectangle,
|
|
12201
12215
|
Ze as followSelectionOperation,
|
|
12202
12216
|
Ws as generateNullCell,
|
|
12203
|
-
|
|
12217
|
+
Ha as generateNullCellValue,
|
|
12204
12218
|
ei as getAddMergeMutationRangeByType,
|
|
12205
12219
|
ve as getAllRangePermissionPoint,
|
|
12206
12220
|
tn as getAllWorkbookPermissionPoint,
|
|
12207
12221
|
Ie as getAllWorksheetPermissionPoint,
|
|
12208
12222
|
De as getAllWorksheetPermissionPointByPointPanel,
|
|
12209
|
-
|
|
12210
|
-
|
|
12223
|
+
$d as getCellAtRowCol,
|
|
12224
|
+
Qd as getDefaultRangePermission,
|
|
12211
12225
|
hr as getInsertRangeMutations,
|
|
12212
12226
|
_o as getMoveRangeUndoRedoMutations,
|
|
12213
|
-
|
|
12227
|
+
Ch as getNextPrimaryCell,
|
|
12214
12228
|
Se as getPrimaryForRange,
|
|
12215
12229
|
mr as getRemoveRangeMutations,
|
|
12216
|
-
|
|
12217
|
-
|
|
12230
|
+
nu as getSelectionsService,
|
|
12231
|
+
ah as getSeparateEffectedRangesOnCommand,
|
|
12218
12232
|
k as getSheetCommandTarget,
|
|
12219
12233
|
Ia as getSheetCommandTargetWorkbook,
|
|
12220
12234
|
kt as getSheetMutationTarget,
|
|
12221
|
-
|
|
12222
|
-
|
|
12235
|
+
dh as getSkeletonChangedEffectedRange,
|
|
12236
|
+
ch as getValueChangedEffectedRange,
|
|
12223
12237
|
Fn as getVisibleRanges,
|
|
12224
12238
|
yt as handleBaseInsertRange,
|
|
12225
12239
|
Tn as handleBaseMoveRowsCols,
|
|
12226
12240
|
_t as handleBaseRemoveRange,
|
|
12227
12241
|
as as handleCommonDefaultRangeChangeWithEffectRefCommands,
|
|
12228
|
-
|
|
12242
|
+
ih as handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests,
|
|
12229
12243
|
is as handleDefaultRangeChangeWithEffectRefCommands,
|
|
12230
|
-
|
|
12231
|
-
|
|
12232
|
-
|
|
12233
|
-
|
|
12244
|
+
rh as handleDefaultRangeChangeWithEffectRefCommandsSkipNoInterests,
|
|
12245
|
+
mc as handleDeleteRangeMoveLeft,
|
|
12246
|
+
fc as handleDeleteRangeMoveUp,
|
|
12247
|
+
jd as handleDeleteRangeMutation,
|
|
12234
12248
|
Zr as handleIRemoveCol,
|
|
12235
|
-
|
|
12236
|
-
|
|
12237
|
-
|
|
12238
|
-
|
|
12239
|
-
|
|
12240
|
-
|
|
12249
|
+
sc as handleIRemoveRow,
|
|
12250
|
+
uc as handleInsertCol,
|
|
12251
|
+
lc as handleInsertRangeMoveDown,
|
|
12252
|
+
dc as handleInsertRangeMoveRight,
|
|
12253
|
+
Fd as handleInsertRangeMutation,
|
|
12254
|
+
ac as handleInsertRow,
|
|
12241
12255
|
Xr as handleMoveCols,
|
|
12242
|
-
|
|
12256
|
+
nc as handleMoveRange,
|
|
12243
12257
|
qr as handleMoveRows,
|
|
12244
|
-
|
|
12258
|
+
Ld as isSingleCellSelection,
|
|
12245
12259
|
Kr as rangeMerge,
|
|
12246
|
-
|
|
12260
|
+
Fa as rangeToDiscreteRange,
|
|
12247
12261
|
_e as rotateRange,
|
|
12248
12262
|
bt as runRefRangeMutations,
|
|
12249
|
-
|
|
12250
|
-
|
|
12263
|
+
Vd as setEndForRange,
|
|
12264
|
+
Ol as splitRangeText,
|
|
12251
12265
|
mo as transformCellsToRange
|
|
12252
12266
|
};
|