@fileverse-dev/fortune-core 1.2.90-ydoc-2 → 1.2.90-ydoc-3

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.
@@ -42,7 +42,7 @@ export function changeSheet(ctx, id, isPivotInitial, isNewSheet, isCopySheet) {
42
42
  }
43
43
  }
44
44
  export function addSheet(ctx, settings, newSheetID, isPivotTable, sheetName, sheetData) {
45
- var _a, _b;
45
+ var _a, _b, _c, _d;
46
46
  if (newSheetID === void 0) {
47
47
  newSheetID = undefined;
48
48
  }
@@ -90,14 +90,11 @@ export function addSheet(ctx, settings, newSheetID, isPivotTable, sheetName, she
90
90
  changeSheet(ctx, id, isPivotTable, true);
91
91
  }
92
92
  if (ctx.hooks.afterAddSheet) {
93
- setTimeout(function () {
94
- var _a, _b;
95
- (_b = (_a = ctx.hooks).afterAddSheet) === null || _b === void 0 ? void 0 : _b.call(_a, sheetconfig);
96
- });
93
+ (_d = (_c = ctx.hooks).afterAddSheet) === null || _d === void 0 ? void 0 : _d.call(_c, sheetconfig);
97
94
  }
98
95
  }
99
96
  export function deleteSheet(ctx, id) {
100
- var _a, _b, _c;
97
+ var _a, _b, _c, _d, _e;
101
98
  if (ctx.allowEdit === false) {
102
99
  return;
103
100
  }
@@ -123,10 +120,7 @@ export function deleteSheet(ctx, id) {
123
120
  ctx.currentSheetId = (_c = orderSheets === null || orderSheets === void 0 ? void 0 : orderSheets[0]) === null || _c === void 0 ? void 0 : _c.id;
124
121
  }
125
122
  if (ctx.hooks.afterDeleteSheet) {
126
- setTimeout(function () {
127
- var _a, _b;
128
- (_b = (_a = ctx.hooks).afterDeleteSheet) === null || _b === void 0 ? void 0 : _b.call(_a, id);
129
- });
123
+ (_e = (_d = ctx.hooks).afterDeleteSheet) === null || _e === void 0 ? void 0 : _e.call(_d, id);
130
124
  }
131
125
  }
132
126
  export function updateSheet(ctx, newData) {
@@ -55,7 +55,7 @@ function changeSheet(ctx, id, isPivotInitial, isNewSheet, isCopySheet) {
55
55
  }
56
56
  }
57
57
  function addSheet(ctx, settings, newSheetID, isPivotTable, sheetName, sheetData) {
58
- var _a, _b;
58
+ var _a, _b, _c, _d;
59
59
  if (newSheetID === void 0) {
60
60
  newSheetID = undefined;
61
61
  }
@@ -103,14 +103,11 @@ function addSheet(ctx, settings, newSheetID, isPivotTable, sheetName, sheetData)
103
103
  changeSheet(ctx, id, isPivotTable, true);
104
104
  }
105
105
  if (ctx.hooks.afterAddSheet) {
106
- setTimeout(function () {
107
- var _a, _b;
108
- (_b = (_a = ctx.hooks).afterAddSheet) === null || _b === void 0 ? void 0 : _b.call(_a, sheetconfig);
109
- });
106
+ (_d = (_c = ctx.hooks).afterAddSheet) === null || _d === void 0 ? void 0 : _d.call(_c, sheetconfig);
110
107
  }
111
108
  }
112
109
  function deleteSheet(ctx, id) {
113
- var _a, _b, _c;
110
+ var _a, _b, _c, _d, _e;
114
111
  if (ctx.allowEdit === false) {
115
112
  return;
116
113
  }
@@ -136,10 +133,7 @@ function deleteSheet(ctx, id) {
136
133
  ctx.currentSheetId = (_c = orderSheets === null || orderSheets === void 0 ? void 0 : orderSheets[0]) === null || _c === void 0 ? void 0 : _c.id;
137
134
  }
138
135
  if (ctx.hooks.afterDeleteSheet) {
139
- setTimeout(function () {
140
- var _a, _b;
141
- (_b = (_a = ctx.hooks).afterDeleteSheet) === null || _b === void 0 ? void 0 : _b.call(_a, id);
142
- });
136
+ (_e = (_d = ctx.hooks).afterDeleteSheet) === null || _e === void 0 ? void 0 : _e.call(_d, id);
143
137
  }
144
138
  }
145
139
  function updateSheet(ctx, newData) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-core",
3
- "version": "1.2.90-ydoc-2",
3
+ "version": "1.2.90-ydoc-3",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.js",
6
6
  "typings": "lib/index.d.ts",