@univerjs/sheets-table 0.13.0-insiders.20251215-64041bb → 0.13.0-insiders.20251218-2062647
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +154 -154
- package/lib/index.js +154 -154
- package/lib/umd/index.js +1 -1
- package/package.json +4 -4
package/lib/es/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var ot = Object.defineProperty;
|
|
2
2
|
var it = (t, e, n) => e in t ? ot(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var b = (t, e, n) => it(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
-
import { CellValueType as J, UniverInstanceType as j, BorderStyleTypes as lt, createREGEXFromWildChar as Z, generateRandomId as
|
|
4
|
+
import { CellValueType as J, UniverInstanceType as j, BorderStyleTypes as lt, createREGEXFromWildChar as Z, generateRandomId as B, IUniverInstanceService as A, Inject as C, LocaleService as be, Disposable as H, CommandType as y, IUndoRedoService as L, ICommandService as D, customNameCharacterCheck as Be, sequenceExecute as E, ILogService as We, IResourceManagerService as ut, Rectangle as _e, RTree as ct, InterceptorEffectEnum as dt, Injector as He, IConfigService as Ve, Plugin as ht, merge as gt, registerDependencies as mt, touchDependencies as Me } from "@univerjs/core";
|
|
5
5
|
import { IDefinedNamesService as Pe, RemoveSuperTableMutation as ve, SetSuperTableMutation as bt } from "@univerjs/engine-formula";
|
|
6
|
-
import { getSheetCommandTarget as $, SheetInterceptorService as
|
|
6
|
+
import { getSheetCommandTarget as $, SheetInterceptorService as Re, INTERCEPTOR_POINT as qe, RemoveSheetCommand as wt, CopySheetCommand as ft, AddRangeThemeMutation as Je, RemoveRangeThemeMutation as ke, SheetRangeThemeModel as Qe, SheetsSelectionsService as we, InsertRowMutation as Ye, RemoveRowMutation as Ge, getMoveRangeUndoRedoMutations as fe, InsertColMutation as je, RemoveColMutation as ze, IExclusiveRangeService as pt, RefRangeService as St, RemoveColCommand as _t, RemoveRowCommand as Ct, InsertColCommand as Rt, InsertRowCommand as Tt, SheetRangeThemeService as It, RangeThemeStyle as Mt, ZebraCrossingCacheController as vt } from "@univerjs/sheets";
|
|
7
7
|
import { Subject as Y, BehaviorSubject as Ke, filter as pe, switchMap as Fe } from "rxjs";
|
|
8
8
|
var M = /* @__PURE__ */ ((t) => (t.Insert = "insert", t.Delete = "delete", t))(M || {}), N = /* @__PURE__ */ ((t) => (t.Row = "row", t.Col = "column", t))(N || {}), Xe = /* @__PURE__ */ ((t) => (t.None = "none", t.String = "string", t.Number = "number", t.Date = "date", t.Bool = "bool", t.Checkbox = "checkbox", t.List = "list", t))(Xe || {}), ne = /* @__PURE__ */ ((t) => (t.manual = "manual", t.condition = "condition", t))(ne || {}), U = /* @__PURE__ */ ((t) => (t.Date = "date", t.Number = "number", t.String = "string", t.Logic = "logic", t))(U || {}), F = /* @__PURE__ */ ((t) => (t.Equal = "equal", t.NotEqual = "notEqual", t.GreaterThan = "greaterThan", t.GreaterThanOrEqual = "greaterThanOrEqual", t.LessThan = "lessThan", t.LessThanOrEqual = "lessThanOrEqual", t.Between = "between", t.NotBetween = "notBetween", t.Above = "above", t.Below = "below", t.TopN = "topN", t))(F || {}), P = /* @__PURE__ */ ((t) => (t.Equal = "equal", t.NotEqual = "notEqual", t.Contains = "contains", t.NotContains = "notContains", t.StartsWith = "startsWith", t.EndsWith = "endsWith", t))(P || {}), m = /* @__PURE__ */ ((t) => (t.Equal = "equal", t.NotEqual = "notEqual", t.After = "after", t.AfterOrEqual = "afterOrEqual", t.Before = "before", t.BeforeOrEqual = "beforeOrEqual", t.Between = "between", t.NotBetween = "notBetween", t.Today = "today", t.Yesterday = "yesterday", t.Tomorrow = "tomorrow", t.ThisWeek = "thisWeek", t.LastWeek = "lastWeek", t.NextWeek = "nextWeek", t.ThisMonth = "thisMonth", t.LastMonth = "lastMonth", t.NextMonth = "nextMonth", t.ThisQuarter = "thisQuarter", t.LastQuarter = "lastQuarter", t.NextQuarter = "nextQuarter", t.ThisYear = "thisYear", t.LastYear = "lastYear", t.NextYear = "nextYear", t.YearToDate = "yearToDate", t.Quarter = "quarter", t.Month = "month", t.M1 = "m1", t.M2 = "m2", t.M3 = "m3", t.M4 = "m4", t.M5 = "m5", t.M6 = "m6", t.M7 = "m7", t.M8 = "m8", t.M9 = "m9", t.M10 = "m10", t.M11 = "m11", t.M12 = "m12", t.Q1 = "q1", t.Q2 = "q2", t.Q3 = "q3", t.Q4 = "q4", t))(m || {}), q = /* @__PURE__ */ ((t) => (t[t.FilteredSortNone = 1] = "FilteredSortNone", t[t.FilteredSortAsc = 2] = "FilteredSortAsc", t[t.FilteredSortDesc = 3] = "FilteredSortDesc", t[t.FilterNoneSortNone = 4] = "FilterNoneSortNone", t[t.FilterNoneSortAsc = 5] = "FilterNoneSortAsc", t[t.FilterNoneSortDesc = 6] = "FilterNoneSortDesc", t))(q || {}), G = /* @__PURE__ */ ((t) => (t.Asc = "asc", t.Desc = "desc", t.None = "none", t))(G || {});
|
|
9
9
|
function te(t, e) {
|
|
@@ -49,15 +49,15 @@ function gs(t) {
|
|
|
49
49
|
function et(t, e) {
|
|
50
50
|
const { univerInstanceService: n, tableManager: s, definedNamesService: r } = e, a = /* @__PURE__ */ new Set(), o = n == null ? void 0 : n.getUnit(t, j.UNIVER_SHEET);
|
|
51
51
|
o && o.getSheets().forEach((i) => {
|
|
52
|
-
a.add(i.getName());
|
|
52
|
+
a.add(i.getName().toLowerCase());
|
|
53
53
|
});
|
|
54
54
|
const u = s == null ? void 0 : s.getTableList(t);
|
|
55
55
|
u && u.length > 0 && u.forEach((i) => {
|
|
56
|
-
a.add(i.name);
|
|
56
|
+
a.add(i.name.toLowerCase());
|
|
57
57
|
});
|
|
58
58
|
const l = r == null ? void 0 : r.getDefinedNameMap(t);
|
|
59
59
|
return l && Object.values(l).forEach((i) => {
|
|
60
|
-
a.add(i.name);
|
|
60
|
+
a.add(i.name.toLowerCase());
|
|
61
61
|
}), a;
|
|
62
62
|
}
|
|
63
63
|
const x = {
|
|
@@ -215,7 +215,7 @@ const xt = (t) => t.getMonth() <= 2, Ot = (t) => {
|
|
|
215
215
|
}, $t = (t) => {
|
|
216
216
|
const e = t.getMonth();
|
|
217
217
|
return e > 8 && e <= 11;
|
|
218
|
-
}, At = (t) => t.getMonth() === 0,
|
|
218
|
+
}, At = (t) => t.getMonth() === 0, Lt = (t) => t.getMonth() === 1, Et = (t) => t.getMonth() === 2, Bt = (t) => t.getMonth() === 3, Wt = (t) => t.getMonth() === 4, Ht = (t) => t.getMonth() === 5, Vt = (t) => t.getMonth() === 6, Pt = (t) => t.getMonth() === 7, qt = (t) => t.getMonth() === 8, Jt = (t) => t.getMonth() === 9, kt = (t) => t.getMonth() === 10, Qt = (t) => t.getMonth() === 11, Yt = (t, e = /* @__PURE__ */ new Date()) => t.toDateString() === e.toDateString(), Gt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
219
219
|
const n = new Date(e);
|
|
220
220
|
return n.setDate(n.getDate() + 1), t.toDateString() === n.toDateString();
|
|
221
221
|
}, jt = (t, e = /* @__PURE__ */ new Date()) => {
|
|
@@ -381,11 +381,11 @@ function dn(t) {
|
|
|
381
381
|
case m.M1:
|
|
382
382
|
return At;
|
|
383
383
|
case m.M2:
|
|
384
|
-
return
|
|
384
|
+
return Lt;
|
|
385
385
|
case m.M3:
|
|
386
|
-
return
|
|
386
|
+
return Et;
|
|
387
387
|
case m.M4:
|
|
388
|
-
return
|
|
388
|
+
return Bt;
|
|
389
389
|
case m.M5:
|
|
390
390
|
return Wt;
|
|
391
391
|
case m.M6:
|
|
@@ -522,7 +522,7 @@ const mn = (t, e) => {
|
|
|
522
522
|
for (const s of t)
|
|
523
523
|
n.insert(s), n.size() > e && n.pop();
|
|
524
524
|
return n.heap;
|
|
525
|
-
}, bn = (t, e) => t > e,
|
|
525
|
+
}, bn = (t, e) => t > e, wn = (t, e) => t < e, fn = (t, e, n) => mn(t, e).includes(n);
|
|
526
526
|
function pn(t, e) {
|
|
527
527
|
switch (t.compareType) {
|
|
528
528
|
case F.Equal: {
|
|
@@ -563,15 +563,15 @@ function pn(t, e) {
|
|
|
563
563
|
}
|
|
564
564
|
case F.Below: {
|
|
565
565
|
const n = e.average;
|
|
566
|
-
return (s) =>
|
|
566
|
+
return (s) => wn(s, n);
|
|
567
567
|
}
|
|
568
568
|
case F.TopN: {
|
|
569
569
|
const n = e.list, s = Number(t.expectedValue);
|
|
570
|
-
return (r) =>
|
|
570
|
+
return (r) => fn(n, s, r);
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
573
|
}
|
|
574
|
-
const Sn = (t, e) => Z(e).test(t), _n = (t, e) => !Z(e).test(t),
|
|
574
|
+
const Sn = (t, e) => Z(e).test(t), _n = (t, e) => !Z(e).test(t), Cn = (t, e) => Z(`*${e}*`).test(t), Rn = (t, e) => !Z(`*${e}*`).test(t), Tn = (t, e) => Z(`${e}*`).test(t), In = (t, e) => Z(`*${e}`).test(t);
|
|
575
575
|
function Mn(t) {
|
|
576
576
|
switch (t.compareType) {
|
|
577
577
|
case P.Equal:
|
|
@@ -579,9 +579,9 @@ function Mn(t) {
|
|
|
579
579
|
case P.NotEqual:
|
|
580
580
|
return (e) => _n(e, t.expectedValue);
|
|
581
581
|
case P.Contains:
|
|
582
|
-
return (e) => Rn(e, t.expectedValue);
|
|
583
|
-
case P.NotContains:
|
|
584
582
|
return (e) => Cn(e, t.expectedValue);
|
|
583
|
+
case P.NotContains:
|
|
584
|
+
return (e) => Rn(e, t.expectedValue);
|
|
585
585
|
case P.StartsWith:
|
|
586
586
|
return (e) => Tn(e, t.expectedValue);
|
|
587
587
|
case P.EndsWith:
|
|
@@ -767,7 +767,7 @@ class Ue {
|
|
|
767
767
|
for (let l = r; l <= a; l++) {
|
|
768
768
|
const i = l - r;
|
|
769
769
|
let h, d;
|
|
770
|
-
(u = n.columns) != null && u[i] ? (h = n.columns[i].id, d = n.columns[i].displayName) : (h =
|
|
770
|
+
(u = n.columns) != null && u[i] ? (h = n.columns[i].id, d = n.columns[i].displayName) : (h = B(), d = e[l - r]);
|
|
771
771
|
const c = new z(h, d);
|
|
772
772
|
this._columns.set(h, c), this._columnOrder.push(h);
|
|
773
773
|
}
|
|
@@ -975,7 +975,7 @@ let T = class extends H {
|
|
|
975
975
|
*/
|
|
976
976
|
addTable(e, n, s, r, a, o, u) {
|
|
977
977
|
var c;
|
|
978
|
-
const l = o != null ? o :
|
|
978
|
+
const l = o != null ? o : B(), i = a || this.getColumnHeader(e, n, r), h = new Ue(l, s, r, i, u);
|
|
979
979
|
if (h.setSubunitId(n), this._ensureUnit(e).set(l, h), this._tableAdd$.next({
|
|
980
980
|
unitId: e,
|
|
981
981
|
subUnitId: n,
|
|
@@ -1104,10 +1104,10 @@ let T = class extends H {
|
|
|
1104
1104
|
else if (o === "column") {
|
|
1105
1105
|
d.endColumn += l;
|
|
1106
1106
|
for (let c = 0; c < l; c++) {
|
|
1107
|
-
const g = this._localeService.t("sheets-table.columnPrefix"), _ = new z(
|
|
1107
|
+
const g = this._localeService.t("sheets-table.columnPrefix"), _ = new z(B(), te(r.getColumnsCount() + 1 + c, g));
|
|
1108
1108
|
i != null && i[c] && _.fromJSON(i[c]);
|
|
1109
|
-
const
|
|
1110
|
-
r.insertColumn(
|
|
1109
|
+
const f = u + c - h.startColumn;
|
|
1110
|
+
r.insertColumn(f, _);
|
|
1111
1111
|
}
|
|
1112
1112
|
}
|
|
1113
1113
|
} else if (o === "row")
|
|
@@ -1134,7 +1134,7 @@ let T = class extends H {
|
|
|
1134
1134
|
if (o.startColumn < a.startColumn) {
|
|
1135
1135
|
const u = a.startColumn - o.startColumn, l = this._localeService.t("sheets-table.columnPrefix");
|
|
1136
1136
|
for (let i = 0; i < u; i++)
|
|
1137
|
-
r.insertColumn(a.startColumn, new z(
|
|
1137
|
+
r.insertColumn(a.startColumn, new z(B(), te(r.getColumnsCount() + 1, l)));
|
|
1138
1138
|
} else if (o.startColumn > a.startColumn) {
|
|
1139
1139
|
const u = o.startColumn - a.startColumn;
|
|
1140
1140
|
for (let l = u - 1; l >= 0; l--) {
|
|
@@ -1151,7 +1151,7 @@ let T = class extends H {
|
|
|
1151
1151
|
} else if (o.endColumn > a.endColumn) {
|
|
1152
1152
|
const u = o.endColumn - a.endColumn;
|
|
1153
1153
|
for (let l = 0; l < u; l++)
|
|
1154
|
-
r.insertColumn(a.endColumn, new z(
|
|
1154
|
+
r.insertColumn(a.endColumn, new z(B(), te(r.getColumnsCount() + 1, "Column")));
|
|
1155
1155
|
}
|
|
1156
1156
|
r.setRange(o), this._tableRangeChanged$.next({
|
|
1157
1157
|
unitId: e,
|
|
@@ -1243,7 +1243,7 @@ let T = class extends H {
|
|
|
1243
1243
|
};
|
|
1244
1244
|
T = On([
|
|
1245
1245
|
$e(0, A),
|
|
1246
|
-
$e(1,
|
|
1246
|
+
$e(1, C(be))
|
|
1247
1247
|
], T);
|
|
1248
1248
|
var Un = Object.getOwnPropertyDescriptor, $n = (t, e, n, s) => {
|
|
1249
1249
|
for (var r = s > 1 ? void 0 : s ? Un(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
@@ -1295,7 +1295,7 @@ let X = class extends H {
|
|
|
1295
1295
|
}
|
|
1296
1296
|
};
|
|
1297
1297
|
X = $n([
|
|
1298
|
-
An(0,
|
|
1298
|
+
An(0, C(T))
|
|
1299
1299
|
], X);
|
|
1300
1300
|
const k = {
|
|
1301
1301
|
id: "sheet.mutation.add-table",
|
|
@@ -1311,43 +1311,43 @@ const k = {
|
|
|
1311
1311
|
const { unitId: n, subUnitId: s, tableId: r } = e;
|
|
1312
1312
|
return t.get(X).deleteTable(n, s, r), !0;
|
|
1313
1313
|
}
|
|
1314
|
-
},
|
|
1314
|
+
}, Ln = {
|
|
1315
1315
|
id: "sheet.command.add-table",
|
|
1316
1316
|
type: y.COMMAND,
|
|
1317
1317
|
handler: (t, e) => {
|
|
1318
1318
|
var p;
|
|
1319
1319
|
if (!e)
|
|
1320
1320
|
return !1;
|
|
1321
|
-
const n = t.get(
|
|
1321
|
+
const n = t.get(L), s = t.get(D), r = t.get(be), a = t.get(T), o = (p = e.id) != null ? p : B(), u = et(e.unitId, {
|
|
1322
1322
|
univerInstanceService: t.get(A),
|
|
1323
1323
|
tableManager: a,
|
|
1324
1324
|
definedNamesService: t.get(Pe)
|
|
1325
1325
|
});
|
|
1326
1326
|
let l = e.name;
|
|
1327
|
-
if (!l || !
|
|
1328
|
-
const
|
|
1329
|
-
let
|
|
1327
|
+
if (!l || !Be(l.toLowerCase(), u)) {
|
|
1328
|
+
const w = r.t("sheets-table.tablePrefix");
|
|
1329
|
+
let R = a.getTableList(e.unitId).length + 1;
|
|
1330
1330
|
for (const O of u)
|
|
1331
|
-
if (O.startsWith(
|
|
1332
|
-
const I = Number(O.slice(
|
|
1333
|
-
Number.isInteger(I) && I >=
|
|
1331
|
+
if (O.startsWith(w.toLowerCase())) {
|
|
1332
|
+
const I = Number(O.slice(w.length));
|
|
1333
|
+
Number.isInteger(I) && I >= R && (R = I + 1);
|
|
1334
1334
|
}
|
|
1335
|
-
l = `${
|
|
1335
|
+
l = `${w}${R}`;
|
|
1336
1336
|
}
|
|
1337
1337
|
const i = [], h = [], { unitId: d, subUnitId: c, range: g } = e, _ = a.getColumnHeader(d, c, g, r.t("sheets-table.columnPrefix"));
|
|
1338
|
-
return i.push({ id: k.id, params: { ...e, tableId: o, name: l, header: _ } }), h.push({ id: Q.id, params: { tableId: o, unitId: e.unitId } }),
|
|
1338
|
+
return i.push({ id: k.id, params: { ...e, tableId: o, name: l, header: _ } }), h.push({ id: Q.id, params: { tableId: o, unitId: e.unitId } }), E(i, s) && n.pushUndoRedo({
|
|
1339
1339
|
unitID: e.unitId,
|
|
1340
1340
|
undoMutations: h,
|
|
1341
1341
|
redoMutations: i
|
|
1342
1342
|
}), !0;
|
|
1343
1343
|
}
|
|
1344
|
-
},
|
|
1344
|
+
}, En = {
|
|
1345
1345
|
id: "sheet.command.delete-table",
|
|
1346
1346
|
type: y.COMMAND,
|
|
1347
1347
|
handler: (t, e) => {
|
|
1348
1348
|
if (!e)
|
|
1349
1349
|
return !1;
|
|
1350
|
-
const n = t.get(
|
|
1350
|
+
const n = t.get(L), s = t.get(D), r = t.get(T), a = t.get(We), o = [], u = [], l = r.getTable(e.unitId, e.tableId), i = l == null ? void 0 : l.toJSON();
|
|
1351
1351
|
return i ? (o.push({ id: Q.id, params: { ...e } }), u.push({
|
|
1352
1352
|
id: k.id,
|
|
1353
1353
|
params: {
|
|
@@ -1358,27 +1358,27 @@ const k = {
|
|
|
1358
1358
|
range: i.range,
|
|
1359
1359
|
options: i.options
|
|
1360
1360
|
}
|
|
1361
|
-
}),
|
|
1361
|
+
}), E(o, s) && n.pushUndoRedo({
|
|
1362
1362
|
unitID: e.unitId,
|
|
1363
1363
|
undoMutations: u,
|
|
1364
1364
|
redoMutations: o
|
|
1365
1365
|
}), !0) : (a.error("[TableManager]: Table not found"), !1);
|
|
1366
1366
|
}
|
|
1367
|
-
},
|
|
1367
|
+
}, Ce = {
|
|
1368
1368
|
id: "sheet.mutation.set-table-filter",
|
|
1369
1369
|
type: y.MUTATION,
|
|
1370
1370
|
handler: (t, e) => {
|
|
1371
1371
|
const { tableId: n, unitId: s, column: r, tableFilter: a } = e;
|
|
1372
1372
|
return t.get(T).addFilter(s, n, r, a), !0;
|
|
1373
1373
|
}
|
|
1374
|
-
},
|
|
1374
|
+
}, Bn = {
|
|
1375
1375
|
id: "sheet.command.set-table-filter",
|
|
1376
1376
|
type: y.COMMAND,
|
|
1377
1377
|
handler: (t, e) => {
|
|
1378
1378
|
if (!e)
|
|
1379
1379
|
return !1;
|
|
1380
|
-
const n = t.get(
|
|
1381
|
-
return a.push({ id:
|
|
1380
|
+
const n = t.get(L), s = t.get(D), r = e.tableId || B(), a = [], o = [];
|
|
1381
|
+
return a.push({ id: Ce.id, params: { ...e, tableId: r } }), o.push({ id: Ce.id, params: { ...e, tableId: r, tableFilter: void 0 } }), E(a, s) && n.pushUndoRedo({
|
|
1382
1382
|
unitID: e.unitId,
|
|
1383
1383
|
undoMutations: o,
|
|
1384
1384
|
redoMutations: a
|
|
@@ -1458,8 +1458,8 @@ let W = class extends H {
|
|
|
1458
1458
|
if (d) {
|
|
1459
1459
|
const c = d.getRange(), g = a - c.startColumn;
|
|
1460
1460
|
if (c.startRow === r) {
|
|
1461
|
-
const
|
|
1462
|
-
return (!e || e === n.rawData) && (e = { ...n.rawData }), e.v =
|
|
1461
|
+
const f = d.getColumnNameByIndex(g);
|
|
1462
|
+
return (!e || e === n.rawData) && (e = { ...n.rawData }), e.v = f, s(e);
|
|
1463
1463
|
}
|
|
1464
1464
|
}
|
|
1465
1465
|
}
|
|
@@ -1507,7 +1507,7 @@ let W = class extends H {
|
|
|
1507
1507
|
// eslint-disable-next-line max-lines-per-function
|
|
1508
1508
|
getMutations: (e) => {
|
|
1509
1509
|
var n;
|
|
1510
|
-
if (e.id ===
|
|
1510
|
+
if (e.id === wt.id) {
|
|
1511
1511
|
const s = e.params, r = s.unitId || this._univerInstanceService.getCurrentUnitOfType(j.UNIVER_SHEET).getUnitId(), a = s.subUnitId || ((n = this._univerInstanceService.getCurrentUnitOfType(j.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : n.getSheetId());
|
|
1512
1512
|
if (!r || !a)
|
|
1513
1513
|
return { redos: [], undos: [] };
|
|
@@ -1540,7 +1540,7 @@ let W = class extends H {
|
|
|
1540
1540
|
}
|
|
1541
1541
|
});
|
|
1542
1542
|
}), { redos: u, undos: l };
|
|
1543
|
-
} else if (e.id ===
|
|
1543
|
+
} else if (e.id === ft.id) {
|
|
1544
1544
|
const s = e.params, { unitId: r, subUnitId: a, targetSubUnitId: o } = s;
|
|
1545
1545
|
if (!r || !a || !o)
|
|
1546
1546
|
return { redos: [], undos: [] };
|
|
@@ -1549,7 +1549,7 @@ let W = class extends H {
|
|
|
1549
1549
|
return { redos: [], undos: [] };
|
|
1550
1550
|
const l = [], i = [];
|
|
1551
1551
|
return u.forEach((h) => {
|
|
1552
|
-
const d = h.toJSON(), c =
|
|
1552
|
+
const d = h.toJSON(), c = B();
|
|
1553
1553
|
l.push({
|
|
1554
1554
|
id: k.id,
|
|
1555
1555
|
params: {
|
|
@@ -1587,10 +1587,10 @@ let W = class extends H {
|
|
|
1587
1587
|
}
|
|
1588
1588
|
};
|
|
1589
1589
|
W = Vn([
|
|
1590
|
-
ae(0,
|
|
1591
|
-
ae(1,
|
|
1592
|
-
ae(2,
|
|
1593
|
-
ae(3,
|
|
1590
|
+
ae(0, C(A)),
|
|
1591
|
+
ae(1, C(Re)),
|
|
1592
|
+
ae(2, C(T)),
|
|
1593
|
+
ae(3, C(ut))
|
|
1594
1594
|
], W);
|
|
1595
1595
|
const S = {
|
|
1596
1596
|
id: "sheet.mutation.set-sheet-table",
|
|
@@ -1646,7 +1646,7 @@ const S = {
|
|
|
1646
1646
|
}
|
|
1647
1647
|
});
|
|
1648
1648
|
const h = t.get(D);
|
|
1649
|
-
return
|
|
1649
|
+
return E(o, h) && t.get(L).pushUndoRedo({
|
|
1650
1650
|
unitID: s,
|
|
1651
1651
|
undoMutations: u,
|
|
1652
1652
|
redoMutations: o
|
|
@@ -1660,13 +1660,13 @@ const S = {
|
|
|
1660
1660
|
return !1;
|
|
1661
1661
|
const { unitId: n, tableId: s, themeName: r } = e, a = t.get(T), o = t.get(Qe), u = a.getTableById(n, s);
|
|
1662
1662
|
if (!u) return !1;
|
|
1663
|
-
const l = u.getSubunitId(), i = [], h = [], d = o.getRegisteredRangeThemes().filter((
|
|
1664
|
-
let g = o.getRegisteredRangeThemes().filter((
|
|
1663
|
+
const l = u.getSubunitId(), i = [], h = [], d = o.getRegisteredRangeThemes().filter((w) => w == null ? void 0 : w.startsWith("table-default"));
|
|
1664
|
+
let g = o.getRegisteredRangeThemes().filter((w) => w == null ? void 0 : w.startsWith(Wn)).find((w) => w !== r);
|
|
1665
1665
|
g || (g = d[0]), i.push({ id: S.id, params: { unitId: n, subUnitId: l, tableId: s, config: { theme: g } } }), i.push({ id: ke.id, params: { unitId: n, subUnitId: l, styleName: r } });
|
|
1666
1666
|
const _ = o.getDefaultRangeThemeStyle(r);
|
|
1667
1667
|
_ && (h.push({ id: Je.id, params: { unitId: n, subUnitId: l, styleJSON: _.toJson() } }), h.push({ id: S.id, params: { unitId: n, subUnitId: l, tableId: s, config: { theme: r } } }));
|
|
1668
|
-
const
|
|
1669
|
-
return
|
|
1668
|
+
const f = t.get(D);
|
|
1669
|
+
return E(i, f) && t.get(L).pushUndoRedo({
|
|
1670
1670
|
unitID: n,
|
|
1671
1671
|
redoMutations: i,
|
|
1672
1672
|
undoMutations: h
|
|
@@ -1687,7 +1687,7 @@ const S = {
|
|
|
1687
1687
|
definedNamesService: t.get(Pe)
|
|
1688
1688
|
});
|
|
1689
1689
|
if (r) {
|
|
1690
|
-
if (!
|
|
1690
|
+
if (!Be(r.toLowerCase(), g))
|
|
1691
1691
|
return t.get(We).warn(c.t("sheets-table.tableNameError")), !1;
|
|
1692
1692
|
h.name = i.getDisplayName(), d.name = r;
|
|
1693
1693
|
}
|
|
@@ -1705,7 +1705,7 @@ const S = {
|
|
|
1705
1705
|
tableId: s,
|
|
1706
1706
|
config: d
|
|
1707
1707
|
};
|
|
1708
|
-
return t.get(D).executeCommand(S.id, _), t.get(
|
|
1708
|
+
return t.get(D).executeCommand(S.id, _), t.get(L).pushUndoRedo({
|
|
1709
1709
|
unitID: n,
|
|
1710
1710
|
undoMutations: [
|
|
1711
1711
|
{
|
|
@@ -1733,22 +1733,22 @@ const S = {
|
|
|
1733
1733
|
const e = t.get(A), n = $(e);
|
|
1734
1734
|
if (!n)
|
|
1735
1735
|
return !1;
|
|
1736
|
-
const { workbook: s, worksheet: r, unitId: a, subUnitId: o } = n, l = t.get(
|
|
1736
|
+
const { workbook: s, worksheet: r, unitId: a, subUnitId: o } = n, l = t.get(we).getCurrentSelections();
|
|
1737
1737
|
if (!l.length || l.length > 1)
|
|
1738
1738
|
return !1;
|
|
1739
1739
|
t.get(T);
|
|
1740
1740
|
const h = l[0].range, c = t.get(W).getContainerTableWithRange(a, o, h);
|
|
1741
1741
|
if (!c) return !1;
|
|
1742
|
-
const g = h.endRow - h.startRow + 1,
|
|
1743
|
-
if (
|
|
1744
|
-
|
|
1742
|
+
const g = h.endRow - h.startRow + 1, f = r.getRowCount() - 1, p = r.getCellMatrix().getDataRange().endRow, w = [], R = [];
|
|
1743
|
+
if (f - p < g)
|
|
1744
|
+
w.push({
|
|
1745
1745
|
id: Ye.id,
|
|
1746
1746
|
params: {
|
|
1747
1747
|
unitId: a,
|
|
1748
1748
|
subUnitId: o,
|
|
1749
1749
|
range: { ...h }
|
|
1750
1750
|
}
|
|
1751
|
-
}),
|
|
1751
|
+
}), w.push({
|
|
1752
1752
|
id: S.id,
|
|
1753
1753
|
params: {
|
|
1754
1754
|
unitId: a,
|
|
@@ -1763,7 +1763,7 @@ const S = {
|
|
|
1763
1763
|
}
|
|
1764
1764
|
}
|
|
1765
1765
|
}
|
|
1766
|
-
}),
|
|
1766
|
+
}), R.push({
|
|
1767
1767
|
id: S.id,
|
|
1768
1768
|
params: {
|
|
1769
1769
|
unitId: a,
|
|
@@ -1775,7 +1775,7 @@ const S = {
|
|
|
1775
1775
|
}
|
|
1776
1776
|
}
|
|
1777
1777
|
}
|
|
1778
|
-
}),
|
|
1778
|
+
}), R.push({
|
|
1779
1779
|
id: Ge.id,
|
|
1780
1780
|
params: {
|
|
1781
1781
|
unitId: a,
|
|
@@ -1785,7 +1785,7 @@ const S = {
|
|
|
1785
1785
|
});
|
|
1786
1786
|
else {
|
|
1787
1787
|
const v = { ...c.getRange() };
|
|
1788
|
-
|
|
1788
|
+
w.push({
|
|
1789
1789
|
id: S.id,
|
|
1790
1790
|
params: {
|
|
1791
1791
|
unitId: a,
|
|
@@ -1800,7 +1800,7 @@ const S = {
|
|
|
1800
1800
|
}
|
|
1801
1801
|
}
|
|
1802
1802
|
}
|
|
1803
|
-
}),
|
|
1803
|
+
}), R.push({
|
|
1804
1804
|
id: S.id,
|
|
1805
1805
|
params: {
|
|
1806
1806
|
unitId: a,
|
|
@@ -1813,7 +1813,7 @@ const S = {
|
|
|
1813
1813
|
}
|
|
1814
1814
|
}
|
|
1815
1815
|
});
|
|
1816
|
-
const ee =
|
|
1816
|
+
const ee = fe(
|
|
1817
1817
|
t,
|
|
1818
1818
|
{
|
|
1819
1819
|
unitId: a,
|
|
@@ -1836,13 +1836,13 @@ const S = {
|
|
|
1836
1836
|
}
|
|
1837
1837
|
}
|
|
1838
1838
|
);
|
|
1839
|
-
ee && (
|
|
1839
|
+
ee && (w.push(...ee.redos), R.push(...ee.undos));
|
|
1840
1840
|
}
|
|
1841
1841
|
const O = t.get(D);
|
|
1842
|
-
return
|
|
1842
|
+
return E(w, O) && t.get(L).pushUndoRedo({
|
|
1843
1843
|
unitID: a,
|
|
1844
|
-
undoMutations:
|
|
1845
|
-
redoMutations:
|
|
1844
|
+
undoMutations: R,
|
|
1845
|
+
redoMutations: w
|
|
1846
1846
|
}), !0;
|
|
1847
1847
|
}
|
|
1848
1848
|
}, Qn = {
|
|
@@ -1852,13 +1852,13 @@ const S = {
|
|
|
1852
1852
|
const e = t.get(A), n = $(e);
|
|
1853
1853
|
if (!n)
|
|
1854
1854
|
return !1;
|
|
1855
|
-
const { worksheet: s, unitId: r, subUnitId: a } = n, u = t.get(
|
|
1855
|
+
const { worksheet: s, unitId: r, subUnitId: a } = n, u = t.get(we).getCurrentSelections();
|
|
1856
1856
|
if (!u.length || u.length > 1)
|
|
1857
1857
|
return !1;
|
|
1858
1858
|
const i = u[0].range, d = t.get(W).getContainerTableWithRange(r, a, i);
|
|
1859
1859
|
if (!d) return !1;
|
|
1860
|
-
const c = i.endColumn - i.startColumn + 1, _ = s.getColumnCount() - 1,
|
|
1861
|
-
if (_ -
|
|
1860
|
+
const c = i.endColumn - i.startColumn + 1, _ = s.getColumnCount() - 1, f = s.getCellMatrix().getDataRange().endColumn, p = [], w = [];
|
|
1861
|
+
if (_ - f < c)
|
|
1862
1862
|
p.push({
|
|
1863
1863
|
id: je.id,
|
|
1864
1864
|
params: {
|
|
@@ -1881,7 +1881,7 @@ const S = {
|
|
|
1881
1881
|
}
|
|
1882
1882
|
}
|
|
1883
1883
|
}
|
|
1884
|
-
}),
|
|
1884
|
+
}), w.push({
|
|
1885
1885
|
id: S.id,
|
|
1886
1886
|
params: {
|
|
1887
1887
|
unitId: r,
|
|
@@ -1896,7 +1896,7 @@ const S = {
|
|
|
1896
1896
|
}
|
|
1897
1897
|
}
|
|
1898
1898
|
}
|
|
1899
|
-
}),
|
|
1899
|
+
}), w.push({
|
|
1900
1900
|
id: ze.id,
|
|
1901
1901
|
params: {
|
|
1902
1902
|
unitId: r,
|
|
@@ -1921,7 +1921,7 @@ const S = {
|
|
|
1921
1921
|
}
|
|
1922
1922
|
}
|
|
1923
1923
|
}
|
|
1924
|
-
}),
|
|
1924
|
+
}), w.push({
|
|
1925
1925
|
id: S.id,
|
|
1926
1926
|
params: {
|
|
1927
1927
|
unitId: r,
|
|
@@ -1937,7 +1937,7 @@ const S = {
|
|
|
1937
1937
|
}
|
|
1938
1938
|
}
|
|
1939
1939
|
});
|
|
1940
|
-
const v =
|
|
1940
|
+
const v = fe(
|
|
1941
1941
|
t,
|
|
1942
1942
|
{
|
|
1943
1943
|
unitId: r,
|
|
@@ -1946,7 +1946,7 @@ const S = {
|
|
|
1946
1946
|
startRow: I.startRow,
|
|
1947
1947
|
endRow: I.endRow,
|
|
1948
1948
|
startColumn: i.startColumn,
|
|
1949
|
-
endColumn:
|
|
1949
|
+
endColumn: f
|
|
1950
1950
|
}
|
|
1951
1951
|
},
|
|
1952
1952
|
{
|
|
@@ -1956,16 +1956,16 @@ const S = {
|
|
|
1956
1956
|
startRow: I.startRow,
|
|
1957
1957
|
endRow: I.endRow,
|
|
1958
1958
|
startColumn: i.startColumn + c,
|
|
1959
|
-
endColumn:
|
|
1959
|
+
endColumn: f + c
|
|
1960
1960
|
}
|
|
1961
1961
|
}
|
|
1962
1962
|
);
|
|
1963
|
-
v && (p.push(...v.redos),
|
|
1963
|
+
v && (p.push(...v.redos), w.push(...v.undos));
|
|
1964
1964
|
}
|
|
1965
|
-
const
|
|
1966
|
-
return
|
|
1965
|
+
const R = t.get(D);
|
|
1966
|
+
return E(p, R) && t.get(L).pushUndoRedo({
|
|
1967
1967
|
unitID: r,
|
|
1968
|
-
undoMutations:
|
|
1968
|
+
undoMutations: w,
|
|
1969
1969
|
redoMutations: p
|
|
1970
1970
|
}), !0;
|
|
1971
1971
|
}
|
|
@@ -1978,12 +1978,12 @@ const S = {
|
|
|
1978
1978
|
const n = t.get(A), s = $(n);
|
|
1979
1979
|
if (!s)
|
|
1980
1980
|
return !1;
|
|
1981
|
-
const { unitId: r, subUnitId: a } = s, u = t.get(
|
|
1981
|
+
const { unitId: r, subUnitId: a } = s, u = t.get(we).getCurrentSelections();
|
|
1982
1982
|
if (!u.length || u.length > 1)
|
|
1983
1983
|
return !1;
|
|
1984
1984
|
const i = u[0].range, d = t.get(W).getContainerTableWithRange(r, a, i);
|
|
1985
1985
|
if (!d) return !1;
|
|
1986
|
-
const c = i.endRow - i.startRow + 1, g = [], _ = [],
|
|
1986
|
+
const c = i.endRow - i.startRow + 1, g = [], _ = [], f = d.getRange();
|
|
1987
1987
|
g.push({
|
|
1988
1988
|
id: S.id,
|
|
1989
1989
|
params: {
|
|
@@ -1993,8 +1993,8 @@ const S = {
|
|
|
1993
1993
|
config: {
|
|
1994
1994
|
updateRange: {
|
|
1995
1995
|
newRange: {
|
|
1996
|
-
...
|
|
1997
|
-
endRow:
|
|
1996
|
+
...f,
|
|
1997
|
+
endRow: f.endRow - c
|
|
1998
1998
|
}
|
|
1999
1999
|
}
|
|
2000
2000
|
}
|
|
@@ -2007,21 +2007,21 @@ const S = {
|
|
|
2007
2007
|
tableId: d.getId(),
|
|
2008
2008
|
config: {
|
|
2009
2009
|
updateRange: {
|
|
2010
|
-
newRange: { ...
|
|
2010
|
+
newRange: { ...f }
|
|
2011
2011
|
}
|
|
2012
2012
|
}
|
|
2013
2013
|
}
|
|
2014
2014
|
});
|
|
2015
|
-
const
|
|
2015
|
+
const w = s.worksheet.getCellMatrix().getDataRange().endRow, R = fe(
|
|
2016
2016
|
t,
|
|
2017
2017
|
{
|
|
2018
2018
|
unitId: r,
|
|
2019
2019
|
subUnitId: a,
|
|
2020
2020
|
range: {
|
|
2021
2021
|
startRow: i.endRow + 1,
|
|
2022
|
-
endRow:
|
|
2023
|
-
startColumn:
|
|
2024
|
-
endColumn:
|
|
2022
|
+
endRow: w,
|
|
2023
|
+
startColumn: f.startColumn,
|
|
2024
|
+
endColumn: f.endColumn
|
|
2025
2025
|
}
|
|
2026
2026
|
},
|
|
2027
2027
|
{
|
|
@@ -2029,15 +2029,15 @@ const S = {
|
|
|
2029
2029
|
subUnitId: a,
|
|
2030
2030
|
range: {
|
|
2031
2031
|
startRow: i.startRow,
|
|
2032
|
-
endRow:
|
|
2033
|
-
startColumn:
|
|
2034
|
-
endColumn:
|
|
2032
|
+
endRow: w - c,
|
|
2033
|
+
startColumn: f.startColumn,
|
|
2034
|
+
endColumn: f.endColumn
|
|
2035
2035
|
}
|
|
2036
2036
|
}
|
|
2037
2037
|
);
|
|
2038
|
-
|
|
2038
|
+
R && (g.push(...R.redos), _.push(...R.undos));
|
|
2039
2039
|
const O = t.get(D);
|
|
2040
|
-
return
|
|
2040
|
+
return E(g, O) && t.get(L).pushUndoRedo({
|
|
2041
2041
|
unitID: r,
|
|
2042
2042
|
undoMutations: _,
|
|
2043
2043
|
redoMutations: g
|
|
@@ -2054,12 +2054,12 @@ const S = {
|
|
|
2054
2054
|
return !1;
|
|
2055
2055
|
const { workbook: r, unitId: a, subUnitId: o } = s;
|
|
2056
2056
|
t.get(T);
|
|
2057
|
-
const l = t.get(
|
|
2057
|
+
const l = t.get(we).getCurrentSelections();
|
|
2058
2058
|
if (!l.length || l.length > 1)
|
|
2059
2059
|
return !1;
|
|
2060
2060
|
const h = l[0].range, c = t.get(W).getContainerTableWithRange(a, o, h);
|
|
2061
2061
|
if (!c) return !1;
|
|
2062
|
-
const g = h.endColumn - h.startColumn + 1, _ = [],
|
|
2062
|
+
const g = h.endColumn - h.startColumn + 1, _ = [], f = [], p = c.getRange();
|
|
2063
2063
|
_.push({
|
|
2064
2064
|
id: S.id,
|
|
2065
2065
|
params: {
|
|
@@ -2076,12 +2076,12 @@ const S = {
|
|
|
2076
2076
|
}
|
|
2077
2077
|
}
|
|
2078
2078
|
});
|
|
2079
|
-
const
|
|
2079
|
+
const w = [], R = h.startColumn - p.startColumn;
|
|
2080
2080
|
for (let se = 0; se < g; se++) {
|
|
2081
|
-
const Ie = c.getTableInfo().columns[
|
|
2082
|
-
Ie &&
|
|
2081
|
+
const Ie = c.getTableInfo().columns[R + se];
|
|
2082
|
+
Ie && w.push(Ie);
|
|
2083
2083
|
}
|
|
2084
|
-
|
|
2084
|
+
f.push({
|
|
2085
2085
|
id: S.id,
|
|
2086
2086
|
params: {
|
|
2087
2087
|
unitId: a,
|
|
@@ -2093,12 +2093,12 @@ const S = {
|
|
|
2093
2093
|
rowColType: N.Col,
|
|
2094
2094
|
index: h.startColumn,
|
|
2095
2095
|
count: g,
|
|
2096
|
-
columnsJson:
|
|
2096
|
+
columnsJson: w
|
|
2097
2097
|
}
|
|
2098
2098
|
}
|
|
2099
2099
|
}
|
|
2100
2100
|
});
|
|
2101
|
-
const I = s.worksheet.getCellMatrix().getDataRange().endColumn, v =
|
|
2101
|
+
const I = s.worksheet.getCellMatrix().getDataRange().endColumn, v = fe(
|
|
2102
2102
|
t,
|
|
2103
2103
|
{
|
|
2104
2104
|
unitId: a,
|
|
@@ -2121,11 +2121,11 @@ const S = {
|
|
|
2121
2121
|
}
|
|
2122
2122
|
}
|
|
2123
2123
|
);
|
|
2124
|
-
v && (_.push(...v.redos),
|
|
2124
|
+
v && (_.push(...v.redos), f.push(...v.undos));
|
|
2125
2125
|
const ee = t.get(D);
|
|
2126
|
-
return
|
|
2126
|
+
return E(_, ee) && t.get(L).pushUndoRedo({
|
|
2127
2127
|
unitID: a,
|
|
2128
|
-
undoMutations:
|
|
2128
|
+
undoMutations: f,
|
|
2129
2129
|
redoMutations: _
|
|
2130
2130
|
}), !0;
|
|
2131
2131
|
}
|
|
@@ -2186,14 +2186,14 @@ let ce = class extends H {
|
|
|
2186
2186
|
}
|
|
2187
2187
|
};
|
|
2188
2188
|
ce = zn([
|
|
2189
|
-
Ae(0,
|
|
2189
|
+
Ae(0, C(T)),
|
|
2190
2190
|
Ae(1, D)
|
|
2191
2191
|
], ce);
|
|
2192
2192
|
var Kn = Object.getOwnPropertyDescriptor, Xn = (t, e, n, s) => {
|
|
2193
2193
|
for (var r = s > 1 ? void 0 : s ? Kn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
2194
2194
|
(o = t[a]) && (r = o(r) || r);
|
|
2195
2195
|
return r;
|
|
2196
|
-
},
|
|
2196
|
+
}, Le = (t, e) => (n, s) => e(n, s, t);
|
|
2197
2197
|
let de = class extends H {
|
|
2198
2198
|
constructor(t, e) {
|
|
2199
2199
|
super(), this._tableManager = t, this._exclusiveRangeService = e, this._initRangeListener();
|
|
@@ -2224,8 +2224,8 @@ let de = class extends H {
|
|
|
2224
2224
|
}
|
|
2225
2225
|
};
|
|
2226
2226
|
de = Xn([
|
|
2227
|
-
|
|
2228
|
-
|
|
2227
|
+
Le(0, C(T)),
|
|
2228
|
+
Le(1, C(pt))
|
|
2229
2229
|
], de);
|
|
2230
2230
|
var Zn = Object.getOwnPropertyDescriptor, es = (t, e, n, s) => {
|
|
2231
2231
|
for (var r = s > 1 ? void 0 : s ? Zn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
@@ -2244,9 +2244,9 @@ let he = class extends H {
|
|
|
2244
2244
|
switch (s) {
|
|
2245
2245
|
case Tt.id:
|
|
2246
2246
|
return t._generateTableMutationWithInsertRow(r);
|
|
2247
|
-
case Ct.id:
|
|
2248
|
-
return t._generateTableMutationWithInsertCol(r);
|
|
2249
2247
|
case Rt.id:
|
|
2248
|
+
return t._generateTableMutationWithInsertCol(r);
|
|
2249
|
+
case Ct.id:
|
|
2250
2250
|
return t._generateTableMutationWithRemoveRow(r);
|
|
2251
2251
|
case _t.id:
|
|
2252
2252
|
return t._generateTableMutationWithRemoveCol(r);
|
|
@@ -2459,12 +2459,12 @@ let he = class extends H {
|
|
|
2459
2459
|
tableId: d.getId()
|
|
2460
2460
|
}
|
|
2461
2461
|
});
|
|
2462
|
-
const g = d.toJSON(), { startRow: _, startColumn:
|
|
2463
|
-
if (!
|
|
2462
|
+
const g = d.toJSON(), { startRow: _, startColumn: f, endColumn: p } = g.range, w = this._univerInstanceService.getUnit(o), R = w == null ? void 0 : w.getSheetBySheetId(u);
|
|
2463
|
+
if (!R)
|
|
2464
2464
|
return { undos: e, redos: n, preRedos: s, preUndos: r };
|
|
2465
2465
|
const O = [];
|
|
2466
|
-
for (let I =
|
|
2467
|
-
O.push(Ze(
|
|
2466
|
+
for (let I = f; I <= p; I++)
|
|
2467
|
+
O.push(Ze(R == null ? void 0 : R.getCell(_, I)) || te(I - f + 1, this._localeService.t("sheets-table.columnPrefix")));
|
|
2468
2468
|
e.push({
|
|
2469
2469
|
id: k.id,
|
|
2470
2470
|
params: {
|
|
@@ -2496,8 +2496,8 @@ let he = class extends H {
|
|
|
2496
2496
|
}
|
|
2497
2497
|
});
|
|
2498
2498
|
const _ = [];
|
|
2499
|
-
for (let
|
|
2500
|
-
const p = d.getTableColumnByIndex(
|
|
2499
|
+
for (let f = 0; f < g; f++) {
|
|
2500
|
+
const p = d.getTableColumnByIndex(f);
|
|
2501
2501
|
p && _.push(p.toJSON());
|
|
2502
2502
|
}
|
|
2503
2503
|
e.push({
|
|
@@ -2535,10 +2535,10 @@ let he = class extends H {
|
|
|
2535
2535
|
}
|
|
2536
2536
|
}
|
|
2537
2537
|
});
|
|
2538
|
-
const _ = [],
|
|
2538
|
+
const _ = [], f = i.startColumn - c.startColumn;
|
|
2539
2539
|
for (let p = 0; p < g; p++) {
|
|
2540
|
-
const
|
|
2541
|
-
|
|
2540
|
+
const w = d.getTableColumnByIndex(p + f);
|
|
2541
|
+
w && _.push(w.toJSON());
|
|
2542
2542
|
}
|
|
2543
2543
|
e.push({
|
|
2544
2544
|
id: S.id,
|
|
@@ -2575,8 +2575,8 @@ let he = class extends H {
|
|
|
2575
2575
|
}
|
|
2576
2576
|
});
|
|
2577
2577
|
const g = [], _ = i.startColumn - c.startColumn;
|
|
2578
|
-
for (let
|
|
2579
|
-
const p = d.getTableColumnByIndex(
|
|
2578
|
+
for (let f = 0; f < h; f++) {
|
|
2579
|
+
const p = d.getTableColumnByIndex(f + _);
|
|
2580
2580
|
p && g.push(p.toJSON());
|
|
2581
2581
|
}
|
|
2582
2582
|
e.push({
|
|
@@ -2655,13 +2655,13 @@ let he = class extends H {
|
|
|
2655
2655
|
}
|
|
2656
2656
|
};
|
|
2657
2657
|
he = es([
|
|
2658
|
-
V(0,
|
|
2659
|
-
V(1,
|
|
2660
|
-
V(2,
|
|
2661
|
-
V(3,
|
|
2662
|
-
V(4,
|
|
2663
|
-
V(5,
|
|
2664
|
-
V(6,
|
|
2658
|
+
V(0, C(D)),
|
|
2659
|
+
V(1, C(St)),
|
|
2660
|
+
V(2, C(A)),
|
|
2661
|
+
V(3, C(He)),
|
|
2662
|
+
V(4, C(Re)),
|
|
2663
|
+
V(5, C(T)),
|
|
2664
|
+
V(6, C(be))
|
|
2665
2665
|
], he);
|
|
2666
2666
|
var ts = Object.getOwnPropertyDescriptor, ns = (t, e, n, s) => {
|
|
2667
2667
|
for (var r = s > 1 ? void 0 : s ? ts(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
@@ -2738,9 +2738,9 @@ let ge = class extends H {
|
|
|
2738
2738
|
}
|
|
2739
2739
|
};
|
|
2740
2740
|
ge = ns([
|
|
2741
|
-
oe(0,
|
|
2742
|
-
oe(1,
|
|
2743
|
-
oe(2,
|
|
2741
|
+
oe(0, C(T)),
|
|
2742
|
+
oe(1, C(It)),
|
|
2743
|
+
oe(2, C(Qe)),
|
|
2744
2744
|
oe(3, Ve)
|
|
2745
2745
|
], ge);
|
|
2746
2746
|
var ss = Object.getOwnPropertyDescriptor, rs = (t, e, n, s) => {
|
|
@@ -2815,17 +2815,17 @@ let me = class extends H {
|
|
|
2815
2815
|
}
|
|
2816
2816
|
};
|
|
2817
2817
|
me = rs([
|
|
2818
|
-
ie(0,
|
|
2819
|
-
ie(1,
|
|
2820
|
-
ie(2,
|
|
2821
|
-
ie(3,
|
|
2818
|
+
ie(0, C(T)),
|
|
2819
|
+
ie(1, C(Re)),
|
|
2820
|
+
ie(2, C(A)),
|
|
2821
|
+
ie(3, C(vt))
|
|
2822
2822
|
], me);
|
|
2823
2823
|
var as = Object.getOwnPropertyDescriptor, os = (t, e, n, s) => {
|
|
2824
2824
|
for (var r = s > 1 ? void 0 : s ? as(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
2825
2825
|
(o = t[a]) && (r = o(r) || r);
|
|
2826
2826
|
return r;
|
|
2827
2827
|
}, Se = (t, e) => (n, s) => e(n, s, t), le;
|
|
2828
|
-
let
|
|
2828
|
+
let Ee = (le = class extends ht {
|
|
2829
2829
|
constructor(t = De, e, n, s) {
|
|
2830
2830
|
super(), this._config = t, this._injector = e, this._configService = n, this._commandService = s;
|
|
2831
2831
|
const { ...r } = gt(
|
|
@@ -2862,12 +2862,12 @@ let Be = (le = class extends ht {
|
|
|
2862
2862
|
}
|
|
2863
2863
|
_initRegisterCommand() {
|
|
2864
2864
|
[
|
|
2865
|
-
|
|
2865
|
+
Ln,
|
|
2866
2866
|
k,
|
|
2867
|
-
|
|
2867
|
+
En,
|
|
2868
2868
|
Q,
|
|
2869
|
-
|
|
2870
|
-
|
|
2869
|
+
Ce,
|
|
2870
|
+
Bn,
|
|
2871
2871
|
Jn,
|
|
2872
2872
|
S,
|
|
2873
2873
|
Pn,
|
|
@@ -2879,22 +2879,22 @@ let Be = (le = class extends ht {
|
|
|
2879
2879
|
].forEach((t) => this._commandService.registerCommand(t));
|
|
2880
2880
|
}
|
|
2881
2881
|
}, b(le, "pluginName", at), b(le, "type", j.UNIVER_SHEET), le);
|
|
2882
|
-
|
|
2883
|
-
Se(1,
|
|
2882
|
+
Ee = os([
|
|
2883
|
+
Se(1, C(He)),
|
|
2884
2884
|
Se(2, Ve),
|
|
2885
|
-
Se(3,
|
|
2886
|
-
],
|
|
2885
|
+
Se(3, C(D))
|
|
2886
|
+
], Ee);
|
|
2887
2887
|
export {
|
|
2888
|
-
|
|
2888
|
+
Ln as AddSheetTableCommand,
|
|
2889
2889
|
k as AddSheetTableMutation,
|
|
2890
2890
|
Pn as AddTableThemeCommand,
|
|
2891
|
-
|
|
2891
|
+
En as DeleteSheetTableCommand,
|
|
2892
2892
|
Q as DeleteSheetTableMutation,
|
|
2893
2893
|
qn as RemoveTableThemeCommand,
|
|
2894
2894
|
Wn as SHEET_TABLE_CUSTOM_THEME_PREFIX,
|
|
2895
2895
|
Jn as SetSheetTableCommand,
|
|
2896
|
-
|
|
2897
|
-
|
|
2896
|
+
Bn as SetSheetTableFilterCommand,
|
|
2897
|
+
Ce as SetSheetTableFilterMutation,
|
|
2898
2898
|
S as SetSheetTableMutation,
|
|
2899
2899
|
Qn as SheetTableInsertColCommand,
|
|
2900
2900
|
kn as SheetTableInsertRowCommand,
|
|
@@ -2911,7 +2911,7 @@ export {
|
|
|
2911
2911
|
T as TableManager,
|
|
2912
2912
|
F as TableNumberCompareTypeEnum,
|
|
2913
2913
|
P as TableStringCompareTypeEnum,
|
|
2914
|
-
|
|
2914
|
+
Ee as UniverSheetsTablePlugin,
|
|
2915
2915
|
ms as customEmptyThemeWithBorderStyle,
|
|
2916
2916
|
yt as isConditionFilter,
|
|
2917
2917
|
gs as isManualFilter,
|