@fileverse-dev/dsheet 4.1.13 → 4.1.15
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/{executeStringFunction-DDohtIgJ.js → executeStringFunction-B1_kGelH.js} +1924 -1857
- package/dist/formula.js +1 -1
- package/dist/{index-Do3ORCP6.js → index-BZF-Vzu-.js} +12911 -12916
- package/dist/index.es.js +2 -2
- package/dist/sheet-engine/core/utils/index.d.ts +1 -0
- package/dist/sheet-engine/core/utils/sheet-name-ref.d.ts +25 -0
- package/dist/sheet-engine/core/utils/sheet-name-ref.test.d.ts +1 -0
- package/dist/sheet-engine/formula-parser/quoted-sheet-ref.test.d.ts +1 -0
- package/dist/sheet-engine/react/hooks/useLastFormulaCaretOffset.d.ts +14 -0
- package/dist/{use-xlsx-import-impl-B39jJVhb.js → use-xlsx-import-impl-BhLs7Sa9.js} +4 -4
- package/dist/{xlsx-defined-names-CVyBLew_.js → xlsx-defined-names-CYjee1B-.js} +2 -2
- package/dist/{xlsx-export-impl-ByVvG4Rg.js → xlsx-export-impl-BshhqFrX.js} +4 -4
- package/dist/{xlsx-hyperlink-inline-Q7OJiRv1.js → xlsx-hyperlink-inline-90zrKsK9.js} +2 -2
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as s, d as o, f as t, S as r, g as l, h as n, j as d, T as S, k as c, l as i, n as m, o as h, p, q as C, t as u, u as E, v as F, w as g, x, z as R, A, B as f, D as I, E as L, F as T, G as w, H as y, I as v, J as D, K as M, L as b, M as k, N as z, O, P } from "./index-
|
|
2
|
-
import { cy as G, cz as K, cA as U, cG as X, bs as _, e as j, f as B, l as H, a as J, dj as N, dk as q, bb as Y, dl as Z, dm as Q, dr as W, ds as $, du as ee, I as ae, dJ as se, eg as oe, b4 as te } from "./executeStringFunction-
|
|
1
|
+
import { C as s, d as o, f as t, S as r, g as l, h as n, j as d, T as S, k as c, l as i, n as m, o as h, p, q as C, t as u, u as E, v as F, w as g, x, z as R, A, B as f, D as I, E as L, F as T, G as w, H as y, I as v, J as D, K as M, L as b, M as k, N as z, O, P } from "./index-BZF-Vzu-.js";
|
|
2
|
+
import { cy as G, cz as K, cA as U, cG as X, bs as _, e as j, f as B, l as H, a as J, dj as N, dk as q, bb as Y, dl as Z, dm as Q, dr as W, ds as $, du as ee, I as ae, dJ as se, eg as oe, b4 as te } from "./executeStringFunction-B1_kGelH.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 {
|
|
@@ -4,6 +4,7 @@ import { Sheet } from '../types';
|
|
|
4
4
|
export { filterPatch, patchToOp, opToPatch, inverseRowColOptions, extractFormulaCellOps, } from './patch';
|
|
5
5
|
export type { PatchOptions, ChangedSheet } from './patch';
|
|
6
6
|
export { getFreezeState, getFrozenPixelBounds, toggleFreeze } from './freeze';
|
|
7
|
+
export { sheetNameNeedsQuotes, formatSheetNameForFormula, quoteSheetNamesInFormula, } from './sheet-name-ref';
|
|
7
8
|
export type { FreezeType } from './freeze';
|
|
8
9
|
export declare function generateRandomSheetName(file: Sheet[], isPivotTable: boolean, ctx: Context): any;
|
|
9
10
|
export declare function rgbToHex(color: string): string;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helpers for sheet-qualified references in formulas (`Sheet1!A1`,
|
|
3
|
+
* `'Finance - 1'!A1`, `'It''s'!A1`).
|
|
4
|
+
*
|
|
5
|
+
* Like Google Sheets / Excel, a sheet name can only appear bare when it is a
|
|
6
|
+
* plain identifier. Anything else (spaces, `-`, punctuation, a leading digit,
|
|
7
|
+
* a name that looks like a cell such as `A1`, non-Latin scripts) must be
|
|
8
|
+
* wrapped in single quotes, with embedded `'` doubled.
|
|
9
|
+
*/
|
|
10
|
+
export declare function sheetNameNeedsQuotes(name: string): boolean;
|
|
11
|
+
/** `Sheet1` -> `Sheet1`, `Finance - 1` -> `'Finance - 1'`, `It's` -> `'It''s'`. */
|
|
12
|
+
export declare function formatSheetNameForFormula(name: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Wraps bare references to existing sheets whose names need quoting, e.g.
|
|
15
|
+
* `=SUM(Sheet-4!H6,B2:C2)` -> `=SUM('Sheet-4'!H6,B2:C2)`.
|
|
16
|
+
*
|
|
17
|
+
* Only an existing sheet name immediately followed by `!` is rewritten; text
|
|
18
|
+
* inside "strings" and already-quoted '...' names is left untouched.
|
|
19
|
+
*
|
|
20
|
+
* Sheet names can differ only by case (`Sheet-4` and `sheet-4` can both
|
|
21
|
+
* exist), so an exact-case match always wins. A case-insensitive match is
|
|
22
|
+
* used only when exactly one sheet fits; if several do, the text is left as
|
|
23
|
+
* typed so the formula errors visibly instead of pointing at the wrong sheet.
|
|
24
|
+
*/
|
|
25
|
+
export declare function quoteSheetNamesInFormula(formula: string, sheetNames: string[]): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Remembers the last caret position (text offset) inside a formula editor.
|
|
5
|
+
*
|
|
6
|
+
* Clicking a sheet tab moves the DOM selection out of the editor, so by the
|
|
7
|
+
* time the sheet switch finishes the caret is gone. The value kept here lets
|
|
8
|
+
* the editor put the caret back exactly where the user left it (e.g. after the
|
|
9
|
+
* `,` in `=SUM('Sheet - 2'!B2,`) instead of guessing.
|
|
10
|
+
*
|
|
11
|
+
* The offset counts characters across text nodes, matching
|
|
12
|
+
* `setCursorPosition`. It resets to `null` when the edit session ends.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useLastFormulaCaretOffset(editorRef: RefObject<HTMLDivElement | null>, editSessionActive: boolean): RefObject<number | null>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as BZ from "yjs";
|
|
2
|
-
import { i as Yl, a as hl, s as eZ, r as ul, y as Il, b as pl, m as Rl } from "./index-
|
|
3
|
-
import { g as sl } from "./executeStringFunction-
|
|
2
|
+
import { i as Yl, a as hl, s as eZ, r as ul, y as Il, b as pl, m as Rl } from "./index-BZF-Vzu-.js";
|
|
3
|
+
import { g as sl } from "./executeStringFunction-B1_kGelH.js";
|
|
4
4
|
import { Workbook as al } from "exceljs";
|
|
5
5
|
import Kl from "luckyexcel";
|
|
6
|
-
import { e as Jl, b as xl, n as Ml } from "./xlsx-hyperlink-inline-
|
|
7
|
-
import { parseDefinedNamesFromXlsxBuffer as Sl, excelEntriesToDefinedNames as OZ } from "./xlsx-defined-names-
|
|
6
|
+
import { e as Jl, b as xl, n as Ml } from "./xlsx-hyperlink-inline-90zrKsK9.js";
|
|
7
|
+
import { parseDefinedNamesFromXlsxBuffer as Sl, excelEntriesToDefinedNames as OZ } from "./xlsx-defined-names-CYjee1B-.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-B1_kGelH.js";
|
|
2
|
+
import { J as x } from "./xlsx-hyperlink-inline-90zrKsK9.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-90zrKsK9.js";
|
|
5
|
+
import { b as gt } from "./executeStringFunction-B1_kGelH.js";
|
|
6
|
+
import { e as bt } from "./index-BZF-Vzu-.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-CYjee1B-.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-B1_kGelH.js";
|
|
2
|
+
import { c as wt } from "./index-BZF-Vzu-.js";
|
|
3
3
|
function jt(J, nt) {
|
|
4
4
|
const g = J.getImages();
|
|
5
5
|
if (!g.length) return [];
|