@fileverse-dev/fortune-react 1.2.85 → 1.2.86-maitra-xl-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.
@@ -139,7 +139,8 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
139
139
  handleUndo: () => void;
140
140
  handleRedo: () => void;
141
141
  calculateFormula: () => void;
142
- calculateSubSheetFormula: (id: string, refCell?: string[]) => void;
142
+ calculateSubSheetFormula: (id: string) => void;
143
+ calculateCellReferencedSubSheetFormula: (id: string, refCell?: string[]) => void;
143
144
  dataToCelldata: (data: CellMatrix | undefined) => CellWithRowAndCol[];
144
145
  celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number, colCount?: number) => CellMatrix | null;
145
146
  insertFunction: (selectedFuncIndex: number, filteredFunctionList: any[], callback?: () => void) => void;
@@ -384,9 +384,15 @@ export function generateAPIs(context, setContext, handleUndo, handleRedo, settin
384
384
  });
385
385
  });
386
386
  },
387
- calculateSubSheetFormula: function calculateSubSheetFormula(id, refCell) {
387
+ calculateSubSheetFormula: function calculateSubSheetFormula(id) {
388
388
  setContext(function (draftCtx) {
389
- api.calculateSheetFromula(draftCtx, id, refCell);
389
+ api.calculateSheetFromula(draftCtx, id);
390
+ });
391
+ },
392
+ calculateCellReferencedSubSheetFormula: function calculateCellReferencedSubSheetFormula(id, refCell) {
393
+ console.log("calculateCellReferencedSubSheetFormula", id, refCell);
394
+ setContext(function (draftCtx) {
395
+ api.calculateReferencedCellSheetFromula(draftCtx, id, refCell);
390
396
  });
391
397
  },
392
398
  dataToCelldata: function dataToCelldata(data) {
@@ -146,7 +146,8 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
146
146
  handleUndo: () => void;
147
147
  handleRedo: () => void;
148
148
  calculateFormula: () => void;
149
- calculateSubSheetFormula: (id: string, refCell?: string[] | undefined) => void;
149
+ calculateSubSheetFormula: (id: string) => void;
150
+ calculateCellReferencedSubSheetFormula: (id: string, refCell?: string[] | undefined) => void;
150
151
  dataToCelldata: (data: CellMatrix | undefined) => CellWithRowAndCol[];
151
152
  celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number | undefined, colCount?: number | undefined) => CellMatrix | null;
152
153
  insertFunction: (selectedFuncIndex: number, filteredFunctionList: any[], callback?: (() => void) | undefined) => void;
@@ -288,7 +288,7 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_a, ref) {
288
288
  return newContext;
289
289
  });
290
290
  }
291
- }, [emitOp]);
291
+ }, [emitOp, globalCache]);
292
292
  var handleRedo = useCallback(function () {
293
293
  var history = globalCache.current.redoList.pop();
294
294
  if (history) {
@@ -139,7 +139,8 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
139
139
  handleUndo: () => void;
140
140
  handleRedo: () => void;
141
141
  calculateFormula: () => void;
142
- calculateSubSheetFormula: (id: string, refCell?: string[]) => void;
142
+ calculateSubSheetFormula: (id: string) => void;
143
+ calculateCellReferencedSubSheetFormula: (id: string, refCell?: string[]) => void;
143
144
  dataToCelldata: (data: CellMatrix | undefined) => CellWithRowAndCol[];
144
145
  celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number, colCount?: number) => CellMatrix | null;
145
146
  insertFunction: (selectedFuncIndex: number, filteredFunctionList: any[], callback?: () => void) => void;
@@ -391,9 +391,15 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
391
391
  });
392
392
  });
393
393
  },
394
- calculateSubSheetFormula: function calculateSubSheetFormula(id, refCell) {
394
+ calculateSubSheetFormula: function calculateSubSheetFormula(id) {
395
395
  setContext(function (draftCtx) {
396
- _fortuneCore.api.calculateSheetFromula(draftCtx, id, refCell);
396
+ _fortuneCore.api.calculateSheetFromula(draftCtx, id);
397
+ });
398
+ },
399
+ calculateCellReferencedSubSheetFormula: function calculateCellReferencedSubSheetFormula(id, refCell) {
400
+ console.log("calculateCellReferencedSubSheetFormula", id, refCell);
401
+ setContext(function (draftCtx) {
402
+ _fortuneCore.api.calculateReferencedCellSheetFromula(draftCtx, id, refCell);
397
403
  });
398
404
  },
399
405
  dataToCelldata: function dataToCelldata(data) {
@@ -146,7 +146,8 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
146
146
  handleUndo: () => void;
147
147
  handleRedo: () => void;
148
148
  calculateFormula: () => void;
149
- calculateSubSheetFormula: (id: string, refCell?: string[] | undefined) => void;
149
+ calculateSubSheetFormula: (id: string) => void;
150
+ calculateCellReferencedSubSheetFormula: (id: string, refCell?: string[] | undefined) => void;
150
151
  dataToCelldata: (data: CellMatrix | undefined) => CellWithRowAndCol[];
151
152
  celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number | undefined, colCount?: number | undefined) => CellMatrix | null;
152
153
  insertFunction: (selectedFuncIndex: number, filteredFunctionList: any[], callback?: (() => void) | undefined) => void;
@@ -297,7 +297,7 @@ var Workbook = /*#__PURE__*/_react.default.forwardRef(function (_a, ref) {
297
297
  return newContext;
298
298
  });
299
299
  }
300
- }, [emitOp]);
300
+ }, [emitOp, globalCache]);
301
301
  var handleRedo = (0, _react.useCallback)(function () {
302
302
  var history = globalCache.current.redoList.pop();
303
303
  if (history) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-react",
3
- "version": "1.2.85",
3
+ "version": "1.2.86-maitra-xl-1",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "module": "es/index.js",
@@ -16,7 +16,7 @@
16
16
  "tsc": "tsc"
17
17
  },
18
18
  "dependencies": {
19
- "@fileverse-dev/fortune-core": "1.2.85",
19
+ "@fileverse-dev/fortune-core": "1.2.86-maitra-xl-1",
20
20
  "@fileverse/ui": "^4.1.7-patch-40",
21
21
  "@tippyjs/react": "^4.2.6",
22
22
  "@types/regenerator-runtime": "^0.13.6",