@univerjs/sheets 0.21.0 → 0.21.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/es/index.js CHANGED
@@ -1,7 +1,7 @@
1
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, TEXT_DECORATION_KEYS, TEXT_ROTATION_KEYS, TextX, Tools, UniverInstanceType, UserManagerService, cellToRange, cloneWorksheetData, composeInterceptors, concatMatrixArray, createIdentifier, createInterceptorKey, createRowColIter, generateRandomId, getArrayLength, isBooleanString, isDefaultFormat, isFormulaId, isFormulaString, isICellData, isRealNum, isSafeNumeric, isTextFormat, mapObjectMatrix, merge, mergeIntervals, mergeOverrideWithDependencies, mergeWorksheetSnapshotWithDefault, moveMatrixArray, normalizeTextRuns, numfmt, queryObjectMatrix, registerDependencies, remove, selectionToArray, sequenceExecute, sliceMatrixArray, spliceArray, throttle, toDisposable, touchDependencies, willLoseNumericPrecision } from "@univerjs/core";
2
2
  import { BehaviorSubject, Subject, distinctUntilChanged, filter, first, map, merge as merge$1, of, shareReplay, skip, switchMap, takeUntil } from "rxjs";
3
- import { SpreadsheetSkeleton, precisionTo } from "@univerjs/engine-render";
4
- import { IDefinedNamesService, LexerTreeBuilder, RemoveDefinedNameMutation, SetDefinedNameMutation, SetDefinedNameMutationFactory, SetFormulaCalculationResultMutation, UniverFormulaEnginePlugin, deserializeRangeWithSheet, deserializeRangeWithSheetWithCache, handleNumfmtInCell, operatorToken, sequenceNodeType, stripErrorMargin } from "@univerjs/engine-formula";
3
+ import { IDefinedNamesService, LexerTreeBuilder, RemoveDefinedNameMutation, SetDefinedNameMutation, SetDefinedNameMutationFactory, SetFormulaCalculationResultMutation, UniverFormulaEnginePlugin, deserializeRangeWithSheet, deserializeRangeWithSheetWithCache, handleNumfmtInCell, isReferenceStringWithEffectiveColumn, operatorToken, sequenceNodeType, stripErrorMargin } from "@univerjs/engine-formula";
4
+ import { SpreadsheetSkeleton, hasCJKText, precisionTo } from "@univerjs/engine-render";
5
5
  import { UnitAction, UnitAction as UnitAction$1, UnitObject, UnitObject as UnitObject$1 } from "@univerjs/protocol";
6
6
  import { filter as filter$1, map as map$1, takeUntil as takeUntil$1 } from "rxjs/operators";
7
7
  import { DataSyncPrimaryController } from "@univerjs/rpc";
@@ -242,8 +242,8 @@ let SheetInterceptorService = class SheetInterceptorService extends Disposable {
242
242
  AFTER_CELL_EDIT,
243
243
  VALIDATE_CELL
244
244
  }));
