@univerjs/sheets-formula 0.25.1 → 1.0.0-alpha.1
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/en-US-B2EwEnJA.js +26 -0
- package/lib/cjs/en-US-Daqu9lkO.js +10582 -0
- package/lib/cjs/index.js +133 -90
- package/lib/cjs/locale/ar-SA.js +28 -10533
- package/lib/cjs/locale/ca-ES.js +26 -17
- package/lib/cjs/locale/de-DE.js +28 -10533
- package/lib/cjs/locale/en-US.js +27 -10532
- package/lib/cjs/locale/es-ES.js +26 -17
- package/lib/cjs/locale/fa-IR.js +58 -10563
- package/lib/cjs/locale/fr-FR.js +57 -10544
- package/lib/cjs/locale/id-ID.js +28 -10533
- package/lib/cjs/locale/it-IT.js +28 -10533
- package/lib/cjs/locale/ja-JP.js +26 -17
- package/lib/cjs/locale/ko-KR.js +26 -17
- package/lib/cjs/locale/pl-PL.js +28 -10533
- package/lib/cjs/locale/pt-BR.js +28 -10533
- package/lib/cjs/locale/ru-RU.js +41 -50
- package/lib/cjs/locale/sk-SK.js +26 -17
- package/lib/cjs/locale/vi-VN.js +26 -17
- package/lib/cjs/locale/zh-CN.js +26 -17
- package/lib/cjs/locale/zh-HK.js +28 -10533
- package/lib/cjs/locale/zh-TW.js +26 -17
- package/lib/en-US-CjsBUOZB.js +10498 -0
- package/lib/en-US-Kon3m8fM.js +20 -0
- package/lib/es/en-US-CjsBUOZB.js +10498 -0
- package/lib/es/en-US-Kon3m8fM.js +20 -0
- package/lib/es/index.js +133 -90
- package/lib/es/locale/ar-SA.js +28 -10532
- package/lib/es/locale/ca-ES.js +26 -17
- package/lib/es/locale/de-DE.js +28 -10532
- package/lib/es/locale/en-US.js +27 -10531
- package/lib/es/locale/es-ES.js +26 -17
- package/lib/es/locale/fa-IR.js +59 -10563
- package/lib/es/locale/fr-FR.js +58 -10544
- package/lib/es/locale/id-ID.js +28 -10532
- package/lib/es/locale/it-IT.js +28 -10532
- package/lib/es/locale/ja-JP.js +26 -17
- package/lib/es/locale/ko-KR.js +26 -17
- package/lib/es/locale/pl-PL.js +28 -10532
- package/lib/es/locale/pt-BR.js +28 -10532
- package/lib/es/locale/ru-RU.js +42 -50
- package/lib/es/locale/sk-SK.js +26 -17
- package/lib/es/locale/vi-VN.js +26 -17
- package/lib/es/locale/zh-CN.js +26 -17
- package/lib/es/locale/zh-HK.js +28 -10532
- package/lib/es/locale/zh-TW.js +26 -17
- package/lib/index.js +133 -90
- package/lib/locale/ar-SA.js +28 -10532
- package/lib/locale/ca-ES.js +26 -17
- package/lib/locale/de-DE.js +28 -10532
- package/lib/locale/en-US.js +27 -10531
- package/lib/locale/es-ES.js +26 -17
- package/lib/locale/fa-IR.js +59 -10563
- package/lib/locale/fr-FR.js +58 -10544
- package/lib/locale/id-ID.js +28 -10532
- package/lib/locale/it-IT.js +28 -10532
- package/lib/locale/ja-JP.js +26 -17
- package/lib/locale/ko-KR.js +26 -17
- package/lib/locale/pl-PL.js +28 -10532
- package/lib/locale/pt-BR.js +28 -10532
- package/lib/locale/ru-RU.js +42 -50
- package/lib/locale/sk-SK.js +26 -17
- package/lib/locale/vi-VN.js +26 -17
- package/lib/locale/zh-CN.js +26 -17
- package/lib/locale/zh-HK.js +28 -10532
- package/lib/locale/zh-TW.js +26 -17
- package/lib/types/controllers/array-formula-cell-interceptor.controller.d.ts +4 -2
- package/lib/types/index.d.ts +4 -3
- package/lib/types/locale/en-US.d.ts +7 -0
- package/lib/types/locale/types.d.ts +18 -0
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +9 -9
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/locale/function-list/univer/en-US.ts
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
const locale = {};
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { locale as t };
|
package/lib/es/index.js
CHANGED
|
@@ -152,7 +152,7 @@ const PLUGIN_CONFIG_KEY_MOBILE = "sheets-formula.mobile.config";
|
|
|
152
152
|
const configSymbolMobile = Symbol(PLUGIN_CONFIG_KEY_MOBILE);
|
|
153
153
|
|
|
154
154
|
//#endregion
|
|
155
|
-
//#region \0@oxc-project+runtime@0.
|
|
155
|
+
//#region \0@oxc-project+runtime@0.137.0/helpers/esm/decorateParam.js
|
|
156
156
|
function __decorateParam(paramIndex, decorator) {
|
|
157
157
|
return function(target, key) {
|
|
158
158
|
decorator(target, key, paramIndex);
|
|
@@ -160,7 +160,7 @@ function __decorateParam(paramIndex, decorator) {
|
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
//#endregion
|
|
163
|
-
//#region \0@oxc-project+runtime@0.
|
|
163
|
+
//#region \0@oxc-project+runtime@0.137.0/helpers/esm/decorate.js
|
|
164
164
|
function __decorate(decorators, target, key, desc) {
|
|
165
165
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
166
166
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -274,7 +274,7 @@ function getDataLength(copyDataPiece) {
|
|
|
274
274
|
}
|
|
275
275
|
|
|
276
276
|
//#endregion
|
|
277
|
-
//#region \0@oxc-project+runtime@0.
|
|
277
|
+
//#region \0@oxc-project+runtime@0.137.0/helpers/esm/typeof.js
|
|
278
278
|
function _typeof(o) {
|
|
279
279
|
"@babel/helpers - typeof";
|
|
280
280
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -285,7 +285,7 @@ function _typeof(o) {
|
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
//#endregion
|
|
288
|
-
//#region \0@oxc-project+runtime@0.
|
|
288
|
+
//#region \0@oxc-project+runtime@0.137.0/helpers/esm/toPrimitive.js
|
|
289
289
|
function toPrimitive(t, r) {
|
|
290
290
|
if ("object" != _typeof(t) || !t) return t;
|
|
291
291
|
var e = t[Symbol.toPrimitive];
|
|
@@ -298,14 +298,14 @@ function toPrimitive(t, r) {
|
|
|
298
298
|
}
|
|
299
299
|
|
|
300
300
|
//#endregion
|
|
301
|
-
//#region \0@oxc-project+runtime@0.
|
|
301
|
+
//#region \0@oxc-project+runtime@0.137.0/helpers/esm/toPropertyKey.js
|
|
302
302
|
function toPropertyKey(t) {
|
|
303
303
|
var i = toPrimitive(t, "string");
|
|
304
304
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
//#endregion
|
|
308
|
-
//#region \0@oxc-project+runtime@0.
|
|
308
|
+
//#region \0@oxc-project+runtime@0.137.0/helpers/esm/defineProperty.js
|
|
309
309
|
function _defineProperty(e, r, t) {
|
|
310
310
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
311
311
|
value: t,
|
|
@@ -1175,9 +1175,9 @@ function refRangeFormula(oldFormulaData, newFormulaData, formulaReferenceMovePar
|
|
|
1175
1175
|
const targetUnitId = (_formulaReferenceMove = formulaReferenceMoveParam.targetUnitId) !== null && _formulaReferenceMove !== void 0 ? _formulaReferenceMove : fromUnitId;
|
|
1176
1176
|
const targetSheetId = (_formulaReferenceMove2 = formulaReferenceMoveParam.targetSheetId) !== null && _formulaReferenceMove2 !== void 0 ? _formulaReferenceMove2 : fromSheetId;
|
|
1177
1177
|
const isCrossSheet = fromUnitId !== targetUnitId || fromSheetId !== targetSheetId;
|
|
1178
|
-
new Set([...Object.keys(oldFormulaData), ...Object.keys(newFormulaData)]).forEach((unitId) => {
|
|
1178
|
+
(/* @__PURE__ */ new Set([...Object.keys(oldFormulaData), ...Object.keys(newFormulaData)])).forEach((unitId) => {
|
|
1179
1179
|
if (checkFormulaDataNull(oldFormulaData, unitId, fromSheetId)) return;
|
|
1180
|
-
new Set([...Object.keys(oldFormulaData[unitId] || {}), ...Object.keys(newFormulaData[unitId] || {})]).forEach((currentSheetId) => {
|
|
1180
|
+
(/* @__PURE__ */ new Set([...Object.keys(oldFormulaData[unitId] || {}), ...Object.keys(newFormulaData[unitId] || {})])).forEach((currentSheetId) => {
|
|
1181
1181
|
var _oldFormulaData$unitI, _newFormulaData$unitI;
|
|
1182
1182
|
const currentOldFormulaData = (_oldFormulaData$unitI = oldFormulaData[unitId]) === null || _oldFormulaData$unitI === void 0 ? void 0 : _oldFormulaData$unitI[currentSheetId];
|
|
1183
1183
|
const currentNewFormulaData = (_newFormulaData$unitI = newFormulaData[unitId]) === null || _newFormulaData$unitI === void 0 ? void 0 : _newFormulaData$unitI[currentSheetId];
|
|
@@ -2324,7 +2324,7 @@ let UpdateFormulaController = class UpdateFormulaController extends Disposable {
|
|
|
2324
2324
|
this.disposeWithMe(this._commandService.beforeCommandExecuted((command, options) => {
|
|
2325
2325
|
if (command.id === SetRangeValuesMutation.id) {
|
|
2326
2326
|
const params = command.params;
|
|
2327
|
-
if (
|
|
2327
|
+
if (shouldSkipFormulaUpdateForSetRangeValues(params, options)) return;
|
|
2328
2328
|
this._handleSetRangeValuesMutation(params);
|
|
2329
2329
|
}
|
|
2330
2330
|
}));
|
|
@@ -2615,6 +2615,40 @@ UpdateFormulaController = __decorate([
|
|
|
2615
2615
|
__decorateParam(6, IConfigService),
|
|
2616
2616
|
__decorateParam(7, Inject(Injector))
|
|
2617
2617
|
], UpdateFormulaController);
|
|
2618
|
+
/**
|
|
2619
|
+
* Whether to skip the formula update when the setRangeValues mutation is executed.
|
|
2620
|
+
* The style-only cell value does not affect the formula calculation, so it can be skipped.
|
|
2621
|
+
*/
|
|
2622
|
+
function shouldSkipFormulaUpdateForSetRangeValues(params, options) {
|
|
2623
|
+
if (options && (options.onlyLocal === true || options.syncOnly === true || options.fromChangeset === true)) return true;
|
|
2624
|
+
const { cellValue, trigger } = params;
|
|
2625
|
+
if (trigger && [
|
|
2626
|
+
SetStyleCommand.id,
|
|
2627
|
+
SetBorderCommand.id,
|
|
2628
|
+
ClearSelectionFormatCommand.id,
|
|
2629
|
+
SetRangeCustomMetadataCommand.id
|
|
2630
|
+
].includes(trigger)) return true;
|
|
2631
|
+
if (!cellValue) return true;
|
|
2632
|
+
return isStyleOnlyCellValue(cellValue);
|
|
2633
|
+
}
|
|
2634
|
+
function isStyleOnlyCellValue(cellValue) {
|
|
2635
|
+
const matrix = new ObjectMatrix(cellValue);
|
|
2636
|
+
let hasCell = false;
|
|
2637
|
+
let styleOnly = true;
|
|
2638
|
+
matrix.forValue((_row, _col, cell) => {
|
|
2639
|
+
hasCell = true;
|
|
2640
|
+
if (!cell) {
|
|
2641
|
+
styleOnly = false;
|
|
2642
|
+
return false;
|
|
2643
|
+
}
|
|
2644
|
+
const keys = Object.keys(cell);
|
|
2645
|
+
if (keys.length !== 1 || keys[0] !== "s") {
|
|
2646
|
+
styleOnly = false;
|
|
2647
|
+
return false;
|
|
2648
|
+
}
|
|
2649
|
+
});
|
|
2650
|
+
return hasCell && styleOnly;
|
|
2651
|
+
}
|
|
2618
2652
|
function tableReferenceContainsColumn(columnStruct, columnNames) {
|
|
2619
2653
|
if (!(columnNames === null || columnNames === void 0 ? void 0 : columnNames.length) || columnStruct.length === 0) return false;
|
|
2620
2654
|
const columnNameSet = new Set(columnNames);
|
|
@@ -2629,7 +2663,7 @@ function tableReferenceContainsColumn(columnStruct, columnNames) {
|
|
|
2629
2663
|
//#endregion
|
|
2630
2664
|
//#region package.json
|
|
2631
2665
|
var name = "@univerjs/sheets-formula";
|
|
2632
|
-
var version = "0.
|
|
2666
|
+
var version = "1.0.0-alpha.1";
|
|
2633
2667
|
|
|
2634
2668
|
//#endregion
|
|
2635
2669
|
//#region src/common/plugin-name.ts
|
|
@@ -2998,10 +3032,11 @@ ActiveDirtyController = __decorate([
|
|
|
2998
3032
|
//#endregion
|
|
2999
3033
|
//#region src/controllers/array-formula-cell-interceptor.controller.ts
|
|
3000
3034
|
let ArrayFormulaCellInterceptorController = class ArrayFormulaCellInterceptorController extends Disposable {
|
|
3001
|
-
constructor(_commandService, _configService, _sheetInterceptorService, _formulaDataModel, _lexerTreeBuilder, _functionService, _definedNamesService) {
|
|
3035
|
+
constructor(_commandService, _configService, _univerInstanceService, _sheetInterceptorService, _formulaDataModel, _lexerTreeBuilder, _functionService, _definedNamesService) {
|
|
3002
3036
|
super();
|
|
3003
3037
|
this._commandService = _commandService;
|
|
3004
3038
|
this._configService = _configService;
|
|
3039
|
+
this._univerInstanceService = _univerInstanceService;
|
|
3005
3040
|
this._sheetInterceptorService = _sheetInterceptorService;
|
|
3006
3041
|
this._formulaDataModel = _formulaDataModel;
|
|
3007
3042
|
this._lexerTreeBuilder = _lexerTreeBuilder;
|
|
@@ -3052,86 +3087,93 @@ let ArrayFormulaCellInterceptorController = class ArrayFormulaCellInterceptorCon
|
|
|
3052
3087
|
_addPrefixToFunctionSnapshot() {
|
|
3053
3088
|
const dataModel = this._formulaDataModel.getFormulaData();
|
|
3054
3089
|
const cacheMap = /* @__PURE__ */ new Map();
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
fromFormula: true
|
|
3080
|
-
});
|
|
3090
|
+
this._forEachSheetSnapshotData(dataModel, (unitId, subUnitId, formulaDataItem) => {
|
|
3091
|
+
if (!formulaDataItem) return;
|
|
3092
|
+
const cellValue = new ObjectMatrix();
|
|
3093
|
+
new ObjectMatrix(formulaDataItem).forValue((row, col, value) => {
|
|
3094
|
+
const functionText = value === null || value === void 0 ? void 0 : value.f;
|
|
3095
|
+
if ((value === null || value === void 0 ? void 0 : value.x) != null || !functionText || functionText.length === 0) return;
|
|
3096
|
+
if (cacheMap.has(functionText)) {
|
|
3097
|
+
const cachedFormula = cacheMap.get(functionText);
|
|
3098
|
+
cellValue.setValue(row, col, { xf: cachedFormula });
|
|
3099
|
+
return;
|
|
3100
|
+
}
|
|
3101
|
+
const newFormula = this._lexerTreeBuilder.getNewFormulaWithPrefix(functionText, this._functionService.hasExecutor.bind(this._functionService));
|
|
3102
|
+
if (newFormula) {
|
|
3103
|
+
cellValue.setValue(row, col, { xf: newFormula });
|
|
3104
|
+
cacheMap.set(functionText, newFormula);
|
|
3105
|
+
}
|
|
3106
|
+
});
|
|
3107
|
+
this._commandService.executeCommand(SetRangeValuesMutation.id, {
|
|
3108
|
+
unitId,
|
|
3109
|
+
subUnitId,
|
|
3110
|
+
cellValue: cellValue.getMatrix()
|
|
3111
|
+
}, {
|
|
3112
|
+
onlyLocal: true,
|
|
3113
|
+
fromFormula: true
|
|
3081
3114
|
});
|
|
3082
3115
|
});
|
|
3083
3116
|
cacheMap.clear();
|
|
3084
3117
|
}
|
|
3118
|
+
_forEachSheetSnapshotData(snapshotData, iterator) {
|
|
3119
|
+
if (!snapshotData) return;
|
|
3120
|
+
const workbooks = this._univerInstanceService.getAllUnitsForType(UniverInstanceType.UNIVER_SHEET);
|
|
3121
|
+
for (const workbook of workbooks) {
|
|
3122
|
+
const unitId = workbook.getUnitId();
|
|
3123
|
+
const subUnitData = snapshotData[unitId];
|
|
3124
|
+
if (!subUnitData) continue;
|
|
3125
|
+
for (const worksheet of workbook.getSheets()) {
|
|
3126
|
+
const subUnitId = worksheet.getSheetId();
|
|
3127
|
+
const data = subUnitData[subUnitId];
|
|
3128
|
+
if (data == null) continue;
|
|
3129
|
+
iterator(unitId, subUnitId, data);
|
|
3130
|
+
}
|
|
3131
|
+
}
|
|
3132
|
+
}
|
|
3085
3133
|
_writeArrayFormulaToSnapshot(arrayFormulaRange, arrayFormulaCellData, arrayFormulaEmbedded) {
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
fromFormula: true
|
|
3099
|
-
});
|
|
3134
|
+
this._forEachSheetSnapshotData(arrayFormulaRange, (unitId, subUnitId, rangeData) => {
|
|
3135
|
+
const cellValue = new ObjectMatrix();
|
|
3136
|
+
new ObjectMatrix(rangeData).forValue((row, col, value) => {
|
|
3137
|
+
cellValue.setValue(row, col, { ref: serializeRange(value) });
|
|
3138
|
+
});
|
|
3139
|
+
this._commandService.executeCommand(SetRangeValuesMutation.id, {
|
|
3140
|
+
unitId,
|
|
3141
|
+
subUnitId,
|
|
3142
|
+
cellValue: cellValue.getMatrix()
|
|
3143
|
+
}, {
|
|
3144
|
+
onlyLocal: true,
|
|
3145
|
+
fromFormula: true
|
|
3100
3146
|
});
|
|
3101
3147
|
});
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
fromFormula: true
|
|
3122
|
-
});
|
|
3148
|
+
this._forEachSheetSnapshotData(arrayFormulaEmbedded, (unitId, subUnitId, rangeData) => {
|
|
3149
|
+
const cellValue = new ObjectMatrix();
|
|
3150
|
+
new ObjectMatrix(rangeData).forValue((row, col) => {
|
|
3151
|
+
var _arrayFormulaRange$un;
|
|
3152
|
+
if (arrayFormulaRange === null || arrayFormulaRange === void 0 || (_arrayFormulaRange$un = arrayFormulaRange[unitId]) === null || _arrayFormulaRange$un === void 0 || (_arrayFormulaRange$un = _arrayFormulaRange$un[subUnitId]) === null || _arrayFormulaRange$un === void 0 || (_arrayFormulaRange$un = _arrayFormulaRange$un[row]) === null || _arrayFormulaRange$un === void 0 ? void 0 : _arrayFormulaRange$un[col]) return;
|
|
3153
|
+
cellValue.setValue(row, col, { ref: serializeRange({
|
|
3154
|
+
startRow: row,
|
|
3155
|
+
endRow: row,
|
|
3156
|
+
startColumn: col,
|
|
3157
|
+
endColumn: col
|
|
3158
|
+
}) });
|
|
3159
|
+
});
|
|
3160
|
+
this._commandService.executeCommand(SetRangeValuesMutation.id, {
|
|
3161
|
+
unitId,
|
|
3162
|
+
subUnitId,
|
|
3163
|
+
cellValue: cellValue.getMatrix()
|
|
3164
|
+
}, {
|
|
3165
|
+
onlyLocal: true,
|
|
3166
|
+
fromFormula: true
|
|
3123
3167
|
});
|
|
3124
3168
|
});
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
fromFormula: true
|
|
3134
|
-
});
|
|
3169
|
+
this._forEachSheetSnapshotData(arrayFormulaCellData, (unitId, subUnitId, rowData) => {
|
|
3170
|
+
this._commandService.executeCommand(SetRangeValuesMutation.id, {
|
|
3171
|
+
unitId,
|
|
3172
|
+
subUnitId,
|
|
3173
|
+
cellValue: rowData
|
|
3174
|
+
}, {
|
|
3175
|
+
onlyLocal: true,
|
|
3176
|
+
fromFormula: true
|
|
3135
3177
|
});
|
|
3136
3178
|
});
|
|
3137
3179
|
}
|
|
@@ -3166,11 +3208,12 @@ let ArrayFormulaCellInterceptorController = class ArrayFormulaCellInterceptorCon
|
|
|
3166
3208
|
ArrayFormulaCellInterceptorController = __decorate([
|
|
3167
3209
|
__decorateParam(0, ICommandService),
|
|
3168
3210
|
__decorateParam(1, IConfigService),
|
|
3169
|
-
__decorateParam(2,
|
|
3170
|
-
__decorateParam(3, Inject(
|
|
3171
|
-
__decorateParam(4, Inject(
|
|
3172
|
-
__decorateParam(5,
|
|
3173
|
-
__decorateParam(6,
|
|
3211
|
+
__decorateParam(2, IUniverInstanceService),
|
|
3212
|
+
__decorateParam(3, Inject(SheetInterceptorService)),
|
|
3213
|
+
__decorateParam(4, Inject(FormulaDataModel)),
|
|
3214
|
+
__decorateParam(5, Inject(LexerTreeBuilder)),
|
|
3215
|
+
__decorateParam(6, IFunctionService),
|
|
3216
|
+
__decorateParam(7, IDefinedNamesService)
|
|
3174
3217
|
], ArrayFormulaCellInterceptorController);
|
|
3175
3218
|
|
|
3176
3219
|
//#endregion
|
|
@@ -16011,7 +16054,7 @@ let DefinedNameController = class DefinedNameController extends Disposable {
|
|
|
16011
16054
|
const definedNames = this._definedNamesService.getDefinedNameMap(this._preUnitId);
|
|
16012
16055
|
if (!definedNames) return;
|
|
16013
16056
|
const functionList = [];
|
|
16014
|
-
|
|
16057
|
+
Object.values(definedNames).forEach((value) => {
|
|
16015
16058
|
const { name } = value;
|
|
16016
16059
|
functionList.push(name);
|
|
16017
16060
|
});
|
|
@@ -16029,7 +16072,7 @@ let DefinedNameController = class DefinedNameController extends Disposable {
|
|
|
16029
16072
|
if (!definedNames) return;
|
|
16030
16073
|
const functionList = [];
|
|
16031
16074
|
this._preUnitId = _unitId;
|
|
16032
|
-
|
|
16075
|
+
Object.values(definedNames).forEach((value) => {
|
|
16033
16076
|
const { name, comment, formulaOrRefString, localSheetId } = value;
|
|
16034
16077
|
if (this._descriptionService.hasDescription(name)) return;
|
|
16035
16078
|
if (localSheetId == null || localSheetId === SCOPE_WORKBOOK_VALUE_DEFINED_NAME || localSheetId === _subUnitId) functionList.push({
|
|
@@ -16046,7 +16089,7 @@ let DefinedNameController = class DefinedNameController extends Disposable {
|
|
|
16046
16089
|
const definedNames = this._definedNamesService.getDefinedNameMap(unitId);
|
|
16047
16090
|
if (!definedNames) return;
|
|
16048
16091
|
const functionList = [];
|
|
16049
|
-
|
|
16092
|
+
Object.values(definedNames).forEach((value) => {
|
|
16050
16093
|
const { name, localSheetId } = value;
|
|
16051
16094
|
if (localSheetId !== SCOPE_WORKBOOK_VALUE_DEFINED_NAME && localSheetId !== subUnitId) functionList.push(name);
|
|
16052
16095
|
});
|