@fileverse-dev/dsheet 4.1.19 → 4.1.20-embed-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/editor/components/editor-workbook.d.ts +6 -0
- package/dist/editor/components/sidebar/editor-right-sidebar.d.ts +3 -1
- package/dist/editor/components/sidebar/sidebar-offsets.d.ts +12 -0
- package/dist/editor/components/sidebar/sidebar-offsets.test.d.ts +1 -0
- package/dist/editor/types.d.ts +13 -0
- package/dist/editor/utils/activate-sheet-for-link.d.ts +3 -0
- package/dist/editor/utils/active-sheet-keeper.d.ts +21 -0
- package/dist/editor/utils/editor-handle.d.ts +1 -1
- package/dist/editor/utils/navigate-to-sheet.d.ts +22 -0
- package/dist/{es-S4GKlN-t.js → es-BlDQ6jCL.js} +1 -0
- package/dist/{executeStringFunction-B1_kGelH.js → executeStringFunction-BVMdxpT1.js} +5 -4
- package/dist/formula.js +1 -1
- package/dist/{hi-DMMTDTxZ.js → hi-CP0ta0Yk.js} +1 -0
- package/dist/{index-CmlGPhgN.js → index-Cqu29MEN.js} +15203 -15016
- package/dist/index.es.js +2 -2
- package/dist/sheet-engine/core/locale/en.d.ts +1 -0
- package/dist/sheet-engine/core/locale/es.d.ts +1 -0
- package/dist/sheet-engine/core/locale/hi.d.ts +1 -0
- package/dist/sheet-engine/core/locale/zh.d.ts +1 -0
- package/dist/sheet-engine/core/locale/zh_tw.d.ts +1 -0
- package/dist/sheet-engine/core/settings.d.ts +4 -0
- package/dist/sheet-engine/react/components/ContextMenu/sheet-tab-menu-items.d.ts +15 -0
- package/dist/style.css +1 -1
- package/dist/sync-local/server-clock.d.ts +26 -0
- package/dist/sync-local/server-clock.test.d.ts +1 -0
- package/dist/sync-local/socketClient.d.ts +1 -1
- package/dist/sync-local/socketClient.server-time.test.d.ts +1 -0
- package/dist/{template-data-list-BYOIK_Nd.js → template-data-list-apgmwRAT.js} +18 -10
- package/dist/{use-xlsx-import-impl-DQ07A9l0.js → use-xlsx-import-impl-Dtpl7Ki8.js} +4 -4
- package/dist/{xlsx-defined-names-Bzo6AUas.js → xlsx-defined-names-CdYgVMAN.js} +2 -2
- package/dist/{xlsx-export-impl-b03liE8V.js → xlsx-export-impl-Bs648guD.js} +4 -4
- package/dist/{xlsx-hyperlink-inline-FqEk4F3I.js → xlsx-hyperlink-inline-DP-nbX_G.js} +2 -2
- package/dist/{zh-Bv4KIDiJ.js → zh-CmOCFd5t.js} +1 -0
- package/dist/{zh_tw-BdpsK45h.js → zh_tw-BqyRw1gX.js} +1 -0
- package/package.json +2 -2
|
@@ -21,6 +21,10 @@ interface EditorWorkbookProps {
|
|
|
21
21
|
dsheetId: string;
|
|
22
22
|
onDuneChartEmbed?: () => void;
|
|
23
23
|
onSheetCountChange?: (sheetCount: number) => void;
|
|
24
|
+
onCopySheetLink?: (args: {
|
|
25
|
+
sheetId: string;
|
|
26
|
+
sheetName: string;
|
|
27
|
+
}) => void;
|
|
24
28
|
sidebarActivePanel?: string | null;
|
|
25
29
|
sidebarPortalRegistry?: SidebarPortalRegistryHandle | null;
|
|
26
30
|
sidebarPortalRenderers?: Record<string, SidebarPortalRenderer>;
|
|
@@ -29,6 +33,8 @@ interface EditorWorkbookProps {
|
|
|
29
33
|
onSignInToComment?: () => void;
|
|
30
34
|
onViewerModeChange?: (mode: 'comment' | 'view') => void;
|
|
31
35
|
theme?: ThemeKey;
|
|
36
|
+
showToolbar?: boolean;
|
|
37
|
+
showFormulaBar?: boolean;
|
|
32
38
|
}
|
|
33
39
|
export declare const EditorWorkbook: React.NamedExoticComponent<EditorWorkbookProps>;
|
|
34
40
|
export {};
|
|
@@ -15,6 +15,8 @@ interface EditorRightSidebarProps {
|
|
|
15
15
|
onClose: () => void;
|
|
16
16
|
/** Read/preview mode hides the toolbar, so the sidebar starts higher. */
|
|
17
17
|
isReadOnly?: boolean;
|
|
18
|
+
showNavbar?: boolean;
|
|
19
|
+
showToolbar?: boolean;
|
|
18
20
|
}
|
|
19
|
-
export declare const EditorRightSidebar: ({ isOpen, activePanelConfig, onClose, isReadOnly, }: EditorRightSidebarProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const EditorRightSidebar: ({ isOpen, activePanelConfig, onClose, isReadOnly, showNavbar, showToolbar, }: EditorRightSidebarProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
22
|
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Right sidebar position below the editor chrome. Read/preview mode keeps
|
|
3
|
+
* its existing offsets (the sidebar overlays the toolbar there).
|
|
4
|
+
*/
|
|
5
|
+
export declare const getRightSidebarOffsets: ({ isReadOnly, showNavbar, showToolbar, }: {
|
|
6
|
+
isReadOnly?: boolean;
|
|
7
|
+
showNavbar?: boolean;
|
|
8
|
+
showToolbar?: boolean;
|
|
9
|
+
}) => {
|
|
10
|
+
top: string;
|
|
11
|
+
height: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/editor/types.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { SmartContractConfig } from './types/smart-contract';
|
|
|
7
7
|
import { ApiKeyStorage } from './utils/api-key-storage';
|
|
8
8
|
import { ThemeKey } from '../sheet-engine/core/theme';
|
|
9
9
|
import { DSheetContentSnapshot } from '../persistence';
|
|
10
|
+
import { NavigateToSheetOptions } from './utils/navigate-to-sheet';
|
|
10
11
|
|
|
11
12
|
import * as Y from 'yjs';
|
|
12
13
|
export type { ThemeKey } from '../sheet-engine/core/theme';
|
|
@@ -31,6 +32,7 @@ export type DSheetEditorHandle = WorkbookInstance & {
|
|
|
31
32
|
encryptedTitle: string;
|
|
32
33
|
documentTitle: string;
|
|
33
34
|
}) => void;
|
|
35
|
+
navigateToSheet: (sheetId: string, opts?: NavigateToSheetOptions) => Promise<boolean>;
|
|
34
36
|
};
|
|
35
37
|
export interface PanelConfig {
|
|
36
38
|
id: string;
|
|
@@ -68,6 +70,13 @@ export interface DsheetProps {
|
|
|
68
70
|
setFetchingURLData?: (fetching: boolean) => void;
|
|
69
71
|
setInputFetchURLDataBlock?: React.Dispatch<React.SetStateAction<string>>;
|
|
70
72
|
renderNavbar?: (editorValues?: EditorValues) => JSX.Element;
|
|
73
|
+
/** Mount the navbar slot. `renderNavbar` still runs when hidden, so host
|
|
74
|
+
* side effects inside it keep working. Default true. */
|
|
75
|
+
showNavbar?: boolean;
|
|
76
|
+
/** Show the sheet toolbar. Default true. */
|
|
77
|
+
showToolbar?: boolean;
|
|
78
|
+
/** Show the formula bar. Default true. */
|
|
79
|
+
showFormulaBar?: boolean;
|
|
71
80
|
enableIndexeddbSync?: boolean;
|
|
72
81
|
dsheetId: string;
|
|
73
82
|
/**
|
|
@@ -112,6 +121,10 @@ export interface DsheetProps {
|
|
|
112
121
|
onDataBlockEvent?: (event: DataBlockEvent) => void;
|
|
113
122
|
onDuneChartEmbed?: () => void;
|
|
114
123
|
onSheetCountChange?: (sheetCount: number) => void;
|
|
124
|
+
onCopySheetLink?: (args: {
|
|
125
|
+
sheetId: string;
|
|
126
|
+
sheetName: string;
|
|
127
|
+
}) => void;
|
|
115
128
|
/** Fires whenever local content-sync status changes. Host apps should gate
|
|
116
129
|
* collab start/resume on 'synced' — starting before local content is fully
|
|
117
130
|
* synced is what let the RTC layer bind to a stale doc in the past. */
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { WorkbookInstance } from '../../sheet-engine/react';
|
|
2
|
+
|
|
3
|
+
export type ActiveSheetKeeper = {
|
|
4
|
+
/**
|
|
5
|
+
* Call on every Workbook ref attach. `mountKey` must change whenever the
|
|
6
|
+
* Workbook is remounted (i.e. mirror the Workbook's React `key`).
|
|
7
|
+
*/
|
|
8
|
+
onAttach: (workbook: WorkbookInstance | null, mountKey: unknown) => void;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Fortune remounts the Workbook whenever the editor bumps its render key
|
|
12
|
+
* (collab rehydration, template apply, imports), and a fresh mount resets the
|
|
13
|
+
* active sheet to the first visible one. Remember the active sheet across
|
|
14
|
+
* attaches and restore it once per mount, as soon as the new mount has sheets.
|
|
15
|
+
*
|
|
16
|
+
* The restore runs synchronously inside the ref callback (React commit phase).
|
|
17
|
+
* That only enqueues a Workbook state update (same as setState in
|
|
18
|
+
* useLayoutEffect), and it goes through the same setContext path as clicking a
|
|
19
|
+
* sheet tab.
|
|
20
|
+
*/
|
|
21
|
+
export declare function createActiveSheetKeeper(): ActiveSheetKeeper;
|
|
@@ -2,7 +2,7 @@ import { Ref } from 'react';
|
|
|
2
2
|
import { WorkbookInstance } from '../../sheet-engine/react';
|
|
3
3
|
import { DSheetEditorHandle } from '../types';
|
|
4
4
|
|
|
5
|
-
export type DSheetEditorMethods = Pick<DSheetEditorHandle, "refreshIndexedDB" | "terminateSession" | "updateCollaboratorName" | "updateSessionTitle">;
|
|
5
|
+
export type DSheetEditorMethods = Pick<DSheetEditorHandle, "refreshIndexedDB" | "terminateSession" | "updateCollaboratorName" | "updateSessionTitle" | "navigateToSheet">;
|
|
6
6
|
/**
|
|
7
7
|
* Compose Fortune's regenerated imperative handle with dSheet lifecycle methods.
|
|
8
8
|
* React callback refs invoke this again after every Workbook remount, so both
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type NavigableContext = {
|
|
2
|
+
currentSheetId?: string;
|
|
3
|
+
luckysheetfile?: Array<{
|
|
4
|
+
id?: string;
|
|
5
|
+
hide?: number;
|
|
6
|
+
} | null | undefined>;
|
|
7
|
+
};
|
|
8
|
+
export type NavigableEditor = {
|
|
9
|
+
getWorkbookContext?: () => NavigableContext | null | undefined;
|
|
10
|
+
getWorkbookSetContext?: () => ((recipe: (draft: unknown) => void) => void) | null | undefined;
|
|
11
|
+
};
|
|
12
|
+
export type NavigateToSheetOptions = {
|
|
13
|
+
/** How long to wait for the workbook and sheet to load. Default 10s. */
|
|
14
|
+
timeoutMs?: number;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Wait until the workbook has loaded a sheet with `sheetId`, then switch to it.
|
|
18
|
+
* Resolves `false` (never throws) when the sheet is missing after the timeout,
|
|
19
|
+
* hidden, or the switch fails. `getEditor` must return the latest instance on
|
|
20
|
+
* every call because Fortune regenerates its handle on each context change.
|
|
21
|
+
*/
|
|
22
|
+
export declare function navigateToSheet<TDraft>(getEditor: () => NavigableEditor | null | undefined, sheetId: string, activate: (draft: TDraft, sheetId: string) => void, { timeoutMs }?: NavigateToSheetOptions): Promise<boolean>;
|
|
@@ -11198,6 +11198,7 @@ If the value is FALSE, return the accrued interest from the first interest accru
|
|
|
11198
11198
|
cancelText: "Cancelar",
|
|
11199
11199
|
chooseText: "Confirmar color",
|
|
11200
11200
|
focus: "Enfocar",
|
|
11201
|
+
copyLink: "Copiar enlace a la hoja",
|
|
11201
11202
|
tipNameRepeat: "¡El nombre de la página de la pestaña no se puede repetir! Revísalo",
|
|
11202
11203
|
noMoreSheet: "El libro de trabajo contiene al menos una hoja de trabajo visual. Para eliminar la hoja de trabajo seleccionada, inserta una nueva hoja de trabajo o muestra una hoja de trabajo oculta",
|
|
11203
11204
|
confirmDelete: "¿Estás seguro de eliminar",
|
|
@@ -30,10 +30,10 @@ function Ug(e) {
|
|
|
30
30
|
}
|
|
31
31
|
const Tr = {}, Qa = {
|
|
32
32
|
en: () => Promise.resolve().then(() => kf),
|
|
33
|
-
zh: () => import("./zh-
|
|
34
|
-
es: () => import("./es-
|
|
35
|
-
hi: () => import("./hi-
|
|
36
|
-
"zh-TW": () => import("./zh_tw-
|
|
33
|
+
zh: () => import("./zh-CmOCFd5t.js"),
|
|
34
|
+
es: () => import("./es-BlDQ6jCL.js"),
|
|
35
|
+
hi: () => import("./hi-CP0ta0Yk.js"),
|
|
36
|
+
"zh-TW": () => import("./zh_tw-BqyRw1gX.js")
|
|
37
37
|
};
|
|
38
38
|
async function zg(e) {
|
|
39
39
|
const t = e in Qa ? e : e.split("-")[0], n = t in Qa ? t : "en";
|
|
@@ -12425,6 +12425,7 @@ If the value is FALSE, return the accrued interest from the first interest accru
|
|
|
12425
12425
|
cancelText: "Cancel",
|
|
12426
12426
|
chooseText: "Confirm color",
|
|
12427
12427
|
focus: "Focus",
|
|
12428
|
+
copyLink: "Copy link to sheet",
|
|
12428
12429
|
tipNameRepeat: "The name of the tab page cannot be repeated! Please revise",
|
|
12429
12430
|
noMoreSheet: "The workbook contains at least one visual worksheet. To delete the selected worksheet, please insert a new worksheet or show a hidden worksheet.",
|
|
12430
12431
|
confirmDelete: "Are you sure you want to delete this sheet?",
|
package/dist/formula.js
CHANGED
|
@@ -11248,6 +11248,7 @@ If the value is FALSE, return the accrued interest from the first interest accru
|
|
|
11248
11248
|
cancelText: "रद्द करें",
|
|
11249
11249
|
chooseText: "रंग की पुष्टि करें",
|
|
11250
11250
|
focus: "फोकस करें",
|
|
11251
|
+
copyLink: "शीट का लिंक कॉपी करें",
|
|
11251
11252
|
tipNameRepeat: "टैब पृष्ठ का नाम दोहराया नहीं जा सकता! कृपया संशोधित करें",
|
|
11252
11253
|
noMoreSheet: "वर्कबुक में कम से कम एक दृश्य वर्कशीट होनी चाहिए। चयनित वर्कशीट को हटाने के लिए, कृपया एक नई वर्कशीट जोड़ें या एक छुपी हुई वर्कशीट दिखाएं।",
|
|
11253
11254
|
confirmDelete: "क्या आप वाकई हटाना चाहते हैं",
|