@univerjs/sheets 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/facade.js CHANGED
@@ -7202,7 +7202,7 @@ let R = class extends Ae {
7202
7202
  create(e, t, s, r) {
7203
7203
  var h, c, d;
7204
7204
  const i = qe(Ye.deepClone((h = r == null ? void 0 : r.sheet) != null ? h : {}));
7205
- i.name = e, i.rowCount = t, i.columnCount = s, i.id = (c = r == null ? void 0 : r.sheet) == null ? void 0 : c.id;
7205
+ i.name = this._workbook.uniqueSheetName(e), i.rowCount = t, i.columnCount = s, i.id = (c = r == null ? void 0 : r.sheet) == null ? void 0 : c.id;
7206
7206
  const o = (d = r == null ? void 0 : r.index) != null ? d : this._workbook.getSheets().length;
7207
7207
  this._commandService.syncExecuteCommand(ue.id, {
7208
7208
  unitId: this.id,
@@ -7309,7 +7309,7 @@ let R = class extends Ae {
7309
7309
  insertSheet(e, t) {
7310
7310
  var o, a, h;
7311
7311
  const s = qe(Ye.deepClone((o = t == null ? void 0 : t.sheet) != null ? o : {}));
7312
- s.name = e, s.id = (a = t == null ? void 0 : t.sheet) == null ? void 0 : a.id;
7312
+ s.name = this._workbook.uniqueSheetName(e), s.id = (a = t == null ? void 0 : t.sheet) == null ? void 0 : a.id;
7313
7313
  const r = (h = t == null ? void 0 : t.index) != null ? h : this._workbook.getSheets().length;
7314
7314
  this._commandService.syncExecuteCommand(ue.id, {
7315
7315
  unitId: this.id,