@fileverse-dev/dsheet 3.0.1-yjs-1 → 3.0.2
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/{constants-Cdz6oSCq.js → constants-Q8nzbvQO.js} +5 -3
- package/dist/constants.js +1 -1
- package/dist/editor/constants/shared-constants.d.ts +2 -0
- package/dist/{executeStringFunction-B2qjYgmE.js → executeStringFunction-C5hEkx9z.js} +9233 -13453
- package/dist/formula.js +1 -1
- package/dist/{index-C7kCuqoG.js → index-Dql-IRPC.js} +24580 -21253
- package/dist/index.es.js +42 -42
- package/dist/sheet-engine/core/api/cell.d.ts +20 -0
- package/dist/sheet-engine/core/api/common.d.ts +1 -2
- package/dist/sheet-engine/core/api/index.d.ts +0 -1
- package/dist/sheet-engine/core/api/sheet.d.ts +0 -5
- package/dist/sheet-engine/core/modules/formula-worker-bridge.d.ts +0 -1
- package/dist/sheet-engine/core/types.d.ts +0 -3
- package/dist/sheet-engine/react/components/Workbook/api.d.ts +1 -8
- package/dist/sheet-engine/react/components/Workbook/index.d.ts +1 -5
- package/dist/{use-xlsx-import-impl-BQsXcyKJ.js → use-xlsx-import-impl-BsL90Hs0.js} +477 -491
- package/dist/{xlsx-export-impl-BBux0CIG.js → xlsx-export-impl-DfQuhamE.js} +1106 -1106
- package/package.json +2 -2
- package/dist/editor/utils/config-ydoc-update.d.ts +0 -20
- package/dist/observability/publish-trace.d.ts +0 -26
- package/dist/sheet-engine/core/api/sheet-flowdata-lifecycle.d.ts +0 -15
- package/dist/sheet-engine/core/paste/paste-border-utils.d.ts +0 -23
- package/dist/sheet-engine/core/utils/border-config-utils.d.ts +0 -10
- package/dist/sheet-engine/core/utils/cell-persist-utils.d.ts +0 -8
- package/dist/sheet-engine/core/utils/range-format.d.ts +0 -43
package/dist/index.es.js
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { C as s, a as t, b as o, S as
|
|
2
|
-
import {
|
|
1
|
+
import { C as s, a as t, b as o, S as r, d as l, i as n, e as i, T as d, f as S, g as c, h, j as m, k as p, l as C, n as u, o as E, p as F, q as g, s as x, t as R, u as L, v as f, w as A, x as I, z as w, A as T, B as b, D as v, E as M, F as D, G as k, H as V, I as X, J as z, K as P, L as U, M as _, N as y } from "./index-Dql-IRPC.js";
|
|
2
|
+
import { bW as G, bX as H, bY as O, c0 as j, bi as J, e as K, f as N, h as Y, a as q, cm as W, as as Z, cu as Q } from "./executeStringFunction-C5hEkx9z.js";
|
|
3
3
|
import { FLVURL as ee } from "@fileverse-dev/formulajs";
|
|
4
|
-
import { E as se, S as te } from "./constants-
|
|
4
|
+
import { E as se, S as te } from "./constants-Q8nzbvQO.js";
|
|
5
5
|
export {
|
|
6
6
|
s as CommentAction,
|
|
7
7
|
t as CommentCellUI,
|
|
8
8
|
o as CommentsContent,
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
r as DSheetEditor,
|
|
10
|
+
l as DSheetSkeleton,
|
|
11
11
|
se as ERROR_MESSAGES_FLAG,
|
|
12
12
|
ee as FLVURL,
|
|
13
13
|
n as FortuneCore,
|
|
14
14
|
te as SERVICES_API_KEY,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
i as SupportedChain,
|
|
16
|
+
d as TEMPLATES,
|
|
17
|
+
S as api,
|
|
18
|
+
G as clearColumnsCellsFormat,
|
|
19
|
+
c as clearFilter,
|
|
20
|
+
H as clearRowsCellsFormat,
|
|
21
|
+
O as clearSelectedCellFormat,
|
|
22
22
|
h as createFilter,
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
j as deleteRowCol,
|
|
24
|
+
J as deleteSelectedCellText,
|
|
25
25
|
m as describeMatchedShortcut,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
K as executeStringFunction,
|
|
27
|
+
N as formulaResponseUiSync,
|
|
28
|
+
Y as getFlowdata,
|
|
29
29
|
p as getRemoveDuplicatesErrorMessage,
|
|
30
30
|
C as getRemoveDuplicatesPreview,
|
|
31
|
-
|
|
31
|
+
q as getSheetIndex,
|
|
32
32
|
u as handleCSVUpload,
|
|
33
33
|
E as handleCopy,
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
F as handleExportToCSV,
|
|
35
|
+
g as handleExportToJSON,
|
|
36
36
|
x as handleExportToXLSX,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
37
|
+
R as handleFreeze,
|
|
38
|
+
L as handleHorizontalAlign,
|
|
39
|
+
f as handleLink,
|
|
40
|
+
A as handleMerge,
|
|
41
|
+
I as handlePasteByClick,
|
|
42
|
+
w as handleSort,
|
|
43
|
+
T as handleTextSize,
|
|
44
|
+
b as handleVerticalAlign,
|
|
45
|
+
v as importSpreadsheetFile,
|
|
46
|
+
W as insertRowCol,
|
|
47
|
+
M as isBrowserZoomShortcut,
|
|
48
|
+
D as isFormulaListShortcut,
|
|
49
|
+
k as isOpenShortcutsModalShortcut,
|
|
50
|
+
Z as jfrefreshgrid,
|
|
51
|
+
Q as loadLocale,
|
|
52
|
+
V as removeActiveImage,
|
|
53
|
+
X as removeDuplicates,
|
|
54
|
+
z as showImgChooser,
|
|
55
|
+
P as toolbarItemClickHandler,
|
|
56
|
+
U as updateFormat,
|
|
57
|
+
_ as useEnsStatus,
|
|
58
|
+
y as useXLSXImport
|
|
59
59
|
};
|
|
@@ -6,6 +6,26 @@ export declare function getCellValue(ctx: Context, row: number, column: number,
|
|
|
6
6
|
type?: keyof Cell;
|
|
7
7
|
}): any;
|
|
8
8
|
export declare function setCellValue(ctx: Context, row: number, column: number, value: any, cellInput: HTMLDivElement | null, options?: CommonOptions, callAfterUpdate?: boolean): void;
|
|
9
|
+
/**
|
|
10
|
+
* Apply a cell value coming from a remote RTC peer, verbatim.
|
|
11
|
+
*
|
|
12
|
+
* This differs from `setCellValue` in two important ways and must be used for
|
|
13
|
+
* every Yjs-driven remote apply:
|
|
14
|
+
*
|
|
15
|
+
* 1. It NEVER runs the formula engine and NEVER fires the local-edit hooks
|
|
16
|
+
* (`onLocalCellEdit` / `afterUpdateCell`). The peer already computed the
|
|
17
|
+
* value, so we use the synced `v`/`m`/`f` as-is. This avoids both
|
|
18
|
+
* recomputation divergence and an update loop back into Yjs.
|
|
19
|
+
*
|
|
20
|
+
* 2. It PRESERVES the formula calc list. The regular `setCellValue` object
|
|
21
|
+
* branch calls `delFunctionGroup`, which removes the cell from `calcChain`
|
|
22
|
+
* and strips its dependency edges. Because `execFunctionGroup` walks
|
|
23
|
+
* `calcChain` to decide what to recompute, dropping a formula cell there
|
|
24
|
+
* permanently breaks its reactivity on that client (even after RTC stops).
|
|
25
|
+
* Here we instead keep formula cells registered via
|
|
26
|
+
* `insertUpdateFunctionGroup`, so they stay reactive to future local edits
|
|
27
|
+
* on both owner and peer.
|
|
28
|
+
*/
|
|
9
29
|
export declare function applyRemoteCellValue(ctx: Context, row: number, column: number, value: any, options?: CommonOptions): void;
|
|
10
30
|
export declare function clearCell(ctx: Context, row: number, column: number, options?: CommonOptions): void;
|
|
11
31
|
export declare function setCellFormat(ctx: Context, row: number, column: number, attr: keyof Cell, value: any, options?: CommonOptions): void;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Context } from '../context';
|
|
2
2
|
import { CellMatrix, CellWithRowAndCol, Sheet } from '../types';
|
|
3
|
-
import { CellFormatRange } from '../utils/range-format';
|
|
4
3
|
|
|
5
4
|
export type CommonOptions = {
|
|
6
5
|
index?: number;
|
|
7
6
|
id?: string;
|
|
8
7
|
};
|
|
9
8
|
export declare const dataToCelldata: (data: CellMatrix | undefined) => CellWithRowAndCol[];
|
|
10
|
-
export declare const celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number, colCount?: number
|
|
9
|
+
export declare const celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number, colCount?: number) => CellMatrix | null;
|
|
11
10
|
export declare function getSheet(ctx: Context, options?: CommonOptions): Sheet;
|
|
12
11
|
export declare function getSheetWithLatestCelldata(ctx: Context, options?: CommonOptions): {
|
|
13
12
|
celldata: CellWithRowAndCol[];
|
|
@@ -5,11 +5,6 @@ import { CellMatrix, Sheet } from '../types';
|
|
|
5
5
|
export declare function getAllSheets(ctx: Context): Sheet[];
|
|
6
6
|
export { getSheet };
|
|
7
7
|
export declare function initSheetData(draftCtx: Context, index: number, newData: Sheet): CellMatrix | null;
|
|
8
|
-
/** Build dense `data` from sparse `celldata` when a sheet is activated or referenced. */
|
|
9
|
-
export declare function ensureSheetFlowdata(ctx: Context, options?: {
|
|
10
|
-
index?: number;
|
|
11
|
-
id?: string;
|
|
12
|
-
}): CellMatrix | null;
|
|
13
8
|
export declare function hideSheet(ctx: Context, sheetId: string): void;
|
|
14
9
|
export declare function showSheet(ctx: Context, sheetId: string): void;
|
|
15
10
|
export declare function copySheet(ctx: Context, sheetId: string): void;
|
|
@@ -2,7 +2,6 @@ import { Context } from '../context';
|
|
|
2
2
|
import { SnapshotEvalInput, SnapshotEvalOutput, SnapshotFormulaCell, evalFormulasInSnapshot } from './formula-snapshot-eval';
|
|
3
3
|
import { FORMULA_WORKER_CHUNK_SIZE } from './formula-async-eval';
|
|
4
4
|
|
|
5
|
-
export declare function invalidateFormulaWorkerSnapshot(): void;
|
|
6
5
|
export declare function buildSnapshotEvalInput(ctx: Context, formulas: SnapshotFormulaCell[]): SnapshotEvalInput;
|
|
7
6
|
export declare function buildWorkerEvalInput(ctx: Context, formulas: SnapshotFormulaCell[]): Omit<SnapshotEvalInput, 'sheets'>;
|
|
8
7
|
export declare function initFormulaWorkerSnapshot(ctx: Context, snapshotKey: string): boolean;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Patch as ImmerPatch } from 'immer';
|
|
2
2
|
import { PatchOptions } from './utils';
|
|
3
|
-
import { CellFormatRange } from './utils/range-format';
|
|
4
3
|
|
|
5
4
|
export type Op = {
|
|
6
5
|
op: 'replace' | 'remove' | 'add' | 'insertRowCol' | 'deleteRowCol' | 'addSheet' | 'deleteSheet';
|
|
@@ -141,8 +140,6 @@ export type SheetConfig = {
|
|
|
141
140
|
customHeight?: Record<string, number>;
|
|
142
141
|
customWidth?: Record<string, number>;
|
|
143
142
|
borderInfo?: any[];
|
|
144
|
-
/** Range-level cell formatting for empty cells (toolbar bulk format). */
|
|
145
|
-
cellFormatRanges?: CellFormatRange[];
|
|
146
143
|
authority?: any;
|
|
147
144
|
rowReadOnly?: Record<number, number>;
|
|
148
145
|
colReadOnly?: Record<number, number>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CellFormatRange } from '../../../core/utils/range-format';
|
|
2
1
|
import { api, Cell, Context, Op, Range, Selection, Presence, Settings, SingleRange, Sheet, CellMatrix, CellWithRowAndCol, GlobalCache, LiveQueryData } from '../../../core';
|
|
3
2
|
import { getCryptoPrice } from '../../utils/cryptoApi';
|
|
4
3
|
import { SetContextOptions } from '../../context';
|
|
@@ -149,12 +148,6 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
|
|
|
149
148
|
} | null;
|
|
150
149
|
}, options?: api.CommonOptions) => void;
|
|
151
150
|
setSheetMapField: (field: string, value: Record<string, any> | null | undefined, options?: api.CommonOptions) => void;
|
|
152
|
-
/** Merge keys into a map-backed sheet field without replacing the whole map. */
|
|
153
|
-
patchSheetMapField: (field: string, updates: Record<string, any>, deleteKeys?: string[], options?: api.CommonOptions) => void;
|
|
154
|
-
/** Merge sub-keys into sheet.config without replacing the whole config object. */
|
|
155
|
-
setSheetConfigFields: (partial: Record<string, any>, options?: api.CommonOptions & {
|
|
156
|
-
deleteKeys?: string[];
|
|
157
|
-
}) => void;
|
|
158
151
|
setSheetConditionFormatRules: (rules: any[], options?: api.CommonOptions) => void;
|
|
159
152
|
scroll: (options: {
|
|
160
153
|
scrollLeft?: number;
|
|
@@ -173,7 +166,7 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
|
|
|
173
166
|
calculateSubSheetFormula: (id: string) => void;
|
|
174
167
|
calculateCellReferencedSubSheetFormula: (id: string, refCell?: string[]) => void;
|
|
175
168
|
dataToCelldata: (data: CellMatrix | undefined) => CellWithRowAndCol[];
|
|
176
|
-
celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number, colCount?: number
|
|
169
|
+
celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number, colCount?: number) => CellMatrix | null;
|
|
177
170
|
insertFunction: (selectedFuncIndex: number, filteredFunctionList: any[], callback?: () => void) => void;
|
|
178
171
|
getLocaleContext: () => any;
|
|
179
172
|
getWorkbookContext: () => Context;
|
|
@@ -150,10 +150,6 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
|
|
|
150
150
|
} | null;
|
|
151
151
|
}, options?: api.CommonOptions) => void;
|
|
152
152
|
setSheetMapField: (field: string, value: Record<string, any> | null | undefined, options?: api.CommonOptions) => void;
|
|
153
|
-
patchSheetMapField: (field: string, updates: Record<string, any>, deleteKeys?: string[], options?: api.CommonOptions) => void;
|
|
154
|
-
setSheetConfigFields: (partial: Record<string, any>, options?: api.CommonOptions & {
|
|
155
|
-
deleteKeys?: string[];
|
|
156
|
-
}) => void;
|
|
157
153
|
setSheetConditionFormatRules: (rules: any[], options?: api.CommonOptions) => void;
|
|
158
154
|
scroll: (options: {
|
|
159
155
|
scrollLeft?: number;
|
|
@@ -172,7 +168,7 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
|
|
|
172
168
|
calculateSubSheetFormula: (id: string) => void;
|
|
173
169
|
calculateCellReferencedSubSheetFormula: (id: string, refCell?: string[]) => void;
|
|
174
170
|
dataToCelldata: (data: CellMatrix | undefined) => CellWithRowAndCol[];
|
|
175
|
-
celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number, colCount?: number
|
|
171
|
+
celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number, colCount?: number) => CellMatrix | null;
|
|
176
172
|
insertFunction: (selectedFuncIndex: number, filteredFunctionList: any[], callback?: () => void) => void;
|
|
177
173
|
getLocaleContext: () => any;
|
|
178
174
|
getWorkbookContext: () => Context;
|