@libs-ui/components-inputs-quill 0.2.325-0 → 0.2.326-1

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/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './quill.component';
2
+ export * from './quill2x.component';
2
3
  export * from './interfaces/quill.interface';
package/package.json CHANGED
@@ -1,30 +1,31 @@
1
1
  {
2
2
  "name": "@libs-ui/components-inputs-quill",
3
- "version": "0.2.325-0",
3
+ "version": "0.2.326-1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=18.0.0",
6
6
  "@angular/core": ">=18.0.0",
7
7
  "quill": "1.3.7",
8
+ "quill2x": "npm:quill@2.0.3",
8
9
  "parchment": "1.1.4",
9
- "@libs-ui/components-label": "0.2.325-0",
10
+ "@libs-ui/components-label": "0.2.326-1",
10
11
  "quill-delta": "5.1.0",
11
- "@libs-ui/components-inputs-valid": "0.2.325-0",
12
- "@libs-ui/components-modal": "0.2.325-0",
13
- "@libs-ui/utils": "0.2.325-0",
14
- "@libs-ui/components-buttons-button": "0.2.325-0",
15
- "@libs-ui/components-buttons-select-color": "0.2.325-0",
16
- "@libs-ui/components-dropdown": "0.2.325-0",
17
- "@libs-ui/components-inputs-emoji": "0.2.325-0",
18
- "@libs-ui/components-inputs-mention": "0.2.325-0",
19
- "@libs-ui/components-list": "0.2.325-0",
20
- "@libs-ui/components-popover": "0.2.325-0",
21
- "@libs-ui/interfaces-types": "0.2.325-0",
22
- "@libs-ui/services-dynamic-component": "0.2.325-0",
12
+ "@libs-ui/components-inputs-valid": "0.2.326-1",
13
+ "@libs-ui/components-modal": "0.2.326-1",
14
+ "@libs-ui/utils": "0.2.326-1",
15
+ "@libs-ui/components-buttons-button": "0.2.326-1",
16
+ "@libs-ui/components-buttons-select-color": "0.2.326-1",
17
+ "@libs-ui/components-dropdown": "0.2.326-1",
18
+ "@libs-ui/components-inputs-emoji": "0.2.326-1",
19
+ "@libs-ui/components-inputs-mention": "0.2.326-1",
20
+ "@libs-ui/components-list": "0.2.326-1",
21
+ "@libs-ui/components-popover": "0.2.326-1",
22
+ "@libs-ui/interfaces-types": "0.2.326-1",
23
+ "@libs-ui/services-dynamic-component": "0.2.326-1",
23
24
  "@ngx-translate/core": "^15.0.0",
24
25
  "rxjs": "~7.8.0",
25
- "@libs-ui/components-spinner": "0.2.325-0",
26
- "@libs-ui/services-notification": "0.2.325-0",
27
- "@libs-ui/services-http-request": "0.2.325-0"
26
+ "@libs-ui/components-spinner": "0.2.326-1",
27
+ "@libs-ui/services-notification": "0.2.326-1",
28
+ "@libs-ui/services-http-request": "0.2.326-1"
28
29
  },
29
30
  "sideEffects": false,
30
31
  "module": "fesm2022/libs-ui-components-inputs-quill.mjs",
