@fileverse-dev/dsheet 1.2.59-patch-6 → 1.2.59-sm-fix-patch-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.
- package/dist/index.es.js +82379 -78816
- package/dist/package/contexts/editor-context.d.ts +0 -1
- package/dist/package/hooks/use-editor-data.d.ts +1 -1
- package/dist/package/types.d.ts +7 -1
- package/dist/package/utils/after-update-cell.d.ts +1 -0
- package/dist/package/utils/dataBlockCalcFunction.d.ts +3 -1
- package/dist/package/utils/executeStringFunction.d.ts +8 -1
- package/dist/package/utils/xlsx-export.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -4
|
@@ -40,7 +40,6 @@ export interface EditorContextType {
|
|
|
40
40
|
handleLiveQuery: (subsheetIndex: number, data: LiveQueryData) => void;
|
|
41
41
|
}
|
|
42
42
|
interface EditorProviderProps {
|
|
43
|
-
allowComments?: boolean;
|
|
44
43
|
setSelectedTemplate?: React.Dispatch<React.SetStateAction<string>>;
|
|
45
44
|
setShowSmartContractModal?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
46
45
|
getDocumentTitle?: () => string;
|
|
@@ -14,7 +14,7 @@ export declare const useEditorData: (ydocRef: React.MutableRefObject<Y.Doc | nul
|
|
|
14
14
|
[key: string]: {
|
|
15
15
|
[key: string]: any;
|
|
16
16
|
};
|
|
17
|
-
}>>, enableLiveQuery?: boolean, liveQueryRefreshRate?: number, dataBlockApiKeyHandler?: DataBlockApiKeyHandlerType
|
|
17
|
+
}>>, enableLiveQuery?: boolean, liveQueryRefreshRate?: number, dataBlockApiKeyHandler?: DataBlockApiKeyHandlerType) => {
|
|
18
18
|
sheetData: Sheet[];
|
|
19
19
|
setSheetData: import('react').Dispatch<import('react').SetStateAction<Sheet[]>>;
|
|
20
20
|
currentDataRef: import('react').MutableRefObject<Sheet[]>;
|
package/dist/package/types.d.ts
CHANGED
|
@@ -23,7 +23,13 @@ export type OnboardingHandlerType = (params: {
|
|
|
23
23
|
export type DataBlockApiKeyHandlerType = (params: {
|
|
24
24
|
data: ErrorMessageHandlerReturnType;
|
|
25
25
|
sheetEditorRef: React.RefObject<WorkbookInstance | null>;
|
|
26
|
-
executeStringFunction: (functionCallString
|
|
26
|
+
executeStringFunction: ({ functionCallString, sheetEditorRef, dataBlockRow, dataBlockColumn, handleSmartContractQuery, }: {
|
|
27
|
+
functionCallString: string;
|
|
28
|
+
sheetEditorRef: React.RefObject<WorkbookInstance | null>;
|
|
29
|
+
dataBlockRow: number;
|
|
30
|
+
dataBlockColumn: number;
|
|
31
|
+
handleSmartContractQuery: SmartContractQueryHandler;
|
|
32
|
+
}) => Promise<unknown>;
|
|
27
33
|
row: number;
|
|
28
34
|
column: number;
|
|
29
35
|
newValue: Cell;
|
|
@@ -43,6 +43,7 @@ interface AfterUpdateCellParams {
|
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
export declare const isDatablockError: (value: any) => boolean;
|
|
46
|
+
export declare const isSmartContractResponse: (value: any) => boolean;
|
|
46
47
|
/**
|
|
47
48
|
* Handles logic after a cell is updated, including processing formula results
|
|
48
49
|
*
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { WorkbookInstance } from '@fileverse-dev/fortune-react';
|
|
2
|
+
import { SmartContractQueryHandler } from './after-update-cell';
|
|
2
3
|
|
|
3
|
-
export declare const dataBlockCalcFunctionHandler: ({ dataBlockCalcFunction, sheetEditorRef, currentRow, currentColumn, }: {
|
|
4
|
+
export declare const dataBlockCalcFunctionHandler: ({ dataBlockCalcFunction, sheetEditorRef, currentRow, currentColumn, handleSmartContractQuery, }: {
|
|
4
5
|
dataBlockCalcFunction: {
|
|
5
6
|
[key: string]: {
|
|
6
7
|
[key: string]: any;
|
|
@@ -9,4 +10,5 @@ export declare const dataBlockCalcFunctionHandler: ({ dataBlockCalcFunction, she
|
|
|
9
10
|
sheetEditorRef: React.RefObject<WorkbookInstance | null>;
|
|
10
11
|
currentRow: number;
|
|
11
12
|
currentColumn: number;
|
|
13
|
+
handleSmartContractQuery?: SmartContractQueryHandler;
|
|
12
14
|
}) => void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { WorkbookInstance } from '@fileverse-dev/fortune-react';
|
|
2
|
+
import { SmartContractQueryHandler } from './after-update-cell';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Dynamically executes a function from a string representation
|
|
@@ -6,7 +7,13 @@ import { WorkbookInstance } from '@fileverse-dev/fortune-react';
|
|
|
6
7
|
* @param functionCallString - String representation of the function call
|
|
7
8
|
* @returns {Promise<unknown>} - Result of the function execution
|
|
8
9
|
*/
|
|
9
|
-
export declare const executeStringFunction: (functionCallString
|
|
10
|
+
export declare const executeStringFunction: ({ functionCallString, sheetEditorRef, dataBlockRow, dataBlockColumn, handleSmartContractQuery, }: {
|
|
11
|
+
functionCallString: string;
|
|
12
|
+
sheetEditorRef?: React.RefObject<WorkbookInstance | null>;
|
|
13
|
+
dataBlockRow?: number;
|
|
14
|
+
dataBlockColumn?: number;
|
|
15
|
+
handleSmartContractQuery?: SmartContractQueryHandler;
|
|
16
|
+
}) => Promise<unknown>;
|
|
10
17
|
/**
|
|
11
18
|
* Parses a complex argument string into an array of properly typed arguments
|
|
12
19
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { WorkbookInstance } from '@fileverse-dev/fortune-react';
|
|
2
2
|
import { MutableRefObject } from 'react';
|
|
3
|
-
import * as Y from
|
|
3
|
+
import * as Y from 'yjs';
|
|
4
4
|
export declare const handleExportToXLSX: (workbookRef: MutableRefObject<WorkbookInstance | null>, ydocRef: MutableRefObject<Y.Doc | null>, dsheetId: string, getDocumentTitle?: () => string) => Promise<void>;
|