@fileverse-dev/fortune-core 1.2.79 → 1.2.81-yield

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.
@@ -155,6 +155,10 @@ export function setConditionRules(ctx, protection, generalDialog, conditionforma
155
155
  }
156
156
  } else if (rangeArr.length === 0) {
157
157
  if (_.isNaN(v) || v === "") {
158
+ if (v === "") {
159
+ ctx.warnDialog = "Value is required";
160
+ return;
161
+ }
158
162
  ctx.warnDialog = conditionformat.conditionValueCanOnly;
159
163
  return;
160
164
  }
@@ -266,7 +270,6 @@ export function setConditionRules(ctx, protection, generalDialog, conditionforma
266
270
  };
267
271
  var index = getSheetIndex(ctx, ctx.currentSheetId);
268
272
  var ruleArr = (_b = ctx.luckysheetfile[index].luckysheet_conditionformat_save) !== null && _b !== void 0 ? _b : [];
269
- console.log(rule, ruleArr, editKey, edit);
270
273
  if (edit) {
271
274
  ruleArr.splice(Number(editKey), 1, rule);
272
275
  } else {
@@ -1010,7 +1013,6 @@ export function getComputeMap(ctx) {
1010
1013
  var data = ctx.luckysheetfile[index].data;
1011
1014
  if (_.isNil(data)) return null;
1012
1015
  var editKey = (_c = ctx.luckysheetfile[index].conditionRules) === null || _c === void 0 ? void 0 : _c.editKey;
1013
- console.log("before", editKey, ruleArr);
1014
1016
  if (ctx.luckysheet_select_save && ((_d = ctx.luckysheetfile[index].conditionRules) === null || _d === void 0 ? void 0 : _d.rulesValue) !== "") {
1015
1017
  if (editKey !== null && editKey !== undefined) {
1016
1018
  ruleArr.splice(Number(editKey), 1);
@@ -1031,7 +1033,6 @@ export function getComputeMap(ctx) {
1031
1033
  conditionValue: [(_m = ctx.luckysheetfile[index].conditionRules) === null || _m === void 0 ? void 0 : _m.rulesValue]
1032
1034
  });
1033
1035
  }
1034
- console.log("after", editKey, ruleArr);
1035
1036
  var computeMap = compute(ctx, ruleArr, data);
1036
1037
  return computeMap;
1037
1038
  }
@@ -1527,6 +1527,11 @@ export function deleteSelectedCellText(ctx) {
1527
1527
  var c2 = selection[s].column[1];
1528
1528
  for (var r = r1; r <= r2; r += 1) {
1529
1529
  for (var c = c1; c <= c2; c += 1) {
1530
+ var index = getSheetIndex(ctx, ctx.currentSheetId);
1531
+ var dataVerification = ctx.luckysheetfile[index].dataVerification;
1532
+ if (dataVerification && (dataVerification === null || dataVerification === void 0 ? void 0 : dataVerification["".concat(r, "_").concat(c)])) {
1533
+ dataVerification === null || dataVerification === void 0 ? true : delete dataVerification["".concat(r, "_").concat(c)];
1534
+ }
1530
1535
  if (_.isPlainObject(d[r][c])) {
1531
1536
  var cell = d[r][c];
1532
1537
  delete cell.m;
@@ -170,6 +170,10 @@ function setConditionRules(ctx, protection, generalDialog, conditionformat, rule
170
170
  }
171
171
  } else if (rangeArr.length === 0) {
172
172
  if (_lodash.default.isNaN(v) || v === "") {
173
+ if (v === "") {
174
+ ctx.warnDialog = "Value is required";
175
+ return;
176
+ }
173
177
  ctx.warnDialog = conditionformat.conditionValueCanOnly;
174
178
  return;
175
179
  }
@@ -281,7 +285,6 @@ function setConditionRules(ctx, protection, generalDialog, conditionformat, rule
281
285
  };
282
286
  var index = (0, _utils.getSheetIndex)(ctx, ctx.currentSheetId);
283
287
  var ruleArr = (_b = ctx.luckysheetfile[index].luckysheet_conditionformat_save) !== null && _b !== void 0 ? _b : [];
284
- console.log(rule, ruleArr, editKey, edit);
285
288
  if (edit) {
286
289
  ruleArr.splice(Number(editKey), 1, rule);
287
290
  } else {
@@ -1025,7 +1028,6 @@ function getComputeMap(ctx) {
1025
1028
  var data = ctx.luckysheetfile[index].data;
1026
1029
  if (_lodash.default.isNil(data)) return null;
1027
1030
  var editKey = (_c = ctx.luckysheetfile[index].conditionRules) === null || _c === void 0 ? void 0 : _c.editKey;
1028
- console.log("before", editKey, ruleArr);
1029
1031
  if (ctx.luckysheet_select_save && ((_d = ctx.luckysheetfile[index].conditionRules) === null || _d === void 0 ? void 0 : _d.rulesValue) !== "") {
1030
1032
  if (editKey !== null && editKey !== undefined) {
1031
1033
  ruleArr.splice(Number(editKey), 1);
@@ -1046,7 +1048,6 @@ function getComputeMap(ctx) {
1046
1048
  conditionValue: [(_m = ctx.luckysheetfile[index].conditionRules) === null || _m === void 0 ? void 0 : _m.rulesValue]
1047
1049
  });
1048
1050
  }
1049
- console.log("after", editKey, ruleArr);
1050
1051
  var computeMap = compute(ctx, ruleArr, data);
1051
1052
  return computeMap;
1052
1053
  }
@@ -1562,6 +1562,11 @@ function deleteSelectedCellText(ctx) {
1562
1562
  var c2 = selection[s].column[1];
1563
1563
  for (var r = r1; r <= r2; r += 1) {
1564
1564
  for (var c = c1; c <= c2; c += 1) {
1565
+ var index = (0, _utils.getSheetIndex)(ctx, ctx.currentSheetId);
1566
+ var dataVerification = ctx.luckysheetfile[index].dataVerification;
1567
+ if (dataVerification && (dataVerification === null || dataVerification === void 0 ? void 0 : dataVerification["".concat(r, "_").concat(c)])) {
1568
+ dataVerification === null || dataVerification === void 0 ? true : delete dataVerification["".concat(r, "_").concat(c)];
1569
+ }
1565
1570
  if (_lodash.default.isPlainObject(d[r][c])) {
1566
1571
  var cell = d[r][c];
1567
1572
  delete cell.m;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-core",
3
- "version": "1.2.79",
3
+ "version": "1.2.81-yield",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -15,7 +15,7 @@
15
15
  "dev": "father-build --watch"
16
16
  },
17
17
  "dependencies": {
18
- "@fileverse-dev/formula-parser": "0.2.89",
18
+ "@fileverse-dev/formula-parser": "0.2.89-yield",
19
19
  "dayjs": "^1.11.0",
20
20
  "immer": "^9.0.12",
21
21
  "lodash": "^4.17.21",