ados-rcm 1.1.329 → 1.1.330
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.
@@ -2,27 +2,39 @@ import { Quill } from 'react-quill-new';
|
|
2
2
|
export default class JaeKanTablePicker {
|
3
3
|
private readonly quill;
|
4
4
|
private picker;
|
5
|
-
private
|
6
|
-
private
|
7
|
-
private
|
5
|
+
private tooltip;
|
6
|
+
private toolbar;
|
7
|
+
private tableButton;
|
8
|
+
private readonly CONSTANTS;
|
8
9
|
private readonly CLASSNAMES;
|
10
|
+
private readonly COLORS;
|
11
|
+
private readonly boundHandlers;
|
9
12
|
constructor(quill: Quill);
|
13
|
+
destroy(): void;
|
10
14
|
private handleGlobalClick;
|
15
|
+
private isTableButtonOrPicker;
|
11
16
|
private initializeTablePicker;
|
12
17
|
private handleTableButtonClick;
|
13
18
|
private createElement;
|
14
19
|
private showTablePicker;
|
15
|
-
private activateTableButton;
|
16
20
|
private closeOtherOptions;
|
17
21
|
private createPicker;
|
22
|
+
private handleGridMouseOver;
|
23
|
+
private handleGridMouseOut;
|
24
|
+
private handleGridClick;
|
25
|
+
private findTargetCell;
|
26
|
+
private getCellCoordinates;
|
18
27
|
private createGrid;
|
19
|
-
private createCell;
|
20
|
-
private setupCellEventListeners;
|
21
|
-
private handleCellHover;
|
22
28
|
private showTooltip;
|
29
|
+
private calculateTooltipPosition;
|
30
|
+
private getViewportMetrics;
|
23
31
|
private removeTooltip;
|
24
32
|
private positionPicker;
|
33
|
+
private isElementInViewport;
|
34
|
+
private calculatePickerPosition;
|
25
35
|
private highlightCells;
|
26
36
|
private insertTable;
|
37
|
+
private prepareInsertionPoint;
|
38
|
+
private findTableParent;
|
27
39
|
private hidePicker;
|
28
40
|
}
|
@@ -5,13 +5,7 @@ interface Range {
|
|
5
5
|
}
|
6
6
|
declare enum QuillEvents {
|
7
7
|
EDITOR_CHANGE = "editor-change",
|
8
|
-
|
9
|
-
SCROLL_BLOT_MOUNT = "scroll-blot-mount",
|
10
|
-
SCROLL_BLOT_UNMOUNT = "scroll-blot-unmount",
|
11
|
-
SCROLL_OPTIMIZE = "scroll-optimize",
|
12
|
-
SCROLL_UPDATE = "scroll-update",
|
13
|
-
SELECTION_CHANGE = "selection-change",
|
14
|
-
TEXT_CHANGE = "text-change"
|
8
|
+
SELECTION_CHANGE = "selection-change"
|
15
9
|
}
|
16
10
|
declare enum QuillSources {
|
17
11
|
API = "api",
|
@@ -29,41 +23,44 @@ export interface TableUIOptions {
|
|
29
23
|
export default class JaeKanTableUI {
|
30
24
|
DEFAULTS: TableUIOptions;
|
31
25
|
quill: Quill;
|
32
|
-
options:
|
33
|
-
position:
|
26
|
+
options: TableUIOptions;
|
27
|
+
position: DOMRect | null;
|
34
28
|
table: any;
|
35
29
|
selectedCell: HTMLElement | null;
|
36
|
-
menuItems: MenuItem[];
|
37
30
|
menuRoot: HTMLElement | null;
|
38
31
|
helperTextElement: HTMLElement | null;
|
39
|
-
|
40
|
-
|
41
|
-
|
32
|
+
private scrollTimeout;
|
33
|
+
private readonly SCROLL_DEBOUNCE_TIME;
|
34
|
+
private lastSelectedCellRef;
|
42
35
|
private readonly boundDocClickHandler;
|
43
36
|
private readonly boundEditorChangeHandler;
|
44
37
|
private readonly boundContextMenuHandler;
|
45
38
|
private readonly boundCopyHandler;
|
46
|
-
|
39
|
+
private readonly boundScrollHandler;
|
40
|
+
menuItems: MenuItem[];
|
41
|
+
private positionCache;
|
42
|
+
private readonly POSITION_CACHE_LIFETIME;
|
43
|
+
private reactRoot;
|
44
|
+
constructor(quill: Quill, options: TableUIOptions);
|
45
|
+
private initializeMenuItems;
|
46
|
+
private overrideTableMethods;
|
47
47
|
private initializeHelperText;
|
48
|
-
private createHelperIcon;
|
49
|
-
private createHelperText;
|
50
48
|
private attachEventListeners;
|
51
49
|
private removeEventListeners;
|
52
|
-
|
50
|
+
editorChangeHandler(type: QuillEvents, range: Range, _oldRange: Range, _source: QuillSources): void;
|
51
|
+
contextMenuHandler(evt: MouseEvent): boolean;
|
52
|
+
copyHandler(evt: ClipboardEvent): void;
|
53
53
|
isTable(range?: Range | null): boolean;
|
54
|
-
getColCount(range?: Range | null):
|
54
|
+
getColCount(range?: Range | null): number;
|
55
55
|
showMenu(): void;
|
56
|
-
private renderMenu;
|
57
|
-
private createMenuComponent;
|
58
|
-
private setMenuPosition;
|
59
|
-
private renderMenuItems;
|
60
|
-
private createMenuItemClickHandler;
|
61
56
|
hideMenu(): void;
|
62
57
|
detectButton(range: Range | null): void;
|
58
|
+
private clearPreviousSelection;
|
63
59
|
showHelperText(): void;
|
64
60
|
removeHelperText(): void;
|
61
|
+
private handleScroll;
|
65
62
|
destroy(): void;
|
66
|
-
private
|
67
|
-
private
|
63
|
+
private createItemClickHandler;
|
64
|
+
private getBoundingRectWithCache;
|
68
65
|
}
|
69
66
|
export {};
|