@univerjs/sheets 0.23.0 → 0.24.0-insiders.20260527-b1d726f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/facade.js +6 -46
- package/lib/cjs/index.js +74 -65
- package/lib/cjs/locale/ar-SA.js +52 -0
- package/lib/cjs/locale/ca-ES.js +36 -1
- package/lib/cjs/locale/de-DE.js +52 -0
- package/lib/cjs/locale/en-US.js +36 -1
- package/lib/cjs/locale/es-ES.js +36 -1
- package/lib/cjs/locale/fa-IR.js +36 -1
- package/lib/cjs/locale/fr-FR.js +36 -1
- package/lib/cjs/locale/id-ID.js +52 -0
- package/lib/cjs/locale/it-IT.js +52 -0
- package/lib/cjs/locale/ja-JP.js +36 -1
- package/lib/cjs/locale/ko-KR.js +36 -1
- package/lib/cjs/locale/pl-PL.js +52 -0
- package/lib/cjs/locale/pt-BR.js +52 -0
- package/lib/cjs/locale/ru-RU.js +36 -1
- package/lib/cjs/locale/sk-SK.js +36 -1
- package/lib/cjs/locale/vi-VN.js +36 -1
- package/lib/cjs/locale/zh-CN.js +36 -1
- package/lib/cjs/locale/zh-HK.js +52 -0
- package/lib/cjs/locale/zh-TW.js +36 -1
- package/lib/es/facade.js +7 -47
- package/lib/es/index.js +73 -66
- package/lib/es/locale/ar-SA.js +51 -0
- package/lib/es/locale/ca-ES.js +36 -1
- package/lib/es/locale/de-DE.js +51 -0
- package/lib/es/locale/en-US.js +36 -1
- package/lib/es/locale/es-ES.js +36 -1
- package/lib/es/locale/fa-IR.js +36 -1
- package/lib/es/locale/fr-FR.js +36 -1
- package/lib/es/locale/id-ID.js +51 -0
- package/lib/es/locale/it-IT.js +51 -0
- package/lib/es/locale/ja-JP.js +36 -1
- package/lib/es/locale/ko-KR.js +36 -1
- package/lib/es/locale/pl-PL.js +51 -0
- package/lib/es/locale/pt-BR.js +51 -0
- package/lib/es/locale/ru-RU.js +36 -1
- package/lib/es/locale/sk-SK.js +36 -1
- package/lib/es/locale/vi-VN.js +36 -1
- package/lib/es/locale/zh-CN.js +36 -1
- package/lib/es/locale/zh-HK.js +51 -0
- package/lib/es/locale/zh-TW.js +36 -1
- package/lib/facade.js +7 -47
- package/lib/index.js +73 -66
- package/lib/locale/ar-SA.js +51 -0
- package/lib/locale/ca-ES.js +36 -1
- package/lib/locale/de-DE.js +51 -0
- package/lib/locale/en-US.js +36 -1
- package/lib/locale/es-ES.js +36 -1
- package/lib/locale/fa-IR.js +36 -1
- package/lib/locale/fr-FR.js +36 -1
- package/lib/locale/id-ID.js +51 -0
- package/lib/locale/it-IT.js +51 -0
- package/lib/locale/ja-JP.js +36 -1
- package/lib/locale/ko-KR.js +36 -1
- package/lib/locale/pl-PL.js +51 -0
- package/lib/locale/pt-BR.js +51 -0
- package/lib/locale/ru-RU.js +36 -1
- package/lib/locale/sk-SK.js +36 -1
- package/lib/locale/vi-VN.js +36 -1
- package/lib/locale/zh-CN.js +36 -1
- package/lib/locale/zh-HK.js +51 -0
- package/lib/locale/zh-TW.js +36 -1
- package/lib/types/basics/utils.d.ts +2 -0
- package/lib/types/facade/f-worksheet.d.ts +3 -24
- package/lib/types/index.d.ts +8 -8
- package/lib/types/locale/ar-SA.d.ts +18 -0
- package/lib/types/locale/de-DE.d.ts +18 -0
- package/lib/types/locale/en-US.d.ts +39 -0
- package/lib/types/locale/id-ID.d.ts +18 -0
- package/lib/types/locale/it-IT.d.ts +18 -0
- package/lib/types/locale/pl-PL.d.ts +18 -0
- package/lib/types/locale/pt-BR.d.ts +18 -0
- package/lib/types/locale/zh-HK.d.ts +18 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +2 -2
- package/lib/umd/locale/ar-SA.js +1 -0
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -0
- 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 -0
- package/lib/umd/locale/it-IT.js +1 -0
- 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 -0
- package/lib/umd/locale/pt-BR.js +1 -0
- 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 -0
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +8 -8
- package/LICENSE +0 -176
- /package/lib/types/commands/commands/{set-border-command.d.ts → set-border.command.d.ts} +0 -0
- /package/lib/types/commands/mutations/{numfmt-mutation.d.ts → numfmt.mutation.d.ts} +0 -0
- /package/lib/types/commands/utils/{handle-range-mutation.d.ts → handle-range.mutation.d.ts} +0 -0
- /package/lib/types/services/exclusive-range/{exclusive-range-service.d.ts → exclusive-range.service.d.ts} +0 -0
- /package/lib/types/services/{range-theme-service.d.ts → range-theme.service.d.ts} +0 -0
package/lib/cjs/facade.js
CHANGED
|
@@ -74,13 +74,13 @@ function __decorate(decorators, target, key, desc) {
|
|
|
74
74
|
*/
|
|
75
75
|
function getDefinedNameFieldName(unitId, localeService, definedNamesService) {
|
|
76
76
|
const definedNameMap = definedNamesService.getDefinedNameMap(unitId);
|
|
77
|
-
if (definedNameMap == null) return localeService.t("definedName.defaultName") + 1;
|
|
77
|
+
if (definedNameMap == null) return localeService.t("sheets.definedName.defaultName") + 1;
|
|
78
78
|
const count = Array.from(Object.values(definedNameMap)).length + 1;
|
|
79
|
-
const name = localeService.t("definedName.defaultName") + count;
|
|
79
|
+
const name = localeService.t("sheets.definedName.defaultName") + count;
|
|
80
80
|
if (definedNamesService.getValueByName(unitId, name) == null) return name;
|
|
81
81
|
let i = count + 1;
|
|
82
82
|
while (true) {
|
|
83
|
-
const newName = localeService.t("definedName.defaultName") + i;
|
|
83
|
+
const newName = localeService.t("sheets.definedName.defaultName") + i;
|
|
84
84
|
if (definedNamesService.getValueByName(unitId, newName) == null) return newName;
|
|
85
85
|
i++;
|
|
86
86
|
}
|
|
@@ -3334,7 +3334,6 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
3334
3334
|
* Sets the frozen state of the current sheet.
|
|
3335
3335
|
* @param {IFreeze} freeze - the scrolling viewport start range and count of freezed rows and columns.
|
|
3336
3336
|
* that means if you want to freeze the first 3 rows and 2 columns, you should set freeze as { startRow: 3, startColumn: 2, xSplit: 2, ySplit: 3 }
|
|
3337
|
-
* @deprecated use `setFrozenRows` and `setFrozenColumns` instead.
|
|
3338
3337
|
* @returns {FWorksheet} This worksheet instance for chaining
|
|
3339
3338
|
* @example
|
|
3340
3339
|
* ```typescript
|
|
@@ -3349,7 +3348,6 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
3349
3348
|
* ```
|
|
3350
3349
|
*/
|
|
3351
3350
|
setFreeze(freeze) {
|
|
3352
|
-
this._logService.warn("setFreeze is deprecated, use setFrozenRows and setFrozenColumns instead");
|
|
3353
3351
|
this._commandService.syncExecuteCommand(_univerjs_sheets.SetFrozenCommand.id, {
|
|
3354
3352
|
...freeze,
|
|
3355
3353
|
unitId: this._workbook.getUnitId(),
|
|
@@ -3605,28 +3603,6 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
3605
3603
|
return this._worksheet.getTabColor();
|
|
3606
3604
|
}
|
|
3607
3605
|
/**
|
|
3608
|
-
* @deprecated use `univerAPI.addEvent(univerAPI.Event.SheetValueChanged, (params) => {})` instead
|
|
3609
|
-
*/
|
|
3610
|
-
onCellDataChange(callback) {
|
|
3611
|
-
return this._injector.get(_univerjs_core.ICommandService).onCommandExecuted((command) => {
|
|
3612
|
-
if (command.id === _univerjs_sheets.SetRangeValuesMutation.id) {
|
|
3613
|
-
const params = command.params;
|
|
3614
|
-
if (params.unitId === this._workbook.getUnitId() && params.subUnitId === this._worksheet.getSheetId() && params.cellValue) callback(new _univerjs_core.ObjectMatrix(params.cellValue));
|
|
3615
|
-
}
|
|
3616
|
-
});
|
|
3617
|
-
}
|
|
3618
|
-
/**
|
|
3619
|
-
* @deprecated use `univerAPI.addEvent(univerAPI.Event.BeforeSheetEditEnd, (params) => {})` instead
|
|
3620
|
-
*/
|
|
3621
|
-
onBeforeCellDataChange(callback) {
|
|
3622
|
-
return this._injector.get(_univerjs_core.ICommandService).beforeCommandExecuted((command) => {
|
|
3623
|
-
if (command.id === _univerjs_sheets.SetRangeValuesMutation.id) {
|
|
3624
|
-
const params = command.params;
|
|
3625
|
-
if (params.unitId === this._workbook.getUnitId() && params.subUnitId === this._worksheet.getSheetId() && params.cellValue) callback(new _univerjs_core.ObjectMatrix(params.cellValue));
|
|
3626
|
-
}
|
|
3627
|
-
});
|
|
3628
|
-
}
|
|
3629
|
-
/**
|
|
3630
3606
|
* Hides this sheet. Has no effect if the sheet is already hidden. If this method is called on the only visible sheet, it throws an exception.
|
|
3631
3607
|
* @returns {FWorksheet} Returns the current worksheet instance for method chaining
|
|
3632
3608
|
* @example
|
|
@@ -3822,7 +3798,7 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
3822
3798
|
}
|
|
3823
3799
|
/**
|
|
3824
3800
|
* Returns a Range corresponding to the dimensions in which data is present.
|
|
3825
|
-
*
|
|
3801
|
+
* Empty cells with style or formatting will also be included in the data range. If there is no data on the sheet, returns a Range corresponding to the top-left cell of the sheet (A1).
|
|
3826
3802
|
* @returns {FRange} The range of the data in the sheet.
|
|
3827
3803
|
* @example
|
|
3828
3804
|
* ```ts
|
|
@@ -3839,14 +3815,6 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
3839
3815
|
return this.getRange(startRow, startColumn, endRow - startRow + 1, endColumn - startColumn + 1);
|
|
3840
3816
|
}
|
|
3841
3817
|
/**
|
|
3842
|
-
* @deprecated use `getLastColumn` instead.
|
|
3843
|
-
* Returns the column index of the last column that contains content.
|
|
3844
|
-
* @returns {number} the column index of the last column that contains content.
|
|
3845
|
-
*/
|
|
3846
|
-
getLastColumns() {
|
|
3847
|
-
return this._worksheet.getLastColumnWithContent();
|
|
3848
|
-
}
|
|
3849
|
-
/**
|
|
3850
3818
|
* Returns the column index of the last column that contains content.
|
|
3851
3819
|
* @returns {number} the column index of the last column that contains content.
|
|
3852
3820
|
* @example
|
|
@@ -3863,14 +3831,6 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
3863
3831
|
return this._worksheet.getLastColumnWithContent();
|
|
3864
3832
|
}
|
|
3865
3833
|
/**
|
|
3866
|
-
* @deprecated use `getLastRow` instead.
|
|
3867
|
-
* Returns the row index of the last row that contains content.
|
|
3868
|
-
* @returns {number} the row index of the last row that contains content.
|
|
3869
|
-
*/
|
|
3870
|
-
getLastRows() {
|
|
3871
|
-
return this._worksheet.getLastRowWithContent();
|
|
3872
|
-
}
|
|
3873
|
-
/**
|
|
3874
3834
|
* Returns the row index of the last row that contains content.
|
|
3875
3835
|
* @returns {number} the row index of the last row that contains content.
|
|
3876
3836
|
* @example
|
|
@@ -7250,7 +7210,7 @@ let FWorkbook = class FWorkbook extends _univerjs_core_facade.FBaseInitialable {
|
|
|
7250
7210
|
*/
|
|
7251
7211
|
onSelectionChange(callback) {
|
|
7252
7212
|
return (0, _univerjs_core.toDisposable)(this._selectionManagerService.selectionMoveEnd$.subscribe((selections) => {
|
|
7253
|
-
if (this._univerInstanceService.
|
|
7213
|
+
if (this._univerInstanceService.getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_SHEET).getUnitId() !== this.id) return;
|
|
7254
7214
|
if (!(selections === null || selections === void 0 ? void 0 : selections.length)) callback([]);
|
|
7255
7215
|
else callback(selections.map((s) => s.range));
|
|
7256
7216
|
}));
|
|
@@ -8165,7 +8125,7 @@ var FUniverSheetsMixin = class extends _univerjs_core_facade.FUniver {
|
|
|
8165
8125
|
return this.createUniverSheet(data, options);
|
|
8166
8126
|
}
|
|
8167
8127
|
getActiveWorkbook() {
|
|
8168
|
-
const workbook = this._univerInstanceService.
|
|
8128
|
+
const workbook = this._univerInstanceService.getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_SHEET);
|
|
8169
8129
|
if (!workbook) return null;
|
|
8170
8130
|
return this._injector.createInstance(FWorkbook, workbook);
|
|
8171
8131
|
}
|
package/lib/cjs/index.js
CHANGED
|
@@ -1625,7 +1625,7 @@ const MoveRangeMutation = {
|
|
|
1625
1625
|
handler: (accessor, params) => {
|
|
1626
1626
|
const { from, to } = params;
|
|
1627
1627
|
if (!from || !to) return false;
|
|
1628
|
-
const workbook = accessor.get(_univerjs_core.IUniverInstanceService).
|
|
1628
|
+
const workbook = accessor.get(_univerjs_core.IUniverInstanceService).getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_SHEET);
|
|
1629
1629
|
if (!workbook) return false;
|
|
1630
1630
|
const fromWorksheet = workbook.getSheetBySheetId(params.from.subUnitId);
|
|
1631
1631
|
const toWorksheet = workbook.getSheetBySheetId(params.to.subUnitId);
|
|
@@ -3078,21 +3078,21 @@ function getSkeletonChangedEffectedRange(commandInfo, columnCount) {
|
|
|
3078
3078
|
//#endregion
|
|
3079
3079
|
//#region src/basics/defined-name-utils.ts
|
|
3080
3080
|
function validateDefinedName(name, options) {
|
|
3081
|
-
if (name.length === 0) return "definedName.nameEmpty";
|
|
3081
|
+
if (name.length === 0) return "sheets.definedName.nameEmpty";
|
|
3082
3082
|
const { unitId, formulaOrRefString, univerInstanceService, definedNamesService, superTableService, functionService, id } = options;
|
|
3083
3083
|
/**
|
|
3084
3084
|
* The defined name can't be duplicate with existing defined names.
|
|
3085
3085
|
* If id is provided, it means we are updating an existing defined name. We should allow the name to be the same as itself.
|
|
3086
3086
|
*/
|
|
3087
3087
|
const existingDefinedName = definedNamesService.getValueByName(unitId, name);
|
|
3088
|
-
if (existingDefinedName && (id === null || id === void 0 || id.length === 0 || existingDefinedName.id !== id)) return "definedName.nameDuplicate";
|
|
3089
|
-
if (superTableService.hasTable(unitId, name)) return "definedName.nameDuplicate";
|
|
3090
|
-
if (!_univerjs_core.Tools.isValidParameter(name) || (0, _univerjs_engine_formula.isReferenceStringWithEffectiveColumn)(name) || !_univerjs_core.Tools.isStartValidPosition(name) && !(0, _univerjs_engine_render.hasCJKText)(name.substring(0, 1))) return "definedName.nameInvalid";
|
|
3088
|
+
if (existingDefinedName && (id === null || id === void 0 || id.length === 0 || existingDefinedName.id !== id)) return "sheets.definedName.nameDuplicate";
|
|
3089
|
+
if (superTableService.hasTable(unitId, name)) return "sheets.definedName.nameDuplicate";
|
|
3090
|
+
if (!_univerjs_core.Tools.isValidParameter(name) || (0, _univerjs_engine_formula.isReferenceStringWithEffectiveColumn)(name) || !_univerjs_core.Tools.isStartValidPosition(name) && !(0, _univerjs_engine_render.hasCJKText)(name.substring(0, 1))) return "sheets.definedName.nameInvalid";
|
|
3091
3091
|
const workbook = univerInstanceService.getUnit(unitId, _univerjs_core.UniverInstanceType.UNIVER_SHEET);
|
|
3092
3092
|
if (!workbook) throw new Error(`Workbook not found for unitId: ${unitId}`);
|
|
3093
|
-
if (workbook.getSheets().some((sheet) => sheet.getName() === name)) return "definedName.nameSheetConflict";
|
|
3094
|
-
if (formulaOrRefString.length === 0) return "definedName.formulaOrRefStringEmpty";
|
|
3095
|
-
if (functionService.hasExecutor(name.toUpperCase())) return "definedName.nameConflict";
|
|
3093
|
+
if (workbook.getSheets().some((sheet) => sheet.getName() === name)) return "sheets.definedName.nameSheetConflict";
|
|
3094
|
+
if (formulaOrRefString.length === 0) return "sheets.definedName.formulaOrRefStringEmpty";
|
|
3095
|
+
if (functionService.hasExecutor(name.toUpperCase())) return "sheets.definedName.nameConflict";
|
|
3096
3096
|
return true;
|
|
3097
3097
|
}
|
|
3098
3098
|
|
|
@@ -3689,14 +3689,11 @@ function getDelimiterRegexItem(delimiter, treatMultipleDelimitersAsOne, customDe
|
|
|
3689
3689
|
if ((delimiter & 4) > 0) delimiterList.push(";");
|
|
3690
3690
|
if ((delimiter & 8) > 0) delimiterList.push(" ");
|
|
3691
3691
|
let str = "";
|
|
3692
|
-
for (const delimiter of delimiterList) str += escapeRegExp(delimiter);
|
|
3692
|
+
for (const delimiter of delimiterList) str += (0, _univerjs_core.escapeRegExp)(delimiter);
|
|
3693
3693
|
let allStr = "[".concat(str, "]");
|
|
3694
3694
|
if (treatMultipleDelimitersAsOne) allStr += "+";
|
|
3695
3695
|
return new RegExp(allStr);
|
|
3696
3696
|
}
|
|
3697
|
-
function escapeRegExp(str) {
|
|
3698
|
-
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
3699
|
-
}
|
|
3700
3697
|
const getStringFromDataStream = (data) => {
|
|
3701
3698
|
var _data$body;
|
|
3702
3699
|
return ((_data$body = data.body) === null || _data$body === void 0 ? void 0 : _data$body.dataStream.replace(/\r\n$/, "")) || "";
|
|
@@ -3839,7 +3836,7 @@ function discreteRangeToRange(discreteRange) {
|
|
|
3839
3836
|
}
|
|
3840
3837
|
function rangeToDiscreteRange(range, accessor, unitId, subUnitId) {
|
|
3841
3838
|
const univerInstanceService = accessor.get(_univerjs_core.IUniverInstanceService);
|
|
3842
|
-
const workbook = unitId ? univerInstanceService.getUnit(unitId, _univerjs_core.UniverInstanceType.UNIVER_SHEET) : univerInstanceService.
|
|
3839
|
+
const workbook = unitId ? univerInstanceService.getUnit(unitId, _univerjs_core.UniverInstanceType.UNIVER_SHEET) : univerInstanceService.getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_SHEET);
|
|
3843
3840
|
const worksheet = subUnitId ? workbook === null || workbook === void 0 ? void 0 : workbook.getSheetBySheetId(subUnitId) : workbook === null || workbook === void 0 ? void 0 : workbook.getActiveSheet();
|
|
3844
3841
|
if (!worksheet) return null;
|
|
3845
3842
|
const { startRow, endRow, startColumn, endColumn } = range;
|
|
@@ -3889,6 +3886,16 @@ function getVisibleRanges(ranges, accessor, unitId, subUnitId) {
|
|
|
3889
3886
|
}
|
|
3890
3887
|
return visibleRanges;
|
|
3891
3888
|
}
|
|
3889
|
+
function serializeListOptions(options) {
|
|
3890
|
+
return JSON.stringify(options.filter(Boolean));
|
|
3891
|
+
}
|
|
3892
|
+
function deserializeListOptions(optionsStr) {
|
|
3893
|
+
try {
|
|
3894
|
+
const options = JSON.parse(optionsStr);
|
|
3895
|
+
if (Array.isArray(options) && options.every((option) => typeof option === "string")) return options.filter(Boolean);
|
|
3896
|
+
} catch {}
|
|
3897
|
+
return optionsStr.split(",").filter(Boolean);
|
|
3898
|
+
}
|
|
3892
3899
|
|
|
3893
3900
|
//#endregion
|
|
3894
3901
|
//#region src/model/range-protection-rule.model.ts
|
|
@@ -4266,7 +4273,7 @@ var WorkbookSelectionModel = class extends _univerjs_core.Disposable {
|
|
|
4266
4273
|
//#region src/services/selections/selection.service.ts
|
|
4267
4274
|
let SheetsSelectionsService = class SheetsSelectionsService extends _univerjs_core.RxDisposable {
|
|
4268
4275
|
get _currentSelectionPos() {
|
|
4269
|
-
const workbook = this._instanceSrv.
|
|
4276
|
+
const workbook = this._instanceSrv.getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_SHEET);
|
|
4270
4277
|
if (!workbook) return null;
|
|
4271
4278
|
const worksheet = workbook.getActiveSheet();
|
|
4272
4279
|
return {
|
|
@@ -4447,7 +4454,7 @@ let SheetsSelectionsService = class SheetsSelectionsService extends _univerjs_co
|
|
|
4447
4454
|
*/
|
|
4448
4455
|
getCellStylesProperty(property) {
|
|
4449
4456
|
var _this$_instanceSrv$ge;
|
|
4450
|
-
const worksheet = (_this$_instanceSrv$ge = this._instanceSrv.
|
|
4457
|
+
const worksheet = (_this$_instanceSrv$ge = this._instanceSrv.getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_SHEET)) === null || _this$_instanceSrv$ge === void 0 ? void 0 : _this$_instanceSrv$ge.getActiveSheet();
|
|
4451
4458
|
const selections = this.getCurrentSelections();
|
|
4452
4459
|
if (!worksheet || selections.length === 0) return {
|
|
4453
4460
|
isAllValuesSame: false,
|
|
@@ -5374,7 +5381,7 @@ const SetRangeValuesCommand = {
|
|
|
5374
5381
|
};
|
|
5375
5382
|
|
|
5376
5383
|
//#endregion
|
|
5377
|
-
//#region src/commands/utils/handle-range
|
|
5384
|
+
//#region src/commands/utils/handle-range.mutation.ts
|
|
5378
5385
|
/**
|
|
5379
5386
|
* InsertRange is not a mutation but combination of `SetRangeValuesMutation` and `MoveRangeMutation`.
|
|
5380
5387
|
* @param accessor
|
|
@@ -8582,7 +8589,7 @@ let MergeCellController = class MergeCellController extends _univerjs_core.Dispo
|
|
|
8582
8589
|
case ClearSelectionAllCommand.id:
|
|
8583
8590
|
case ClearSelectionFormatCommand.id: {
|
|
8584
8591
|
var _self$_selectionManag;
|
|
8585
|
-
const workbook = self._univerInstanceService.
|
|
8592
|
+
const workbook = self._univerInstanceService.getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_SHEET);
|
|
8586
8593
|
const unitId = workbook.getUnitId();
|
|
8587
8594
|
const worksheet = workbook === null || workbook === void 0 ? void 0 : workbook.getActiveSheet();
|
|
8588
8595
|
if (!worksheet) return {
|
|
@@ -9532,7 +9539,7 @@ MergeCellController = __decorate([
|
|
|
9532
9539
|
], MergeCellController);
|
|
9533
9540
|
function getWorkbook(univerInstanceService, unitId) {
|
|
9534
9541
|
if (unitId) return univerInstanceService.getUniverSheetInstance(unitId);
|
|
9535
|
-
return univerInstanceService.
|
|
9542
|
+
return univerInstanceService.getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_SHEET);
|
|
9536
9543
|
}
|
|
9537
9544
|
function getWorksheet(workbook, subUnitId) {
|
|
9538
9545
|
if (subUnitId) return workbook.getSheetBySheetId(subUnitId);
|
|
@@ -9806,10 +9813,10 @@ const AddWorksheetMergeCommand = {
|
|
|
9806
9813
|
const localeService = accessor.get(_univerjs_core.LocaleService);
|
|
9807
9814
|
if (!await confirmService.confirm({
|
|
9808
9815
|
id: "merge.confirm.add-worksheet-merge",
|
|
9809
|
-
title: { title: "merge.confirm.warning" },
|
|
9810
|
-
children: { title: "merge.confirm.title" },
|
|
9811
|
-
cancelText: localeService.t("merge.confirm.cancel"),
|
|
9812
|
-
confirmText: localeService.t("merge.confirm.confirm")
|
|
9816
|
+
title: { title: "sheets.merge.confirm.warning" },
|
|
9817
|
+
children: { title: "sheets.merge.confirm.title" },
|
|
9818
|
+
cancelText: localeService.t("sheets.merge.confirm.cancel"),
|
|
9819
|
+
confirmText: localeService.t("sheets.merge.confirm.confirm")
|
|
9813
9820
|
})) return false;
|
|
9814
9821
|
}
|
|
9815
9822
|
const redoMutations = [];
|
|
@@ -11746,22 +11753,22 @@ let AutoFillService = class AutoFillService extends _univerjs_core.Disposable {
|
|
|
11746
11753
|
_defineProperty(this, "applyType$", this._applyType$.asObservable());
|
|
11747
11754
|
_defineProperty(this, "_menu$", new rxjs.BehaviorSubject([
|
|
11748
11755
|
{
|
|
11749
|
-
label: "autoFill.copy",
|
|
11756
|
+
label: "sheets.autoFill.copy",
|
|
11750
11757
|
value: "COPY",
|
|
11751
11758
|
disable: false
|
|
11752
11759
|
},
|
|
11753
11760
|
{
|
|
11754
|
-
label: "autoFill.series",
|
|
11761
|
+
label: "sheets.autoFill.series",
|
|
11755
11762
|
value: "SERIES",
|
|
11756
11763
|
disable: false
|
|
11757
11764
|
},
|
|
11758
11765
|
{
|
|
11759
|
-
label: "autoFill.formatOnly",
|
|
11766
|
+
label: "sheets.autoFill.formatOnly",
|
|
11760
11767
|
value: "ONLY_FORMAT",
|
|
11761
11768
|
disable: false
|
|
11762
11769
|
},
|
|
11763
11770
|
{
|
|
11764
|
-
label: "autoFill.noFormat",
|
|
11771
|
+
label: "sheets.autoFill.noFormat",
|
|
11765
11772
|
value: "NO_FORMAT",
|
|
11766
11773
|
disable: false
|
|
11767
11774
|
}
|
|
@@ -13094,7 +13101,7 @@ var BorderStyleManagerService = class {
|
|
|
13094
13101
|
};
|
|
13095
13102
|
|
|
13096
13103
|
//#endregion
|
|
13097
|
-
//#region src/commands/commands/set-border
|
|
13104
|
+
//#region src/commands/commands/set-border.command.ts
|
|
13098
13105
|
function forEach(range, action) {
|
|
13099
13106
|
const { startRow, startColumn, endRow, endColumn } = range;
|
|
13100
13107
|
for (let i = startRow; i <= endRow; i++) for (let j = startColumn; j <= endColumn; j++) action(i, j);
|
|
@@ -16763,7 +16770,7 @@ const SplitTextToColumnsCommand = {
|
|
|
16763
16770
|
const INumfmtService = (0, _univerjs_core.createIdentifier)("INumfmtService");
|
|
16764
16771
|
|
|
16765
16772
|
//#endregion
|
|
16766
|
-
//#region src/commands/mutations/numfmt
|
|
16773
|
+
//#region src/commands/mutations/numfmt.mutation.ts
|
|
16767
16774
|
const factorySetNumfmtUndoMutation = (accessor, option) => {
|
|
16768
16775
|
const numfmtService = accessor.get(INumfmtService);
|
|
16769
16776
|
const { values, unitId, subUnitId } = option;
|
|
@@ -17886,14 +17893,14 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
17886
17893
|
params = commandInfo.params;
|
|
17887
17894
|
if ((0, _univerjs_core.isICellData)(params.value) && params.value.f) {
|
|
17888
17895
|
permission = this._permissionCheckWithFormula(params);
|
|
17889
|
-
errorMsg = this._localeService.t("permission.dialog.formulaErr");
|
|
17896
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.formulaErr");
|
|
17890
17897
|
} else {
|
|
17891
17898
|
permission = this._permissionCheckBySetRangeValue({
|
|
17892
17899
|
workbookTypes: [WorkbookEditablePermission],
|
|
17893
17900
|
worksheetTypes: [WorksheetSetCellValuePermission, WorksheetEditPermission],
|
|
17894
17901
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
17895
17902
|
}, params);
|
|
17896
|
-
errorMsg = this._localeService.t("permission.dialog.editErr");
|
|
17903
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.editErr");
|
|
17897
17904
|
}
|
|
17898
17905
|
break;
|
|
17899
17906
|
case SetStyleCommand.id:
|
|
@@ -17903,7 +17910,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
17903
17910
|
worksheetTypes: [WorksheetSetCellStylePermission, WorksheetEditPermission],
|
|
17904
17911
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
17905
17912
|
}, params.range ? [params.range] : void 0, params.unitId, params.subUnitId);
|
|
17906
|
-
errorMsg = this._localeService.t("permission.dialog.setStyleErr");
|
|
17913
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.setStyleErr");
|
|
17907
17914
|
break;
|
|
17908
17915
|
case SetBorderCommand.id:
|
|
17909
17916
|
params = commandInfo.params;
|
|
@@ -17912,7 +17919,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
17912
17919
|
worksheetTypes: [WorksheetSetCellStylePermission, WorksheetEditPermission],
|
|
17913
17920
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
17914
17921
|
}, params === null || params === void 0 ? void 0 : params.ranges, params === null || params === void 0 ? void 0 : params.unitId, params === null || params === void 0 ? void 0 : params.subUnitId);
|
|
17915
|
-
errorMsg = this._localeService.t("permission.dialog.setStyleErr");
|
|
17922
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.setStyleErr");
|
|
17916
17923
|
break;
|
|
17917
17924
|
case ClearSelectionAllCommand.id:
|
|
17918
17925
|
params = commandInfo.params;
|
|
@@ -17925,7 +17932,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
17925
17932
|
],
|
|
17926
17933
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
17927
17934
|
}, params === null || params === void 0 ? void 0 : params.ranges, params === null || params === void 0 ? void 0 : params.unitId, params === null || params === void 0 ? void 0 : params.subUnitId);
|
|
17928
|
-
errorMsg = this._localeService.t("permission.dialog.editErr");
|
|
17935
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.editErr");
|
|
17929
17936
|
break;
|
|
17930
17937
|
case ClearSelectionContentCommand.id:
|
|
17931
17938
|
params = commandInfo.params;
|
|
@@ -17934,7 +17941,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
17934
17941
|
worksheetTypes: [WorksheetSetCellValuePermission, WorksheetEditPermission],
|
|
17935
17942
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
17936
17943
|
}, params === null || params === void 0 ? void 0 : params.ranges, params === null || params === void 0 ? void 0 : params.unitId, params === null || params === void 0 ? void 0 : params.subUnitId);
|
|
17937
|
-
errorMsg = this._localeService.t("permission.dialog.editErr");
|
|
17944
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.editErr");
|
|
17938
17945
|
break;
|
|
17939
17946
|
case ClearSelectionFormatCommand.id:
|
|
17940
17947
|
params = commandInfo.params;
|
|
@@ -17943,43 +17950,43 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
17943
17950
|
worksheetTypes: [WorksheetSetCellStylePermission, WorksheetEditPermission],
|
|
17944
17951
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
17945
17952
|
}, params === null || params === void 0 ? void 0 : params.ranges, params === null || params === void 0 ? void 0 : params.unitId, params === null || params === void 0 ? void 0 : params.subUnitId);
|
|
17946
|
-
errorMsg = this._localeService.t("permission.dialog.setStyleErr");
|
|
17953
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.setStyleErr");
|
|
17947
17954
|
break;
|
|
17948
17955
|
case DeltaColumnWidthCommand.id:
|
|
17949
17956
|
permission = this.permissionCheckWithoutRange({ worksheetTypes: [WorksheetSetColumnStylePermission] });
|
|
17950
|
-
errorMsg = this._localeService.t("permission.dialog.setRowColStyleErr");
|
|
17957
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.setRowColStyleErr");
|
|
17951
17958
|
break;
|
|
17952
17959
|
case SetColWidthCommand.id:
|
|
17953
17960
|
params = commandInfo.params;
|
|
17954
17961
|
permission = this.permissionCheckWithoutRange({ worksheetTypes: [WorksheetSetColumnStylePermission] }, params.unitId, params.subUnitId);
|
|
17955
|
-
errorMsg = this._localeService.t("permission.dialog.setRowColStyleErr");
|
|
17962
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.setRowColStyleErr");
|
|
17956
17963
|
break;
|
|
17957
17964
|
case DeltaRowHeightCommand.id:
|
|
17958
17965
|
permission = this.permissionCheckWithoutRange({ worksheetTypes: [WorksheetSetRowStylePermission] });
|
|
17959
|
-
errorMsg = this._localeService.t("permission.dialog.setRowColStyleErr");
|
|
17966
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.setRowColStyleErr");
|
|
17960
17967
|
break;
|
|
17961
17968
|
case SetRowHeightCommand.id:
|
|
17962
17969
|
case SetWorksheetRowIsAutoHeightCommand.id:
|
|
17963
17970
|
params = commandInfo.params;
|
|
17964
17971
|
permission = this.permissionCheckWithoutRange({ worksheetTypes: [WorksheetSetRowStylePermission] }, params.unitId, params.subUnitId);
|
|
17965
|
-
errorMsg = this._localeService.t("permission.dialog.setRowColStyleErr");
|
|
17972
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.setRowColStyleErr");
|
|
17966
17973
|
break;
|
|
17967
17974
|
case MoveRowsCommand.id:
|
|
17968
17975
|
case MoveColsCommand.id:
|
|
17969
17976
|
params = commandInfo.params;
|
|
17970
17977
|
permission = this._permissionCheckByMoveRowsColsCommand(params);
|
|
17971
|
-
errorMsg = this._localeService.t("permission.dialog.moveRowColErr");
|
|
17978
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.moveRowColErr");
|
|
17972
17979
|
break;
|
|
17973
17980
|
case MoveRangeCommand.id:
|
|
17974
17981
|
params = commandInfo.params;
|
|
17975
17982
|
permission = this._permissionCheckByMoveRangeCommand(params);
|
|
17976
|
-
errorMsg = this._localeService.t("permission.dialog.moveRangeErr");
|
|
17983
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.moveRangeErr");
|
|
17977
17984
|
break;
|
|
17978
17985
|
case InsertRowByRangeCommand.id:
|
|
17979
17986
|
case InsertColByRangeCommand.id:
|
|
17980
17987
|
params = commandInfo.params;
|
|
17981
17988
|
permission = this._permissionCheckByInsertRowColCommand(params);
|
|
17982
|
-
errorMsg = this._localeService.t("permission.dialog.insertRowColErr");
|
|
17989
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.insertRowColErr");
|
|
17983
17990
|
break;
|
|
17984
17991
|
case RemoveRowByRangeCommand.id:
|
|
17985
17992
|
params = commandInfo.params;
|
|
@@ -17988,7 +17995,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
17988
17995
|
worksheetTypes: [WorksheetEditPermission, WorksheetDeleteRowPermission],
|
|
17989
17996
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
17990
17997
|
}, [params.range], params.unitId, params.subUnitId);
|
|
17991
|
-
errorMsg = this._localeService.t("permission.dialog.removeRowColErr");
|
|
17998
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.removeRowColErr");
|
|
17992
17999
|
break;
|
|
17993
18000
|
case RemoveColByRangeCommand.id:
|
|
17994
18001
|
params = commandInfo.params;
|
|
@@ -17997,22 +18004,22 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
17997
18004
|
worksheetTypes: [WorksheetEditPermission, WorksheetDeleteColumnPermission],
|
|
17998
18005
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
17999
18006
|
}, [params.range], params.unitId, params.subUnitId);
|
|
18000
|
-
errorMsg = this._localeService.t("permission.dialog.removeRowColErr");
|
|
18007
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.removeRowColErr");
|
|
18001
18008
|
break;
|
|
18002
18009
|
case SetWorksheetOrderCommand.id:
|
|
18003
18010
|
params = commandInfo.params;
|
|
18004
18011
|
permission = this._permissionCheckByWorksheetCommand([WorkbookEditablePermission, WorkbookMoveSheetPermission], params);
|
|
18005
|
-
errorMsg = this._localeService.t("permission.dialog.operatorSheetErr");
|
|
18012
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.operatorSheetErr");
|
|
18006
18013
|
break;
|
|
18007
18014
|
case SetWorksheetNameCommand.id:
|
|
18008
18015
|
params = commandInfo.params;
|
|
18009
18016
|
permission = this._permissionCheckByWorksheetCommand([WorkbookEditablePermission, WorkbookRenameSheetPermission], params);
|
|
18010
|
-
errorMsg = this._localeService.t("permission.dialog.operatorSheetErr");
|
|
18017
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.operatorSheetErr");
|
|
18011
18018
|
break;
|
|
18012
18019
|
case SetWorksheetShowCommand.id:
|
|
18013
18020
|
params = commandInfo.params;
|
|
18014
18021
|
permission = this._permissionCheckByWorksheetCommand([WorkbookEditablePermission, WorkbookHideSheetPermission], params);
|
|
18015
|
-
errorMsg = this._localeService.t("permission.dialog.operatorSheetErr");
|
|
18022
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.operatorSheetErr");
|
|
18016
18023
|
break;
|
|
18017
18024
|
case SetSpecificColsVisibleCommand.id:
|
|
18018
18025
|
params = commandInfo.params;
|
|
@@ -18021,7 +18028,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
18021
18028
|
worksheetTypes: [WorksheetEditPermission, WorksheetSetColumnStylePermission],
|
|
18022
18029
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
18023
18030
|
}, params.ranges, params.unitId, params.subUnitId);
|
|
18024
|
-
errorMsg = this._localeService.t("permission.dialog.setRowColStyleErr");
|
|
18031
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.setRowColStyleErr");
|
|
18025
18032
|
break;
|
|
18026
18033
|
case SetSpecificRowsVisibleCommand.id:
|
|
18027
18034
|
params = commandInfo.params;
|
|
@@ -18030,7 +18037,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
18030
18037
|
worksheetTypes: [WorksheetEditPermission, WorksheetSetRowStylePermission],
|
|
18031
18038
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
18032
18039
|
}, params.ranges, params.unitId, params.subUnitId);
|
|
18033
|
-
errorMsg = this._localeService.t("permission.dialog.setRowColStyleErr");
|
|
18040
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.setRowColStyleErr");
|
|
18034
18041
|
break;
|
|
18035
18042
|
case SetSelectedColsVisibleCommand.id:
|
|
18036
18043
|
permission = this.permissionCheckWithRanges({
|
|
@@ -18038,7 +18045,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
18038
18045
|
worksheetTypes: [WorksheetEditPermission, WorksheetSetColumnStylePermission],
|
|
18039
18046
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
18040
18047
|
});
|
|
18041
|
-
errorMsg = this._localeService.t("permission.dialog.setRowColStyleErr");
|
|
18048
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.setRowColStyleErr");
|
|
18042
18049
|
break;
|
|
18043
18050
|
case SetSelectedRowsVisibleCommand.id:
|
|
18044
18051
|
permission = this.permissionCheckWithRanges({
|
|
@@ -18046,27 +18053,27 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
18046
18053
|
worksheetTypes: [WorksheetEditPermission, WorksheetSetRowStylePermission],
|
|
18047
18054
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
18048
18055
|
});
|
|
18049
|
-
errorMsg = this._localeService.t("permission.dialog.setRowColStyleErr");
|
|
18056
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.setRowColStyleErr");
|
|
18050
18057
|
break;
|
|
18051
18058
|
case InsertRangeMoveRightCommand.id:
|
|
18052
18059
|
params = commandInfo.params;
|
|
18053
18060
|
permission = this._permissionCheckWithInsertOrDeleteMoveRange("right", params);
|
|
18054
|
-
errorMsg = this._localeService.t("permission.dialog.insertOrDeleteMoveRangeErr");
|
|
18061
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.insertOrDeleteMoveRangeErr");
|
|
18055
18062
|
break;
|
|
18056
18063
|
case InsertRangeMoveDownCommand.id:
|
|
18057
18064
|
params = commandInfo.params;
|
|
18058
18065
|
permission = this._permissionCheckWithInsertOrDeleteMoveRange("down", params);
|
|
18059
|
-
errorMsg = this._localeService.t("permission.dialog.insertOrDeleteMoveRangeErr");
|
|
18066
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.insertOrDeleteMoveRangeErr");
|
|
18060
18067
|
break;
|
|
18061
18068
|
case DeleteRangeMoveLeftCommand.id:
|
|
18062
18069
|
params = commandInfo.params;
|
|
18063
18070
|
permission = this._permissionCheckWithInsertOrDeleteMoveRange("left", params);
|
|
18064
|
-
errorMsg = this._localeService.t("permission.dialog.insertOrDeleteMoveRangeErr");
|
|
18071
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.insertOrDeleteMoveRangeErr");
|
|
18065
18072
|
break;
|
|
18066
18073
|
case DeleteRangeMoveUpCommand.id:
|
|
18067
18074
|
params = commandInfo.params;
|
|
18068
18075
|
permission = this._permissionCheckWithInsertOrDeleteMoveRange("up", params);
|
|
18069
|
-
errorMsg = this._localeService.t("permission.dialog.insertOrDeleteMoveRangeErr");
|
|
18076
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.insertOrDeleteMoveRangeErr");
|
|
18070
18077
|
break;
|
|
18071
18078
|
case AutoFillCommand.id:
|
|
18072
18079
|
params = commandInfo.params;
|
|
@@ -18075,7 +18082,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
18075
18082
|
worksheetTypes: [WorksheetSetCellValuePermission, WorksheetEditPermission],
|
|
18076
18083
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
18077
18084
|
}, [params.targetRange], params.unitId, params.subUnitId);
|
|
18078
|
-
errorMsg = this._localeService.t("permission.dialog.autoFillErr");
|
|
18085
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.autoFillErr");
|
|
18079
18086
|
break;
|
|
18080
18087
|
case InsertDefinedNameCommand.id:
|
|
18081
18088
|
case SetDefinedNameCommand.id:
|
|
@@ -18086,7 +18093,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
18086
18093
|
workbookTypes: [WorkbookEditablePermission],
|
|
18087
18094
|
worksheetTypes: [WorksheetEditPermission]
|
|
18088
18095
|
}, params.unitId, params.localSheetId);
|
|
18089
|
-
errorMsg = this._localeService.t("permission.dialog.editErr");
|
|
18096
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.editErr");
|
|
18090
18097
|
break;
|
|
18091
18098
|
default: break;
|
|
18092
18099
|
}
|
|
@@ -18524,7 +18531,7 @@ let SheetPermissionInitController = class SheetPermissionInitController extends
|
|
|
18524
18531
|
}
|
|
18525
18532
|
async initWorkbookPermissionChange(_unitId) {
|
|
18526
18533
|
var _this$_univerInstance;
|
|
18527
|
-
const unitId = _unitId || ((_this$_univerInstance = this._univerInstanceService.
|
|
18534
|
+
const unitId = _unitId || ((_this$_univerInstance = this._univerInstanceService.getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_SHEET)) === null || _this$_univerInstance === void 0 ? void 0 : _this$_univerInstance.getUnitId());
|
|
18528
18535
|
if (!unitId) return;
|
|
18529
18536
|
return this._authzIoService.allowed({
|
|
18530
18537
|
objectID: unitId,
|
|
@@ -19223,7 +19230,7 @@ RangeProtectionCache = __decorate([
|
|
|
19223
19230
|
//#endregion
|
|
19224
19231
|
//#region package.json
|
|
19225
19232
|
var name = "@univerjs/sheets";
|
|
19226
|
-
var version = "0.
|
|
19233
|
+
var version = "0.24.0-insiders.20260527-b1d726f";
|
|
19227
19234
|
|
|
19228
19235
|
//#endregion
|
|
19229
19236
|
//#region src/controllers/active-worksheet.controller.ts
|
|
@@ -19701,8 +19708,8 @@ SheetPermissionViewModelController = __decorate([
|
|
|
19701
19708
|
], SheetPermissionViewModelController);
|
|
19702
19709
|
|
|
19703
19710
|
//#endregion
|
|
19704
|
-
//#region src/services/exclusive-range/exclusive-range
|
|
19705
|
-
const IExclusiveRangeService = (0, _univerjs_core.createIdentifier)("univer.exclusive-range
|
|
19711
|
+
//#region src/services/exclusive-range/exclusive-range.service.ts
|
|
19712
|
+
const IExclusiveRangeService = (0, _univerjs_core.createIdentifier)("univer.exclusive-range.service");
|
|
19706
19713
|
var ExclusiveRangeService = class extends _univerjs_core.Disposable {
|
|
19707
19714
|
constructor(..._args) {
|
|
19708
19715
|
super(..._args);
|
|
@@ -19883,7 +19890,7 @@ let RangeProtectionRefRangeService = class RangeProtectionRefRangeService extend
|
|
|
19883
19890
|
}
|
|
19884
19891
|
_onRefRangeChange() {
|
|
19885
19892
|
const registerRefRange = (unitId, subUnitId) => {
|
|
19886
|
-
const workbook = this._univerInstanceService.
|
|
19893
|
+
const workbook = this._univerInstanceService.getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_SHEET);
|
|
19887
19894
|
if (!workbook) return;
|
|
19888
19895
|
if (!(workbook === null || workbook === void 0 ? void 0 : workbook.getSheetBySheetId(subUnitId))) return;
|
|
19889
19896
|
this.disposableCollection.dispose();
|
|
@@ -19912,7 +19919,7 @@ let RangeProtectionRefRangeService = class RangeProtectionRefRangeService extend
|
|
|
19912
19919
|
registerRefRange(unitId, subUnitId);
|
|
19913
19920
|
}
|
|
19914
19921
|
}));
|
|
19915
|
-
const workbook = this._univerInstanceService.
|
|
19922
|
+
const workbook = this._univerInstanceService.getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_SHEET);
|
|
19916
19923
|
if (workbook) {
|
|
19917
19924
|
const sheet = workbook.getActiveSheet();
|
|
19918
19925
|
if (!sheet) return;
|
|
@@ -20284,7 +20291,7 @@ let RangeProtectionRefRangeService = class RangeProtectionRefRangeService extend
|
|
|
20284
20291
|
this.disposeWithMe(this._commandService.onCommandExecuted((command) => {
|
|
20285
20292
|
if (mutationIdArrByMove.includes(command.id)) {
|
|
20286
20293
|
if (!command.params) return;
|
|
20287
|
-
const workbook = this._univerInstanceService.
|
|
20294
|
+
const workbook = this._univerInstanceService.getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_SHEET);
|
|
20288
20295
|
if (!workbook) return;
|
|
20289
20296
|
const worksheet = workbook.getSheetBySheetId(command.params.subUnitId);
|
|
20290
20297
|
if (!worksheet) return;
|
|
@@ -20563,7 +20570,7 @@ RangeProtectionService = __decorate([
|
|
|
20563
20570
|
], RangeProtectionService);
|
|
20564
20571
|
|
|
20565
20572
|
//#endregion
|
|
20566
|
-
//#region src/services/range-theme
|
|
20573
|
+
//#region src/services/range-theme.service.ts
|
|
20567
20574
|
let SheetRangeThemeService = class SheetRangeThemeService extends _univerjs_core.Disposable {
|
|
20568
20575
|
constructor(_sheetRangeThemeModel) {
|
|
20569
20576
|
super();
|
|
@@ -21678,6 +21685,7 @@ exports.createTopMatrixFromRanges = createTopMatrixFromRanges;
|
|
|
21678
21685
|
exports.defaultLargeSheetOperationConfig = defaultLargeSheetOperationConfig;
|
|
21679
21686
|
exports.defaultWorkbookPermissionPoints = defaultWorkbookPermissionPoints;
|
|
21680
21687
|
exports.defaultWorksheetPermissionPoint = defaultWorksheetPermissionPoint;
|
|
21688
|
+
exports.deserializeListOptions = deserializeListOptions;
|
|
21681
21689
|
exports.discreteRangeToRange = discreteRangeToRange;
|
|
21682
21690
|
exports.expandToContinuousRange = expandToContinuousRange;
|
|
21683
21691
|
exports.factoryRemoveNumfmtUndoMutation = factoryRemoveNumfmtUndoMutation;
|
|
@@ -21735,6 +21743,7 @@ exports.rangeMerge = rangeMerge;
|
|
|
21735
21743
|
exports.rangeToDiscreteRange = rangeToDiscreteRange;
|
|
21736
21744
|
exports.rotateRange = rotateRange;
|
|
21737
21745
|
exports.runRefRangeMutations = runRefRangeMutations;
|
|
21746
|
+
exports.serializeListOptions = serializeListOptions;
|
|
21738
21747
|
exports.setEndForRange = setEndForRange;
|
|
21739
21748
|
exports.splitRangeText = splitRangeText;
|
|
21740
21749
|
exports.transformCellsToRange = transformCellsToRange;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/locale/ar-SA.ts
|
|
3
|
+
const locale = { sheets: {
|
|
4
|
+
tabs: {
|
|
5
|
+
sheetCopy: "(نسخ{0})",
|
|
6
|
+
sheet: "ورقة"
|
|
7
|
+
},
|
|
8
|
+
info: {
|
|
9
|
+
overlappingSelections: "لا يمكن استخدام هذا الأمر على التحديدات المتداخلة",
|
|
10
|
+
acrossMergedCell: "عبر خلية مدمجة",
|
|
11
|
+
partOfCell: "تم تحديد جزء فقط من خلية مدمجة",
|
|
12
|
+
hideSheet: "لا توجد ورقة مرئية بعد إخفاء هذه الورقة"
|
|
13
|
+
},
|
|
14
|
+
definedName: {
|
|
15
|
+
nameEmpty: "لا يمكن أن يكون الاسم فارغًا",
|
|
16
|
+
nameDuplicate: "الاسم موجود بالفعل",
|
|
17
|
+
nameInvalid: "الاسم غير صالح",
|
|
18
|
+
nameSheetConflict: "يتعارض الاسم مع اسم الورقة",
|
|
19
|
+
formulaOrRefStringEmpty: "لا يمكن أن تكون الصيغة أو سلسلة المرجع فارغة",
|
|
20
|
+
nameConflict: "يتعارض الاسم مع اسم الدالة",
|
|
21
|
+
defaultName: "اسم معرّف"
|
|
22
|
+
},
|
|
23
|
+
permission: { dialog: {
|
|
24
|
+
autoFillErr: "النطاق محمي، وليس لديك إذن للتعبئة التلقائية. لاستخدام التعبئة التلقائية، يرجى الاتصال بالمنشئ.",
|
|
25
|
+
editErr: "النطاق محمي، وليس لديك إذن التحرير. للتحرير، يرجى الاتصال بالمنشئ.",
|
|
26
|
+
formulaErr: "النطاق أو النطاق المُشار إليه محمي، وليس لديك إذن التحرير. للتحرير، يرجى الاتصال بالمنشئ.",
|
|
27
|
+
insertOrDeleteMoveRangeErr: "يتقاطع النطاق المدرج أو المحذوف مع النطاق المحمي، وهذه العملية غير مدعومة حاليًا.",
|
|
28
|
+
insertRowColErr: "النطاق محمي، وليس لديك إذن لإدراج صفوف وأعمدة. لإدراج صفوف وأعمدة، يرجى الاتصال بالمنشئ.",
|
|
29
|
+
moveRangeErr: "النطاق محمي، وليس لديك إذن لنقل التحديد. لنقل التحديد، يرجى الاتصال بالمنشئ.",
|
|
30
|
+
moveRowColErr: "النطاق محمي، وليس لديك إذن لنقل الصفوف والأعمدة. لنقل الصفوف والأعمدة، يرجى الاتصال بالمنشئ.",
|
|
31
|
+
operatorSheetErr: "ورقة العمل محمية، وليس لديك إذن لتشغيل ورقة العمل. لتشغيل ورقة العمل، يرجى الاتصال بالمنشئ.",
|
|
32
|
+
removeRowColErr: "النطاق محمي، وليس لديك إذن لحذف الصفوف والأعمدة. لحذف الصفوف والأعمدة، يرجى الاتصال بالمنشئ.",
|
|
33
|
+
setRowColStyleErr: "النطاق محمي، وليس لديك إذن لتعيين أنماط الصفوف والأعمدة. لتعيين أنماط الصفوف والأعمدة، يرجى الاتصال بالمنشئ.",
|
|
34
|
+
setStyleErr: "النطاق محمي، وليس لديك إذن لتعيين الأنماط. لتعيين الأنماط، يرجى الاتصال بالمنشئ."
|
|
35
|
+
} },
|
|
36
|
+
autoFill: {
|
|
37
|
+
copy: "نسخ الخلية",
|
|
38
|
+
series: "تعبئة السلسلة",
|
|
39
|
+
formatOnly: "التنسيق فقط",
|
|
40
|
+
noFormat: "بدون تنسيق"
|
|
41
|
+
},
|
|
42
|
+
merge: { confirm: {
|
|
43
|
+
title: "سيؤدي الاستمرار في الدمج إلى الاحتفاظ بقيمة الخلية العلوية اليسرى فقط، وسيتم تجاهل القيم الأخرى. هل أنت متأكد من الاستمرار؟",
|
|
44
|
+
cancel: "إلغاء الدمج",
|
|
45
|
+
confirm: "الاستمرار في الدمج",
|
|
46
|
+
warning: "تحذير",
|
|
47
|
+
dismantleMergeCellWarning: "سيؤدي هذا إلى تقسيم بعض الخلايا المدمجة. هل تريد الاستمرار؟"
|
|
48
|
+
} }
|
|
49
|
+
} };
|
|
50
|
+
|
|
51
|
+
//#endregion
|
|
52
|
+
module.exports = locale;
|