@leankylin-sheet/react 4.0.59 → 4.0.61

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.
@@ -119,7 +119,8 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
119
119
  }[]) => void;
120
120
  handleUndo: () => void;
121
121
  handleRedo: () => void;
122
- calculateFormula: () => void;
122
+ calculateFormula: (sheetId?: string) => void;
123
+ calculateSheetByCells: (cells: any) => void;
123
124
  dataToCelldata: (data: CellMatrix | undefined) => CellWithRowAndCol[];
124
125
  celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number, colCount?: number) => CellMatrix | null;
125
126
  };
@@ -127,7 +127,8 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
127
127
  }[]) => void;
128
128
  handleUndo: () => void;
129
129
  handleRedo: () => void;
130
- calculateFormula: () => void;
130
+ calculateFormula: (sheetId?: string | undefined) => void;
131
+ calculateSheetByCells: (cells: any) => void;
131
132
  dataToCelldata: (data: CellMatrix | undefined) => CellWithRowAndCol[];
132
133
  celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number | undefined, colCount?: number | undefined) => CellMatrix | null;
133
134
  }>>;
package/dist/index.esm.js CHANGED
@@ -10309,11 +10309,20 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
10309
10309
  },
10310
10310
  handleUndo: handleUndo,
10311
10311
  handleRedo: handleRedo,
10312
- calculateFormula: function calculateFormula() {
10312
+ calculateFormula: function calculateFormula(sheetId) {
10313
10313
  setContext(function (draftCtx) {
10314
- _.forEach(draftCtx.luckysheetfile, function (sheet_obj) {
10315
- api.calculateSheetFromula(draftCtx, sheet_obj.id);
10316
- });
10314
+ if (sheetId) {
10315
+ api.calculateSheetFromula(draftCtx, sheetId);
10316
+ } else {
10317
+ _.forEach(draftCtx.luckysheetfile, function (sheet_obj) {
10318
+ api.calculateSheetFromula(draftCtx, sheet_obj.id);
10319
+ });
10320
+ }
10321
+ });
10322
+ },
10323
+ calculateSheetByCells: function calculateSheetByCells(cells) {
10324
+ setContext(function (draftCtx) {
10325
+ api.calculateSheetByCells(draftCtx, cells);
10317
10326
  });
10318
10327
  },
10319
10328
  dataToCelldata: function dataToCelldata(data) {
package/dist/index.js CHANGED
@@ -10319,11 +10319,20 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
10319
10319
  },
10320
10320
  handleUndo: handleUndo,
10321
10321
  handleRedo: handleRedo,
10322
- calculateFormula: function calculateFormula() {
10322
+ calculateFormula: function calculateFormula(sheetId) {
10323
10323
  setContext(function (draftCtx) {
10324
- ___default['default'].forEach(draftCtx.luckysheetfile, function (sheet_obj) {
10325
- core.api.calculateSheetFromula(draftCtx, sheet_obj.id);
10326
- });
10324
+ if (sheetId) {
10325
+ core.api.calculateSheetFromula(draftCtx, sheetId);
10326
+ } else {
10327
+ ___default['default'].forEach(draftCtx.luckysheetfile, function (sheet_obj) {
10328
+ core.api.calculateSheetFromula(draftCtx, sheet_obj.id);
10329
+ });
10330
+ }
10331
+ });
10332
+ },
10333
+ calculateSheetByCells: function calculateSheetByCells(cells) {
10334
+ setContext(function (draftCtx) {
10335
+ core.api.calculateSheetByCells(draftCtx, cells);
10327
10336
  });
10328
10337
  },
10329
10338
  dataToCelldata: function dataToCelldata(data) {
package/dist/index.umd.js CHANGED
@@ -114943,11 +114943,20 @@
114943
114943
  },
114944
114944
  handleUndo: handleUndo,
114945
114945
  handleRedo: handleRedo,
114946
- calculateFormula: function calculateFormula() {
114946
+ calculateFormula: function calculateFormula(sheetId) {
114947
114947
  setContext(function (draftCtx) {
114948
- lodash.forEach(draftCtx.luckysheetfile, function (sheet_obj) {
114949
- index.calculateSheetFromula(draftCtx, sheet_obj.id);
114950
- });
114948
+ if (sheetId) {
114949
+ index.calculateSheetFromula(draftCtx, sheetId);
114950
+ } else {
114951
+ lodash.forEach(draftCtx.luckysheetfile, function (sheet_obj) {
114952
+ index.calculateSheetFromula(draftCtx, sheet_obj.id);
114953
+ });
114954
+ }
114955
+ });
114956
+ },
114957
+ calculateSheetByCells: function calculateSheetByCells(cells) {
114958
+ setContext(function (draftCtx) {
114959
+ index.calculateSheetByCells(draftCtx, cells);
114951
114960
  });
114952
114961
  },
114953
114962
  dataToCelldata: function dataToCelldata(data) {