@univerjs/sheets 0.24.0 → 0.25.0-insiders.20260608-e4336f7
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 +641 -466
- package/lib/cjs/index.js +146 -128
- 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 +642 -461
- package/lib/es/index.js +139 -129
- 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 +642 -461
- package/lib/index.js +139 -129
- 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/commands/commands/add-range-protection.command.d.ts +1 -1
- package/lib/types/commands/commands/delete-range-protection.command.d.ts +1 -1
- package/lib/types/commands/commands/register-range-theme.command.d.ts +1 -1
- package/lib/types/commands/commands/set-protection.command.d.ts +1 -1
- package/lib/types/commands/mutations/add-range-protection.mutation.d.ts +1 -1
- package/lib/types/commands/mutations/add-range-theme.mutation.d.ts +1 -1
- package/lib/types/commands/mutations/register-range-theme.mutation.d.ts +1 -1
- package/lib/types/commands/mutations/set-range-protection.mutation.d.ts +1 -1
- package/lib/types/commands/mutations/set-range-theme.mutation.d.ts +1 -1
- package/lib/types/controllers/permission/sheet-permission-check.controller.d.ts +1 -1
- package/lib/types/controllers/permission/sheet-permission-init.controller.d.ts +1 -1
- package/lib/types/controllers/permission/sheet-permission-view-model.controller.d.ts +1 -1
- package/lib/types/controllers/zebar-crossing.controller.d.ts +1 -1
- package/lib/types/facade/{f-sheet-hooks.d.ts → const.d.ts} +1 -9
- package/lib/types/facade/f-range.d.ts +187 -94
- package/lib/types/facade/f-selection.d.ts +15 -8
- package/lib/types/facade/f-univer.d.ts +33 -64
- package/lib/types/facade/f-workbook.d.ts +15 -50
- package/lib/types/facade/f-worksheet.d.ts +202 -101
- package/lib/types/facade/index.d.ts +0 -1
- package/lib/types/facade/permission/f-range-permission.d.ts +8 -4
- package/lib/types/facade/permission/f-range-protection-rule.d.ts +18 -9
- package/lib/types/facade/permission/f-worksheet-permission.d.ts +36 -18
- package/lib/types/index.d.ts +9 -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/types/services/permission/range-permission/range-protection.ref-range.d.ts +3 -3
- package/lib/types/services/permission/range-permission/range-protection.service.d.ts +2 -2
- package/lib/types/services/permission/type.d.ts +1 -1
- package/lib/types/services/permission/workbook-permission/workbook-permission.service.d.ts +1 -1
- package/lib/types/services/permission/worksheet-permission/worksheet-permission.service.d.ts +1 -1
- package/lib/types/services/range-theme.service.d.ts +3 -3
- 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 +9 -9
- package/LICENSE +0 -176
- /package/lib/types/{model → models}/range-protection-render.model.d.ts +0 -0
- /package/lib/types/{model → models}/range-protection-rule.model.d.ts +0 -0
- /package/lib/types/{model → models}/range-protection.cache.d.ts +0 -0
- /package/lib/types/{model → models}/range-theme-model.d.ts +0 -0
- /package/lib/types/{model → models}/range-theme-util.d.ts +0 -0
- /package/lib/types/{model → models}/range-themes/build-in-theme.factory.d.ts +0 -0
- /package/lib/types/{model → models}/range-themes/default.d.ts +0 -0
- /package/lib/types/{model → models}/zebra-crossing-cache.d.ts +0 -0
package/lib/cjs/index.js
CHANGED
|
@@ -159,7 +159,7 @@ const RangeThemeInterceptorId = "sheet.interceptor.range-theme-id";
|
|
|
159
159
|
const IgnoreRangeThemeInterceptorKey = "sheet.interceptor.ignore-range-theme";
|
|
160
160
|
|
|
161
161
|
//#endregion
|
|
162
|
-
//#region \0@oxc-project+runtime@0.
|
|
162
|
+
//#region \0@oxc-project+runtime@0.134.0/helpers/esm/typeof.js
|
|
163
163
|
function _typeof(o) {
|
|
164
164
|
"@babel/helpers - typeof";
|
|
165
165
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -170,7 +170,7 @@ function _typeof(o) {
|
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
//#endregion
|
|
173
|
-
//#region \0@oxc-project+runtime@0.
|
|
173
|
+
//#region \0@oxc-project+runtime@0.134.0/helpers/esm/toPrimitive.js
|
|
174
174
|
function toPrimitive(t, r) {
|
|
175
175
|
if ("object" != _typeof(t) || !t) return t;
|
|
176
176
|
var e = t[Symbol.toPrimitive];
|
|
@@ -183,14 +183,14 @@ function toPrimitive(t, r) {
|
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
//#endregion
|
|
186
|
-
//#region \0@oxc-project+runtime@0.
|
|
186
|
+
//#region \0@oxc-project+runtime@0.134.0/helpers/esm/toPropertyKey.js
|
|
187
187
|
function toPropertyKey(t) {
|
|
188
188
|
var i = toPrimitive(t, "string");
|
|
189
189
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
//#endregion
|
|
193
|
-
//#region \0@oxc-project+runtime@0.
|
|
193
|
+
//#region \0@oxc-project+runtime@0.134.0/helpers/esm/defineProperty.js
|
|
194
194
|
function _defineProperty(e, r, t) {
|
|
195
195
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
196
196
|
value: t,
|
|
@@ -201,7 +201,7 @@ function _defineProperty(e, r, t) {
|
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
//#endregion
|
|
204
|
-
//#region \0@oxc-project+runtime@0.
|
|
204
|
+
//#region \0@oxc-project+runtime@0.134.0/helpers/esm/decorateParam.js
|
|
205
205
|
function __decorateParam(paramIndex, decorator) {
|
|
206
206
|
return function(target, key) {
|
|
207
207
|
decorator(target, key, paramIndex);
|
|
@@ -209,7 +209,7 @@ function __decorateParam(paramIndex, decorator) {
|
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
//#endregion
|
|
212
|
-
//#region \0@oxc-project+runtime@0.
|
|
212
|
+
//#region \0@oxc-project+runtime@0.134.0/helpers/esm/decorate.js
|
|
213
213
|
function __decorate(decorators, target, key, desc) {
|
|
214
214
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
215
215
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -564,7 +564,7 @@ function getWorksheetDisposableID(unitId, worksheet) {
|
|
|
564
564
|
}
|
|
565
565
|
|
|
566
566
|
//#endregion
|
|
567
|
-
//#region src/
|
|
567
|
+
//#region src/models/range-theme-util.ts
|
|
568
568
|
const serializeRangeStyle = (style) => {
|
|
569
569
|
const result = {};
|
|
570
570
|
if (style.bg) result.bg = { ...style.bg };
|
|
@@ -834,7 +834,7 @@ var RangeThemeStyle = class {
|
|
|
834
834
|
};
|
|
835
835
|
|
|
836
836
|
//#endregion
|
|
837
|
-
//#region src/
|
|
837
|
+
//#region src/models/range-themes/build-in-theme.factory.ts
|
|
838
838
|
/**
|
|
839
839
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
840
840
|
*
|
|
@@ -1062,7 +1062,7 @@ const buildInThemes = [
|
|
|
1062
1062
|
];
|
|
1063
1063
|
|
|
1064
1064
|
//#endregion
|
|
1065
|
-
//#region src/
|
|
1065
|
+
//#region src/models/range-themes/default.ts
|
|
1066
1066
|
const defaultRangeThemeStyleJSON = {
|
|
1067
1067
|
headerRowStyle: {
|
|
1068
1068
|
bg: { rgb: "rgb(68,114,196)" },
|
|
@@ -1086,7 +1086,7 @@ const defaultRangeThemeStyleJSONWithLastRowStyle = new RangeThemeStyle("default-
|
|
|
1086
1086
|
});
|
|
1087
1087
|
|
|
1088
1088
|
//#endregion
|
|
1089
|
-
//#region src/
|
|
1089
|
+
//#region src/models/zebra-crossing-cache.ts
|
|
1090
1090
|
/**
|
|
1091
1091
|
* This class is used for caching zebra crossing toggle ranges.
|
|
1092
1092
|
* `toggleRanges` represents the ranges within the visible area where the original odd/even row state is reversed due to hidden rows.
|
|
@@ -1174,7 +1174,7 @@ var ZebraCrossingCache = class {
|
|
|
1174
1174
|
};
|
|
1175
1175
|
|
|
1176
1176
|
//#endregion
|
|
1177
|
-
//#region src/
|
|
1177
|
+
//#region src/models/range-theme-model.ts
|
|
1178
1178
|
const SHEET_RANGE_THEME_MODEL_PLUGIN = "SHEET_RANGE_THEME_MODEL_PLUGIN";
|
|
1179
1179
|
let SheetRangeThemeModel = class SheetRangeThemeModel extends _univerjs_core.Disposable {
|
|
1180
1180
|
constructor(_sheetInterceptorService, _resourceManagerService, _univerInstanceService) {
|
|
@@ -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$/, "")) || "";
|
|
@@ -3889,9 +3886,19 @@ 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
|
-
//#region src/
|
|
3901
|
+
//#region src/models/range-protection-rule.model.ts
|
|
3895
3902
|
let ViewStateEnum = /* @__PURE__ */ function(ViewStateEnum) {
|
|
3896
3903
|
ViewStateEnum["OthersCanView"] = "othersCanView";
|
|
3897
3904
|
ViewStateEnum["NoOneElseCanView"] = "noOneElseCanView";
|
|
@@ -4325,7 +4332,10 @@ let SheetsSelectionsService = class SheetsSelectionsService extends _univerjs_co
|
|
|
4325
4332
|
this._init();
|
|
4326
4333
|
}
|
|
4327
4334
|
_init() {
|
|
4328
|
-
const c$ = this._instanceSrv.getCurrentTypeOfUnit$(_univerjs_core.UniverInstanceType.UNIVER_SHEET).pipe((0, rxjs.shareReplay)(
|
|
4335
|
+
const c$ = this._instanceSrv.getCurrentTypeOfUnit$(_univerjs_core.UniverInstanceType.UNIVER_SHEET).pipe((0, rxjs.shareReplay)({
|
|
4336
|
+
bufferSize: 1,
|
|
4337
|
+
refCount: true
|
|
4338
|
+
}), (0, rxjs.takeUntil)(this.dispose$));
|
|
4329
4339
|
this.selectionMoveStart$ = c$.pipe((0, rxjs.switchMap)((workbook) => !workbook ? (0, rxjs.of)() : this._ensureWorkbookSelection(workbook.getUnitId()).selectionMoveStart$), (0, rxjs.takeUntil)(this.dispose$));
|
|
4330
4340
|
this.selectionMoving$ = c$.pipe((0, rxjs.switchMap)((workbook) => !workbook ? (0, rxjs.of)() : this._ensureWorkbookSelection(workbook.getUnitId()).selectionMoving$), (0, rxjs.takeUntil)(this.dispose$));
|
|
4331
4341
|
this.selectionMoveEnd$ = c$.pipe((0, rxjs.switchMap)((workbook) => !workbook ? (0, rxjs.of)([]) : this._ensureWorkbookSelection(workbook.getUnitId()).selectionMoveEnd$), (0, rxjs.takeUntil)(this.dispose$));
|
|
@@ -9806,10 +9816,10 @@ const AddWorksheetMergeCommand = {
|
|
|
9806
9816
|
const localeService = accessor.get(_univerjs_core.LocaleService);
|
|
9807
9817
|
if (!await confirmService.confirm({
|
|
9808
9818
|
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")
|
|
9819
|
+
title: { title: "sheets.merge.confirm.warning" },
|
|
9820
|
+
children: { title: "sheets.merge.confirm.title" },
|
|
9821
|
+
cancelText: localeService.t("sheets.merge.confirm.cancel"),
|
|
9822
|
+
confirmText: localeService.t("sheets.merge.confirm.confirm")
|
|
9813
9823
|
})) return false;
|
|
9814
9824
|
}
|
|
9815
9825
|
const redoMutations = [];
|
|
@@ -11746,22 +11756,22 @@ let AutoFillService = class AutoFillService extends _univerjs_core.Disposable {
|
|
|
11746
11756
|
_defineProperty(this, "applyType$", this._applyType$.asObservable());
|
|
11747
11757
|
_defineProperty(this, "_menu$", new rxjs.BehaviorSubject([
|
|
11748
11758
|
{
|
|
11749
|
-
label: "autoFill.copy",
|
|
11759
|
+
label: "sheets.autoFill.copy",
|
|
11750
11760
|
value: "COPY",
|
|
11751
11761
|
disable: false
|
|
11752
11762
|
},
|
|
11753
11763
|
{
|
|
11754
|
-
label: "autoFill.series",
|
|
11764
|
+
label: "sheets.autoFill.series",
|
|
11755
11765
|
value: "SERIES",
|
|
11756
11766
|
disable: false
|
|
11757
11767
|
},
|
|
11758
11768
|
{
|
|
11759
|
-
label: "autoFill.formatOnly",
|
|
11769
|
+
label: "sheets.autoFill.formatOnly",
|
|
11760
11770
|
value: "ONLY_FORMAT",
|
|
11761
11771
|
disable: false
|
|
11762
11772
|
},
|
|
11763
11773
|
{
|
|
11764
|
-
label: "autoFill.noFormat",
|
|
11774
|
+
label: "sheets.autoFill.noFormat",
|
|
11765
11775
|
value: "NO_FORMAT",
|
|
11766
11776
|
disable: false
|
|
11767
11777
|
}
|
|
@@ -17608,6 +17618,70 @@ AutoFillController = __decorate([
|
|
|
17608
17618
|
__decorateParam(2, (0, _univerjs_core.Inject)(_univerjs_core.Injector))
|
|
17609
17619
|
], AutoFillController);
|
|
17610
17620
|
|
|
17621
|
+
//#endregion
|
|
17622
|
+
//#region src/controllers/calculate-result-apply.controller.ts
|
|
17623
|
+
let CalculateResultApplyController = class CalculateResultApplyController extends _univerjs_core.Disposable {
|
|
17624
|
+
constructor(_univerInstanceService, _commandService) {
|
|
17625
|
+
super();
|
|
17626
|
+
this._univerInstanceService = _univerInstanceService;
|
|
17627
|
+
this._commandService = _commandService;
|
|
17628
|
+
this._initialize();
|
|
17629
|
+
}
|
|
17630
|
+
_initialize() {
|
|
17631
|
+
this.disposeWithMe(this._commandService.onCommandExecuted((command) => {
|
|
17632
|
+
if (command.id !== _univerjs_engine_formula.SetFormulaCalculationResultMutation.id) return;
|
|
17633
|
+
const { unitData } = command.params;
|
|
17634
|
+
const unitIds = Object.keys(unitData);
|
|
17635
|
+
const redoMutationsInfo = [];
|
|
17636
|
+
for (let i = 0; i < unitIds.length; i++) {
|
|
17637
|
+
const unitId = unitIds[i];
|
|
17638
|
+
const sheetData = unitData[unitId];
|
|
17639
|
+
if (sheetData == null) continue;
|
|
17640
|
+
const sheetIds = Object.keys(sheetData);
|
|
17641
|
+
for (let j = 0; j < sheetIds.length; j++) {
|
|
17642
|
+
const sheetId = sheetIds[j];
|
|
17643
|
+
const cellData = sheetData[sheetId];
|
|
17644
|
+
if (cellData == null) continue;
|
|
17645
|
+
const setRangeValuesMutation = {
|
|
17646
|
+
subUnitId: sheetId,
|
|
17647
|
+
unitId,
|
|
17648
|
+
cellValue: this._getMergedCellData(unitId, sheetId, cellData)
|
|
17649
|
+
};
|
|
17650
|
+
redoMutationsInfo.push({
|
|
17651
|
+
id: SetRangeValuesMutation.id,
|
|
17652
|
+
params: setRangeValuesMutation
|
|
17653
|
+
});
|
|
17654
|
+
}
|
|
17655
|
+
}
|
|
17656
|
+
return (0, _univerjs_core.sequenceExecute)(redoMutationsInfo, this._commandService, {
|
|
17657
|
+
onlyLocal: true,
|
|
17658
|
+
fromFormula: true,
|
|
17659
|
+
applyFormulaCalculationResult: true
|
|
17660
|
+
});
|
|
17661
|
+
}));
|
|
17662
|
+
}
|
|
17663
|
+
/**
|
|
17664
|
+
* Priority that mainly deals with number format in unitData
|
|
17665
|
+
* @param unitId
|
|
17666
|
+
* @param sheetId
|
|
17667
|
+
* @param cellData
|
|
17668
|
+
* @returns
|
|
17669
|
+
*/
|
|
17670
|
+
_getMergedCellData(unitId, sheetId, cellData) {
|
|
17671
|
+
const workbook = this._univerInstanceService.getUniverSheetInstance(unitId);
|
|
17672
|
+
const styles = workbook === null || workbook === void 0 ? void 0 : workbook.getStyles();
|
|
17673
|
+
const worksheet = workbook === null || workbook === void 0 ? void 0 : workbook.getSheetBySheetId(sheetId);
|
|
17674
|
+
const oldCellDataMatrix = worksheet === null || worksheet === void 0 ? void 0 : worksheet.getCellMatrix();
|
|
17675
|
+
const cellDataMatrix = new _univerjs_core.ObjectMatrix(cellData);
|
|
17676
|
+
cellDataMatrix.forValue((row, col, cell) => {
|
|
17677
|
+
const newCell = (0, _univerjs_engine_formula.handleNumfmtInCell)(oldCellDataMatrix === null || oldCellDataMatrix === void 0 ? void 0 : oldCellDataMatrix.getValue(row, col), cell, styles);
|
|
17678
|
+
cellDataMatrix.setValue(row, col, newCell);
|
|
17679
|
+
});
|
|
17680
|
+
return cellDataMatrix.getMatrix();
|
|
17681
|
+
}
|
|
17682
|
+
};
|
|
17683
|
+
CalculateResultApplyController = __decorate([__decorateParam(0, (0, _univerjs_core.Inject)(_univerjs_core.IUniverInstanceService)), __decorateParam(1, _univerjs_core.ICommandService)], CalculateResultApplyController);
|
|
17684
|
+
|
|
17611
17685
|
//#endregion
|
|
17612
17686
|
//#region src/controllers/config/config.ts
|
|
17613
17687
|
/**
|
|
@@ -17886,14 +17960,14 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
17886
17960
|
params = commandInfo.params;
|
|
17887
17961
|
if ((0, _univerjs_core.isICellData)(params.value) && params.value.f) {
|
|
17888
17962
|
permission = this._permissionCheckWithFormula(params);
|
|
17889
|
-
errorMsg = this._localeService.t("permission.dialog.formulaErr");
|
|
17963
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.formulaErr");
|
|
17890
17964
|
} else {
|
|
17891
17965
|
permission = this._permissionCheckBySetRangeValue({
|
|
17892
17966
|
workbookTypes: [WorkbookEditablePermission],
|
|
17893
17967
|
worksheetTypes: [WorksheetSetCellValuePermission, WorksheetEditPermission],
|
|
17894
17968
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
17895
17969
|
}, params);
|
|
17896
|
-
errorMsg = this._localeService.t("permission.dialog.editErr");
|
|
17970
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.editErr");
|
|
17897
17971
|
}
|
|
17898
17972
|
break;
|
|
17899
17973
|
case SetStyleCommand.id:
|
|
@@ -17903,7 +17977,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
17903
17977
|
worksheetTypes: [WorksheetSetCellStylePermission, WorksheetEditPermission],
|
|
17904
17978
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
17905
17979
|
}, params.range ? [params.range] : void 0, params.unitId, params.subUnitId);
|
|
17906
|
-
errorMsg = this._localeService.t("permission.dialog.setStyleErr");
|
|
17980
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.setStyleErr");
|
|
17907
17981
|
break;
|
|
17908
17982
|
case SetBorderCommand.id:
|
|
17909
17983
|
params = commandInfo.params;
|
|
@@ -17912,7 +17986,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
17912
17986
|
worksheetTypes: [WorksheetSetCellStylePermission, WorksheetEditPermission],
|
|
17913
17987
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
17914
17988
|
}, 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");
|
|
17989
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.setStyleErr");
|
|
17916
17990
|
break;
|
|
17917
17991
|
case ClearSelectionAllCommand.id:
|
|
17918
17992
|
params = commandInfo.params;
|
|
@@ -17925,7 +17999,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
17925
17999
|
],
|
|
17926
18000
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
17927
18001
|
}, 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");
|
|
18002
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.editErr");
|
|
17929
18003
|
break;
|
|
17930
18004
|
case ClearSelectionContentCommand.id:
|
|
17931
18005
|
params = commandInfo.params;
|
|
@@ -17934,7 +18008,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
17934
18008
|
worksheetTypes: [WorksheetSetCellValuePermission, WorksheetEditPermission],
|
|
17935
18009
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
17936
18010
|
}, 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");
|
|
18011
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.editErr");
|
|
17938
18012
|
break;
|
|
17939
18013
|
case ClearSelectionFormatCommand.id:
|
|
17940
18014
|
params = commandInfo.params;
|
|
@@ -17943,43 +18017,43 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
17943
18017
|
worksheetTypes: [WorksheetSetCellStylePermission, WorksheetEditPermission],
|
|
17944
18018
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
17945
18019
|
}, 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");
|
|
18020
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.setStyleErr");
|
|
17947
18021
|
break;
|
|
17948
18022
|
case DeltaColumnWidthCommand.id:
|
|
17949
18023
|
permission = this.permissionCheckWithoutRange({ worksheetTypes: [WorksheetSetColumnStylePermission] });
|
|
17950
|
-
errorMsg = this._localeService.t("permission.dialog.setRowColStyleErr");
|
|
18024
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.setRowColStyleErr");
|
|
17951
18025
|
break;
|
|
17952
18026
|
case SetColWidthCommand.id:
|
|
17953
18027
|
params = commandInfo.params;
|
|
17954
18028
|
permission = this.permissionCheckWithoutRange({ worksheetTypes: [WorksheetSetColumnStylePermission] }, params.unitId, params.subUnitId);
|
|
17955
|
-
errorMsg = this._localeService.t("permission.dialog.setRowColStyleErr");
|
|
18029
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.setRowColStyleErr");
|
|
17956
18030
|
break;
|
|
17957
18031
|
case DeltaRowHeightCommand.id:
|
|
17958
18032
|
permission = this.permissionCheckWithoutRange({ worksheetTypes: [WorksheetSetRowStylePermission] });
|
|
17959
|
-
errorMsg = this._localeService.t("permission.dialog.setRowColStyleErr");
|
|
18033
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.setRowColStyleErr");
|
|
17960
18034
|
break;
|
|
17961
18035
|
case SetRowHeightCommand.id:
|
|
17962
18036
|
case SetWorksheetRowIsAutoHeightCommand.id:
|
|
17963
18037
|
params = commandInfo.params;
|
|
17964
18038
|
permission = this.permissionCheckWithoutRange({ worksheetTypes: [WorksheetSetRowStylePermission] }, params.unitId, params.subUnitId);
|
|
17965
|
-
errorMsg = this._localeService.t("permission.dialog.setRowColStyleErr");
|
|
18039
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.setRowColStyleErr");
|
|
17966
18040
|
break;
|
|
17967
18041
|
case MoveRowsCommand.id:
|
|
17968
18042
|
case MoveColsCommand.id:
|
|
17969
18043
|
params = commandInfo.params;
|
|
17970
18044
|
permission = this._permissionCheckByMoveRowsColsCommand(params);
|
|
17971
|
-
errorMsg = this._localeService.t("permission.dialog.moveRowColErr");
|
|
18045
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.moveRowColErr");
|
|
17972
18046
|
break;
|
|
17973
18047
|
case MoveRangeCommand.id:
|
|
17974
18048
|
params = commandInfo.params;
|
|
17975
18049
|
permission = this._permissionCheckByMoveRangeCommand(params);
|
|
17976
|
-
errorMsg = this._localeService.t("permission.dialog.moveRangeErr");
|
|
18050
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.moveRangeErr");
|
|
17977
18051
|
break;
|
|
17978
18052
|
case InsertRowByRangeCommand.id:
|
|
17979
18053
|
case InsertColByRangeCommand.id:
|
|
17980
18054
|
params = commandInfo.params;
|
|
17981
18055
|
permission = this._permissionCheckByInsertRowColCommand(params);
|
|
17982
|
-
errorMsg = this._localeService.t("permission.dialog.insertRowColErr");
|
|
18056
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.insertRowColErr");
|
|
17983
18057
|
break;
|
|
17984
18058
|
case RemoveRowByRangeCommand.id:
|
|
17985
18059
|
params = commandInfo.params;
|
|
@@ -17988,7 +18062,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
17988
18062
|
worksheetTypes: [WorksheetEditPermission, WorksheetDeleteRowPermission],
|
|
17989
18063
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
17990
18064
|
}, [params.range], params.unitId, params.subUnitId);
|
|
17991
|
-
errorMsg = this._localeService.t("permission.dialog.removeRowColErr");
|
|
18065
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.removeRowColErr");
|
|
17992
18066
|
break;
|
|
17993
18067
|
case RemoveColByRangeCommand.id:
|
|
17994
18068
|
params = commandInfo.params;
|
|
@@ -17997,22 +18071,22 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
17997
18071
|
worksheetTypes: [WorksheetEditPermission, WorksheetDeleteColumnPermission],
|
|
17998
18072
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
17999
18073
|
}, [params.range], params.unitId, params.subUnitId);
|
|
18000
|
-
errorMsg = this._localeService.t("permission.dialog.removeRowColErr");
|
|
18074
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.removeRowColErr");
|
|
18001
18075
|
break;
|
|
18002
18076
|
case SetWorksheetOrderCommand.id:
|
|
18003
18077
|
params = commandInfo.params;
|
|
18004
18078
|
permission = this._permissionCheckByWorksheetCommand([WorkbookEditablePermission, WorkbookMoveSheetPermission], params);
|
|
18005
|
-
errorMsg = this._localeService.t("permission.dialog.operatorSheetErr");
|
|
18079
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.operatorSheetErr");
|
|
18006
18080
|
break;
|
|
18007
18081
|
case SetWorksheetNameCommand.id:
|
|
18008
18082
|
params = commandInfo.params;
|
|
18009
18083
|
permission = this._permissionCheckByWorksheetCommand([WorkbookEditablePermission, WorkbookRenameSheetPermission], params);
|
|
18010
|
-
errorMsg = this._localeService.t("permission.dialog.operatorSheetErr");
|
|
18084
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.operatorSheetErr");
|
|
18011
18085
|
break;
|
|
18012
18086
|
case SetWorksheetShowCommand.id:
|
|
18013
18087
|
params = commandInfo.params;
|
|
18014
18088
|
permission = this._permissionCheckByWorksheetCommand([WorkbookEditablePermission, WorkbookHideSheetPermission], params);
|
|
18015
|
-
errorMsg = this._localeService.t("permission.dialog.operatorSheetErr");
|
|
18089
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.operatorSheetErr");
|
|
18016
18090
|
break;
|
|
18017
18091
|
case SetSpecificColsVisibleCommand.id:
|
|
18018
18092
|
params = commandInfo.params;
|
|
@@ -18021,7 +18095,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
18021
18095
|
worksheetTypes: [WorksheetEditPermission, WorksheetSetColumnStylePermission],
|
|
18022
18096
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
18023
18097
|
}, params.ranges, params.unitId, params.subUnitId);
|
|
18024
|
-
errorMsg = this._localeService.t("permission.dialog.setRowColStyleErr");
|
|
18098
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.setRowColStyleErr");
|
|
18025
18099
|
break;
|
|
18026
18100
|
case SetSpecificRowsVisibleCommand.id:
|
|
18027
18101
|
params = commandInfo.params;
|
|
@@ -18030,7 +18104,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
18030
18104
|
worksheetTypes: [WorksheetEditPermission, WorksheetSetRowStylePermission],
|
|
18031
18105
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
18032
18106
|
}, params.ranges, params.unitId, params.subUnitId);
|
|
18033
|
-
errorMsg = this._localeService.t("permission.dialog.setRowColStyleErr");
|
|
18107
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.setRowColStyleErr");
|
|
18034
18108
|
break;
|
|
18035
18109
|
case SetSelectedColsVisibleCommand.id:
|
|
18036
18110
|
permission = this.permissionCheckWithRanges({
|
|
@@ -18038,7 +18112,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
18038
18112
|
worksheetTypes: [WorksheetEditPermission, WorksheetSetColumnStylePermission],
|
|
18039
18113
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
18040
18114
|
});
|
|
18041
|
-
errorMsg = this._localeService.t("permission.dialog.setRowColStyleErr");
|
|
18115
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.setRowColStyleErr");
|
|
18042
18116
|
break;
|
|
18043
18117
|
case SetSelectedRowsVisibleCommand.id:
|
|
18044
18118
|
permission = this.permissionCheckWithRanges({
|
|
@@ -18046,27 +18120,27 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
18046
18120
|
worksheetTypes: [WorksheetEditPermission, WorksheetSetRowStylePermission],
|
|
18047
18121
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
18048
18122
|
});
|
|
18049
|
-
errorMsg = this._localeService.t("permission.dialog.setRowColStyleErr");
|
|
18123
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.setRowColStyleErr");
|
|
18050
18124
|
break;
|
|
18051
18125
|
case InsertRangeMoveRightCommand.id:
|
|
18052
18126
|
params = commandInfo.params;
|
|
18053
18127
|
permission = this._permissionCheckWithInsertOrDeleteMoveRange("right", params);
|
|
18054
|
-
errorMsg = this._localeService.t("permission.dialog.insertOrDeleteMoveRangeErr");
|
|
18128
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.insertOrDeleteMoveRangeErr");
|
|
18055
18129
|
break;
|
|
18056
18130
|
case InsertRangeMoveDownCommand.id:
|
|
18057
18131
|
params = commandInfo.params;
|
|
18058
18132
|
permission = this._permissionCheckWithInsertOrDeleteMoveRange("down", params);
|
|
18059
|
-
errorMsg = this._localeService.t("permission.dialog.insertOrDeleteMoveRangeErr");
|
|
18133
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.insertOrDeleteMoveRangeErr");
|
|
18060
18134
|
break;
|
|
18061
18135
|
case DeleteRangeMoveLeftCommand.id:
|
|
18062
18136
|
params = commandInfo.params;
|
|
18063
18137
|
permission = this._permissionCheckWithInsertOrDeleteMoveRange("left", params);
|
|
18064
|
-
errorMsg = this._localeService.t("permission.dialog.insertOrDeleteMoveRangeErr");
|
|
18138
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.insertOrDeleteMoveRangeErr");
|
|
18065
18139
|
break;
|
|
18066
18140
|
case DeleteRangeMoveUpCommand.id:
|
|
18067
18141
|
params = commandInfo.params;
|
|
18068
18142
|
permission = this._permissionCheckWithInsertOrDeleteMoveRange("up", params);
|
|
18069
|
-
errorMsg = this._localeService.t("permission.dialog.insertOrDeleteMoveRangeErr");
|
|
18143
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.insertOrDeleteMoveRangeErr");
|
|
18070
18144
|
break;
|
|
18071
18145
|
case AutoFillCommand.id:
|
|
18072
18146
|
params = commandInfo.params;
|
|
@@ -18075,7 +18149,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
18075
18149
|
worksheetTypes: [WorksheetSetCellValuePermission, WorksheetEditPermission],
|
|
18076
18150
|
rangeTypes: [RangeProtectionPermissionEditPoint]
|
|
18077
18151
|
}, [params.targetRange], params.unitId, params.subUnitId);
|
|
18078
|
-
errorMsg = this._localeService.t("permission.dialog.autoFillErr");
|
|
18152
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.autoFillErr");
|
|
18079
18153
|
break;
|
|
18080
18154
|
case InsertDefinedNameCommand.id:
|
|
18081
18155
|
case SetDefinedNameCommand.id:
|
|
@@ -18086,7 +18160,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
18086
18160
|
workbookTypes: [WorkbookEditablePermission],
|
|
18087
18161
|
worksheetTypes: [WorksheetEditPermission]
|
|
18088
18162
|
}, params.unitId, params.localSheetId);
|
|
18089
|
-
errorMsg = this._localeService.t("permission.dialog.editErr");
|
|
18163
|
+
errorMsg = this._localeService.t("sheets.permission.dialog.editErr");
|
|
18090
18164
|
break;
|
|
18091
18165
|
default: break;
|
|
18092
18166
|
}
|
|
@@ -18867,7 +18941,7 @@ ZebraCrossingCacheController = __decorate([
|
|
|
18867
18941
|
], ZebraCrossingCacheController);
|
|
18868
18942
|
|
|
18869
18943
|
//#endregion
|
|
18870
|
-
//#region src/
|
|
18944
|
+
//#region src/models/range-protection-render.model.ts
|
|
18871
18945
|
let RangeProtectionRenderModel = class RangeProtectionRenderModel {
|
|
18872
18946
|
constructor(_selectionProtectionRuleModel, _permissionService) {
|
|
18873
18947
|
this._selectionProtectionRuleModel = _selectionProtectionRuleModel;
|
|
@@ -18938,7 +19012,7 @@ let RangeProtectionRenderModel = class RangeProtectionRenderModel {
|
|
|
18938
19012
|
RangeProtectionRenderModel = __decorate([__decorateParam(0, (0, _univerjs_core.Inject)(RangeProtectionRuleModel)), __decorateParam(1, (0, _univerjs_core.Inject)(_univerjs_core.IPermissionService))], RangeProtectionRenderModel);
|
|
18939
19013
|
|
|
18940
19014
|
//#endregion
|
|
18941
|
-
//#region src/
|
|
19015
|
+
//#region src/models/range-protection.cache.ts
|
|
18942
19016
|
let RangeProtectionCache = class RangeProtectionCache extends _univerjs_core.Disposable {
|
|
18943
19017
|
constructor(_ruleModel, _permissionService, _univerInstanceService) {
|
|
18944
19018
|
super();
|
|
@@ -19223,7 +19297,7 @@ RangeProtectionCache = __decorate([
|
|
|
19223
19297
|
//#endregion
|
|
19224
19298
|
//#region package.json
|
|
19225
19299
|
var name = "@univerjs/sheets";
|
|
19226
|
-
var version = "0.
|
|
19300
|
+
var version = "0.25.0-insiders.20260608-e4336f7";
|
|
19227
19301
|
|
|
19228
19302
|
//#endregion
|
|
19229
19303
|
//#region src/controllers/active-worksheet.controller.ts
|
|
@@ -19517,70 +19591,6 @@ BasicWorksheetController = __decorate([
|
|
|
19517
19591
|
__decorateParam(2, (0, _univerjs_core.Optional)(_univerjs_rpc.DataSyncPrimaryController))
|
|
19518
19592
|
], BasicWorksheetController);
|
|
19519
19593
|
|
|
19520
|
-
//#endregion
|
|
19521
|
-
//#region src/controllers/calculate-result-apply.controller.ts
|
|
19522
|
-
let CalculateResultApplyController = class CalculateResultApplyController extends _univerjs_core.Disposable {
|
|
19523
|
-
constructor(_univerInstanceService, _commandService) {
|
|
19524
|
-
super();
|
|
19525
|
-
this._univerInstanceService = _univerInstanceService;
|
|
19526
|
-
this._commandService = _commandService;
|
|
19527
|
-
this._initialize();
|
|
19528
|
-
}
|
|
19529
|
-
_initialize() {
|
|
19530
|
-
this.disposeWithMe(this._commandService.onCommandExecuted((command) => {
|
|
19531
|
-
if (command.id !== _univerjs_engine_formula.SetFormulaCalculationResultMutation.id) return;
|
|
19532
|
-
const { unitData } = command.params;
|
|
19533
|
-
const unitIds = Object.keys(unitData);
|
|
19534
|
-
const redoMutationsInfo = [];
|
|
19535
|
-
for (let i = 0; i < unitIds.length; i++) {
|
|
19536
|
-
const unitId = unitIds[i];
|
|
19537
|
-
const sheetData = unitData[unitId];
|
|
19538
|
-
if (sheetData == null) continue;
|
|
19539
|
-
const sheetIds = Object.keys(sheetData);
|
|
19540
|
-
for (let j = 0; j < sheetIds.length; j++) {
|
|
19541
|
-
const sheetId = sheetIds[j];
|
|
19542
|
-
const cellData = sheetData[sheetId];
|
|
19543
|
-
if (cellData == null) continue;
|
|
19544
|
-
const setRangeValuesMutation = {
|
|
19545
|
-
subUnitId: sheetId,
|
|
19546
|
-
unitId,
|
|
19547
|
-
cellValue: this._getMergedCellData(unitId, sheetId, cellData)
|
|
19548
|
-
};
|
|
19549
|
-
redoMutationsInfo.push({
|
|
19550
|
-
id: SetRangeValuesMutation.id,
|
|
19551
|
-
params: setRangeValuesMutation
|
|
19552
|
-
});
|
|
19553
|
-
}
|
|
19554
|
-
}
|
|
19555
|
-
return (0, _univerjs_core.sequenceExecute)(redoMutationsInfo, this._commandService, {
|
|
19556
|
-
onlyLocal: true,
|
|
19557
|
-
fromFormula: true,
|
|
19558
|
-
applyFormulaCalculationResult: true
|
|
19559
|
-
});
|
|
19560
|
-
}));
|
|
19561
|
-
}
|
|
19562
|
-
/**
|
|
19563
|
-
* Priority that mainly deals with number format in unitData
|
|
19564
|
-
* @param unitId
|
|
19565
|
-
* @param sheetId
|
|
19566
|
-
* @param cellData
|
|
19567
|
-
* @returns
|
|
19568
|
-
*/
|
|
19569
|
-
_getMergedCellData(unitId, sheetId, cellData) {
|
|
19570
|
-
const workbook = this._univerInstanceService.getUniverSheetInstance(unitId);
|
|
19571
|
-
const styles = workbook === null || workbook === void 0 ? void 0 : workbook.getStyles();
|
|
19572
|
-
const worksheet = workbook === null || workbook === void 0 ? void 0 : workbook.getSheetBySheetId(sheetId);
|
|
19573
|
-
const oldCellDataMatrix = worksheet === null || worksheet === void 0 ? void 0 : worksheet.getCellMatrix();
|
|
19574
|
-
const cellDataMatrix = new _univerjs_core.ObjectMatrix(cellData);
|
|
19575
|
-
cellDataMatrix.forValue((row, col, cell) => {
|
|
19576
|
-
const newCell = (0, _univerjs_engine_formula.handleNumfmtInCell)(oldCellDataMatrix === null || oldCellDataMatrix === void 0 ? void 0 : oldCellDataMatrix.getValue(row, col), cell, styles);
|
|
19577
|
-
cellDataMatrix.setValue(row, col, newCell);
|
|
19578
|
-
});
|
|
19579
|
-
return cellDataMatrix.getMatrix();
|
|
19580
|
-
}
|
|
19581
|
-
};
|
|
19582
|
-
CalculateResultApplyController = __decorate([__decorateParam(0, (0, _univerjs_core.Inject)(_univerjs_core.IUniverInstanceService)), __decorateParam(1, _univerjs_core.ICommandService)], CalculateResultApplyController);
|
|
19583
|
-
|
|
19584
19594
|
//#endregion
|
|
19585
19595
|
//#region src/controllers/number-cell.controller.ts
|
|
19586
19596
|
/**
|
|
@@ -21256,6 +21266,12 @@ exports.BEFORE_CELL_EDIT = BEFORE_CELL_EDIT;
|
|
|
21256
21266
|
exports.BorderStyleManagerService = BorderStyleManagerService;
|
|
21257
21267
|
exports.COMMAND_LISTENER_SKELETON_CHANGE = COMMAND_LISTENER_SKELETON_CHANGE;
|
|
21258
21268
|
exports.COMMAND_LISTENER_VALUE_CHANGE = COMMAND_LISTENER_VALUE_CHANGE;
|
|
21269
|
+
Object.defineProperty(exports, 'CalculateResultApplyController', {
|
|
21270
|
+
enumerable: true,
|
|
21271
|
+
get: function () {
|
|
21272
|
+
return CalculateResultApplyController;
|
|
21273
|
+
}
|
|
21274
|
+
});
|
|
21259
21275
|
exports.CancelFrozenCommand = CancelFrozenCommand;
|
|
21260
21276
|
exports.CancelMarkDirtyRowAutoHeightOperation = CancelMarkDirtyRowAutoHeightOperation;
|
|
21261
21277
|
exports.ClearSelectionAllCommand = ClearSelectionAllCommand;
|
|
@@ -21678,6 +21694,7 @@ exports.createTopMatrixFromRanges = createTopMatrixFromRanges;
|
|
|
21678
21694
|
exports.defaultLargeSheetOperationConfig = defaultLargeSheetOperationConfig;
|
|
21679
21695
|
exports.defaultWorkbookPermissionPoints = defaultWorkbookPermissionPoints;
|
|
21680
21696
|
exports.defaultWorksheetPermissionPoint = defaultWorksheetPermissionPoint;
|
|
21697
|
+
exports.deserializeListOptions = deserializeListOptions;
|
|
21681
21698
|
exports.discreteRangeToRange = discreteRangeToRange;
|
|
21682
21699
|
exports.expandToContinuousRange = expandToContinuousRange;
|
|
21683
21700
|
exports.factoryRemoveNumfmtUndoMutation = factoryRemoveNumfmtUndoMutation;
|
|
@@ -21735,6 +21752,7 @@ exports.rangeMerge = rangeMerge;
|
|
|
21735
21752
|
exports.rangeToDiscreteRange = rangeToDiscreteRange;
|
|
21736
21753
|
exports.rotateRange = rotateRange;
|
|
21737
21754
|
exports.runRefRangeMutations = runRefRangeMutations;
|
|
21755
|
+
exports.serializeListOptions = serializeListOptions;
|
|
21738
21756
|
exports.setEndForRange = setEndForRange;
|
|
21739
21757
|
exports.splitRangeText = splitRangeText;
|
|
21740
21758
|
exports.transformCellsToRange = transformCellsToRange;
|