@worktile/theia 14.3.9 → 14.3.10
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/components/contextmenu/contextmenu.component.d.ts +3 -2
- package/components/contextmenu/contextmenu.component.scss +7 -0
- package/components/index.d.ts +11 -0
- package/components/index.scss +10 -0
- package/constants/index.d.ts +1 -0
- package/editor.module.d.ts +6 -5
- package/esm2020/components/action/prevent-default.mjs +4 -4
- package/esm2020/components/color-select/color-select.component.mjs +4 -4
- package/esm2020/components/column-resize/column-resize-notifier.mjs +4 -4
- package/esm2020/components/column-resize/column-resize.directive.mjs +4 -4
- package/esm2020/components/column-resize/column-resize.module.mjs +9 -9
- package/esm2020/components/column-resize/event-dispatcher.mjs +4 -4
- package/esm2020/components/column-resize/overlay-handle.component.mjs +4 -4
- package/esm2020/components/column-resize/resizing.store.mjs +4 -4
- package/esm2020/components/contextmenu/contextmenu.component.mjs +15 -9
- package/esm2020/components/conversion-hint/conversion-hint.component.mjs +4 -4
- package/esm2020/components/element/element.component.mjs +4 -4
- package/esm2020/components/index.mjs +12 -0
- package/esm2020/components/inline-toolbar/inline-toolbar.component.mjs +4 -4
- package/esm2020/components/listbox/listbox.mjs +10 -10
- package/esm2020/components/plugin-menu/plugin-menu.component.mjs +4 -4
- package/esm2020/components/table-select/table-select.component.mjs +4 -4
- package/esm2020/components/template/template.component.mjs +4 -4
- package/esm2020/components/text/text.component.mjs +4 -4
- package/esm2020/components/toolbar/toolbar.component.mjs +4 -4
- package/esm2020/components/toolbar-dropdown/toolbar-dropdown.component.mjs +4 -4
- package/esm2020/components/toolbar-group/toolbar-group.component.mjs +4 -4
- package/esm2020/components/toolbar-item/toolbar-item.component.mjs +4 -4
- package/esm2020/constants/index.mjs +2 -1
- package/esm2020/core/toolbar-item/base-toolbar-item.mjs +7 -7
- package/esm2020/editor.component.mjs +4 -4
- package/esm2020/editor.module.mjs +10 -7
- package/esm2020/interfaces/view-base.mjs +4 -4
- package/esm2020/pipes.mjs +7 -7
- package/esm2020/plugins/blockquote/blockquote.component.mjs +4 -4
- package/esm2020/plugins/code/code.component.mjs +4 -4
- package/esm2020/plugins/color/toolbar-item.component.mjs +4 -4
- package/esm2020/plugins/hr/hr.component.mjs +4 -4
- package/esm2020/plugins/image/image.component.mjs +4 -4
- package/esm2020/plugins/indent/indent.editor.mjs +10 -4
- package/esm2020/plugins/indent/on-keydown-indent.mjs +5 -1
- package/esm2020/plugins/inline-code/inline-code.component.mjs +4 -4
- package/esm2020/plugins/link/edit/link-edit.component.mjs +4 -4
- package/esm2020/plugins/link/hover/link-hover.component.mjs +4 -4
- package/esm2020/plugins/link/link.component.mjs +7 -7
- package/esm2020/plugins/list/components/bulleted-list.component.mjs +5 -5
- package/esm2020/plugins/list/components/list-item.component.mjs +4 -4
- package/esm2020/plugins/list/components/numbered-list.component.mjs +5 -5
- package/esm2020/plugins/mention/suggestion.component.mjs +4 -4
- package/esm2020/plugins/quick-insert/components/quick-insert.component.mjs +4 -4
- package/esm2020/plugins/table/components/insert-mark/insert-mark.component.mjs +5 -13
- package/esm2020/plugins/table/components/row/row.component.mjs +4 -4
- package/esm2020/plugins/table/components/table.component.mjs +43 -30
- package/esm2020/plugins/table/components/td/td.component.mjs +22 -20
- package/esm2020/plugins/table/components/toolbar/table-options.component.mjs +5 -5
- package/esm2020/plugins/table/components/toolbar/table-toolbar.component.mjs +26 -6
- package/esm2020/plugins/table/table.editor.mjs +76 -17
- package/esm2020/plugins/table/table.pipe.mjs +9 -6
- package/esm2020/plugins/table/table.service.mjs +9 -8
- package/esm2020/plugins/table/table.store.mjs +35 -20
- package/esm2020/plugins/table/table.types.mjs +8 -1
- package/esm2020/plugins/table/toolbar-item.component.mjs +4 -4
- package/esm2020/plugins/table/transforms/index.mjs +8 -0
- package/esm2020/plugins/table/transforms/insert-column.mjs +6 -2
- package/esm2020/plugins/table/transforms/insert-row.mjs +36 -29
- package/esm2020/plugins/table/utils/index.mjs +3 -2
- package/esm2020/plugins/table/utils/is-selection-in-table.mjs +20 -1
- package/esm2020/plugins/table/utils/set-menu-cell-invisibility.mjs +37 -7
- package/esm2020/plugins/todo-item/todo-item.component.mjs +5 -5
- package/esm2020/plugins/vertical-align/toolbar-item.component.mjs +4 -4
- package/esm2020/public-api.mjs +4 -12
- package/esm2020/services/color-select.service.mjs +4 -4
- package/esm2020/services/context.service.mjs +4 -4
- package/esm2020/services/table-contextmenu.service.mjs +100 -13
- package/esm2020/services/toolbar.service.mjs +4 -4
- package/fesm2015/worktile-theia.mjs +1362 -1088
- package/fesm2015/worktile-theia.mjs.map +1 -1
- package/fesm2020/worktile-theia.mjs +1360 -1089
- package/fesm2020/worktile-theia.mjs.map +1 -1
- package/package.json +1 -1
- package/plugins/table/components/mixins.scss +11 -0
- package/plugins/table/components/table.component.d.ts +10 -6
- package/plugins/table/components/table.component.scss +3 -11
- package/plugins/table/components/td/td.component.d.ts +3 -1
- package/plugins/table/components/toolbar/table-toolbar.component.d.ts +5 -2
- package/plugins/table/table.editor.d.ts +8 -4
- package/plugins/table/table.pipe.d.ts +1 -1
- package/plugins/table/table.service.d.ts +2 -2
- package/plugins/table/table.store.d.ts +7 -0
- package/plugins/table/table.types.d.ts +10 -1
- package/plugins/table/transforms/index.d.ts +7 -0
- package/plugins/table/utils/index.d.ts +2 -1
- package/plugins/table/utils/is-selection-in-table.d.ts +7 -1
- package/plugins/table/utils/set-menu-cell-invisibility.d.ts +6 -1
- package/public-api.d.ts +3 -11
- package/services/table-contextmenu.service.d.ts +16 -3
- package/styles/index.scss +1 -9
package/package.json
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
$expand-size: 12px;
|
|
4
4
|
|
|
5
|
+
|
|
6
|
+
@mixin cellInset{
|
|
7
|
+
display: block;
|
|
8
|
+
position: absolute;
|
|
9
|
+
content: '';
|
|
10
|
+
top: -1px;
|
|
11
|
+
left: -1px;
|
|
12
|
+
right: -1px;
|
|
13
|
+
bottom: -1px;
|
|
14
|
+
}
|
|
15
|
+
|
|
5
16
|
@mixin controlSelected {
|
|
6
17
|
background-color: #a3bffe;
|
|
7
18
|
border-color: variables.$primary;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { OnInit, ElementRef, OnDestroy, ChangeDetectorRef, NgZone, AfterViewInit } from '@angular/core';
|
|
2
2
|
import { Subject } from 'rxjs';
|
|
3
3
|
import { Editor } from 'slate';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { TheBaseElementComponent, ThePluginOption } from '../../../interfaces';
|
|
5
|
+
import { TableCellElement, TableElement } from '../../../custom-types';
|
|
6
|
+
import { ColumnResizeNotifierSource, TableCellEventDispatcher } from '../../../components';
|
|
7
|
+
import { TheTableContextMenuService } from '../../../services/table-contextmenu.service';
|
|
6
8
|
import { TableStore } from '../table.store';
|
|
7
9
|
import { TableService } from '../table.service';
|
|
8
|
-
import { TheTableContextMenuService } from '../../../services/table-contextmenu.service';
|
|
9
|
-
import { TheBaseElementComponent } from '../../../interfaces/view-base';
|
|
10
|
-
import { TableCellElement, TableElement } from '../../../custom-types';
|
|
11
10
|
import { ThePluginTableOption, TheTableColumn } from '../table.types';
|
|
12
|
-
import { ThePluginOption } from '../../../interfaces';
|
|
13
11
|
import { TableFreezeColumnPipe } from '../table.pipe';
|
|
14
12
|
import * as i0 from "@angular/core";
|
|
15
13
|
export declare class TheTableComponent extends TheBaseElementComponent<TableElement, Editor> implements OnInit, AfterViewInit, OnDestroy {
|
|
@@ -21,6 +19,7 @@ export declare class TheTableComponent extends TheBaseElementComponent<TableElem
|
|
|
21
19
|
tableService: TableService;
|
|
22
20
|
private theTableContextMenuService;
|
|
23
21
|
private freezeColumnPipe;
|
|
22
|
+
headerRow: boolean;
|
|
24
23
|
destroy$: Subject<any>;
|
|
25
24
|
rowControls: {
|
|
26
25
|
height: number;
|
|
@@ -41,6 +40,11 @@ export declare class TheTableComponent extends TheBaseElementComponent<TableElem
|
|
|
41
40
|
constructor(elementRef: ElementRef, eventDispatcher: TableCellEventDispatcher, resizeNotifier: ColumnResizeNotifierSource, tableStore: TableStore, cdr: ChangeDetectorRef, ngZone: NgZone, tableService: TableService, theTableContextMenuService: TheTableContextMenuService, freezeColumnPipe: TableFreezeColumnPipe);
|
|
42
41
|
ngOnInit(): void;
|
|
43
42
|
getWrapperWidth(): number;
|
|
43
|
+
/**
|
|
44
|
+
* compatible with old data
|
|
45
|
+
* @returns
|
|
46
|
+
*/
|
|
47
|
+
getHeaderRow(): boolean;
|
|
44
48
|
ngAfterViewInit(): void;
|
|
45
49
|
bindTableScrollingShadow(): void;
|
|
46
50
|
subscribeCellPositionChange(): void;
|
|
@@ -41,18 +41,9 @@ $top-cell-z-index: 13;
|
|
|
41
41
|
position: relative;
|
|
42
42
|
cursor: text;
|
|
43
43
|
|
|
44
|
-
&::after {
|
|
45
|
-
display: block;
|
|
46
|
-
position: absolute;
|
|
47
|
-
content: '';
|
|
48
|
-
top: -1px;
|
|
49
|
-
left: -1px;
|
|
50
|
-
right: -1px;
|
|
51
|
-
bottom: -1px;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
44
|
&.the-sticky-cell {
|
|
55
45
|
&:after {
|
|
46
|
+
@include mixins.cellInset;
|
|
56
47
|
border: $controls-border;
|
|
57
48
|
}
|
|
58
49
|
&.the-table-left-shadow {
|
|
@@ -73,6 +64,7 @@ $top-cell-z-index: 13;
|
|
|
73
64
|
&.selected-cell,
|
|
74
65
|
&.focused-cell:not(.selected-cell):not(.dangerous-cell) {
|
|
75
66
|
&::after {
|
|
67
|
+
@include mixins.cellInset;
|
|
76
68
|
z-index: -1;
|
|
77
69
|
border: 1px solid variables.$primary;
|
|
78
70
|
}
|
|
@@ -86,7 +78,7 @@ $top-cell-z-index: 13;
|
|
|
86
78
|
|
|
87
79
|
&.dangerous-cell {
|
|
88
80
|
&::after {
|
|
89
|
-
|
|
81
|
+
@include mixins.cellInset;
|
|
90
82
|
z-index: -1;
|
|
91
83
|
border: 1px solid variables.$danger;
|
|
92
84
|
background: rgba($color: variables.$danger, $alpha: 0.1);
|
|
@@ -11,6 +11,7 @@ import { ResizeRef } from '../../../../components/column-resize/resize-ref';
|
|
|
11
11
|
import { TheBaseElementComponent } from '../../../../interfaces/view-base';
|
|
12
12
|
import { TableOptions } from '../../table.types';
|
|
13
13
|
import { TableCellElement } from '../../../../custom-types';
|
|
14
|
+
import { TableFreezeColumnPipe } from '../../table.pipe';
|
|
14
15
|
import * as i0 from "@angular/core";
|
|
15
16
|
export declare const POSITION_MAP: {
|
|
16
17
|
[key: string]: ConnectedPosition;
|
|
@@ -25,6 +26,7 @@ export declare class TheTdComponent extends TheBaseElementComponent<TableCellEle
|
|
|
25
26
|
overlay: Overlay;
|
|
26
27
|
resizingStore: ColumnResizingStore;
|
|
27
28
|
scrollDispatcher: ScrollDispatcher;
|
|
29
|
+
freezeColumnPipe: TableFreezeColumnPipe;
|
|
28
30
|
destroy$: Subject<any>;
|
|
29
31
|
tablePosition: TablePosition;
|
|
30
32
|
tableComponent: TheTableComponent;
|
|
@@ -51,7 +53,7 @@ export declare class TheTdComponent extends TheBaseElementComponent<TableCellEle
|
|
|
51
53
|
cellInner: ElementRef;
|
|
52
54
|
get cellInnerNativeElement(): HTMLElement;
|
|
53
55
|
onContextChange(): void;
|
|
54
|
-
constructor(elementRef: ElementRef, cdr: ChangeDetectorRef, renderer: Renderer2, viewContainerRef: ViewContainerRef, ngZone: NgZone, injector: Injector, overlay: Overlay, resizingStore: ColumnResizingStore, scrollDispatcher: ScrollDispatcher);
|
|
56
|
+
constructor(elementRef: ElementRef, cdr: ChangeDetectorRef, renderer: Renderer2, viewContainerRef: ViewContainerRef, ngZone: NgZone, injector: Injector, overlay: Overlay, resizingStore: ColumnResizingStore, scrollDispatcher: ScrollDispatcher, freezeColumnPipe: TableFreezeColumnPipe);
|
|
55
57
|
ngOnInit(): void;
|
|
56
58
|
ngAfterViewInit(): void;
|
|
57
59
|
getInjectionService(): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnInit, NgZone, OnDestroy } from '@angular/core';
|
|
1
|
+
import { OnInit, NgZone, OnDestroy, ElementRef } from '@angular/core';
|
|
2
2
|
import { ThyPopover, ThyPopoverRef } from 'ngx-tethys/popover';
|
|
3
3
|
import { Editor } from 'slate';
|
|
4
4
|
import { TableStore } from '../../table.store';
|
|
@@ -14,9 +14,11 @@ export declare class TheTableToolbarComponent implements OnInit, OnDestroy {
|
|
|
14
14
|
selectedColor: string;
|
|
15
15
|
deleteIcon: string;
|
|
16
16
|
iconName: string;
|
|
17
|
+
isRectangle: boolean;
|
|
17
18
|
tableStore: TableStore;
|
|
18
19
|
isFromControls: boolean;
|
|
19
20
|
tableElement: TableElement;
|
|
21
|
+
tableElementRef: ElementRef;
|
|
20
22
|
get editor(): Editor;
|
|
21
23
|
cellMenuList: MenuEntity[];
|
|
22
24
|
get hasDivider(): boolean;
|
|
@@ -32,9 +34,10 @@ export declare class TheTableToolbarComponent implements OnInit, OnDestroy {
|
|
|
32
34
|
openSelectColor(event: MouseEvent): void;
|
|
33
35
|
setFullscreen(event: MouseEvent): void;
|
|
34
36
|
mousedown(event: MouseEvent): void;
|
|
37
|
+
setEquallyColumnHandle(event: MouseEvent): void;
|
|
35
38
|
openTableOptionMenu(event: Event): void;
|
|
36
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheTableToolbarComponent, never>;
|
|
37
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheTableToolbarComponent, "the-table-toolbar", never, { "tableStore": "tableStore"; "isFromControls": "isFromControls"; "tableElement": "tableElement"; }, {}, never, never, false>;
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheTableToolbarComponent, "the-table-toolbar", never, { "tableStore": "tableStore"; "isFromControls": "isFromControls"; "tableElement": "tableElement"; "tableElementRef": "tableElementRef"; }, {}, never, never, false>;
|
|
38
41
|
}
|
|
39
42
|
export declare enum DeleteIcon {
|
|
40
43
|
'table-delete-rows' = 0,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Editor, NodeEntry, Path, Range } from 'slate';
|
|
1
|
+
import { Editor, NodeEntry, Path, Range, Node } from 'slate';
|
|
2
2
|
import { TableOptions } from './table.types';
|
|
3
|
-
import { Alignment, VerticalAlignment } from '../../constants
|
|
3
|
+
import { Alignment, VerticalAlignment } from '../../constants';
|
|
4
4
|
import { TheEditor } from '../../interfaces';
|
|
5
|
-
import { TableElement } from '../../custom-types';
|
|
5
|
+
import { CustomElement, TableElement } from '../../custom-types';
|
|
6
6
|
export declare const TableEditor: {
|
|
7
7
|
insertTable(editor: Editor, optionsParam?: TableOptions): void;
|
|
8
8
|
insertColumn(editor: Editor, count?: number, at?: number, optionsParam?: TableOptions): void;
|
|
@@ -10,7 +10,7 @@ export declare const TableEditor: {
|
|
|
10
10
|
removeTable(editor: Editor, optionsParam?: TableOptions): void;
|
|
11
11
|
removeRow(editor: Editor, rowIndex?: number, optionsParam?: TableOptions): void;
|
|
12
12
|
removeColumn(editor: Editor, colIndex?: number, optionsParam?: TableOptions): void;
|
|
13
|
-
clearCell(editor: Editor, nodeEntry?: NodeEntry<
|
|
13
|
+
clearCell(editor: Editor, nodeEntry?: NodeEntry<CustomElement>, optionsParam?: TableOptions): void;
|
|
14
14
|
isActive(editor: Editor): boolean;
|
|
15
15
|
getSelectedCells(editor: Editor): import("./table.types").SelectedCell[];
|
|
16
16
|
isAlignActive(editor: TheEditor, alignment: Alignment): boolean;
|
|
@@ -21,5 +21,9 @@ export declare const TableEditor: {
|
|
|
21
21
|
clearMark(editor: TheEditor): boolean;
|
|
22
22
|
handleSelectedCells(editor: TheEditor, handle: (cellPath: Path, cellRange: Range) => void): boolean;
|
|
23
23
|
isActiveHeader(editor: TheEditor): boolean;
|
|
24
|
+
isActiveHeaderRow(editor: TheEditor): NodeEntry<Node>;
|
|
25
|
+
isActiveHeaderColumn(editor: TheEditor): boolean;
|
|
24
26
|
selectOriginCell(editor: TheEditor, table: TableElement, rowIndex: number, columnIndex: number, isStart: boolean): void;
|
|
27
|
+
setIndent(editor: Editor): boolean;
|
|
28
|
+
cancelIndent(editor: TheEditor): boolean;
|
|
25
29
|
};
|
|
@@ -3,7 +3,7 @@ import { ThePluginTableOption } from './table.types';
|
|
|
3
3
|
import { TableElement } from '../../custom-types';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class TableFreezeColumnPipe implements PipeTransform {
|
|
6
|
-
transform(
|
|
6
|
+
transform(table: TableElement, tablePluginOptions: ThePluginTableOption): boolean;
|
|
7
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableFreezeColumnPipe, never>;
|
|
8
8
|
static ɵpipe: i0.ɵɵPipeDeclaration<TableFreezeColumnPipe, "freezeColumn", false>;
|
|
9
9
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Overlay } from '@angular/cdk/overlay';
|
|
2
|
-
import { NgZone } from '@angular/core';
|
|
2
|
+
import { ElementRef, NgZone } from '@angular/core';
|
|
3
3
|
import { ThyPlacement } from 'ngx-tethys/core';
|
|
4
4
|
import { ThyPopover, ThyPopoverRef } from 'ngx-tethys/popover';
|
|
5
5
|
import { TableElement } from '../../custom-types';
|
|
@@ -23,7 +23,7 @@ export declare class TableService {
|
|
|
23
23
|
get isOpened(): any;
|
|
24
24
|
constructor(thyPopover: ThyPopover, overlay: Overlay, tableStore: TableStore, theTableContextMenuService: TheTableContextMenuService, ngZone: NgZone, theContextService: TheContextService);
|
|
25
25
|
private openToolbar;
|
|
26
|
-
afterSelectedCells(origin: HTMLElement, element: TableElement, isFromControls?: boolean): void;
|
|
26
|
+
afterSelectedCells(origin: HTMLElement, element: TableElement, isFromControls?: boolean, tableElementRef?: ElementRef): void;
|
|
27
27
|
getOrigin(origin: HTMLElement): HTMLElement;
|
|
28
28
|
closeToolbar(): import("rxjs").Observable<unknown>;
|
|
29
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableService, never>;
|
|
@@ -20,6 +20,7 @@ export declare class TableStore {
|
|
|
20
20
|
anchorCellPath: number[];
|
|
21
21
|
focusCellPath: number[];
|
|
22
22
|
preFocusCellPath: number[];
|
|
23
|
+
lastFocusCellPath: number[];
|
|
23
24
|
focusCellElement: HTMLTableCellElement;
|
|
24
25
|
isPrepareSelecting: boolean;
|
|
25
26
|
isCellSelecting: boolean;
|
|
@@ -34,6 +35,12 @@ export declare class TableStore {
|
|
|
34
35
|
getTablePosition(editor: Editor): TablePosition;
|
|
35
36
|
setSelectedCells(cells: SelectedCell[], pos: TablePosition): void;
|
|
36
37
|
initEditor(editor: Editor): void;
|
|
38
|
+
/**
|
|
39
|
+
* 多选模式下需要合并数据
|
|
40
|
+
* @param cells SelectedCell[]
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
43
|
+
buildModCells(cells: SelectedCell[]): SelectedCell[];
|
|
37
44
|
selectRow(editor: Editor, index: number): void;
|
|
38
45
|
selectColumn(editor: Editor, index: number): void;
|
|
39
46
|
selectTable(editor: Editor): void;
|
|
@@ -33,10 +33,13 @@ export interface MenuEntity {
|
|
|
33
33
|
divider?: boolean;
|
|
34
34
|
extendIcon?: string;
|
|
35
35
|
visibility?: boolean;
|
|
36
|
+
isInputNumber?: boolean;
|
|
37
|
+
nameSuffix?: string;
|
|
38
|
+
count?: number;
|
|
36
39
|
backgroundColor?: string;
|
|
37
40
|
actionHandle: (entity: MenuEntity) => void;
|
|
38
41
|
activeHandle?: (event: MouseEvent) => void;
|
|
39
|
-
|
|
42
|
+
deactivateHandle?: (event: MouseEvent) => void;
|
|
40
43
|
}
|
|
41
44
|
export interface ThePluginTableOption {
|
|
42
45
|
freezeColumnHeader?: boolean;
|
|
@@ -76,3 +79,9 @@ export declare class TableOptions {
|
|
|
76
79
|
maxHeightPx: number;
|
|
77
80
|
constructor(options?: TableOptionsFormat);
|
|
78
81
|
}
|
|
82
|
+
export declare enum TableInsertType {
|
|
83
|
+
insertRowsUp = "insert-rows-up",
|
|
84
|
+
insertRowsDown = "insert-rows-down",
|
|
85
|
+
insertColumnsLeft = "insert-columns-left",
|
|
86
|
+
insertColumnsRight = "insert-columns-right"
|
|
87
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { insertTable } from './insert-table';
|
|
2
|
+
import { insertRow } from './insert-row';
|
|
3
|
+
import { insertColumn } from './insert-column';
|
|
4
|
+
import { removeRow } from './remove-row';
|
|
5
|
+
import { removeColumn } from './remove-column';
|
|
6
|
+
import { removeTable } from './remove-table';
|
|
7
|
+
export { insertTable, insertRow, insertColumn, removeTable, removeRow, removeColumn };
|
|
@@ -4,4 +4,5 @@ import { createTable } from './create-table';
|
|
|
4
4
|
import { isRangeInTable } from './is-range-in-table';
|
|
5
5
|
import { isSelectionInTable } from './is-selection-in-table';
|
|
6
6
|
import { TablePosition } from './table-position';
|
|
7
|
-
|
|
7
|
+
import { calcSpanForRow, getOriginCell } from './calc-span';
|
|
8
|
+
export { isRangeInTable, isSelectionInTable, TablePosition, createCell, createRow, createTable, calcSpanForRow, getOriginCell };
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { Editor } from 'slate';
|
|
2
|
-
import { TableOptions } from '../table.types';
|
|
2
|
+
import { SelectedCell, TableOptions } from '../table.types';
|
|
3
3
|
/**
|
|
4
4
|
* Is the selection in a table
|
|
5
5
|
*/
|
|
6
6
|
export declare function isSelectionInTable(opts: TableOptions, editor: Editor): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Whether the cells passed in can form a rectangle
|
|
9
|
+
* @param cells
|
|
10
|
+
* @returns boolean
|
|
11
|
+
*/
|
|
12
|
+
export declare function isRectangularInTableCells(cells: SelectedCell[]): boolean;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { Editor } from 'slate';
|
|
2
2
|
import { MenuEntity, SelectedCell } from '../table.types';
|
|
3
|
-
export declare function setCellMenuVisibility(editor: Editor, menuList: MenuEntity[],
|
|
3
|
+
export declare function setCellMenuVisibility(editor: Editor, menuList: MenuEntity[], tableInfo: {
|
|
4
|
+
selectedCells: SelectedCell[];
|
|
5
|
+
isFullscreen?: boolean;
|
|
6
|
+
selectedRowsIndex?: number[];
|
|
7
|
+
selectedColumnsIndex?: number[];
|
|
8
|
+
}, isFromControls?: boolean): void;
|
package/public-api.d.ts
CHANGED
|
@@ -8,18 +8,10 @@ export * from './custom-types';
|
|
|
8
8
|
export * from './plugins/image/image.component';
|
|
9
9
|
export * from './services/toolbar.service';
|
|
10
10
|
export * from './editor.component';
|
|
11
|
-
export * from './components/toolbar/toolbar.component';
|
|
12
11
|
export * from './core/toolbar-item/base-toolbar-item';
|
|
13
|
-
export * from './components/toolbar-dropdown/toolbar-dropdown.component';
|
|
14
|
-
export * from './components/toolbar-group/toolbar-group.component';
|
|
15
|
-
export * from './components/toolbar-item/toolbar-item.component';
|
|
16
|
-
export * from './components/element/element.component';
|
|
17
|
-
export * as TheQueries from './queries/index';
|
|
18
|
-
export * as TheTransforms from './transforms/index';
|
|
19
12
|
export * from './utils/index';
|
|
20
13
|
export * from './services/context.service';
|
|
21
14
|
export * from './test/index';
|
|
22
|
-
export * from './components/
|
|
23
|
-
export * from './
|
|
24
|
-
export * from './
|
|
25
|
-
export * from './components/plugin-menu/plugin-menu.component';
|
|
15
|
+
export * from './components/index';
|
|
16
|
+
export * as TheQueries from './queries/index';
|
|
17
|
+
export * as TheTransforms from './transforms/index';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { NgZone } from '@angular/core';
|
|
2
|
-
import { TableStore } from '../plugins/table/table.store';
|
|
3
|
-
import { TheColorSelectService } from './color-select.service';
|
|
4
2
|
import { ThyPopoverRef, ThyPopover } from 'ngx-tethys/popover';
|
|
3
|
+
import { TheColorSelectService } from './color-select.service';
|
|
4
|
+
import { TableStore } from '../plugins/table/table.store';
|
|
5
|
+
import { MenuEntity } from '../plugins/table/table.types';
|
|
5
6
|
import { TheContextMenuComponent } from '../components/contextmenu/contextmenu.component';
|
|
6
7
|
import { TheContextService } from './context.service';
|
|
7
|
-
import { MenuEntity } from '../plugins/table/table.types';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
export declare class TheTableContextMenuService {
|
|
10
10
|
private colorSelectService;
|
|
@@ -18,6 +18,19 @@ export declare class TheTableContextMenuService {
|
|
|
18
18
|
get backgroundColor(): string;
|
|
19
19
|
constructor(colorSelectService: TheColorSelectService, tableStore: TableStore, thyPopover: ThyPopover, ngZone: NgZone, theContextService: TheContextService);
|
|
20
20
|
menuEntities: MenuEntity[];
|
|
21
|
+
getSelectedCell(): {
|
|
22
|
+
row: number;
|
|
23
|
+
col: number;
|
|
24
|
+
selectCellNodes: {
|
|
25
|
+
node: import("@worktile/theia").TableCellElement;
|
|
26
|
+
row: number;
|
|
27
|
+
col: number;
|
|
28
|
+
}[];
|
|
29
|
+
};
|
|
30
|
+
getTargetRowOrColIndex(isFront?: boolean): {
|
|
31
|
+
targetRowIndex: number;
|
|
32
|
+
targetColIndex: number;
|
|
33
|
+
};
|
|
21
34
|
openMenuList(event: MouseEvent): void;
|
|
22
35
|
closeContextMenu(): import("rxjs").Observable<unknown>;
|
|
23
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheTableContextMenuService, never>;
|
package/styles/index.scss
CHANGED
|
@@ -9,21 +9,13 @@
|
|
|
9
9
|
|
|
10
10
|
@forward './typo.scss';
|
|
11
11
|
@forward './editor.scss';
|
|
12
|
+
@forward '../components/index.scss';
|
|
12
13
|
@forward '../plugins/image/image.component.scss';
|
|
13
14
|
@forward '../plugins/todo-item/todo-item.component.scss';
|
|
14
|
-
@forward '../components/toolbar-dropdown/toolbar-dropdown.component.scss';
|
|
15
|
-
@forward '../components/toolbar-group/toolbar-group.component.scss';
|
|
16
|
-
@forward '../components/toolbar/toolbar.component.scss';
|
|
17
|
-
@forward '../components/color-select/color-select.component.scss';
|
|
18
15
|
@forward '../plugins/code/code.component.scss';
|
|
19
16
|
@forward '../plugins/link/link.component.scss';
|
|
20
|
-
@forward '../components/column-resize/column-resize.scss';
|
|
21
17
|
@forward '../plugins/table/components/table.component.scss';
|
|
22
|
-
@forward '../components/table-select/table-select.component.scss';
|
|
23
|
-
@forward '../components/conversion-hint/conversion-hint.component.scss';
|
|
24
18
|
@forward '../plugins/vertical-align/vertical-align.scss';
|
|
25
|
-
@forward '../components/inline-toolbar/inline-toolbar.component.scss';
|
|
26
19
|
@forward '../plugins/quick-insert/components/quick-insert.component.scss';
|
|
27
|
-
@forward '../components/plugin-menu/plugin-menu.component.scss';
|
|
28
20
|
@forward '../plugins/font-size/toolbar-item.component.scss';
|
|
29
21
|
@forward '../plugins/inline-code/inline-code.component.scss';
|