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,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,6 @@
1
+ interface ButtonOptions {
2
+ content: HTMLElement | string;
3
+ type: 'confirm' | 'default';
4
+ }
5
+ export declare function createButton(options?: Partial<ButtonOptions>): HTMLButtonElement;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ interface ColorPickerOptions {
2
+ color: string;
3
+ onChange: (color: string) => void;
4
+ }
5
+ export declare function createColorPicker(options?: Partial<ColorPickerOptions>): HTMLDivElement;
6
+ export {};
@@ -0,0 +1,10 @@
1
+ interface DialogOptions {
2
+ beforeClose?: () => void;
3
+ child?: HTMLElement;
4
+ target?: HTMLElement;
5
+ }
6
+ export declare function createDialog({ child, target, beforeClose }?: DialogOptions): {
7
+ dialog: HTMLDivElement;
8
+ close: () => void;
9
+ };
10
+ export {};
@@ -0,0 +1,6 @@
1
+ export * from './button';
2
+ export * from './color-picker';
3
+ export * from './dialog';
4
+ export * from './input';
5
+ export * from './table';
6
+ export * from './tooltip';
@@ -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 {};
@@ -0,0 +1,2 @@
1
+ export * from './creator';
2
+ export * from './select-box';
@@ -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,4 @@
1
+ export interface CreateResizeObserverOptions {
2
+ ignoreFirstBind: boolean;
3
+ }
4
+ export declare function createResizeObserver(callback: (entries: ResizeObserverEntry[]) => void, options?: Partial<CreateResizeObserverOptions>): ResizeObserver;
@@ -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,2 @@
1
+ export declare function cssTextToObject(cssText: string): Record<string, string>;
2
+ export declare function objectToCssText(obj: Record<string, any>): string;
@@ -0,0 +1 @@
1
+ export declare function handleIfTransitionend(domNode: HTMLElement, duration: number, handler: () => void, options?: boolean | AddEventListenerOptions, lastTimer?: ReturnType<typeof setTimeout>): ReturnType<typeof setTimeout>;
@@ -0,0 +1,149 @@
1
+ import { default as Quill } from 'quill';
2
+ import { default as BaseTheme } from 'quill/themes/base';
3
+ import { default as Picker } from 'quill/ui/picker';
4
+ import { TableCellInnerFormat } from '../formats';
5
+ import { MenuTooltipInstance } from '../modules';
6
+ import { TableUp } from '../table-up';
7
+ import { blotName, tableUpEvent, tableUpInternal, tableUpSize } from './constants';
8
+ export type QuillThemePicker = Picker & {
9
+ options: HTMLElement;
10
+ };
11
+ export interface QuillTheme extends BaseTheme {
12
+ pickers: QuillThemePicker[];
13
+ }
14
+ export interface ToolOption {
15
+ handle: (tableModule: TableUp, selectedTds: TableCellInnerFormat[], e: Event | string | null) => void;
16
+ icon: string | ((tableModule: TableUp) => HTMLElement);
17
+ isColorChoose?: boolean;
18
+ key?: string;
19
+ name: string;
20
+ tip?: string;
21
+ }
22
+ export interface ToolOptionBreak {
23
+ name: 'break';
24
+ }
25
+ export type Tool = ToolOption | ToolOptionBreak;
26
+ export interface TableMenuOptions {
27
+ defaultColorMap: string[];
28
+ localstorageKey: string;
29
+ tipText: boolean;
30
+ tools: Tool[];
31
+ }
32
+ export interface TableSelectionOptions {
33
+ selectColor: string;
34
+ tableMenu?: Constructor<InternalTableMenuModule, [TableUp, Quill, Partial<TableMenuOptions>]>;
35
+ tableMenuOptions: TableMenuOptions;
36
+ }
37
+ export interface TableResizeScaleOptions {
38
+ blockSize: number;
39
+ }
40
+ export interface TableCreatorTextOptions {
41
+ cancelText: string;
42
+ colText: string;
43
+ confirmText: string;
44
+ customBtnText: string;
45
+ fullCheckboxText: string;
46
+ notPositiveNumberError: string;
47
+ perWidthInsufficient: string;
48
+ rowText: string;
49
+ }
50
+ export type TableMenuTexts = Record<string, string>;
51
+ export interface TableTextOptions extends TableCreatorTextOptions, TableMenuTexts {
52
+ clear: string;
53
+ custom: string;
54
+ perWidthInsufficient: string;
55
+ transparent: string;
56
+ }
57
+ export interface TableUpOptions {
58
+ align?: Constructor<InternalModule, [TableUp, HTMLElement, Quill, any]>;
59
+ alignOptions: any;
60
+ customBtn: boolean;
61
+ customSelect?: (tableModule: TableUp, picker: QuillThemePicker) => Promise<HTMLElement> | HTMLElement;
62
+ full: boolean;
63
+ fullSwitch: boolean;
64
+ icon: string;
65
+ resize?: Constructor<InternalModule, [TableUp, HTMLElement, Quill, any]>;
66
+ resizeOptions: any;
67
+ resizeScale?: Constructor<InternalModule, [TableUp, HTMLElement, Quill, Partial<TableResizeScaleOptions>]>;
68
+ resizeScaleOptions: Partial<TableResizeScaleOptions>;
69
+ scrollbar?: Constructor<InternalModule, [TableUp, HTMLElement, Quill, any]>;
70
+ scrollbarOptions: any;
71
+ selection?: Constructor<InternalTableSelectionModule, [TableUp, Quill, Partial<TableSelectionOptions>]>;
72
+ selectionOptions: Partial<TableSelectionOptions>;
73
+ texts: TableTextOptions;
74
+ }
75
+ export interface TableColValue {
76
+ align?: string;
77
+ colId: string;
78
+ full?: boolean;
79
+ tableId: string;
80
+ width: number;
81
+ }
82
+ export interface TableCellValue {
83
+ colId: string;
84
+ colspan: number;
85
+ rowId: string;
86
+ rowspan: number;
87
+ style?: string;
88
+ tableId: string;
89
+ }
90
+ export interface TableRowValue {
91
+ rowId: string;
92
+ tableId: string;
93
+ }
94
+ export interface TableCaptionValue {
95
+ side: 'top' | 'bottom';
96
+ tableId: string;
97
+ }
98
+ export interface TableValue {
99
+ align?: string;
100
+ full?: boolean;
101
+ tableId: string;
102
+ }
103
+ export interface RelactiveRect {
104
+ height: number;
105
+ width: number;
106
+ x: number;
107
+ x1: number;
108
+ y: number;
109
+ y1: number;
110
+ }
111
+ export interface InternalModule {
112
+ destroy: () => void;
113
+ hide: () => void;
114
+ show: () => void;
115
+ update: () => void;
116
+ }
117
+ export type Constructor<T = any, U extends Array<any> = any[]> = new (...args: U) => T;
118
+ export interface InternalTableSelectionModule extends InternalModule {
119
+ boundary: RelactiveRect | null;
120
+ cellSelect: HTMLElement;
121
+ computeSelectedTds: (startPoint: {
122
+ x: number;
123
+ y: number;
124
+ }, endPoint: {
125
+ x: number;
126
+ y: number;
127
+ }) => TableCellInnerFormat[];
128
+ dragging: boolean;
129
+ hideDisplay: () => void;
130
+ isDisplaySelection: boolean;
131
+ selectedTds: TableCellInnerFormat[];
132
+ showDisplay: () => void;
133
+ table?: HTMLElement;
134
+ tableMenu?: InternalModule;
135
+ updateWithSelectedTds: () => void;
136
+ }
137
+ export interface InternalTableMenuModule extends InternalModule {
138
+ activeTooltip: MenuTooltipInstance | null;
139
+ isMenuDisplay: boolean;
140
+ }
141
+ export type Writable<T> = {
142
+ -readonly [P in keyof T]: T[P];
143
+ };
144
+ export interface TableConstantsData {
145
+ blotName: Partial<Record<keyof Writable<typeof blotName>, string>>;
146
+ tableUpEvent: Partial<typeof tableUpEvent>;
147
+ tableUpInternal: Partial<typeof tableUpInternal>;
148
+ tableUpSize: Partial<typeof tableUpSize>;
149
+ }
@@ -0,0 +1,2 @@
1
+ export declare const randomId: () => string;
2
+ export declare function debounce<T extends (...args: any[]) => any>(fn: T, delay: number): (this: any, ...args: Parameters<T>) => void;
@@ -55,6 +55,16 @@ export declare const Resources: {
55
55
  'Select(Placeholder)': string;
56
56
  };
