quill-table-up 2.2.3 → 2.3.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/dist/index.d.ts +9 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/e2e/table-blots.test.ts +39 -1
- package/src/__tests__/e2e/table-selection.test.ts +97 -9
- package/src/__tests__/unit/table-clipboard.test.ts +181 -0
- package/src/__tests__/unit/table-hack.test.ts +14 -18
- package/src/__tests__/unit/table-redo-undo.test.ts +51 -0
- package/src/formats/container-format.ts +0 -9
- package/src/formats/table-cell-inner-format.ts +24 -0
- package/src/formats/table-col-format.ts +37 -37
- package/src/modules/table-clipboard.ts +54 -14
- package/src/modules/table-resize/table-resize-common.ts +29 -6
- package/src/modules/table-resize/table-resize-scale.ts +1 -0
- package/src/modules/table-selection.ts +1 -1
- package/src/table-up.ts +20 -27
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,6 @@ declare class ContainerFormat extends Container {
|
|
|
18
18
|
static requiredContainer: Parchment.BlotConstructor;
|
|
19
19
|
static defaultChild?: Parchment.BlotConstructor;
|
|
20
20
|
static create(_value?: unknown): HTMLElement;
|
|
21
|
-
insertAt(index: number, value: string, def?: any): void;
|
|
22
21
|
optimize(_context: Record<string, any>): void;
|
|
23
22
|
enforceAllowedChildren(): void;
|
|
24
23
|
}
|
|
@@ -67,6 +66,7 @@ declare class TableCellInnerFormat extends ContainerFormat {
|
|
|
67
66
|
set colspan(value: number);
|
|
68
67
|
getColumnIndex(): number;
|
|
69
68
|
formatAt(index: number, length: number, name: string, value: any): void;
|
|
69
|
+
insertAt(index: number, value: string, def?: any): void;
|
|
70
70
|
formats(): Record<string, any>;
|
|
71
71
|
checkMerge(): boolean;
|
|
72
72
|
optimize(): void;
|
|
@@ -285,7 +285,9 @@ declare class TableClipboard extends Clipboard {
|
|
|
285
285
|
quill: Quill;
|
|
286
286
|
tableId: string;
|
|
287
287
|
rowId: string;
|
|
288
|
+
rowIds: string[];
|
|
288
289
|
colIds: string[];
|
|
290
|
+
emptyRowCount: number[];
|
|
289
291
|
rowspanCount: {
|
|
290
292
|
rowspan: number;
|
|
291
293
|
colspan: number;
|
|
@@ -296,7 +298,7 @@ declare class TableClipboard extends Clipboard {
|
|
|
296
298
|
matchTable(node: Node, delta: Delta): any;
|
|
297
299
|
matchTbody(node: Node, delta: Delta): Delta;
|
|
298
300
|
matchColgroup(node: Node, delta: Delta): any;
|
|
299
|
-
matchCol(node: Node): any;
|
|
301
|
+
matchCol(node: Node, _delta: Delta): any;
|
|
300
302
|
matchTr(node: Node, delta: Delta): Delta;
|
|
301
303
|
matchTd(node: Node, delta: Delta): any;
|
|
302
304
|
matchTdAttributor(node: Node, delta: Delta): any;
|
|
@@ -426,6 +428,11 @@ declare class TableResizeCommon {
|
|
|
426
428
|
cancel: string;
|
|
427
429
|
}): Promise<boolean>;
|
|
428
430
|
handleColMouseUp(): Promise<void>;
|
|
431
|
+
getColumnRect(columnIndex: number): {
|
|
432
|
+
left: number;
|
|
433
|
+
right: number;
|
|
434
|
+
width: number;
|
|
435
|
+
} | null;
|
|
429
436
|
handleColMouseMove(e: MouseEvent): {
|
|
430
437
|
left: number;
|
|
431
438
|
width: number;
|