@worktile/theia 2.3.1 → 2.4.0
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/bundles/worktile-theia.umd.js +274 -196
- package/bundles/worktile-theia.umd.js.map +1 -1
- package/components/column-resize/column-resize.directive.d.ts +2 -2
- package/components/column-resize/column-resize.scss +6 -0
- package/components/column-resize/event-dispatcher.d.ts +7 -1
- package/components/column-resize/resize-ref.d.ts +3 -0
- package/constants/default.d.ts +0 -1
- package/custom-types.d.ts +2 -1
- package/editor.module.d.ts +45 -43
- package/esm2015/components/column-resize/column-resize.directive.js +26 -33
- package/esm2015/components/column-resize/event-dispatcher.js +8 -1
- package/esm2015/components/column-resize/overlay-handle.component.js +3 -3
- package/esm2015/components/column-resize/resize-ref.js +4 -1
- package/esm2015/constants/default.js +1 -1
- package/esm2015/custom-types.js +1 -1
- package/esm2015/editor.module.js +7 -6
- package/esm2015/plugins/index.js +2 -2
- package/esm2015/plugins/inline-code/inline-code.component.js +7 -7
- package/esm2015/plugins/link/link.component.js +11 -24
- package/esm2015/plugins/link/link.plugin.js +3 -4
- package/esm2015/plugins/quick-insert/components/quick-insert.component.js +7 -5
- package/esm2015/plugins/quick-insert/quick-insert.plugin.js +40 -0
- package/esm2015/plugins/table/components/insert-mark/insert-mark.component.js +7 -2
- package/esm2015/plugins/table/components/table.component.js +8 -3
- package/esm2015/plugins/table/components/td/td.component.js +59 -37
- package/esm2015/plugins/table/components/toolbar/table-options.component.js +90 -0
- package/esm2015/plugins/table/components/toolbar/table-toolbar.component.js +26 -7
- package/esm2015/plugins/table/table.service.js +2 -2
- package/esm2015/plugins/table/table.store.js +13 -3
- package/esm2015/plugins/table/table.types.js +1 -1
- package/esm2015/plugins/todo-item/todo-item.component.js +3 -3
- package/esm2015/services/table-contextmenu.service.js +1 -1
- package/esm2015/utils/dom.js +2 -42
- package/fesm2015/worktile-theia.js +280 -183
- package/fesm2015/worktile-theia.js.map +1 -1
- package/package.json +1 -1
- package/plugins/link/link.component.d.ts +2 -8
- package/plugins/link/link.component.scss +0 -2
- package/plugins/quick-insert/{quick-insert.plugint.d.ts → quick-insert.plugin.d.ts} +0 -0
- package/plugins/table/components/table.component.scss +124 -90
- package/plugins/table/components/td/td.component.d.ts +3 -2
- package/plugins/table/components/toolbar/table-options.component.d.ts +20 -0
- package/plugins/table/components/toolbar/table-toolbar.component.d.ts +4 -2
- package/plugins/table/table.store.d.ts +3 -1
- package/plugins/table/table.types.d.ts +10 -0
- package/styles/editor.scss +141 -131
- package/styles/typo.scss +0 -6
- package/utils/dom.d.ts +1 -5
- package/esm2015/plugins/quick-insert/quick-insert.plugint.js +0 -38
package/package.json
CHANGED
|
@@ -5,7 +5,6 @@ import { Editor } from 'slate';
|
|
|
5
5
|
import { LinkElement } from '../../custom-types';
|
|
6
6
|
import { TheBaseElementComponent } from '../../interfaces';
|
|
7
7
|
import { LinkTags } from './link.types';
|
|
8
|
-
import { ThyClickDispatcher } from 'ngx-tethys';
|
|
9
8
|
import { SlateElementContext } from 'slate-angular';
|
|
10
9
|
import * as i0 from "@angular/core";
|
|
11
10
|
export declare class TheBaseLinkComponent extends TheBaseElementComponent<LinkElement, Editor> implements OnInit, OnDestroy {
|
|
@@ -14,12 +13,11 @@ export declare class TheBaseLinkComponent extends TheBaseElementComponent<LinkEl
|
|
|
14
13
|
private thyPopover;
|
|
15
14
|
private overlay;
|
|
16
15
|
private viewContainerRef;
|
|
17
|
-
private thyClickDispatcher;
|
|
18
16
|
thyPopoverHoverRef: ThyPopoverRef<any>;
|
|
19
17
|
thyPopoverEditRef: ThyPopoverRef<any>;
|
|
20
18
|
get linkHoverOpened(): boolean;
|
|
21
19
|
get linkEditOpened(): boolean;
|
|
22
|
-
constructor(elementRef: ElementRef, cdr: ChangeDetectorRef, thyPopover: ThyPopover, overlay: Overlay, viewContainerRef: ViewContainerRef
|
|
20
|
+
constructor(elementRef: ElementRef, cdr: ChangeDetectorRef, thyPopover: ThyPopover, overlay: Overlay, viewContainerRef: ViewContainerRef);
|
|
23
21
|
ngOnInit(): void;
|
|
24
22
|
closeHoverPopover(): void;
|
|
25
23
|
beforeContextChange: (value: SlateElementContext) => void;
|
|
@@ -37,9 +35,5 @@ export declare class TheBaseLinkComponent extends TheBaseElementComponent<LinkEl
|
|
|
37
35
|
export declare class TheLinkComponent extends TheBaseLinkComponent {
|
|
38
36
|
inlineChromiumBugfix: string;
|
|
39
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheLinkComponent, never>;
|
|
40
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheLinkComponent, "
|
|
41
|
-
}
|
|
42
|
-
export declare class TheReadonlyLinkComponent extends TheBaseLinkComponent {
|
|
43
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TheReadonlyLinkComponent, never>;
|
|
44
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheReadonlyLinkComponent, "a[theLink]", never, {}, {}, never, never>;
|
|
38
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheLinkComponent, "a[theLink]", never, {}, {}, never, never>;
|
|
45
39
|
}
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use 'sass:math';
|
|
2
2
|
|
|
3
3
|
$expand-size: 12px;
|
|
4
4
|
$controls-border: 1px solid $gray-300;
|
|
@@ -17,26 +17,23 @@ $control-corner-width: 12px;
|
|
|
17
17
|
border-spacing: 0;
|
|
18
18
|
word-wrap: break-word;
|
|
19
19
|
box-sizing: border-box;
|
|
20
|
-
border-collapse:
|
|
20
|
+
border-collapse: unset;
|
|
21
21
|
margin: 13px 8px 0 0;
|
|
22
|
-
border: $controls-border;
|
|
23
|
-
border-top: none;
|
|
22
|
+
border-bottom: $controls-border;
|
|
24
23
|
table-layout: fixed;
|
|
25
24
|
overflow: visible;
|
|
26
25
|
margin-left: 0;
|
|
27
26
|
margin-right: 0;
|
|
28
|
-
width: 100
|
|
27
|
+
width: calc(100% - 2px);
|
|
29
28
|
|
|
30
29
|
td {
|
|
31
30
|
word-wrap: break-word;
|
|
32
|
-
border: $controls-border;
|
|
33
|
-
border-
|
|
31
|
+
border-top: $controls-border;
|
|
32
|
+
border-right: $controls-border;
|
|
34
33
|
vertical-align: top;
|
|
35
34
|
padding: 8px;
|
|
36
35
|
position: relative;
|
|
37
36
|
cursor: text;
|
|
38
|
-
z-index: 12;
|
|
39
|
-
|
|
40
37
|
&::after {
|
|
41
38
|
display: block;
|
|
42
39
|
position: absolute;
|
|
@@ -77,22 +74,20 @@ $control-corner-width: 12px;
|
|
|
77
74
|
}
|
|
78
75
|
}
|
|
79
76
|
}
|
|
77
|
+
.focused-cell,.selected-cell{
|
|
78
|
+
z-index: 10;
|
|
79
|
+
}
|
|
80
80
|
tbody {
|
|
81
81
|
tr {
|
|
82
82
|
height: 41px;
|
|
83
|
+
td:first-child {
|
|
84
|
+
border-left: $controls-border;
|
|
85
|
+
}
|
|
83
86
|
}
|
|
84
87
|
}
|
|
85
88
|
}
|
|
86
89
|
}
|
|
87
90
|
|
|
88
|
-
// resolve borders not shown in Firefox
|
|
89
|
-
@-moz-document url-prefix() {
|
|
90
|
-
.slate-element-table .the-table {
|
|
91
|
-
td {
|
|
92
|
-
background-clip: padding-box;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
91
|
|
|
97
92
|
.the-table-container {
|
|
98
93
|
position: relative;
|
|
@@ -114,6 +109,7 @@ $control-corner-width: 12px;
|
|
|
114
109
|
left: -$control-width;
|
|
115
110
|
top: 23px;
|
|
116
111
|
user-select: none;
|
|
112
|
+
z-index: 1;
|
|
117
113
|
}
|
|
118
114
|
|
|
119
115
|
&.the-table-selection-hide ::selection {
|
|
@@ -122,59 +118,87 @@ $control-corner-width: 12px;
|
|
|
122
118
|
}
|
|
123
119
|
|
|
124
120
|
.the-table-with-controls {
|
|
125
|
-
|
|
126
|
-
.the-table-corner-controls,
|
|
127
121
|
.the-table-row-controls,
|
|
128
122
|
.the-table-controls-insert-wrapper {
|
|
129
123
|
display: block;
|
|
130
124
|
}
|
|
131
125
|
|
|
132
126
|
.the-table-col-controls-wrapper .the-table-col-controls {
|
|
127
|
+
background: $gray-100;
|
|
133
128
|
border-right: $controls-border;
|
|
134
129
|
border-top: $controls-border;
|
|
135
|
-
background:
|
|
136
|
-
|
|
137
|
-
&:first-child {
|
|
130
|
+
background-clip: padding-box;
|
|
131
|
+
&:first-child{
|
|
138
132
|
border-left: $controls-border;
|
|
139
133
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
134
|
+
&:last-child {
|
|
135
|
+
.the-table-controls-insert-wrapper {
|
|
136
|
+
right: 0;
|
|
137
|
+
&:after {
|
|
138
|
+
left: 9px;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
.the-table-controls-insert-wrapper:hover {
|
|
142
|
+
&:after {
|
|
143
|
+
left: 0;
|
|
144
|
+
}
|
|
145
|
+
.the-table-controls-insert-line[data-dot-type='column'] {
|
|
146
|
+
left: $dot-size;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
&.active, &.dangerous {
|
|
151
|
+
&::before, &::after{
|
|
152
|
+
content: '';
|
|
153
|
+
position: absolute;
|
|
154
|
+
width: 1px;
|
|
155
|
+
height: 12px;
|
|
156
|
+
background: $primary;
|
|
157
|
+
top: -1px;
|
|
158
|
+
}
|
|
159
|
+
&::before{
|
|
160
|
+
left: -1px;
|
|
148
161
|
}
|
|
162
|
+
&::after{
|
|
163
|
+
right: -1px;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
&.active {
|
|
167
|
+
@include controlSelected;
|
|
168
|
+
z-index: 11;
|
|
169
|
+
}
|
|
149
170
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
171
|
+
&.dangerous {
|
|
172
|
+
@include controlDangerous;
|
|
173
|
+
z-index: 11;
|
|
174
|
+
&::before, &::after{
|
|
175
|
+
background: $danger;
|
|
153
176
|
}
|
|
154
177
|
}
|
|
155
178
|
}
|
|
156
179
|
}
|
|
157
180
|
|
|
158
181
|
.the-table-corner-controls {
|
|
159
|
-
width:
|
|
182
|
+
width: 100%;
|
|
160
183
|
height: $control-corner-width;
|
|
161
|
-
display: none;
|
|
162
184
|
|
|
163
185
|
.the-table-corner-button {
|
|
164
186
|
position: absolute;
|
|
165
187
|
top: 0;
|
|
166
|
-
|
|
188
|
+
left: 0;
|
|
189
|
+
width: 100%;
|
|
167
190
|
height: $control-corner-width;
|
|
168
191
|
box-sizing: border-box;
|
|
169
192
|
border: $controls-border;
|
|
170
193
|
background: $gray-100;
|
|
171
194
|
padding: 0;
|
|
195
|
+
border-bottom: none;
|
|
196
|
+
border-right: none;
|
|
172
197
|
cursor: pointer;
|
|
173
198
|
}
|
|
174
199
|
|
|
175
200
|
&.active {
|
|
176
201
|
z-index: 1;
|
|
177
|
-
|
|
178
202
|
.the-table-corner-button {
|
|
179
203
|
@include controlSelected;
|
|
180
204
|
}
|
|
@@ -182,7 +206,6 @@ $control-corner-width: 12px;
|
|
|
182
206
|
|
|
183
207
|
&.dangerous {
|
|
184
208
|
z-index: 1;
|
|
185
|
-
|
|
186
209
|
.the-table-corner-button {
|
|
187
210
|
@include controlDangerous;
|
|
188
211
|
}
|
|
@@ -226,7 +249,6 @@ $control-corner-width: 12px;
|
|
|
226
249
|
}
|
|
227
250
|
|
|
228
251
|
&:not(.disabled) {
|
|
229
|
-
|
|
230
252
|
&:hover:after,
|
|
231
253
|
&:hover:before {
|
|
232
254
|
background-color: $white !important;
|
|
@@ -265,6 +287,7 @@ $control-corner-width: 12px;
|
|
|
265
287
|
|
|
266
288
|
.the-table-corner-controls {
|
|
267
289
|
position: relative;
|
|
290
|
+
visibility: hidden;
|
|
268
291
|
|
|
269
292
|
.the-table-corner-controls-insert-row-marker .the-table-controls-insert-wrapper {
|
|
270
293
|
left: -$dot-size;
|
|
@@ -281,6 +304,7 @@ $control-corner-width: 12px;
|
|
|
281
304
|
width: $control-width;
|
|
282
305
|
box-sizing: border-box;
|
|
283
306
|
display: none;
|
|
307
|
+
z-index: 11;
|
|
284
308
|
position: relative;
|
|
285
309
|
|
|
286
310
|
.the-table-row-controls-inner {
|
|
@@ -291,13 +315,12 @@ $control-corner-width: 12px;
|
|
|
291
315
|
.the-table-row-controls-button-wrap {
|
|
292
316
|
position: relative;
|
|
293
317
|
margin-top: -1px;
|
|
294
|
-
|
|
295
318
|
.the-table-controls-button {
|
|
296
319
|
display: block;
|
|
320
|
+
background-color: $gray-100;
|
|
297
321
|
box-sizing: border-box;
|
|
298
322
|
height: 42px;
|
|
299
323
|
width: $control-width;
|
|
300
|
-
background: $gray-100;
|
|
301
324
|
border: 1px solid $gray-300;
|
|
302
325
|
border-right: none;
|
|
303
326
|
padding: 0;
|
|
@@ -306,8 +329,8 @@ $control-corner-width: 12px;
|
|
|
306
329
|
|
|
307
330
|
&.active {
|
|
308
331
|
z-index: 1;
|
|
309
|
-
|
|
310
|
-
.the-table-controls-button {
|
|
332
|
+
.the-table-controls-button,
|
|
333
|
+
.the-table-numbered-controls-button {
|
|
311
334
|
@include controlSelected;
|
|
312
335
|
}
|
|
313
336
|
}
|
|
@@ -315,7 +338,8 @@ $control-corner-width: 12px;
|
|
|
315
338
|
&.dangerous {
|
|
316
339
|
z-index: 1;
|
|
317
340
|
|
|
318
|
-
.the-table-controls-button
|
|
341
|
+
.the-table-controls-button,
|
|
342
|
+
.the-table-numbered-controls-button {
|
|
319
343
|
@include controlDangerous;
|
|
320
344
|
}
|
|
321
345
|
}
|
|
@@ -361,57 +385,67 @@ $control-corner-width: 12px;
|
|
|
361
385
|
margin: 0;
|
|
362
386
|
border: 0;
|
|
363
387
|
position: relative;
|
|
388
|
+
cursor: pointer;
|
|
389
|
+
border-top: 1px solid transparent;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
.table-options {
|
|
393
|
+
background: transparent;
|
|
394
|
+
margin-right: 5px;
|
|
395
|
+
color: $gray-600;
|
|
396
|
+
&:hover {
|
|
397
|
+
background: rgba($primary, 0.1);
|
|
398
|
+
color: $primary;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
.table-options-active {
|
|
402
|
+
background: rgba($primary, 0.1);
|
|
403
|
+
color: $primary;
|
|
404
|
+
}
|
|
405
|
+
.table-options-pannel {
|
|
406
|
+
.thy-popover-container {
|
|
407
|
+
min-width: 200px;
|
|
408
|
+
}
|
|
409
|
+
.action-menu {
|
|
410
|
+
width: 200px;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
364
413
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
content: '';
|
|
368
|
-
position: absolute;
|
|
369
|
-
top: -0.5px;
|
|
370
|
-
background: $white;
|
|
371
|
-
width: 1px;
|
|
372
|
-
height: 11px;
|
|
373
|
-
}
|
|
414
|
+
.the-numbered-column-container {
|
|
415
|
+
padding-left: 44px;
|
|
374
416
|
|
|
375
|
-
|
|
376
|
-
|
|
417
|
+
.the-table-row-controls {
|
|
418
|
+
display: block;
|
|
419
|
+
top: 0px;
|
|
420
|
+
width: 45px;
|
|
421
|
+
margin-left: 10px;
|
|
422
|
+
cursor: pointer;
|
|
423
|
+
.the-table-numbered-controls-button {
|
|
424
|
+
background-color: $gray-100;
|
|
425
|
+
border: $controls-border;
|
|
426
|
+
border-right: none;
|
|
377
427
|
}
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
&:after {
|
|
388
|
-
left: 9px;
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
.the-table-controls-insert-wrapper:hover {
|
|
393
|
-
&:after {
|
|
394
|
-
left: 0;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
.the-table-controls-insert-line[data-dot-type='column'] {
|
|
398
|
-
left: $dot-size;
|
|
399
|
-
}
|
|
400
|
-
}
|
|
428
|
+
}
|
|
429
|
+
.the-table-focus {
|
|
430
|
+
.the-table-row-controls {
|
|
431
|
+
width: 55px;
|
|
432
|
+
margin-left: 0;
|
|
433
|
+
}
|
|
434
|
+
.the-table-corner-controls-insert-column-marker .the-table-controls-insert-wrapper {
|
|
435
|
+
left: 46px;
|
|
401
436
|
}
|
|
402
437
|
}
|
|
438
|
+
.row-number {
|
|
439
|
+
float: right;
|
|
440
|
+
width: 45px;
|
|
441
|
+
justify-content: center;
|
|
442
|
+
height: 100%;
|
|
443
|
+
margin: 0;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
403
446
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
top: -1px;
|
|
408
|
-
right: -1px;
|
|
409
|
-
left: -1px;
|
|
410
|
-
bottom: -1px;
|
|
411
|
-
border: 1px solid $white;
|
|
412
|
-
z-index: 2;
|
|
413
|
-
cursor: pointer;
|
|
414
|
-
display: none;
|
|
415
|
-
outline: 0;
|
|
447
|
+
.safari{
|
|
448
|
+
.the-table-row-controls{
|
|
449
|
+
top: 1px;
|
|
416
450
|
}
|
|
417
451
|
}
|
|
@@ -4,7 +4,7 @@ import { TheTableComponent } from '../table.component';
|
|
|
4
4
|
import { TablePosition } from '../../utils/table-position';
|
|
5
5
|
import { Subject } from 'rxjs';
|
|
6
6
|
import { ColumnResizingStore } from '../../../../components/column-resize/resizing.store';
|
|
7
|
-
import { TableCellEventDispatcher } from '../../../../components/column-resize/event-dispatcher';
|
|
7
|
+
import { Position, TableCellEventDispatcher } from '../../../../components/column-resize/event-dispatcher';
|
|
8
8
|
import { ColumnResizeNotifierSource } from '../../../../components/column-resize/column-resize-notifier';
|
|
9
9
|
import { ConnectedPosition, Overlay, OverlayRef, ScrollDispatcher } from '@angular/cdk/overlay';
|
|
10
10
|
import { ResizeRef } from '../../../../components/column-resize/resize-ref';
|
|
@@ -29,7 +29,7 @@ export declare class TheTdComponent extends TheBaseElementComponent<TableCellEle
|
|
|
29
29
|
tablePosition: TablePosition;
|
|
30
30
|
tableComponent: TheTableComponent;
|
|
31
31
|
protected overlayRef?: OverlayRef;
|
|
32
|
-
hoverdDirection:
|
|
32
|
+
hoverdDirection: Position | null;
|
|
33
33
|
tableOptions: TableOptions;
|
|
34
34
|
cellInnerMinHeight: number;
|
|
35
35
|
get tableStore(): import("../../table.store").TableStore;
|
|
@@ -41,6 +41,7 @@ export declare class TheTdComponent extends TheBaseElementComponent<TableCellEle
|
|
|
41
41
|
get scrollableElementTop(): number;
|
|
42
42
|
get scrollableElementLeft(): any;
|
|
43
43
|
get isXAxisHover(): boolean;
|
|
44
|
+
get rowResizeClass(): string[];
|
|
44
45
|
dotWrapperHovered: boolean;
|
|
45
46
|
resizeRef: ResizeRef;
|
|
46
47
|
backgroundColor: string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { ThyPopoverRef } from 'ngx-tethys';
|
|
3
|
+
import { Editor } from 'slate';
|
|
4
|
+
import { TableStore } from '../../table.store';
|
|
5
|
+
import { TableDropdownOption } from '../../table.types';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class TheTableOptionsComponent implements OnInit {
|
|
8
|
+
private popoverRef;
|
|
9
|
+
tableStore: TableStore;
|
|
10
|
+
editor: Editor;
|
|
11
|
+
get table(): import("@worktile/theia").TableElement;
|
|
12
|
+
tableDropdownList: TableDropdownOption[];
|
|
13
|
+
handleDocumentMouseDown(event: MouseEvent): void;
|
|
14
|
+
constructor(popoverRef: ThyPopoverRef<TheTableOptionsComponent>);
|
|
15
|
+
ngOnInit(): void;
|
|
16
|
+
setColumnOptions(): void;
|
|
17
|
+
setTableOptions(event: MouseEvent, option: TableDropdownOption): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TheTableOptionsComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheTableOptionsComponent, "the-table-options", never, { "tableStore": "tableStore"; "editor": "editor"; }, {}, never, never>;
|
|
20
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnInit, NgZone, OnDestroy } from '@angular/core';
|
|
2
|
-
import { ThyPopoverRef } from 'ngx-tethys/popover';
|
|
2
|
+
import { ThyPopover, ThyPopoverRef } from 'ngx-tethys/popover';
|
|
3
3
|
import { Editor } from 'slate';
|
|
4
4
|
import { TableStore } from '../../table.store';
|
|
5
5
|
import { TheColorSelectService } from '../../../../services/color-select.service';
|
|
@@ -8,6 +8,7 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
export declare class TheTableToolbarComponent implements OnInit, OnDestroy {
|
|
9
9
|
private ngZone;
|
|
10
10
|
private colorSelectService;
|
|
11
|
+
private thyPopover;
|
|
11
12
|
private popoverRef;
|
|
12
13
|
selectedColor: string;
|
|
13
14
|
deleteIcon: string;
|
|
@@ -17,7 +18,7 @@ export declare class TheTableToolbarComponent implements OnInit, OnDestroy {
|
|
|
17
18
|
get editor(): Editor;
|
|
18
19
|
cellMenuList: MenuEntity[];
|
|
19
20
|
get isShowSplitLine(): boolean;
|
|
20
|
-
constructor(ngZone: NgZone, colorSelectService: TheColorSelectService, popoverRef: ThyPopoverRef<TheTableToolbarComponent>);
|
|
21
|
+
constructor(ngZone: NgZone, colorSelectService: TheColorSelectService, thyPopover: ThyPopover, popoverRef: ThyPopoverRef<TheTableToolbarComponent>);
|
|
21
22
|
ngOnInit(): void;
|
|
22
23
|
ngOnDestroy(): void;
|
|
23
24
|
getIconName(key: string): void;
|
|
@@ -26,6 +27,7 @@ export declare class TheTableToolbarComponent implements OnInit, OnDestroy {
|
|
|
26
27
|
onEnterDelete(event: MouseEvent): void;
|
|
27
28
|
onLeaveDelete(event: MouseEvent): void;
|
|
28
29
|
openSelectColor(event: MouseEvent): void;
|
|
30
|
+
openTableOptionMenu(event: Event): void;
|
|
29
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheTableToolbarComponent, never>;
|
|
30
32
|
static ɵcmp: i0.ɵɵComponentDeclaration<TheTableToolbarComponent, "the-table-toolbar", never, { "tableStore": "tableStore"; "isActiveSelect": "isActiveSelect"; }, {}, never, never>;
|
|
31
33
|
}
|
|
@@ -2,7 +2,7 @@ import { Observable } from 'rxjs';
|
|
|
2
2
|
import { Editor } from 'slate';
|
|
3
3
|
import { TablePosition } from './utils';
|
|
4
4
|
import { ColorType } from '../../constants/color-select';
|
|
5
|
-
import { SelectedCell } from './table.types';
|
|
5
|
+
import { SelectedCell, TheTableOptions } from './table.types';
|
|
6
6
|
import { TableElement } from '../../custom-types';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export declare class TableStore {
|
|
@@ -27,6 +27,7 @@ export declare class TableStore {
|
|
|
27
27
|
get selectedCells(): SelectedCell[];
|
|
28
28
|
get dangerousCells(): SelectedCell[];
|
|
29
29
|
constructor();
|
|
30
|
+
getTableEntry(editor: Editor): import("slate").NodeEntry<TableElement>;
|
|
30
31
|
getTablePath(editor: Editor): import("slate").Path;
|
|
31
32
|
getTablePosition(editor: Editor): TablePosition;
|
|
32
33
|
setSelectedCells(cells: SelectedCell[], pos: TablePosition): void;
|
|
@@ -60,6 +61,7 @@ export declare class TableStore {
|
|
|
60
61
|
getSelectedCellBackgroundColor(): string;
|
|
61
62
|
clearSelectedCellsContent(): void;
|
|
62
63
|
mergeCell(editor: Editor): void;
|
|
64
|
+
setTableOptions(editor: Editor, options: TheTableOptions): void;
|
|
63
65
|
removeDangerousColumns(): void;
|
|
64
66
|
removeDangerousRows(): void;
|
|
65
67
|
createTablePosition(): TablePosition;
|
|
@@ -16,6 +16,11 @@ export declare const BASE_CELL_INNER_HEIGHT: number;
|
|
|
16
16
|
export interface TheTableColumn {
|
|
17
17
|
width: number;
|
|
18
18
|
}
|
|
19
|
+
export interface TheTableOptions {
|
|
20
|
+
headerRow?: boolean;
|
|
21
|
+
headerColumn?: boolean;
|
|
22
|
+
numberedColumn?: boolean;
|
|
23
|
+
}
|
|
19
24
|
export interface MenuEntity {
|
|
20
25
|
icon: string;
|
|
21
26
|
name: string;
|
|
@@ -32,6 +37,11 @@ export interface SelectedCell {
|
|
|
32
37
|
row: number;
|
|
33
38
|
col: number;
|
|
34
39
|
}
|
|
40
|
+
export interface TableDropdownOption {
|
|
41
|
+
name: string;
|
|
42
|
+
key: string;
|
|
43
|
+
isActive?: boolean;
|
|
44
|
+
}
|
|
35
45
|
export interface TableOptionsFormat {
|
|
36
46
|
typeTable?: ElementKinds.table;
|
|
37
47
|
typeRow?: ElementKinds.tableRow;
|