@worktile/theia 14.3.7 → 14.3.9
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/editor.module.d.ts +69 -68
- package/esm2020/components/action/prevent-default.mjs +3 -3
- package/esm2020/components/color-select/color-select.component.mjs +3 -3
- package/esm2020/components/column-resize/column-resize-notifier.mjs +3 -3
- package/esm2020/components/column-resize/column-resize.directive.mjs +3 -3
- package/esm2020/components/column-resize/column-resize.module.mjs +8 -8
- package/esm2020/components/column-resize/event-dispatcher.mjs +3 -3
- package/esm2020/components/column-resize/overlay-handle.component.mjs +3 -3
- package/esm2020/components/column-resize/resizing.store.mjs +3 -3
- package/esm2020/components/contextmenu/contextmenu.component.mjs +3 -3
- package/esm2020/components/conversion-hint/conversion-hint.component.mjs +3 -3
- package/esm2020/components/element/element.component.mjs +3 -3
- package/esm2020/components/inline-toolbar/inline-toolbar.component.mjs +3 -3
- package/esm2020/components/listbox/listbox.mjs +9 -9
- package/esm2020/components/plugin-menu/plugin-menu.component.mjs +3 -3
- package/esm2020/components/table-select/table-select.component.mjs +3 -3
- package/esm2020/components/template/template.component.mjs +3 -3
- package/esm2020/components/text/text.component.mjs +3 -3
- package/esm2020/components/toolbar/toolbar.component.mjs +3 -3
- package/esm2020/components/toolbar-dropdown/toolbar-dropdown.component.mjs +3 -3
- package/esm2020/components/toolbar-group/toolbar-group.component.mjs +3 -3
- package/esm2020/components/toolbar-item/toolbar-item.component.mjs +3 -3
- package/esm2020/core/toolbar-item/base-toolbar-item.mjs +6 -6
- package/esm2020/editor.component.mjs +3 -3
- package/esm2020/editor.module.mjs +7 -6
- package/esm2020/interfaces/plugins/plugins.mjs +1 -1
- package/esm2020/interfaces/view-base.mjs +3 -3
- package/esm2020/pipes.mjs +6 -6
- package/esm2020/plugins/blockquote/blockquote.component.mjs +3 -3
- package/esm2020/plugins/code/code.component.mjs +3 -3
- package/esm2020/plugins/color/toolbar-item.component.mjs +3 -3
- package/esm2020/plugins/hr/hr.component.mjs +3 -3
- package/esm2020/plugins/image/image.component.mjs +3 -3
- package/esm2020/plugins/inline-code/inline-code.component.mjs +3 -3
- package/esm2020/plugins/link/edit/link-edit.component.mjs +3 -3
- package/esm2020/plugins/link/hover/link-hover.component.mjs +3 -3
- package/esm2020/plugins/link/link.component.mjs +6 -6
- package/esm2020/plugins/list/components/bulleted-list.component.mjs +3 -3
- package/esm2020/plugins/list/components/list-item.component.mjs +3 -3
- package/esm2020/plugins/list/components/numbered-list.component.mjs +3 -3
- package/esm2020/plugins/mention/suggestion.component.mjs +3 -3
- package/esm2020/plugins/quick-insert/components/quick-insert.component.mjs +3 -3
- package/esm2020/plugins/table/components/insert-mark/insert-mark.component.mjs +12 -8
- package/esm2020/plugins/table/components/row/row.component.mjs +3 -3
- package/esm2020/plugins/table/components/table.component.mjs +51 -16
- package/esm2020/plugins/table/components/td/td.component.mjs +39 -9
- package/esm2020/plugins/table/components/toolbar/table-options.component.mjs +8 -8
- package/esm2020/plugins/table/components/toolbar/table-toolbar.component.mjs +5 -5
- package/esm2020/plugins/table/table.pipe.mjs +14 -0
- package/esm2020/plugins/table/table.plugin.mjs +2 -1
- package/esm2020/plugins/table/table.service.mjs +3 -3
- package/esm2020/plugins/table/table.store.mjs +30 -6
- package/esm2020/plugins/table/table.types.mjs +4 -1
- package/esm2020/plugins/table/toolbar-item.component.mjs +3 -3
- package/esm2020/plugins/todo-item/todo-item.component.mjs +3 -3
- package/esm2020/plugins/vertical-align/toolbar-item.component.mjs +3 -3
- package/esm2020/services/color-select.service.mjs +3 -3
- package/esm2020/services/context.service.mjs +3 -3
- package/esm2020/services/table-contextmenu.service.mjs +3 -3
- package/esm2020/services/toolbar.service.mjs +3 -3
- package/fesm2015/worktile-theia.mjs +318 -214
- package/fesm2015/worktile-theia.mjs.map +1 -1
- package/fesm2020/worktile-theia.mjs +318 -214
- package/fesm2020/worktile-theia.mjs.map +1 -1
- package/interfaces/plugins/plugins.d.ts +0 -5
- package/package.json +1 -1
- package/plugins/link/link.component.scss +1 -0
- package/plugins/table/components/insert-mark/insert-mark.component.d.ts +6 -5
- package/plugins/table/components/mixins.scss +43 -0
- package/plugins/table/components/table.component.d.ts +7 -4
- package/plugins/table/components/table.component.scss +62 -47
- package/plugins/table/components/td/td.component.d.ts +1 -0
- package/plugins/table/table.pipe.d.ts +9 -0
- package/plugins/table/table.plugin.d.ts +2 -1
- package/plugins/table/table.store.d.ts +1 -0
- package/plugins/table/table.types.d.ts +11 -0
- package/styles/mixins.scss +0 -10
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Editor, Element } from 'slate';
|
|
2
1
|
import { CustomElementKinds } from '../../custom-types';
|
|
3
2
|
import { ToolbarItem } from '../toolbar';
|
|
4
3
|
import { NestedStructureByKey } from '../utility';
|
|
@@ -7,14 +6,10 @@ import { ThePluginMenuItem } from './plugin-menu';
|
|
|
7
6
|
import { NoInfer } from './no-infer';
|
|
8
7
|
import { PluginKey, TheiaPluginKey } from './plugin-key';
|
|
9
8
|
import { WithOverride } from './with-override';
|
|
10
|
-
import { Observable } from 'rxjs';
|
|
11
9
|
export declare type ThePluginBaseOption = {
|
|
12
10
|
allowParentTypes?: (CustomElementKinds | string)[];
|
|
13
11
|
disabledOperateTypes?: CustomElementKinds[];
|
|
14
12
|
disabled?: boolean;
|
|
15
|
-
showFullscreen?: boolean;
|
|
16
|
-
setFullscreen?: (editor: Editor, event: MouseEvent, element: Element) => void;
|
|
17
|
-
fullscreenAction?: (editor: Editor) => Observable<boolean>;
|
|
18
13
|
};
|
|
19
14
|
export declare type ThePluginOption<P> = NoInfer<{
|
|
20
15
|
[key: string]: any;
|
package/package.json
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { OnInit,
|
|
1
|
+
import { OnInit, ChangeDetectorRef, Renderer2 } from '@angular/core';
|
|
2
2
|
import { Editor } from 'slate';
|
|
3
3
|
import { TableStore } from '../../table.store';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class TheInsertMarkComponent implements OnInit
|
|
5
|
+
export declare class TheInsertMarkComponent implements OnInit {
|
|
6
6
|
private cdr;
|
|
7
|
+
renderer2: Renderer2;
|
|
7
8
|
type: 'row' | 'column';
|
|
8
9
|
at: number;
|
|
9
10
|
tableStore: TableStore;
|
|
11
|
+
parentElement: HTMLElement;
|
|
10
12
|
insertLength: string;
|
|
11
13
|
dotWrapperHovered: boolean;
|
|
12
14
|
tooltipContent: string;
|
|
13
15
|
get disabled(): boolean;
|
|
14
16
|
get editor(): Editor;
|
|
15
|
-
constructor(cdr: ChangeDetectorRef);
|
|
17
|
+
constructor(cdr: ChangeDetectorRef, renderer2: Renderer2);
|
|
16
18
|
ngOnInit(): void;
|
|
17
19
|
onMouseDown(event: MouseEvent): void;
|
|
18
20
|
onMouseEnter(event: MouseEvent): void;
|
|
19
21
|
onMouseLeave(event: MouseEvent): void;
|
|
20
22
|
getLength(): string;
|
|
21
|
-
ngOnDestroy(): void;
|
|
22
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheInsertMarkComponent, never>;
|
|
23
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheInsertMarkComponent, "the-table-insert-mark", never, { "type": "type"; "at": "at"; "tableStore": "tableStore"; }, {}, never, never, false>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheInsertMarkComponent, "the-table-insert-mark", never, { "type": "type"; "at": "at"; "tableStore": "tableStore"; "parentElement": "parentElement"; }, {}, never, never, false>;
|
|
24
25
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@use 'ngx-tethys/styles/variables.scss';
|
|
2
|
+
|
|
3
|
+
$expand-size: 12px;
|
|
4
|
+
|
|
5
|
+
@mixin controlSelected {
|
|
6
|
+
background-color: #a3bffe;
|
|
7
|
+
border-color: variables.$primary;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@mixin controlDangerous {
|
|
11
|
+
background-color: #ffabac;
|
|
12
|
+
border-color: variables.$danger;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@mixin tableLeftShadow {
|
|
16
|
+
&::before {
|
|
17
|
+
bottom: 0;
|
|
18
|
+
top: $expand-size * 2 + 10px;
|
|
19
|
+
left: 0;
|
|
20
|
+
content: ' ';
|
|
21
|
+
position: absolute;
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
width: 8px;
|
|
24
|
+
z-index: 2;
|
|
25
|
+
background: -webkit-gradient(linear, right, left, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.1)));
|
|
26
|
+
background: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@mixin tableRightShadow{
|
|
31
|
+
&::after {
|
|
32
|
+
bottom: 0;
|
|
33
|
+
right: 0;
|
|
34
|
+
top: $expand-size * 2 + 10px;
|
|
35
|
+
content: ' ';
|
|
36
|
+
position: absolute;
|
|
37
|
+
pointer-events: none;
|
|
38
|
+
width: 8px;
|
|
39
|
+
z-index: 2;
|
|
40
|
+
background: -webkit-gradient(linear, left, right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1));
|
|
41
|
+
background: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -8,8 +8,9 @@ import { TableService } from '../table.service';
|
|
|
8
8
|
import { TheTableContextMenuService } from '../../../services/table-contextmenu.service';
|
|
9
9
|
import { TheBaseElementComponent } from '../../../interfaces/view-base';
|
|
10
10
|
import { TableCellElement, TableElement } from '../../../custom-types';
|
|
11
|
-
import { TheTableColumn } from '../table.types';
|
|
12
|
-
import {
|
|
11
|
+
import { ThePluginTableOption, TheTableColumn } from '../table.types';
|
|
12
|
+
import { ThePluginOption } from '../../../interfaces';
|
|
13
|
+
import { TableFreezeColumnPipe } from '../table.pipe';
|
|
13
14
|
import * as i0 from "@angular/core";
|
|
14
15
|
export declare class TheTableComponent extends TheBaseElementComponent<TableElement, Editor> implements OnInit, AfterViewInit, OnDestroy {
|
|
15
16
|
eventDispatcher: TableCellEventDispatcher;
|
|
@@ -19,7 +20,7 @@ export declare class TheTableComponent extends TheBaseElementComponent<TableElem
|
|
|
19
20
|
ngZone: NgZone;
|
|
20
21
|
tableService: TableService;
|
|
21
22
|
private theTableContextMenuService;
|
|
22
|
-
private
|
|
23
|
+
private freezeColumnPipe;
|
|
23
24
|
destroy$: Subject<any>;
|
|
24
25
|
rowControls: {
|
|
25
26
|
height: number;
|
|
@@ -27,6 +28,7 @@ export declare class TheTableComponent extends TheBaseElementComponent<TableElem
|
|
|
27
28
|
}[];
|
|
28
29
|
colControls: any[];
|
|
29
30
|
isInTable: boolean;
|
|
31
|
+
tablePluginOptions: ThePluginOption<ThePluginTableOption>;
|
|
30
32
|
get columns(): TheTableColumn[];
|
|
31
33
|
get nativeElement(): HTMLElement;
|
|
32
34
|
get tbodyNativeElement(): HTMLElement;
|
|
@@ -36,7 +38,7 @@ export declare class TheTableComponent extends TheBaseElementComponent<TableElem
|
|
|
36
38
|
tbodyElement: ElementRef;
|
|
37
39
|
handleMousedown(event: MouseEvent): void;
|
|
38
40
|
onContextChange(): void;
|
|
39
|
-
constructor(elementRef: ElementRef, eventDispatcher: TableCellEventDispatcher, resizeNotifier: ColumnResizeNotifierSource, tableStore: TableStore, cdr: ChangeDetectorRef, ngZone: NgZone, tableService: TableService, theTableContextMenuService: TheTableContextMenuService,
|
|
41
|
+
constructor(elementRef: ElementRef, eventDispatcher: TableCellEventDispatcher, resizeNotifier: ColumnResizeNotifierSource, tableStore: TableStore, cdr: ChangeDetectorRef, ngZone: NgZone, tableService: TableService, theTableContextMenuService: TheTableContextMenuService, freezeColumnPipe: TableFreezeColumnPipe);
|
|
40
42
|
ngOnInit(): void;
|
|
41
43
|
getWrapperWidth(): number;
|
|
42
44
|
ngAfterViewInit(): void;
|
|
@@ -70,6 +72,7 @@ export declare class TheTableComponent extends TheBaseElementComponent<TableElem
|
|
|
70
72
|
onSelectTable(event: MouseEvent): void;
|
|
71
73
|
listenTableContextMenuEvent(): void;
|
|
72
74
|
listenerOnSelectedCells(): void;
|
|
75
|
+
listenKeydownSelectEvents(): void;
|
|
73
76
|
trackByFnRowControls(index: number): number;
|
|
74
77
|
trackByFnColControls(index: number): number;
|
|
75
78
|
ngOnDestroy(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@use 'sass:math';
|
|
2
2
|
@use 'ngx-tethys/styles/variables.scss';
|
|
3
|
-
@use '../../../styles/variables.scss'as theVariables;
|
|
4
|
-
@use '
|
|
3
|
+
@use '../../../styles/variables.scss' as theVariables;
|
|
4
|
+
@use './mixins.scss' as mixins;
|
|
5
5
|
|
|
6
6
|
$expand-size: 12px;
|
|
7
7
|
$controls-border: 1px solid variables.$gray-300;
|
|
@@ -13,6 +13,8 @@ $dot-shadow-top: math.div($dot-size - 1, 2);
|
|
|
13
13
|
$table-scroll-padding: 2px;
|
|
14
14
|
$control-width: 11px;
|
|
15
15
|
$control-corner-width: 12px;
|
|
16
|
+
$header-cell-bg-color: #f3f3f3;
|
|
17
|
+
$top-cell-z-index: 13;
|
|
16
18
|
|
|
17
19
|
.slate-element-table {
|
|
18
20
|
display: block;
|
|
@@ -42,20 +44,37 @@ $control-corner-width: 12px;
|
|
|
42
44
|
&::after {
|
|
43
45
|
display: block;
|
|
44
46
|
position: absolute;
|
|
45
|
-
|
|
47
|
+
content: '';
|
|
48
|
+
top: -1px;
|
|
49
|
+
left: -1px;
|
|
50
|
+
right: -1px;
|
|
51
|
+
bottom: -1px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&.the-sticky-cell {
|
|
55
|
+
&:after {
|
|
56
|
+
border: $controls-border;
|
|
57
|
+
}
|
|
58
|
+
&.the-table-left-shadow {
|
|
59
|
+
z-index: 12;
|
|
60
|
+
@include mixins.tableLeftShadow;
|
|
61
|
+
&:before {
|
|
62
|
+
top: 0;
|
|
63
|
+
left: unset;
|
|
64
|
+
right: -8px;
|
|
65
|
+
height: 100%;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
&.the-table-left-shadow.focused-cell {
|
|
69
|
+
z-index: $top-cell-z-index;
|
|
70
|
+
}
|
|
46
71
|
}
|
|
47
72
|
|
|
48
73
|
&.selected-cell,
|
|
49
74
|
&.focused-cell:not(.selected-cell):not(.dangerous-cell) {
|
|
50
75
|
&::after {
|
|
51
|
-
content: '';
|
|
52
|
-
top: -1px;
|
|
53
|
-
left: -1px;
|
|
54
|
-
right: -1px;
|
|
55
|
-
bottom: -1px;
|
|
56
|
-
border-width: 1px;
|
|
57
76
|
z-index: -1;
|
|
58
|
-
border
|
|
77
|
+
border: 1px solid variables.$primary;
|
|
59
78
|
}
|
|
60
79
|
}
|
|
61
80
|
|
|
@@ -68,13 +87,8 @@ $control-corner-width: 12px;
|
|
|
68
87
|
&.dangerous-cell {
|
|
69
88
|
&::after {
|
|
70
89
|
content: '';
|
|
71
|
-
top: -1px;
|
|
72
|
-
left: -1px;
|
|
73
|
-
right: -1px;
|
|
74
|
-
bottom: -1px;
|
|
75
|
-
border-width: 1px;
|
|
76
90
|
z-index: -1;
|
|
77
|
-
border
|
|
91
|
+
border: 1px solid variables.$danger;
|
|
78
92
|
background: rgba($color: variables.$danger, $alpha: 0.1);
|
|
79
93
|
}
|
|
80
94
|
}
|
|
@@ -85,6 +99,15 @@ $control-corner-width: 12px;
|
|
|
85
99
|
z-index: 10;
|
|
86
100
|
}
|
|
87
101
|
|
|
102
|
+
.the-header-cell {
|
|
103
|
+
background: $header-cell-bg-color;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.the-sticky-cell {
|
|
107
|
+
position: sticky;
|
|
108
|
+
left: 0;
|
|
109
|
+
}
|
|
110
|
+
|
|
88
111
|
tbody {
|
|
89
112
|
tr {
|
|
90
113
|
height: 41px;
|
|
@@ -97,37 +120,17 @@ $control-corner-width: 12px;
|
|
|
97
120
|
}
|
|
98
121
|
}
|
|
99
122
|
|
|
100
|
-
|
|
101
123
|
.the-table-container {
|
|
102
124
|
position: relative;
|
|
103
125
|
box-sizing: border-box;
|
|
104
126
|
margin: 0 auto 16px;
|
|
105
127
|
|
|
106
|
-
&.the-table-right-shadow
|
|
107
|
-
|
|
108
|
-
right: 0;
|
|
109
|
-
top: $expand-size * 2 + 10px;
|
|
110
|
-
content: ' ';
|
|
111
|
-
position: absolute;
|
|
112
|
-
pointer-events: none;
|
|
113
|
-
width: 8px;
|
|
114
|
-
z-index: 2;
|
|
115
|
-
background: -webkit-gradient(linear, left, right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1));
|
|
116
|
-
background: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1));
|
|
128
|
+
&.the-table-right-shadow {
|
|
129
|
+
@include mixins.tableRightShadow;
|
|
117
130
|
}
|
|
118
131
|
|
|
119
|
-
&.the-table-left-shadow
|
|
120
|
-
|
|
121
|
-
top: $expand-size * 2 + 10px;
|
|
122
|
-
left: 0;
|
|
123
|
-
content: ' ';
|
|
124
|
-
position: absolute;
|
|
125
|
-
pointer-events: none;
|
|
126
|
-
width: 8px;
|
|
127
|
-
z-index: 2;
|
|
128
|
-
background: -webkit-gradient(linear, right, left, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.1)));
|
|
129
|
-
background: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1));
|
|
130
|
-
|
|
132
|
+
&.the-table-left-shadow {
|
|
133
|
+
@include mixins.tableLeftShadow;
|
|
131
134
|
}
|
|
132
135
|
|
|
133
136
|
&.the-table-with-controls {
|
|
@@ -159,7 +162,7 @@ $control-corner-width: 12px;
|
|
|
159
162
|
left: 44px;
|
|
160
163
|
}
|
|
161
164
|
}
|
|
162
|
-
|
|
165
|
+
|
|
163
166
|
&.the-table-with-controls {
|
|
164
167
|
.the-table-wrapper {
|
|
165
168
|
margin-left: -55px;
|
|
@@ -195,7 +198,6 @@ $control-corner-width: 12px;
|
|
|
195
198
|
}
|
|
196
199
|
|
|
197
200
|
.the-table-with-controls {
|
|
198
|
-
|
|
199
201
|
.the-table-row-controls,
|
|
200
202
|
.the-table-controls-insert-wrapper {
|
|
201
203
|
display: block;
|
|
@@ -234,7 +236,6 @@ $control-corner-width: 12px;
|
|
|
234
236
|
|
|
235
237
|
&.active,
|
|
236
238
|
&.dangerous {
|
|
237
|
-
|
|
238
239
|
&::before,
|
|
239
240
|
&::after {
|
|
240
241
|
content: '';
|
|
@@ -268,6 +269,23 @@ $control-corner-width: 12px;
|
|
|
268
269
|
background: variables.$danger;
|
|
269
270
|
}
|
|
270
271
|
}
|
|
272
|
+
|
|
273
|
+
&.the-sticky-cell {
|
|
274
|
+
&.the-table-left-shadow {
|
|
275
|
+
z-index: $top-cell-z-index;
|
|
276
|
+
@include mixins.tableLeftShadow;
|
|
277
|
+
&:before {
|
|
278
|
+
top: 0;
|
|
279
|
+
left: unset;
|
|
280
|
+
right: -8px;
|
|
281
|
+
height: 100%;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
&.the-top-cell {
|
|
287
|
+
z-index: $top-cell-z-index;
|
|
288
|
+
}
|
|
271
289
|
}
|
|
272
290
|
}
|
|
273
291
|
|
|
@@ -356,7 +374,6 @@ $control-corner-width: 12px;
|
|
|
356
374
|
}
|
|
357
375
|
|
|
358
376
|
&:not(.disabled) {
|
|
359
|
-
|
|
360
377
|
&:hover:after,
|
|
361
378
|
&:hover:before {
|
|
362
379
|
background-color: variables.$white !important;
|
|
@@ -515,9 +532,7 @@ $control-corner-width: 12px;
|
|
|
515
532
|
}
|
|
516
533
|
}
|
|
517
534
|
|
|
518
|
-
|
|
519
535
|
.the-editor-readonly {
|
|
520
|
-
|
|
521
536
|
.the-table-row-controls,
|
|
522
537
|
.the-table-col-controls {
|
|
523
538
|
cursor: default;
|
|
@@ -528,4 +543,4 @@ $control-corner-width: 12px;
|
|
|
528
543
|
top: 0px;
|
|
529
544
|
}
|
|
530
545
|
}
|
|
531
|
-
}
|
|
546
|
+
}
|
|
@@ -58,6 +58,7 @@ export declare class TheTdComponent extends TheBaseElementComponent<TableCellEle
|
|
|
58
58
|
subscribeSelectedCellsChange(): void;
|
|
59
59
|
subscribeDangerousCellsChange(): void;
|
|
60
60
|
subscribeTableChange(): void;
|
|
61
|
+
setColumnClass(): void;
|
|
61
62
|
useState(): void;
|
|
62
63
|
useTablePosition(): void;
|
|
63
64
|
useBackground(): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { ThePluginTableOption } from './table.types';
|
|
3
|
+
import { TableElement } from '../../custom-types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class TableFreezeColumnPipe implements PipeTransform {
|
|
6
|
+
transform(element: TableElement, tablePluginOptions: ThePluginTableOption): boolean;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableFreezeColumnPipe, never>;
|
|
8
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<TableFreezeColumnPipe, "freezeColumn", false>;
|
|
9
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ThePluginTableOption } from './table.types';
|
|
1
2
|
import { TheEditor } from '../../interfaces';
|
|
2
3
|
export declare const withTable: <T extends TheEditor>(editor: T) => T;
|
|
3
|
-
export declare const createTablePlugin: <T = {}>(override?: Partial<import("../../interfaces").ThePlugin<T,
|
|
4
|
+
export declare const createTablePlugin: <T = {}>(override?: Partial<import("../../interfaces").ThePlugin<T, ThePluginTableOption>>, overrideByKey?: import("../../interfaces").OverrideByKey) => import("../../interfaces").ThePlugin<T, ThePluginTableOption>;
|
|
@@ -3,7 +3,12 @@ import { ComponentType } from 'slate-angular';
|
|
|
3
3
|
import { TheBaseElementComponent } from '../../interfaces/view-base';
|
|
4
4
|
import { ElementKinds } from '../../constants/node-types';
|
|
5
5
|
import type { TheTableComponent } from './components/table.component';
|
|
6
|
+
import { Editor, Element } from 'slate';
|
|
7
|
+
import { Observable } from 'rxjs';
|
|
6
8
|
export declare const TheTableToken: InjectionToken<ComponentType<TheTableComponent>>;
|
|
9
|
+
export declare const STICKY_CELL_CLASS = "the-sticky-cell";
|
|
10
|
+
export declare const HEADER_CELL_CLASS = "the-header-cell";
|
|
11
|
+
export declare const TOP_CELL_CLASS = "the-top-cell";
|
|
7
12
|
export interface TheTableComponentBase extends TheBaseElementComponent {
|
|
8
13
|
initializeColumns: () => void;
|
|
9
14
|
transformColumnsWidth: () => void;
|
|
@@ -33,6 +38,12 @@ export interface MenuEntity {
|
|
|
33
38
|
activeHandle?: (event: MouseEvent) => void;
|
|
34
39
|
deactiveHandle?: (event: MouseEvent) => void;
|
|
35
40
|
}
|
|
41
|
+
export interface ThePluginTableOption {
|
|
42
|
+
freezeColumnHeader?: boolean;
|
|
43
|
+
showFullscreen?: boolean;
|
|
44
|
+
setFullscreen?: (editor: Editor, event: MouseEvent, element: Element) => void;
|
|
45
|
+
fullscreenAction?: (editor: Editor) => Observable<boolean>;
|
|
46
|
+
}
|
|
36
47
|
export interface SelectedCell {
|
|
37
48
|
row: number;
|
|
38
49
|
col: number;
|
package/styles/mixins.scss
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
@use 'ngx-tethys/styles/variables.scss';
|
|
2
2
|
@use './variables.scss' as theVariables;
|
|
3
3
|
|
|
4
|
-
@mixin controlSelected {
|
|
5
|
-
background-color: rgba($color: variables.$primary, $alpha: 0.6);
|
|
6
|
-
border-color: variables.$primary;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
@mixin controlDangerous {
|
|
10
|
-
background-color: rgba($color: variables.$danger, $alpha: 0.6);
|
|
11
|
-
border-color: variables.$danger;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
4
|
@mixin the-toolbar-disabled {
|
|
15
5
|
&.disabled {
|
|
16
6
|
cursor: not-allowed;
|