ados-rcm 1.1.512 → 1.1.514

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.
Files changed (64) hide show
  1. package/README.md +94 -94
  2. package/dist/AModule/AComponents/AEditor/modules/ImageResizer.d.ts +165 -46
  3. package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/container-format.d.ts +15 -0
  4. package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/index.d.ts +11 -0
  5. package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/overrides/block.d.ts +9 -0
  6. package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/overrides/index.d.ts +2 -0
  7. package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/overrides/scroll.d.ts +10 -0
  8. package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/table-body-format.d.ts +10 -0
  9. package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/table-caption-format.d.ts +23 -0
  10. package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/table-cell-format.d.ts +26 -0
  11. package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/table-cell-inner-format.d.ts +34 -0
  12. package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/table-col-format.d.ts +22 -0
  13. package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/table-colgroup-format.d.ts +20 -0
  14. package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/table-main-format.d.ts +26 -0
  15. package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/table-row-format.d.ts +25 -0
  16. package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/table-wrapper-format.d.ts +14 -0
  17. package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/utils.d.ts +1 -0
  18. package/dist/AModule/AComponents/AEditor/modules/tableUp/index.d.ts +7 -0
  19. package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/index.d.ts +6 -0
  20. package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-align.d.ts +31 -0
  21. package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-clipboard.d.ts +42 -0
  22. package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-menu/constants.d.ts +12 -0
  23. package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-menu/index.d.ts +4 -0
  24. package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-menu/table-menu-common.d.ts +43 -0
  25. package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-menu/table-menu-contextmenu.d.ts +21 -0
  26. package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-menu/table-menu-select.d.ts +9 -0
  27. package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-resize/index.d.ts +5 -0
  28. package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-resize/table-resize-box.d.ts +56 -0
  29. package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-resize/table-resize-common.d.ts +79 -0
  30. package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-resize/table-resize-line.d.ts +39 -0
  31. package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-resize/table-resize-scale.d.ts +40 -0
  32. package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-resize/utils.d.ts +2 -0
  33. package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-scrollbar.d.ts +89 -0
  34. package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-selection.d.ts +87 -0
  35. package/dist/AModule/AComponents/AEditor/modules/tableUp/table-up.d.ts +119 -0
  36. package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/bem.d.ts +18 -0
  37. package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/blot-helper.d.ts +25 -0
  38. package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/color.d.ts +18 -0
  39. package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/components/button.d.ts +6 -0
  40. package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/components/color-picker.d.ts +6 -0
  41. package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/components/dialog.d.ts +10 -0
  42. package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/components/index.d.ts +6 -0
  43. package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/components/input.d.ts +15 -0
  44. package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/components/table/creator.d.ts +10 -0
  45. package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/components/table/index.d.ts +2 -0
  46. package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/components/table/select-box.d.ts +10 -0
  47. package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/components/tooltip.d.ts +18 -0
  48. package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/constants.d.ts +30 -0
  49. package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/index.d.ts +13 -0
  50. package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/is.d.ts +7 -0
  51. package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/position.d.ts +14 -0
  52. package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/resize-observer-helper.d.ts +4 -0
  53. package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/scroll-event-handle.d.ts +6 -0
  54. package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/transformer.d.ts +2 -0
  55. package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/transition-event-helper.d.ts +1 -0
  56. package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/types.d.ts +149 -0
  57. package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/utils.d.ts +2 -0
  58. package/dist/AModule/AComponents/AResource/AResource.d.ts +16 -6
  59. package/dist/AModule/AComponents/ATree/ATreeItem.d.ts +1 -0
  60. package/dist/index.cjs.js +264 -147
  61. package/dist/index.es.js +28348 -22465
  62. package/package.json +6 -1
  63. package/dist/AModule/AComponents/AEditor/modules/TablePicker.d.ts +0 -40
  64. package/dist/AModule/AComponents/AEditor/modules/TableUI.d.ts +0 -69
