@fileverse-dev/fortune-react 1.1.4 → 1.1.5-patch.2

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.
@@ -9,6 +9,12 @@ 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: {
13
+ function: string;
14
+ value: string;
15
+ row: number;
16
+ column: number;
17
+ }) => void;
12
18
  setCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
13
19
  type?: keyof Cell;
14
20
  }) => void;
@@ -109,6 +115,12 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
109
115
  column_focus: number;
110
116
  } | undefined;
111
117
  } | undefined;
118
+ liveQueryList?: Record<string, {
119
+ function: string;
120
+ value: string;
121
+ row: number;
122
+ column: number;
123
+ }> | undefined;
112
124
  };
113
125
  addSheet: () => void;
114
126
  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.row, "_").concat(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,12 @@ 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: {
20
+ function: string;
21
+ value: string;
22
+ row: number;
23
+ column: number;
24
+ }) => void;
19
25
  setCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
20
26
  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
27
  }) => void;
@@ -116,6 +122,12 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
116
122
  column_focus: number;
117
123
  } | undefined;
118
124
  } | undefined;
125
+ liveQueryList?: Record<string, {
126
+ function: string;
127
+ value: string;
128
+ row: number;
129
+ column: number;
130
+ }> | undefined;
119
131
  };
120
132
  addSheet: () => void;
121
133
  deleteSheet: (options?: api.CommonOptions) => void;
@@ -9,6 +9,12 @@ 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: {
13
+ function: string;
14
+ value: string;
15
+ row: number;
16
+ column: number;
17
+ }) => void;
12
18
  setCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
13
19
  type?: keyof Cell;
14
20
  }) => void;
@@ -109,6 +115,12 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
109
115
  column_focus: number;
110
116
  } | undefined;
111
117
  } | undefined;
118
+ liveQueryList?: Record<string, {
119
+ function: string;
120
+ value: string;
121
+ row: number;
122
+ column: number;
123
+ }> | undefined;
112
124
  };
113
125
  addSheet: () => void;
114
126
  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.row, "_").concat(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,12 @@ 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: {
20
+ function: string;
21
+ value: string;
22
+ row: number;
23
+ column: number;
24
+ }) => void;
19
25
  setCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
20
26
  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
27
  }) => void;
@@ -116,6 +122,12 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
116
122
  column_focus: number;
117
123
  } | undefined;
118
124
  } | undefined;
125
+ liveQueryList?: Record<string, {
126
+ function: string;
127
+ value: string;
128
+ row: number;
129
+ column: number;
130
+ }> | undefined;
119
131
  };
120
132
  addSheet: () => void;
121
133
  deleteSheet: (options?: api.CommonOptions) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-react",
3
- "version": "1.1.4",
3
+ "version": "1.1.5-patch.2",
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.4",
19
+ "@fileverse-dev/fortune-core": "1.1.5-patch.2",
20
20
  "@fileverse/ui": "^4.1.7-patch-21",
21
21
  "@tippyjs/react": "^4.2.6",
22
22
  "@types/regenerator-runtime": "^0.13.6",