@fileverse-dev/fortune-react 1.0.75 → 1.0.77

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.
@@ -130,6 +130,7 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
130
130
  handleUndo: () => void;
131
131
  handleRedo: () => void;
132
132
  calculateFormula: () => void;
133
+ calculateSubSheetFormula: (id: string) => void;
133
134
  dataToCelldata: (data: CellMatrix | undefined) => CellWithRowAndCol[];
134
135
  celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number, colCount?: number) => CellMatrix | null;
135
136
  insertFunction: (selectedFuncIndex: number, filteredFunctionList: any[], callback?: () => void) => void;
@@ -343,6 +343,11 @@ export function generateAPIs(context, setContext, handleUndo, handleRedo, settin
343
343
  });
344
344
  });
345
345
  },
346
+ calculateSubSheetFormula: function calculateSubSheetFormula(id) {
347
+ setContext(function (draftCtx) {
348
+ api.calculateSheetFromula(draftCtx, id);
349
+ });
350
+ },
346
351
  dataToCelldata: function dataToCelldata(data) {
347
352
  return api.dataToCelldata(data);
348
353
  },
@@ -137,6 +137,7 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
137
137
  handleUndo: () => void;
138
138
  handleRedo: () => void;
139
139
  calculateFormula: () => void;
140
+ calculateSubSheetFormula: (id: string) => void;
140
141
  dataToCelldata: (data: CellMatrix | undefined) => CellWithRowAndCol[];
141
142
  celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number | undefined, colCount?: number | undefined) => CellMatrix | null;
142
143
  insertFunction: (selectedFuncIndex: number, filteredFunctionList: any[], callback?: (() => void) | undefined) => void;
@@ -113,9 +113,8 @@ var __generator = this && this.__generator || function (thisArg, body) {
113
113
  };
114
114
  }
115
115
  };
116
- import { getFlowdata } from "@fileverse-dev/fortune-core";
116
+ import { getFlowdata, api } from "@fileverse-dev/fortune-core";
117
117
  import { getCachedPrice } from "./cryptoApi";
118
- import { api } from "@fileverse-dev/fortune-core";
119
118
  export var getFiatSymbol = function getFiatSymbol(code) {
120
119
  switch (code) {
121
120
  case "USD":
@@ -130,6 +130,7 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
130
130
  handleUndo: () => void;
131
131
  handleRedo: () => void;
132
132
  calculateFormula: () => void;
133
+ calculateSubSheetFormula: (id: string) => void;
133
134
  dataToCelldata: (data: CellMatrix | undefined) => CellWithRowAndCol[];
134
135
  celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number, colCount?: number) => CellMatrix | null;
135
136
  insertFunction: (selectedFuncIndex: number, filteredFunctionList: any[], callback?: () => void) => void;
@@ -350,6 +350,11 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
350
350
  });
351
351
  });
352
352
  },
353
+ calculateSubSheetFormula: function calculateSubSheetFormula(id) {
354
+ setContext(function (draftCtx) {
355
+ _fortuneCore.api.calculateSheetFromula(draftCtx, id);
356
+ });
357
+ },
353
358
  dataToCelldata: function dataToCelldata(data) {
354
359
  return _fortuneCore.api.dataToCelldata(data);
355
360
  },
@@ -137,6 +137,7 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
137
137
  handleUndo: () => void;
138
138
  handleRedo: () => void;
139
139
  calculateFormula: () => void;
140
+ calculateSubSheetFormula: (id: string) => void;
140
141
  dataToCelldata: (data: CellMatrix | undefined) => CellWithRowAndCol[];
141
142
  celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number | undefined, colCount?: number | undefined) => CellMatrix | null;
142
143
  insertFunction: (selectedFuncIndex: number, filteredFunctionList: any[], callback?: (() => void) | undefined) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-react",
3
- "version": "1.0.75",
3
+ "version": "1.0.77",
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.0.75",
19
+ "@fileverse-dev/fortune-core": "1.0.77",
20
20
  "@fileverse/ui": "^4.1.7-patch-20",
21
21
  "@tippyjs/react": "^4.2.6",
22
22
  "@types/regenerator-runtime": "^0.13.6",