@@ -0,0 +1,126 @@
1
+ import { OnInit, TemplateRef, WritableSignal } from '@angular/core';
2
+ import { IEmitSelectKey } from '@libs-ui/components-dropdown';
3
+ import { ILabel } from '@libs-ui/components-label';
4
+ import { IListConfigItem } from '@libs-ui/components-list';
5
+ import { TYPE_POPOVER_EVENT } from '@libs-ui/components-popover';
6
+ import { IQuillBlotRegister, IQuillFunctionControlEvent, IQuillLink, IQuillSelectionChange, IQuillTextChange, IQuillToolbarConfig, IQuillUploadImageConfig, TYPE_MODE_BAR_CONFIG_OPTION } from './interfaces/quill.interface';
7
+ import * as i0 from "@angular/core";
8
+ export declare class LibsUiComponentsInputsQuill2xComponent implements OnInit {
9
+ private quill?;
10
+ private addEditLinkComponentRef;
11
+ private uploadImageComponentRef;
12
+ private handlers;
13
+ private timerSetFontSize;
14
+ protected containerToolbarClass: import("@angular/core").Signal<string>;
15
+ protected containerEditorClass: import("@angular/core").Signal<string>;
16
+ protected showButtonMoreToolbar: import("@angular/core").Signal<boolean>;
17
+ protected displaySkeletonToolbar: import("@angular/core").Signal<boolean>;
18
+ protected labelFontSelectedComputed: import("@angular/core").Signal<any>;
19
+ protected fontSelected: WritableSignal<IEmitSelectKey | undefined>;
20
+ protected listConfigFont: WritableSignal<IListConfigItem>;
21
+ protected listConfigHeader: WritableSignal<IListConfigItem>;
22
+ protected headerSelected: WritableSignal<IEmitSelectKey | undefined>;
23
+ protected labelHeaderSelectedComputed: import("@angular/core").Signal<any>;
24
+ protected listConfigAlign: WritableSignal<IListConfigItem>;
25
+ protected alignSelected: WritableSignal<IEmitSelectKey | undefined>;
26
+ protected iconAlignSelectedComputed: import("@angular/core").Signal<any>;
27
+ protected colorSelected: WritableSignal<boolean>;
28
+ protected backgroundSelected: WritableSignal<boolean>;
29
+ protected size: WritableSignal<{
30
+ value: number;
31
+ }>;
32
+ protected link: WritableSignal<IQuillLink>;
33
+ protected showMoreAction: WritableSignal<boolean>;
34
+ protected toolbarOptionsConfig: WritableSignal<Array<IQuillToolbarConfig>>;
35
+ protected loadingUploadImage: WritableSignal<boolean>;
36
+ readonly uploadImageConfig: import("@angular/core").InputSignalWithTransform<IQuillUploadImageConfig, IQuillUploadImageConfig | undefined>;
37
+ readonly placeholder: import("@angular/core").InputSignalWithTransform<string, string | undefined>;
38
+ readonly blotsRegister: import("@angular/core").InputSignal<IQuillBlotRegister[] | undefined>;
39
+ readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, boolean | undefined>;
40
+ readonly quillCustomConfig: import("@angular/core").InputSignal<{
41
+ toolbar?: {
42
+ hidden?: boolean;
43
+ type: TYPE_MODE_BAR_CONFIG_OPTION;
44
+ options?: Array<IQuillToolbarConfig>;
45
+ classCustomContainerToolbar?: string;
46
+ };
47
+ editor?: {
48
+ classCustomContainerEditor?: string;
49
+ };
50
+ } | undefined>;
51
+ readonly label: import("@angular/core").InputSignal<ILabel | undefined>;
52
+ readonly item: import("@angular/core").ModelSignal<Record<string, unknown>>;
53
+ readonly fieldBind: import("@angular/core").InputSignal<string>;
54
+ readonly autoUpdateValueWhenTextChange: import("@angular/core").InputSignalWithTransform<boolean, boolean | undefined>;
55
+ readonly templateToolBarPersonalize: import("@angular/core").InputSignal<TemplateRef<any> | undefined>;
56
+ readonly zIndex: import("@angular/core").InputSignalWithTransform<number, number | undefined>;
57
+ readonly ignoreShowPopupEditLink: import("@angular/core").InputSignal<boolean | undefined>;
58
+ readonly ignoreCommunicateMicroEventPopup: import("@angular/core").InputSignal<boolean | undefined>;
59
+ readonly handlersExpand: import("@angular/core").InputSignal<{
60
+ title: string;
61
+ action: () => void;
62
+ }[] | undefined>;
63
+ readonly outShowPopupEditLink: import("@angular/core").OutputEmitterRef<{
64
+ dataLink: IQuillLink;
65
+ callback: (linkEdit: {
66
+ title: string;
67
+ link: string;
68
+ }) => Promise<void>;
69
+ }>;
70
+ readonly outMessageError: import("@angular/core").OutputEmitterRef<string>;
71
+ readonly outBlur: import("@angular/core").OutputEmitterRef<void>;
72
+ readonly outFocus: import("@angular/core").OutputEmitterRef<void>;
73
+ readonly outChange: import("@angular/core").OutputEmitterRef<string>;
74
+ readonly outSelectionChange: import("@angular/core").OutputEmitterRef<IQuillSelectionChange>;
75
+ readonly outTextChange: import("@angular/core").OutputEmitterRef<IQuillTextChange>;
76
+ readonly outContextMenu: import("@angular/core").OutputEmitterRef<MouseEvent>;
77
+ readonly outFunctionsControl: import("@angular/core").OutputEmitterRef<IQuillFunctionControlEvent>;
78
+ private readonly htmlContainer;
79
+ private readonly quillBodyContainer;
80
+ private readonly toolbarContainer;
81
+ private readonly inputSizeRef;
82
+ private readonly inputLinkRef;
83
+ private readonly destroyRef;
84
+ private readonly notificationService;
85
+ private readonly translate;
86
+ private readonly cdr;
87
+ private readonly dynamicComponentService;
88
+ ngOnInit(): void;
89
+ get FunctionsControl(): any;
90
+ protected handlerChangeShowMoreAction(event: Event): void;
91
+ protected handleSelectFont(event: IEmitSelectKey | undefined): void;
92
+ protected handleSelectHeader(event: IEmitSelectKey | undefined): void;
93
+ protected handlerValueChangeFontSize(value: number | string): void;
94
+ protected handleSelectAlign(event: IEmitSelectKey | undefined): void;
95
+ protected handlerSetFormat(type: string, data: string | number): void;
96
+ protected handlerInsertEmoji(emoji: unknown): void;
97
+ private handleTable;
98
+ private handleUndo;
99
+ private handleRedo;
100
+ private handlerShowUploadImage;
101
+ private insertText;
102
+ private handlerSelectionChange;
103
+ private handlerPaste;
104
+ private handlerTextChange;
105
+ private updateHandlerFunction;
106
+ private noPreventEmbedDeletion;
107
+ private setFontSizeSelected;
108
+ private setFontSelected;
109
+ private setColorSelected;
110
+ private calculatorToolbar;
111
+ private setStyleForContent;
112
+ private setContent;
113
+ private adjustIndexForImages;
114
+ private uploadImagesAndInsert;
115
+ private scrollToSelectionWithElementScrollHeightAuto;
116
+ private insertImage;
117
+ protected handlerPopoverEvent(event: TYPE_POPOVER_EVENT): void;
118
+ private insertLink;
119
+ protected handlerEditLink(event: Event): void;
120
+ protected handleShowUploadLink(event: unknown): void;
121
+ protected handlerUnlink(event: Event): void;
122
+ private handlerUnInsertLink;
123
+ private removeUnwantedPart;
124
+ 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>;
126
+ }
@@ -22,3 +22,4 @@ export declare const iconList: () => Array<{
22
22
  }>;