@@ -0,0 +1,25 @@
1
+ import { Parchment as TypeParchment } from 'quill';
2
+ import { TableCellValue, TableRowValue } from '../utils';
3
+ import { ContainerFormat } from './container-format';
4
+ import { TableCellFormat } from './table-cell-format';
5
+ import { TableCellInnerFormat } from './table-cell-inner-format';
6
+ export type SkipRowCount = number[] & {
7
+ skipRowNum?: number;
8
+ };
9
+ export declare class TableRowFormat extends ContainerFormat {
10
+ static blotName: "table-up-row";
11
+ static tagName: string;
12
+ static className: string;
13
+ static create(value: TableRowValue): HTMLElement;
14
+ children: TypeParchment.LinkedList<TableCellFormat>;
15
+ get rowId(): string;
16
+ get tableId(): string;
17
+ setHeight(value: string): void;
18
+ getCellByColId(colId: string, direction: 'next' | 'prev'): TableCellFormat | null;
19
+ insertCell(targetIndex: number, value: TableCellValue): SkipRowCount;
20
+ getCellByColumIndex(stopIndex: number): [null | TableCellFormat, number, number[]];
21
+ removeCell(targetIndex: number): SkipRowCount;
22
+ foreachCellInner(func: (tableCell: TableCellInnerFormat, index: number) => boolean | void): void;
23
+ checkMerge(): boolean;
24
+ optimize(context: Record<string, any>): void;
25
+ }
@@ -0,0 +1,14 @@
1
+ import { ContainerFormat } from './container-format';
2
+ export declare class TableWrapperFormat extends ContainerFormat {
3
+ scroll: any;
4
+ static blotName: "table-up";
5
+ static tagName: string;
6
+ static className: string;
7
+ static create(value: string): HTMLElement;
8
+ constructor(scroll: any, node: Node, _value: string);
9
+ get tableId(): string;
10
+ checkMerge(): boolean;
11
+ deleteAt(index: number, length: number): void;
12
+ remove(): void;
13
+ insertLineAround: () => void;
14
+ }
@@ -0,0 +1 @@
1
+ export declare const getValidCellspan: (value: any) => any;
@@ -0,0 +1,7 @@
1
+ import { TableUp } from './table-up';
2
+ export default TableUp;
3
+ export * from './formats';
4
+ export * from './modules';
5
+ export * from './table-up';
6
+ export { blotName, createColorPicker, createSelectBox, createTooltip, findParentBlot, findParentBlots, randomId, tableUpEvent, tableUpInternal, tableUpSize, } from './utils';
7
+ export * from './utils/types';
@@ -0,0 +1,6 @@
1
+ export * from './table-align';
2
+ export * from './table-clipboard';
3
+ export * from './table-menu';
4
+ export * from './table-resize';
5
+ export * from './table-scrollbar';
6
+ export * from './table-selection';
@@ -0,0 +1,31 @@
1
+ import { TableMainFormat, TableWrapperFormat } from '../formats';
2
+ import { TableUp } from '../table-up';
3
+ import { default as Quill } from 'quill';
4
+ export declare class TableAlign {
5
+ tableModule: TableUp;
6
+ table: HTMLElement;
7
+ quill: Quill;
8
+ tableBlot: TableMainFormat;
9
+ tableWrapperBlot: TableWrapperFormat;
10
+ alignBox?: HTMLElement;
11
+ cleanup?: () => void;
12
+ bem: {
13
+ b: () => string;
14
+ be: (e?: string) => string;
15
+ bm: (m?: string) => string;
16
+ bem: (e?: string, m?: string) => string;
17
+ ns: (s?: string) => string;
18
+ bs: (s?: string) => string;
19
+ cv: (v?: string) => string;
20
+ is: (n: string) => string;
21
+ };
22
+ resizeObserver: ResizeObserver;
23
+ constructor(tableModule: TableUp, table: HTMLElement, quill: Quill);
24
+ updateWhenTextChange: () => void;
25
+ buildTool(): HTMLElement;
26
+ setTableAlign(tableBlot: TableMainFormat, align: string): void;
27
+ show(): void;
28
+ hide(): void;
29
+ update(): void;
30
+ destroy(): void;
31
+ }
@@ -0,0 +1,42 @@
1
+ import { Parchment as TypeParchment, default as Quill } from 'quill';
2
+ import { Delta as TypeDelta } from 'quill/core';
3
+ import { default as TypeClipboard } from 'quill/modules/clipboard';
4
+ declare const Clipboard: typeof TypeClipboard;
5
+ export type Selector = string | Node['TEXT_NODE'] | Node['ELEMENT_NODE'];
6
+ export type Matcher = (node: Node, delta: TypeDelta, scroll: TypeParchment.ScrollBlot) => TypeDelta;
7
+ export interface ClipboardOptions {
8
+ matchers: [Selector, Matcher][];
9
+ }
10
+ export declare class TableClipboard extends Clipboard {
11
+ quill: Quill;
12
+ tableId: string;
13
+ rowId: string;
14
+ colIds: string[];
15
+ rowspanCount: {
16
+ colspan: number;
17
+ rowspan: number;
18
+ }[];
19
+ cellCount: number;
20
+ colCount: number;
21
+ constructor(quill: Quill, options: Partial<ClipboardOptions>);
22
+ matchTable(node: Node, delta: TypeDelta): TypeDelta;
23
+ matchColgroup(node: Node, delta: TypeDelta): TypeDelta;
24
+ matchCol(node: Node): TypeDelta;
25
+ matchTr(node: Node, delta: TypeDelta): TypeDelta;
26
+ matchTd(node: Node, delta: TypeDelta): TypeDelta;
27
+ private handleBorderNoneStyles;
28
+ convert({ html, text }: {
29
+ html?: string;
30
+ text?: string;
31
+ }, formats?: Record<string, unknown>): TypeDelta;
32
+ private readonly STYLE_PROPERTIES;
33
+ private parseStyleWithFilter;
34
+ private mergeClassStylesToInline;
35
+ matchCaption(node: Node, delta: TypeDelta): TypeDelta;
36
+ private preprocessTableHtml;
37
+ private cleanupTableStyles;
38
+ private applyRowspanHeights;
39
+ private fixRowspanCells;
40
+ private processEmptyRows;
41
+ }
42
+ export {};
@@ -0,0 +1,12 @@
1
+ import { Tool } from '../../utils';
2
+ export declare const menuColorSelectClassName = "color-selector";
3
+ export declare const tableMenuTools: Record<string, Tool>;
4
+ export declare const maxSaveColorCount = 10;
5
+ export declare const colorClassName: {
6
+ selectWrapper: string;
7
+ used: string;
8
+ item: string;
9
+ btn: string;
10
+ map: string;
11
+ mapRow: string;
12
+ };
@@ -0,0 +1,4 @@
1
+ export { tableMenuTools } from './constants';
2
+ export * from './table-menu-common';
3
+ export * from './table-menu-contextmenu';
4
+ export * from './table-menu-select';
@@ -0,0 +1,43 @@
1
+ import { default as Quill } from 'quill';
2
+ import { TableUp } from '../../table-up';
3
+ import { TableMenuOptions, ToolOption, TooltipInstance, ToolTipOptions } from '../../utils';
4
+ export type TableMenuOptionsInput = Partial<Omit<TableMenuOptions, 'texts'>>;
5
+ export interface MenuTooltipInstance extends TooltipInstance {
6
+ isColorPick?: boolean;
7
+ }
8
+ export declare class TableMenuCommon {
9
+ tableModule: TableUp;
10
+ quill: Quill;
11
+ usedColors: Set<string>;
12
+ options: TableMenuOptions;
13
+ menu: HTMLElement | null;
14
+ isMenuDisplay: boolean;
15
+ isColorPicking: boolean;
16
+ updateUsedColor: (this: any, color?: string) => void;
17
+ tooltipItem: MenuTooltipInstance[];
18
+ activeTooltip: MenuTooltipInstance | null;
19
+ bem: {
20
+ b: () => string;
21
+ be: (e?: string) => string;
22
+ bm: (m?: string) => string;
23
+ bem: (e?: string, m?: string) => string;
24
+ ns: (s?: string) => string;
25
+ bs: (s?: string) => string;
26
+ cv: (v?: string) => string;
27
+ is: (n: string) => string;
28
+ };
29
+ colorItemClass: string;
30
+ colorChooseTooltipOption: ToolTipOptions;
31
+ constructor(tableModule: TableUp, quill: Quill, options: TableMenuOptionsInput);
32
+ updateWhenTextChange: () => void;
33
+ resolveOptions(options: TableMenuOptionsInput): TableMenuOptions;
34
+ buildTools(): HTMLElement;
35
+ createColorChoose(item: HTMLElement, { handle, key }: ToolOption): MenuTooltipInstance;
36
+ setActiveTooltip(tooltip: MenuTooltipInstance | null): void;
37
+ getSelectedTds(): import('../..').TableCellInnerFormat[];
38
+ createTipText(item: HTMLElement, text: string): void;
39
+ show(): void;
40
+ update(): void;
41
+ hide(): void;
42
+ destroy(): void;
43
+ }
@@ -0,0 +1,21 @@
1
+ import { default as Quill } from 'quill';
2
+ import { TableUp } from '../../table-up';
3
+ import { TableMenuOptions, ToolTipOptions } from '../../utils';
4
+ import { TableMenuCommon } from './table-menu-common';
5
+ type TableMenuOptionsInput = Partial<Omit<TableMenuOptions, 'texts'>>;
6
+ export declare class TableMenuContextmenu extends TableMenuCommon {
7
+ tableModule: TableUp;
8
+ quill: Quill;
9
+ colorChooseTooltipOption: ToolTipOptions;
10
+ constructor(tableModule: TableUp, quill: Quill, options: TableMenuOptionsInput);
11
+ listenContextmenu: (e: MouseEvent) => void;
12
+ buildTools(): HTMLElement;
13
+ createTipText(item: HTMLElement, text: string): void;
14
+ show(): void;
15
+ update(position?: {
16
+ x: number;
17
+ y: number;
18
+ }): void;
19
+ destroy(): void;
20
+ }
21
+ export {};
@@ -0,0 +1,9 @@
1
+ import { default as Quill } from 'quill';
2
+ import { TableUp } from '../../table-up';
3
+ import { TableMenuOptionsInput, TableMenuCommon } from './table-menu-common';
4
+ export declare class TableMenuSelect extends TableMenuCommon {
5
+ tableModule: TableUp;
6
+ quill: Quill;
7
+ constructor(tableModule: TableUp, quill: Quill, options: TableMenuOptionsInput);
8
+ update(): void;
9
+ }
@@ -0,0 +1,5 @@
1
+ export * from './table-resize-box';
2
+ export * from './table-resize-common';
3
+ export * from './table-resize-line';
4
+ export * from './table-resize-scale';
5
+ export * from './utils';
@@ -0,0 +1,56 @@
1
+ import { Parchment as TypeParchment, default as Quill } from 'quill';
2
+ import { TableColFormat, TableMainFormat, TableRowFormat } from '../../formats';
3
+ import { TableUp } from '../../table-up';
4
+ import { sizeChangeValue, TableResizeCommon } from './table-resize-common';
5
+ export declare class TableResizeBox extends TableResizeCommon {
6
+ tableModule: TableUp;
7
+ table: HTMLElement;
8
+ root: HTMLElement;
9
+ tableMain: TableMainFormat;
10
+ tableWrapper: TypeParchment.Parent;
11
+ resizeObserver: ResizeObserver;
12
+ tableCols: TableColFormat[];
13
+ tableRows: TableRowFormat[];
14
+ rowHeadWrapper: HTMLElement | null;
15
+ colHeadWrapper: HTMLElement | null;
16
+ corner: HTMLElement | null;
17
+ scrollHandler: [HTMLElement, (e: Event) => void][];
18
+ lastHeaderSelect: {
19
+ index: number;
20
+ isX: boolean;
21
+ } | null;
22
+ size: number;
23
+ bem: {
24
+ b: () => string;
25
+ be: (e?: string) => string;
26
+ bm: (m?: string) => string;
27
+ bem: (e?: string, m?: string) => string;
28
+ ns: (s?: string) => string;
29
+ bs: (s?: string) => string;
30
+ cv: (v?: string) => string;
31
+ is: (n: string) => string;
32
+ };
33
+ constructor(tableModule: TableUp, table: HTMLElement, quill: Quill);
34
+ updateWhenTextChange: () => void;
35
+ handleResizerHeader(isX: boolean, index: number, e: MouseEvent): void;
36
+ findCurrentColIndex(e: MouseEvent): number;
37
+ colWidthChange(i: number, w: sizeChangeValue, isFull: boolean): void;
38
+ handleColMouseDownFunc: (e: MouseEvent) => {
39
+ height: number;
40
+ left: number;
41
+ top: number;
42
+ } | undefined;
43
+ bindColEvents(): void;
44
+ findCurrentRowIndex(e: MouseEvent): number;
45
+ rowHeightChange(i: number, h: number): void;
46
+ handleRowMouseDownFunc: (e: MouseEvent) => {
47
+ left: number;
48
+ top: number;
49
+ width: number;
50
+ } | undefined;
51
+ bindRowEvents(): void;
52
+ update(): void;
53
+ show(): void;
54
+ hide(): void;
55
+ destroy(): void;
56
+ }
@@ -0,0 +1,79 @@
1
+ import { default as Quill } from 'quill';
2
+ import { TableUp } from '../../table-up';
3
+ import { TableMainFormat } from '../../formats';
4
+ export interface sizeChangeValue {
5
+ pre: number;
6
+ px: number;
7
+ }
8
+ export declare class TableResizeCommon {
9
+ tableModule: TableUp;
10
+ quill: Quill;
11
+ colIndex: number;
12
+ tableMain?: TableMainFormat;
13
+ dragging: boolean;
14
+ dragColBreak: HTMLElement | null;
15
+ handleColMouseUpFunc: () => Promise<void>;
16
+ handleColMouseMoveFunc: (e: MouseEvent) => {
17
+ left: number;
18
+ width: number;
19
+ } | undefined;
20
+ handleColMouseDownFunc: (e: MouseEvent) => {
21
+ height: number;
22
+ left: number;
23
+ top: number;
24
+ } | undefined;
25
+ rowIndex: number;
26
+ dragRowBreak: HTMLElement | null;
27
+ handleRowMouseUpFunc: () => void;
28
+ handleRowMouseMoveFunc: (e: MouseEvent) => {
29
+ height: number;
30
+ top: number;
31
+ } | undefined;
32
+ handleRowMouseDownFunc: (e: MouseEvent) => {
33
+ left: number;
34
+ top: number;
35
+ width: number;
36
+ } | undefined;
37
+ dragBEM: {
38
+ b: () => string;
39
+ be: (e?: string) => string;
40
+ bm: (m?: string) => string;
41
+ bem: (e?: string, m?: string) => string;
42
+ ns: (s?: string) => string;
43
+ bs: (s?: string) => string;
44
+ cv: (v?: string) => string;
45
+ is: (n: string) => string;
46
+ };
47
+ constructor(tableModule: TableUp, quill: Quill);
48
+ findCurrentColIndex(_e: MouseEvent): number;
49
+ colWidthChange(_i: number, _w: sizeChangeValue, _isFull: boolean): void;
50
+ createConfirmDialog({ message, confirm, cancel }: {
51
+ cancel: string;
52
+ confirm: string;
53
+ message: string;
54
+ }): Promise<boolean>;
55
+ handleColMouseUp(): Promise<void>;
56
+ handleColMouseMove(e: MouseEvent): {
57
+ left: number;
58
+ width: number;
59
+ } | undefined;
60
+ handleColMouseDown(e: MouseEvent): {
61
+ height: number;
62
+ left: number;
63
+ top: number;
64
+ } | undefined;
65
+ findCurrentRowIndex(_e: MouseEvent): number;
66
+ rowHeightChange(_i: number, _h: number): void;
67
+ handleRowMouseUp(): void;
68
+ handleRowMouseMove(e: MouseEvent): {
69
+ height: number;
70
+ top: number;
71
+ } | undefined;
72
+ handleRowMouseDown(e: MouseEvent): {
73
+ left: number;
74
+ top: number;
75
+ width: number;
76
+ } | undefined;
77
+ update(): void;
78
+ destroy(): void;
79
+ }
@@ -0,0 +1,39 @@
1
+ import { TableUp } from '../../table-up';
2
+ import { default as Quill } from 'quill';
3
+ import { TableCellFormat } from '../../formats';
4
+ import { TableResizeCommon } from './table-resize-common';
5
+ export declare class TableResizeLine extends TableResizeCommon {
6
+ tableModule: TableUp;
7
+ table: HTMLElement;
8
+ colResizer: HTMLElement;
9
+ rowResizer: HTMLElement;
10
+ currentTableCell?: HTMLElement;
11
+ dragging: boolean;
12
+ curColIndex: number;
13
+ curRowIndex: number;
14
+ tableCellBlot?: TableCellFormat;
15
+ bem: {
16
+ b: () => string;
17
+ be: (e?: string) => string;
18
+ bm: (m?: string) => string;
19
+ bem: (e?: string, m?: string) => string;
20
+ ns: (s?: string) => string;
21
+ bs: (s?: string) => string;
22
+ cv: (v?: string) => string;
23
+ is: (n: string) => string;
24
+ };
25
+ constructor(tableModule: TableUp, table: HTMLElement, quill: Quill);
26
+ mousemoveHandler: (e: MouseEvent) => void;
27
+ hideWhenTextChange: () => void;
28
+ findTableCell(e: MouseEvent): HTMLElement | null;
29
+ findCurrentColIndex(): number;
30
+ handleColMouseUpFunc: () => Promise<void>;
31
+ updateColResizer(): void;
32
+ findCurrentRowIndex(): number;
33
+ handleRowMouseUpFunc: () => void;
34
+ updateRowResizer(): void;
35
+ show(): void;
36
+ hide(): void;
37
+ update(): void;
38
+ destroy(): void;
39
+ }
@@ -0,0 +1,40 @@
1
+ import { TableUp } from '../../table-up';
2
+ import { TableResizeScaleOptions } from '../../utils';
3
+ import { default as Quill } from 'quill';
4
+ import { TableMainFormat, TableWrapperFormat } from '../../formats';
5
+ export declare class TableResizeScale {
6
+ tableModule: TableUp;
7
+ table: HTMLElement;
8
+ quill: Quill;
9
+ scrollHandler: [HTMLElement, (e: Event) => void][];
10
+ tableMainBlot: TableMainFormat | null;
11
+ tableWrapperBlot: TableWrapperFormat | null;
12
+ bem: {
13
+ b: () => string;
14
+ be: (e?: string) => string;
15
+ bm: (m?: string) => string;
16
+ bem: (e?: string, m?: string) => string;
17
+ ns: (s?: string) => string;
18
+ bs: (s?: string) => string;
19
+ cv: (v?: string) => string;
20
+ is: (n: string) => string;
21
+ };
22
+ startX: number;
23
+ startY: number;
24
+ offset: number;
25
+ options: TableResizeScaleOptions;
26
+ root?: HTMLElement;
27
+ block?: HTMLElement;
28
+ resizeobserver: ResizeObserver;
29
+ constructor(tableModule: TableUp, table: HTMLElement, quill: Quill, options: Partial<TableResizeScaleOptions>);
30
+ updateWhenTextChange: () => void;
31
+ resolveOptions(options: Partial<TableResizeScaleOptions>): {
32
+ blockSize: number;
33
+ } & Partial<TableResizeScaleOptions>;
34
+ buildResizer(): void;
35
+ isTableOutofEditor(): boolean;
36
+ update(): void;
37
+ show(): void;
38
+ hide(): void;
39
+ destroy(): void;
40
+ }
@@ -0,0 +1,2 @@
1
+ import { TableMainFormat } from '../../formats';
2
+ export declare const isTableAlignRight: (tableMainBlot: TableMainFormat) => boolean;
@@ -0,0 +1,89 @@
1
+ import { default as Quill } from 'quill';
2
+ import { TableMainFormat } from '../formats';
3
+ import { TableUp } from '../table-up';
4
+ export declare class Scrollbar {
5
+ quill: Quill;
6
+ isVertical: boolean;
7
+ table: HTMLElement;
8
+ scrollbarContainer: HTMLElement;
9
+ minSize: number;
10
+ gap: number;
11
+ move: number;
12
+ cursorDown: boolean;
13
+ cursorLeave: boolean;
14
+ ratioY: number;
15
+ ratioX: number;
16
+ sizeWidth: string;
17
+ sizeHeight: string;
18
+ size: string;
19
+ thumbState: {
20
+ X: number;
21
+ Y: number;
22
+ };
23
+ ob: ResizeObserver;
24
+ container: HTMLElement;
25
+ scrollbar: HTMLElement;
26
+ thumb: HTMLElement;
27
+ scrollHandler: [HTMLElement, (e: Event) => void][];
28
+ propertyMap: {
29
+ readonly axis: 'Y';
30
+ readonly client: 'clientY';
31
+ readonly direction: 'top';
32
+ readonly offset: 'offsetHeight';
33
+ readonly scrollDirection: 'scrollTop';
34
+ readonly scrollSize: 'scrollHeight';
35
+ readonly size: 'height';
36
+ } | {
37
+ readonly axis: 'X';
38
+ readonly client: 'clientX';
39
+ readonly direction: 'left';
40
+ readonly offset: 'offsetWidth';
41
+ readonly scrollDirection: 'scrollLeft';
42
+ readonly scrollSize: 'scrollWidth';
43
+ readonly size: 'width';
44
+ };
45
+ bem: {
46
+ b: () => string;
47
+ be: (e?: string) => string;
48
+ bm: (m?: string) => string;
49
+ bem: (e?: string, m?: string) => string;
50
+ ns: (s?: string) => string;
51
+ bs: (s?: string) => string;
52
+ cv: (v?: string) => string;
53
+ is: (n: string) => string;
54
+ };
55
+ tableMainBlot: TableMainFormat;
56
+ constructor(quill: Quill, isVertical: boolean, table: HTMLElement, scrollbarContainer: HTMLElement);
57
+ update(): void;
58
+ setScrollbarPosition(): void;
59
+ calculateSize(): void;
60
+ createScrollbar(): HTMLDivElement;
61
+ containerScrollHandler(wrap: HTMLElement): void;
62
+ showScrollbar: (this: any) => void;
63
+ hideScrollbar: (this: any) => void;
64
+ hideScrollbarTransitionend: () => void;
65
+ destroy(): void;
66
+ }
67
+ export declare class TableVirtualScrollbar {
68
+ tableModule: TableUp;
69
+ table: HTMLElement;
70
+ quill: Quill;
71
+ scrollbarContainer: HTMLElement;
72
+ scrollbar: Scrollbar[];
73
+ bem: {
74
+ b: () => string;
75
+ be: (e?: string) => string;
76
+ bm: (m?: string) => string;
77
+ bem: (e?: string, m?: string) => string;
78
+ ns: (s?: string) => string;
79
+ bs: (s?: string) => string;
80
+ cv: (v?: string) => string;
81
+ is: (n: string) => string;
82
+ };
83
+ constructor(tableModule: TableUp, table: HTMLElement, quill: Quill);
84
+ updateWhenTextChange: () => void;
85
+ hide(): void;
86
+ show(): void;
87
+ update(): void;
88
+ destroy(): void;
89
+ }
@@ -0,0 +1,87 @@
1
+ import { EmitterSource, Range as TypeRange, default as Quill } from 'quill';
2
+ import { TableUp } from '../table-up';
3
+ import { InternalTableMenuModule, RelactiveRect, TableSelectionOptions } from '../utils';
4
+ import { TableCellInnerFormat } from '../formats';
5
+ export interface SelectionData {
6
+ anchorNode: Node | null;
7
+ anchorOffset: number;
8
+ focusNode: Node | null;
9
+ focusOffset: number;
10
+ }
11
+ export declare class TableSelection {
12
+ tableModule: TableUp;
13
+ quill: Quill;
14
+ options: TableSelectionOptions;
15
+ boundary: RelactiveRect | null;
16
+ startScrollX: number;
17
+ startScrollY: number;
18
+ selectedTableScrollX: number;
19
+ selectedTableScrollY: number;
20
+ selectedEditorScrollX: number;
21
+ selectedEditorScrollY: number;
22
+ selectedTds: TableCellInnerFormat[];
23
+ cellSelectWrap: HTMLElement;
24
+ cellSelect: HTMLElement;
25
+ dragging: boolean;
26
+ scrollHandler: [HTMLElement, (...args: any[]) => void][];
27
+ tableMenu?: InternalTableMenuModule;
28
+ resizeObserver: ResizeObserver;
29
+ table?: HTMLTableElement;
30
+ isDisplaySelection: boolean;
31
+ bem: {
32
+ b: () => string;
33
+ be: (e?: string) => string;
34
+ bm: (m?: string) => string;
35
+ bem: (e?: string, m?: string) => string;
36
+ ns: (s?: string) => string;
37
+ bs: (s?: string) => string;
38
+ cv: (v?: string) => string;
39
+ is: (n: string) => string;
40
+ };
41
+ lastSelection: SelectionData;
42
+ constructor(tableModule: TableUp, quill: Quill, options?: Partial<TableSelectionOptions>);
43
+ updateAfterEvent: () => void;
44
+ getFirstTextNode(dom: HTMLElement | Node): Node;
45
+ getLastTextNode(dom: HTMLElement | Node): Node;
46
+ getNodeTailOffset(node: Node): number;
47
+ quillSelectionChangeHandler: (range: TypeRange | null, _oldRange: TypeRange | null, source: EmitterSource) => void;
48
+ setSelectionData(selection: Selection, selectionData: SelectionData): void;
49
+ selectionDirectionUp(selection: SelectionData): boolean;
50
+ findWrapSelection(points: {
51
+ node: Node | null;
52
+ offset: number;
53
+ }[]): {
54
+ startNode: Node | null;
55
+ startOffset: number;
56
+ endNode: Node | null;
57
+ endOffset: number;
58
+ };
59
+ resolveOptions(options: Partial<TableSelectionOptions>): TableSelectionOptions;
60
+ selectionChangeHandler: () => void;
61
+ helpLinesInitial(): HTMLDivElement;
62
+ computeSelectedTds(startPoint: {
63
+ x: number;
64
+ y: number;
65
+ }, endPoint: {
66
+ x: number;
67
+ y: number;
68
+ }): TableCellInnerFormat[];
69
+ mouseDownHandler: (mousedownEvent: MouseEvent) => void;
70
+ updateWithSelectedTds(): void;
71
+ update(): void;
72
+ getQuillViewScroll(): {
73
+ x: number;
74
+ y: number;
75
+ };
76
+ getTableViewScroll(): {
77
+ x: number;
78
+ y: number;
79
+ };
80
+ setSelectionTable(table: HTMLTableElement | undefined): void;
81
+ removeCell: (e: KeyboardEvent) => void;
82
+ showDisplay(): void;
83
+ show(): void;
84
+ hideDisplay(): void;
85
+ hide(): void;
86
+ destroy(): void;
87
+ }