@univerjs/sheets-table 1.0.0-alpha.7 → 1.0.0-beta.0
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 +39 -52
- package/lib/es/index.js +41 -54
- package/lib/index.js +41 -54
- package/lib/types/controllers/table-theme.factory.d.ts +4 -4
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -307,7 +307,7 @@ const tableThemeConfig = tableDefaultThemeStyleArr.map((item, index) => {
|
|
|
307
307
|
});
|
|
308
308
|
|
|
309
309
|
//#endregion
|
|
310
|
-
//#region \0@oxc-project+runtime@0.
|
|
310
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/typeof.js
|
|
311
311
|
function _typeof(o) {
|
|
312
312
|
"@babel/helpers - typeof";
|
|
313
313
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -318,7 +318,7 @@ function _typeof(o) {
|
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
//#endregion
|
|
321
|
-
//#region \0@oxc-project+runtime@0.
|
|
321
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/toPrimitive.js
|
|
322
322
|
function toPrimitive(t, r) {
|
|
323
323
|
if ("object" != _typeof(t) || !t) return t;
|
|
324
324
|
var e = t[Symbol.toPrimitive];
|
|
@@ -331,14 +331,14 @@ function toPrimitive(t, r) {
|
|
|
331
331
|
}
|
|
332
332
|
|
|
333
333
|
//#endregion
|
|
334
|
-
//#region \0@oxc-project+runtime@0.
|
|
334
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/toPropertyKey.js
|
|
335
335
|
function toPropertyKey(t) {
|
|
336
336
|
var i = toPrimitive(t, "string");
|
|
337
337
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
338
338
|
}
|
|
339
339
|
|
|
340
340
|
//#endregion
|
|
341
|
-
//#region \0@oxc-project+runtime@0.
|
|
341
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/defineProperty.js
|
|
342
342
|
function _defineProperty(e, r, t) {
|
|
343
343
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
344
344
|
value: t,
|
|
@@ -1293,8 +1293,7 @@ var TableFilters = class {
|
|
|
1293
1293
|
return getTableFilterState(this._tableColumnFilterList[columnIndex], sortState);
|
|
1294
1294
|
}
|
|
1295
1295
|
getSortState() {
|
|
1296
|
-
|
|
1297
|
-
return (_this$_tableSortInfo2 = this._tableSortInfo) !== null && _this$_tableSortInfo2 !== void 0 ? _this$_tableSortInfo2 : {};
|
|
1296
|
+
return this._tableSortInfo ?? {};
|
|
1298
1297
|
}
|
|
1299
1298
|
getFilterStates(range) {
|
|
1300
1299
|
const states = [];
|
|
@@ -1364,8 +1363,7 @@ var TableFilters = class {
|
|
|
1364
1363
|
};
|
|
1365
1364
|
}
|
|
1366
1365
|
fromJSON(json) {
|
|
1367
|
-
|
|
1368
|
-
this._tableColumnFilterList = (_json$tableColumnFilt = json.tableColumnFilterList) !== null && _json$tableColumnFilt !== void 0 ? _json$tableColumnFilt : [];
|
|
1366
|
+
this._tableColumnFilterList = json.tableColumnFilterList ?? [];
|
|
1369
1367
|
if (json.tableSortInfo) this._tableSortInfo = json.tableSortInfo;
|
|
1370
1368
|
}
|
|
1371
1369
|
dispose() {
|
|
@@ -1395,9 +1393,8 @@ var Table = class {
|
|
|
1395
1393
|
this._init(header, options);
|
|
1396
1394
|
}
|
|
1397
1395
|
_init(header, options) {
|
|
1398
|
-
var _options$showHeader;
|
|
1399
1396
|
this._tableStyleId = options === null || options === void 0 ? void 0 : options.tableStyleId;
|
|
1400
|
-
this._showHeader = (
|
|
1397
|
+
this._showHeader = (options === null || options === void 0 ? void 0 : options.showHeader) ?? true;
|
|
1401
1398
|
this._showFooter = false;
|
|
1402
1399
|
const range = this.getRange();
|
|
1403
1400
|
const startColumn = range.startColumn;
|
|
@@ -1509,22 +1506,19 @@ var Table = class {
|
|
|
1509
1506
|
this._subUnitId = subUnitId;
|
|
1510
1507
|
}
|
|
1511
1508
|
getTableStyleId() {
|
|
1512
|
-
|
|
1513
|
-
return (_this$_tableStyleId = this._tableStyleId) !== null && _this$_tableStyleId !== void 0 ? _this$_tableStyleId : tableThemeConfig[0].name;
|
|
1509
|
+
return this._tableStyleId ?? tableThemeConfig[0].name;
|
|
1514
1510
|
}
|
|
1515
1511
|
setTableStyleId(tableStyleId) {
|
|
1516
1512
|
this._tableStyleId = tableStyleId;
|
|
1517
1513
|
}
|
|
1518
1514
|
isShowHeader() {
|
|
1519
|
-
|
|
1520
|
-
return (_this$_showHeader = this._showHeader) !== null && _this$_showHeader !== void 0 ? _this$_showHeader : true;
|
|
1515
|
+
return this._showHeader ?? true;
|
|
1521
1516
|
}
|
|
1522
1517
|
setShowHeader(showHeader) {
|
|
1523
1518
|
this._showHeader = showHeader;
|
|
1524
1519
|
}
|
|
1525
1520
|
isShowFooter() {
|
|
1526
|
-
|
|
1527
|
-
return (_this$_showFooter = this._showFooter) !== null && _this$_showFooter !== void 0 ? _this$_showFooter : false;
|
|
1521
|
+
return this._showFooter ?? false;
|
|
1528
1522
|
}
|
|
1529
1523
|
getTableInfo() {
|
|
1530
1524
|
return {
|
|
@@ -1571,14 +1565,13 @@ var Table = class {
|
|
|
1571
1565
|
};
|
|
1572
1566
|
}
|
|
1573
1567
|
fromJSON(json) {
|
|
1574
|
-
var _json$options$showHea, _json$options$showFoo;
|
|
1575
1568
|
this._id = json.id;
|
|
1576
1569
|
this._name = json.name;
|
|
1577
1570
|
this._range = json.range;
|
|
1578
1571
|
this.tableMeta = json.meta;
|
|
1579
1572
|
this._tableStyleId = json.options.tableStyleId || "";
|
|
1580
|
-
this._showHeader =
|
|
1581
|
-
this._showFooter =
|
|
1573
|
+
this._showHeader = json.options.showHeader ?? true;
|
|
1574
|
+
this._showFooter = json.options.showFooter ?? true;
|
|
1582
1575
|
json.columns.forEach((column) => {
|
|
1583
1576
|
const tableColumn = new TableColumn(column.id, column.displayName);
|
|
1584
1577
|
tableColumn.fromJSON(column);
|
|
@@ -1601,7 +1594,7 @@ var Table = class {
|
|
|
1601
1594
|
};
|
|
1602
1595
|
|
|
1603
1596
|
//#endregion
|
|
1604
|
-
//#region \0@oxc-project+runtime@0.
|
|
1597
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/decorateParam.js
|
|
1605
1598
|
function __decorateParam(paramIndex, decorator) {
|
|
1606
1599
|
return function(target, key) {
|
|
1607
1600
|
decorator(target, key, paramIndex);
|
|
@@ -1609,7 +1602,7 @@ function __decorateParam(paramIndex, decorator) {
|
|
|
1609
1602
|
}
|
|
1610
1603
|
|
|
1611
1604
|
//#endregion
|
|
1612
|
-
//#region \0@oxc-project+runtime@0.
|
|
1605
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/decorate.js
|
|
1613
1606
|
function __decorate(decorators, target, key, desc) {
|
|
1614
1607
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1615
1608
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -1650,7 +1643,7 @@ let TableManager = class TableManager extends _univerjs_core.Disposable {
|
|
|
1650
1643
|
const worksheet = (_this$_univerInstance = this._univerInstanceService.getUnit(unitId)) === null || _this$_univerInstance === void 0 ? void 0 : _this$_univerInstance.getSheetBySheetId(subUnitId);
|
|
1651
1644
|
const { startRow, startColumn, endColumn } = range;
|
|
1652
1645
|
const header = [];
|
|
1653
|
-
const columnText = prefixText
|
|
1646
|
+
const columnText = prefixText ?? "Column";
|
|
1654
1647
|
for (let i = startColumn; i <= endColumn; i++) header.push(convertCellDataToString(worksheet === null || worksheet === void 0 ? void 0 : worksheet.getCell(startRow, i)) || getColumnName(i - startColumn + 1, columnText));
|
|
1655
1648
|
return header;
|
|
1656
1649
|
}
|
|
@@ -1666,7 +1659,7 @@ let TableManager = class TableManager extends _univerjs_core.Disposable {
|
|
|
1666
1659
|
* @returns {string} The table id.
|
|
1667
1660
|
*/
|
|
1668
1661
|
addTable(unitId, subUnitId, name, range, header, initId, options) {
|
|
1669
|
-
const id = initId
|
|
1662
|
+
const id = initId ?? (0, _univerjs_core.generateRandomId)();
|
|
1670
1663
|
const table = new Table(id, name, range, header || this.getColumnHeader(unitId, subUnitId, range), options);
|
|
1671
1664
|
table.setSubunitId(subUnitId);
|
|
1672
1665
|
this._ensureUnit(unitId).set(id, table);
|
|
@@ -1895,8 +1888,7 @@ let TableManager = class TableManager extends _univerjs_core.Disposable {
|
|
|
1895
1888
|
if (rowColOperation) this.operationTableRowCol(unitId, tableId, rowColOperation);
|
|
1896
1889
|
if (updateRange) this.updateTableRange(unitId, tableId, updateRange);
|
|
1897
1890
|
if (theme) {
|
|
1898
|
-
|
|
1899
|
-
const oldTheme = (_table$getTableStyleI = table.getTableStyleId()) !== null && _table$getTableStyleI !== void 0 ? _table$getTableStyleI : "default";
|
|
1891
|
+
const oldTheme = table.getTableStyleId() ?? "default";
|
|
1900
1892
|
table.setTableStyleId(theme);
|
|
1901
1893
|
this._tableThemeChanged$.next({
|
|
1902
1894
|
unitId,
|
|
@@ -1945,6 +1937,7 @@ let TableManager = class TableManager extends _univerjs_core.Disposable {
|
|
|
1945
1937
|
else if (Array.isArray(data[subUnitId])) tables = data[subUnitId];
|
|
1946
1938
|
if (!tables) return;
|
|
1947
1939
|
tables.forEach((table) => {
|
|
1940
|
+
var _table$options;
|
|
1948
1941
|
const header = this.getColumnHeader(unitId, subUnitId, table.range);
|
|
1949
1942
|
const tableInstance = new Table(table.id, table.name, table.range, header, table.options);
|
|
1950
1943
|
tableInstance.setTableMeta(table.meta);
|
|
@@ -1961,7 +1954,8 @@ let TableManager = class TableManager extends _univerjs_core.Disposable {
|
|
|
1961
1954
|
subUnitId,
|
|
1962
1955
|
range: table.range,
|
|
1963
1956
|
tableName: table.name,
|
|
1964
|
-
tableId: table.id
|
|
1957
|
+
tableId: table.id,
|
|
1958
|
+
tableStyleId: (_table$options = table.options) === null || _table$options === void 0 ? void 0 : _table$options.tableStyleId
|
|
1965
1959
|
});
|
|
1966
1960
|
});
|
|
1967
1961
|
});
|
|
@@ -2069,13 +2063,12 @@ const AddSheetTableCommand = {
|
|
|
2069
2063
|
id: "sheet.command.add-table",
|
|
2070
2064
|
type: _univerjs_core.CommandType.COMMAND,
|
|
2071
2065
|
handler: (accessor, params) => {
|
|
2072
|
-
var _params$id;
|
|
2073
2066
|
if (!params) return false;
|
|
2074
2067
|
const undoRedoService = accessor.get(_univerjs_core.IUndoRedoService);
|
|
2075
2068
|
const commandService = accessor.get(_univerjs_core.ICommandService);
|
|
2076
2069
|
const localeService = accessor.get(_univerjs_core.LocaleService);
|
|
2077
2070
|
const tableManager = accessor.get(TableManager);
|
|
2078
|
-
const tableId =
|
|
2071
|
+
const tableId = params.id ?? (0, _univerjs_core.generateRandomId)();
|
|
2079
2072
|
const existingNamesSet = getExistingNamesSet(params.unitId, {
|
|
2080
2073
|
univerInstanceService: accessor.get(_univerjs_core.IUniverInstanceService),
|
|
2081
2074
|
tableManager,
|
|
@@ -2202,7 +2195,6 @@ const DeleteSheetTableCommand = {
|
|
|
2202
2195
|
id: "sheet.command.delete-table",
|
|
2203
2196
|
type: _univerjs_core.CommandType.COMMAND,
|
|
2204
2197
|
handler: (accessor, params) => {
|
|
2205
|
-
var _interceptorCommands$, _interceptorCommands$2;
|
|
2206
2198
|
if (!params) return false;
|
|
2207
2199
|
const undoRedoService = accessor.get(_univerjs_core.IUndoRedoService);
|
|
2208
2200
|
const commandService = accessor.get(_univerjs_core.ICommandService);
|
|
@@ -2223,13 +2215,13 @@ const DeleteSheetTableCommand = {
|
|
|
2223
2215
|
tableName: tableConfig.name
|
|
2224
2216
|
}
|
|
2225
2217
|
});
|
|
2226
|
-
redos.push(...
|
|
2218
|
+
redos.push(...interceptorCommands.preRedos ?? []);
|
|
2227
2219
|
redos.push({
|
|
2228
2220
|
id: DeleteSheetTableMutation.id,
|
|
2229
2221
|
params: { ...params }
|
|
2230
2222
|
});
|
|
2231
2223
|
redos.push(...interceptorCommands.redos);
|
|
2232
|
-
undos.push(...
|
|
2224
|
+
undos.push(...interceptorCommands.preUndos ?? []);
|
|
2233
2225
|
undos.push({
|
|
2234
2226
|
id: AddSheetTableMutation.id,
|
|
2235
2227
|
params: {
|
|
@@ -2358,7 +2350,6 @@ const SetSheetTableCommand = {
|
|
|
2358
2350
|
id: "sheet.command.set-table-config",
|
|
2359
2351
|
type: _univerjs_core.CommandType.COMMAND,
|
|
2360
2352
|
handler: (accessor, params) => {
|
|
2361
|
-
var _interceptorCommands$, _interceptorCommands$2;
|
|
2362
2353
|
if (!params) return false;
|
|
2363
2354
|
const { unitId, tableId, name, updateRange, rowColOperation, theme } = params;
|
|
2364
2355
|
const tableManager = accessor.get(TableManager);
|
|
@@ -2417,7 +2408,7 @@ const SetSheetTableCommand = {
|
|
|
2417
2408
|
}
|
|
2418
2409
|
});
|
|
2419
2410
|
const redos = [
|
|
2420
|
-
...
|
|
2411
|
+
...interceptorCommands.preRedos ?? [],
|
|
2421
2412
|
{
|
|
2422
2413
|
id: SetSheetTableMutation.id,
|
|
2423
2414
|
params: redoParams
|
|
@@ -2425,7 +2416,7 @@ const SetSheetTableCommand = {
|
|
|
2425
2416
|
...interceptorCommands.redos
|
|
2426
2417
|
];
|
|
2427
2418
|
const undos = [
|
|
2428
|
-
...
|
|
2419
|
+
...interceptorCommands.preUndos ?? [],
|
|
2429
2420
|
{
|
|
2430
2421
|
id: SetSheetTableMutation.id,
|
|
2431
2422
|
params: undoParams
|
|
@@ -3140,7 +3131,6 @@ const SheetTableRemoveColumnAtCommand = {
|
|
|
3140
3131
|
id: "sheet.command.table-remove-column-at",
|
|
3141
3132
|
type: _univerjs_core.CommandType.COMMAND,
|
|
3142
3133
|
handler: (accessor, params) => {
|
|
3143
|
-
var _interceptorCommands$, _interceptorCommands$2;
|
|
3144
3134
|
if (!params) return false;
|
|
3145
3135
|
const { unitId, subUnitId, tableId, index, count = 1 } = params;
|
|
3146
3136
|
if (count <= 0) return false;
|
|
@@ -3169,7 +3159,7 @@ const SheetTableRemoveColumnAtCommand = {
|
|
|
3169
3159
|
}
|
|
3170
3160
|
});
|
|
3171
3161
|
const redos = [
|
|
3172
|
-
...
|
|
3162
|
+
...interceptorCommands.preRedos ?? [],
|
|
3173
3163
|
{
|
|
3174
3164
|
id: SetSheetTableMutation.id,
|
|
3175
3165
|
params: {
|
|
@@ -3187,7 +3177,7 @@ const SheetTableRemoveColumnAtCommand = {
|
|
|
3187
3177
|
...interceptorCommands.redos
|
|
3188
3178
|
];
|
|
3189
3179
|
const undos = [
|
|
3190
|
-
...
|
|
3180
|
+
...interceptorCommands.preUndos ?? [],
|
|
3191
3181
|
{
|
|
3192
3182
|
id: SetSheetTableMutation.id,
|
|
3193
3183
|
params: {
|
|
@@ -3311,7 +3301,6 @@ const SheetTableRemoveColCommand = {
|
|
|
3311
3301
|
id: "sheet.command.table-remove-col",
|
|
3312
3302
|
type: _univerjs_core.CommandType.COMMAND,
|
|
3313
3303
|
handler: (accessor, params) => {
|
|
3314
|
-
var _interceptorCommands$3, _interceptorCommands$4;
|
|
3315
3304
|
if (!params) return false;
|
|
3316
3305
|
const target = (0, _univerjs_sheets.getSheetCommandTarget)(accessor.get(_univerjs_core.IUniverInstanceService), params);
|
|
3317
3306
|
if (!target) return false;
|
|
@@ -3355,9 +3344,9 @@ const SheetTableRemoveColCommand = {
|
|
|
3355
3344
|
removedColumnNames: columns.map((column) => column.displayName)
|
|
3356
3345
|
}
|
|
3357
3346
|
});
|
|
3358
|
-
redos.unshift(...
|
|
3347
|
+
redos.unshift(...interceptorCommands.preRedos ?? []);
|
|
3359
3348
|
redos.push(...interceptorCommands.redos);
|
|
3360
|
-
undos.unshift(...
|
|
3349
|
+
undos.unshift(...interceptorCommands.preUndos ?? []);
|
|
3361
3350
|
undos.push({
|
|
3362
3351
|
id: SetSheetTableMutation.id,
|
|
3363
3352
|
params: {
|
|
@@ -3509,7 +3498,7 @@ SheetsTableThemeController = __decorate([
|
|
|
3509
3498
|
//#endregion
|
|
3510
3499
|
//#region package.json
|
|
3511
3500
|
var name = "@univerjs/sheets-table";
|
|
3512
|
-
var version = "1.0.0-
|
|
3501
|
+
var version = "1.0.0-beta.0";
|
|
3513
3502
|
|
|
3514
3503
|
//#endregion
|
|
3515
3504
|
//#region src/controllers/sheet-table-formula.controller.ts
|
|
@@ -3542,14 +3531,14 @@ let SheetTableFormulaController = class SheetTableFormulaController extends _uni
|
|
|
3542
3531
|
sheetId: subUnitId,
|
|
3543
3532
|
range
|
|
3544
3533
|
}
|
|
3545
|
-
});
|
|
3534
|
+
}, { onlyLocal: true });
|
|
3546
3535
|
}));
|
|
3547
3536
|
this.disposeWithMe(this._tableManager.tableNameChanged$.subscribe((event) => {
|
|
3548
3537
|
const { tableId, unitId, oldTableName } = event;
|
|
3549
3538
|
this._commandService.executeCommand(_univerjs_engine_formula.RemoveSuperTableMutation.id, {
|
|
3550
3539
|
unitId,
|
|
3551
3540
|
tableName: oldTableName
|
|
3552
|
-
});
|
|
3541
|
+
}, { onlyLocal: true });
|
|
3553
3542
|
const table = this._tableManager.getTableById(unitId, tableId);
|
|
3554
3543
|
if (!table) return;
|
|
3555
3544
|
this._updateSuperTable(unitId, table, oldTableName);
|
|
@@ -3572,7 +3561,7 @@ let SheetTableFormulaController = class SheetTableFormulaController extends _uni
|
|
|
3572
3561
|
sheetId: tableInfo.subUnitId,
|
|
3573
3562
|
titleMap
|
|
3574
3563
|
}
|
|
3575
|
-
});
|
|
3564
|
+
}, { onlyLocal: true });
|
|
3576
3565
|
}
|
|
3577
3566
|
};
|
|
3578
3567
|
SheetTableFormulaController = __decorate([__decorateParam(0, (0, _univerjs_core.Inject)(TableManager)), __decorateParam(1, _univerjs_core.ICommandService)], SheetTableFormulaController);
|
|
@@ -3889,7 +3878,6 @@ let SheetTableRefRangeController = class SheetTableRefRangeController extends _u
|
|
|
3889
3878
|
const tableRange = table.getRange();
|
|
3890
3879
|
if (_univerjs_core.Rectangle.intersects(tableRange, range)) {
|
|
3891
3880
|
if (range.startColumn <= tableRange.startColumn && range.endColumn >= tableRange.endColumn) {
|
|
3892
|
-
var _formulaMutations$pre, _formulaMutations$pre2;
|
|
3893
3881
|
const tableInfo = table.getTableInfo();
|
|
3894
3882
|
const formulaMutations = this._sheetInterceptorService.onCommandExecute({
|
|
3895
3883
|
id: DELETE_SHEET_TABLE_COMMAND_ID,
|
|
@@ -3900,7 +3888,7 @@ let SheetTableRefRangeController = class SheetTableRefRangeController extends _u
|
|
|
3900
3888
|
tableName: tableInfo.name
|
|
3901
3889
|
}
|
|
3902
3890
|
});
|
|
3903
|
-
preRedos.push(...
|
|
3891
|
+
preRedos.push(...formulaMutations.preRedos ?? [], ...formulaMutations.redos);
|
|
3904
3892
|
preRedos.push({
|
|
3905
3893
|
id: DeleteSheetTableMutation.id,
|
|
3906
3894
|
params: {
|
|
@@ -3933,7 +3921,7 @@ let SheetTableRefRangeController = class SheetTableRefRangeController extends _u
|
|
|
3933
3921
|
options: tableJson.options
|
|
3934
3922
|
}
|
|
3935
3923
|
});
|
|
3936
|
-
undos.push(...
|
|
3924
|
+
undos.push(...formulaMutations.preUndos ?? [], ...formulaMutations.undos);
|
|
3937
3925
|
} else if (range.startColumn <= tableRange.startColumn && range.endColumn >= tableRange.startColumn) {
|
|
3938
3926
|
const tableJson = table.toJSON();
|
|
3939
3927
|
const removeColumnCount = range.endColumn - tableRange.startColumn + 1;
|
|
@@ -4071,7 +4059,6 @@ let SheetTableRefRangeController = class SheetTableRefRangeController extends _u
|
|
|
4071
4059
|
};
|
|
4072
4060
|
}
|
|
4073
4061
|
_appendTableColumnFormulaMutations(redos, undos, info) {
|
|
4074
|
-
var _formulaMutations$pre3, _formulaMutations$pre4;
|
|
4075
4062
|
const removedColumnNames = info.columns.map((column) => column.displayName);
|
|
4076
4063
|
if (!removedColumnNames.length) return;
|
|
4077
4064
|
const formulaMutations = this._sheetInterceptorService.onCommandExecute({
|
|
@@ -4085,8 +4072,8 @@ let SheetTableRefRangeController = class SheetTableRefRangeController extends _u
|
|
|
4085
4072
|
removedColumnNames
|
|
4086
4073
|
}
|
|
4087
4074
|
});
|
|
4088
|
-
redos.splice(Math.max(redos.length - 1, 0), 0, ...
|
|
4089
|
-
undos.push(...
|
|
4075
|
+
redos.splice(Math.max(redos.length - 1, 0), 0, ...formulaMutations.preRedos ?? [], ...formulaMutations.redos);
|
|
4076
|
+
undos.push(...formulaMutations.preUndos ?? [], ...formulaMutations.undos);
|
|
4090
4077
|
}
|
|
4091
4078
|
_initCommandListener() {
|
|
4092
4079
|
this._commandService.onCommandExecuted((commandInfo) => {
|
|
@@ -4205,8 +4192,7 @@ let TableFilterController = class TableFilterController extends _univerjs_core.D
|
|
|
4205
4192
|
this._tableFilteredOutRows.set(this._getSheetKey(unitId, subUnitId), filteredOutRows);
|
|
4206
4193
|
}
|
|
4207
4194
|
_getTableFilteredOutRows(unitId, subUnitId) {
|
|
4208
|
-
|
|
4209
|
-
return (_this$_tableFilteredO = this._tableFilteredOutRows.get(this._getSheetKey(unitId, subUnitId))) !== null && _this$_tableFilteredO !== void 0 ? _this$_tableFilteredO : /* @__PURE__ */ new Set();
|
|
4195
|
+
return this._tableFilteredOutRows.get(this._getSheetKey(unitId, subUnitId)) ?? /* @__PURE__ */ new Set();
|
|
4210
4196
|
}
|
|
4211
4197
|
_getSheetKey(unitId, subUnitId) {
|
|
4212
4198
|
return `${unitId}|${subUnitId}`;
|
|
@@ -4288,6 +4274,7 @@ _defineProperty(UniverSheetsTablePlugin, "packageName", name);
|
|
|
4288
4274
|
_defineProperty(UniverSheetsTablePlugin, "version", version);
|
|
4289
4275
|
_defineProperty(UniverSheetsTablePlugin, "type", _univerjs_core.UniverInstanceType.UNIVER_SHEET);
|
|
4290
4276
|
UniverSheetsTablePlugin = __decorate([
|
|
4277
|
+
(0, _univerjs_core.DependentOn)(_univerjs_sheets.UniverSheetsPlugin),
|
|
4291
4278
|
__decorateParam(1, (0, _univerjs_core.Inject)(_univerjs_core.Injector)),
|
|
4292
4279
|
__decorateParam(2, _univerjs_core.IConfigService),
|
|
4293
4280
|
__decorateParam(3, (0, _univerjs_core.Inject)(_univerjs_core.ICommandService))
|