@univerjs/sheets 0.25.0 → 1.0.0-alpha.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.
Files changed (44) hide show
  1. package/lib/cjs/facade.js +198 -263
  2. package/lib/cjs/index.js +169 -124
  3. package/lib/es/facade.js +199 -258
  4. package/lib/es/index.js +372 -321
  5. package/lib/facade.js +199 -258
  6. package/lib/index.js +372 -321
  7. package/lib/types/commands/commands/add-range-protection.command.d.ts +1 -1
  8. package/lib/types/commands/commands/delete-range-protection.command.d.ts +1 -1
  9. package/lib/types/commands/commands/register-range-theme.command.d.ts +1 -1
  10. package/lib/types/commands/commands/set-protection.command.d.ts +1 -1
  11. package/lib/types/commands/mutations/add-range-protection.mutation.d.ts +1 -1
  12. package/lib/types/commands/mutations/add-range-theme.mutation.d.ts +1 -1
  13. package/lib/types/commands/mutations/register-range-theme.mutation.d.ts +1 -1
  14. package/lib/types/commands/mutations/set-range-protection.mutation.d.ts +1 -1
  15. package/lib/types/commands/mutations/set-range-theme.mutation.d.ts +1 -1
  16. package/lib/types/commands/mutations/set-range-values.mutation.d.ts +4 -3
  17. package/lib/types/controllers/permission/sheet-permission-check.controller.d.ts +1 -1
  18. package/lib/types/controllers/permission/sheet-permission-init.controller.d.ts +1 -1
  19. package/lib/types/controllers/permission/sheet-permission-view-model.controller.d.ts +1 -1
  20. package/lib/types/controllers/zebar-crossing.controller.d.ts +1 -1
  21. package/lib/types/facade/{f-sheet-hooks.d.ts → const.d.ts} +1 -9
  22. package/lib/types/facade/f-range.d.ts +3 -2
  23. package/lib/types/facade/f-univer.d.ts +33 -64
  24. package/lib/types/facade/f-workbook.d.ts +3 -45
  25. package/lib/types/facade/index.d.ts +0 -1
  26. package/lib/types/index.d.ts +186 -106
  27. package/lib/types/locale/types.d.ts +18 -0
  28. package/lib/types/services/permission/range-permission/range-protection.ref-range.d.ts +3 -3
  29. package/lib/types/services/permission/range-permission/range-protection.service.d.ts +2 -2
  30. package/lib/types/services/permission/type.d.ts +1 -1
  31. package/lib/types/services/permission/workbook-permission/workbook-permission.service.d.ts +1 -1
  32. package/lib/types/services/permission/worksheet-permission/worksheet-permission.service.d.ts +1 -1
  33. package/lib/types/services/range-theme.service.d.ts +3 -3
  34. package/lib/umd/facade.js +1 -1
  35. package/lib/umd/index.js +1 -1
  36. package/package.json +9 -9
  37. /package/lib/types/{model → models}/range-protection-render.model.d.ts +0 -0
  38. /package/lib/types/{model → models}/range-protection-rule.model.d.ts +0 -0
  39. /package/lib/types/{model → models}/range-protection.cache.d.ts +0 -0
  40. /package/lib/types/{model → models}/range-theme-model.d.ts +0 -0
  41. /package/lib/types/{model → models}/range-theme-util.d.ts +0 -0
  42. /package/lib/types/{model → models}/range-themes/build-in-theme.factory.d.ts +0 -0
  43. /package/lib/types/{model → models}/range-themes/default.d.ts +0 -0
  44. /package/lib/types/{model → models}/zebra-crossing-cache.d.ts +0 -0
