@fileverse-dev/dsheet 1.2.92-ydoc-6 → 1.2.93-ens-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.
@@ -3,7 +3,6 @@ import { ERROR_MESSAGES_FLAG as ErrorMessagesFlagType, SERVICES_API_KEY as Servi
3
3
  export declare const ERROR_MESSAGES_FLAG: ErrorMessagesFlagType;
4
4
  export declare const SERVICES_API_KEY: ServicesApiKeyType;
5
5
  export declare const DEFAULT_SHEET_DATA: {
6
- id: string;
7
6
  name: string;
8
7
  celldata: never[];
9
8
  config: {};
@@ -5,7 +5,6 @@ import { DataBlockApiKeyHandlerType, SheetUpdateData } from '../types';
5
5
 
6
6
  import * as Y from 'yjs';
7
7
  export interface EditorContextType {
8
- handleOnChangePortalUpdate: (data: Sheet[]) => void;
9
8
  setSelectedTemplate?: React.Dispatch<React.SetStateAction<string>>;
10
9
  setShowSmartContractModal?: React.Dispatch<React.SetStateAction<boolean>>;
11
10
  getDocumentTitle?: () => string;
@@ -2,4 +2,4 @@ import { default as React } from 'react';
2
2
  import { WorkbookInstance } from '@fileverse-dev/fortune-react';
3
3
 
4
4
  import * as Y from 'yjs';
5
- export declare const handleCSVUpload: (event: React.ChangeEventHandler<HTMLInputElement> | undefined, ydoc: Y.Doc | null, setForceSheetRender: React.Dispatch<React.SetStateAction<number>>, dsheetId: string, currentDataRef: React.MutableRefObject<object | null>, sheetEditorRef: React.RefObject<WorkbookInstance | null>, updateDocumentTitle?: (title: string) => void, fileArg?: File, importType?: string, handleContentPortal?: any) => void;
5
+ export declare const handleCSVUpload: (event: React.ChangeEventHandler<HTMLInputElement> | undefined, ydoc: Y.Doc | null, setForceSheetRender: React.Dispatch<React.SetStateAction<number>>, dsheetId: string, currentDataRef: React.MutableRefObject<object | null>, sheetEditorRef: React.RefObject<WorkbookInstance | null>, updateDocumentTitle?: (title: string) => void, fileArg?: File, importType?: string) => void;
@@ -2,13 +2,12 @@ import { default as React, ChangeEventHandler } from 'react';
2
2
  import { WorkbookInstance } from '@fileverse-dev/fortune-react';
3
3
 
4
4
  import * as Y from 'yjs';
5
- export declare const getCustomToolbarItems: ({ handleContentPortal, setShowSmartContractModal, setExportDropdownOpen, handleCSVUpload, handleXLSXUpload, handleExportToXLSX, handleExportToCSV, handleExportToJSON, sheetEditorRef, ydocRef, dsheetId, currentDataRef, setForceSheetRender, toggleTemplateSidebar, getDocumentTitle, updateDocumentTitle, }: {
6
- handleContentPortal?: any;
5
+ export declare const getCustomToolbarItems: ({ setShowSmartContractModal, setExportDropdownOpen, handleCSVUpload, handleXLSXUpload, handleExportToXLSX, handleExportToCSV, handleExportToJSON, sheetEditorRef, ydocRef, dsheetId, currentDataRef, setForceSheetRender, toggleTemplateSidebar, getDocumentTitle, updateDocumentTitle, }: {
7
6
  setShowSmartContractModal?: React.Dispatch<React.SetStateAction<boolean>>;
8
7
  getDocumentTitle?: () => string;
9
8
  updateDocumentTitle?: (title: string) => void;
10
9
  setExportDropdownOpen: React.Dispatch<React.SetStateAction<boolean>>;
11
- handleCSVUpload: (event: ChangeEventHandler<HTMLInputElement> | undefined, ydocRef: Y.Doc | null, setForceSheetRender: React.Dispatch<React.SetStateAction<number>>, dsheetId: string, currentDataRef: React.MutableRefObject<object | null>, sheetEditorRef: React.RefObject<WorkbookInstance | null>, updateDocumentTitle?: (title: string) => void, file?: File, importType?: string, handleContentPortal?: any) => void;
10
+ handleCSVUpload: (event: ChangeEventHandler<HTMLInputElement> | undefined, ydocRef: Y.Doc | null, setForceSheetRender: React.Dispatch<React.SetStateAction<number>>, dsheetId: string, currentDataRef: React.MutableRefObject<object | null>, sheetEditorRef: React.RefObject<WorkbookInstance | null>, updateDocumentTitle?: (title: string) => void, file?: File, importType?: string) => void;
12
11
  handleXLSXUpload: (event: ChangeEventHandler<HTMLInputElement> | undefined, file?: File, importType?: string) => void;
13
12
  handleExportToXLSX: (sheetEditorRef: React.RefObject<WorkbookInstance | null>, ydocRef: React.RefObject<Y.Doc | null>, dsheetId: string, getDocumentTitle?: () => string) => void;
14
13
  handleExportToCSV: (sheetEditorRef: React.RefObject<WorkbookInstance | null>, ydocRef: React.RefObject<Y.Doc | null>, dsheetId: string) => void;
@@ -7,32 +7,3 @@ import { Sheet } from '@fileverse-dev/fortune-react';
7
7
  * @returns {boolean} - true if any cell data or images changed, false if identical
8
8
  */
9
9
  export declare function isSpreadsheetChanged(oldSheets: Sheet[], newSheets: Sheet[]): boolean;
10
- type DiffChange<T> = {
11
- from: T;
12
- to: T;
13
- };
14
- type UpdatedItem<T> = {
15
- key: string;
16
- before: T;
17
- after: T;
18
- changes: Partial<Record<keyof T, DiffChange<any>>>;
19
- };
20
- type DiffResult<T> = {
21
- added: T[];
22
- removed: T[];
23
- updated: UpdatedItem<T>[];
24
- };
25
- export declare function diffObjectArrays<T extends Record<string, any>>(oldArr: readonly T[], newArr: readonly T[], getKey?: (item: T) => string): DiffResult<T>;
26
- type UpdatedEntry<T> = {
27
- key: string;
28
- before: T;
29
- after: T;
30
- changes: Partial<Record<keyof T, DiffChange<any>>>;
31
- };
32
- type ObjectDiffResult<T> = {
33
- added: Record<string, T>;
34
- removed: Record<string, T>;
35
- updated: UpdatedEntry<T>[];
36
- };
37
- export declare function diffObjectMap<T extends Record<string, any>>(oldObj: Record<string, T>, newObj: Record<string, T>): ObjectDiffResult<T>;
38
- export {};
@@ -4,5 +4,5 @@ export declare const updateSheetData: (ydoc: Y.Doc | null, dsheetId: string, dat
4
4
  [key: string]: {
5
5
  [key: string]: any;
6
6
  };
7
- }, isReadOnly?: boolean, handleContentPortal?: any) => void;
7
+ }, isReadOnly?: boolean) => void;
8
8
  export declare const formatSheetData: (data: Sheet[], preSheetArray: Sheet[], sheetEditor: WorkbookInstance) => Sheet[];