@univerjs/sheets-table 0.8.2 → 0.8.3-nightly.202506271607
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 +145 -145
- package/lib/index.js +145 -145
- package/lib/types/index.d.ts +19 -18
- package/lib/types/plugin.d.ts +2 -1
- package/lib/umd/index.js +1 -1
- package/package.json +5 -5
- package/LICENSE +0 -176
package/lib/es/index.js
CHANGED
|
@@ -2,9 +2,9 @@ var Ke = Object.defineProperty;
|
|
|
2
2
|
var Xe = (t, e, n) => e in t ? Ke(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var b = (t, e, n) => Xe(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
4
|
import { CellValueType as V, BorderStyleTypes as Ze, generateRandomId as L, IUniverInstanceService as J, Inject as S, LocaleService as Ce, Disposable as k, CommandType as N, IUndoRedoService as $, ICommandService as x, sequenceExecute as A, IResourceManagerService as et, Rectangle as pe, RTree as tt, InterceptorEffectEnum as nt, UniverInstanceType as Se, Injector as Be, Plugin as rt, merge as st, registerDependencies as at, touchDependencies as Me, IConfigService as ot } from "@univerjs/core";
|
|
5
|
-
import { getSheetCommandTarget as U,
|
|
5
|
+
import { getSheetCommandTarget as U, SheetInterceptorService as _e, INTERCEPTOR_POINT as Le, AddRangeThemeMutation as We, RemoveRangeThemeMutation as Ee, SheetRangeThemeModel as He, SheetsSelectionsService as de, InsertRowMutation as Pe, RemoveRowMutation as Ve, getMoveRangeUndoRedoMutations as he, InsertColMutation as qe, RemoveColMutation as Je, IExclusiveRangeService as it, RefRangeService as lt, RemoveColCommand as ut, RemoveRowCommand as ct, InsertColCommand as dt, InsertRowCommand as ht, SheetRangeThemeService as gt, RangeThemeStyle as mt } from "@univerjs/sheets";
|
|
6
6
|
import { Subject as Q, BehaviorSubject as ke, filter as ge, switchMap as ve } from "rxjs";
|
|
7
|
-
var Qe = /* @__PURE__ */ ((t) => (t.None = "none", t.String = "string", t.Number = "number", t.Date = "date", t.Bool = "bool", t.Checkbox = "checkbox", t.List = "list", t))(Qe || {}), ee = /* @__PURE__ */ ((t) => (t.manual = "manual", t.condition = "condition", t))(ee || {}), O = /* @__PURE__ */ ((t) => (t.Date = "date", t.Number = "number", t.String = "string", t.Logic = "logic", t))(O || {}), 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 || {}), H = /* @__PURE__ */ ((t) => (t.Equal = "equal", t.NotEqual = "notEqual", t.Contains = "contains", t.NotContains = "notContains", t.StartsWith = "startsWith", t.EndsWith = "endsWith", t))(H || {}), g = /* @__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))(g || {}), P = /* @__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))(P || {}), G = /* @__PURE__ */ ((t) => (t.Asc = "asc", t.Desc = "desc", t.None = "none", t))(G || {})
|
|
7
|
+
var T = /* @__PURE__ */ ((t) => (t.Insert = "insert", t.Delete = "delete", t))(T || {}), D = /* @__PURE__ */ ((t) => (t.Row = "row", t.Col = "column", t))(D || {}), Qe = /* @__PURE__ */ ((t) => (t.None = "none", t.String = "string", t.Number = "number", t.Date = "date", t.Bool = "bool", t.Checkbox = "checkbox", t.List = "list", t))(Qe || {}), ee = /* @__PURE__ */ ((t) => (t.manual = "manual", t.condition = "condition", t))(ee || {}), O = /* @__PURE__ */ ((t) => (t.Date = "date", t.Number = "number", t.String = "string", t.Logic = "logic", t))(O || {}), 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 || {}), H = /* @__PURE__ */ ((t) => (t.Equal = "equal", t.NotEqual = "notEqual", t.Contains = "contains", t.NotContains = "notContains", t.StartsWith = "startsWith", t.EndsWith = "endsWith", t))(H || {}), g = /* @__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))(g || {}), P = /* @__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))(P || {}), G = /* @__PURE__ */ ((t) => (t.Asc = "asc", t.Desc = "desc", t.None = "none", t))(G || {});
|
|
8
8
|
function Z(t, e) {
|
|
9
9
|
return `${e} ${t}`;
|
|
10
10
|
}
|
|
@@ -1287,67 +1287,7 @@ const te = {
|
|
|
1287
1287
|
redoMutations: l
|
|
1288
1288
|
}), !0;
|
|
1289
1289
|
}
|
|
1290
|
-
}, p = {
|
|
1291
|
-
id: "sheet.mutation.set-sheet-table",
|
|
1292
|
-
type: N.MUTATION,
|
|
1293
|
-
handler: (t, e) => {
|
|
1294
|
-
if (!e)
|
|
1295
|
-
return !1;
|
|
1296
|
-
const { unitId: n, tableId: r, config: s } = e;
|
|
1297
|
-
return t.get(_).setTableByConfig(n, r, s), !0;
|
|
1298
|
-
}
|
|
1299
1290
|
}, Mn = {
|
|
1300
|
-
id: "sheet.command.add-table-theme",
|
|
1301
|
-
type: N.COMMAND,
|
|
1302
|
-
handler: (t, e) => {
|
|
1303
|
-
if (!e)
|
|
1304
|
-
return !1;
|
|
1305
|
-
const n = t.get(_), { unitId: r, tableId: s, themeStyle: a } = e, o = [], l = [], u = n.getTableById(r, s);
|
|
1306
|
-
if (!u) return !1;
|
|
1307
|
-
const i = u.getSubunitId();
|
|
1308
|
-
o.push({
|
|
1309
|
-
id: Le.id,
|
|
1310
|
-
params: {
|
|
1311
|
-
unitId: r,
|
|
1312
|
-
subUnitId: i,
|
|
1313
|
-
styleJSON: a.toJson()
|
|
1314
|
-
}
|
|
1315
|
-
}), o.push({
|
|
1316
|
-
id: p.id,
|
|
1317
|
-
params: {
|
|
1318
|
-
unitId: r,
|
|
1319
|
-
subUnitId: i,
|
|
1320
|
-
tableId: s,
|
|
1321
|
-
config: {
|
|
1322
|
-
theme: a.getName()
|
|
1323
|
-
}
|
|
1324
|
-
}
|
|
1325
|
-
}), l.push({
|
|
1326
|
-
id: p.id,
|
|
1327
|
-
params: {
|
|
1328
|
-
unitId: r,
|
|
1329
|
-
subUnitId: i,
|
|
1330
|
-
tableId: s,
|
|
1331
|
-
config: {
|
|
1332
|
-
themeStyle: u.getTableStyleId()
|
|
1333
|
-
}
|
|
1334
|
-
}
|
|
1335
|
-
}), l.push({
|
|
1336
|
-
id: We.id,
|
|
1337
|
-
params: {
|
|
1338
|
-
unitId: r,
|
|
1339
|
-
subUnitId: i,
|
|
1340
|
-
styleName: a.getName()
|
|
1341
|
-
}
|
|
1342
|
-
});
|
|
1343
|
-
const h = t.get(x);
|
|
1344
|
-
return A(o, h) && t.get($).pushUndoRedo({
|
|
1345
|
-
unitID: r,
|
|
1346
|
-
undoMutations: l,
|
|
1347
|
-
redoMutations: o
|
|
1348
|
-
}), !0;
|
|
1349
|
-
}
|
|
1350
|
-
}, vn = {
|
|
1351
1291
|
id: "sheet.command.delete-table",
|
|
1352
1292
|
type: N.COMMAND,
|
|
1353
1293
|
handler: (t, e) => {
|
|
@@ -1372,70 +1312,6 @@ const te = {
|
|
|
1372
1312
|
redoMutations: a
|
|
1373
1313
|
}), !0;
|
|
1374
1314
|
}
|
|
1375
|
-
}, ze = "SHEET_TABLE_PLUGIN", se = "SHEET_TABLE", Fn = "table-custom", Dn = {
|
|
1376
|
-
id: "sheet.command.remove-table-theme",
|
|
1377
|
-
type: N.COMMAND,
|
|
1378
|
-
handler: (t, e) => {
|
|
1379
|
-
if (!e)
|
|
1380
|
-
return !1;
|
|
1381
|
-
const { unitId: n, tableId: r, themeName: s } = e, a = t.get(_), o = t.get(Ee), l = a.getTableById(n, r);
|
|
1382
|
-
if (!l) return !1;
|
|
1383
|
-
const u = l.getSubunitId(), i = [], h = [], d = o.getRegisteredRangeThemes().filter((R) => R == null ? void 0 : R.startsWith("table-default"));
|
|
1384
|
-
let m = o.getRegisteredRangeThemes().filter((R) => R == null ? void 0 : R.startsWith(Fn)).find((R) => R !== s);
|
|
1385
|
-
m || (m = d[0]), i.push({ id: p.id, params: { unitId: n, subUnitId: u, tableId: r, config: { theme: m } } }), i.push({ id: We.id, params: { unitId: n, subUnitId: u, styleName: s } });
|
|
1386
|
-
const C = o.getDefaultRangeThemeStyle(s);
|
|
1387
|
-
C && (h.push({ id: Le.id, params: { unitId: n, subUnitId: u, styleJSON: C.toJson() } }), h.push({ id: p.id, params: { unitId: n, subUnitId: u, tableId: r, config: { theme: s } } }));
|
|
1388
|
-
const w = t.get(x);
|
|
1389
|
-
return A(i, w) && t.get($).pushUndoRedo({
|
|
1390
|
-
unitID: n,
|
|
1391
|
-
redoMutations: i,
|
|
1392
|
-
undoMutations: h
|
|
1393
|
-
}), !0;
|
|
1394
|
-
}
|
|
1395
|
-
}, Nn = {
|
|
1396
|
-
id: "sheet.command.set-table-config",
|
|
1397
|
-
type: N.COMMAND,
|
|
1398
|
-
handler: (t, e) => {
|
|
1399
|
-
if (!e)
|
|
1400
|
-
return !1;
|
|
1401
|
-
const { unitId: n, tableId: r, name: s, updateRange: a, rowColOperation: o, theme: l } = e, i = t.get(_).getTableById(n, r);
|
|
1402
|
-
if (!i) return !1;
|
|
1403
|
-
const h = {}, d = {};
|
|
1404
|
-
s && (h.name = i.getDisplayName(), d.name = s), o && (h.rowColOperation = {
|
|
1405
|
-
operationType: o.operationType === T.Insert ? T.Delete : T.Insert,
|
|
1406
|
-
rowColType: o.rowColType,
|
|
1407
|
-
index: o.index,
|
|
1408
|
-
count: o.count
|
|
1409
|
-
}, d.rowColOperation = o), a && (h.updateRange = {
|
|
1410
|
-
newRange: i.getRange()
|
|
1411
|
-
}, d.updateRange = a), l && (h.theme = i.getTableStyleId(), d.theme = l);
|
|
1412
|
-
const c = {
|
|
1413
|
-
unitId: n,
|
|
1414
|
-
subUnitId: i.getSubunitId(),
|
|
1415
|
-
tableId: r,
|
|
1416
|
-
config: d
|
|
1417
|
-
};
|
|
1418
|
-
return t.get(x).executeCommand(p.id, c), t.get($).pushUndoRedo({
|
|
1419
|
-
unitID: n,
|
|
1420
|
-
undoMutations: [
|
|
1421
|
-
{
|
|
1422
|
-
id: p.id,
|
|
1423
|
-
params: {
|
|
1424
|
-
unitId: n,
|
|
1425
|
-
subUnitId: i.getSubunitId(),
|
|
1426
|
-
tableId: r,
|
|
1427
|
-
config: h
|
|
1428
|
-
}
|
|
1429
|
-
}
|
|
1430
|
-
],
|
|
1431
|
-
redoMutations: [
|
|
1432
|
-
{
|
|
1433
|
-
id: p.id,
|
|
1434
|
-
params: c
|
|
1435
|
-
}
|
|
1436
|
-
]
|
|
1437
|
-
}), !0;
|
|
1438
|
-
}
|
|
1439
1315
|
}, fe = {
|
|
1440
1316
|
id: "sheet.mutation.set-table-filter",
|
|
1441
1317
|
type: N.MUTATION,
|
|
@@ -1443,7 +1319,7 @@ const te = {
|
|
|
1443
1319
|
const { tableId: n, unitId: r, column: s, tableFilter: a } = e;
|
|
1444
1320
|
return t.get(_).addFilter(r, n, s, a), !0;
|
|
1445
1321
|
}
|
|
1446
|
-
},
|
|
1322
|
+
}, vn = {
|
|
1447
1323
|
id: "sheet.command.set-table-filter",
|
|
1448
1324
|
type: N.COMMAND,
|
|
1449
1325
|
handler: (t, e) => {
|
|
@@ -1456,9 +1332,9 @@ const te = {
|
|
|
1456
1332
|
redoMutations: a
|
|
1457
1333
|
}), !0;
|
|
1458
1334
|
}
|
|
1459
|
-
};
|
|
1460
|
-
var
|
|
1461
|
-
for (var s = r > 1 ? void 0 : r ?
|
|
1335
|
+
}, ze = "SHEET_TABLE_PLUGIN", se = "SHEET_TABLE", Fn = "table-custom";
|
|
1336
|
+
var Dn = Object.getOwnPropertyDescriptor, Nn = (t, e, n, r) => {
|
|
1337
|
+
for (var s = r > 1 ? void 0 : r ? Dn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
1462
1338
|
(o = t[a]) && (s = o(s) || s);
|
|
1463
1339
|
return s;
|
|
1464
1340
|
}, me = (t, e) => (n, r) => e(n, r, t);
|
|
@@ -1519,7 +1395,7 @@ let W = class extends k {
|
|
|
1519
1395
|
}
|
|
1520
1396
|
registerTableHeaderInterceptor() {
|
|
1521
1397
|
this.disposeWithMe(
|
|
1522
|
-
this._sheetInterceptorService.intercept(
|
|
1398
|
+
this._sheetInterceptorService.intercept(Le.CELL_CONTENT, {
|
|
1523
1399
|
effect: nt.Value,
|
|
1524
1400
|
handler: (e, n, r) => {
|
|
1525
1401
|
const { row: s, col: a, unitId: o, subUnitId: l } = n, u = this._ensureTableRangeRTree(o);
|
|
@@ -1576,12 +1452,136 @@ let W = class extends k {
|
|
|
1576
1452
|
super.dispose(), this._tableRangeRTree.clear();
|
|
1577
1453
|
}
|
|
1578
1454
|
};
|
|
1579
|
-
W =
|
|
1455
|
+
W = Nn([
|
|
1580
1456
|
me(0, S(_e)),
|
|
1581
1457
|
me(1, S(_)),
|
|
1582
1458
|
me(2, S(et))
|
|
1583
1459
|
], W);
|
|
1584
|
-
const
|
|
1460
|
+
const p = {
|
|
1461
|
+
id: "sheet.mutation.set-sheet-table",
|
|
1462
|
+
type: N.MUTATION,
|
|
1463
|
+
handler: (t, e) => {
|
|
1464
|
+
if (!e)
|
|
1465
|
+
return !1;
|
|
1466
|
+
const { unitId: n, tableId: r, config: s } = e;
|
|
1467
|
+
return t.get(_).setTableByConfig(n, r, s), !0;
|
|
1468
|
+
}
|
|
1469
|
+
}, yn = {
|
|
1470
|
+
id: "sheet.command.add-table-theme",
|
|
1471
|
+
type: N.COMMAND,
|
|
1472
|
+
handler: (t, e) => {
|
|
1473
|
+
if (!e)
|
|
1474
|
+
return !1;
|
|
1475
|
+
const n = t.get(_), { unitId: r, tableId: s, themeStyle: a } = e, o = [], l = [], u = n.getTableById(r, s);
|
|
1476
|
+
if (!u) return !1;
|
|
1477
|
+
const i = u.getSubunitId();
|
|
1478
|
+
o.push({
|
|
1479
|
+
id: We.id,
|
|
1480
|
+
params: {
|
|
1481
|
+
unitId: r,
|
|
1482
|
+
subUnitId: i,
|
|
1483
|
+
styleJSON: a.toJson()
|
|
1484
|
+
}
|
|
1485
|
+
}), o.push({
|
|
1486
|
+
id: p.id,
|
|
1487
|
+
params: {
|
|
1488
|
+
unitId: r,
|
|
1489
|
+
subUnitId: i,
|
|
1490
|
+
tableId: s,
|
|
1491
|
+
config: {
|
|
1492
|
+
theme: a.getName()
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
}), l.push({
|
|
1496
|
+
id: p.id,
|
|
1497
|
+
params: {
|
|
1498
|
+
unitId: r,
|
|
1499
|
+
subUnitId: i,
|
|
1500
|
+
tableId: s,
|
|
1501
|
+
config: {
|
|
1502
|
+
themeStyle: u.getTableStyleId()
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
}), l.push({
|
|
1506
|
+
id: Ee.id,
|
|
1507
|
+
params: {
|
|
1508
|
+
unitId: r,
|
|
1509
|
+
subUnitId: i,
|
|
1510
|
+
styleName: a.getName()
|
|
1511
|
+
}
|
|
1512
|
+
});
|
|
1513
|
+
const h = t.get(x);
|
|
1514
|
+
return A(o, h) && t.get($).pushUndoRedo({
|
|
1515
|
+
unitID: r,
|
|
1516
|
+
undoMutations: l,
|
|
1517
|
+
redoMutations: o
|
|
1518
|
+
}), !0;
|
|
1519
|
+
}
|
|
1520
|
+
}, xn = {
|
|
1521
|
+
id: "sheet.command.remove-table-theme",
|
|
1522
|
+
type: N.COMMAND,
|
|
1523
|
+
handler: (t, e) => {
|
|
1524
|
+
if (!e)
|
|
1525
|
+
return !1;
|
|
1526
|
+
const { unitId: n, tableId: r, themeName: s } = e, a = t.get(_), o = t.get(He), l = a.getTableById(n, r);
|
|
1527
|
+
if (!l) return !1;
|
|
1528
|
+
const u = l.getSubunitId(), i = [], h = [], d = o.getRegisteredRangeThemes().filter((R) => R == null ? void 0 : R.startsWith("table-default"));
|
|
1529
|
+
let m = o.getRegisteredRangeThemes().filter((R) => R == null ? void 0 : R.startsWith(Fn)).find((R) => R !== s);
|
|
1530
|
+
m || (m = d[0]), i.push({ id: p.id, params: { unitId: n, subUnitId: u, tableId: r, config: { theme: m } } }), i.push({ id: Ee.id, params: { unitId: n, subUnitId: u, styleName: s } });
|
|
1531
|
+
const C = o.getDefaultRangeThemeStyle(s);
|
|
1532
|
+
C && (h.push({ id: We.id, params: { unitId: n, subUnitId: u, styleJSON: C.toJson() } }), h.push({ id: p.id, params: { unitId: n, subUnitId: u, tableId: r, config: { theme: s } } }));
|
|
1533
|
+
const w = t.get(x);
|
|
1534
|
+
return A(i, w) && t.get($).pushUndoRedo({
|
|
1535
|
+
unitID: n,
|
|
1536
|
+
redoMutations: i,
|
|
1537
|
+
undoMutations: h
|
|
1538
|
+
}), !0;
|
|
1539
|
+
}
|
|
1540
|
+
}, On = {
|
|
1541
|
+
id: "sheet.command.set-table-config",
|
|
1542
|
+
type: N.COMMAND,
|
|
1543
|
+
handler: (t, e) => {
|
|
1544
|
+
if (!e)
|
|
1545
|
+
return !1;
|
|
1546
|
+
const { unitId: n, tableId: r, name: s, updateRange: a, rowColOperation: o, theme: l } = e, i = t.get(_).getTableById(n, r);
|
|
1547
|
+
if (!i) return !1;
|
|
1548
|
+
const h = {}, d = {};
|
|
1549
|
+
s && (h.name = i.getDisplayName(), d.name = s), o && (h.rowColOperation = {
|
|
1550
|
+
operationType: o.operationType === T.Insert ? T.Delete : T.Insert,
|
|
1551
|
+
rowColType: o.rowColType,
|
|
1552
|
+
index: o.index,
|
|
1553
|
+
count: o.count
|
|
1554
|
+
}, d.rowColOperation = o), a && (h.updateRange = {
|
|
1555
|
+
newRange: i.getRange()
|
|
1556
|
+
}, d.updateRange = a), l && (h.theme = i.getTableStyleId(), d.theme = l);
|
|
1557
|
+
const c = {
|
|
1558
|
+
unitId: n,
|
|
1559
|
+
subUnitId: i.getSubunitId(),
|
|
1560
|
+
tableId: r,
|
|
1561
|
+
config: d
|
|
1562
|
+
};
|
|
1563
|
+
return t.get(x).executeCommand(p.id, c), t.get($).pushUndoRedo({
|
|
1564
|
+
unitID: n,
|
|
1565
|
+
undoMutations: [
|
|
1566
|
+
{
|
|
1567
|
+
id: p.id,
|
|
1568
|
+
params: {
|
|
1569
|
+
unitId: n,
|
|
1570
|
+
subUnitId: i.getSubunitId(),
|
|
1571
|
+
tableId: r,
|
|
1572
|
+
config: h
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
],
|
|
1576
|
+
redoMutations: [
|
|
1577
|
+
{
|
|
1578
|
+
id: p.id,
|
|
1579
|
+
params: c
|
|
1580
|
+
}
|
|
1581
|
+
]
|
|
1582
|
+
}), !0;
|
|
1583
|
+
}
|
|
1584
|
+
}, Un = {
|
|
1585
1585
|
id: "sheet.command.table-insert-row",
|
|
1586
1586
|
type: N.COMMAND,
|
|
1587
1587
|
handler: (t) => {
|
|
@@ -2528,7 +2528,7 @@ let ue = class extends k {
|
|
|
2528
2528
|
ue = qn([
|
|
2529
2529
|
be(0, S(_)),
|
|
2530
2530
|
be(1, S(gt)),
|
|
2531
|
-
be(2, S(
|
|
2531
|
+
be(2, S(He))
|
|
2532
2532
|
], ue);
|
|
2533
2533
|
var Jn = Object.getOwnPropertyDescriptor, kn = (t, e, n, r) => {
|
|
2534
2534
|
for (var s = r > 1 ? void 0 : r ? Jn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
|
|
@@ -2550,7 +2550,7 @@ let ce = class extends k {
|
|
|
2550
2550
|
this._tableFilteredOutRows$.next(e);
|
|
2551
2551
|
}
|
|
2552
2552
|
initTableHiddenRowIntercept() {
|
|
2553
|
-
this.disposeWithMe(this._sheetInterceptorService.intercept(
|
|
2553
|
+
this.disposeWithMe(this._sheetInterceptorService.intercept(Le.ROW_FILTERED, {
|
|
2554
2554
|
// 这里需要保证优先级高于sheet的筛选,因为筛选没有next,低于筛选的不会触发interceptor
|
|
2555
2555
|
priority: 100,
|
|
2556
2556
|
handler: (e, n, r) => {
|
|
@@ -2648,14 +2648,14 @@ let Ae = (ae = class extends rt {
|
|
|
2648
2648
|
[
|
|
2649
2649
|
In,
|
|
2650
2650
|
te,
|
|
2651
|
-
|
|
2651
|
+
Mn,
|
|
2652
2652
|
ne,
|
|
2653
2653
|
fe,
|
|
2654
|
-
|
|
2655
|
-
|
|
2654
|
+
vn,
|
|
2655
|
+
On,
|
|
2656
2656
|
p,
|
|
2657
|
-
|
|
2658
|
-
|
|
2657
|
+
yn,
|
|
2658
|
+
xn,
|
|
2659
2659
|
Un,
|
|
2660
2660
|
$n,
|
|
2661
2661
|
An,
|
|
@@ -2671,13 +2671,13 @@ Ae = Yn([
|
|
|
2671
2671
|
export {
|
|
2672
2672
|
In as AddSheetTableCommand,
|
|
2673
2673
|
te as AddSheetTableMutation,
|
|
2674
|
-
|
|
2675
|
-
|
|
2674
|
+
yn as AddTableThemeCommand,
|
|
2675
|
+
Mn as DeleteSheetTableCommand,
|
|
2676
2676
|
ne as DeleteSheetTableMutation,
|
|
2677
|
-
|
|
2677
|
+
xn as RemoveTableThemeCommand,
|
|
2678
2678
|
Fn as SHEET_TABLE_CUSTOM_THEME_PREFIX,
|
|
2679
|
-
|
|
2680
|
-
|
|
2679
|
+
On as SetSheetTableCommand,
|
|
2680
|
+
vn as SetSheetTableFilterCommand,
|
|
2681
2681
|
fe as SetSheetTableFilterMutation,
|
|
2682
2682
|
p as SetSheetTableMutation,
|
|
2683
2683
|
$n as SheetTableInsertColCommand,
|