@libs-ui/components-inputs-quill 0.2.127 → 0.2.128
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/interfaces/quill.interface.mjs +1 -1
- package/esm2022/quill.component.mjs +61 -61
- package/esm2022/upload-image/upload-image.component.mjs +1 -1
- package/esm2022/utils/quill.define.mjs +94 -67
- package/fesm2022/libs-ui-components-inputs-quill.mjs +152 -125
- package/fesm2022/libs-ui-components-inputs-quill.mjs.map +1 -1
- package/interfaces/quill.interface.d.ts +19 -4
- package/package.json +1 -1
- package/quill.component.d.ts +16 -14
- package/upload-image/upload-image.component.d.ts +2 -2
- package/utils/quill.define.d.ts +4 -5
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ILabel } from "@libs-ui/components-label";
|
|
2
|
-
|
|
2
|
+
import Quill, { RangeStatic, Sources } from 'quill';
|
|
3
|
+
export type TYPE_MODE_BAR_CONFIG_OPTION = 'default' | 'basic' | 'custom';
|
|
4
|
+
export interface IQuillToolbarConfig {
|
|
3
5
|
undo?: boolean;
|
|
4
6
|
redo?: boolean;
|
|
5
7
|
fontFamily?: boolean;
|
|
@@ -23,13 +25,15 @@ export interface IToolbarConfig {
|
|
|
23
25
|
image?: boolean;
|
|
24
26
|
classInclude?: string;
|
|
25
27
|
type: string;
|
|
28
|
+
mode?: Array<TYPE_MODE_BAR_CONFIG_OPTION>;
|
|
29
|
+
width: number;
|
|
26
30
|
}
|
|
27
|
-
export interface
|
|
31
|
+
export interface IQuillEventSave {
|
|
28
32
|
link: string;
|
|
29
33
|
width?: number;
|
|
30
34
|
height?: number;
|
|
31
35
|
}
|
|
32
|
-
export interface
|
|
36
|
+
export interface IQuillUploadImageConfig {
|
|
33
37
|
modeCustom: boolean;
|
|
34
38
|
showIcon?: boolean;
|
|
35
39
|
zIndex?: number;
|
|
@@ -48,7 +52,7 @@ export interface IQuillFunctionControlEvent {
|
|
|
48
52
|
setColor: (color: string) => Promise<void>;
|
|
49
53
|
setBackground: (color: string) => Promise<void>;
|
|
50
54
|
}
|
|
51
|
-
export interface
|
|
55
|
+
export interface IQuillLink {
|
|
52
56
|
title: string;
|
|
53
57
|
url: string;
|
|
54
58
|
range: {
|
|
@@ -56,3 +60,14 @@ export interface ILink {
|
|
|
56
60
|
length: number;
|
|
57
61
|
};
|
|
58
62
|
}
|
|
63
|
+
export interface IQuillBlotRegister {
|
|
64
|
+
component: any;
|
|
65
|
+
className: string;
|
|
66
|
+
style: string;
|
|
67
|
+
}
|
|
68
|
+
export interface IQuillSelectionChange {
|
|
69
|
+
quill: Quill;
|
|
70
|
+
range: RangeStatic;
|
|
71
|
+
oldRange: RangeStatic;
|
|
72
|
+
source: Sources;
|
|
73
|
+
}
|
package/package.json
CHANGED
package/quill.component.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { IValidLength, IValidRequired } from '@libs-ui/components-inputs-valid';
|
|
|
5
5
|
import { ILabel } from '@libs-ui/components-label';
|
|
6
6
|
import { IListConfigItem } from '@libs-ui/components-list';
|
|
7
7
|
import { IPopoverFunctionControlEvent, TYPE_POPOVER_EVENT } from '@libs-ui/components-popover';
|
|
8
|
-
import {
|
|
8
|
+
import { IQuillBlotRegister, IQuillLink, IQuillFunctionControlEvent, IQuillSelectionChange, IQuillToolbarConfig, IQuillUploadImageConfig, TYPE_MODE_BAR_CONFIG_OPTION } from './interfaces/quill.interface';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
export declare class LibsUiComponentsInputsQuillComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
11
11
|
protected messageError: import("@angular/core").WritableSignal<string>;
|
|
@@ -22,21 +22,25 @@ export declare class LibsUiComponentsInputsQuillComponent implements OnInit, Aft
|
|
|
22
22
|
protected itemHiddenExpand: import("@angular/core").WritableSignal<number[]>;
|
|
23
23
|
protected itemHidden: import("@angular/core").WritableSignal<number[]>;
|
|
24
24
|
protected showMoreAction: import("@angular/core").WritableSignal<boolean>;
|
|
25
|
-
protected link: import("@angular/core").WritableSignal<
|
|
26
|
-
protected
|
|
25
|
+
protected link: import("@angular/core").WritableSignal<IQuillLink>;
|
|
26
|
+
protected toolbarOptionsConfig: import("@angular/core").Signal<IQuillToolbarConfig[]>;
|
|
27
|
+
private timeCalculationToolBar;
|
|
27
28
|
private popoverFunctionControl;
|
|
28
29
|
private quill;
|
|
29
30
|
private handlers;
|
|
30
31
|
private showMention;
|
|
31
32
|
private addEditLinkComponentRef;
|
|
32
33
|
private uploadImageComponentRef;
|
|
34
|
+
private onDestroy;
|
|
33
35
|
private dynamicComponentService;
|
|
34
36
|
private translate;
|
|
35
|
-
|
|
36
|
-
readonly
|
|
37
|
-
readonly toolbarCustom: import("@angular/core").InputSignal<IToolbarConfig[] | undefined>;
|
|
38
|
-
readonly showToolBar: import("@angular/core").InputSignal<boolean | undefined>;
|
|
37
|
+
readonly isShowToolBar: import("@angular/core").InputSignalWithTransform<boolean, boolean | undefined>;
|
|
38
|
+
readonly isToolbarPositonFixed: import("@angular/core").InputSignalWithTransform<boolean, boolean | undefined>;
|
|
39
39
|
readonly classIncludeToolbar: import("@angular/core").InputSignal<string>;
|
|
40
|
+
readonly toolbarConfig: import("@angular/core").InputSignal<{
|
|
41
|
+
type: TYPE_MODE_BAR_CONFIG_OPTION;
|
|
42
|
+
config?: Array<IQuillToolbarConfig>;
|
|
43
|
+
} | undefined>;
|
|
40
44
|
readonly placeholder: import("@angular/core").InputSignalWithTransform<string, string | undefined>;
|
|
41
45
|
readonly label: import("@angular/core").InputSignal<ILabel | undefined>;
|
|
42
46
|
readonly item: import("@angular/core").ModelSignal<Record<string, unknown> | undefined>;
|
|
@@ -54,28 +58,28 @@ export declare class LibsUiComponentsInputsQuillComponent implements OnInit, Aft
|
|
|
54
58
|
readonly validRequired: import("@angular/core").InputSignal<IValidRequired | undefined>;
|
|
55
59
|
readonly validMinLength: import("@angular/core").InputSignal<IValidLength | undefined>;
|
|
56
60
|
readonly validMaxLength: import("@angular/core").InputSignal<IValidLength | undefined>;
|
|
57
|
-
readonly onlyShowContent: import("@angular/core").InputSignal<boolean>;
|
|
58
61
|
readonly zIndex: import("@angular/core").InputSignalWithTransform<number, number | undefined>;
|
|
59
62
|
readonly dataConfigMention: import("@angular/core").InputSignal<IMentionConfig | undefined>;
|
|
63
|
+
readonly blotsRegister: import("@angular/core").InputSignal<IQuillBlotRegister[] | undefined>;
|
|
60
64
|
readonly heightAuto: import("@angular/core").InputSignal<boolean | undefined>;
|
|
61
65
|
readonly autoFocus: import("@angular/core").InputSignal<boolean | undefined>;
|
|
62
66
|
readonly autoFocusBottom: import("@angular/core").InputSignal<boolean | undefined>;
|
|
63
67
|
readonly templateToolBarPersonalize: import("@angular/core").InputSignal<TemplateRef<any> | undefined>;
|
|
64
68
|
readonly template: import("@angular/core").InputSignal<TemplateRef<any> | undefined>;
|
|
65
|
-
readonly uploadImageConfig: import("@angular/core").InputSignalWithTransform<
|
|
69
|
+
readonly uploadImageConfig: import("@angular/core").InputSignalWithTransform<IQuillUploadImageConfig, IQuillUploadImageConfig | undefined>;
|
|
66
70
|
readonly outMessageError: import("@angular/core").OutputEmitterRef<string>;
|
|
67
71
|
readonly outBlur: import("@angular/core").OutputEmitterRef<void>;
|
|
68
72
|
readonly outFocus: import("@angular/core").OutputEmitterRef<void>;
|
|
69
73
|
readonly outChange: import("@angular/core").OutputEmitterRef<string>;
|
|
70
74
|
readonly outFunctionsControl: import("@angular/core").OutputEmitterRef<IQuillFunctionControlEvent>;
|
|
71
|
-
readonly outSelectionChange: import("@angular/core").OutputEmitterRef<
|
|
75
|
+
readonly outSelectionChange: import("@angular/core").OutputEmitterRef<IQuillSelectionChange>;
|
|
72
76
|
readonly wrapperEditorEl: import("@angular/core").Signal<ElementRef<any> | undefined>;
|
|
73
77
|
readonly editorEl: import("@angular/core").Signal<ElementRef<any> | undefined>;
|
|
74
78
|
readonly quillOptionEl: import("@angular/core").Signal<ElementRef<any> | undefined>;
|
|
75
79
|
readonly quillEditorEl: import("@angular/core").Signal<ElementRef<any> | undefined>;
|
|
76
|
-
readonly quillToolbarEl: import("@angular/core").Signal<ElementRef<any> | undefined>;
|
|
77
80
|
readonly toolbarItemsEl: import("@angular/core").Signal<ElementRef<any> | undefined>;
|
|
78
81
|
readonly itemsEl: import("@angular/core").Signal<readonly ElementRef<any>[]>;
|
|
82
|
+
constructor();
|
|
79
83
|
ngOnInit(): void;
|
|
80
84
|
ngAfterViewInit(): void;
|
|
81
85
|
private initQuill;
|
|
@@ -110,13 +114,11 @@ export declare class LibsUiComponentsInputsQuillComponent implements OnInit, Aft
|
|
|
110
114
|
private insertMention;
|
|
111
115
|
protected handlerInsertMention(data: IMentionInsert): void;
|
|
112
116
|
protected setFontSize(size: number): Promise<void>;
|
|
113
|
-
protected setColor(color: string): Promise<void>;
|
|
114
|
-
protected setBackground(color: string): Promise<void>;
|
|
115
117
|
protected handlerValueChange(value: number | string): void;
|
|
116
118
|
protected handleSelectAlign(event: IEmitSelectKey | undefined): void;
|
|
117
119
|
protected handleSelectFont(event: IEmitSelectKey | undefined): void;
|
|
118
120
|
protected handlerChangeShowMoreAction(event: Event): void;
|
|
119
121
|
ngOnDestroy(): void;
|
|
120
122
|
static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiComponentsInputsQuillComponent, never>;
|
|
121
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LibsUiComponentsInputsQuillComponent, "libs_ui-components-inputs-quill", never, { "
|
|
123
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LibsUiComponentsInputsQuillComponent, "libs_ui-components-inputs-quill", never, { "isShowToolBar": { "alias": "isShowToolBar"; "required": false; "isSignal": true; }; "isToolbarPositonFixed": { "alias": "isToolbarPositonFixed"; "required": false; "isSignal": true; }; "classIncludeToolbar": { "alias": "classIncludeToolbar"; "required": false; "isSignal": true; }; "toolbarConfig": { "alias": "toolbarConfig"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "item": { "alias": "item"; "required": false; "isSignal": true; }; "fieldNameBind": { "alias": "fieldNameBind"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "showErrorLabel": { "alias": "showErrorLabel"; "required": false; "isSignal": true; }; "showErrorBorder": { "alias": "showErrorBorder"; "required": false; "isSignal": true; }; "onlyShowErrorBorderInContent": { "alias": "onlyShowErrorBorderInContent"; "required": false; "isSignal": true; }; "classIncludeTemplate": { "alias": "classIncludeTemplate"; "required": false; "isSignal": true; }; "classInclude": { "alias": "classInclude"; "required": false; "isSignal": true; }; "handlersExpand": { "alias": "handlersExpand"; "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; }; "zIndex": { "alias": "zIndex"; "required": false; "isSignal": true; }; "dataConfigMention": { "alias": "dataConfigMention"; "required": false; "isSignal": true; }; "blotsRegister": { "alias": "blotsRegister"; "required": false; "isSignal": true; }; "heightAuto": { "alias": "heightAuto"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "autoFocusBottom": { "alias": "autoFocusBottom"; "required": false; "isSignal": true; }; "templateToolBarPersonalize": { "alias": "templateToolBarPersonalize"; "required": false; "isSignal": true; }; "template": { "alias": "template"; "required": false; "isSignal": true; }; "uploadImageConfig": { "alias": "uploadImageConfig"; "required": false; "isSignal": true; }; }, { "item": "itemChange"; "outMessageError": "outMessageError"; "outBlur": "outBlur"; "outFocus": "outFocus"; "outChange": "outChange"; "outFunctionsControl": "outFunctionsControl"; "outSelectionChange": "outSelectionChange"; }, never, never, true, never>;
|
|
122
124
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { IButton } from '@libs-ui/components-buttons-button';
|
|
2
2
|
import { TYPE_MODAL_EVENT } from '@libs-ui/components-modal';
|
|
3
|
-
import {
|
|
3
|
+
import { IQuillUploadImageConfig } from '../interfaces/quill.interface';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class LibsUiComponentsInputsQuillUploadImageComponent {
|
|
6
6
|
protected buttonFooter: import("@angular/core").WritableSignal<IButton[]>;
|
|
7
7
|
protected disable: import("@angular/core").WritableSignal<boolean>;
|
|
8
|
-
readonly uploadImageConfig: import("@angular/core").InputSignal<
|
|
8
|
+
readonly uploadImageConfig: import("@angular/core").InputSignal<IQuillUploadImageConfig>;
|
|
9
9
|
readonly outClose: import("@angular/core").OutputEmitterRef<string | void>;
|
|
10
10
|
private handlerSaveImage;
|
|
11
11
|
protected handlerEventModal(event: TYPE_MODAL_EVENT): void;
|
package/utils/quill.define.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IListConfigItem } from '@libs-ui/components-list';
|
|
2
|
-
import {
|
|
2
|
+
import { IQuillLink, IQuillToolbarConfig, IQuillUploadImageConfig, TYPE_MODE_BAR_CONFIG_OPTION } from '../interfaces/quill.interface';
|
|
3
3
|
export declare const listDataAlign: () => {
|
|
4
4
|
key: string;
|
|
5
5
|
icon: string;
|
|
@@ -10,11 +10,10 @@ export declare const listFont: () => {
|
|
|
10
10
|
}[];
|
|
11
11
|
export declare const listConfigAlign: () => IListConfigItem;
|
|
12
12
|
export declare const listConfigFont: () => IListConfigItem;
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const toolBarOptionBasics: () => Array<IToolbarConfig>;
|
|
13
|
+
export declare const toolBarOptions: (mode: TYPE_MODE_BAR_CONFIG_OPTION, hasIconImage: boolean, hasIconPersonalize: boolean) => Array<IQuillToolbarConfig>;
|
|
15
14
|
export declare const iconList: () => Array<{
|
|
16
15
|
key: string;
|
|
17
16
|
icon: string;
|
|
18
17
|
}>;
|
|
19
|
-
export declare const uploadImageConfigDefault: () =>
|
|
20
|
-
export declare const linkDefault: () =>
|
|
18
|
+
export declare const uploadImageConfigDefault: () => IQuillUploadImageConfig;
|
|
19
|
+
export declare const linkDefault: () => IQuillLink;
|