@worktile/theia 15.0.1 → 15.0.3
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/color-select/color-select.component.scss +20 -21
- package/components/column-resize/column-resize.scss +10 -10
- package/components/contextmenu/contextmenu.component.scss +1 -1
- package/components/conversion-hint/conversion-hint.component.scss +1 -1
- package/components/index.scss +1 -1
- package/components/inline-toolbar/inline-toolbar.component.scss +3 -3
- package/components/plugin-menu/plugin-menu.component.scss +5 -3
- package/components/table-select/table-select.component.scss +3 -3
- package/components/toolbar/toolbar.component.scss +5 -5
- package/components/toolbar-dropdown/toolbar-dropdown.component.d.ts +1 -3
- package/components/toolbar-dropdown/toolbar-dropdown.component.scss +5 -5
- package/editor.component.d.ts +1 -1
- package/esm2020/components/color-select/color-select.component.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/listbox/listbox.mjs +4 -4
- 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/toolbar-dropdown/toolbar-dropdown.component.mjs +4 -6
- package/esm2020/components/toolbar-group/toolbar-group.component.mjs +3 -3
- package/esm2020/editor.component.mjs +17 -17
- package/esm2020/interfaces/editor.mjs +1 -1
- package/esm2020/plugins/code/code.component.mjs +3 -3
- package/esm2020/plugins/common/auto-insert-data..mjs +10 -11
- package/esm2020/plugins/image/image.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/quick-insert/components/quick-insert.component.mjs +3 -3
- package/esm2020/plugins/table/components/insert-mark/insert-mark.component.mjs +4 -4
- package/esm2020/plugins/table/components/table.component.mjs +102 -34
- package/esm2020/plugins/table/components/td/td.component.mjs +27 -9
- package/esm2020/plugins/table/components/toolbar/table-toolbar.component.mjs +9 -9
- package/esm2020/plugins/table/table.editor.mjs +4 -4
- package/esm2020/plugins/table/table.plugin.mjs +6 -6
- package/esm2020/plugins/table/table.store.mjs +66 -47
- package/esm2020/plugins/table/table.types.mjs +6 -1
- package/esm2020/plugins/table/utils/is-selection-in-table.mjs +7 -5
- package/esm2020/plugins/table/utils/set-menu-cell-invisibility.mjs +4 -4
- package/esm2020/plugins/vertical-align/toolbar-item.component.mjs +3 -3
- package/esm2020/services/context.service.mjs +1 -1
- package/esm2020/services/table-contextmenu.service.mjs +7 -7
- package/esm2020/utils/dom.mjs +2 -2
- package/esm2020/utils/index.mjs +2 -2
- package/esm2020/utils/scroll-into-view.mjs +38 -0
- package/fesm2015/worktile-theia.mjs +317 -193
- package/fesm2015/worktile-theia.mjs.map +1 -1
- package/fesm2020/worktile-theia.mjs +309 -189
- package/fesm2020/worktile-theia.mjs.map +1 -1
- package/interfaces/editor.d.ts +2 -1
- package/package.json +1 -1
- package/plugins/code/code.component.scss +29 -27
- package/plugins/image/image.component.scss +32 -32
- package/plugins/inline-code/inline-code.component.scss +13 -13
- package/plugins/link/link.component.scss +1 -1
- package/plugins/quick-insert/components/quick-insert.component.scss +2 -2
- package/plugins/table/components/mixins.scss +16 -17
- package/plugins/table/components/table.component.d.ts +11 -1
- package/plugins/table/components/table.component.scss +143 -100
- package/plugins/table/components/td/td.component.d.ts +1 -0
- package/plugins/table/table.store.d.ts +9 -5
- package/plugins/table/table.types.d.ts +5 -0
- package/plugins/table/utils/set-menu-cell-invisibility.d.ts +1 -1
- package/plugins/todo-item/todo-item.component.scss +3 -3
- package/styles/editor.scss +15 -15
- package/styles/mixins.scss +1 -1
- package/styles/typo.scss +34 -34
- package/styles/variables.scss +5 -2
- package/utils/index.d.ts +1 -1
- package/utils/{auto-scroll-view.d.ts → scroll-into-view.d.ts} +1 -1
- package/esm2020/utils/auto-scroll-view.mjs +0 -24
|
@@ -19,41 +19,48 @@ $top-cell-z-index: 13;
|
|
|
19
19
|
.slate-element-table {
|
|
20
20
|
display: block;
|
|
21
21
|
.the-table {
|
|
22
|
-
border-spacing: 0;
|
|
23
|
-
word-wrap: break-word;
|
|
24
22
|
box-sizing: border-box;
|
|
25
|
-
|
|
23
|
+
width: calc(100% - 2px);
|
|
26
24
|
margin: 13px 8px 0 0;
|
|
27
|
-
border-bottom: $controls-border;
|
|
28
|
-
table-layout: fixed;
|
|
29
|
-
overflow: visible;
|
|
30
|
-
margin-left: 0;
|
|
31
25
|
margin-right: 0;
|
|
32
|
-
|
|
26
|
+
margin-left: 0;
|
|
27
|
+
overflow: visible;
|
|
28
|
+
word-wrap: break-word;
|
|
29
|
+
table-layout: fixed;
|
|
30
|
+
border-bottom: $controls-border;
|
|
31
|
+
border-collapse: unset;
|
|
32
|
+
border-spacing: 0;
|
|
33
33
|
|
|
34
34
|
td {
|
|
35
|
+
position: relative;
|
|
36
|
+
padding: 8px;
|
|
37
|
+
vertical-align: top;
|
|
35
38
|
word-wrap: break-word;
|
|
36
39
|
border-top: $controls-border;
|
|
37
40
|
border-right: $controls-border;
|
|
38
|
-
vertical-align: top;
|
|
39
|
-
padding: 8px;
|
|
40
|
-
position: relative;
|
|
41
41
|
cursor: text;
|
|
42
42
|
|
|
43
43
|
&.the-sticky-cell {
|
|
44
|
-
&:after {
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
&:not(.focused-cell):not(.selected-cell):after {
|
|
45
|
+
position: absolute;
|
|
46
|
+
top: 0;
|
|
47
|
+
right: -1px;
|
|
48
|
+
z-index: $top-cell-z-index;
|
|
49
|
+
display: block;
|
|
50
|
+
width: 1px;
|
|
51
|
+
height: 100%;
|
|
52
|
+
background: variables.$gray-300;
|
|
53
|
+
content: '';
|
|
47
54
|
}
|
|
48
55
|
&.the-table-left-shadow {
|
|
49
56
|
z-index: 12;
|
|
50
57
|
@include mixins.tableLeftShadow;
|
|
51
58
|
&:before {
|
|
52
59
|
top: 0;
|
|
53
|
-
left: unset;
|
|
54
60
|
right: -8px;
|
|
55
|
-
|
|
61
|
+
left: unset;
|
|
56
62
|
z-index: 0;
|
|
63
|
+
height: 100%;
|
|
57
64
|
}
|
|
58
65
|
}
|
|
59
66
|
&.the-table-left-shadow.focused-cell {
|
|
@@ -66,6 +73,9 @@ $top-cell-z-index: 13;
|
|
|
66
73
|
&::after {
|
|
67
74
|
@include mixins.cellInset;
|
|
68
75
|
z-index: -1;
|
|
76
|
+
width: unset;
|
|
77
|
+
height: unset;
|
|
78
|
+
background: unset;
|
|
69
79
|
border: 1px solid variables.$primary;
|
|
70
80
|
}
|
|
71
81
|
}
|
|
@@ -80,8 +90,8 @@ $top-cell-z-index: 13;
|
|
|
80
90
|
&::after {
|
|
81
91
|
@include mixins.cellInset;
|
|
82
92
|
z-index: 10;
|
|
83
|
-
border: 1px solid variables.$danger;
|
|
84
93
|
background: rgba($color: variables.$danger, $alpha: 0.1);
|
|
94
|
+
border: 1px solid variables.$danger;
|
|
85
95
|
}
|
|
86
96
|
}
|
|
87
97
|
}
|
|
@@ -92,8 +102,8 @@ $top-cell-z-index: 13;
|
|
|
92
102
|
}
|
|
93
103
|
|
|
94
104
|
.the-header-cell {
|
|
95
|
-
background: $header-cell-bg-color;
|
|
96
105
|
margin-bottom: 0;
|
|
106
|
+
background: $header-cell-bg-color;
|
|
97
107
|
}
|
|
98
108
|
|
|
99
109
|
.the-sticky-cell {
|
|
@@ -119,22 +129,26 @@ $top-cell-z-index: 13;
|
|
|
119
129
|
box-sizing: border-box;
|
|
120
130
|
margin: 0 auto 16px;
|
|
121
131
|
.the-table-wrapper {
|
|
122
|
-
padding-top: 10px;
|
|
123
|
-
margin-top: -10px;
|
|
124
|
-
z-index: 0;
|
|
125
132
|
position: relative;
|
|
133
|
+
z-index: 0;
|
|
134
|
+
margin-top: -10px;
|
|
135
|
+
padding-top: 10px;
|
|
126
136
|
overflow: auto;
|
|
127
137
|
}
|
|
128
138
|
|
|
129
139
|
.the-table-row-controls-wrapper {
|
|
130
140
|
position: absolute;
|
|
131
|
-
left: -$control-width;
|
|
132
141
|
top: 23px;
|
|
133
|
-
|
|
142
|
+
left: -$control-width;
|
|
134
143
|
z-index: 1;
|
|
144
|
+
user-select: none;
|
|
135
145
|
}
|
|
136
146
|
}
|
|
137
147
|
|
|
148
|
+
.header-row-shadow {
|
|
149
|
+
display: none;
|
|
150
|
+
}
|
|
151
|
+
|
|
138
152
|
&:not(.the-table-with-sticky-column) {
|
|
139
153
|
.the-table-container.the-table-right-shadow {
|
|
140
154
|
@include mixins.tableRightShadow;
|
|
@@ -148,15 +162,15 @@ $top-cell-z-index: 13;
|
|
|
148
162
|
|
|
149
163
|
.the-table-with-sticky-row {
|
|
150
164
|
.the-sticky-row {
|
|
151
|
-
padding-top: 8px;
|
|
152
165
|
position: fixed;
|
|
153
|
-
display: grid;
|
|
154
166
|
z-index: 120;
|
|
167
|
+
display: grid;
|
|
155
168
|
grid-auto-flow: column;
|
|
156
169
|
box-sizing: content-box;
|
|
157
|
-
|
|
170
|
+
padding-top: 8px;
|
|
158
171
|
// border-bottom: $controls-border;
|
|
159
172
|
overflow-x: hidden;
|
|
173
|
+
background: variables.$white;
|
|
160
174
|
box-shadow: 0 6px 4px -4px rgba(0, 0, 0, 0.1);
|
|
161
175
|
|
|
162
176
|
td.the-header-cell.selected-cell,
|
|
@@ -167,14 +181,31 @@ $top-cell-z-index: 13;
|
|
|
167
181
|
}
|
|
168
182
|
}
|
|
169
183
|
|
|
184
|
+
.header-row-shadow {
|
|
185
|
+
position: fixed;
|
|
186
|
+
z-index: 121;
|
|
187
|
+
width: 8px;
|
|
188
|
+
background: -webkit-gradient(linear, left, right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1));
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.the-table-container.the-table-right-shadow {
|
|
192
|
+
.header-row-right-shadow {
|
|
193
|
+
background: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1));
|
|
194
|
+
display: block;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
.the-table-container.the-table-left-shadow {
|
|
198
|
+
.header-row-left-shadow {
|
|
199
|
+
background: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1));
|
|
200
|
+
display: block;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
170
204
|
.the-table-col-controls-wrapper.the-sticky-row {
|
|
171
205
|
display: none;
|
|
172
206
|
}
|
|
173
207
|
|
|
174
208
|
&:not(.the-table-with-controls) {
|
|
175
|
-
.the-table {
|
|
176
|
-
margin-top: 0;
|
|
177
|
-
}
|
|
178
209
|
.the-table-numbered {
|
|
179
210
|
.the-table {
|
|
180
211
|
margin-top: 13px;
|
|
@@ -182,23 +213,13 @@ $top-cell-z-index: 13;
|
|
|
182
213
|
}
|
|
183
214
|
}
|
|
184
215
|
|
|
185
|
-
.the-table-row-controls-inner {
|
|
186
|
-
.the-table-row-controls-button-wrap {
|
|
187
|
-
&:first-child {
|
|
188
|
-
position: fixed;
|
|
189
|
-
margin-top: 8px;
|
|
190
|
-
z-index: $top-cell-z-index;
|
|
191
|
-
box-shadow: 0px -8px var(--ds-surface, variables.$gray-80);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
216
|
.the-table-row-controls {
|
|
196
217
|
top: 1px;
|
|
197
218
|
}
|
|
198
219
|
&.the-numberd-table {
|
|
199
220
|
.the-table-row-controls {
|
|
200
|
-
left: 1px;
|
|
201
221
|
top: 1px;
|
|
222
|
+
left: 1px;
|
|
202
223
|
}
|
|
203
224
|
.the-sticky-corner-controls,
|
|
204
225
|
.the-table-row-controls-button-wrap {
|
|
@@ -206,13 +227,26 @@ $top-cell-z-index: 13;
|
|
|
206
227
|
}
|
|
207
228
|
}
|
|
208
229
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
230
|
+
// 聚焦时生效
|
|
231
|
+
&.the-table-with-controls {
|
|
232
|
+
.the-table-row-controls-inner {
|
|
233
|
+
.the-table-row-controls-button-wrap {
|
|
234
|
+
&:first-child {
|
|
235
|
+
position: fixed;
|
|
236
|
+
z-index: $top-cell-z-index;
|
|
237
|
+
margin-top: 8px;
|
|
238
|
+
box-shadow: 0px -8px var(--ds-surface, variables.$gray-80);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
.the-sticky-corner-controls {
|
|
243
|
+
position: fixed;
|
|
244
|
+
z-index: 12;
|
|
245
|
+
width: 11px;
|
|
215
246
|
height: 11px;
|
|
247
|
+
.the-table-corner-button {
|
|
248
|
+
height: 11px;
|
|
249
|
+
}
|
|
216
250
|
}
|
|
217
251
|
}
|
|
218
252
|
}
|
|
@@ -255,9 +289,9 @@ $top-cell-z-index: 13;
|
|
|
255
289
|
|
|
256
290
|
.the-table-col-controls-wrapper .the-table-col-controls {
|
|
257
291
|
background: variables.$gray-100;
|
|
258
|
-
border-right: $controls-border;
|
|
259
|
-
border-top: $controls-border;
|
|
260
292
|
background-clip: padding-box;
|
|
293
|
+
border-top: $controls-border;
|
|
294
|
+
border-right: $controls-border;
|
|
261
295
|
cursor: pointer;
|
|
262
296
|
|
|
263
297
|
&:first-child {
|
|
@@ -284,16 +318,16 @@ $top-cell-z-index: 13;
|
|
|
284
318
|
}
|
|
285
319
|
}
|
|
286
320
|
|
|
287
|
-
&.active,
|
|
321
|
+
&.control-active,
|
|
288
322
|
&.dangerous {
|
|
289
323
|
&::before,
|
|
290
324
|
&::after {
|
|
291
|
-
content: '';
|
|
292
325
|
position: absolute;
|
|
326
|
+
top: -1px;
|
|
293
327
|
width: 1px;
|
|
294
328
|
height: 12px;
|
|
295
329
|
background: variables.$primary;
|
|
296
|
-
|
|
330
|
+
content: '';
|
|
297
331
|
}
|
|
298
332
|
|
|
299
333
|
&::before {
|
|
@@ -305,7 +339,7 @@ $top-cell-z-index: 13;
|
|
|
305
339
|
}
|
|
306
340
|
}
|
|
307
341
|
|
|
308
|
-
&.active {
|
|
342
|
+
&.control-active {
|
|
309
343
|
@include mixins.controlSelected;
|
|
310
344
|
z-index: 11;
|
|
311
345
|
}
|
|
@@ -320,21 +354,29 @@ $top-cell-z-index: 13;
|
|
|
320
354
|
}
|
|
321
355
|
}
|
|
322
356
|
|
|
323
|
-
&.the-sticky-cell {
|
|
324
|
-
&:
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
357
|
+
&.the-sticky-cell:not(.avtive) {
|
|
358
|
+
&:not(.active):not(.danger) {
|
|
359
|
+
&:after {
|
|
360
|
+
position: absolute;
|
|
361
|
+
top: 0;
|
|
362
|
+
right: -1px;
|
|
363
|
+
z-index: $top-cell-z-index;
|
|
364
|
+
display: block;
|
|
365
|
+
width: 1px;
|
|
366
|
+
height: 100%;
|
|
367
|
+
background: variables.$gray-300;
|
|
368
|
+
content: '';
|
|
369
|
+
}
|
|
328
370
|
}
|
|
329
371
|
&.the-table-left-shadow {
|
|
330
372
|
z-index: $top-cell-z-index;
|
|
331
373
|
@include mixins.tableLeftShadow;
|
|
332
374
|
&:before {
|
|
333
375
|
top: 0;
|
|
334
|
-
left: unset;
|
|
335
376
|
right: -8px;
|
|
336
|
-
|
|
377
|
+
left: unset;
|
|
337
378
|
z-index: 0;
|
|
379
|
+
height: 100%;
|
|
338
380
|
}
|
|
339
381
|
}
|
|
340
382
|
}
|
|
@@ -412,45 +454,45 @@ $top-cell-z-index: 13;
|
|
|
412
454
|
.the-table-col-controls-wrapper.the-sticky-row,
|
|
413
455
|
.the-sticky-corner-controls {
|
|
414
456
|
padding-top: 25px;
|
|
415
|
-
box-shadow: none;
|
|
416
|
-
border: none;
|
|
417
457
|
background: variables.$white;
|
|
458
|
+
border: none;
|
|
459
|
+
box-shadow: none;
|
|
418
460
|
}
|
|
419
461
|
}
|
|
420
462
|
}
|
|
421
463
|
|
|
422
464
|
.the-table-corner-controls {
|
|
465
|
+
position: relative;
|
|
423
466
|
width: 100%;
|
|
424
467
|
height: $control-corner-width;
|
|
425
|
-
position: relative;
|
|
426
468
|
visibility: hidden;
|
|
427
469
|
|
|
428
470
|
.the-table-corner-button {
|
|
429
471
|
position: absolute;
|
|
430
472
|
top: 0;
|
|
431
473
|
left: 0;
|
|
474
|
+
box-sizing: border-box;
|
|
432
475
|
width: 100%;
|
|
433
476
|
height: 11px;
|
|
434
|
-
box-sizing: border-box;
|
|
435
|
-
border: $controls-border;
|
|
436
|
-
background: variables.$gray-100;
|
|
437
477
|
padding: 0;
|
|
438
|
-
|
|
478
|
+
background: variables.$gray-100;
|
|
479
|
+
border: $controls-border;
|
|
439
480
|
border-right: none;
|
|
481
|
+
border-bottom: none;
|
|
440
482
|
cursor: pointer;
|
|
441
483
|
}
|
|
442
484
|
|
|
443
485
|
.the-table-corner-controls-insert-row-marker .the-table-controls-insert-wrapper {
|
|
444
|
-
left: -$dot-size;
|
|
445
486
|
top: 2px;
|
|
487
|
+
left: -$dot-size;
|
|
446
488
|
}
|
|
447
489
|
|
|
448
490
|
.the-table-corner-controls-insert-column-marker .the-table-controls-insert-wrapper {
|
|
449
|
-
left: 2px;
|
|
450
491
|
top: -$dot-size;
|
|
492
|
+
left: 2px;
|
|
451
493
|
}
|
|
452
494
|
|
|
453
|
-
&.active {
|
|
495
|
+
&.control-active {
|
|
454
496
|
.the-table-corner-button {
|
|
455
497
|
@include mixins.controlSelected;
|
|
456
498
|
}
|
|
@@ -464,39 +506,39 @@ $top-cell-z-index: 13;
|
|
|
464
506
|
}
|
|
465
507
|
|
|
466
508
|
.the-table-controls-insert-wrapper {
|
|
467
|
-
width: $dot-size;
|
|
468
|
-
height: $dot-size;
|
|
469
509
|
position: absolute;
|
|
470
|
-
cursor: pointer;
|
|
471
|
-
display: none;
|
|
472
510
|
top: -19px;
|
|
473
511
|
right: -10px;
|
|
512
|
+
display: none;
|
|
513
|
+
width: $dot-size;
|
|
514
|
+
height: $dot-size;
|
|
515
|
+
cursor: pointer;
|
|
474
516
|
|
|
475
517
|
&::after,
|
|
476
518
|
&::before {
|
|
477
|
-
content: '';
|
|
478
519
|
position: absolute;
|
|
479
520
|
transform: scale(0.16);
|
|
521
|
+
content: '';
|
|
480
522
|
}
|
|
481
523
|
|
|
482
524
|
&::before {
|
|
483
|
-
background-color: transparent;
|
|
484
|
-
height: $dot-size - $dot-padding-top * 2;
|
|
485
|
-
left: $dot-shadow-top;
|
|
486
525
|
top: $dot-padding-top;
|
|
487
|
-
|
|
526
|
+
left: $dot-shadow-top;
|
|
488
527
|
z-index: 3;
|
|
528
|
+
width: 1px;
|
|
529
|
+
height: $dot-size - $dot-padding-top * 2;
|
|
530
|
+
background-color: transparent;
|
|
489
531
|
}
|
|
490
532
|
|
|
491
533
|
&::after {
|
|
534
|
+
top: 0;
|
|
535
|
+
left: 0;
|
|
536
|
+
width: $dot-size;
|
|
537
|
+
height: $dot-size;
|
|
492
538
|
background-color: #d8d8d8;
|
|
493
539
|
border-radius: math.div($dot-size + 1, 2);
|
|
494
540
|
box-shadow: inset $dot-padding-top 0 0 0 #d8d8d8, inset (-$dot-padding-top) 0 0 0 #d8d8d8, inset 0 (-$dot-shadow-top) 0 0 #d8d8d8,
|
|
495
541
|
inset 0 $dot-shadow-top 0 0 #d8d8d8;
|
|
496
|
-
height: $dot-size;
|
|
497
|
-
left: 0;
|
|
498
|
-
top: 0;
|
|
499
|
-
width: $dot-size;
|
|
500
542
|
}
|
|
501
543
|
|
|
502
544
|
&:not(.disabled) {
|
|
@@ -507,9 +549,9 @@ $top-cell-z-index: 13;
|
|
|
507
549
|
}
|
|
508
550
|
|
|
509
551
|
&:hover:after {
|
|
552
|
+
border-radius: 4px;
|
|
510
553
|
box-shadow: inset $dot-padding-top 0 0 0 variables.$primary, inset (-$dot-padding-top) 0 0 0 variables.$primary,
|
|
511
554
|
inset 0 (-$dot-shadow-top) 0 0 variables.$primary, inset 0 $dot-shadow-top 0 0 variables.$primary !important;
|
|
512
|
-
border-radius: 4px;
|
|
513
555
|
}
|
|
514
556
|
|
|
515
557
|
&:hover:before {
|
|
@@ -519,29 +561,29 @@ $top-cell-z-index: 13;
|
|
|
519
561
|
|
|
520
562
|
.the-table-controls-insert-line {
|
|
521
563
|
position: absolute;
|
|
522
|
-
background-color: variables.$primary;
|
|
523
564
|
z-index: $dot-zIndex;
|
|
565
|
+
background-color: variables.$primary;
|
|
524
566
|
|
|
525
567
|
&[data-dot-type='column'] {
|
|
526
|
-
width: 1px;
|
|
527
568
|
top: $dot-size;
|
|
528
569
|
left: $dot-shadow-top;
|
|
570
|
+
width: 1px;
|
|
529
571
|
}
|
|
530
572
|
|
|
531
573
|
&[data-dot-type='row'] {
|
|
532
|
-
height: 1px;
|
|
533
574
|
bottom: $dot-shadow-top;
|
|
534
575
|
left: $dot-size;
|
|
576
|
+
height: 1px;
|
|
535
577
|
}
|
|
536
578
|
}
|
|
537
579
|
}
|
|
538
580
|
|
|
539
581
|
.the-table-row-controls {
|
|
540
|
-
width: $control-width;
|
|
541
|
-
box-sizing: border-box;
|
|
542
|
-
display: none;
|
|
543
|
-
z-index: 11;
|
|
544
582
|
position: relative;
|
|
583
|
+
z-index: 11;
|
|
584
|
+
display: none;
|
|
585
|
+
box-sizing: border-box;
|
|
586
|
+
width: $control-width;
|
|
545
587
|
|
|
546
588
|
.the-table-row-controls-inner {
|
|
547
589
|
display: flex;
|
|
@@ -554,18 +596,18 @@ $top-cell-z-index: 13;
|
|
|
554
596
|
|
|
555
597
|
.the-table-controls-button {
|
|
556
598
|
display: block;
|
|
557
|
-
outline: none;
|
|
558
|
-
background-color: variables.$gray-100;
|
|
559
599
|
box-sizing: border-box;
|
|
560
|
-
height: 42px;
|
|
561
600
|
width: $control-width;
|
|
601
|
+
height: 42px;
|
|
602
|
+
padding: 0;
|
|
603
|
+
background-color: variables.$gray-100;
|
|
562
604
|
border: 1px solid variables.$gray-300;
|
|
563
605
|
border-right: none;
|
|
564
|
-
|
|
606
|
+
outline: none;
|
|
565
607
|
cursor: pointer;
|
|
566
608
|
}
|
|
567
609
|
|
|
568
|
-
&.active {
|
|
610
|
+
&.control-active {
|
|
569
611
|
z-index: 1;
|
|
570
612
|
|
|
571
613
|
.the-table-controls-button,
|
|
@@ -585,21 +627,22 @@ $top-cell-z-index: 13;
|
|
|
585
627
|
}
|
|
586
628
|
|
|
587
629
|
.the-table-controls-insert-wrapper {
|
|
630
|
+
top: auto;
|
|
588
631
|
bottom: -$dot-shadow-top;
|
|
589
632
|
left: -$dot-size;
|
|
590
|
-
top: auto;
|
|
591
633
|
}
|
|
592
634
|
}
|
|
593
635
|
|
|
594
636
|
.the-table-col-controls-wrapper {
|
|
637
|
+
overflow-y: hidden;
|
|
595
638
|
height: $control-width;
|
|
596
639
|
line-height: $control-width;
|
|
597
640
|
|
|
598
641
|
.the-table-col-controls {
|
|
599
|
-
|
|
642
|
+
position: relative;
|
|
600
643
|
margin: 0;
|
|
644
|
+
padding: 0;
|
|
601
645
|
border: 0;
|
|
602
|
-
position: relative;
|
|
603
646
|
border-top: 1px solid transparent;
|
|
604
647
|
}
|
|
605
648
|
}
|
|
@@ -616,8 +659,8 @@ $top-cell-z-index: 13;
|
|
|
616
659
|
}
|
|
617
660
|
|
|
618
661
|
.the-table-row-controls {
|
|
619
|
-
display: block;
|
|
620
662
|
top: 0px;
|
|
663
|
+
display: block;
|
|
621
664
|
width: 45px;
|
|
622
665
|
margin-left: 10px;
|
|
623
666
|
cursor: pointer;
|
|
@@ -630,9 +673,9 @@ $top-cell-z-index: 13;
|
|
|
630
673
|
}
|
|
631
674
|
|
|
632
675
|
.row-number {
|
|
676
|
+
justify-content: center;
|
|
633
677
|
float: right;
|
|
634
678
|
width: 45px;
|
|
635
|
-
justify-content: center;
|
|
636
679
|
height: 100%;
|
|
637
680
|
margin: 0;
|
|
638
681
|
}
|
|
@@ -77,6 +77,7 @@ export declare class TheTdComponent extends TheBaseElementComponent<TableCellEle
|
|
|
77
77
|
private _showHandleOverlay;
|
|
78
78
|
private updateOverlayHandleSizeAndOffset;
|
|
79
79
|
private updateOverlayHandleColumnSize;
|
|
80
|
+
private getIsStickyTopRow;
|
|
80
81
|
private updateOverlayHandleRowSize;
|
|
81
82
|
private applySize;
|
|
82
83
|
private _createOverlayForHandle;
|
|
@@ -3,7 +3,7 @@ import { Editor } from 'slate';
|
|
|
3
3
|
import { TablePosition } from './utils';
|
|
4
4
|
import { ColorType } from '../../constants/color-select';
|
|
5
5
|
import { CellPosition, TheTableOptions } from './table.types';
|
|
6
|
-
import { TableElement } from '../../custom-types';
|
|
6
|
+
import { TableCellElement, TableElement } from '../../custom-types';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export declare class TableStore {
|
|
9
9
|
private selectedCells$;
|
|
@@ -27,13 +27,17 @@ export declare class TableStore {
|
|
|
27
27
|
isRightClicking: boolean;
|
|
28
28
|
pointerSelection: boolean;
|
|
29
29
|
maxCol: number;
|
|
30
|
-
get
|
|
30
|
+
get selectedCellPositions(): CellPosition[];
|
|
31
31
|
get dangerousCells(): CellPosition[];
|
|
32
32
|
constructor();
|
|
33
33
|
isSelectedAllCell: () => boolean;
|
|
34
34
|
getTableEntry(): import("slate").NodeEntry<TableElement>;
|
|
35
35
|
getTablePath(): import("slate").Path;
|
|
36
|
-
|
|
36
|
+
getSelectedCellPositions(): {
|
|
37
|
+
row: number;
|
|
38
|
+
col: number;
|
|
39
|
+
}[];
|
|
40
|
+
calculateSelectedColumnsAndRowIndex(): void;
|
|
37
41
|
setSelectedCells(cells: CellPosition[], pos: TablePosition): void;
|
|
38
42
|
initEditor(editor: Editor): void;
|
|
39
43
|
/**
|
|
@@ -53,7 +57,7 @@ export declare class TableStore {
|
|
|
53
57
|
getMinAndMaxCellIndex(maxRow: number, maxCol: number, minRow: number, minCol: number, table: TableElement): any;
|
|
54
58
|
selectCell(cell: HTMLTableCellElement, editor: Editor): void;
|
|
55
59
|
getCellPositionsBeforeMerge({ row, col }: CellPosition): CellPosition[];
|
|
56
|
-
selectedCellsChange(): Observable<
|
|
60
|
+
selectedCellsChange(): Observable<TableCellElement[]>;
|
|
57
61
|
cellsPositionChange(): Observable<void>;
|
|
58
62
|
changeCells(): void;
|
|
59
63
|
emitTableChange(): void;
|
|
@@ -67,7 +71,7 @@ export declare class TableStore {
|
|
|
67
71
|
dangerousCellsChange(): Observable<CellPosition[]>;
|
|
68
72
|
setDangerousCells(): void;
|
|
69
73
|
clearDangerousCells(): void;
|
|
70
|
-
dangerousOrSelectedCellsChange(): Observable<CellPosition[]>;
|
|
74
|
+
dangerousOrSelectedCellsChange(): Observable<TableCellElement[] | CellPosition[]>;
|
|
71
75
|
setDangerousRows(): void;
|
|
72
76
|
setDangerousColumns(): void;
|
|
73
77
|
setDangerousTable(): void;
|
|
@@ -22,6 +22,11 @@ export interface TheTableComponentBase extends TheBaseElementComponent {
|
|
|
22
22
|
export declare const BASE_CELL_HEIGHT = 41;
|
|
23
23
|
export declare const BASE_FILL_HEIGHT: number;
|
|
24
24
|
export declare const BASE_CELL_INNER_HEIGHT: number;
|
|
25
|
+
export declare const TABLE_INSERT_MASK = 19;
|
|
26
|
+
export declare const TABLE_BORDER = 1;
|
|
27
|
+
export declare const TABLE_PADDING = 8;
|
|
28
|
+
export declare const TABLE_CONTROL = 11;
|
|
29
|
+
export declare const TableWithStickyRowClass = "the-table-with-sticky-row";
|
|
25
30
|
export interface TheTableColumn {
|
|
26
31
|
width: number;
|
|
27
32
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Editor } from 'slate';
|
|
2
2
|
import { MenuEntity, CellPosition } from '../table.types';
|
|
3
3
|
export declare function setCellMenuVisibility(editor: Editor, menuList: MenuEntity[], tableInfo: {
|
|
4
|
-
|
|
4
|
+
selectedCellPositions: CellPosition[];
|
|
5
5
|
isFullscreen?: boolean;
|
|
6
6
|
isSelectedTable?: boolean;
|
|
7
7
|
selectedRowsIndex?: number[];
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
.the-check-item {
|
|
2
|
+
position: relative;
|
|
2
3
|
height: auto;
|
|
3
|
-
line-height: 24px;
|
|
4
4
|
padding-left: 2em;
|
|
5
|
-
|
|
5
|
+
line-height: 24px;
|
|
6
6
|
|
|
7
7
|
.todo-item-status {
|
|
8
8
|
user-select: none;
|
|
9
9
|
}
|
|
10
10
|
input[type='checkbox'] {
|
|
11
|
+
margin-top: 0;
|
|
11
12
|
margin-right: 5px;
|
|
12
13
|
margin-left: -1.5em;
|
|
13
14
|
transform: translateY(3px);
|
|
14
|
-
margin-top: 0;
|
|
15
15
|
}
|
|
16
16
|
}
|