@fileverse-dev/dsheet 1.1.7-patch-2 → 1.1.7-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.
package/dist/index.es.js
CHANGED
|
@@ -168765,7 +168765,7 @@ function Nkt(e, t, r, a, n, i, o, l, f) {
|
|
|
168765
168765
|
t(function(d) {
|
|
168766
168766
|
var h, p = d.luckysheetfile[c].liveQueryList;
|
|
168767
168767
|
d.luckysheetfile[c] = W2(W2({}, d.luckysheetfile[c]), {
|
|
168768
|
-
liveQueryList: W2(W2({}, p), (h = {}, h["".concat(u.row, "_").concat(u.column)] = u, h))
|
|
168768
|
+
liveQueryList: W2(W2({}, p), (h = {}, h["".concat(u.data.row, "_").concat(u.data.column)] = u, h))
|
|
168769
168769
|
});
|
|
168770
168770
|
});
|
|
168771
168771
|
},
|
|
@@ -174288,34 +174288,38 @@ const B_t = (e) => {
|
|
|
174288
174288
|
if (G_t(g)) {
|
|
174289
174289
|
if (!t.handleSmartContractQuery)
|
|
174290
174290
|
throw new Error("Smart contract handler is missing");
|
|
174291
|
-
const
|
|
174291
|
+
const M = {
|
|
174292
174292
|
sheetEditorRef: t.sheetEditorRef,
|
|
174293
174293
|
row: t.row,
|
|
174294
174294
|
column: t.column,
|
|
174295
174295
|
newValue: t.newValue,
|
|
174296
174296
|
formulaResponseUiSync: e5
|
|
174297
|
-
}, { callSignature:
|
|
174298
|
-
await t.handleSmartContractQuery(
|
|
174297
|
+
}, { callSignature: S } = g;
|
|
174298
|
+
await t.handleSmartContractQuery(M)(S);
|
|
174299
174299
|
return;
|
|
174300
174300
|
}
|
|
174301
|
-
const b =
|
|
174302
|
-
|
|
174303
|
-
|
|
174304
|
-
|
|
174305
|
-
|
|
174306
|
-
|
|
174307
|
-
|
|
174308
|
-
|
|
174309
|
-
|
|
174310
|
-
|
|
174311
|
-
|
|
174312
|
-
|
|
174313
|
-
|
|
174314
|
-
|
|
174301
|
+
const b = (o = t.sheetEditorRef.current) == null ? void 0 : o.getWorkbookContext();
|
|
174302
|
+
if (b && b.currentSheetId.toString() && t.handleLiveQueryData) {
|
|
174303
|
+
const M = Rt(b, b.currentSheetId);
|
|
174304
|
+
if (M != null && M.toString()) {
|
|
174305
|
+
const S = {
|
|
174306
|
+
data: {
|
|
174307
|
+
row: t.row,
|
|
174308
|
+
column: t.column,
|
|
174309
|
+
name: y || "",
|
|
174310
|
+
value: g,
|
|
174311
|
+
id: `${t.row}_${t.column}`,
|
|
174312
|
+
function: t.newValue.f,
|
|
174313
|
+
subSheetId: b.currentSheetId
|
|
174314
|
+
},
|
|
174315
|
+
cellData: t.newValue
|
|
174316
|
+
};
|
|
174317
|
+
t.handleLiveQueryData(M, S);
|
|
174318
|
+
}
|
|
174315
174319
|
}
|
|
174316
174320
|
if (Array.isArray(g)) {
|
|
174317
|
-
const
|
|
174318
|
-
!g.length || Object.keys(
|
|
174321
|
+
const M = g == null ? void 0 : g[0];
|
|
174322
|
+
!g.length || Object.keys(M).length === 0 ? (l = t.sheetEditorRef.current) == null || l.setCellValue(t.row, t.column, {
|
|
174319
174323
|
...t.newValue,
|
|
174320
174324
|
m: "No Data",
|
|
174321
174325
|
isDataBlockFormula: !0
|
|
@@ -174326,8 +174330,8 @@ const B_t = (e) => {
|
|
|
174326
174330
|
isDataBlockFormula: !0
|
|
174327
174331
|
}) : U_t(g, t);
|
|
174328
174332
|
(s = t.onDataBlockApiResponse) == null || s.call(t, y);
|
|
174329
|
-
const
|
|
174330
|
-
(d = t.storeApiKey) == null || d.call(t,
|
|
174333
|
+
const w = (c = t.sheetEditorRef.current) == null ? void 0 : c.getWorkbookContext(), x = (u = w == null ? void 0 : w.formulaCache.functionlistMap[y || ""]) == null ? void 0 : u.API_KEY;
|
|
174334
|
+
(d = t.storeApiKey) == null || d.call(t, x);
|
|
174331
174335
|
} catch (g) {
|
|
174332
174336
|
if (g === "dataBlockApiKeyHandler missing" || (g == null ? void 0 : g.message) === "dataBlockApiKeyHandler missing")
|
|
174333
174337
|
throw new Error("dataBlockApiKeyHandler missing");
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { LiveQueryData
|
|
2
|
+
import { LiveQueryData } from '@fileverse-dev/fortune-react';
|
|
3
|
+
import { SmartContractQueryHandler } from '../utils/after-update-cell';
|
|
3
4
|
import { OnboardingHandlerType, DataBlockApiKeyHandlerType } from '../types';
|
|
4
5
|
|
|
5
6
|
type OnboardingHandler = OnboardingHandlerType;
|
package/dist/package/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Sheet, WorkbookInstance, Cell } from '@fileverse-dev/fortune-react';
|
|
1
|
+
import { LiveQueryData, Sheet, WorkbookInstance, Cell } from '@fileverse-dev/fortune-react';
|
|
2
2
|
import { RefObject } from 'react';
|
|
3
3
|
import { ERROR_MESSAGES_FLAG } from './constants/shared-constants';
|
|
4
|
-
import {
|
|
4
|
+
import { SmartContractQueryHandler } from './utils/after-update-cell';
|
|
5
5
|
|
|
6
6
|
import * as Y from 'yjs';
|
|
7
7
|
export interface SheetUpdateData {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Cell, WorkbookInstance } from '@fileverse-dev/fortune-react';
|
|
2
2
|
import { OnboardingHandlerType, DataBlockApiKeyHandlerType } from '../types';
|
|
3
|
+
import { LiveQueryData } from '@fileverse-dev/fortune-core';
|
|
3
4
|
|
|
4
5
|
export type SmartContractResponse = {
|
|
5
6
|
callSignature: unknown[];
|
|
@@ -12,17 +13,6 @@ export type SheetSmartContractApi = {
|
|
|
12
13
|
newValue: Cell;
|
|
13
14
|
};
|
|
14
15
|
export type SmartContractQueryHandler = (sheetApi: SheetSmartContractApi) => (callSignature: unknown[]) => Promise<void>;
|
|
15
|
-
export type LiveQueryData = {
|
|
16
|
-
data: {
|
|
17
|
-
row: number;
|
|
18
|
-
column: number;
|
|
19
|
-
function: string;
|
|
20
|
-
value: string;
|
|
21
|
-
id: string;
|
|
22
|
-
name: string;
|
|
23
|
-
};
|
|
24
|
-
cellData: Cell;
|
|
25
|
-
};
|
|
26
16
|
/**
|
|
27
17
|
* Parameters for the afterUpdateCell function
|
|
28
18
|
*/
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@fileverse-dev/dsheet",
|
|
3
3
|
"private": false,
|
|
4
4
|
"description": "DSheet",
|
|
5
|
-
"version": "1.1.7-patch-
|
|
5
|
+
"version": "1.1.7-patch-3",
|
|
6
6
|
"main": "dist/index.es.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
8
8
|
"exports": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@fileverse-dev/dsheets-templates": "^0.0.18",
|
|
37
37
|
"@fileverse-dev/formulajs": "^4.4.12-mod-3",
|
|
38
|
-
"@fileverse-dev/fortune-react": "^1.1.5-patch.
|
|
38
|
+
"@fileverse-dev/fortune-react": "^1.1.5-patch.3",
|
|
39
39
|
"@fileverse/ui": "^4.1.7-patch-21",
|
|
40
40
|
"classnames": "^2.5.1",
|
|
41
41
|
"exceljs": "^4.4.0",
|