@fileverse-dev/dsheet 2.0.30 → 2.0.31-a
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/editor/components/editor-workbook.d.ts +1 -0
- package/dist/editor/components/export-menu-section.d.ts +11 -0
- package/dist/editor/components/read-only-export-button.d.ts +7 -0
- package/dist/editor/dsheet-editor.d.ts +1 -1
- package/dist/editor/types.d.ts +1 -0
- package/dist/editor/utils/custom-toolbar-item.d.ts +17 -0
- package/dist/{index-BM6JlVDx.js → index-C5KtMCEt.js} +3954 -3827
- package/dist/index.es.js +1 -1
- package/dist/{use-xlsx-import-impl-BvB-9rbj.js → use-xlsx-import-impl-C36HAaE8.js} +1 -1
- package/package.json +2 -2
|
@@ -11,6 +11,7 @@ interface EditorWorkbookProps {
|
|
|
11
11
|
setFetchingURLData?: (fetching: boolean) => void;
|
|
12
12
|
setInputFetchURLDataBlock?: React.Dispatch<React.SetStateAction<string>>;
|
|
13
13
|
isReadOnly?: boolean;
|
|
14
|
+
allowSheetDownload?: boolean;
|
|
14
15
|
allowComments?: boolean;
|
|
15
16
|
toggleTemplateSidebar?: () => void;
|
|
16
17
|
onboardingComplete?: boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type ExportHandlers = {
|
|
2
|
+
handleExportToXLSX: () => void;
|
|
3
|
+
handleExportToCSV: () => void;
|
|
4
|
+
handleExportToJSON: () => void;
|
|
5
|
+
};
|
|
6
|
+
type ExportMenuSectionProps = ExportHandlers & {
|
|
7
|
+
onItemClick?: () => void;
|
|
8
|
+
testIdPrefix?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const ExportMenuSection: ({ handleExportToJSON, handleExportToXLSX, handleExportToCSV, onItemClick, testIdPrefix, }: ExportMenuSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ExportHandlers } from './export-menu-section';
|
|
2
|
+
|
|
3
|
+
type ReadOnlyExportButtonProps = ExportHandlers & {
|
|
4
|
+
setExportDropdownOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
5
|
+
};
|
|
6
|
+
export declare const ReadOnlyExportButton: ({ setExportDropdownOpen, handleExportToXLSX, handleExportToCSV, handleExportToJSON, }: ReadOnlyExportButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -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, onboardingCompleteLocalStorageKey, onboardingHandler, commentData, getCommentCellUI, dataBlockApiKeyHandler, setFetchingURLData, setShowFetchURLModal, setInputFetchURLDataBlock, sheetEditorRef: externalSheetEditorRef, storeApiKey, onDuneChartEmbed, onSheetCountChange, onDataBlockApiResponse, isAuthorized, getDocumentTitle, updateDocumentTitle, setShowSmartContractModal, editorStateRef, handleSmartContractQuery, setSelectedTemplate, isNewSheet, liveQueryRefreshRate, enableLiveQuery, }: DsheetProps) => JSX.Element;
|
|
10
|
+
declare const SpreadsheetEditor: ({ isCollaborative, isReadOnly, allowSheetDownload, allowComments, renderNavbar, enableIndexeddbSync, dsheetId, portalContent, onChange, username, selectedTemplate, toggleTemplateSidebar, isTemplateOpen, enableWebrtc, onboardingComplete, onboardingCompleteLocalStorageKey, onboardingHandler, commentData, getCommentCellUI, dataBlockApiKeyHandler, setFetchingURLData, setShowFetchURLModal, setInputFetchURLDataBlock, sheetEditorRef: externalSheetEditorRef, storeApiKey, onDuneChartEmbed, onSheetCountChange, onDataBlockApiResponse, isAuthorized, getDocumentTitle, updateDocumentTitle, setShowSmartContractModal, editorStateRef, handleSmartContractQuery, setSelectedTemplate, isNewSheet, liveQueryRefreshRate, enableLiveQuery, }: DsheetProps) => JSX.Element;
|
|
11
11
|
export default SpreadsheetEditor;
|
package/dist/editor/types.d.ts
CHANGED
|
@@ -31,3 +31,20 @@ export declare const getCustomToolbarItems: ({ handleContentPortal, setShowSmart
|
|
|
31
31
|
icon: import("react/jsx-runtime").JSX.Element;
|
|
32
32
|
onClick: (() => void) | undefined;
|
|
33
33
|
})[];
|
|
34
|
+
type ReadOnlyExportDeps = {
|
|
35
|
+
setExportDropdownOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
36
|
+
handleExportToXLSX: (sheetEditorRef: React.RefObject<WorkbookInstance | null>, ydocRef: React.RefObject<Y.Doc | null>, dsheetId: string, getDocumentTitle?: (dsheetId: string) => Promise<string>) => void;
|
|
37
|
+
handleExportToCSV: (sheetEditorRef: React.RefObject<WorkbookInstance | null>, ydocRef: React.RefObject<Y.Doc | null>, dsheetId: string, getDocumentTitle?: (dsheetId: string) => Promise<string>) => void;
|
|
38
|
+
handleExportToJSON: (sheetEditorRef: React.RefObject<WorkbookInstance | null>, ydocRef: React.RefObject<Y.Doc | null>, dsheetId: string) => void;
|
|
39
|
+
sheetEditorRef: React.RefObject<WorkbookInstance | null>;
|
|
40
|
+
ydocRef: React.RefObject<Y.Doc | null>;
|
|
41
|
+
dsheetId: string;
|
|
42
|
+
getDocumentTitle?: (dsheetId: string) => Promise<string>;
|
|
43
|
+
};
|
|
44
|
+
export declare const getReadOnlyCustomToolbarItems: ({ setExportDropdownOpen, handleExportToXLSX, handleExportToCSV, handleExportToJSON, sheetEditorRef, ydocRef, dsheetId, getDocumentTitle, }: ReadOnlyExportDeps) => {
|
|
45
|
+
key: string;
|
|
46
|
+
tooltip: string;
|
|
47
|
+
onClick: () => void;
|
|
48
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
}[];
|
|
50
|
+
export {};
|