@fileverse-dev/dsheet 4.1.23-stabilise-package-3 → 4.1.23-stabilise-package-4
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/contexts/editor-context.d.ts +2 -0
- package/dist/editor/hooks/use-celldata-compaction.d.ts +23 -2
- package/dist/editor/hooks/use-celldata-compaction.test.d.ts +1 -0
- package/dist/editor/utils/active-sheet-keeper.test.d.ts +1 -0
- package/dist/editor/utils/structural-edit-other-tabs.test.d.ts +1 -0
- package/dist/{executeStringFunction-D5BTPrXL.js → executeStringFunction-BsVLVYUB.js} +711 -691
- package/dist/formula.js +1 -1
- package/dist/{index-BXNWi7s5.js → index-YKT7Lz7Z.js} +18943 -18699
- package/dist/index.es.js +2 -2
- package/dist/sheet-engine/react/components/ContextMenu/FilterMenu.d.ts +2 -2
- package/dist/sheet-engine/react/components/ContextMenu/SheetTab.d.ts +2 -2
- package/dist/sheet-engine/react/components/ContextMenu/index.d.ts +2 -2
- package/dist/sheet-engine/react/components/NotationBoxes/shown-comments.d.ts +16 -0
- package/dist/sheet-engine/react/components/NotationBoxes/shown-comments.test.d.ts +1 -0
- package/dist/sheet-engine/react/components/SVGDefines.d.ts +2 -2
- package/dist/sheet-engine/react/components/SheetOverlay/editing-as-formula.d.ts +7 -0
- package/dist/sheet-engine/react/components/SheetOverlay/editing-as-formula.test.d.ts +1 -0
- package/dist/sheet-engine/react/components/SheetOverlay/hover-tracker.d.ts +40 -0
- package/dist/sheet-engine/react/components/SheetOverlay/hover-tracker.test.d.ts +1 -0
- package/dist/sheet-engine/react/components/SheetTab/index.d.ts +2 -2
- package/dist/sheet-engine/react/components/Toolbar/FunctionList/group-functions.d.ts +9 -0
- package/dist/sheet-engine/react/components/Toolbar/FunctionList/group-functions.test.d.ts +1 -0
- package/dist/sheet-engine/react/components/Toolbar/index.d.ts +2 -2
- package/dist/sheet-engine/react/components/Workbook/stable-handle.d.ts +8 -0
- package/dist/sheet-engine/react/components/Workbook/stable-handle.test.d.ts +1 -0
- package/dist/sheet-engine/react/context/index.d.ts +15 -0
- package/dist/sheet-engine/react/context/use-workbook-store.d.ts +30 -0
- package/dist/sheet-engine/react/context/workbook-store.d.ts +30 -0
- package/dist/sheet-engine/react/context/workbook-store.test.d.ts +1 -0
- package/dist/{use-xlsx-import-impl-gsG9w9qV.js → use-xlsx-import-impl-8Lojcck9.js} +4 -4
- package/dist/{xlsx-defined-names-dZveijsB.js → xlsx-defined-names-D3F23p2Z.js} +2 -2
- package/dist/{xlsx-export-impl-B10lK_L2.js → xlsx-export-impl-DXWvjnk5.js} +4 -4
- package/dist/{xlsx-hyperlink-inline-BFbPe75M.js → xlsx-hyperlink-inline-07QbQDEt.js} +2 -2
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as s, f as o, g as t, S as r, h as l, j as n, k as d, T as S, l as c, n as i, o as h, p as m, q as p, t as C, u, v as E, w as F, x, z as g, A as R, B as f, D as A, E as I, F as L, G as w, H as T, I as v, J as y, K as D, L as M, M as O, N as b, O as k, P, Q as V } from "./index-
|
|
2
|
-
import { cG as B, cH as G, cI as H, cO as K, by as U, e as X, f as _, l as J, a as j, du as q, dv as N, bh as Q, dw as Y, dx as Z, dB as W, dC as $, dE as ee, J as ae, dS as se, eq as oe, ba as te } from "./executeStringFunction-
|
|
1
|
+
import { C as s, f as o, g as t, S as r, h as l, j as n, k as d, T as S, l as c, n as i, o as h, p as m, q as p, t as C, u, v as E, w as F, x, z as g, A as R, B as f, D as A, E as I, F as L, G as w, H as T, I as v, J as y, K as D, L as M, M as O, N as b, O as k, P, Q as V } from "./index-YKT7Lz7Z.js";
|
|
2
|
+
import { cG as B, cH as G, cI as H, cO as K, by as U, e as X, f as _, l as J, a as j, du as q, dv as N, bh as Q, dw as Y, dx as Z, dB as W, dC as $, dE as ee, J as ae, dS as se, eq as oe, ba as te } from "./executeStringFunction-BsVLVYUB.js";
|
|
3
3
|
import { FLVURL as le } from "@fileverse-dev/formulajs";
|
|
4
4
|
import { E as de, S as Se } from "./constants-8Ij49Lxv.js";
|
|
5
5
|
export {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Cell } from '../../../core/types';
|
|
2
|
+
|
|
3
|
+
export type ShownCommentCell = {
|
|
4
|
+
r: number;
|
|
5
|
+
c: number;
|
|
6
|
+
};
|
|
7
|
+
/** Cells whose comment popup is pinned open (`ps.isShow`), in row-major order. */
|
|
8
|
+
export declare function collectShownCommentCells(data: (Cell | null)[][]): ShownCommentCell[];
|
|
9
|
+
/**
|
|
10
|
+
* Identity of a shown-comment set. NotationBoxes applies `showComments` only
|
|
11
|
+
* when this changes, so an edit that leaves the set alone costs no second
|
|
12
|
+
* context update. The sheet id is part of the key so that switching to a sheet
|
|
13
|
+
* with an equal (for example empty) set still replaces the previous sheet's
|
|
14
|
+
* boxes.
|
|
15
|
+
*/
|
|
16
|
+
export declare function shownCommentsKey(sheetId: string | undefined, cells: ShownCommentCell[]): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* True while a cell is being edited and either input holds a formula. The
|
|
3
|
+
* inputs' `innerText` is read only when `editing` is true (a read forces
|
|
4
|
+
* layout), and the formula bar is read only when the cell input did not
|
|
5
|
+
* already say yes.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isEditingAsFormula(editing: boolean, readCellInputText: () => string | undefined, readFxInputText: () => string | undefined): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Context, GlobalCache } from '../../../core';
|
|
2
|
+
|
|
3
|
+
export type HoverCell = {
|
|
4
|
+
row: number;
|
|
5
|
+
col: number;
|
|
6
|
+
} | null;
|
|
7
|
+
type Rect = {
|
|
8
|
+
left: number;
|
|
9
|
+
top: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
};
|
|
13
|
+
type HoverTrackerOptions = {
|
|
14
|
+
/** Position of the cell area; read at most once per animation frame. */
|
|
15
|
+
getRect: () => Rect | undefined;
|
|
16
|
+
/** Cell under a page position, or null outside the cell area. */
|
|
17
|
+
locate: (pageX: number, pageY: number, rect: Rect | undefined) => HoverCell;
|
|
18
|
+
/** True while a drag, resize or popup needs every mouse move. */
|
|
19
|
+
isInteracting: () => boolean;
|
|
20
|
+
requestFrame: (cb: () => void) => void;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Decides whether a mouse move needs the full `setContext` pass. A move that
|
|
24
|
+
* stays in the same cell, with nothing being dragged or hovered, changes
|
|
25
|
+
* nothing, so it is skipped (E1).
|
|
26
|
+
*/
|
|
27
|
+
export declare function createHoverTracker({ getRect, locate, isInteracting, requestFrame, }: HoverTrackerOptions): {
|
|
28
|
+
shouldProcess(e: {
|
|
29
|
+
pageX: number;
|
|
30
|
+
pageY: number;
|
|
31
|
+
}): boolean;
|
|
32
|
+
reset(): void;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* True when `handleOverlayMouseMove` or `overShowLinkCard` do something that
|
|
36
|
+
* depends on more than the hovered cell: a comment box, image, cell or dialog
|
|
37
|
+
* drag, or a popup that must see the pointer leave it.
|
|
38
|
+
*/
|
|
39
|
+
export declare function isHoverInteractionActive(ctx: Context, globalCache: GlobalCache): boolean;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type FunctionLocaleItem = {
|
|
2
|
+
n?: string;
|
|
3
|
+
t?: number | string;
|
|
4
|
+
};
|
|
5
|
+
/** Groups the locale's function list by category for the function picker. */
|
|
6
|
+
export declare function groupFunctions(functionlist: FunctionLocaleItem[]): {
|
|
7
|
+
categories: ("Text" | "Date" | "Other" | "Logical" | "All" | "Array" | "Database" | "Engineering" | "Datablock" | "Financial" | "Lookup" | "Math" | "Operator" | "Parser" | "Statistical" | "Info")[];
|
|
8
|
+
getFunctions: (categoryKey: string) => string[];
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,11 +7,11 @@ export declare const CurrencySelector: ({ cell, defaultTextFormat, toolTipText,
|
|
|
7
7
|
defaultTextFormat: string;
|
|
8
8
|
toolTipText: string;
|
|
9
9
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
declare const
|
|
10
|
+
declare const _default: React.NamedExoticComponent<{
|
|
11
11
|
setMoreItems: React.Dispatch<React.SetStateAction<React.ReactNode>>;
|
|
12
12
|
moreItemsOpen: boolean;
|
|
13
13
|
onMoreToolbarItemsClose?: () => void;
|
|
14
14
|
moreToolbarItems?: React.ReactNode;
|
|
15
15
|
trailingContent?: React.ReactNode;
|
|
16
16
|
}>;
|
|
17
|
-
export default
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An object with the keys of `getLatest()` whose identity never changes. Each
|
|
3
|
+
* function member calls the function of the same name on the latest api, and
|
|
4
|
+
* each other member reads the latest value, so a host that keeps the handle
|
|
5
|
+
* across renders always sees current state (E3). The key set is taken from the
|
|
6
|
+
* first call and is expected to stay the same.
|
|
7
|
+
*/
|
|
8
|
+
export declare function createStableHandle<T extends object>(getLatest: () => T): T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { Context, Settings, GlobalCache, PatchOptions } from '../../core';
|
|
3
|
+
import { WorkbookStore } from './workbook-store';
|
|
3
4
|
|
|
4
5
|
export type RefValues = {
|
|
5
6
|
globalCache: GlobalCache;
|
|
@@ -23,4 +24,18 @@ declare const WorkbookContext: React.Context<{
|
|
|
23
24
|
handleUndo: () => void;
|
|
24
25
|
handleRedo: () => void;
|
|
25
26
|
}>;
|
|
27
|
+
/**
|
|
28
|
+
* The parts of the workbook that rarely change (setters, settings, refs) plus
|
|
29
|
+
* the store holding the latest context. Components that must not render on
|
|
30
|
+
* every update read this instead of `WorkbookContext` (E2).
|
|
31
|
+
*/
|
|
32
|
+
export type WorkbookStable = {
|
|
33
|
+
store: WorkbookStore<Context>;
|
|
34
|
+
setContext: (recipe: (ctx: Context) => void, options?: SetContextOptions) => void;
|
|
35
|
+
settings: Required<Settings>;
|
|
36
|
+
refs: RefValues;
|
|
37
|
+
handleUndo: () => void;
|
|
38
|
+
handleRedo: () => void;
|
|
39
|
+
};
|
|
40
|
+
export declare const WorkbookStableContext: React.Context<WorkbookStable>;
|
|
26
41
|
export default WorkbookContext;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Context } from '../../core';
|
|
2
|
+
|
|
3
|
+
export declare function useWorkbookSelector<S>(selector: (ctx: Context) => S, isEqual?: (a: S, b: S) => boolean): S;
|
|
4
|
+
/**
|
|
5
|
+
* Drop-in for `useContext(WorkbookContext)` in components that should not
|
|
6
|
+
* render on every context update: it returns the same shape, but the
|
|
7
|
+
* component renders again only when `equal` says the context changed in a way
|
|
8
|
+
* it cares about (or when its own props or state change). The returned
|
|
9
|
+
* `context` is always the latest one.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useWorkbookContextWhen(equal: (previous: Context, next: Context) => boolean): {
|
|
12
|
+
context: Context;
|
|
13
|
+
setContext: (recipe: (ctx: Context) => void, options?: import('./index').SetContextOptions) => void;
|
|
14
|
+
settings: Required<import('../../core').Settings>;
|
|
15
|
+
refs: import('./index').RefValues;
|
|
16
|
+
handleUndo: () => void;
|
|
17
|
+
handleRedo: () => void;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* `useContext(WorkbookContext)` for components that must not render when only
|
|
21
|
+
* the scroll position or the row and column offsets changed (E2).
|
|
22
|
+
*/
|
|
23
|
+
export declare function useWorkbookContextIgnoringScroll(): {
|
|
24
|
+
context: Context;
|
|
25
|
+
setContext: (recipe: (ctx: Context) => void, options?: import('./index').SetContextOptions) => void;
|
|
26
|
+
settings: Required<import('../../core').Settings>;
|
|
27
|
+
refs: import('./index').RefValues;
|
|
28
|
+
handleUndo: () => void;
|
|
29
|
+
handleRedo: () => void;
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type WorkbookStore<T> = {
|
|
2
|
+
getState: () => T;
|
|
3
|
+
setState: (next: T) => void;
|
|
4
|
+
subscribe: (listener: () => void) => () => void;
|
|
5
|
+
};
|
|
6
|
+
/** A one-value store; Workbook sets the latest context after every commit (E2). */
|
|
7
|
+
export declare function createWorkbookStore<T>(initial: T): WorkbookStore<T>;
|
|
8
|
+
/**
|
|
9
|
+
* The snapshot logic behind `useWorkbookSelector`: `getSnapshot` returns the
|
|
10
|
+
* previously handed-out value while `isEqual` says the newly selected one is
|
|
11
|
+
* the same, so `useSyncExternalStore` sees no change and the component does
|
|
12
|
+
* not render. The selector runs once per state.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createSelection<T, S>(store: WorkbookStore<T>, selector: (state: T) => S, isEqual?: (a: S, b: S) => boolean): {
|
|
15
|
+
subscribe: (listener: () => void) => () => void;
|
|
16
|
+
getSnapshot(): S;
|
|
17
|
+
};
|
|
18
|
+
/** True when two states differ only in the listed keys. */
|
|
19
|
+
export declare function onlyIgnoredKeysChanged(ignored: readonly string[]): (a: object, b: object) => boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Context keys that change on scroll or when the row and column offsets are
|
|
22
|
+
* rebuilt after an edit, and that the components converted in E2 do not read:
|
|
23
|
+
* Toolbar and its popovers, SheetTab, ContextMenu, FilterMenu and
|
|
24
|
+
* SheetTabContextMenu. Checked with grep in those directories and in the
|
|
25
|
+
* helpers they call with the context (`updateCellsDecimalFormat`,
|
|
26
|
+
* `convertCellsToCrypto`, `isHyperlinkCreationBlocked`,
|
|
27
|
+
* `captureLinkEditorOpenSnapshot`).
|
|
28
|
+
*/
|
|
29
|
+
export declare const SCROLL_ONLY_KEYS: readonly ["scrollLeft", "scrollTop", "visibledatarow", "visibledatacolumn"];
|
|
30
|
+
export declare const contextEqualIgnoringScroll: (a: object, b: object) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as BZ from "yjs";
|
|
2
|
-
import { i as Yl, a as hl, b as ul, s as eZ, r as Il, y as pl, d as Rl, m as sl } from "./index-
|
|
3
|
-
import { g as al } from "./executeStringFunction-
|
|
2
|
+
import { i as Yl, a as hl, b as ul, s as eZ, r as Il, y as pl, d as Rl, m as sl } from "./index-YKT7Lz7Z.js";
|
|
3
|
+
import { g as al } from "./executeStringFunction-BsVLVYUB.js";
|
|
4
4
|
import { Workbook as Kl } from "exceljs";
|
|
5
5
|
import Jl from "luckyexcel";
|
|
6
|
-
import { e as xl, b as Ml, n as Sl } from "./xlsx-hyperlink-inline-
|
|
7
|
-
import { parseDefinedNamesFromXlsxBuffer as Nl, excelEntriesToDefinedNames as OZ } from "./xlsx-defined-names-
|
|
6
|
+
import { e as xl, b as Ml, n as Sl } from "./xlsx-hyperlink-inline-07QbQDEt.js";
|
|
7
|
+
import { parseDefinedNamesFromXlsxBuffer as Nl, excelEntriesToDefinedNames as OZ } from "./xlsx-defined-names-D3F23p2Z.js";
|
|
8
8
|
import { toast as fZ } from "@fileverse/ui";
|
|
9
9
|
var Zl = { exports: {} };
|
|
10
10
|
(function(m) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as w } from "./executeStringFunction-
|
|
2
|
-
import { J as x } from "./xlsx-hyperlink-inline-
|
|
1
|
+
import { i as w } from "./executeStringFunction-BsVLVYUB.js";
|
|
2
|
+
import { J as x } from "./xlsx-hyperlink-inline-07QbQDEt.js";
|
|
3
3
|
function g(o) {
|
|
4
4
|
return o.startsWith("_xlnm.");
|
|
5
5
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { utils as S, write as nt } from "xlsx-js-style";
|
|
2
2
|
import { Workbook as pt } from "exceljs";
|
|
3
3
|
import { toast as rt } from "@fileverse/ui";
|
|
4
|
-
import { J as dt, c as X, g as ht, a as mt } from "./xlsx-hyperlink-inline-
|
|
5
|
-
import { b as gt } from "./executeStringFunction-
|
|
6
|
-
import { e as bt } from "./index-
|
|
4
|
+
import { J as dt, c as X, g as ht, a as mt } from "./xlsx-hyperlink-inline-07QbQDEt.js";
|
|
5
|
+
import { b as gt } from "./executeStringFunction-BsVLVYUB.js";
|
|
6
|
+
import { e as bt } from "./index-YKT7Lz7Z.js";
|
|
7
7
|
const xt = {
|
|
8
8
|
1: "thin",
|
|
9
9
|
2: "hair",
|
|
@@ -854,7 +854,7 @@ const Z = (t) => {
|
|
|
854
854
|
O
|
|
855
855
|
);
|
|
856
856
|
});
|
|
857
|
-
const { applyDefinedNamesToExcelWorkbook: ct } = await import("./xlsx-defined-names-
|
|
857
|
+
const { applyDefinedNamesToExcelWorkbook: ct } = await import("./xlsx-defined-names-D3F23p2Z.js");
|
|
858
858
|
ct(
|
|
859
859
|
B,
|
|
860
860
|
(k = (C = (s = t.current).getWorkbookContext) == null ? void 0 : C.call(s)) == null ? void 0 : k.definedNames,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as Rt, c as yt } from "./executeStringFunction-
|
|
2
|
-
import { c as wt } from "./index-
|
|
1
|
+
import { g as Rt, c as yt } from "./executeStringFunction-BsVLVYUB.js";
|
|
2
|
+
import { c as wt } from "./index-YKT7Lz7Z.js";
|
|
3
3
|
function jt(J, nt) {
|
|
4
4
|
const g = J.getImages();
|
|
5
5
|
if (!g.length) return [];
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@fileverse-dev/dsheet",
|
|
3
3
|
"private": false,
|
|
4
4
|
"description": "DSheet",
|
|
5
|
-
"version": "4.1.23-stabilise-package-
|
|
5
|
+
"version": "4.1.23-stabilise-package-4",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/fileverse/fileverse-dsheets.git"
|