@fileverse-dev/dsheet 4.0.2 → 4.0.3-import-compaction.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/utils/import-compaction.d.ts +25 -0
- package/dist/editor/utils/xlsx-import-pipeline.d.ts +25 -0
- package/dist/{executeStringFunction-BQvE7aeV.js → executeStringFunction-C1C2F-4h.js} +15 -13
- package/dist/formula.js +1 -1
- package/dist/{index-Bw9u774w.js → index-CtF9qA4V.js} +3472 -3382
- package/dist/index.es.js +6 -6
- package/dist/sheet-engine/core/api/common.d.ts +1 -0
- package/dist/sheet-engine/core/types.d.ts +2 -0
- package/dist/sheet-engine/react/components/Workbook/api.d.ts +1 -0
- package/dist/sheet-engine/react/components/Workbook/index.d.ts +1 -0
- package/dist/use-xlsx-import-impl-DC5xEiJb.js +1895 -0
- package/dist/worker/dsheet-worker-client.d.ts +14 -0
- package/dist/worker/dsheet-worker.d.ts +14 -0
- package/dist/{xlsx-export-impl-BXPAAWnu.js → xlsx-export-impl-DZRu--sN.js} +300 -298
- package/package.json +2 -1
- package/dist/use-xlsx-import-impl-KgnUKKnW.js +0 -1572
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Sheet } from '../../sheet-engine/react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* XLSX imports (Google Sheets exports especially) materialize every
|
|
5
|
+
* styled-but-empty cell. Move those into config.cellFormatRanges — the same
|
|
6
|
+
* sparse representation the editor uses — so they never inflate celldata/Yjs.
|
|
7
|
+
* Cells with content, merges, hyperlinks, notes or masks are kept verbatim.
|
|
8
|
+
*/
|
|
9
|
+
export declare function compactImportedSheetFormatting(sheet: Sheet): void;
|
|
10
|
+
/**
|
|
11
|
+
* Imported validations repeat the full option list + per-option color string
|
|
12
|
+
* on every covered cell (whole-column dropdowns → thousands of copies). Store
|
|
13
|
+
* each unique entry once in dataVerificationDefs and keep numeric refs in the
|
|
14
|
+
* per-cell map; expandSheetDataVerification restores objects for the engine.
|
|
15
|
+
*/
|
|
16
|
+
export declare function internImportedDataVerification(sheet: Sheet): void;
|
|
17
|
+
/**
|
|
18
|
+
* Resolve interned dataVerification refs back to shared entry objects before
|
|
19
|
+
* the sheet reaches the engine or the XLSX exporter. No-op (and no mutation)
|
|
20
|
+
* when the map already holds objects, so live workbook sheets pass through.
|
|
21
|
+
*/
|
|
22
|
+
export declare function expandSheetDataVerification<T extends {
|
|
23
|
+
dataVerification?: unknown;
|
|
24
|
+
dataVerificationDefs?: unknown;
|
|
25
|
+
}>(sheet: T): T;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Sheet } from '../../sheet-engine/react';
|
|
2
|
+
|
|
3
|
+
export declare function generateImportSheetId(): string;
|
|
4
|
+
export type XlsxImportWarning = {
|
|
5
|
+
code: 'tables-unsupported';
|
|
6
|
+
} | {
|
|
7
|
+
code: 'filters-unsupported';
|
|
8
|
+
};
|
|
9
|
+
export type XlsxParseSettings = {
|
|
10
|
+
/** Workbook default column width in px (from the live workbook settings, if any). */
|
|
11
|
+
workbookDefaultColWidth?: number;
|
|
12
|
+
/** Workbook default row height in px (from the live workbook settings, if any). */
|
|
13
|
+
workbookDefaultRowHeight?: number;
|
|
14
|
+
};
|
|
15
|
+
export type XlsxParsedWorkbook = {
|
|
16
|
+
/** Decorated + compacted sheets, ready for the ydoc write. */
|
|
17
|
+
sheets: Sheet[];
|
|
18
|
+
/** Workbook name from luckyexcel info (extension not yet stripped). */
|
|
19
|
+
workbookName: string;
|
|
20
|
+
/** UI warnings to replay on the main thread (toasts/onWarning). */
|
|
21
|
+
warnings: XlsxImportWarning[];
|
|
22
|
+
/** Sheet ids this pipeline generated — the caller may remap them with a custom generator. */
|
|
23
|
+
generatedSheetIds: string[];
|
|
24
|
+
};
|
|
25
|
+
export declare function parseXlsxWorkbook(file: File, settings?: XlsxParseSettings): Promise<XlsxParsedWorkbook>;
|
|
@@ -32612,19 +32612,21 @@ export {
|
|
|
32612
32612
|
cg as e7,
|
|
32613
32613
|
fg as e8,
|
|
32614
32614
|
fu as e9,
|
|
32615
|
-
|
|
32616
|
-
|
|
32617
|
-
|
|
32618
|
-
|
|
32619
|
-
|
|
32620
|
-
|
|
32621
|
-
|
|
32622
|
-
|
|
32623
|
-
|
|
32624
|
-
|
|
32625
|
-
|
|
32626
|
-
|
|
32627
|
-
|
|
32615
|
+
dc as ea,
|
|
32616
|
+
zn as eb,
|
|
32617
|
+
Wp as ec,
|
|
32618
|
+
vc as ed,
|
|
32619
|
+
Up as ee,
|
|
32620
|
+
Pp as ef,
|
|
32621
|
+
Ap as eg,
|
|
32622
|
+
xp as eh,
|
|
32623
|
+
tc as ei,
|
|
32624
|
+
Dp as ej,
|
|
32625
|
+
wa as ek,
|
|
32626
|
+
Do as el,
|
|
32627
|
+
Ip as em,
|
|
32628
|
+
qp as en,
|
|
32629
|
+
Ju as eo,
|
|
32628
32630
|
Mp as f,
|
|
32629
32631
|
As as g,
|
|
32630
32632
|
Ff as h,
|
package/dist/formula.js
CHANGED