ados-rcm 1.1.513 → 1.1.515
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/AModule/AComponents/AEditor/modules/tableUp/formats/container-format.d.ts +15 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/index.d.ts +11 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/overrides/block.d.ts +9 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/overrides/index.d.ts +2 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/overrides/scroll.d.ts +10 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/table-body-format.d.ts +10 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/table-caption-format.d.ts +23 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/table-cell-format.d.ts +26 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/table-cell-inner-format.d.ts +34 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/table-col-format.d.ts +22 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/table-colgroup-format.d.ts +20 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/table-main-format.d.ts +26 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/table-row-format.d.ts +25 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/table-wrapper-format.d.ts +14 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/formats/utils.d.ts +1 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/index.d.ts +7 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/index.d.ts +6 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-align.d.ts +31 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-clipboard.d.ts +42 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-menu/constants.d.ts +12 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-menu/index.d.ts +4 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-menu/table-menu-common.d.ts +43 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-menu/table-menu-contextmenu.d.ts +21 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-menu/table-menu-select.d.ts +9 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-resize/index.d.ts +5 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-resize/table-resize-box.d.ts +56 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-resize/table-resize-common.d.ts +79 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-resize/table-resize-line.d.ts +39 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-resize/table-resize-scale.d.ts +40 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-resize/utils.d.ts +2 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-scrollbar.d.ts +89 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/modules/table-selection.d.ts +87 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/table-up.d.ts +119 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/bem.d.ts +18 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/blot-helper.d.ts +25 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/color.d.ts +18 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/components/button.d.ts +6 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/components/color-picker.d.ts +6 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/components/dialog.d.ts +10 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/components/index.d.ts +6 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/components/input.d.ts +15 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/components/table/creator.d.ts +10 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/components/table/index.d.ts +2 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/components/table/select-box.d.ts +10 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/components/tooltip.d.ts +18 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/constants.d.ts +30 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/index.d.ts +13 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/is.d.ts +7 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/position.d.ts +14 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/resize-observer-helper.d.ts +4 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/scroll-event-handle.d.ts +6 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/transformer.d.ts +2 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/transition-event-helper.d.ts +1 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/types.d.ts +149 -0
- package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/utils.d.ts +2 -0
- package/dist/AModule/AComponents/ATree/ATreeItem.d.ts +1 -0
- package/dist/index.cjs.js +198 -198
- package/dist/index.es.js +25999 -21757
- package/package.json +6 -2
@@ -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,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
|
+
}
|
@@ -0,0 +1,119 @@
|
|
1
|
+
import { Range as TypeRange, default as Quill } from 'quill';
|
2
|
+
import { Context } from 'quill/modules/keyboard';
|
3
|
+
import { TableCellInnerFormat, TableMainFormat } from './formats';
|
4
|
+
import { InternalModule, InternalTableSelectionModule, QuillThemePicker, TableConstantsData, TableTextOptions, TableUpOptions } from './utils';
|
5
|
+
export declare function updateTableConstants(data: Partial<TableConstantsData>): void;
|
6
|
+
export declare function defaultCustomSelect(tableModule: TableUp, picker: QuillThemePicker): HTMLDivElement;
|
7
|
+
export declare class TableUp {
|
8
|
+
static moduleName: string;
|
9
|
+
static toolName: string;
|
10
|
+
static keyboradHandler: {
|
11
|
+
'forbid remove table by backspace': {
|
12
|
+
bindInHead: boolean;
|
13
|
+
key: string;
|
14
|
+
collapsed: boolean;
|
15
|
+
offset: number;
|
16
|
+
handler(this: {
|
17
|
+
quill: Quill;
|
18
|
+
}, range: TypeRange, context: Context): boolean;
|
19
|
+
};
|
20
|
+
'forbid remove table by delete': {
|
21
|
+
bindInHead: boolean;
|
22
|
+
key: string;
|
23
|
+
collapsed: boolean;
|
24
|
+
handler(this: {
|
25
|
+
quill: Quill;
|
26
|
+
}, range: TypeRange, context: Context): boolean;
|
27
|
+
};
|
28
|
+
'table up': {
|
29
|
+
bindInHead: boolean;
|
30
|
+
key: string;
|
31
|
+
collapsed: boolean;
|
32
|
+
format: "table-up-cell-inner"[];
|
33
|
+
handler(this: {
|
34
|
+
quill: Quill;
|
35
|
+
}, range: TypeRange, context: Context): boolean;
|
36
|
+
};
|
37
|
+
'table down': {
|
38
|
+
bindInHead: boolean;
|
39
|
+
key: string;
|
40
|
+
collapsed: boolean;
|
41
|
+
format: "table-up-cell-inner"[];
|
42
|
+
handler(this: {
|
43
|
+
quill: Quill;
|
44
|
+
}, range: TypeRange, context: Context): boolean;
|
45
|
+
};
|
46
|
+
'table caption break': {
|
47
|
+
bindInHead: boolean;
|
48
|
+
key: string;
|
49
|
+
shiftKey: null;
|
50
|
+
format: "table-up-caption"[];
|
51
|
+
handler(this: {
|
52
|
+
quill: Quill;
|
53
|
+
}, _range: TypeRange, _context: Context): boolean;
|
54
|
+
};
|
55
|
+
};
|
56
|
+
static register(): void;
|
57
|
+
quill: Quill;
|
58
|
+
options: TableUpOptions;
|
59
|
+
toolBox: HTMLDivElement;
|
60
|
+
selector?: HTMLElement;
|
61
|
+
table?: HTMLElement;
|
62
|
+
tableSelection?: InternalTableSelectionModule;
|
63
|
+
tableResize?: InternalModule;
|
64
|
+
tableScrollbar?: InternalModule;
|
65
|
+
tableAlign?: InternalModule;
|
66
|
+
tableResizeScale?: InternalModule;
|
67
|
+
get statics(): any;
|
68
|
+
constructor(quill: Quill, options: Partial<TableUpOptions>);
|
69
|
+
initialContainer(): HTMLDivElement;
|
70
|
+
addContainer(classes: string | HTMLElement): HTMLElement;
|
71
|
+
resolveOptions(options: Partial<TableUpOptions>): TableUpOptions;
|
72
|
+
resolveTexts(options: Partial<TableTextOptions>): {
|
73
|
+
fullCheckboxText: string;
|
74
|
+
customBtnText: string;
|
75
|
+
confirmText: string;
|
76
|
+
cancelText: string;
|
77
|
+
rowText: string;
|
78
|
+
colText: string;
|
79
|
+
notPositiveNumberError: string;
|
80
|
+
custom: string;
|
81
|
+
clear: string;
|
82
|
+
transparent: string;
|
83
|
+
perWidthInsufficient: string;
|
84
|
+
CopyCell: string;
|
85
|
+
CutCell: string;
|
86
|
+
InsertTop: string;
|
87
|
+
InsertRight: string;
|
88
|
+
InsertBottom: string;
|
89
|
+
InsertLeft: string;
|
90
|
+
MergeCell: string;
|
91
|
+
SplitCell: string;
|
92
|
+
DeleteRow: string;
|
93
|
+
DeleteColumn: string;
|
94
|
+
DeleteTable: string;
|
95
|
+
BackgroundColor: string;
|
96
|
+
BorderColor: string;
|
97
|
+
} & Partial<TableTextOptions>;
|
98
|
+
quillHack(): void;
|
99
|
+
showTableTools(table: HTMLElement): void;
|
100
|
+
hideTableTools(): void;
|
101
|
+
buildCustomSelect(customSelect: ((module: TableUp, picker: QuillThemePicker) => HTMLElement | Promise<HTMLElement>) | undefined, picker: QuillThemePicker): Promise<void>;
|
102
|
+
setCellAttrs(selectedTds: TableCellInnerFormat[], attr: string, value?: any, isStyle?: boolean): void;
|
103
|
+
getTextByCell(tds: TableCellInnerFormat[]): string;
|
104
|
+
getHTMLByCell(tds: TableCellInnerFormat[], isCut?: boolean): string;
|
105
|
+
insertTable(rows: number, columns: number): void;
|
106
|
+
calculateTableCellBorderWidth(): number;
|
107
|
+
fixUnusuaDeletelTable(tableBlot: TableMainFormat): void;
|
108
|
+
deleteTable(selectedTds: TableCellInnerFormat[]): void;
|
109
|
+
appendRow(selectedTds: TableCellInnerFormat[], isDown: boolean): void;
|
110
|
+
appendCol(selectedTds: TableCellInnerFormat[], isRight: boolean): void;
|
111
|
+
/**
|
112
|
+
* after insert or remove cell. handle cell colspan and rowspan merge
|
113
|
+
*/
|
114
|
+
fixTableByRemove(tableBlot: TableMainFormat): void;
|
115
|
+
removeRow(selectedTds: TableCellInnerFormat[]): void;
|
116
|
+
removeCol(selectedTds: TableCellInnerFormat[]): void;
|
117
|
+
mergeCells(selectedTds: TableCellInnerFormat[]): void;
|
118
|
+
splitCell(selectedTds: TableCellInnerFormat[]): void;
|
119
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
export declare function createBEM(b: string, n?: string): {
|
2
|
+
/** n-b */
|
3
|
+
b: () => string;
|
4
|
+
/** n-b__e */
|
5
|
+
be: (e?: string) => string;
|
6
|
+
/** n-b--m */
|
7
|
+
bm: (m?: string) => string;
|
8
|
+
/** n-b__e--m */
|
9
|
+
bem: (e?: string, m?: string) => string;
|
10
|
+
/** n-s */
|
11
|
+
ns: (s?: string) => string;
|
12
|
+
/** n-b-s */
|
13
|
+
bs: (s?: string) => string;
|
14
|
+
/** --n-v */
|
15
|
+
cv: (v?: string) => string;
|
16
|
+
/** is-n */
|
17
|
+
is: (n: string) => string;
|
18
|
+
};
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { Parchment as TypeParchment } from 'quill';
|
2
|
+
import { TableBodyFormat, TableCellFormat, TableCellInnerFormat, TableColFormat, TableColgroupFormat, TableMainFormat, TableRowFormat, TableWrapperFormat } from '../formats';
|
3
|
+
import { blotName } from './constants';
|
4
|
+
import { Constructor } from './types';
|
5
|
+
interface ParentBlotReturnMap {
|
6
|
+
[blotName.tableWrapper]: TableWrapperFormat;
|
7
|
+
[blotName.tableMain]: TableMainFormat;
|
8
|
+
[blotName.tableCol]: TableColFormat;
|
9
|
+
[blotName.tableColgroup]: TableColgroupFormat;
|
10
|
+
[blotName.tableBody]: TableBodyFormat;
|
11
|
+
[blotName.tableRow]: TableRowFormat;
|
12
|
+
[blotName.tableCell]: TableCellFormat;
|
13
|
+
[blotName.tableCellInner]: TableCellInnerFormat;
|
14
|
+
}
|
15
|
+
type ParentBlotReturn = {
|
16
|
+
[key: string]: TypeParchment.Parent;
|
17
|
+
} & ParentBlotReturnMap;
|
18
|
+
export declare function findParentBlot<T extends TypeParchment.Parent, U extends string = string>(blot: TypeParchment.Blot, targetBlotName: U): U extends keyof ParentBlotReturn ? ParentBlotReturn[U] : T;
|
19
|
+
export declare function findParentBlots<T extends (keyof ParentBlotReturnMap | string)[]>(blot: TypeParchment.Blot, targetBlotNames: T): {
|
20
|
+
[K in keyof T]: ParentBlotReturn[T[K]];
|
21
|
+
};
|
22
|
+
export declare function findAllParentBlot(Blot: TypeParchment.Blot): Map<string, TypeParchment.Blot>;
|
23
|
+
export declare function findChildBlot<T extends TypeParchment.BlotConstructor>(parent: TypeParchment.Parent, blot: T): InstanceType<T>[];
|
24
|
+
export declare function mixinClass<T extends Constructor, U extends Constructor[]>(base: T, mixins: U): T & Omit<U[number], 'constructor' | keyof InstanceType<T>>;
|
25
|
+
export {};
|
@@ -0,0 +1,18 @@
|
|
1
|
+
export interface HSB {
|
2
|
+
a: number;
|
3
|
+
b: number;
|
4
|
+
h: number;
|
5
|
+
s: number;
|
6
|
+
}
|
7
|
+
export interface RGB {
|
8
|
+
a: number;
|
9
|
+
b: number;
|
10
|
+
g: number;
|
11
|
+
r: number;
|
12
|
+
}
|
13
|
+
export declare function validateHSB(hsb: HSB): HSB;
|
14
|
+
export declare function HEXtoRGB(hex: string): RGB;
|
15
|
+
export declare function RGBtoHSB(rgb: RGB): HSB;
|
16
|
+
export declare function HSBtoRGB(hsb: HSB): RGB;
|
17
|
+
export declare function RGBtoHEX(rgb: RGB): string;
|
18
|
+
export declare const HSBtoHEX: (hsb: HSB) => string;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
interface InputOptions {
|
2
|
+
[key: string]: any;
|
3
|
+
max?: number;
|
4
|
+
min?: number;
|
5
|
+
type?: string;
|
6
|
+
value?: string;
|
7
|
+
}
|
8
|
+
export declare function createInputItem(label: string, options: InputOptions): {
|
9
|
+
item: HTMLDivElement;
|
10
|
+
input: HTMLInputElement;
|
11
|
+
errorTip: (msg: string) => {
|
12
|
+
removeError: () => void;
|
13
|
+
};
|
14
|
+
};
|
15
|
+
export {};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { TableCreatorTextOptions } from '../../types';
|
2
|
+
interface TableCreatorOptions extends Omit<TableCreatorTextOptions, 'customBtnText'> {
|
3
|
+
col: number;
|
4
|
+
row: number;
|
5
|
+
}
|
6
|
+
export declare function showTableCreator(options?: Partial<TableCreatorOptions>): Promise<{
|
7
|
+
col: number;
|
8
|
+
row: number;
|
9
|
+
}>;
|
10
|
+
export {};
|
package/dist/AModule/AComponents/AEditor/modules/tableUp/utils/components/table/select-box.d.ts
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
import { TableCreatorTextOptions } from '../../types';
|
2
|
+
interface TableSelectOptions {
|
3
|
+
col: number;
|
4
|
+
customBtn: boolean;
|
5
|
+
onSelect: (row: number, col: number) => void;
|
6
|
+
row: number;
|
7
|
+
texts: Partial<TableCreatorTextOptions>;
|
8
|
+
}
|
9
|
+
export declare function createSelectBox(options?: Partial<TableSelectOptions>): HTMLDivElement;
|
10
|
+
export {};
|
@@ -0,0 +1,18 @@
|
|
1
|
+
export interface ToolTipOptions {
|
2
|
+
closed?: () => void;
|
3
|
+
container?: HTMLElement;
|
4
|
+
content?: HTMLElement;
|
5
|
+
delay?: number;
|
6
|
+
direction?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
|
7
|
+
msg?: string;
|
8
|
+
onClose?: (force?: boolean) => boolean;
|
9
|
+
onDestroy?: () => void;
|
10
|
+
onOpen?: (force?: boolean) => boolean;
|
11
|
+
type?: 'hover' | 'click';
|
12
|
+
}
|
13
|
+
export interface TooltipInstance {
|
14
|
+
destroy: () => void;
|
15
|
+
hide: (force?: boolean) => void;
|
16
|
+
show: (force?: boolean) => void;
|
17
|
+
}
|
18
|
+
export declare function createTooltip(target: HTMLElement, options?: ToolTipOptions): TooltipInstance | null;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { Parchment as TypeParchment } from 'quill';
|
2
|
+
export declare const blotName: {
|
3
|
+
readonly container: "table-up-container";
|
4
|
+
readonly tableCaption: "table-up-caption";
|
5
|
+
readonly tableWrapper: "table-up";
|
6
|
+
readonly tableMain: "table-up-main";
|
7
|
+
readonly tableColgroup: "table-up-colgroup";
|
8
|
+
readonly tableCol: "table-up-col";
|
9
|
+
readonly tableBody: "table-up-body";
|
10
|
+
readonly tableRow: "table-up-row";
|
11
|
+
readonly tableCell: "table-up-cell";
|
12
|
+
readonly tableCellInner: "table-up-cell-inner";
|
13
|
+
};
|
14
|
+
export declare const tableUpSize: {
|
15
|
+
colMinWidthPre: number;
|
16
|
+
colMinWidthPx: number;
|
17
|
+
colDefaultWidth: number;
|
18
|
+
rowMinHeightPx: number;
|
19
|
+
};
|
20
|
+
export declare const tableUpEvent: {
|
21
|
+
AFTER_TABLE_RESIZE: string;
|
22
|
+
};
|
23
|
+
export declare const tableUpInternal: {
|
24
|
+
moduleName: string;
|
25
|
+
};
|
26
|
+
export declare const defaultColorMap: string[][];
|
27
|
+
export declare const cssNamespace = "table-up";
|
28
|
+
export declare const tableCantInsert: Set<string>;
|
29
|
+
export declare const isForbidInTableBlot: (blot: TypeParchment.Blot) => boolean;
|
30
|
+
export declare function isForbidInTable(current: TypeParchment.Blot): boolean;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
export * from './bem';
|
2
|
+
export * from './blot-helper';
|
3
|
+
export * from './color';
|
4
|
+
export * from './components';
|
5
|
+
export * from './constants';
|
6
|
+
export * from './is';
|
7
|
+
export * from './position';
|
8
|
+
export * from './resize-observer-helper';
|
9
|
+
export * from './scroll-event-handle';
|
10
|
+
export * from './transformer';
|
11
|
+
export * from './transition-event-helper';
|
12
|
+
export * from './types';
|
13
|
+
export * from './utils';
|
@@ -0,0 +1,7 @@
|
|
1
|
+
export declare const isFunction: (val: unknown) => val is (...args: unknown[]) => unknown;
|
2
|
+
export declare const isBoolean: (val: unknown) => val is boolean;
|
3
|
+
export declare const isArray: (arg: any) => arg is any[];
|
4
|
+
export declare const isString: (val: unknown) => val is string;
|
5
|
+
export declare const isNumber: (val: unknown) => val is number;
|
6
|
+
export declare const isObject: (val: unknown) => val is Record<any, any>;
|
7
|
+
export declare const isValidCellspan: (val: unknown) => boolean;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { RelactiveRect } from './types';
|
2
|
+
export declare function isRectanglesIntersect<T extends Omit<RelactiveRect, 'width' | 'height'>>(a: T, b: T, tolerance?: number, edgeJudge?: boolean): boolean;
|
3
|
+
export declare function getRelativeRect(targetRect: Omit<RelactiveRect, 'x1' | 'y1'>, container: HTMLElement): RelactiveRect;
|
4
|
+
export declare function limitDomInViewPort(rect: {
|
5
|
+
height: number;
|
6
|
+
left: number;
|
7
|
+
top: number;
|
8
|
+
width: number;
|
9
|
+
}): {
|
10
|
+
left: number;
|
11
|
+
top: number;
|
12
|
+
leftLimited: boolean;
|
13
|
+
topLimited: boolean;
|
14
|
+
};
|
@@ -0,0 +1,6 @@
|
|
1
|
+
interface ScrollHandle {
|
2
|
+
scrollHandler: [HTMLElement, (e: Event) => void][];
|
3
|
+
}
|
4
|
+
export declare function addScrollEvent(this: ScrollHandle, dom: HTMLElement, handle: (e: Event) => void): void;
|
5
|
+
export declare function clearScrollEvent(this: ScrollHandle): void;
|
6
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function handleIfTransitionend(domNode: HTMLElement, duration: number, handler: () => void, options?: boolean | AddEventListenerOptions, lastTimer?: ReturnType<typeof setTimeout>): ReturnType<typeof setTimeout>;
|