@fileverse-dev/dsheet 2.0.27 → 2.0.29
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/dsheet-editor.d.ts +1 -1
- package/dist/editor/hooks/use-apply-templates.d.ts +2 -1
- package/dist/editor/hooks/use-xlsx-import-impl.d.ts +16 -0
- package/dist/editor/hooks/use-xlsx-import.d.ts +13 -7
- package/dist/editor/types.d.ts +2 -0
- package/dist/editor/utils/xlsx-export-impl.d.ts +4 -0
- package/dist/editor/utils/xlsx-export.d.ts +4 -0
- package/dist/{executeStringFunction-C2k81eQQ.js → executeStringFunction-BuxBjU-d.js} +1517 -1447
- package/dist/formula.js +1 -1
- package/dist/index-DgywrBAx.js +39912 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +43 -44464
- package/dist/sheet-engine/core/animate.d.ts +1 -0
- package/dist/sheet-engine/core/api/cell.d.ts +1 -1
- package/dist/sheet-engine/core/events/mouse.d.ts +1 -1
- package/dist/sheet-engine/core/index.d.ts +1 -1
- package/dist/sheet-engine/core/modules/formula.d.ts +4 -4
- package/dist/sheet-engine/core/modules/index.d.ts +1 -1
- package/dist/sheet-engine/core/modules/inline-string.d.ts +6 -6
- package/dist/sheet-engine/core/modules/rowcol.d.ts +3 -3
- package/dist/sheet-engine/core/modules/selection.d.ts +9 -7
- package/dist/sheet-engine/core/paste/paste-internals.d.ts +2 -2
- package/dist/sheet-engine/core/settings.d.ts +2 -0
- package/dist/sheet-engine/core/types.d.ts +2 -2
- package/dist/sheet-engine/react/hooks/useFormulaEditorHistory.d.ts +1 -1
- package/dist/template-data-list-oP1s0Uxn.js +502875 -0
- package/dist/use-xlsx-import-impl-CNAjs0Mq.js +1527 -0
- package/dist/xlsx-export-impl-B_v1nNSW.js +3128 -0
- package/dist/xlsx-hyperlink-inline-DzewAypN.js +71 -0
- package/dist/xlsx-image-utils-Cvg0qxRA.js +126 -0
- package/package.json +1 -1
|
@@ -14,6 +14,7 @@ interface EditorWorkbookProps {
|
|
|
14
14
|
allowComments?: boolean;
|
|
15
15
|
toggleTemplateSidebar?: () => void;
|
|
16
16
|
onboardingComplete?: boolean;
|
|
17
|
+
onboardingCompleteLocalStorageKey?: string;
|
|
17
18
|
onboardingHandler?: OnboardingHandler;
|
|
18
19
|
dataBlockApiKeyHandler?: DataBlockApiKeyHandler;
|
|
19
20
|
exportDropdownOpen?: boolean;
|
|
@@ -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, setShowSmartContractModal, editorStateRef, handleSmartContractQuery, setSelectedTemplate, isNewSheet, liveQueryRefreshRate, enableLiveQuery, }: DsheetProps) => JSX.Element;
|
|
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;
|
|
11
11
|
export default SpreadsheetEditor;
|
|
@@ -2,8 +2,9 @@ import { Dispatch, SetStateAction } from 'react';
|
|
|
2
2
|
import { Sheet, WorkbookInstance } from '../../sheet-engine/react';
|
|
3
3
|
|
|
4
4
|
import * as Y from 'yjs';
|
|
5
|
-
export declare const useApplyTemplatesBtn: ({ selectedTemplate, ydocRef, dsheetId, currentDataRef, setForceSheetRender, sheetEditorRef, setDataBlockCalcFunction, initialiseLiveQueryData, }: {
|
|
5
|
+
export declare const useApplyTemplatesBtn: ({ selectedTemplate, setSelectedTemplate, ydocRef, dsheetId, currentDataRef, setForceSheetRender, sheetEditorRef, setDataBlockCalcFunction, initialiseLiveQueryData, }: {
|
|
6
6
|
selectedTemplate: string | undefined;
|
|
7
|
+
setSelectedTemplate?: React.Dispatch<React.SetStateAction<string>> | ((slug: string | null) => void);
|
|
7
8
|
ydocRef: React.RefObject<Y.Doc | null>;
|
|
8
9
|
dsheetId: string;
|
|
9
10
|
currentDataRef: React.MutableRefObject<object | null>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { WorkbookInstance } from '../../sheet-engine/react';
|
|
3
|
+
|
|
4
|
+
import * as Y from 'yjs';
|
|
5
|
+
export type XlsxImportRuntimeDeps = {
|
|
6
|
+
sheetEditorRef: React.RefObject<WorkbookInstance | null>;
|
|
7
|
+
ydocRef: React.RefObject<Y.Doc | null>;
|
|
8
|
+
setForceSheetRender: React.Dispatch<React.SetStateAction<number>>;
|
|
9
|
+
dsheetId: string;
|
|
10
|
+
currentDataRef: React.MutableRefObject<object | null>;
|
|
11
|
+
updateDocumentTitle?: (title: string) => void;
|
|
12
|
+
filterToastShown: boolean;
|
|
13
|
+
setFilterToastShown: React.Dispatch<React.SetStateAction<boolean>>;
|
|
14
|
+
};
|
|
15
|
+
/** Full XLSX import pipeline; loaded only when user imports a file. */
|
|
16
|
+
export declare function runXlsxFileUpload({ sheetEditorRef, ydocRef, setForceSheetRender, dsheetId, currentDataRef, updateDocumentTitle, filterToastShown, setFilterToastShown, }: XlsxImportRuntimeDeps, event: React.ChangeEvent<HTMLInputElement> | undefined, fileArg: File, importType?: 'new-dsheet' | 'merge-current-dsheet' | 'new-current-dsheet'): Promise<void>;
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChangeEvent, Dispatch, MutableRefObject, RefObject, SetStateAction } from 'react';
|
|
2
2
|
import { WorkbookInstance } from '../../sheet-engine/react';
|
|
3
3
|
|
|
4
|
-
import * as Y from 'yjs';
|
|
4
|
+
import type * as Y from 'yjs';
|
|
5
|
+
type ImportType = 'new-dsheet' | 'merge-current-dsheet' | 'new-current-dsheet';
|
|
6
|
+
/**
|
|
7
|
+
* XLSX import: keeps ~100k+ LOC (SSF, hyperlink helpers, exceljs/luckyexcel orchestration)
|
|
8
|
+
* in a separate chunk until the user actually imports a file.
|
|
9
|
+
*/
|
|
5
10
|
export declare const useXLSXImport: ({ sheetEditorRef, ydocRef, setForceSheetRender, dsheetId, currentDataRef, updateDocumentTitle, }: {
|
|
6
|
-
sheetEditorRef:
|
|
7
|
-
ydocRef:
|
|
8
|
-
setForceSheetRender:
|
|
11
|
+
sheetEditorRef: RefObject<WorkbookInstance | null>;
|
|
12
|
+
ydocRef: RefObject<Y.Doc | null>;
|
|
13
|
+
setForceSheetRender: Dispatch<SetStateAction<number>>;
|
|
9
14
|
dsheetId: string;
|
|
10
|
-
currentDataRef:
|
|
15
|
+
currentDataRef: MutableRefObject<object | null>;
|
|
11
16
|
updateDocumentTitle?: (title: string) => void;
|
|
12
17
|
}) => {
|
|
13
|
-
handleXLSXUpload: (event:
|
|
18
|
+
handleXLSXUpload: (event: ChangeEvent<HTMLInputElement> | undefined, fileArg: File, importType?: ImportType) => Promise<void>;
|
|
14
19
|
};
|
|
20
|
+
export {};
|
package/dist/editor/types.d.ts
CHANGED
|
@@ -63,6 +63,8 @@ export interface DsheetProps {
|
|
|
63
63
|
isCollaborative?: boolean;
|
|
64
64
|
selectedTemplate?: string;
|
|
65
65
|
onboardingComplete?: boolean;
|
|
66
|
+
/** When `onboardingComplete` is omitted, read `localStorage.getItem(key)==='true'` (default key `onboardingComplete`). */
|
|
67
|
+
onboardingCompleteLocalStorageKey?: string;
|
|
66
68
|
onboardingHandler?: OnboardingHandlerType;
|
|
67
69
|
dataBlockApiKeyHandler?: DataBlockApiKeyHandlerType;
|
|
68
70
|
setForceSheetRender?: React.Dispatch<React.SetStateAction<number>>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { WorkbookInstance } from '../../sheet-engine/react';
|
|
2
|
+
import { MutableRefObject } from 'react';
|
|
3
|
+
import * as Y from 'yjs';
|
|
4
|
+
export declare const handleExportToXLSX: (workbookRef: MutableRefObject<WorkbookInstance | null>, ydocRef: MutableRefObject<Y.Doc | null>, dsheetId: string, getDocumentTitle?: (dsheetId: string) => Promise<string>) => Promise<void>;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { WorkbookInstance } from '../../sheet-engine/react';
|
|
2
2
|
import { MutableRefObject } from 'react';
|
|
3
3
|
import * as Y from 'yjs';
|
|
4
|
+
/**
|
|
5
|
+
* Loads xlsx-js-style + exceljs + export helpers only when the user exports.
|
|
6
|
+
* Keeps the main editor chunk smaller for consuming apps.
|
|
7
|
+
*/
|
|
4
8
|
export declare const handleExportToXLSX: (workbookRef: MutableRefObject<WorkbookInstance | null>, ydocRef: MutableRefObject<Y.Doc | null>, dsheetId: string, getDocumentTitle?: (dsheetId: string) => Promise<string>) => Promise<void>;
|