@worktile/theia 2.4.1 → 2.4.4
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 +1117 -1034
- package/bundles/worktile-theia.umd.js.map +1 -1
- package/constants/auto-format-rules.d.ts +1 -1
- package/editor.module.d.ts +2 -1
- package/esm2015/constants/auto-format-rules.js +3 -2
- package/esm2015/editor.component.js +5 -2
- package/esm2015/interfaces/auto-format.js +1 -1
- package/esm2015/interfaces/editor.js +1 -1
- package/esm2015/plugins/autoformat/autoformat.plugin.js +23 -6
- package/esm2015/plugins/indent/indent.editor.js +11 -13
- package/esm2015/plugins/indent/indent.plugin.js +15 -2
- package/esm2015/plugins/indent/on-keydown-indent.js +3 -5
- package/esm2015/plugins/index.js +2 -3
- package/esm2015/plugins/quick-insert/components/quick-insert.component.js +6 -2
- package/esm2015/plugins/quick-insert/components/quick-toolbar/quick-toolbar.component.js +14 -15
- package/esm2015/plugins/quick-insert/quick-insert.editor.js +18 -27
- package/esm2015/plugins/quick-insert/quick-insert.plugin.js +33 -15
- package/esm2015/plugins/table/components/insert-mark/insert-mark.component.js +4 -4
- package/esm2015/plugins/table/components/table.component.js +2 -2
- package/esm2015/plugins/table/components/td/td.component.js +5 -7
- package/esm2015/plugins/table/table.service.js +6 -6
- package/esm2015/plugins/todo-item/todo-item.component.js +15 -7
- package/esm2015/transforms/index.js +3 -2
- package/esm2015/transforms/insert-element-next.js +1 -1
- package/esm2015/transforms/insert-element-node.js +36 -0
- package/esm2015/utils/is-clean-empty-paragraph.js +4 -1
- package/fesm2015/worktile-theia.js +1054 -969
- package/fesm2015/worktile-theia.js.map +1 -1
- package/interfaces/auto-format.d.ts +1 -0
- package/interfaces/editor.d.ts +14 -1
- package/package.json +1 -1
- package/plugins/autoformat/autoformat.plugin.d.ts +1 -2
- package/plugins/indent/indent.plugin.d.ts +1 -0
- package/plugins/indent/on-keydown-indent.d.ts +1 -1
- package/plugins/quick-insert/components/quick-toolbar/quick-toolbar.component.d.ts +3 -4
- package/plugins/quick-insert/quick-insert.editor.d.ts +3 -4
- package/plugins/quick-insert/quick-insert.plugin.d.ts +2 -0
- package/plugins/table/components/table.component.scss +43 -42
- package/plugins/todo-item/todo-item.component.d.ts +3 -1
- package/transforms/index.d.ts +2 -1
- package/transforms/insert-element-node.d.ts +2 -0
- package/utils/is-clean-empty-paragraph.d.ts +2 -1
|
@@ -31,6 +31,7 @@ export interface AutoFormatRule {
|
|
|
31
31
|
* - inline – insert mark between markups. Should be used with `between`.
|
|
32
32
|
*/
|
|
33
33
|
mode?: 'block' | 'inline';
|
|
34
|
+
key?: string;
|
|
34
35
|
/**
|
|
35
36
|
* When using `inline` mode – if false, do not format when the string can be trimmed.
|
|
36
37
|
*/
|
package/interfaces/editor.d.ts
CHANGED
|
@@ -4,13 +4,18 @@ import { HistoryEditor } from 'slate-history';
|
|
|
4
4
|
import { ElementOptionsInfo } from './valid-children-types';
|
|
5
5
|
import { Predicate } from '../utils/match';
|
|
6
6
|
import { ToolbarOption } from './toolbar';
|
|
7
|
-
import { FontSizes } from '../constants/node-types';
|
|
7
|
+
import { ElementKinds, FontSizes } from '../constants/node-types';
|
|
8
|
+
import { AutoFormatRule } from './auto-format';
|
|
9
|
+
import { CustomElementKinds } from '../custom-types';
|
|
8
10
|
export interface TheEditor extends AngularEditor, HistoryEditor {
|
|
9
11
|
renderElement: (element: Element) => ViewType;
|
|
10
12
|
renderLeaf: (text: Text) => ViewType;
|
|
11
13
|
insertElement: (element: Element) => void;
|
|
12
14
|
isContainer: (element: Element) => boolean;
|
|
13
15
|
extraElementOptions: ElementOptionsInfo[];
|
|
16
|
+
extraAutoFormatRules: AutoFormatRule[];
|
|
17
|
+
extraIndentOptions: IndentOptions;
|
|
18
|
+
options: TheOptions;
|
|
14
19
|
disabled: boolean;
|
|
15
20
|
[key: string]: any;
|
|
16
21
|
}
|
|
@@ -66,6 +71,7 @@ export declare enum TheDataMode {
|
|
|
66
71
|
html = "html"
|
|
67
72
|
}
|
|
68
73
|
export interface TheOptions {
|
|
74
|
+
triggerQuickToolbarTypes?: CustomElementKinds[];
|
|
69
75
|
mode?: TheDataMode;
|
|
70
76
|
readonly?: boolean;
|
|
71
77
|
disabled?: boolean;
|
|
@@ -81,12 +87,19 @@ export interface TheOptions {
|
|
|
81
87
|
toolbar?: ToolbarOption;
|
|
82
88
|
disablePlugins?: string[];
|
|
83
89
|
extraElementOptions?: ElementOptionsInfo[];
|
|
90
|
+
extraAutoFormatRules?: AutoFormatRule[];
|
|
91
|
+
extraIndentOptions?: IndentOptions;
|
|
92
|
+
noBindReadonlyPlugins?: (ElementKinds | string)[];
|
|
84
93
|
}
|
|
85
94
|
export declare type NodeMatch<T = Node> = Predicate<T>;
|
|
86
95
|
export interface MatchOptions<T = Node> {
|
|
87
96
|
match?: NodeMatch<T>;
|
|
88
97
|
block?: boolean;
|
|
89
98
|
}
|
|
99
|
+
export interface IndentOptions {
|
|
100
|
+
indentTypes?: CustomElementKinds[];
|
|
101
|
+
disabledIndentTypes?: CustomElementKinds[];
|
|
102
|
+
}
|
|
90
103
|
export interface EditorAboveOptions<T = Ancestor> extends MatchOptions<T> {
|
|
91
104
|
at?: Range | Path | Point;
|
|
92
105
|
mode?: 'highest' | 'lowest';
|
package/package.json
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const withAutoFormat: ({ rules }: WithAutoFormatOptions) => <T extends import("@worktile/theia").TheEditor>(editor: T) => T;
|
|
1
|
+
export declare const withAutoFormat: () => <T extends import("@worktile/theia").TheEditor>(editor: T) => T;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { CustomElementKinds } from '../../custom-types';
|
|
2
2
|
import { TheEditor } from '../../interfaces/editor';
|
|
3
3
|
export declare const withIndent: (kinds: CustomElementKinds[]) => <T extends TheEditor>(editor: T) => T;
|
|
4
|
+
export declare const mergIndentTypes: (defaultTypes: CustomElementKinds[], indentTypes: CustomElementKinds[]) => CustomElementKinds[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Editor } from 'slate';
|
|
2
2
|
import { CustomElementKinds } from '../../custom-types';
|
|
3
|
-
export declare const onKeydownTextIndent: (editor: Editor, event: KeyboardEvent, kinds: CustomElementKinds[]) => boolean;
|
|
3
|
+
export declare const onKeydownTextIndent: (editor: Editor, event: KeyboardEvent, kinds: CustomElementKinds[], textIndentDisabled: CustomElementKinds[]) => boolean;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { OnInit, OnDestroy, ElementRef } from '@angular/core';
|
|
1
|
+
import { OnInit, OnDestroy, ElementRef, ChangeDetectorRef } from '@angular/core';
|
|
2
2
|
import { MixinBase } from 'ngx-tethys/core';
|
|
3
|
-
import { ThyPopoverRef } from 'ngx-tethys/popover';
|
|
4
3
|
import { Editor } from 'slate';
|
|
5
4
|
import { ToolbarItem } from '../../../../interfaces/toolbar';
|
|
6
5
|
import { ToolbarActionTypes } from '../../../../constants/node-types';
|
|
@@ -8,8 +7,8 @@ import { ToolbarItemMode } from '../../../../constants/toolbar';
|
|
|
8
7
|
import * as i0 from "@angular/core";
|
|
9
8
|
declare const TheQuickToolbarComponent_base: import("ngx-tethys/core").Constructor<import("ngx-tethys/core").ThyUnsubscribe> & typeof MixinBase;
|
|
10
9
|
export declare class TheQuickToolbarComponent extends TheQuickToolbarComponent_base implements OnInit, OnDestroy {
|
|
11
|
-
private popoverRef;
|
|
12
10
|
elementRef: ElementRef;
|
|
11
|
+
cdr: ChangeDetectorRef;
|
|
13
12
|
editor: Editor;
|
|
14
13
|
quickToolbarItems: ToolbarItem[];
|
|
15
14
|
editorElement: HTMLElement;
|
|
@@ -18,7 +17,7 @@ export declare class TheQuickToolbarComponent extends TheQuickToolbarComponent_b
|
|
|
18
17
|
handleMouseDown(event: MouseEvent): void;
|
|
19
18
|
handleEnter(): void;
|
|
20
19
|
handleEsc(): void;
|
|
21
|
-
constructor(
|
|
20
|
+
constructor(elementRef: ElementRef, cdr: ChangeDetectorRef);
|
|
22
21
|
ngOnInit(): void;
|
|
23
22
|
stopPropagation(event: any): void;
|
|
24
23
|
selectionChange(event: any): void;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
2
1
|
import { Editor } from 'slate';
|
|
3
2
|
import { ToolbarItem } from '../../interfaces/toolbar';
|
|
4
3
|
export declare const QuickInsertEditor: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
openQuickInsertToolbar(editor: Editor, quickToolbarItems: ToolbarItem[], origin?: HTMLElement): void;
|
|
5
|
+
closeQuickInsertToolbar(editor: Editor): void;
|
|
6
|
+
isOpenedToolbar(editor: Editor): boolean;
|
|
8
7
|
};
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { Editor } from 'slate';
|
|
2
|
+
import { ElementKinds } from '../../constants';
|
|
2
3
|
export declare const withQuickInsert: (editor: Editor) => import("@worktile/theia").TheEditor;
|
|
4
|
+
export declare const allowOpenQuickToolbar: (editor: Editor, allowTypes: ElementKinds[]) => boolean;
|
|
@@ -13,7 +13,7 @@ $control-corner-width: 12px;
|
|
|
13
13
|
|
|
14
14
|
.slate-element-table {
|
|
15
15
|
display: block;
|
|
16
|
-
.the-table {
|
|
16
|
+
.the-temp-table {
|
|
17
17
|
border-spacing: 0;
|
|
18
18
|
word-wrap: break-word;
|
|
19
19
|
box-sizing: border-box;
|
|
@@ -89,12 +89,12 @@ $control-corner-width: 12px;
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
.the-table-container {
|
|
92
|
+
.the-temp-table-container {
|
|
93
93
|
position: relative;
|
|
94
94
|
box-sizing: border-box;
|
|
95
95
|
margin: 0 auto 16px;
|
|
96
96
|
|
|
97
|
-
.the-table-wrapper {
|
|
97
|
+
.the-temp-table-wrapper {
|
|
98
98
|
padding-top: 10px;
|
|
99
99
|
margin-top: -10px;
|
|
100
100
|
padding-bottom: 15px;
|
|
@@ -104,7 +104,7 @@ $control-corner-width: 12px;
|
|
|
104
104
|
overflow: auto;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
.the-table-row-controls-wrapper {
|
|
107
|
+
.the-temp-table-row-controls-wrapper {
|
|
108
108
|
position: absolute;
|
|
109
109
|
left: -$control-width;
|
|
110
110
|
top: 23px;
|
|
@@ -112,18 +112,18 @@ $control-corner-width: 12px;
|
|
|
112
112
|
z-index: 1;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
&.the-table-selection-hide ::selection {
|
|
115
|
+
&.the-temp-table-selection-hide ::selection {
|
|
116
116
|
background: transparent;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
.the-table-with-controls {
|
|
121
|
-
.the-table-row-controls,
|
|
122
|
-
.the-table-controls-insert-wrapper {
|
|
120
|
+
.the-temp-table-with-controls {
|
|
121
|
+
.the-temp-table-row-controls,
|
|
122
|
+
.the-temp-table-controls-insert-wrapper {
|
|
123
123
|
display: block;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
.the-table-col-controls-wrapper .the-table-col-controls {
|
|
126
|
+
.the-temp-table-col-controls-wrapper .the-temp-table-col-controls {
|
|
127
127
|
background: $gray-100;
|
|
128
128
|
border-right: $controls-border;
|
|
129
129
|
border-top: $controls-border;
|
|
@@ -133,17 +133,17 @@ $control-corner-width: 12px;
|
|
|
133
133
|
border-left: $controls-border;
|
|
134
134
|
}
|
|
135
135
|
&:last-child {
|
|
136
|
-
.the-table-controls-insert-wrapper {
|
|
136
|
+
.the-temp-table-controls-insert-wrapper {
|
|
137
137
|
right: 0;
|
|
138
138
|
&:after {
|
|
139
139
|
left: 9px;
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
.the-table-controls-insert-wrapper:hover {
|
|
142
|
+
.the-temp-table-controls-insert-wrapper:hover {
|
|
143
143
|
&:after {
|
|
144
144
|
left: 0;
|
|
145
145
|
}
|
|
146
|
-
.the-table-controls-insert-line[data-dot-type='column'] {
|
|
146
|
+
.the-temp-table-controls-insert-line[data-dot-type='column'] {
|
|
147
147
|
left: $dot-size;
|
|
148
148
|
}
|
|
149
149
|
}
|
|
@@ -179,12 +179,12 @@ $control-corner-width: 12px;
|
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
.the-table-corner-controls {
|
|
182
|
+
.the-temp-table-corner-controls {
|
|
183
183
|
width: 100%;
|
|
184
184
|
height: $control-corner-width;
|
|
185
185
|
position: relative;
|
|
186
186
|
visibility: hidden;
|
|
187
|
-
.the-table-corner-button {
|
|
187
|
+
.the-temp-table-corner-button {
|
|
188
188
|
position: absolute;
|
|
189
189
|
top: 0;
|
|
190
190
|
left: 0;
|
|
@@ -199,32 +199,32 @@ $control-corner-width: 12px;
|
|
|
199
199
|
cursor: pointer;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
.the-table-corner-controls-insert-row-marker .the-table-controls-insert-wrapper {
|
|
202
|
+
.the-temp-table-corner-controls-insert-row-marker .the-temp-table-controls-insert-wrapper {
|
|
203
203
|
left: -$dot-size;
|
|
204
204
|
top: 2px;
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
.the-table-corner-controls-insert-column-marker .the-table-controls-insert-wrapper {
|
|
207
|
+
.the-temp-table-corner-controls-insert-column-marker .the-temp-table-controls-insert-wrapper {
|
|
208
208
|
left: 2px;
|
|
209
209
|
top: -$dot-size;
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
&.active {
|
|
213
213
|
z-index: 1;
|
|
214
|
-
.the-table-corner-button {
|
|
214
|
+
.the-temp-table-corner-button {
|
|
215
215
|
@include controlSelected;
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
&.dangerous {
|
|
220
220
|
z-index: 1;
|
|
221
|
-
.the-table-corner-button {
|
|
221
|
+
.the-temp-table-corner-button {
|
|
222
222
|
@include controlDangerous;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
.the-table-controls-insert-wrapper {
|
|
227
|
+
.the-temp-table-controls-insert-wrapper {
|
|
228
228
|
width: $dot-size;
|
|
229
229
|
height: $dot-size;
|
|
230
230
|
position: absolute;
|
|
@@ -278,7 +278,7 @@ $control-corner-width: 12px;
|
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
.the-table-controls-insert-line {
|
|
281
|
+
.the-temp-table-controls-insert-line {
|
|
282
282
|
position: absolute;
|
|
283
283
|
background-color: $primary;
|
|
284
284
|
z-index: $dot-zIndex;
|
|
@@ -297,23 +297,24 @@ $control-corner-width: 12px;
|
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
.the-table-row-controls {
|
|
300
|
+
.the-temp-table-row-controls {
|
|
301
301
|
width: $control-width;
|
|
302
302
|
box-sizing: border-box;
|
|
303
303
|
display: none;
|
|
304
304
|
z-index: 11;
|
|
305
305
|
position: relative;
|
|
306
306
|
|
|
307
|
-
.the-table-row-controls-inner {
|
|
307
|
+
.the-temp-table-row-controls-inner {
|
|
308
308
|
display: flex;
|
|
309
309
|
flex-direction: column;
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
-
.the-table-row-controls-button-wrap {
|
|
312
|
+
.the-temp-table-row-controls-button-wrap {
|
|
313
313
|
position: relative;
|
|
314
314
|
margin-top: -1px;
|
|
315
|
-
.the-table-controls-button {
|
|
315
|
+
.the-temp-table-controls-button {
|
|
316
316
|
display: block;
|
|
317
|
+
outline: none;
|
|
317
318
|
background-color: $gray-100;
|
|
318
319
|
box-sizing: border-box;
|
|
319
320
|
height: 42px;
|
|
@@ -326,8 +327,8 @@ $control-corner-width: 12px;
|
|
|
326
327
|
|
|
327
328
|
&.active {
|
|
328
329
|
z-index: 1;
|
|
329
|
-
.the-table-controls-button,
|
|
330
|
-
.the-table-numbered-controls-button {
|
|
330
|
+
.the-temp-table-controls-button,
|
|
331
|
+
.the-temp-table-numbered-controls-button {
|
|
331
332
|
@include controlSelected;
|
|
332
333
|
}
|
|
333
334
|
}
|
|
@@ -335,26 +336,26 @@ $control-corner-width: 12px;
|
|
|
335
336
|
&.dangerous {
|
|
336
337
|
z-index: 1;
|
|
337
338
|
|
|
338
|
-
.the-table-controls-button,
|
|
339
|
-
.the-table-numbered-controls-button {
|
|
339
|
+
.the-temp-table-controls-button,
|
|
340
|
+
.the-temp-table-numbered-controls-button {
|
|
340
341
|
@include controlDangerous;
|
|
341
342
|
}
|
|
342
343
|
}
|
|
343
344
|
}
|
|
344
345
|
|
|
345
|
-
.the-table-controls-insert-wrapper {
|
|
346
|
+
.the-temp-table-controls-insert-wrapper {
|
|
346
347
|
bottom: -$dot-shadow-top;
|
|
347
348
|
left: -$dot-size;
|
|
348
349
|
top: auto;
|
|
349
350
|
}
|
|
350
351
|
|
|
351
|
-
.the-table-row-controls-button-wrap {
|
|
352
|
+
.the-temp-table-row-controls-button-wrap {
|
|
352
353
|
position: relative;
|
|
353
354
|
margin-top: -1px;
|
|
354
355
|
}
|
|
355
356
|
}
|
|
356
357
|
|
|
357
|
-
.the-table-toolbar-wrap {
|
|
358
|
+
.the-temp-table-toolbar-wrap {
|
|
358
359
|
@include the-toolbar-layout();
|
|
359
360
|
z-index: 10;
|
|
360
361
|
border-radius: 5px;
|
|
@@ -373,11 +374,11 @@ $control-corner-width: 12px;
|
|
|
373
374
|
}
|
|
374
375
|
}
|
|
375
376
|
|
|
376
|
-
.the-table-col-controls-wrapper {
|
|
377
|
+
.the-temp-table-col-controls-wrapper {
|
|
377
378
|
height: $control-width;
|
|
378
379
|
line-height: $control-width;
|
|
379
380
|
|
|
380
|
-
.the-table-col-controls {
|
|
381
|
+
.the-temp-table-col-controls {
|
|
381
382
|
padding: 0;
|
|
382
383
|
margin: 0;
|
|
383
384
|
border: 0;
|
|
@@ -407,27 +408,27 @@ $control-corner-width: 12px;
|
|
|
407
408
|
}
|
|
408
409
|
}
|
|
409
410
|
|
|
410
|
-
.the-numbered-column-container {
|
|
411
|
+
.the-temp-numbered-column-container {
|
|
411
412
|
padding-left: 44px;
|
|
412
413
|
|
|
413
|
-
.the-table-row-controls {
|
|
414
|
+
.the-temp-table-row-controls {
|
|
414
415
|
display: block;
|
|
415
416
|
top: 0px;
|
|
416
417
|
width: 45px;
|
|
417
418
|
margin-left: 10px;
|
|
418
419
|
cursor: pointer;
|
|
419
|
-
.the-table-numbered-controls-button {
|
|
420
|
+
.the-temp-table-numbered-controls-button {
|
|
420
421
|
background-color: $gray-100;
|
|
421
422
|
border: $controls-border;
|
|
422
423
|
border-right: none;
|
|
423
424
|
}
|
|
424
425
|
}
|
|
425
|
-
.the-table-focus {
|
|
426
|
-
.the-table-row-controls {
|
|
426
|
+
.the-temp-table-focus {
|
|
427
|
+
.the-temp-table-row-controls {
|
|
427
428
|
width: 55px;
|
|
428
429
|
margin-left: 0;
|
|
429
430
|
}
|
|
430
|
-
.the-table-corner-controls-insert-column-marker .the-table-controls-insert-wrapper {
|
|
431
|
+
.the-temp-table-corner-controls-insert-column-marker .the-temp-table-controls-insert-wrapper {
|
|
431
432
|
left: 46px;
|
|
432
433
|
}
|
|
433
434
|
}
|
|
@@ -441,14 +442,14 @@ $control-corner-width: 12px;
|
|
|
441
442
|
}
|
|
442
443
|
|
|
443
444
|
.safari{
|
|
444
|
-
.the-table-row-controls{
|
|
445
|
+
.the-temp-table-row-controls{
|
|
445
446
|
top: 1px;
|
|
446
447
|
}
|
|
447
448
|
}
|
|
448
449
|
|
|
449
450
|
|
|
450
|
-
.the-editor-readonly{
|
|
451
|
-
.the-table-row-controls, .the-table-col-controls{
|
|
451
|
+
.the-temp-editor-readonly{
|
|
452
|
+
.the-temp-table-row-controls, .the-temp-table-col-controls{
|
|
452
453
|
cursor: default;
|
|
453
454
|
}
|
|
454
455
|
}
|
|
@@ -2,14 +2,16 @@ import { ElementRef, ChangeDetectorRef, OnInit } from '@angular/core';
|
|
|
2
2
|
import { Editor } from 'slate';
|
|
3
3
|
import { TheBaseElementComponent } from '../../interfaces';
|
|
4
4
|
import { TodoItemElement } from '../../custom-types';
|
|
5
|
+
import { TheContextService } from '../../services/context.service';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class TheTodoItemComponent extends TheBaseElementComponent<TodoItemElement, Editor> implements OnInit {
|
|
7
8
|
elementRef: ElementRef;
|
|
8
9
|
cdr: ChangeDetectorRef;
|
|
10
|
+
private ctxService;
|
|
9
11
|
checked: boolean;
|
|
10
12
|
checkItemClass: boolean;
|
|
11
13
|
get level(): number;
|
|
12
|
-
constructor(elementRef: ElementRef, cdr: ChangeDetectorRef);
|
|
14
|
+
constructor(elementRef: ElementRef, cdr: ChangeDetectorRef, ctxService: TheContextService);
|
|
13
15
|
ngOnInit(): void;
|
|
14
16
|
onCheck(checked: boolean): boolean;
|
|
15
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheTodoItemComponent, never>;
|
package/transforms/index.d.ts
CHANGED
|
@@ -16,4 +16,5 @@ import { setEndSelection } from './set-end-selection';
|
|
|
16
16
|
import { closeConversionHint } from './close-conversion-hint';
|
|
17
17
|
import { handleContinualDeleteBackward } from './handle-continual-delete-backward';
|
|
18
18
|
import { handleContinualInsertBreak } from './handle-continual-insert-break';
|
|
19
|
-
|
|
19
|
+
import { insertElementNode } from './insert-element-node';
|
|
20
|
+
export { setMarks, clearMarks, insertElement, insertElementNext, insertParagraph, setNode, unwrapNodesByType, onKeyDownResetBlockType, moveChildren, applyDeepToNodes, mergeDeepToNodes, unWrap, splitNode, deleteElement, setEndSelection, closeConversionHint, handleContinualDeleteBackward, handleContinualInsertBreak, insertElementNode };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Editor } from 'slate';
|
|
1
|
+
import { Editor, Node } from 'slate';
|
|
2
2
|
/**
|
|
3
3
|
* whether the current node is a clean paragraph
|
|
4
4
|
* @param editor
|
|
@@ -6,3 +6,4 @@ import { Editor } from 'slate';
|
|
|
6
6
|
* @returns boolean
|
|
7
7
|
*/
|
|
8
8
|
export declare const isCleanEmptyParagraph: (editor: Editor) => boolean;
|
|
9
|
+
export declare const isPureEmptyParagraph: (editor: Editor, block: Node) => boolean;
|