@fileverse-dev/dsheet 1.0.31 → 1.0.32
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 +8604 -8590
- package/dist/package/contexts/editor-context.d.ts +10 -5
- package/dist/package/hooks/use-apply-templates.d.ts +5 -4
- package/dist/package/hooks/use-editor-data.d.ts +9 -7
- package/dist/package/utils/after-update-cell.d.ts +10 -5
- package/dist/package/utils/dataBlockCalcFunction.d.ts +5 -4
- package/dist/package/utils/sheet-operations.d.ts +5 -1
- package/package.json +5 -5
|
@@ -7,11 +7,16 @@ import { SheetUpdateData } from '../types';
|
|
|
7
7
|
import * as Y from 'yjs';
|
|
8
8
|
export interface EditorContextType {
|
|
9
9
|
isAuthorized: boolean;
|
|
10
|
-
dataBlockCalcFunction:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
10
|
+
dataBlockCalcFunction: {
|
|
11
|
+
[key: string]: {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
setDataBlockCalcFunction: React.Dispatch<React.SetStateAction<{
|
|
16
|
+
[key: string]: {
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
};
|
|
19
|
+
}>>;
|
|
15
20
|
sheetEditorRef: React.MutableRefObject<WorkbookInstance | null>;
|
|
16
21
|
ydocRef: React.MutableRefObject<Y.Doc | null>;
|
|
17
22
|
persistenceRef: React.MutableRefObject<IndexeddbPersistence | null>;
|
|
@@ -9,8 +9,9 @@ export declare const useApplyTemplatesBtn: ({ selectedTemplate, ydocRef, dsheetI
|
|
|
9
9
|
currentDataRef: React.MutableRefObject<object | null>;
|
|
10
10
|
setForceSheetRender: Dispatch<SetStateAction<number>>;
|
|
11
11
|
sheetEditorRef: React.RefObject<WorkbookInstance | null>;
|
|
12
|
-
setDataBlockCalcFunction: React.Dispatch<React.SetStateAction<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
setDataBlockCalcFunction: React.Dispatch<React.SetStateAction<{
|
|
13
|
+
[key: string]: {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
};
|
|
16
|
+
}>>;
|
|
16
17
|
}) => void;
|
|
@@ -6,13 +6,15 @@ import * as Y from 'yjs';
|
|
|
6
6
|
* Hook for managing sheet data
|
|
7
7
|
* Handles initialization, updates, and persistence of sheet data
|
|
8
8
|
*/
|
|
9
|
-
export declare const useEditorData: (ydocRef: React.MutableRefObject<Y.Doc | null>, dsheetId: string, sheetEditorRef: React.MutableRefObject<WorkbookInstance | null>, setForceSheetRender?: React.Dispatch<React.SetStateAction<number>>, portalContent?: string, isReadOnly?: boolean, onChange?: (data: Sheet[]) => void, syncStatus?: "initializing" | "syncing" | "synced" | "error", commentData?: object, dataBlockCalcFunction?:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
export declare const useEditorData: (ydocRef: React.MutableRefObject<Y.Doc | null>, dsheetId: string, sheetEditorRef: React.MutableRefObject<WorkbookInstance | null>, setForceSheetRender?: React.Dispatch<React.SetStateAction<number>>, portalContent?: string, isReadOnly?: boolean, onChange?: (data: Sheet[]) => void, syncStatus?: "initializing" | "syncing" | "synced" | "error", commentData?: object, dataBlockCalcFunction?: {
|
|
10
|
+
[key: string]: {
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
};
|
|
13
|
+
}, setDataBlockCalcFunction?: React.Dispatch<React.SetStateAction<{
|
|
14
|
+
[key: string]: {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
};
|
|
17
|
+
}>>) => {
|
|
16
18
|
sheetData: Sheet[];
|
|
17
19
|
setSheetData: import('react').Dispatch<import('react').SetStateAction<Sheet[]>>;
|
|
18
20
|
currentDataRef: import('react').MutableRefObject<Sheet[]>;
|
|
@@ -17,11 +17,16 @@ interface AfterUpdateCellParams {
|
|
|
17
17
|
setInputFetchURLDataBlock: React.Dispatch<React.SetStateAction<string>> | undefined;
|
|
18
18
|
storeApiKey?: (apiKeyName: string) => void;
|
|
19
19
|
onDataBlockApiResponse?: (dataBlockName: string) => void;
|
|
20
|
-
setDataBlockCalcFunction?: React.Dispatch<React.SetStateAction<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
setDataBlockCalcFunction?: React.Dispatch<React.SetStateAction<{
|
|
21
|
+
[key: string]: {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
};
|
|
24
|
+
}>>;
|
|
25
|
+
dataBlockCalcFunction?: {
|
|
26
|
+
[key: string]: {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
25
30
|
}
|
|
26
31
|
/**
|
|
27
32
|
* Handles logic after a cell is updated, including processing formula results
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { WorkbookInstance } from '@fileverse-dev/fortune-react';
|
|
2
2
|
|
|
3
3
|
export declare const dataBlockCalcFunctionHandler: ({ dataBlockCalcFunction, sheetEditorRef, currentRow, currentColumn }: {
|
|
4
|
-
dataBlockCalcFunction:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
dataBlockCalcFunction: {
|
|
5
|
+
[key: string]: {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
8
9
|
sheetEditorRef: React.RefObject<WorkbookInstance | null>;
|
|
9
10
|
currentRow: number;
|
|
10
11
|
currentColumn: number;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { Sheet } from '@fileverse-dev/fortune-core';
|
|
2
2
|
import { WorkbookInstance } from '@fileverse-dev/fortune-react';
|
|
3
3
|
import * as Y from 'yjs';
|
|
4
|
-
export declare const updateSheetData: (ydoc: Y.Doc | null, dsheetId: string, data: Sheet[], sheetEditor: WorkbookInstance | null, dataBlockCalcFunction?:
|
|
4
|
+
export declare const updateSheetData: (ydoc: Y.Doc | null, dsheetId: string, data: Sheet[], sheetEditor: WorkbookInstance | null, dataBlockCalcFunction?: {
|
|
5
|
+
[key: string]: {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
};
|
|
8
|
+
}) => void;
|
|
5
9
|
export declare const formatSheetData: (data: Sheet[], preSheetArray: Sheet[], sheetEditor: WorkbookInstance) => Sheet[];
|
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.0.
|
|
5
|
+
"version": "1.0.32",
|
|
6
6
|
"main": "dist/index.es.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
8
8
|
"exports": {
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
]
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fileverse-dev/dsheets-templates": "^0.0.
|
|
36
|
+
"@fileverse-dev/dsheets-templates": "^0.0.16",
|
|
37
37
|
"@fileverse-dev/formula-parser": "^0.2.16",
|
|
38
38
|
"@fileverse-dev/formulajs": "^4.4.11-mod-64",
|
|
39
|
-
"@fileverse-dev/fortune-core": "^1.0.
|
|
40
|
-
"@fileverse-dev/fortune-react": "^1.0.
|
|
39
|
+
"@fileverse-dev/fortune-core": "^1.0.14",
|
|
40
|
+
"@fileverse-dev/fortune-react": "^1.0.14",
|
|
41
41
|
"@fileverse/ui": "^4.1.7-patch-18",
|
|
42
42
|
"classnames": "^2.5.1",
|
|
43
43
|
"exceljs": "^4.4.0",
|
|
@@ -80,4 +80,4 @@
|
|
|
80
80
|
"typescript": "^5.2.2",
|
|
81
81
|
"vite": "^5.0.0"
|
|
82
82
|
}
|
|
83
|
-
}
|
|
83
|
+
}
|