@worktile/theia 3.0.7 → 3.0.10
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 +146 -87
- package/bundles/worktile-theia.umd.js.map +1 -1
- package/components/toolbar-dropdown/toolbar-dropdown.component.scss +0 -1
- package/editor.component.d.ts +2 -1
- package/editor.module.d.ts +5 -3
- package/esm2015/editor.component.js +15 -2
- package/esm2015/editor.module.js +9 -3
- package/esm2015/plugins/image/image.component.js +43 -20
- package/esm2015/plugins/image/image.editor.js +3 -5
- package/esm2015/queries/index.js +3 -2
- package/esm2015/queries/is-empty-content.js +15 -0
- package/esm2015/services/context.service.js +7 -6
- package/esm2015/utils/get-all-nodes-by-type.js +5 -0
- package/fesm2015/worktile-theia.js +123 -64
- package/fesm2015/worktile-theia.js.map +1 -1
- package/package.json +1 -1
- package/plugins/image/image.component.d.ts +7 -2
- package/queries/index.d.ts +2 -1
- package/queries/is-empty-content.d.ts +2 -0
- package/services/context.service.d.ts +8 -4
- package/utils/get-all-nodes-by-type.d.ts +3 -0
package/package.json
CHANGED
|
@@ -9,6 +9,7 @@ import { Overlay } from '@angular/cdk/overlay';
|
|
|
9
9
|
import { TheContextService } from '../../services/context.service';
|
|
10
10
|
import { TheBaseElementComponent } from '../../interfaces';
|
|
11
11
|
import { ImageElement } from '../../custom-types';
|
|
12
|
+
import { ThyImageService } from 'ngx-tethys/image';
|
|
12
13
|
import * as i0 from "@angular/core";
|
|
13
14
|
export declare class TheImageComponent extends TheBaseElementComponent<ImageElement, Editor> implements OnInit, OnDestroy, AfterViewInit, BeforeContextChange<SlateElementContext> {
|
|
14
15
|
elementRef: ElementRef;
|
|
@@ -18,11 +19,15 @@ export declare class TheImageComponent extends TheBaseElementComponent<ImageElem
|
|
|
18
19
|
private theContextService;
|
|
19
20
|
private thyPopover;
|
|
20
21
|
private overlay;
|
|
22
|
+
private thyImageService;
|
|
21
23
|
private viewContainerRef;
|
|
22
24
|
imageEntry: ImageEntry;
|
|
23
25
|
uploading: boolean;
|
|
24
26
|
percentage: number;
|
|
25
|
-
|
|
27
|
+
fileItem: {
|
|
28
|
+
url: string;
|
|
29
|
+
file: File;
|
|
30
|
+
};
|
|
26
31
|
layoutDefaultWidth: number;
|
|
27
32
|
layoutOptions: LayoutOption[];
|
|
28
33
|
private uploadingSubscription;
|
|
@@ -34,7 +39,7 @@ export declare class TheImageComponent extends TheBaseElementComponent<ImageElem
|
|
|
34
39
|
imageContent: ElementRef;
|
|
35
40
|
img: ElementRef;
|
|
36
41
|
layoutToolbar: TemplateRef<any>;
|
|
37
|
-
constructor(elementRef: ElementRef, sanitizer: DomSanitizer, imageUploaderService: TheImageUploaderService, cdr: ChangeDetectorRef, theContextService: TheContextService, thyPopover: ThyPopover, overlay: Overlay, viewContainerRef: ViewContainerRef);
|
|
42
|
+
constructor(elementRef: ElementRef, sanitizer: DomSanitizer, imageUploaderService: TheImageUploaderService, cdr: ChangeDetectorRef, theContextService: TheContextService, thyPopover: ThyPopover, overlay: Overlay, thyImageService: ThyImageService, viewContainerRef: ViewContainerRef);
|
|
38
43
|
beforeContextChange: (value: SlateElementContext<ImageElement>) => void;
|
|
39
44
|
ngOnInit(): void;
|
|
40
45
|
onContextChange(): void;
|
package/queries/index.d.ts
CHANGED
|
@@ -54,4 +54,5 @@ import { getInsertElementsPath } from './get-insert-elements-path';
|
|
|
54
54
|
import { isContainNestedType } from './is-contain-nested-type';
|
|
55
55
|
import { getToolbarItemDisabled } from './get-toolbar-disabled';
|
|
56
56
|
import { getPluginByToolbarItem } from './get-plugin-by-toolbar';
|
|
57
|
-
|
|
57
|
+
import { isEmptyContent } from './is-empty-content';
|
|
58
|
+
export { getLastNode, getAnchorBlockEntry, getAboveByType, getNodes, getNodesByType, getBlockAbove, getPreviousPath, getNode, getParent, getLastChild, getLastChildPath, getNextSiblingNodes, getAbove, getPointBefore, getSelectionNodesByType, getText, getPointFromLocation, getRangeFromBlockStart, getRangeBefore, getBlockCardCenterCursor, getBlockCardAbove, getPlainText, getSelectionMarks, getContainerBlocks, getDirectlyParent, isAncestor, isCollapsed, isEmptyParagraph, isParagraph, isBlockActive, isIncludeTypes, isAncestorEmpty, isBlockAboveEmpty, isNodeTypeIn, isFirstChild, isPointAtRoot, isRangeAtRoot, isBlockTextEmptyAfterSelection, isStart, isRangeAcrossBlocks, isDescendant, isNodeType, isAcrossBlocks, isBlockCardCursor, isEmptyParagraphByPath, isEmptyContent, isContainer, getInsertElementsPath, isContainNestedType, anchorBlock, anchorBlockEntry, anchorInlineEntry, findPath, findNode, findDescendant, someNode, getToolbarItemDisabled, getPluginByToolbarItem };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NgZone, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
2
|
+
import { Observable, Subject } from 'rxjs';
|
|
3
3
|
import { TheOptions } from '../interfaces/editor';
|
|
4
4
|
import { FontSizes, MarkTypes } from '../constants/node-types';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
@@ -18,7 +18,7 @@ interface PaintFormatStatus {
|
|
|
18
18
|
export declare class TheContextService {
|
|
19
19
|
private ngZone;
|
|
20
20
|
private options;
|
|
21
|
-
|
|
21
|
+
uploadingFiles: {
|
|
22
22
|
url: string;
|
|
23
23
|
file: File;
|
|
24
24
|
}[];
|
|
@@ -26,6 +26,7 @@ export declare class TheContextService {
|
|
|
26
26
|
onMouseUp$: Observable<MouseEvent>;
|
|
27
27
|
onMouseMove$: Observable<MouseEvent>;
|
|
28
28
|
onMouseDown$: Observable<MouseEvent>;
|
|
29
|
+
uploadingStatus$: Subject<boolean>;
|
|
29
30
|
constructor(ngZone: NgZone);
|
|
30
31
|
initialize(options: TheContextOptions): void;
|
|
31
32
|
getOptions(): TheContextOptions;
|
|
@@ -34,11 +35,14 @@ export declare class TheContextService {
|
|
|
34
35
|
getEditableElement(): Element;
|
|
35
36
|
getFirstElementChild(): HTMLElement;
|
|
36
37
|
layoutDefaultWidth(): number;
|
|
37
|
-
|
|
38
|
+
addUploadingFiles(file: {
|
|
39
|
+
url: string;
|
|
40
|
+
file: File;
|
|
41
|
+
}): void;
|
|
42
|
+
removeUploadImage(file: {
|
|
38
43
|
url: string;
|
|
39
44
|
file: File;
|
|
40
45
|
}): void;
|
|
41
|
-
removeUploadImage(file: File): void;
|
|
42
46
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheContextService, never>;
|
|
43
47
|
static ɵprov: i0.ɵɵInjectableDeclaration<TheContextService>;
|
|
44
48
|
}
|