@worktile/theia 2.4.6 → 2.4.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/bundles/worktile-theia.umd.js +171 -152
- package/bundles/worktile-theia.umd.js.map +1 -1
- package/constants/code.d.ts +0 -16
- package/constants/default.d.ts +0 -4
- package/esm2015/constants/code.js +1 -15
- package/esm2015/constants/default.js +1 -6
- package/esm2015/editor.component.js +19 -26
- package/esm2015/editor.module.js +4 -4
- package/esm2015/interfaces/editor.js +16 -1
- package/esm2015/plugins/code/code.component.js +9 -9
- package/esm2015/plugins/indent/indent.editor.js +7 -12
- package/esm2015/plugins/indent/indent.plugin.js +1 -8
- package/esm2015/plugins/public-api.js +3 -1
- package/esm2015/plugins/table/components/table.component.js +37 -6
- package/fesm2015/worktile-theia.js +145 -137
- package/fesm2015/worktile-theia.js.map +1 -1
- package/interfaces/editor.d.ts +15 -2
- package/package.json +1 -1
- package/plugins/code/code.component.d.ts +3 -3
- package/plugins/indent/indent.editor.d.ts +1 -0
- package/plugins/public-api.d.ts +2 -0
- package/plugins/table/components/table.component.d.ts +1 -0
- package/plugins/table/components/table.component.scss +7 -2
package/interfaces/editor.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { ToolbarOption } from './toolbar';
|
|
|
7
7
|
import { ElementKinds, FontSizes } from '../constants/node-types';
|
|
8
8
|
import { AutoFormatRule } from './auto-format';
|
|
9
9
|
import { CustomElementKinds } from '../custom-types';
|
|
10
|
+
import { InjectionToken } from '@angular/core';
|
|
10
11
|
export interface TheEditor extends AngularEditor, HistoryEditor {
|
|
11
12
|
renderElement: (element: Element) => ViewType;
|
|
12
13
|
renderLeaf: (text: Text) => ViewType;
|
|
@@ -14,7 +15,6 @@ export interface TheEditor extends AngularEditor, HistoryEditor {
|
|
|
14
15
|
isContainer: (element: Element) => boolean;
|
|
15
16
|
extraElementOptions: ElementOptionsInfo[];
|
|
16
17
|
extraAutoFormatRules: AutoFormatRule[];
|
|
17
|
-
extraIndentOptions: IndentOptions;
|
|
18
18
|
options: TheOptions;
|
|
19
19
|
disabled: boolean;
|
|
20
20
|
[key: string]: any;
|
|
@@ -70,6 +70,20 @@ export declare enum TheDataMode {
|
|
|
70
70
|
json = "json",
|
|
71
71
|
html = "html"
|
|
72
72
|
}
|
|
73
|
+
export declare enum TheMode {
|
|
74
|
+
default = "default",
|
|
75
|
+
print = "print"
|
|
76
|
+
}
|
|
77
|
+
export declare class TheModeConfig {
|
|
78
|
+
mode: TheMode;
|
|
79
|
+
}
|
|
80
|
+
export declare const THE_MODE_TOKEN: InjectionToken<TheModeConfig>;
|
|
81
|
+
export declare const THE_MODE_PROVIDER: {
|
|
82
|
+
provide: InjectionToken<TheModeConfig>;
|
|
83
|
+
useValue: {
|
|
84
|
+
mode: TheMode;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
73
87
|
export interface TheOptions {
|
|
74
88
|
allowContainerOperateTypes?: CustomElementKinds[];
|
|
75
89
|
mode?: TheDataMode;
|
|
@@ -88,7 +102,6 @@ export interface TheOptions {
|
|
|
88
102
|
disablePlugins?: string[];
|
|
89
103
|
extraElementOptions?: ElementOptionsInfo[];
|
|
90
104
|
extraAutoFormatRules?: AutoFormatRule[];
|
|
91
|
-
extraIndentOptions?: IndentOptions;
|
|
92
105
|
noBindReadonlyPlugins?: (ElementKinds | string)[];
|
|
93
106
|
}
|
|
94
107
|
export declare type NodeMatch<T = Node> = Predicate<T>;
|
package/package.json
CHANGED
|
@@ -2,8 +2,8 @@ import { ElementRef, ChangeDetectorRef, OnInit, AfterViewInit, NgZone, OnDestroy
|
|
|
2
2
|
import { ThyNotifyService } from 'ngx-tethys/notify';
|
|
3
3
|
import { Editor } from 'slate';
|
|
4
4
|
import { CodeMirrorComponent } from 'ng-codemirror';
|
|
5
|
-
import { DropdownMode,
|
|
6
|
-
import { DefaultToolbarItem, TheBaseElementComponent } from '../../interfaces';
|
|
5
|
+
import { DropdownMode, ToolbarItemMode } from '../../constants';
|
|
6
|
+
import { DefaultToolbarItem, TheBaseElementComponent, TheModeConfig } from '../../interfaces';
|
|
7
7
|
import { CodeElement } from '../../custom-types';
|
|
8
8
|
import { ThyResizeEvent } from 'ngx-tethys/resizable';
|
|
9
9
|
import { TheContextService } from '../../services/context.service';
|
|
@@ -41,7 +41,7 @@ export declare class TheCodeComponent extends TheBaseElementComponent<CodeElemen
|
|
|
41
41
|
get code(): string;
|
|
42
42
|
codemirror: CodeMirrorComponent;
|
|
43
43
|
onContextChange(): void;
|
|
44
|
-
constructor(elementRef: ElementRef, cdr: ChangeDetectorRef, thyNotifyService: ThyNotifyService, contextService: TheContextService, ngZone: NgZone, config:
|
|
44
|
+
constructor(elementRef: ElementRef, cdr: ChangeDetectorRef, thyNotifyService: ThyNotifyService, contextService: TheContextService, ngZone: NgZone, config: TheModeConfig);
|
|
45
45
|
ngOnInit(): void;
|
|
46
46
|
ngAfterViewInit(): void;
|
|
47
47
|
renderCodemirror(): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Editor, Element } from 'slate';
|
|
2
2
|
import { TheEditor } from '../../interfaces/editor';
|
|
3
3
|
import { CustomElementKinds } from '../../custom-types';
|
|
4
|
+
export declare const includesIndentTypes: CustomElementKinds[];
|
|
4
5
|
export declare const IndentEditor: {
|
|
5
6
|
setIndent(editor: TheEditor): void;
|
|
6
7
|
cancelIndent(editor: Editor): void;
|
package/plugins/public-api.d.ts
CHANGED
|
@@ -12,3 +12,5 @@ export * from './todo-item/todo-item.editor';
|
|
|
12
12
|
export * from './vertical-align/vertical-align.editor';
|
|
13
13
|
export * from './link/link.editor';
|
|
14
14
|
export * from './quick-insert/quick-insert.editor';
|
|
15
|
+
export * from './indent/indent.editor';
|
|
16
|
+
export * from './indent/toolbar-item.component';
|
|
@@ -59,6 +59,7 @@ export declare class TheTableComponent extends TheBaseElementComponent<TableElem
|
|
|
59
59
|
cell?: TableCellElement;
|
|
60
60
|
rowIndex: number;
|
|
61
61
|
}[], index: number, rowIndex: number, rowspan: number): number;
|
|
62
|
+
resolveImage(): Promise<boolean> | Promise<any[]>;
|
|
62
63
|
getColControls(): void;
|
|
63
64
|
onColMouseDown(event: MouseEvent, index: number): void;
|
|
64
65
|
getIsInTable(): void;
|
|
@@ -447,9 +447,14 @@ $control-corner-width: 12px;
|
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
449
|
|
|
450
|
-
|
|
451
|
-
.the-
|
|
450
|
+
|
|
451
|
+
.the-editor-readonly{
|
|
452
452
|
.the-temp-table-row-controls, .the-temp-table-col-controls{
|
|
453
453
|
cursor: default;
|
|
454
454
|
}
|
|
455
|
+
.safari{
|
|
456
|
+
.the-temp-table-row-controls{
|
|
457
|
+
top: 0px;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
455
460
|
}
|