quill-table-up 2.2.4 → 2.3.1

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 CHANGED
@@ -1,1071 +1,1119 @@
1
- import Quill, { Parchment, Range, EmitterSource } from 'quill';
2
- import { Context } from 'quill/modules/keyboard';
3
- import TypeScroll from 'quill/blots/scroll';
4
- import TypeBlock, { BlockEmbed as BlockEmbed$1 } from 'quill/blots/block';
5
- import BaseTheme from 'quill/themes/base';
6
- import Picker from 'quill/ui/picker';
7
- import { Delta } from 'quill/core';
8
- import TypeClipboard from 'quill/modules/clipboard';
9
- import TypeInline from 'quill/blots/inline';
10
- import TypeText from 'quill/blots/text';
1
+ import Quill, { EmitterSource, Parchment, Range } from "quill";
2
+ import { Context } from "quill/modules/keyboard";
3
+ import TypeScroll from "quill/blots/scroll";
4
+ import TypeBlock, { BlockEmbed } from "quill/blots/block";
5
+ import TypeInline from "quill/blots/inline";
6
+ import TypeText from "quill/blots/text";
7
+ import BaseTheme from "quill/themes/base";
8
+ import Picker from "quill/ui/picker";
9
+ import { Delta } from "quill/core";
10
+ import TypeClipboard from "quill/modules/clipboard";
11
11
 
12
+ //#region src/formats/container-format.d.ts
12
13
  declare const Container: typeof Parchment.ContainerBlot;
13
14
  declare class ContainerFormat extends Container {
14
- static tagName: string;
15
- static blotName: string;
16
- static scope: Parchment.Scope;
17
- static allowedChildren?: Parchment.BlotConstructor[];
18
- static requiredContainer: Parchment.BlotConstructor;
19
- static defaultChild?: Parchment.BlotConstructor;
20
- static create(_value?: unknown): HTMLElement;
21
- insertAt(index: number, value: string, def?: any): void;
22
- optimize(_context: Record<string, any>): void;
23
- enforceAllowedChildren(): void;
15
+ static tagName: string;
16
+ static blotName: string;
17
+ static scope: Parchment.Scope;
18
+ static allowedChildren?: Parchment.BlotConstructor[];
19
+ static requiredContainer: Parchment.BlotConstructor;
20
+ static defaultChild?: Parchment.BlotConstructor;
21
+ static create(_value?: unknown): HTMLElement;
22
+ optimize(_context: Record<string, any>): void;
23
+ enforceAllowedChildren(): void;
24
24
  }
