@univerjs/sheets 1.0.4 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/facade.js +80 -40
- package/lib/cjs/index.js +322 -186
- package/lib/es/facade.js +76 -36
- package/lib/es/index.js +298 -164
- package/lib/facade.js +76 -36
- package/lib/index.js +298 -164
- package/lib/types/commands/commands/set-workbook-calculation-settings.command.d.ts +18 -0
- package/lib/types/commands/mutations/set-workbook-calculation-settings.mutation.d.ts +21 -0
- package/lib/types/config/config.d.ts +8 -0
- package/lib/types/controllers/auto-fill.controller.d.ts +3 -0
- package/lib/types/controllers/permission/sheet-permission-check.controller.d.ts +10 -4
- package/lib/types/facade/f-range.d.ts +2 -1
- package/lib/types/facade/f-workbook.d.ts +31 -1
- package/lib/types/index.d.ts +3 -0
- package/lib/types/services/auto-fill/auto-fill.service.d.ts +3 -3
- package/lib/types/services/auto-fill/type.d.ts +8 -1
- package/lib/types/services/permission/workbook-permission/util.d.ts +2 -2
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +2 -2
- package/package.json +10 -10
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AUTO_HEIGHT_FOR_MERGED_CELLS, BORDER_KEYS, BORDER_STYLE_KEYS, BooleanNumber, BorderStyleTypes, BorderType, BuildTextUtils, COLOR_STYLE_KEYS, CellModeEnum, CellValueType, CommandType, CustomCommandExecutionError, DependentOn, Dimension, Direction, Disposable, DisposableCollection, DocumentDataModel, ErrorService, FontItalic, FontWeight, HorizontalAlign, IAuthzIoService, ICommandService, IConfigService, IConfirmService, IContextService, ILogService, IPermissionService, IResourceManagerService, IS_ROW_STYLE_PRECEDE_COLUMN_STYLE, IUndoRedoService, IUniverInstanceService, Inject, Injector, InterceptorEffectEnum, InterceptorManager, LRUMap, LocaleService, MAX_COLUMN_COUNT, MAX_ROW_COUNT, ObjectMatrix, Optional, PADDING_KEYS, PermissionStatus, Plugin, RANGE_TYPE, RTree, Range, Rectangle, RxDisposable, STYLE_KEYS, Styles, TEXT_DECORATION_KEYS, TEXT_ROTATION_KEYS, TextX, Tools, UniverInstanceType, UserManagerService, WorksheetHiddenState, WrapStrategy, cellToRange, cloneWorksheetData, composeInterceptors, concatMatrixArray, createIdentifier, createInterceptorKey, createRowColIter, generateRandomId, getArrayLength, getIntersectRange, getNumfmtLocaleTag, getNumfmtParseValueFilter, isBooleanString, isDefaultFormat, isFormulaId, isFormulaString, isICellData, isRealNum, isSafeNumeric, isTextFormat, mapObjectMatrix, merge, mergeIntervals, mergeOverrideWithDependencies, mergeWorksheetSnapshotWithDefault, moveMatrixArray, normalizeTextRuns, numfmt, regexp, registerDependencies, remove, selectionToArray, sequenceExecute, sliceMatrixArray, spliceArray, throttle, toDisposable, touchDependencies, willLoseNumericPrecision } from "@univerjs/core";
|
|
1
|
+
import { AUTO_HEIGHT_FOR_MERGED_CELLS, BORDER_KEYS, BORDER_STYLE_KEYS, BooleanNumber, BorderStyleTypes, BorderType, BuildTextUtils, COLOR_STYLE_KEYS, CellModeEnum, CellValueType, CommandType, CustomCommandExecutionError, DependentOn, Dimension, Direction, Disposable, DisposableCollection, DocumentDataModel, ErrorService, FontItalic, FontWeight, HorizontalAlign, IAuthzIoService, ICommandService, IConfigService, IConfirmService, IContextService, ILogService, IPermissionService, IResourceManagerService, IS_ROW_STYLE_PRECEDE_COLUMN_STYLE, IUndoRedoService, IUniverInstanceService, Inject, Injector, InterceptorEffectEnum, InterceptorManager, LRUMap, LocaleService, MAX_COLUMN_COUNT, MAX_ROW_COUNT, ObjectMatrix, Optional, PADDING_KEYS, PermissionStatus, Plugin, RANGE_TYPE, RTree, Range, Rectangle, RxDisposable, SHEET_TEXT_LINE_GAP, STYLE_KEYS, Styles, TEXT_DECORATION_KEYS, TEXT_ROTATION_KEYS, TextX, Tools, UniverInstanceType, UserManagerService, WorksheetHiddenState, WrapStrategy, cellToRange, cloneWorksheetData, composeInterceptors, concatMatrixArray, createIdentifier, createInterceptorKey, createRowColIter, generateRandomId, getArrayLength, getIntersectRange, getNumfmtLocaleTag, getNumfmtParseValueFilter, isBooleanString, isDefaultFormat, isFormulaId, isFormulaString, isICellData, isRealNum, isSafeNumeric, isTextFormat, mapObjectMatrix, merge, mergeIntervals, mergeOverrideWithDependencies, mergeWorksheetSnapshotWithDefault, moveMatrixArray, moveRangeByOffset, normalizeTextRuns, normalizeWorkbookCalculationSettings, numfmt, regexp, registerDependencies, remove, selectionToArray, sequenceExecute, sliceMatrixArray, spliceArray, throttle, toDisposable, touchDependencies, willLoseNumericPrecision } from "@univerjs/core";
|
|
2
2
|
import { BehaviorSubject, Subject, distinctUntilChanged, filter, map, merge as merge$1, of, share, shareReplay, skip, switchMap, take, takeUntil } from "rxjs";
|
|
3
|
-
import { IDefinedNamesService, LexerTreeBuilder, RemoveDefinedNameMutation, SetDefinedNameMutation, SetDefinedNameMutationFactory, SetFormulaCalculationResultMutation, UniverFormulaEnginePlugin,
|
|
3
|
+
import { FormulaDataModel, IDefinedNamesService, IFunctionService, LexerTreeBuilder, RemoveDefinedNameMutation, SetDefinedNameMutation, SetDefinedNameMutationFactory, SetFormulaCalculationResultMutation, UniverFormulaEnginePlugin, deserializeRangeWithSheetWithCache, handleNumfmtInCell, handleRefStringInfo, isReferenceStringWithEffectiveColumn, matchToken, normalizeFormulaUnitName, operatorToken, sequenceNodeType, stripErrorMargin } from "@univerjs/engine-formula";
|
|
4
4
|
import { SpreadsheetSkeleton, cjk, precisionTo } from "@univerjs/engine-render";
|
|
5
5
|
import { UnitAction, UnitObject } from "@univerjs/protocol";
|
|
6
6
|
import { filter as filter$1, map as map$1, takeUntil as takeUntil$1 } from "rxjs/operators";
|
|
@@ -218,7 +218,7 @@ const RangeThemeInterceptorId = "sheet.interceptor.range-theme-id";
|
|
|
218
218
|
const IgnoreRangeThemeInterceptorKey = "sheet.interceptor.ignore-range-theme";
|
|
219
219
|
|
|
220
220
|
//#endregion
|
|
221
|
-
//#region \0@oxc-project+runtime@0.
|
|
221
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/typeof.js
|
|
222
222
|
function _typeof(o) {
|
|
223
223
|
"@babel/helpers - typeof";
|
|
224
224
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -229,7 +229,7 @@ function _typeof(o) {
|
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
//#endregion
|
|
232
|
-
//#region \0@oxc-project+runtime@0.
|
|
232
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPrimitive.js
|
|
233
233
|
function toPrimitive(t, r) {
|
|
234
234
|
if ("object" != _typeof(t) || !t) return t;
|
|
235
235
|
var e = t[Symbol.toPrimitive];
|
|
@@ -242,14 +242,14 @@ function toPrimitive(t, r) {
|
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
//#endregion
|
|
245
|
-
//#region \0@oxc-project+runtime@0.
|
|
245
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPropertyKey.js
|
|
246
246
|
function toPropertyKey(t) {
|
|
247
247
|
var i = toPrimitive(t, "string");
|
|
248
248
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
//#endregion
|
|
252
|
-
//#region \0@oxc-project+runtime@0.
|
|
252
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/defineProperty.js
|
|
253
253
|
function _defineProperty(e, r, t) {
|
|
254
254
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
255
255
|
value: t,
|
|
@@ -260,7 +260,7 @@ function _defineProperty(e, r, t) {
|
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
//#endregion
|
|
263
|
-
//#region \0@oxc-project+runtime@0.
|
|
263
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorateParam.js
|
|
264
264
|
function __decorateParam(paramIndex, decorator) {
|
|
265
265
|
return function(target, key) {
|
|
266
266
|
decorator(target, key, paramIndex);
|
|
@@ -268,7 +268,7 @@ function __decorateParam(paramIndex, decorator) {
|
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
//#endregion
|
|
271
|
-
//#region \0@oxc-project+runtime@0.
|
|
271
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorate.js
|
|
272
272
|
function __decorate(decorators, target, key, desc) {
|
|
273
273
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
274
274
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -11971,6 +11971,7 @@ let AutoFillService = class AutoFillService extends Disposable {
|
|
|
11971
11971
|
direction = Direction.RIGHT;
|
|
11972
11972
|
target.startColumn = source.endColumn + 1;
|
|
11973
11973
|
} else return false;
|
|
11974
|
+
this.setShowMenu(false);
|
|
11974
11975
|
this.direction = direction;
|
|
11975
11976
|
const autoFillSource = this._injector.invoke((accessor) => rangeToDiscreteRange(source, accessor, unitId, subUnitId));
|
|
11976
11977
|
const autoFillTarget = this._injector.invoke((accessor) => rangeToDiscreteRange(target, accessor, unitId, subUnitId));
|
|
@@ -12023,7 +12024,7 @@ let AutoFillService = class AutoFillService extends Disposable {
|
|
|
12023
12024
|
getAllHooks() {
|
|
12024
12025
|
return this._hooks;
|
|
12025
12026
|
}
|
|
12026
|
-
getActiveHooks() {
|
|
12027
|
+
getActiveHooks(applyType = this.applyType) {
|
|
12027
12028
|
const { source, target, unitId, subUnitId } = this.autoFillLocation || {};
|
|
12028
12029
|
if (!source || !target || !unitId || !subUnitId) return [];
|
|
12029
12030
|
const enabledHooks = this._hooks.filter((h) => {
|
|
@@ -12033,7 +12034,7 @@ let AutoFillService = class AutoFillService extends Disposable {
|
|
|
12033
12034
|
target,
|
|
12034
12035
|
unitId,
|
|
12035
12036
|
subUnitId
|
|
12036
|
-
}, this._direction,
|
|
12037
|
+
}, this._direction, applyType)) === true;
|
|
12037
12038
|
});
|
|
12038
12039
|
const onlyHooks = enabledHooks.filter((h) => h.type === "ONLY");
|
|
12039
12040
|
if (onlyHooks.length > 0) return this._getOneByPriority(onlyHooks);
|
|
@@ -12082,7 +12083,6 @@ let AutoFillService = class AutoFillService extends Disposable {
|
|
|
12082
12083
|
}
|
|
12083
12084
|
fillData(applyType) {
|
|
12084
12085
|
var _activeWorkbook$getAc;
|
|
12085
|
-
this.applyType = applyType;
|
|
12086
12086
|
const activeWorkbook = this._univerInstanceService.getCurrentUnitOfType(UniverInstanceType.UNIVER_SHEET);
|
|
12087
12087
|
const activeUnitId = activeWorkbook === null || activeWorkbook === void 0 ? void 0 : activeWorkbook.getUnitId();
|
|
12088
12088
|
const activeSubUnitId = activeWorkbook === null || activeWorkbook === void 0 || (_activeWorkbook$getAc = activeWorkbook.getActiveSheet()) === null || _activeWorkbook$getAc === void 0 ? void 0 : _activeWorkbook$getAc.getSheetId();
|
|
@@ -12093,12 +12093,30 @@ let AutoFillService = class AutoFillService extends Disposable {
|
|
|
12093
12093
|
const worksheet = workbook.getSheetBySheetId(subUnitId);
|
|
12094
12094
|
if (!worksheet) return false;
|
|
12095
12095
|
const direction = this.direction;
|
|
12096
|
+
const activeHooks = this.getActiveHooks(applyType);
|
|
12097
|
+
const fillCallbacks = activeHooks.map((hook) => {
|
|
12098
|
+
var _hook$onPrepareFillDa;
|
|
12099
|
+
return ((_hook$onPrepareFillDa = hook.onPrepareFillData) === null || _hook$onPrepareFillDa === void 0 ? void 0 : _hook$onPrepareFillDa.call(hook, {
|
|
12100
|
+
source,
|
|
12101
|
+
target,
|
|
12102
|
+
unitId,
|
|
12103
|
+
subUnitId
|
|
12104
|
+
}, direction, applyType)) ?? (() => {
|
|
12105
|
+
var _hook$onFillData;
|
|
12106
|
+
return (_hook$onFillData = hook.onFillData) === null || _hook$onFillData === void 0 ? void 0 : _hook$onFillData.call(hook, {
|
|
12107
|
+
source,
|
|
12108
|
+
target,
|
|
12109
|
+
unitId,
|
|
12110
|
+
subUnitId
|
|
12111
|
+
}, direction, applyType);
|
|
12112
|
+
});
|
|
12113
|
+
});
|
|
12114
|
+
this.applyType = applyType;
|
|
12096
12115
|
if (this._prevUndos.length > 0) this._prevUndos.forEach((undo) => {
|
|
12097
12116
|
this._commandService.syncExecuteCommand(undo.id, undo.params);
|
|
12098
12117
|
});
|
|
12099
12118
|
this._prevUndos = [];
|
|
12100
12119
|
const selection = Rectangle.union(discreteRangeToRange(source), discreteRangeToRange(target));
|
|
12101
|
-
const activeHooks = this.getActiveHooks();
|
|
12102
12120
|
if (unitId === activeUnitId && subUnitId === activeSubUnitId) this._commandService.syncExecuteCommand(SetSelectionsOperation.id, {
|
|
12103
12121
|
selections: [{
|
|
12104
12122
|
primary: getPrimaryForRange({
|
|
@@ -12117,14 +12135,8 @@ let AutoFillService = class AutoFillService extends Disposable {
|
|
|
12117
12135
|
});
|
|
12118
12136
|
const undos = [];
|
|
12119
12137
|
const redos = [];
|
|
12120
|
-
|
|
12121
|
-
|
|
12122
|
-
const { undos: hookUndos, redos: hookRedos } = ((_hook$onFillData = hook.onFillData) === null || _hook$onFillData === void 0 ? void 0 : _hook$onFillData.call(hook, {
|
|
12123
|
-
source,
|
|
12124
|
-
target,
|
|
12125
|
-
unitId,
|
|
12126
|
-
subUnitId
|
|
12127
|
-
}, direction, applyType)) || {};
|
|
12138
|
+
fillCallbacks.forEach((fill) => {
|
|
12139
|
+
const { undos: hookUndos, redos: hookRedos } = fill() || {};
|
|
12128
12140
|
if (hookUndos) undos.push(...hookUndos);
|
|
12129
12141
|
if (hookRedos) redos.push(...hookRedos);
|
|
12130
12142
|
});
|
|
@@ -14720,6 +14732,72 @@ const SetTabColorCommand = {
|
|
|
14720
14732
|
}
|
|
14721
14733
|
};
|
|
14722
14734
|
|
|
14735
|
+
//#endregion
|
|
14736
|
+
//#region src/services/permission/permission-point/workbook/editable.ts
|
|
14737
|
+
var WorkbookEditablePermission = class {
|
|
14738
|
+
constructor(unitId) {
|
|
14739
|
+
this.unitId = unitId;
|
|
14740
|
+
_defineProperty(this, "id", void 0);
|
|
14741
|
+
_defineProperty(this, "value", true);
|
|
14742
|
+
_defineProperty(this, "type", UnitObject.Workbook);
|
|
14743
|
+
_defineProperty(this, "status", PermissionStatus.INIT);
|
|
14744
|
+
_defineProperty(this, "subType", UnitAction.Edit);
|
|
14745
|
+
this.unitId = unitId;
|
|
14746
|
+
this.id = `${this.type}.${UnitAction.Edit}_${unitId}`;
|
|
14747
|
+
}
|
|
14748
|
+
};
|
|
14749
|
+
|
|
14750
|
+
//#endregion
|
|
14751
|
+
//#region src/commands/mutations/set-workbook-calculation-settings.mutation.ts
|
|
14752
|
+
const SetWorkbookCalculationSettingsMutation = {
|
|
14753
|
+
id: "sheet.mutation.set-workbook-calculation-settings",
|
|
14754
|
+
type: CommandType.MUTATION,
|
|
14755
|
+
handler: (accessor, params) => {
|
|
14756
|
+
const workbook = accessor.get(IUniverInstanceService).getUnit(params.unitId, UniverInstanceType.UNIVER_SHEET);
|
|
14757
|
+
if (!workbook) return false;
|
|
14758
|
+
workbook.setCalculationSettings(params.settings);
|
|
14759
|
+
return true;
|
|
14760
|
+
}
|
|
14761
|
+
};
|
|
14762
|
+
|
|
14763
|
+
//#endregion
|
|
14764
|
+
//#region src/commands/commands/set-workbook-calculation-settings.command.ts
|
|
14765
|
+
const SetWorkbookCalculationSettingsCommand = {
|
|
14766
|
+
id: "sheet.command.set-workbook-calculation-settings",
|
|
14767
|
+
type: CommandType.COMMAND,
|
|
14768
|
+
handler: (accessor, params) => {
|
|
14769
|
+
if (!params) return false;
|
|
14770
|
+
const target = getSheetCommandTargetWorkbook(accessor.get(IUniverInstanceService), params);
|
|
14771
|
+
if (!target) return false;
|
|
14772
|
+
const permission = accessor.get(IPermissionService).getPermissionPoint(new WorkbookEditablePermission(params.unitId).id);
|
|
14773
|
+
if (permission && !permission.value) return false;
|
|
14774
|
+
const undoParams = {
|
|
14775
|
+
unitId: params.unitId,
|
|
14776
|
+
settings: target.workbook.getCalculationSettings()
|
|
14777
|
+
};
|
|
14778
|
+
const redoParams = {
|
|
14779
|
+
unitId: params.unitId,
|
|
14780
|
+
settings: normalizeWorkbookCalculationSettings(params.settings)
|
|
14781
|
+
};
|
|
14782
|
+
if (undoParams.settings.iterativeCalculation === redoParams.settings.iterativeCalculation && undoParams.settings.maxIterations === redoParams.settings.maxIterations && undoParams.settings.maxChange === redoParams.settings.maxChange) return true;
|
|
14783
|
+
if (accessor.get(ICommandService).syncExecuteCommand(SetWorkbookCalculationSettingsMutation.id, redoParams)) {
|
|
14784
|
+
accessor.get(IUndoRedoService).pushUndoRedo({
|
|
14785
|
+
unitID: params.unitId,
|
|
14786
|
+
undoMutations: [{
|
|
14787
|
+
id: SetWorkbookCalculationSettingsMutation.id,
|
|
14788
|
+
params: undoParams
|
|
14789
|
+
}],
|
|
14790
|
+
redoMutations: [{
|
|
14791
|
+
id: SetWorkbookCalculationSettingsMutation.id,
|
|
14792
|
+
params: redoParams
|
|
14793
|
+
}]
|
|
14794
|
+
});
|
|
14795
|
+
return true;
|
|
14796
|
+
}
|
|
14797
|
+
return false;
|
|
14798
|
+
}
|
|
14799
|
+
};
|
|
14800
|
+
|
|
14723
14801
|
//#endregion
|
|
14724
14802
|
//#region src/commands/mutations/set-workbook-name.mutation.ts
|
|
14725
14803
|
const SetWorkbookNameMutation = {
|
|
@@ -15593,21 +15671,6 @@ var WorkbookDuplicatePermission = class {
|
|
|
15593
15671
|
}
|
|
15594
15672
|
};
|
|
15595
15673
|
|
|
15596
|
-
//#endregion
|
|
15597
|
-
//#region src/services/permission/permission-point/workbook/editable.ts
|
|
15598
|
-
var WorkbookEditablePermission = class {
|
|
15599
|
-
constructor(unitId) {
|
|
15600
|
-
this.unitId = unitId;
|
|
15601
|
-
_defineProperty(this, "id", void 0);
|
|
15602
|
-
_defineProperty(this, "value", true);
|
|
15603
|
-
_defineProperty(this, "type", UnitObject.Workbook);
|
|
15604
|
-
_defineProperty(this, "status", PermissionStatus.INIT);
|
|
15605
|
-
_defineProperty(this, "subType", UnitAction.Edit);
|
|
15606
|
-
this.unitId = unitId;
|
|
15607
|
-
this.id = `${this.type}.${UnitAction.Edit}_${unitId}`;
|
|
15608
|
-
}
|
|
15609
|
-
};
|
|
15610
|
-
|
|
15611
15674
|
//#endregion
|
|
15612
15675
|
//#region src/services/permission/permission-point/workbook/export.ts
|
|
15613
15676
|
var WorkbookExportPermission = class {
|
|
@@ -17421,8 +17484,9 @@ let AutoFillController = class AutoFillController extends Disposable {
|
|
|
17421
17484
|
onBeforeFillData: (location, direction) => {
|
|
17422
17485
|
return this._presetAndCacheData(location, direction);
|
|
17423
17486
|
},
|
|
17424
|
-
|
|
17425
|
-
|
|
17487
|
+
onPrepareFillData: (location, direction, applyType) => {
|
|
17488
|
+
const prepared = this._prepareFillData(location, direction, applyType);
|
|
17489
|
+
return () => this._fillData(location, direction, applyType, prepared);
|
|
17426
17490
|
}
|
|
17427
17491
|
}));
|
|
17428
17492
|
}
|
|
@@ -17471,7 +17535,7 @@ let AutoFillController = class AutoFillController extends Disposable {
|
|
|
17471
17535
|
const arrData = this._applyFunctions(copySquad, len, direction, applyType, customApplyFunctions, copyDataPiece, location);
|
|
17472
17536
|
const arrIndex = getDataIndex(csLen, asLen, copySquad.index);
|
|
17473
17537
|
applyDataInTypes[type].push({
|
|
17474
|
-
data: arrData,
|
|
17538
|
+
data: arrData ?? [],
|
|
17475
17539
|
index: arrIndex
|
|
17476
17540
|
});
|
|
17477
17541
|
});
|
|
@@ -17630,28 +17694,9 @@ let AutoFillController = class AutoFillController extends Disposable {
|
|
|
17630
17694
|
}
|
|
17631
17695
|
return applyMergeRanges;
|
|
17632
17696
|
}
|
|
17633
|
-
|
|
17634
|
-
|
|
17635
|
-
const
|
|
17636
|
-
const redos = [];
|
|
17637
|
-
let hasStyle = true;
|
|
17638
|
-
if (applyType === "NO_FORMAT") {
|
|
17639
|
-
hasStyle = false;
|
|
17640
|
-
applyType = "SERIES";
|
|
17641
|
-
}
|
|
17642
|
-
const { source, target, unitId, subUnitId } = location;
|
|
17643
|
-
if (!source || !target || direction == null) return {
|
|
17644
|
-
undos,
|
|
17645
|
-
redos
|
|
17646
|
-
};
|
|
17647
|
-
const sourceRange = discreteRangeToRange(source);
|
|
17648
|
-
const targetRange = discreteRangeToRange(target);
|
|
17649
|
-
const { cols: targetCols, rows: targetRows } = target;
|
|
17650
|
-
const { cols: sourceCols, rows: sourceRows } = source;
|
|
17651
|
-
const copyData = this._copyData;
|
|
17652
|
-
let csLen;
|
|
17653
|
-
if (direction === Direction.DOWN || direction === Direction.UP) csLen = sourceRows.length;
|
|
17654
|
-
else csLen = sourceCols.length;
|
|
17697
|
+
_getFillCells(location, direction, applyType, hasStyle, csLen) {
|
|
17698
|
+
const { rows: targetRows, cols: targetCols } = location.target;
|
|
17699
|
+
const copyData = Tools.deepClone(this._copyData);
|
|
17655
17700
|
const applyDatas = [];
|
|
17656
17701
|
if (direction === Direction.DOWN || direction === Direction.UP) {
|
|
17657
17702
|
const asLen = targetRows.length;
|
|
@@ -17682,20 +17727,26 @@ let AutoFillController = class AutoFillController extends Disposable {
|
|
|
17682
17727
|
applyDatas.push(row);
|
|
17683
17728
|
});
|
|
17684
17729
|
}
|
|
17685
|
-
|
|
17730
|
+
return applyDatas;
|
|
17731
|
+
}
|
|
17732
|
+
_prepareFillData(location, direction, applyType) {
|
|
17733
|
+
var _this$_univerInstance4;
|
|
17734
|
+
const hasStyle = applyType !== "NO_FORMAT";
|
|
17735
|
+
const effectiveApplyType = hasStyle ? applyType : "SERIES";
|
|
17736
|
+
const { source, target, unitId } = location;
|
|
17737
|
+
const sourceRange = discreteRangeToRange(source);
|
|
17738
|
+
const targetRange = discreteRangeToRange(target);
|
|
17739
|
+
const { cols: targetCols, rows: targetRows } = target;
|
|
17740
|
+
const { cols: sourceCols, rows: sourceRows } = source;
|
|
17741
|
+
let csLen;
|
|
17742
|
+
if (direction === Direction.DOWN || direction === Direction.UP) csLen = sourceRows.length;
|
|
17743
|
+
else csLen = sourceCols.length;
|
|
17744
|
+
const applyDatas = this._getFillCells(location, direction, effectiveApplyType, hasStyle, csLen);
|
|
17745
|
+
const applyMergeRanges = hasStyle ? this._getMergeApplyData(sourceRange, targetRange, direction, csLen, location) : [];
|
|
17686
17746
|
const style = (_this$_univerInstance4 = this._univerInstanceService.getUnit(unitId)) === null || _this$_univerInstance4 === void 0 ? void 0 : _this$_univerInstance4.getStyles();
|
|
17687
|
-
|
|
17688
|
-
applyMergeRanges = this._getMergeApplyData(sourceRange, targetRange, direction, csLen, location);
|
|
17689
|
-
applyDatas.forEach((row) => {
|
|
17690
|
-
row.forEach((cellData) => {
|
|
17691
|
-
if (cellData && style) {
|
|
17692
|
-
if (style) cellData.s = style.getStyleByCell(cellData);
|
|
17693
|
-
}
|
|
17694
|
-
});
|
|
17695
|
-
});
|
|
17696
|
-
} else applyDatas.forEach((row, rowIndex) => {
|
|
17747
|
+
applyDatas.forEach((row, rowIndex) => {
|
|
17697
17748
|
row.forEach((cellData, colIndex) => {
|
|
17698
|
-
if (cellData && style) cellData.s = style.getStyleByCell(this._beforeApplyData[rowIndex][colIndex]) || null;
|
|
17749
|
+
if (cellData && style) cellData.s = hasStyle ? style.getStyleByCell(cellData) : style.getStyleByCell(this._beforeApplyData[rowIndex][colIndex]) || null;
|
|
17699
17750
|
});
|
|
17700
17751
|
});
|
|
17701
17752
|
if (applyType === "ONLY_FORMAT") applyDatas.forEach((row, rowIndex) => {
|
|
@@ -17711,30 +17762,59 @@ let AutoFillController = class AutoFillController extends Disposable {
|
|
|
17711
17762
|
}
|
|
17712
17763
|
});
|
|
17713
17764
|
});
|
|
17714
|
-
|
|
17715
|
-
|
|
17716
|
-
|
|
17717
|
-
|
|
17718
|
-
|
|
17719
|
-
|
|
17765
|
+
const cellValue = new ObjectMatrix();
|
|
17766
|
+
targetRows.forEach((row, rowIndex) => {
|
|
17767
|
+
targetCols.forEach((col, colIndex) => {
|
|
17768
|
+
const cell = applyDatas[rowIndex][colIndex];
|
|
17769
|
+
if (cell) cellValue.setValue(row, col, cell);
|
|
17770
|
+
});
|
|
17771
|
+
});
|
|
17772
|
+
const cellValueMatrix = cellValue.getMatrix();
|
|
17773
|
+
this._autoFillService.getActiveHooks(applyType).forEach((hook) => {
|
|
17774
|
+
var _hook$onValidateFillD;
|
|
17775
|
+
(_hook$onValidateFillD = hook.onValidateFillData) === null || _hook$onValidateFillD === void 0 || _hook$onValidateFillD.call(hook, location, direction, applyType, cellValueMatrix);
|
|
17776
|
+
});
|
|
17777
|
+
return {
|
|
17778
|
+
cellValue: cellValueMatrix,
|
|
17779
|
+
applyMergeRanges,
|
|
17780
|
+
hasStyle
|
|
17781
|
+
};
|
|
17782
|
+
}
|
|
17783
|
+
_getRemoveMergeMutations(location) {
|
|
17784
|
+
var _this$_univerInstance5;
|
|
17785
|
+
const { unitId, subUnitId, target } = location;
|
|
17786
|
+
const targetRange = discreteRangeToRange(target);
|
|
17787
|
+
const undos = [];
|
|
17788
|
+
const redos = [];
|
|
17789
|
+
const deleteMergeRanges = ((_this$_univerInstance5 = this._univerInstanceService.getUnit(unitId, UniverInstanceType.UNIVER_SHEET)) === null || _this$_univerInstance5 === void 0 || (_this$_univerInstance5 = _this$_univerInstance5.getSheetBySheetId(subUnitId)) === null || _this$_univerInstance5 === void 0 ? void 0 : _this$_univerInstance5.getMergeData().filter((merge) => Rectangle.intersects(merge, targetRange))) ?? [];
|
|
17790
|
+
if (deleteMergeRanges.length) {
|
|
17791
|
+
const removeMergeMutationParams = {
|
|
17792
|
+
unitId,
|
|
17793
|
+
subUnitId,
|
|
17794
|
+
ranges: deleteMergeRanges
|
|
17795
|
+
};
|
|
17796
|
+
const undoRemoveMergeMutationParams = this._injector.invoke(RemoveMergeUndoMutationFactory, removeMergeMutationParams);
|
|
17797
|
+
redos.push({
|
|
17798
|
+
id: RemoveWorksheetMergeMutation.id,
|
|
17799
|
+
params: removeMergeMutationParams
|
|
17800
|
+
});
|
|
17801
|
+
undos.unshift({
|
|
17802
|
+
id: AddWorksheetMergeMutation.id,
|
|
17803
|
+
params: undoRemoveMergeMutationParams
|
|
17720
17804
|
});
|
|
17721
|
-
if (deleteMergeRanges.length) {
|
|
17722
|
-
const removeMergeMutationParams = {
|
|
17723
|
-
unitId,
|
|
17724
|
-
subUnitId,
|
|
17725
|
-
ranges: deleteMergeRanges
|
|
17726
|
-
};
|
|
17727
|
-
const undoRemoveMergeMutationParams = this._injector.invoke(RemoveMergeUndoMutationFactory, removeMergeMutationParams);
|
|
17728
|
-
redos.push({
|
|
17729
|
-
id: RemoveWorksheetMergeMutation.id,
|
|
17730
|
-
params: removeMergeMutationParams
|
|
17731
|
-
});
|
|
17732
|
-
undos.unshift({
|
|
17733
|
-
id: AddWorksheetMergeMutation.id,
|
|
17734
|
-
params: undoRemoveMergeMutationParams
|
|
17735
|
-
});
|
|
17736
|
-
}
|
|
17737
17805
|
}
|
|
17806
|
+
return {
|
|
17807
|
+
undos,
|
|
17808
|
+
redos
|
|
17809
|
+
};
|
|
17810
|
+
}
|
|
17811
|
+
_fillData(location, direction, applyType, prepared) {
|
|
17812
|
+
const { target, unitId, subUnitId } = location;
|
|
17813
|
+
const { cellValue, applyMergeRanges, hasStyle } = prepared;
|
|
17814
|
+
const { undos, redos } = hasStyle ? this._getRemoveMergeMutations(location) : {
|
|
17815
|
+
undos: [],
|
|
17816
|
+
redos: []
|
|
17817
|
+
};
|
|
17738
17818
|
const clearMutationParams = {
|
|
17739
17819
|
subUnitId,
|
|
17740
17820
|
unitId,
|
|
@@ -17749,22 +17829,15 @@ let AutoFillController = class AutoFillController extends Disposable {
|
|
|
17749
17829
|
id: SetRangeValuesMutation.id,
|
|
17750
17830
|
params: undoClearMutationParams
|
|
17751
17831
|
});
|
|
17752
|
-
const cellValue = new ObjectMatrix();
|
|
17753
|
-
targetRows.forEach((row, rowIndex) => {
|
|
17754
|
-
targetCols.forEach((col, colIndex) => {
|
|
17755
|
-
if (applyDatas[rowIndex][colIndex]) cellValue.setValue(row, col, applyDatas[rowIndex][colIndex]);
|
|
17756
|
-
});
|
|
17757
|
-
});
|
|
17758
|
-
const cellValueMatrix = cellValue.getMatrix();
|
|
17759
17832
|
const setRangeValuesMutationParams = {
|
|
17760
17833
|
subUnitId,
|
|
17761
17834
|
unitId,
|
|
17762
|
-
cellValue
|
|
17835
|
+
cellValue
|
|
17763
17836
|
};
|
|
17764
17837
|
const undoSetRangeValuesMutationParams = this._injector.invoke(SetRangeValuesUndoMutationFactory, setRangeValuesMutationParams);
|
|
17765
|
-
this._autoFillService.getActiveHooks().forEach((hook) => {
|
|
17838
|
+
this._autoFillService.getActiveHooks(applyType).forEach((hook) => {
|
|
17766
17839
|
var _hook$onBeforeSubmit;
|
|
17767
|
-
(_hook$onBeforeSubmit = hook.onBeforeSubmit) === null || _hook$onBeforeSubmit === void 0 || _hook$onBeforeSubmit.call(hook, location, direction, applyType,
|
|
17840
|
+
(_hook$onBeforeSubmit = hook.onBeforeSubmit) === null || _hook$onBeforeSubmit === void 0 || _hook$onBeforeSubmit.call(hook, location, direction, applyType, cellValue);
|
|
17768
17841
|
});
|
|
17769
17842
|
undos.unshift({
|
|
17770
17843
|
id: SetRangeValuesMutation.id,
|
|
@@ -18121,7 +18194,7 @@ SheetsFreezeSyncController = __decorate([
|
|
|
18121
18194
|
//#endregion
|
|
18122
18195
|
//#region src/controllers/permission/sheet-permission-check.controller.ts
|
|
18123
18196
|
let SheetPermissionCheckController = class SheetPermissionCheckController extends Disposable {
|
|
18124
|
-
constructor(_commandService, _univerInstanceService, _permissionService, _selectionManagerService, _rangeProtectionRuleModel, _worksheetProtectionRuleModel, _localeService, _lexerTreeBuilder, _definedNamesService) {
|
|
18197
|
+
constructor(_commandService, _univerInstanceService, _permissionService, _selectionManagerService, _rangeProtectionRuleModel, _worksheetProtectionRuleModel, _localeService, _lexerTreeBuilder, _definedNamesService, _autoFillService, _formulaDataModel, _functionService) {
|
|
18125
18198
|
super();
|
|
18126
18199
|
this._commandService = _commandService;
|
|
18127
18200
|
this._univerInstanceService = _univerInstanceService;
|
|
@@ -18132,6 +18205,9 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
18132
18205
|
this._localeService = _localeService;
|
|
18133
18206
|
this._lexerTreeBuilder = _lexerTreeBuilder;
|
|
18134
18207
|
this._definedNamesService = _definedNamesService;
|
|
18208
|
+
this._autoFillService = _autoFillService;
|
|
18209
|
+
this._formulaDataModel = _formulaDataModel;
|
|
18210
|
+
this._functionService = _functionService;
|
|
18135
18211
|
_defineProperty(this, "disposableCollection", new DisposableCollection());
|
|
18136
18212
|
_defineProperty(this, "_triggerPermissionUIEvent$", new Subject());
|
|
18137
18213
|
_defineProperty(this, "triggerPermissionUIEvent$", this._triggerPermissionUIEvent$.asObservable());
|
|
@@ -18139,6 +18215,29 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
18139
18215
|
}
|
|
18140
18216
|
_initialize() {
|
|
18141
18217
|
this._commandExecutedListener();
|
|
18218
|
+
this.disposeWithMe(this._autoFillService.addHook({
|
|
18219
|
+
id: "permission-check",
|
|
18220
|
+
onValidateFillData: ({ unitId, subUnitId }, _direction, applyType, cellValue) => {
|
|
18221
|
+
if (applyType === "ONLY_FORMAT") return;
|
|
18222
|
+
const formulas = new ObjectMatrix(this._formulaDataModel.updateFormulaData(unitId, subUnitId, cellValue));
|
|
18223
|
+
new ObjectMatrix(cellValue).forValue((row, column) => {
|
|
18224
|
+
const formula = formulas.getValue(row, column);
|
|
18225
|
+
if (!(formula === null || formula === void 0 ? void 0 : formula.f)) return;
|
|
18226
|
+
const formulaString = this._lexerTreeBuilder.moveFormulaRefOffset(formula.f, formula.x ?? 0, formula.y ?? 0);
|
|
18227
|
+
if (!this._permissionCheckWithFormula({
|
|
18228
|
+
unitId,
|
|
18229
|
+
subUnitId,
|
|
18230
|
+
range: {
|
|
18231
|
+
startRow: row,
|
|
18232
|
+
endRow: row,
|
|
18233
|
+
startColumn: column,
|
|
18234
|
+
endColumn: column
|
|
18235
|
+
},
|
|
18236
|
+
value: { f: formulaString }
|
|
18237
|
+
})) this.blockExecuteWithoutPermission(this._localeService.t("sheets.permission.dialog.formulaErr"));
|
|
18238
|
+
});
|
|
18239
|
+
}
|
|
18240
|
+
}));
|
|
18142
18241
|
}
|
|
18143
18242
|
_commandExecutedListener() {
|
|
18144
18243
|
this.disposeWithMe(this._commandService.beforeCommandExecuted((commandInfo) => {
|
|
@@ -18463,61 +18562,18 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
18463
18562
|
_permissionCheckWithFormula(params) {
|
|
18464
18563
|
const target = getSheetCommandTarget(this._univerInstanceService, params);
|
|
18465
18564
|
if (!target) return false;
|
|
18466
|
-
const {
|
|
18565
|
+
const { unitId, subUnitId } = target;
|
|
18467
18566
|
const formulaString = params.value.f;
|
|
18468
18567
|
if (formulaString) {
|
|
18469
|
-
|
|
18470
|
-
const
|
|
18471
|
-
|
|
18472
|
-
|
|
18473
|
-
|
|
18474
|
-
|
|
18475
|
-
|
|
18476
|
-
|
|
18477
|
-
|
|
18478
|
-
if (sheetName) {
|
|
18479
|
-
const targetSheet = workbook.getSheetBySheetName(sheetName);
|
|
18480
|
-
if (!targetSheet) return true;
|
|
18481
|
-
const { startRow, endRow, startColumn, endColumn } = range;
|
|
18482
|
-
for (let r = startRow; r <= endRow; r++) for (let c = startColumn; c <= endColumn; c++) {
|
|
18483
|
-
var _cell$selectionProtec2;
|
|
18484
|
-
const cell = targetSheet.getCell(r, c);
|
|
18485
|
-
const permission = cell === null || cell === void 0 || (_cell$selectionProtec2 = cell.selectionProtection) === null || _cell$selectionProtec2 === void 0 ? void 0 : _cell$selectionProtec2[0];
|
|
18486
|
-
if ((permission === null || permission === void 0 ? void 0 : permission[UnitAction.View]) === false) return false;
|
|
18487
|
-
}
|
|
18488
|
-
}
|
|
18489
|
-
}
|
|
18490
|
-
return true;
|
|
18491
|
-
} else {
|
|
18492
|
-
const sequenceNodes = this._lexerTreeBuilder.sequenceNodesBuilder(formulaString);
|
|
18493
|
-
if (!sequenceNodes) return true;
|
|
18494
|
-
for (let i = 0; i < sequenceNodes.length; i++) {
|
|
18495
|
-
const node = sequenceNodes[i];
|
|
18496
|
-
if (typeof node === "string" || node.nodeType !== sequenceNodeType.REFERENCE) continue;
|
|
18497
|
-
const { token } = node;
|
|
18498
|
-
const { unitId: sequenceGridUnitId, sheetName, range } = deserializeRangeWithSheetWithCache(token);
|
|
18499
|
-
let sequenceGridWorkbook = workbook;
|
|
18500
|
-
if (sequenceGridUnitId && sequenceGridUnitId !== unitId) {
|
|
18501
|
-
const _sequenceGridWorkbook = this._univerInstanceService.getUnit(sequenceGridUnitId, UniverInstanceType.UNIVER_SHEET);
|
|
18502
|
-
if (!_sequenceGridWorkbook) return true;
|
|
18503
|
-
sequenceGridWorkbook = _sequenceGridWorkbook;
|
|
18504
|
-
}
|
|
18505
|
-
const sequenceGridWorksheet = sheetName ? sequenceGridWorkbook.getSheetBySheetName(sheetName) : sequenceGridWorkbook.getActiveSheet();
|
|
18506
|
-
if (!sequenceGridWorksheet) return true;
|
|
18507
|
-
if (sheetName) {
|
|
18508
|
-
const viewPermission = this._permissionService.getPermissionPoint(new WorksheetViewPermission(sequenceGridWorkbook.getUnitId(), sequenceGridWorksheet.getSheetId()).id);
|
|
18509
|
-
if (!viewPermission || viewPermission.value === false) return false;
|
|
18510
|
-
}
|
|
18511
|
-
const { startRow, endRow, startColumn, endColumn } = range;
|
|
18512
|
-
for (let r = startRow; r <= endRow; r++) for (let c = startColumn; c <= endColumn; c++) {
|
|
18513
|
-
var _cell$selectionProtec3;
|
|
18514
|
-
const cell = sequenceGridWorksheet.getCell(r, c);
|
|
18515
|
-
const permission = cell === null || cell === void 0 || (_cell$selectionProtec3 = cell.selectionProtection) === null || _cell$selectionProtec3 === void 0 ? void 0 : _cell$selectionProtec3[0];
|
|
18516
|
-
if ((permission === null || permission === void 0 ? void 0 : permission[UnitAction.View]) === false) return false;
|
|
18517
|
-
}
|
|
18518
|
-
}
|
|
18519
|
-
return true;
|
|
18520
|
-
}
|
|
18568
|
+
var _this$_selectionManag3;
|
|
18569
|
+
const ranges = params.range ? [params.range] : ((_this$_selectionManag3 = this._selectionManagerService.getCurrentSelections()) === null || _this$_selectionManag3 === void 0 ? void 0 : _this$_selectionManag3.map((selection) => selection.range)) ?? [];
|
|
18570
|
+
for (const range of ranges) for (let row = range.startRow; row <= range.endRow; row++) for (let column = range.startColumn; column <= range.endColumn; column++) if (!this._permissionCheckFormulaReferences(formulaString, {
|
|
18571
|
+
unitId,
|
|
18572
|
+
subUnitId,
|
|
18573
|
+
row,
|
|
18574
|
+
column
|
|
18575
|
+
})) return false;
|
|
18576
|
+
return true;
|
|
18521
18577
|
}
|
|
18522
18578
|
const { range } = params;
|
|
18523
18579
|
if (range) {
|
|
@@ -18528,6 +18584,73 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
18528
18584
|
}
|
|
18529
18585
|
return true;
|
|
18530
18586
|
}
|
|
18587
|
+
_getFormulaReferenceWorkbook(unitId, qualifier) {
|
|
18588
|
+
const workbook = this._univerInstanceService.getUnit(qualifier || unitId, UniverInstanceType.UNIVER_SHEET);
|
|
18589
|
+
if (workbook || !qualifier) return workbook;
|
|
18590
|
+
const workbooks = this._univerInstanceService.getAllUnitsForType(UniverInstanceType.UNIVER_SHEET).filter((item) => item.getSnapshot().name.length > 0);
|
|
18591
|
+
const exactMatches = workbooks.filter((item) => item.getSnapshot().name.toLowerCase() === qualifier.toLowerCase());
|
|
18592
|
+
const matches = exactMatches.length > 0 ? exactMatches : workbooks.filter((item) => normalizeFormulaUnitName(item.getSnapshot().name) === normalizeFormulaUnitName(qualifier));
|
|
18593
|
+
return matches.length === 1 ? matches[0] : null;
|
|
18594
|
+
}
|
|
18595
|
+
_permissionCheckFormulaReferences(formulaString, context, visitingNames = /* @__PURE__ */ new Set(), referenceOffset) {
|
|
18596
|
+
const { unitId, subUnitId, row, column } = context;
|
|
18597
|
+
const sequenceNodes = this._lexerTreeBuilder.sequenceNodesBuilder(formulaString) ?? [];
|
|
18598
|
+
for (let index = 0; index < sequenceNodes.length; index++) {
|
|
18599
|
+
const node = sequenceNodes[index];
|
|
18600
|
+
if (typeof node === "string" || node.nodeType !== sequenceNodeType.REFERENCE && node.nodeType !== sequenceNodeType.FUNCTION) continue;
|
|
18601
|
+
const nextNode = sequenceNodes[index + 1];
|
|
18602
|
+
if (node.nodeType === sequenceNodeType.FUNCTION && typeof nextNode === "string" && nextNode.trim() === matchToken.OPEN_BRACKET && this._functionService.hasExecutor(node.token.trim().toUpperCase())) continue;
|
|
18603
|
+
let nameToken = node.token.trim();
|
|
18604
|
+
if (node.nodeType === sequenceNodeType.FUNCTION) {
|
|
18605
|
+
const parts = nameToken.split("!");
|
|
18606
|
+
if (parts.length === 2) {
|
|
18607
|
+
var _this$_univerInstance;
|
|
18608
|
+
const unqualifiedName = parts[1].trim();
|
|
18609
|
+
const unscopedName = this._definedNamesService.getValueByName(unitId, unqualifiedName);
|
|
18610
|
+
const localSheetId = unscopedName === null || unscopedName === void 0 ? void 0 : unscopedName.localSheetId;
|
|
18611
|
+
const localSheet = (_this$_univerInstance = this._univerInstanceService.getUnit(unitId, UniverInstanceType.UNIVER_SHEET)) === null || _this$_univerInstance === void 0 ? void 0 : _this$_univerInstance.getSheetBySheetId(localSheetId ?? "");
|
|
18612
|
+
if (unscopedName && (localSheetId == null || localSheetId === "AllDefaultWorkbook" || (localSheet === null || localSheet === void 0 ? void 0 : localSheet.getName()) === parts[0])) nameToken = unqualifiedName;
|
|
18613
|
+
}
|
|
18614
|
+
}
|
|
18615
|
+
const definedName = this._definedNamesService.getValueByName(unitId, nameToken, subUnitId);
|
|
18616
|
+
if (definedName) {
|
|
18617
|
+
const nameKey = `${unitId}:${definedName.id}`;
|
|
18618
|
+
if (visitingNames.has(nameKey)) continue;
|
|
18619
|
+
visitingNames.add(nameKey);
|
|
18620
|
+
const definition = definedName.formulaOrRefString;
|
|
18621
|
+
const isFormula = definition.startsWith(operatorToken.EQUALS);
|
|
18622
|
+
const offset = isFormula ? void 0 : {
|
|
18623
|
+
x: column - (definedName.localSheetId === "AllDefaultWorkbook" ? 1 : 0),
|
|
18624
|
+
y: row
|
|
18625
|
+
};
|
|
18626
|
+
const permitted = this._permissionCheckFormulaReferences(isFormula ? definition : `${operatorToken.EQUALS}${definition}`, context, visitingNames, offset);
|
|
18627
|
+
visitingNames.delete(nameKey);
|
|
18628
|
+
if (!permitted) return false;
|
|
18629
|
+
continue;
|
|
18630
|
+
}
|
|
18631
|
+
if (node.nodeType !== sequenceNodeType.REFERENCE) continue;
|
|
18632
|
+
const { unitQualifier, sheetName } = handleRefStringInfo(node.token.trim());
|
|
18633
|
+
const referenceWorkbook = this._getFormulaReferenceWorkbook(unitId, unitQualifier);
|
|
18634
|
+
const referenceWorksheet = sheetName ? referenceWorkbook === null || referenceWorkbook === void 0 ? void 0 : referenceWorkbook.getSheetBySheetName(sheetName) : referenceWorkbook === null || referenceWorkbook === void 0 ? void 0 : referenceWorkbook.getSheetBySheetId(subUnitId);
|
|
18635
|
+
if (!referenceWorkbook || !referenceWorksheet) continue;
|
|
18636
|
+
const referenceUnitId = referenceWorkbook.getUnitId();
|
|
18637
|
+
const referenceSheetId = referenceWorksheet.getSheetId();
|
|
18638
|
+
const { range } = deserializeRangeWithSheetWithCache(node.token);
|
|
18639
|
+
const referenceRange = referenceOffset ? moveRangeByOffset({ ...range }, referenceOffset.x, referenceOffset.y) : range;
|
|
18640
|
+
if (referenceOffset) {
|
|
18641
|
+
const wrap = (value, limit) => (value % limit + limit) % limit;
|
|
18642
|
+
referenceRange.startRow = wrap(referenceRange.startRow, MAX_ROW_COUNT);
|
|
18643
|
+
referenceRange.endRow = wrap(referenceRange.endRow, MAX_ROW_COUNT);
|
|
18644
|
+
referenceRange.startColumn = wrap(referenceRange.startColumn, MAX_COLUMN_COUNT);
|
|
18645
|
+
referenceRange.endColumn = wrap(referenceRange.endColumn, MAX_COLUMN_COUNT);
|
|
18646
|
+
}
|
|
18647
|
+
if (!this.permissionCheckWithRanges({
|
|
18648
|
+
worksheetTypes: [WorksheetViewPermission],
|
|
18649
|
+
rangeTypes: [RangeProtectionPermissionViewPoint]
|
|
18650
|
+
}, [referenceRange], referenceUnitId, referenceSheetId)) return false;
|
|
18651
|
+
}
|
|
18652
|
+
return true;
|
|
18653
|
+
}
|
|
18531
18654
|
_permissionCheckBySetRangeValue(permissionTypes, params) {
|
|
18532
18655
|
const { unitId, subUnitId, value, range } = params;
|
|
18533
18656
|
let ranges = [];
|
|
@@ -18623,11 +18746,11 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
|
|
|
18623
18746
|
return true;
|
|
18624
18747
|
}
|
|
18625
18748
|
_permissionCheckWithInsertOrDeleteMoveRange(direction, params) {
|
|
18626
|
-
var _this$
|
|
18749
|
+
var _this$_selectionManag4;
|
|
18627
18750
|
const target = getSheetCommandTarget(this._univerInstanceService);
|
|
18628
18751
|
if (!target) return false;
|
|
18629
18752
|
const { worksheet, unitId, subUnitId } = target;
|
|
18630
|
-
const range = (params === null || params === void 0 ? void 0 : params.range) ?? ((_this$
|
|
18753
|
+
const range = (params === null || params === void 0 ? void 0 : params.range) ?? ((_this$_selectionManag4 = this._selectionManagerService.getCurrentLastSelection()) === null || _this$_selectionManag4 === void 0 ? void 0 : _this$_selectionManag4.range);
|
|
18631
18754
|
if (!range) return false;
|
|
18632
18755
|
if (!this.permissionCheckWithRanges({
|
|
18633
18756
|
workbookTypes: [WorkbookEditablePermission],
|
|
@@ -18652,7 +18775,10 @@ SheetPermissionCheckController = __decorate([
|
|
|
18652
18775
|
__decorateParam(5, Inject(WorksheetProtectionRuleModel)),
|
|
18653
18776
|
__decorateParam(6, Inject(LocaleService)),
|
|
18654
18777
|
__decorateParam(7, Inject(LexerTreeBuilder)),
|
|
18655
|
-
__decorateParam(8, IDefinedNamesService)
|
|
18778
|
+
__decorateParam(8, IDefinedNamesService),
|
|
18779
|
+
__decorateParam(9, IAutoFillService),
|
|
18780
|
+
__decorateParam(10, Inject(FormulaDataModel)),
|
|
18781
|
+
__decorateParam(11, IFunctionService)
|
|
18656
18782
|
], SheetPermissionCheckController);
|
|
18657
18783
|
|
|
18658
18784
|
//#endregion
|
|
@@ -19518,7 +19644,7 @@ RangeProtectionCache = __decorate([
|
|
|
19518
19644
|
//#endregion
|
|
19519
19645
|
//#region package.json
|
|
19520
19646
|
var name = "@univerjs/sheets";
|
|
19521
|
-
var version = "1.0
|
|
19647
|
+
var version = "1.2.0";
|
|
19522
19648
|
|
|
19523
19649
|
//#endregion
|
|
19524
19650
|
//#region src/controllers/active-worksheet.controller.ts
|
|
@@ -19648,6 +19774,7 @@ let BasicWorksheetController = class BasicWorksheetController extends Disposable
|
|
|
19648
19774
|
RemoveWorksheetMergeMutation,
|
|
19649
19775
|
RemoveNumfmtMutation,
|
|
19650
19776
|
AddWorksheetMergeMutation,
|
|
19777
|
+
SetWorkbookCalculationSettingsMutation,
|
|
19651
19778
|
SetWorkbookNameMutation,
|
|
19652
19779
|
SetWorksheetNameMutation,
|
|
19653
19780
|
SetNumfmtMutation,
|
|
@@ -19741,6 +19868,7 @@ let BasicWorksheetController = class BasicWorksheetController extends Disposable
|
|
|
19741
19868
|
SetTextRotationCommand,
|
|
19742
19869
|
SetTextWrapCommand,
|
|
19743
19870
|
SetVerticalTextAlignCommand,
|
|
19871
|
+
SetWorkbookCalculationSettingsCommand,
|
|
19744
19872
|
SetWorkbookNameCommand,
|
|
19745
19873
|
SetWorksheetActivateCommand,
|
|
19746
19874
|
SetWorksheetActiveOperation,
|
|
@@ -20865,6 +20993,9 @@ let UniverSheetsPlugin = class UniverSheetsPlugin extends Plugin {
|
|
|
20865
20993
|
}
|
|
20866
20994
|
_initConfig() {
|
|
20867
20995
|
var _this$_config, _this$_config2, _this$_config3;
|
|
20996
|
+
const textLineGap = this._config.textLineGap ?? 0;
|
|
20997
|
+
if (!Number.isFinite(textLineGap) || textLineGap < 0) throw new RangeError("textLineGap must be a finite, non-negative number.");
|
|
20998
|
+
this._configService.setConfig(SHEET_TEXT_LINE_GAP, textLineGap);
|
|
20868
20999
|
if ((_this$_config = this._config) === null || _this$_config === void 0 ? void 0 : _this$_config.onlyRegisterFormulaRelatedMutations) this._configService.setConfig(ONLY_REGISTER_FORMULA_RELATED_MUTATIONS_KEY, true);
|
|
20869
21000
|
if ((_this$_config2 = this._config) === null || _this$_config2 === void 0 ? void 0 : _this$_config2.isRowStylePrecedeColumnStyle) this._configService.setConfig(IS_ROW_STYLE_PRECEDE_COLUMN_STYLE, true);
|
|
20870
21001
|
if ((_this$_config3 = this._config) === null || _this$_config3 === void 0 ? void 0 : _this$_config3.autoHeightForMergedCells) this._configService.setConfig(AUTO_HEIGHT_FOR_MERGED_CELLS, true);
|
|
@@ -21443,7 +21574,10 @@ function convertPositionCellToSheetOverGrid(unitId, subUnitId, cellOverGridPosit
|
|
|
21443
21574
|
});
|
|
21444
21575
|
const left = precisionTo(startSelectionX + fromColumnOffset, 1);
|
|
21445
21576
|
const top = precisionTo(startSelectionY + fromRowOffset, 1);
|
|
21446
|
-
const endSelectionCell = skeleton.getCellIndexAndOffsetByPosition(left + width, top + height
|
|
21577
|
+
const endSelectionCell = skeleton.getCellIndexAndOffsetByPosition(left + width, top + height, 1, 1, {
|
|
21578
|
+
x: 0,
|
|
21579
|
+
y: 0
|
|
21580
|
+
});
|
|
21447
21581
|
return {
|
|
21448
21582
|
unitId,
|
|
21449
21583
|
subUnitId,
|
|
@@ -21466,4 +21600,4 @@ function convertPositionCellToSheetOverGrid(unitId, subUnitId, cellOverGridPosit
|
|
|
21466
21600
|
}
|
|
21467
21601
|
|
|
21468
21602
|
//#endregion
|
|
21469
|
-
export { AFFECT_LAYOUT_STYLES, AFTER_CELL_EDIT, AUTO_FILL_APPLY_TYPE, AUTO_FILL_DATA_TYPE, AUTO_FILL_HOOK_TYPE, AddMergeRedoSelectionsOperationFactory, AddMergeUndoMutationFactory, AddMergeUndoSelectionsOperationFactory, AddRangeProtectionCommand, AddRangeProtectionMutation, AddRangeThemeMutation, AddWorksheetMergeAllCommand, AddWorksheetMergeCommand, AddWorksheetMergeHorizontalCommand, AddWorksheetMergeMutation, AddWorksheetMergeVerticalCommand, AddWorksheetProtectionCommand, AddWorksheetProtectionMutation, AppendRowCommand, AutoClearContentCommand, AutoFillCommand, AutoFillController, AutoFillRules, AutoFillService, AutoFillTools, BEFORE_CELL_EDIT, BorderStyleManagerService, COMMAND_LISTENER_SKELETON_CHANGE, COMMAND_LISTENER_VALUE_CHANGE, CalculateResultApplyController, CancelFrozenCommand, CancelMarkDirtyRowAutoHeightOperation, ClearSelectionAllCommand, ClearSelectionContentCommand, ClearSelectionFormatCommand, CopySheetCommand, CopyWorksheetEndMutation, DISABLE_NORMAL_SELECTIONS, DefinedNameDataController, DeleteRangeMoveLeftCommand, DeleteRangeMoveUpCommand, DeleteRangeProtectionCommand, DeleteRangeProtectionMutation, DeleteWorksheetProtectionCommand, DeleteWorksheetProtectionMutation, DeleteWorksheetRangeThemeStyleCommand, DeleteWorksheetRangeThemeStyleMutation, DeleteWorksheetRangeThemeStyleMutationFactory, DeltaColumnWidthCommand, DeltaRowHeightCommand, EditStateEnum, EffectRefRangId, EmptyMutation, ExclusiveRangeService, FactoryAddRangeProtectionMutation, FactoryDeleteRangeProtectionMutation, FactorySetRangeProtectionMutation, IAutoFillService, IExclusiveRangeService, INTERCEPTOR_POINT, INumfmtService, IRefSelectionsService, InsertColAfterCommand, InsertColBeforeCommand, InsertColByRangeCommand, InsertColCommand, InsertColMutation, InsertColMutationUndoFactory, InsertDefinedNameCommand, InsertMultiColsLeftCommand, InsertMultiColsRightCommand, InsertMultiRowsAboveCommand, InsertMultiRowsAfterCommand, InsertRangeMoveDownCommand, InsertRangeMoveRightCommand, InsertRowAfterCommand, InsertRowBeforeCommand, InsertRowByRangeCommand, InsertRowCommand, InsertRowMutation, InsertRowMutationUndoFactory, InsertSheetCommand, InsertSheetMutation, InsertSheetUndoMutationFactory, InterceptCellContentPriority, MAX_CELL_PER_SHEET_KEY, MERGE_CELL_INTERCEPTOR_CHECK, MarkDirtyFilterChangeMutation, MarkDirtyRowAutoHeightOperation, MergeCellController, MoveColsCommand, MoveColsMutation, MoveColsMutationUndoFactory, MoveRangeCommand, MoveRangeMutation, MoveRowsCommand, MoveRowsMutation, MoveRowsMutationUndoFactory, NumfmtService, OperatorType, PermissionPointsDefinitions, REF_SELECTIONS_ENABLED, RangeMergeUtil, RangeProtectionCache, RangeProtectionPermissionDeleteProtectionPoint, RangeProtectionPermissionEditPoint, RangeProtectionPermissionManageCollaPoint, RangeProtectionPermissionViewPoint, RangeProtectionRefRangeService, RangeProtectionRenderModel, RangeProtectionRuleModel, RangeProtectionService, RangeThemeStyle, RefRangeService, RefSelectionsService, RefillCommand, RegisterWorksheetRangeThemeStyleCommand, RegisterWorksheetRangeThemeStyleMutation, RemoveColByRangeCommand, RemoveColCommand, RemoveColMutation, RemoveDefinedNameCommand, RemoveMergeUndoMutationFactory, RemoveNumfmtMutation, RemoveRangeThemeMutation, RemoveRowByRangeCommand, RemoveRowCommand, RemoveRowMutation, RemoveSheetCommand, RemoveSheetMutation, RemoveSheetUndoMutationFactory, RemoveWorksheetMergeCommand, RemoveWorksheetMergeMutation, ReorderRangeCommand, ReorderRangeMutation, ReorderRangeUndoMutationFactory, ResetBackgroundColorCommand, ResetTextColorCommand, SCOPE_WORKBOOK_VALUE_DEFINED_NAME, SELECTIONS_ENABLED, SELECTION_CONTROL_BORDER_BUFFER_COLOR, SELECTION_CONTROL_BORDER_BUFFER_WIDTH, SHEETS_PLUGIN_CONFIG_KEY, ScrollToCellOperation, SelectRangeCommand, SelectionMoveType, SetBackgroundColorCommand, SetBoldCommand, SetBorderBasicCommand, SetBorderColorCommand, SetBorderCommand, SetBorderPositionCommand, SetBorderStyleCommand, SetColDataCommand, SetColDataMutation, SetColDataMutationFactory, SetColHiddenCommand, SetColHiddenMutation, SetColVisibleMutation, SetColWidthCommand, SetDefinedNameCommand, SetFontFamilyCommand, SetFontSizeCommand, SetFrozenCommand, SetFrozenMutation, SetFrozenMutationFactory, SetGridlinesColorCommand, SetGridlinesColorMutation, SetHorizontalTextAlignCommand, SetItalicCommand, SetNumfmtMutation, SetOverlineCommand, SetProtectionCommand, SetRangeCustomMetadataCommand, SetRangeProtectionMutation, SetRangeThemeMutation, SetRangeValuesCommand, SetRangeValuesMutation, SetRangeValuesUndoMutationFactory, SetRowDataCommand, SetRowDataMutation, SetRowDataMutationFactory, SetRowHeightCommand, SetRowHiddenCommand, SetRowHiddenMutation, SetRowVisibleMutation, SetSelectedColsVisibleCommand, SetSelectedRowsVisibleCommand, SetSelectionsOperation, SetShrinkToFitCommand, SetSpecificColsVisibleCommand, SetSpecificRowsVisibleCommand, SetStrikeThroughCommand, SetStyleCommand, SetTabColorCommand, SetTabColorMutation, SetTextColorCommand, SetTextRotationCommand, SetTextWrapCommand, SetUnderlineCommand, SetVerticalTextAlignCommand, SetWorkbookNameCommand, SetWorkbookNameMutation, SetWorksheetActivateCommand, SetWorksheetActiveOperation, SetWorksheetColWidthMutation, SetWorksheetColWidthMutationFactory, SetWorksheetColumnCountCommand, SetWorksheetColumnCountMutation, SetWorksheetColumnCountUndoMutationFactory, SetWorksheetDefaultStyleCommand, SetWorksheetDefaultStyleMutation, SetWorksheetDefaultStyleMutationFactory, SetWorksheetHideCommand, SetWorksheetHideMutation, SetWorksheetNameCommand, SetWorksheetNameMutation, SetWorksheetOrderCommand, SetWorksheetOrderMutation, SetWorksheetPermissionPointsCommand, SetWorksheetPermissionPointsMutation, SetWorksheetProtectionCommand, SetWorksheetProtectionMutation, SetWorksheetRangeThemeStyleCommand, SetWorksheetRangeThemeStyleMutation, SetWorksheetRangeThemeStyleMutationFactory, SetWorksheetRightToLeftCommand, SetWorksheetRightToLeftMutation, SetWorksheetRowAutoHeightMutation, SetWorksheetRowAutoHeightMutationFactory, SetWorksheetRowCountCommand, SetWorksheetRowCountMutation, SetWorksheetRowCountUndoMutationFactory, SetWorksheetRowHeightMutation, SetWorksheetRowHeightMutationFactory, SetWorksheetRowIsAutoHeightCommand, SetWorksheetRowIsAutoHeightMutation, SetWorksheetRowIsAutoHeightMutationFactory, SetWorksheetShowCommand, SheetCopyDownCommand, SheetCopyRightCommand, SheetInterceptorService, SheetLazyExecuteScheduleService, SheetPermissionCheckController, SheetPermissionInitController, SheetRangeThemeModel, SheetRangeThemeService, SheetSkeletonChangeType, SheetSkeletonService, SheetValueChangeType, SheetsFreezeSyncController, SheetsSelectionsService, SplitDelimiterEnum, SplitTextToColumnsCommand, TextToNumberCommand, ToggleCellCheckboxCommand, ToggleGridlinesCommand, ToggleGridlinesMutation, UniverSheetsPlugin, UnregisterWorksheetRangeThemeStyleCommand, UnregisterWorksheetRangeThemeStyleMutation, VALIDATE_CELL, ViewStateEnum, WorkbookCommentPermission, WorkbookCopyPermission, WorkbookCopySheetPermission, WorkbookCreateProtectPermission, WorkbookCreateSheetPermission, WorkbookDeleteColumnPermission, WorkbookDeleteRowPermission, WorkbookDeleteSheetPermission, WorkbookDuplicatePermission, WorkbookEditablePermission, WorkbookExportPermission, WorkbookHideSheetPermission, WorkbookInsertColumnPermission, WorkbookInsertRowPermission, WorkbookManageCollaboratorPermission, WorkbookMoveSheetPermission, WorkbookPermissionService, WorkbookPrintPermission, WorkbookRecoverHistoryPermission, WorkbookRenameSheetPermission, WorkbookSelectionModel, WorkbookSharePermission, WorkbookViewHistoryPermission, WorkbookViewPermission, WorksheetCopyPermission, WorksheetDeleteColumnPermission, WorksheetDeleteProtectionPermission, WorksheetDeleteRowPermission, WorksheetEditExtraObjectPermission, WorksheetEditPermission, WorksheetFilterPermission, WorksheetInsertColumnPermission, WorksheetInsertHyperlinkPermission, WorksheetInsertRowPermission, WorksheetManageCollaboratorPermission, WorksheetPermissionService, WorksheetPivotTablePermission, WorksheetProtectionPointModel, WorksheetProtectionRuleModel, WorksheetSelectProtectedCellsPermission, WorksheetSelectUnProtectedCellsPermission, WorksheetSetCellStylePermission, WorksheetSetCellValuePermission, WorksheetSetColumnStylePermission, WorksheetSetRowStylePermission, WorksheetSortPermission, WorksheetViewPermission, ZebraCrossingCacheController, addMergeCellsUtil, adjustRangeOnMutation, alignToMergedCellsBorders, attachPrimaryWithCoord, attachRangeWithCoord, attachSelectionWithCoord, baseProtectionActions, checkCellValueType, checkRangesEditablePermission, convertPositionCellToSheetOverGrid, convertPositionSheetOverGridToAbsolute, convertPrimaryWithCoordToPrimary, convertSelectionDataToRange, copyRangeStyles, countCells, createTopMatrixFromMatrix, createTopMatrixFromRanges, defaultLargeSheetOperationConfig, defaultWorkbookPermissionPoints, defaultWorksheetPermissionPoint, deserializeListOptions, discreteRangeToRange, expandToContinuousRange, factoryRemoveNumfmtUndoMutation, factorySetNumfmtUndoMutation, findAllRectangle, findFirstNonEmptyCell, followSelectionOperation, generateNullCell, generateNullCellValue, getAddMergeMutationRangeByType, getAllRangePermissionPoint, getAllWorkbookPermissionPoint, getAllWorksheetPermissionPoint, getAllWorksheetPermissionPointByPointPanel, getCellAtRowCol, getCellType, getCellValue, getClearContentMutationParamForRange, getClearContentMutationParamsForRanges, getDefaultRangePermission, getInsertRangeMutations, getMoveRangeCommandMutations, getMoveRangeUndoRedoMutations, getNextPrimaryCell, getPrimaryForRange, getRemoveRangeMutations, getSelectionsService, getSeparateEffectedRangesOnCommand, getSheetCommandTarget, getSheetCommandTargetWorkbook, getSheetMutationTarget, getSkeletonChangedEffectedRange, getValueChangedEffectedRange, getVisibleRanges, handleBaseInsertRange, handleBaseMoveRowsCols, handleBaseRemoveRange, handleCommonDefaultRangeChangeWithEffectRefCommands, handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests, handleDefaultRangeChangeWithEffectRefCommands, handleDefaultRangeChangeWithEffectRefCommandsSkipNoInterests, handleDeleteRangeMoveLeft, handleDeleteRangeMoveUp, handleDeleteRangeMutation, handleIRemoveCol, handleIRemoveRow, handleInsertCol, handleInsertRangeMoveDown, handleInsertRangeMoveRight, handleInsertRangeMutation, handleInsertRow, handleMoveCols, handleMoveRange, handleMoveRows, isCellImage, isSingleCellSelection, prepareSetRangeValuesMutation, rangeMerge, rangeToDiscreteRange, rotateRange, runRefRangeMutations, serializeListOptions, setEndForRange, splitRangeText, transformCellsToRange, validateDefinedName };
|
|
21603
|
+
export { AFFECT_LAYOUT_STYLES, AFTER_CELL_EDIT, AUTO_FILL_APPLY_TYPE, AUTO_FILL_DATA_TYPE, AUTO_FILL_HOOK_TYPE, AddMergeRedoSelectionsOperationFactory, AddMergeUndoMutationFactory, AddMergeUndoSelectionsOperationFactory, AddRangeProtectionCommand, AddRangeProtectionMutation, AddRangeThemeMutation, AddWorksheetMergeAllCommand, AddWorksheetMergeCommand, AddWorksheetMergeHorizontalCommand, AddWorksheetMergeMutation, AddWorksheetMergeVerticalCommand, AddWorksheetProtectionCommand, AddWorksheetProtectionMutation, AppendRowCommand, AutoClearContentCommand, AutoFillCommand, AutoFillController, AutoFillRules, AutoFillService, AutoFillTools, BEFORE_CELL_EDIT, BorderStyleManagerService, COMMAND_LISTENER_SKELETON_CHANGE, COMMAND_LISTENER_VALUE_CHANGE, CalculateResultApplyController, CancelFrozenCommand, CancelMarkDirtyRowAutoHeightOperation, ClearSelectionAllCommand, ClearSelectionContentCommand, ClearSelectionFormatCommand, CopySheetCommand, CopyWorksheetEndMutation, DISABLE_NORMAL_SELECTIONS, DefinedNameDataController, DeleteRangeMoveLeftCommand, DeleteRangeMoveUpCommand, DeleteRangeProtectionCommand, DeleteRangeProtectionMutation, DeleteWorksheetProtectionCommand, DeleteWorksheetProtectionMutation, DeleteWorksheetRangeThemeStyleCommand, DeleteWorksheetRangeThemeStyleMutation, DeleteWorksheetRangeThemeStyleMutationFactory, DeltaColumnWidthCommand, DeltaRowHeightCommand, EditStateEnum, EffectRefRangId, EmptyMutation, ExclusiveRangeService, FactoryAddRangeProtectionMutation, FactoryDeleteRangeProtectionMutation, FactorySetRangeProtectionMutation, IAutoFillService, IExclusiveRangeService, INTERCEPTOR_POINT, INumfmtService, IRefSelectionsService, InsertColAfterCommand, InsertColBeforeCommand, InsertColByRangeCommand, InsertColCommand, InsertColMutation, InsertColMutationUndoFactory, InsertDefinedNameCommand, InsertMultiColsLeftCommand, InsertMultiColsRightCommand, InsertMultiRowsAboveCommand, InsertMultiRowsAfterCommand, InsertRangeMoveDownCommand, InsertRangeMoveRightCommand, InsertRowAfterCommand, InsertRowBeforeCommand, InsertRowByRangeCommand, InsertRowCommand, InsertRowMutation, InsertRowMutationUndoFactory, InsertSheetCommand, InsertSheetMutation, InsertSheetUndoMutationFactory, InterceptCellContentPriority, MAX_CELL_PER_SHEET_KEY, MERGE_CELL_INTERCEPTOR_CHECK, MarkDirtyFilterChangeMutation, MarkDirtyRowAutoHeightOperation, MergeCellController, MoveColsCommand, MoveColsMutation, MoveColsMutationUndoFactory, MoveRangeCommand, MoveRangeMutation, MoveRowsCommand, MoveRowsMutation, MoveRowsMutationUndoFactory, NumfmtService, OperatorType, PermissionPointsDefinitions, REF_SELECTIONS_ENABLED, RangeMergeUtil, RangeProtectionCache, RangeProtectionPermissionDeleteProtectionPoint, RangeProtectionPermissionEditPoint, RangeProtectionPermissionManageCollaPoint, RangeProtectionPermissionViewPoint, RangeProtectionRefRangeService, RangeProtectionRenderModel, RangeProtectionRuleModel, RangeProtectionService, RangeThemeStyle, RefRangeService, RefSelectionsService, RefillCommand, RegisterWorksheetRangeThemeStyleCommand, RegisterWorksheetRangeThemeStyleMutation, RemoveColByRangeCommand, RemoveColCommand, RemoveColMutation, RemoveDefinedNameCommand, RemoveMergeUndoMutationFactory, RemoveNumfmtMutation, RemoveRangeThemeMutation, RemoveRowByRangeCommand, RemoveRowCommand, RemoveRowMutation, RemoveSheetCommand, RemoveSheetMutation, RemoveSheetUndoMutationFactory, RemoveWorksheetMergeCommand, RemoveWorksheetMergeMutation, ReorderRangeCommand, ReorderRangeMutation, ReorderRangeUndoMutationFactory, ResetBackgroundColorCommand, ResetTextColorCommand, SCOPE_WORKBOOK_VALUE_DEFINED_NAME, SELECTIONS_ENABLED, SELECTION_CONTROL_BORDER_BUFFER_COLOR, SELECTION_CONTROL_BORDER_BUFFER_WIDTH, SHEETS_PLUGIN_CONFIG_KEY, ScrollToCellOperation, SelectRangeCommand, SelectionMoveType, SetBackgroundColorCommand, SetBoldCommand, SetBorderBasicCommand, SetBorderColorCommand, SetBorderCommand, SetBorderPositionCommand, SetBorderStyleCommand, SetColDataCommand, SetColDataMutation, SetColDataMutationFactory, SetColHiddenCommand, SetColHiddenMutation, SetColVisibleMutation, SetColWidthCommand, SetDefinedNameCommand, SetFontFamilyCommand, SetFontSizeCommand, SetFrozenCommand, SetFrozenMutation, SetFrozenMutationFactory, SetGridlinesColorCommand, SetGridlinesColorMutation, SetHorizontalTextAlignCommand, SetItalicCommand, SetNumfmtMutation, SetOverlineCommand, SetProtectionCommand, SetRangeCustomMetadataCommand, SetRangeProtectionMutation, SetRangeThemeMutation, SetRangeValuesCommand, SetRangeValuesMutation, SetRangeValuesUndoMutationFactory, SetRowDataCommand, SetRowDataMutation, SetRowDataMutationFactory, SetRowHeightCommand, SetRowHiddenCommand, SetRowHiddenMutation, SetRowVisibleMutation, SetSelectedColsVisibleCommand, SetSelectedRowsVisibleCommand, SetSelectionsOperation, SetShrinkToFitCommand, SetSpecificColsVisibleCommand, SetSpecificRowsVisibleCommand, SetStrikeThroughCommand, SetStyleCommand, SetTabColorCommand, SetTabColorMutation, SetTextColorCommand, SetTextRotationCommand, SetTextWrapCommand, SetUnderlineCommand, SetVerticalTextAlignCommand, SetWorkbookCalculationSettingsCommand, SetWorkbookCalculationSettingsMutation, SetWorkbookNameCommand, SetWorkbookNameMutation, SetWorksheetActivateCommand, SetWorksheetActiveOperation, SetWorksheetColWidthMutation, SetWorksheetColWidthMutationFactory, SetWorksheetColumnCountCommand, SetWorksheetColumnCountMutation, SetWorksheetColumnCountUndoMutationFactory, SetWorksheetDefaultStyleCommand, SetWorksheetDefaultStyleMutation, SetWorksheetDefaultStyleMutationFactory, SetWorksheetHideCommand, SetWorksheetHideMutation, SetWorksheetNameCommand, SetWorksheetNameMutation, SetWorksheetOrderCommand, SetWorksheetOrderMutation, SetWorksheetPermissionPointsCommand, SetWorksheetPermissionPointsMutation, SetWorksheetProtectionCommand, SetWorksheetProtectionMutation, SetWorksheetRangeThemeStyleCommand, SetWorksheetRangeThemeStyleMutation, SetWorksheetRangeThemeStyleMutationFactory, SetWorksheetRightToLeftCommand, SetWorksheetRightToLeftMutation, SetWorksheetRowAutoHeightMutation, SetWorksheetRowAutoHeightMutationFactory, SetWorksheetRowCountCommand, SetWorksheetRowCountMutation, SetWorksheetRowCountUndoMutationFactory, SetWorksheetRowHeightMutation, SetWorksheetRowHeightMutationFactory, SetWorksheetRowIsAutoHeightCommand, SetWorksheetRowIsAutoHeightMutation, SetWorksheetRowIsAutoHeightMutationFactory, SetWorksheetShowCommand, SheetCopyDownCommand, SheetCopyRightCommand, SheetInterceptorService, SheetLazyExecuteScheduleService, SheetPermissionCheckController, SheetPermissionInitController, SheetRangeThemeModel, SheetRangeThemeService, SheetSkeletonChangeType, SheetSkeletonService, SheetValueChangeType, SheetsFreezeSyncController, SheetsSelectionsService, SplitDelimiterEnum, SplitTextToColumnsCommand, TextToNumberCommand, ToggleCellCheckboxCommand, ToggleGridlinesCommand, ToggleGridlinesMutation, UniverSheetsPlugin, UnregisterWorksheetRangeThemeStyleCommand, UnregisterWorksheetRangeThemeStyleMutation, VALIDATE_CELL, ViewStateEnum, WorkbookCommentPermission, WorkbookCopyPermission, WorkbookCopySheetPermission, WorkbookCreateProtectPermission, WorkbookCreateSheetPermission, WorkbookDeleteColumnPermission, WorkbookDeleteRowPermission, WorkbookDeleteSheetPermission, WorkbookDuplicatePermission, WorkbookEditablePermission, WorkbookExportPermission, WorkbookHideSheetPermission, WorkbookInsertColumnPermission, WorkbookInsertRowPermission, WorkbookManageCollaboratorPermission, WorkbookMoveSheetPermission, WorkbookPermissionService, WorkbookPrintPermission, WorkbookRecoverHistoryPermission, WorkbookRenameSheetPermission, WorkbookSelectionModel, WorkbookSharePermission, WorkbookViewHistoryPermission, WorkbookViewPermission, WorksheetCopyPermission, WorksheetDeleteColumnPermission, WorksheetDeleteProtectionPermission, WorksheetDeleteRowPermission, WorksheetEditExtraObjectPermission, WorksheetEditPermission, WorksheetFilterPermission, WorksheetInsertColumnPermission, WorksheetInsertHyperlinkPermission, WorksheetInsertRowPermission, WorksheetManageCollaboratorPermission, WorksheetPermissionService, WorksheetPivotTablePermission, WorksheetProtectionPointModel, WorksheetProtectionRuleModel, WorksheetSelectProtectedCellsPermission, WorksheetSelectUnProtectedCellsPermission, WorksheetSetCellStylePermission, WorksheetSetCellValuePermission, WorksheetSetColumnStylePermission, WorksheetSetRowStylePermission, WorksheetSortPermission, WorksheetViewPermission, ZebraCrossingCacheController, addMergeCellsUtil, adjustRangeOnMutation, alignToMergedCellsBorders, attachPrimaryWithCoord, attachRangeWithCoord, attachSelectionWithCoord, baseProtectionActions, checkCellValueType, checkRangesEditablePermission, convertPositionCellToSheetOverGrid, convertPositionSheetOverGridToAbsolute, convertPrimaryWithCoordToPrimary, convertSelectionDataToRange, copyRangeStyles, countCells, createTopMatrixFromMatrix, createTopMatrixFromRanges, defaultLargeSheetOperationConfig, defaultWorkbookPermissionPoints, defaultWorksheetPermissionPoint, deserializeListOptions, discreteRangeToRange, expandToContinuousRange, factoryRemoveNumfmtUndoMutation, factorySetNumfmtUndoMutation, findAllRectangle, findFirstNonEmptyCell, followSelectionOperation, generateNullCell, generateNullCellValue, getAddMergeMutationRangeByType, getAllRangePermissionPoint, getAllWorkbookPermissionPoint, getAllWorksheetPermissionPoint, getAllWorksheetPermissionPointByPointPanel, getCellAtRowCol, getCellType, getCellValue, getClearContentMutationParamForRange, getClearContentMutationParamsForRanges, getDefaultRangePermission, getInsertRangeMutations, getMoveRangeCommandMutations, getMoveRangeUndoRedoMutations, getNextPrimaryCell, getPrimaryForRange, getRemoveRangeMutations, getSelectionsService, getSeparateEffectedRangesOnCommand, getSheetCommandTarget, getSheetCommandTargetWorkbook, getSheetMutationTarget, getSkeletonChangedEffectedRange, getValueChangedEffectedRange, getVisibleRanges, handleBaseInsertRange, handleBaseMoveRowsCols, handleBaseRemoveRange, handleCommonDefaultRangeChangeWithEffectRefCommands, handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests, handleDefaultRangeChangeWithEffectRefCommands, handleDefaultRangeChangeWithEffectRefCommandsSkipNoInterests, handleDeleteRangeMoveLeft, handleDeleteRangeMoveUp, handleDeleteRangeMutation, handleIRemoveCol, handleIRemoveRow, handleInsertCol, handleInsertRangeMoveDown, handleInsertRangeMoveRight, handleInsertRangeMutation, handleInsertRow, handleMoveCols, handleMoveRange, handleMoveRows, isCellImage, isSingleCellSelection, prepareSetRangeValuesMutation, rangeMerge, rangeToDiscreteRange, rotateRange, runRefRangeMutations, serializeListOptions, setEndForRange, splitRangeText, transformCellsToRange, validateDefinedName };
|