@fileverse-dev/dsheet 0.0.1 → 0.0.3-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.
@@ -0,0 +1,8 @@
1
+ import { ChangeEventHandler } from 'react';
2
+
3
+ export declare const CustomButton: ({ handleCSVUpload, handleXLSXUpload, handleExportToXLSX, handleExportToCSV }: {
4
+ handleCSVUpload: ChangeEventHandler<HTMLInputElement>;
5
+ handleXLSXUpload: ChangeEventHandler<HTMLInputElement>;
6
+ handleExportToXLSX: Function;
7
+ handleExportToCSV: Function;
8
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,6 @@
1
1
  export declare const DEFAULT_SHEET_DATA: {
2
2
  name: string;
3
3
  celldata: never[];
4
- row: number;
5
- column: number;
6
4
  config: {};
7
5
  order: number;
8
6
  }[];
@@ -0,0 +1,5 @@
1
+ import { MutableRefObject } from 'react';
2
+
3
+ export declare const handleExportToCSV: (workbookRef: MutableRefObject<{
4
+ getAllSheets: () => any[];
5
+ } | null>, ydocRef: MutableRefObject<any>, dsheetId: string) => void;
@@ -0,0 +1 @@
1
+ export declare const handleCSVUpload: (event: React.ChangeEvent<HTMLInputElement>, ydoc: any, setForceSheetRender: any, dsheetId: string, currentDataRef: any) => void;
@@ -0,0 +1,8 @@
1
+ import { ChangeEventHandler } from 'react';
2
+
3
+ export declare const useFortuneToolbarImportBtn: ({ handleCSVUpload, handleXLSXUpload, handleExportToXLSX, handleExportToCSV }: {
4
+ handleCSVUpload: ChangeEventHandler<HTMLInputElement>;
5
+ handleXLSXUpload: ChangeEventHandler<HTMLInputElement>;
6
+ handleExportToXLSX: Function;
7
+ handleExportToCSV: Function;
8
+ }) => void;
@@ -0,0 +1,5 @@
1
+ import { MutableRefObject } from 'react';
2
+
3
+ export declare const handleExportToXLSX: (workbookRef: MutableRefObject<{
4
+ getAllSheets: () => any[];
5
+ } | null>, ydocRef: MutableRefObject<any>, dsheetId: string) => void;
@@ -0,0 +1,9 @@
1
+ export declare const useXLSXImport: ({ sheetEditorRef, ydocRef, setForceSheetRender, dsheetId, currentDataRef }: {
2
+ sheetEditorRef: React.RefObject<any>;
3
+ ydocRef: React.RefObject<any>;
4
+ setForceSheetRender: React.Dispatch<React.SetStateAction<number>>;
5
+ dsheetId: string;
6
+ currentDataRef: React.MutableRefObject<any>;
7
+ }) => {
8
+ handleXLSXUpload: (event: React.ChangeEvent<HTMLInputElement>) => Promise<void>;
9
+ };
@@ -1,7 +1,7 @@
1
1
  import { Sheet } from '@fortune-sheet/core';
2
2
 
3
3
  export interface DsheetProp {
4
- renderNavbar: () => JSX.Element;
4
+ renderNavbar?: () => JSX.Element;
5
5
  initialSheetData?: Sheet[];
6
6
  enableIndexeddbSync?: boolean;
7
7
  dsheetId?: string;
@@ -1,6 +1,6 @@
1
1
  import { Sheet } from '@fortune-sheet/core';
2
2
  import { DsheetProp } from './types';
3
-
3
+ import * as Y from 'yjs';
4
4
  export declare const useDsheetEditor: ({ initialSheetData, enableIndexeddbSync, dsheetId, onChange, username, enableWebrtc, portalContent, }: Partial<DsheetProp>) => {
5
5
  sheetEditorRef: import('react').RefObject<{
6
6
  applyOp: (ops: import('@fortune-sheet/core').Op[]) => void;
@@ -121,6 +121,7 @@ export declare const useDsheetEditor: ({ initialSheetData, enableIndexeddbSync,
121
121
  currentDataRef: import('react').MutableRefObject<Sheet[] | null>;
122
122
  sheetData: Sheet[] | null;
123
123
  loading: boolean;
124
+ ydocRef: import('react').MutableRefObject<Y.Doc | null>;
124
125
  setSheetData: import('react').Dispatch<import('react').SetStateAction<Sheet[] | null>>;
125
126
  handleFileUpload: (event: React.ChangeEvent<HTMLInputElement>) => Promise<void>;
126
127
  };