23
23
  export declare const uploadImageConfigDefault: () => IQuillUploadImageConfig;
24
24
  export declare const linkDefault: () => IQuillLink;
25
+ export declare const fontSizeWhiteList: () => string[];
@@ -0,0 +1,5 @@
1
+ import Quill2x from 'quill2x';
2
+ import { TranslateService } from '@ngx-translate/core';
3
+ export declare const createTableSelector: (quill: Quill2x, anchorEl: HTMLElement | null, translate: TranslateService) => void;
4
+ export declare const createContextMenuOptionTable: (quill: Quill2x, translate: TranslateService) => void;
5
+ export declare const registerQuill2x: () => void;
@@ -1,20 +0,0 @@
1
- import Quill from 'quill';
2
- const parchment = Quill.import('parchment');
3
- const pixelLevels = [1, 2, 3, 4, 5, 6, 7, 8];
4
- const tabMultiplier = 3;
5
- class IndentAttributor extends parchment.Attributor.Style {
6
- constructor(formatName, styleProperty, attributorOptions) {
7
- super(formatName, styleProperty, attributorOptions);
8
- }
9
- add(node, value) {
10
- return super.add(node, `${+value * tabMultiplier}em`);
11
- }
12
- value(node) {
13
- return parseFloat(super.value(node)) / tabMultiplier || undefined; // Don't return NaN
14
- }
15
- }
16
- export const indentStyle = new IndentAttributor('indent', 'margin-left', {
17
- scope: parchment.Scope.BLOCK,
18
- whitelist: pixelLevels.map((value) => `${value * tabMultiplier}em`),
19
- });
20
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZW50L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