57
57
  AEditor: {
58
+ 'Insert Full Width Table': string;
59
+ Custom: string;
60
+ Confirm: string;
61
+ Cancel: string;
62
+ Row: string;
63
+ Column: string;
64
+ 'Not Positive Number Error': string;
65
+ perWidthInsufficient: string;
66
+ Transparent: string;
67
+ Clear: string;
58
68
  'Insert Column Right': string;
59
69
  'Insert Column Left': string;
60
70
  'Insert Row Top': string;
@@ -62,12 +72,12 @@ export declare const Resources: {
62
72
  'Delete Column': string;
63
73
  'Delete Row': string;
64
74
  'Delete Table': string;
65
- 'Image size adjust': string;
66
- Center: string;
67
- floatLeft: string;
68
- floatRight: string;
69
- 'Input on mouse down': string;
70
- Restore: string;
75
+ 'Set Background Color': string;
76
+ 'Set Border Color': string;
77
+ 'Switch Table Width': string;
78
+ 'Insert Table Caption': string;
79
+ 'Merge Cell': string;
80
+ 'Split Cell': string;
71
81
  'Right click to open properties': string;
72
82
  Default: string;
73
83
  'Enter link:': string;
@@ -24,6 +24,7 @@ export interface IATreeItemProps<T> {
24
24
  expanded?: TIcons | Exclude<React.ReactNode, string>;
25
25
  noChild?: TIcons | Exclude<React.ReactNode, string>;
26
26
  };
27
+ id: string;
27
28
  indents: EIndentState[];
28
29
  isDraggable?: boolean;
29
30
  isEqual: (a: T, b: T) => boolean;