@univerjs/sheets-table 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +184 -13
- package/lib/cjs/locale/ar-SA.js +1 -0
- package/lib/cjs/locale/ca-ES.js +1 -0
- package/lib/cjs/locale/de-DE.js +1 -0
- package/lib/cjs/locale/en-US.js +1 -0
- package/lib/cjs/locale/es-ES.js +1 -0
- package/lib/cjs/locale/fa-IR.js +1 -0
- package/lib/cjs/locale/fr-FR.js +1 -0
- package/lib/cjs/locale/id-ID.js +1 -0
- package/lib/cjs/locale/it-IT.js +1 -0
- package/lib/cjs/locale/ja-JP.js +1 -0
- package/lib/cjs/locale/ko-KR.js +1 -0
- package/lib/cjs/locale/pl-PL.js +1 -0
- package/lib/cjs/locale/pt-BR.js +1 -0
- package/lib/cjs/locale/ru-RU.js +1 -0
- package/lib/cjs/locale/sk-SK.js +1 -0
- package/lib/cjs/locale/vi-VN.js +1 -0
- package/lib/cjs/locale/zh-CN.js +1 -0
- package/lib/cjs/locale/zh-HK.js +1 -0
- package/lib/cjs/locale/zh-TW.js +1 -0
- package/lib/es/index.js +186 -15
- package/lib/es/locale/ar-SA.js +1 -0
- package/lib/es/locale/ca-ES.js +1 -0
- package/lib/es/locale/de-DE.js +1 -0
- package/lib/es/locale/en-US.js +1 -0
- package/lib/es/locale/es-ES.js +1 -0
- package/lib/es/locale/fa-IR.js +1 -0
- package/lib/es/locale/fr-FR.js +1 -0
- package/lib/es/locale/id-ID.js +1 -0
- package/lib/es/locale/it-IT.js +1 -0
- package/lib/es/locale/ja-JP.js +1 -0
- package/lib/es/locale/ko-KR.js +1 -0
- package/lib/es/locale/pl-PL.js +1 -0
- package/lib/es/locale/pt-BR.js +1 -0
- package/lib/es/locale/ru-RU.js +1 -0
- package/lib/es/locale/sk-SK.js +1 -0
- package/lib/es/locale/vi-VN.js +1 -0
- package/lib/es/locale/zh-CN.js +1 -0
- package/lib/es/locale/zh-HK.js +1 -0
- package/lib/es/locale/zh-TW.js +1 -0
- package/lib/index.js +186 -15
- package/lib/locale/ar-SA.js +1 -0
- package/lib/locale/ca-ES.js +1 -0
- package/lib/locale/de-DE.js +1 -0
- package/lib/locale/en-US.js +1 -0
- package/lib/locale/es-ES.js +1 -0
- package/lib/locale/fa-IR.js +1 -0
- package/lib/locale/fr-FR.js +1 -0
- package/lib/locale/id-ID.js +1 -0
- package/lib/locale/it-IT.js +1 -0
- package/lib/locale/ja-JP.js +1 -0
- package/lib/locale/ko-KR.js +1 -0
- package/lib/locale/pl-PL.js +1 -0
- package/lib/locale/pt-BR.js +1 -0
- package/lib/locale/ru-RU.js +1 -0
- package/lib/locale/sk-SK.js +1 -0
- package/lib/locale/vi-VN.js +1 -0
- package/lib/locale/zh-CN.js +1 -0
- package/lib/locale/zh-HK.js +1 -0
- package/lib/locale/zh-TW.js +1 -0
- package/lib/types/commands/mutations/move-sheet-table.mutation.d.ts +25 -0
- package/lib/types/controllers/sheet-table-move.controller.d.ts +31 -0
- package/lib/types/controllers/table-filter.controller.d.ts +0 -1
- package/lib/types/locale/en-US.d.ts +1 -0
- package/lib/types/models/table-manager.d.ts +1 -0
- package/lib/types/types/type.d.ts +2 -7
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -2053,6 +2053,28 @@ let TableManager = class TableManager extends _univerjs_core.Disposable {
|
|
|
2053
2053
|
oldRange
|
|
2054
2054
|
});
|
|
2055
2055
|
}
|
|
2056
|
+
moveTable(unitId, tableId, subUnitId, range) {
|
|
2057
|
+
const table = this.getTableById(unitId, tableId);
|
|
2058
|
+
if (!table) return;
|
|
2059
|
+
const oldRange = table.getRange();
|
|
2060
|
+
const oldSubUnitId = table.getSubunitId();
|
|
2061
|
+
table.setSubunitId(subUnitId);
|
|
2062
|
+
table.setRange({ ...range });
|
|
2063
|
+
this._tableRangeChanged$.next({
|
|
2064
|
+
unitId,
|
|
2065
|
+
subUnitId,
|
|
2066
|
+
oldSubUnitId,
|
|
2067
|
+
tableId,
|
|
2068
|
+
range: { ...range },
|
|
2069
|
+
oldRange
|
|
2070
|
+
});
|
|
2071
|
+
this._tableFilterChanged$.next({
|
|
2072
|
+
unitId,
|
|
2073
|
+
subUnitId,
|
|
2074
|
+
oldSubUnitId,
|
|
2075
|
+
tableId
|
|
2076
|
+
});
|
|
2077
|
+
}
|
|
2056
2078
|
setTableByConfig(unitId, tableId, config) {
|
|
2057
2079
|
const unitMap = this._tableMap.get(unitId);
|
|
2058
2080
|
const table = unitMap === null || unitMap === void 0 ? void 0 : unitMap.get(tableId);
|
|
@@ -2928,11 +2950,11 @@ let SheetsTableController = class SheetsTableController extends _univerjs_core.D
|
|
|
2928
2950
|
});
|
|
2929
2951
|
}));
|
|
2930
2952
|
this.disposeWithMe(this._tableManager.tableRangeChanged$.subscribe((event) => {
|
|
2931
|
-
const { range, tableId, unitId, subUnitId, oldRange } = event;
|
|
2953
|
+
const { range, tableId, unitId, subUnitId, oldRange, oldSubUnitId = subUnitId } = event;
|
|
2932
2954
|
const rTree = this._ensureTableRangeRTree(unitId);
|
|
2933
2955
|
rTree.remove({
|
|
2934
2956
|
unitId,
|
|
2935
|
-
sheetId:
|
|
2957
|
+
sheetId: oldSubUnitId,
|
|
2936
2958
|
id: tableId,
|
|
2937
2959
|
range: { ...oldRange }
|
|
2938
2960
|
});
|
|
@@ -3854,7 +3876,7 @@ let SheetsTableThemeController = class SheetsTableThemeController extends _unive
|
|
|
3854
3876
|
});
|
|
3855
3877
|
}));
|
|
3856
3878
|
this.disposeWithMe(this._tableManager.tableRangeChanged$.subscribe((event) => {
|
|
3857
|
-
const { range, oldRange, tableId, unitId, subUnitId } = event;
|
|
3879
|
+
const { range, oldRange, tableId, unitId, subUnitId, oldSubUnitId = subUnitId } = event;
|
|
3858
3880
|
const table = this._tableManager.getTable(unitId, tableId);
|
|
3859
3881
|
let tableStyleId = table.getTableStyleId();
|
|
3860
3882
|
if (!tableStyleId) {
|
|
@@ -3863,7 +3885,7 @@ let SheetsTableThemeController = class SheetsTableThemeController extends _unive
|
|
|
3863
3885
|
}
|
|
3864
3886
|
this._sheetRangeThemeService.removeRangeThemeRule(tableStyleId, {
|
|
3865
3887
|
unitId,
|
|
3866
|
-
subUnitId,
|
|
3888
|
+
subUnitId: oldSubUnitId,
|
|
3867
3889
|
range: { ...oldRange }
|
|
3868
3890
|
});
|
|
3869
3891
|
this._sheetRangeThemeService.registerRangeThemeStyle(tableStyleId, {
|
|
@@ -3925,7 +3947,43 @@ SheetsTableThemeController = __decorate([
|
|
|
3925
3947
|
//#endregion
|
|
3926
3948
|
//#region package.json
|
|
3927
3949
|
var name = "@univerjs/sheets-table";
|
|
3928
|
-
var version = "1.0.
|
|
3950
|
+
var version = "1.0.4";
|
|
3951
|
+
|
|
3952
|
+
//#endregion
|
|
3953
|
+
//#region src/commands/mutations/move-sheet-table.mutation.ts
|
|
3954
|
+
const MoveSheetTableMutation = {
|
|
3955
|
+
id: "sheet.mutation.move-table",
|
|
3956
|
+
type: _univerjs_core.CommandType.MUTATION,
|
|
3957
|
+
handler: (accessor, params) => {
|
|
3958
|
+
if (!params) return false;
|
|
3959
|
+
const { unitId, tableId, subUnitId, range, calculatedColumns } = params;
|
|
3960
|
+
const manager = accessor.get(TableManager);
|
|
3961
|
+
const table = manager.getTableById(unitId, tableId);
|
|
3962
|
+
const workbook = accessor.get(_univerjs_core.IUniverInstanceService).getUnit(unitId);
|
|
3963
|
+
const worksheet = workbook === null || workbook === void 0 ? void 0 : workbook.getSheetBySheetId(subUnitId);
|
|
3964
|
+
if (!table || !worksheet) return false;
|
|
3965
|
+
const columns = calculatedColumns ?? table.getTableInfo().columns.map((column, columnIndex) => {
|
|
3966
|
+
var _worksheet$getCellRaw;
|
|
3967
|
+
const row = range.startRow + (table.isShowHeader() ? 1 : 0);
|
|
3968
|
+
const endRow = range.endRow - (table.isShowFooter() ? 1 : 0);
|
|
3969
|
+
const formula = column.formula && row <= endRow ? (_worksheet$getCellRaw = worksheet.getCellRaw(row, range.startColumn + columnIndex)) === null || _worksheet$getCellRaw === void 0 ? void 0 : _worksheet$getCellRaw.f : void 0;
|
|
3970
|
+
return {
|
|
3971
|
+
columnId: column.id,
|
|
3972
|
+
formula: formula || column.formula,
|
|
3973
|
+
formulaIsArray: column.formulaIsArray
|
|
3974
|
+
};
|
|
3975
|
+
}).filter((column) => column.formula);
|
|
3976
|
+
for (const config of columns) {
|
|
3977
|
+
const column = table.getColumn(config.columnId);
|
|
3978
|
+
if (column) {
|
|
3979
|
+
column.formula = config.formula;
|
|
3980
|
+
column.formulaIsArray = config.formulaIsArray;
|
|
3981
|
+
}
|
|
3982
|
+
}
|
|
3983
|
+
manager.moveTable(unitId, tableId, subUnitId, range);
|
|
3984
|
+
return true;
|
|
3985
|
+
}
|
|
3986
|
+
};
|
|
3929
3987
|
|
|
3930
3988
|
//#endregion
|
|
3931
3989
|
//#region src/controllers/sheet-table-formula.controller.ts
|
|
@@ -4021,6 +4079,114 @@ SheetTableFormulaController = __decorate([
|
|
|
4021
4079
|
__decorateParam(2, _univerjs_engine_formula.IActiveDirtyManagerService)
|
|
4022
4080
|
], SheetTableFormulaController);
|
|
4023
4081
|
|
|
4082
|
+
//#endregion
|
|
4083
|
+
//#region src/controllers/sheet-table-move.controller.ts
|
|
4084
|
+
let SheetTableMoveController = class SheetTableMoveController extends _univerjs_core.Disposable {
|
|
4085
|
+
constructor(_tableManager, _sheetInterceptorService, _univerInstanceService, _injector, _localeService, _errorService) {
|
|
4086
|
+
super();
|
|
4087
|
+
this._tableManager = _tableManager;
|
|
4088
|
+
this._sheetInterceptorService = _sheetInterceptorService;
|
|
4089
|
+
this._univerInstanceService = _univerInstanceService;
|
|
4090
|
+
this._injector = _injector;
|
|
4091
|
+
this._localeService = _localeService;
|
|
4092
|
+
this._errorService = _errorService;
|
|
4093
|
+
this.disposeWithMe(this._sheetInterceptorService.interceptBeforeCommand({ performCheck: async (command) => command.id !== _univerjs_sheets.MoveRangeCommand.id || this._checkMove(command.params) }));
|
|
4094
|
+
this.disposeWithMe(this._sheetInterceptorService.interceptAfterCommand({ getMutations: (command) => command.id === _univerjs_sheets.MoveRangeCommand.id ? this._getMoveMutations(command.params) : {
|
|
4095
|
+
redos: [],
|
|
4096
|
+
undos: []
|
|
4097
|
+
} }));
|
|
4098
|
+
}
|
|
4099
|
+
_getTargets(params) {
|
|
4100
|
+
const source = (0, _univerjs_sheets.getSheetCommandTarget)(this._univerInstanceService, {
|
|
4101
|
+
unitId: params.fromUnitId ?? params.toUnitId,
|
|
4102
|
+
subUnitId: params.fromSubUnitId
|
|
4103
|
+
});
|
|
4104
|
+
return {
|
|
4105
|
+
source,
|
|
4106
|
+
target: (0, _univerjs_sheets.getSheetCommandTarget)(this._univerInstanceService, {
|
|
4107
|
+
unitId: params.toUnitId ?? (source === null || source === void 0 ? void 0 : source.unitId),
|
|
4108
|
+
subUnitId: params.toSubUnitId ?? (source === null || source === void 0 ? void 0 : source.subUnitId)
|
|
4109
|
+
})
|
|
4110
|
+
};
|
|
4111
|
+
}
|
|
4112
|
+
_checkMove(params) {
|
|
4113
|
+
const { source, target } = this._getTargets(params);
|
|
4114
|
+
if (!source || !target || source.unitId !== target.unitId) return false;
|
|
4115
|
+
const movingTables = this._tableManager.getTablesBySubunitId(source.unitId, source.subUnitId).filter((table) => _univerjs_core.Rectangle.contains(params.fromRange, table.getRange()));
|
|
4116
|
+
if (!movingTables.length) return true;
|
|
4117
|
+
const targetTables = this._tableManager.getTablesBySubunitId(target.unitId, target.subUnitId);
|
|
4118
|
+
for (const table of targetTables) {
|
|
4119
|
+
if (movingTables.includes(table) || !_univerjs_core.Rectangle.intersects(params.toRange, table.getRange())) continue;
|
|
4120
|
+
this._errorService.emit(this._localeService.t("sheets-table.moveTableOverlapError"));
|
|
4121
|
+
return false;
|
|
4122
|
+
}
|
|
4123
|
+
const { fromRange, toRange } = params;
|
|
4124
|
+
if (!this._isValidMoveRange(params, target.worksheet)) return false;
|
|
4125
|
+
return (0, _univerjs_sheets.checkRangesEditablePermission)(this._injector, source.unitId, source.subUnitId, [fromRange]) && (0, _univerjs_sheets.checkRangesEditablePermission)(this._injector, target.unitId, target.subUnitId, [toRange]);
|
|
4126
|
+
}
|
|
4127
|
+
_isValidMoveRange(params, worksheet) {
|
|
4128
|
+
const { fromRange, toRange } = params;
|
|
4129
|
+
if (fromRange.endRow - fromRange.startRow !== toRange.endRow - toRange.startRow || fromRange.endColumn - fromRange.startColumn !== toRange.endColumn - toRange.startColumn || toRange.startRow < 0 || toRange.startColumn < 0 || toRange.endRow >= worksheet.getRowCount() || toRange.endColumn >= worksheet.getColumnCount()) return false;
|
|
4130
|
+
return true;
|
|
4131
|
+
}
|
|
4132
|
+
_getMoveMutations(params) {
|
|
4133
|
+
const redos = [];
|
|
4134
|
+
const undos = [];
|
|
4135
|
+
const { source, target } = this._getTargets(params);
|
|
4136
|
+
if (!source || !target || source.unitId !== target.unitId) return {
|
|
4137
|
+
redos,
|
|
4138
|
+
undos
|
|
4139
|
+
};
|
|
4140
|
+
const rowOffset = params.toRange.startRow - params.fromRange.startRow;
|
|
4141
|
+
const columnOffset = params.toRange.startColumn - params.fromRange.startColumn;
|
|
4142
|
+
const tables = this._tableManager.getTablesBySubunitId(source.unitId, source.subUnitId);
|
|
4143
|
+
for (const table of tables) {
|
|
4144
|
+
const range = table.getRange();
|
|
4145
|
+
if (!_univerjs_core.Rectangle.contains(params.fromRange, range)) continue;
|
|
4146
|
+
redos.push({
|
|
4147
|
+
id: MoveSheetTableMutation.id,
|
|
4148
|
+
params: {
|
|
4149
|
+
unitId: source.unitId,
|
|
4150
|
+
tableId: table.getId(),
|
|
4151
|
+
subUnitId: target.subUnitId,
|
|
4152
|
+
range: {
|
|
4153
|
+
startRow: range.startRow + rowOffset,
|
|
4154
|
+
endRow: range.endRow + rowOffset,
|
|
4155
|
+
startColumn: range.startColumn + columnOffset,
|
|
4156
|
+
endColumn: range.endColumn + columnOffset
|
|
4157
|
+
}
|
|
4158
|
+
}
|
|
4159
|
+
});
|
|
4160
|
+
undos.push({
|
|
4161
|
+
id: MoveSheetTableMutation.id,
|
|
4162
|
+
params: {
|
|
4163
|
+
unitId: source.unitId,
|
|
4164
|
+
tableId: table.getId(),
|
|
4165
|
+
subUnitId: source.subUnitId,
|
|
4166
|
+
range,
|
|
4167
|
+
calculatedColumns: table.getTableInfo().columns.filter((column) => column.formula).map((column) => ({
|
|
4168
|
+
columnId: column.id,
|
|
4169
|
+
formula: column.formula,
|
|
4170
|
+
formulaIsArray: column.formulaIsArray
|
|
4171
|
+
}))
|
|
4172
|
+
}
|
|
4173
|
+
});
|
|
4174
|
+
}
|
|
4175
|
+
return {
|
|
4176
|
+
redos,
|
|
4177
|
+
undos
|
|
4178
|
+
};
|
|
4179
|
+
}
|
|
4180
|
+
};
|
|
4181
|
+
SheetTableMoveController = __decorate([
|
|
4182
|
+
__decorateParam(0, (0, _univerjs_core.Inject)(TableManager)),
|
|
4183
|
+
__decorateParam(1, (0, _univerjs_core.Inject)(_univerjs_sheets.SheetInterceptorService)),
|
|
4184
|
+
__decorateParam(2, _univerjs_core.IUniverInstanceService),
|
|
4185
|
+
__decorateParam(3, (0, _univerjs_core.Inject)(_univerjs_core.Injector)),
|
|
4186
|
+
__decorateParam(4, (0, _univerjs_core.Inject)(_univerjs_core.LocaleService)),
|
|
4187
|
+
__decorateParam(5, (0, _univerjs_core.Inject)(_univerjs_core.ErrorService))
|
|
4188
|
+
], SheetTableMoveController);
|
|
4189
|
+
|
|
4024
4190
|
//#endregion
|
|
4025
4191
|
//#region src/controllers/sheet-table-range.controller.ts
|
|
4026
4192
|
/**
|
|
@@ -4047,8 +4213,8 @@ let SheetTableRangeController = class SheetTableRangeController extends _univerj
|
|
|
4047
4213
|
}
|
|
4048
4214
|
_initRangeListener() {
|
|
4049
4215
|
this.disposeWithMe(this._tableManager.tableRangeChanged$.subscribe((event) => {
|
|
4050
|
-
const { range, tableId, unitId, subUnitId } = event;
|
|
4051
|
-
this._exclusiveRangeService.clearExclusiveRangesByGroupId(unitId,
|
|
4216
|
+
const { range, tableId, unitId, subUnitId, oldSubUnitId = subUnitId } = event;
|
|
4217
|
+
this._exclusiveRangeService.clearExclusiveRangesByGroupId(unitId, oldSubUnitId, FEATURE_TABLE_ID, tableId);
|
|
4052
4218
|
this._exclusiveRangeService.addExclusiveRange(unitId, subUnitId, FEATURE_TABLE_ID, [{
|
|
4053
4219
|
range: { ...range },
|
|
4054
4220
|
groupId: tableId
|
|
@@ -4603,7 +4769,6 @@ let TableFilterController = class TableFilterController extends _univerjs_core.D
|
|
|
4603
4769
|
this._sheetRowFilteredService = _sheetRowFilteredService;
|
|
4604
4770
|
this._zebraCrossingCacheController = _zebraCrossingCacheController;
|
|
4605
4771
|
_defineProperty(this, "_tableFilteredOutRows", /* @__PURE__ */ new Map());
|
|
4606
|
-
_defineProperty(this, "_subscription", null);
|
|
4607
4772
|
this.registerFilterChangeEvent();
|
|
4608
4773
|
this.initTableHiddenRowIntercept();
|
|
4609
4774
|
this._registerFormulaRowFiltered();
|
|
@@ -4625,18 +4790,18 @@ let TableFilterController = class TableFilterController extends _univerjs_core.D
|
|
|
4625
4790
|
}));
|
|
4626
4791
|
}
|
|
4627
4792
|
_initFilteredOutRows() {
|
|
4628
|
-
this._tableManager.tableInitStatus$.pipe((0, rxjs.filter)((initialized) => initialized), (0, rxjs.switchMap)(() => {
|
|
4793
|
+
this.disposeWithMe(this._tableManager.tableInitStatus$.pipe((0, rxjs.filter)((initialized) => initialized), (0, rxjs.switchMap)(() => {
|
|
4629
4794
|
return this._univerInstanceService.getCurrentTypeOfUnit$(_univerjs_core.UniverInstanceType.UNIVER_SHEET);
|
|
4630
4795
|
}), (0, rxjs.filter)((workbook) => workbook !== null && workbook !== void 0), (0, rxjs.switchMap)((workbook) => workbook.activeSheet$), (0, rxjs.filter)((sheet) => sheet !== null && sheet !== void 0)).subscribe(() => {
|
|
4631
4796
|
const target = (0, _univerjs_sheets.getSheetCommandTarget)(this._univerInstanceService);
|
|
4632
4797
|
if (!target) return;
|
|
4633
4798
|
const { unitId, subUnitId } = target;
|
|
4634
4799
|
this._refreshTableFilteredOutRows(unitId, subUnitId);
|
|
4635
|
-
});
|
|
4800
|
+
}));
|
|
4636
4801
|
}
|
|
4637
4802
|
registerFilterChangeEvent() {
|
|
4638
4803
|
this.disposeWithMe(this._tableManager.tableFilterChanged$.subscribe((event) => {
|
|
4639
|
-
const { unitId, subUnitId, tableId } = event;
|
|
4804
|
+
const { unitId, subUnitId, tableId, oldSubUnitId } = event;
|
|
4640
4805
|
const workbook = this._univerInstanceService.getUnit(unitId);
|
|
4641
4806
|
const worksheet = workbook === null || workbook === void 0 ? void 0 : workbook.getSheetBySheetId(subUnitId);
|
|
4642
4807
|
const table = this._tableManager.getTable(unitId, tableId);
|
|
@@ -4644,6 +4809,10 @@ let TableFilterController = class TableFilterController extends _univerjs_core.D
|
|
|
4644
4809
|
table.getTableFilters().doFilter(worksheet, table.getTableFilterRange(), workbook === null || workbook === void 0 ? void 0 : workbook.getDateSystem());
|
|
4645
4810
|
this._refreshTableFilteredOutRows(unitId, subUnitId);
|
|
4646
4811
|
this._zebraCrossingCacheController.updateZebraCrossingCache(unitId, subUnitId);
|
|
4812
|
+
if (oldSubUnitId && oldSubUnitId !== subUnitId) {
|
|
4813
|
+
this._refreshTableFilteredOutRows(unitId, oldSubUnitId);
|
|
4814
|
+
this._zebraCrossingCacheController.updateZebraCrossingCache(unitId, oldSubUnitId);
|
|
4815
|
+
}
|
|
4647
4816
|
}));
|
|
4648
4817
|
}
|
|
4649
4818
|
_refreshTableFilteredOutRows(unitId, subUnitId) {
|
|
@@ -4664,9 +4833,8 @@ let TableFilterController = class TableFilterController extends _univerjs_core.D
|
|
|
4664
4833
|
return `${unitId}|${subUnitId}`;
|
|
4665
4834
|
}
|
|
4666
4835
|
dispose() {
|
|
4667
|
-
var _this$_subscription;
|
|
4668
4836
|
super.dispose();
|
|
4669
|
-
|
|
4837
|
+
this._tableFilteredOutRows.clear();
|
|
4670
4838
|
}
|
|
4671
4839
|
};
|
|
4672
4840
|
TableFilterController = __decorate([
|
|
@@ -4699,6 +4867,7 @@ let UniverSheetsTablePlugin = class UniverSheetsTablePlugin extends _univerjs_co
|
|
|
4699
4867
|
[TableFilterController],
|
|
4700
4868
|
[SheetTableRangeController],
|
|
4701
4869
|
[SheetTableRefRangeController],
|
|
4870
|
+
[SheetTableMoveController],
|
|
4702
4871
|
[SheetTableFormulaController]
|
|
4703
4872
|
]);
|
|
4704
4873
|
}
|
|
@@ -4707,6 +4876,7 @@ let UniverSheetsTablePlugin = class UniverSheetsTablePlugin extends _univerjs_co
|
|
|
4707
4876
|
[SheetTableFormulaController],
|
|
4708
4877
|
[SheetTableRangeController],
|
|
4709
4878
|
[SheetTableRefRangeController],
|
|
4879
|
+
[SheetTableMoveController],
|
|
4710
4880
|
[SheetsTableThemeController],
|
|
4711
4881
|
[SheetsTableController],
|
|
4712
4882
|
[SheetTableService],
|
|
@@ -4720,6 +4890,7 @@ let UniverSheetsTablePlugin = class UniverSheetsTablePlugin extends _univerjs_co
|
|
|
4720
4890
|
AddSheetTableMutation,
|
|
4721
4891
|
DeleteSheetTableCommand,
|
|
4722
4892
|
DeleteSheetTableMutation,
|
|
4893
|
+
MoveSheetTableMutation,
|
|
4723
4894
|
SetSheetTableFilterMutation,
|
|
4724
4895
|
SetSheetTableFilterCommand,
|
|
4725
4896
|
SetSheetTableSortStateCommand,
|
package/lib/cjs/locale/ar-SA.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
const locale = { "sheets-table": {
|
|
3
3
|
columnPrefix: "عمود",
|
|
4
4
|
tablePrefix: "جدول",
|
|
5
|
+
moveTableOverlapError: "يتداخل نطاق الوجهة مع جدول آخر.",
|
|
5
6
|
tableNameError: "لا يمكن أن يحتوي اسم الجدول على مسافات، ولا يمكن أن يبدأ برقم، ولا يمكن أن يكون مطابقًا لاسم جدول موجود"
|
|
6
7
|
} };
|
|
7
8
|
|
package/lib/cjs/locale/ca-ES.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
const locale = { "sheets-table": {
|
|
3
3
|
columnPrefix: "Columna",
|
|
4
4
|
tablePrefix: "Taula",
|
|
5
|
+
moveTableOverlapError: "La destinació se superposa amb una altra taula.",
|
|
5
6
|
tableNameError: "El nom de la taula no pot contenir espais, no pot començar amb un número i no pot ser idèntic a un nom de taula existent"
|
|
6
7
|
} };
|
|
7
8
|
|
package/lib/cjs/locale/de-DE.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
const locale = { "sheets-table": {
|
|
3
3
|
columnPrefix: "Spalte",
|
|
4
4
|
tablePrefix: "Tabelle",
|
|
5
|
+
moveTableOverlapError: "Der Zielbereich überschneidet sich mit einer anderen Tabelle.",
|
|
5
6
|
tableNameError: "Tabellenname darf keine Leerzeichen enthalten, darf nicht mit einer Zahl beginnen und darf nicht mit einem vorhandenen Tabellennamen identisch sein"
|
|
6
7
|
} };
|
|
7
8
|
|
package/lib/cjs/locale/en-US.js
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
const locale = { "sheets-table": {
|
|
18
18
|
columnPrefix: "Column",
|
|
19
19
|
tablePrefix: "Table",
|
|
20
|
+
moveTableOverlapError: "The destination overlaps another table.",
|
|
20
21
|
tableNameError: "Table name cannot contain spaces, cannot start with a number, and cannot be identical to an existing table name"
|
|
21
22
|
} };
|
|
22
23
|
|
package/lib/cjs/locale/es-ES.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
const locale = { "sheets-table": {
|
|
3
3
|
columnPrefix: "Columna",
|
|
4
4
|
tablePrefix: "Tabla",
|
|
5
|
+
moveTableOverlapError: "El destino se superpone con otra tabla.",
|
|
5
6
|
tableNameError: "El nombre de la tabla no puede contener espacios, no puede comenzar con un número y no puede ser idéntico a un nombre de tabla existente"
|
|
6
7
|
} };
|
|
7
8
|
|
package/lib/cjs/locale/fa-IR.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
const locale = { "sheets-table": {
|
|
3
3
|
columnPrefix: "ستون",
|
|
4
4
|
tablePrefix: "جدول",
|
|
5
|
+
moveTableOverlapError: "محدودهٔ مقصد با جدول دیگری همپوشانی دارد.",
|
|
5
6
|
tableNameError: "نام جدول نمیتواند شامل فاصله باشد، نمیتواند با عدد شروع شود و نمیتواند با نام جدولهای موجود تکراری باشد"
|
|
6
7
|
} };
|
|
7
8
|
|
package/lib/cjs/locale/fr-FR.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
const locale = { "sheets-table": {
|
|
3
3
|
columnPrefix: "Colonne",
|
|
4
4
|
tablePrefix: "Tableau",
|
|
5
|
+
moveTableOverlapError: "La destination chevauche un autre tableau.",
|
|
5
6
|
tableNameError: "Le nom du tableau ne peut pas contenir d'espaces, ne peut pas commencer par un chiffre et ne peut pas être identique à un nom de tableau existant"
|
|
6
7
|
} };
|
|
7
8
|
|
package/lib/cjs/locale/id-ID.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
const locale = { "sheets-table": {
|
|
3
3
|
columnPrefix: "Kolom",
|
|
4
4
|
tablePrefix: "Tabel",
|
|
5
|
+
moveTableOverlapError: "Rentang tujuan tumpang tindih dengan tabel lain.",
|
|
5
6
|
tableNameError: "Nama tabel tidak boleh mengandung spasi, tidak boleh diawali dengan angka, dan tidak boleh sama dengan nama tabel yang sudah ada"
|
|
6
7
|
} };
|
|
7
8
|
|
package/lib/cjs/locale/it-IT.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
const locale = { "sheets-table": {
|
|
3
3
|
columnPrefix: "Colonna",
|
|
4
4
|
tablePrefix: "Tabella",
|
|
5
|
+
moveTableOverlapError: "La destinazione si sovrappone a un’altra tabella.",
|
|
5
6
|
tableNameError: "Il nome della tabella non può contenere spazi, non può iniziare con un numero e non può essere identico a un nome di tabella esistente"
|
|
6
7
|
} };
|
|
7
8
|
|
package/lib/cjs/locale/ja-JP.js
CHANGED
package/lib/cjs/locale/ko-KR.js
CHANGED
package/lib/cjs/locale/pl-PL.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
const locale = { "sheets-table": {
|
|
3
3
|
columnPrefix: "Kolumna",
|
|
4
4
|
tablePrefix: "Tabela",
|
|
5
|
+
moveTableOverlapError: "Zakres docelowy nakłada się na inną tabelę.",
|
|
5
6
|
tableNameError: "Nazwa tabeli nie może zawierać spacji, nie może zaczynać się od cyfry i nie może być identyczna z istniejącą nazwą tabeli"
|
|
6
7
|
} };
|
|
7
8
|
|
package/lib/cjs/locale/pt-BR.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
const locale = { "sheets-table": {
|
|
3
3
|
columnPrefix: "Coluna",
|
|
4
4
|
tablePrefix: "Tabela",
|
|
5
|
+
moveTableOverlapError: "O destino se sobrepõe a outra tabela.",
|
|
5
6
|
tableNameError: "O nome da tabela não pode conter espaços, não pode começar com um número e não pode ser idêntico a um nome de tabela existente"
|
|
6
7
|
} };
|
|
7
8
|
|
package/lib/cjs/locale/ru-RU.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
const locale = { "sheets-table": {
|
|
3
3
|
columnPrefix: "Столбец",
|
|
4
4
|
tablePrefix: "Таблица",
|
|
5
|
+
moveTableOverlapError: "Диапазон назначения пересекается с другой таблицей.",
|
|
5
6
|
tableNameError: "Имя таблицы не может содержать пробелы, не может начинаться с цифры и не может совпадать с именем существующей таблицы"
|
|
6
7
|
} };
|
|
7
8
|
|
package/lib/cjs/locale/sk-SK.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
const locale = { "sheets-table": {
|
|
3
3
|
columnPrefix: "Stĺpec",
|
|
4
4
|
tablePrefix: "Tabuľka",
|
|
5
|
+
moveTableOverlapError: "Cieľový rozsah sa prekrýva s inou tabuľkou.",
|
|
5
6
|
tableNameError: "Názov tabuľky nesmie obsahovať medzery, nesmie začínať číslom a nesmie byť zhodný s existujúcim názvom tabuľky"
|
|
6
7
|
} };
|
|
7
8
|
|
package/lib/cjs/locale/vi-VN.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
const locale = { "sheets-table": {
|
|
3
3
|
columnPrefix: "Cột",
|
|
4
4
|
tablePrefix: "Bảng",
|
|
5
|
+
moveTableOverlapError: "Vùng đích chồng lấp với một bảng khác.",
|
|
5
6
|
tableNameError: "Tên bảng không thể chứa khoảng trắng, không được bắt đầu bằng số và không được trùng với tên bảng đã có"
|
|
6
7
|
} };
|
|
7
8
|
|
package/lib/cjs/locale/zh-CN.js
CHANGED
package/lib/cjs/locale/zh-HK.js
CHANGED