245
- this.disposeWithMe(this._univerInstanceService.getTypeOfUnitAdded$(UniverInstanceType.UNIVER_SHEET).subscribe((workbook) => {
246
- this._interceptWorkbook(workbook);
245
+ this.disposeWithMe(this._univerInstanceService.getTypeOfUnitAdded$(UniverInstanceType.UNIVER_SHEET).subscribe((event) => {
246
+ this._interceptWorkbook(event.unit);
247
247
  }));
248
248
  this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(UniverInstanceType.UNIVER_SHEET).subscribe((workbook) => this._disposeWorkbookInterceptor(workbook)));
249
249
  this.intercept(INTERCEPTOR_POINT.CELL_CONTENT, {
@@ -2711,7 +2711,7 @@ const SetWorksheetActiveOperation = {
2711
2711
  id: "sheet.operation.set-worksheet-active",
2712
2712
  type: CommandType.OPERATION,
2713
2713
  handler: (accessor, params) => {
2714
- const workbook = accessor.get(IUniverInstanceService).getUniverSheetInstance(params.unitId);
2714
+ const workbook = accessor.get(IUniverInstanceService).getUnit(params.unitId, UniverInstanceType.UNIVER_SHEET);
2715
2715
  if (!workbook) return false;
2716
2716
  const worksheets = workbook.getWorksheets();
2717
2717
  for (const [, worksheet] of worksheets) if (worksheet.getSheetId() === params.subUnitId) {
@@ -3041,6 +3041,27 @@ function getSkeletonChangedEffectedRange(commandInfo, columnCount) {
3041
3041
  }
3042
3042
  }
3043
3043
 
3044
+ //#endregion
3045
+ //#region src/basics/defined-name-utils.ts
3046
+ function validateDefinedName(name, options) {
3047
+ if (name.length === 0) return "definedName.nameEmpty";
3048
+ const { unitId, formulaOrRefString, univerInstanceService, definedNamesService, superTableService, functionService, id } = options;
3049
+ /**
3050
+ * The defined name can't be duplicate with existing defined names.
3051
+ * If id is provided, it means we are updating an existing defined name. We should allow the name to be the same as itself.
3052
+ */
3053
+ const existingDefinedName = definedNamesService.getValueByName(unitId, name);
3054
+ if (existingDefinedName && (id === null || id === void 0 || id.length === 0 || existingDefinedName.id !== id)) return "definedName.nameDuplicate";
3055
+ if (superTableService.hasTable(unitId, name)) return "definedName.nameDuplicate";
3056
+ if (!Tools.isValidParameter(name) || isReferenceStringWithEffectiveColumn(name) || !Tools.isStartValidPosition(name) && !hasCJKText(name.substring(0, 1))) return "definedName.nameInvalid";
3057
+ const workbook = univerInstanceService.getUnit(unitId, UniverInstanceType.UNIVER_SHEET);
3058
+ if (!workbook) throw new Error(`Workbook not found for unitId: ${unitId}`);
3059
+ if (workbook.getSheets().some((sheet) => sheet.getName() === name)) return "definedName.nameSheetConflict";
3060
+ if (formulaOrRefString.length === 0) return "definedName.formulaOrRefStringEmpty";
3061
+ if (functionService.hasExecutor(name.toUpperCase())) return "definedName.nameConflict";
3062
+ return true;
3063
+ }
3064
+
3044
3065
  //#endregion
3045
3066
  //#region src/basics/expand-range.ts
3046
3067
  function cellHasValue$1(cell) {
@@ -4439,19 +4460,18 @@ const ClearSelectionAllCommand = {
4439
4460
  type: CommandType.COMMAND,
4440
4461
  handler: (accessor, params) => {
4441
4462
  var _selectionManagerServ;
4442
- const univerInstanceService = accessor.get(IUniverInstanceService);
4443
- const commandService = accessor.get(ICommandService);
4463
+ const target = getSheetCommandTarget(accessor.get(IUniverInstanceService), {
4464
+ unitId: params === null || params === void 0 ? void 0 : params.unitId,
4465
+ subUnitId: params === null || params === void 0 ? void 0 : params.subUnitId
4466
+ });
4467
+ if (!target) return false;
4444
4468
  const selectionManagerService = accessor.get(SheetsSelectionsService);
4445
- const undoRedoService = accessor.get(IUndoRedoService);
4446
- const sheetInterceptorService = accessor.get(SheetInterceptorService);
4447
- const workbook = univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET);
4448
- if (!workbook) return false;
4449
- const unitId = (params === null || params === void 0 ? void 0 : params.unitId) || workbook.getUnitId();
4450
- const worksheet = workbook.getActiveSheet();
4451
- if (!worksheet) return false;
4452
- const subUnitId = (params === null || params === void 0 ? void 0 : params.subUnitId) || worksheet.getSheetId();
4469
+ const { unitId, subUnitId } = target;
4453
4470
  const selections = (params === null || params === void 0 ? void 0 : params.ranges) || ((_selectionManagerServ = selectionManagerService.getCurrentSelections()) === null || _selectionManagerServ === void 0 ? void 0 : _selectionManagerServ.map((s) => s.range));
4454
4471
  if (!(selections === null || selections === void 0 ? void 0 : selections.length)) return false;
4472
+ const commandService = accessor.get(ICommandService);
4473
+ const undoRedoService = accessor.get(IUndoRedoService);
4474
+ const sheetInterceptorService = accessor.get(SheetInterceptorService);
4455
4475
  const visibleRanges = getVisibleRanges(selections, accessor, unitId, subUnitId);
4456
4476
  const sequenceExecuteList = [];
4457
4477
  const sequenceExecuteUndoList = [];
@@ -4469,7 +4489,10 @@ const ClearSelectionAllCommand = {
4469
4489
  id: SetRangeValuesMutation.id,
4470
4490
  params: undoClearMutationParams
4471
4491
  });
4472
- const intercepted = sheetInterceptorService.onCommandExecute({ id: ClearSelectionAllCommand.id });
4492
+ const intercepted = sheetInterceptorService.onCommandExecute({
4493
+ id: ClearSelectionAllCommand.id,
4494
+ params
4495
+ });
4473
4496
  sequenceExecuteList.push(...intercepted.redos);
4474
4497
  sequenceExecuteUndoList.unshift(...intercepted.undos);
4475
4498
  if (sequenceExecute(sequenceExecuteList, commandService)) {
@@ -4494,19 +4517,18 @@ const ClearSelectionFormatCommand = {
4494
4517
  type: CommandType.COMMAND,
4495
4518
  handler: (accessor, params) => {
4496
4519
  var _selectionManagerServ;
4497
- const univerInstanceService = accessor.get(IUniverInstanceService);
4498
- const commandService = accessor.get(ICommandService);
4520
+ const target = getSheetCommandTarget(accessor.get(IUniverInstanceService), {
4521
+ unitId: params === null || params === void 0 ? void 0 : params.unitId,
4522
+ subUnitId: params === null || params === void 0 ? void 0 : params.subUnitId
4523
+ });
4524
+ if (!target) return false;
4499
4525
  const selectionManagerService = accessor.get(SheetsSelectionsService);
4500
- const undoRedoService = accessor.get(IUndoRedoService);
4501
- const sheetInterceptorService = accessor.get(SheetInterceptorService);
4502
- const workbook = univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET);
4503
- if (!workbook) return false;
4504
- const unitId = (params === null || params === void 0 ? void 0 : params.unitId) || workbook.getUnitId();
4505
- const worksheet = workbook.getActiveSheet();
4506
- if (!worksheet) return false;
4507
- const subUnitId = (params === null || params === void 0 ? void 0 : params.subUnitId) || worksheet.getSheetId();
4526
+ const { unitId, subUnitId } = target;
4508
4527
  const ranges = (params === null || params === void 0 ? void 0 : params.ranges) || ((_selectionManagerServ = selectionManagerService.getCurrentSelections()) === null || _selectionManagerServ === void 0 ? void 0 : _selectionManagerServ.map((s) => s.range));
4509
4528
  if (!(ranges === null || ranges === void 0 ? void 0 : ranges.length)) return false;
4529
+ const commandService = accessor.get(ICommandService);
4530
+ const undoRedoService = accessor.get(IUndoRedoService);
4531
+ const sheetInterceptorService = accessor.get(SheetInterceptorService);
4510
4532
  const visibleRanges = getVisibleRanges(ranges, accessor, unitId, subUnitId);
4511
4533
  const sequenceExecuteList = [];
4512
4534
  const sequenceExecuteUndoList = [];
@@ -4524,7 +4546,10 @@ const ClearSelectionFormatCommand = {
4524
4546
  id: SetRangeValuesMutation.id,
4525
4547
  params: undoClearMutationParams
4526
4548
  });
4527
- const intercepted = sheetInterceptorService.onCommandExecute({ id: ClearSelectionFormatCommand.id });
4549
+ const intercepted = sheetInterceptorService.onCommandExecute({
4550
+ id: ClearSelectionFormatCommand.id,
4551
+ params
4552
+ });
4528
4553
  sequenceExecuteList.push(...intercepted.redos);
4529
4554
  sequenceExecuteUndoList.unshift(...intercepted.undos);
4530
4555
  if (sequenceExecute(sequenceExecuteList, commandService)) {
@@ -4732,7 +4757,8 @@ let RefSelectionsService = class RefSelectionsService extends SheetsSelectionsSe
4732
4757
  const aliveWorkbooks = this._instanceSrv.getAllUnitsForType(UniverInstanceType.UNIVER_SHEET);
4733
4758
  aliveWorkbooks.forEach((workbook) => this._ensureWorkbookSelection(workbook.getUnitId()));
4734
4759
  const workbooks$ = new BehaviorSubject(aliveWorkbooks);
4735
- this.disposeWithMe(this._instanceSrv.getTypeOfUnitAdded$(UniverInstanceType.UNIVER_SHEET).subscribe((workbook) => {
4760
+ this.disposeWithMe(this._instanceSrv.getTypeOfUnitAdded$(UniverInstanceType.UNIVER_SHEET).subscribe((event) => {
4761
+ const { unit: workbook } = event;
4736
4762
  this._ensureWorkbookSelection(workbook.getUnitId());
4737
4763
  workbooks$.next([...workbooks$.getValue(), workbook]);
4738
4764
  }));
@@ -6634,6 +6660,8 @@ let SheetSkeletonService = class SheetSkeletonService extends Disposable {
6634
6660
  this._univerInstanceService = _univerInstanceService;
6635
6661
  _defineProperty(this, "_sceneMap", /* @__PURE__ */ new Map());
6636
6662
  _defineProperty(this, "_sheetSkeletonParamStore", /* @__PURE__ */ new Map());
6663
+ _defineProperty(this, "_buildSkeleton$", new Subject());
6664
+ _defineProperty(this, "buildSkeleton$", this._buildSkeleton$.asObservable());
6637
6665
  this._init();
6638
6666
  }
6639
6667
  dispose() {
@@ -6648,7 +6676,7 @@ let SheetSkeletonService = class SheetSkeletonService extends Disposable {
6648
6676
  this._sheetSkeletonParamStore.delete(unitId);
6649
6677
  }
6650
6678
  _init() {
6651
- this.disposeWithMe(this._univerInstanceService.getTypeOfUnitAdded$(UniverInstanceType.UNIVER_SHEET).subscribe((workbook) => this._initWorkbookSkeleton(workbook)));
6679
+ this.disposeWithMe(this._univerInstanceService.getTypeOfUnitAdded$(UniverInstanceType.UNIVER_SHEET).subscribe((event) => this._initWorkbookSkeleton(event.unit)));
6652
6680
  this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(UniverInstanceType.UNIVER_SHEET).subscribe((workbook) => this._disposeByUnitId(workbook.getUnitId())));
6653
6681
  }
6654
6682
  _initWorkbookSkeleton(workbook) {
@@ -6695,6 +6723,7 @@ let SheetSkeletonService = class SheetSkeletonService extends Disposable {
6695
6723
  const unitId = worksheet.getUnitId();
6696
6724
  const scene = this._sceneMap.get(unitId);
6697
6725
  if (scene) spreadsheetSkeleton.setScene(scene);
6726
+ this._buildSkeleton$.next(spreadsheetSkeleton);
6698
6727
  return spreadsheetSkeleton;
6699
6728
  }
6700
6729
  setScene(unitId, scene) {
@@ -6703,6 +6732,11 @@ let SheetSkeletonService = class SheetSkeletonService extends Disposable {
6703
6732
  if (!sheetSkeletonMap) return;
6704
6733
  sheetSkeletonMap.forEach((skeletonParam) => skeletonParam.skeleton.setScene(scene));
6705
6734
  }
6735
+ getSkeletonsByUnitId(unitId) {
6736
+ const sheetSkeletonMap = this._sheetSkeletonParamStore.get(unitId);
6737
+ if (!sheetSkeletonMap) return [];
6738
+ return Array.from(sheetSkeletonMap.values()).map((param) => param.skeleton);
6739
+ }
6706
6740
  getSkeleton(unitId, subUnitId) {
6707
6741
  var _this$getSkeletonPara;
6708
6742
  return (_this$getSkeletonPara = this.getSkeletonParam(unitId, subUnitId)) === null || _this$getSkeletonPara === void 0 ? void 0 : _this$getSkeletonPara.skeleton;
@@ -10690,25 +10724,20 @@ function isChnNumber$1(txt) {
10690
10724
  }
10691
10725
  function matchExtendNumber$1(txt) {
10692
10726
  if (!txt) return { isExtendNumber: false };
10693
- const reg = /0|([1-9]+[0-9]*)/g;
10694
- const isExtendNumber = reg.test(txt);
10695
- if (isExtendNumber) {
10696
- const match = txt.match(reg);
10697
- if (match && match.length > 0) {
10698
- const matchTxt = match[match.length - 1];
10699
- const matchIndex = txt.lastIndexOf(matchTxt);
10700
- const beforeTxt = txt.substr(0, matchIndex);
10701
- const afterTxt = txt.substr(matchIndex + matchTxt.length);
10702
- return {
10703
- isExtendNumber: true,
10704
- matchTxt: Number(matchTxt),
10705
- beforeTxt,
10706
- afterTxt
10707
- };
10708
- }
10709
- return { isExtendNumber: false };
10710
- }
10711
- return { isExtendNumber };
10727
+ const matches = [...txt.matchAll(/\d+/g)];
10728
+ if (!matches.length) return { isExtendNumber: false };
10729
+ const last = matches[matches.length - 1];
10730
+ const rawMatchTxt = last[0];
10731
+ const index = last.index;
10732
+ const beforeTxt = txt.substring(0, index);
10733
+ const afterTxt = txt.substring(index + rawMatchTxt.length);
10734
+ return {
10735
+ isExtendNumber: true,
10736
+ rawMatchTxt,
10737
+ matchNumber: Number(rawMatchTxt),
10738
+ beforeTxt,
10739
+ afterTxt
10740
+ };
10712
10741
  }
10713
10742
  function isChnWeek1(txt) {
10714
10743
  let isChnWeek1;
@@ -10741,13 +10770,19 @@ function getLenS$1(indexArr, rsd) {
10741
10770
  * equal diff
10742
10771
  */
10743
10772
  function isEqualDiff$1(arr) {
10744
- let diff = true;
10745
- const step = arr[1] - arr[0];
10746
- for (let i = 1; i < arr.length; i++) if (arr[i] - arr[i - 1] !== step) {
10747
- diff = false;
10748
- break;
10773
+ if (arr.length < 3) return true;
10774
+ let step = arr[1] - arr[0];
10775
+ let changeStep = false;
10776
+ for (let i = 2; i < arr.length; i++) {
10777
+ const currentStep = arr[i] - arr[i - 1];
10778
+ if (currentStep !== step) {
10779
+ if (changeStep) return false;
10780
+ if (currentStep !== -step) return false;
10781
+ step = currentStep;
10782
+ changeStep = true;
10783
+ }
10749
10784
  }
10750
- return diff;
10785
+ return true;
10751
10786
  }
10752
10787
  function getDataIndex$1(csLen, asLen, indexArr) {
10753
10788
  const obj = [];
@@ -10866,20 +10901,19 @@ function forecast(x, yArr, xArr, forward = true) {
10866
10901
  }
10867
10902
  function fillExtendNumber$1(data, len, step) {
10868
10903
  const applyData = [];
10869
- const reg = /0|([1-9]+[0-9]*)/g;
10904
+ const lastData = data[data.length - 1];
10905
+ const matchResult = matchExtendNumber$1(`${lastData === null || lastData === void 0 ? void 0 : lastData.v}`);
10906
+ if (!matchResult.isExtendNumber) return fillCopy$2(data, len);
10907
+ const { matchNumber, rawMatchTxt, beforeTxt, afterTxt } = matchResult;
10908
+ const width = rawMatchTxt.length;
10870
10909
  for (let i = 1; i <= len; i++) {
10871
- var _data2;
10872
10910
  const index = (i - 1) % data.length;
10873
10911
  const d = Tools.deepClone(data[index]);
10874
10912
  removeCellCustom(d);
10875
- const last = `${(_data2 = data[data.length - 1]) === null || _data2 === void 0 ? void 0 : _data2.v}`;
10876
- if (!last) continue;
10877
- const match = last === null || last === void 0 ? void 0 : last.match(reg);
10878
- const lastTxt = match === null || match === void 0 ? void 0 : match[match.length - 1];
10879
- if (!lastTxt) continue;
10880
- const num = Math.abs(Number(lastTxt) + step * i);
10881
- const lastIndex = last.lastIndexOf(lastTxt);
10882
- const valueTxt = last.substr(0, lastIndex) + num.toString() + last.substr(lastIndex + lastTxt.length);
10913
+ if (!d || !d.v) continue;
10914
+ let numStr = Math.abs(matchNumber + step * i).toString();
10915
+ if (numStr.length < width) numStr = numStr.padStart(width, "0");
10916
+ const valueTxt = `${beforeTxt}${numStr}${afterTxt}`;
10883
10917
  if (d) {
10884
10918
  d.v = valueTxt;
10885
10919
  applyData.push(d);
@@ -10934,15 +10968,15 @@ function fillChnWeek$1(data, len, step, weekType = 0) {
10934
10968
  const keyword = keywordMap[weekType];
10935
10969
  const applyData = [];
10936
10970
  for (let i = 1; i <= len; i++) {
10937
- var _data3;
10971
+ var _data2;
10938
10972
  const index = (i - 1) % data.length;
10939
10973
  const d = Tools.deepClone(data[index]);
10940
10974
  removeCellCustom(d);
10941
10975
  let num = 0;
10942
- if (((_data3 = data[data.length - 1]) === null || _data3 === void 0 ? void 0 : _data3.v) === keyword[0]) num = 7 + step * i;
10976
+ if (((_data2 = data[data.length - 1]) === null || _data2 === void 0 ? void 0 : _data2.v) === keyword[0]) num = 7 + step * i;
10943
10977
  else {
10944
- var _data4;
10945
- const last = `${(_data4 = data[data.length - 1]) === null || _data4 === void 0 ? void 0 : _data4.v}`;
10978
+ var _data3;
10979
+ const last = `${(_data3 = data[data.length - 1]) === null || _data3 === void 0 ? void 0 : _data3.v}`;
10946
10980
  if (last) num = chineseToNumber$1(last.substr(last.length - 1, 1)) + step * i;
10947
10981
  }
10948
10982
  if (num < 0) num = Math.ceil(Math.abs(num) / 7) * 7 + num;
@@ -10957,11 +10991,11 @@ function fillChnWeek$1(data, len, step, weekType = 0) {
10957
10991
  function fillChnNumber$1(data, len, step) {
10958
10992
  const applyData = [];
10959
10993
  for (let i = 1; i <= len; i++) {
10960
- var _data5;
10994
+ var _data4;
10961
10995
  const index = (i - 1) % data.length;
10962
10996
  const d = Tools.deepClone(data[index]);
10963
10997
  removeCellCustom(d);
10964
- const num = chineseToNumber$1(`${(_data5 = data[data.length - 1]) === null || _data5 === void 0 ? void 0 : _data5.v}`) + step * i;
10998
+ const num = chineseToNumber$1(`${(_data4 = data[data.length - 1]) === null || _data4 === void 0 ? void 0 : _data4.v}`) + step * i;
10965
10999
  let txt;
10966
11000
  if (num <= 0) txt = "零";
10967
11001
  else txt = numberToChinese(num);
@@ -11125,11 +11159,11 @@ function fillLoopSeries$1(data, len, step, series) {
11125
11159
  const seriesLen = series.length;
11126
11160
  const applyData = [];
11127
11161
  for (let i = 1; i <= len; i++) {
11128
- var _data6;
11162
+ var _data5;
11129
11163
  const index = (i - 1) % data.length;
11130
11164
  const d = Tools.deepClone(data[index]);
11131
11165
  removeCellCustom(d);
11132
- const last = `${(_data6 = data[data.length - 1]) === null || _data6 === void 0 ? void 0 : _data6.v}`;
11166
+ const last = `${(_data5 = data[data.length - 1]) === null || _data5 === void 0 ? void 0 : _data5.v}`;
11133
11167
  let num = series.indexOf(last) + step * i;
11134
11168
  if (num < 0) num += Math.abs(step) * seriesLen;
11135
11169
  const rsd = num % seriesLen;
@@ -11414,9 +11448,13 @@ const AutoFillRules = {
11414
11448
  isContinue: (prev, cur) => {
11415
11449
  if (prev.type === AUTO_FILL_DATA_TYPE.EXTEND_NUMBER) {
11416
11450
  var _prev$cellData;
11417
- const { beforeTxt, afterTxt } = matchExtendNumber(`${(_prev$cellData = prev.cellData) === null || _prev$cellData === void 0 ? void 0 : _prev$cellData.v}` || "");
11418
- const { beforeTxt: curBeforeTxt, afterTxt: curAfterTxt } = matchExtendNumber(`${cur === null || cur === void 0 ? void 0 : cur.v}` || "");
11419
- if (beforeTxt === curBeforeTxt && afterTxt === curAfterTxt) return true;
11451
+ const prevMatch = matchExtendNumber(`${(_prev$cellData = prev.cellData) === null || _prev$cellData === void 0 ? void 0 : _prev$cellData.v}` || "");
11452
+ const curMatch = matchExtendNumber(`${cur === null || cur === void 0 ? void 0 : cur.v}` || "");
11453
+ if (prevMatch.isExtendNumber && curMatch.isExtendNumber) {
11454
+ const { beforeTxt: prevBeforeTxt, afterTxt: prevAfterTxt } = prevMatch;
11455
+ const { beforeTxt: curBeforeTxt, afterTxt: curAfterTxt } = curMatch;
11456
+ if (prevBeforeTxt === curBeforeTxt && prevAfterTxt === curAfterTxt) return true;
11457
+ }
11420
11458
  }
11421
11459
  return false;
11422
11460
  },
@@ -11431,15 +11469,16 @@ const AutoFillRules = {
11431
11469
  const dataNumArr = [];
11432
11470
  for (let i = 0; i < data.length; i++) {
11433
11471
  var _data$i;
11434
- const txt = `${(_data$i = data[i]) === null || _data$i === void 0 ? void 0 : _data$i.v}`;
11435
- txt && dataNumArr.push(Number(matchExtendNumber(txt).matchTxt));
11472
+ const matchResult = matchExtendNumber(`${(_data$i = data[i]) === null || _data$i === void 0 ? void 0 : _data$i.v}`);
11473
+ if (matchResult.isExtendNumber) dataNumArr.push(matchResult.matchNumber);
11436
11474
  }
11437
11475
  if (isReverse) {
11438
11476
  data.reverse();
11439
11477
  dataNumArr.reverse();
11440
11478
  }
11441
11479
  if (isEqualDiff(dataNumArr)) {
11442
- step = dataNumArr[1] - dataNumArr[0];
11480
+ const dataLen = data.length;
11481
+ step = dataNumArr[dataLen - 1] - dataNumArr[dataLen - 2];
11443
11482
  return reverseIfNeed(fillExtendNumber(data, len, step), isReverse);
11444
11483
  }
11445
11484
  return fillCopy$1(data, len);
@@ -11494,7 +11533,10 @@ const AutoFillRules = {
11494
11533
  dataNumArr.reverse();
11495
11534
  }
11496
11535
  if (isEqualDiff(dataNumArr)) {
11497
- if (hasWeek || dataNumArr[dataNumArr.length - 1] < 6 && dataNumArr[0] > 0 || dataNumArr[0] < 6 && dataNumArr[dataNumArr.length - 1] > 0) return reverseIfNeed(fillChnWeek(data, len, dataNumArr[1] - dataNumArr[0]), isReverse);
11536
+ if (hasWeek || dataNumArr[dataNumArr.length - 1] < 6 && dataNumArr[0] > 0 || dataNumArr[0] < 6 && dataNumArr[dataNumArr.length - 1] > 0) {
11537
+ const dataLen = data.length;
11538
+ return reverseIfNeed(fillChnWeek(data, len, dataNumArr[dataLen - 1] - dataNumArr[dataLen - 2]), isReverse);
11539
+ }
11498
11540
  return reverseIfNeed(fillChnNumber(data, len, dataNumArr[1] - dataNumArr[0]), isReverse);
11499
11541
  }
11500
11542
  return fillCopy$1(data, len);
@@ -11534,7 +11576,10 @@ const AutoFillRules = {
11534
11576
  data.reverse();
11535
11577
  dataNumArr.reverse();
11536
11578
  }
11537
- if (isEqualDiff(dataNumArr)) return reverseIfNeed(fillChnWeek(data, len, dataNumArr[1] - dataNumArr[0], 1), isReverse);
11579
+ if (isEqualDiff(dataNumArr)) {
11580
+ const dataLen = data.length;
11581
+ return reverseIfNeed(fillChnWeek(data, len, dataNumArr[dataLen - 1] - dataNumArr[dataLen - 2], 1), isReverse);
11582
+ }
11538
11583
  return fillCopy$1(data, len);
11539
11584
  } }
11540
11585
  },
@@ -11571,7 +11616,10 @@ const AutoFillRules = {
11571
11616
  data.reverse();
11572
11617
  dataNumArr.reverse();
11573
11618
  }
11574
- if (isEqualDiff(dataNumArr)) return reverseIfNeed(fillChnWeek(data, len, dataNumArr[1] - dataNumArr[0], 2), isReverse);
11619
+ if (isEqualDiff(dataNumArr)) {
11620
+ const dataLen = data.length;
11621
+ return reverseIfNeed(fillChnWeek(data, len, dataNumArr[dataLen - 1] - dataNumArr[dataLen - 2], 2), isReverse);
11622
+ }
11575
11623
  return fillCopy$1(data, len);
11576
11624
  } }
11577
11625
  },
@@ -11613,7 +11661,10 @@ const AutoFillRules = {
11613
11661
  data.reverse();
11614
11662
  dataNumArr.reverse();
11615
11663
  }
11616
- if (isEqualDiff(dataNumArr)) return reverseIfNeed(fillLoopSeries(data, len, dataNumArr[1] - dataNumArr[0], series), isReverse);
11664
+ if (isEqualDiff(dataNumArr)) {
11665
+ const dataLen = data.length;
11666
+ return reverseIfNeed(fillLoopSeries(data, len, dataNumArr[dataLen - 1] - dataNumArr[dataLen - 2], series), isReverse);
11667
+ }
11617
11668
  return fillCopy$1(data, len);
11618
11669
  } }
11619
11670
  },
@@ -12171,26 +12222,28 @@ const ClearSelectionContentCommand = {
12171
12222
  type: CommandType.COMMAND,
12172
12223
  handler: (accessor, params) => {
12173
12224
  var _selectionManagerServ;
12174
- const univerInstanceService = accessor.get(IUniverInstanceService);
12175
- const commandService = accessor.get(ICommandService);
12225
+ const target = getSheetCommandTarget(accessor.get(IUniverInstanceService), {
12226
+ unitId: params === null || params === void 0 ? void 0 : params.unitId,
12227
+ subUnitId: params === null || params === void 0 ? void 0 : params.subUnitId
12228
+ });
12229
+ if (!target) return false;
12176
12230
  const selectionManagerService = accessor.get(SheetsSelectionsService);
12177
- const undoRedoService = accessor.get(IUndoRedoService);
12178
- const sheetInterceptorService = accessor.get(SheetInterceptorService);
12179
- const workbook = univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET);
12180
- if (!workbook) return false;
12181
- const unitId = (params === null || params === void 0 ? void 0 : params.unitId) || workbook.getUnitId();
12182
- const worksheet = workbook.getActiveSheet();
12183
- if (!worksheet) return false;
12184
- const subUnitId = (params === null || params === void 0 ? void 0 : params.subUnitId) || worksheet.getSheetId();
12231
+ const { unitId, subUnitId } = target;
12185
12232
  const ranges = (params === null || params === void 0 ? void 0 : params.ranges) || ((_selectionManagerServ = selectionManagerService.getCurrentSelections()) === null || _selectionManagerServ === void 0 ? void 0 : _selectionManagerServ.map((s) => s.range));
12186
12233
  if (!(ranges === null || ranges === void 0 ? void 0 : ranges.length)) return false;
12234
+ const commandService = accessor.get(ICommandService);
12235
+ const undoRedoService = accessor.get(IUndoRedoService);
12236
+ const sheetInterceptorService = accessor.get(SheetInterceptorService);
12187
12237
  const clearMutationParams = {
12188
12238
  subUnitId,
12189
12239
  unitId,
12190
12240
  cellValue: generateNullCellValue(getVisibleRanges(ranges, accessor, unitId, subUnitId))
12191
12241
  };
12192
12242
  const undoClearMutationParams = SetRangeValuesUndoMutationFactory(accessor, clearMutationParams);
12193
- const intercepted = sheetInterceptorService.onCommandExecute({ id: ClearSelectionContentCommand.id });
12243
+ const intercepted = sheetInterceptorService.onCommandExecute({
12244
+ id: ClearSelectionContentCommand.id,
12245
+ params
12246
+ });
12194
12247
  const redos = [{
12195
12248
  id: SetRangeValuesMutation.id,
12196
12249
  params: clearMutationParams
@@ -13660,11 +13713,9 @@ function mergeSelections$1(ranges) {
13660
13713
  //#endregion
13661
13714
  //#region src/commands/commands/set-defined-name.command.ts
13662
13715
  /**
13663
- * The command to update defined name
13664
- *
13716
+ * The command to update defined name.
13665
13717
  * 1. The old defined name can be obtained through IDefinedNamesService, and does not need to be passed in from the outside, making the command input more concise
13666
-
13667
- 2. Unlike InsertDefinedNameCommand, the old defined name needs to be deleted here at the same time. Because the command interception in UpdateDefinedNameController will add SetDefinedNameMutation or RemoveDefinedNameMutation, it results in that in DefinedNameController, only mutations can be listened to to update Function Description (commands cannot be listened to), so it is necessary to ensure that each mutation triggered by the command has completed all work.
13718
+ * 2. Unlike InsertDefinedNameCommand, the old defined name needs to be deleted here at the same time. Because the command interception in UpdateDefinedNameController will add SetDefinedNameMutation or RemoveDefinedNameMutation, it results in that in DefinedNameController, only mutations can be listened to to update Function Description (commands cannot be listened to), so it is necessary to ensure that each mutation triggered by the command has completed all work.
13668
13719
  */
13669
13720
  const SetDefinedNameCommand = {
13670
13721
  id: "sheet.command.set-defined-name",
@@ -13683,10 +13734,10 @@ const SetDefinedNameCommand = {
13683
13734
  });
13684
13735
  const redos = [
13685
13736
  ...(_interceptorCommands$ = interceptorCommands.preRedos) !== null && _interceptorCommands$ !== void 0 ? _interceptorCommands$ : [],
13686
- {
13737
+ ...oldDefinedNameMutationParams ? [{
13687
13738
  id: RemoveDefinedNameMutation.id,
13688
13739
  params: oldDefinedNameMutationParams
13689
- },
13740
+ }] : [],
13690
13741
  {
13691
13742
  id: SetDefinedNameMutation.id,
13692
13743
  params: newDefinedNameMutationParams
@@ -13699,10 +13750,10 @@ const SetDefinedNameCommand = {
13699
13750
  id: RemoveDefinedNameMutation.id,
13700
13751
  params: newDefinedNameMutationParams
13701
13752
  },
13702
- {
13753
+ ...oldDefinedNameMutationParams ? [{
13703
13754
  id: SetDefinedNameMutation.id,
13704
13755
  params: oldDefinedNameMutationParams
13705
- },
13756
+ }] : [],
13706
13757
  ...interceptorCommands.undos
13707
13758
  ];
13708
13759
  if (sequenceExecute(redos, commandService)) {
@@ -15963,10 +16014,8 @@ let WorksheetPermissionService = class WorksheetPermissionService extends RxDisp
15963
16014
  });
15964
16015
  });
15965
16016
  };
15966
- this._univerInstanceService.getAllUnitsForType(UniverInstanceType.UNIVER_SHEET).forEach((workbook) => {
15967
- handleWorkbook(workbook);
15968
- });
15969
- this._univerInstanceService.getTypeOfUnitAdded$(UniverInstanceType.UNIVER_SHEET).pipe(takeUntil$1(this.dispose$)).subscribe(handleWorkbook);
16017
+ this._univerInstanceService.getAllUnitsForType(UniverInstanceType.UNIVER_SHEET).forEach((workbook) => handleWorkbook(workbook));
16018
+ this._univerInstanceService.getTypeOfUnitAdded$(UniverInstanceType.UNIVER_SHEET).pipe(takeUntil$1(this.dispose$)).subscribe((event) => handleWorkbook(event.unit));
15970
16019
  this._univerInstanceService.getTypeOfUnitDisposed$(UniverInstanceType.UNIVER_SHEET).pipe(takeUntil$1(this.dispose$)).subscribe((workbook) => {
15971
16020
  workbook.getSheets().forEach((worksheet) => {
15972
16021
  const unitId = workbook.getUnitId();
@@ -17803,7 +17852,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
17803
17852
  WorksheetEditPermission
17804
17853
  ],
17805
17854
  rangeTypes: [RangeProtectionPermissionEditPoint]
17806
- }, params.ranges, params.unitId, params.subUnitId);
17855
+ }, 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);
17807
17856
  errorMsg = this._localeService.t("permission.dialog.editErr");
17808
17857
  break;
17809
17858
  case ClearSelectionContentCommand.id:
@@ -17812,7 +17861,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
17812
17861
  workbookTypes: [WorkbookEditablePermission],
17813
17862
  worksheetTypes: [WorksheetSetCellValuePermission, WorksheetEditPermission],
17814
17863
  rangeTypes: [RangeProtectionPermissionEditPoint]
17815
- }, params.ranges, params.unitId, params.subUnitId);
17864
+ }, 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);
17816
17865
  errorMsg = this._localeService.t("permission.dialog.editErr");
17817
17866
  break;
17818
17867
  case ClearSelectionFormatCommand.id:
@@ -17821,7 +17870,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
17821
17870
  workbookTypes: [WorkbookEditablePermission],
17822
17871
  worksheetTypes: [WorksheetSetCellStylePermission, WorksheetEditPermission],
17823
17872
  rangeTypes: [RangeProtectionPermissionEditPoint]
17824
- }, params.ranges, params.unitId, params.subUnitId);
17873
+ }, 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);
17825
17874
  errorMsg = this._localeService.t("permission.dialog.setStyleErr");
17826
17875
  break;
17827
17876
  case DeltaColumnWidthCommand.id:
@@ -18243,12 +18292,8 @@ let WorkbookPermissionService = class WorkbookPermissionService extends Disposab
18243
18292
  this._permissionService.addPermissionPoint(instance);
18244
18293
  });
18245
18294
  };
18246
- this._univerInstanceService.getAllUnitsForType(UniverInstanceType.UNIVER_SHEET).forEach((workbook) => {
18247
- handleWorkbook(workbook);
18248
- });
18249
- this.disposeWithMe(this._univerInstanceService.getTypeOfUnitAdded$(UniverInstanceType.UNIVER_SHEET).subscribe((workbook) => {
18250
- handleWorkbook(workbook);
18251
- }));
18295
+ this._univerInstanceService.getAllUnitsForType(UniverInstanceType.UNIVER_SHEET).forEach((workbook) => handleWorkbook(workbook));
18296
+ this.disposeWithMe(this._univerInstanceService.getTypeOfUnitAdded$(UniverInstanceType.UNIVER_SHEET).subscribe((event) => handleWorkbook(event.unit)));
18252
18297
  this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(UniverInstanceType.UNIVER_SHEET).subscribe((workbook) => {
18253
18298
  const unitId = workbook.getUnitId();
18254
18299
  workbook.getSheets().forEach((worksheet) => {
@@ -19087,7 +19132,7 @@ RangeProtectionCache = __decorate([
19087
19132
  //#endregion
19088
19133
  //#region package.json
19089
19134
  var name = "@univerjs/sheets";
19090
- var version = "0.21.0";
19135
+ var version = "0.21.1";
19091
19136
 
19092
19137
  //#endregion
19093
19138
  //#region src/controllers/active-worksheet.controller.ts
@@ -20970,4 +21015,4 @@ function convertPositionCellToSheetOverGrid(unitId, subUnitId, cellOverGridPosit
20970
21015
  }
20971
21016
 
20972
21017
  //#endregion
20973
- 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, 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, 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, UnitAction, UnitObject, 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, discreteRangeToRange, expandToContinuousRange, factoryRemoveNumfmtUndoMutation, factorySetNumfmtUndoMutation, findAllRectangle, findFirstNonEmptyCell, followSelectionOperation, generateNullCell, generateNullCellValue, getAddMergeMutationRangeByType, getAllRangePermissionPoint, getAllWorkbookPermissionPoint, getAllWorksheetPermissionPoint, getAllWorksheetPermissionPointByPointPanel, getCellAtRowCol, 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, isSingleCellSelection, rangeMerge, rangeToDiscreteRange, rotateRange, runRefRangeMutations, setEndForRange, splitRangeText, transformCellsToRange };
21018
+ 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, 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, 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, UnitAction, UnitObject, 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, discreteRangeToRange, expandToContinuousRange, factoryRemoveNumfmtUndoMutation, factorySetNumfmtUndoMutation, findAllRectangle, findFirstNonEmptyCell, followSelectionOperation, generateNullCell, generateNullCellValue, getAddMergeMutationRangeByType, getAllRangePermissionPoint, getAllWorkbookPermissionPoint, getAllWorksheetPermissionPoint, getAllWorksheetPermissionPointByPointPanel, getCellAtRowCol, 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, isSingleCellSelection, rangeMerge, rangeToDiscreteRange, rotateRange, runRefRangeMutations, setEndForRange, splitRangeText, transformCellsToRange, validateDefinedName };