asksuite-citrus 2.0.4-beta → 2.0.4-beta.2
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/esm2022/lib/classes/richtext-wrapper.mjs +29 -2
- package/esm2022/lib/directives/richtext-toolbox/richtext-toolbox.directive.mjs +16 -2
- package/fesm2022/asksuite-citrus.mjs +43 -2
- package/fesm2022/asksuite-citrus.mjs.map +1 -1
- package/lib/classes/richtext-wrapper.d.ts +7 -2
- package/lib/directives/richtext-toolbox/richtext-toolbox.directive.d.ts +10 -1
- package/package.json +1 -1
@@ -1,11 +1,13 @@
|
|
1
1
|
import { ChangeDetectorRef, ElementRef, NgZone } from '@angular/core';
|
2
|
-
import Quill from 'quill';
|
2
|
+
import Quill, { RangeStatic } from 'quill';
|
3
3
|
import { RichTextFunctions, ToolKeys, ToolsState } from '../interfaces/richtext-toolbox.interface';
|
4
4
|
export declare class RichtextWrapper implements RichTextFunctions {
|
5
5
|
private ngZone;
|
6
6
|
private cd;
|
7
7
|
private elementRef;
|
8
8
|
private quill;
|
9
|
+
private maxLengthSubscription?;
|
10
|
+
private templateReplacerSubscription?;
|
9
11
|
private stateSub;
|
10
12
|
private esc$;
|
11
13
|
private enter$;
|
@@ -16,7 +18,6 @@ export declare class RichtextWrapper implements RichTextFunctions {
|
|
16
18
|
private textChangeHandler;
|
17
19
|
private selectionChangeHandler;
|
18
20
|
private bindings;
|
19
|
-
private maxLengthSubscription?;
|
20
21
|
get state(): ToolsState;
|
21
22
|
state$: import("rxjs").Observable<ToolsState>;
|
22
23
|
get listenTextChanges$(): import("rxjs").Observable<string>;
|
@@ -37,6 +38,9 @@ export declare class RichtextWrapper implements RichTextFunctions {
|
|
37
38
|
setRemove(): void;
|
38
39
|
setPlaceholder(placeholder: string): void;
|
39
40
|
setText(text: string): void;
|
41
|
+
getTextWithoutHtmlTags(): string;
|
42
|
+
insertText(index: number, text: string, emitEvent: boolean): void;
|
43
|
+
setShortcutTemplate(key: string, template: string): void;
|
40
44
|
setMaxLength(length: number): void;
|
41
45
|
setDisabledTools(tools: ToolKeys): void;
|
42
46
|
setEditorClass(className: string): void;
|
@@ -47,6 +51,7 @@ export declare class RichtextWrapper implements RichTextFunctions {
|
|
47
51
|
focus(): void;
|
48
52
|
setBreakOnEnter(breakOnEnter: boolean): void;
|
49
53
|
setAllowImages(allowImages: boolean): void;
|
54
|
+
getCurrentCursorPosition(): RangeStatic | null;
|
50
55
|
destroy(): void;
|
51
56
|
private isToolDisabled;
|
52
57
|
private urlMatcher;
|
@@ -2,6 +2,10 @@ import { EventEmitter, Injector, OnChanges, SimpleChanges } from '@angular/core'
|
|
2
2
|
import { ToolKeys, ToolLayout, ToolsState } from '../../interfaces/richtext-toolbox.interface';
|
3
3
|
import { ControlValueAccessor } from '@angular/forms';
|
4
4
|
import * as i0 from "@angular/core";
|
5
|
+
type ShortcutTemplate = {
|
6
|
+
key: string;
|
7
|
+
template: string;
|
8
|
+
};
|
5
9
|
export declare class RichtextToolboxDirective implements OnChanges, ControlValueAccessor {
|
6
10
|
private injector;
|
7
11
|
private toolbox?;
|
@@ -18,6 +22,7 @@ export declare class RichtextToolboxDirective implements OnChanges, ControlValue
|
|
18
22
|
rtEditorClass: string;
|
19
23
|
rtBreakOnEnter: boolean;
|
20
24
|
rtAllowImages: boolean;
|
25
|
+
rtShortcutTemplate?: ShortcutTemplate;
|
21
26
|
inputChange: EventEmitter<string>;
|
22
27
|
inputEnter: EventEmitter<any>;
|
23
28
|
inputEscape: EventEmitter<any>;
|
@@ -32,6 +37,9 @@ export declare class RichtextToolboxDirective implements OnChanges, ControlValue
|
|
32
37
|
registerOnChange(fn: any): void;
|
33
38
|
registerOnTouched(fn: any): void;
|
34
39
|
setDisabledState(isDisabled: boolean): void;
|
40
|
+
getCurrentCursorPosition(): import("quill").RangeStatic | null | undefined;
|
41
|
+
getTextWithoutHtmlTags(): string;
|
42
|
+
insertText(index: number, text: string, emitEvent?: boolean): void;
|
35
43
|
private prepareToolbar;
|
36
44
|
private prepareListeners;
|
37
45
|
private update;
|
@@ -39,5 +47,6 @@ export declare class RichtextToolboxDirective implements OnChanges, ControlValue
|
|
39
47
|
private generateToolboxLayout;
|
40
48
|
private getToolbox;
|
41
49
|
static ɵfac: i0.ɵɵFactoryDeclaration<RichtextToolboxDirective, never>;
|
42
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RichtextToolboxDirective, "[askRichtextToolbox]", never, { "rtPlaceholder": { "alias": "rtPlaceholder"; "required": false; }; "rtTools": { "alias": "rtTools"; "required": false; }; "rtDisabledTools": { "alias": "rtDisabledTools"; "required": false; }; "rtType": { "alias": "rtType"; "required": false; }; "rtToolbarOnly": { "alias": "rtToolbarOnly"; "required": false; }; "rtMaxlength": { "alias": "rtMaxlength"; "required": false; }; "rtToolbarClass": { "alias": "rtToolbarClass"; "required": false; }; "rtEditorClass": { "alias": "rtEditorClass"; "required": false; }; "rtBreakOnEnter": { "alias": "rtBreakOnEnter"; "required": false; }; "rtAllowImages": { "alias": "rtAllowImages"; "required": false; }; }, { "inputChange": "inputChange"; "inputEnter": "inputEnter"; "inputEscape": "inputEscape"; "inputFocus": "inputFocus"; "toolChange": "toolChange"; }, never, never, false, never>;
|
50
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RichtextToolboxDirective, "[askRichtextToolbox]", never, { "rtPlaceholder": { "alias": "rtPlaceholder"; "required": false; }; "rtTools": { "alias": "rtTools"; "required": false; }; "rtDisabledTools": { "alias": "rtDisabledTools"; "required": false; }; "rtType": { "alias": "rtType"; "required": false; }; "rtToolbarOnly": { "alias": "rtToolbarOnly"; "required": false; }; "rtMaxlength": { "alias": "rtMaxlength"; "required": false; }; "rtToolbarClass": { "alias": "rtToolbarClass"; "required": false; }; "rtEditorClass": { "alias": "rtEditorClass"; "required": false; }; "rtBreakOnEnter": { "alias": "rtBreakOnEnter"; "required": false; }; "rtAllowImages": { "alias": "rtAllowImages"; "required": false; }; "rtShortcutTemplate": { "alias": "rtShortcutTemplate"; "required": false; }; }, { "inputChange": "inputChange"; "inputEnter": "inputEnter"; "inputEscape": "inputEscape"; "inputFocus": "inputFocus"; "toolChange": "toolChange"; }, never, never, false, never>;
|
43
51
|
}
|
52
|
+
export {};
|