25
-
26
- declare const BlockEmbed: typeof BlockEmbed$1;
27
- declare class TableColFormat extends BlockEmbed {
28
- static blotName: "table-up-col";
29
- static tagName: string;
30
- static validWidth(width: string | number, full: boolean): string;
31
- static create(value: TableColValue): HTMLElement;
32
- static value(domNode: HTMLElement): Record<string, any>;
33
- get width(): number;
34
- set width(value: string | number);
35
- get tableId(): string;
36
- get colId(): string;
37
- get full(): boolean;
38
- set full(value: boolean);
39
- get align(): string;
40
- set align(value: string);
41
- checkMerge(): boolean;
42
- optimize(context: Record<string, any>): void;
43
- insertAt(index: number, value: string, def?: any): void;
25
+ //#endregion
26
+ //#region src/formats/table-col-format.d.ts
27
+ declare const BlockEmbed$1: typeof BlockEmbed;
28
+ declare class TableColFormat extends BlockEmbed$1 {
29
+ static blotName: "table-up-col";
30
+ static tagName: string;
31
+ static validWidth(width: string | number, full: boolean): string;
32
+ static create(value: TableColValue): HTMLElement;
33
+ static value(domNode: HTMLElement): Record<string, any>;
34
+ get width(): number;
35
+ set width(value: string | number);
36
+ get tableId(): string;
37
+ get colId(): string;
38
+ get full(): boolean;
39
+ set full(value: boolean);
40
+ get align(): string;
41
+ set align(value: string);
42
+ checkMerge(): boolean;
43
+ optimize(context: Record<string, any>): void;
44
+ insertAt(index: number, value: string, def?: any): void;
44
45
  }
45
-
46
+ //#endregion
47
+ //#region src/formats/table-cell-inner-format.d.ts
46
48
  declare class TableCellInnerFormat extends ContainerFormat {
47
- static blotName: "table-up-cell-inner";
48
- static tagName: string;
49
- static className: string;
50
- static allowDataAttrs: Set<string>;
51
- static defaultChild: Parchment.BlotConstructor;
52
- parent: TableCellFormat;
53
- static allowStyle: Set<string>;
54
- static isAllowStyle(str: string): boolean;
55
- static create(value: TableCellValue): HTMLElement;
56
- static formats(domNode: HTMLElement): Record<string, any>;
57
- constructor(scroll: TypeScroll, domNode: HTMLElement, _value: TableCellValue);
58
- setFormatValue(name: string, value: any, isStyle?: boolean): void;
59
- get tableId(): string;
60
- get rowId(): string;
61
- set rowId(value: string);
62
- get colId(): string;
63
- set colId(value: string);
64
- get rowspan(): number;
65
- set rowspan(value: number);
66
- get colspan(): number;
67
- set colspan(value: number);
68
- getColumnIndex(): number;
69
- formatAt(index: number, length: number, name: string, value: any): void;
70
- formats(): Record<string, any>;
71
- checkMerge(): boolean;
72
- optimize(): void;
73
- insertBefore(blot: Parchment.Blot, ref?: Parchment.Blot | null): void;
49
+ static blotName: "table-up-cell-inner";
50
+ static tagName: string;
51
+ static className: string;
52
+ static allowDataAttrs: Set<string>;
53
+ static defaultChild: Parchment.BlotConstructor;
54
+ parent: TableCellFormat;
55
+ static allowStyle: Set<string>;
56
+ static isAllowStyle(str: string): boolean;
57
+ static create(value: TableCellValue): HTMLElement;
58
+ static formats(domNode: HTMLElement): Record<string, any>;
59
+ constructor(scroll: TypeScroll, domNode: HTMLElement, _value: TableCellValue);
60
+ setFormatValue(name: string, value: any, isStyle?: boolean): void;
61
+ get tableId(): string;
62
+ get rowId(): string;
63
+ set rowId(value: string);
64
+ get colId(): string;
65
+ set colId(value: string);
66
+ get rowspan(): number;
67
+ set rowspan(value: number);
68
+ get colspan(): number;
69
+ set colspan(value: number);
70
+ getColumnIndex(): number;
71
+ formatAt(index: number, length: number, name: string, value: any): void;
72
+ insertAt(index: number, value: string, def?: any): void;
73
+ formats(): Record<string, any>;
74
+ checkMerge(): boolean;
75
+ optimize(): void;
76
+ insertBefore(blot: Parchment.Blot, ref?: Parchment.Blot | null): void;
74
77
  }
75
-
78
+ //#endregion
79
+ //#region src/formats/table-cell-format.d.ts
76
80
  declare class TableCellFormat extends ContainerFormat {
77
- static blotName: "table-up-cell";
78
- static tagName: string;
79
- static className: string;
80
- static allowDataAttrs: Set<string>;
81
- static allowAttrs: Set<string>;
82
- static allowStyle: Set<string>;
83
- static isAllowStyle(str: string): boolean;
84
- static create(value: TableCellValue): HTMLElement;
85
- static formats(domNode: HTMLElement): Record<string, any>;
86
- setFormatValue(name: string, value?: any): void;
87
- setStyleBoder(name: string, value?: any): void;
88
- getNearByCell(direction: 'left' | 'top'): TableCellFormat[];
89
- get tableId(): string;
90
- get rowId(): string;
91
- get colId(): string;
92
- get rowspan(): number;
93
- get colspan(): number;
94
- getColumnIndex(): number;
95
- getCellInner(): TableCellInnerFormat;
96
- checkMerge(): boolean;
97
- optimize(context: Record<string, any>): void;
81
+ static blotName: "table-up-cell";
82
+ static tagName: string;
83
+ static className: string;
84
+ static allowDataAttrs: Set<string>;
85
+ static allowAttrs: Set<string>;
86
+ static allowStyle: Set<string>;
87
+ static isAllowStyle(str: string): boolean;
88
+ static create(value: TableCellValue): HTMLElement;
89
+ static formats(domNode: HTMLElement): Record<string, any>;
90
+ setFormatValue(name: string, value?: any): void;
91
+ setStyleBoder(name: string, value?: any): void;
92
+ getNearByCell(direction: 'left' | 'top'): TableCellFormat[];
93
+ get tableId(): string;
94
+ get rowId(): string;
95
+ get colId(): string;
96
+ get rowspan(): number;
97
+ get colspan(): number;
98
+ getColumnIndex(): number;
99
+ getCellInner(): TableCellInnerFormat;
100
+ checkMerge(): boolean;
101
+ optimize(context: Record<string, any>): void;
98
102
  }
99
-
103
+ //#endregion
104
+ //#region src/formats/table-row-format.d.ts
100
105
  type SkipRowCount = number[] & {
101
- skipRowNum?: number;
106
+ skipRowNum?: number;
102
107
  };
103
108
  declare class TableRowFormat extends ContainerFormat {
104
- static blotName: "table-up-row";
105
- static tagName: string;
106
- static className: string;
107
- static create(value: TableRowValue): HTMLElement;
108
- children: Parchment.LinkedList<TableCellFormat>;
109
- get rowId(): string;
110
- get tableId(): string;
111
- setHeight(value: string): void;
112
- getCellByColId(colId: string, direction: 'next' | 'prev'): TableCellFormat | null;
113
- insertCell(targetIndex: number, value: TableCellValue): SkipRowCount;
114
- getCellByColumIndex(stopIndex: number): [null | TableCellFormat, number, number[]];
115
- removeCell(targetIndex: number): SkipRowCount;
116
- foreachCellInner(func: (tableCell: TableCellInnerFormat, index: number) => boolean | void): void;
117
- checkMerge(): boolean;
118
- optimize(context: Record<string, any>): void;
109
+ static blotName: "table-up-row";
110
+ static tagName: string;
111
+ static className: string;
112
+ static create(value: TableRowValue): HTMLElement;
113
+ children: Parchment.LinkedList<TableCellFormat>;
114
+ get rowId(): string;
115
+ get tableId(): string;
116
+ setHeight(value: string): void;
117
+ getCellByColId(colId: string, direction: 'next' | 'prev'): TableCellFormat | null;
118
+ insertCell(targetIndex: number, value: TableCellValue): SkipRowCount;
119
+ getCellByColumIndex(stopIndex: number): [null | TableCellFormat, number, number[]];
120
+ removeCell(targetIndex: number): SkipRowCount;
121
+ foreachCellInner(func: (tableCell: TableCellInnerFormat, index: number) => boolean | void): void;
122
+ checkMerge(): boolean;
123
+ optimize(context: Record<string, any>): void;
119
124
  }
120
-
125
+ //#endregion
126
+ //#region src/formats/table-main-format.d.ts
121
127
  declare class TableMainFormat extends ContainerFormat {
122
- scroll: TypeScroll;
123
- static blotName: "table-up-main";
124
- static tagName: string;
125
- static className: string;
126
- static create(value: TableValue): HTMLElement;
127
- constructor(scroll: TypeScroll, domNode: HTMLElement, _value: unknown);
128
- colWidthFillTable(): number | undefined;
129
- get tableId(): string;
130
- get full(): boolean;
131
- set full(value: boolean);
132
- get align(): string;
133
- set align(value: string);
134
- setFull(): void;
135
- cancelFull(): void;
136
- updateAlign(): void;
137
- getRows(): TableRowFormat[];
138
- getRowIds(): string[];
139
- getCols(): TableColFormat[];
140
- getColIds(): string[];
141
- checkMerge(): boolean;
142
- optimize(context: Record<string, any>): void;
143
- sortMergeChildren(): void;
128
+ scroll: TypeScroll;
129
+ static blotName: "table-up-main";
130
+ static tagName: string;
131
+ static className: string;
132
+ static create(value: TableValue): HTMLElement;
133
+ constructor(scroll: TypeScroll, domNode: HTMLElement, _value: unknown);
134
+ colWidthFillTable(): number | undefined;
135
+ get tableId(): string;
136
+ get full(): boolean;
137
+ set full(value: boolean);
138
+ get align(): string;
139
+ set align(value: string);
140
+ setFull(): void;
141
+ cancelFull(): void;
142
+ updateAlign(): void;
143
+ getRows(): TableRowFormat[];
144
+ getRowIds(): string[];
145
+ getCols(): TableColFormat[];
146
+ getColIds(): string[];
147
+ checkMerge(): boolean;
148
+ optimize(context: Record<string, any>): void;
149
+ sortMergeChildren(): void;
144
150
  }
145
-
151
+ //#endregion
152
+ //#region src/formats/table-body-format.d.ts
146
153
  declare class TableBodyFormat extends ContainerFormat {
147
- static blotName: "table-up-body";
148
- static tagName: string;
149
- static create(value: string): HTMLElement;
150
- get tableId(): string;
151
- insertRow(targetIndex: number): void;
152
- checkMerge(): boolean;
153
- optimize(context: Record<string, any>): void;
154
+ static blotName: "table-up-body";
155
+ static tagName: string;
156
+ static create(value: string): HTMLElement;
157
+ get tableId(): string;
158
+ insertRow(targetIndex: number): void;
159
+ checkMerge(): boolean;
160
+ optimize(context: Record<string, any>): void;
154
161
  }
155
-
162
+ //#endregion
163
+ //#region src/formats/overrides/block.d.ts
156
164
  declare const Block: typeof TypeBlock;
157
165
  declare class BlockOverride extends Block {
158
- replaceWith(name: string | Parchment.Blot, value?: any): Parchment.Blot;
159
- format(name: string, value: any): void;
166
+ replaceWith(name: string | Parchment.Blot, value?: any): Parchment.Blot;
167
+ format(name: string, value: any): void;
160
168
  }
161
-
169
+ //#endregion
170
+ //#region src/formats/overrides/scroll.d.ts
162
171
  declare const ScrollBlot: any;
163
172
  declare class ScrollOverride extends ScrollBlot {
164
- domNode: HTMLElement;
165
- enable(enabled?: boolean): void;
166
- createBlock(attributes: Record<string, any>, refBlot?: Parchment.Blot): Parchment.ParentBlot | TableCellInnerFormat;
173
+ domNode: HTMLElement;
174
+ enable(enabled?: boolean): void;
175
+ createBlock(attributes: Record<string, any>, refBlot?: Parchment.Blot): Parchment.ParentBlot | TableCellInnerFormat;
167
176
  }
168
-
177
+ //#endregion
178
+ //#region src/formats/table-caption-format.d.ts
169
179
  declare class TableCaptionFormat extends BlockOverride {
170
- static blotName: "table-up-caption";
171
- static tagName: string;
172
- static className: string;
173
- static allowedChildren: (typeof TypeInline | typeof TypeText)[];
174
- static create(value: TableCaptionValue): HTMLElement;
175
- static formats(domNode: HTMLElement): TableCaptionValue;
176
- scroll: TypeScroll;
177
- uiNode: HTMLElement;
178
- constructor(scroll: TypeScroll, domNode: HTMLElement, _value: TableCaptionValue);
179
- createUI(): HTMLElement;
180
- get tableId(): string;
181
- set side(value: TableCaptionValue['side']);
182
- get side(): TableCaptionValue["side"];
183
- format(name: string, value: any): void;
184
- checkMerge(): boolean;
185
- optimize(context: Record<string, any>): void;
180
+ static blotName: "table-up-caption";
181
+ static tagName: string;
182
+ static className: string;
183
+ static allowedChildren: (typeof TypeInline | typeof TypeText)[];
184
+ static create(value: TableCaptionValue): HTMLElement;
185
+ static formats(domNode: HTMLElement): TableCaptionValue;
186
+ scroll: TypeScroll;
187
+ uiNode: HTMLElement;
188
+ constructor(scroll: TypeScroll, domNode: HTMLElement, _value: TableCaptionValue);
189
+ createUI(): HTMLElement;
190
+ get tableId(): string;
191
+ set side(value: TableCaptionValue['side']);
192
+ get side(): TableCaptionValue["side"];
193
+ format(name: string, value: any): void;
194
+ checkMerge(): boolean;
195
+ optimize(context: Record<string, any>): void;
186
196
  }
187
-
197
+ //#endregion
198
+ //#region src/formats/table-colgroup-format.d.ts
188
199
  declare class TableColgroupFormat extends ContainerFormat {
189
- static blotName: "table-up-colgroup";
190
- static tagName: string;
191
- children: Parchment.LinkedList<TableColFormat>;
192
- static create(value: TableValue): HTMLElement;
193
- get tableId(): string;
194
- get full(): boolean;
195
- set full(value: boolean);
196
- get align(): string;
197
- set align(value: string);
198
- findCol(index: number): TableColFormat | null;
199
- insertColByIndex(index: number, value: TableColValue): void;
200
- removeColByIndex(index: number): void;
201
- checkMerge(): boolean;
202
- optimize(context: Record<string, any>): void;
200
+ static blotName: "table-up-colgroup";
201
+ static tagName: string;
202
+ children: Parchment.LinkedList<TableColFormat>;
203
+ static create(value: TableValue): HTMLElement;
204
+ get tableId(): string;
205
+ get full(): boolean;
206
+ set full(value: boolean);
207
+ get align(): string;
208
+ set align(value: string);
209
+ findCol(index: number): TableColFormat | null;
210
+ insertColByIndex(index: number, value: TableColValue): void;
211
+ removeColByIndex(index: number): void;
212
+ checkMerge(): boolean;
213
+ optimize(context: Record<string, any>): void;
203
214
  }
204
-
215
+ //#endregion
216
+ //#region src/formats/table-wrapper-format.d.ts
205
217
  declare class TableWrapperFormat extends ContainerFormat {
206
- scroll: any;
207
- static blotName: "table-up";
208
- static tagName: string;
209
- static className: string;
210
- static create(value: string): HTMLElement;
211
- constructor(scroll: any, node: Node, _value: string);
212
- get tableId(): string;
213
- checkMerge(): boolean;
214
- deleteAt(index: number, length: number): void;
215
- remove(): void;
216
- insertLineAround: () => void;
218
+ scroll: any;
219
+ static blotName: "table-up";
220
+ static tagName: string;
221
+ static className: string;
222
+ static create(value: string): HTMLElement;
223
+ constructor(scroll: any, node: Node, _value: string);
224
+ get tableId(): string;
225
+ checkMerge(): boolean;
226
+ deleteAt(index: number, length: number): void;
227
+ remove(): void;
228
+ isBlockLine(blot: Parchment.Blot): boolean;
229
+ insertLineAround: () => void;
217
230
  }
218
-
231
+ //#endregion
232
+ //#region src/formats/index.d.ts
219
233
  declare function getTableMainRect(tableMainBlot: TableMainFormat): {
220
- body: TableBodyFormat;
221
- rect: DOMRect;
234
+ body: TableBodyFormat;
235
+ rect: DOMRect;
222
236
  };
223
-
237
+ //#endregion
238
+ //#region src/utils/constants.d.ts
224
239
  declare const blotName: {
225
- readonly container: "table-up-container";
226
- readonly tableCaption: "table-up-caption";
227
- readonly tableWrapper: "table-up";
228
- readonly tableMain: "table-up-main";
229
- readonly tableColgroup: "table-up-colgroup";
230
- readonly tableCol: "table-up-col";
231
- readonly tableBody: "table-up-body";
232
- readonly tableRow: "table-up-row";
233
- readonly tableCell: "table-up-cell";
234
- readonly tableCellInner: "table-up-cell-inner";
240
+ readonly container: "table-up-container";
241
+ readonly tableCaption: "table-up-caption";
242
+ readonly tableWrapper: "table-up";
243
+ readonly tableMain: "table-up-main";
244
+ readonly tableColgroup: "table-up-colgroup";
245
+ readonly tableCol: "table-up-col";
246
+ readonly tableBody: "table-up-body";
247
+ readonly tableRow: "table-up-row";
248
+ readonly tableCell: "table-up-cell";
249
+ readonly tableCellInner: "table-up-cell-inner";
235
250
  };
236
251
  declare const tableUpSize: {
237
- colMinWidthPre: number;
238
- colMinWidthPx: number;
239
- colDefaultWidth: number;
240
- rowMinHeightPx: number;
252
+ colMinWidthPre: number;
253
+ colMinWidthPx: number;
254
+ colDefaultWidth: number;
255
+ rowMinHeightPx: number;
241
256
  };
242
257
  declare const tableUpEvent: {
243
- AFTER_TABLE_RESIZE: string;
258
+ AFTER_TABLE_RESIZE: string;
244
259
  };
245
260
  declare const tableUpInternal: {
246
- moduleName: string;
261
+ moduleName: string;
247
262
  };
248
-
263
+ //#endregion
264
+ //#region src/modules/table-align.d.ts
249
265
  declare class TableAlign {
250
- tableModule: TableUp;
251
- table: HTMLElement;
252
- quill: Quill;
253
- tableBlot: TableMainFormat;
254
- tableWrapperBlot: TableWrapperFormat;
255
- alignBox?: HTMLElement;
256
- cleanup?: () => void;
257
- bem: {
258
- b: () => string;
259
- be: (e?: string) => string;
260
- bm: (m?: string) => string;
261
- bem: (e?: string, m?: string) => string;
262
- ns: (s?: string) => string;
263
- bs: (s?: string) => string;
264
- cv: (v?: string) => string;
265
- is: (n: string) => string;
266
- };
267
- resizeObserver: ResizeObserver;
268
- constructor(tableModule: TableUp, table: HTMLElement, quill: Quill);
269
- updateWhenTextChange: () => void;
270
- buildTool(): HTMLElement;
271
- setTableAlign(tableBlot: TableMainFormat, align: string): void;
272
- show(): void;
273
- hide(): void;
274
- update(): void;
275
- destroy(): void;
266
+ tableModule: TableUp;
267
+ table: HTMLElement;
268
+ quill: Quill;
269
+ tableBlot: TableMainFormat;
270
+ tableWrapperBlot: TableWrapperFormat;
271
+ alignBox?: HTMLElement;
272
+ cleanup?: () => void;
273
+ bem: {
274
+ b: () => string;
275
+ be: (e?: string) => string;
276
+ bm: (m?: string) => string;
277
+ bem: (e?: string, m?: string) => string;
278
+ ns: (s?: string) => string;
279
+ bs: (s?: string) => string;
280
+ cv: (v?: string) => string;
281
+ is: (n: string) => string;
282
+ };
283
+ resizeObserver: ResizeObserver;
284
+ constructor(tableModule: TableUp, table: HTMLElement, quill: Quill);
285
+ updateWhenTextChange: () => void;
286
+ buildTool(): HTMLElement;
287
+ setTableAlign(tableBlot: TableMainFormat, align: string): void;
288
+ show(): void;
289
+ hide(): void;
290
+ update(): void;
291
+ destroy(): void;
276
292
  }
277
-
293
+ //#endregion
294
+ //#region src/modules/table-clipboard.d.ts
278
295
  declare const Clipboard: typeof TypeClipboard;
279
296
  type Selector = string | Node['TEXT_NODE'] | Node['ELEMENT_NODE'];
280
297
  type Matcher = (node: Node, delta: Delta, scroll: Parchment.ScrollBlot) => Delta;
281
298
  interface ClipboardOptions {
282
- matchers: [Selector, Matcher][];
299
+ matchers: [Selector, Matcher][];
283
300
  }
284
301
  declare class TableClipboard extends Clipboard {
285
- quill: Quill;
286
- tableId: string;
287
- rowId: string;
288
- colIds: string[];
289
- rowspanCount: {
290
- rowspan: number;
291
- colspan: number;
292
- }[];
293
- cellCount: number;
294
- colCount: number;
295
- constructor(quill: Quill, options: Partial<ClipboardOptions>);
296
- matchTable(node: Node, delta: Delta): any;
297
- matchTbody(node: Node, delta: Delta): Delta;
298
- matchColgroup(node: Node, delta: Delta): any;
299
- matchCol(node: Node): any;
300
- matchTr(node: Node, delta: Delta): Delta;
301
- matchTd(node: Node, delta: Delta): any;
302
- matchTdAttributor(node: Node, delta: Delta): any;
303
- convert({ html, text }: {
304
- html?: string;
305
- text?: string;
306
- }, formats?: Record<string, unknown>): Delta;
307
- matchCaption(node: Node, delta: Delta): Delta;
302
+ quill: Quill;
303
+ tableId: string;
304
+ rowId: string;
305
+ rowIds: string[];
306
+ colIds: string[];
307
+ emptyRowCount: number[];
308
+ rowspanCount: {
309
+ rowspan: number;
310
+ colspan: number;
311
+ }[];
312
+ cellCount: number;
313
+ colCount: number;
314
+ constructor(quill: Quill, options: Partial<ClipboardOptions>);
315
+ matchTable(node: Node, delta: Delta): Delta;
316
+ matchTbody(node: Node, delta: Delta): Delta;
317
+ matchColgroup(node: Node, delta: Delta): Delta;
318
+ matchCol(node: Node, _delta: Delta): Delta;
319
+ matchTr(node: Node, delta: Delta): Delta;
320
+ matchTd(node: Node, delta: Delta): Delta;
321
+ matchTdAttributor(node: Node, delta: Delta): Delta;
322
+ convert({
323
+ html,
324
+ text
325
+ }: {
326
+ html?: string;
327
+ text?: string;
328
+ }, formats?: Record<string, unknown>): Delta;
329
+ matchCaption(node: Node, delta: Delta): Delta;
308
330
  }
309
-
331
+ //#endregion
332
+ //#region src/modules/table-menu/constants.d.ts
310
333
  declare const tableMenuTools: Record<string, Tool>;
311
-
312
- type TableMenuOptionsInput$1 = Partial<Omit<TableMenuOptions, 'texts'>>;
334
+ //#endregion
335
+ //#region src/modules/table-menu/table-menu-common.d.ts
336
+ type TableMenuOptionsInput = Partial<Omit<TableMenuOptions, 'texts'>>;
313
337
  interface MenuTooltipInstance extends TooltipInstance {
314
- isColorPick?: boolean;
338
+ isColorPick?: boolean;
315
339
  }
316
340
  declare class TableMenuCommon {
317
- tableModule: TableUp;
318
- quill: Quill;
319
- usedColors: Set<string>;
320
- options: TableMenuOptions;
321
- menu: HTMLElement | null;
322
- isMenuDisplay: boolean;
323
- isColorPicking: boolean;
324
- updateUsedColor: (this: any, color?: string) => void;
325
- tooltipItem: MenuTooltipInstance[];
326
- activeTooltip: MenuTooltipInstance | null;
327
- bem: {
328
- b: () => string;
329
- be: (e?: string) => string;
330
- bm: (m?: string) => string;
331
- bem: (e?: string, m?: string) => string;
332
- ns: (s?: string) => string;
333
- bs: (s?: string) => string;
334
- cv: (v?: string) => string;
335
- is: (n: string) => string;
336
- };
337
- colorItemClass: string;
338
- colorChooseTooltipOption: ToolTipOptions;
339
- constructor(tableModule: TableUp, quill: Quill, options: TableMenuOptionsInput$1);
340
- updateWhenTextChange: () => void;
341
- resolveOptions(options: TableMenuOptionsInput$1): TableMenuOptions;
342
- buildTools(): HTMLElement;
343
- createColorChoose(item: HTMLElement, { handle, key }: ToolOption): MenuTooltipInstance;
344
- setActiveTooltip(tooltip: MenuTooltipInstance | null): void;
345
- getSelectedTds(): TableCellInnerFormat[];
346
- createTipText(item: HTMLElement, text: string): void;
347
- show(): void;
348
- update(): void;
349
- hide(): void;
350
- destroy(): void;
341
+ tableModule: TableUp;
342
+ quill: Quill;
343
+ usedColors: Set<string>;
344
+ options: TableMenuOptions;
345
+ menu: HTMLElement | null;
346
+ isMenuDisplay: boolean;
347
+ isColorPicking: boolean;
348
+ updateUsedColor: (this: any, color?: string) => void;
349
+ tooltipItem: MenuTooltipInstance[];
350
+ activeTooltip: MenuTooltipInstance | null;
351
+ bem: {
352
+ b: () => string;
353
+ be: (e?: string) => string;
354
+ bm: (m?: string) => string;
355
+ bem: (e?: string, m?: string) => string;
356
+ ns: (s?: string) => string;
357
+ bs: (s?: string) => string;
358
+ cv: (v?: string) => string;
359
+ is: (n: string) => string;
360
+ };
361
+ colorItemClass: string;
362
+ colorChooseTooltipOption: ToolTipOptions;
363
+ constructor(tableModule: TableUp, quill: Quill, options: TableMenuOptionsInput);
364
+ updateWhenTextChange: () => void;
365
+ resolveOptions(options: TableMenuOptionsInput): TableMenuOptions;
366
+ buildTools(): HTMLElement;
367
+ createColorChoose(item: HTMLElement, {
368
+ handle,
369
+ key
370
+ }: ToolOption): MenuTooltipInstance;
371
+ setActiveTooltip(tooltip: MenuTooltipInstance | null): void;
372
+ getSelectedTds(): TableCellInnerFormat[];
373
+ createTipText(item: HTMLElement, text: string): void;
374
+ show(): void;
375
+ update(): void;
376
+ hide(): void;
377
+ destroy(): void;
351
378
  }
352
-
353
- type TableMenuOptionsInput = Partial<Omit<TableMenuOptions, 'texts'>>;
379
+ //#endregion
380
+ //#region src/modules/table-menu/table-menu-contextmenu.d.ts
381
+ type TableMenuOptionsInput$1 = Partial<Omit<TableMenuOptions, 'texts'>>;
354
382
  declare class TableMenuContextmenu extends TableMenuCommon {
355
- tableModule: TableUp;
356
- quill: Quill;
357
- colorChooseTooltipOption: ToolTipOptions;
358
- constructor(tableModule: TableUp, quill: Quill, options: TableMenuOptionsInput);
359
- listenContextmenu: (e: MouseEvent) => void;
360
- buildTools(): HTMLElement;
361
- createTipText(item: HTMLElement, text: string): void;
362
- show(): void;
363
- update(position?: {
364
- x: number;
365
- y: number;
366
- }): void;
367
- destroy(): void;
383
+ tableModule: TableUp;
384
+ quill: Quill;
385
+ colorChooseTooltipOption: ToolTipOptions;
386
+ constructor(tableModule: TableUp, quill: Quill, options: TableMenuOptionsInput$1);
387
+ listenContextmenu: (e: MouseEvent) => void;
388
+ buildTools(): HTMLElement;
389
+ createTipText(item: HTMLElement, text: string): void;
390
+ show(): void;
391
+ update(position?: {
392
+ x: number;
393
+ y: number;
394
+ }): void;
395
+ destroy(): void;
368
396
  }
369
-
397
+ //#endregion
398
+ //#region src/modules/table-menu/table-menu-select.d.ts
370
399
  declare class TableMenuSelect extends TableMenuCommon {
371
- tableModule: TableUp;
372
- quill: Quill;
373
- constructor(tableModule: TableUp, quill: Quill, options: TableMenuOptionsInput$1);
374
- update(): void;
400
+ tableModule: TableUp;
401
+ quill: Quill;
402
+ constructor(tableModule: TableUp, quill: Quill, options: TableMenuOptionsInput);
403
+ update(): void;
375
404
  }
376
-
405
+ //#endregion
406
+ //#region src/modules/table-resize/table-resize-common.d.ts
377
407
  interface sizeChangeValue {
378
- px: number;
379
- pre: number;
408
+ px: number;
409
+ pre: number;
380
410
  }
381
411
  declare class TableResizeCommon {
382
- tableModule: TableUp;
383
- quill: Quill;
384
- colIndex: number;
385
- tableMain?: TableMainFormat;
386
- dragging: boolean;
387
- dragColBreak: HTMLElement | null;
388
- handleColMouseUpFunc: () => Promise<void>;
389
- handleColMouseMoveFunc: (e: MouseEvent) => {
390
- left: number;
391
- width: number;
392
- } | undefined;
393
- handleColMouseDownFunc: (e: MouseEvent) => {
394
- top: number;
395
- left: number;
396
- height: number;
397
- } | undefined;
398
- rowIndex: number;
399
- dragRowBreak: HTMLElement | null;
400
- handleRowMouseUpFunc: () => void;
401
- handleRowMouseMoveFunc: (e: MouseEvent) => {
402
- top: number;
403
- height: number;
404
- } | undefined;
405
- handleRowMouseDownFunc: (e: MouseEvent) => {
406
- top: number;
407
- left: number;
408
- width: number;
409
- } | undefined;
410
- dragBEM: {
411
- b: () => string;
412
- be: (e?: string) => string;
413
- bm: (m?: string) => string;
414
- bem: (e?: string, m?: string) => string;
415
- ns: (s?: string) => string;
416
- bs: (s?: string) => string;
417
- cv: (v?: string) => string;
418
- is: (n: string) => string;
419
- };
420
- constructor(tableModule: TableUp, quill: Quill);
421
- findCurrentColIndex(_e: MouseEvent): number;
422
- colWidthChange(_i: number, _w: sizeChangeValue, _isFull: boolean): void;
423
- createConfirmDialog({ message, confirm, cancel }: {
424
- message: string;
425
- confirm: string;
426
- cancel: string;
427
- }): Promise<boolean>;
428
- handleColMouseUp(): Promise<void>;
429
- handleColMouseMove(e: MouseEvent): {
430
- left: number;
431
- width: number;
432
- } | undefined;
433
- handleColMouseDown(e: MouseEvent): {
434
- top: number;
435
- left: number;
436
- height: number;
437
- } | undefined;
438
- findCurrentRowIndex(_e: MouseEvent): number;
439
- rowHeightChange(_i: number, _h: number): void;
440
- handleRowMouseUp(): void;
441
- handleRowMouseMove(e: MouseEvent): {
442
- top: number;
443
- height: number;
444
- } | undefined;
445
- handleRowMouseDown(e: MouseEvent): {
446
- top: number;
447
- left: number;
448
- width: number;
449
- } | undefined;
450
- update(): void;
451
- destroy(): void;
412
+ tableModule: TableUp;
413
+ quill: Quill;
414
+ colIndex: number;
415
+ tableMain?: TableMainFormat;
416
+ dragging: boolean;
417
+ dragColBreak: HTMLElement | null;
418
+ handleColMouseUpFunc: () => Promise<void>;
419
+ handleColMouseMoveFunc: (e: MouseEvent) => {
420
+ left: number;
421
+ width: number;
422
+ } | undefined;
423
+ handleColMouseDownFunc: (e: MouseEvent) => {
424
+ top: number;
425
+ left: number;
426
+ height: number;
427
+ } | undefined;
428
+ rowIndex: number;
429
+ dragRowBreak: HTMLElement | null;
430
+ handleRowMouseUpFunc: () => void;
431
+ handleRowMouseMoveFunc: (e: MouseEvent) => {
432
+ top: number;
433
+ height: number;
434
+ } | undefined;
435
+ handleRowMouseDownFunc: (e: MouseEvent) => {
436
+ top: number;
437
+ left: number;
438
+ width: number;
439
+ } | undefined;
440
+ dragBEM: {
441
+ b: () => string;
442
+ be: (e?: string) => string;
443
+ bm: (m?: string) => string;
444
+ bem: (e?: string, m?: string) => string;
445
+ ns: (s?: string) => string;
446
+ bs: (s?: string) => string;
447
+ cv: (v?: string) => string;
448
+ is: (n: string) => string;
449
+ };
450
+ constructor(tableModule: TableUp, quill: Quill);
451
+ findCurrentColIndex(_e: MouseEvent): number;
452
+ colWidthChange(_i: number, _w: sizeChangeValue, _isFull: boolean): void;
453
+ createConfirmDialog({
454
+ message,
455
+ confirm,
456
+ cancel
457
+ }: {
458
+ message: string;
459
+ confirm: string;
460
+ cancel: string;
461
+ }): Promise<boolean>;
462
+ handleColMouseUp(): Promise<void>;
463
+ getColumnRect(columnIndex: number): {
464
+ left: number;
465
+ right: number;
466
+ width: number;
467
+ } | null;
468
+ handleColMouseMove(e: MouseEvent): {
469
+ left: number;
470
+ width: number;
471
+ } | undefined;
472
+ handleColMouseDown(e: MouseEvent): {
473
+ top: number;
474
+ left: number;
475
+ height: number;
476
+ } | undefined;
477
+ findCurrentRowIndex(_e: MouseEvent): number;
478
+ rowHeightChange(_i: number, _h: number): void;
479
+ handleRowMouseUp(): void;
480
+ handleRowMouseMove(e: MouseEvent): {
481
+ top: number;
482
+ height: number;
483
+ } | undefined;
484
+ handleRowMouseDown(e: MouseEvent): {
485
+ top: number;
486
+ left: number;
487
+ width: number;
488
+ } | undefined;
489
+ update(): void;
490
+ destroy(): void;
452
491
  }
453
-
492
+ //#endregion
493
+ //#region src/modules/table-resize/table-resize-box.d.ts
454
494
  declare class TableResizeBox extends TableResizeCommon {
455
- tableModule: TableUp;
456
- table: HTMLElement;
457
- root: HTMLElement;
458
- tableMain: TableMainFormat;
459
- tableWrapper: Parchment.Parent;
460
- resizeObserver: ResizeObserver;
461
- tableCols: TableColFormat[];
462
- tableRows: TableRowFormat[];
463
- rowHeadWrapper: HTMLElement | null;
464
- colHeadWrapper: HTMLElement | null;
465
- corner: HTMLElement | null;
466
- scrollHandler: [HTMLElement, (e: Event) => void][];
467
- lastHeaderSelect: {
468
- isX: boolean;
469
- index: number;
470
- } | null;
471
- size: number;
472
- bem: {
473
- b: () => string;
474
- be: (e?: string) => string;
475
- bm: (m?: string) => string;
476
- bem: (e?: string, m?: string) => string;
477
- ns: (s?: string) => string;
478
- bs: (s?: string) => string;
479
- cv: (v?: string) => string;
480
- is: (n: string) => string;
481
- };
482
- constructor(tableModule: TableUp, table: HTMLElement, quill: Quill);
483
- updateWhenTextChange: () => void;
484
- handleResizerHeader(isX: boolean, index: number, e: MouseEvent): void;
485
- findCurrentColIndex(e: MouseEvent): number;
486
- colWidthChange(i: number, w: sizeChangeValue, isFull: boolean): void;
487
- handleColMouseDownFunc: (e: MouseEvent) => {
488
- top: number;
489
- left: number;
490
- height: number;
491
- } | undefined;
492
- bindColEvents(): void;
493
- findCurrentRowIndex(e: MouseEvent): number;
494
- rowHeightChange(i: number, h: number): void;
495
- handleRowMouseDownFunc: (e: MouseEvent) => {
496
- top: number;
497
- left: number;
498
- width: number;
499
- } | undefined;
500
- bindRowEvents(): void;
501
- update(): void;
502
- show(): void;
503
- hide(): void;
504
- destroy(): void;
495
+ tableModule: TableUp;
496
+ table: HTMLElement;
497
+ root: HTMLElement;
498
+ tableMain: TableMainFormat;
499
+ tableWrapper: Parchment.Parent;
500
+ resizeObserver: ResizeObserver;
501
+ tableCols: TableColFormat[];
502
+ tableRows: TableRowFormat[];
503
+ rowHeadWrapper: HTMLElement | null;
504
+ colHeadWrapper: HTMLElement | null;
505
+ corner: HTMLElement | null;
506
+ scrollHandler: [HTMLElement, (e: Event) => void][];
507
+ lastHeaderSelect: {
508
+ isX: boolean;
509
+ index: number;
510
+ } | null;
511
+ size: number;
512
+ bem: {
513
+ b: () => string;
514
+ be: (e?: string) => string;
515
+ bm: (m?: string) => string;
516
+ bem: (e?: string, m?: string) => string;
517
+ ns: (s?: string) => string;
518
+ bs: (s?: string) => string;
519
+ cv: (v?: string) => string;
520
+ is: (n: string) => string;
521
+ };
522
+ constructor(tableModule: TableUp, table: HTMLElement, quill: Quill);
523
+ updateWhenTextChange: () => void;
524
+ handleResizerHeader(isX: boolean, index: number, e: MouseEvent): void;
525
+ findCurrentColIndex(e: MouseEvent): number;
526
+ colWidthChange(i: number, w: sizeChangeValue, isFull: boolean): void;
527
+ handleColMouseDownFunc: (e: MouseEvent) => {
528
+ top: number;
529
+ left: number;
530
+ height: number;
531
+ } | undefined;
532
+ bindColEvents(): void;
533
+ findCurrentRowIndex(e: MouseEvent): number;
534
+ rowHeightChange(i: number, h: number): void;
535
+ handleRowMouseDownFunc: (e: MouseEvent) => {
536
+ top: number;
537
+ left: number;
538
+ width: number;
539
+ } | undefined;
540
+ bindRowEvents(): void;
541
+ update(): void;
542
+ show(): void;
543
+ hide(): void;
544
+ destroy(): void;
505
545
  }
506
-
546
+ //#endregion
547
+ //#region src/modules/table-resize/table-resize-line.d.ts
507
548
  declare class TableResizeLine extends TableResizeCommon {
508
- tableModule: TableUp;
509
- table: HTMLElement;
510
- colResizer: HTMLElement;
511
- rowResizer: HTMLElement;
512
- currentTableCell?: HTMLElement;
513
- dragging: boolean;
514
- curColIndex: number;
515
- curRowIndex: number;
516
- tableCellBlot?: TableCellFormat;
517
- bem: {
518
- b: () => string;
519
- be: (e?: string) => string;
520
- bm: (m?: string) => string;
521
- bem: (e?: string, m?: string) => string;
522
- ns: (s?: string) => string;
523
- bs: (s?: string) => string;
524
- cv: (v?: string) => string;
525
- is: (n: string) => string;
526
- };
527
- constructor(tableModule: TableUp, table: HTMLElement, quill: Quill);
528
- mousemoveHandler: (e: MouseEvent) => void;
529
- hideWhenTextChange: () => void;
530
- findTableCell(e: MouseEvent): HTMLElement | null;
531
- findCurrentColIndex(): number;
532
- handleColMouseUpFunc: () => Promise<void>;
533
- updateColResizer(): void;
534
- findCurrentRowIndex(): number;
535
- handleRowMouseUpFunc: () => void;
536
- updateRowResizer(): void;
537
- show(): void;
538
- hide(): void;
539
- update(): void;
540
- destroy(): void;
549
+ tableModule: TableUp;
550
+ table: HTMLElement;
551
+ colResizer: HTMLElement;
552
+ rowResizer: HTMLElement;
553
+ currentTableCell?: HTMLElement;
554
+ dragging: boolean;
555
+ curColIndex: number;
556
+ curRowIndex: number;
557
+ tableCellBlot?: TableCellFormat;
558
+ bem: {
559
+ b: () => string;
560
+ be: (e?: string) => string;
561
+ bm: (m?: string) => string;
562
+ bem: (e?: string, m?: string) => string;
563
+ ns: (s?: string) => string;
564
+ bs: (s?: string) => string;
565
+ cv: (v?: string) => string;
566
+ is: (n: string) => string;
567
+ };
568
+ constructor(tableModule: TableUp, table: HTMLElement, quill: Quill);
569
+ mousemoveHandler: (e: MouseEvent) => void;
570
+ hideWhenTextChange: () => void;
571
+ findTableCell(e: MouseEvent): HTMLElement | null;
572
+ findCurrentColIndex(): number;
573
+ handleColMouseUpFunc: () => Promise<void>;
574
+ updateColResizer(): void;
575
+ findCurrentRowIndex(): number;
576
+ handleRowMouseUpFunc: () => void;
577
+ updateRowResizer(): void;
578
+ show(): void;
579
+ hide(): void;
580
+ update(): void;
581
+ destroy(): void;
541
582
  }
542
-
583
+ //#endregion
584
+ //#region src/modules/table-resize/table-resize-scale.d.ts
543
585
  declare class TableResizeScale {
544
- tableModule: TableUp;
545
- table: HTMLElement;
546
- quill: Quill;
547
- scrollHandler: [HTMLElement, (e: Event) => void][];
548
- tableMainBlot: TableMainFormat | null;
549
- tableWrapperBlot: TableWrapperFormat | null;
550
- bem: {
551
- b: () => string;
552
- be: (e?: string) => string;
553
- bm: (m?: string) => string;
554
- bem: (e?: string, m?: string) => string;
555
- ns: (s?: string) => string;
556
- bs: (s?: string) => string;
557
- cv: (v?: string) => string;
558
- is: (n: string) => string;
559
- };
560
- startX: number;
561
- startY: number;
562
- offset: number;
563
- options: TableResizeScaleOptions;
564
- root?: HTMLElement;
565
- block?: HTMLElement;
566
- resizeobserver: ResizeObserver;
567
- constructor(tableModule: TableUp, table: HTMLElement, quill: Quill, options: Partial<TableResizeScaleOptions>);
568
- updateWhenTextChange: () => void;
569
- resolveOptions(options: Partial<TableResizeScaleOptions>): {
570
- blockSize: number;
571
- } & Partial<TableResizeScaleOptions>;
572
- buildResizer(): void;
573
- isTableOutofEditor(): boolean;
574
- update(): void;
575
- show(): void;
576
- hide(): void;
577
- destroy(): void;
586
+ tableModule: TableUp;
587
+ table: HTMLElement;
588
+ quill: Quill;
589
+ scrollHandler: [HTMLElement, (e: Event) => void][];
590
+ tableMainBlot: TableMainFormat | null;
591
+ tableWrapperBlot: TableWrapperFormat | null;
592
+ bem: {
593
+ b: () => string;
594
+ be: (e?: string) => string;
595
+ bm: (m?: string) => string;
596
+ bem: (e?: string, m?: string) => string;
597
+ ns: (s?: string) => string;
598
+ bs: (s?: string) => string;
599
+ cv: (v?: string) => string;
600
+ is: (n: string) => string;
601
+ };
602
+ startX: number;
603
+ startY: number;
604
+ offset: number;
605
+ options: TableResizeScaleOptions;
606
+ root?: HTMLElement;
607
+ block?: HTMLElement;
608
+ resizeobserver: ResizeObserver;
609
+ constructor(tableModule: TableUp, table: HTMLElement, quill: Quill, options: Partial<TableResizeScaleOptions>);
610
+ updateWhenTextChange: () => void;
611
+ resolveOptions(options: Partial<TableResizeScaleOptions>): {
612
+ blockSize: number;
613
+ } & Partial<TableResizeScaleOptions>;
614
+ buildResizer(): void;
615
+ isTableOutofEditor(): boolean;
616
+ update(): void;
617
+ show(): void;
618
+ hide(): void;
619
+ destroy(): void;
578
620
  }
579
-
621
+ //#endregion
622
+ //#region src/modules/table-resize/utils.d.ts
580
623
  declare const isTableAlignRight: (tableMainBlot: TableMainFormat) => boolean;
581
-
624
+ //#endregion
625
+ //#region src/modules/table-scrollbar.d.ts
582
626
  declare class Scrollbar {
583
- quill: Quill;
584
- isVertical: boolean;
585
- table: HTMLElement;
586
- scrollbarContainer: HTMLElement;
587
- minSize: number;
588
- gap: number;
589
- move: number;
590
- cursorDown: boolean;
591
- cursorLeave: boolean;
592
- ratioY: number;
593
- ratioX: number;
594
- sizeWidth: string;
595
- sizeHeight: string;
596
- size: string;
597
- thumbState: {
598
- X: number;
599
- Y: number;
600
- };
601
- ob: ResizeObserver;
602
- container: HTMLElement;
603
- scrollbar: HTMLElement;
604
- thumb: HTMLElement;
605
- scrollHandler: [HTMLElement, (e: Event) => void][];
606
- propertyMap: {
607
- readonly size: 'height';
608
- readonly offset: 'offsetHeight';
609
- readonly scrollDirection: 'scrollTop';
610
- readonly scrollSize: 'scrollHeight';
611
- readonly axis: 'Y';
612
- readonly direction: 'top';
613
- readonly client: 'clientY';
614
- } | {
615
- readonly size: 'width';
616
- readonly offset: 'offsetWidth';
617
- readonly scrollDirection: 'scrollLeft';
618
- readonly scrollSize: 'scrollWidth';
619
- readonly axis: 'X';
620
- readonly direction: 'left';
621
- readonly client: 'clientX';
622
- };
623
- bem: {
624
- b: () => string;
625
- be: (e?: string) => string;
626
- bm: (m?: string) => string;
627
- bem: (e?: string, m?: string) => string;
628
- ns: (s?: string) => string;
629
- bs: (s?: string) => string;
630
- cv: (v?: string) => string;
631
- is: (n: string) => string;
632
- };
633
- tableMainBlot: TableMainFormat;
634
- constructor(quill: Quill, isVertical: boolean, table: HTMLElement, scrollbarContainer: HTMLElement);
635
- update(): void;
636
- setScrollbarPosition(): void;
637
- calculateSize(): void;
638
- createScrollbar(): HTMLDivElement;
639
- containerScrollHandler(wrap: HTMLElement): void;
640
- showScrollbar: (this: any) => void;
641
- hideScrollbar: (this: any) => void;
642
- hideScrollbarTransitionend: () => void;
643
- destroy(): void;
627
+ quill: Quill;
628
+ isVertical: boolean;
629
+ table: HTMLElement;
630
+ scrollbarContainer: HTMLElement;
631
+ minSize: number;
632
+ gap: number;
633
+ move: number;
634
+ cursorDown: boolean;
635
+ cursorLeave: boolean;
636
+ ratioY: number;
637
+ ratioX: number;
638
+ sizeWidth: string;
639
+ sizeHeight: string;
640
+ size: string;
641
+ thumbState: {
642
+ X: number;
643
+ Y: number;
644
+ };
645
+ ob: ResizeObserver;
646
+ container: HTMLElement;
647
+ scrollbar: HTMLElement;
648
+ thumb: HTMLElement;
649
+ scrollHandler: [HTMLElement, (e: Event) => void][];
650
+ propertyMap: {
651
+ readonly size: 'height';
652
+ readonly offset: 'offsetHeight';
653
+ readonly scrollDirection: 'scrollTop';
654
+ readonly scrollSize: 'scrollHeight';
655
+ readonly axis: 'Y';
656
+ readonly direction: 'top';
657
+ readonly client: 'clientY';
658
+ } | {
659
+ readonly size: 'width';
660
+ readonly offset: 'offsetWidth';
661
+ readonly scrollDirection: 'scrollLeft';
662
+ readonly scrollSize: 'scrollWidth';
663
+ readonly axis: 'X';
664
+ readonly direction: 'left';
665
+ readonly client: 'clientX';
666
+ };
667
+ bem: {
668
+ b: () => string;
669
+ be: (e?: string) => string;
670
+ bm: (m?: string) => string;
671
+ bem: (e?: string, m?: string) => string;
672
+ ns: (s?: string) => string;
673
+ bs: (s?: string) => string;
674
+ cv: (v?: string) => string;
675
+ is: (n: string) => string;
676
+ };
677
+ tableMainBlot: TableMainFormat;
678
+ constructor(quill: Quill, isVertical: boolean, table: HTMLElement, scrollbarContainer: HTMLElement);
679
+ update(): void;
680
+ setScrollbarPosition(): void;
681
+ calculateSize(): void;
682
+ createScrollbar(): HTMLDivElement;
683
+ containerScrollHandler(wrap: HTMLElement): void;
684
+ showScrollbar: (this: any) => void;
685
+ hideScrollbar: (this: any) => void;
686
+ hideScrollbarTransitionend: () => void;
687
+ destroy(): void;
644
688
  }
645
689
  declare class TableVirtualScrollbar {
646
- tableModule: TableUp;
647
- table: HTMLElement;
648
- quill: Quill;
649
- scrollbarContainer: HTMLElement;
650
- scrollbar: Scrollbar[];
651
- bem: {
652
- b: () => string;
653
- be: (e?: string) => string;
654
- bm: (m?: string) => string;
655
- bem: (e?: string, m?: string) => string;
656
- ns: (s?: string) => string;
657
- bs: (s?: string) => string;
658
- cv: (v?: string) => string;
659
- is: (n: string) => string;
660
- };
661
- constructor(tableModule: TableUp, table: HTMLElement, quill: Quill);
662
- updateWhenTextChange: () => void;
663
- hide(): void;
664
- show(): void;
665
- update(): void;
666
- destroy(): void;
690
+ tableModule: TableUp;
691
+ table: HTMLElement;
692
+ quill: Quill;
693
+ scrollbarContainer: HTMLElement;
694
+ scrollbar: Scrollbar[];
695
+ bem: {
696
+ b: () => string;
697
+ be: (e?: string) => string;
698
+ bm: (m?: string) => string;
699
+ bem: (e?: string, m?: string) => string;
700
+ ns: (s?: string) => string;
701
+ bs: (s?: string) => string;
702
+ cv: (v?: string) => string;
703
+ is: (n: string) => string;
704
+ };
705
+ constructor(tableModule: TableUp, table: HTMLElement, quill: Quill);
706
+ updateWhenTextChange: () => void;
707
+ hide(): void;
708
+ show(): void;
709
+ update(): void;
710
+ destroy(): void;
667
711
  }
668
-
712
+ //#endregion
713
+ //#region src/modules/table-selection.d.ts
669
714
  interface SelectionData {
670
- anchorNode: Node | null;
671
- anchorOffset: number;
672
- focusNode: Node | null;
673
- focusOffset: number;
715
+ anchorNode: Node | null;
716
+ anchorOffset: number;
717
+ focusNode: Node | null;
718
+ focusOffset: number;
674
719
  }
675
720
  declare class TableSelection {
676
- tableModule: TableUp;
677
- quill: Quill;
678
- options: TableSelectionOptions;
679
- boundary: RelactiveRect | null;
680
- startScrollX: number;
681
- startScrollY: number;
682
- selectedTableScrollX: number;
683
- selectedTableScrollY: number;
684
- selectedEditorScrollX: number;
685
- selectedEditorScrollY: number;
686
- selectedTds: TableCellInnerFormat[];
687
- cellSelectWrap: HTMLElement;
688
- cellSelect: HTMLElement;
689
- dragging: boolean;
690
- scrollHandler: [HTMLElement, (...args: any[]) => void][];
691
- tableMenu?: InternalTableMenuModule;
692
- resizeObserver: ResizeObserver;
693
- table?: HTMLTableElement;
694
- isDisplaySelection: boolean;
695
- bem: {
696
- b: () => string;
697
- be: (e?: string) => string;
698
- bm: (m?: string) => string;
699
- bem: (e?: string, m?: string) => string;
700
- ns: (s?: string) => string;
701
- bs: (s?: string) => string;
702
- cv: (v?: string) => string;
703
- is: (n: string) => string;
704
- };
705
- lastSelection: SelectionData;
706
- constructor(tableModule: TableUp, quill: Quill, options?: Partial<TableSelectionOptions>);
707
- updateAfterEvent: () => void;
708
- getFirstTextNode(dom: HTMLElement | Node): Node;
709
- getLastTextNode(dom: HTMLElement | Node): Node;
710
- getNodeTailOffset(node: Node): number;
711
- quillSelectionChangeHandler: (range: Range | null, _oldRange: Range | null, source: EmitterSource) => void;
712
- setSelectionData(selection: Selection, selectionData: SelectionData): void;
713
- selectionDirectionUp(selection: SelectionData): boolean;
714
- findWrapSelection(points: {
715
- node: Node | null;
716
- offset: number;
717
- }[]): {
718
- startNode: Node | null;
719
- startOffset: number;
720
- endNode: Node | null;
721
- endOffset: number;
722
- };
723
- resolveOptions(options: Partial<TableSelectionOptions>): TableSelectionOptions;
724
- selectionChangeHandler: () => void;
725
- helpLinesInitial(): HTMLDivElement;
726
- computeSelectedTds(startPoint: {
727
- x: number;
728
- y: number;
729
- }, endPoint: {
730
- x: number;
731
- y: number;
732
- }): TableCellInnerFormat[];
733
- mouseDownHandler: (mousedownEvent: MouseEvent) => void;
734
- updateWithSelectedTds(): void;
735
- update(): void;
736
- getQuillViewScroll(): {
737
- x: number;
738
- y: number;
739
- };
740
- getTableViewScroll(): {
741
- x: number;
742
- y: number;
743
- };
744
- setSelectionTable(table: HTMLTableElement | undefined): void;
745
- removeCell: (e: KeyboardEvent) => void;
746
- showDisplay(): void;
747
- show(): void;
748
- hideDisplay(): void;
749
- hide(): void;
750
- destroy(): void;
721
+ tableModule: TableUp;
722
+ quill: Quill;
723
+ options: TableSelectionOptions;
724
+ boundary: RelactiveRect | null;
725
+ startScrollX: number;
726
+ startScrollY: number;
727
+ selectedTableScrollX: number;
728
+ selectedTableScrollY: number;
729
+ selectedEditorScrollX: number;
730
+ selectedEditorScrollY: number;
731
+ selectedTds: TableCellInnerFormat[];
732
+ cellSelectWrap: HTMLElement;
733
+ cellSelect: HTMLElement;
734
+ dragging: boolean;
735
+ scrollHandler: [HTMLElement, (...args: any[]) => void][];
736
+ tableMenu?: InternalTableMenuModule;
737
+ resizeObserver: ResizeObserver;
738
+ table?: HTMLTableElement;
739
+ isDisplaySelection: boolean;
740
+ bem: {
741
+ b: () => string;
742
+ be: (e?: string) => string;
743
+ bm: (m?: string) => string;
744
+ bem: (e?: string, m?: string) => string;
745
+ ns: (s?: string) => string;
746
+ bs: (s?: string) => string;
747
+ cv: (v?: string) => string;
748
+ is: (n: string) => string;
749
+ };
750
+ lastSelection: SelectionData;
751
+ constructor(tableModule: TableUp, quill: Quill, options?: Partial<TableSelectionOptions>);
752
+ updateAfterEvent: () => void;
753
+ getFirstTextNode(dom: HTMLElement | Node): Node;
754
+ getLastTextNode(dom: HTMLElement | Node): Node;
755
+ getNodeTailOffset(node: Node): number;
756
+ quillSelectionChangeHandler: (range: Range | null, _oldRange: Range | null, source: EmitterSource) => void;
757
+ setSelectionData(selection: Selection, selectionData: SelectionData): void;
758
+ selectionDirectionUp(selection: SelectionData): boolean;
759
+ findWrapSelection(points: {
760
+ node: Node | null;
761
+ offset: number;
762
+ }[]): {
763
+ startNode: Node | null;
764
+ startOffset: number;
765
+ endNode: Node | null;
766
+ endOffset: number;
767
+ };
768
+ resolveOptions(options: Partial<TableSelectionOptions>): TableSelectionOptions;
769
+ selectionChangeHandler: () => void;
770
+ helpLinesInitial(): HTMLDivElement;
771
+ computeSelectedTds(startPoint: {
772
+ x: number;
773
+ y: number;
774
+ }, endPoint: {
775
+ x: number;
776
+ y: number;
777
+ }): TableCellInnerFormat[];
778
+ mouseDownHandler: (mousedownEvent: MouseEvent) => void;
779
+ updateWithSelectedTds(): void;
780
+ update(): void;
781
+ getQuillViewScroll(): {
782
+ x: number;
783
+ y: number;
784
+ };
785
+ getTableViewScroll(): {
786
+ x: number;
787
+ y: number;
788
+ };
789
+ setSelectionTable(table: HTMLTableElement | undefined): void;
790
+ removeCell: (e: KeyboardEvent) => void;
791
+ showDisplay(): void;
792
+ show(): void;
793
+ hideDisplay(): void;
794
+ hide(): void;
795
+ destroy(): void;
751
796
  }
752
-
797
+ //#endregion
798
+ //#region src/utils/types.d.ts
753
799
  type QuillThemePicker = (Picker & {
754
- options: HTMLElement;
800
+ options: HTMLElement;
755
801
  });
756
802
  interface QuillTheme extends BaseTheme {
757
- pickers: QuillThemePicker[];
803
+ pickers: QuillThemePicker[];
758
804
  }
759
805
  interface ToolOption {
760
- name: string;
761
- icon: string | ((tableModule: TableUp) => HTMLElement);
762
- tip?: string;
763
- isColorChoose?: boolean;
764
- key?: string;
765
- handle: (tableModule: TableUp, selectedTds: TableCellInnerFormat[], e: Event | string | null) => void;
806
+ name: string;
807
+ icon: string | ((tableModule: TableUp) => HTMLElement);
808
+ tip?: string;
809
+ isColorChoose?: boolean;
810
+ key?: string;
811
+ handle: (tableModule: TableUp, selectedTds: TableCellInnerFormat[], e: Event | string | null) => void;
766
812
  }
767
813
  interface ToolOptionBreak {
768
- name: 'break';
814
+ name: 'break';
769
815
  }
770
816
  type Tool = ToolOption | ToolOptionBreak;
771
817
  interface TableMenuOptions {
772
- tipText: boolean;
773
- tools: Tool[];
774
- localstorageKey: string;
775
- defaultColorMap: string[];
818
+ tipText: boolean;
819
+ tools: Tool[];
820
+ localstorageKey: string;
821
+ defaultColorMap: string[];
776
822
  }
777
823
  interface TableSelectionOptions {
778
- selectColor: string;
779
- tableMenu?: Constructor<InternalTableMenuModule, [TableUp, Quill, Partial<TableMenuOptions>]>;
780
- tableMenuOptions: TableMenuOptions;
824
+ selectColor: string;
825
+ tableMenu?: Constructor<InternalTableMenuModule, [TableUp, Quill, Partial<TableMenuOptions>]>;
826
+ tableMenuOptions: TableMenuOptions;
781
827
  }
782
828
  interface TableResizeScaleOptions {
783
- blockSize: number;
829
+ blockSize: number;
784
830
  }
785
831
  interface TableCreatorTextOptions {
786
- fullCheckboxText: string;
787
- customBtnText: string;
788
- confirmText: string;
789
- cancelText: string;
790
- rowText: string;
791
- colText: string;
792
- notPositiveNumberError: string;
793
- perWidthInsufficient: string;
832
+ fullCheckboxText: string;
833
+ customBtnText: string;
834
+ confirmText: string;
835
+ cancelText: string;
836
+ rowText: string;
837
+ colText: string;
838
+ notPositiveNumberError: string;
839
+ perWidthInsufficient: string;
794
840
  }
795
841
  type TableMenuTexts = Record<string, string>;
796
842
  interface TableTextOptions extends TableCreatorTextOptions, TableMenuTexts {
797
- custom: string;
798
- clear: string;
799
- transparent: string;
800
- perWidthInsufficient: string;
843
+ custom: string;
844
+ clear: string;
845
+ transparent: string;
846
+ perWidthInsufficient: string;
801
847
  }
802
848
  interface TableUpOptions {
803
- customSelect?: (tableModule: TableUp, picker: QuillThemePicker) => Promise<HTMLElement> | HTMLElement;
804
- full: boolean;
805
- fullSwitch: boolean;
806
- customBtn: boolean;
807
- texts: TableTextOptions;
808
- icon: string;
809
- selection?: Constructor<InternalTableSelectionModule, [TableUp, Quill, Partial<TableSelectionOptions>]>;
810
- selectionOptions: Partial<TableSelectionOptions>;
811
- resize?: Constructor<InternalModule, [TableUp, HTMLElement, Quill, any]>;
812
- resizeOptions: any;
813
- scrollbar?: Constructor<InternalModule, [TableUp, HTMLElement, Quill, any]>;
814
- scrollbarOptions: any;
815
- align?: Constructor<InternalModule, [TableUp, HTMLElement, Quill, any]>;
816
- alignOptions: any;
817
- resizeScale?: Constructor<InternalModule, [TableUp, HTMLElement, Quill, Partial<TableResizeScaleOptions>]>;
818
- resizeScaleOptions: Partial<TableResizeScaleOptions>;
849
+ customSelect?: (tableModule: TableUp, picker: QuillThemePicker) => Promise<HTMLElement> | HTMLElement;
850
+ full: boolean;
851
+ fullSwitch: boolean;
852
+ customBtn: boolean;
853
+ texts: TableTextOptions;
854
+ icon: string;
855
+ selection?: Constructor<InternalTableSelectionModule, [TableUp, Quill, Partial<TableSelectionOptions>]>;
856
+ selectionOptions: Partial<TableSelectionOptions>;
857
+ resize?: Constructor<InternalModule, [TableUp, HTMLElement, Quill, any]>;
858
+ resizeOptions: any;
859
+ scrollbar?: Constructor<InternalModule, [TableUp, HTMLElement, Quill, any]>;
860
+ scrollbarOptions: any;
861
+ align?: Constructor<InternalModule, [TableUp, HTMLElement, Quill, any]>;
862
+ alignOptions: any;
863
+ resizeScale?: Constructor<InternalModule, [TableUp, HTMLElement, Quill, Partial<TableResizeScaleOptions>]>;
864
+ resizeScaleOptions: Partial<TableResizeScaleOptions>;
819
865
  }
820
866
  interface TableColValue {
821
- tableId: string;
822
- colId: string;
823
- width: number;
824
- full?: boolean;
825
- align?: string;
867
+ tableId: string;
868
+ colId: string;
869
+ width: number;
870
+ full?: boolean;
871
+ align?: string;
826
872
  }
827
873
  interface TableCellValue {
828
- tableId: string;
829
- rowId: string;
830
- colId: string;
831
- rowspan: number;
832
- colspan: number;
833
- style?: string;
874
+ tableId: string;
875
+ rowId: string;
876
+ colId: string;
877
+ rowspan: number;
878
+ colspan: number;
879
+ style?: string;
834
880
  }
835
881
  interface TableRowValue {
836
- tableId: string;
837
- rowId: string;
882
+ tableId: string;
883
+ rowId: string;
838
884
  }
839
885
  interface TableCaptionValue {
840
- tableId: string;
841
- side: 'top' | 'bottom';
886
+ tableId: string;
887
+ side: 'top' | 'bottom';
842
888
  }
843
889
  interface TableValue {
844
- tableId: string;
845
- full?: boolean;
846
- align?: string;
890
+ tableId: string;
891
+ full?: boolean;
892
+ align?: string;
847
893
  }
848
894
  interface RelactiveRect {
849
- x: number;
850
- y: number;
851
- x1: number;
852
- y1: number;
853
- width: number;
854
- height: number;
895
+ x: number;
896
+ y: number;
897
+ x1: number;
898
+ y1: number;
899
+ width: number;
900
+ height: number;
855
901
  }
856
902
  interface InternalModule {
857
- show: () => void;
858
- hide: () => void;
859
- update: () => void;
860
- destroy: () => void;
903
+ show: () => void;
904
+ hide: () => void;
905
+ update: () => void;
906
+ destroy: () => void;
861
907
  }
862
908
  type Constructor<T = any, U extends Array<any> = any[]> = new (...args: U) => T;
863
909
  interface InternalTableSelectionModule extends InternalModule {
864
- table?: HTMLElement;
865
- dragging: boolean;
866
- boundary: RelactiveRect | null;
867
- selectedTds: TableCellInnerFormat[];
868
- cellSelect: HTMLElement;
869
- isDisplaySelection: boolean;
870
- tableMenu?: InternalModule;
871
- computeSelectedTds: (startPoint: {
872
- x: number;
873
- y: number;
874
- }, endPoint: {
875
- x: number;
876
- y: number;
877
- }) => TableCellInnerFormat[];
878
- updateWithSelectedTds: () => void;
879
- showDisplay: () => void;
880
- hideDisplay: () => void;
910
+ table?: HTMLElement;
911
+ dragging: boolean;
912
+ boundary: RelactiveRect | null;
913
+ selectedTds: TableCellInnerFormat[];
914
+ cellSelect: HTMLElement;
915
+ isDisplaySelection: boolean;
916
+ tableMenu?: InternalModule;
917
+ computeSelectedTds: (startPoint: {
918
+ x: number;
919
+ y: number;
920
+ }, endPoint: {
921
+ x: number;
922
+ y: number;
923
+ }) => TableCellInnerFormat[];
924
+ updateWithSelectedTds: () => void;
925
+ showDisplay: () => void;
926
+ hideDisplay: () => void;
881
927
  }
882
928
  interface InternalTableMenuModule extends InternalModule {
883
- isMenuDisplay: boolean;
884
- activeTooltip: MenuTooltipInstance | null;
929
+ isMenuDisplay: boolean;
930
+ activeTooltip: MenuTooltipInstance | null;
885
931
  }
886
- type Writable<T> = {
887
- -readonly [P in keyof T]: T[P];
888
- };
932
+ type Writable<T> = { -readonly [P in keyof T]: T[P] };
889
933
  interface TableConstantsData {
890
- blotName: Partial<Record<keyof Writable<typeof blotName>, string>>;
891
- tableUpSize: Partial<typeof tableUpSize>;
892
- tableUpEvent: Partial<typeof tableUpEvent>;
893
- tableUpInternal: Partial<typeof tableUpInternal>;
934
+ blotName: Partial<Record<keyof Writable<typeof blotName>, string>>;
935
+ tableUpSize: Partial<typeof tableUpSize>;
936
+ tableUpEvent: Partial<typeof tableUpEvent>;
937
+ tableUpInternal: Partial<typeof tableUpInternal>;
894
938
  }
895
-
939
+ //#endregion
940
+ //#region src/utils/blot-helper.d.ts
896
941
  interface ParentBlotReturnMap {
897
- [blotName.tableWrapper]: TableWrapperFormat;
898
- [blotName.tableMain]: TableMainFormat;
899
- [blotName.tableCol]: TableColFormat;
900
- [blotName.tableColgroup]: TableColgroupFormat;
901
- [blotName.tableBody]: TableBodyFormat;
902
- [blotName.tableRow]: TableRowFormat;
903
- [blotName.tableCell]: TableCellFormat;
904
- [blotName.tableCellInner]: TableCellInnerFormat;
942
+ [blotName.tableWrapper]: TableWrapperFormat;
943
+ [blotName.tableMain]: TableMainFormat;
944
+ [blotName.tableCol]: TableColFormat;
945
+ [blotName.tableColgroup]: TableColgroupFormat;
946
+ [blotName.tableBody]: TableBodyFormat;
947
+ [blotName.tableRow]: TableRowFormat;
948
+ [blotName.tableCell]: TableCellFormat;
949
+ [blotName.tableCellInner]: TableCellInnerFormat;
905
950
  }
906
951
  type ParentBlotReturn = {
907
- [key: string]: Parchment.Parent;
952
+ [key: string]: Parchment.Parent;
908
953
  } & ParentBlotReturnMap;
909
954
  declare function findParentBlot<T extends Parchment.Parent, U extends string = string>(blot: Parchment.Blot, targetBlotName: U): U extends keyof ParentBlotReturn ? ParentBlotReturn[U] : T;
910
- declare function findParentBlots<T extends (keyof ParentBlotReturnMap | string)[]>(blot: Parchment.Blot, targetBlotNames: T): {
911
- [K in keyof T]: ParentBlotReturn[T[K]];
912
- };
913
-
955
+ declare function findParentBlots<T extends (keyof ParentBlotReturnMap | string)[]>(blot: Parchment.Blot, targetBlotNames: T): { [K in keyof T]: ParentBlotReturn[T[K]] };
956
+ //#endregion
957
+ //#region src/utils/components/color-picker.d.ts
914
958
  interface ColorPickerOptions {
915
- color: string;
916
- onChange: (color: string) => void;
959
+ color: string;
960
+ onChange: (color: string) => void;
917
961
  }
918
962
  declare function createColorPicker(options?: Partial<ColorPickerOptions>): HTMLDivElement;
919
-
963
+ //#endregion
964
+ //#region src/utils/components/table/select-box.d.ts
920
965
  interface TableSelectOptions {
921
- row: number;
922
- col: number;
923
- onSelect: (row: number, col: number) => void;
924
- customBtn: boolean;
925
- texts: Partial<TableCreatorTextOptions>;
966
+ row: number;
967
+ col: number;
968
+ onSelect: (row: number, col: number) => void;
969
+ customBtn: boolean;
970
+ texts: Partial<TableCreatorTextOptions>;
926
971
  }
927
972
  declare function createSelectBox(options?: Partial<TableSelectOptions>): HTMLDivElement;
928
-
973
+ //#endregion
974
+ //#region src/utils/components/tooltip.d.ts
929
975
  interface ToolTipOptions {
930
- direction?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
931
- msg?: string;
932
- delay?: number;
933
- content?: HTMLElement;
934
- container?: HTMLElement;
935
- type?: 'hover' | 'click';
936
- onOpen?: (force?: boolean) => boolean;
937
- onClose?: (force?: boolean) => boolean;
938
- closed?: () => void;
939
- onDestroy?: () => void;
976
+ direction?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
977
+ msg?: string;
978
+ delay?: number;
979
+ content?: HTMLElement;
980
+ container?: HTMLElement;
981
+ type?: 'hover' | 'click';
982
+ onOpen?: (force?: boolean) => boolean;
983
+ onClose?: (force?: boolean) => boolean;
984
+ closed?: () => void;
985
+ onDestroy?: () => void;
940
986
  }
941
987
  interface TooltipInstance {
942
- destroy: () => void;
943
- show: (force?: boolean) => void;
944
- hide: (force?: boolean) => void;
988
+ destroy: () => void;
989
+ show: (force?: boolean) => void;
990
+ hide: (force?: boolean) => void;
945
991
  }
946
992
  declare function createTooltip(target: HTMLElement, options?: ToolTipOptions): TooltipInstance | null;
947
-
993
+ //#endregion
994
+ //#region src/utils/utils.d.ts
948
995
  declare const randomId: () => string;
949
-
996
+ //#endregion
997
+ //#region src/table-up.d.ts
950
998
  declare function updateTableConstants(data: Partial<TableConstantsData>): void;
951
999
  declare function defaultCustomSelect(tableModule: TableUp, picker: QuillThemePicker): HTMLDivElement;
952
1000
  declare class TableUp {
953
- static moduleName: string;
954
- static toolName: string;
955
- static keyboradHandler: {
956
- 'forbid remove table by backspace': {
957
- bindInHead: boolean;
958
- key: string;
959
- collapsed: boolean;
960
- offset: number;
961
- handler(this: {
962
- quill: Quill;
963
- }, range: Range, context: Context): boolean;
964
- };
965
- 'forbid remove table by delete': {
966
- bindInHead: boolean;
967
- key: string;
968
- collapsed: boolean;
969
- handler(this: {
970
- quill: Quill;
971
- }, range: Range, context: Context): boolean;
972
- };
973
- 'table up': {
974
- bindInHead: boolean;
975
- key: string;
976
- collapsed: boolean;
977
- format: "table-up-cell-inner"[];
978
- handler(this: {
979
- quill: Quill;
980
- }, range: Range, context: Context): boolean;
981
- };
982
- 'table down': {
983
- bindInHead: boolean;
984
- key: string;
985
- collapsed: boolean;
986
- format: "table-up-cell-inner"[];
987
- handler(this: {
988
- quill: Quill;
989
- }, range: Range, context: Context): boolean;
990
- };
991
- 'table caption break': {
992
- bindInHead: boolean;
993
- key: string;
994
- shiftKey: null;
995
- format: "table-up-caption"[];
996
- handler(this: {
997
- quill: Quill;
998
- }, _range: Range, _context: Context): boolean;
999
- };
1001
+ static moduleName: string;
1002
+ static toolName: string;
1003
+ static keyboradHandler: {
1004
+ 'forbid remove table by backspace': {
1005
+ bindInHead: boolean;
1006
+ key: string;
1007
+ collapsed: boolean;
1008
+ offset: number;
1009
+ handler(this: {
1010
+ quill: Quill;
1011
+ }, range: Range, context: Context): boolean;
1012
+ };
1013
+ 'forbid remove table by delete': {
1014
+ bindInHead: boolean;
1015
+ key: string;
1016
+ collapsed: boolean;
1017
+ handler(this: {
1018
+ quill: Quill;
1019
+ }, range: Range, context: Context): boolean;
1020
+ };
1021
+ 'table up': {
1022
+ bindInHead: boolean;
1023
+ key: string;
1024
+ collapsed: boolean;
1025
+ format: "table-up-cell-inner"[];
1026
+ handler(this: {
1027
+ quill: Quill;
1028
+ }, range: Range, context: Context): boolean;
1000
1029
  };
1001
- static register(): void;
1002
- quill: Quill;
1003
- options: TableUpOptions;
1004
- toolBox: HTMLDivElement;
1005
- fixTableByLisenter: (this: any) => void;
1006
- selector?: HTMLElement;
1007
- table?: HTMLElement;
1008
- tableSelection?: InternalTableSelectionModule;
1009
- tableResize?: InternalModule;
1010
- tableScrollbar?: InternalModule;
1011
- tableAlign?: InternalModule;
1012
- tableResizeScale?: InternalModule;
1013
- resizeOb: ResizeObserver;
1014
- get statics(): any;
1015
- constructor(quill: Quill, options: Partial<TableUpOptions>);
1016
- initialContainer(): HTMLDivElement;
1017
- addContainer(classes: string | HTMLElement): HTMLElement;
1018
- resolveOptions(options: Partial<TableUpOptions>): TableUpOptions;
1019
- resolveTexts(options: Partial<TableTextOptions>): {
1020
- fullCheckboxText: string;
1021
- customBtnText: string;
1022
- confirmText: string;
1023
- cancelText: string;
1024
- rowText: string;
1025
- colText: string;
1026
- notPositiveNumberError: string;
1027
- custom: string;
1028
- clear: string;
1029
- transparent: string;
1030
- perWidthInsufficient: string;
1031
- CopyCell: string;
1032
- CutCell: string;
1033
- InsertTop: string;
1034
- InsertRight: string;
1035
- InsertBottom: string;
1036
- InsertLeft: string;
1037
- MergeCell: string;
1038
- SplitCell: string;
1039
- DeleteRow: string;
1040
- DeleteColumn: string;
1041
- DeleteTable: string;
1042
- BackgroundColor: string;
1043
- BorderColor: string;
1044
- } & Partial<TableTextOptions>;
1045
- quillHack(): void;
1046
- showTableTools(table: HTMLElement): void;
1047
- hideTableTools(): void;
1048
- buildCustomSelect(customSelect: ((module: TableUp, picker: QuillThemePicker) => HTMLElement | Promise<HTMLElement>) | undefined, picker: QuillThemePicker): Promise<void>;
1049
- setCellAttrs(selectedTds: TableCellInnerFormat[], attr: string, value?: any, isStyle?: boolean): void;
1050
- getTextByCell(tds: TableCellInnerFormat[]): string;
1051
- getHTMLByCell(tds: TableCellInnerFormat[], isCut?: boolean): string;
1052
- insertTable(rows: number, columns: number): void;
1053
- calculateTableCellBorderWidth(): number;
1054
- fixUnusuaDeletelTable(tableBlot: TableMainFormat): void;
1055
- balanceTables(): void;
1056
- listenBalanceCells(): void;
1057
- deleteTable(selectedTds: TableCellInnerFormat[]): void;
1058
- appendRow(selectedTds: TableCellInnerFormat[], isDown: boolean): void;
1059
- appendCol(selectedTds: TableCellInnerFormat[], isRight: boolean): void;
1060
- /**
1061
- * after insert or remove cell. handle cell colspan and rowspan merge
1062
- */
1063
- fixTableByRemove(tableBlot: TableMainFormat): void;
1064
- removeRow(selectedTds: TableCellInnerFormat[]): void;
1065
- removeCol(selectedTds: TableCellInnerFormat[]): void;
1066
- mergeCells(selectedTds: TableCellInnerFormat[]): void;
1067
- splitCell(selectedTds: TableCellInnerFormat[]): void;
1030
+ 'table down': {
1031
+ bindInHead: boolean;
1032
+ key: string;
1033
+ collapsed: boolean;
1034
+ format: "table-up-cell-inner"[];
1035
+ handler(this: {
1036
+ quill: Quill;
1037
+ }, range: Range, context: Context): boolean;
1038
+ };
1039
+ 'table caption break': {
1040
+ bindInHead: boolean;
1041
+ key: string;
1042
+ shiftKey: null;
1043
+ format: "table-up-caption"[];
1044
+ handler(this: {
1045
+ quill: Quill;
1046
+ }, _range: Range, _context: Context): boolean;
1047
+ };
1048
+ };
1049
+ static register(): void;
1050
+ quill: Quill;
1051
+ options: TableUpOptions;
1052
+ toolBox: HTMLDivElement;
1053
+ fixTableByLisenter: (this: any) => void;
1054
+ selector?: HTMLElement;
1055
+ table?: HTMLElement;
1056
+ tableSelection?: InternalTableSelectionModule;
1057
+ tableResize?: InternalModule;
1058
+ tableScrollbar?: InternalModule;
1059
+ tableAlign?: InternalModule;
1060
+ tableResizeScale?: InternalModule;
1061
+ resizeOb: ResizeObserver;
1062
+ get statics(): any;
1063
+ constructor(quill: Quill, options: Partial<TableUpOptions>);
1064
+ initialContainer(): HTMLDivElement;
1065
+ addContainer(classes: string | HTMLElement): HTMLElement;
1066
+ resolveOptions(options: Partial<TableUpOptions>): TableUpOptions;
1067
+ resolveTexts(options: Partial<TableTextOptions>): {
1068
+ fullCheckboxText: string;
1069
+ customBtnText: string;
1070
+ confirmText: string;
1071
+ cancelText: string;
1072
+ rowText: string;
1073
+ colText: string;
1074
+ notPositiveNumberError: string;
1075
+ custom: string;
1076
+ clear: string;
1077
+ transparent: string;
1078
+ perWidthInsufficient: string;
1079
+ CopyCell: string;
1080
+ CutCell: string;
1081
+ InsertTop: string;
1082
+ InsertRight: string;
1083
+ InsertBottom: string;
1084
+ InsertLeft: string;
1085
+ MergeCell: string;
1086
+ SplitCell: string;
1087
+ DeleteRow: string;
1088
+ DeleteColumn: string;
1089
+ DeleteTable: string;
1090
+ BackgroundColor: string;
1091
+ BorderColor: string;
1092
+ } & Partial<TableTextOptions>;
1093
+ quillHack(): void;
1094
+ showTableTools(table: HTMLElement): void;
1095
+ hideTableTools(): void;
1096
+ buildCustomSelect(customSelect: ((module: TableUp, picker: QuillThemePicker) => HTMLElement | Promise<HTMLElement>) | undefined, picker: QuillThemePicker): Promise<void>;
1097
+ setCellAttrs(selectedTds: TableCellInnerFormat[], attr: string, value?: any, isStyle?: boolean): void;
1098
+ getTextByCell(tds: TableCellInnerFormat[]): string;
1099
+ getHTMLByCell(tds: TableCellInnerFormat[], isCut?: boolean): string;
1100
+ insertTable(rows: number, columns: number): void;
1101
+ calculateTableCellBorderWidth(): number;
1102
+ fixUnusuaDeletelTable(tableBlot: TableMainFormat): void;
1103
+ balanceTables(): void;
1104
+ listenBalanceCells(): void;
1105
+ deleteTable(selectedTds: TableCellInnerFormat[]): void;
1106
+ appendRow(selectedTds: TableCellInnerFormat[], isDown: boolean): void;
1107
+ appendCol(selectedTds: TableCellInnerFormat[], isRight: boolean): void;
1108
+ /**
1109
+ * after insert or remove cell. handle cell colspan and rowspan merge
1110
+ */
1111
+ fixTableByRemove(tableBlot: TableMainFormat): void;
1112
+ removeRow(selectedTds: TableCellInnerFormat[]): void;
1113
+ removeCol(selectedTds: TableCellInnerFormat[]): void;
1114
+ mergeCells(selectedTds: TableCellInnerFormat[]): void;
1115
+ splitCell(selectedTds: TableCellInnerFormat[]): void;
1068
1116
  }
1069
-
1070
- export { BlockOverride, ContainerFormat, ScrollOverride, Scrollbar, TableAlign, TableBodyFormat, TableCaptionFormat, TableCellFormat, TableCellInnerFormat, TableClipboard, TableColFormat, TableColgroupFormat, TableMainFormat, TableMenuCommon, TableMenuContextmenu, TableMenuSelect, TableResizeBox, TableResizeCommon, TableResizeLine, TableResizeScale, TableRowFormat, TableSelection, TableUp, TableVirtualScrollbar, TableWrapperFormat, blotName, createColorPicker, createSelectBox, createTooltip, TableUp as default, defaultCustomSelect, findParentBlot, findParentBlots, getTableMainRect, isTableAlignRight, randomId, tableMenuTools, tableUpEvent, tableUpInternal, tableUpSize, updateTableConstants };
1071
- export type { ClipboardOptions, Constructor, InternalModule, InternalTableMenuModule, InternalTableSelectionModule, Matcher, MenuTooltipInstance, QuillTheme, QuillThemePicker, RelactiveRect, SelectionData, Selector, SkipRowCount, TableCaptionValue, TableCellValue, TableColValue, TableConstantsData, TableCreatorTextOptions, TableMenuOptions, TableMenuOptionsInput$1 as TableMenuOptionsInput, TableMenuTexts, TableResizeScaleOptions, TableRowValue, TableSelectionOptions, TableTextOptions, TableUpOptions, TableValue, Tool, ToolOption, ToolOptionBreak, Writable, sizeChangeValue };
1117
+ //#endregion
1118
+ export { BlockOverride, ClipboardOptions, Constructor, ContainerFormat, InternalModule, InternalTableMenuModule, InternalTableSelectionModule, Matcher, MenuTooltipInstance, QuillTheme, QuillThemePicker, RelactiveRect, ScrollOverride, Scrollbar, SelectionData, Selector, SkipRowCount, TableAlign, TableBodyFormat, TableCaptionFormat, TableCaptionValue, TableCellFormat, TableCellInnerFormat, TableCellValue, TableClipboard, TableColFormat, TableColValue, TableColgroupFormat, TableConstantsData, TableCreatorTextOptions, TableMainFormat, TableMenuCommon, TableMenuContextmenu, TableMenuOptions, TableMenuOptionsInput, TableMenuSelect, TableMenuTexts, TableResizeBox, TableResizeCommon, TableResizeLine, TableResizeScale, TableResizeScaleOptions, TableRowFormat, TableRowValue, TableSelection, TableSelectionOptions, TableTextOptions, TableUp, TableUpOptions, TableValue, TableVirtualScrollbar, TableWrapperFormat, Tool, ToolOption, ToolOptionBreak, Writable, blotName, createColorPicker, createSelectBox, createTooltip, TableUp as default, defaultCustomSelect, findParentBlot, findParentBlots, getTableMainRect, isTableAlignRight, randomId, sizeChangeValue, tableMenuTools, tableUpEvent, tableUpInternal, tableUpSize, updateTableConstants };
1119
+ //# sourceMappingURL=index.d.ts.map