@fileverse-dev/dsheet 1.0.81 → 1.0.83-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.d.ts +3 -0
- package/dist/index.es.js +24041 -23989
- package/dist/package/components/editor-workbook.d.ts +2 -0
- package/dist/package/constants/shared-constants.d.ts +4 -0
- package/dist/package/contexts/editor-context.d.ts +1 -2
- package/dist/package/dsheet-editor.d.ts +1 -1
- package/dist/package/hooks/use-editor-data.d.ts +1 -2
- package/dist/package/hooks/use-sheet-data.d.ts +1 -1
- package/dist/package/types.d.ts +5 -4
- package/dist/package/utils/after-update-cell.d.ts +15 -2
- package/dist/package/utils/diff-sheet.d.ts +1 -1
- package/dist/package/utils/sheet-operations.d.ts +1 -2
- package/dist/style.css +1 -1
- package/package.json +5 -7
- /package/dist/package/hooks/{useRefreshDenomination.d.ts → use-refresh-denomination.d.ts} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { SmartContractQueryHandler } from '../utils/after-update-cell';
|
|
2
3
|
import { OnboardingHandlerType, DataBlockApiKeyHandlerType } from '../types';
|
|
3
4
|
|
|
4
5
|
type OnboardingHandler = OnboardingHandlerType;
|
|
@@ -22,6 +23,7 @@ interface EditorWorkbookProps {
|
|
|
22
23
|
onDataBlockApiResponse?: (dataBlockName: string) => void;
|
|
23
24
|
onDuneChartEmbed?: () => void;
|
|
24
25
|
onSheetCountChange?: (sheetCount: number) => void;
|
|
26
|
+
handleSmartContractQuery?: SmartContractQueryHandler;
|
|
25
27
|
}
|
|
26
28
|
/**
|
|
27
29
|
* EditorWorkbook component handles rendering the Fortune Workbook with proper configuration
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { ERROR_MESSAGES_FLAG as ErrorMessagesFlagType, SERVICES_API_KEY as ServicesApiKeyType } from '@fileverse-dev/fortune-react';
|
|
2
|
+
|
|
3
|
+
export declare const ERROR_MESSAGES_FLAG: ErrorMessagesFlagType;
|
|
4
|
+
export declare const SERVICES_API_KEY: ServicesApiKeyType;
|
|
1
5
|
export declare const DEFAULT_SHEET_DATA: {
|
|
2
6
|
name: string;
|
|
3
7
|
celldata: never[];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { Sheet } from '@fileverse-dev/fortune-
|
|
3
|
-
import { WorkbookInstance } from '@fileverse-dev/fortune-react';
|
|
2
|
+
import { Sheet, WorkbookInstance } from '@fileverse-dev/fortune-react';
|
|
4
3
|
import { IndexeddbPersistence } from 'y-indexeddb';
|
|
5
4
|
import { SheetUpdateData } from '../types';
|
|
6
5
|
|
|
@@ -7,5 +7,5 @@ import { DsheetProps } from './types';
|
|
|
7
7
|
* @param props - Component properties
|
|
8
8
|
* @returns The SpreadsheetEditor component
|
|
9
9
|
*/
|
|
10
|
-
declare const SpreadsheetEditor: ({ isCollaborative, isReadOnly, allowComments, renderNavbar, enableIndexeddbSync, dsheetId, portalContent, onChange, username, selectedTemplate, toggleTemplateSidebar, isTemplateOpen, enableWebrtc, onboardingComplete, onboardingHandler, commentData, getCommentCellUI, dataBlockApiKeyHandler, setFetchingURLData, setShowFetchURLModal, setInputFetchURLDataBlock, sheetEditorRef: externalSheetEditorRef, storeApiKey, onDuneChartEmbed, onSheetCountChange, onDataBlockApiResponse, isAuthorized, getDocumentTitle, updateDocumentTitle, editorStateRef, }: DsheetProps) => JSX.Element;
|
|
10
|
+
declare const SpreadsheetEditor: ({ isCollaborative, isReadOnly, allowComments, renderNavbar, enableIndexeddbSync, dsheetId, portalContent, onChange, username, selectedTemplate, toggleTemplateSidebar, isTemplateOpen, enableWebrtc, onboardingComplete, onboardingHandler, commentData, getCommentCellUI, dataBlockApiKeyHandler, setFetchingURLData, setShowFetchURLModal, setInputFetchURLDataBlock, sheetEditorRef: externalSheetEditorRef, storeApiKey, onDuneChartEmbed, onSheetCountChange, onDataBlockApiResponse, isAuthorized, getDocumentTitle, updateDocumentTitle, editorStateRef, handleSmartContractQuery, }: DsheetProps) => JSX.Element;
|
|
11
11
|
export default SpreadsheetEditor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Sheet } from '@fileverse-dev/fortune-
|
|
1
|
+
import { Sheet } from '@fileverse-dev/fortune-react';
|
|
2
2
|
import { SheetUpdateData } from '../types';
|
|
3
3
|
import * as Y from 'yjs';
|
|
4
4
|
export declare const useSheetData: (ydoc: Y.Doc | null, dsheetId: string, onChange?: (updateData: SheetUpdateData, encodedUpdate?: string) => void) => {
|
package/dist/package/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Sheet, Cell } from '@fileverse-dev/fortune-
|
|
1
|
+
import { Sheet, WorkbookInstance, Cell } from '@fileverse-dev/fortune-react';
|
|
2
2
|
import { RefObject } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { ERROR_MESSAGES_FLAG } from './constants/shared-constants';
|
|
4
|
+
import { SmartContractQueryHandler } from './utils/after-update-cell';
|
|
5
5
|
|
|
6
6
|
import * as Y from 'yjs';
|
|
7
7
|
export interface SheetUpdateData {
|
|
@@ -71,11 +71,12 @@ export interface DsheetProps {
|
|
|
71
71
|
editorStateRef?: React.MutableRefObject<{
|
|
72
72
|
refreshIndexedDB: () => Promise<void>;
|
|
73
73
|
} | null>;
|
|
74
|
+
handleSmartContractQuery?: SmartContractQueryHandler;
|
|
74
75
|
}
|
|
75
76
|
export type BaseError = {
|
|
76
77
|
message: string;
|
|
77
78
|
functionName?: string;
|
|
78
|
-
type:
|
|
79
|
+
type: (typeof ERROR_MESSAGES_FLAG)[keyof typeof ERROR_MESSAGES_FLAG];
|
|
79
80
|
};
|
|
80
81
|
export type CustomError = BaseError & {
|
|
81
82
|
type: typeof ERROR_MESSAGES_FLAG.CUSTOM;
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
import { Cell } from '@fileverse-dev/fortune-
|
|
2
|
-
import { WorkbookInstance } from '@fileverse-dev/fortune-react';
|
|
1
|
+
import { Cell, WorkbookInstance } from '@fileverse-dev/fortune-react';
|
|
3
2
|
import { OnboardingHandlerType, DataBlockApiKeyHandlerType } from '../types';
|
|
4
3
|
|
|
4
|
+
export type SmartContractResponse = {
|
|
5
|
+
contractName: string;
|
|
6
|
+
functionName: string;
|
|
7
|
+
args: any[];
|
|
8
|
+
};
|
|
9
|
+
export type SheetSmartContractApi = {
|
|
10
|
+
sheetEditorRef: React.RefObject<WorkbookInstance | null>;
|
|
11
|
+
formulaResponseUiSync: Function;
|
|
12
|
+
row: number;
|
|
13
|
+
column: number;
|
|
14
|
+
newValue: Cell;
|
|
15
|
+
};
|
|
16
|
+
export type SmartContractQueryHandler = (sheetApi: SheetSmartContractApi) => (contractName: string, functionName: string, ...args: any) => Promise<void>;
|
|
5
17
|
/**
|
|
6
18
|
* Parameters for the afterUpdateCell function
|
|
7
19
|
*/
|
|
@@ -15,6 +27,7 @@ interface AfterUpdateCellParams {
|
|
|
15
27
|
setFetchingURLData: (fetching: boolean) => void;
|
|
16
28
|
onboardingHandler: OnboardingHandlerType | undefined;
|
|
17
29
|
dataBlockApiKeyHandler: DataBlockApiKeyHandlerType | undefined;
|
|
30
|
+
handleSmartContractQuery: SmartContractQueryHandler | undefined;
|
|
18
31
|
setInputFetchURLDataBlock: React.Dispatch<React.SetStateAction<string>> | undefined;
|
|
19
32
|
storeApiKey?: (apiKeyName: string) => void;
|
|
20
33
|
onDataBlockApiResponse?: (dataBlockName: string) => void;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Sheet } from '@fileverse-dev/fortune-
|
|
2
|
-
import { WorkbookInstance } from '@fileverse-dev/fortune-react';
|
|
1
|
+
import { Sheet, WorkbookInstance } from '@fileverse-dev/fortune-react';
|
|
3
2
|
import * as Y from 'yjs';
|
|
4
3
|
export declare const updateSheetData: (ydoc: Y.Doc | null, dsheetId: string, data: Sheet[], sheetEditor: WorkbookInstance | null, dataBlockCalcFunction?: {
|
|
5
4
|
[key: string]: {
|