@fileverse-dev/dsheet 3.0.1-yjs-8 → 3.0.1-yjs-10
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/utils/update-ydoc.d.ts +2 -2
- package/dist/{executeStringFunction-DiaE7AnQ.js → executeStringFunction-DLKAY5dk.js} +3563 -3463
- package/dist/formula.js +1 -1
- package/dist/{index-sIdumZnm.js → index-BDIZu4U9.js} +11731 -11663
- package/dist/index.es.js +20 -20
- package/dist/sheet-engine/core/modules/sheet.d.ts +8 -1
- package/dist/sheet-engine/core/utils/cell-persist-utils.d.ts +2 -0
- package/dist/sheet-engine/core/utils/range-format.d.ts +22 -6
- package/dist/{use-xlsx-import-impl-BQVMliBT.js → use-xlsx-import-impl-DyV3G0Hm.js} +2 -2
- package/dist/{xlsx-export-impl-DJKw-fe3.js → xlsx-export-impl-zL3ijfOg.js} +2 -2
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as s, a as t, b as o, S as l, d as r, i as n, e as d, T as c, f as i, g as S, h, j as m, k as p, l as C, n as u, o as E, p as g, q as F, s as x, t as R, u as f, v as
|
|
2
|
-
import {
|
|
1
|
+
import { C as s, a as t, b as o, S as l, d as r, i as n, e as d, T as c, f as i, g as S, h, j as m, k as p, l as C, n as u, o as E, p as g, q as F, s as x, t as R, u as f, v as A, w as L, x as w, z as I, A as T, B as v, D, E as M } from "./index-BDIZu4U9.js";
|
|
2
|
+
import { ch as U, ci as V, cj as _, co as b, bg as z, e as P, f as X, l as j, a as y, cZ as B, c_ as O, a$ as G, c$ as H, d0 as Z, d4 as $, d5 as q, d7 as J, D as K, dl as N, dM as Y, aU as Q } from "./executeStringFunction-DLKAY5dk.js";
|
|
3
3
|
import { FLVURL as ee } from "@fileverse-dev/formulajs";
|
|
4
4
|
import { E as se, S as te } from "./constants-Cdz6oSCq.js";
|
|
5
5
|
export {
|
|
@@ -15,45 +15,45 @@ export {
|
|
|
15
15
|
d as SupportedChain,
|
|
16
16
|
c as TEMPLATES,
|
|
17
17
|
i as api,
|
|
18
|
-
|
|
18
|
+
U as clearColumnsCellsFormat,
|
|
19
19
|
S as clearFilter,
|
|
20
20
|
V as clearRowsCellsFormat,
|
|
21
|
-
|
|
21
|
+
_ as clearSelectedCellFormat,
|
|
22
22
|
h as createFilter,
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
b as deleteRowCol,
|
|
24
|
+
z as deleteSelectedCellText,
|
|
25
25
|
m as describeMatchedShortcut,
|
|
26
|
-
|
|
26
|
+
P as executeStringFunction,
|
|
27
27
|
X as formulaResponseUiSync,
|
|
28
|
-
|
|
28
|
+
j as getFlowdata,
|
|
29
29
|
p as getRemoveDuplicatesErrorMessage,
|
|
30
30
|
C as getRemoveDuplicatesPreview,
|
|
31
|
-
|
|
31
|
+
y as getSheetIndex,
|
|
32
32
|
u as handleCSVUpload,
|
|
33
33
|
E as handleCopy,
|
|
34
34
|
g as handleExportToCSV,
|
|
35
35
|
F as handleExportToJSON,
|
|
36
36
|
x as handleExportToXLSX,
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
B as handleFreeze,
|
|
38
|
+
O as handleHorizontalAlign,
|
|
39
39
|
G as handleLink,
|
|
40
40
|
H as handleMerge,
|
|
41
41
|
R as handlePasteByClick,
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
Z as handleSort,
|
|
43
|
+
$ as handleTextSize,
|
|
44
44
|
q as handleVerticalAlign,
|
|
45
45
|
f as importSpreadsheetFile,
|
|
46
46
|
J as insertRowCol,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
A as isBrowserZoomShortcut,
|
|
48
|
+
L as isFormulaListShortcut,
|
|
49
|
+
w as isOpenShortcutsModalShortcut,
|
|
50
50
|
K as jfrefreshgrid,
|
|
51
51
|
N as loadLocale,
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
I as removeActiveImage,
|
|
53
|
+
T as removeDuplicates,
|
|
54
54
|
v as showImgChooser,
|
|
55
|
-
|
|
55
|
+
Y as toolbarItemClickHandler,
|
|
56
56
|
Q as updateFormat,
|
|
57
57
|
D as useEnsStatus,
|
|
58
|
-
|
|
58
|
+
M as useXLSXImport
|
|
59
59
|
};
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { Context } from '../context';
|
|
2
2
|
import { Settings } from '../settings';
|
|
3
|
-
import { CellMatrix, Sheet } from '../types';
|
|
3
|
+
import { CellMatrix, Sheet, SheetConfig } from '../types';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Persist active ctx.config onto ONE sheet file only.
|
|
7
|
+
* If Immer wrote keys (e.g. cellFormatRanges) on file.config but not ctx.config,
|
|
8
|
+
* keep those instead of wiping them with a blind replace.
|
|
9
|
+
* Never touches other sheets.
|
|
10
|
+
*/
|
|
11
|
+
export declare function assignActiveConfigToSheetFile(file: Sheet, activeConfig: SheetConfig | undefined): void;
|
|
5
12
|
export declare function storeSheetParamALL(ctx: Context): void;
|
|
6
13
|
export declare function changeSheet(ctx: Context, id: string, isPivotInitial?: boolean, isNewSheet?: boolean, isCopySheet?: boolean): void;
|
|
7
14
|
export declare function addSheet(ctx: Context, settings?: Required<Settings>, newSheetID?: string | undefined, // if action is from websocket, there will be a new sheetID
|
|
@@ -4,5 +4,7 @@ export declare const CELL_FORMAT_ATTRS: readonly ["tb", "ht", "vt", "tr", "fs",
|
|
|
4
4
|
export type CellFormatAttr = (typeof CELL_FORMAT_ATTRS)[number];
|
|
5
5
|
export declare function hasCellMeaningfulContent(cell: Cell | string | number | boolean | null | undefined): boolean;
|
|
6
6
|
export declare function isFormatOnlyEmptyCell(cell: Cell | string | number | boolean | null | undefined): boolean;
|
|
7
|
+
/** Pull only present format attrs from a format-only empty cell (cheap, no clone). */
|
|
8
|
+
export declare function extractCellFormatAttrs(cell: Cell | string | number | boolean | null | undefined): Partial<Record<CellFormatAttr, unknown>> | null;
|
|
7
9
|
export declare function shouldPersistCelldataCell(cell: Cell | string | number | boolean | null | undefined): boolean;
|
|
8
10
|
export declare function celldataEntryEqual(existing: unknown, next: unknown): boolean;
|
|
@@ -15,7 +15,7 @@ export type CellFormatRange = {
|
|
|
15
15
|
un?: number;
|
|
16
16
|
cl?: number;
|
|
17
17
|
bg?: string;
|
|
18
|
-
ct?: Cell[
|
|
18
|
+
ct?: Cell["ct"];
|
|
19
19
|
};
|
|
20
20
|
declare function rangesEqual(a: CellFormatRange[] | undefined, b: CellFormatRange[] | undefined): boolean;
|
|
21
21
|
/** Merge overlapping/adjacent ranges that carry identical format attrs. */
|
|
@@ -25,13 +25,13 @@ export declare function normalizeCellFormatRanges(ranges: CellFormatRange[] | un
|
|
|
25
25
|
* drag-and-drop. A contiguous source range can become multiple rectangles
|
|
26
26
|
* when the moved indices are no longer contiguous.
|
|
27
27
|
*/
|
|
28
|
-
export declare function remapCellFormatRanges(ranges: CellFormatRange[] | undefined, axis:
|
|
28
|
+
export declare function remapCellFormatRanges(ranges: CellFormatRange[] | undefined, axis: "row" | "column", indexMap: Record<number, number>): CellFormatRange[];
|
|
29
29
|
/**
|
|
30
30
|
* Move format ranges with a cut-and-paste cell block move. Formatting in both
|
|
31
31
|
* the old source and the overwritten destination is cleared; only the source
|
|
32
32
|
* intersection is translated to the target rectangle.
|
|
33
33
|
*/
|
|
34
|
-
export declare function moveCellFormatRanges(ranges: CellFormatRange[] | undefined, source: Pick<CellFormatRange,
|
|
34
|
+
export declare function moveCellFormatRanges(ranges: CellFormatRange[] | undefined, source: Pick<CellFormatRange, "row" | "column">, target: Pick<CellFormatRange, "row" | "column">): CellFormatRange[];
|
|
35
35
|
export declare function getCellFormatRangeGridBounds(ranges: CellFormatRange[] | undefined): {
|
|
36
36
|
maxRow: number;
|
|
37
37
|
maxCol: number;
|
|
@@ -40,16 +40,32 @@ export declare function upsertCellFormatRange(ranges: CellFormatRange[] | undefi
|
|
|
40
40
|
ranges: CellFormatRange[];
|
|
41
41
|
changed: boolean;
|
|
42
42
|
};
|
|
43
|
+
/**
|
|
44
|
+
* When a cell loses meaningful content but keeps style, put that style back
|
|
45
|
+
* into cellFormatRanges as a 1x1 (normalize merges with neighbours).
|
|
46
|
+
*/
|
|
47
|
+
export declare function migrateFormatOnlyCellIntoRanges(ranges: CellFormatRange[] | undefined, r: number, c: number, cell: Cell | string | number | boolean | null | undefined): {
|
|
48
|
+
ranges: CellFormatRange[];
|
|
49
|
+
changed: boolean;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Scan a dense-data rectangle and move any format-only cells into
|
|
53
|
+
* cellFormatRanges. Adjacent identical styles merge via normalize.
|
|
54
|
+
*/
|
|
55
|
+
export declare function migrateFormatOnlyCellsFromData(ranges: CellFormatRange[] | undefined, data: CellMatrix | null | undefined, r1: number, r2: number, c1: number, c2: number): {
|
|
56
|
+
ranges: CellFormatRange[];
|
|
57
|
+
changed: boolean;
|
|
58
|
+
};
|
|
43
59
|
export declare function punchHoleInCellFormatRanges(ranges: CellFormatRange[] | undefined, r: number, c: number): CellFormatRange[];
|
|
44
60
|
export declare function punchRectHoleInCellFormatRanges(ranges: CellFormatRange[] | undefined, rowSt: number, rowEd: number, colSt: number, colEd: number): CellFormatRange[];
|
|
45
|
-
export declare function shiftCellFormatRangesOnInsert(ranges: CellFormatRange[] | undefined, type:
|
|
46
|
-
export declare function shiftCellFormatRangesOnDelete(ranges: CellFormatRange[] | undefined, type:
|
|
61
|
+
export declare function shiftCellFormatRangesOnInsert(ranges: CellFormatRange[] | undefined, type: "row" | "column", index: number, count: number, direction: "lefttop" | "rightbottom"): CellFormatRange[];
|
|
62
|
+
export declare function shiftCellFormatRangesOnDelete(ranges: CellFormatRange[] | undefined, type: "row" | "column", start: number, end: number): CellFormatRange[];
|
|
47
63
|
export declare function applyCellFormatRangesToData(data: CellMatrix | null | undefined, ranges: CellFormatRange[] | undefined): void;
|
|
48
64
|
export declare function buildSheetDataMatrixForExport(sheet: {
|
|
49
65
|
data?: CellMatrix | null;
|
|
50
66
|
celldata?: CellWithRowAndCol[];
|
|
51
67
|
row?: number;
|
|
52
68
|
column?: number;
|
|
53
|
-
config?: Sheet[
|
|
69
|
+
config?: Sheet["config"];
|
|
54
70
|
}): CellMatrix;
|
|
55
71
|
export { rangesEqual };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as Ke } from "./executeStringFunction-
|
|
1
|
+
import { g as Ke } from "./executeStringFunction-DLKAY5dk.js";
|
|
2
2
|
import * as et from "yjs";
|
|
3
|
-
import { m as tt, y as rt, r as nt } from "./index-
|
|
3
|
+
import { m as tt, y as rt, r as nt } from "./index-BDIZu4U9.js";
|
|
4
4
|
import { n as at } from "./xlsx-hyperlink-inline-DzewAypN.js";
|
|
5
5
|
import { toast as Ge } from "@fileverse/ui";
|
|
6
6
|
var Ze = { exports: {} };
|
|
@@ -2,8 +2,8 @@ import { utils as ht, write as Nt } from "xlsx-js-style";
|
|
|
2
2
|
import { Workbook as Pt } from "exceljs";
|
|
3
3
|
import { toast as Ut } from "@fileverse/ui";
|
|
4
4
|
import { addFortuneImagesToWorksheet as Lt } from "./xlsx-image-utils-Cvg0qxRA.js";
|
|
5
|
-
import { g as jt, c as xt, b as Wt } from "./executeStringFunction-
|
|
6
|
-
import { c as Ct } from "./index-
|
|
5
|
+
import { g as jt, c as xt, b as Wt } from "./executeStringFunction-DLKAY5dk.js";
|
|
6
|
+
import { c as Ct } from "./index-BDIZu4U9.js";
|
|
7
7
|
import { c as zt, g as Mt } from "./xlsx-hyperlink-inline-DzewAypN.js";
|
|
8
8
|
const Zt = {
|
|
9
9
|
1: "thin",
|