@silurus/ooxml 0.76.1 → 0.77.0
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/README.md +144 -32
- package/dist/{canvas-viewer-mechanics-CwVSOYke.js → canvas-viewer-mechanics-DTkBvITv.js} +318 -152
- package/dist/{document-pull-client-AAnwzlig.js → document-pull-client-iWr8-S7P.js} +4829 -4210
- package/dist/{docx-CCksIXd5.js → docx-B1gYS6eU.js} +612 -191
- package/dist/docx.mjs +3 -3
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/index.mjs +3 -3
- package/dist/node.mjs +5 -5
- package/dist/{pptx-CKAk5e-J.js → pptx-CQjtK_o7.js} +646 -258
- package/dist/pptx.mjs +4 -4
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/{render-CLcpSi0m.js → render-Ca80nlG5.js} +1 -1
- package/dist/{render-worker-host-Bkf1jUcW.js → render-worker-host-BozYMmxO.js} +1 -1
- package/dist/render-worker-host-C96AiK8e.js +27 -0
- package/dist/{render-worker-host-CKOmXdyr.js → render-worker-host-EHG5j8FK.js} +1 -1
- package/dist/{session-B4Y54cbT.js → session-KvKxQAeL.js} +1 -1
- package/dist/{slide-pull-client-WCuYCjio.js → slide-pull-client-BXb67StB.js} +15 -11
- package/dist/types/docx.d.ts +130 -28
- package/dist/types/index.d.ts +414 -87
- package/dist/types/node.d.ts +36 -20
- package/dist/types/pptx.d.ts +136 -10
- package/dist/types/xlsx.d.ts +176 -55
- package/dist/{xlsx-BBmmZNQn.js → xlsx-RLCmd1Bm.js} +2074 -1140
- package/dist/xlsx.mjs +4 -4
- package/package.json +3 -2
- package/dist/render-worker-host-B8HAb_sK.js +0 -27
package/dist/types/xlsx.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ interface MathRenderer {
|
|
|
10
10
|
mathMLToSvg(mathml: string): Promise<MathSvg>;
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
|
-
//#region dist/.types-work/hyperlink-
|
|
13
|
+
//#region dist/.types-work/hyperlink-BqgLAFOG.d.ts
|
|
14
14
|
type MathStyle = 'roman' | 'italic' | 'bold' | 'boldItalic';
|
|
15
15
|
interface MathRun {
|
|
16
16
|
kind: 'run';
|
|
@@ -372,9 +372,14 @@ interface LegendManualLayout {
|
|
|
372
372
|
w: number;
|
|
373
373
|
h: number;
|
|
374
374
|
}
|
|
375
|
+
interface ChartRect {
|
|
376
|
+
x: number;
|
|
377
|
+
y: number;
|
|
378
|
+
w: number;
|
|
379
|
+
h: number;
|
|
380
|
+
}
|
|
375
381
|
type OoxmlErrorCode = 'encrypted' | 'invalid-password' | 'unsupported-encryption' | 'legacy-binary-format' | 'not-ooxml';
|
|
376
382
|
type OoxmlErrorStage = 'container' | 'decompression' | 'parsing' | 'serialization' | 'layout' | 'rendering' | 'worker';
|
|
377
|
-
type OoxmlErrorSource = 'container' | 'zip-part' | 'parser' | 'serializer' | 'layout' | 'renderer' | 'worker';
|
|
378
383
|
declare class OoxmlError extends Error {
|
|
379
384
|
readonly code: OoxmlErrorCode;
|
|
380
385
|
constructor(code: OoxmlErrorCode, message: string);
|
|
@@ -475,7 +480,11 @@ type HyperlinkTarget = {
|
|
|
475
480
|
};
|
|
476
481
|
declare function openExternalHyperlink(url: string, allowed?: readonly string[], win?: Pick<Window, 'open'> | undefined): boolean;
|
|
477
482
|
//#endregion
|
|
478
|
-
//#region dist/.types-work/find-highlight-
|
|
483
|
+
//#region dist/.types-work/find-highlight-DcNlrW8O.d.ts
|
|
484
|
+
interface ViewerContextMenuEvent<TContext> {
|
|
485
|
+
readonly originalEvent: MouseEvent;
|
|
486
|
+
getContext(): Promise<TContext | null>;
|
|
487
|
+
}
|
|
479
488
|
interface AutoResizeOptions {
|
|
480
489
|
pauseWhenHidden?: boolean;
|
|
481
490
|
}
|
|
@@ -501,7 +510,7 @@ interface FindHighlightColors {
|
|
|
501
510
|
active?: string;
|
|
502
511
|
}
|
|
503
512
|
//#endregion
|
|
504
|
-
//#region dist/.types-work/xlsx-
|
|
513
|
+
//#region dist/.types-work/xlsx-DrlamDaR.d.ts
|
|
505
514
|
interface Workbook {
|
|
506
515
|
sheets: SheetMeta[];
|
|
507
516
|
date1904?: boolean;
|
|
@@ -543,7 +552,7 @@ interface Worksheet {
|
|
|
543
552
|
rightToLeft?: boolean;
|
|
544
553
|
outlinePr?: OutlinePr;
|
|
545
554
|
tabColor?: string | null;
|
|
546
|
-
autoFilter?:
|
|
555
|
+
autoFilter?: WorksheetCellRange | null;
|
|
547
556
|
hyperlinks?: Hyperlink[];
|
|
548
557
|
commentRefs?: string[];
|
|
549
558
|
comments?: XlsxComment[];
|
|
@@ -574,7 +583,7 @@ interface PivotTableMetadata {
|
|
|
574
583
|
status: PivotMetadataStatus;
|
|
575
584
|
extensionUris?: string[];
|
|
576
585
|
}
|
|
577
|
-
interface PivotLocation extends
|
|
586
|
+
interface PivotLocation extends WorksheetCellRange {
|
|
578
587
|
firstHeaderRow: number;
|
|
579
588
|
firstDataRow: number;
|
|
580
589
|
firstDataCol: number;
|
|
@@ -717,7 +726,7 @@ interface SlicerElementStyle {
|
|
|
717
726
|
borderColor?: string;
|
|
718
727
|
}
|
|
719
728
|
interface TableInfo {
|
|
720
|
-
range:
|
|
729
|
+
range: WorksheetCellRange;
|
|
721
730
|
styleName: string;
|
|
722
731
|
headerRowCount: number;
|
|
723
732
|
totalsRowCount: number;
|
|
@@ -762,12 +771,6 @@ interface DataValidation {
|
|
|
762
771
|
errorTitle?: string;
|
|
763
772
|
errorMessage?: string;
|
|
764
773
|
}
|
|
765
|
-
type XlsxChartSeries = ChartSeries;
|
|
766
|
-
type SeriesDataLabels = ChartSeriesDataLabels;
|
|
767
|
-
type DataLabelOverride = ChartDataLabelOverride;
|
|
768
|
-
type DataPointOverride = ChartDataPointOverride;
|
|
769
|
-
type ErrBars = ChartErrBars;
|
|
770
|
-
type ManualLayout = ChartManualLayout;
|
|
771
774
|
interface ChartAnchor {
|
|
772
775
|
fromCol: number;
|
|
773
776
|
fromColOff: number;
|
|
@@ -932,7 +935,7 @@ interface ImageAnchor {
|
|
|
932
935
|
alpha?: number;
|
|
933
936
|
duotone?: Duotone;
|
|
934
937
|
}
|
|
935
|
-
interface
|
|
938
|
+
interface WorksheetCellRange {
|
|
936
939
|
top: number;
|
|
937
940
|
left: number;
|
|
938
941
|
bottom: number;
|
|
@@ -946,7 +949,7 @@ interface Hyperlink {
|
|
|
946
949
|
display?: string | null;
|
|
947
950
|
}
|
|
948
951
|
interface ConditionalFormat {
|
|
949
|
-
sqref:
|
|
952
|
+
sqref: WorksheetCellRange[];
|
|
950
953
|
rules: CfRule[];
|
|
951
954
|
}
|
|
952
955
|
type CfRule = {
|
|
@@ -1181,7 +1184,7 @@ interface XlsxTextRunInfo {
|
|
|
1181
1184
|
row: number;
|
|
1182
1185
|
col: number;
|
|
1183
1186
|
}
|
|
1184
|
-
interface
|
|
1187
|
+
interface XlsxRenderViewportOptions {
|
|
1185
1188
|
width?: number;
|
|
1186
1189
|
height?: number;
|
|
1187
1190
|
dpr?: number;
|
|
@@ -1192,8 +1195,6 @@ interface RenderViewportOptions {
|
|
|
1192
1195
|
freezeRows?: number;
|
|
1193
1196
|
freezeCols?: number;
|
|
1194
1197
|
cellScale?: number;
|
|
1195
|
-
loadedImages?: Map<string, CanvasImageSource | null>;
|
|
1196
|
-
fetchImage?: (path: string, mimeType: string) => Promise<Blob>;
|
|
1197
1198
|
onTextRun?: (info: XlsxTextRunInfo) => void;
|
|
1198
1199
|
selectedRowRange?: {
|
|
1199
1200
|
start: number;
|
|
@@ -1213,12 +1214,9 @@ type ResolvedList = {
|
|
|
1213
1214
|
kind: 'formula';
|
|
1214
1215
|
formula: string;
|
|
1215
1216
|
};
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
}
|
|
1220
|
-
type WireRenderViewportOptions = Omit<RenderViewportOptions, 'onTextRun' | 'loadedImages' | 'fetchImage'> & {
|
|
1221
|
-
sizeOverrides?: WireSizeOverrides;
|
|
1217
|
+
type RenderViewportToBitmapOptions = Omit<XlsxRenderViewportOptions, 'onTextRun'> & {
|
|
1218
|
+
width: number;
|
|
1219
|
+
height: number;
|
|
1222
1220
|
};
|
|
1223
1221
|
interface LoadOptions extends LoadOptions$1 {
|
|
1224
1222
|
mode?: 'main' | 'worker';
|
|
@@ -1267,16 +1265,97 @@ declare class XlsxWorkbook {
|
|
|
1267
1265
|
toMarkdown(): Promise<string>;
|
|
1268
1266
|
resolveValidationList(sheetIndex: number, formula1: string | undefined): Promise<ResolvedList>;
|
|
1269
1267
|
cellText(ws: Worksheet, cell: Cell): string;
|
|
1270
|
-
renderViewport(target: HTMLCanvasElement | OffscreenCanvas, sheetIndex: number, viewport: ViewportRange, opts?:
|
|
1271
|
-
renderViewportToBitmap(sheetIndex: number, viewport: ViewportRange, opts:
|
|
1272
|
-
width: number;
|
|
1273
|
-
height: number;
|
|
1274
|
-
}): Promise<ImageBitmap>;
|
|
1268
|
+
renderViewport(target: HTMLCanvasElement | OffscreenCanvas, sheetIndex: number, viewport: ViewportRange, opts?: XlsxRenderViewportOptions): Promise<void>;
|
|
1269
|
+
renderViewportToBitmap(sheetIndex: number, viewport: ViewportRange, opts: RenderViewportToBitmapOptions): Promise<ImageBitmap>;
|
|
1275
1270
|
private withWorksheetArchiveOperation;
|
|
1276
1271
|
destroy(): void;
|
|
1277
1272
|
private assertResourceHealthy;
|
|
1278
1273
|
}
|
|
1279
1274
|
type CanvasViewerRenderMode = 'main' | 'worker';
|
|
1275
|
+
interface CellAddress {
|
|
1276
|
+
row: number;
|
|
1277
|
+
col: number;
|
|
1278
|
+
}
|
|
1279
|
+
type XlsxSelectionArea = Readonly<{
|
|
1280
|
+
kind: 'cells';
|
|
1281
|
+
top: number;
|
|
1282
|
+
left: number;
|
|
1283
|
+
bottom: number;
|
|
1284
|
+
right: number;
|
|
1285
|
+
}> | Readonly<{
|
|
1286
|
+
kind: 'rows';
|
|
1287
|
+
firstRow: number;
|
|
1288
|
+
lastRow: number;
|
|
1289
|
+
}> | Readonly<{
|
|
1290
|
+
kind: 'columns';
|
|
1291
|
+
firstColumn: number;
|
|
1292
|
+
lastColumn: number;
|
|
1293
|
+
}> | Readonly<{
|
|
1294
|
+
kind: 'sheet';
|
|
1295
|
+
}>;
|
|
1296
|
+
interface XlsxSelectionState {
|
|
1297
|
+
readonly areas: readonly XlsxSelectionArea[];
|
|
1298
|
+
readonly activeAreaIndex: number;
|
|
1299
|
+
readonly activeCell: CellAddress;
|
|
1300
|
+
readonly extensionAnchor: CellAddress;
|
|
1301
|
+
}
|
|
1302
|
+
type XlsxSelectionInput = string | XlsxSelectionState | null;
|
|
1303
|
+
interface XlsxSelectionContextOptions {
|
|
1304
|
+
readonly maxCells?: number;
|
|
1305
|
+
readonly maxTextCharacters?: number;
|
|
1306
|
+
}
|
|
1307
|
+
interface XlsxSelectionContextCell {
|
|
1308
|
+
readonly address: CellAddress;
|
|
1309
|
+
readonly displayText: string;
|
|
1310
|
+
readonly valueType: 'empty' | 'text' | 'number' | 'bool' | 'error' | 'shared';
|
|
1311
|
+
readonly value: string | number | boolean | null;
|
|
1312
|
+
readonly formula?: string;
|
|
1313
|
+
}
|
|
1314
|
+
interface XlsxRangeSelectionContext {
|
|
1315
|
+
readonly format: 'xlsx';
|
|
1316
|
+
readonly kind: 'range';
|
|
1317
|
+
readonly sheetIndex: number;
|
|
1318
|
+
readonly sheetName: string;
|
|
1319
|
+
readonly selection: XlsxSelectionState;
|
|
1320
|
+
readonly coordinateCountUpperBound: number;
|
|
1321
|
+
readonly cells: readonly XlsxSelectionContextCell[];
|
|
1322
|
+
readonly truncated: boolean;
|
|
1323
|
+
readonly truncationReasons: readonly ('cells' | 'text')[];
|
|
1324
|
+
readonly maxCells: number;
|
|
1325
|
+
readonly textCharacters: number;
|
|
1326
|
+
readonly maxTextCharacters: number;
|
|
1327
|
+
}
|
|
1328
|
+
interface XlsxElementAnchorMarker {
|
|
1329
|
+
readonly row: number;
|
|
1330
|
+
readonly col: number;
|
|
1331
|
+
readonly offsetX: number;
|
|
1332
|
+
readonly offsetY: number;
|
|
1333
|
+
}
|
|
1334
|
+
interface XlsxElementContext {
|
|
1335
|
+
readonly format: 'xlsx';
|
|
1336
|
+
readonly kind: 'element';
|
|
1337
|
+
readonly sheetIndex: number;
|
|
1338
|
+
readonly sheetName: string;
|
|
1339
|
+
readonly elementType: 'chart' | 'image' | 'shape';
|
|
1340
|
+
readonly elementIndex: number;
|
|
1341
|
+
readonly shapeIndex?: number;
|
|
1342
|
+
readonly anchor: Readonly<{
|
|
1343
|
+
from: XlsxElementAnchorMarker;
|
|
1344
|
+
to: XlsxElementAnchorMarker;
|
|
1345
|
+
}>;
|
|
1346
|
+
readonly text?: string;
|
|
1347
|
+
readonly mimeType?: string;
|
|
1348
|
+
readonly seriesCount?: number;
|
|
1349
|
+
readonly shapeCount?: number;
|
|
1350
|
+
readonly truncated: boolean;
|
|
1351
|
+
readonly truncationReasons: readonly ('text')[];
|
|
1352
|
+
readonly textCharacters: number;
|
|
1353
|
+
readonly maxTextCharacters: number;
|
|
1354
|
+
}
|
|
1355
|
+
type XlsxSelectionContext = XlsxRangeSelectionContext | XlsxElementContext;
|
|
1356
|
+
declare const MAX_SELECTION_AREAS = 128;
|
|
1357
|
+
declare const MAX_SELECTION_CONTEXT_CELLS = 10000;
|
|
1358
|
+
declare const MAX_SELECTION_CONTEXT_TEXT_CHARACTERS: number;
|
|
1280
1359
|
interface XlsxMatchLocation {
|
|
1281
1360
|
sheet: number;
|
|
1282
1361
|
sheetName: string;
|
|
@@ -1285,21 +1364,24 @@ interface XlsxMatchLocation {
|
|
|
1285
1364
|
col: number;
|
|
1286
1365
|
}
|
|
1287
1366
|
type HiddenSheetMode = 'show' | 'skip' | 'dim';
|
|
1288
|
-
interface XlsxSheetViewerOptions extends LoadOptions
|
|
1367
|
+
interface XlsxSheetViewerOptions extends LoadOptions {
|
|
1289
1368
|
cellScale?: number;
|
|
1290
1369
|
resizable?: boolean;
|
|
1370
|
+
showScrollbars?: boolean;
|
|
1291
1371
|
zoomMin?: number;
|
|
1292
1372
|
zoomMax?: number;
|
|
1293
1373
|
onScaleChange?: (scale: number) => void;
|
|
1294
1374
|
onReady?: (sheetNames: string[]) => void;
|
|
1295
1375
|
onSheetChange?: (index: number, total: number) => void;
|
|
1296
1376
|
onError?: (err: Error) => void;
|
|
1297
|
-
|
|
1377
|
+
onSelectionStateChange?: (selection: XlsxSelectionState | null) => void;
|
|
1378
|
+
onSelectionContextChange?: (context: XlsxSelectionContext | null) => void;
|
|
1379
|
+
onContextMenu?: (event: ViewerContextMenuEvent<XlsxSelectionContext>) => void;
|
|
1380
|
+
enableElementSelection?: boolean;
|
|
1298
1381
|
onHyperlinkClick?: (target: HyperlinkTarget) => void;
|
|
1299
1382
|
enableHyperlinks?: boolean;
|
|
1300
1383
|
selectionColor?: string;
|
|
1301
1384
|
findHighlightColors?: FindHighlightColors;
|
|
1302
|
-
mode?: 'main' | 'worker';
|
|
1303
1385
|
hiddenSheetMode?: HiddenSheetMode;
|
|
1304
1386
|
onViewportChange?: (offset: XlsxViewportOffset) => void;
|
|
1305
1387
|
}
|
|
@@ -1313,16 +1395,22 @@ interface XlsxViewportOffset {
|
|
|
1313
1395
|
interface XlsxScrollToCellOptions {
|
|
1314
1396
|
readonly align?: 'nearest' | 'start' | 'center' | 'end';
|
|
1315
1397
|
}
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1398
|
+
type XlsxCopyResult = Readonly<{
|
|
1399
|
+
status: 'copied';
|
|
1400
|
+
cellCount: number;
|
|
1401
|
+
utf16CodeUnits: number;
|
|
1402
|
+
}> | Readonly<{
|
|
1403
|
+
status: 'empty-selection';
|
|
1404
|
+
}> | Readonly<{
|
|
1405
|
+
status: 'unsupported-multiple-areas';
|
|
1406
|
+
}> | Readonly<{
|
|
1407
|
+
status: 'too-large';
|
|
1408
|
+
limit: 'cells' | 'text';
|
|
1409
|
+
}> | Readonly<{
|
|
1410
|
+
status: 'clipboard-unavailable';
|
|
1411
|
+
}> | Readonly<{
|
|
1412
|
+
status: 'clipboard-denied';
|
|
1413
|
+
}>;
|
|
1326
1414
|
type XlsxViewerMount = {
|
|
1327
1415
|
readonly kind: 'composite';
|
|
1328
1416
|
} | {
|
|
@@ -1374,6 +1462,7 @@ declare class XlsxViewerEngine implements ZoomableViewer {
|
|
|
1374
1462
|
private sheetViews;
|
|
1375
1463
|
private opts;
|
|
1376
1464
|
private readonly _mountKind;
|
|
1465
|
+
private readonly _nativeScrollbars;
|
|
1377
1466
|
private readonly _mode;
|
|
1378
1467
|
private _borrowed;
|
|
1379
1468
|
private preparedWorkbook;
|
|
@@ -1381,22 +1470,34 @@ declare class XlsxViewerEngine implements ZoomableViewer {
|
|
|
1381
1470
|
private resizeObserver;
|
|
1382
1471
|
private _lastViewportNotification;
|
|
1383
1472
|
private get anchorCell();
|
|
1384
|
-
private set anchorCell(value);
|
|
1385
1473
|
private get activeCell();
|
|
1386
|
-
private set activeCell(value);
|
|
1387
1474
|
private get selectionMode();
|
|
1388
|
-
private set selectionMode(value);
|
|
1389
1475
|
private get isSelecting();
|
|
1390
|
-
private
|
|
1476
|
+
private get selectionPointerId();
|
|
1477
|
+
private beginSelectionDrag;
|
|
1391
1478
|
private _pendingZoomAnchor;
|
|
1392
1479
|
private readonly selectionController;
|
|
1480
|
+
private lastNotifiedSelectionState;
|
|
1481
|
+
private emittingSelectionChange;
|
|
1482
|
+
private pendingSelectionChange;
|
|
1483
|
+
private selectionNotificationScheduled;
|
|
1484
|
+
private selectionNotificationCount;
|
|
1485
|
+
private selectionContextNotificationFrame;
|
|
1486
|
+
private selectionContextNotificationMicrotask;
|
|
1487
|
+
private readonly selectionContextRows;
|
|
1488
|
+
private readonly selectionContextCells;
|
|
1489
|
+
private elementContext;
|
|
1393
1490
|
private selectionOverlay;
|
|
1394
1491
|
private findOverlay;
|
|
1395
1492
|
private _find;
|
|
1396
1493
|
private keydownHandler;
|
|
1397
1494
|
private pendingTap;
|
|
1398
1495
|
private pendingClick;
|
|
1496
|
+
private pendingElementClick;
|
|
1399
1497
|
private resizeDrag;
|
|
1498
|
+
private selectionAutoScrollPointer;
|
|
1499
|
+
private selectionAutoScrollFrame;
|
|
1500
|
+
private selectionAutoScrollLastTime;
|
|
1400
1501
|
private commentPopup;
|
|
1401
1502
|
private commentMap;
|
|
1402
1503
|
private hyperlinkMap;
|
|
@@ -1417,7 +1518,7 @@ declare class XlsxViewerEngine implements ZoomableViewer {
|
|
|
1417
1518
|
private get workbook();
|
|
1418
1519
|
private get wb();
|
|
1419
1520
|
private set wb(value);
|
|
1420
|
-
showSheet
|
|
1521
|
+
private showSheet;
|
|
1421
1522
|
private isCurrentSheetRequest;
|
|
1422
1523
|
private buildOutline;
|
|
1423
1524
|
private layoutGutters;
|
|
@@ -1460,9 +1561,18 @@ declare class XlsxViewerEngine implements ZoomableViewer {
|
|
|
1460
1561
|
private _stepSheet;
|
|
1461
1562
|
private _initialSheet;
|
|
1462
1563
|
getCellAt(clientX: number, clientY: number): CellAddress | null;
|
|
1564
|
+
private elementContextViewport;
|
|
1565
|
+
private elementContextAt;
|
|
1463
1566
|
private getCellRect;
|
|
1464
|
-
get
|
|
1465
|
-
|
|
1567
|
+
get selectionState(): XlsxSelectionState | null;
|
|
1568
|
+
setSelection(input: XlsxSelectionInput): void;
|
|
1569
|
+
getSelectionContext(options?: XlsxSelectionContextOptions): XlsxSelectionContext | null;
|
|
1570
|
+
private commitSelection;
|
|
1571
|
+
private setElementContext;
|
|
1572
|
+
private scheduleSelectionContextNotification;
|
|
1573
|
+
private emitSelectionChange;
|
|
1574
|
+
private scheduleSelectionNotification;
|
|
1575
|
+
private finishSelectionNotificationChain;
|
|
1466
1576
|
private getHeaderHit;
|
|
1467
1577
|
private getResizeTarget;
|
|
1468
1578
|
private applyResize;
|
|
@@ -1470,8 +1580,9 @@ declare class XlsxViewerEngine implements ZoomableViewer {
|
|
|
1470
1580
|
setHiddenSheetMode(mode: HiddenSheetMode): Promise<void>;
|
|
1471
1581
|
get hiddenSheetMode(): HiddenSheetMode;
|
|
1472
1582
|
get visibleSheetCount(): number;
|
|
1473
|
-
|
|
1583
|
+
copySelection(): Promise<XlsxCopyResult>;
|
|
1474
1584
|
private updateSelectionOverlay;
|
|
1585
|
+
private drawElementContextOverlay;
|
|
1475
1586
|
private maybeDrawValidationDropdown;
|
|
1476
1587
|
private updateFindOverlay;
|
|
1477
1588
|
findText(query: string, opts?: FindMatchesOptions): Promise<FindMatch<XlsxMatchLocation>[]>;
|
|
@@ -1496,6 +1607,14 @@ declare class XlsxViewerEngine implements ZoomableViewer {
|
|
|
1496
1607
|
private renderCommentPopup;
|
|
1497
1608
|
private hideCommentPopup;
|
|
1498
1609
|
private applyPointerSelection;
|
|
1610
|
+
private viewportInputBounds;
|
|
1611
|
+
private extendDragSelection;
|
|
1612
|
+
private selectionAutoScrollSpeed;
|
|
1613
|
+
private trackSelectionAutoScroll;
|
|
1614
|
+
private runSelectionAutoScroll;
|
|
1615
|
+
private stopSelectionAutoScroll;
|
|
1616
|
+
private contextMenuTargetIsSelected;
|
|
1617
|
+
private resolveContextMenuContext;
|
|
1499
1618
|
private setupSelectionEvents;
|
|
1500
1619
|
private buildTabs;
|
|
1501
1620
|
private makeNavButton;
|
|
@@ -1530,7 +1649,7 @@ declare class XlsxViewerEngine implements ZoomableViewer {
|
|
|
1530
1649
|
private destroyedError;
|
|
1531
1650
|
}
|
|
1532
1651
|
declare class XlsxViewer extends XlsxViewerEngine {
|
|
1533
|
-
static fromWorkbook(container: HTMLElement, workbook: XlsxWorkbook, opts?: Omit<XlsxViewerOptions, keyof LoadOptions
|
|
1652
|
+
static fromWorkbook(container: HTMLElement, workbook: XlsxWorkbook, opts?: Omit<XlsxViewerOptions, keyof LoadOptions>): Omit<XlsxViewer, 'load'>;
|
|
1534
1653
|
constructor(container: HTMLElement, opts?: XlsxViewerOptions);
|
|
1535
1654
|
}
|
|
1536
1655
|
declare class XlsxSheetViewer implements ZoomableViewer {
|
|
@@ -1540,7 +1659,7 @@ declare class XlsxSheetViewer implements ZoomableViewer {
|
|
|
1540
1659
|
private destroyed;
|
|
1541
1660
|
private snapshot;
|
|
1542
1661
|
private lastMetrics;
|
|
1543
|
-
static fromWorkbook(canvasElement: HTMLCanvasElement, workbook: XlsxWorkbook, options?: Omit<XlsxSheetViewerOptions, keyof LoadOptions
|
|
1662
|
+
static fromWorkbook(canvasElement: HTMLCanvasElement, workbook: XlsxWorkbook, options?: Omit<XlsxSheetViewerOptions, keyof LoadOptions>): Omit<XlsxSheetViewer, 'load'>;
|
|
1544
1663
|
constructor(canvasElement: HTMLCanvasElement, options?: XlsxSheetViewerOptions);
|
|
1545
1664
|
load(source: string | ArrayBuffer): Promise<void>;
|
|
1546
1665
|
get sheetIndex(): number;
|
|
@@ -1560,8 +1679,10 @@ declare class XlsxSheetViewer implements ZoomableViewer {
|
|
|
1560
1679
|
fitWidth(): void;
|
|
1561
1680
|
fitPage(): void;
|
|
1562
1681
|
getCellAt(clientX: number, clientY: number): CellAddress | null;
|
|
1563
|
-
get
|
|
1564
|
-
|
|
1682
|
+
get selectionState(): XlsxSelectionState | null;
|
|
1683
|
+
setSelection(selection: XlsxSelectionInput): void;
|
|
1684
|
+
getSelectionContext(options?: XlsxSelectionContextOptions): XlsxSelectionContext | null;
|
|
1685
|
+
copySelection(): Promise<XlsxCopyResult>;
|
|
1565
1686
|
setSelectionColor(color: string): void;
|
|
1566
1687
|
setHiddenSheetMode(mode: HiddenSheetMode): Promise<void>;
|
|
1567
1688
|
get hiddenSheetMode(): HiddenSheetMode;
|
|
@@ -1578,4 +1699,4 @@ declare class XlsxSheetViewer implements ZoomableViewer {
|
|
|
1578
1699
|
}
|
|
1579
1700
|
declare function resolveSharedStrings(ws: Worksheet, sharedStrings: SharedString[]): Worksheet;
|
|
1580
1701
|
//#endregion
|
|
1581
|
-
export { type AutoResizeOptions, type Border, type BorderEdge, type Cell, type CellAddress, type CellFill, type CellFont, type
|
|
1702
|
+
export { type AutoResizeOptions, type Border, type BorderEdge, type Cell, type CellAddress, type CellFill, type CellFont, type CellValue, type CellXf, type CfIcon, type CfRule, type CfStop, type CfValue, type ChartAnchor, type ChartDataLabelOverride, type ChartDataPointOverride, type ChartErrBars, type ChartLabelBox, type ChartManualLayout, type ChartModel, type ChartRect, type ChartSeries, type ChartSeriesDataLabels, type ChartTrendline, type ChartType, type ChartexBoxSeries, type ChartexBoxWhisker, type ChartexSunburst, type ChartexSunburstRow, type ConditionalFormat, type DataValidation, type DefinedName, type Duotone, type Dxf, type FindHighlightColors, type FindMatch, type FindMatchesOptions, type GradientFillSpec, type HiddenSheetMode, type Hyperlink, type HyperlinkTarget, type ImageAnchor, type LegendManualLayout, type LoadOptions, MAX_SELECTION_AREAS, MAX_SELECTION_CONTEXT_CELLS, MAX_SELECTION_CONTEXT_TEXT_CHARACTERS, type MathAccent, type MathArray, type MathBar, type MathBorderBox, type MathBox, type MathDelimiter, type MathFraction, type MathFunc, type MathGroup, type MathGroupChr, type MathLimit, type MathNary, type MathNode, type MathPhant, type MathRadical, type MathRenderer, type MathRun, type MathSPre, type MathScript, type MathStyle, type MathSvg, type MergeCell, type NumFmt, OoxmlDecodedImageLimitError, type OoxmlDecodedImageLimitMetric, OoxmlError, type OoxmlErrorCode, type OoxmlErrorStage, type OoxmlFormat, type OoxmlResourceLimit, OoxmlResourceLimitError, type OoxmlResourceLimitErrorDetails, type OoxmlResourceLimits, type OoxmlResourceMetric, type OoxmlResourceMetrics, type OoxmlResourceMetricsCheckpoint, type OoxmlResourceName, type OoxmlResourcePolicySnapshot, type OoxmlResourceUsageSnapshot, type OoxmlResourceViolation, type OutlinePr, type ParsedWorkbook, type PathCmd, type PathInfo, type PhoneticAlignment, type PhoneticProperties, type PhoneticRun, type PhoneticType, type PivotCacheSource, type PivotDataField, type PivotDiagnostic, type PivotLocation, type PivotMetadataStatus, type PivotPageField, type PivotPartialReason, type PivotTableMetadata, type RenderViewportToBitmapOptions, type ResolvedList, type Row, type Run, type RunFont, type SecondaryValueAxis, type ShapeAnchor, type ShapeGeom, type ShapeInfo, type ShapeParagraph, type ShapeText, type ShapeTextRun, type SharedString, type SheetMeta, type SheetVisibility, type SlicerAnchor, type SlicerElementStyle, type SlicerItem, type SlicerStyle, type SpaceLine, type Sparkline, type SparklineGroup, type Styles, type TableColumnInfo, type TableInfo, type ViewerContextMenuEvent, type ViewportRange, type Workbook, type Worksheet, type WorksheetCellRange, type XlsxComment, type XlsxCopyResult, type XlsxElementAnchorMarker, type XlsxElementContext, type XlsxMatchLocation, type XlsxRangeSelectionContext, type XlsxRenderViewportOptions, type XlsxScrollToCellOptions, type XlsxSelectionArea, type XlsxSelectionContext, type XlsxSelectionContextCell, type XlsxSelectionContextOptions, type XlsxSelectionInput, type XlsxSelectionState, XlsxSheetViewer, type XlsxSheetViewerOptions, type XlsxTextRunInfo, XlsxViewer, type XlsxViewerOptions, type XlsxViewportOffset, XlsxWorkbook, type ZoomableViewer, autoResize, isOoxmlDecodedImageLimitError, openExternalHyperlink, resolveSharedStrings };
|