@univerjs/sheets 0.9.3 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/facade.js CHANGED
@@ -1,16 +1,16 @@
1
1
  var tt = Object.defineProperty;
2
2
  var nt = (r, e, t) => e in r ? tt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var p = (r, e, t) => nt(r, typeof e != "symbol" ? e + "" : e, t);
4
- import { Inject as u, Injector as x, ICommandService as l, IPermissionService as ue, IAuthzIoService as Fe, LocaleService as He, generateRandomId as Oe, Rectangle as M, RANGE_TYPE as w, HorizontalAlign as T, VerticalAlign as A, TextStyleValue as we, RichTextValue as P, BooleanNumber as g, WrapStrategy as L, DEFAULT_STYLES as ke, covertCellValue as re, covertCellValues as Se, Dimension as N, isNullCell as D, ILogService as je, Direction as H, ObjectMatrix as J, IResourceLoaderService as rt, IUniverInstanceService as se, mergeWorksheetSnapshotWithDefault as Ce, Tools as ve, UndoCommand as st, RedoCommand as ot, toDisposable as Le, UniverInstanceType as U, CanceledError as f } from "@univerjs/core";
5
- import { FBase as ge, FBaseInitialable as le, FUniver as ze, FEnum as it, FEventName as at } from "@univerjs/core/facade";
6
- import { WorksheetProtectionRuleModel as Ge, RangeProtectionRuleModel as $e, WorksheetProtectionPointModel as qe, SCOPE_WORKBOOK_VALUE_DEFINED_NAME as F, SetDefinedNameCommand as oe, RemoveDefinedNameCommand as ht, PermissionPointsDefinitions as dt, WorkbookEditablePermission as Ke, UnitObject as W, AddWorksheetProtectionMutation as ct, DeleteWorksheetProtectionMutation as ut, getAllWorksheetPermissionPoint as gt, getAllWorksheetPermissionPointByPointPanel as fe, SetWorksheetPermissionPointsMutation as lt, AddRangeProtectionMutation as mt, DeleteRangeProtectionMutation as _t, SetRangeProtectionMutation as wt, WorksheetEditPermission as kt, WorksheetViewPermission as St, SetBorderBasicCommand as Ct, SetStyleCommand as b, SetTextRotationCommand as vt, SetRangeValuesCommand as B, SetTextWrapCommand as ie, SetVerticalTextAlignCommand as ft, SetHorizontalTextAlignCommand as It, addMergeCellsUtil as Q, getAddMergeMutationRangeByType as Ie, RemoveWorksheetMergeCommand as Rt, getPrimaryForRange as z, SetSelectionsOperation as me, SplitTextToColumnsCommand as bt, SetWorksheetRangeThemeStyleCommand as Et, DeleteWorksheetRangeThemeStyleCommand as pt, SheetRangeThemeService as Ye, ClearSelectionAllCommand as Je, ClearSelectionContentCommand as Qe, ClearSelectionFormatCommand as Xe, InsertRangeMoveDownCommand as yt, InsertRangeMoveRightCommand as Ut, DeleteRangeMoveUpCommand as xt, DeleteRangeMoveLeftCommand as Pt, getNextPrimaryCell as Nt, SheetsSelectionsService as Ze, SetWorksheetDefaultStyleMutation as Mt, SetColDataCommand as Re, SetRowDataCommand as be, copyRangeStyles as O, InsertRowByRangeCommand as Ee, RemoveRowByRangeCommand as Tt, MoveRowsCommand as At, SetRowHiddenCommand as pe, SetSpecificRowsVisibleCommand as ye, SetWorksheetRowIsAutoHeightMutation as Dt, SetRowHeightCommand as Ue, SetWorksheetRowIsAutoHeightCommand as X, InsertColByRangeCommand as xe, RemoveColByRangeCommand as Wt, MoveColsCommand as Bt, SetColHiddenCommand as Pe, SetSpecificColsVisibleCommand as Ne, SetColWidthCommand as Vt, SetFrozenCommand as Z, CancelFrozenCommand as Ft, ToggleGridlinesCommand as ae, SetGridlinesColorCommand as he, SetTabColorCommand as Ht, SetRangeValuesMutation as Me, SetWorksheetHideCommand as Ot, SetWorksheetShowCommand as jt, SetWorksheetNameCommand as de, AppendRowCommand as Lt, SetWorksheetRowCountCommand as zt, SetWorksheetColumnCountCommand as Gt, SetWorkbookNameCommand as $t, InsertSheetCommand as G, SetWorksheetActiveOperation as V, RemoveSheetCommand as ce, CopySheetCommand as qt, SetWorksheetOrderCommand as Kt, RegisterWorksheetRangeThemeStyleCommand as Yt, UnregisterWorksheetRangeThemeStyleCommand as Jt, RangeThemeStyle as Qt, SetWorksheetOrderMutation as Te, SetTabColorMutation as Ae, SetWorksheetHideMutation as De, COMMAND_LISTENER_VALUE_CHANGE as Xt, getValueChangedEffectedRange as Zt, SheetValueChangeType as en, SheetSkeletonChangeType as tn, SplitDelimiterEnum as nn } from "@univerjs/sheets";
7
- import { IDefinedNamesService as et, serializeRange as _e, FormulaDataModel as rn, serializeRangeWithSheet as sn, deserializeRangeWithSheet as on } from "@univerjs/engine-formula";
8
- var an = Object.getOwnPropertyDescriptor, hn = (r, e, t, n) => {
9
- for (var s = n > 1 ? void 0 : n ? an(e, t) : e, o = r.length - 1, i; o >= 0; o--)
3
+ var E = (r, e, t) => nt(r, typeof e != "symbol" ? e + "" : e, t);
4
+ import { Inject as u, Injector as P, ICommandService as l, IPermissionService as ue, IAuthzIoService as Fe, LocaleService as He, generateRandomId as Oe, Rectangle as x, cellToRange as rt, RANGE_TYPE as w, HorizontalAlign as T, VerticalAlign as A, TextStyleValue as we, RichTextValue as M, BooleanNumber as g, WrapStrategy as L, DEFAULT_STYLES as ke, covertCellValue as re, covertCellValues as Se, Dimension as N, isNullCell as D, ILogService as je, Direction as H, ObjectMatrix as J, IResourceLoaderService as st, IUniverInstanceService as se, mergeWorksheetSnapshotWithDefault as Ce, Tools as ve, UndoCommand as ot, RedoCommand as it, toDisposable as Le, UniverInstanceType as U, CanceledError as f } from "@univerjs/core";
5
+ import { FBase as ge, FBaseInitialable as le, FUniver as ze, FEnum as at, FEventName as ht } from "@univerjs/core/facade";
6
+ import { WorksheetProtectionRuleModel as Ge, RangeProtectionRuleModel as $e, WorksheetProtectionPointModel as qe, SCOPE_WORKBOOK_VALUE_DEFINED_NAME as F, SetDefinedNameCommand as oe, RemoveDefinedNameCommand as dt, PermissionPointsDefinitions as ct, WorkbookEditablePermission as Ke, UnitObject as W, AddWorksheetProtectionMutation as ut, DeleteWorksheetProtectionMutation as gt, getAllWorksheetPermissionPoint as lt, getAllWorksheetPermissionPointByPointPanel as fe, SetWorksheetPermissionPointsMutation as mt, AddRangeProtectionMutation as _t, DeleteRangeProtectionMutation as wt, SetRangeProtectionMutation as kt, WorksheetEditPermission as St, WorksheetViewPermission as Ct, SetBorderBasicCommand as vt, SetStyleCommand as b, SetTextRotationCommand as ft, SetRangeValuesCommand as B, SetTextWrapCommand as ie, SetVerticalTextAlignCommand as It, SetHorizontalTextAlignCommand as Rt, addMergeCellsUtil as Q, getAddMergeMutationRangeByType as Ie, RemoveWorksheetMergeCommand as bt, getPrimaryForRange as z, SetSelectionsOperation as me, SplitTextToColumnsCommand as pt, SetWorksheetRangeThemeStyleCommand as Et, DeleteWorksheetRangeThemeStyleCommand as yt, SheetRangeThemeService as Ye, ClearSelectionAllCommand as Je, ClearSelectionContentCommand as Qe, ClearSelectionFormatCommand as Xe, InsertRangeMoveDownCommand as Ut, InsertRangeMoveRightCommand as xt, DeleteRangeMoveUpCommand as Pt, DeleteRangeMoveLeftCommand as Mt, getNextPrimaryCell as Nt, SheetsSelectionsService as Ze, SetWorksheetDefaultStyleMutation as Tt, SetColDataCommand as Re, SetRowDataCommand as be, copyRangeStyles as O, InsertRowByRangeCommand as pe, RemoveRowByRangeCommand as At, MoveRowsCommand as Dt, SetRowHiddenCommand as Ee, SetSpecificRowsVisibleCommand as ye, SetWorksheetRowIsAutoHeightMutation as Wt, SetRowHeightCommand as Ue, SetWorksheetRowIsAutoHeightCommand as X, InsertColByRangeCommand as xe, RemoveColByRangeCommand as Bt, MoveColsCommand as Vt, SetColHiddenCommand as Pe, SetSpecificColsVisibleCommand as Me, SetColWidthCommand as Ft, SetFrozenCommand as Z, CancelFrozenCommand as Ht, ToggleGridlinesCommand as ae, SetGridlinesColorCommand as he, SetTabColorCommand as Ot, SetRangeValuesMutation as Ne, SetWorksheetHideCommand as jt, SetWorksheetShowCommand as Lt, SetWorksheetNameCommand as de, AppendRowCommand as zt, SetWorksheetRowCountCommand as Gt, SetWorksheetColumnCountCommand as $t, SetWorkbookNameCommand as qt, InsertSheetCommand as G, SetWorksheetActiveOperation as V, RemoveSheetCommand as ce, CopySheetCommand as Kt, SetWorksheetOrderCommand as Yt, RegisterWorksheetRangeThemeStyleCommand as Jt, UnregisterWorksheetRangeThemeStyleCommand as Qt, RangeThemeStyle as Xt, SetWorksheetOrderMutation as Te, SetTabColorMutation as Ae, SetWorksheetHideMutation as De, COMMAND_LISTENER_VALUE_CHANGE as Zt, getValueChangedEffectedRange as en, SheetValueChangeType as tn, SheetSkeletonChangeType as nn, SplitDelimiterEnum as rn } from "@univerjs/sheets";
7
+ import { IDefinedNamesService as et, serializeRange as _e, FormulaDataModel as sn, serializeRangeWithSheet as on, deserializeRangeWithSheet as an } from "@univerjs/engine-formula";
8
+ var hn = Object.getOwnPropertyDescriptor, dn = (r, e, t, n) => {
9
+ for (var s = n > 1 ? void 0 : n ? hn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
10
10
  (i = r[o]) && (s = i(s) || s);
11
11
  return s;
12
12
  }, I = (r, e) => (t, n) => e(t, n, r);
13
- function dn(r, e, t) {
13
+ function cn(r, e, t) {
14
14
  const n = t.getDefinedNameMap(r);
15
15
  if (n == null)
16
16
  return e.t("definedName.defaultName") + 1;
@@ -27,7 +27,7 @@ function dn(r, e, t) {
27
27
  }
28
28
  class Y {
29
29
  constructor() {
30
- p(this, "_definedNameParam");
30
+ E(this, "_definedNameParam");
31
31
  this._definedNameParam = {
32
32
  id: Oe(10),
33
33
  unitId: "",
@@ -233,7 +233,7 @@ let $ = class extends ge {
233
233
  super(), this._definedNameParam = r, this._injector = e, this._commandService = t, this._permissionService = n, this._worksheetProtectionRuleModel = s, this._rangeProtectionRuleModel = o, this._worksheetProtectionPointRuleModel = i, this._authzIoService = a, this._localeService = h, this._definedNamesService = d;
234
234
  }
235
235
  _apply() {
236
- this._definedNameParam.name === "" && (this._definedNameParam.name = dn(this._definedNameParam.unitId, this._localeService, this._definedNamesService)), this._commandService.syncExecuteCommand(oe.id, this._definedNameParam);
236
+ this._definedNameParam.name === "" && (this._definedNameParam.name = cn(this._definedNameParam.unitId, this._localeService, this._definedNamesService)), this._commandService.syncExecuteCommand(oe.id, this._definedNameParam);
237
237
  }
238
238
  /**
239
239
  * Gets the name of the defined name.
@@ -398,7 +398,7 @@ let $ = class extends ge {
398
398
  * ```
399
399
  */
400
400
  delete() {
401
- this._commandService.syncExecuteCommand(ht.id, this._definedNameParam);
401
+ this._commandService.syncExecuteCommand(dt.id, this._definedNameParam);
402
402
  }
403
403
  /**
404
404
  * Gets the local sheet id of the defined name.
@@ -447,8 +447,8 @@ let $ = class extends ge {
447
447
  return r.load(this._definedNameParam), r;
448
448
  }
449
449
  };
450
- $ = hn([
451
- I(1, u(x)),
450
+ $ = dn([
451
+ I(1, u(P)),
452
452
  I(2, l),
453
453
  I(3, ue),
454
454
  I(4, u(Ge)),
@@ -458,8 +458,8 @@ $ = hn([
458
458
  I(8, u(He)),
459
459
  I(9, et)
460
460
  ], $);
461
- var cn = Object.getOwnPropertyDescriptor, un = (r, e, t, n) => {
462
- for (var s = n > 1 ? void 0 : n ? cn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
461
+ var un = Object.getOwnPropertyDescriptor, gn = (r, e, t, n) => {
462
+ for (var s = n > 1 ? void 0 : n ? un(e, t) : e, o = r.length - 1, i; o >= 0; o--)
463
463
  (i = r[o]) && (s = i(s) || s);
464
464
  return s;
465
465
  }, y = (r, e) => (t, n) => e(t, n, r);
@@ -469,15 +469,15 @@ let q = class extends ge {
469
469
  /**
470
470
  * Permission point definition, can read the point constructor want to modify from here
471
471
  */
472
- p(this, "permissionPointsDefinition", dt);
472
+ E(this, "permissionPointsDefinition", ct);
473
473
  /**
474
474
  * An observable object used to monitor permission change events within a range, thereby triggering corresponding subsequent processing.
475
475
  */
476
- p(this, "rangeRuleChangedAfterAuth$");
476
+ E(this, "rangeRuleChangedAfterAuth$");
477
477
  /**
478
478
  * An observable object used to monitor permission change events within a worksheet, thereby triggering corresponding subsequent processing.
479
479
  */
480
- p(this, "sheetRuleChangedAfterAuth$");
480
+ E(this, "sheetRuleChangedAfterAuth$");
481
481
  this._injector = e, this._commandService = t, this._permissionService = n, this._worksheetProtectionRuleModel = s, this._rangeProtectionRuleModel = o, this._worksheetProtectionPointRuleModel = i, this._authzIoService = a, this.rangeRuleChangedAfterAuth$ = this._rangeProtectionRuleModel.ruleRefresh$, this.sheetRuleChangedAfterAuth$ = this._worksheetProtectionRuleModel.ruleRefresh$;
482
482
  }
483
483
  /**
@@ -551,7 +551,7 @@ let q = class extends ge {
551
551
  scope: void 0
552
552
  }
553
553
  });
554
- if (this._commandService.syncExecuteCommand(ct.id, {
554
+ if (this._commandService.syncExecuteCommand(ut.id, {
555
555
  unitId: e,
556
556
  subUnitId: t,
557
557
  rule: {
@@ -579,10 +579,10 @@ let q = class extends ge {
579
579
  * ```
580
580
  */
581
581
  removeWorksheetPermission(e, t) {
582
- this._commandService.syncExecuteCommand(ut.id, {
582
+ this._commandService.syncExecuteCommand(gt.id, {
583
583
  unitId: e,
584
584
  subUnitId: t
585
- }), [...gt(), ...fe()].forEach((n) => {
585
+ }), [...lt(), ...fe()].forEach((n) => {
586
586
  const s = new n(e, t);
587
587
  this._permissionService.updatePermissionPoint(s.id, !0);
588
588
  }), this._worksheetProtectionPointRuleModel.deleteRule(e, t);
@@ -612,7 +612,7 @@ let q = class extends ge {
612
612
  async setWorksheetPermissionPoint(e, t, n, s) {
613
613
  const o = this._worksheetProtectionRuleModel.getRule(e, t);
614
614
  let i;
615
- if (n === kt || n === St)
615
+ if (n === St || n === Ct)
616
616
  if (o)
617
617
  i = o.permissionId;
618
618
  else {
@@ -631,7 +631,7 @@ let q = class extends ge {
631
631
  name: "",
632
632
  scope: void 0
633
633
  }
634
- }), this._commandService.syncExecuteCommand(lt.id, { unitId: e, subUnitId: t, rule: { unitId: e, subUnitId: t, permissionId: i } }));
634
+ }), this._commandService.syncExecuteCommand(mt.id, { unitId: e, subUnitId: t, rule: { unitId: e, subUnitId: t, permissionId: i } }));
635
635
  }
636
636
  const h = new n(e, t);
637
637
  return this._permissionService.getPermissionPoint(h.id) || this._permissionService.addPermissionPoint(h), this._permissionService.updatePermissionPoint(h.id, s), i;
@@ -674,9 +674,9 @@ let q = class extends ge {
674
674
  }), o = `ruleId_${Oe(6)}`;
675
675
  if (this._worksheetProtectionRuleModel.getRule(e, t))
676
676
  throw new Error("sheet protection cannot intersect with range protection");
677
- if (this._rangeProtectionRuleModel.getSubunitRuleList(e, t).some((c) => c.ranges.some((C) => n.some((_) => M.intersects(_.getRange(), C)))))
677
+ if (this._rangeProtectionRuleModel.getSubunitRuleList(e, t).some((c) => c.ranges.some((C) => n.some((_) => x.intersects(_.getRange(), C)))))
678
678
  throw new Error("range protection cannot intersect");
679
- if (this._commandService.syncExecuteCommand(mt.id, {
679
+ if (this._commandService.syncExecuteCommand(_t.id, {
680
680
  unitId: e,
681
681
  subUnitId: t,
682
682
  rules: [{
@@ -715,7 +715,7 @@ let q = class extends ge {
715
715
  * ```
716
716
  */
717
717
  removeRangeProtection(e, t, n) {
718
- this._commandService.syncExecuteCommand(_t.id, {
718
+ this._commandService.syncExecuteCommand(wt.id, {
719
719
  unitId: e,
720
720
  subUnitId: t,
721
721
  ruleIds: n
@@ -785,9 +785,9 @@ let q = class extends ge {
785
785
  setRangeProtectionRanges(e, t, n, s) {
786
786
  const o = this._rangeProtectionRuleModel.getRule(e, t, n);
787
787
  if (o) {
788
- if (this._rangeProtectionRuleModel.getSubunitRuleList(e, t).filter((h) => h.id !== n).some((h) => h.ranges.some((d) => s.some((c) => M.intersects(c.getRange(), d)))))
788
+ if (this._rangeProtectionRuleModel.getSubunitRuleList(e, t).filter((h) => h.id !== n).some((h) => h.ranges.some((d) => s.some((c) => x.intersects(c.getRange(), d)))))
789
789
  throw new Error("range protection cannot intersect");
790
- this._commandService.syncExecuteCommand(wt.id, {
790
+ this._commandService.syncExecuteCommand(kt.id, {
791
791
  unitId: e,
792
792
  subUnitId: t,
793
793
  ruleId: n,
@@ -798,9 +798,54 @@ let q = class extends ge {
798
798
  });
799
799
  }
800
800
  }
801
+ /**
802
+ * Get the permission information for a specific cell in a worksheet.
803
+ * @param {string} unitId - The unique identifier of the workbook.
804
+ * @param {string} subUnitId - The unique identifier of the worksheet within the workbook.
805
+ * @param {number} row - The row index of the cell.
806
+ * @param {number} column - The column index of the cell.
807
+ * @returns {{ permissionId: string, ruleId: string } | undefined} - Returns an object containing the `permissionId` and `ruleId` if the cell is protected by a range protection rule. If no protection is found, it returns `undefined`.
808
+ *
809
+ * @example
810
+ * ```typescript
811
+ * const fWorkbook = univerAPI.getActiveWorkbook();
812
+ * const fWorksheet = fWorkbook.getActiveSheet();
813
+ * const permission = fWorkbook.getPermission();
814
+ * const unitId = fWorkbook.getId();
815
+ * const subUnitId = fWorksheet.getSheetId();
816
+ *
817
+ * // Get the permission information for cell C3
818
+ * const cell = fWorksheet.getRange('C3');
819
+ * const permissionInfo = permission.getPermissionInfoWithCell(
820
+ * unitId,
821
+ * subUnitId,
822
+ * cell.getRow(),
823
+ * cell.getColumn()
824
+ * );
825
+ * console.log(permissionInfo);
826
+ *
827
+ * // If the cell is protected, you can remove the protection like this:
828
+ * if (permissionInfo) {
829
+ * const { ruleId } = permissionInfo;
830
+ *
831
+ * // After 2 seconds, remove the protection for the cell
832
+ * setTimeout(() => {
833
+ * permission.removeRangeProtection(unitId, subUnitId, [ruleId]);
834
+ * }, 2000);
835
+ * }
836
+ * ```
837
+ */
838
+ getPermissionInfoWithCell(e, t, n, s) {
839
+ const o = rt(n, s), i = this._rangeProtectionRuleModel.getSubunitRuleList(e, t).find((a) => a.ranges.some((d) => x.intersects(o, d)));
840
+ if (i)
841
+ return {
842
+ permissionId: i.permissionId,
843
+ ruleId: i.id
844
+ };
845
+ }
801
846
  };
802
- q = un([
803
- y(0, u(x)),
847
+ q = gn([
848
+ y(0, u(P)),
804
849
  y(1, l),
805
850
  y(2, ue),
806
851
  y(3, u(Ge)),
@@ -808,7 +853,7 @@ q = un([
808
853
  y(5, u(qe)),
809
854
  y(6, u(Fe))
810
855
  ], q);
811
- function gn(r) {
856
+ function ln(r) {
812
857
  switch (r) {
813
858
  case "left":
814
859
  return T.LEFT;
@@ -832,7 +877,7 @@ function We(r) {
832
877
  return "general";
833
878
  }
834
879
  }
835
- function ln(r) {
880
+ function mn(r) {
836
881
  switch (r) {
837
882
  case "top":
838
883
  return A.TOP;
@@ -874,8 +919,8 @@ function te(r, e) {
874
919
  rangeType: w.COLUMN
875
920
  };
876
921
  }
877
- var mn = Object.getOwnPropertyDescriptor, _n = (r, e, t, n) => {
878
- for (var s = n > 1 ? void 0 : n ? mn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
922
+ var _n = Object.getOwnPropertyDescriptor, wn = (r, e, t, n) => {
923
+ for (var s = n > 1 ? void 0 : n ? _n(e, t) : e, o = r.length - 1, i; o >= 0; o--)
879
924
  (i = r[o]) && (s = i(s) || s);
880
925
  return s;
881
926
  }, ne = (r, e) => (t, n) => e(t, n, r);
@@ -1041,7 +1086,7 @@ let m = class extends le {
1041
1086
  */
1042
1087
  isMerged() {
1043
1088
  const { startColumn: r, startRow: e, endColumn: t, endRow: n } = this._range;
1044
- return this._worksheet.getMergedCellRange(e, r, n, t).some((o) => M.equals(o, this._range));
1089
+ return this._worksheet.getMergedCellRange(e, r, n, t).some((o) => x.equals(o, this._range));
1045
1090
  }
1046
1091
  /**
1047
1092
  * Return first cell style data in this range. Please note that if there are row styles, col styles and (or)
@@ -1391,7 +1436,7 @@ let m = class extends le {
1391
1436
  */
1392
1437
  getRichTextValue() {
1393
1438
  const r = this.getCellData();
1394
- return r != null && r.p ? new P(r.p) : null;
1439
+ return r != null && r.p ? new M(r.p) : null;
1395
1440
  }
1396
1441
  /**
1397
1442
  * Returns the rich text value for the cells in the range.
@@ -1407,7 +1452,7 @@ let m = class extends le {
1407
1452
  * ```
1408
1453
  */
1409
1454
  getRichTextValues() {
1410
- return this.getCellDataGrid().map((e) => e.map((t) => t != null && t.p ? new P(t.p) : null));
1455
+ return this.getCellDataGrid().map((e) => e.map((t) => t != null && t.p ? new M(t.p) : null));
1411
1456
  }
1412
1457
  /**
1413
1458
  * Returns the value and rich text value for the cell at the start of this range.
@@ -1424,7 +1469,7 @@ let m = class extends le {
1424
1469
  */
1425
1470
  getValueAndRichTextValue() {
1426
1471
  const r = this.getCellData();
1427
- return r != null && r.p ? new P(r.p) : r == null ? void 0 : r.v;
1472
+ return r != null && r.p ? new M(r.p) : r == null ? void 0 : r.v;
1428
1473
  }
1429
1474
  /**
1430
1475
  * Returns the value and rich text value for the cells in the range.
@@ -1438,7 +1483,7 @@ let m = class extends le {
1438
1483
  * ```
1439
1484
  */
1440
1485
  getValueAndRichTextValues() {
1441
- return this.getCellDatas().map((e) => e.map((t) => t != null && t.p ? new P(t.p) : t == null ? void 0 : t.v));
1486
+ return this.getCellDatas().map((e) => e.map((t) => t != null && t.p ? new M(t.p) : t == null ? void 0 : t.v));
1442
1487
  }
1443
1488
  /**
1444
1489
  * Returns the formula (A1 notation) of the top-left cell in the range, or an empty string if the cell is empty or doesn't contain a formula.
@@ -1668,7 +1713,7 @@ let m = class extends le {
1668
1713
  * ```
1669
1714
  */
1670
1715
  setBorder(r, e, t) {
1671
- return this._commandService.syncExecuteCommand(Ct.id, {
1716
+ return this._commandService.syncExecuteCommand(vt.id, {
1672
1717
  unitId: this._workbook.getUnitId(),
1673
1718
  subUnitId: this._worksheet.getSheetId(),
1674
1719
  ranges: [this._range],
@@ -1766,7 +1811,7 @@ let m = class extends le {
1766
1811
  * ```
1767
1812
  */
1768
1813
  setTextRotation(r) {
1769
- return this._commandService.syncExecuteCommand(vt.id, {
1814
+ return this._commandService.syncExecuteCommand(ft.id, {
1770
1815
  unitId: this._workbook.getUnitId(),
1771
1816
  subUnitId: this._worksheet.getSheetId(),
1772
1817
  range: this._range,
@@ -1849,7 +1894,7 @@ let m = class extends le {
1849
1894
  * ```
1850
1895
  */
1851
1896
  setRichTextValueForCell(r) {
1852
- const e = r instanceof P ? r.getData() : r, t = {
1897
+ const e = r instanceof M ? r.getData() : r, t = {
1853
1898
  unitId: this._workbook.getUnitId(),
1854
1899
  subUnitId: this._worksheet.getSheetId(),
1855
1900
  range: {
@@ -1886,7 +1931,7 @@ let m = class extends le {
1886
1931
  * ```
1887
1932
  */
1888
1933
  setRichTextValues(r) {
1889
- const e = r.map((s) => s.map((o) => o && { p: o instanceof P ? o.getData() : o })), t = Se(e, this._range), n = {
1934
+ const e = r.map((s) => s.map((o) => o && { p: o instanceof M ? o.getData() : o })), t = Se(e, this._range), n = {
1890
1935
  unitId: this._workbook.getUnitId(),
1891
1936
  subUnitId: this._worksheet.getSheetId(),
1892
1937
  range: this._range,
@@ -1950,11 +1995,11 @@ let m = class extends le {
1950
1995
  * ```
1951
1996
  */
1952
1997
  setVerticalAlignment(r) {
1953
- return this._commandService.syncExecuteCommand(ft.id, {
1998
+ return this._commandService.syncExecuteCommand(It.id, {
1954
1999
  unitId: this._workbook.getUnitId(),
1955
2000
  subUnitId: this._worksheet.getSheetId(),
1956
2001
  range: this._range,
1957
- value: ln(r)
2002
+ value: mn(r)
1958
2003
  }), this;
1959
2004
  }
1960
2005
  /**
@@ -1970,11 +2015,11 @@ let m = class extends le {
1970
2015
  * ```
1971
2016
  */
1972
2017
  setHorizontalAlignment(r) {
1973
- return this._commandService.syncExecuteCommand(It.id, {
2018
+ return this._commandService.syncExecuteCommand(Rt.id, {
1974
2019
  unitId: this._workbook.getUnitId(),
1975
2020
  subUnitId: this._worksheet.getSheetId(),
1976
2021
  range: this._range,
1977
- value: gn(r)
2022
+ value: ln(r)
1978
2023
  }), this;
1979
2024
  }
1980
2025
  /**
@@ -2302,7 +2347,7 @@ let m = class extends le {
2302
2347
  * ```
2303
2348
  */
2304
2349
  breakApart() {
2305
- return this._commandService.syncExecuteCommand(Rt.id, { ranges: [this._range] }), this;
2350
+ return this._commandService.syncExecuteCommand(bt.id, { ranges: [this._range] }), this;
2306
2351
  }
2307
2352
  //#endregion
2308
2353
  /**
@@ -2364,7 +2409,7 @@ let m = class extends le {
2364
2409
  startAbsoluteRefType: e,
2365
2410
  endAbsoluteRefType: t
2366
2411
  };
2367
- return r ? sn(this._worksheet.getName(), n) : _e(n);
2412
+ return r ? on(this._worksheet.getName(), n) : _e(n);
2368
2413
  }
2369
2414
  /**
2370
2415
  * Sets the specified range as the active range, with the top left cell in the range as the current cell.
@@ -2414,11 +2459,11 @@ let m = class extends le {
2414
2459
  */
2415
2460
  activateAsCurrentCell() {
2416
2461
  const r = this._worksheet.getMergedCell(this._range.startRow, this._range.startColumn);
2417
- if (r && M.equals(r, this._range) || !r && this._range.startRow === this._range.endRow && this._range.startColumn === this._range.endColumn) {
2462
+ if (r && x.equals(r, this._range) || !r && this._range.startRow === this._range.endRow && this._range.startColumn === this._range.endColumn) {
2418
2463
  const n = this._injector.createInstance(S, this._workbook).getActiveRange();
2419
2464
  if (!n || n.getUnitId() !== this.getUnitId() || n.getSheetId() !== this.getSheetId())
2420
2465
  return this.activate();
2421
- if (M.contains(n.getRange(), this._range)) {
2466
+ if (x.contains(n.getRange(), this._range)) {
2422
2467
  const s = {
2423
2468
  unitId: this.getUnitId(),
2424
2469
  subUnitId: this.getSheetId(),
@@ -2471,7 +2516,7 @@ let m = class extends le {
2471
2516
  * ```
2472
2517
  */
2473
2518
  splitTextToColumns(r, e, t) {
2474
- this._commandService.syncExecuteCommand(bt.id, {
2519
+ this._commandService.syncExecuteCommand(pt.id, {
2475
2520
  unitId: this._workbook.getUnitId(),
2476
2521
  subUnitId: this._worksheet.getSheetId(),
2477
2522
  range: this._range,
@@ -2515,7 +2560,7 @@ let m = class extends le {
2515
2560
  * ```
2516
2561
  */
2517
2562
  removeThemeStyle(r) {
2518
- this._commandService.syncExecuteCommand(pt.id, {
2563
+ this._commandService.syncExecuteCommand(yt.id, {
2519
2564
  unitId: this._workbook.getUnitId(),
2520
2565
  subUnitId: this._worksheet.getSheetId(),
2521
2566
  range: this._range,
@@ -2664,9 +2709,9 @@ let m = class extends le {
2664
2709
  * ```
2665
2710
  */
2666
2711
  insertCells(r) {
2667
- r === N.ROWS ? this._commandService.executeCommand(yt.id, {
2712
+ r === N.ROWS ? this._commandService.executeCommand(Ut.id, {
2668
2713
  range: this._range
2669
- }) : this._commandService.executeCommand(Ut.id, {
2714
+ }) : this._commandService.executeCommand(xt.id, {
2670
2715
  range: this._range
2671
2716
  });
2672
2717
  }
@@ -2726,9 +2771,9 @@ let m = class extends le {
2726
2771
  * ```
2727
2772
  */
2728
2773
  deleteCells(r) {
2729
- r === N.ROWS ? this._commandService.executeCommand(xt.id, {
2774
+ r === N.ROWS ? this._commandService.executeCommand(Pt.id, {
2730
2775
  range: this._range
2731
- }) : this._commandService.executeCommand(Pt.id, {
2776
+ }) : this._commandService.executeCommand(Mt.id, {
2732
2777
  range: this._range
2733
2778
  });
2734
2779
  }
@@ -2773,16 +2818,16 @@ let m = class extends le {
2773
2818
  const { startRow: e, startColumn: t, endRow: n, endColumn: s } = this._range, o = this._worksheet.getMaxRows(), i = this._worksheet.getMaxColumns(), a = this._worksheet.getCellMatrix();
2774
2819
  let h = e, d = t, c = n, C = s;
2775
2820
  if (r !== N.COLUMNS) {
2776
- let _ = !1, E = !1;
2777
- for (let v = t; v <= s && (e > 0 && !D(a.getValue(e - 1, v)) && (_ = !0), n < o - 1 && !D(a.getValue(n + 1, v)) && (E = !0), !(_ && E)); v++)
2821
+ let _ = !1, p = !1;
2822
+ for (let v = t; v <= s && (e > 0 && !D(a.getValue(e - 1, v)) && (_ = !0), n < o - 1 && !D(a.getValue(n + 1, v)) && (p = !0), !(_ && p)); v++)
2778
2823
  ;
2779
- _ && (h = e - 1), E && (c = n + 1);
2824
+ _ && (h = e - 1), p && (c = n + 1);
2780
2825
  }
2781
2826
  if (r !== N.ROWS) {
2782
- let _ = !1, E = !1;
2783
- for (let v = e; v <= n && (t > 0 && !D(a.getValue(v, t - 1)) && (_ = !0), s < i - 1 && !D(a.getValue(v, s + 1)) && (E = !0), !(_ && E)); v++)
2827
+ let _ = !1, p = !1;
2828
+ for (let v = e; v <= n && (t > 0 && !D(a.getValue(v, t - 1)) && (_ = !0), s < i - 1 && !D(a.getValue(v, s + 1)) && (p = !0), !(_ && p)); v++)
2784
2829
  ;
2785
- _ && (d = t - 1), E && (C = s + 1);
2830
+ _ && (d = t - 1), p && (C = s + 1);
2786
2831
  }
2787
2832
  return this._injector.createInstance(m, this._workbook, this._worksheet, {
2788
2833
  startRow: h,
@@ -2889,16 +2934,16 @@ let m = class extends le {
2889
2934
  return this.setValues(r.map((e) => e.map((t) => ({ f: t }))));
2890
2935
  }
2891
2936
  };
2892
- m = _n([
2893
- ne(3, u(x)),
2937
+ m = wn([
2938
+ ne(3, u(P)),
2894
2939
  ne(4, l),
2895
- ne(5, u(rn))
2940
+ ne(5, u(sn))
2896
2941
  ], m);
2897
- var wn = Object.getOwnPropertyDescriptor, kn = (r, e, t, n) => {
2898
- for (var s = n > 1 ? void 0 : n ? wn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
2942
+ var kn = Object.getOwnPropertyDescriptor, Sn = (r, e, t, n) => {
2943
+ for (var s = n > 1 ? void 0 : n ? kn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
2899
2944
  (i = r[o]) && (s = i(s) || s);
2900
2945
  return s;
2901
- }, Sn = (r, e) => (t, n) => e(t, n, r);
2946
+ }, Cn = (r, e) => (t, n) => e(t, n, r);
2902
2947
  let K = class {
2903
2948
  constructor(r, e, t, n) {
2904
2949
  this._workbook = r, this._worksheet = e, this._selections = t, this._injector = n;
@@ -2998,7 +3043,7 @@ let K = class {
2998
3043
  const e = this._injector.get(l);
2999
3044
  let t = [], n = !1;
3000
3045
  for (const { range: o, style: i } of this._selections)
3001
- M.contains(o, r.getRange()) ? (t.push({
3046
+ x.contains(o, r.getRange()) ? (t.push({
3002
3047
  range: o,
3003
3048
  primary: z(r.getRange(), this._worksheet),
3004
3049
  style: i
@@ -3052,11 +3097,11 @@ let K = class {
3052
3097
  return t ? this._injector.createInstance(m, this._workbook, this._worksheet, t) : null;
3053
3098
  }
3054
3099
  };
3055
- K = kn([
3056
- Sn(3, u(x))
3100
+ K = Sn([
3101
+ Cn(3, u(P))
3057
3102
  ], K);
3058
- var Cn = Object.getOwnPropertyDescriptor, vn = (r, e, t, n) => {
3059
- for (var s = n > 1 ? void 0 : n ? Cn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
3103
+ var vn = Object.getOwnPropertyDescriptor, fn = (r, e, t, n) => {
3104
+ for (var s = n > 1 ? void 0 : n ? vn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
3060
3105
  (i = r[o]) && (s = i(s) || s);
3061
3106
  return s;
3062
3107
  }, j = (r, e) => (t, n) => e(t, n, r);
@@ -3083,7 +3128,7 @@ let k = class extends le {
3083
3128
  * fWorkSheet.setActiveSelection(fWorkSheet.getRange('A10:B10'));
3084
3129
  * ```
3085
3130
  */
3086
- p(this, "setActiveSelection", this.setActiveRange);
3131
+ E(this, "setActiveSelection", this.setActiveRange);
3087
3132
  this._fWorkbook = e, this._workbook = t, this._worksheet = n, this._injector = s, this._selectionManagerService = o, this._logService = i, this._commandService = a;
3088
3133
  }
3089
3134
  /**
@@ -3232,7 +3277,7 @@ let k = class extends le {
3232
3277
  */
3233
3278
  setDefaultStyle(e) {
3234
3279
  const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId();
3235
- return this._commandService.syncExecuteCommand(Mt.id, {
3280
+ return this._commandService.syncExecuteCommand(Tt.id, {
3236
3281
  unitId: t,
3237
3282
  subUnitId: n,
3238
3283
  defaultStyle: e
@@ -3295,7 +3340,7 @@ let k = class extends le {
3295
3340
  if (typeof e == "object")
3296
3341
  o = e, i = this._worksheet;
3297
3342
  else if (typeof e == "string") {
3298
- const { range: a, sheetName: h } = on(e), d = h ? this._workbook.getSheetBySheetName(h) : this._worksheet;
3343
+ const { range: a, sheetName: h } = an(e), d = h ? this._workbook.getSheetBySheetName(h) : this._worksheet;
3299
3344
  if (!d)
3300
3345
  throw new Error("Range not found");
3301
3346
  i = d, o = {
@@ -3414,7 +3459,7 @@ let k = class extends le {
3414
3459
  */
3415
3460
  insertRowsAfter(e, t) {
3416
3461
  const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = H.DOWN, i = e + 1, a = e + t, h = 0, d = this._worksheet.getColumnCount() - 1, c = O(this._worksheet, i, a, h, d, !0, e);
3417
- return this._commandService.syncExecuteCommand(Ee.id, {
3462
+ return this._commandService.syncExecuteCommand(pe.id, {
3418
3463
  unitId: n,
3419
3464
  subUnitId: s,
3420
3465
  direction: o,
@@ -3443,7 +3488,7 @@ let k = class extends le {
3443
3488
  */
3444
3489
  insertRowsBefore(e, t) {
3445
3490
  const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = H.UP, i = e, a = e + t - 1, h = 0, d = this._worksheet.getColumnCount() - 1, c = O(this._worksheet, i, a, h, d, !0, e - 1);
3446
- return this._commandService.syncExecuteCommand(Ee.id, {
3491
+ return this._commandService.syncExecuteCommand(pe.id, {
3447
3492
  unitId: n,
3448
3493
  subUnitId: s,
3449
3494
  direction: o,
@@ -3493,7 +3538,7 @@ let k = class extends le {
3493
3538
  startColumn: 0,
3494
3539
  endColumn: this._worksheet.getColumnCount() - 1
3495
3540
  };
3496
- return this._commandService.syncExecuteCommand(Tt.id, {
3541
+ return this._commandService.syncExecuteCommand(At.id, {
3497
3542
  range: n,
3498
3543
  unitId: this._workbook.getUnitId(),
3499
3544
  subUnitId: this._worksheet.getSheetId()
@@ -3522,7 +3567,7 @@ let k = class extends le {
3522
3567
  startColumn: o.startColumn,
3523
3568
  endColumn: o.endColumn
3524
3569
  };
3525
- return this._commandService.syncExecuteCommand(At.id, {
3570
+ return this._commandService.syncExecuteCommand(Dt.id, {
3526
3571
  unitId: n,
3527
3572
  subUnitId: s,
3528
3573
  range: o,
@@ -3547,7 +3592,7 @@ let k = class extends le {
3547
3592
  */
3548
3593
  hideRow(e) {
3549
3594
  const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), s = ee(e.getRange(), this._worksheet);
3550
- return this._commandService.syncExecuteCommand(pe.id, {
3595
+ return this._commandService.syncExecuteCommand(Ee.id, {
3551
3596
  unitId: t,
3552
3597
  subUnitId: n,
3553
3598
  ranges: [s]
@@ -3575,7 +3620,7 @@ let k = class extends le {
3575
3620
  endColumn: this._worksheet.getColumnCount() - 1,
3576
3621
  rangeType: w.ROW
3577
3622
  };
3578
- return this._commandService.syncExecuteCommand(pe.id, {
3623
+ return this._commandService.syncExecuteCommand(Ee.id, {
3579
3624
  unitId: n,
3580
3625
  subUnitId: s,
3581
3626
  ranges: [o]
@@ -3672,7 +3717,7 @@ let k = class extends le {
3672
3717
  subUnitId: this._worksheet.getSheetId(),
3673
3718
  range: o[0],
3674
3719
  value: L.WRAP
3675
- }), this._commandService.syncExecuteCommand(Dt.id, {
3720
+ }), this._commandService.syncExecuteCommand(Wt.id, {
3676
3721
  unitId: n,
3677
3722
  subUnitId: s,
3678
3723
  ranges: o,
@@ -3980,7 +4025,7 @@ let k = class extends le {
3980
4025
  startColumn: e,
3981
4026
  endColumn: e + t - 1
3982
4027
  };
3983
- return this._commandService.syncExecuteCommand(Wt.id, {
4028
+ return this._commandService.syncExecuteCommand(Bt.id, {
3984
4029
  range: n,
3985
4030
  unitId: this._workbook.getUnitId(),
3986
4031
  subUnitId: this._worksheet.getSheetId()
@@ -4009,7 +4054,7 @@ let k = class extends le {
4009
4054
  startColumn: t,
4010
4055
  endColumn: t
4011
4056
  };
4012
- return this._commandService.syncExecuteCommand(Bt.id, {
4057
+ return this._commandService.syncExecuteCommand(Vt.id, {
4013
4058
  unitId: n,
4014
4059
  subUnitId: s,
4015
4060
  range: o,
@@ -4085,7 +4130,7 @@ let k = class extends le {
4085
4130
  */
4086
4131
  unhideColumn(e) {
4087
4132
  const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), s = te(e.getRange(), this._worksheet);
4088
- return this._commandService.syncExecuteCommand(Ne.id, {
4133
+ return this._commandService.syncExecuteCommand(Me.id, {
4089
4134
  unitId: t,
4090
4135
  subUnitId: n,
4091
4136
  ranges: [s]
@@ -4113,7 +4158,7 @@ let k = class extends le {
4113
4158
  endColumn: e + t - 1,
4114
4159
  rangeType: w.COLUMN
4115
4160
  };
4116
- return this._commandService.syncExecuteCommand(Ne.id, {
4161
+ return this._commandService.syncExecuteCommand(Me.id, {
4117
4162
  unitId: n,
4118
4163
  subUnitId: s,
4119
4164
  ranges: [o]
@@ -4156,7 +4201,7 @@ let k = class extends le {
4156
4201
  endRow: this._worksheet.getRowCount() - 1
4157
4202
  }
4158
4203
  ];
4159
- return this._commandService.syncExecuteCommand(Vt.id, {
4204
+ return this._commandService.syncExecuteCommand(Ft.id, {
4160
4205
  unitId: s,
4161
4206
  subUnitId: o,
4162
4207
  ranges: i,
@@ -4345,7 +4390,7 @@ let k = class extends le {
4345
4390
  * ```
4346
4391
  */
4347
4392
  cancelFreeze() {
4348
- return this._commandService.syncExecuteCommand(Ft.id, {
4393
+ return this._commandService.syncExecuteCommand(Ht.id, {
4349
4394
  unitId: this._workbook.getUnitId(),
4350
4395
  subUnitId: this.getSheetId()
4351
4396
  }), this;
@@ -4552,7 +4597,7 @@ let k = class extends le {
4552
4597
  * ```
4553
4598
  */
4554
4599
  setTabColor(e) {
4555
- return this._commandService.syncExecuteCommand(Ht.id, {
4600
+ return this._commandService.syncExecuteCommand(Ot.id, {
4556
4601
  unitId: this._workbook.getUnitId(),
4557
4602
  subUnitId: this._worksheet.getSheetId(),
4558
4603
  value: e
@@ -4579,7 +4624,7 @@ let k = class extends le {
4579
4624
  */
4580
4625
  onCellDataChange(e) {
4581
4626
  return this._injector.get(l).onCommandExecuted((n) => {
4582
- if (n.id === Me.id) {
4627
+ if (n.id === Ne.id) {
4583
4628
  const s = n.params;
4584
4629
  s.unitId === this._workbook.getUnitId() && s.subUnitId === this._worksheet.getSheetId() && s.cellValue && e(new J(s.cellValue));
4585
4630
  }
@@ -4591,7 +4636,7 @@ let k = class extends le {
4591
4636
  */
4592
4637
  onBeforeCellDataChange(e) {
4593
4638
  return this._injector.get(l).beforeCommandExecuted((n) => {
4594
- if (n.id === Me.id) {
4639
+ if (n.id === Ne.id) {
4595
4640
  const s = n.params;
4596
4641
  s.unitId === this._workbook.getUnitId() && s.subUnitId === this._worksheet.getSheetId() && s.cellValue && e(new J(s.cellValue));
4597
4642
  }
@@ -4612,7 +4657,7 @@ let k = class extends le {
4612
4657
  const e = this._injector.get(l);
4613
4658
  if (this._workbook.getSheets().filter((o) => o.isSheetHidden() !== g.TRUE).length <= 1)
4614
4659
  throw new Error("Cannot hide the only visible sheet");
4615
- return e.syncExecuteCommand(Ot.id, {
4660
+ return e.syncExecuteCommand(jt.id, {
4616
4661
  unitId: this._workbook.getUnitId(),
4617
4662
  subUnitId: this._worksheet.getSheetId()
4618
4663
  }), this;
@@ -4629,7 +4674,7 @@ let k = class extends le {
4629
4674
  * ```
4630
4675
  */
4631
4676
  showSheet() {
4632
- return this._injector.get(l).syncExecuteCommand(jt.id, {
4677
+ return this._injector.get(l).syncExecuteCommand(Lt.id, {
4633
4678
  unitId: this._workbook.getUnitId(),
4634
4679
  subUnitId: this._worksheet.getSheetId()
4635
4680
  }), this;
@@ -4993,7 +5038,7 @@ let k = class extends le {
4993
5038
  const t = this._worksheet.getCellMatrix().hasValue(), n = this._worksheet.getLastRowWithContent(), s = this._worksheet.getRowCount(), o = this._worksheet.getColumnCount(), i = t ? n + 1 : n, a = new J();
4994
5039
  for (let h = 0; h < e.length; h++)
4995
5040
  a.setValue(i, h, re(e[h]));
4996
- return this._commandService.syncExecuteCommand(Lt.id, {
5041
+ return this._commandService.syncExecuteCommand(zt.id, {
4997
5042
  unitId: this._workbook.getUnitId(),
4998
5043
  subUnitId: this._worksheet.getSheetId(),
4999
5044
  cellValue: a.getMatrix(),
@@ -5017,7 +5062,7 @@ let k = class extends le {
5017
5062
  * ```
5018
5063
  */
5019
5064
  setRowCount(e) {
5020
- return this._commandService.syncExecuteCommand(zt.id, {
5065
+ return this._commandService.syncExecuteCommand(Gt.id, {
5021
5066
  unitId: this._workbook.getUnitId(),
5022
5067
  subUnitId: this._worksheet.getSheetId(),
5023
5068
  rowCount: e
@@ -5037,28 +5082,28 @@ let k = class extends le {
5037
5082
  * ```
5038
5083
  */
5039
5084
  setColumnCount(e) {
5040
- return this._commandService.syncExecuteCommand(Gt.id, {
5085
+ return this._commandService.syncExecuteCommand($t.id, {
5041
5086
  unitId: this._workbook.getUnitId(),
5042
5087
  subUnitId: this._worksheet.getSheetId(),
5043
5088
  columnCount: e
5044
5089
  }), this;
5045
5090
  }
5046
5091
  };
5047
- k = vn([
5048
- j(3, u(x)),
5092
+ k = fn([
5093
+ j(3, u(P)),
5049
5094
  j(4, u(Ze)),
5050
5095
  j(5, u(je)),
5051
5096
  j(6, l)
5052
5097
  ], k);
5053
- var fn = Object.getOwnPropertyDescriptor, In = (r, e, t, n) => {
5054
- for (var s = n > 1 ? void 0 : n ? fn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
5098
+ var In = Object.getOwnPropertyDescriptor, Rn = (r, e, t, n) => {
5099
+ for (var s = n > 1 ? void 0 : n ? In(e, t) : e, o = r.length - 1, i; o >= 0; o--)
5055
5100
  (i = r[o]) && (s = i(s) || s);
5056
5101
  return s;
5057
5102
  }, R = (r, e) => (t, n) => e(t, n, r);
5058
5103
  let S = class extends le {
5059
5104
  constructor(e, t, n, s, o, i, a, h, d, c) {
5060
5105
  super(t);
5061
- p(this, "id");
5106
+ E(this, "id");
5062
5107
  this._workbook = e, this._injector = t, this._resourceLoaderService = n, this._selectionManagerService = s, this._univerInstanceService = o, this._commandService = i, this._permissionService = a, this._logService = h, this._localeService = d, this._definedNamesService = c, this.id = this._workbook.getUnitId();
5063
5108
  }
5064
5109
  /**
@@ -5114,7 +5159,7 @@ let S = class extends le {
5114
5159
  * ```
5115
5160
  */
5116
5161
  setName(e) {
5117
- return this._commandService.syncExecuteCommand($t.id, {
5162
+ return this._commandService.syncExecuteCommand(qt.id, {
5118
5163
  unitId: this._workbook.getUnitId(),
5119
5164
  name: e
5120
5165
  }), this;
@@ -5371,7 +5416,7 @@ let S = class extends le {
5371
5416
  * ```
5372
5417
  */
5373
5418
  undo() {
5374
- return this._univerInstanceService.focusUnit(this.id), this._commandService.syncExecuteCommand(st.id), this;
5419
+ return this._univerInstanceService.focusUnit(this.id), this._commandService.syncExecuteCommand(ot.id), this;
5375
5420
  }
5376
5421
  /**
5377
5422
  * Redo the last undone action.
@@ -5384,7 +5429,7 @@ let S = class extends le {
5384
5429
  * ```
5385
5430
  */
5386
5431
  redo() {
5387
- return this._univerInstanceService.focusUnit(this.id), this._commandService.syncExecuteCommand(ot.id), this;
5432
+ return this._univerInstanceService.focusUnit(this.id), this._commandService.syncExecuteCommand(it.id), this;
5388
5433
  }
5389
5434
  /**
5390
5435
  * Callback for command execution.
@@ -5558,7 +5603,7 @@ let S = class extends le {
5558
5603
  * ```
5559
5604
  */
5560
5605
  duplicateSheet(e) {
5561
- return this._commandService.syncExecuteCommand(qt.id, {
5606
+ return this._commandService.syncExecuteCommand(Kt.id, {
5562
5607
  unitId: e.getWorkbook().getUnitId(),
5563
5608
  subUnitId: e.getSheetId()
5564
5609
  }), this._injector.createInstance(k, this, this._workbook, this._workbook.getActiveSheet());
@@ -5654,7 +5699,7 @@ let S = class extends le {
5654
5699
  */
5655
5700
  moveSheet(e, t) {
5656
5701
  let n = t;
5657
- return n < 0 ? n = 0 : n > this._workbook.getSheets().length - 1 && (n = this._workbook.getSheets().length - 1), this._commandService.syncExecuteCommand(Kt.id, {
5702
+ return n < 0 ? n = 0 : n > this._workbook.getSheets().length - 1 && (n = this._workbook.getSheets().length - 1), this._commandService.syncExecuteCommand(Yt.id, {
5658
5703
  unitId: e.getWorkbook().getUnitId(),
5659
5704
  order: n,
5660
5705
  subUnitId: e.getSheetId()
@@ -5829,7 +5874,7 @@ let S = class extends le {
5829
5874
  * ```
5830
5875
  */
5831
5876
  registerRangeTheme(e) {
5832
- this._commandService.syncExecuteCommand(Yt.id, {
5877
+ this._commandService.syncExecuteCommand(Jt.id, {
5833
5878
  unitId: this.getId(),
5834
5879
  rangeThemeStyle: e
5835
5880
  });
@@ -5845,7 +5890,7 @@ let S = class extends le {
5845
5890
  * ```
5846
5891
  */
5847
5892
  unregisterRangeTheme(e) {
5848
- this._commandService.syncExecuteCommand(Jt.id, {
5893
+ this._commandService.syncExecuteCommand(Qt.id, {
5849
5894
  unitId: this.getId(),
5850
5895
  themeName: e
5851
5896
  });
@@ -5869,7 +5914,7 @@ let S = class extends le {
5869
5914
  * ```
5870
5915
  */
5871
5916
  createRangeThemeStyle(e, t) {
5872
- return new Qt(e, t);
5917
+ return new Xt(e, t);
5873
5918
  }
5874
5919
  /**
5875
5920
  * Set custom metadata of workbook
@@ -5898,9 +5943,9 @@ let S = class extends le {
5898
5943
  return this._workbook.getCustomMetadata();
5899
5944
  }
5900
5945
  };
5901
- S = In([
5902
- R(1, u(x)),
5903
- R(2, u(rt)),
5946
+ S = Rn([
5947
+ R(1, u(P)),
5948
+ R(2, u(st)),
5904
5949
  R(3, u(Ze)),
5905
5950
  R(4, se),
5906
5951
  R(5, l),
@@ -5909,7 +5954,7 @@ S = In([
5909
5954
  R(8, u(He)),
5910
5955
  R(9, et)
5911
5956
  ], S);
5912
- class Rn extends ze {
5957
+ class bn extends ze {
5913
5958
  getCommandSheetTarget(e) {
5914
5959
  var o;
5915
5960
  const t = e.params;
@@ -6106,9 +6151,9 @@ class Rn extends ze {
6106
6151
  ), this.registerEventHandler(
6107
6152
  this.Event.SheetValueChanged,
6108
6153
  () => t.onCommandExecuted((n) => {
6109
- if (Xt.indexOf(n.id) > -1) {
6154
+ if (Zt.indexOf(n.id) > -1) {
6110
6155
  if (!this.getActiveSheet()) return;
6111
- const o = Zt(n).map(
6156
+ const o = en(n).map(
6112
6157
  (i) => {
6113
6158
  var a, h;
6114
6159
  return (h = (a = this.getWorkbook(i.unitId)) == null ? void 0 : a.getSheetBySheetId(i.subUnitId)) == null ? void 0 : h.getRange(i.range);
@@ -6295,19 +6340,19 @@ class Rn extends ze {
6295
6340
  });
6296
6341
  }
6297
6342
  }
6298
- ze.extend(Rn);
6299
- class bn {
6343
+ ze.extend(bn);
6344
+ class pn {
6300
6345
  get SheetValueChangeType() {
6301
- return en;
6346
+ return tn;
6302
6347
  }
6303
6348
  get SheetSkeletonChangeType() {
6304
- return tn;
6349
+ return nn;
6305
6350
  }
6306
6351
  get SplitDelimiterType() {
6307
- return nn;
6352
+ return rn;
6308
6353
  }
6309
6354
  }
6310
- it.extend(bn);
6355
+ at.extend(pn);
6311
6356
  class En {
6312
6357
  get SheetCreated() {
6313
6358
  return "SheetCreated";
@@ -6370,19 +6415,19 @@ class En {
6370
6415
  return "SheetValueChanged";
6371
6416
  }
6372
6417
  }
6373
- at.extend(En);
6374
- var pn = Object.getOwnPropertyDescriptor, yn = (r, e, t, n) => {
6375
- for (var s = n > 1 ? void 0 : n ? pn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
6418
+ ht.extend(En);
6419
+ var yn = Object.getOwnPropertyDescriptor, Un = (r, e, t, n) => {
6420
+ for (var s = n > 1 ? void 0 : n ? yn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
6376
6421
  (i = r[o]) && (s = i(s) || s);
6377
6422
  return s;
6378
- }, Un = (r, e) => (t, n) => e(t, n, r);
6423
+ }, xn = (r, e) => (t, n) => e(t, n, r);
6379
6424
  let Ve = class extends ge {
6380
6425
  constructor(r) {
6381
6426
  super(), this._injector = r;
6382
6427
  }
6383
6428
  };
6384
- Ve = yn([
6385
- Un(0, u(x))
6429
+ Ve = Un([
6430
+ xn(0, u(P))
6386
6431
  ], Ve);
6387
6432
  export {
6388
6433
  q as FPermission,
@@ -6390,7 +6435,7 @@ export {
6390
6435
  K as FSelection,
6391
6436
  En as FSheetEventName,
6392
6437
  Ve as FSheetHooks,
6393
- bn as FSheetsEnum,
6438
+ pn as FSheetsEnum,
6394
6439
  S as FWorkbook,
6395
6440
  k as FWorksheet
6396
6441
  };