@libs-ui/components-inputs-quill 0.2.77 → 0.2.78
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/link/link.component.mjs +6 -6
- package/esm2022/quill.component.mjs +118 -115
- package/esm2022/upload-image/upload-image.component.mjs +68 -0
- package/esm2022/utils/quill.define.mjs +27 -12
- package/fesm2022/libs-ui-components-inputs-quill.mjs +209 -192
- package/fesm2022/libs-ui-components-inputs-quill.mjs.map +1 -1
- package/interfaces/quill.interface.d.ts +9 -7
- package/link/link.component.d.ts +3 -3
- package/package.json +1 -1
- package/quill.component.d.ts +47 -45
- package/upload-image/upload-image.component.d.ts +14 -0
- package/utils/quill.define.d.ts +2 -1
- package/custom-upload-image/custom-upload-image.component.d.ts +0 -16
- package/esm2022/custom-upload-image/custom-upload-image.component.mjs +0 -68
|
@@ -1,85 +1,22 @@
|
|
|
1
1
|
import { NgTemplateOutlet } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { signal,
|
|
3
|
+
import { signal, model, output, Component, ChangeDetectionStrategy, computed, inject, input, viewChild, viewChildren } from '@angular/core';
|
|
4
4
|
import { LibsUiComponentsButtonsSelectColorComponent } from '@libs-ui/components-buttons-select-color';
|
|
5
5
|
import { LibsUiComponentsDropdownComponent } from '@libs-ui/components-dropdown';
|
|
6
6
|
import { LibsUiComponentsEmojiComponent } from '@libs-ui/components-inputs-emoji';
|
|
7
|
+
import { LibsUiComponentsInputsMentionDirective } from '@libs-ui/components-inputs-mention';
|
|
7
8
|
import { LibsUiComponentsInputsValidComponent } from '@libs-ui/components-inputs-valid';
|
|
8
9
|
import { LibsUiComponentsLabelComponent } from '@libs-ui/components-label';
|
|
9
10
|
import { LibsUiComponentsPopoverComponent } from '@libs-ui/components-popover';
|
|
10
11
|
import { LibsUiDynamicComponentService } from '@libs-ui/services-dynamic-component';
|
|
11
|
-
import { PATTERN_URL, get, set, xssFilter, isNil, ERROR_MESSAGE_EMPTY_VALID, ERROR_MESSAGE_MIN_LENGTH, ERROR_MESSAGE_MAX_LENGTH } from '@libs-ui/utils';
|
|
12
|
+
import { PATTERN_URL, convertFileToBase64, get, set, xssFilter, isNil, ERROR_MESSAGE_EMPTY_VALID, ERROR_MESSAGE_MIN_LENGTH, ERROR_MESSAGE_MAX_LENGTH } from '@libs-ui/utils';
|
|
12
13
|
import * as i1 from '@ngx-translate/core';
|
|
13
14
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
14
15
|
import Quill from 'quill';
|
|
15
16
|
import { Subject, fromEvent, takeUntil } from 'rxjs';
|
|
16
17
|
import { LibsUiComponentsModalComponent } from '@libs-ui/components-modal';
|
|
17
18
|
import { returnListObject } from '@libs-ui/services-http-request';
|
|
18
|
-
|
|
19
|
-
class LibsUiComponentsInputsQuillCustomUploadImageComponent {
|
|
20
|
-
buttonFooter = signal([{
|
|
21
|
-
label: 'i18n_save',
|
|
22
|
-
action: () => this.handlerSaveImage()
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
type: 'button-third',
|
|
26
|
-
label: 'i18n_cancel',
|
|
27
|
-
action: async () => this.outClose.emit()
|
|
28
|
-
}]);
|
|
29
|
-
disable = signal(false);
|
|
30
|
-
// private mediaFile =signal<IMediaFile | undefined>(undefined);
|
|
31
|
-
// private mediaUploadFunctionControl =signal<IMediaUploadBaseFunctionControlEvent | undefined>(undefined);
|
|
32
|
-
zIndex = input(1202, { transform: (value) => value ? value + 1 : 1202 });
|
|
33
|
-
maxImageSize = input(1048576, { transform: (value) => value ?? 1048576 });
|
|
34
|
-
labelConfig = input();
|
|
35
|
-
outClose = output();
|
|
36
|
-
// protected handlerFunctionsControl(event: IMediaUploadBaseFunctionControlEvent) {
|
|
37
|
-
// this.mediaUploadFunctionControl.set(event);
|
|
38
|
-
// }
|
|
39
|
-
// protected handlerChangeFile(event: IChangeFile) {
|
|
40
|
-
// this.mediaFile.set(event.files[0]);
|
|
41
|
-
// }
|
|
42
|
-
async handlerSaveImage() {
|
|
43
|
-
// if (!await this.mediaUploadFunctionControl()?.valid()) {
|
|
44
|
-
// return;
|
|
45
|
-
// }
|
|
46
|
-
// if (this.mediaFile?.origin_url) {
|
|
47
|
-
// this.moClose.emit(this.mediaFile.origin_url);
|
|
48
|
-
// return;
|
|
49
|
-
// }
|
|
50
|
-
// const body: IOptionsUploadMedia = {
|
|
51
|
-
// do_not_delete: true,
|
|
52
|
-
// file: this.mediaFile?.file,
|
|
53
|
-
// option: 'thumb',
|
|
54
|
-
// size: [{ 'width': '200', 'height': '200' }]
|
|
55
|
-
// };
|
|
56
|
-
// this.disable = true;
|
|
57
|
-
// try {
|
|
58
|
-
// const params = new HttpParamsRequest({ fromObject: { pem: BUILD_PEM_OBJECT({ isCheck: 0, action: DefineConstants.PERMISSION_ACTION_VIEW, pathCheck: '/other' }) } });
|
|
59
|
-
// const res = await this.mediaService.uploadImage(params, body);
|
|
60
|
-
// this.moClose.emit(res.data?.url);
|
|
61
|
-
// } catch (error) {
|
|
62
|
-
// console.log(error);
|
|
63
|
-
// this.pushMessageService.showCompTypeText('i18n_notification_manipulation_not_success', undefined, undefined, { timeRemove: 2000, type: 'error' });
|
|
64
|
-
// this.moClose.emit();
|
|
65
|
-
// } finally {
|
|
66
|
-
// this.disable = false;
|
|
67
|
-
// }
|
|
68
|
-
}
|
|
69
|
-
handlerEventModal(event) {
|
|
70
|
-
if (event === 'close') {
|
|
71
|
-
this.outClose.emit();
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsInputsQuillCustomUploadImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
75
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: LibsUiComponentsInputsQuillCustomUploadImageComponent, isStandalone: true, selector: "libs_ui-components-inputs-quill-custom_upload_image", inputs: { zIndex: { classPropertyName: "zIndex", publicName: "zIndex", isSignal: true, isRequired: false, transformFunction: null }, maxImageSize: { classPropertyName: "maxImageSize", publicName: "maxImageSize", isSignal: true, isRequired: false, transformFunction: null }, labelConfig: { classPropertyName: "labelConfig", publicName: "labelConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outClose: "outClose" }, ngImport: i0, template: "<libs_ui-components-modal [title]=\"'i18n_download_image'\"\n [mode]=\"'center'\"\n [width]=\"'598px'\"\n [headerConfig]=\"{ignoreHeaderTheme:true}\"\n [maxHeight]=\"'calc(100% - 100px)'\"\n [height]=\"'auto'\"\n [zIndex]=\"zIndex()\"\n [disable]=\"disable()\"\n [buttonsFooter]=\"buttonFooter()\"\n (outEvent)=\"handlerEventModal($event)\">\n <div class=\"libs-ui-modal-body-custom\">\n <!-- <mo-libs-shared-components-media-upload [zIndex]=\"zIndex+1\"\n [labelConfig]=\"labelConfig\"\n [multiple]=\"false\"\n [fileType]=\"'image'\"\n [doNotDelete]=\"true\"\n [maxImageSize]=\"maxImageSize\"\n [limitFile]=\"10\"\n [validRequired]=\"{isRequired: true}\"\n (moChangeFile)=\"handlerChangeFile($event)\"\n (moFunctionsControl)=\"handlerFunctionsControl($event)\">\n </mo-libs-shared-components-media-upload> -->\n </div>\n</libs_ui-components-modal>\n", dependencies: [{ kind: "component", type: LibsUiComponentsModalComponent, selector: "libs_ui-components-modal", inputs: ["show", "mode", "isBackdropTransparent", "isBackgroundTransparentModal", "isSizeBackdropByWidthHeightInput", "hasShadowBoxWhenHiddenBackDropTransparent", "classIncludeModalWrapper", "zIndex", "width", "height", "maxWidth", "maxHeight", "minWidth", "isFullScreen", "disable", "ignoreCommunicateMicroEvent", "headerConfig", "bodyConfig", "footerConfig", "buttonsFooter", "title", "titleUseXssFilter", "titleUseTooltip", "titleUseInnerText"], outputs: ["showChange", "widthChange", "heightChange", "maxWidthChange", "maxHeightChange", "minWidthChange", "disableChange", "buttonsFooterChange", "outScrollContent", "outEvent", "outFunctionControl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
76
|
-
}
|
|
77
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsInputsQuillCustomUploadImageComponent, decorators: [{
|
|
78
|
-
type: Component,
|
|
79
|
-
args: [{ selector: 'libs_ui-components-inputs-quill-custom_upload_image', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
80
|
-
LibsUiComponentsModalComponent
|
|
81
|
-
], template: "<libs_ui-components-modal [title]=\"'i18n_download_image'\"\n [mode]=\"'center'\"\n [width]=\"'598px'\"\n [headerConfig]=\"{ignoreHeaderTheme:true}\"\n [maxHeight]=\"'calc(100% - 100px)'\"\n [height]=\"'auto'\"\n [zIndex]=\"zIndex()\"\n [disable]=\"disable()\"\n [buttonsFooter]=\"buttonFooter()\"\n (outEvent)=\"handlerEventModal($event)\">\n <div class=\"libs-ui-modal-body-custom\">\n <!-- <mo-libs-shared-components-media-upload [zIndex]=\"zIndex+1\"\n [labelConfig]=\"labelConfig\"\n [multiple]=\"false\"\n [fileType]=\"'image'\"\n [doNotDelete]=\"true\"\n [maxImageSize]=\"maxImageSize\"\n [limitFile]=\"10\"\n [validRequired]=\"{isRequired: true}\"\n (moChangeFile)=\"handlerChangeFile($event)\"\n (moFunctionsControl)=\"handlerFunctionsControl($event)\">\n </mo-libs-shared-components-media-upload> -->\n </div>\n</libs_ui-components-modal>\n" }]
|
|
82
|
-
}] });
|
|
19
|
+
import { LibsUiComponentsButtonsButtonComponent } from '@libs-ui/components-buttons-button';
|
|
83
20
|
|
|
84
21
|
const parchment = Quill.import('parchment');
|
|
85
22
|
const pixelLevels = [1, 2, 3, 4, 5, 6, 7, 8];
|
|
@@ -104,8 +41,8 @@ class LibsUiComponentsInputsQuillLinkComponent {
|
|
|
104
41
|
dataLink = signal({ title: '', link: '' });
|
|
105
42
|
patternLink = signal(PATTERN_URL());
|
|
106
43
|
inputValidFunctionControl = signal([]);
|
|
107
|
-
zIndex =
|
|
108
|
-
textSelected =
|
|
44
|
+
zIndex = model(1200);
|
|
45
|
+
textSelected = model();
|
|
109
46
|
outClose = output();
|
|
110
47
|
outSaveLink = output();
|
|
111
48
|
ngOnInit() {
|
|
@@ -137,14 +74,14 @@ class LibsUiComponentsInputsQuillLinkComponent {
|
|
|
137
74
|
}
|
|
138
75
|
}
|
|
139
76
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsInputsQuillLinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
140
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: LibsUiComponentsInputsQuillLinkComponent, isStandalone: true, selector: "libs_ui-components-inputs-quill-link", inputs: { zIndex: { classPropertyName: "zIndex", publicName: "zIndex", isSignal: true, isRequired: false, transformFunction: null }, textSelected: { classPropertyName: "textSelected", publicName: "textSelected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outClose: "outClose", outSaveLink: "outSaveLink" }, ngImport: i0, template: "<libs_ui-components-modal [title]=\"'i18n_insert_link'\"\n [height]=\"'auto'\"\n [width]=\"'598px'\"\n [zIndex]=\"zIndex()\"\n (outEvent)=\"handlerEvent($event)\">\n <div class=\"libs-ui-modal-body-custom\">\n <libs_ui-components-inputs-valid [labelConfig]=\"{labelLeft: 'i18n_content', required: true}\"\n [(item)]=\"dataLink\"\n [fieldNameBind]=\"'title'\"\n [placeholder]=\"'i18n_import_content'\"\n [validRequired]=\"{isRequired:true}\"\n (outFunctionsControl)=\"handlerFunctionsControl($event)\" />\n <div class=\"mt-[16px]\">\n <libs_ui-components-inputs-valid [labelConfig]=\"{labelLeft: 'Link', required: true}\"\n [(item)]=\"dataLink\"\n [fieldNameBind]=\"'link'\"\n [placeholder]=\"'https:/\u2026'\"\n [validRequired]=\"{isRequired:true}\"\n [validPattern]=\"[{pattern:patternLink}]\"\n keySelectedUnitLeft=\"1\"\n [unitsLeft]=\"[{id:'1',label:'URL'}]\"\n (outFunctionsControl)=\"handlerFunctionsControl($event)\" />\n </div>\n </div>\n</libs_ui-components-modal>\n", dependencies: [{ kind: "component", type: LibsUiComponentsModalComponent, selector: "libs_ui-components-modal", inputs: ["show", "mode", "isBackdropTransparent", "isBackgroundTransparentModal", "isSizeBackdropByWidthHeightInput", "hasShadowBoxWhenHiddenBackDropTransparent", "classIncludeModalWrapper", "zIndex", "width", "height", "maxWidth", "maxHeight", "minWidth", "isFullScreen", "disable", "ignoreCommunicateMicroEvent", "headerConfig", "bodyConfig", "footerConfig", "buttonsFooter", "title", "titleUseXssFilter", "titleUseTooltip", "titleUseInnerText"], outputs: ["showChange", "widthChange", "heightChange", "maxWidthChange", "maxHeightChange", "minWidthChange", "disableChange", "buttonsFooterChange", "outScrollContent", "outEvent", "outFunctionControl"] }, { kind: "component", type: LibsUiComponentsInputsValidComponent, selector: "libs_ui-components-inputs-valid", inputs: ["item", "labelConfig", "emitEmptyInDataTypeNumber", "ignoreBlockInputMaxValue", "fieldNameBind", "showCount", "typeComponentSelectItem", "valueComponentSelectItem", "disableComponentSelectItem", "tagInput", "dataType", "resetAutoCompletePassword", "textAreaEnterNotNewLine", "hiddenContent", "fixedFloat", "acceptNegativeValue", "valueUpDownNumber", "ignoreWidthInput100", "classIncludeInput", "classContainerInput", "readonly", "disable", "noBorder", "backgroundNone", "useColorModeExist", "placeholder", "keepPlaceholderOnly", "classContainerBottomInput", "autoRemoveEmoji", "defaultHeight", "maxHeightTextArea", "minHeightTextArea", "ignoreShowError", "borderError", "iconLeftClass", "popoverContentIconLeft", "iconRightClass", "popoverContentIconRight", "zIndexPopoverContent", "unitsLeft", "configUnitLeft", "keySelectedUnitLeft", "unitsRight", "configUnitRight", "keySelectedUnitRight", "maxValueNumber", "minValueNumber", "ignoreContentLeft", "ignoreContentRight", "isBaselineStyle", "valuePatternShowError", "validPattern", "validRequired", "validMinLength", "validMinValue", "validMaxValue", "validMaxLength", "functionValid", "maxLength", "positionMessageErrorStartInput", "classInclude", "resize", "templateLeftBottomInput", "templateRightBottomInput", "onlyAcceptNegativeValue", "autoAddZeroLessThan10InTypeInt", "maxLengthNumberCount", "classMessageErrorInclude", "ignoreStopPropagationEvent", "ignoreUnitRightClassReadOnly", "paddingRightCustomSpecific", "focusTimeOut"], outputs: ["itemChange", "outValueChange", "outSelect", "outIconLeft", "outIconRight", "outClickButtonLabel", "outSwitchEventLabel", "outLabelRightClick", "outEnterInputEvent", "outHeightAreaChange", "outFunctionsControl", "outFocusAndBlur", "outChangeValueByButtonUpDown"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
77
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: LibsUiComponentsInputsQuillLinkComponent, isStandalone: true, selector: "libs_ui-components-inputs-quill-link", inputs: { zIndex: { classPropertyName: "zIndex", publicName: "zIndex", isSignal: true, isRequired: false, transformFunction: null }, textSelected: { classPropertyName: "textSelected", publicName: "textSelected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zIndex: "zIndexChange", textSelected: "textSelectedChange", outClose: "outClose", outSaveLink: "outSaveLink" }, ngImport: i0, template: "<libs_ui-components-modal [title]=\"'i18n_insert_link'\"\n [mode]=\"'center'\"\n [height]=\"'auto'\"\n [width]=\"'598px'\"\n [headerConfig]=\"{ignoreHeaderTheme: true}\"\n [zIndex]=\"zIndex()\"\n (outEvent)=\"handlerEvent($event)\">\n <div class=\"libs-ui-modal-body-custom\">\n <libs_ui-components-inputs-valid [labelConfig]=\"{labelLeft: 'i18n_content', required: true}\"\n [(item)]=\"dataLink\"\n [fieldNameBind]=\"'title'\"\n [placeholder]=\"'i18n_import_content'\"\n [validRequired]=\"{isRequired: true}\"\n (outFunctionsControl)=\"handlerFunctionsControl($event)\" />\n <div class=\"mt-[16px]\">\n <libs_ui-components-inputs-valid [labelConfig]=\"{labelLeft: 'Link', required: true}\"\n [(item)]=\"dataLink\"\n [fieldNameBind]=\"'link'\"\n [placeholder]=\"'https:/\u2026'\"\n [validRequired]=\"{isRequired: true}\"\n [validPattern]=\"[{pattern: patternLink(), valuePatternShowError: false}]\"\n [keySelectedUnitLeft]=\"'1'\"\n [unitsLeft]=\"[{id:'1',label:'URL'}]\"\n (outFunctionsControl)=\"handlerFunctionsControl($event)\" />\n </div>\n </div>\n</libs_ui-components-modal>\n", dependencies: [{ kind: "component", type: LibsUiComponentsModalComponent, selector: "libs_ui-components-modal", inputs: ["show", "mode", "isBackdropTransparent", "isBackgroundTransparentModal", "isSizeBackdropByWidthHeightInput", "hasShadowBoxWhenHiddenBackDropTransparent", "classIncludeModalWrapper", "zIndex", "width", "height", "maxWidth", "maxHeight", "minWidth", "isFullScreen", "disable", "ignoreCommunicateMicroEvent", "headerConfig", "bodyConfig", "footerConfig", "buttonsFooter", "title", "titleUseXssFilter", "titleUseTooltip", "titleUseInnerText"], outputs: ["showChange", "widthChange", "heightChange", "maxWidthChange", "maxHeightChange", "minWidthChange", "disableChange", "buttonsFooterChange", "outScrollContent", "outEvent", "outFunctionControl"] }, { kind: "component", type: LibsUiComponentsInputsValidComponent, selector: "libs_ui-components-inputs-valid", inputs: ["item", "labelConfig", "emitEmptyInDataTypeNumber", "ignoreBlockInputMaxValue", "fieldNameBind", "showCount", "typeComponentSelectItem", "valueComponentSelectItem", "disableComponentSelectItem", "tagInput", "dataType", "resetAutoCompletePassword", "textAreaEnterNotNewLine", "hiddenContent", "fixedFloat", "acceptNegativeValue", "valueUpDownNumber", "ignoreWidthInput100", "classIncludeInput", "classContainerInput", "readonly", "disable", "noBorder", "backgroundNone", "useColorModeExist", "placeholder", "keepPlaceholderOnly", "classContainerBottomInput", "autoRemoveEmoji", "defaultHeight", "maxHeightTextArea", "minHeightTextArea", "ignoreShowError", "borderError", "iconLeftClass", "popoverContentIconLeft", "iconRightClass", "popoverContentIconRight", "zIndexPopoverContent", "unitsLeft", "configUnitLeft", "keySelectedUnitLeft", "unitsRight", "configUnitRight", "keySelectedUnitRight", "maxValueNumber", "minValueNumber", "ignoreContentLeft", "ignoreContentRight", "isBaselineStyle", "valuePatternShowError", "validPattern", "validRequired", "validMinLength", "validMinValue", "validMaxValue", "validMaxLength", "functionValid", "maxLength", "positionMessageErrorStartInput", "classInclude", "resize", "templateLeftBottomInput", "templateRightBottomInput", "onlyAcceptNegativeValue", "autoAddZeroLessThan10InTypeInt", "maxLengthNumberCount", "classMessageErrorInclude", "ignoreStopPropagationEvent", "ignoreUnitRightClassReadOnly", "paddingRightCustomSpecific", "focusTimeOut"], outputs: ["itemChange", "outValueChange", "outSelect", "outIconLeft", "outIconRight", "outClickButtonLabel", "outSwitchEventLabel", "outLabelRightClick", "outEnterInputEvent", "outHeightAreaChange", "outFunctionsControl", "outFocusAndBlur", "outChangeValueByButtonUpDown"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
141
78
|
}
|
|
142
79
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsInputsQuillLinkComponent, decorators: [{
|
|
143
80
|
type: Component,
|
|
144
81
|
args: [{ selector: 'libs_ui-components-inputs-quill-link', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
145
82
|
LibsUiComponentsModalComponent,
|
|
146
83
|
LibsUiComponentsInputsValidComponent
|
|
147
|
-
], template: "<libs_ui-components-modal [title]=\"'i18n_insert_link'\"\n [height]=\"'auto'\"\n [width]=\"'598px'\"\n [zIndex]=\"zIndex()\"\n (outEvent)=\"handlerEvent($event)\">\n <div class=\"libs-ui-modal-body-custom\">\n <libs_ui-components-inputs-valid [labelConfig]=\"{labelLeft: 'i18n_content', required: true}\"\n [(item)]=\"dataLink\"\n [fieldNameBind]=\"'title'\"\n [placeholder]=\"'i18n_import_content'\"\n [validRequired]=\"{isRequired:true}\"\n (outFunctionsControl)=\"handlerFunctionsControl($event)\" />\n <div class=\"mt-[16px]\">\n <libs_ui-components-inputs-valid [labelConfig]=\"{labelLeft: 'Link', required: true}\"\n [(item)]=\"dataLink\"\n [fieldNameBind]=\"'link'\"\n [placeholder]=\"'https:/\u2026'\"\n [validRequired]=\"{isRequired:true}\"\n [validPattern]=\"[{pattern:patternLink}]\"\n keySelectedUnitLeft=\"1\"\n [unitsLeft]=\"[{id:'1',label:'URL'}]\"\n (outFunctionsControl)=\"handlerFunctionsControl($event)\" />\n </div>\n </div>\n</libs_ui-components-modal>\n" }]
|
|
84
|
+
], template: "<libs_ui-components-modal [title]=\"'i18n_insert_link'\"\n [mode]=\"'center'\"\n [height]=\"'auto'\"\n [width]=\"'598px'\"\n [headerConfig]=\"{ignoreHeaderTheme: true}\"\n [zIndex]=\"zIndex()\"\n (outEvent)=\"handlerEvent($event)\">\n <div class=\"libs-ui-modal-body-custom\">\n <libs_ui-components-inputs-valid [labelConfig]=\"{labelLeft: 'i18n_content', required: true}\"\n [(item)]=\"dataLink\"\n [fieldNameBind]=\"'title'\"\n [placeholder]=\"'i18n_import_content'\"\n [validRequired]=\"{isRequired: true}\"\n (outFunctionsControl)=\"handlerFunctionsControl($event)\" />\n <div class=\"mt-[16px]\">\n <libs_ui-components-inputs-valid [labelConfig]=\"{labelLeft: 'Link', required: true}\"\n [(item)]=\"dataLink\"\n [fieldNameBind]=\"'link'\"\n [placeholder]=\"'https:/\u2026'\"\n [validRequired]=\"{isRequired: true}\"\n [validPattern]=\"[{pattern: patternLink(), valuePatternShowError: false}]\"\n [keySelectedUnitLeft]=\"'1'\"\n [unitsLeft]=\"[{id:'1',label:'URL'}]\"\n (outFunctionsControl)=\"handlerFunctionsControl($event)\" />\n </div>\n </div>\n</libs_ui-components-modal>\n" }]
|
|
148
85
|
}] });
|
|
149
86
|
|
|
150
87
|
const Embed = Quill.import("blots/embed");
|
|
@@ -180,12 +117,77 @@ QuillMentionBlot.blotName = "mention";
|
|
|
180
117
|
QuillMentionBlot.tagName = "span";
|
|
181
118
|
QuillMentionBlot.className = "libs-ui-quill-mention";
|
|
182
119
|
|
|
120
|
+
class LibsUiComponentsInputsQuillUploadImageComponent {
|
|
121
|
+
buttonFooter = signal([
|
|
122
|
+
{
|
|
123
|
+
type: 'button-third',
|
|
124
|
+
label: 'i18n_cancel',
|
|
125
|
+
action: async () => this.outClose.emit()
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
label: 'i18n_save',
|
|
129
|
+
action: () => this.handlerSaveImage()
|
|
130
|
+
}
|
|
131
|
+
]);
|
|
132
|
+
disable = signal(false);
|
|
133
|
+
// private mediaFile =signal<IMediaFile | undefined>(undefined);
|
|
134
|
+
// private mediaUploadFunctionControl =signal<IMediaUploadBaseFunctionControlEvent | undefined>(undefined);
|
|
135
|
+
uploadImageConfig = model.required();
|
|
136
|
+
outClose = output();
|
|
137
|
+
// protected handlerFunctionsControl(event: IMediaUploadBaseFunctionControlEvent) {
|
|
138
|
+
// this.mediaUploadFunctionControl.set(event);
|
|
139
|
+
// }
|
|
140
|
+
// protected handlerChangeFile(event: IChangeFile) {
|
|
141
|
+
// this.mediaFile.set(event.files[0]);
|
|
142
|
+
// }
|
|
143
|
+
async handlerSaveImage() {
|
|
144
|
+
// if (!await this.mediaUploadFunctionControl()?.valid()) {
|
|
145
|
+
// return;
|
|
146
|
+
// }
|
|
147
|
+
// if (this.mediaFile?.origin_url) {
|
|
148
|
+
// this.moClose.emit(this.mediaFile.origin_url);
|
|
149
|
+
// return;
|
|
150
|
+
// }
|
|
151
|
+
// const body: IOptionsUploadMedia = {
|
|
152
|
+
// do_not_delete: true,
|
|
153
|
+
// file: this.mediaFile?.file,
|
|
154
|
+
// option: 'thumb',
|
|
155
|
+
// size: [{ 'width': '200', 'height': '200' }]
|
|
156
|
+
// };
|
|
157
|
+
// this.disable = true;
|
|
158
|
+
// try {
|
|
159
|
+
// const params = new HttpParamsRequest({ fromObject: { pem: BUILD_PEM_OBJECT({ isCheck: 0, action: DefineConstants.PERMISSION_ACTION_VIEW, pathCheck: '/other' }) } });
|
|
160
|
+
// const res = await this.mediaService.uploadImage(params, body);
|
|
161
|
+
// this.moClose.emit(res.data?.url);
|
|
162
|
+
// } catch (error) {
|
|
163
|
+
// console.log(error);
|
|
164
|
+
// this.pushMessageService.showCompTypeText('i18n_notification_manipulation_not_success', undefined, undefined, { timeRemove: 2000, type: 'error' });
|
|
165
|
+
// this.moClose.emit();
|
|
166
|
+
// } finally {
|
|
167
|
+
// this.disable = false;
|
|
168
|
+
// }
|
|
169
|
+
}
|
|
170
|
+
handlerEventModal(event) {
|
|
171
|
+
if (event === 'close') {
|
|
172
|
+
this.outClose.emit();
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsInputsQuillUploadImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
176
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: LibsUiComponentsInputsQuillUploadImageComponent, isStandalone: true, selector: "libs_ui-components-inputs-quill-upload_image", inputs: { uploadImageConfig: { classPropertyName: "uploadImageConfig", publicName: "uploadImageConfig", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { uploadImageConfig: "uploadImageConfigChange", outClose: "outClose" }, ngImport: i0, template: "<libs_ui-components-modal [title]=\"'i18n_download_image'\"\n [mode]=\"'center'\"\n [width]=\"'598px'\"\n [headerConfig]=\"{ignoreHeaderTheme:true}\"\n [maxHeight]=\"'calc(100% - 100px)'\"\n [height]=\"'auto'\"\n [zIndex]=\"uploadImageConfig().zIndex || 1203\"\n [disable]=\"disable()\"\n [buttonsFooter]=\"buttonFooter()\"\n (outEvent)=\"handlerEventModal($event)\">\n <div class=\"libs-ui-modal-body-custom\">\n <!-- <mo-libs-shared-components-media-upload [zIndex]=\"zIndex+1\"\n [labelConfig]=\"labelConfig\"\n [multiple]=\"false\"\n [fileType]=\"'image'\"\n [doNotDelete]=\"true\"\n [maxImageSize]=\"maxImageSize || 1048576\"\n [limitFile]=\"10\"\n [validRequired]=\"{isRequired: true}\"\n (moChangeFile)=\"handlerChangeFile($event)\"\n (moFunctionsControl)=\"handlerFunctionsControl($event)\">\n </mo-libs-shared-components-media-upload> -->\n </div>\n</libs_ui-components-modal>\n", dependencies: [{ kind: "component", type: LibsUiComponentsModalComponent, selector: "libs_ui-components-modal", inputs: ["show", "mode", "isBackdropTransparent", "isBackgroundTransparentModal", "isSizeBackdropByWidthHeightInput", "hasShadowBoxWhenHiddenBackDropTransparent", "classIncludeModalWrapper", "zIndex", "width", "height", "maxWidth", "maxHeight", "minWidth", "isFullScreen", "disable", "ignoreCommunicateMicroEvent", "headerConfig", "bodyConfig", "footerConfig", "buttonsFooter", "title", "titleUseXssFilter", "titleUseTooltip", "titleUseInnerText"], outputs: ["showChange", "widthChange", "heightChange", "maxWidthChange", "maxHeightChange", "minWidthChange", "disableChange", "buttonsFooterChange", "outScrollContent", "outEvent", "outFunctionControl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
177
|
+
}
|
|
178
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsInputsQuillUploadImageComponent, decorators: [{
|
|
179
|
+
type: Component,
|
|
180
|
+
args: [{ selector: 'libs_ui-components-inputs-quill-upload_image', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
181
|
+
LibsUiComponentsModalComponent
|
|
182
|
+
], template: "<libs_ui-components-modal [title]=\"'i18n_download_image'\"\n [mode]=\"'center'\"\n [width]=\"'598px'\"\n [headerConfig]=\"{ignoreHeaderTheme:true}\"\n [maxHeight]=\"'calc(100% - 100px)'\"\n [height]=\"'auto'\"\n [zIndex]=\"uploadImageConfig().zIndex || 1203\"\n [disable]=\"disable()\"\n [buttonsFooter]=\"buttonFooter()\"\n (outEvent)=\"handlerEventModal($event)\">\n <div class=\"libs-ui-modal-body-custom\">\n <!-- <mo-libs-shared-components-media-upload [zIndex]=\"zIndex+1\"\n [labelConfig]=\"labelConfig\"\n [multiple]=\"false\"\n [fileType]=\"'image'\"\n [doNotDelete]=\"true\"\n [maxImageSize]=\"maxImageSize || 1048576\"\n [limitFile]=\"10\"\n [validRequired]=\"{isRequired: true}\"\n (moChangeFile)=\"handlerChangeFile($event)\"\n (moFunctionsControl)=\"handlerFunctionsControl($event)\">\n </mo-libs-shared-components-media-upload> -->\n </div>\n</libs_ui-components-modal>\n" }]
|
|
183
|
+
}] });
|
|
184
|
+
|
|
183
185
|
const listDataAlign = () => {
|
|
184
186
|
return [
|
|
185
|
-
{ key: '', icon: 'libs-ui-align-left text-[#6a7383] text-[16px] hover:text-[var(--libs-ui-color-light-1)]' },
|
|
186
|
-
{ key: 'right', icon: 'libs-ui-align-right text-[#6a7383] text-[16px] hover:text-[var(--libs-ui-color-light-1)]' },
|
|
187
|
-
{ key: 'center', icon: 'libs-ui-align-center text-[#6a7383] text-[16px] hover:text-[var(--libs-ui-color-light-1)]' },
|
|
188
|
-
{ key: 'justify', icon: 'libs-ui-align-justify text-[#6a7383] text-[16px] hover:text-[var(--libs-ui-color-light-1)]' },
|
|
187
|
+
{ key: '', icon: 'libs-ui-icon-align-left text-[#6a7383] text-[16px] hover:text-[var(--libs-ui-color-light-1)]' },
|
|
188
|
+
{ key: 'right', icon: 'libs-ui-icon-align-right text-[#6a7383] text-[16px] hover:text-[var(--libs-ui-color-light-1)]' },
|
|
189
|
+
{ key: 'center', icon: 'libs-ui-icon-align-center text-[#6a7383] text-[16px] hover:text-[var(--libs-ui-color-light-1)]' },
|
|
190
|
+
{ key: 'justify', icon: 'libs-ui-icon-align-justify text-[#6a7383] text-[16px] hover:text-[var(--libs-ui-color-light-1)]' },
|
|
189
191
|
];
|
|
190
192
|
};
|
|
191
193
|
const listFont = () => {
|
|
@@ -206,7 +208,8 @@ const listConfigAlign = () => {
|
|
|
206
208
|
}),
|
|
207
209
|
configTemplateText: signal({
|
|
208
210
|
fieldKey: 'key',
|
|
209
|
-
|
|
211
|
+
getClassItem: () => '!px-[8px] !py-[4px]',
|
|
212
|
+
getValue: item => `<i class='flex ${item.icon}'></i>`,
|
|
210
213
|
ignoreIconSelected: true
|
|
211
214
|
})
|
|
212
215
|
};
|
|
@@ -290,27 +293,27 @@ const iconList = [
|
|
|
290
293
|
icon: 'libs-ui-icon-editor-color-text'
|
|
291
294
|
},
|
|
292
295
|
{
|
|
293
|
-
key: "indent
|
|
296
|
+
key: "indent.-1",
|
|
294
297
|
icon: 'libs-ui-icon-indent-decrease'
|
|
295
298
|
},
|
|
296
299
|
{
|
|
297
|
-
key: "indent
|
|
300
|
+
key: "indent.+1",
|
|
298
301
|
icon: 'libs-ui-icon-indent-increase'
|
|
299
302
|
},
|
|
300
303
|
{
|
|
301
|
-
key: "align
|
|
304
|
+
key: "align.",
|
|
302
305
|
icon: 'align-quill libs-ui-icon-align-left'
|
|
303
306
|
},
|
|
304
307
|
{
|
|
305
|
-
key: "align
|
|
308
|
+
key: "align.center",
|
|
306
309
|
icon: 'align-quill libs-ui-icon-align-center'
|
|
307
310
|
},
|
|
308
311
|
{
|
|
309
|
-
key: "align
|
|
312
|
+
key: "align.right",
|
|
310
313
|
icon: 'align-quill libs-ui-icon-align-right'
|
|
311
314
|
},
|
|
312
315
|
{
|
|
313
|
-
key: "align
|
|
316
|
+
key: "align.justify",
|
|
314
317
|
icon: 'align-quill libs-ui-icon-align-justify'
|
|
315
318
|
},
|
|
316
319
|
{
|
|
@@ -322,12 +325,23 @@ const iconList = [
|
|
|
322
325
|
icon: 'libs-ui-icon-face-smile'
|
|
323
326
|
}
|
|
324
327
|
];
|
|
328
|
+
const uploadImageConfigDefault = {
|
|
329
|
+
modeCustom: true,
|
|
330
|
+
zIndex: 1202,
|
|
331
|
+
showIcon: true,
|
|
332
|
+
onlyAcceptImageHttpsLink: false,
|
|
333
|
+
functionUploadImage: async (links) => {
|
|
334
|
+
const data = [];
|
|
335
|
+
for (const element of links) {
|
|
336
|
+
data.push(await convertFileToBase64(element));
|
|
337
|
+
}
|
|
338
|
+
return data;
|
|
339
|
+
}
|
|
340
|
+
};
|
|
325
341
|
|
|
326
342
|
class LibsUiComponentsInputsQuillComponent {
|
|
327
|
-
|
|
328
|
-
messageErr = signal('');
|
|
343
|
+
messageError = signal('');
|
|
329
344
|
display = signal(false);
|
|
330
|
-
handlers = signal({ undo: this.handleUndo, redo: this.handleRedo });
|
|
331
345
|
listConfigAlign = signal(listConfigAlign());
|
|
332
346
|
alignSelected = signal(undefined);
|
|
333
347
|
iconAlignSelectedComputed = computed(() => get(this.alignSelected(), 'item.icon'));
|
|
@@ -335,86 +349,89 @@ class LibsUiComponentsInputsQuillComponent {
|
|
|
335
349
|
fontSelected = signal(undefined);
|
|
336
350
|
labelFontSelectedComputed = computed(() => get(this.fontSelected(), 'item.label') || 'Sans Serif');
|
|
337
351
|
size = signal({ value: 14 });
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
352
|
+
itemShow = signal([]);
|
|
353
|
+
showMoreAction = signal(false);
|
|
354
|
+
quill = signal(undefined);
|
|
355
|
+
handlers = signal({ undo: this.handleUndo.bind(this), redo: this.handleRedo.bind(this) });
|
|
341
356
|
showMention = signal(false);
|
|
357
|
+
addLinkComponentRef = signal(undefined);
|
|
358
|
+
uploadImageComponentRef = signal(undefined);
|
|
342
359
|
dynamicComponentService = inject(LibsUiDynamicComponentService);
|
|
343
360
|
translate = inject(TranslateService);
|
|
344
361
|
onDestroy = new Subject();
|
|
345
362
|
optionsToolbar = input(toolBarOptionDefault, { transform: value => value || toolBarOptionDefault });
|
|
363
|
+
showToolBar = input();
|
|
364
|
+
classIncludeToolbar = input('bottom-[-66px] left-[18px]');
|
|
346
365
|
placeholder = input('i18n_import_content', { transform: (value) => value || 'i18n_import_content' });
|
|
347
|
-
|
|
366
|
+
label = input();
|
|
348
367
|
item = input();
|
|
349
368
|
fieldNameBind = input('value');
|
|
350
369
|
readonly = input(false);
|
|
351
|
-
|
|
352
|
-
ignoreShowErrorLabel = input(false);
|
|
370
|
+
showErrorLabel = input(true);
|
|
353
371
|
showErrorBorder = input(false);
|
|
354
|
-
|
|
372
|
+
onlyShowErrorBorderInContent = input(false);
|
|
355
373
|
classIncludeTemplate = input();
|
|
356
374
|
classInclude = input();
|
|
357
|
-
|
|
375
|
+
handlersExpand = input();
|
|
358
376
|
validRequired = input();
|
|
359
377
|
validMinLength = input();
|
|
360
378
|
validMaxLength = input();
|
|
361
379
|
onlyShowContent = input(false);
|
|
362
380
|
zIndex = input(1201, { transform: (value) => value || 1201 });
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
isHeightAuto = input();
|
|
366
|
-
customUploadImage = input({ modeCustom: true, zIndex: 1202 }, { transform: (value) => value || { modeCustom: true, zIndex: 1202 } });
|
|
381
|
+
dataConfigMention = input();
|
|
382
|
+
heightAuto = input();
|
|
367
383
|
autoFocus = input();
|
|
368
384
|
autoFocusBottom = input();
|
|
369
|
-
isShowToolBar = input();
|
|
370
|
-
classIncludeToolbar = input('bottom-[-66px] left-[18px]');
|
|
371
385
|
templateToolBarPersonalize = input();
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
386
|
+
template = input();
|
|
387
|
+
uploadImageConfig = input(uploadImageConfigDefault, { transform: (value) => value || uploadImageConfigDefault });
|
|
388
|
+
outMessageError = output();
|
|
375
389
|
outBlur = output();
|
|
376
390
|
outFocus = output();
|
|
377
391
|
outChange = output();
|
|
378
392
|
outFunctionsControl = output();
|
|
379
|
-
outImagePaste = output();
|
|
380
393
|
outSelectionChange = output();
|
|
381
394
|
wrapperEditorEl = viewChild('wrapperEditor');
|
|
382
395
|
editorEl = viewChild('editor');
|
|
383
396
|
quillOptionEl = viewChild('quillOption');
|
|
384
397
|
quillEditorEl = viewChild('quillEditor');
|
|
385
398
|
quillToolbarEl = viewChild('quillToolbar');
|
|
399
|
+
toolbarItemsEl = viewChild('toolbarItems');
|
|
400
|
+
itemsEl = viewChildren('item');
|
|
386
401
|
ngOnInit() {
|
|
402
|
+
this.itemShow.set(this.optionsToolbar().map((item, index) => index));
|
|
387
403
|
this.outFunctionsControl.emit({
|
|
388
|
-
setContent: this.setContent.bind(this),
|
|
389
404
|
checkIsValid: this.validate.bind(this),
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
405
|
+
setContent: this.setContent.bind(this),
|
|
406
|
+
insertText: this.insertText.bind(this),
|
|
407
|
+
insertLink: this.insertLink.bind(this),
|
|
408
|
+
insertHtml: this.insertHtml.bind(this),
|
|
393
409
|
setFontSize: this.setFontSize.bind(this),
|
|
394
410
|
setColor: this.setColor.bind(this),
|
|
395
411
|
setBackground: this.setBackground.bind(this)
|
|
396
412
|
});
|
|
397
413
|
}
|
|
398
414
|
ngAfterViewInit() {
|
|
415
|
+
this.calc();
|
|
399
416
|
if (this.autoFocus()) {
|
|
400
417
|
this.display.set(true);
|
|
401
418
|
}
|
|
402
|
-
if (this.
|
|
403
|
-
this.handlers.update(item => ({ ...item, image: this.handlerShowUploadImage.bind(this), emoji:
|
|
419
|
+
if (this.uploadImageConfig().modeCustom) {
|
|
420
|
+
this.handlers.update(item => ({ ...item, image: this.handlerShowUploadImage.bind(this), emoji: () => { return; } }));
|
|
404
421
|
}
|
|
405
|
-
let
|
|
406
|
-
const
|
|
407
|
-
if (
|
|
408
|
-
|
|
422
|
+
let link = false;
|
|
423
|
+
const handlersExpand = this.handlersExpand();
|
|
424
|
+
if (handlersExpand && handlersExpand.length) {
|
|
425
|
+
handlersExpand.forEach(element => {
|
|
409
426
|
if (element.title && element.action) {
|
|
410
427
|
if (element.title === 'link') {
|
|
411
|
-
|
|
428
|
+
link = true;
|
|
412
429
|
}
|
|
413
430
|
this.handlers.update(item => ({ ...item, [element.title]: element.action }));
|
|
414
431
|
}
|
|
415
432
|
});
|
|
416
433
|
}
|
|
417
|
-
if (!
|
|
434
|
+
if (!link) {
|
|
418
435
|
this.handlers.update(item => ({ ...item, link: this.handleShowUploadLink.bind(this), unLink: this.handlerUnInsertLink.bind(this) }));
|
|
419
436
|
}
|
|
420
437
|
const size = Quill.import('attributors/style/size');
|
|
@@ -438,9 +455,7 @@ class LibsUiComponentsInputsQuillComponent {
|
|
|
438
455
|
Quill.register(alignStyle, true);
|
|
439
456
|
Quill.register(QuillMentionBlot, true);
|
|
440
457
|
Quill.register({ 'formats/indent': indentStyle }, true);
|
|
441
|
-
iconList.forEach(element => {
|
|
442
|
-
set(icons, element.key, `<span class="${element.icon} hover:text-[var(--libs-ui-color-light-1)] text-[16px] text-[#6a7383]"></span>`);
|
|
443
|
-
});
|
|
458
|
+
iconList.forEach(element => set(icons, element.key, `<span class="${element.icon} hover:text-[var(--libs-ui-color-light-1)] text-[16px] text-[#6a7383]"></span>`));
|
|
444
459
|
this.quill.set(new Quill(this.quillEditorEl()?.nativeElement, {
|
|
445
460
|
modules: {
|
|
446
461
|
toolbar: {
|
|
@@ -467,8 +482,8 @@ class LibsUiComponentsInputsQuillComponent {
|
|
|
467
482
|
readOnly: this.readonly(),
|
|
468
483
|
placeholder: this.translate.instant(this.placeholder()),
|
|
469
484
|
theme: 'snow',
|
|
470
|
-
bounds: this.
|
|
471
|
-
scrollingContainer: this.
|
|
485
|
+
bounds: this.heightAuto() ? this.wrapperEditorEl()?.nativeElement : this.quillEditorEl()?.nativeElement,
|
|
486
|
+
scrollingContainer: this.heightAuto() ? this.wrapperEditorEl()?.nativeElement : null
|
|
472
487
|
}));
|
|
473
488
|
if (!this.autoFocus()) {
|
|
474
489
|
setTimeout(() => this.display.set(true), 200);
|
|
@@ -539,11 +554,10 @@ class LibsUiComponentsInputsQuillComponent {
|
|
|
539
554
|
if (format) {
|
|
540
555
|
this.getFont(format);
|
|
541
556
|
this.getFontSize(format);
|
|
542
|
-
this.getHeading(format);
|
|
543
557
|
}
|
|
544
558
|
this.outSelectionChange.emit(range && range.length ? true : false);
|
|
545
559
|
});
|
|
546
|
-
set(this.quill
|
|
560
|
+
set(this.quill, 'root.onpaste', async (event) => {
|
|
547
561
|
if (!event || !event.clipboardData) {
|
|
548
562
|
return;
|
|
549
563
|
}
|
|
@@ -558,11 +572,15 @@ class LibsUiComponentsInputsQuillComponent {
|
|
|
558
572
|
images.push(file);
|
|
559
573
|
}
|
|
560
574
|
});
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
575
|
+
const links = await this.uploadImageConfig().functionUploadImage?.(images);
|
|
576
|
+
if (links && links.length) {
|
|
577
|
+
links.forEach(link => {
|
|
578
|
+
if (!link || (this.uploadImageConfig().onlyAcceptImageHttpsLink && (link instanceof ArrayBuffer || !new RegExp(PATTERN_URL()).test(link)))) {
|
|
579
|
+
return;
|
|
580
|
+
}
|
|
581
|
+
this.insertHtml('image', link);
|
|
582
|
+
});
|
|
564
583
|
}
|
|
565
|
-
this.functionUploadImage()?.(images);
|
|
566
584
|
});
|
|
567
585
|
if (this.autoFocus()) {
|
|
568
586
|
this.quill()?.focus();
|
|
@@ -577,6 +595,23 @@ class LibsUiComponentsInputsQuillComponent {
|
|
|
577
595
|
}
|
|
578
596
|
fromEvent(this.quillEditorEl()?.nativeElement.querySelector('.ql-tooltip'), 'mousedown').pipe(takeUntil(this.onDestroy)).subscribe(event => event.stopPropagation());
|
|
579
597
|
}
|
|
598
|
+
calc() {
|
|
599
|
+
setTimeout(() => {
|
|
600
|
+
this.itemShow.set([]);
|
|
601
|
+
const toolbarWidth = this.toolbarItemsEl()?.nativeElement.offsetWidth || 0;
|
|
602
|
+
let itemWidth = 36;
|
|
603
|
+
// console.log(this.toolbarItemsEl()?.nativeElement, this.toolbarItemsEl()?.nativeElement.offsetWidth);
|
|
604
|
+
this.itemsEl().forEach((item, index) => {
|
|
605
|
+
const width = item.nativeElement.offsetWidth || 0;
|
|
606
|
+
itemWidth += width + (index === this.itemsEl().length - 1 ? 0 : 17);
|
|
607
|
+
console.log(itemWidth, toolbarWidth);
|
|
608
|
+
if (itemWidth <= toolbarWidth) {
|
|
609
|
+
this.itemShow.update(items => [...items, index]);
|
|
610
|
+
}
|
|
611
|
+
});
|
|
612
|
+
console.log(this.itemShow());
|
|
613
|
+
}, 300);
|
|
614
|
+
}
|
|
580
615
|
setStyle(type, data) {
|
|
581
616
|
this.quill()?.format(type, data);
|
|
582
617
|
}
|
|
@@ -596,12 +631,6 @@ class LibsUiComponentsInputsQuillComponent {
|
|
|
596
631
|
}
|
|
597
632
|
this.fontSelected.set({ key: format.font, item: font });
|
|
598
633
|
}
|
|
599
|
-
getHeading(format) {
|
|
600
|
-
if (!format.header || format.header instanceof Array) {
|
|
601
|
-
return;
|
|
602
|
-
}
|
|
603
|
-
this.headingKeySelected = format.header;
|
|
604
|
-
}
|
|
605
634
|
handleUndo() {
|
|
606
635
|
this.quill()?.history?.undo();
|
|
607
636
|
}
|
|
@@ -610,11 +639,11 @@ class LibsUiComponentsInputsQuillComponent {
|
|
|
610
639
|
}
|
|
611
640
|
async setContent(content) {
|
|
612
641
|
if (!content) {
|
|
613
|
-
setTimeout(() => set(this.quill
|
|
642
|
+
setTimeout(() => set(this.quill, 'root.innerHTML', ''));
|
|
614
643
|
return;
|
|
615
644
|
}
|
|
616
645
|
const contentXssFilter = await xssFilter(content);
|
|
617
|
-
setTimeout(() => set(this.quill
|
|
646
|
+
setTimeout(() => set(this.quill, 'root.innerHTML', contentXssFilter));
|
|
618
647
|
if (!this.autoFocusBottom()) {
|
|
619
648
|
return;
|
|
620
649
|
}
|
|
@@ -623,7 +652,7 @@ class LibsUiComponentsInputsQuillComponent {
|
|
|
623
652
|
const range = document.createRange();
|
|
624
653
|
const sel = window.getSelection();
|
|
625
654
|
const target = this.quillEditorEl()?.nativeElement.querySelector('[contenteditable="true"]');
|
|
626
|
-
const contentScroll = this.
|
|
655
|
+
const contentScroll = this.heightAuto() ? this.wrapperEditorEl()?.nativeElement : target;
|
|
627
656
|
range.selectNodeContents(target);
|
|
628
657
|
range.collapse(false);
|
|
629
658
|
sel?.removeAllRanges();
|
|
@@ -644,10 +673,10 @@ class LibsUiComponentsInputsQuillComponent {
|
|
|
644
673
|
const selection = this.quill()?.getSelection();
|
|
645
674
|
const textSelected = selection?.length ? this.quill()?.getText(selection?.index, selection?.length) : '';
|
|
646
675
|
if (instance) {
|
|
647
|
-
instance.zIndex
|
|
648
|
-
instance.textSelected
|
|
676
|
+
instance.zIndex.set(this.zIndex());
|
|
677
|
+
instance.textSelected.set(textSelected);
|
|
649
678
|
instance.outSaveLink.subscribe((item) => {
|
|
650
|
-
this.
|
|
679
|
+
this.insertLink(item.title, item.link);
|
|
651
680
|
});
|
|
652
681
|
instance.outClose.subscribe(() => this.dynamicComponentService.remove(this.addLinkComponentRef()));
|
|
653
682
|
}
|
|
@@ -660,45 +689,45 @@ class LibsUiComponentsInputsQuillComponent {
|
|
|
660
689
|
}
|
|
661
690
|
}
|
|
662
691
|
async validate() {
|
|
663
|
-
this.
|
|
692
|
+
this.messageError.set('');
|
|
664
693
|
const validRequired = this.validRequired();
|
|
665
694
|
const item = this.item();
|
|
666
695
|
const fieldNameBind = this.fieldNameBind();
|
|
667
696
|
const value = get(item, fieldNameBind);
|
|
668
697
|
if (validRequired && validRequired.isRequired && (!fieldNameBind || !value || !value.trim())) {
|
|
669
|
-
this.
|
|
670
|
-
this.
|
|
698
|
+
this.messageError.set(validRequired.message || ERROR_MESSAGE_EMPTY_VALID);
|
|
699
|
+
this.outMessageError.emit(this.messageError());
|
|
671
700
|
return false;
|
|
672
701
|
}
|
|
673
702
|
const validMinLength = this.validMinLength();
|
|
674
703
|
if (validMinLength && fieldNameBind && value && value.trim().length < validMinLength.length) {
|
|
675
|
-
this.
|
|
676
|
-
this.
|
|
704
|
+
this.messageError.set(validMinLength.message || ERROR_MESSAGE_MIN_LENGTH);
|
|
705
|
+
this.outMessageError.emit(this.messageError());
|
|
677
706
|
return false;
|
|
678
707
|
}
|
|
679
708
|
const validMaxLength = this.validMaxLength();
|
|
680
709
|
if (validMaxLength && fieldNameBind && value && value.trim().length > this.validMaxLength.length) {
|
|
681
|
-
this.
|
|
682
|
-
this.
|
|
710
|
+
this.messageError.set(validMaxLength.message || ERROR_MESSAGE_MAX_LENGTH);
|
|
711
|
+
this.outMessageError.emit(this.messageError());
|
|
683
712
|
return false;
|
|
684
713
|
}
|
|
685
|
-
this.
|
|
714
|
+
this.outMessageError.emit(this.messageError());
|
|
686
715
|
return true;
|
|
687
716
|
}
|
|
688
|
-
|
|
717
|
+
async insertHtml(tagName, content, index) {
|
|
689
718
|
const selection = (index || index === 0) ? index : this.quill()?.getSelection(true).index;
|
|
690
719
|
if (!isNil(selection)) {
|
|
691
720
|
this.quill()?.insertEmbed(selection, tagName, content);
|
|
692
721
|
this.setSelection(selection, content.length);
|
|
693
722
|
}
|
|
694
723
|
}
|
|
695
|
-
async
|
|
724
|
+
async insertText(content, index) {
|
|
696
725
|
const selection = (index || index === 0) ? index : this.quill()?.getSelection(true).index;
|
|
697
726
|
if (!isNil(selection)) {
|
|
698
727
|
this.quill()?.insertText(selection, content);
|
|
699
728
|
}
|
|
700
729
|
}
|
|
701
|
-
async
|
|
730
|
+
async insertLink(text, url, index) {
|
|
702
731
|
const selection = this.quill()?.getSelection(true);
|
|
703
732
|
const indexInsert = (index || index === 0) ? index : selection?.index;
|
|
704
733
|
if (selection?.length) {
|
|
@@ -744,55 +773,38 @@ class LibsUiComponentsInputsQuillComponent {
|
|
|
744
773
|
handleToggleMention(show) {
|
|
745
774
|
this.showMention.set(show);
|
|
746
775
|
}
|
|
747
|
-
async insertImage(image) {
|
|
748
|
-
const sel = window.getSelection();
|
|
749
|
-
if (!sel) {
|
|
750
|
-
return;
|
|
751
|
-
}
|
|
752
|
-
const range = sel.getRangeAt(0);
|
|
753
|
-
if (!this.quill()?.root.contains(range.commonAncestorContainer)) {
|
|
754
|
-
return;
|
|
755
|
-
}
|
|
756
|
-
const selection = this.quill()?.getSelection(true);
|
|
757
|
-
if (!isNil(selection?.index)) {
|
|
758
|
-
this.quill()?.clipboard.dangerouslyPasteHTML(selection.index, image.outerHTML);
|
|
759
|
-
}
|
|
760
|
-
image.remove();
|
|
761
|
-
}
|
|
762
776
|
handlerShowUploadImage() {
|
|
763
|
-
this.
|
|
764
|
-
const instance = this.
|
|
777
|
+
this.uploadImageComponentRef.set(this.dynamicComponentService.resolveComponentFactory(LibsUiComponentsInputsQuillUploadImageComponent));
|
|
778
|
+
const instance = this.uploadImageComponentRef()?.instance;
|
|
765
779
|
if (instance) {
|
|
766
|
-
instance.
|
|
767
|
-
instance.maxImageSize = input(this.customUploadImage().maxImageSize || 1048576, { transform: value => value });
|
|
768
|
-
instance.labelConfig = input(this.customUploadImage().labelConfig);
|
|
780
|
+
instance.uploadImageConfig.set(this.uploadImageConfig());
|
|
769
781
|
instance.outClose.subscribe((event) => {
|
|
770
|
-
this.dynamicComponentService.remove(this.
|
|
782
|
+
this.dynamicComponentService.remove(this.uploadImageComponentRef());
|
|
771
783
|
if (event) {
|
|
772
|
-
this.
|
|
784
|
+
this.insertHtml('image', event);
|
|
773
785
|
}
|
|
774
786
|
});
|
|
775
787
|
}
|
|
776
|
-
this.dynamicComponentService.addToBody(this.
|
|
788
|
+
this.dynamicComponentService.addToBody(this.uploadImageComponentRef());
|
|
777
789
|
}
|
|
778
790
|
setSelection(index, length, sources) {
|
|
779
791
|
this.quill()?.setSelection(index, length, sources);
|
|
780
792
|
}
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
793
|
+
insertMention(event) {
|
|
794
|
+
const range = this.quill()?.getSelection();
|
|
795
|
+
if (!range) {
|
|
796
|
+
return;
|
|
797
|
+
}
|
|
798
|
+
const cursorPos = range.index;
|
|
799
|
+
const startPosInsert = cursorPos - event.lengthKey;
|
|
800
|
+
this.quill()?.deleteText(startPosInsert, event.lengthKey, Quill.sources.USER);
|
|
801
|
+
this.quill()?.insertEmbed(startPosInsert, 'mention', event.data, Quill.sources.USER);
|
|
802
|
+
this.quill()?.insertText(startPosInsert + 1, ' ', Quill.sources.USER);
|
|
803
|
+
this.setSelection(startPosInsert + 2, 0, Quill.sources.USER);
|
|
804
|
+
}
|
|
805
|
+
handlerInsertMention(data) {
|
|
806
|
+
this.insertMention(data);
|
|
807
|
+
}
|
|
796
808
|
async setFontSize(size) {
|
|
797
809
|
this.quill()?.format('size', `${size}px`);
|
|
798
810
|
}
|
|
@@ -814,23 +826,28 @@ class LibsUiComponentsInputsQuillComponent {
|
|
|
814
826
|
this.fontSelected.set(event);
|
|
815
827
|
this.setStyle('font', event?.key);
|
|
816
828
|
}
|
|
829
|
+
handlerChangeShowMoreAction(event) {
|
|
830
|
+
event.stopPropagation();
|
|
831
|
+
this.showMoreAction.update(item => !item);
|
|
832
|
+
}
|
|
817
833
|
ngOnDestroy() {
|
|
818
834
|
this.onDestroy.next();
|
|
819
835
|
this.onDestroy.complete();
|
|
820
836
|
this.dynamicComponentService.remove(this.addLinkComponentRef());
|
|
821
|
-
this.dynamicComponentService.remove(this.
|
|
837
|
+
this.dynamicComponentService.remove(this.uploadImageComponentRef());
|
|
822
838
|
}
|
|
823
839
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsInputsQuillComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
824
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsInputsQuillComponent, isStandalone: true, selector: "libs_ui-components-inputs-quill", inputs: { optionsToolbar: { classPropertyName: "optionsToolbar", publicName: "optionsToolbar", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, labelConfig: { classPropertyName: "labelConfig", publicName: "labelConfig", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, fieldNameBind: { classPropertyName: "fieldNameBind", publicName: "fieldNameBind", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, typeOutPutContent: { classPropertyName: "typeOutPutContent", publicName: "typeOutPutContent", isSignal: true, isRequired: false, transformFunction: null }, ignoreShowErrorLabel: { classPropertyName: "ignoreShowErrorLabel", publicName: "ignoreShowErrorLabel", isSignal: true, isRequired: false, transformFunction: null }, showErrorBorder: { classPropertyName: "showErrorBorder", publicName: "showErrorBorder", isSignal: true, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null }, classIncludeTemplate: { classPropertyName: "classIncludeTemplate", publicName: "classIncludeTemplate", isSignal: true, isRequired: false, transformFunction: null }, classInclude: { classPropertyName: "classInclude", publicName: "classInclude", isSignal: true, isRequired: false, transformFunction: null }, handlerClickHeader: { classPropertyName: "handlerClickHeader", publicName: "handlerClickHeader", isSignal: true, isRequired: false, transformFunction: null }, validRequired: { classPropertyName: "validRequired", publicName: "validRequired", isSignal: true, isRequired: false, transformFunction: null }, validMinLength: { classPropertyName: "validMinLength", publicName: "validMinLength", isSignal: true, isRequired: false, transformFunction: null }, validMaxLength: { classPropertyName: "validMaxLength", publicName: "validMaxLength", isSignal: true, isRequired: false, transformFunction: null }, onlyShowContent: { classPropertyName: "onlyShowContent", publicName: "onlyShowContent", isSignal: true, isRequired: false, transformFunction: null }, zIndex: { classPropertyName: "zIndex", publicName: "zIndex", isSignal: true, isRequired: false, transformFunction: null }, notAllowUploadImage: { classPropertyName: "notAllowUploadImage", publicName: "notAllowUploadImage", isSignal: true, isRequired: false, transformFunction: null }, isHeightAuto: { classPropertyName: "isHeightAuto", publicName: "isHeightAuto", isSignal: true, isRequired: false, transformFunction: null }, customUploadImage: { classPropertyName: "customUploadImage", publicName: "customUploadImage", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, autoFocusBottom: { classPropertyName: "autoFocusBottom", publicName: "autoFocusBottom", isSignal: true, isRequired: false, transformFunction: null }, isShowToolBar: { classPropertyName: "isShowToolBar", publicName: "isShowToolBar", isSignal: true, isRequired: false, transformFunction: null }, classIncludeToolbar: { classPropertyName: "classIncludeToolbar", publicName: "classIncludeToolbar", isSignal: true, isRequired: false, transformFunction: null }, templateToolBarPersonalize: { classPropertyName: "templateToolBarPersonalize", publicName: "templateToolBarPersonalize", isSignal: true, isRequired: false, transformFunction: null }, onlyShowErrorBorderInContent: { classPropertyName: "onlyShowErrorBorderInContent", publicName: "onlyShowErrorBorderInContent", isSignal: true, isRequired: false, transformFunction: null }, functionUploadImage: { classPropertyName: "functionUploadImage", publicName: "functionUploadImage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outLabelError: "outLabelError", outBlur: "outBlur", outFocus: "outFocus", outChange: "outChange", outFunctionsControl: "outFunctionsControl", outImagePaste: "outImagePaste", outSelectionChange: "outSelectionChange" }, viewQueries: [{ propertyName: "wrapperEditorEl", first: true, predicate: ["wrapperEditor"], descendants: true, isSignal: true }, { propertyName: "editorEl", first: true, predicate: ["editor"], descendants: true, isSignal: true }, { propertyName: "quillOptionEl", first: true, predicate: ["quillOption"], descendants: true, isSignal: true }, { propertyName: "quillEditorEl", first: true, predicate: ["quillEditor"], descendants: true, isSignal: true }, { propertyName: "quillToolbarEl", first: true, predicate: ["quillToolbar"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"flex flex-col w-full h-full\">\n @if (labelConfig(); as labelConfig) {\n <libs_ui-components-label [classInclude]=\"labelConfig.classInclude\"\n [required]=\"labelConfig.required\"\n [labelLeft]=\"labelConfig.labelLeft\" />\n }\n <div #wrapperEditor\n [attr.isHeightAuto]=\"isHeightAuto()\"\n [attr.hiddenToolBar]=\"onlyShowContent()\"\n class=\"libs-ui-quill-wrapper w-full h-full relative flex flex-col\"\n [class.libs-ui-border-error-general]=\"messageErr() && showErrorBorder() && !onlyShowErrorBorderInContent()\"\n [class.rounded-[4px]]=\"messageErr() && showErrorBorder() && !onlyShowErrorBorderInContent()\">\n <div #editor\n class=\"libs-ui-quill\"\n [attr.showError]=\"messageErr() && showErrorBorder() && onlyShowErrorBorderInContent()\"\n [class.!hidden]=\"!display()\">\n @if (!onlyShowContent()) {\n <div #quillOption\n class=\"'ql-toolbar ql-snow bg-[#f8f9fa] {{ classIncludeToolbar() }}\">\n <ng-container *ngTemplateOutlet=\"toolbarRef\"></ng-container>\n </div>\n }\n <div #quillEditor></div>\n <!-- MoLibsCoreUIMentionConfig\n [mentionConfig]=\"dataConfigMention\"\n (moToggle)=\"handleToggleMention($event)\"\n (moInsertMention)=\"handlerInsertMention($event)\" -->\n </div>\n @if (template(); as template) {\n <div [class]=\"classIncludeTemplate()\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n }\n </div>\n @if (messageErr() && !ignoreShowErrorLabel()) {\n <div class=\"flex items-center leading-normal mt-[8px]\">\n <span class=\"text-[#ff5454] libs-ui-font-h7r\"> {{ messageErr() | translate }}</span>\n </div>\n }\n</div>\n<div #quillToolbar\n [class]=\"'ql-snow absolute px-[8px] py-[4px] p-0 w-[500px] rounded-[4px] bg-[#ffffff] libs-ui-quill-toolbar-animation ' + classIncludeToolbar() + (isShowToolBar() ? ' block' : ' hidden')\">\n <ng-container *ngTemplateOutlet=\"toolbarRef\"></ng-container>\n</div>\n\n<ng-template #toolbarRef>\n <div class=\"toolbar\">\n <div class=\"ql-formats items-center\">\n @for (option of optionsToolbar(); track $index) {\n <div class=\"flex items-center h-[32px] {{ option.styleGapItem ? option.styleGapItem : 'gap-4' }}\">\n @if (option.undo) {\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content: 'i18n_undo', zIndex: 1250}\"\n class=\"ql-undo\"></button>\n }\n @if (option.redo) {\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content: 'i18n_redo', zIndex: 1250}\"\n class=\"ql-redo\"></button>\n }\n @if (option.fontFamily) {\n <div class=\"relative w-[117px] h-full bg-[#ffffff] rounded-[4px] libs-ui-border-general\">\n <libs_ui-components-dropdown [isNgContent]=\"true\"\n [labelPopoverFullWidth]=\"true\"\n [listConfig]=\"listConfigFont()\"\n [listHasButtonUnSelectOption]=\"false\"\n [listHiddenInputSearch]=\"true\"\n [listMaxItemShow]=\"8\"\n [zIndex]=\"1250\"\n (outSelectKey)=\"handleSelectFont($event)\">\n @if (fontSelected(); as fontSelected) {\n <div class=\"flex items-center cursor-pointer py-[8px] libs-ui-font-h5r pl-[16px] pr-[40px]\">\n <libs_ui-components-popover [type]=\"'text'\"\n [ignoreStopPropagationEvent]=\"true\"\n [config]=\"{zIndex:1250}\">\n {{ labelFontSelectedComputed() }}\n </libs_ui-components-popover>\n <i class=\"libs-ui-icon-move-right rotate-90 absolute right-[12px] text-[#6a7383] text-[16px]\"></i>\n </div>\n }\n </libs_ui-components-dropdown>\n </div>\n }\n @if (option.fontSize) {\n <div class=\"ql-picker\">\n <libs_ui-components-inputs-valid [dataType]=\"'int'\"\n [(item)]=\"size\"\n [fieldNameBind]=\"'value'\"\n [defaultHeight]=\"32\"\n [valueUpDownNumber]=\"1\"\n [maxValueNumber]=\"72\"\n [minValueNumber]=\"8\"\n [readonly]=\"readonly()\"\n [classContainerInput]=\"'w-[72px] h-[32px]'\"\n (outValueChange)=\"handlerValueChange($event)\" />\n </div>\n }\n @if (option.color) {\n <div class=\"ql-color ql-picker ql-color-picker !flex items-center\">\n <libs_ui-components-popover [config]=\"{content:'i18n_text_color', zIndex:1250}\">\n <libs_ui-components-buttons-select_color [zIndex]=\"zIndex()\"\n [externalContent]=\"true\"\n (outColorChange)=\"setStyle('color', $event)\">\n <div class=\"libs-ui-icon-editor-color-text libs-ui-buttons-select-color text-[#6a7383] text-[16px] hover:text-[var(--libs-ui-color-light-1)]\">\n </div>\n </libs_ui-components-buttons-select_color>\n </libs_ui-components-popover>\n </div>\n }\n @if (option.background) {\n <div class=\"ql-background ql-picker ql-color-picker !flex items-center\">\n <libs_ui-components-popover [config]=\"{content:'i18n_background_color', zIndex:1250}\">\n <libs_ui-components-buttons-select_color [zIndex]=\"zIndex()\"\n [externalContent]=\"true\"\n (outColorChange)=\"setStyle('background', $event)\">\n <div class=\"libs-ui-icon-editor-color-background libs-ui-buttons-select-color text-[#6a7383] text-[16px] hover:text-[var(--libs-ui-color-light-1)]\">\n </div>\n </libs_ui-components-buttons-select_color>\n </libs_ui-components-popover>\n </div>\n }\n @if (option.bold) {\n <div class=\"flex items-center\">\n <libs_ui-components-popover [config]=\"{content:'i18n_font_weight_bold', zIndex:1250}\">\n <button class=\"ql-bold\"></button>\n </libs_ui-components-popover>\n </div>\n }\n @if (option.italic) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_font_style_italic', zIndex:1250}\"\n class=\"ql-italic\"></button>\n </div>\n }\n @if (option.underline) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_text_decoration_underline', zIndex:1250}\"\n class=\"ql-underline\"></button>\n </div>\n }\n @if (option.strikeThrough) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_text_line_through', zIndex:1250}\"\n class=\"ql-strike\"></button>\n </div>\n }\n @if (option.adjust) {\n <div class=\"relative !flex items-center ql-align ql-picker ql-icon-picker !w-max\">\n <libs_ui-components-popover [config]=\"{content:'i18n_adjust', zIndex:1250}\">\n <libs_ui-components-dropdown [isNgContent]=\"true\"\n [ignoreStopPropagationEvent]=\"true\"\n [labelPopoverFullWidth]=\"true\"\n [listConfig]=\"listConfigAlign()\"\n [listHiddenInputSearch]=\"true\"\n [popoverCustomConfig]=\"{ignoreArrow: true, classInclude: 'w-[32px] overflow-hidden', position: {mode: 'start', distance: 0}, paddingLeftItem: false}\"\n [listHasButtonUnSelectOption]=\"false\"\n [listMaxItemShow]=\"8\"\n [zIndex]=\"1250\"\n (outSelectKey)=\"handleSelectAlign($event)\">\n @if (alignSelected(); as alignSelected) {\n <div class=\"flex items-center cursor-pointer\">\n <i [class]=\"iconAlignSelectedComputed()\"></i>\n <i class=\"libs-ui-icon-move-right rotate-90 text-[#6a7383] text-[16px] ml-[4px]\"></i>\n </div>\n }\n </libs_ui-components-dropdown>\n </libs_ui-components-popover>\n </div>\n }\n @if (option.indentIncrease) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_indent_increase', zIndex:1250}\"\n class=\"ql-indent\"\n value=\"+1\"></button>\n </div>\n }\n @if (option.indentDecrease) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_indent_decrease', zIndex:1250}\"\n class=\"ql-indent\"\n value=\"-1\"></button>\n </div>\n }\n @if (option.listBulleted) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_list_bulleted', zIndex:1250}\"\n class=\"ql-list ql-bullet\"\n value=\"bullet\"></button>\n </div>\n }\n @if (option.listNumbered) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_list_numbered', zIndex:1250}\"\n class=\"ql-list ql-ordered\"\n value=\"ordered\"></button>\n </div>\n }\n @if (option.personalize && templateToolBarPersonalize(); as templateToolBarPersonalize) {\n <div class=\"flex items-center\">\n <ng-container *ngTemplateOutlet=\"templateToolBarPersonalize\"></ng-container>\n </div>\n }\n @if (option.blockquote) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_quote', zIndex:1250}\"\n class=\"ql-blockquote\"></button>\n </div>\n }\n @if (option.link) {\n <div class=\"flex items-center\">\n <libs_ui-components-popover [config]=\"{content:'i18n_insert_link', zIndex:1250}\">\n <button class=\"ql-link\"></button>\n </libs_ui-components-popover>\n </div>\n }\n @if (option.unLink) {\n <div class=\"flex items-center\">\n <libs_ui-components-popover [config]=\"{content:'i18n_unlink', zIndex:1250}\">\n <button class=\"ql-unLink\"></button>\n </libs_ui-components-popover>\n </div>\n }\n @if (option.image && customUploadImage().showIconUploadImage) {\n <div class=\"flex items-center\">\n <libs_ui-components-popover [config]=\"{content:'i18n_image', zIndex:1250}\">\n <button class=\"ql-image\"></button>\n </libs_ui-components-popover>\n </div>\n }\n @if (option.emoji) {\n <div class=\"flex items-center\">\n <libs_ui-components-emoji [zIndex]=\"1250\"\n [isNgContent]=\"true\"\n (outEventEmoji)=\"handlerAddEmoji($event)\">\n <button class=\"ql-emoji\"></button>\n </libs_ui-components-emoji>\n </div>\n }\n </div>\n @if (!$last) {\n <div class=\"w-[1px] h-[16px] libs-ui-border-right-general mx-[8px]\"></div>\n }\n }\n </div>\n </div>\n</ng-template>\n", styles: ["@-webkit-keyframes animation-move{0%{transform:translateY(-12px)}to{transform:translateY(0)}}@keyframes animation-move{0%{transform:translateY(-12px)}to{transform:translateY(0)}}.libs-ui-quill{height:100%;width:100%;display:flex;flex-direction:column}.libs-ui-quill-toolbar-animation{animation:animation-move .4s ease}.libs-ui-quill-wrapper[isHeightAuto=true]{overflow:auto}.libs-ui-quill-wrapper[isHeightAuto=true] .libs-ui-quill{height:auto}.libs-ui-quill-wrapper[isHeightAuto=true] .libs-ui-quill ::ng-deep .ql-container{height:auto}.libs-ui-quill-wrapper[isHeightAuto=true] .libs-ui-quill ::ng-deep .ql-container .ql-editor{position:relative!important}.libs-ui-quill-wrapper[hiddenToolBar=true] .libs-ui-quill ::ng-deep .ql-container.ql-snow{border:0px!important}.libs-ui-quill-wrapper[hiddenToolBar=false] .libs-ui-quill ::ng-deep .ql-container.ql-snow{border:solid 1px #e6e8ed!important;border-radius:0 0 4px 4px}.libs-ui-quill-wrapper[hiddenToolBar=false] .libs-ui-quill ::ng-deep .ql-toolbar.ql-snow{border:solid 1px #e6e8ed!important;border-radius:4px 4px 0 0;border-bottom:unset!important}.libs-ui-quill-wrapper[hiddenToolBar=false] .libs-ui-quill[showError=true] ::ng-deep .ql-container.ql-snow{border:solid 1px #ee2d41!important}:host ::ng-deep .toolbar,:host ::ng-deep .ql-formats{position:relative;width:100%}:host ::ng-deep .ql-toolbar.ql-snow .ql-formats{display:flex;flex-wrap:wrap}:host ::ng-deep .ql-container.ql-snow{width:100%;height:100%;position:relative}:host ::ng-deep .ql-editor{font-family:var(--libs-ui-font-family-name),\"Arial, Helvetica, sans-serif\"!important;font-weight:400}:host ::ng-deep .ql-editor b{font-family:var(--libs-ui-font-family-name),\"Arial, Helvetica, sans-serif\"!important;font-weight:600}:host ::ng-deep .ql-toolbar.ql-snow{border:none;border-radius:8px;padding:4px 16px}:host ::ng-deep .ql-toolbar.ql-snow .ql-picker-label{color:#071631;border:none!important;margin-top:5px}:host ::ng-deep .ql-toolbar.ql-snow .ql-picker-label:hover{color:var(--libs-ui-color-light-1)!important}:host ::ng-deep .ql-toolbar.ql-snow .ql-picker-label:hover .ql-stroke{stroke:var(--libs-ui-color-light-1)!important}:host ::ng-deep .ql-snow.ql-toolbar .ql-picker-item:hover{color:var(--libs-ui-color-light-1)!important}:host ::ng-deep .ql-snow.ql-toolbar .ql-picker-label.ql-active{color:#071631}:host ::ng-deep .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke{stroke:#071631}:host ::ng-deep .ql-editor{height:100%;width:100%;position:absolute;line-height:1.42!important}:host ::ng-deep .ql-editor:before{font-family:var(--libs-ui-font-family-name),\"Arial, Helvetica, sans-serif\"!important;color:#9ca2ad!important;font-size:12px}:host ::ng-deep .ql-editor img{height:auto;max-width:100%}:host ::ng-deep .ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label{border:none!important}:host ::ng-deep .ql-snow .ql-picker.ql-bold{width:36px!important}:host ::ng-deep .ql-editor.ql-blank{font-size:11px!important;letter-spacing:.05px;font-family:var(--libs-ui-font-family-name),\"Arial, Helvetica, sans-serif\"!important;line-height:16px}:host ::ng-deep .ql-editor.ql-blank:before{font-style:normal!important;color:#9ca2ad!important}:host ::ng-deep .ql-snow.ql-toolbar .ql-picker-label :hover{color:red!important}:host ::ng-deep .ql-formats{margin-right:12px!important}:host ::ng-deep .ql-formats .ql-size.ql-picker,:host ::ng-deep .ql-formats .ql-header.ql-picker,:host ::ng-deep .ql-formats .ql-font.ql-picker{border:solid 1px #e6e8ed!important;border-radius:4px}:host ::ng-deep .ql-formats .ql-align.ql-picker .ql-picker-label{width:24px}:host ::ng-deep .ql-formats .ql-align.ql-picker .ql-picker-label:hover{color:red!important}:host ::ng-deep .ql-formats .ql-header.ql-picker .ql-picker-label:before{font-size:12px}:host ::ng-deep .ql-picker-item:before{font-size:12px}:host ::ng-deep .ql-picker-label:before{font-size:12px}:host ::ng-deep .ql-snow.ql-toolbar button,:host ::ng-deep .ql-snow .ql-toolbar button{background:none;border:none;cursor:pointer;display:flex;align-items:center;float:none;padding:0;width:inherit}:host ::ng-deep ul{padding-left:1rem!important}:host ::ng-deep li{padding-left:0!important}.ql-picker-options{max-height:130px;overflow-y:auto}.ql-snow .ql-picker.ql-size{border:1px solid #e6e7ea;box-shadow:#00000005 0 1px 3px,#1b1f2326 0 0 0 1px;border-radius:2px}.ql-snow .ql-picker.ql-font{border:1px solid #e6e7ea!important;margin-right:8px;border-radius:4px}.ql-snow .ql-picker.ql-font .ql-picker-options:before{font-size:12px}.ql-snow .ql-picker.ql-font .ql-picker-label:before{font-size:12px}.ql-font-Arial{font-family:Arial}.ql-font-sans-serif{font-family:\"sans-serif\"}.ql-font-Helvetica{font-family:Helvetica}.libs-ui-quill-mention{font-weight:500!important;color:#7239ea;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--libs-ui-font-family-name),\"Arial, Helvetica, sans-serif\"!important;font-weight:600}.ql-snow .ql-picker.ql-expanded .ql-picker-options{overflow:hidden}.ql-formats{margin-right:0!important}.ql-formats .ql-header{position:relative!important}.ql-formats .ql-header .ql-picker-options{position:absolute!important;top:-151px!important}.ql-formats .ql-font{position:relative!important}.ql-formats .ql-font .ql-picker-options{position:absolute!important;top:-93px!important}.ql-formats .ql-color{position:relative!important}.ql-formats .ql-color .ql-picker-options{position:absolute!important;top:-108px}.ql-formats .ql-background{position:relative!important}.ql-formats .ql-background .ql-picker-options{position:absolute!important;top:-108px}.ql-formats .ql-align{position:relative!important}.ql-formats .ql-align .ql-picker-label{padding:3px 4px!important}.ql-formats .ql-align .ql-picker-options{position:absolute!important;top:-106px}.ql-snow .ql-picker{font-size:12px!important;height:32px;float:none;width:auto}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LibsUiComponentsLabelComponent, selector: "libs_ui-components-label", inputs: ["iconPopoverClass", "classInclude", "labelLeft", "labelLeftClass", "labelLeftBehindToggleButton", "popover", "required", "buttonsLeft", "disableButtonsLeft", "buttonsRight", "disableButtonsRight", "labelRight", "labelRightClass", "labelRightRequired", "hasToggle", "toggleSize", "toggleActive", "toggleDisable", "description", "descriptionClass", "buttonsDescription", "disableButtonsDescription", "buttonsDescriptionContainerClass", "onlyShowCount", "zIndexPopover", "timerDestroyPopover", "count", "limitLength"], outputs: ["outClickButton", "outSwitchEvent", "outLabelRightClick", "outLabelLeftClick"] }, { kind: "component", type: LibsUiComponentsDropdownComponent, selector: "libs_ui-components-dropdown", inputs: ["useXssFilter", "popoverElementRefCustom", "classInclude", "ignoreStopPropagationEvent", "flagMouse", "flagMouseContent", "popoverCustomConfig", "isNgContent", "zIndex", "convertItemSelected", "getPopoverItemSelected", "httpRequestDetailItemById", "lengthKeys", "textDisplayWhenNoSelect", "textDisplayWhenMultiSelect", "classIncludeTextDisplayWhenNoSelect", "fieldGetLabel", "labelPopoverConfig", "labelPopoverFullWidth", "hasContentUnitRight", "listSearchNoDataTemplateRef", "fieldGetImage", "imageSize", "typeShape", "fieldGetIcon", "fieldGetTextAvatar", "fieldGetColorAvatar", "classAvatarInclude", "getLastTextAfterSpace", "linkImageError", "showError", "showBorderError", "disable", "readonly", "labelConfig", "listSearchConfig", "isSearchOnline", "listHiddenInputSearch", "listSearchPadding", "listKeySearch", "listDividerClassInclude", "listConfig", "listButtonsOther", "listHasButtonUnSelectOption", "listClickExactly", "listBackgroundCustom", "listMaxItemShow", "listKeySelected", "listMultiKeySelected", "listKeysDisable", "listKeysHidden", "validRequired", "validMaxItemSelected", "changeValidUndefinedResetError", "allowSelectItemMultiple", "focusInputSearch", "onlyEmitDataWhenReset", "resetKeyWhenSelectAllKey", "listConfigHasDivider", "classIncludeIcon", "classIncludeContent", "listIgnoreClassDisableDefaultWhenUseKeysDisableItem", "tabKeyActive", "tabsConfig", "ignoreBorderBottom"], outputs: ["flagMouseChange", "flagMouseContentChange", "lengthKeysChange", "showBorderErrorChange", "listKeySelectedChange", "listMultiKeySelectedChange", "tabKeyActiveChange", "outSelectKey", "outSelectMultiKey", "outFunctionsControl", "outValidEvent", "outChangStageFlagMouse", "outDataChange", "outClickButtonOther", "outShowList", "outChangeTabKeyActive"] }, { kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["debugId", "flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsButtonsSelectColorComponent, selector: "libs_ui-components-buttons-select_color", inputs: ["zIndex", "customOptions", "externalContent", "button", "applyNow"], outputs: ["zIndexChange", "outColorChange"] }, { kind: "component", type: LibsUiComponentsInputsValidComponent, selector: "libs_ui-components-inputs-valid", inputs: ["item", "labelConfig", "emitEmptyInDataTypeNumber", "ignoreBlockInputMaxValue", "fieldNameBind", "showCount", "typeComponentSelectItem", "valueComponentSelectItem", "disableComponentSelectItem", "tagInput", "dataType", "resetAutoCompletePassword", "textAreaEnterNotNewLine", "hiddenContent", "fixedFloat", "acceptNegativeValue", "valueUpDownNumber", "ignoreWidthInput100", "classIncludeInput", "classContainerInput", "readonly", "disable", "noBorder", "backgroundNone", "useColorModeExist", "placeholder", "keepPlaceholderOnly", "classContainerBottomInput", "autoRemoveEmoji", "defaultHeight", "maxHeightTextArea", "minHeightTextArea", "ignoreShowError", "borderError", "iconLeftClass", "popoverContentIconLeft", "iconRightClass", "popoverContentIconRight", "zIndexPopoverContent", "unitsLeft", "configUnitLeft", "keySelectedUnitLeft", "unitsRight", "configUnitRight", "keySelectedUnitRight", "maxValueNumber", "minValueNumber", "ignoreContentLeft", "ignoreContentRight", "isBaselineStyle", "valuePatternShowError", "validPattern", "validRequired", "validMinLength", "validMinValue", "validMaxValue", "validMaxLength", "functionValid", "maxLength", "positionMessageErrorStartInput", "classInclude", "resize", "templateLeftBottomInput", "templateRightBottomInput", "onlyAcceptNegativeValue", "autoAddZeroLessThan10InTypeInt", "maxLengthNumberCount", "classMessageErrorInclude", "ignoreStopPropagationEvent", "ignoreUnitRightClassReadOnly", "paddingRightCustomSpecific", "focusTimeOut"], outputs: ["itemChange", "outValueChange", "outSelect", "outIconLeft", "outIconRight", "outClickButtonLabel", "outSwitchEventLabel", "outLabelRightClick", "outEnterInputEvent", "outHeightAreaChange", "outFunctionsControl", "outFocusAndBlur", "outChangeValueByButtonUpDown"] }, { kind: "component", type: LibsUiComponentsEmojiComponent, selector: "libs_ui-components-emoji", inputs: ["configPopover", "isNgContent", "zIndex", "modePopoverPosition", "classPopup", "classInclude", "classIconInclude"], outputs: ["outEventEmoji", "moFunctionsControl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
840
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsInputsQuillComponent, isStandalone: true, selector: "libs_ui-components-inputs-quill", inputs: { optionsToolbar: { classPropertyName: "optionsToolbar", publicName: "optionsToolbar", isSignal: true, isRequired: false, transformFunction: null }, showToolBar: { classPropertyName: "showToolBar", publicName: "showToolBar", isSignal: true, isRequired: false, transformFunction: null }, classIncludeToolbar: { classPropertyName: "classIncludeToolbar", publicName: "classIncludeToolbar", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, fieldNameBind: { classPropertyName: "fieldNameBind", publicName: "fieldNameBind", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, showErrorLabel: { classPropertyName: "showErrorLabel", publicName: "showErrorLabel", isSignal: true, isRequired: false, transformFunction: null }, showErrorBorder: { classPropertyName: "showErrorBorder", publicName: "showErrorBorder", isSignal: true, isRequired: false, transformFunction: null }, onlyShowErrorBorderInContent: { classPropertyName: "onlyShowErrorBorderInContent", publicName: "onlyShowErrorBorderInContent", isSignal: true, isRequired: false, transformFunction: null }, classIncludeTemplate: { classPropertyName: "classIncludeTemplate", publicName: "classIncludeTemplate", isSignal: true, isRequired: false, transformFunction: null }, classInclude: { classPropertyName: "classInclude", publicName: "classInclude", isSignal: true, isRequired: false, transformFunction: null }, handlersExpand: { classPropertyName: "handlersExpand", publicName: "handlersExpand", isSignal: true, isRequired: false, transformFunction: null }, validRequired: { classPropertyName: "validRequired", publicName: "validRequired", isSignal: true, isRequired: false, transformFunction: null }, validMinLength: { classPropertyName: "validMinLength", publicName: "validMinLength", isSignal: true, isRequired: false, transformFunction: null }, validMaxLength: { classPropertyName: "validMaxLength", publicName: "validMaxLength", isSignal: true, isRequired: false, transformFunction: null }, onlyShowContent: { classPropertyName: "onlyShowContent", publicName: "onlyShowContent", isSignal: true, isRequired: false, transformFunction: null }, zIndex: { classPropertyName: "zIndex", publicName: "zIndex", isSignal: true, isRequired: false, transformFunction: null }, dataConfigMention: { classPropertyName: "dataConfigMention", publicName: "dataConfigMention", isSignal: true, isRequired: false, transformFunction: null }, heightAuto: { classPropertyName: "heightAuto", publicName: "heightAuto", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, autoFocusBottom: { classPropertyName: "autoFocusBottom", publicName: "autoFocusBottom", isSignal: true, isRequired: false, transformFunction: null }, templateToolBarPersonalize: { classPropertyName: "templateToolBarPersonalize", publicName: "templateToolBarPersonalize", isSignal: true, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null }, uploadImageConfig: { classPropertyName: "uploadImageConfig", publicName: "uploadImageConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outMessageError: "outMessageError", outBlur: "outBlur", outFocus: "outFocus", outChange: "outChange", outFunctionsControl: "outFunctionsControl", outSelectionChange: "outSelectionChange" }, viewQueries: [{ propertyName: "wrapperEditorEl", first: true, predicate: ["wrapperEditor"], descendants: true, isSignal: true }, { propertyName: "editorEl", first: true, predicate: ["editor"], descendants: true, isSignal: true }, { propertyName: "quillOptionEl", first: true, predicate: ["quillOption"], descendants: true, isSignal: true }, { propertyName: "quillEditorEl", first: true, predicate: ["quillEditor"], descendants: true, isSignal: true }, { propertyName: "quillToolbarEl", first: true, predicate: ["quillToolbar"], descendants: true, isSignal: true }, { propertyName: "toolbarItemsEl", first: true, predicate: ["toolbarItems"], descendants: true, isSignal: true }, { propertyName: "itemsEl", predicate: ["item"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"flex flex-col w-full h-full\">\n @if (label(); as label) {\n <libs_ui-components-label [classInclude]=\"label.classInclude\"\n [required]=\"label.required\"\n [labelLeft]=\"label.labelLeft\" />\n }\n <div #wrapperEditor\n [attr.heightAuto]=\"heightAuto()\"\n [attr.hiddenToolBar]=\"onlyShowContent()\"\n class=\"libs-ui-quill-wrapper w-full h-full relative flex flex-col\"\n [class.libs-ui-border-error-general]=\"messageError() && showErrorBorder() && !onlyShowErrorBorderInContent()\"\n [class.rounded-[4px]]=\"messageError() && showErrorBorder() && !onlyShowErrorBorderInContent()\">\n <div #editor\n class=\"libs-ui-quill\"\n [attr.showError]=\"messageError() && showErrorBorder() && onlyShowErrorBorderInContent()\"\n [class.!hidden]=\"!display()\">\n @if (!onlyShowContent()) {\n <div #quillOption\n class=\"'ql-toolbar ql-snow bg-[#f8f9fa] {{ classIncludeToolbar() }}\">\n <ng-container *ngTemplateOutlet=\"toolbar\"></ng-container>\n </div>\n }\n <div #quillEditor\n LibsUiComponentsInputsMentionDirective\n [mentionConfig]=\"dataConfigMention()\"\n (outToggle)=\"handleToggleMention($event)\"\n (outInsertMention)=\"handlerInsertMention($event)\"></div>\n </div>\n @if (template(); as template) {\n <div [class]=\"classIncludeTemplate()\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n }\n </div>\n @if (messageError() && showErrorLabel()) {\n <div class=\"flex items-center leading-normal mt-[8px]\">\n <span class=\"text-[#ff5454] libs-ui-font-h7r\"> {{ messageError() | translate }}</span>\n </div>\n }\n</div>\n@if (showToolBar()) {\n <div #quillToolbar\n [class]=\"'ql-snow absolute px-[8px] py-[4px] p-0 w-[500px] rounded-[4px] bg-[#ffffff] libs-ui-quill-toolbar-animation ' + classIncludeToolbar()\">\n <ng-container *ngTemplateOutlet=\"toolbar\"></ng-container>\n </div>\n}\n\n<ng-template #toolbar>\n <div class=\"toolbar\"\n #toolbarItems>\n <div class=\"ql-formats items-center\">\n @for (option of optionsToolbar(); track option) {\n <div #item\n class=\"items-center\"\n [class.hidden]=\"!itemShow().includes($index)\"\n [class.flex]=\"itemShow().includes($index)\">\n <ng-container *ngTemplateOutlet=\"itemTemplate;context:{option, $index, $last}\"></ng-container>\n </div>\n }\n <div class=\"relative\">\n <libs_ui-components-buttons-button [type]=\"showMoreAction() ? 'button-secondary' : 'button-third'\"\n [iconOnlyType]=\"true\"\n [classInclude]=\"'!p-[1px] !h-[20px]'\"\n [classIconLeft]=\"'libs-ui-icon-move-right rotate-90'\"\n (outClick)=\"handlerChangeShowMoreAction($event)\" />\n <div [class.hidden]=\"!showMoreAction()\"\n class=\"absolute bg-[#ffffff] top-[10px] shadow-md z-[1] flex items-center px-[16px] py-[4px] rounded-[8px] top-[31px] right-[0px]\">\n @for (option of optionsToolbar(); track option) {\n <div class=\"items-center\"\n [class.hidden]=\"itemShow().includes($index)\"\n [class.flex]=\"!itemShow().includes($index)\">\n <ng-container *ngTemplateOutlet=\"itemTemplate;context:{option, $index, $last}\"></ng-container>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n\n\n<ng-template #itemTemplate\n let-$index=\"$index\"\n let-$last=\"$last\"\n let-option=\"option\">\n <div class=\"flex items-center h-[32px] {{ option.styleGapItem ? option.styleGapItem : 'gap-4' }}\">\n @if (option.undo) {\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content: 'i18n_undo', zIndex: 1250}\"\n class=\"ql-undo\"></button>\n }\n @if (option.redo) {\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content: 'i18n_redo', zIndex: 1250}\"\n class=\"ql-redo\"></button>\n }\n @if (option.fontFamily) {\n <div class=\"relative w-[117px] h-full bg-[#ffffff] rounded-[4px] libs-ui-border-general\">\n <libs_ui-components-dropdown [isNgContent]=\"true\"\n [labelPopoverFullWidth]=\"true\"\n [listConfig]=\"listConfigFont()\"\n [listHasButtonUnSelectOption]=\"false\"\n [listHiddenInputSearch]=\"true\"\n [listMaxItemShow]=\"8\"\n [zIndex]=\"1250\"\n (outSelectKey)=\"handleSelectFont($event)\">\n @if (fontSelected(); as fontSelected) {\n <div class=\"flex items-center cursor-pointer py-[8px] libs-ui-font-h5r pl-[16px] pr-[40px]\">\n <libs_ui-components-popover [type]=\"'text'\"\n [ignoreStopPropagationEvent]=\"true\"\n [config]=\"{zIndex:1250}\">\n {{ labelFontSelectedComputed() }}\n </libs_ui-components-popover>\n <i class=\"libs-ui-icon-move-right rotate-90 absolute right-[12px] text-[#6a7383] text-[16px]\"></i>\n </div>\n }\n </libs_ui-components-dropdown>\n </div>\n }\n @if (option.fontSize) {\n <div class=\"ql-picker\">\n <libs_ui-components-inputs-valid [dataType]=\"'int'\"\n [(item)]=\"size\"\n [fieldNameBind]=\"'value'\"\n [valueUpDownNumber]=\"1\"\n [maxValueNumber]=\"72\"\n [minValueNumber]=\"8\"\n [readonly]=\"readonly()\"\n [classContainerInput]=\"'w-[72px] h-[32px]'\"\n (outValueChange)=\"handlerValueChange($event)\" />\n </div>\n }\n @if (option.color) {\n <div class=\"ql-color ql-picker ql-color-picker !flex items-center\">\n <libs_ui-components-popover [config]=\"{content:'i18n_text_color', zIndex:1250}\">\n <libs_ui-components-buttons-select_color [zIndex]=\"zIndex()\"\n [direction]=\"'top'\"\n [externalContent]=\"true\"\n [applyNow]=\"true\"\n (outColorChange)=\"setStyle('color', $event)\">\n <div class=\"libs-ui-icon-editor-color-text libs-ui-buttons-select-color text-[#6a7383] text-[16px] hover:text-[var(--libs-ui-color-light-1)]\">\n </div>\n </libs_ui-components-buttons-select_color>\n </libs_ui-components-popover>\n </div>\n }\n @if (option.background) {\n <div class=\"ql-background ql-picker ql-color-picker !flex items-center\">\n <libs_ui-components-popover [config]=\"{content:'i18n_background_color', zIndex:1250}\">\n <libs_ui-components-buttons-select_color [zIndex]=\"zIndex()\"\n [direction]=\"'top'\"\n [externalContent]=\"true\"\n [applyNow]=\"true\"\n (outColorChange)=\"setStyle('background', $event)\">\n <div class=\"libs-ui-icon-editor-color-background libs-ui-buttons-select-color text-[#6a7383] text-[16px] hover:text-[var(--libs-ui-color-light-1)]\">\n </div>\n </libs_ui-components-buttons-select_color>\n </libs_ui-components-popover>\n </div>\n }\n @if (option.bold) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_font_weight_bold', zIndex:1250}\"\n class=\"ql-bold\"></button>\n </div>\n }\n @if (option.italic) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_font_style_italic', zIndex:1250}\"\n class=\"ql-italic\"></button>\n </div>\n }\n @if (option.underline) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_text_decoration_underline', zIndex:1250}\"\n class=\"ql-underline\"></button>\n </div>\n }\n @if (option.strikeThrough) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_text_line_through', zIndex:1250}\"\n class=\"ql-strike\"></button>\n </div>\n }\n @if (option.adjust) {\n <div class=\"relative !flex items-center ql-align ql-picker ql-icon-picker !w-max\">\n <libs_ui-components-popover [config]=\"{content:'i18n_adjust', zIndex:1250}\">\n <libs_ui-components-dropdown [isNgContent]=\"true\"\n [ignoreStopPropagationEvent]=\"true\"\n [labelPopoverFullWidth]=\"true\"\n [listConfig]=\"listConfigAlign()\"\n [listHiddenInputSearch]=\"true\"\n [popoverCustomConfig]=\"{ignoreArrow: true, classInclude: '!w-[32px] overflow-hidden !py-[4px]', position: {mode: 'start', distance: 0}, paddingLeftItem: false}\"\n [listHasButtonUnSelectOption]=\"false\"\n [listMaxItemShow]=\"8\"\n [zIndex]=\"1250\"\n (outSelectKey)=\"handleSelectAlign($event)\">\n @if (alignSelected(); as alignSelected) {\n <div class=\"flex items-center cursor-pointer\">\n <i [class]=\"iconAlignSelectedComputed()\"></i>\n <i class=\"libs-ui-icon-move-right rotate-90 text-[#6a7383] text-[16px] ml-[4px]\"></i>\n </div>\n }\n </libs_ui-components-dropdown>\n </libs_ui-components-popover>\n </div>\n }\n @if (option.indentIncrease) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_indent_increase', zIndex:1250}\"\n class=\"ql-indent\"\n value=\"+1\"></button>\n </div>\n }\n @if (option.indentDecrease) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_indent_decrease', zIndex:1250}\"\n class=\"ql-indent\"\n value=\"-1\"></button>\n </div>\n }\n @if (option.listBulleted) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_list_bulleted', zIndex:1250}\"\n class=\"ql-list ql-bullet\"\n value=\"bullet\"></button>\n </div>\n }\n @if (option.listNumbered) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_list_numbered', zIndex:1250}\"\n class=\"ql-list ql-ordered\"\n value=\"ordered\"></button>\n </div>\n }\n @if (option.personalize && templateToolBarPersonalize(); as templateToolBarPersonalize) {\n <div class=\"flex items-center\">\n <ng-container *ngTemplateOutlet=\"templateToolBarPersonalize\"></ng-container>\n </div>\n }\n @if (option.blockquote) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_quote', zIndex:1250}\"\n class=\"ql-blockquote\"></button>\n </div>\n }\n @if (option.link) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_insert_link', zIndex:1250}\"\n class=\"ql-link\"></button>\n </div>\n }\n @if (option.unLink) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_unlink', zIndex:1250}\"\n class=\"ql-unLink\"></button>\n </div>\n }\n @if (option.image && uploadImageConfig().showIcon) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_image', zIndex:1250}\"\n class=\"ql-image\"></button>\n </div>\n }\n @if (option.emoji) {\n <div class=\"flex items-center\">\n <libs_ui-components-emoji [zIndex]=\"1250\"\n [isNgContent]=\"true\"\n (outEventEmoji)=\"handlerAddEmoji($event)\">\n <button class=\"ql-emoji\"></button>\n </libs_ui-components-emoji>\n </div>\n }\n </div>\n @if (!$last) {\n <div class=\"w-[1px] h-[16px] libs-ui-border-right-general mx-[8px]\"></div>\n }\n</ng-template>\n", styles: ["@-webkit-keyframes animation-move{0%{transform:translateY(-12px)}to{transform:translateY(0)}}@keyframes animation-move{0%{transform:translateY(-12px)}to{transform:translateY(0)}}.libs-ui-quill{height:100%;width:100%;display:flex;flex-direction:column}.libs-ui-quill-toolbar-animation{animation:animation-move .4s ease}.libs-ui-quill-wrapper[heightAuto=true]{overflow:auto}.libs-ui-quill-wrapper[heightAuto=true] .libs-ui-quill{height:auto}.libs-ui-quill-wrapper[heightAuto=true] .libs-ui-quill ::ng-deep .ql-container{height:auto}.libs-ui-quill-wrapper[heightAuto=true] .libs-ui-quill ::ng-deep .ql-container .ql-editor{position:relative!important}.libs-ui-quill-wrapper[hiddenToolBar=true] .libs-ui-quill ::ng-deep .ql-container.ql-snow{border:0px!important}.libs-ui-quill-wrapper[hiddenToolBar=false] .libs-ui-quill ::ng-deep .ql-container.ql-snow{border:solid 1px #e6e8ed!important;border-radius:0 0 4px 4px}.libs-ui-quill-wrapper[hiddenToolBar=false] .libs-ui-quill ::ng-deep .ql-toolbar.ql-snow{border:solid 1px #e6e8ed!important;border-radius:4px 4px 0 0;border-bottom:unset!important}.libs-ui-quill-wrapper[hiddenToolBar=false] .libs-ui-quill[showError=true] ::ng-deep .ql-container.ql-snow{border:solid 1px #ee2d41!important}:host ::ng-deep .toolbar,:host ::ng-deep .ql-formats{position:relative;width:100%}:host ::ng-deep .ql-toolbar.ql-snow .ql-formats{display:flex}:host ::ng-deep .ql-container.ql-snow{width:100%;height:100%;position:relative}:host ::ng-deep .ql-editor{font-family:var(--libs-ui-font-family-name),\"Arial, Helvetica, sans-serif\"!important;font-weight:400}:host ::ng-deep .ql-editor b{font-family:var(--libs-ui-font-family-name),\"Arial, Helvetica, sans-serif\"!important;font-weight:600}:host ::ng-deep .ql-toolbar.ql-snow{border:none;border-radius:8px;padding:4px 16px}:host ::ng-deep .ql-toolbar.ql-snow .ql-picker-label{color:#071631;border:none!important;margin-top:5px}:host ::ng-deep .ql-toolbar.ql-snow .ql-picker-label:hover{color:var(--libs-ui-color-light-1)!important}:host ::ng-deep .ql-toolbar.ql-snow .ql-picker-label:hover .ql-stroke{stroke:var(--libs-ui-color-light-1)!important}:host ::ng-deep .ql-snow.ql-toolbar .ql-picker-item:hover{color:var(--libs-ui-color-light-1)!important}:host ::ng-deep .ql-snow.ql-toolbar .ql-picker-label.ql-active{color:#071631}:host ::ng-deep .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke{stroke:#071631}:host ::ng-deep .ql-editor{height:100%;width:100%;position:absolute;line-height:1.42!important}:host ::ng-deep .ql-editor:before{font-family:var(--libs-ui-font-family-name),\"Arial, Helvetica, sans-serif\"!important;color:#9ca2ad!important;font-size:12px}:host ::ng-deep .ql-editor img{height:auto;max-width:100%}:host ::ng-deep .ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label{border:none!important}:host ::ng-deep .ql-snow .ql-picker.ql-bold{width:36px!important}:host ::ng-deep .ql-editor.ql-blank{font-size:11px!important;letter-spacing:.05px;font-family:var(--libs-ui-font-family-name),\"Arial, Helvetica, sans-serif\"!important;line-height:16px}:host ::ng-deep .ql-editor.ql-blank:before{font-style:normal!important;color:#9ca2ad!important}:host ::ng-deep .ql-snow.ql-toolbar .ql-picker-label :hover{color:red!important}:host ::ng-deep .ql-formats{margin-right:12px!important}:host ::ng-deep .ql-formats .ql-size.ql-picker,:host ::ng-deep .ql-formats .ql-header.ql-picker,:host ::ng-deep .ql-formats .ql-font.ql-picker{border:solid 1px #e6e8ed!important;border-radius:4px}:host ::ng-deep .ql-formats .ql-align.ql-picker .ql-picker-label{width:24px}:host ::ng-deep .ql-formats .ql-align.ql-picker .ql-picker-label:hover{color:red!important}:host ::ng-deep .ql-formats .ql-header.ql-picker .ql-picker-label:before{font-size:12px}:host ::ng-deep .ql-picker-item:before{font-size:12px}:host ::ng-deep .ql-picker-label:before{font-size:12px}:host ::ng-deep .ql-snow.ql-toolbar button,:host ::ng-deep .ql-snow .ql-toolbar button{background:none;border:none;cursor:pointer;display:flex;align-items:center;float:none;padding:0;width:inherit}:host ::ng-deep ul{padding-left:1rem!important}:host ::ng-deep li{padding-left:0!important}:host ::ng-deep .ql-tooltip[data-mode=link]:before{content:var(--libs-ui-quill-tool-edit-link, \"Enter link:\")}:host ::ng-deep .ql-tooltip{border:1px solid #e6e7ea!important;border-radius:4px;display:flex;align-items:center;padding:8px 16px;color:#6a7383}:host ::ng-deep .ql-tooltip a{color:var(--libs-ui-color-light-1)!important;font-size:11px!important;letter-spacing:.05px;font-family:var(--libs-ui-font-family-name),\"Arial, Helvetica, sans-serif\"!important;line-height:16px;padding-top:4px;padding-bottom:4px}:host ::ng-deep .ql-tooltip:before{content:var(--libs-ui-quill-tool-link, \"Link:\")}:host ::ng-deep .ql-tooltip .ql-action:after{border-right:1px solid #e6e7ea;content:var(--libs-ui-quill-tool-link-action, \"Edit\")!important}:host ::ng-deep .ql-tooltip .ql-remove:before{content:var(--libs-ui-quill-tool-link-remove, \"Delete\")!important;color:#ee2d41}:host ::ng-deep .ql-tooltip input{max-width:100%;font-family:var(--libs-ui-font-family-name, \"Arial\");font-weight:400;font-size:12px;color:#071631;padding:7px 12px;background-color:#fff;background-clip:padding-box;min-height:32px;border:1px solid #e6e7ea;border-radius:4px}:host ::ng-deep .ql-tooltip input:focus{outline:none}:host ::ng-deep .ql-tooltip input:focus:not(:read-only):not(:disabled){border:1px solid var(--libs-ui-color-light-1, #4e8cf7)}:host ::ng-deep .ql-editing .ql-action:after{content:var(--libs-ui-quill-tool-link-save, \"Save\")!important}:host ::ng-deep .ql-hidden{display:none!important}.ql-picker-options{max-height:130px;overflow-y:auto}.ql-snow .ql-picker.ql-size{border:1px solid #e6e7ea;box-shadow:#00000005 0 1px 3px,#1b1f2326 0 0 0 1px;border-radius:2px}.ql-snow .ql-picker.ql-font{border:1px solid #e6e7ea!important;margin-right:8px;border-radius:4px}.ql-snow .ql-picker.ql-font .ql-picker-options:before{font-size:12px}.ql-snow .ql-picker.ql-font .ql-picker-label:before{font-size:12px}.ql-font-Arial{font-family:Arial}.ql-font-sans-serif{font-family:\"sans-serif\"}.ql-font-Helvetica{font-family:Helvetica}.libs-ui-quill-mention{font-weight:500!important;color:#7239ea;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--libs-ui-font-family-name),\"Arial, Helvetica, sans-serif\"!important;font-weight:600}.ql-snow .ql-picker.ql-expanded .ql-picker-options{overflow:hidden}.ql-formats{margin-right:0!important}.ql-formats .ql-header{position:relative!important}.ql-formats .ql-header .ql-picker-options{position:absolute!important;top:-151px!important}.ql-formats .ql-font{position:relative!important}.ql-formats .ql-font .ql-picker-options{position:absolute!important;top:-93px!important}.ql-formats .ql-color{position:relative!important}.ql-formats .ql-color .ql-picker-options{position:absolute!important;top:-108px}.ql-formats .ql-background{position:relative!important}.ql-formats .ql-background .ql-picker-options{position:absolute!important;top:-108px}.ql-formats .ql-align{position:relative!important}.ql-formats .ql-align .ql-picker-label{padding:3px 4px!important}.ql-formats .ql-align .ql-picker-options{position:absolute!important;top:-106px}.ql-snow .ql-picker{font-size:12px!important;height:32px;float:none;width:auto}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: LibsUiComponentsInputsMentionDirective, selector: "[LibsUiComponentsInputsMentionDirective]", inputs: ["mentionConfig", "mentionListTemplate"], outputs: ["outSearchTerm", "outItemSelected", "outToggle", "outInsertMention", "outFunctionControl"] }, { kind: "component", type: LibsUiComponentsLabelComponent, selector: "libs_ui-components-label", inputs: ["iconPopoverClass", "classInclude", "labelLeft", "labelLeftClass", "labelLeftBehindToggleButton", "popover", "required", "buttonsLeft", "disableButtonsLeft", "buttonsRight", "disableButtonsRight", "labelRight", "labelRightClass", "labelRightRequired", "hasToggle", "toggleSize", "toggleActive", "toggleDisable", "description", "descriptionClass", "buttonsDescription", "disableButtonsDescription", "buttonsDescriptionContainerClass", "onlyShowCount", "zIndexPopover", "timerDestroyPopover", "count", "limitLength"], outputs: ["outClickButton", "outSwitchEvent", "outLabelRightClick", "outLabelLeftClick"] }, { kind: "component", type: LibsUiComponentsDropdownComponent, selector: "libs_ui-components-dropdown", inputs: ["useXssFilter", "popoverElementRefCustom", "classInclude", "ignoreStopPropagationEvent", "flagMouse", "flagMouseContent", "popoverCustomConfig", "isNgContent", "zIndex", "convertItemSelected", "getPopoverItemSelected", "httpRequestDetailItemById", "lengthKeys", "textDisplayWhenNoSelect", "textDisplayWhenMultiSelect", "classIncludeTextDisplayWhenNoSelect", "fieldGetLabel", "labelPopoverConfig", "labelPopoverFullWidth", "hasContentUnitRight", "listSearchNoDataTemplateRef", "fieldGetImage", "imageSize", "typeShape", "fieldGetIcon", "fieldGetTextAvatar", "fieldGetColorAvatar", "classAvatarInclude", "getLastTextAfterSpace", "linkImageError", "showError", "showBorderError", "disable", "readonly", "labelConfig", "listSearchConfig", "isSearchOnline", "listHiddenInputSearch", "listSearchPadding", "listKeySearch", "listDividerClassInclude", "listConfig", "listButtonsOther", "listHasButtonUnSelectOption", "listClickExactly", "listBackgroundCustom", "listMaxItemShow", "listKeySelected", "listMultiKeySelected", "listKeysDisable", "listKeysHidden", "validRequired", "validMaxItemSelected", "changeValidUndefinedResetError", "allowSelectItemMultiple", "focusInputSearch", "onlyEmitDataWhenReset", "resetKeyWhenSelectAllKey", "listConfigHasDivider", "classIncludeIcon", "classIncludeContent", "listIgnoreClassDisableDefaultWhenUseKeysDisableItem", "tabKeyActive", "tabsConfig", "ignoreBorderBottom"], outputs: ["flagMouseChange", "flagMouseContentChange", "lengthKeysChange", "showBorderErrorChange", "listKeySelectedChange", "listMultiKeySelectedChange", "tabKeyActiveChange", "outSelectKey", "outSelectMultiKey", "outFunctionsControl", "outValidEvent", "outChangStageFlagMouse", "outDataChange", "outClickButtonOther", "outShowList", "outChangeTabKeyActive"] }, { kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["debugId", "flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsButtonsSelectColorComponent, selector: "libs_ui-components-buttons-select_color", inputs: ["zIndex", "customOptions", "externalContent", "direction", "button", "applyNow"], outputs: ["zIndexChange", "outColorChange"] }, { kind: "component", type: LibsUiComponentsInputsValidComponent, selector: "libs_ui-components-inputs-valid", inputs: ["item", "labelConfig", "emitEmptyInDataTypeNumber", "ignoreBlockInputMaxValue", "fieldNameBind", "showCount", "typeComponentSelectItem", "valueComponentSelectItem", "disableComponentSelectItem", "tagInput", "dataType", "resetAutoCompletePassword", "textAreaEnterNotNewLine", "hiddenContent", "fixedFloat", "acceptNegativeValue", "valueUpDownNumber", "ignoreWidthInput100", "classIncludeInput", "classContainerInput", "readonly", "disable", "noBorder", "backgroundNone", "useColorModeExist", "placeholder", "keepPlaceholderOnly", "classContainerBottomInput", "autoRemoveEmoji", "defaultHeight", "maxHeightTextArea", "minHeightTextArea", "ignoreShowError", "borderError", "iconLeftClass", "popoverContentIconLeft", "iconRightClass", "popoverContentIconRight", "zIndexPopoverContent", "unitsLeft", "configUnitLeft", "keySelectedUnitLeft", "unitsRight", "configUnitRight", "keySelectedUnitRight", "maxValueNumber", "minValueNumber", "ignoreContentLeft", "ignoreContentRight", "isBaselineStyle", "valuePatternShowError", "validPattern", "validRequired", "validMinLength", "validMinValue", "validMaxValue", "validMaxLength", "functionValid", "maxLength", "positionMessageErrorStartInput", "classInclude", "resize", "templateLeftBottomInput", "templateRightBottomInput", "onlyAcceptNegativeValue", "autoAddZeroLessThan10InTypeInt", "maxLengthNumberCount", "classMessageErrorInclude", "ignoreStopPropagationEvent", "ignoreUnitRightClassReadOnly", "paddingRightCustomSpecific", "focusTimeOut"], outputs: ["itemChange", "outValueChange", "outSelect", "outIconLeft", "outIconRight", "outClickButtonLabel", "outSwitchEventLabel", "outLabelRightClick", "outEnterInputEvent", "outHeightAreaChange", "outFunctionsControl", "outFocusAndBlur", "outChangeValueByButtonUpDown"] }, { kind: "component", type: LibsUiComponentsEmojiComponent, selector: "libs_ui-components-emoji", inputs: ["configPopover", "isNgContent", "zIndex", "modePopoverPosition", "classPopup", "classInclude", "classIconInclude"], outputs: ["outEventEmoji", "moFunctionsControl"] }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
825
841
|
}
|
|
826
842
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsInputsQuillComponent, decorators: [{
|
|
827
843
|
type: Component,
|
|
828
844
|
args: [{ selector: 'libs_ui-components-inputs-quill', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
829
|
-
TranslateModule, NgTemplateOutlet,
|
|
845
|
+
TranslateModule, NgTemplateOutlet, LibsUiComponentsInputsMentionDirective,
|
|
830
846
|
LibsUiComponentsLabelComponent, LibsUiComponentsDropdownComponent,
|
|
831
847
|
LibsUiComponentsPopoverComponent, LibsUiComponentsButtonsSelectColorComponent,
|
|
832
|
-
LibsUiComponentsInputsValidComponent, LibsUiComponentsEmojiComponent
|
|
833
|
-
], template: "<div class=\"flex flex-col w-full h-full\">\n @if (labelConfig(); as labelConfig) {\n <libs_ui-components-label [classInclude]=\"labelConfig.classInclude\"\n [required]=\"labelConfig.required\"\n [labelLeft]=\"labelConfig.labelLeft\" />\n }\n <div #wrapperEditor\n [attr.isHeightAuto]=\"isHeightAuto()\"\n [attr.hiddenToolBar]=\"onlyShowContent()\"\n class=\"libs-ui-quill-wrapper w-full h-full relative flex flex-col\"\n [class.libs-ui-border-error-general]=\"messageErr() && showErrorBorder() && !onlyShowErrorBorderInContent()\"\n [class.rounded-[4px]]=\"messageErr() && showErrorBorder() && !onlyShowErrorBorderInContent()\">\n <div #editor\n class=\"libs-ui-quill\"\n [attr.showError]=\"messageErr() && showErrorBorder() && onlyShowErrorBorderInContent()\"\n [class.!hidden]=\"!display()\">\n @if (!onlyShowContent()) {\n <div #quillOption\n class=\"'ql-toolbar ql-snow bg-[#f8f9fa] {{ classIncludeToolbar() }}\">\n <ng-container *ngTemplateOutlet=\"toolbarRef\"></ng-container>\n </div>\n }\n <div #quillEditor></div>\n <!-- MoLibsCoreUIMentionConfig\n [mentionConfig]=\"dataConfigMention\"\n (moToggle)=\"handleToggleMention($event)\"\n (moInsertMention)=\"handlerInsertMention($event)\" -->\n </div>\n @if (template(); as template) {\n <div [class]=\"classIncludeTemplate()\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n }\n </div>\n @if (messageErr() && !ignoreShowErrorLabel()) {\n <div class=\"flex items-center leading-normal mt-[8px]\">\n <span class=\"text-[#ff5454] libs-ui-font-h7r\"> {{ messageErr() | translate }}</span>\n </div>\n }\n</div>\n<div #quillToolbar\n [class]=\"'ql-snow absolute px-[8px] py-[4px] p-0 w-[500px] rounded-[4px] bg-[#ffffff] libs-ui-quill-toolbar-animation ' + classIncludeToolbar() + (isShowToolBar() ? ' block' : ' hidden')\">\n <ng-container *ngTemplateOutlet=\"toolbarRef\"></ng-container>\n</div>\n\n<ng-template #toolbarRef>\n <div class=\"toolbar\">\n <div class=\"ql-formats items-center\">\n @for (option of optionsToolbar(); track $index) {\n <div class=\"flex items-center h-[32px] {{ option.styleGapItem ? option.styleGapItem : 'gap-4' }}\">\n @if (option.undo) {\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content: 'i18n_undo', zIndex: 1250}\"\n class=\"ql-undo\"></button>\n }\n @if (option.redo) {\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content: 'i18n_redo', zIndex: 1250}\"\n class=\"ql-redo\"></button>\n }\n @if (option.fontFamily) {\n <div class=\"relative w-[117px] h-full bg-[#ffffff] rounded-[4px] libs-ui-border-general\">\n <libs_ui-components-dropdown [isNgContent]=\"true\"\n [labelPopoverFullWidth]=\"true\"\n [listConfig]=\"listConfigFont()\"\n [listHasButtonUnSelectOption]=\"false\"\n [listHiddenInputSearch]=\"true\"\n [listMaxItemShow]=\"8\"\n [zIndex]=\"1250\"\n (outSelectKey)=\"handleSelectFont($event)\">\n @if (fontSelected(); as fontSelected) {\n <div class=\"flex items-center cursor-pointer py-[8px] libs-ui-font-h5r pl-[16px] pr-[40px]\">\n <libs_ui-components-popover [type]=\"'text'\"\n [ignoreStopPropagationEvent]=\"true\"\n [config]=\"{zIndex:1250}\">\n {{ labelFontSelectedComputed() }}\n </libs_ui-components-popover>\n <i class=\"libs-ui-icon-move-right rotate-90 absolute right-[12px] text-[#6a7383] text-[16px]\"></i>\n </div>\n }\n </libs_ui-components-dropdown>\n </div>\n }\n @if (option.fontSize) {\n <div class=\"ql-picker\">\n <libs_ui-components-inputs-valid [dataType]=\"'int'\"\n [(item)]=\"size\"\n [fieldNameBind]=\"'value'\"\n [defaultHeight]=\"32\"\n [valueUpDownNumber]=\"1\"\n [maxValueNumber]=\"72\"\n [minValueNumber]=\"8\"\n [readonly]=\"readonly()\"\n [classContainerInput]=\"'w-[72px] h-[32px]'\"\n (outValueChange)=\"handlerValueChange($event)\" />\n </div>\n }\n @if (option.color) {\n <div class=\"ql-color ql-picker ql-color-picker !flex items-center\">\n <libs_ui-components-popover [config]=\"{content:'i18n_text_color', zIndex:1250}\">\n <libs_ui-components-buttons-select_color [zIndex]=\"zIndex()\"\n [externalContent]=\"true\"\n (outColorChange)=\"setStyle('color', $event)\">\n <div class=\"libs-ui-icon-editor-color-text libs-ui-buttons-select-color text-[#6a7383] text-[16px] hover:text-[var(--libs-ui-color-light-1)]\">\n </div>\n </libs_ui-components-buttons-select_color>\n </libs_ui-components-popover>\n </div>\n }\n @if (option.background) {\n <div class=\"ql-background ql-picker ql-color-picker !flex items-center\">\n <libs_ui-components-popover [config]=\"{content:'i18n_background_color', zIndex:1250}\">\n <libs_ui-components-buttons-select_color [zIndex]=\"zIndex()\"\n [externalContent]=\"true\"\n (outColorChange)=\"setStyle('background', $event)\">\n <div class=\"libs-ui-icon-editor-color-background libs-ui-buttons-select-color text-[#6a7383] text-[16px] hover:text-[var(--libs-ui-color-light-1)]\">\n </div>\n </libs_ui-components-buttons-select_color>\n </libs_ui-components-popover>\n </div>\n }\n @if (option.bold) {\n <div class=\"flex items-center\">\n <libs_ui-components-popover [config]=\"{content:'i18n_font_weight_bold', zIndex:1250}\">\n <button class=\"ql-bold\"></button>\n </libs_ui-components-popover>\n </div>\n }\n @if (option.italic) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_font_style_italic', zIndex:1250}\"\n class=\"ql-italic\"></button>\n </div>\n }\n @if (option.underline) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_text_decoration_underline', zIndex:1250}\"\n class=\"ql-underline\"></button>\n </div>\n }\n @if (option.strikeThrough) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_text_line_through', zIndex:1250}\"\n class=\"ql-strike\"></button>\n </div>\n }\n @if (option.adjust) {\n <div class=\"relative !flex items-center ql-align ql-picker ql-icon-picker !w-max\">\n <libs_ui-components-popover [config]=\"{content:'i18n_adjust', zIndex:1250}\">\n <libs_ui-components-dropdown [isNgContent]=\"true\"\n [ignoreStopPropagationEvent]=\"true\"\n [labelPopoverFullWidth]=\"true\"\n [listConfig]=\"listConfigAlign()\"\n [listHiddenInputSearch]=\"true\"\n [popoverCustomConfig]=\"{ignoreArrow: true, classInclude: 'w-[32px] overflow-hidden', position: {mode: 'start', distance: 0}, paddingLeftItem: false}\"\n [listHasButtonUnSelectOption]=\"false\"\n [listMaxItemShow]=\"8\"\n [zIndex]=\"1250\"\n (outSelectKey)=\"handleSelectAlign($event)\">\n @if (alignSelected(); as alignSelected) {\n <div class=\"flex items-center cursor-pointer\">\n <i [class]=\"iconAlignSelectedComputed()\"></i>\n <i class=\"libs-ui-icon-move-right rotate-90 text-[#6a7383] text-[16px] ml-[4px]\"></i>\n </div>\n }\n </libs_ui-components-dropdown>\n </libs_ui-components-popover>\n </div>\n }\n @if (option.indentIncrease) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_indent_increase', zIndex:1250}\"\n class=\"ql-indent\"\n value=\"+1\"></button>\n </div>\n }\n @if (option.indentDecrease) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_indent_decrease', zIndex:1250}\"\n class=\"ql-indent\"\n value=\"-1\"></button>\n </div>\n }\n @if (option.listBulleted) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_list_bulleted', zIndex:1250}\"\n class=\"ql-list ql-bullet\"\n value=\"bullet\"></button>\n </div>\n }\n @if (option.listNumbered) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_list_numbered', zIndex:1250}\"\n class=\"ql-list ql-ordered\"\n value=\"ordered\"></button>\n </div>\n }\n @if (option.personalize && templateToolBarPersonalize(); as templateToolBarPersonalize) {\n <div class=\"flex items-center\">\n <ng-container *ngTemplateOutlet=\"templateToolBarPersonalize\"></ng-container>\n </div>\n }\n @if (option.blockquote) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_quote', zIndex:1250}\"\n class=\"ql-blockquote\"></button>\n </div>\n }\n @if (option.link) {\n <div class=\"flex items-center\">\n <libs_ui-components-popover [config]=\"{content:'i18n_insert_link', zIndex:1250}\">\n <button class=\"ql-link\"></button>\n </libs_ui-components-popover>\n </div>\n }\n @if (option.unLink) {\n <div class=\"flex items-center\">\n <libs_ui-components-popover [config]=\"{content:'i18n_unlink', zIndex:1250}\">\n <button class=\"ql-unLink\"></button>\n </libs_ui-components-popover>\n </div>\n }\n @if (option.image && customUploadImage().showIconUploadImage) {\n <div class=\"flex items-center\">\n <libs_ui-components-popover [config]=\"{content:'i18n_image', zIndex:1250}\">\n <button class=\"ql-image\"></button>\n </libs_ui-components-popover>\n </div>\n }\n @if (option.emoji) {\n <div class=\"flex items-center\">\n <libs_ui-components-emoji [zIndex]=\"1250\"\n [isNgContent]=\"true\"\n (outEventEmoji)=\"handlerAddEmoji($event)\">\n <button class=\"ql-emoji\"></button>\n </libs_ui-components-emoji>\n </div>\n }\n </div>\n @if (!$last) {\n <div class=\"w-[1px] h-[16px] libs-ui-border-right-general mx-[8px]\"></div>\n }\n }\n </div>\n </div>\n</ng-template>\n", styles: ["@-webkit-keyframes animation-move{0%{transform:translateY(-12px)}to{transform:translateY(0)}}@keyframes animation-move{0%{transform:translateY(-12px)}to{transform:translateY(0)}}.libs-ui-quill{height:100%;width:100%;display:flex;flex-direction:column}.libs-ui-quill-toolbar-animation{animation:animation-move .4s ease}.libs-ui-quill-wrapper[isHeightAuto=true]{overflow:auto}.libs-ui-quill-wrapper[isHeightAuto=true] .libs-ui-quill{height:auto}.libs-ui-quill-wrapper[isHeightAuto=true] .libs-ui-quill ::ng-deep .ql-container{height:auto}.libs-ui-quill-wrapper[isHeightAuto=true] .libs-ui-quill ::ng-deep .ql-container .ql-editor{position:relative!important}.libs-ui-quill-wrapper[hiddenToolBar=true] .libs-ui-quill ::ng-deep .ql-container.ql-snow{border:0px!important}.libs-ui-quill-wrapper[hiddenToolBar=false] .libs-ui-quill ::ng-deep .ql-container.ql-snow{border:solid 1px #e6e8ed!important;border-radius:0 0 4px 4px}.libs-ui-quill-wrapper[hiddenToolBar=false] .libs-ui-quill ::ng-deep .ql-toolbar.ql-snow{border:solid 1px #e6e8ed!important;border-radius:4px 4px 0 0;border-bottom:unset!important}.libs-ui-quill-wrapper[hiddenToolBar=false] .libs-ui-quill[showError=true] ::ng-deep .ql-container.ql-snow{border:solid 1px #ee2d41!important}:host ::ng-deep .toolbar,:host ::ng-deep .ql-formats{position:relative;width:100%}:host ::ng-deep .ql-toolbar.ql-snow .ql-formats{display:flex;flex-wrap:wrap}:host ::ng-deep .ql-container.ql-snow{width:100%;height:100%;position:relative}:host ::ng-deep .ql-editor{font-family:var(--libs-ui-font-family-name),\"Arial, Helvetica, sans-serif\"!important;font-weight:400}:host ::ng-deep .ql-editor b{font-family:var(--libs-ui-font-family-name),\"Arial, Helvetica, sans-serif\"!important;font-weight:600}:host ::ng-deep .ql-toolbar.ql-snow{border:none;border-radius:8px;padding:4px 16px}:host ::ng-deep .ql-toolbar.ql-snow .ql-picker-label{color:#071631;border:none!important;margin-top:5px}:host ::ng-deep .ql-toolbar.ql-snow .ql-picker-label:hover{color:var(--libs-ui-color-light-1)!important}:host ::ng-deep .ql-toolbar.ql-snow .ql-picker-label:hover .ql-stroke{stroke:var(--libs-ui-color-light-1)!important}:host ::ng-deep .ql-snow.ql-toolbar .ql-picker-item:hover{color:var(--libs-ui-color-light-1)!important}:host ::ng-deep .ql-snow.ql-toolbar .ql-picker-label.ql-active{color:#071631}:host ::ng-deep .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke{stroke:#071631}:host ::ng-deep .ql-editor{height:100%;width:100%;position:absolute;line-height:1.42!important}:host ::ng-deep .ql-editor:before{font-family:var(--libs-ui-font-family-name),\"Arial, Helvetica, sans-serif\"!important;color:#9ca2ad!important;font-size:12px}:host ::ng-deep .ql-editor img{height:auto;max-width:100%}:host ::ng-deep .ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label{border:none!important}:host ::ng-deep .ql-snow .ql-picker.ql-bold{width:36px!important}:host ::ng-deep .ql-editor.ql-blank{font-size:11px!important;letter-spacing:.05px;font-family:var(--libs-ui-font-family-name),\"Arial, Helvetica, sans-serif\"!important;line-height:16px}:host ::ng-deep .ql-editor.ql-blank:before{font-style:normal!important;color:#9ca2ad!important}:host ::ng-deep .ql-snow.ql-toolbar .ql-picker-label :hover{color:red!important}:host ::ng-deep .ql-formats{margin-right:12px!important}:host ::ng-deep .ql-formats .ql-size.ql-picker,:host ::ng-deep .ql-formats .ql-header.ql-picker,:host ::ng-deep .ql-formats .ql-font.ql-picker{border:solid 1px #e6e8ed!important;border-radius:4px}:host ::ng-deep .ql-formats .ql-align.ql-picker .ql-picker-label{width:24px}:host ::ng-deep .ql-formats .ql-align.ql-picker .ql-picker-label:hover{color:red!important}:host ::ng-deep .ql-formats .ql-header.ql-picker .ql-picker-label:before{font-size:12px}:host ::ng-deep .ql-picker-item:before{font-size:12px}:host ::ng-deep .ql-picker-label:before{font-size:12px}:host ::ng-deep .ql-snow.ql-toolbar button,:host ::ng-deep .ql-snow .ql-toolbar button{background:none;border:none;cursor:pointer;display:flex;align-items:center;float:none;padding:0;width:inherit}:host ::ng-deep ul{padding-left:1rem!important}:host ::ng-deep li{padding-left:0!important}.ql-picker-options{max-height:130px;overflow-y:auto}.ql-snow .ql-picker.ql-size{border:1px solid #e6e7ea;box-shadow:#00000005 0 1px 3px,#1b1f2326 0 0 0 1px;border-radius:2px}.ql-snow .ql-picker.ql-font{border:1px solid #e6e7ea!important;margin-right:8px;border-radius:4px}.ql-snow .ql-picker.ql-font .ql-picker-options:before{font-size:12px}.ql-snow .ql-picker.ql-font .ql-picker-label:before{font-size:12px}.ql-font-Arial{font-family:Arial}.ql-font-sans-serif{font-family:\"sans-serif\"}.ql-font-Helvetica{font-family:Helvetica}.libs-ui-quill-mention{font-weight:500!important;color:#7239ea;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--libs-ui-font-family-name),\"Arial, Helvetica, sans-serif\"!important;font-weight:600}.ql-snow .ql-picker.ql-expanded .ql-picker-options{overflow:hidden}.ql-formats{margin-right:0!important}.ql-formats .ql-header{position:relative!important}.ql-formats .ql-header .ql-picker-options{position:absolute!important;top:-151px!important}.ql-formats .ql-font{position:relative!important}.ql-formats .ql-font .ql-picker-options{position:absolute!important;top:-93px!important}.ql-formats .ql-color{position:relative!important}.ql-formats .ql-color .ql-picker-options{position:absolute!important;top:-108px}.ql-formats .ql-background{position:relative!important}.ql-formats .ql-background .ql-picker-options{position:absolute!important;top:-108px}.ql-formats .ql-align{position:relative!important}.ql-formats .ql-align .ql-picker-label{padding:3px 4px!important}.ql-formats .ql-align .ql-picker-options{position:absolute!important;top:-106px}.ql-snow .ql-picker{font-size:12px!important;height:32px;float:none;width:auto}\n"] }]
|
|
848
|
+
LibsUiComponentsInputsValidComponent, LibsUiComponentsEmojiComponent,
|
|
849
|
+
LibsUiComponentsButtonsButtonComponent
|
|
850
|
+
], template: "<div class=\"flex flex-col w-full h-full\">\n @if (label(); as label) {\n <libs_ui-components-label [classInclude]=\"label.classInclude\"\n [required]=\"label.required\"\n [labelLeft]=\"label.labelLeft\" />\n }\n <div #wrapperEditor\n [attr.heightAuto]=\"heightAuto()\"\n [attr.hiddenToolBar]=\"onlyShowContent()\"\n class=\"libs-ui-quill-wrapper w-full h-full relative flex flex-col\"\n [class.libs-ui-border-error-general]=\"messageError() && showErrorBorder() && !onlyShowErrorBorderInContent()\"\n [class.rounded-[4px]]=\"messageError() && showErrorBorder() && !onlyShowErrorBorderInContent()\">\n <div #editor\n class=\"libs-ui-quill\"\n [attr.showError]=\"messageError() && showErrorBorder() && onlyShowErrorBorderInContent()\"\n [class.!hidden]=\"!display()\">\n @if (!onlyShowContent()) {\n <div #quillOption\n class=\"'ql-toolbar ql-snow bg-[#f8f9fa] {{ classIncludeToolbar() }}\">\n <ng-container *ngTemplateOutlet=\"toolbar\"></ng-container>\n </div>\n }\n <div #quillEditor\n LibsUiComponentsInputsMentionDirective\n [mentionConfig]=\"dataConfigMention()\"\n (outToggle)=\"handleToggleMention($event)\"\n (outInsertMention)=\"handlerInsertMention($event)\"></div>\n </div>\n @if (template(); as template) {\n <div [class]=\"classIncludeTemplate()\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n }\n </div>\n @if (messageError() && showErrorLabel()) {\n <div class=\"flex items-center leading-normal mt-[8px]\">\n <span class=\"text-[#ff5454] libs-ui-font-h7r\"> {{ messageError() | translate }}</span>\n </div>\n }\n</div>\n@if (showToolBar()) {\n <div #quillToolbar\n [class]=\"'ql-snow absolute px-[8px] py-[4px] p-0 w-[500px] rounded-[4px] bg-[#ffffff] libs-ui-quill-toolbar-animation ' + classIncludeToolbar()\">\n <ng-container *ngTemplateOutlet=\"toolbar\"></ng-container>\n </div>\n}\n\n<ng-template #toolbar>\n <div class=\"toolbar\"\n #toolbarItems>\n <div class=\"ql-formats items-center\">\n @for (option of optionsToolbar(); track option) {\n <div #item\n class=\"items-center\"\n [class.hidden]=\"!itemShow().includes($index)\"\n [class.flex]=\"itemShow().includes($index)\">\n <ng-container *ngTemplateOutlet=\"itemTemplate;context:{option, $index, $last}\"></ng-container>\n </div>\n }\n <div class=\"relative\">\n <libs_ui-components-buttons-button [type]=\"showMoreAction() ? 'button-secondary' : 'button-third'\"\n [iconOnlyType]=\"true\"\n [classInclude]=\"'!p-[1px] !h-[20px]'\"\n [classIconLeft]=\"'libs-ui-icon-move-right rotate-90'\"\n (outClick)=\"handlerChangeShowMoreAction($event)\" />\n <div [class.hidden]=\"!showMoreAction()\"\n class=\"absolute bg-[#ffffff] top-[10px] shadow-md z-[1] flex items-center px-[16px] py-[4px] rounded-[8px] top-[31px] right-[0px]\">\n @for (option of optionsToolbar(); track option) {\n <div class=\"items-center\"\n [class.hidden]=\"itemShow().includes($index)\"\n [class.flex]=\"!itemShow().includes($index)\">\n <ng-container *ngTemplateOutlet=\"itemTemplate;context:{option, $index, $last}\"></ng-container>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n\n\n<ng-template #itemTemplate\n let-$index=\"$index\"\n let-$last=\"$last\"\n let-option=\"option\">\n <div class=\"flex items-center h-[32px] {{ option.styleGapItem ? option.styleGapItem : 'gap-4' }}\">\n @if (option.undo) {\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content: 'i18n_undo', zIndex: 1250}\"\n class=\"ql-undo\"></button>\n }\n @if (option.redo) {\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content: 'i18n_redo', zIndex: 1250}\"\n class=\"ql-redo\"></button>\n }\n @if (option.fontFamily) {\n <div class=\"relative w-[117px] h-full bg-[#ffffff] rounded-[4px] libs-ui-border-general\">\n <libs_ui-components-dropdown [isNgContent]=\"true\"\n [labelPopoverFullWidth]=\"true\"\n [listConfig]=\"listConfigFont()\"\n [listHasButtonUnSelectOption]=\"false\"\n [listHiddenInputSearch]=\"true\"\n [listMaxItemShow]=\"8\"\n [zIndex]=\"1250\"\n (outSelectKey)=\"handleSelectFont($event)\">\n @if (fontSelected(); as fontSelected) {\n <div class=\"flex items-center cursor-pointer py-[8px] libs-ui-font-h5r pl-[16px] pr-[40px]\">\n <libs_ui-components-popover [type]=\"'text'\"\n [ignoreStopPropagationEvent]=\"true\"\n [config]=\"{zIndex:1250}\">\n {{ labelFontSelectedComputed() }}\n </libs_ui-components-popover>\n <i class=\"libs-ui-icon-move-right rotate-90 absolute right-[12px] text-[#6a7383] text-[16px]\"></i>\n </div>\n }\n </libs_ui-components-dropdown>\n </div>\n }\n @if (option.fontSize) {\n <div class=\"ql-picker\">\n <libs_ui-components-inputs-valid [dataType]=\"'int'\"\n [(item)]=\"size\"\n [fieldNameBind]=\"'value'\"\n [valueUpDownNumber]=\"1\"\n [maxValueNumber]=\"72\"\n [minValueNumber]=\"8\"\n [readonly]=\"readonly()\"\n [classContainerInput]=\"'w-[72px] h-[32px]'\"\n (outValueChange)=\"handlerValueChange($event)\" />\n </div>\n }\n @if (option.color) {\n <div class=\"ql-color ql-picker ql-color-picker !flex items-center\">\n <libs_ui-components-popover [config]=\"{content:'i18n_text_color', zIndex:1250}\">\n <libs_ui-components-buttons-select_color [zIndex]=\"zIndex()\"\n [direction]=\"'top'\"\n [externalContent]=\"true\"\n [applyNow]=\"true\"\n (outColorChange)=\"setStyle('color', $event)\">\n <div class=\"libs-ui-icon-editor-color-text libs-ui-buttons-select-color text-[#6a7383] text-[16px] hover:text-[var(--libs-ui-color-light-1)]\">\n </div>\n </libs_ui-components-buttons-select_color>\n </libs_ui-components-popover>\n </div>\n }\n @if (option.background) {\n <div class=\"ql-background ql-picker ql-color-picker !flex items-center\">\n <libs_ui-components-popover [config]=\"{content:'i18n_background_color', zIndex:1250}\">\n <libs_ui-components-buttons-select_color [zIndex]=\"zIndex()\"\n [direction]=\"'top'\"\n [externalContent]=\"true\"\n [applyNow]=\"true\"\n (outColorChange)=\"setStyle('background', $event)\">\n <div class=\"libs-ui-icon-editor-color-background libs-ui-buttons-select-color text-[#6a7383] text-[16px] hover:text-[var(--libs-ui-color-light-1)]\">\n </div>\n </libs_ui-components-buttons-select_color>\n </libs_ui-components-popover>\n </div>\n }\n @if (option.bold) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_font_weight_bold', zIndex:1250}\"\n class=\"ql-bold\"></button>\n </div>\n }\n @if (option.italic) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_font_style_italic', zIndex:1250}\"\n class=\"ql-italic\"></button>\n </div>\n }\n @if (option.underline) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_text_decoration_underline', zIndex:1250}\"\n class=\"ql-underline\"></button>\n </div>\n }\n @if (option.strikeThrough) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_text_line_through', zIndex:1250}\"\n class=\"ql-strike\"></button>\n </div>\n }\n @if (option.adjust) {\n <div class=\"relative !flex items-center ql-align ql-picker ql-icon-picker !w-max\">\n <libs_ui-components-popover [config]=\"{content:'i18n_adjust', zIndex:1250}\">\n <libs_ui-components-dropdown [isNgContent]=\"true\"\n [ignoreStopPropagationEvent]=\"true\"\n [labelPopoverFullWidth]=\"true\"\n [listConfig]=\"listConfigAlign()\"\n [listHiddenInputSearch]=\"true\"\n [popoverCustomConfig]=\"{ignoreArrow: true, classInclude: '!w-[32px] overflow-hidden !py-[4px]', position: {mode: 'start', distance: 0}, paddingLeftItem: false}\"\n [listHasButtonUnSelectOption]=\"false\"\n [listMaxItemShow]=\"8\"\n [zIndex]=\"1250\"\n (outSelectKey)=\"handleSelectAlign($event)\">\n @if (alignSelected(); as alignSelected) {\n <div class=\"flex items-center cursor-pointer\">\n <i [class]=\"iconAlignSelectedComputed()\"></i>\n <i class=\"libs-ui-icon-move-right rotate-90 text-[#6a7383] text-[16px] ml-[4px]\"></i>\n </div>\n }\n </libs_ui-components-dropdown>\n </libs_ui-components-popover>\n </div>\n }\n @if (option.indentIncrease) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_indent_increase', zIndex:1250}\"\n class=\"ql-indent\"\n value=\"+1\"></button>\n </div>\n }\n @if (option.indentDecrease) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_indent_decrease', zIndex:1250}\"\n class=\"ql-indent\"\n value=\"-1\"></button>\n </div>\n }\n @if (option.listBulleted) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_list_bulleted', zIndex:1250}\"\n class=\"ql-list ql-bullet\"\n value=\"bullet\"></button>\n </div>\n }\n @if (option.listNumbered) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_list_numbered', zIndex:1250}\"\n class=\"ql-list ql-ordered\"\n value=\"ordered\"></button>\n </div>\n }\n @if (option.personalize && templateToolBarPersonalize(); as templateToolBarPersonalize) {\n <div class=\"flex items-center\">\n <ng-container *ngTemplateOutlet=\"templateToolBarPersonalize\"></ng-container>\n </div>\n }\n @if (option.blockquote) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_quote', zIndex:1250}\"\n class=\"ql-blockquote\"></button>\n </div>\n }\n @if (option.link) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_insert_link', zIndex:1250}\"\n class=\"ql-link\"></button>\n </div>\n }\n @if (option.unLink) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_unlink', zIndex:1250}\"\n class=\"ql-unLink\"></button>\n </div>\n }\n @if (option.image && uploadImageConfig().showIcon) {\n <div class=\"flex items-center\">\n <button LibsUiComponentsPopoverDirective\n [config]=\"{content:'i18n_image', zIndex:1250}\"\n class=\"ql-image\"></button>\n </div>\n }\n @if (option.emoji) {\n <div class=\"flex items-center\">\n <libs_ui-components-emoji [zIndex]=\"1250\"\n [isNgContent]=\"true\"\n (outEventEmoji)=\"handlerAddEmoji($event)\">\n <button class=\"ql-emoji\"></button>\n </libs_ui-components-emoji>\n </div>\n }\n </div>\n @if (!$last) {\n <div class=\"w-[1px] h-[16px] libs-ui-border-right-general mx-[8px]\"></div>\n }\n</ng-template>\n", styles: ["@-webkit-keyframes animation-move{0%{transform:translateY(-12px)}to{transform:translateY(0)}}@keyframes animation-move{0%{transform:translateY(-12px)}to{transform:translateY(0)}}.libs-ui-quill{height:100%;width:100%;display:flex;flex-direction:column}.libs-ui-quill-toolbar-animation{animation:animation-move .4s ease}.libs-ui-quill-wrapper[heightAuto=true]{overflow:auto}.libs-ui-quill-wrapper[heightAuto=true] .libs-ui-quill{height:auto}.libs-ui-quill-wrapper[heightAuto=true] .libs-ui-quill ::ng-deep .ql-container{height:auto}.libs-ui-quill-wrapper[heightAuto=true] .libs-ui-quill ::ng-deep .ql-container .ql-editor{position:relative!important}.libs-ui-quill-wrapper[hiddenToolBar=true] .libs-ui-quill ::ng-deep .ql-container.ql-snow{border:0px!important}.libs-ui-quill-wrapper[hiddenToolBar=false] .libs-ui-quill ::ng-deep .ql-container.ql-snow{border:solid 1px #e6e8ed!important;border-radius:0 0 4px 4px}.libs-ui-quill-wrapper[hiddenToolBar=false] .libs-ui-quill ::ng-deep .ql-toolbar.ql-snow{border:solid 1px #e6e8ed!important;border-radius:4px 4px 0 0;border-bottom:unset!important}.libs-ui-quill-wrapper[hiddenToolBar=false] .libs-ui-quill[showError=true] ::ng-deep .ql-container.ql-snow{border:solid 1px #ee2d41!important}:host ::ng-deep .toolbar,:host ::ng-deep .ql-formats{position:relative;width:100%}:host ::ng-deep .ql-toolbar.ql-snow .ql-formats{display:flex}:host ::ng-deep .ql-container.ql-snow{width:100%;height:100%;position:relative}:host ::ng-deep .ql-editor{font-family:var(--libs-ui-font-family-name),\"Arial, Helvetica, sans-serif\"!important;font-weight:400}:host ::ng-deep .ql-editor b{font-family:var(--libs-ui-font-family-name),\"Arial, Helvetica, sans-serif\"!important;font-weight:600}:host ::ng-deep .ql-toolbar.ql-snow{border:none;border-radius:8px;padding:4px 16px}:host ::ng-deep .ql-toolbar.ql-snow .ql-picker-label{color:#071631;border:none!important;margin-top:5px}:host ::ng-deep .ql-toolbar.ql-snow .ql-picker-label:hover{color:var(--libs-ui-color-light-1)!important}:host ::ng-deep .ql-toolbar.ql-snow .ql-picker-label:hover .ql-stroke{stroke:var(--libs-ui-color-light-1)!important}:host ::ng-deep .ql-snow.ql-toolbar .ql-picker-item:hover{color:var(--libs-ui-color-light-1)!important}:host ::ng-deep .ql-snow.ql-toolbar .ql-picker-label.ql-active{color:#071631}:host ::ng-deep .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke{stroke:#071631}:host ::ng-deep .ql-editor{height:100%;width:100%;position:absolute;line-height:1.42!important}:host ::ng-deep .ql-editor:before{font-family:var(--libs-ui-font-family-name),\"Arial, Helvetica, sans-serif\"!important;color:#9ca2ad!important;font-size:12px}:host ::ng-deep .ql-editor img{height:auto;max-width:100%}:host ::ng-deep .ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label{border:none!important}:host ::ng-deep .ql-snow .ql-picker.ql-bold{width:36px!important}:host ::ng-deep .ql-editor.ql-blank{font-size:11px!important;letter-spacing:.05px;font-family:var(--libs-ui-font-family-name),\"Arial, Helvetica, sans-serif\"!important;line-height:16px}:host ::ng-deep .ql-editor.ql-blank:before{font-style:normal!important;color:#9ca2ad!important}:host ::ng-deep .ql-snow.ql-toolbar .ql-picker-label :hover{color:red!important}:host ::ng-deep .ql-formats{margin-right:12px!important}:host ::ng-deep .ql-formats .ql-size.ql-picker,:host ::ng-deep .ql-formats .ql-header.ql-picker,:host ::ng-deep .ql-formats .ql-font.ql-picker{border:solid 1px #e6e8ed!important;border-radius:4px}:host ::ng-deep .ql-formats .ql-align.ql-picker .ql-picker-label{width:24px}:host ::ng-deep .ql-formats .ql-align.ql-picker .ql-picker-label:hover{color:red!important}:host ::ng-deep .ql-formats .ql-header.ql-picker .ql-picker-label:before{font-size:12px}:host ::ng-deep .ql-picker-item:before{font-size:12px}:host ::ng-deep .ql-picker-label:before{font-size:12px}:host ::ng-deep .ql-snow.ql-toolbar button,:host ::ng-deep .ql-snow .ql-toolbar button{background:none;border:none;cursor:pointer;display:flex;align-items:center;float:none;padding:0;width:inherit}:host ::ng-deep ul{padding-left:1rem!important}:host ::ng-deep li{padding-left:0!important}:host ::ng-deep .ql-tooltip[data-mode=link]:before{content:var(--libs-ui-quill-tool-edit-link, \"Enter link:\")}:host ::ng-deep .ql-tooltip{border:1px solid #e6e7ea!important;border-radius:4px;display:flex;align-items:center;padding:8px 16px;color:#6a7383}:host ::ng-deep .ql-tooltip a{color:var(--libs-ui-color-light-1)!important;font-size:11px!important;letter-spacing:.05px;font-family:var(--libs-ui-font-family-name),\"Arial, Helvetica, sans-serif\"!important;line-height:16px;padding-top:4px;padding-bottom:4px}:host ::ng-deep .ql-tooltip:before{content:var(--libs-ui-quill-tool-link, \"Link:\")}:host ::ng-deep .ql-tooltip .ql-action:after{border-right:1px solid #e6e7ea;content:var(--libs-ui-quill-tool-link-action, \"Edit\")!important}:host ::ng-deep .ql-tooltip .ql-remove:before{content:var(--libs-ui-quill-tool-link-remove, \"Delete\")!important;color:#ee2d41}:host ::ng-deep .ql-tooltip input{max-width:100%;font-family:var(--libs-ui-font-family-name, \"Arial\");font-weight:400;font-size:12px;color:#071631;padding:7px 12px;background-color:#fff;background-clip:padding-box;min-height:32px;border:1px solid #e6e7ea;border-radius:4px}:host ::ng-deep .ql-tooltip input:focus{outline:none}:host ::ng-deep .ql-tooltip input:focus:not(:read-only):not(:disabled){border:1px solid var(--libs-ui-color-light-1, #4e8cf7)}:host ::ng-deep .ql-editing .ql-action:after{content:var(--libs-ui-quill-tool-link-save, \"Save\")!important}:host ::ng-deep .ql-hidden{display:none!important}.ql-picker-options{max-height:130px;overflow-y:auto}.ql-snow .ql-picker.ql-size{border:1px solid #e6e7ea;box-shadow:#00000005 0 1px 3px,#1b1f2326 0 0 0 1px;border-radius:2px}.ql-snow .ql-picker.ql-font{border:1px solid #e6e7ea!important;margin-right:8px;border-radius:4px}.ql-snow .ql-picker.ql-font .ql-picker-options:before{font-size:12px}.ql-snow .ql-picker.ql-font .ql-picker-label:before{font-size:12px}.ql-font-Arial{font-family:Arial}.ql-font-sans-serif{font-family:\"sans-serif\"}.ql-font-Helvetica{font-family:Helvetica}.libs-ui-quill-mention{font-weight:500!important;color:#7239ea;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--libs-ui-font-family-name),\"Arial, Helvetica, sans-serif\"!important;font-weight:600}.ql-snow .ql-picker.ql-expanded .ql-picker-options{overflow:hidden}.ql-formats{margin-right:0!important}.ql-formats .ql-header{position:relative!important}.ql-formats .ql-header .ql-picker-options{position:absolute!important;top:-151px!important}.ql-formats .ql-font{position:relative!important}.ql-formats .ql-font .ql-picker-options{position:absolute!important;top:-93px!important}.ql-formats .ql-color{position:relative!important}.ql-formats .ql-color .ql-picker-options{position:absolute!important;top:-108px}.ql-formats .ql-background{position:relative!important}.ql-formats .ql-background .ql-picker-options{position:absolute!important;top:-108px}.ql-formats .ql-align{position:relative!important}.ql-formats .ql-align .ql-picker-label{padding:3px 4px!important}.ql-formats .ql-align .ql-picker-options{position:absolute!important;top:-106px}.ql-snow .ql-picker{font-size:12px!important;height:32px;float:none;width:auto}\n"] }]
|
|
834
851
|
}] });
|
|
835
852
|
|
|
836
853
|
/**
|