@leankylin-sheet/core 6.0.4 → 7.0.1

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.
@@ -28,5 +28,5 @@ export declare function registerExecFunctionExist(ctx: Context, sheet: {
28
28
  c: number;
29
29
  }>): void;
30
30
  export declare function setCellValuesByRange(ctx: Context, data: any[][], range: SingleRange, cellInput: HTMLDivElement | null, options?: CommonOptions, setMerge?: boolean): void;
31
- export declare function setCellValues(ctx: Context, data: any[], cellInput: HTMLDivElement | null): void;
31
+ export declare function setCellValues(ctx: Context, data: any[], cellInput: HTMLDivElement | null, skipCalcDev?: boolean): void;
32
32
  export declare function setCellFormatByRange(ctx: Context, attr: keyof Cell, value: any, range: Range | SingleRange, options?: CommonOptions): void;
package/dist/index.esm.js CHANGED
@@ -35760,6 +35760,7 @@ function getcellrange(ctx, txt, formulaId) {
35760
35760
  return true;
35761
35761
  });
35762
35762
  } else {
35763
+ var _ctx$active_f;
35763
35764
  var _i = formulaId;
35764
35765
  if (_.isNil(_i)) {
35765
35766
  _i = ctx.currentSheetId;
@@ -35772,7 +35773,7 @@ function getcellrange(ctx, txt, formulaId) {
35772
35773
  return null;
35773
35774
  }
35774
35775
  sheettxt = luckysheetfile[index].name;
35775
- sheetId = luckysheetfile[index].id;
35776
+ sheetId = ((_ctx$active_f = ctx.active_f) === null || _ctx$active_f === void 0 ? void 0 : _ctx$active_f.sheetId) || luckysheetfile[index].id;
35776
35777
  sheetdata = flowdata;
35777
35778
  rangetxt = txt;
35778
35779
  }
@@ -37588,7 +37589,7 @@ function functionStrChange(txt, type, rc, orient, stindex, step, sheetName, isCu
37588
37589
  return function_str;
37589
37590
  }
37590
37591
  function rangeSetValue(ctx, cellInput, selected, fxInput) {
37591
- var _document$activeEleme, _ctx$active_f;
37592
+ var _document$activeEleme, _ctx$active_f2;
37592
37593
  var $editor = cellInput;
37593
37594
  var $copyTo = fxInput;
37594
37595
  if (((_document$activeEleme = document.activeElement) === null || _document$activeEleme === void 0 ? void 0 : _document$activeEleme.id) === "luckysheet-functionbox-cell") {
@@ -37602,7 +37603,7 @@ function rangeSetValue(ctx, cellInput, selected, fxInput) {
37602
37603
  var range = "";
37603
37604
  var rf = selected.row[0];
37604
37605
  var cf = selected.column[0];
37605
- var sheetId = ((_ctx$active_f = ctx.active_f) === null || _ctx$active_f === void 0 ? void 0 : _ctx$active_f.sheetId) || ctx.formulaCache.rangetosheet;
37606
+ var sheetId = ((_ctx$active_f2 = ctx.active_f) === null || _ctx$active_f2 === void 0 ? void 0 : _ctx$active_f2.sheetId) || ctx.formulaCache.rangetosheet;
37606
37607
  if (ctx.config.merge != null && "".concat(rf, "_").concat(cf) in ctx.config.merge) {
37607
37608
  range = getRangetxt(ctx, ctx.currentSheetId, {
37608
37609
  column: [cf, cf],
@@ -47632,6 +47633,9 @@ function setNextSheet(draftCtx, nextSheetId, refs) {
47632
47633
  draftCtx.zoomRatio = sheet.zoomRatio || 1;
47633
47634
  cancelActiveImgItem(draftCtx, refs.globalCache);
47634
47635
  cancelNormalSelected(draftCtx);
47636
+ if (draftCtx.active_f) {
47637
+ createRangeHightlight(draftCtx, refs.cellInput.current.innerHTML);
47638
+ }
47635
47639
  if (isBack) {
47636
47640
  draftCtx.luckysheetCellUpdate = luckysheetCellUpdate;
47637
47641
  draftCtx.active_f = undefined;
@@ -57212,6 +57216,7 @@ function setCellValuesByRange(ctx, data, range, cellInput) {
57212
57216
  }
57213
57217
  function setCellValues(ctx, data, cellInput) {
57214
57218
  var _data$, _data$2;
57219
+ var skipCalcDev = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
57215
57220
  if (data == null) {
57216
57221
  throw INVALID_PARAMS;
57217
57222
  }
@@ -57234,7 +57239,12 @@ function setCellValues(ctx, data, cellInput) {
57234
57239
  c = _data$j.c,
57235
57240
  v = _data$j.v,
57236
57241
  ops = _data$j.ops;
57237
- setCellValue$1(ctx, r, c, v, cellInput, ops);
57242
+ if (skipCalcDev) {
57243
+ var _sheet = getSheet(ctx, ops || {});
57244
+ setCellValueInBatch(ctx, _sheet, r, c, v, cellInput, []);
57245
+ } else {
57246
+ setCellValue$1(ctx, r, c, v, cellInput, ops);
57247
+ }
57238
57248
  }
57239
57249
  cancelNormalSelected(ctx);
57240
57250
  return;
@@ -57256,7 +57266,7 @@ function setCellValues(ctx, data, cellInput) {
57256
57266
  }
57257
57267
  setCellValueInBatch(ctx, sheet, _r, _c, _v, cellInput, formulaCells);
57258
57268
  }
57259
- if (formulaCells.length === 0 && changedData.length === 0) {
57269
+ if (skipCalcDev || formulaCells.length === 0 && changedData.length === 0) {
57260
57270
  cancelNormalSelected(ctx);
57261
57271
  return;
57262
57272
  }
package/dist/index.js CHANGED
@@ -35770,6 +35770,7 @@ function getcellrange(ctx, txt, formulaId) {
35770
35770
  return true;
35771
35771
  });
35772
35772
  } else {
35773
+ var _ctx$active_f;
35773
35774
  var _i = formulaId;
35774
35775
  if (___default['default'].isNil(_i)) {
35775
35776
  _i = ctx.currentSheetId;
@@ -35782,7 +35783,7 @@ function getcellrange(ctx, txt, formulaId) {
35782
35783
  return null;
35783
35784
  }
35784
35785
  sheettxt = luckysheetfile[index].name;
35785
- sheetId = luckysheetfile[index].id;
35786
+ sheetId = ((_ctx$active_f = ctx.active_f) === null || _ctx$active_f === void 0 ? void 0 : _ctx$active_f.sheetId) || luckysheetfile[index].id;
35786
35787
  sheetdata = flowdata;
35787
35788
  rangetxt = txt;
35788
35789
  }
@@ -37598,7 +37599,7 @@ function functionStrChange(txt, type, rc, orient, stindex, step, sheetName, isCu
37598
37599
  return function_str;
37599
37600
  }
37600
37601
  function rangeSetValue(ctx, cellInput, selected, fxInput) {
37601
- var _document$activeEleme, _ctx$active_f;
37602
+ var _document$activeEleme, _ctx$active_f2;
37602
37603
  var $editor = cellInput;
37603
37604
  var $copyTo = fxInput;
37604
37605
  if (((_document$activeEleme = document.activeElement) === null || _document$activeEleme === void 0 ? void 0 : _document$activeEleme.id) === "luckysheet-functionbox-cell") {
@@ -37612,7 +37613,7 @@ function rangeSetValue(ctx, cellInput, selected, fxInput) {
37612
37613
  var range = "";
37613
37614
  var rf = selected.row[0];
37614
37615
  var cf = selected.column[0];
37615
- var sheetId = ((_ctx$active_f = ctx.active_f) === null || _ctx$active_f === void 0 ? void 0 : _ctx$active_f.sheetId) || ctx.formulaCache.rangetosheet;
37616
+ var sheetId = ((_ctx$active_f2 = ctx.active_f) === null || _ctx$active_f2 === void 0 ? void 0 : _ctx$active_f2.sheetId) || ctx.formulaCache.rangetosheet;
37616
37617
  if (ctx.config.merge != null && "".concat(rf, "_").concat(cf) in ctx.config.merge) {
37617
37618
  range = getRangetxt(ctx, ctx.currentSheetId, {
37618
37619
  column: [cf, cf],
@@ -47642,6 +47643,9 @@ function setNextSheet(draftCtx, nextSheetId, refs) {
47642
47643
  draftCtx.zoomRatio = sheet.zoomRatio || 1;
47643
47644
  cancelActiveImgItem(draftCtx, refs.globalCache);
47644
47645
  cancelNormalSelected(draftCtx);
47646
+ if (draftCtx.active_f) {
47647
+ createRangeHightlight(draftCtx, refs.cellInput.current.innerHTML);
47648
+ }
47645
47649
  if (isBack) {
47646
47650
  draftCtx.luckysheetCellUpdate = luckysheetCellUpdate;
47647
47651
  draftCtx.active_f = undefined;
@@ -57222,6 +57226,7 @@ function setCellValuesByRange(ctx, data, range, cellInput) {
57222
57226
  }
57223
57227
  function setCellValues(ctx, data, cellInput) {
57224
57228
  var _data$, _data$2;
57229
+ var skipCalcDev = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
57225
57230
  if (data == null) {
57226
57231
  throw INVALID_PARAMS;
57227
57232
  }
@@ -57244,7 +57249,12 @@ function setCellValues(ctx, data, cellInput) {
57244
57249
  c = _data$j.c,
57245
57250
  v = _data$j.v,
57246
57251
  ops = _data$j.ops;
57247
- setCellValue$1(ctx, r, c, v, cellInput, ops);
57252
+ if (skipCalcDev) {
57253
+ var _sheet = getSheet(ctx, ops || {});
57254
+ setCellValueInBatch(ctx, _sheet, r, c, v, cellInput, []);
57255
+ } else {
57256
+ setCellValue$1(ctx, r, c, v, cellInput, ops);
57257
+ }
57248
57258
  }
57249
57259
  cancelNormalSelected(ctx);
57250
57260
  return;
@@ -57266,7 +57276,7 @@ function setCellValues(ctx, data, cellInput) {
57266
57276
  }
57267
57277
  setCellValueInBatch(ctx, sheet, _r, _c, _v, cellInput, formulaCells);
57268
57278
  }
57269
- if (formulaCells.length === 0 && changedData.length === 0) {
57279
+ if (skipCalcDev || formulaCells.length === 0 && changedData.length === 0) {
57270
57280
  cancelNormalSelected(ctx);
57271
57281
  return;
57272
57282
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leankylin-sheet/core",
3
- "version": "6.0.4",
3
+ "version": "7.0.1",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "typings": "dist/index.d.ts",
@@ -13,7 +13,7 @@
13
13
  "build": "father-build"
14
14
  },
15
15
  "dependencies": {
16
- "@leankylin-sheet/formula-parser": "6.0.4",
16
+ "@leankylin-sheet/formula-parser": "7.0.1",
17
17
  "dayjs": "^1.11.0",
18
18
  "immer": "^9.0.12",
19
19
  "lodash": "^4.17.21",