@libs-ui/components-inputs-quill 0.2.326-1 → 0.2.327-0
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/index.mjs +2 -1
- package/esm2022/interfaces/quill2x.interface.mjs +2 -0
- package/esm2022/quill.component.mjs +38 -25
- package/esm2022/quill2x.component.mjs +140 -49
- package/esm2022/utils/quill.define.mjs +35 -35
- package/fesm2022/libs-ui-components-inputs-quill.mjs +208 -105
- package/fesm2022/libs-ui-components-inputs-quill.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/interfaces/quill2x.interface.d.ts +62 -0
- package/package.json +17 -17
- package/quill.component.d.ts +2 -0
- package/quill2x.component.d.ts +39 -20
package/index.d.ts
CHANGED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ILabel } from '@libs-ui/components-label';
|
|
2
|
+
import Quill2x, { Range, EmitterSource } from 'quill2x';
|
|
3
|
+
import Delta from 'quill-delta';
|
|
4
|
+
export type QUILL2X_TYPE_MODE_BAR_CONFIG_OPTION = 'all' | 'default' | 'basic' | 'custom';
|
|
5
|
+
export interface IQuill2xToolbarConfig {
|
|
6
|
+
type: string;
|
|
7
|
+
mode?: Array<QUILL2X_TYPE_MODE_BAR_CONFIG_OPTION>;
|
|
8
|
+
width: number;
|
|
9
|
+
display?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface IQuill2xEventSave {
|
|
12
|
+
link: string;
|
|
13
|
+
width?: number;
|
|
14
|
+
height?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface IQuill2xUploadImageConfig {
|
|
17
|
+
modeCustom: boolean;
|
|
18
|
+
showIcon?: boolean;
|
|
19
|
+
zIndex?: number;
|
|
20
|
+
maxImageSize?: number;
|
|
21
|
+
label?: ILabel;
|
|
22
|
+
onlyAcceptImageHttpsLink?: boolean;
|
|
23
|
+
functionUploadImage?: (files: Array<File>) => Promise<Array<string | ArrayBuffer>>;
|
|
24
|
+
}
|
|
25
|
+
export interface IQuill2xFunctionControlEvent {
|
|
26
|
+
checkIsValid: () => Promise<boolean>;
|
|
27
|
+
refreshItemValue: () => void;
|
|
28
|
+
setContent: (content: string) => Promise<void>;
|
|
29
|
+
insertText: (value: string, index?: number, focusLt?: boolean) => Promise<void>;
|
|
30
|
+
insertLink: (value: string, url: string, index?: number) => Promise<void>;
|
|
31
|
+
insertImage: (content: string, index?: number) => Promise<void>;
|
|
32
|
+
setFontSize: (size: number) => Promise<Delta | undefined>;
|
|
33
|
+
setColor: (color: string) => Promise<Delta | undefined>;
|
|
34
|
+
setBackground: (color: string) => Promise<Delta | undefined>;
|
|
35
|
+
setMessageError: (message: string) => Promise<void>;
|
|
36
|
+
quill: () => Quill2x | undefined;
|
|
37
|
+
reCalculatorToolbar: () => Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
export interface IQuill2xLink {
|
|
40
|
+
title: string;
|
|
41
|
+
url: string;
|
|
42
|
+
range: {
|
|
43
|
+
index: number;
|
|
44
|
+
length: number;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export interface IQuill2xBlotRegister {
|
|
48
|
+
component: any;
|
|
49
|
+
className: string;
|
|
50
|
+
style: string;
|
|
51
|
+
ignoreDelete?: boolean;
|
|
52
|
+
}
|
|
53
|
+
export interface IQuill2xSelectionChange {
|
|
54
|
+
quill: Quill2x;
|
|
55
|
+
range: Range;
|
|
56
|
+
oldRange: Range;
|
|
57
|
+
source: EmitterSource;
|
|
58
|
+
}
|
|
59
|
+
export interface IQuill2xTextChange {
|
|
60
|
+
quill: Quill2x;
|
|
61
|
+
delta: Delta;
|
|
62
|
+
}
|
package/package.json
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libs-ui/components-inputs-quill",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.327-0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=18.0.0",
|
|
6
6
|
"@angular/core": ">=18.0.0",
|
|
7
7
|
"quill": "1.3.7",
|
|
8
8
|
"quill2x": "npm:quill@2.0.3",
|
|
9
9
|
"parchment": "1.1.4",
|
|
10
|
-
"@libs-ui/components-label": "0.2.
|
|
10
|
+
"@libs-ui/components-label": "0.2.327-0",
|
|
11
11
|
"quill-delta": "5.1.0",
|
|
12
|
-
"@libs-ui/components-inputs-valid": "0.2.
|
|
13
|
-
"@libs-ui/components-modal": "0.2.
|
|
14
|
-
"@libs-ui/utils": "0.2.
|
|
15
|
-
"@libs-ui/components-buttons-button": "0.2.
|
|
16
|
-
"@libs-ui/components-buttons-select-color": "0.2.
|
|
17
|
-
"@libs-ui/components-dropdown": "0.2.
|
|
18
|
-
"@libs-ui/components-inputs-emoji": "0.2.
|
|
19
|
-
"@libs-ui/components-inputs-mention": "0.2.
|
|
20
|
-
"@libs-ui/components-list": "0.2.
|
|
21
|
-
"@libs-ui/components-popover": "0.2.
|
|
22
|
-
"@libs-ui/interfaces-types": "0.2.
|
|
23
|
-
"@libs-ui/services-dynamic-component": "0.2.
|
|
12
|
+
"@libs-ui/components-inputs-valid": "0.2.327-0",
|
|
13
|
+
"@libs-ui/components-modal": "0.2.327-0",
|
|
14
|
+
"@libs-ui/utils": "0.2.327-0",
|
|
15
|
+
"@libs-ui/components-buttons-button": "0.2.327-0",
|
|
16
|
+
"@libs-ui/components-buttons-select-color": "0.2.327-0",
|
|
17
|
+
"@libs-ui/components-dropdown": "0.2.327-0",
|
|
18
|
+
"@libs-ui/components-inputs-emoji": "0.2.327-0",
|
|
19
|
+
"@libs-ui/components-inputs-mention": "0.2.327-0",
|
|
20
|
+
"@libs-ui/components-list": "0.2.327-0",
|
|
21
|
+
"@libs-ui/components-popover": "0.2.327-0",
|
|
22
|
+
"@libs-ui/interfaces-types": "0.2.327-0",
|
|
23
|
+
"@libs-ui/services-dynamic-component": "0.2.327-0",
|
|
24
24
|
"@ngx-translate/core": "^15.0.0",
|
|
25
25
|
"rxjs": "~7.8.0",
|
|
26
|
-
"@libs-ui/components-spinner": "0.2.
|
|
27
|
-
"@libs-ui/services-notification": "0.2.
|
|
28
|
-
"@libs-ui/services-http-request": "0.2.
|
|
26
|
+
"@libs-ui/components-spinner": "0.2.327-0",
|
|
27
|
+
"@libs-ui/services-notification": "0.2.327-0",
|
|
28
|
+
"@libs-ui/services-http-request": "0.2.327-0"
|
|
29
29
|
},
|
|
30
30
|
"sideEffects": false,
|
|
31
31
|
"module": "fesm2022/libs-ui-components-inputs-quill.mjs",
|
package/quill.component.d.ts
CHANGED
|
@@ -33,6 +33,8 @@ export declare class LibsUiComponentsInputsQuillComponent implements OnInit, Aft
|
|
|
33
33
|
protected displayShowMoreToolbar: import("@angular/core").Signal<boolean>;
|
|
34
34
|
protected displaySkeleton: import("@angular/core").Signal<boolean>;
|
|
35
35
|
private timeCalculationToolBar;
|
|
36
|
+
private timerCalculatorToolbar;
|
|
37
|
+
private totalRecallCalculatorToolbar;
|
|
36
38
|
private popoverFunctionControl;
|
|
37
39
|
private quill;
|
|
38
40
|
private handlers;
|
package/quill2x.component.d.ts
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import { OnInit, TemplateRef, WritableSignal } from '@angular/core';
|
|
1
|
+
import { OnDestroy, OnInit, TemplateRef, WritableSignal } from '@angular/core';
|
|
2
2
|
import { IEmitSelectKey } from '@libs-ui/components-dropdown';
|
|
3
|
+
import { IValidLength, IValidRequired } from '@libs-ui/components-inputs-valid';
|
|
3
4
|
import { ILabel } from '@libs-ui/components-label';
|
|
4
5
|
import { IListConfigItem } from '@libs-ui/components-list';
|
|
5
6
|
import { TYPE_POPOVER_EVENT } from '@libs-ui/components-popover';
|
|
6
|
-
import {
|
|
7
|
+
import { IQuill2xToolbarConfig, IQuill2xBlotRegister, IQuill2xFunctionControlEvent, IQuill2xLink, IQuill2xSelectionChange, IQuill2xTextChange, IQuill2xUploadImageConfig, QUILL2X_TYPE_MODE_BAR_CONFIG_OPTION } from './interfaces/quill2x.interface';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class LibsUiComponentsInputsQuill2xComponent implements OnInit {
|
|
9
|
+
export declare class LibsUiComponentsInputsQuill2xComponent implements OnInit, OnDestroy {
|
|
9
10
|
private quill?;
|
|
10
11
|
private addEditLinkComponentRef;
|
|
11
12
|
private uploadImageComponentRef;
|
|
12
13
|
private handlers;
|
|
13
14
|
private timerSetFontSize;
|
|
15
|
+
private timerCalculatorToolbar;
|
|
16
|
+
private totalRecallCalculatorToolbar;
|
|
17
|
+
private isCalculatorToolbarSuccess;
|
|
18
|
+
protected borderColor: import("@angular/core").Signal<string>;
|
|
14
19
|
protected containerToolbarClass: import("@angular/core").Signal<string>;
|
|
15
20
|
protected containerEditorClass: import("@angular/core").Signal<string>;
|
|
16
21
|
protected showButtonMoreToolbar: import("@angular/core").Signal<boolean>;
|
|
@@ -26,23 +31,26 @@ export declare class LibsUiComponentsInputsQuill2xComponent implements OnInit {
|
|
|
26
31
|
protected iconAlignSelectedComputed: import("@angular/core").Signal<any>;
|
|
27
32
|
protected colorSelected: WritableSignal<boolean>;
|
|
28
33
|
protected backgroundSelected: WritableSignal<boolean>;
|
|
34
|
+
protected messageError: WritableSignal<string>;
|
|
29
35
|
protected size: WritableSignal<{
|
|
30
36
|
value: number;
|
|
31
37
|
}>;
|
|
32
|
-
protected link: WritableSignal<
|
|
38
|
+
protected link: WritableSignal<IQuill2xLink>;
|
|
33
39
|
protected showMoreAction: WritableSignal<boolean>;
|
|
34
|
-
protected toolbarOptionsConfig: WritableSignal<Array<
|
|
40
|
+
protected toolbarOptionsConfig: WritableSignal<Array<IQuill2xToolbarConfig>>;
|
|
35
41
|
protected loadingUploadImage: WritableSignal<boolean>;
|
|
36
|
-
readonly uploadImageConfig: import("@angular/core").InputSignalWithTransform<
|
|
42
|
+
readonly uploadImageConfig: import("@angular/core").InputSignalWithTransform<IQuill2xUploadImageConfig, IQuill2xUploadImageConfig | undefined>;
|
|
37
43
|
readonly placeholder: import("@angular/core").InputSignalWithTransform<string, string | undefined>;
|
|
38
|
-
readonly blotsRegister: import("@angular/core").InputSignal<
|
|
44
|
+
readonly blotsRegister: import("@angular/core").InputSignal<IQuill2xBlotRegister[] | undefined>;
|
|
39
45
|
readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, boolean | undefined>;
|
|
40
46
|
readonly quillCustomConfig: import("@angular/core").InputSignal<{
|
|
41
47
|
toolbar?: {
|
|
42
48
|
hidden?: boolean;
|
|
43
|
-
type:
|
|
44
|
-
options?: Array<
|
|
49
|
+
type: QUILL2X_TYPE_MODE_BAR_CONFIG_OPTION;
|
|
50
|
+
options?: Array<IQuill2xToolbarConfig>;
|
|
45
51
|
classCustomContainerToolbar?: string;
|
|
52
|
+
lessWidthToolbarRecallCalculator?: number;
|
|
53
|
+
maximumRecallCalculator?: number;
|
|
46
54
|
};
|
|
47
55
|
editor?: {
|
|
48
56
|
classCustomContainerEditor?: string;
|
|
@@ -60,8 +68,15 @@ export declare class LibsUiComponentsInputsQuill2xComponent implements OnInit {
|
|
|
60
68
|
title: string;
|
|
61
69
|
action: () => void;
|
|
62
70
|
}[] | undefined>;
|
|
71
|
+
readonly autoFocus: import("@angular/core").InputSignal<boolean | undefined>;
|
|
72
|
+
readonly focusBottom: import("@angular/core").InputSignal<boolean | undefined>;
|
|
73
|
+
readonly validRequired: import("@angular/core").InputSignal<IValidRequired | undefined>;
|
|
74
|
+
readonly validMinLength: import("@angular/core").InputSignal<IValidLength | undefined>;
|
|
75
|
+
readonly validMaxLength: import("@angular/core").InputSignal<IValidLength | undefined>;
|
|
76
|
+
readonly showErrorLabel: import("@angular/core").InputSignalWithTransform<boolean, boolean | undefined>;
|
|
77
|
+
readonly showErrorBorder: import("@angular/core").InputSignal<boolean | undefined>;
|
|
63
78
|
readonly outShowPopupEditLink: import("@angular/core").OutputEmitterRef<{
|
|
64
|
-
dataLink:
|
|
79
|
+
dataLink: IQuill2xLink;
|
|
65
80
|
callback: (linkEdit: {
|
|
66
81
|
title: string;
|
|
67
82
|
link: string;
|
|
@@ -71,10 +86,10 @@ export declare class LibsUiComponentsInputsQuill2xComponent implements OnInit {
|
|
|
71
86
|
readonly outBlur: import("@angular/core").OutputEmitterRef<void>;
|
|
72
87
|
readonly outFocus: import("@angular/core").OutputEmitterRef<void>;
|
|
73
88
|
readonly outChange: import("@angular/core").OutputEmitterRef<string>;
|
|
74
|
-
readonly outSelectionChange: import("@angular/core").OutputEmitterRef<
|
|
75
|
-
readonly outTextChange: import("@angular/core").OutputEmitterRef<
|
|
89
|
+
readonly outSelectionChange: import("@angular/core").OutputEmitterRef<IQuill2xSelectionChange>;
|
|
90
|
+
readonly outTextChange: import("@angular/core").OutputEmitterRef<IQuill2xTextChange>;
|
|
76
91
|
readonly outContextMenu: import("@angular/core").OutputEmitterRef<MouseEvent>;
|
|
77
|
-
readonly outFunctionsControl: import("@angular/core").OutputEmitterRef<
|
|
92
|
+
readonly outFunctionsControl: import("@angular/core").OutputEmitterRef<IQuill2xFunctionControlEvent>;
|
|
78
93
|
private readonly htmlContainer;
|
|
79
94
|
private readonly quillBodyContainer;
|
|
80
95
|
private readonly toolbarContainer;
|
|
@@ -85,8 +100,8 @@ export declare class LibsUiComponentsInputsQuill2xComponent implements OnInit {
|
|
|
85
100
|
private readonly translate;
|
|
86
101
|
private readonly cdr;
|
|
87
102
|
private readonly dynamicComponentService;
|
|
88
|
-
ngOnInit(): void
|
|
89
|
-
get FunctionsControl():
|
|
103
|
+
ngOnInit(): Promise<void>;
|
|
104
|
+
get FunctionsControl(): IQuill2xFunctionControlEvent;
|
|
90
105
|
protected handlerChangeShowMoreAction(event: Event): void;
|
|
91
106
|
protected handleSelectFont(event: IEmitSelectKey | undefined): void;
|
|
92
107
|
protected handleSelectHeader(event: IEmitSelectKey | undefined): void;
|
|
@@ -94,6 +109,8 @@ export declare class LibsUiComponentsInputsQuill2xComponent implements OnInit {
|
|
|
94
109
|
protected handleSelectAlign(event: IEmitSelectKey | undefined): void;
|
|
95
110
|
protected handlerSetFormat(type: string, data: string | number): void;
|
|
96
111
|
protected handlerInsertEmoji(emoji: unknown): void;
|
|
112
|
+
protected handlerUnlink(event: Event): void;
|
|
113
|
+
protected handlerEditLink(event: Event): void;
|
|
97
114
|
private handleTable;
|
|
98
115
|
private handleUndo;
|
|
99
116
|
private handleRedo;
|
|
@@ -102,6 +119,7 @@ export declare class LibsUiComponentsInputsQuill2xComponent implements OnInit {
|
|
|
102
119
|
private handlerSelectionChange;
|
|
103
120
|
private handlerPaste;
|
|
104
121
|
private handlerTextChange;
|
|
122
|
+
private validate;
|
|
105
123
|
private updateHandlerFunction;
|
|
106
124
|
private noPreventEmbedDeletion;
|
|
107
125
|
private setFontSizeSelected;
|
|
@@ -116,11 +134,12 @@ export declare class LibsUiComponentsInputsQuill2xComponent implements OnInit {
|
|
|
116
134
|
private insertImage;
|
|
117
135
|
protected handlerPopoverEvent(event: TYPE_POPOVER_EVENT): void;
|
|
118
136
|
private insertLink;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
private handlerUnInsertLink;
|
|
137
|
+
private handleShowUploadLink;
|
|
138
|
+
private updateValueByRootQuillHtml;
|
|
139
|
+
private convertInnerHTMLAndSetValue;
|
|
123
140
|
private removeUnwantedPart;
|
|
141
|
+
private focus;
|
|
142
|
+
ngOnDestroy(): void;
|
|
124
143
|
static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiComponentsInputsQuill2xComponent, never>;
|
|
125
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LibsUiComponentsInputsQuill2xComponent, "libs_ui-components-inputs-quill2x", never, { "uploadImageConfig": { "alias": "uploadImageConfig"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "blotsRegister": { "alias": "blotsRegister"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "quillCustomConfig": { "alias": "quillCustomConfig"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "item": { "alias": "item"; "required": true; "isSignal": true; }; "fieldBind": { "alias": "fieldBind"; "required": true; "isSignal": true; }; "autoUpdateValueWhenTextChange": { "alias": "autoUpdateValueWhenTextChange"; "required": false; "isSignal": true; }; "templateToolBarPersonalize": { "alias": "templateToolBarPersonalize"; "required": false; "isSignal": true; }; "zIndex": { "alias": "zIndex"; "required": false; "isSignal": true; }; "ignoreShowPopupEditLink": { "alias": "ignoreShowPopupEditLink"; "required": false; "isSignal": true; }; "ignoreCommunicateMicroEventPopup": { "alias": "ignoreCommunicateMicroEventPopup"; "required": false; "isSignal": true; }; "handlersExpand": { "alias": "handlersExpand"; "required": false; "isSignal": true; }; }, { "item": "itemChange"; "outShowPopupEditLink": "outShowPopupEditLink"; "outMessageError": "outMessageError"; "outBlur": "outBlur"; "outFocus": "outFocus"; "outChange": "outChange"; "outSelectionChange": "outSelectionChange"; "outTextChange": "outTextChange"; "outContextMenu": "outContextMenu"; "outFunctionsControl": "outFunctionsControl"; }, never, never, true, never>;
|
|
144
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LibsUiComponentsInputsQuill2xComponent, "libs_ui-components-inputs-quill2x", never, { "uploadImageConfig": { "alias": "uploadImageConfig"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "blotsRegister": { "alias": "blotsRegister"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "quillCustomConfig": { "alias": "quillCustomConfig"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "item": { "alias": "item"; "required": true; "isSignal": true; }; "fieldBind": { "alias": "fieldBind"; "required": true; "isSignal": true; }; "autoUpdateValueWhenTextChange": { "alias": "autoUpdateValueWhenTextChange"; "required": false; "isSignal": true; }; "templateToolBarPersonalize": { "alias": "templateToolBarPersonalize"; "required": false; "isSignal": true; }; "zIndex": { "alias": "zIndex"; "required": false; "isSignal": true; }; "ignoreShowPopupEditLink": { "alias": "ignoreShowPopupEditLink"; "required": false; "isSignal": true; }; "ignoreCommunicateMicroEventPopup": { "alias": "ignoreCommunicateMicroEventPopup"; "required": false; "isSignal": true; }; "handlersExpand": { "alias": "handlersExpand"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "focusBottom": { "alias": "focusBottom"; "required": false; "isSignal": true; }; "validRequired": { "alias": "validRequired"; "required": false; "isSignal": true; }; "validMinLength": { "alias": "validMinLength"; "required": false; "isSignal": true; }; "validMaxLength": { "alias": "validMaxLength"; "required": false; "isSignal": true; }; "showErrorLabel": { "alias": "showErrorLabel"; "required": false; "isSignal": true; }; "showErrorBorder": { "alias": "showErrorBorder"; "required": false; "isSignal": true; }; }, { "item": "itemChange"; "outShowPopupEditLink": "outShowPopupEditLink"; "outMessageError": "outMessageError"; "outBlur": "outBlur"; "outFocus": "outFocus"; "outChange": "outChange"; "outSelectionChange": "outSelectionChange"; "outTextChange": "outTextChange"; "outContextMenu": "outContextMenu"; "outFunctionsControl": "outFunctionsControl"; }, never, never, true, never>;
|
|
126
145
|
}
|