@univerjs/sheets 0.2.8 → 0.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -35,7 +35,10 @@ let SheetsSelectionsService = (_a = class extends RxDisposable {
35
35
  this._removeWorkbookSelection(workbook.getUnitId());
36
36
  });
37
37
  }
38
- /** Clear all selections in all workbooks. */
38
+ /**
39
+ * Clear all selections in all workbooks.
40
+ * invoked by prompt.controller
41
+ */
39
42
  clear() {
40
43
  this._workbookSelections.forEach((wbSelection) => wbSelection.clear());
41
44
  }
@@ -57,6 +60,14 @@ let SheetsSelectionsService = (_a = class extends RxDisposable {
57
60
  const { unitId, sheetId } = current;
58
61
  this._ensureWorkbookSelection(unitId).addSelections(sheetId, unitIdOrSelections);
59
62
  }
63
+ /**
64
+ * Set seleciton data to WorkbookSelections.
65
+ * If type is not specfied, this method would clear all existing selections.
66
+ * @param unitIdOrSelections
67
+ * @param worksheetIdOrType
68
+ * @param selectionDatas
69
+ * @param type
70
+ */
60
71
  setSelections(unitIdOrSelections, worksheetIdOrType, selectionDatas, type) {
61
72
  if (typeof unitIdOrSelections == "string") {
62
73
  this._ensureWorkbookSelection(unitIdOrSelections).setSelections(
@@ -145,13 +156,27 @@ const _WorkbookSelections = class _WorkbookSelections extends Disposable {
145
156
  selections.push(...selectionDatas), this._emitOnEnd(selections);
146
157
  }
147
158
  /**
148
- *
159
+ * Set selectionDatas to _worksheetSelections, and emit selectionDatas by type.
160
+ * If type is not specfied, this method would clear all existing selections.
149
161
  * @param sheetId
150
162
  * @param selectionDatas
151
163
  * @param type
152
164
  */
153
165
  setSelections(sheetId, selectionDatas, type = 2) {
154
- this._ensureSheetSelection(sheetId).length = 0, this._ensureSheetSelection(sheetId).push(...selectionDatas), type === 0 ? this._selectionMoveStart$.next(selectionDatas) : type === 1 ? this._selectionMoving$.next(selectionDatas) : this._emitOnEnd(selectionDatas);
166
+ switch (this._ensureSheetSelection(sheetId).length = 0, this._ensureSheetSelection(sheetId).push(...selectionDatas), type) {
167
+ case 0:
168
+ this._selectionMoveStart$.next(selectionDatas);
169
+ break;
170
+ case 1:
171
+ this._selectionMoving$.next(selectionDatas);
172
+ break;
173
+ case 2:
174
+ this._emitOnEnd(selectionDatas);
175
+ break;
176
+ default:
177
+ this._emitOnEnd(selectionDatas);
178
+ break;
179
+ }
155
180
  }
156
181
  getCurrentSelections() {
157
182
  return this._getCurrentSelections();
@@ -167,7 +192,7 @@ const _WorkbookSelections = class _WorkbookSelections extends Disposable {
167
192
  return selectionData[selectionData.length - 1];
168
193
  }
169
194
  /**
170
- * same as _getCurrentSelections, but would set [] if no selection.
195
+ * Same as _getCurrentSelections(which return this._worksheetSelections), but this method would set [] if no selection.
171
196
  * @param sheetId
172
197
  * @returns this._worksheetSelections
173
198
  */
@@ -185,7 +210,7 @@ const DISABLE_NORMAL_SELECTIONS = "DISABLE_NORMAL_SELECTIONS", CELL_CONTENT = cr
185
210
  CELL_CONTENT,
186
211
  ROW_FILTERED
187
212
  };
188
- var __defProp$h = Object.defineProperty, __getOwnPropDesc$h = Object.getOwnPropertyDescriptor, __decorateClass$h = /* @__PURE__ */ __name((decorators, target, key, kind) => {
213
+ var InterceptCellContentPriority = /* @__PURE__ */ ((InterceptCellContentPriority2) => (InterceptCellContentPriority2[InterceptCellContentPriority2.DATA_VALIDATION = 9] = "DATA_VALIDATION", InterceptCellContentPriority2[InterceptCellContentPriority2.NUMFMT = 10] = "NUMFMT", InterceptCellContentPriority2))(InterceptCellContentPriority || {}), __defProp$h = Object.defineProperty, __getOwnPropDesc$h = Object.getOwnPropertyDescriptor, __decorateClass$h = /* @__PURE__ */ __name((decorators, target, key, kind) => {
189
214
  for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$h(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
190
215
  (decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
191
216
  return kind && result && __defProp$h(target, key, result), result;
@@ -1111,15 +1136,15 @@ function getMoveRangeUndoRedoMutations(accessor, from, to, ignoreMerge = !1) {
1111
1136
  };
1112
1137
  }
1113
1138
  __name(getMoveRangeUndoRedoMutations, "getMoveRangeUndoRedoMutations");
1114
- var I = /* @__PURE__ */ ((E) => (E[E.UNIVER_UNKNOWN = 0] = "UNIVER_UNKNOWN", E[E.UNIVER_DOC = 1] = "UNIVER_DOC", E[E.UNIVER_SHEET = 2] = "UNIVER_SHEET", E[E.UNIVER_SLIDE = 3] = "UNIVER_SLIDE", E[E.UNIVER_PROJECT = 4] = "UNIVER_PROJECT", E[E.UNRECOGNIZED = -1] = "UNRECOGNIZED", E))(I || {}), P = /* @__PURE__ */ ((E) => (E[E.View = 0] = "View", E[E.Edit = 1] = "Edit", E[E.ManageCollaborator = 2] = "ManageCollaborator", E[E.Print = 3] = "Print", E[E.Duplicate = 4] = "Duplicate", E[E.Comment = 5] = "Comment", E[E.Copy = 6] = "Copy", E[E.Share = 7] = "Share", E[E.Export = 8] = "Export", E[E.MoveWorksheet = 9] = "MoveWorksheet", E[E.DeleteWorksheet = 10] = "DeleteWorksheet", E[E.HideWorksheet = 11] = "HideWorksheet", E[E.RenameWorksheet = 12] = "RenameWorksheet", E[E.CreateWorksheet = 13] = "CreateWorksheet", E[E.SetWorksheetStyle = 14] = "SetWorksheetStyle", E[E.EditWorksheetCell = 15] = "EditWorksheetCell", E[E.InsertHyperlink = 16] = "InsertHyperlink", E[E.Sort = 17] = "Sort", E[E.Filter = 18] = "Filter", E[E.PivotTable = 19] = "PivotTable", E[E.FloatImg = 20] = "FloatImg", E[E.History = 21] = "History", E[E.RwHgtClWdt = 22] = "RwHgtClWdt", E[E.ViemRwHgtClWdt = 23] = "ViemRwHgtClWdt", E[E.ViewFilter = 24] = "ViewFilter", E[E.MoveSheet = 25] = "MoveSheet", E[E.DeleteSheet = 26] = "DeleteSheet", E[E.HideSheet = 27] = "HideSheet", E[E.CopySheet = 28] = "CopySheet", E[E.RenameSheet = 29] = "RenameSheet", E[E.CreateSheet = 30] = "CreateSheet", E[E.SelectProtectedCells = 31] = "SelectProtectedCells", E[E.SelectUnProtectedCells = 32] = "SelectUnProtectedCells", E[E.SetCellStyle = 33] = "SetCellStyle", E[E.SetCellValue = 34] = "SetCellValue", E[E.SetRowStyle = 35] = "SetRowStyle", E[E.SetColumnStyle = 36] = "SetColumnStyle", E[E.InsertRow = 37] = "InsertRow", E[E.InsertColumn = 38] = "InsertColumn", E[E.DeleteRow = 39] = "DeleteRow", E[E.DeleteColumn = 40] = "DeleteColumn", E[E.EditExtraObject = 41] = "EditExtraObject", E[E.Delete = 42] = "Delete", E[E.RecoverHistory = 43] = "RecoverHistory", E[E.ViewHistory = 44] = "ViewHistory", E[E.UNRECOGNIZED = -1] = "UNRECOGNIZED", E))(P || {}), l = /* @__PURE__ */ ((E) => (E[E.Unkonwn = 0] = "Unkonwn", E[E.Workbook = 1] = "Workbook", E[E.Worksheet = 2] = "Worksheet", E[E.SelectRange = 3] = "SelectRange", E[E.Document = 4] = "Document", E[E.Slide = 5] = "Slide", E[E.UNRECOGNIZED = -1] = "UNRECOGNIZED", E))(l || {});
1139
+ var I = /* @__PURE__ */ ((E) => (E[E.UNIVER_UNKNOWN = 0] = "UNIVER_UNKNOWN", E[E.UNIVER_DOC = 1] = "UNIVER_DOC", E[E.UNIVER_SHEET = 2] = "UNIVER_SHEET", E[E.UNIVER_SLIDE = 3] = "UNIVER_SLIDE", E[E.UNIVER_PROJECT = 4] = "UNIVER_PROJECT", E[E.UNRECOGNIZED = -1] = "UNRECOGNIZED", E))(I || {}), L = /* @__PURE__ */ ((E) => (E[E.View = 0] = "View", E[E.Edit = 1] = "Edit", E[E.ManageCollaborator = 2] = "ManageCollaborator", E[E.Print = 3] = "Print", E[E.Duplicate = 4] = "Duplicate", E[E.Comment = 5] = "Comment", E[E.Copy = 6] = "Copy", E[E.Share = 7] = "Share", E[E.Export = 8] = "Export", E[E.MoveWorksheet = 9] = "MoveWorksheet", E[E.DeleteWorksheet = 10] = "DeleteWorksheet", E[E.HideWorksheet = 11] = "HideWorksheet", E[E.RenameWorksheet = 12] = "RenameWorksheet", E[E.CreateWorksheet = 13] = "CreateWorksheet", E[E.SetWorksheetStyle = 14] = "SetWorksheetStyle", E[E.EditWorksheetCell = 15] = "EditWorksheetCell", E[E.InsertHyperlink = 16] = "InsertHyperlink", E[E.Sort = 17] = "Sort", E[E.Filter = 18] = "Filter", E[E.PivotTable = 19] = "PivotTable", E[E.FloatImg = 20] = "FloatImg", E[E.History = 21] = "History", E[E.RwHgtClWdt = 22] = "RwHgtClWdt", E[E.ViemRwHgtClWdt = 23] = "ViemRwHgtClWdt", E[E.ViewFilter = 24] = "ViewFilter", E[E.MoveSheet = 25] = "MoveSheet", E[E.DeleteSheet = 26] = "DeleteSheet", E[E.HideSheet = 27] = "HideSheet", E[E.CopySheet = 28] = "CopySheet", E[E.RenameSheet = 29] = "RenameSheet", E[E.CreateSheet = 30] = "CreateSheet", E[E.SelectProtectedCells = 31] = "SelectProtectedCells", E[E.SelectUnProtectedCells = 32] = "SelectUnProtectedCells", E[E.SetCellStyle = 33] = "SetCellStyle", E[E.SetCellValue = 34] = "SetCellValue", E[E.SetRowStyle = 35] = "SetRowStyle", E[E.SetColumnStyle = 36] = "SetColumnStyle", E[E.InsertRow = 37] = "InsertRow", E[E.InsertColumn = 38] = "InsertColumn", E[E.DeleteRow = 39] = "DeleteRow", E[E.DeleteColumn = 40] = "DeleteColumn", E[E.EditExtraObject = 41] = "EditExtraObject", E[E.Delete = 42] = "Delete", E[E.RecoverHistory = 43] = "RecoverHistory", E[E.ViewHistory = 44] = "ViewHistory", E[E.UNRECOGNIZED = -1] = "UNRECOGNIZED", E))(L || {}), M = /* @__PURE__ */ ((E) => (E[E.Unkonwn = 0] = "Unkonwn", E[E.Workbook = 1] = "Workbook", E[E.Worksheet = 2] = "Worksheet", E[E.SelectRange = 3] = "SelectRange", E[E.Document = 4] = "Document", E[E.Slide = 5] = "Slide", E[E.UNRECOGNIZED = -1] = "UNRECOGNIZED", E))(M || {});
1115
1140
  const _WorksheetCopyPermission = class _WorksheetCopyPermission {
1116
1141
  constructor(unitId, subUnitId) {
1117
1142
  __publicField(this, "value", !0);
1118
- __publicField(this, "type", l.Worksheet);
1143
+ __publicField(this, "type", M.Worksheet);
1119
1144
  __publicField(this, "status", PermissionStatus.INIT);
1120
1145
  __publicField(this, "id");
1121
- __publicField(this, "subType", P.Copy);
1122
- this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${P.Copy}_${unitId}_${subUnitId}`;
1146
+ __publicField(this, "subType", L.Copy);
1147
+ this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${L.Copy}_${unitId}_${subUnitId}`;
1123
1148
  }
1124
1149
  };
1125
1150
  __name(_WorksheetCopyPermission, "WorksheetCopyPermission");
@@ -1127,11 +1152,11 @@ let WorksheetCopyPermission = _WorksheetCopyPermission;
1127
1152
  const _WorksheetSelectProtectedCellsPermission = class _WorksheetSelectProtectedCellsPermission {
1128
1153
  constructor(unitId, subUnitId) {
1129
1154
  __publicField(this, "value", !0);
1130
- __publicField(this, "type", l.Worksheet);
1155
+ __publicField(this, "type", M.Worksheet);
1131
1156
  __publicField(this, "status", PermissionStatus.INIT);
1132
1157
  __publicField(this, "id");
1133
- __publicField(this, "subType", P.SelectProtectedCells);
1134
- this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${P.SelectProtectedCells}_${unitId}_${subUnitId}`;
1158
+ __publicField(this, "subType", L.SelectProtectedCells);
1159
+ this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${L.SelectProtectedCells}_${unitId}_${subUnitId}`;
1135
1160
  }
1136
1161
  };
1137
1162
  __name(_WorksheetSelectProtectedCellsPermission, "WorksheetSelectProtectedCellsPermission");
@@ -1139,11 +1164,11 @@ let WorksheetSelectProtectedCellsPermission = _WorksheetSelectProtectedCellsPerm
1139
1164
  const _WorksheetSelectUnProtectedCellsPermission = class _WorksheetSelectUnProtectedCellsPermission {
1140
1165
  constructor(unitId, subUnitId) {
1141
1166
  __publicField(this, "value", !0);
1142
- __publicField(this, "type", l.Worksheet);
1167
+ __publicField(this, "type", M.Worksheet);
1143
1168
  __publicField(this, "status", PermissionStatus.INIT);
1144
1169
  __publicField(this, "id");
1145
- __publicField(this, "subType", P.SelectUnProtectedCells);
1146
- this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${P.SelectUnProtectedCells}_${unitId}_${subUnitId}`;
1170
+ __publicField(this, "subType", L.SelectUnProtectedCells);
1171
+ this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${L.SelectUnProtectedCells}_${unitId}_${subUnitId}`;
1147
1172
  }
1148
1173
  };
1149
1174
  __name(_WorksheetSelectUnProtectedCellsPermission, "WorksheetSelectUnProtectedCellsPermission");
@@ -1151,11 +1176,11 @@ let WorksheetSelectUnProtectedCellsPermission = _WorksheetSelectUnProtectedCells
1151
1176
  const _WorksheetSetCellStylePermission = class _WorksheetSetCellStylePermission {
1152
1177
  constructor(unitId, subUnitId) {
1153
1178
  __publicField(this, "value", !0);
1154
- __publicField(this, "type", l.Worksheet);
1179
+ __publicField(this, "type", M.Worksheet);
1155
1180
  __publicField(this, "status", PermissionStatus.INIT);
1156
1181
  __publicField(this, "id");
1157
- __publicField(this, "subType", P.SetCellStyle);
1158
- this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${P.SetCellStyle}_${unitId}_${subUnitId}`;
1182
+ __publicField(this, "subType", L.SetCellStyle);
1183
+ this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${L.SetCellStyle}_${unitId}_${subUnitId}`;
1159
1184
  }
1160
1185
  };
1161
1186
  __name(_WorksheetSetCellStylePermission, "WorksheetSetCellStylePermission");
@@ -1163,11 +1188,11 @@ let WorksheetSetCellStylePermission = _WorksheetSetCellStylePermission;
1163
1188
  const _WorksheetSetCellValuePermission = class _WorksheetSetCellValuePermission {
1164
1189
  constructor(unitId, subUnitId) {
1165
1190
  __publicField(this, "value", !0);
1166
- __publicField(this, "type", l.Worksheet);
1191
+ __publicField(this, "type", M.Worksheet);
1167
1192
  __publicField(this, "status", PermissionStatus.INIT);
1168
1193
  __publicField(this, "id");
1169
- __publicField(this, "subType", P.SetCellValue);
1170
- this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${P.SetCellValue}_${unitId}_${subUnitId}`;
1194
+ __publicField(this, "subType", L.SetCellValue);
1195
+ this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${L.SetCellValue}_${unitId}_${subUnitId}`;
1171
1196
  }
1172
1197
  };
1173
1198
  __name(_WorksheetSetCellValuePermission, "WorksheetSetCellValuePermission");
@@ -1175,11 +1200,11 @@ let WorksheetSetCellValuePermission = _WorksheetSetCellValuePermission;
1175
1200
  const _WorksheetViewPermission = class _WorksheetViewPermission {
1176
1201
  constructor(unitId, subUnitId) {
1177
1202
  __publicField(this, "value", !0);
1178
- __publicField(this, "type", l.Worksheet);
1203
+ __publicField(this, "type", M.Worksheet);
1179
1204
  __publicField(this, "status", PermissionStatus.INIT);
1180
1205
  __publicField(this, "id");
1181
- __publicField(this, "subType", P.View);
1182
- this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${P.View}_${unitId}_${subUnitId}`;
1206
+ __publicField(this, "subType", L.View);
1207
+ this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${L.View}_${unitId}_${subUnitId}`;
1183
1208
  }
1184
1209
  };
1185
1210
  __name(_WorksheetViewPermission, "WorksheetViewPermission");
@@ -1187,11 +1212,11 @@ let WorksheetViewPermission = _WorksheetViewPermission;
1187
1212
  const _WorksheetSetRowStylePermission = class _WorksheetSetRowStylePermission {
1188
1213
  constructor(unitId, subUnitId) {
1189
1214
  __publicField(this, "value", !0);
1190
- __publicField(this, "type", l.Worksheet);
1215
+ __publicField(this, "type", M.Worksheet);
1191
1216
  __publicField(this, "status", PermissionStatus.INIT);
1192
1217
  __publicField(this, "id");
1193
- __publicField(this, "subType", P.SetRowStyle);
1194
- this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${P.SetRowStyle}_${unitId}_${subUnitId}`;
1218
+ __publicField(this, "subType", L.SetRowStyle);
1219
+ this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${L.SetRowStyle}_${unitId}_${subUnitId}`;
1195
1220
  }
1196
1221
  };
1197
1222
  __name(_WorksheetSetRowStylePermission, "WorksheetSetRowStylePermission");
@@ -1199,11 +1224,11 @@ let WorksheetSetRowStylePermission = _WorksheetSetRowStylePermission;
1199
1224
  const _WorksheetSetColumnStylePermission = class _WorksheetSetColumnStylePermission {
1200
1225
  constructor(unitId, subUnitId) {
1201
1226
  __publicField(this, "value", !0);
1202
- __publicField(this, "type", l.Worksheet);
1227
+ __publicField(this, "type", M.Worksheet);
1203
1228
  __publicField(this, "status", PermissionStatus.INIT);
1204
1229
  __publicField(this, "id");
1205
- __publicField(this, "subType", P.SetColumnStyle);
1206
- this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${P.SetColumnStyle}_${unitId}_${subUnitId}`;
1230
+ __publicField(this, "subType", L.SetColumnStyle);
1231
+ this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${L.SetColumnStyle}_${unitId}_${subUnitId}`;
1207
1232
  }
1208
1233
  };
1209
1234
  __name(_WorksheetSetColumnStylePermission, "WorksheetSetColumnStylePermission");
@@ -1211,11 +1236,11 @@ let WorksheetSetColumnStylePermission = _WorksheetSetColumnStylePermission;
1211
1236
  const _WorksheetInsertRowPermission = class _WorksheetInsertRowPermission {
1212
1237
  constructor(unitId, subUnitId) {
1213
1238
  __publicField(this, "value", !0);
1214
- __publicField(this, "type", l.Worksheet);
1239
+ __publicField(this, "type", M.Worksheet);
1215
1240
  __publicField(this, "status", PermissionStatus.INIT);
1216
1241
  __publicField(this, "id");
1217
- __publicField(this, "subType", P.InsertRow);
1218
- this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${P.InsertRow}_${unitId}_${subUnitId}`;
1242
+ __publicField(this, "subType", L.InsertRow);
1243
+ this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${L.InsertRow}_${unitId}_${subUnitId}`;
1219
1244
  }
1220
1245
  };
1221
1246
  __name(_WorksheetInsertRowPermission, "WorksheetInsertRowPermission");
@@ -1223,11 +1248,11 @@ let WorksheetInsertRowPermission = _WorksheetInsertRowPermission;
1223
1248
  const _WorksheetInsertColumnPermission = class _WorksheetInsertColumnPermission {
1224
1249
  constructor(unitId, subUnitId) {
1225
1250
  __publicField(this, "value", !0);
1226
- __publicField(this, "type", l.Worksheet);
1251
+ __publicField(this, "type", M.Worksheet);
1227
1252
  __publicField(this, "status", PermissionStatus.INIT);
1228
1253
  __publicField(this, "id");
1229
- __publicField(this, "subType", P.InsertColumn);
1230
- this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${P.InsertColumn}_${unitId}_${subUnitId}`;
1254
+ __publicField(this, "subType", L.InsertColumn);
1255
+ this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${L.InsertColumn}_${unitId}_${subUnitId}`;
1231
1256
  }
1232
1257
  };
1233
1258
  __name(_WorksheetInsertColumnPermission, "WorksheetInsertColumnPermission");
@@ -1235,11 +1260,11 @@ let WorksheetInsertColumnPermission = _WorksheetInsertColumnPermission;
1235
1260
  const _WorksheetInsertHyperlinkPermission = class _WorksheetInsertHyperlinkPermission {
1236
1261
  constructor(unitId, subUnitId) {
1237
1262
  __publicField(this, "value", !0);
1238
- __publicField(this, "type", l.Worksheet);
1263
+ __publicField(this, "type", M.Worksheet);
1239
1264
  __publicField(this, "status", PermissionStatus.INIT);
1240
1265
  __publicField(this, "id");
1241
- __publicField(this, "subType", P.InsertHyperlink);
1242
- this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${P.InsertHyperlink}_${unitId}_${subUnitId}`;
1266
+ __publicField(this, "subType", L.InsertHyperlink);
1267
+ this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${L.InsertHyperlink}_${unitId}_${subUnitId}`;
1243
1268
  }
1244
1269
  };
1245
1270
  __name(_WorksheetInsertHyperlinkPermission, "WorksheetInsertHyperlinkPermission");
@@ -1247,11 +1272,11 @@ let WorksheetInsertHyperlinkPermission = _WorksheetInsertHyperlinkPermission;
1247
1272
  const _WorksheetDeleteRowPermission = class _WorksheetDeleteRowPermission {
1248
1273
  constructor(unitId, subUnitId) {
1249
1274
  __publicField(this, "value", !0);
1250
- __publicField(this, "type", l.Worksheet);
1275
+ __publicField(this, "type", M.Worksheet);
1251
1276
  __publicField(this, "status", PermissionStatus.INIT);
1252
1277
  __publicField(this, "id");
1253
- __publicField(this, "subType", P.DeleteRow);
1254
- this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${P.DeleteRow}_${unitId}_${subUnitId}`;
1278
+ __publicField(this, "subType", L.DeleteRow);
1279
+ this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${L.DeleteRow}_${unitId}_${subUnitId}`;
1255
1280
  }
1256
1281
  };
1257
1282
  __name(_WorksheetDeleteRowPermission, "WorksheetDeleteRowPermission");
@@ -1259,11 +1284,11 @@ let WorksheetDeleteRowPermission = _WorksheetDeleteRowPermission;
1259
1284
  const _WorksheetDeleteColumnPermission = class _WorksheetDeleteColumnPermission {
1260
1285
  constructor(unitId, subUnitId) {
1261
1286
  __publicField(this, "value", !0);
1262
- __publicField(this, "type", l.Worksheet);
1287
+ __publicField(this, "type", M.Worksheet);
1263
1288
  __publicField(this, "status", PermissionStatus.INIT);
1264
1289
  __publicField(this, "id");
1265
- __publicField(this, "subType", P.DeleteColumn);
1266
- this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${P.DeleteColumn}_${unitId}_${subUnitId}`;
1290
+ __publicField(this, "subType", L.DeleteColumn);
1291
+ this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${L.DeleteColumn}_${unitId}_${subUnitId}`;
1267
1292
  }
1268
1293
  };
1269
1294
  __name(_WorksheetDeleteColumnPermission, "WorksheetDeleteColumnPermission");
@@ -1271,11 +1296,11 @@ let WorksheetDeleteColumnPermission = _WorksheetDeleteColumnPermission;
1271
1296
  const _WorksheetSortPermission = class _WorksheetSortPermission {
1272
1297
  constructor(unitId, subUnitId) {
1273
1298
  __publicField(this, "value", !0);
1274
- __publicField(this, "type", l.Worksheet);
1299
+ __publicField(this, "type", M.Worksheet);
1275
1300
  __publicField(this, "status", PermissionStatus.INIT);
1276
1301
  __publicField(this, "id");
1277
- __publicField(this, "subType", P.Sort);
1278
- this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${P.Sort}_${unitId}_${subUnitId}`;
1302
+ __publicField(this, "subType", L.Sort);
1303
+ this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${L.Sort}_${unitId}_${subUnitId}`;
1279
1304
  }
1280
1305
  };
1281
1306
  __name(_WorksheetSortPermission, "WorksheetSortPermission");
@@ -1283,11 +1308,11 @@ let WorksheetSortPermission = _WorksheetSortPermission;
1283
1308
  const _WorksheetFilterPermission = class _WorksheetFilterPermission {
1284
1309
  constructor(unitId, subUnitId) {
1285
1310
  __publicField(this, "value", !0);
1286
- __publicField(this, "type", l.Worksheet);
1311
+ __publicField(this, "type", M.Worksheet);
1287
1312
  __publicField(this, "status", PermissionStatus.INIT);
1288
1313
  __publicField(this, "id");
1289
- __publicField(this, "subType", P.Filter);
1290
- this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${P.Filter}_${unitId}_${subUnitId}`;
1314
+ __publicField(this, "subType", L.Filter);
1315
+ this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${L.Filter}_${unitId}_${subUnitId}`;
1291
1316
  }
1292
1317
  };
1293
1318
  __name(_WorksheetFilterPermission, "WorksheetFilterPermission");
@@ -1295,11 +1320,11 @@ let WorksheetFilterPermission = _WorksheetFilterPermission;
1295
1320
  const _WorksheetPivotTablePermission = class _WorksheetPivotTablePermission {
1296
1321
  constructor(unitId, subUnitId) {
1297
1322
  __publicField(this, "value", !0);
1298
- __publicField(this, "type", l.Worksheet);
1323
+ __publicField(this, "type", M.Worksheet);
1299
1324
  __publicField(this, "status", PermissionStatus.INIT);
1300
1325
  __publicField(this, "id");
1301
- __publicField(this, "subType", P.PivotTable);
1302
- this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${P.PivotTable}_${unitId}_${subUnitId}`;
1326
+ __publicField(this, "subType", L.PivotTable);
1327
+ this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${L.PivotTable}_${unitId}_${subUnitId}`;
1303
1328
  }
1304
1329
  };
1305
1330
  __name(_WorksheetPivotTablePermission, "WorksheetPivotTablePermission");
@@ -1307,11 +1332,11 @@ let WorksheetPivotTablePermission = _WorksheetPivotTablePermission;
1307
1332
  const _WorksheetEditExtraObjectPermission = class _WorksheetEditExtraObjectPermission {
1308
1333
  constructor(unitId, subUnitId) {
1309
1334
  __publicField(this, "value", !0);
1310
- __publicField(this, "type", l.Worksheet);
1335
+ __publicField(this, "type", M.Worksheet);
1311
1336
  __publicField(this, "status", PermissionStatus.INIT);
1312
1337
  __publicField(this, "id");
1313
- __publicField(this, "subType", P.EditExtraObject);
1314
- this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${P.EditExtraObject}_${unitId}_${subUnitId}`;
1338
+ __publicField(this, "subType", L.EditExtraObject);
1339
+ this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${L.EditExtraObject}_${unitId}_${subUnitId}`;
1315
1340
  }
1316
1341
  };
1317
1342
  __name(_WorksheetEditExtraObjectPermission, "WorksheetEditExtraObjectPermission");
@@ -1319,11 +1344,11 @@ let WorksheetEditExtraObjectPermission = _WorksheetEditExtraObjectPermission;
1319
1344
  const _WorksheetManageCollaboratorPermission = class _WorksheetManageCollaboratorPermission {
1320
1345
  constructor(unitId, subUnitId) {
1321
1346
  __publicField(this, "value", !0);
1322
- __publicField(this, "type", l.Worksheet);
1347
+ __publicField(this, "type", M.Worksheet);
1323
1348
  __publicField(this, "status", PermissionStatus.INIT);
1324
1349
  __publicField(this, "id");
1325
- __publicField(this, "subType", P.ManageCollaborator);
1326
- this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${P.ManageCollaborator}_${unitId}_${subUnitId}`;
1350
+ __publicField(this, "subType", L.ManageCollaborator);
1351
+ this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${L.ManageCollaborator}_${unitId}_${subUnitId}`;
1327
1352
  }
1328
1353
  };
1329
1354
  __name(_WorksheetManageCollaboratorPermission, "WorksheetManageCollaboratorPermission");
@@ -1331,11 +1356,11 @@ let WorksheetManageCollaboratorPermission = _WorksheetManageCollaboratorPermissi
1331
1356
  const _WorksheetEditPermission = class _WorksheetEditPermission {
1332
1357
  constructor(unitId, subUnitId) {
1333
1358
  __publicField(this, "value", !0);
1334
- __publicField(this, "type", l.Worksheet);
1359
+ __publicField(this, "type", M.Worksheet);
1335
1360
  __publicField(this, "status", PermissionStatus.INIT);
1336
1361
  __publicField(this, "id");
1337
- __publicField(this, "subType", P.Edit);
1338
- this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${P.Edit}_${unitId}_${subUnitId}`;
1362
+ __publicField(this, "subType", L.Edit);
1363
+ this.unitId = unitId, this.subUnitId = subUnitId, this.id = `${this.type}.${L.Edit}_${unitId}_${subUnitId}`;
1339
1364
  }
1340
1365
  };
1341
1366
  __name(_WorksheetEditPermission, "WorksheetEditPermission");
@@ -1344,10 +1369,10 @@ const _WorkbookCommentPermission = class _WorkbookCommentPermission {
1344
1369
  constructor(unitId) {
1345
1370
  __publicField(this, "id");
1346
1371
  __publicField(this, "value", !0);
1347
- __publicField(this, "type", l.Workbook);
1372
+ __publicField(this, "type", M.Workbook);
1348
1373
  __publicField(this, "status", PermissionStatus.INIT);
1349
- __publicField(this, "subType", P.Comment);
1350
- this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${P.Comment}_${unitId}`;
1374
+ __publicField(this, "subType", L.Comment);
1375
+ this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${L.Comment}_${unitId}`;
1351
1376
  }
1352
1377
  };
1353
1378
  __name(_WorkbookCommentPermission, "WorkbookCommentPermission");
@@ -1356,10 +1381,10 @@ const _WorkbookEditablePermission = class _WorkbookEditablePermission {
1356
1381
  constructor(unitId) {
1357
1382
  __publicField(this, "id");
1358
1383
  __publicField(this, "value", !0);
1359
- __publicField(this, "type", l.Workbook);
1384
+ __publicField(this, "type", M.Workbook);
1360
1385
  __publicField(this, "status", PermissionStatus.INIT);
1361
- __publicField(this, "subType", P.Edit);
1362
- this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${P.Edit}_${unitId}`;
1386
+ __publicField(this, "subType", L.Edit);
1387
+ this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${L.Edit}_${unitId}`;
1363
1388
  }
1364
1389
  };
1365
1390
  __name(_WorkbookEditablePermission, "WorkbookEditablePermission");
@@ -1368,10 +1393,10 @@ const _WorkbookDuplicatePermission = class _WorkbookDuplicatePermission {
1368
1393
  constructor(unitId) {
1369
1394
  __publicField(this, "id");
1370
1395
  __publicField(this, "value", !0);
1371
- __publicField(this, "type", l.Workbook);
1396
+ __publicField(this, "type", M.Workbook);
1372
1397
  __publicField(this, "status", PermissionStatus.INIT);
1373
- __publicField(this, "subType", P.Duplicate);
1374
- this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${P.Duplicate}_${unitId}`;
1398
+ __publicField(this, "subType", L.Duplicate);
1399
+ this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${L.Duplicate}_${unitId}`;
1375
1400
  }
1376
1401
  };
1377
1402
  __name(_WorkbookDuplicatePermission, "WorkbookDuplicatePermission");
@@ -1380,10 +1405,10 @@ const _WorkbookPrintPermission = class _WorkbookPrintPermission {
1380
1405
  constructor(unitId) {
1381
1406
  __publicField(this, "id");
1382
1407
  __publicField(this, "value", !0);
1383
- __publicField(this, "type", l.Workbook);
1408
+ __publicField(this, "type", M.Workbook);
1384
1409
  __publicField(this, "status", PermissionStatus.INIT);
1385
- __publicField(this, "subType", P.Print);
1386
- this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${P.Print}_${unitId}`;
1410
+ __publicField(this, "subType", L.Print);
1411
+ this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${L.Print}_${unitId}`;
1387
1412
  }
1388
1413
  };
1389
1414
  __name(_WorkbookPrintPermission, "WorkbookPrintPermission");
@@ -1392,10 +1417,10 @@ const _WorkbookExportPermission = class _WorkbookExportPermission {
1392
1417
  constructor(unitId) {
1393
1418
  __publicField(this, "id");
1394
1419
  __publicField(this, "value", !0);
1395
- __publicField(this, "type", l.Workbook);
1420
+ __publicField(this, "type", M.Workbook);
1396
1421
  __publicField(this, "status", PermissionStatus.INIT);
1397
- __publicField(this, "subType", P.Export);
1398
- this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${P.Export}_${unitId}`;
1422
+ __publicField(this, "subType", L.Export);
1423
+ this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${L.Export}_${unitId}`;
1399
1424
  }
1400
1425
  };
1401
1426
  __name(_WorkbookExportPermission, "WorkbookExportPermission");
@@ -1404,10 +1429,10 @@ const _WorkbookMoveSheetPermission = class _WorkbookMoveSheetPermission {
1404
1429
  constructor(unitId) {
1405
1430
  __publicField(this, "id");
1406
1431
  __publicField(this, "value", !0);
1407
- __publicField(this, "type", l.Workbook);
1432
+ __publicField(this, "type", M.Workbook);
1408
1433
  __publicField(this, "status", PermissionStatus.INIT);
1409
- __publicField(this, "subType", P.MoveSheet);
1410
- this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${P.MoveSheet}_${unitId}`;
1434
+ __publicField(this, "subType", L.MoveSheet);
1435
+ this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${L.MoveSheet}_${unitId}`;
1411
1436
  }
1412
1437
  };
1413
1438
  __name(_WorkbookMoveSheetPermission, "WorkbookMoveSheetPermission");
@@ -1416,10 +1441,10 @@ const _WorkbookDeleteSheetPermission = class _WorkbookDeleteSheetPermission {
1416
1441
  constructor(unitId) {
1417
1442
  __publicField(this, "id");
1418
1443
  __publicField(this, "value", !0);
1419
- __publicField(this, "type", l.Workbook);
1444
+ __publicField(this, "type", M.Workbook);
1420
1445
  __publicField(this, "status", PermissionStatus.INIT);
1421
- __publicField(this, "subType", P.DeleteSheet);
1422
- this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${P.DeleteSheet}_${unitId}`;
1446
+ __publicField(this, "subType", L.DeleteSheet);
1447
+ this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${L.DeleteSheet}_${unitId}`;
1423
1448
  }
1424
1449
  };
1425
1450
  __name(_WorkbookDeleteSheetPermission, "WorkbookDeleteSheetPermission");
@@ -1428,10 +1453,10 @@ const _WorkbookHideSheetPermission = class _WorkbookHideSheetPermission {
1428
1453
  constructor(unitId) {
1429
1454
  __publicField(this, "id");
1430
1455
  __publicField(this, "value", !0);
1431
- __publicField(this, "type", l.Workbook);
1456
+ __publicField(this, "type", M.Workbook);
1432
1457
  __publicField(this, "status", PermissionStatus.INIT);
1433
- __publicField(this, "subType", P.HideSheet);
1434
- this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${P.HideSheet}_${unitId}`;
1458
+ __publicField(this, "subType", L.HideSheet);
1459
+ this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${L.HideSheet}_${unitId}`;
1435
1460
  }
1436
1461
  };
1437
1462
  __name(_WorkbookHideSheetPermission, "WorkbookHideSheetPermission");
@@ -1440,10 +1465,10 @@ const _WorkbookRenameSheetPermission = class _WorkbookRenameSheetPermission {
1440
1465
  constructor(unitId) {
1441
1466
  __publicField(this, "id");
1442
1467
  __publicField(this, "value", !0);
1443
- __publicField(this, "type", l.Workbook);
1468
+ __publicField(this, "type", M.Workbook);
1444
1469
  __publicField(this, "status", PermissionStatus.INIT);
1445
- __publicField(this, "subType", P.RenameSheet);
1446
- this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${P.RenameSheet}_${unitId}`;
1470
+ __publicField(this, "subType", L.RenameSheet);
1471
+ this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${L.RenameSheet}_${unitId}`;
1447
1472
  }
1448
1473
  };
1449
1474
  __name(_WorkbookRenameSheetPermission, "WorkbookRenameSheetPermission");
@@ -1452,10 +1477,10 @@ const _WorkbookCreateSheetPermission = class _WorkbookCreateSheetPermission {
1452
1477
  constructor(unitId) {
1453
1478
  __publicField(this, "id");
1454
1479
  __publicField(this, "value", !0);
1455
- __publicField(this, "type", l.Workbook);
1480
+ __publicField(this, "type", M.Workbook);
1456
1481
  __publicField(this, "status", PermissionStatus.INIT);
1457
- __publicField(this, "subType", P.CreateSheet);
1458
- this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${P.CreateSheet}_${unitId}`;
1482
+ __publicField(this, "subType", L.CreateSheet);
1483
+ this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${L.CreateSheet}_${unitId}`;
1459
1484
  }
1460
1485
  };
1461
1486
  __name(_WorkbookCreateSheetPermission, "WorkbookCreateSheetPermission");
@@ -1464,10 +1489,10 @@ const _WorkbookHistoryPermission = class _WorkbookHistoryPermission {
1464
1489
  constructor(unitId) {
1465
1490
  __publicField(this, "id");
1466
1491
  __publicField(this, "value", !0);
1467
- __publicField(this, "type", l.Workbook);
1492
+ __publicField(this, "type", M.Workbook);
1468
1493
  __publicField(this, "status", PermissionStatus.INIT);
1469
- __publicField(this, "subType", P.History);
1470
- this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${P.History}_${unitId}`;
1494
+ __publicField(this, "subType", L.History);
1495
+ this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${L.History}_${unitId}`;
1471
1496
  }
1472
1497
  };
1473
1498
  __name(_WorkbookHistoryPermission, "WorkbookHistoryPermission");
@@ -1476,10 +1501,10 @@ const _WorkbookViewPermission = class _WorkbookViewPermission {
1476
1501
  constructor(unitId) {
1477
1502
  __publicField(this, "id");
1478
1503
  __publicField(this, "value", !0);
1479
- __publicField(this, "type", l.Workbook);
1504
+ __publicField(this, "type", M.Workbook);
1480
1505
  __publicField(this, "status", PermissionStatus.INIT);
1481
- __publicField(this, "subType", P.View);
1482
- this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${P.View}_${unitId}`;
1506
+ __publicField(this, "subType", L.View);
1507
+ this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${L.View}_${unitId}`;
1483
1508
  }
1484
1509
  };
1485
1510
  __name(_WorkbookViewPermission, "WorkbookViewPermission");
@@ -1488,10 +1513,10 @@ const _WorkbookSharePermission = class _WorkbookSharePermission {
1488
1513
  constructor(unitId) {
1489
1514
  __publicField(this, "id");
1490
1515
  __publicField(this, "value", !0);
1491
- __publicField(this, "type", l.Workbook);
1516
+ __publicField(this, "type", M.Workbook);
1492
1517
  __publicField(this, "status", PermissionStatus.INIT);
1493
- __publicField(this, "subType", P.Share);
1494
- this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${P.Share}_${unitId}`;
1518
+ __publicField(this, "subType", L.Share);
1519
+ this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${L.Share}_${unitId}`;
1495
1520
  }
1496
1521
  };
1497
1522
  __name(_WorkbookSharePermission, "WorkbookSharePermission");
@@ -1500,10 +1525,10 @@ const _WorkbookCopyPermission = class _WorkbookCopyPermission {
1500
1525
  constructor(unitId) {
1501
1526
  __publicField(this, "id");
1502
1527
  __publicField(this, "value", !0);
1503
- __publicField(this, "type", l.Workbook);
1528
+ __publicField(this, "type", M.Workbook);
1504
1529
  __publicField(this, "status", PermissionStatus.INIT);
1505
- __publicField(this, "subType", P.Copy);
1506
- this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${P.Copy}_${unitId}`;
1530
+ __publicField(this, "subType", L.Copy);
1531
+ this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${L.Copy}_${unitId}`;
1507
1532
  }
1508
1533
  };
1509
1534
  __name(_WorkbookCopyPermission, "WorkbookCopyPermission");
@@ -1512,10 +1537,10 @@ const _WorkbookCopySheetPermission = class _WorkbookCopySheetPermission {
1512
1537
  constructor(unitId) {
1513
1538
  __publicField(this, "id");
1514
1539
  __publicField(this, "value", !0);
1515
- __publicField(this, "type", l.Workbook);
1516
- __publicField(this, "subType", P.CopySheet);
1540
+ __publicField(this, "type", M.Workbook);
1541
+ __publicField(this, "subType", L.CopySheet);
1517
1542
  __publicField(this, "status", PermissionStatus.INIT);
1518
- this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${P.CopySheet}_${unitId}`;
1543
+ this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${L.CopySheet}_${unitId}`;
1519
1544
  }
1520
1545
  };
1521
1546
  __name(_WorkbookCopySheetPermission, "WorkbookCopySheetPermission");
@@ -1524,10 +1549,10 @@ const _WorkbookManageCollaboratorPermission = class _WorkbookManageCollaboratorP
1524
1549
  constructor(unitId) {
1525
1550
  __publicField(this, "id");
1526
1551
  __publicField(this, "value", !0);
1527
- __publicField(this, "type", l.Workbook);
1552
+ __publicField(this, "type", M.Workbook);
1528
1553
  __publicField(this, "status", PermissionStatus.INIT);
1529
- __publicField(this, "subType", P.ManageCollaborator);
1530
- this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${P.ManageCollaborator}_${unitId}`;
1554
+ __publicField(this, "subType", L.ManageCollaborator);
1555
+ this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${L.ManageCollaborator}_${unitId}`;
1531
1556
  }
1532
1557
  };
1533
1558
  __name(_WorkbookManageCollaboratorPermission, "WorkbookManageCollaboratorPermission");
@@ -1536,10 +1561,10 @@ const _WorkbookViewHistoryPermission = class _WorkbookViewHistoryPermission {
1536
1561
  constructor(unitId) {
1537
1562
  __publicField(this, "id");
1538
1563
  __publicField(this, "value", !0);
1539
- __publicField(this, "type", l.Workbook);
1564
+ __publicField(this, "type", M.Workbook);
1540
1565
  __publicField(this, "status", PermissionStatus.INIT);
1541
- __publicField(this, "subType", P.ViewHistory);
1542
- this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${P.ViewHistory}_${unitId}`;
1566
+ __publicField(this, "subType", L.ViewHistory);
1567
+ this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${L.ViewHistory}_${unitId}`;
1543
1568
  }
1544
1569
  };
1545
1570
  __name(_WorkbookViewHistoryPermission, "WorkbookViewHistoryPermission");
@@ -1548,40 +1573,40 @@ const _WorkbookRecoverHistoryPermission = class _WorkbookRecoverHistoryPermissio
1548
1573
  constructor(unitId) {
1549
1574
  __publicField(this, "id");
1550
1575
  __publicField(this, "value", !0);
1551
- __publicField(this, "type", l.Workbook);
1576
+ __publicField(this, "type", M.Workbook);
1552
1577
  __publicField(this, "status", PermissionStatus.INIT);
1553
- __publicField(this, "subType", P.RecoverHistory);
1554
- this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${P.RecoverHistory}_${unitId}`;
1578
+ __publicField(this, "subType", L.RecoverHistory);
1579
+ this.unitId = unitId, this.unitId = unitId, this.id = `${this.type}.${L.RecoverHistory}_${unitId}`;
1555
1580
  }
1556
1581
  };
1557
1582
  __name(_WorkbookRecoverHistoryPermission, "WorkbookRecoverHistoryPermission");
1558
1583
  let WorkbookRecoverHistoryPermission = _WorkbookRecoverHistoryPermission;
1559
1584
  const _RangeProtectionPermissionEditPoint = class _RangeProtectionPermissionEditPoint {
1560
1585
  constructor(unitId, subUnitId, permissionId) {
1561
- __publicField(this, "type", l.SelectRange);
1562
- __publicField(this, "subType", P.Edit);
1586
+ __publicField(this, "type", M.SelectRange);
1587
+ __publicField(this, "subType", L.Edit);
1563
1588
  __publicField(this, "status", PermissionStatus.INIT);
1564
1589
  __publicField(this, "value", !0);
1565
1590
  __publicField(this, "id");
1566
1591
  __publicField(this, "unitId");
1567
1592
  __publicField(this, "subUnitId");
1568
1593
  __publicField(this, "permissionId");
1569
- this.unitId = unitId, this.subUnitId = subUnitId, this.permissionId = permissionId, this.id = `${l.SelectRange}.${P.Edit}.${permissionId}`;
1594
+ this.unitId = unitId, this.subUnitId = subUnitId, this.permissionId = permissionId, this.id = `${M.SelectRange}.${L.Edit}.${permissionId}`;
1570
1595
  }
1571
1596
  };
1572
1597
  __name(_RangeProtectionPermissionEditPoint, "RangeProtectionPermissionEditPoint");
1573
1598
  let RangeProtectionPermissionEditPoint = _RangeProtectionPermissionEditPoint;
1574
1599
  const _RangeProtectionPermissionViewPoint = class _RangeProtectionPermissionViewPoint {
1575
1600
  constructor(unitId, subUnitId, permissionId) {
1576
- __publicField(this, "type", l.SelectRange);
1577
- __publicField(this, "subType", P.View);
1601
+ __publicField(this, "type", M.SelectRange);
1602
+ __publicField(this, "subType", L.View);
1578
1603
  __publicField(this, "status", PermissionStatus.INIT);
1579
1604
  __publicField(this, "value", !0);
1580
1605
  __publicField(this, "id");
1581
1606
  __publicField(this, "unitId");
1582
1607
  __publicField(this, "subUnitId");
1583
1608
  __publicField(this, "permissionId");
1584
- this.unitId = unitId, this.subUnitId = subUnitId, this.permissionId = permissionId, this.id = `${l.SelectRange}.${P.View}.${permissionId}`;
1609
+ this.unitId = unitId, this.subUnitId = subUnitId, this.permissionId = permissionId, this.id = `${M.SelectRange}.${L.View}.${permissionId}`;
1585
1610
  }
1586
1611
  };
1587
1612
  __name(_RangeProtectionPermissionViewPoint, "RangeProtectionPermissionViewPoint");
@@ -2610,7 +2635,7 @@ const MoveRowsCommandId = "sheet.command.move-rows", MoveRowsCommand = {
2610
2635
  ranges.push(totalRange);
2611
2636
  if (!await sheetInterceptorService.beforeCommandExecute({
2612
2637
  id: RemoveRowCommand.id,
2613
- params: { range: totalRange }
2638
+ params: { range: totalRange, ranges }
2614
2639
  }))
2615
2640
  return !1;
2616
2641
  const redos = [], undos = [];
@@ -2631,7 +2656,7 @@ const MoveRowsCommandId = "sheet.command.move-rows", MoveRowsCommand = {
2631
2656
  });
2632
2657
  const intercepted = sheetInterceptorService.onCommandExecute({
2633
2658
  id: RemoveRowCommand.id,
2634
- params: { range: totalRange }
2659
+ params: { range: totalRange, ranges }
2635
2660
  }), commandService = accessor.get(ICommandService);
2636
2661
  return sequenceExecute(
2637
2662
  [
@@ -4866,7 +4891,7 @@ let WorksheetProtectionRuleModel = (_a4 = class {
4866
4891
  constructor() {
4867
4892
  /**
4868
4893
  *
4869
- * Map<unitId, Map<subUnitId, Map<ruleId, IWorksheetProtectionRule>>>
4894
+ * Map<unitId, Map<subUnitId, Map<subUnitId, IWorksheetProtectionRule>>>
4870
4895
  */
4871
4896
  __publicField(this, "_model", /* @__PURE__ */ new Map());
4872
4897
  __publicField(this, "_ruleChange", new Subject());
@@ -4933,6 +4958,13 @@ let WorksheetProtectionRuleModel = (_a4 = class {
4933
4958
  resetOrder() {
4934
4959
  this._resetOrder.next(Math.random());
4935
4960
  }
4961
+ getTargetByPermissionId(unitId, permissionId) {
4962
+ const subUnitMap = this._model.get(unitId);
4963
+ if (!subUnitMap) return null;
4964
+ for (const [subUnitId, rule] of subUnitMap)
4965
+ if (rule.permissionId === permissionId)
4966
+ return [unitId, subUnitId];
4967
+ }
4936
4968
  }, __name(_a4, "WorksheetProtectionRuleModel"), _a4);
4937
4969
  WorksheetProtectionRuleModel = __decorateClass$f([
4938
4970
  OnLifecycle(LifecycleStages.Starting, WorksheetProtectionRuleModel)
@@ -5041,6 +5073,15 @@ let RangeProtectionRuleModel = (_a5 = class {
5041
5073
  id = Tools.generateRandomId(4);
5042
5074
  return id;
5043
5075
  }
5076
+ getTargetByPermissionId(unitId, permissionId) {
5077
+ const subUnitMap = this._model.get(unitId);
5078
+ if (!subUnitMap) return null;
5079
+ for (const [subUnitId, ruleMap] of subUnitMap)
5080
+ for (const rule of ruleMap.values())
5081
+ if (rule.permissionId === permissionId)
5082
+ return [unitId, subUnitId];
5083
+ return null;
5084
+ }
5044
5085
  }, __name(_a5, "RangeProtectionRuleModel"), _a5);
5045
5086
  RangeProtectionRuleModel = __decorateClass$e([
5046
5087
  OnLifecycle(LifecycleStages.Starting, RangeProtectionRuleModel)
@@ -5064,20 +5105,20 @@ const getAllWorksheetPermissionPoint = /* @__PURE__ */ __name(() => [
5064
5105
  WorksheetSetRowStylePermission,
5065
5106
  WorksheetSortPermission
5066
5107
  ], "getAllWorksheetPermissionPointByPointPanel"), defaultWorksheetPermissionPoint = [
5067
- P.Copy,
5068
- P.DeleteColumn,
5069
- P.DeleteRow,
5070
- P.EditExtraObject,
5071
- P.Filter,
5072
- P.InsertColumn,
5073
- P.InsertRow,
5074
- P.InsertHyperlink,
5075
- P.PivotTable,
5076
- P.SetCellStyle,
5077
- P.SetCellValue,
5078
- P.SetColumnStyle,
5079
- P.SetRowStyle,
5080
- P.Sort
5108
+ L.Copy,
5109
+ L.DeleteColumn,
5110
+ L.DeleteRow,
5111
+ L.EditExtraObject,
5112
+ L.Filter,
5113
+ L.InsertColumn,
5114
+ L.InsertRow,
5115
+ L.InsertHyperlink,
5116
+ L.PivotTable,
5117
+ L.SetCellStyle,
5118
+ L.SetCellValue,
5119
+ L.SetColumnStyle,
5120
+ L.SetRowStyle,
5121
+ L.Sort
5081
5122
  ];
5082
5123
  var __defProp$d = Object.defineProperty, __getOwnPropDesc$d = Object.getOwnPropertyDescriptor, __decorateClass$d = /* @__PURE__ */ __name((decorators, target, key, kind) => {
5083
5124
  for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
@@ -5131,6 +5172,13 @@ let WorksheetProtectionPointModel = (_a6 = class {
5131
5172
  let subUnitMap = this._model.get(unitId);
5132
5173
  return subUnitMap || (subUnitMap = /* @__PURE__ */ new Map(), this._model.set(unitId, subUnitMap)), subUnitMap;
5133
5174
  }
5175
+ getTargetByPermissionId(unitId, permissionId) {
5176
+ const subUnitMap = this._model.get(unitId);
5177
+ if (!subUnitMap) return null;
5178
+ for (const [subUnitId, rule] of subUnitMap)
5179
+ if (rule.permissionId === permissionId)
5180
+ return [unitId, subUnitId];
5181
+ }
5134
5182
  }, __name(_a6, "WorksheetProtectionPointModel"), _a6);
5135
5183
  WorksheetProtectionPointModel = __decorateClass$d([
5136
5184
  OnLifecycle(LifecycleStages.Starting, WorksheetProtectionPointModel)
@@ -6143,7 +6191,16 @@ const handleInsertRow = /* @__PURE__ */ __name((param, targetRange) => {
6143
6191
  matrix.setValue(row, col, 1);
6144
6192
  });
6145
6193
  }), queryObjectMatrix(matrix, (v) => v === 1);
6146
- }, "handleDeleteRangeMoveUpCommon"), runRefRangeMutations = /* @__PURE__ */ __name((operators, range) => {
6194
+ }, "handleDeleteRangeMoveUpCommon"), handleRemoveRowCommon = /* @__PURE__ */ __name((param, targetRange) => {
6195
+ var _a20;
6196
+ const ranges = (_a20 = param.ranges) != null ? _a20 : [param.range], matrix = new ObjectMatrix();
6197
+ return Range.foreach(targetRange, (row, col) => {
6198
+ matrix.setValue(row, col, 1);
6199
+ }), ranges.forEach((range) => {
6200
+ const startRow = range.startRow, count = range.endRow - startRow + 1;
6201
+ matrix.removeRows(startRow, count);
6202
+ }), queryObjectMatrix(matrix, (value) => value === 1);
6203
+ }, "handleRemoveRowCommon"), runRefRangeMutations = /* @__PURE__ */ __name((operators, range) => {
6147
6204
  let result = { ...range };
6148
6205
  return operators.forEach((operator) => {
6149
6206
  switch (operator.type) {
@@ -6253,13 +6310,11 @@ const handleInsertRow = /* @__PURE__ */ __name((param, targetRange) => {
6253
6310
  operator = handleIRemoveCol(commandInfo, range);
6254
6311
  break;
6255
6312
  }
6256
- case EffectRefRangId.RemoveRowCommandId: {
6257
- operator = handleIRemoveRow(commandInfo, range);
6258
- break;
6259
- }
6313
+ case EffectRefRangId.RemoveRowCommandId:
6314
+ return handleRemoveRowCommon(commandInfo.params, range);
6260
6315
  }
6261
6316
  return runRefRangeMutations(operator, range);
6262
- }, "handleCommonDefaultRangeChangeWithEffectRefCommands");
6317
+ }, "handleCommonDefaultRangeChangeWithEffectRefCommands"), handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests = /* @__PURE__ */ __name((range, commandInfo, deps) => [DeleteRangeMoveLeftCommand.id, DeleteRangeMoveUpCommand.id].includes(commandInfo.id) || getEffectedRangesOnCommand(commandInfo, deps).some((effectRange) => Rectangle.intersects(effectRange, range)) ? handleCommonDefaultRangeChangeWithEffectRefCommands(range, commandInfo) : range, "handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests");
6263
6318
  function adjustRangeOnMutation(range, mutation) {
6264
6319
  const { id, params } = mutation;
6265
6320
  let baseRangeOperator = {
@@ -7599,21 +7654,21 @@ const getAllWorkbookPermissionPoint = /* @__PURE__ */ __name(() => [
7599
7654
  WorkbookViewHistoryPermission,
7600
7655
  WorkbookRecoverHistoryPermission
7601
7656
  ], "getAllWorkbookPermissionPoint"), defaultWorkbookPermissionPoints = [
7602
- P.Edit,
7603
- P.Print,
7604
- P.Comment,
7605
- P.View,
7606
- P.Copy,
7607
- P.Export,
7608
- P.ManageCollaborator,
7609
- P.CreateSheet,
7610
- P.DeleteSheet,
7611
- P.RenameSheet,
7612
- P.HideSheet,
7613
- P.Duplicate,
7614
- P.Share,
7615
- P.MoveSheet,
7616
- P.CopySheet
7657
+ L.Edit,
7658
+ L.Print,
7659
+ L.Comment,
7660
+ L.View,
7661
+ L.Copy,
7662
+ L.Export,
7663
+ L.ManageCollaborator,
7664
+ L.CreateSheet,
7665
+ L.DeleteSheet,
7666
+ L.RenameSheet,
7667
+ L.HideSheet,
7668
+ L.Duplicate,
7669
+ L.Share,
7670
+ L.MoveSheet,
7671
+ L.CopySheet
7617
7672
  ];
7618
7673
  var __defProp$6 = Object.defineProperty, __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor, __decorateClass$6 = /* @__PURE__ */ __name((decorators, target, key, kind) => {
7619
7674
  for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
@@ -7726,7 +7781,7 @@ let RangeProtectionRenderModel = (_a15 = class {
7726
7781
  }
7727
7782
  _init() {
7728
7783
  this._permissionService.permissionPointUpdate$.pipe(
7729
- filter((permission) => permission.type === l.SelectRange),
7784
+ filter((permission) => permission.type === M.SelectRange),
7730
7785
  filter((permission) => getAllRangePermissionPoint().some((F) => permission instanceof F)),
7731
7786
  map$1((permission) => permission)
7732
7787
  ).subscribe((permission) => {
@@ -7816,8 +7871,8 @@ let RangeProtectionRefRangeService = (_a16 = class extends Disposable {
7816
7871
  return;
7817
7872
  registerRefRange(unitId, sheetId);
7818
7873
  }
7819
- if (commandInfo.id === AddRangeProtectionCommand.id || commandInfo.id === SetRangeProtectionCommand.id) {
7820
- const params = commandInfo.params, subUnitId = params.rule.subUnitId, unitId = params.rule.unitId;
7874
+ if (commandInfo.id === SetRangeProtectionMutation.id || commandInfo.id === AddRangeProtectionMutation.id) {
7875
+ const params = commandInfo.params, subUnitId = params.subUnitId, unitId = params.unitId;
7821
7876
  if (!subUnitId || !unitId)
7822
7877
  return;
7823
7878
  registerRefRange(unitId, subUnitId);
@@ -7862,7 +7917,7 @@ let RangeProtectionRefRangeService = (_a16 = class extends Disposable {
7862
7917
  }
7863
7918
  return p;
7864
7919
  }, []);
7865
- cloneRule.ranges = rangesByRemove, redoMutations.push({ id: SetRangeProtectionMutation.id, params: { unitId, subUnitId, rule: cloneRule, ruleId: rule.id } }), undoMutations.push({ id: SetRangeProtectionMutation.id, params: { unitId, subUnitId, rule, ruleId: rule.id } });
7920
+ cloneRule.ranges = rangesByRemove, cloneRule.ranges.length ? (redoMutations.push({ id: SetRangeProtectionMutation.id, params: { unitId, subUnitId, rule: cloneRule, ruleId: rule.id } }), undoMutations.push({ id: SetRangeProtectionMutation.id, params: { unitId, subUnitId, rule, ruleId: rule.id } })) : (redoMutations.push({ id: DeleteRangeProtectionMutation.id, params: { unitId, subUnitId, ruleIds: [rule.id] } }), undoMutations.push({ id: AddRangeProtectionMutation.id, params: { unitId, subUnitId, name: "", rules: [rule] } }));
7866
7921
  }), { redos: redoMutations, undos: undoMutations };
7867
7922
  }
7868
7923
  return { undos: [], redos: [] };
@@ -7988,7 +8043,7 @@ let RangeProtectionRefRangeService = (_a16 = class extends Disposable {
7988
8043
  }
7989
8044
  }, __name(_a16, "RangeProtectionRefRangeService"), _a16);
7990
8045
  RangeProtectionRefRangeService = __decorateClass$3([
7991
- OnLifecycle(LifecycleStages.Starting, RangeProtectionRefRangeService),
8046
+ OnLifecycle(LifecycleStages.Ready, RangeProtectionRefRangeService),
7992
8047
  __decorateParam$3(0, Inject(RangeProtectionRuleModel)),
7993
8048
  __decorateParam$3(1, Inject(IUniverInstanceService)),
7994
8049
  __decorateParam$3(2, ICommandService),
@@ -8066,8 +8121,8 @@ let RangeProtectionService = (_a17 = class extends Disposable {
8066
8121
  allAllowedParams.push({
8067
8122
  objectID: rule.permissionId,
8068
8123
  unitID: unitId,
8069
- objectType: l.SelectRange,
8070
- actions: [P.View, P.Edit]
8124
+ objectType: M.SelectRange,
8125
+ actions: [L.View, L.Edit]
8071
8126
  });
8072
8127
  }), list.forEach((rule) => {
8073
8128
  getAllRangePermissionPoint().forEach((Factor) => {
@@ -8208,7 +8263,6 @@ function getNormalSelectionStyle(themeService) {
8208
8263
  return {
8209
8264
  strokeWidth: 1,
8210
8265
  stroke: styleSheet.primaryColor,
8211
- // strokeDash: 8,
8212
8266
  fill,
8213
8267
  // widgets: { tl: true, tc: true, tr: true, ml: true, mr: true, bl: true, bc: true, br: true },
8214
8268
  widgets: {},
@@ -8600,6 +8654,7 @@ export {
8600
8654
  InsertSheetCommand,
8601
8655
  InsertSheetMutation,
8602
8656
  InsertSheetUndoMutationFactory,
8657
+ InterceptCellContentPriority,
8603
8658
  MAX_CELL_PER_SHEET_KEY,
8604
8659
  MERGE_CELL_INTERCEPTOR_CHECK,
8605
8660
  MergeCellController,
@@ -8715,6 +8770,7 @@ export {
8715
8770
  SetWorksheetShowCommand,
8716
8771
  SheetInterceptorService,
8717
8772
  SheetsSelectionsService,
8773
+ M as UnitObject,
8718
8774
  UniverSheetsPlugin,
8719
8775
  WorkbookCommentPermission,
8720
8776
  WorkbookCopyPermission,
@@ -8793,6 +8849,7 @@ export {
8793
8849
  handleBaseMoveRowsCols,
8794
8850
  handleBaseRemoveRange,
8795
8851
  handleCommonDefaultRangeChangeWithEffectRefCommands,
8852
+ handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests,
8796
8853
  handleDefaultRangeChangeWithEffectRefCommands,
8797
8854
  handleDefaultRangeChangeWithEffectRefCommandsSkipNoInterests,
8798
8855
  handleDeleteRangeMoveLeft,