@fileverse-dev/fortune-react 1.1.5-patch.0 → 1.1.5-patch.3

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.
@@ -1,4 +1,4 @@
1
- import { api, Cell, Context, Op, Range, Selection, Presence, Settings, SingleRange, Sheet, CellMatrix, CellWithRowAndCol, GlobalCache } from "@fileverse-dev/fortune-core";
1
+ import { api, Cell, Context, Op, Range, Selection, Presence, Settings, SingleRange, Sheet, CellMatrix, CellWithRowAndCol, GlobalCache, LiveQueryData } from "@fileverse-dev/fortune-core";
2
2
  import { getCryptoPrice } from "../../utils/cryptoApi";
3
3
  import { SetContextOptions } from "../../context";
4
4
  export declare function generateAPIs(context: Context, setContext: (recipe: (ctx: Context) => void, options?: SetContextOptions) => void, handleUndo: () => void, handleRedo: () => void, settings: Required<Settings>, cellInput: HTMLDivElement | null, scrollbarX: HTMLDivElement | null, scrollbarY: HTMLDivElement | null, globalCache: GlobalCache | null): {
@@ -9,6 +9,7 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
9
9
  }) => any;
10
10
  onboardingActiveCell: (functionName: string) => void;
11
11
  initializeComment: (row: number, column: number) => void;
12
+ updateSheetLiveQueryList: (subsheetIndex: number, _data: LiveQueryData) => void;
12
13
  setCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
13
14
  type?: keyof Cell;
14
15
  }) => void;
@@ -109,6 +110,7 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
109
110
  column_focus: number;
110
111
  } | undefined;
111
112
  } | undefined;
113
+ liveQueryList?: Record<string, LiveQueryData> | undefined;
112
114
  };
113
115
  addSheet: () => void;
114
116
  deleteSheet: (options?: api.CommonOptions) => void;
@@ -1,3 +1,13 @@
1
+ var __assign = this && this.__assign || function () {
2
+ __assign = Object.assign || function (t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
6
+ }
7
+ return t;
8
+ };
9
+ return __assign.apply(this, arguments);
10
+ };
1
11
  import { addSheet, api, deleteRowCol, deleteSheet, insertRowCol, opToPatch, createFilterOptions, getSheetIndex, locale, setCaretPosition, newComment } from "@fileverse-dev/fortune-core";
2
12
  import { applyPatches } from "immer";
3
13
  import _ from "lodash";
@@ -103,6 +113,15 @@ export function generateAPIs(context, setContext, handleUndo, handleRedo, settin
103
113
  newComment(ctx, undefined, row, column);
104
114
  });
105
115
  },
116
+ updateSheetLiveQueryList: function updateSheetLiveQueryList(subsheetIndex, _data) {
117
+ setContext(function (ctx) {
118
+ var _a;
119
+ var previousLiveQuery = ctx.luckysheetfile[subsheetIndex].liveQueryList;
120
+ ctx.luckysheetfile[subsheetIndex] = __assign(__assign({}, ctx.luckysheetfile[subsheetIndex]), {
121
+ liveQueryList: __assign(__assign({}, previousLiveQuery), (_a = {}, _a["".concat(_data.data.row, "_").concat(_data.data.column)] = _data, _a))
122
+ });
123
+ });
124
+ },
106
125
  setCellValue: function setCellValue(row, column, value, options) {
107
126
  if (options === void 0) {
108
127
  options = {};
@@ -16,6 +16,7 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
16
16
  }) => any;
17
17
  onboardingActiveCell: (functionName: string) => void;
18
18
  initializeComment: (row: number, column: number) => void;
19
+ updateSheetLiveQueryList: (subsheetIndex: number, _data: import("@fileverse-dev/fortune-core").LiveQueryData) => void;
19
20
  setCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
20
21
  type?: "rt" | "m" | "v" | "mc" | "f" | "ct" | "qp" | "spl" | "bg" | "lo" | "baseValue" | "baseCurrency" | "baseCurrencyPrice" | "isDataBlockFormula" | "ps" | "hl" | keyof import("@fileverse-dev/fortune-core").CellStyle | undefined;
21
22
  }) => void;
@@ -116,6 +117,7 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
116
117
  column_focus: number;
117
118
  } | undefined;
118
119
  } | undefined;
120
+ liveQueryList?: Record<string, import("@fileverse-dev/fortune-core").LiveQueryData> | undefined;
119
121
  };
120
122
  addSheet: () => void;
121
123
  deleteSheet: (options?: api.CommonOptions) => void;
@@ -2,4 +2,4 @@ import Workbook from "./Workbook";
2
2
  export { ERROR_MESSAGES_FLAG, SERVICES_API_KEY, } from "@fileverse-dev/formulajs/crypto-constants";
3
3
  export { Workbook };
4
4
  export type { WorkbookInstance } from "./Workbook";
