@libs-ui/components-inputs-quill 0.2.145 → 0.2.147

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.
@@ -9,6 +9,8 @@ import { TYPE_OBJECT } from '@libs-ui/interfaces-types';
9
9
  import { IQuillBlotRegister, IQuillFunctionControlEvent, IQuillLink, IQuillSelectionChange, IQuillTextChange, IQuillToolbarConfig, IQuillUploadImageConfig, TYPE_MODE_BAR_CONFIG_OPTION } from './interfaces/quill.interface';
10
10
  import * as i0 from "@angular/core";
11
11
  export declare class LibsUiComponentsInputsQuillComponent implements OnInit, AfterViewInit, OnDestroy {
12
+ protected loadingUploadImage: import("@angular/core").WritableSignal<boolean>;
13
+ protected readonly timeDelayInit: import("@angular/core").WritableSignal<number>;
12
14
  protected messageError: import("@angular/core").WritableSignal<string>;
13
15
  protected display: import("@angular/core").WritableSignal<boolean>;
14
16
  protected listConfigAlign: import("@angular/core").WritableSignal<IListConfigItem>;
@@ -36,7 +38,7 @@ export declare class LibsUiComponentsInputsQuillComponent implements OnInit, Aft
36
38
  private dynamicComponentService;
37
39
  private translate;
38
40
  readonly isShowToolBar: import("@angular/core").InputSignalWithTransform<boolean, boolean | undefined>;
39
- readonly isToolbarPositonFixed: import("@angular/core").InputSignalWithTransform<boolean, boolean | undefined>;
41
+ readonly isToolbarPositionFixed: import("@angular/core").InputSignalWithTransform<boolean, boolean | undefined>;
40
42
  readonly classIncludeToolbar: import("@angular/core").InputSignal<string>;
41
43
  readonly stylesIncludeToolbar: import("@angular/core").InputSignal<TYPE_OBJECT | undefined>;
42
44
  readonly toolbarConfig: import("@angular/core").InputSignal<{
@@ -65,7 +67,7 @@ export declare class LibsUiComponentsInputsQuillComponent implements OnInit, Aft
65
67
  readonly blotsRegister: import("@angular/core").InputSignal<IQuillBlotRegister[] | undefined>;
66
68
  readonly heightAuto: import("@angular/core").InputSignal<boolean | undefined>;
67
69
  readonly autoFocus: import("@angular/core").InputSignal<boolean | undefined>;
68
- readonly autoFocusBottom: import("@angular/core").InputSignal<boolean | undefined>;
70
+ readonly blockUndoRedoKeyboard: import("@angular/core").InputSignal<boolean | undefined>;
69
71
  readonly templateToolBarPersonalize: import("@angular/core").InputSignal<TemplateRef<any> | undefined>;
70
72
  readonly template: import("@angular/core").InputSignal<TemplateRef<any> | undefined>;
71
73
  readonly uploadImageConfig: import("@angular/core").InputSignalWithTransform<IQuillUploadImageConfig, IQuillUploadImageConfig | undefined>;
@@ -85,9 +87,10 @@ export declare class LibsUiComponentsInputsQuillComponent implements OnInit, Aft
85
87
  readonly itemsEl: import("@angular/core").Signal<readonly ElementRef<any>[]>;
86
88
  constructor();
87
89
  ngOnInit(): void;
88
- ngAfterViewInit(): void;
90
+ ngAfterViewInit(): Promise<void>;
89
91
  private initQuill;
90
- private preventEmbedDeletion;
92
+ private setupUndoRedoBlocking;
93
+ private noPreventEmbedDeletion;
91
94
  private setHandlerFunction;
92
95
  private adjustIndexForImages;
93
96
  private handlerSelectionChange;
@@ -115,6 +118,7 @@ export declare class LibsUiComponentsInputsQuillComponent implements OnInit, Aft
115
118
  private setStyleForContent;
116
119
  protected handleToggleMention(show: boolean): void;
117
120
  private handlerShowUploadImage;
121
+ private uploadImagesAndInsert;
118
122
  private insertMention;
119
123
  protected handlerInsertMention(data: IMentionInsert): void;
120
124
  protected setFontSize(size: number): Promise<void>;
@@ -124,5 +128,5 @@ export declare class LibsUiComponentsInputsQuillComponent implements OnInit, Aft
124
128
  protected handlerChangeShowMoreAction(event: Event): void;
125
129
  ngOnDestroy(): void;
126
130
  static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiComponentsInputsQuillComponent, never>;
127
- 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; }; "stylesIncludeToolbar": { "alias": "stylesIncludeToolbar"; "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"; "outTextChange": "outTextChange"; "outContextMenu": "outContextMenu"; }, never, never, true, never>;
131
+ static ɵcmp: i0.ɵɵComponentDeclaration<LibsUiComponentsInputsQuillComponent, "libs_ui-components-inputs-quill", never, { "isShowToolBar": { "alias": "isShowToolBar"; "required": false; "isSignal": true; }; "isToolbarPositionFixed": { "alias": "isToolbarPositionFixed"; "required": false; "isSignal": true; }; "classIncludeToolbar": { "alias": "classIncludeToolbar"; "required": false; "isSignal": true; }; "stylesIncludeToolbar": { "alias": "stylesIncludeToolbar"; "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; }; "blockUndoRedoKeyboard": { "alias": "blockUndoRedoKeyboard"; "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"; "outTextChange": "outTextChange"; "outContextMenu": "outContextMenu"; }, never, never, true, never>;
128
132
  }
@@ -1,34 +0,0 @@
1
- import Quill from "quill";
2
- const Embed = Quill.import("blots/embed");
3
- export class QuillMentionBlot extends Embed {
4
- static create(data) {
5
- const node = super.create();
6
- node.innerText += data.value;
7
- node.setAttribute('id', data.id);
8
- node.setAttribute('feId', data.feId);
9
- node.setAttribute('value', data.value);
10
- return node;
11
- }
12
- static value(domNode) {
13
- return {
14
- id: domNode.getAttribute('id'),
15
- feId: domNode.getAttribute('feId'),
16
- value: domNode.getAttribute('value')
17
- };
18
- }
19
- attach() {
20
- super.attach();
21
- if (!this.mounted) {
22
- this.mounted = true;
23
- this.clickHandler = this.getClickHandler;
24
- this.domNode.addEventListener("click", this.clickHandler, false);
25
- }
26
- }
27
- getClickHandler(event) {
28
- event.stopPropagation();
29
- }
30
- }
31
- QuillMentionBlot.blotName = "mention";
32
- QuillMentionBlot.tagName = "span";
33
- QuillMentionBlot.className = "libs-ui-quill-mention";
34
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVudGlvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvaW5wdXRzL3F1aWxsL3NyYy9tZW50aW9uL21lbnRpb24uY29tcG9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