package/lib/es/index.js CHANGED
@@ -2,7 +2,7 @@ import { AUTO_HEIGHT_FOR_MERGED_CELLS, BORDER_KEYS, BORDER_STYLE_KEYS, BooleanNu
2
2
  import { BehaviorSubject, Subject, distinctUntilChanged, filter, first, map, merge as merge$1, of, share, shareReplay, skip, switchMap, takeUntil } from "rxjs";
3
3
  import { IDefinedNamesService, LexerTreeBuilder, RemoveDefinedNameMutation, SetDefinedNameMutation, SetDefinedNameMutationFactory, SetFormulaCalculationResultMutation, UniverFormulaEnginePlugin, deserializeRangeWithSheet, deserializeRangeWithSheetWithCache, handleNumfmtInCell, isReferenceStringWithEffectiveColumn, operatorToken, sequenceNodeType, stripErrorMargin } from "@univerjs/engine-formula";
4
4
  import { SpreadsheetSkeleton, hasCJKText, precisionTo } from "@univerjs/engine-render";
5
- import { UnitAction, UnitAction as UnitAction$1, UnitObject, UnitObject as UnitObject$1 } from "@univerjs/protocol";
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";
7
7
  import { DataSyncPrimaryController } from "@univerjs/rpc";
8
8
 
@@ -158,7 +158,7 @@ const RangeThemeInterceptorId = "sheet.interceptor.range-theme-id";
158
158
  const IgnoreRangeThemeInterceptorKey = "sheet.interceptor.ignore-range-theme";
159
159
 
160
160
  //#endregion
161
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/typeof.js
161
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/typeof.js
162
162
  function _typeof(o) {
163
163
  "@babel/helpers - typeof";
164
164
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -169,7 +169,7 @@ function _typeof(o) {
169
169
  }
170
170
 
171
171
  //#endregion
172
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPrimitive.js
172
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/toPrimitive.js
173
173
  function toPrimitive(t, r) {
174
174
  if ("object" != _typeof(t) || !t) return t;
175
175
  var e = t[Symbol.toPrimitive];
@@ -182,14 +182,14 @@ function toPrimitive(t, r) {
182
182
  }
183
183
 
184
184
  //#endregion
185
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPropertyKey.js
185
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/toPropertyKey.js
186
186
  function toPropertyKey(t) {
187
187
  var i = toPrimitive(t, "string");
188
188
  return "symbol" == _typeof(i) ? i : i + "";
189
189
  }
190
190
 
191
191
  //#endregion
192
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/defineProperty.js
192
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/defineProperty.js
193
193
  function _defineProperty(e, r, t) {
194
194
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
195
195
  value: t,
@@ -200,7 +200,7 @@ function _defineProperty(e, r, t) {
200
200
  }
201
201
 
202
202
  //#endregion
203
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/decorateParam.js
203
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/decorateParam.js
204
204
  function __decorateParam(paramIndex, decorator) {
205
205
  return function(target, key) {
206
206
  decorator(target, key, paramIndex);
@@ -208,7 +208,7 @@ function __decorateParam(paramIndex, decorator) {
208
208
  }
209
209
 
210
210
  //#endregion
211
- //#region \0@oxc-project+runtime@0.133.0/helpers/esm/decorate.js
211
+ //#region \0@oxc-project+runtime@0.137.0/helpers/esm/decorate.js
212
212
  function __decorate(decorators, target, key, desc) {
213
213
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
214
214
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -563,7 +563,7 @@ function getWorksheetDisposableID(unitId, worksheet) {
563
563
  }
564
564
 
565
565
  //#endregion
566
- //#region src/model/range-theme-util.ts
566
+ //#region src/models/range-theme-util.ts
567
567
  const serializeRangeStyle = (style) => {
568
568
  const result = {};
569
569
  if (style.bg) result.bg = { ...style.bg };
@@ -833,7 +833,7 @@ var RangeThemeStyle = class {
833
833
  };
834
834
 
835
835
  //#endregion
836
- //#region src/model/range-themes/build-in-theme.factory.ts
836
+ //#region src/models/range-themes/build-in-theme.factory.ts
837
837
  /**
838
838
  * Copyright 2023-present DreamNum Co., Ltd.
839
839
  *
@@ -1061,7 +1061,7 @@ const buildInThemes = [
1061
1061
  ];
1062
1062
 
1063
1063
  //#endregion
1064
- //#region src/model/range-themes/default.ts
1064
+ //#region src/models/range-themes/default.ts
1065
1065
  const defaultRangeThemeStyleJSON = {
1066
1066
  headerRowStyle: {
1067
1067
  bg: { rgb: "rgb(68,114,196)" },
@@ -1085,7 +1085,7 @@ const defaultRangeThemeStyleJSONWithLastRowStyle = new RangeThemeStyle("default-
1085
1085
  });
1086
1086
 
1087
1087
  //#endregion
1088
- //#region src/model/zebra-crossing-cache.ts
1088
+ //#region src/models/zebra-crossing-cache.ts
1089
1089
  /**
1090
1090
  * This class is used for caching zebra crossing toggle ranges.
1091
1091
  * `toggleRanges` represents the ranges within the visible area where the original odd/even row state is reversed due to hidden rows.
@@ -1173,7 +1173,7 @@ var ZebraCrossingCache = class {
1173
1173
  };
1174
1174
 
1175
1175
  //#endregion
1176
- //#region src/model/range-theme-model.ts
1176
+ //#region src/models/range-theme-model.ts
1177
1177
  const SHEET_RANGE_THEME_MODEL_PLUGIN = "SHEET_RANGE_THEME_MODEL_PLUGIN";
1178
1178
  let SheetRangeThemeModel = class SheetRangeThemeModel extends Disposable {
1179
1179
  constructor(_sheetInterceptorService, _resourceManagerService, _univerInstanceService) {
@@ -2341,7 +2341,7 @@ function setNull(value) {
2341
2341
  * @returns {ISetRangeValuesMutationParams} undo mutation params
2342
2342
  */
2343
2343
  const SetRangeValuesUndoMutationFactory = (accessor, params) => {
2344
- const { unitId, subUnitId, cellValue } = params;
2344
+ const { unitId, subUnitId, cellValue, isOverrideStyle } = params;
2345
2345
  const workbook = accessor.get(IUniverInstanceService).getUniverSheetInstance(unitId);
2346
2346
  if (workbook == null) throw new Error("workbook is null error!");
2347
2347
  const worksheet = workbook.getSheetBySheetId(subUnitId);
@@ -2351,12 +2351,13 @@ const SetRangeValuesUndoMutationFactory = (accessor, params) => {
2351
2351
  const undoData = new ObjectMatrix();
2352
2352
  new ObjectMatrix(cellValue).forValue((row, col, newVal) => {
2353
2353
  const cell = Tools.deepClone(cellMatrix === null || cellMatrix === void 0 ? void 0 : cellMatrix.getValue(row, col)) || {};
2354
- cell.s = transformStyle(styles.getStyleByCell(cell), styles.getStyleByCell(newVal));
2354
+ const oldStyle = styles.getStyleByCell(cell);
2355
+ const newStyle = styles.getStyleByCell(newVal);
2356
+ cell.s = isOverrideStyle && Object.prototype.hasOwnProperty.call(newVal !== null && newVal !== void 0 ? newVal : {}, "s") ? oldStyle !== null && oldStyle !== void 0 ? oldStyle : null : transformStyle(oldStyle, newStyle);
2355
2357
  undoData.setValue(row, col, setNull(cell));
2356
2358
  });
2357
2359
  return {
2358
2360
  ...params,
2359
- options: {},
2360
2361
  cellValue: undoData.getMatrix()
2361
2362
  };
2362
2363
  };
@@ -2364,7 +2365,7 @@ const SetRangeValuesMutation = {
2364
2365
  id: "sheet.mutation.set-range-values",
2365
2366
  type: CommandType.MUTATION,
2366
2367
  handler: (accessor, params) => {
2367
- const { cellValue, subUnitId, unitId } = params;
2368
+ const { cellValue, subUnitId, unitId, isOverrideStyle } = params;
2368
2369
  const workbook = accessor.get(IUniverInstanceService).getUnit(unitId);
2369
2370
  if (!workbook) return false;
2370
2371
  const worksheet = workbook.getSheetBySheetId(subUnitId);
@@ -2375,7 +2376,7 @@ const SetRangeValuesMutation = {
2375
2376
  if (!newVal) cellMatrix.realDeleteValue(row, col);
2376
2377
  else {
2377
2378
  let oldVal = cellMatrix.getValue(row, col) || {};
2378
- oldVal = mergeCellData(newVal, oldVal, styles);
2379
+ oldVal = mergeCellData(newVal, oldVal, styles, !!isOverrideStyle);
2379
2380
  if (Tools.isEmptyObject(oldVal)) cellMatrix.realDeleteValue(row, col);
2380
2381
  else cellMatrix.setValue(row, col, oldVal);
2381
2382
  }
@@ -2383,7 +2384,7 @@ const SetRangeValuesMutation = {
2383
2384
  return true;
2384
2385
  }
2385
2386
  };
2386
- const overwriteCellPropertiesSet = new Set([
2387
+ const overwriteCellPropertiesSet = /* @__PURE__ */ new Set([
2387
2388
  "f",
2388
2389
  "p",
2389
2390
  "si",
@@ -2391,7 +2392,7 @@ const overwriteCellPropertiesSet = new Set([
2391
2392
  "ref",
2392
2393
  "xf"
2393
2394
  ]);
2394
- function mergeCellData(newValue, oldValue, styles) {
2395
+ function mergeCellData(newValue, oldValue, styles, isOverrideStyle = false) {
2395
2396
  const type = getCellType(styles, newValue, oldValue);
2396
2397
  Object.keys(newValue).forEach((key) => {
2397
2398
  const cellPropertyKey = key;
@@ -2400,7 +2401,8 @@ function mergeCellData(newValue, oldValue, styles) {
2400
2401
  updateCellProperty(oldValue, cellPropertyKey, propertyValue);
2401
2402
  } else if (cellPropertyKey === "v") {
2402
2403
  if (newValue.v !== void 0) oldValue.v = getCellValue(type, newValue);
2403
- } else if (cellPropertyKey === "s") handleStyle(styles, oldValue, newValue);
2404
+ } else if (cellPropertyKey === "s") if (isOverrideStyle) overrideStyle(styles, oldValue, newValue);
2405
+ else handleStyle(styles, oldValue, newValue);
2404
2406
  });
2405
2407
  if (oldValue.v !== void 0) {
2406
2408
  oldValue.t = type;
@@ -2412,6 +2414,18 @@ function mergeCellData(newValue, oldValue, styles) {
2412
2414
  }
2413
2415
  return oldValue;
2414
2416
  }
2417
+ function overrideStyle(styles, oldValue, newValue) {
2418
+ if (newValue.s === void 0) return;
2419
+ if (newValue.s === null) {
2420
+ delete oldValue.s;
2421
+ return;
2422
+ }
2423
+ const styleValue = typeof newValue.s === "string" ? styles.get(newValue.s) : newValue.s;
2424
+ const styleCell = {};
2425
+ handleStyle(styles, styleCell, { s: styleValue });
2426
+ if (styleCell.s == null) delete oldValue.s;
2427
+ else oldValue.s = styleCell.s;
2428
+ }
2415
2429
  function updateCellProperty(cell, key, value) {
2416
2430
  if (value === void 0) {} else if (value === null) delete cell[key];
2417
2431
  else cell[key] = value;
@@ -3897,7 +3911,7 @@ function deserializeListOptions(optionsStr) {
3897
3911
  }
3898
3912
 
3899
3913
  //#endregion
3900
- //#region src/model/range-protection-rule.model.ts
3914
+ //#region src/models/range-protection-rule.model.ts
3901
3915
  let ViewStateEnum = /* @__PURE__ */ function(ViewStateEnum) {
3902
3916
  ViewStateEnum["OthersCanView"] = "othersCanView";
3903
3917
  ViewStateEnum["NoOneElseCanView"] = "noOneElseCanView";
@@ -4044,7 +4058,11 @@ var RangeProtectionRuleModel = class {
4044
4058
  //#region src/commands/mutations/delete-range-protection.mutation.ts
4045
4059
  const FactoryDeleteRangeProtectionMutation = (accessor, param) => {
4046
4060
  const selectionProtectionRuleModel = accessor.get(RangeProtectionRuleModel);
4047
- const rules = param.ruleIds.map((id) => selectionProtectionRuleModel.getRule(param.unitId, param.subUnitId, id)).filter((rule) => !!rule);
4061
+ const rules = [];
4062
+ for (let i = 0; i < param.ruleIds.length; i++) {
4063
+ const rule = selectionProtectionRuleModel.getRule(param.unitId, param.subUnitId, param.ruleIds[i]);
4064
+ if (rule) rules.push(rule);
4065
+ }
4048
4066
  return {
4049
4067
  id: AddRangeProtectionMutation.id,
4050
4068
  params: {
@@ -4060,9 +4078,7 @@ const DeleteRangeProtectionMutation = {
4060
4078
  handler: (accessor, params) => {
4061
4079
  const { unitId, subUnitId, ruleIds } = params;
4062
4080
  const selectionProtectionRuleModel = accessor.get(RangeProtectionRuleModel);
4063
- ruleIds.forEach((id) => {
4064
- selectionProtectionRuleModel.deleteRule(unitId, subUnitId, id);
4065
- });
4081
+ for (let i = 0; i < ruleIds.length; i++) selectionProtectionRuleModel.deleteRule(unitId, subUnitId, ruleIds[i]);
4066
4082
  return true;
4067
4083
  }
4068
4084
  };
@@ -4623,12 +4639,13 @@ SheetSkeletonService = __decorate([__decorateParam(0, Inject(Injector)), __decor
4623
4639
  //#region src/commands/commands/util.ts
4624
4640
  function getRangesHeight(ranges, worksheet) {
4625
4641
  const cellHeights = new ObjectMatrix();
4626
- ranges.map((range) => Range.transformRange(range, worksheet)).forEach((range) => {
4642
+ for (let i = 0; i < ranges.length; i++) {
4643
+ const range = Range.transformRange(ranges[i], worksheet);
4627
4644
  Range.foreach(range, (row, col) => {
4628
4645
  const cellHeight = worksheet.getCellHeight(row, col);
4629
4646
  if (cellHeight) cellHeights.setValue(row, col, cellHeight);
4630
4647
  });
4631
- });
4648
+ }
4632
4649
  return cellHeights;
4633
4650
  }
4634
4651
  const MAX_RANGE_CELL_COUNT = 1e4;
@@ -8433,7 +8450,7 @@ let RefRangeService = class RefRangeService extends Disposable {
8433
8450
  }
8434
8451
  const refRangeCallbackList = manager.get(rangeString);
8435
8452
  if (refRangeCallbackList) refRangeCallbackList.add(callback);
8436
- else manager.set(rangeString, new Set([callback]));
8453
+ else manager.set(rangeString, /* @__PURE__ */ new Set([callback]));
8437
8454
  return toDisposable(() => {
8438
8455
  const refRangeCallbackList = manager.get(rangeString);
8439
8456
  if (refRangeCallbackList) {
@@ -13612,15 +13629,14 @@ const SetSelectedColsVisibleCommand = {
13612
13629
  type: CommandType.COMMAND,
13613
13630
  id: "sheet.command.set-selected-cols-visible",
13614
13631
  handler: (accessor) => {
13615
- var _selectionManagerServ;
13616
13632
  const selectionManagerService = accessor.get(SheetsSelectionsService);
13617
13633
  const commandService = accessor.get(ICommandService);
13618
- const ranges = (_selectionManagerServ = selectionManagerService.getCurrentSelections()) === null || _selectionManagerServ === void 0 ? void 0 : _selectionManagerServ.map((s) => s.range).filter((r) => r.rangeType === RANGE_TYPE.COLUMN);
13619
- if (!(ranges === null || ranges === void 0 ? void 0 : ranges.length)) return false;
13634
+ const ranges = getSelectedColRanges(selectionManagerService);
13635
+ if (!ranges.length) return false;
13620
13636
  const target = getSheetCommandTarget(accessor.get(IUniverInstanceService));
13621
13637
  if (!target) return false;
13622
13638
  const { worksheet, unitId, subUnitId } = target;
13623
- const hiddenRanges = ranges.map((r) => worksheet.getHiddenCols(r.startColumn, r.endColumn)).flat();
13639
+ const hiddenRanges = getHiddenColRanges(worksheet, ranges);
13624
13640
  return commandService.executeCommand(SetSpecificColsVisibleCommand.id, {
13625
13641
  unitId,
13626
13642
  subUnitId,
@@ -13632,13 +13648,13 @@ const SetColHiddenCommand = {
13632
13648
  type: CommandType.COMMAND,
13633
13649
  id: "sheet.command.set-col-hidden",
13634
13650
  handler: (accessor, params) => {
13635
- var _params$ranges, _selectionManagerServ2;
13651
+ var _params$ranges;
13636
13652
  const selectionManagerService = accessor.get(SheetsSelectionsService);
13637
13653
  const sheetInterceptorService = accessor.get(SheetInterceptorService);
13638
13654
  const univerInstanceService = accessor.get(IUniverInstanceService);
13639
13655
  const commandService = accessor.get(ICommandService);
13640
- let ranges = (params === null || params === void 0 || (_params$ranges = params.ranges) === null || _params$ranges === void 0 ? void 0 : _params$ranges.length) ? params.ranges : (_selectionManagerServ2 = selectionManagerService.getCurrentSelections()) === null || _selectionManagerServ2 === void 0 ? void 0 : _selectionManagerServ2.map((s) => s.range).filter((r) => r.rangeType === RANGE_TYPE.COLUMN);
13641
- if (!(ranges === null || ranges === void 0 ? void 0 : ranges.length)) return false;
13656
+ let ranges = (params === null || params === void 0 || (_params$ranges = params.ranges) === null || _params$ranges === void 0 ? void 0 : _params$ranges.length) ? params.ranges : getSelectedColRanges(selectionManagerService);
13657
+ if (!ranges.length) return false;
13642
13658
  const target = getSheetCommandTarget(univerInstanceService, params);
13643
13659
  if (!target) return false;
13644
13660
  const { worksheet, unitId, subUnitId } = target;
@@ -13720,6 +13736,24 @@ const SetColHiddenCommand = {
13720
13736
  return false;
13721
13737
  }
13722
13738
  };
13739
+ function getSelectedColRanges(selectionManagerService) {
13740
+ const selections = selectionManagerService.getCurrentSelections();
13741
+ const ranges = [];
13742
+ if (!selections) return ranges;
13743
+ for (let i = 0; i < selections.length; i++) {
13744
+ const range = selections[i].range;
13745
+ if (range.rangeType === RANGE_TYPE.COLUMN) ranges.push(range);
13746
+ }
13747
+ return ranges;
13748
+ }
13749
+ function getHiddenColRanges(worksheet, ranges) {
13750
+ const hiddenRanges = [];
13751
+ for (let i = 0; i < ranges.length; i++) {
13752
+ const hiddenCols = worksheet.getHiddenCols(ranges[i].startColumn, ranges[i].endColumn);
13753
+ for (let j = 0; j < hiddenCols.length; j++) hiddenRanges.push(hiddenCols[j]);
13754
+ }
13755
+ return hiddenRanges;
13756
+ }
13723
13757
  function divideRangesByHiddenCols(worksheet, ranges) {
13724
13758
  const endRow = worksheet.getRowCount() - 1;
13725
13759
  const hiddenCols = worksheet.getHiddenCols();
@@ -14045,7 +14079,7 @@ const SetProtectionCommand = {
14045
14079
  const { unitId, subUnitId } = rule;
14046
14080
  const redoMutations = [];
14047
14081
  const undoMutations = [];
14048
- if ((oldRule === null || oldRule === void 0 ? void 0 : oldRule.unitType) === rule.unitType) if (rule.unitType === UnitObject$1.Worksheet) {
14082
+ if ((oldRule === null || oldRule === void 0 ? void 0 : oldRule.unitType) === rule.unitType) if (rule.unitType === UnitObject.Worksheet) {
14049
14083
  redoMutations.push({
14050
14084
  id: SetWorksheetProtectionMutation.id,
14051
14085
  params: {
@@ -14084,7 +14118,7 @@ const SetProtectionCommand = {
14084
14118
  }
14085
14119
  else {
14086
14120
  if (oldRule) {
14087
- if (oldRule.unitType === UnitObject$1.Worksheet) {
14121
+ if (oldRule.unitType === UnitObject.Worksheet) {
14088
14122
  redoMutations.push({
14089
14123
  id: DeleteWorksheetProtectionMutation.id,
14090
14124
  params: {
@@ -14100,7 +14134,7 @@ const SetProtectionCommand = {
14100
14134
  subUnitId: oldRule.subUnitId
14101
14135
  }
14102
14136
  });
14103
- } else if (oldRule.unitType === UnitObject$1.SelectRange) {
14137
+ } else if (oldRule.unitType === UnitObject.SelectRange) {
14104
14138
  redoMutations.push({
14105
14139
  id: DeleteRangeProtectionMutation.id,
14106
14140
  params: {
@@ -14119,7 +14153,7 @@ const SetProtectionCommand = {
14119
14153
  });
14120
14154
  }
14121
14155
  }
14122
- if (rule.unitType === UnitObject$1.Worksheet) {
14156
+ if (rule.unitType === UnitObject.Worksheet) {
14123
14157
  redoMutations.push({
14124
14158
  id: AddWorksheetProtectionMutation.id,
14125
14159
  params: {
@@ -14135,7 +14169,7 @@ const SetProtectionCommand = {
14135
14169
  subUnitId
14136
14170
  }
14137
14171
  });
14138
- } else if (rule.unitType === UnitObject$1.SelectRange) {
14172
+ } else if (rule.unitType === UnitObject.SelectRange) {
14139
14173
  rule.id = rangeProtectionRuleModel.createRuleId(unitId, subUnitId);
14140
14174
  redoMutations.push({
14141
14175
  id: AddRangeProtectionMutation.id,
@@ -14327,16 +14361,15 @@ const SetSelectedRowsVisibleCommand = {
14327
14361
  type: CommandType.COMMAND,
14328
14362
  id: "sheet.command.set-selected-rows-visible",
14329
14363
  handler: async (accessor) => {
14330
- var _selectionManagerServ;
14331
14364
  const selectionManagerService = accessor.get(SheetsSelectionsService);
14332
14365
  const univerInstanceService = accessor.get(IUniverInstanceService);
14333
14366
  const commandService = accessor.get(ICommandService);
14334
- const ranges = (_selectionManagerServ = selectionManagerService.getCurrentSelections()) === null || _selectionManagerServ === void 0 ? void 0 : _selectionManagerServ.map((s) => s.range).filter((r) => r.rangeType === RANGE_TYPE.ROW);
14335
- if (!(ranges === null || ranges === void 0 ? void 0 : ranges.length)) return false;
14367
+ const ranges = getSelectedRowRanges(selectionManagerService);
14368
+ if (!ranges.length) return false;
14336
14369
  const target = getSheetCommandTarget(univerInstanceService);
14337
14370
  if (!target) return false;
14338
14371
  const { worksheet, unitId, subUnitId } = target;
14339
- const hiddenRanges = ranges.map((r) => worksheet.getHiddenRows(r.startRow, r.endRow)).flat();
14372
+ const hiddenRanges = getHiddenRowRanges(worksheet, ranges);
14340
14373
  return commandService.executeCommand(SetSpecificRowsVisibleCommand.id, {
14341
14374
  unitId,
14342
14375
  subUnitId,
@@ -14348,14 +14381,14 @@ const SetRowHiddenCommand = {
14348
14381
  type: CommandType.COMMAND,
14349
14382
  id: "sheet.command.set-rows-hidden",
14350
14383
  handler: (accessor, params) => {
14351
- var _params$ranges, _selectionManagerServ2, _intercepted$preRedos2;
14384
+ var _params$ranges, _intercepted$preRedos2;
14352
14385
  const selectionManagerService = accessor.get(SheetsSelectionsService);
14353
14386
  const commandService = accessor.get(ICommandService);
14354
14387
  const undoRedoService = accessor.get(IUndoRedoService);
14355
14388
  const univerInstanceService = accessor.get(IUniverInstanceService);
14356
14389
  const sheetInterceptorService = accessor.get(SheetInterceptorService);
14357
- let ranges = (params === null || params === void 0 || (_params$ranges = params.ranges) === null || _params$ranges === void 0 ? void 0 : _params$ranges.length) ? params.ranges : (_selectionManagerServ2 = selectionManagerService.getCurrentSelections()) === null || _selectionManagerServ2 === void 0 ? void 0 : _selectionManagerServ2.map((s) => s.range).filter((r) => r.rangeType === RANGE_TYPE.ROW);
14358
- if (!(ranges === null || ranges === void 0 ? void 0 : ranges.length)) return false;
14390
+ let ranges = (params === null || params === void 0 || (_params$ranges = params.ranges) === null || _params$ranges === void 0 ? void 0 : _params$ranges.length) ? params.ranges : getSelectedRowRanges(selectionManagerService);
14391
+ if (!ranges.length) return false;
14359
14392
  const target = getSheetCommandTarget(univerInstanceService, params);
14360
14393
  if (!target) return false;
14361
14394
  ranges = divideRangesByHiddenRows(target.worksheet, ranges);
@@ -14441,6 +14474,24 @@ const SetRowHiddenCommand = {
14441
14474
  return true;
14442
14475
  }
14443
14476
  };
14477
+ function getSelectedRowRanges(selectionManagerService) {
14478
+ const selections = selectionManagerService.getCurrentSelections();
14479
+ const ranges = [];
14480
+ if (!selections) return ranges;
14481
+ for (let i = 0; i < selections.length; i++) {
14482
+ const range = selections[i].range;
14483
+ if (range.rangeType === RANGE_TYPE.ROW) ranges.push(range);
14484
+ }
14485
+ return ranges;
14486
+ }
14487
+ function getHiddenRowRanges(worksheet, ranges) {
14488
+ const hiddenRanges = [];
14489
+ for (let i = 0; i < ranges.length; i++) {
14490
+ const hiddenRows = worksheet.getHiddenRows(ranges[i].startRow, ranges[i].endRow);
14491
+ for (let j = 0; j < hiddenRows.length; j++) hiddenRanges.push(hiddenRows[j]);
14492
+ }
14493
+ return hiddenRanges;
14494
+ }
14444
14495
  function divideRangesByHiddenRows(worksheet, ranges) {
14445
14496
  const endCol = worksheet.getMaxColumns() - 1;
14446
14497
  const hiddenRows = worksheet.getHiddenRows();
@@ -15180,8 +15231,8 @@ var WorksheetProtectionPointModel = class {
15180
15231
  //#region src/services/permission/permission-point/range/delete-protection.ts
15181
15232
  var RangeProtectionPermissionDeleteProtectionPoint = class {
15182
15233
  constructor(unitId, subUnitId, permissionId) {
15183
- _defineProperty(this, "type", UnitObject$1.SelectRange);
15184
- _defineProperty(this, "subType", UnitAction$1.Delete);
15234
+ _defineProperty(this, "type", UnitObject.SelectRange);
15235
+ _defineProperty(this, "subType", UnitAction.Delete);
15185
15236
  _defineProperty(this, "status", PermissionStatus.INIT);
15186
15237
  _defineProperty(this, "value", true);
15187
15238
  _defineProperty(this, "id", void 0);
@@ -15191,7 +15242,7 @@ var RangeProtectionPermissionDeleteProtectionPoint = class {
15191
15242
  this.unitId = unitId;
15192
15243
  this.subUnitId = subUnitId;
15193
15244
  this.permissionId = permissionId;
15194
- this.id = `${UnitObject$1.SelectRange}.${UnitAction$1.Delete}.${permissionId}`;
15245
+ this.id = `${UnitObject.SelectRange}.${UnitAction.Delete}.${permissionId}`;
15195
15246
  }
15196
15247
  };
15197
15248
 
@@ -15199,8 +15250,8 @@ var RangeProtectionPermissionDeleteProtectionPoint = class {
15199
15250
  //#region src/services/permission/permission-point/range/edit.ts
15200
15251
  var RangeProtectionPermissionEditPoint = class {
15201
15252
  constructor(unitId, subUnitId, permissionId) {
15202
- _defineProperty(this, "type", UnitObject$1.SelectRange);
15203
- _defineProperty(this, "subType", UnitAction$1.Edit);
15253
+ _defineProperty(this, "type", UnitObject.SelectRange);
15254
+ _defineProperty(this, "subType", UnitAction.Edit);
15204
15255
  _defineProperty(this, "status", PermissionStatus.INIT);
15205
15256
  _defineProperty(this, "value", true);
15206
15257
  _defineProperty(this, "id", void 0);
@@ -15210,7 +15261,7 @@ var RangeProtectionPermissionEditPoint = class {
15210
15261
  this.unitId = unitId;
15211
15262
  this.subUnitId = subUnitId;
15212
15263
  this.permissionId = permissionId;
15213
- this.id = `${UnitObject$1.SelectRange}.${UnitAction$1.Edit}.${permissionId}`;
15264
+ this.id = `${UnitObject.SelectRange}.${UnitAction.Edit}.${permissionId}`;
15214
15265
  }
15215
15266
  };
15216
15267
 
@@ -15218,8 +15269,8 @@ var RangeProtectionPermissionEditPoint = class {
15218
15269
  //#region src/services/permission/permission-point/range/manage-collaborator.ts
15219
15270
  var RangeProtectionPermissionManageCollaPoint = class {
15220
15271
  constructor(unitId, subUnitId, permissionId) {
15221
- _defineProperty(this, "type", UnitObject$1.SelectRange);
15222
- _defineProperty(this, "subType", UnitAction$1.ManageCollaborator);
15272
+ _defineProperty(this, "type", UnitObject.SelectRange);
15273
+ _defineProperty(this, "subType", UnitAction.ManageCollaborator);
15223
15274
  _defineProperty(this, "status", PermissionStatus.INIT);
15224
15275
  _defineProperty(this, "value", true);
15225
15276
  _defineProperty(this, "id", void 0);
@@ -15229,7 +15280,7 @@ var RangeProtectionPermissionManageCollaPoint = class {
15229
15280
  this.unitId = unitId;
15230
15281
  this.subUnitId = subUnitId;
15231
15282
  this.permissionId = permissionId;
15232
- this.id = `${UnitObject$1.SelectRange}.${UnitAction$1.ManageCollaborator}.${permissionId}`;
15283
+ this.id = `${UnitObject.SelectRange}.${UnitAction.ManageCollaborator}.${permissionId}`;
15233
15284
  }
15234
15285
  };
15235
15286
 
@@ -15237,8 +15288,8 @@ var RangeProtectionPermissionManageCollaPoint = class {
15237
15288
  //#region src/services/permission/permission-point/range/view.ts
15238
15289
  var RangeProtectionPermissionViewPoint = class {
15239
15290
  constructor(unitId, subUnitId, permissionId) {
15240
- _defineProperty(this, "type", UnitObject$1.SelectRange);
15241
- _defineProperty(this, "subType", UnitAction$1.View);
15291
+ _defineProperty(this, "type", UnitObject.SelectRange);
15292
+ _defineProperty(this, "subType", UnitAction.View);
15242
15293
  _defineProperty(this, "status", PermissionStatus.INIT);
15243
15294
  _defineProperty(this, "value", false);
15244
15295
  _defineProperty(this, "id", void 0);
@@ -15248,7 +15299,7 @@ var RangeProtectionPermissionViewPoint = class {
15248
15299
  this.unitId = unitId;
15249
15300
  this.subUnitId = subUnitId;
15250
15301
  this.permissionId = permissionId;
15251
- this.id = `${UnitObject$1.SelectRange}.${UnitAction$1.View}.${permissionId}`;
15302
+ this.id = `${UnitObject.SelectRange}.${UnitAction.View}.${permissionId}`;
15252
15303
  }
15253
15304
  };
15254
15305
 
@@ -15276,10 +15327,10 @@ const getAllRangePermissionPoint = () => [
15276
15327
  RangeProtectionPermissionDeleteProtectionPoint
15277
15328
  ];
15278
15329
  const baseProtectionActions = [
15279
- UnitAction$1.Edit,
15280
- UnitAction$1.View,
15281
- UnitAction$1.ManageCollaborator,
15282
- UnitAction$1.Delete
15330
+ UnitAction.Edit,
15331
+ UnitAction.View,
15332
+ UnitAction.ManageCollaborator,
15333
+ UnitAction.Delete
15283
15334
  ];
15284
15335
  const getDefaultRangePermission = (unitId = "unitId", subUnitId = "subUnitId", permissionId = "permissionId") => getAllRangePermissionPoint().reduce((r, F) => {
15285
15336
  const i = new F(unitId, subUnitId, permissionId);
@@ -15294,11 +15345,11 @@ var WorkbookCommentPermission = class {
15294
15345
  this.unitId = unitId;
15295
15346
  _defineProperty(this, "id", void 0);
15296
15347
  _defineProperty(this, "value", true);
15297
- _defineProperty(this, "type", UnitObject$1.Workbook);
15348
+ _defineProperty(this, "type", UnitObject.Workbook);
15298
15349
  _defineProperty(this, "status", PermissionStatus.INIT);
15299
- _defineProperty(this, "subType", UnitAction$1.Comment);
15350
+ _defineProperty(this, "subType", UnitAction.Comment);
15300
15351
  this.unitId = unitId;
15301
- this.id = `${this.type}.${UnitAction$1.Comment}_${unitId}`;
15352
+ this.id = `${this.type}.${UnitAction.Comment}_${unitId}`;
15302
15353
  }
15303
15354
  };
15304
15355
 
@@ -15309,11 +15360,11 @@ var WorkbookCopyPermission = class {
15309
15360
  this.unitId = unitId;
15310
15361
  _defineProperty(this, "id", void 0);
15311
15362
  _defineProperty(this, "value", true);
15312
- _defineProperty(this, "type", UnitObject$1.Workbook);
15363
+ _defineProperty(this, "type", UnitObject.Workbook);
15313
15364
  _defineProperty(this, "status", PermissionStatus.INIT);
15314
- _defineProperty(this, "subType", UnitAction$1.Copy);
15365
+ _defineProperty(this, "subType", UnitAction.Copy);
15315
15366
  this.unitId = unitId;
15316
- this.id = `${this.type}.${UnitAction$1.Copy}_${unitId}`;
15367
+ this.id = `${this.type}.${UnitAction.Copy}_${unitId}`;
15317
15368
  }
15318
15369
  };
15319
15370
 
@@ -15324,11 +15375,11 @@ var WorkbookCopySheetPermission = class {
15324
15375
  this.unitId = unitId;
15325
15376
  _defineProperty(this, "id", void 0);
15326
15377
  _defineProperty(this, "value", true);
15327
- _defineProperty(this, "type", UnitObject$1.Workbook);
15328
- _defineProperty(this, "subType", UnitAction$1.CopySheet);
15378
+ _defineProperty(this, "type", UnitObject.Workbook);
15379
+ _defineProperty(this, "subType", UnitAction.CopySheet);
15329
15380
  _defineProperty(this, "status", PermissionStatus.INIT);
15330
15381
  this.unitId = unitId;
15331
- this.id = `${this.type}.${UnitAction$1.CopySheet}_${unitId}`;
15382
+ this.id = `${this.type}.${UnitAction.CopySheet}_${unitId}`;
15332
15383
  }
15333
15384
  };
15334
15385
 
@@ -15339,11 +15390,11 @@ var WorkbookCreateProtectPermission = class {
15339
15390
  this.unitId = unitId;
15340
15391
  _defineProperty(this, "id", void 0);
15341
15392
  _defineProperty(this, "value", true);
15342
- _defineProperty(this, "type", UnitObject$1.Workbook);
15393
+ _defineProperty(this, "type", UnitObject.Workbook);
15343
15394
  _defineProperty(this, "status", PermissionStatus.INIT);
15344
- _defineProperty(this, "subType", UnitAction$1.CreatePermissionObject);
15395
+ _defineProperty(this, "subType", UnitAction.CreatePermissionObject);
15345
15396
  this.unitId = unitId;
15346
- this.id = `${this.type}.${UnitAction$1.CreatePermissionObject}_${unitId}`;
15397
+ this.id = `${this.type}.${UnitAction.CreatePermissionObject}_${unitId}`;
15347
15398
  }
15348
15399
  };
15349
15400
 
@@ -15354,11 +15405,11 @@ var WorkbookCreateSheetPermission = class {
15354
15405
  this.unitId = unitId;
15355
15406
  _defineProperty(this, "id", void 0);
15356
15407
  _defineProperty(this, "value", true);
15357
- _defineProperty(this, "type", UnitObject$1.Workbook);
15408
+ _defineProperty(this, "type", UnitObject.Workbook);
15358
15409
  _defineProperty(this, "status", PermissionStatus.INIT);
15359
- _defineProperty(this, "subType", UnitAction$1.CreateSheet);
15410
+ _defineProperty(this, "subType", UnitAction.CreateSheet);
15360
15411
  this.unitId = unitId;
15361
- this.id = `${this.type}.${UnitAction$1.CreateSheet}_${unitId}`;
15412
+ this.id = `${this.type}.${UnitAction.CreateSheet}_${unitId}`;
15362
15413
  }
15363
15414
  };
15364
15415
 
@@ -15368,11 +15419,11 @@ var WorkbookDeleteColumnPermission = class {
15368
15419
  constructor(unitId) {
15369
15420
  this.unitId = unitId;
15370
15421
  _defineProperty(this, "value", true);
15371
- _defineProperty(this, "type", UnitObject$1.Workbook);
15422
+ _defineProperty(this, "type", UnitObject.Workbook);
15372
15423
  _defineProperty(this, "status", PermissionStatus.INIT);
15373
15424
  _defineProperty(this, "id", void 0);
15374
- _defineProperty(this, "subType", UnitAction$1.DeleteColumn);
15375
- this.id = `${this.type}.${UnitAction$1.DeleteColumn}_${unitId}`;
15425
+ _defineProperty(this, "subType", UnitAction.DeleteColumn);
15426
+ this.id = `${this.type}.${UnitAction.DeleteColumn}_${unitId}`;
15376
15427
  }
15377
15428
  };
15378
15429
 
@@ -15382,11 +15433,11 @@ var WorkbookDeleteRowPermission = class {
15382
15433
  constructor(unitId) {
15383
15434
  this.unitId = unitId;
15384
15435
  _defineProperty(this, "value", true);
15385
- _defineProperty(this, "type", UnitObject$1.Workbook);
15436
+ _defineProperty(this, "type", UnitObject.Workbook);
15386
15437
  _defineProperty(this, "status", PermissionStatus.INIT);
15387
15438
  _defineProperty(this, "id", void 0);
15388
- _defineProperty(this, "subType", UnitAction$1.DeleteRow);
15389
- this.id = `${this.type}.${UnitAction$1.DeleteRow}_${unitId}`;
15439
+ _defineProperty(this, "subType", UnitAction.DeleteRow);
15440
+ this.id = `${this.type}.${UnitAction.DeleteRow}_${unitId}`;
15390
15441
  }
15391
15442
  };
15392
15443
 
@@ -15397,11 +15448,11 @@ var WorkbookDeleteSheetPermission = class {
15397
15448
  this.unitId = unitId;
15398
15449
  _defineProperty(this, "id", void 0);
15399
15450
  _defineProperty(this, "value", true);
15400
- _defineProperty(this, "type", UnitObject$1.Workbook);
15451
+ _defineProperty(this, "type", UnitObject.Workbook);
15401
15452
  _defineProperty(this, "status", PermissionStatus.INIT);
15402
- _defineProperty(this, "subType", UnitAction$1.DeleteSheet);
15453
+ _defineProperty(this, "subType", UnitAction.DeleteSheet);
15403
15454
  this.unitId = unitId;
15404
- this.id = `${this.type}.${UnitAction$1.DeleteSheet}_${unitId}`;
15455
+ this.id = `${this.type}.${UnitAction.DeleteSheet}_${unitId}`;
15405
15456
  }
15406
15457
  };
15407
15458
 
@@ -15412,11 +15463,11 @@ var WorkbookDuplicatePermission = class {
15412
15463
  this.unitId = unitId;
15413
15464
  _defineProperty(this, "id", void 0);
15414
15465
  _defineProperty(this, "value", true);
15415
- _defineProperty(this, "type", UnitObject$1.Workbook);
15466
+ _defineProperty(this, "type", UnitObject.Workbook);
15416
15467
  _defineProperty(this, "status", PermissionStatus.INIT);
15417
- _defineProperty(this, "subType", UnitAction$1.Duplicate);
15468
+ _defineProperty(this, "subType", UnitAction.Duplicate);
15418
15469
  this.unitId = unitId;
15419
- this.id = `${this.type}.${UnitAction$1.Duplicate}_${unitId}`;
15470
+ this.id = `${this.type}.${UnitAction.Duplicate}_${unitId}`;
15420
15471
  }
15421
15472
  };
15422
15473
 
@@ -15427,11 +15478,11 @@ var WorkbookEditablePermission = class {
15427
15478
  this.unitId = unitId;
15428
15479
  _defineProperty(this, "id", void 0);
15429
15480
  _defineProperty(this, "value", true);
15430
- _defineProperty(this, "type", UnitObject$1.Workbook);
15481
+ _defineProperty(this, "type", UnitObject.Workbook);
15431
15482
  _defineProperty(this, "status", PermissionStatus.INIT);
15432
- _defineProperty(this, "subType", UnitAction$1.Edit);
15483
+ _defineProperty(this, "subType", UnitAction.Edit);
15433
15484
  this.unitId = unitId;
15434
- this.id = `${this.type}.${UnitAction$1.Edit}_${unitId}`;
15485
+ this.id = `${this.type}.${UnitAction.Edit}_${unitId}`;
15435
15486
  }
15436
15487
  };
15437
15488
 
@@ -15442,11 +15493,11 @@ var WorkbookExportPermission = class {
15442
15493
  this.unitId = unitId;
15443
15494
  _defineProperty(this, "id", void 0);
15444
15495
  _defineProperty(this, "value", true);
15445
- _defineProperty(this, "type", UnitObject$1.Workbook);
15496
+ _defineProperty(this, "type", UnitObject.Workbook);
15446
15497
  _defineProperty(this, "status", PermissionStatus.INIT);
15447
- _defineProperty(this, "subType", UnitAction$1.Export);
15498
+ _defineProperty(this, "subType", UnitAction.Export);
15448
15499
  this.unitId = unitId;
15449
- this.id = `${this.type}.${UnitAction$1.Export}_${unitId}`;
15500
+ this.id = `${this.type}.${UnitAction.Export}_${unitId}`;
15450
15501
  }
15451
15502
  };
15452
15503
 
@@ -15457,11 +15508,11 @@ var WorkbookHideSheetPermission = class {
15457
15508
  this.unitId = unitId;
15458
15509
  _defineProperty(this, "id", void 0);
15459
15510
  _defineProperty(this, "value", true);
15460
- _defineProperty(this, "type", UnitObject$1.Workbook);
15511
+ _defineProperty(this, "type", UnitObject.Workbook);
15461
15512
  _defineProperty(this, "status", PermissionStatus.INIT);
15462
- _defineProperty(this, "subType", UnitAction$1.HideSheet);
15513
+ _defineProperty(this, "subType", UnitAction.HideSheet);
15463
15514
  this.unitId = unitId;
15464
- this.id = `${this.type}.${UnitAction$1.HideSheet}_${unitId}`;
15515
+ this.id = `${this.type}.${UnitAction.HideSheet}_${unitId}`;
15465
15516
  }
15466
15517
  };
15467
15518
 
@@ -15471,11 +15522,11 @@ var WorkbookInsertColumnPermission = class {
15471
15522
  constructor(unitId) {
15472
15523
  this.unitId = unitId;
15473
15524
  _defineProperty(this, "value", true);
15474
- _defineProperty(this, "type", UnitObject$1.Workbook);
15525
+ _defineProperty(this, "type", UnitObject.Workbook);
15475
15526
  _defineProperty(this, "status", PermissionStatus.INIT);
15476
15527
  _defineProperty(this, "id", void 0);
15477
- _defineProperty(this, "subType", UnitAction$1.InsertColumn);
15478
- this.id = `${this.type}.${UnitAction$1.InsertColumn}_${unitId}`;
15528
+ _defineProperty(this, "subType", UnitAction.InsertColumn);
15529
+ this.id = `${this.type}.${UnitAction.InsertColumn}_${unitId}`;
15479
15530
  }
15480
15531
  };
15481
15532
 
@@ -15485,11 +15536,11 @@ var WorkbookInsertRowPermission = class {
15485
15536
  constructor(unitId) {
15486
15537
  this.unitId = unitId;
15487
15538
  _defineProperty(this, "value", true);
15488
- _defineProperty(this, "type", UnitObject$1.Workbook);
15539
+ _defineProperty(this, "type", UnitObject.Workbook);
15489
15540
  _defineProperty(this, "status", PermissionStatus.INIT);
15490
15541
  _defineProperty(this, "id", void 0);
15491
- _defineProperty(this, "subType", UnitAction$1.InsertRow);
15492
- this.id = `${this.type}.${UnitAction$1.InsertRow}_${unitId}`;
15542
+ _defineProperty(this, "subType", UnitAction.InsertRow);
15543
+ this.id = `${this.type}.${UnitAction.InsertRow}_${unitId}`;
15493
15544
  }
15494
15545
  };
15495
15546
 
@@ -15500,11 +15551,11 @@ var WorkbookManageCollaboratorPermission = class {
15500
15551
  this.unitId = unitId;
15501
15552
  _defineProperty(this, "id", void 0);
15502
15553
  _defineProperty(this, "value", true);
15503
- _defineProperty(this, "type", UnitObject$1.Workbook);
15554
+ _defineProperty(this, "type", UnitObject.Workbook);
15504
15555
  _defineProperty(this, "status", PermissionStatus.INIT);
15505
- _defineProperty(this, "subType", UnitAction$1.ManageCollaborator);
15556
+ _defineProperty(this, "subType", UnitAction.ManageCollaborator);
15506
15557
  this.unitId = unitId;
15507
- this.id = `${this.type}.${UnitAction$1.ManageCollaborator}_${unitId}`;
15558
+ this.id = `${this.type}.${UnitAction.ManageCollaborator}_${unitId}`;
15508
15559
  }
15509
15560
  };
15510
15561
 
@@ -15515,11 +15566,11 @@ var WorkbookMoveSheetPermission = class {
15515
15566
  this.unitId = unitId;
15516
15567
  _defineProperty(this, "id", void 0);
15517
15568
  _defineProperty(this, "value", true);
15518
- _defineProperty(this, "type", UnitObject$1.Workbook);
15569
+ _defineProperty(this, "type", UnitObject.Workbook);
15519
15570
  _defineProperty(this, "status", PermissionStatus.INIT);
15520
- _defineProperty(this, "subType", UnitAction$1.MoveSheet);
15571
+ _defineProperty(this, "subType", UnitAction.MoveSheet);
15521
15572
  this.unitId = unitId;
15522
- this.id = `${this.type}.${UnitAction$1.MoveSheet}_${unitId}`;
15573
+ this.id = `${this.type}.${UnitAction.MoveSheet}_${unitId}`;
15523
15574
  }
15524
15575
  };
15525
15576
 
@@ -15530,11 +15581,11 @@ var WorkbookPrintPermission = class {
15530
15581
  this.unitId = unitId;
15531
15582
  _defineProperty(this, "id", void 0);
15532
15583
  _defineProperty(this, "value", true);
15533
- _defineProperty(this, "type", UnitObject$1.Workbook);
15584
+ _defineProperty(this, "type", UnitObject.Workbook);
15534
15585
  _defineProperty(this, "status", PermissionStatus.INIT);
15535
- _defineProperty(this, "subType", UnitAction$1.Print);
15586
+ _defineProperty(this, "subType", UnitAction.Print);
15536
15587
  this.unitId = unitId;
15537
- this.id = `${this.type}.${UnitAction$1.Print}_${unitId}`;
15588
+ this.id = `${this.type}.${UnitAction.Print}_${unitId}`;
15538
15589
  }
15539
15590
  };
15540
15591
 
@@ -15545,11 +15596,11 @@ var WorkbookRecoverHistoryPermission = class {
15545
15596
  this.unitId = unitId;
15546
15597
  _defineProperty(this, "id", void 0);
15547
15598
  _defineProperty(this, "value", true);
15548
- _defineProperty(this, "type", UnitObject$1.Workbook);
15599
+ _defineProperty(this, "type", UnitObject.Workbook);
15549
15600
  _defineProperty(this, "status", PermissionStatus.INIT);
15550
- _defineProperty(this, "subType", UnitAction$1.RecoverHistory);
15601
+ _defineProperty(this, "subType", UnitAction.RecoverHistory);
15551
15602
  this.unitId = unitId;
15552
- this.id = `${this.type}.${UnitAction$1.RecoverHistory}_${unitId}`;
15603
+ this.id = `${this.type}.${UnitAction.RecoverHistory}_${unitId}`;
15553
15604
  }
15554
15605
  };
15555
15606
 
@@ -15560,11 +15611,11 @@ var WorkbookRenameSheetPermission = class {
15560
15611
  this.unitId = unitId;
15561
15612
  _defineProperty(this, "id", void 0);
15562
15613
  _defineProperty(this, "value", true);
15563
- _defineProperty(this, "type", UnitObject$1.Workbook);
15614
+ _defineProperty(this, "type", UnitObject.Workbook);
15564
15615
  _defineProperty(this, "status", PermissionStatus.INIT);
15565
- _defineProperty(this, "subType", UnitAction$1.RenameSheet);
15616
+ _defineProperty(this, "subType", UnitAction.RenameSheet);
15566
15617
  this.unitId = unitId;
15567
- this.id = `${this.type}.${UnitAction$1.RenameSheet}_${unitId}`;
15618
+ this.id = `${this.type}.${UnitAction.RenameSheet}_${unitId}`;
15568
15619
  }
15569
15620
  };
15570
15621
 
@@ -15575,11 +15626,11 @@ var WorkbookSharePermission = class {
15575
15626
  this.unitId = unitId;
15576
15627
  _defineProperty(this, "id", void 0);
15577
15628
  _defineProperty(this, "value", true);
15578
- _defineProperty(this, "type", UnitObject$1.Workbook);
15629
+ _defineProperty(this, "type", UnitObject.Workbook);
15579
15630
  _defineProperty(this, "status", PermissionStatus.INIT);
15580
- _defineProperty(this, "subType", UnitAction$1.Share);
15631
+ _defineProperty(this, "subType", UnitAction.Share);
15581
15632
  this.unitId = unitId;
15582
- this.id = `${this.type}.${UnitAction$1.Share}_${unitId}`;
15633
+ this.id = `${this.type}.${UnitAction.Share}_${unitId}`;
15583
15634
  }
15584
15635
  };
15585
15636
 
@@ -15590,11 +15641,11 @@ var WorkbookViewPermission = class {
15590
15641
  this.unitId = unitId;
15591
15642
  _defineProperty(this, "id", void 0);
15592
15643
  _defineProperty(this, "value", true);
15593
- _defineProperty(this, "type", UnitObject$1.Workbook);
15644
+ _defineProperty(this, "type", UnitObject.Workbook);
15594
15645
  _defineProperty(this, "status", PermissionStatus.INIT);
15595
- _defineProperty(this, "subType", UnitAction$1.View);
15646
+ _defineProperty(this, "subType", UnitAction.View);
15596
15647
  this.unitId = unitId;
15597
- this.id = `${this.type}.${UnitAction$1.View}_${unitId}`;
15648
+ this.id = `${this.type}.${UnitAction.View}_${unitId}`;
15598
15649
  }
15599
15650
  };
15600
15651
 
@@ -15605,11 +15656,11 @@ var WorkbookViewHistoryPermission = class {
15605
15656
  this.unitId = unitId;
15606
15657
  _defineProperty(this, "id", void 0);
15607
15658
  _defineProperty(this, "value", true);
15608
- _defineProperty(this, "type", UnitObject$1.Workbook);
15659
+ _defineProperty(this, "type", UnitObject.Workbook);
15609
15660
  _defineProperty(this, "status", PermissionStatus.INIT);
15610
- _defineProperty(this, "subType", UnitAction$1.ViewHistory);
15661
+ _defineProperty(this, "subType", UnitAction.ViewHistory);
15611
15662
  this.unitId = unitId;
15612
- this.id = `${this.type}.${UnitAction$1.ViewHistory}_${unitId}`;
15663
+ this.id = `${this.type}.${UnitAction.ViewHistory}_${unitId}`;
15613
15664
  }
15614
15665
  };
15615
15666
 
@@ -15620,11 +15671,11 @@ var WorksheetCopyPermission = class {
15620
15671
  this.unitId = unitId;
15621
15672
  this.subUnitId = subUnitId;
15622
15673
  _defineProperty(this, "value", true);
15623
- _defineProperty(this, "type", UnitObject$1.Worksheet);
15674
+ _defineProperty(this, "type", UnitObject.Worksheet);
15624
15675
  _defineProperty(this, "status", PermissionStatus.INIT);
15625
15676
  _defineProperty(this, "id", void 0);
15626
- _defineProperty(this, "subType", UnitAction$1.Copy);
15627
- this.id = `${this.type}.${UnitAction$1.Copy}_${unitId}_${subUnitId}`;
15677
+ _defineProperty(this, "subType", UnitAction.Copy);
15678
+ this.id = `${this.type}.${UnitAction.Copy}_${unitId}_${subUnitId}`;
15628
15679
  }
15629
15680
  };
15630
15681
 
@@ -15635,11 +15686,11 @@ var WorksheetDeleteColumnPermission = class {
15635
15686
  this.unitId = unitId;
15636
15687
  this.subUnitId = subUnitId;
15637
15688
  _defineProperty(this, "value", true);
15638
- _defineProperty(this, "type", UnitObject$1.Worksheet);
15689
+ _defineProperty(this, "type", UnitObject.Worksheet);
15639
15690
  _defineProperty(this, "status", PermissionStatus.INIT);
15640
15691
  _defineProperty(this, "id", void 0);
15641
- _defineProperty(this, "subType", UnitAction$1.DeleteColumn);
15642
- this.id = `${this.type}.${UnitAction$1.DeleteColumn}_${unitId}_${subUnitId}`;
15692
+ _defineProperty(this, "subType", UnitAction.DeleteColumn);
15693
+ this.id = `${this.type}.${UnitAction.DeleteColumn}_${unitId}_${subUnitId}`;
15643
15694
  }
15644
15695
  };
15645
15696
 
@@ -15650,11 +15701,11 @@ var WorksheetDeleteProtectionPermission = class {
15650
15701
  this.unitId = unitId;
15651
15702
  this.subUnitId = subUnitId;
15652
15703
  _defineProperty(this, "value", true);
15653
- _defineProperty(this, "type", UnitObject$1.Worksheet);
15704
+ _defineProperty(this, "type", UnitObject.Worksheet);
15654
15705
  _defineProperty(this, "status", PermissionStatus.INIT);
15655
15706
  _defineProperty(this, "id", void 0);
15656
- _defineProperty(this, "subType", UnitAction$1.Delete);
15657
- this.id = `${this.type}.${UnitAction$1.Delete}_${unitId}_${subUnitId}`;
15707
+ _defineProperty(this, "subType", UnitAction.Delete);
15708
+ this.id = `${this.type}.${UnitAction.Delete}_${unitId}_${subUnitId}`;
15658
15709
  }
15659
15710
  };
15660
15711
 
@@ -15665,11 +15716,11 @@ var WorksheetDeleteRowPermission = class {
15665
15716
  this.unitId = unitId;
15666
15717
  this.subUnitId = subUnitId;
15667
15718
  _defineProperty(this, "value", true);
15668
- _defineProperty(this, "type", UnitObject$1.Worksheet);
15719
+ _defineProperty(this, "type", UnitObject.Worksheet);
15669
15720
  _defineProperty(this, "status", PermissionStatus.INIT);
15670
15721
  _defineProperty(this, "id", void 0);
15671
- _defineProperty(this, "subType", UnitAction$1.DeleteRow);
15672
- this.id = `${this.type}.${UnitAction$1.DeleteRow}_${unitId}_${subUnitId}`;
15722
+ _defineProperty(this, "subType", UnitAction.DeleteRow);
15723
+ this.id = `${this.type}.${UnitAction.DeleteRow}_${unitId}_${subUnitId}`;
15673
15724
  }
15674
15725
  };
15675
15726
 
@@ -15680,11 +15731,11 @@ var WorksheetEditPermission = class {
15680
15731
  this.unitId = unitId;
15681
15732
  this.subUnitId = subUnitId;
15682
15733
  _defineProperty(this, "value", true);
15683
- _defineProperty(this, "type", UnitObject$1.Worksheet);
15734
+ _defineProperty(this, "type", UnitObject.Worksheet);
15684
15735
  _defineProperty(this, "status", PermissionStatus.INIT);
15685
15736
  _defineProperty(this, "id", void 0);
15686
- _defineProperty(this, "subType", UnitAction$1.Edit);
15687
- this.id = `${this.type}.${UnitAction$1.Edit}_${unitId}_${subUnitId}`;
15737
+ _defineProperty(this, "subType", UnitAction.Edit);
15738
+ this.id = `${this.type}.${UnitAction.Edit}_${unitId}_${subUnitId}`;
15688
15739
  }
15689
15740
  };
15690
15741
 
@@ -15695,11 +15746,11 @@ var WorksheetEditExtraObjectPermission = class {
15695
15746
  this.unitId = unitId;
15696
15747
  this.subUnitId = subUnitId;
15697
15748
  _defineProperty(this, "value", true);
15698
- _defineProperty(this, "type", UnitObject$1.Worksheet);
15749
+ _defineProperty(this, "type", UnitObject.Worksheet);
15699
15750
  _defineProperty(this, "status", PermissionStatus.INIT);
15700
15751
  _defineProperty(this, "id", void 0);
15701
- _defineProperty(this, "subType", UnitAction$1.EditExtraObject);
15702
- this.id = `${this.type}.${UnitAction$1.EditExtraObject}_${unitId}_${subUnitId}`;
15752
+ _defineProperty(this, "subType", UnitAction.EditExtraObject);
15753
+ this.id = `${this.type}.${UnitAction.EditExtraObject}_${unitId}_${subUnitId}`;
15703
15754
  }
15704
15755
  };
15705
15756
 
@@ -15710,11 +15761,11 @@ var WorksheetFilterPermission = class {
15710
15761
  this.unitId = unitId;
15711
15762
  this.subUnitId = subUnitId;
15712
15763
  _defineProperty(this, "value", true);
15713
- _defineProperty(this, "type", UnitObject$1.Worksheet);
15764
+ _defineProperty(this, "type", UnitObject.Worksheet);
15714
15765
  _defineProperty(this, "status", PermissionStatus.INIT);
15715
15766
  _defineProperty(this, "id", void 0);
15716
- _defineProperty(this, "subType", UnitAction$1.Filter);
15717
- this.id = `${this.type}.${UnitAction$1.Filter}_${unitId}_${subUnitId}`;
15767
+ _defineProperty(this, "subType", UnitAction.Filter);
15768
+ this.id = `${this.type}.${UnitAction.Filter}_${unitId}_${subUnitId}`;
15718
15769
  }
15719
15770
  };
15720
15771
 
@@ -15725,11 +15776,11 @@ var WorksheetInsertColumnPermission = class {
15725
15776
  this.unitId = unitId;
15726
15777
  this.subUnitId = subUnitId;
15727
15778
  _defineProperty(this, "value", true);
15728
- _defineProperty(this, "type", UnitObject$1.Worksheet);
15779
+ _defineProperty(this, "type", UnitObject.Worksheet);
15729
15780
  _defineProperty(this, "status", PermissionStatus.INIT);
15730
15781
  _defineProperty(this, "id", void 0);
15731
- _defineProperty(this, "subType", UnitAction$1.InsertColumn);
15732
- this.id = `${this.type}.${UnitAction$1.InsertColumn}_${unitId}_${subUnitId}`;
15782
+ _defineProperty(this, "subType", UnitAction.InsertColumn);
15783
+ this.id = `${this.type}.${UnitAction.InsertColumn}_${unitId}_${subUnitId}`;
15733
15784
  }
15734
15785
  };
15735
15786
 
@@ -15740,11 +15791,11 @@ var WorksheetInsertHyperlinkPermission = class {
15740
15791
  this.unitId = unitId;
15741
15792
  this.subUnitId = subUnitId;
15742
15793
  _defineProperty(this, "value", true);
15743
- _defineProperty(this, "type", UnitObject$1.Worksheet);
15794
+ _defineProperty(this, "type", UnitObject.Worksheet);
15744
15795
  _defineProperty(this, "status", PermissionStatus.INIT);
15745
15796
  _defineProperty(this, "id", void 0);
15746
- _defineProperty(this, "subType", UnitAction$1.InsertHyperlink);
15747
- this.id = `${this.type}.${UnitAction$1.InsertHyperlink}_${unitId}_${subUnitId}`;
15797
+ _defineProperty(this, "subType", UnitAction.InsertHyperlink);
15798
+ this.id = `${this.type}.${UnitAction.InsertHyperlink}_${unitId}_${subUnitId}`;
15748
15799
  }
15749
15800
  };
15750
15801
 
@@ -15755,11 +15806,11 @@ var WorksheetInsertRowPermission = class {
15755
15806
  this.unitId = unitId;
15756
15807
  this.subUnitId = subUnitId;
15757
15808
  _defineProperty(this, "value", true);
15758
- _defineProperty(this, "type", UnitObject$1.Worksheet);
15809
+ _defineProperty(this, "type", UnitObject.Worksheet);
15759
15810
  _defineProperty(this, "status", PermissionStatus.INIT);
15760
15811
  _defineProperty(this, "id", void 0);
15761
- _defineProperty(this, "subType", UnitAction$1.InsertRow);
15762
- this.id = `${this.type}.${UnitAction$1.InsertRow}_${unitId}_${subUnitId}`;
15812
+ _defineProperty(this, "subType", UnitAction.InsertRow);
15813
+ this.id = `${this.type}.${UnitAction.InsertRow}_${unitId}_${subUnitId}`;
15763
15814
  }
15764
15815
  };
15765
15816
 
@@ -15770,11 +15821,11 @@ var WorksheetManageCollaboratorPermission = class {
15770
15821
  this.unitId = unitId;
15771
15822
  this.subUnitId = subUnitId;
15772
15823
  _defineProperty(this, "value", true);
15773
- _defineProperty(this, "type", UnitObject$1.Worksheet);
15824
+ _defineProperty(this, "type", UnitObject.Worksheet);
15774
15825
  _defineProperty(this, "status", PermissionStatus.INIT);
15775
15826
  _defineProperty(this, "id", void 0);
15776
- _defineProperty(this, "subType", UnitAction$1.ManageCollaborator);
15777
- this.id = `${this.type}.${UnitAction$1.ManageCollaborator}_${unitId}_${subUnitId}`;
15827
+ _defineProperty(this, "subType", UnitAction.ManageCollaborator);
15828
+ this.id = `${this.type}.${UnitAction.ManageCollaborator}_${unitId}_${subUnitId}`;
15778
15829
  }
15779
15830
  };
15780
15831
 
@@ -15785,11 +15836,11 @@ var WorksheetPivotTablePermission = class {
15785
15836
  this.unitId = unitId;
15786
15837
  this.subUnitId = subUnitId;
15787
15838
  _defineProperty(this, "value", true);
15788
- _defineProperty(this, "type", UnitObject$1.Worksheet);
15839
+ _defineProperty(this, "type", UnitObject.Worksheet);
15789
15840
  _defineProperty(this, "status", PermissionStatus.INIT);
15790
15841
  _defineProperty(this, "id", void 0);
15791
- _defineProperty(this, "subType", UnitAction$1.PivotTable);
15792
- this.id = `${this.type}.${UnitAction$1.PivotTable}_${unitId}_${subUnitId}`;
15842
+ _defineProperty(this, "subType", UnitAction.PivotTable);
15843
+ this.id = `${this.type}.${UnitAction.PivotTable}_${unitId}_${subUnitId}`;
15793
15844
  }
15794
15845
  };
15795
15846
 
@@ -15800,11 +15851,11 @@ var WorksheetSelectProtectedCellsPermission = class {
15800
15851
  this.unitId = unitId;
15801
15852
  this.subUnitId = subUnitId;
15802
15853
  _defineProperty(this, "value", true);
15803
- _defineProperty(this, "type", UnitObject$1.Worksheet);
15854
+ _defineProperty(this, "type", UnitObject.Worksheet);
15804
15855
  _defineProperty(this, "status", PermissionStatus.INIT);
15805
15856
  _defineProperty(this, "id", void 0);
15806
- _defineProperty(this, "subType", UnitAction$1.SelectProtectedCells);
15807
- this.id = `${this.type}.${UnitAction$1.SelectProtectedCells}_${unitId}_${subUnitId}`;
15857
+ _defineProperty(this, "subType", UnitAction.SelectProtectedCells);
15858
+ this.id = `${this.type}.${UnitAction.SelectProtectedCells}_${unitId}_${subUnitId}`;
15808
15859
  }
15809
15860
  };
15810
15861
 
@@ -15815,11 +15866,11 @@ var WorksheetSelectUnProtectedCellsPermission = class {
15815
15866
  this.unitId = unitId;
15816
15867
  this.subUnitId = subUnitId;
15817
15868
  _defineProperty(this, "value", true);
15818
- _defineProperty(this, "type", UnitObject$1.Worksheet);
15869
+ _defineProperty(this, "type", UnitObject.Worksheet);
15819
15870
  _defineProperty(this, "status", PermissionStatus.INIT);
15820
15871
  _defineProperty(this, "id", void 0);
15821
- _defineProperty(this, "subType", UnitAction$1.SelectUnProtectedCells);
15822
- this.id = `${this.type}.${UnitAction$1.SelectUnProtectedCells}_${unitId}_${subUnitId}`;
15872
+ _defineProperty(this, "subType", UnitAction.SelectUnProtectedCells);
15873
+ this.id = `${this.type}.${UnitAction.SelectUnProtectedCells}_${unitId}_${subUnitId}`;
15823
15874
  }
15824
15875
  };
15825
15876
 
@@ -15830,11 +15881,11 @@ var WorksheetSetCellStylePermission = class {
15830
15881
  this.unitId = unitId;
15831
15882
  this.subUnitId = subUnitId;
15832
15883
  _defineProperty(this, "value", true);
15833
- _defineProperty(this, "type", UnitObject$1.Worksheet);
15884
+ _defineProperty(this, "type", UnitObject.Worksheet);
15834
15885
  _defineProperty(this, "status", PermissionStatus.INIT);
15835
15886
  _defineProperty(this, "id", void 0);
15836
- _defineProperty(this, "subType", UnitAction$1.SetCellStyle);
15837
- this.id = `${this.type}.${UnitAction$1.SetCellStyle}_${unitId}_${subUnitId}`;
15887
+ _defineProperty(this, "subType", UnitAction.SetCellStyle);
15888
+ this.id = `${this.type}.${UnitAction.SetCellStyle}_${unitId}_${subUnitId}`;
15838
15889
  }
15839
15890
  };
15840
15891
 
@@ -15845,11 +15896,11 @@ var WorksheetSetCellValuePermission = class {
15845
15896
  this.unitId = unitId;
15846
15897
  this.subUnitId = subUnitId;
15847
15898
  _defineProperty(this, "value", true);
15848
- _defineProperty(this, "type", UnitObject$1.Worksheet);
15899
+ _defineProperty(this, "type", UnitObject.Worksheet);
15849
15900
  _defineProperty(this, "status", PermissionStatus.INIT);
15850
15901
  _defineProperty(this, "id", void 0);
15851
- _defineProperty(this, "subType", UnitAction$1.SetCellValue);
15852
- this.id = `${this.type}.${UnitAction$1.SetCellValue}_${unitId}_${subUnitId}`;
15902
+ _defineProperty(this, "subType", UnitAction.SetCellValue);
15903
+ this.id = `${this.type}.${UnitAction.SetCellValue}_${unitId}_${subUnitId}`;
15853
15904
  }
15854
15905
  };
15855
15906
 
@@ -15860,11 +15911,11 @@ var WorksheetSetColumnStylePermission = class {
15860
15911
  this.unitId = unitId;
15861
15912
  this.subUnitId = subUnitId;
15862
15913
  _defineProperty(this, "value", true);
15863
- _defineProperty(this, "type", UnitObject$1.Worksheet);
15914
+ _defineProperty(this, "type", UnitObject.Worksheet);
15864
15915
  _defineProperty(this, "status", PermissionStatus.INIT);
15865
15916
  _defineProperty(this, "id", void 0);
15866
- _defineProperty(this, "subType", UnitAction$1.SetColumnStyle);
15867
- this.id = `${this.type}.${UnitAction$1.SetColumnStyle}_${unitId}_${subUnitId}`;
15917
+ _defineProperty(this, "subType", UnitAction.SetColumnStyle);
15918
+ this.id = `${this.type}.${UnitAction.SetColumnStyle}_${unitId}_${subUnitId}`;
15868
15919
  }
15869
15920
  };
15870
15921
 
@@ -15875,11 +15926,11 @@ var WorksheetSetRowStylePermission = class {
15875
15926
  this.unitId = unitId;
15876
15927
  this.subUnitId = subUnitId;
15877
15928
  _defineProperty(this, "value", true);
15878
- _defineProperty(this, "type", UnitObject$1.Worksheet);
15929
+ _defineProperty(this, "type", UnitObject.Worksheet);
15879
15930
  _defineProperty(this, "status", PermissionStatus.INIT);
15880
15931
  _defineProperty(this, "id", void 0);
15881
- _defineProperty(this, "subType", UnitAction$1.SetRowStyle);
15882
- this.id = `${this.type}.${UnitAction$1.SetRowStyle}_${unitId}_${subUnitId}`;
15932
+ _defineProperty(this, "subType", UnitAction.SetRowStyle);
15933
+ this.id = `${this.type}.${UnitAction.SetRowStyle}_${unitId}_${subUnitId}`;
15883
15934
  }
15884
15935
  };
15885
15936
 
@@ -15890,11 +15941,11 @@ var WorksheetSortPermission = class {
15890
15941
  this.unitId = unitId;
15891
15942
  this.subUnitId = subUnitId;
15892
15943
  _defineProperty(this, "value", true);
15893
- _defineProperty(this, "type", UnitObject$1.Worksheet);
15944
+ _defineProperty(this, "type", UnitObject.Worksheet);
15894
15945
  _defineProperty(this, "status", PermissionStatus.INIT);
15895
15946
  _defineProperty(this, "id", void 0);
15896
- _defineProperty(this, "subType", UnitAction$1.Sort);
15897
- this.id = `${this.type}.${UnitAction$1.Sort}_${unitId}_${subUnitId}`;
15947
+ _defineProperty(this, "subType", UnitAction.Sort);
15948
+ this.id = `${this.type}.${UnitAction.Sort}_${unitId}_${subUnitId}`;
15898
15949
  }
15899
15950
  };
15900
15951
 
@@ -15905,11 +15956,11 @@ var WorksheetViewPermission = class {
15905
15956
  this.unitId = unitId;
15906
15957
  this.subUnitId = subUnitId;
15907
15958
  _defineProperty(this, "value", true);
15908
- _defineProperty(this, "type", UnitObject$1.Worksheet);
15959
+ _defineProperty(this, "type", UnitObject.Worksheet);
15909
15960
  _defineProperty(this, "status", PermissionStatus.INIT);
15910
15961
  _defineProperty(this, "id", void 0);
15911
- _defineProperty(this, "subType", UnitAction$1.View);
15912
- this.id = `${this.type}.${UnitAction$1.View}_${unitId}_${subUnitId}`;
15962
+ _defineProperty(this, "subType", UnitAction.View);
15963
+ this.id = `${this.type}.${UnitAction.View}_${unitId}_${subUnitId}`;
15913
15964
  }
15914
15965
  };
15915
15966
 
@@ -15955,28 +16006,28 @@ const getAllWorkbookPermissionPoint = () => [
15955
16006
  WorkbookDeleteColumnPermission
15956
16007
  ];
15957
16008
  const defaultWorkbookPermissionPoints = [
15958
- UnitAction$1.Edit,
15959
- UnitAction$1.Print,
15960
- UnitAction$1.Comment,
15961
- UnitAction$1.View,
15962
- UnitAction$1.Copy,
15963
- UnitAction$1.Export,
15964
- UnitAction$1.ManageCollaborator,
15965
- UnitAction$1.CreateSheet,
15966
- UnitAction$1.DeleteSheet,
15967
- UnitAction$1.RenameSheet,
15968
- UnitAction$1.HideSheet,
15969
- UnitAction$1.Duplicate,
15970
- UnitAction$1.Share,
15971
- UnitAction$1.MoveSheet,
15972
- UnitAction$1.CopySheet,
15973
- UnitAction$1.RecoverHistory,
15974
- UnitAction$1.ViewHistory,
15975
- UnitAction$1.CreatePermissionObject,
15976
- UnitAction$1.InsertRow,
15977
- UnitAction$1.InsertColumn,
15978
- UnitAction$1.DeleteRow,
15979
- UnitAction$1.DeleteColumn
16009
+ UnitAction.Edit,
16010
+ UnitAction.Print,
16011
+ UnitAction.Comment,
16012
+ UnitAction.View,
16013
+ UnitAction.Copy,
16014
+ UnitAction.Export,
16015
+ UnitAction.ManageCollaborator,
16016
+ UnitAction.CreateSheet,
16017
+ UnitAction.DeleteSheet,
16018
+ UnitAction.RenameSheet,
16019
+ UnitAction.HideSheet,
16020
+ UnitAction.Duplicate,
16021
+ UnitAction.Share,
16022
+ UnitAction.MoveSheet,
16023
+ UnitAction.CopySheet,
16024
+ UnitAction.RecoverHistory,
16025
+ UnitAction.ViewHistory,
16026
+ UnitAction.CreatePermissionObject,
16027
+ UnitAction.InsertRow,
16028
+ UnitAction.InsertColumn,
16029
+ UnitAction.DeleteRow,
16030
+ UnitAction.DeleteColumn
15980
16031
  ];
15981
16032
 
15982
16033
  //#endregion
@@ -16019,20 +16070,20 @@ const getAllWorksheetPermissionPointByPointPanel = () => [
16019
16070
  WorksheetSortPermission
16020
16071
  ];
16021
16072
  const defaultWorksheetPermissionPoint = [
16022
- UnitAction$1.Copy,
16023
- UnitAction$1.DeleteColumn,
16024
- UnitAction$1.DeleteRow,
16025
- UnitAction$1.EditExtraObject,
16026
- UnitAction$1.Filter,
16027
- UnitAction$1.InsertColumn,
16028
- UnitAction$1.InsertRow,
16029
- UnitAction$1.InsertHyperlink,
16030
- UnitAction$1.PivotTable,
16031
- UnitAction$1.SetCellStyle,
16032
- UnitAction$1.SetCellValue,
16033
- UnitAction$1.SetColumnStyle,
16034
- UnitAction$1.SetRowStyle,
16035
- UnitAction$1.Sort
16073
+ UnitAction.Copy,
16074
+ UnitAction.DeleteColumn,
16075
+ UnitAction.DeleteRow,
16076
+ UnitAction.EditExtraObject,
16077
+ UnitAction.Filter,
16078
+ UnitAction.InsertColumn,
16079
+ UnitAction.InsertRow,
16080
+ UnitAction.InsertHyperlink,
16081
+ UnitAction.PivotTable,
16082
+ UnitAction.SetCellStyle,
16083
+ UnitAction.SetCellValue,
16084
+ UnitAction.SetColumnStyle,
16085
+ UnitAction.SetRowStyle,
16086
+ UnitAction.Sort
16036
16087
  ];
16037
16088
 
16038
16089
  //#endregion
@@ -17617,6 +17668,70 @@ AutoFillController = __decorate([
17617
17668
  __decorateParam(2, Inject(Injector))
17618
17669
  ], AutoFillController);
17619
17670
 
17671
+ //#endregion
17672
+ //#region src/controllers/calculate-result-apply.controller.ts
17673
+ let CalculateResultApplyController = class CalculateResultApplyController extends Disposable {
17674
+ constructor(_univerInstanceService, _commandService) {
17675
+ super();
17676
+ this._univerInstanceService = _univerInstanceService;
17677
+ this._commandService = _commandService;
17678
+ this._initialize();
17679
+ }
17680
+ _initialize() {
17681
+ this.disposeWithMe(this._commandService.onCommandExecuted((command) => {
17682
+ if (command.id !== SetFormulaCalculationResultMutation.id) return;
17683
+ const { unitData } = command.params;
17684
+ const unitIds = Object.keys(unitData);
17685
+ const redoMutationsInfo = [];
17686
+ for (let i = 0; i < unitIds.length; i++) {
17687
+ const unitId = unitIds[i];
17688
+ const sheetData = unitData[unitId];
17689
+ if (sheetData == null) continue;
17690
+ const sheetIds = Object.keys(sheetData);
17691
+ for (let j = 0; j < sheetIds.length; j++) {
17692
+ const sheetId = sheetIds[j];
17693
+ const cellData = sheetData[sheetId];
17694
+ if (cellData == null) continue;
17695
+ const setRangeValuesMutation = {
17696
+ subUnitId: sheetId,
17697
+ unitId,
17698
+ cellValue: this._getMergedCellData(unitId, sheetId, cellData)
17699
+ };
17700
+ redoMutationsInfo.push({
17701
+ id: SetRangeValuesMutation.id,
17702
+ params: setRangeValuesMutation
17703
+ });
17704
+ }
17705
+ }
17706
+ return sequenceExecute(redoMutationsInfo, this._commandService, {
17707
+ onlyLocal: true,
17708
+ fromFormula: true,
17709
+ applyFormulaCalculationResult: true
17710
+ });
17711
+ }));
17712
+ }
17713
+ /**
17714
+ * Priority that mainly deals with number format in unitData
17715
+ * @param unitId
17716
+ * @param sheetId
17717
+ * @param cellData
17718
+ * @returns
17719
+ */
17720
+ _getMergedCellData(unitId, sheetId, cellData) {
17721
+ const workbook = this._univerInstanceService.getUniverSheetInstance(unitId);
17722
+ const styles = workbook === null || workbook === void 0 ? void 0 : workbook.getStyles();
17723
+ const worksheet = workbook === null || workbook === void 0 ? void 0 : workbook.getSheetBySheetId(sheetId);
17724
+ const oldCellDataMatrix = worksheet === null || worksheet === void 0 ? void 0 : worksheet.getCellMatrix();
17725
+ const cellDataMatrix = new ObjectMatrix(cellData);
17726
+ cellDataMatrix.forValue((row, col, cell) => {
17727
+ const newCell = handleNumfmtInCell(oldCellDataMatrix === null || oldCellDataMatrix === void 0 ? void 0 : oldCellDataMatrix.getValue(row, col), cell, styles);
17728
+ cellDataMatrix.setValue(row, col, newCell);
17729
+ });
17730
+ return cellDataMatrix.getMatrix();
17731
+ }
17732
+ };
17733
+ CalculateResultApplyController = __decorate([__decorateParam(0, Inject(IUniverInstanceService)), __decorateParam(1, ICommandService)], CalculateResultApplyController);
17734
+
17620
17735
  //#endregion
17621
17736
  //#region src/controllers/config/config.ts
17622
17737
  /**
@@ -18198,7 +18313,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
18198
18313
  var _cell$selectionProtec2;
18199
18314
  const cell = targetSheet.getCell(r, c);
18200
18315
  const permission = cell === null || cell === void 0 || (_cell$selectionProtec2 = cell.selectionProtection) === null || _cell$selectionProtec2 === void 0 ? void 0 : _cell$selectionProtec2[0];
18201
- if ((permission === null || permission === void 0 ? void 0 : permission[UnitAction$1.View]) === false) return false;
18316
+ if ((permission === null || permission === void 0 ? void 0 : permission[UnitAction.View]) === false) return false;
18202
18317
  }
18203
18318
  }
18204
18319
  }
@@ -18228,7 +18343,7 @@ let SheetPermissionCheckController = class SheetPermissionCheckController extend
18228
18343
  var _cell$selectionProtec3;
18229
18344
  const cell = sequenceGridWorksheet.getCell(r, c);
18230
18345
  const permission = cell === null || cell === void 0 || (_cell$selectionProtec3 = cell.selectionProtection) === null || _cell$selectionProtec3 === void 0 ? void 0 : _cell$selectionProtec3[0];
18231
- if ((permission === null || permission === void 0 ? void 0 : permission[UnitAction$1.View]) === false) return false;
18346
+ if ((permission === null || permission === void 0 ? void 0 : permission[UnitAction.View]) === false) return false;
18232
18347
  }
18233
18348
  }
18234
18349
  return true;
@@ -18472,7 +18587,7 @@ let SheetPermissionInitController = class SheetPermissionInitController extends
18472
18587
  allAllowedParams.push({
18473
18588
  objectID: rule.permissionId,
18474
18589
  unitID: unitId,
18475
- objectType: UnitObject$1.SelectRange,
18590
+ objectType: UnitObject.SelectRange,
18476
18591
  actions: baseProtectionActions
18477
18592
  });
18478
18593
  });
@@ -18505,7 +18620,7 @@ let SheetPermissionInitController = class SheetPermissionInitController extends
18505
18620
  if (info.type !== "delete") this._authzIoService.allowed({
18506
18621
  objectID: info.rule.permissionId,
18507
18622
  unitID: info.unitId,
18508
- objectType: UnitObject$1.SelectRange,
18623
+ objectType: UnitObject.SelectRange,
18509
18624
  actions: baseProtectionActions
18510
18625
  }).then((actionList) => {
18511
18626
  if (!this._rangeProtectionRuleModel.getRule(info.unitId, info.subUnitId, info.rule.id)) return;
@@ -18537,7 +18652,7 @@ let SheetPermissionInitController = class SheetPermissionInitController extends
18537
18652
  if (!unitId) return;
18538
18653
  return this._authzIoService.allowed({
18539
18654
  objectID: unitId,
18540
- objectType: UnitObject$1.Workbook,
18655
+ objectType: UnitObject.Workbook,
18541
18656
  unitID: unitId,
18542
18657
  actions: defaultWorkbookPermissionPoints
18543
18658
  }).then((actionList) => {
@@ -18558,7 +18673,7 @@ let SheetPermissionInitController = class SheetPermissionInitController extends
18558
18673
  if (info.type !== "delete") this._authzIoService.allowed({
18559
18674
  objectID: info.rule.permissionId,
18560
18675
  unitID: info.unitId,
18561
- objectType: UnitObject$1.Worksheet,
18676
+ objectType: UnitObject.Worksheet,
18562
18677
  actions: baseProtectionActions
18563
18678
  }).then((actionList) => {
18564
18679
  const currentRule = this._worksheetProtectionRuleModel.getRule(info.unitId, info.subUnitId);
@@ -18585,7 +18700,7 @@ let SheetPermissionInitController = class SheetPermissionInitController extends
18585
18700
  this._authzIoService.allowed({
18586
18701
  objectID: info.permissionId,
18587
18702
  unitID: info.unitId,
18588
- objectType: UnitObject$1.Worksheet,
18703
+ objectType: UnitObject.Worksheet,
18589
18704
  actions: defaultWorksheetPermissionPoint
18590
18705
  }).then((actionList) => {
18591
18706
  const currentRule = this._worksheetProtectionPointRuleModel.getRule(info.unitId, info.subUnitId);
@@ -18613,7 +18728,7 @@ let SheetPermissionInitController = class SheetPermissionInitController extends
18613
18728
  allAllowedParams.push({
18614
18729
  objectID: rule.permissionId,
18615
18730
  unitID: unitId,
18616
- objectType: UnitObject$1.Worksheet,
18731
+ objectType: UnitObject.Worksheet,
18617
18732
  actions: baseProtectionActions
18618
18733
  });
18619
18734
  }
@@ -18623,7 +18738,7 @@ let SheetPermissionInitController = class SheetPermissionInitController extends
18623
18738
  allAllowedParams.push({
18624
18739
  objectID: pointRule.permissionId,
18625
18740
  unitID: unitId,
18626
- objectType: UnitObject$1.Worksheet,
18741
+ objectType: UnitObject.Worksheet,
18627
18742
  actions: defaultWorksheetPermissionPoint
18628
18743
  });
18629
18744
  }
@@ -18693,7 +18808,7 @@ let SheetPermissionInitController = class SheetPermissionInitController extends
18693
18808
  this._authzIoService.allowed({
18694
18809
  objectID: permissionId,
18695
18810
  unitID: unitId,
18696
- objectType: UnitObject$1.Worksheet,
18811
+ objectType: UnitObject.Worksheet,
18697
18812
  actions: baseProtectionActions
18698
18813
  }).then((actionList) => {
18699
18814
  if (!this._worksheetProtectionRuleModel.getTargetByPermissionId(unitId, permissionId)) return;
@@ -18719,7 +18834,7 @@ let SheetPermissionInitController = class SheetPermissionInitController extends
18719
18834
  this._authzIoService.allowed({
18720
18835
  objectID: permissionId,
18721
18836
  unitID: unitId,
18722
- objectType: UnitObject$1.Worksheet,
18837
+ objectType: UnitObject.Worksheet,
18723
18838
  actions: defaultWorksheetPermissionPoint
18724
18839
  }).then((actionList) => {
18725
18840
  if (!this._worksheetProtectionPointRuleModel.getTargetByPermissionId(unitId, permissionId)) return;
@@ -18742,7 +18857,7 @@ let SheetPermissionInitController = class SheetPermissionInitController extends
18742
18857
  this._authzIoService.allowed({
18743
18858
  objectID: permissionId,
18744
18859
  unitID: unitId,
18745
- objectType: UnitObject$1.SelectRange,
18860
+ objectType: UnitObject.SelectRange,
18746
18861
  actions: baseProtectionActions
18747
18862
  }).then((actionList) => {
18748
18863
  if (!this._rangeProtectionRuleModel.getTargetByPermissionId(unitId, permissionId)) return;
@@ -18876,7 +18991,7 @@ ZebraCrossingCacheController = __decorate([
18876
18991
  ], ZebraCrossingCacheController);
18877
18992
 
18878
18993
  //#endregion
18879
- //#region src/model/range-protection-render.model.ts
18994
+ //#region src/models/range-protection-render.model.ts
18880
18995
  let RangeProtectionRenderModel = class RangeProtectionRenderModel {
18881
18996
  constructor(_selectionProtectionRuleModel, _permissionService) {
18882
18997
  this._selectionProtectionRuleModel = _selectionProtectionRuleModel;
@@ -18885,7 +19000,7 @@ let RangeProtectionRenderModel = class RangeProtectionRenderModel {
18885
19000
  this._init();
18886
19001
  }
18887
19002
  _init() {
18888
- this._permissionService.permissionPointUpdate$.pipe(filter$1((permission) => permission.type === UnitObject$1.SelectRange), filter$1((permission) => getAllRangePermissionPoint().some((F) => permission instanceof F)), map$1((permission) => permission)).subscribe((permission) => {
19003
+ this._permissionService.permissionPointUpdate$.pipe(filter$1((permission) => permission.type === UnitObject.SelectRange), filter$1((permission) => getAllRangePermissionPoint().some((F) => permission instanceof F)), map$1((permission) => permission)).subscribe((permission) => {
18889
19004
  const ruleMap = this._selectionProtectionRuleModel.getSubunitRuleList(permission.unitId, permission.subUnitId);
18890
19005
  for (const rule of ruleMap) if (rule.permissionId === permission.permissionId) rule.ranges.forEach((range) => {
18891
19006
  Range.foreach(range, (row, col) => {
@@ -18947,7 +19062,7 @@ let RangeProtectionRenderModel = class RangeProtectionRenderModel {
18947
19062
  RangeProtectionRenderModel = __decorate([__decorateParam(0, Inject(RangeProtectionRuleModel)), __decorateParam(1, Inject(IPermissionService))], RangeProtectionRenderModel);
18948
19063
 
18949
19064
  //#endregion
18950
- //#region src/model/range-protection.cache.ts
19065
+ //#region src/models/range-protection.cache.ts
18951
19066
  let RangeProtectionCache = class RangeProtectionCache extends Disposable {
18952
19067
  constructor(_ruleModel, _permissionService, _univerInstanceService) {
18953
19068
  super();
@@ -18974,7 +19089,7 @@ let RangeProtectionCache = class RangeProtectionCache extends Disposable {
18974
19089
  });
18975
19090
  }
18976
19091
  _initUpdateCellInfoCache() {
18977
- this.disposeWithMe(this._permissionService.permissionPointUpdate$.pipe(filter((permission) => permission.type === UnitObject$1.SelectRange), map((permission) => permission)).subscribe((permission) => {
19092
+ this.disposeWithMe(this._permissionService.permissionPointUpdate$.pipe(filter((permission) => permission.type === UnitObject.SelectRange), map((permission) => permission)).subscribe((permission) => {
18978
19093
  const { subUnitId, unitId, permissionId } = permission;
18979
19094
  const ruleId = this._permissionIdCache.get(permissionId);
18980
19095
  if (!ruleId) return;
@@ -19086,10 +19201,10 @@ let RangeProtectionCache = class RangeProtectionCache extends Disposable {
19086
19201
  const manageProtection = (_this$_permissionServ5 = (_this$_permissionServ6 = this._permissionService.getPermissionPoint((_RangeProtectionPermi3 = new RangeProtectionPermissionManageCollaPoint(unitId, subUnitId, rule.permissionId)) === null || _RangeProtectionPermi3 === void 0 ? void 0 : _RangeProtectionPermi3.id)) === null || _this$_permissionServ6 === void 0 ? void 0 : _this$_permissionServ6.value) !== null && _this$_permissionServ5 !== void 0 ? _this$_permissionServ5 : false;
19087
19202
  const deleteProtection = (_this$_permissionServ7 = (_this$_permissionServ8 = this._permissionService.getPermissionPoint((_RangeProtectionPermi4 = new RangeProtectionPermissionDeleteProtectionPoint(unitId, subUnitId, rule.permissionId)) === null || _RangeProtectionPermi4 === void 0 ? void 0 : _RangeProtectionPermi4.id)) === null || _this$_permissionServ8 === void 0 ? void 0 : _this$_permissionServ8.value) !== null && _this$_permissionServ7 !== void 0 ? _this$_permissionServ7 : false;
19088
19203
  return {
19089
- [UnitAction$1.Edit]: edit,
19090
- [UnitAction$1.View]: view,
19091
- [UnitAction$1.ManageCollaborator]: manageProtection,
19092
- [UnitAction$1.Delete]: deleteProtection
19204
+ [UnitAction.Edit]: edit,
19205
+ [UnitAction.View]: view,
19206
+ [UnitAction.ManageCollaborator]: manageProtection,
19207
+ [UnitAction.Delete]: deleteProtection
19093
19208
  };
19094
19209
  }
19095
19210
  reBuildCache(unitId, subUnitId) {
@@ -19112,13 +19227,13 @@ let RangeProtectionCache = class RangeProtectionCache extends Disposable {
19112
19227
  const { startRow, endRow, startColumn, endColumn } = range;
19113
19228
  for (let i = startRow; i <= endRow; i++) {
19114
19229
  const rowInfo = rowInfoMap.get(`${i}`);
19115
- if (!rowInfo) rowInfoMap.set(`${i}`, new Map([[rule.id, selectionActions]]));
19230
+ if (!rowInfo) rowInfoMap.set(`${i}`, /* @__PURE__ */ new Map([[rule.id, selectionActions]]));
19116
19231
  else rowInfo.set(rule.id, selectionActions);
19117
19232
  for (let j = startColumn; j <= endColumn; j++) {
19118
19233
  cellRuleMap.set(`${i}-${j}`, rule.id);
19119
19234
  cellInfoMap.set(`${i}-${j}`, selectionProtection);
19120
19235
  const colInfo = colInfoMap.get(`${j}`);
19121
- if (!colInfo) colInfoMap.set(`${j}`, new Map([[rule.id, selectionActions]]));
19236
+ if (!colInfo) colInfoMap.set(`${j}`, /* @__PURE__ */ new Map([[rule.id, selectionActions]]));
19122
19237
  else colInfo.set(rule.id, selectionActions);
19123
19238
  }
19124
19239
  }
@@ -19149,7 +19264,7 @@ let RangeProtectionCache = class RangeProtectionCache extends Disposable {
19149
19264
  });
19150
19265
  }
19151
19266
  _initUpdateRowColInfoCache() {
19152
- this.disposeWithMe(this._permissionService.permissionPointUpdate$.pipe(filter((permission) => permission.type === UnitObject$1.SelectRange), map((permission) => permission)).subscribe({ next: (permission) => {
19267
+ this.disposeWithMe(this._permissionService.permissionPointUpdate$.pipe(filter((permission) => permission.type === UnitObject.SelectRange), map((permission) => permission)).subscribe({ next: (permission) => {
19153
19268
  const { subUnitId, unitId, permissionId } = permission;
19154
19269
  const ruleId = this._permissionIdCache.get(permissionId);
19155
19270
  if (!ruleId) return;
@@ -19162,11 +19277,11 @@ let RangeProtectionCache = class RangeProtectionCache extends Disposable {
19162
19277
  const { startRow, endRow, startColumn, endColumn } = range;
19163
19278
  for (let i = startRow; i <= endRow; i++) {
19164
19279
  const rowInfo = rowInfoMap.get(`${i}`);
19165
- if (!rowInfo) rowInfoMap.set(`${i}`, new Map([[ruleId, selectionActions]]));
19280
+ if (!rowInfo) rowInfoMap.set(`${i}`, /* @__PURE__ */ new Map([[ruleId, selectionActions]]));
19166
19281
  else rowInfo.set(ruleId, selectionActions);
19167
19282
  for (let j = startColumn; j <= endColumn; j++) {
19168
19283
  const colInfo = colInfoMap.get(`${j}`);
19169
- if (!colInfo) colInfoMap.set(`${j}`, new Map([[ruleId, selectionActions]]));
19284
+ if (!colInfo) colInfoMap.set(`${j}`, /* @__PURE__ */ new Map([[ruleId, selectionActions]]));
19170
19285
  else colInfo.set(ruleId, selectionActions);
19171
19286
  }
19172
19287
  }
@@ -19232,7 +19347,7 @@ RangeProtectionCache = __decorate([
19232
19347
  //#endregion
19233
19348
  //#region package.json
19234
19349
  var name = "@univerjs/sheets";
19235
- var version = "0.25.0";
19350
+ var version = "1.0.0-alpha.0";
19236
19351
 
19237
19352
  //#endregion
19238
19353
  //#region src/controllers/active-worksheet.controller.ts
@@ -19526,70 +19641,6 @@ BasicWorksheetController = __decorate([
19526
19641
  __decorateParam(2, Optional(DataSyncPrimaryController))
19527
19642
  ], BasicWorksheetController);
19528
19643
 
19529
- //#endregion
19530
- //#region src/controllers/calculate-result-apply.controller.ts
19531
- let CalculateResultApplyController = class CalculateResultApplyController extends Disposable {
19532
- constructor(_univerInstanceService, _commandService) {
19533
- super();
19534
- this._univerInstanceService = _univerInstanceService;
19535
- this._commandService = _commandService;
19536
- this._initialize();
19537
- }
19538
- _initialize() {
19539
- this.disposeWithMe(this._commandService.onCommandExecuted((command) => {
19540
- if (command.id !== SetFormulaCalculationResultMutation.id) return;
19541
- const { unitData } = command.params;
19542
- const unitIds = Object.keys(unitData);
19543
- const redoMutationsInfo = [];
19544
- for (let i = 0; i < unitIds.length; i++) {
19545
- const unitId = unitIds[i];
19546
- const sheetData = unitData[unitId];
19547
- if (sheetData == null) continue;
19548
- const sheetIds = Object.keys(sheetData);
19549
- for (let j = 0; j < sheetIds.length; j++) {
19550
- const sheetId = sheetIds[j];
19551
- const cellData = sheetData[sheetId];
19552
- if (cellData == null) continue;
19553
- const setRangeValuesMutation = {
19554
- subUnitId: sheetId,
19555
- unitId,
19556
- cellValue: this._getMergedCellData(unitId, sheetId, cellData)
19557
- };
19558
- redoMutationsInfo.push({
19559
- id: SetRangeValuesMutation.id,
19560
- params: setRangeValuesMutation
19561
- });
19562
- }
19563
- }
19564
- return sequenceExecute(redoMutationsInfo, this._commandService, {
19565
- onlyLocal: true,
19566
- fromFormula: true,
19567
- applyFormulaCalculationResult: true
19568
- });
19569
- }));
19570
- }
19571
- /**
19572
- * Priority that mainly deals with number format in unitData
19573
- * @param unitId
19574
- * @param sheetId
19575
- * @param cellData
19576
- * @returns
19577
- */
19578
- _getMergedCellData(unitId, sheetId, cellData) {
19579
- const workbook = this._univerInstanceService.getUniverSheetInstance(unitId);
19580
- const styles = workbook === null || workbook === void 0 ? void 0 : workbook.getStyles();
19581
- const worksheet = workbook === null || workbook === void 0 ? void 0 : workbook.getSheetBySheetId(sheetId);
19582
- const oldCellDataMatrix = worksheet === null || worksheet === void 0 ? void 0 : worksheet.getCellMatrix();
19583
- const cellDataMatrix = new ObjectMatrix(cellData);
19584
- cellDataMatrix.forValue((row, col, cell) => {
19585
- const newCell = handleNumfmtInCell(oldCellDataMatrix === null || oldCellDataMatrix === void 0 ? void 0 : oldCellDataMatrix.getValue(row, col), cell, styles);
19586
- cellDataMatrix.setValue(row, col, newCell);
19587
- });
19588
- return cellDataMatrix.getMatrix();
19589
- }
19590
- };
19591
- CalculateResultApplyController = __decorate([__decorateParam(0, Inject(IUniverInstanceService)), __decorateParam(1, ICommandService)], CalculateResultApplyController);
19592
-
19593
19644
  //#endregion
19594
19645
  //#region src/controllers/number-cell.controller.ts
19595
19646
  /**
@@ -19657,7 +19708,7 @@ let SheetPermissionViewModelController = class SheetPermissionViewModelControlle
19657
19708
  const { unitId, subUnitId, row, col } = context;
19658
19709
  const selectionProtection = this._rangeProtectionCache.getCellInfo(unitId, subUnitId, row, col);
19659
19710
  if (selectionProtection) {
19660
- const isSkipRender = selectionProtection[UnitAction$1.View] === false;
19711
+ const isSkipRender = selectionProtection[UnitAction.View] === false;
19661
19712
  const _cellData = !cell || cell === context.rawData ? { ...context.rawData } : cell;
19662
19713
  _cellData.selectionProtection = [selectionProtection];
19663
19714
  if (isSkipRender) {
@@ -19682,10 +19733,10 @@ let SheetPermissionViewModelController = class SheetPermissionViewModelControlle
19682
19733
  if (worksheetRule === null || worksheetRule === void 0 ? void 0 : worksheetRule.permissionId) {
19683
19734
  var _this$_permissionServ, _this$_permissionServ2, _this$_permissionServ3, _this$_permissionServ4, _selectionProtection$;
19684
19735
  const selectionProtection = [{
19685
- [UnitAction$1.View]: (_this$_permissionServ = (_this$_permissionServ2 = this._permissionService.getPermissionPoint(new WorksheetViewPermission(unitId, subUnitId).id)) === null || _this$_permissionServ2 === void 0 ? void 0 : _this$_permissionServ2.value) !== null && _this$_permissionServ !== void 0 ? _this$_permissionServ : false,
19686
- [UnitAction$1.Edit]: (_this$_permissionServ3 = (_this$_permissionServ4 = this._permissionService.getPermissionPoint(new WorksheetEditPermission(unitId, subUnitId).id)) === null || _this$_permissionServ4 === void 0 ? void 0 : _this$_permissionServ4.value) !== null && _this$_permissionServ3 !== void 0 ? _this$_permissionServ3 : false
19736
+ [UnitAction.View]: (_this$_permissionServ = (_this$_permissionServ2 = this._permissionService.getPermissionPoint(new WorksheetViewPermission(unitId, subUnitId).id)) === null || _this$_permissionServ2 === void 0 ? void 0 : _this$_permissionServ2.value) !== null && _this$_permissionServ !== void 0 ? _this$_permissionServ : false,
19737
+ [UnitAction.Edit]: (_this$_permissionServ3 = (_this$_permissionServ4 = this._permissionService.getPermissionPoint(new WorksheetEditPermission(unitId, subUnitId).id)) === null || _this$_permissionServ4 === void 0 ? void 0 : _this$_permissionServ4.value) !== null && _this$_permissionServ3 !== void 0 ? _this$_permissionServ3 : false
19687
19738
  }];
19688
- const isSkipRender = !((_selectionProtection$ = selectionProtection[0]) === null || _selectionProtection$ === void 0 ? void 0 : _selectionProtection$[UnitAction$1.View]);
19739
+ const isSkipRender = !((_selectionProtection$ = selectionProtection[0]) === null || _selectionProtection$ === void 0 ? void 0 : _selectionProtection$[UnitAction.View]);
19689
19740
  const _cellData = !cell || cell === context.rawData ? { ...cell } : cell;
19690
19741
  _cellData.hasWorksheetRule = true;
19691
19742
  _cellData.selectionProtection = selectionProtection;
@@ -20543,7 +20594,7 @@ let RangeProtectionService = class RangeProtectionService extends Disposable {
20543
20594
  allAllowedParams.push({
20544
20595
  objectID: rule.permissionId,
20545
20596
  unitID: unitId,
20546
- objectType: UnitObject$1.SelectRange,
20597
+ objectType: UnitObject.SelectRange,
20547
20598
  actions: baseProtectionActions
20548
20599
  });
20549
20600
  });
@@ -21226,4 +21277,4 @@ function convertPositionCellToSheetOverGrid(unitId, subUnitId, cellOverGridPosit
21226
21277
  }
21227
21278
 
21228
21279
  //#endregion
21229
- 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, deserializeListOptions, 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, serializeListOptions, setEndForRange, splitRangeText, transformCellsToRange, validateDefinedName };
21280
+ 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, 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, 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, serializeListOptions, setEndForRange, splitRangeText, transformCellsToRange, validateDefinedName };