5
- export type { Cell, Sheet } from "@fileverse-dev/fortune-core";
5
+ export type { Cell, Sheet, LiveQueryData } from "@fileverse-dev/fortune-core";
@@ -1,4 +1,4 @@
1
- import { api, Cell, Context, Op, Range, Selection, Presence, Settings, SingleRange, Sheet, CellMatrix, CellWithRowAndCol, GlobalCache } from "@fileverse-dev/fortune-core";
1
+ import { api, Cell, Context, Op, Range, Selection, Presence, Settings, SingleRange, Sheet, CellMatrix, CellWithRowAndCol, GlobalCache, LiveQueryData } from "@fileverse-dev/fortune-core";
2
2
  import { getCryptoPrice } from "../../utils/cryptoApi";
3
3
  import { SetContextOptions } from "../../context";
4
4
  export declare function generateAPIs(context: Context, setContext: (recipe: (ctx: Context) => void, options?: SetContextOptions) => void, handleUndo: () => void, handleRedo: () => void, settings: Required<Settings>, cellInput: HTMLDivElement | null, scrollbarX: HTMLDivElement | null, scrollbarY: HTMLDivElement | null, globalCache: GlobalCache | null): {
@@ -9,6 +9,7 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
9
9
  }) => any;
10
10
  onboardingActiveCell: (functionName: string) => void;
11
11
  initializeComment: (row: number, column: number) => void;
12
+ updateSheetLiveQueryList: (subsheetIndex: number, _data: LiveQueryData) => void;
12
13
  setCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
13
14
  type?: keyof Cell;
14
15
  }) => void;
@@ -109,6 +110,7 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
109
110
  column_focus: number;
110
111
  } | undefined;
111
112
  } | undefined;
113
+ liveQueryList?: Record<string, LiveQueryData> | undefined;
112
114
  };
113
115
  addSheet: () => void;
114
116
  deleteSheet: (options?: api.CommonOptions) => void;
@@ -9,6 +9,16 @@ var _immer = require("immer");
9
9
  var _lodash = _interopRequireDefault(require("lodash"));
10
10
  var _cryptoApi = require("../../utils/cryptoApi");
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ var __assign = void 0 && (void 0).__assign || function () {
13
+ __assign = Object.assign || function (t) {
14
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
15
+ s = arguments[i];
16
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
17
+ }
18
+ return t;
19
+ };
20
+ return __assign.apply(this, arguments);
21
+ };
12
22
  function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cellInput, scrollbarX, scrollbarY, globalCache) {
13
23
  return {
14
24
  applyOp: function applyOp(ops) {
@@ -110,6 +120,15 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
110
120
  (0, _fortuneCore.newComment)(ctx, undefined, row, column);
111
121
  });
112
122
  },
123
+ updateSheetLiveQueryList: function updateSheetLiveQueryList(subsheetIndex, _data) {
124
+ setContext(function (ctx) {
125
+ var _a;
126
+ var previousLiveQuery = ctx.luckysheetfile[subsheetIndex].liveQueryList;
127
+ ctx.luckysheetfile[subsheetIndex] = __assign(__assign({}, ctx.luckysheetfile[subsheetIndex]), {
128
+ liveQueryList: __assign(__assign({}, previousLiveQuery), (_a = {}, _a["".concat(_data.data.row, "_").concat(_data.data.column)] = _data, _a))
129
+ });
130
+ });
131
+ },
113
132
  setCellValue: function setCellValue(row, column, value, options) {
114
133
  if (options === void 0) {
115
134
  options = {};
@@ -16,6 +16,7 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
16
16
  }) => any;
17
17
  onboardingActiveCell: (functionName: string) => void;
18
18
  initializeComment: (row: number, column: number) => void;
19
+ updateSheetLiveQueryList: (subsheetIndex: number, _data: import("@fileverse-dev/fortune-core").LiveQueryData) => void;
19
20
  setCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
20
21
  type?: "rt" | "m" | "v" | "mc" | "f" | "ct" | "qp" | "spl" | "bg" | "lo" | "baseValue" | "baseCurrency" | "baseCurrencyPrice" | "isDataBlockFormula" | "ps" | "hl" | keyof import("@fileverse-dev/fortune-core").CellStyle | undefined;
21
22
  }) => void;
@@ -116,6 +117,7 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
116
117
  column_focus: number;
117
118
  } | undefined;
118
119
  } | undefined;
120
+ liveQueryList?: Record<string, import("@fileverse-dev/fortune-core").LiveQueryData> | undefined;
119
121
  };
120
122
  addSheet: () => void;
121
123
  deleteSheet: (options?: api.CommonOptions) => void;
@@ -2,4 +2,4 @@ import Workbook from "./Workbook";
2
2
  export { ERROR_MESSAGES_FLAG, SERVICES_API_KEY, } from "@fileverse-dev/formulajs/crypto-constants";
3
3
  export { Workbook };
4
4
  export type { WorkbookInstance } from "./Workbook";
5
- export type { Cell, Sheet } from "@fileverse-dev/fortune-core";
5
+ export type { Cell, Sheet, LiveQueryData } from "@fileverse-dev/fortune-core";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-react",
3
- "version": "1.1.5-patch.0",
3
+ "version": "1.1.5-patch.3",
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.1.5-patch.0",
19
+ "@fileverse-dev/fortune-core": "1.1.5-patch.3",
20
20
  "@fileverse/ui": "^4.1.7-patch-21",
21
21
  "@tippyjs/react": "^4.2.6",
22
22
  "@types/regenerator-runtime": "^0.13.6",