@cleavelandprice/ngx-lib 3.2.0 → 3.2.2
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/esm2020/quill/cleavelandprice-ngx-lib-quill.mjs +5 -0
- package/esm2020/quill/components/editor/editor.component.mjs +296 -0
- package/esm2020/quill/mention/cleavelandprice-ngx-lib-quill-mention.mjs +5 -0
- package/esm2020/quill/mention/components/editor/editor.component.mjs +152 -0
- package/esm2020/quill/mention/model/dialog-data.mjs +2 -0
- package/esm2020/quill/mention/public_api.mjs +2 -0
- package/esm2020/quill/mention/quill-mention.module.mjs +63 -0
- package/esm2020/quill/model/buttons.mjs +51 -0
- package/esm2020/quill/model/config.mjs +40 -0
- package/esm2020/quill/model/dialog-data.mjs +2 -0
- package/esm2020/quill/model/icons.mjs +9 -0
- package/esm2020/quill/model/tooltips.mjs +54 -0
- package/esm2020/quill/public_api.mjs +8 -0
- package/esm2020/quill/quill.module.mjs +65 -0
- package/fesm2015/cleavelandprice-ngx-lib-quill-mention.mjs +212 -0
- package/fesm2015/cleavelandprice-ngx-lib-quill-mention.mjs.map +1 -0
- package/fesm2015/cleavelandprice-ngx-lib-quill.mjs +505 -0
- package/fesm2015/cleavelandprice-ngx-lib-quill.mjs.map +1 -0
- package/fesm2020/cleavelandprice-ngx-lib-quill-mention.mjs +207 -0
- package/fesm2020/cleavelandprice-ngx-lib-quill-mention.mjs.map +1 -0
- package/fesm2020/cleavelandprice-ngx-lib-quill.mjs +500 -0
- package/fesm2020/cleavelandprice-ngx-lib-quill.mjs.map +1 -0
- package/package.json +16 -8
- package/{quill-editor → quill}/components/editor/editor.component.d.ts +4 -9
- package/{quill-editor → quill}/index.d.ts +1 -1
- package/quill/mention/components/editor/editor.component.d.ts +20 -0
- package/quill/mention/index.d.ts +5 -0
- package/quill/mention/model/dialog-data.d.ts +5 -0
- package/quill/mention/public_api.d.ts +1 -0
- package/quill/mention/quill-mention.module.d.ts +17 -0
- package/{quill-editor → quill}/model/buttons.d.ts +0 -0
- package/{quill-editor → quill}/model/config.d.ts +0 -1
- package/{quill-editor → quill}/model/dialog-data.d.ts +1 -3
- package/{quill-editor → quill}/model/icons.d.ts +0 -0
- package/{quill-editor → quill}/model/tooltips.d.ts +0 -0
- package/{quill-editor → quill}/public_api.d.ts +2 -1
- package/quill/quill.module.d.ts +17 -0
- package/esm2020/quill-editor/cleavelandprice-ngx-lib-quill-editor.mjs +0 -5
- package/esm2020/quill-editor/components/editor/editor.component.mjs +0 -289
- package/esm2020/quill-editor/model/buttons.mjs +0 -51
- package/esm2020/quill-editor/model/config.mjs +0 -40
- package/esm2020/quill-editor/model/dialog-data.mjs +0 -2
- package/esm2020/quill-editor/model/icons.mjs +0 -9
- package/esm2020/quill-editor/model/tooltips.mjs +0 -54
- package/esm2020/quill-editor/public_api.mjs +0 -7
- package/esm2020/quill-editor/quill-editor.module.mjs +0 -65
- package/fesm2015/cleavelandprice-ngx-lib-quill-editor.mjs +0 -506
- package/fesm2015/cleavelandprice-ngx-lib-quill-editor.mjs.map +0 -1
- package/fesm2020/cleavelandprice-ngx-lib-quill-editor.mjs +0 -500
- package/fesm2020/cleavelandprice-ngx-lib-quill-editor.mjs.map +0 -1
- package/quill-editor/quill-editor.module.d.ts +0 -17
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { forwardRef, Component, Optional, Inject, Input, NgModule, SkipSelf } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i3 from '@angular/forms';
|
|
6
|
+
import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
8
|
+
import * as i1 from '@angular/material/dialog';
|
|
9
|
+
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
10
|
+
import * as i4 from '@angular/material/icon';
|
|
11
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
12
|
+
import * as i5 from '@angular/material/tooltip';
|
|
13
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
14
|
+
import * as i6 from 'ngx-quill';
|
|
15
|
+
import { QuillModule } from 'ngx-quill';
|
|
16
|
+
import * as i7 from '@cleavelandprice/ngx-lib/active-directory';
|
|
17
|
+
import { ActiveDirectoryService } from '@cleavelandprice/ngx-lib/active-directory';
|
|
18
|
+
import 'quill-mention';
|
|
19
|
+
import { EditorComponent as EditorComponent$1 } from '@cleavelandprice/ngx-lib/quill';
|
|
20
|
+
|
|
21
|
+
class EditorComponent extends EditorComponent$1 {
|
|
22
|
+
constructor(data, dlgRef, dlg, activeDirectoryService) {
|
|
23
|
+
super(data, dlgRef, dlg);
|
|
24
|
+
this.dlgRef = dlgRef;
|
|
25
|
+
this.dlg = dlg;
|
|
26
|
+
this.activeDirectoryService = activeDirectoryService;
|
|
27
|
+
}
|
|
28
|
+
ngOnInit() {
|
|
29
|
+
this.initialize();
|
|
30
|
+
if (!this.users) {
|
|
31
|
+
this.activeDirectoryService.getUsers().subscribe(users => this.users = users);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
toggleFullscreen() {
|
|
35
|
+
if (this.fullscreenMode === 'expand') {
|
|
36
|
+
this.fullscreen = !this.fullscreen;
|
|
37
|
+
this.fullscreenChanged.emit(this.fullscreen);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
if (this.fullscreen) {
|
|
41
|
+
this.dlgRef.close(this.value);
|
|
42
|
+
this.fullscreenChanged.emit(false);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
const data = {
|
|
46
|
+
value: this.value,
|
|
47
|
+
config: this.config,
|
|
48
|
+
placeholder: this.placeholder,
|
|
49
|
+
format: this.format,
|
|
50
|
+
height: this.fullscreenHeight,
|
|
51
|
+
width: '100%',
|
|
52
|
+
maxHeight: this.fullscreenHeight,
|
|
53
|
+
maxWidth: '100%',
|
|
54
|
+
enableTooltips: this.enableTooltips,
|
|
55
|
+
fullscreen: true,
|
|
56
|
+
fullscreenMode: this.fullscreenMode,
|
|
57
|
+
readonly: this.readonly,
|
|
58
|
+
applyReadonlyStyle: this.applyReadonlyStyle,
|
|
59
|
+
showToolbar: this.showToolbar,
|
|
60
|
+
showBorder: this.showBorder,
|
|
61
|
+
users: this.users
|
|
62
|
+
};
|
|
63
|
+
this.dlg.open(EditorComponent, {
|
|
64
|
+
disableClose: true,
|
|
65
|
+
width: this.fullscreenWidth,
|
|
66
|
+
height: this.fullscreenHeight,
|
|
67
|
+
data
|
|
68
|
+
})
|
|
69
|
+
.afterClosed()
|
|
70
|
+
.subscribe(value => {
|
|
71
|
+
this.value = value;
|
|
72
|
+
this.updateChanges();
|
|
73
|
+
});
|
|
74
|
+
this.fullscreenChanged.emit(true);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
get modules() {
|
|
79
|
+
if (!this.users) {
|
|
80
|
+
return {};
|
|
81
|
+
}
|
|
82
|
+
const modules = {
|
|
83
|
+
mention: {
|
|
84
|
+
allowedChars: /^[A-Za-z\sÅÄÖåäö]*$/,
|
|
85
|
+
onSelect: (item, insertItem) => {
|
|
86
|
+
const editor = this.editor.quillEditor;
|
|
87
|
+
insertItem(item);
|
|
88
|
+
// necessary because quill-mention triggers changes as 'api' instead of 'user'
|
|
89
|
+
editor.insertText(editor.getLength() - 1, '', 'user');
|
|
90
|
+
},
|
|
91
|
+
source: (searchTerm, renderList) => {
|
|
92
|
+
var _a;
|
|
93
|
+
if (searchTerm.length === 0) {
|
|
94
|
+
renderList((_a = this.users) === null || _a === void 0 ? void 0 : _a.map(u => ({ value: `${u.displayName} (${u.sAMAccountName.toLowerCase()})` })), searchTerm);
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
const matches = [];
|
|
98
|
+
this.users.forEach((entry) => {
|
|
99
|
+
if (entry.displayName.toLowerCase().indexOf(searchTerm.toLowerCase()) !== -1 ||
|
|
100
|
+
entry.sAMAccountName.toLowerCase().indexOf(searchTerm.toLowerCase()) !== -1) {
|
|
101
|
+
matches.push({ value: `${entry.displayName} (${entry.sAMAccountName.toLowerCase()})` });
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
renderList(matches, searchTerm);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
if (!this.showToolbar) {
|
|
110
|
+
modules['toolbar'] = [];
|
|
111
|
+
}
|
|
112
|
+
if (this.imageResizeModule) {
|
|
113
|
+
modules['imageResize'] = {};
|
|
114
|
+
}
|
|
115
|
+
if (this.imageDropModule) {
|
|
116
|
+
modules['imageDrop'] = true;
|
|
117
|
+
}
|
|
118
|
+
if (this.syntaxModule) {
|
|
119
|
+
modules['syntax'] = true;
|
|
120
|
+
}
|
|
121
|
+
return modules;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
EditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: EditorComponent, deps: [{ token: MAT_DIALOG_DATA, optional: true }, { token: i1.MatDialogRef, optional: true }, { token: i1.MatDialog }, { token: ActiveDirectoryService }], target: i0.ɵɵFactoryTarget.Component });
|
|
125
|
+
EditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: EditorComponent, selector: "cpquill-editor-with-mention", inputs: { users: "users" }, providers: [{
|
|
126
|
+
provide: NG_VALUE_ACCESSOR,
|
|
127
|
+
useExisting: forwardRef(() => EditorComponent),
|
|
128
|
+
multi: true
|
|
129
|
+
}], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"users\">\n <form>\n <quill-editor name=\"editor\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"updateChanges()\"\n\n [placeholder]=\"placeholder\"\n [format]=\"format\"\n [style.height]=\"fullscreen ? fullscreenHeight : height\"\n [style.width]=\"fullscreen ? fullscreenWidth : width\"\n [readOnly]=\"readonly\"\n [class.readonly]=\"readonly && applyReadonlyStyle\"\n [class.no-toolbar]=\"!showToolbar\"\n [class.no-border]=\"!showBorder\"\n [modules]=\"modules\"\n \n (onBlur)=\"onBlur.emit($event)\"\n (onContentChanged)=\"onContentChanged.emit($event)\"\n (onEditorChanged)=\"onEditorChanged.emit($event)\"\n (onEditorCreated)=\"onEditorCreated.emit()\"\n (onFocus)=\"onFocus.emit($event)\"\n (onSelectionChanged)=\"onSelectionChanged.emit($event)\">\n \n <div quill-editor-toolbar *ngIf=\"showToolbar\">\n <ng-container [ngTemplateOutlet]=\"toolbar\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"editorSize\"></ng-container>\n </div>\n </quill-editor>\n </form>\n</ng-container>\n\n<ng-template #toolbar>\n <div>\n <ng-container [ngTemplateOutlet]=\"fontStyle\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"blockStyle\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"headingStyle\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"listStyle\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"scriptStyle\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"indentStyle\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"rtl\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"fontSize\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"heading\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"color\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"font\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"align\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"clean\"></ng-container>\n <nt-container [ngTemplateOutlet]=\"formula\"></nt-container>\n <ng-container [ngTemplateOutlet]=\"media\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #fontStyle>\n <span class=\"ql-formats\" *ngIf=\"config.showFontStyle\">\n <button class=\"ql-bold\" *ngIf=\"config.buttons.bold\" [matTooltip]=\"tooltip(config.tooltips.bold)\"></button>\n <button class=\"ql-italic\" *ngIf=\"config.buttons.italic\" [matTooltip]=\"tooltip(config.tooltips.italic)\"></button>\n <button class=\"ql-underline\" *ngIf=\"config.buttons.underline\" [matTooltip]=\"tooltip(config.tooltips.underline)\"></button>\n <button class=\"ql-strike\" *ngIf=\"config.buttons.strike\" [matTooltip]=\"tooltip(config.tooltips.strike)\"></button>\n </span>\n</ng-template>\n\n<ng-template #blockStyle>\n <span class=\"ql-formats\" *ngIf=\"config.showBlockStyle\">\n <button class=\"ql-blockquote\" *ngIf=\"config.buttons.blockquote\" [matTooltip]=\"tooltip(config.tooltips.blockquote)\"></button>\n <button class=\"ql-code-block\" *ngIf=\"config.buttons.codeblock\" [matTooltip]=\"tooltip(config.tooltips.codeblock)\"></button>\n </span>\n</ng-template>\n\n<ng-template #headingStyle>\n <span class=\"ql-formats\" *ngIf=\"config.showQuickHeadingStyle\">\n <button class=\"ql-header\" value=\"1\" *ngIf=\"config.buttons.h1\" [matTooltip]=\"tooltip(config.tooltips.h1)\"></button>\n <button class=\"ql-header\" value=\"2\" *ngIf=\"config.buttons.h2\" [matTooltip]=\"tooltip(config.tooltips.h2)\"></button>\n </span>\n</ng-template>\n\n<ng-template #listStyle>\n <span class=\"ql-formats\" *ngIf=\"config.showListStyle\">\n <button class=\"ql-list\" value=\"ordered\" *ngIf=\"config.buttons.ordered\" [matTooltip]=\"tooltip(config.tooltips.ordered)\"></button>\n <button class=\"ql-list\" value=\"bullet\" *ngIf=\"config.buttons.bulleted\" [matTooltip]=\"tooltip(config.tooltips.bulleted)\"></button>\n </span>\n</ng-template>\n\n<ng-template #scriptStyle>\n <span class=\"ql-formats\" *ngIf=\"config.showScriptStyle\">\n <button class=\"ql-script\" value=\"sub\" *ngIf=\"config.buttons.subScript\" [matTooltip]=\"tooltip(config.tooltips.subScript)\"></button>\n <button class=\"ql-script\" value=\"super\" *ngIf=\"config.buttons.superScript\" [matTooltip]=\"tooltip(config.tooltips.superScript)\"></button>\n </span>\n</ng-template>\n \n<ng-template #indentStyle>\n <span class=\"ql-formats\" *ngIf=\"config.showIndentStyle\">\n <button class=\"ql-indent\" value=\"-1\" *ngIf=\"config.buttons.decreaseIndent\" [matTooltip]=\"tooltip(config.tooltips.decreaseIndent)\"></button>\n <button class=\"ql-indent\" value=\"+1\" *ngIf=\"config.buttons.increaseIndent\" [matTooltip]=\"tooltip(config.tooltips.increaseIndent)\"></button>\n </span>\n</ng-template>\n\n<ng-template #rtl>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.rtl\">\n <button class=\"ql-direction\" value=\"rtl\" [matTooltip]=\"tooltip(config.tooltips.rtl)\"></button>\n </span>\n</ng-template>\n\n<ng-template #fontSize>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.fontSize\" [matTooltip]=\"tooltip(config.tooltips.fontSize)\">\n <select class=\"ql-size\">\n <option value=\"small\"></option>\n <option selected></option>\n <option value=\"large\"></option>\n <option value=\"huge\"></option>\n </select>\n </span>\n</ng-template>\n\n<ng-template #heading>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.headingStyle\" [matTooltip]=\"tooltip(config.tooltips.headingStyle)\">\n <select class=\"ql-header\">\n <option value=\"1\"></option>\n <option value=\"2\"></option>\n <option value=\"3\"></option>\n <option value=\"4\"></option>\n <option value=\"5\"></option>\n <option value=\"6\"></option>\n <option selected=\"selected\"></option>\n </select>\n </span>\n</ng-template>\n\n<ng-template #color>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.color\" [matTooltip]=\"tooltip(config.tooltips.color)\">\n <select class=\"ql-color\"></select>\n <select class=\"ql-background\"></select>\n </span>\n</ng-template>\n\n<ng-template #font>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.font\" [matTooltip]=\"tooltip(config.tooltips.font)\">\n <select class=\"ql-font\">\n <option selected></option>\n <option value=\"serif\"></option>\n <option value=\"monospace\"></option>\n </select>\n </span>\n</ng-template>\n\n<ng-template #align>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.align\" [matTooltip]=\"tooltip(config.tooltips.align)\">\n <select class=\"ql-align\">\n <option selected></option>\n <option value=\"center\"></option>\n <option value=\"right\"></option>\n <option value=\"justify\"></option>\n </select>\n </span>\n</ng-template>\n\n<ng-template #clean>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.clean\" [matTooltip]=\"tooltip(config.tooltips.clean)\">\n <button class=\"ql-clean\"></button>\n </span>\n</ng-template>\n\n<ng-template #media>\n <span class=\"ql-formats\" *ngIf=\"config.showMedia\">\n <button class=\"ql-link\" *ngIf=\"config.buttons.link\" [matTooltip]=\"tooltip(config.tooltips.link)\"></button>\n <button class=\"ql-image\" *ngIf=\"config.buttons.image\" [matTooltip]=\"tooltip(config.tooltips.image)\"></button>\n <button class=\"ql-video\" *ngIf=\"config.buttons.video\" [matTooltip]=\"tooltip(config.tooltips.video)\"></button>\n </span>\n</ng-template>\n\n<ng-template #editorSize>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.editorSize\">\n <button id=\"fullscreen\"\n [matTooltip]=\"tooltip(fullscreen ?\n (fullscreenMode === 'expand' ? config.tooltips.minimize : config.tooltips.popin) :\n (fullscreenMode === 'expand' ? config.tooltips.maximize : config.tooltips.popout))\">\n\n <mat-icon (click)=\"toggleFullscreen()\">\n {{ fullscreen ?\n (fullscreenMode === 'expand' ? config.icons.minimize : config.icons.popin) :\n (fullscreenMode === 'expand' ? config.icons.maximize : config.icons.popout)\n }}\n </mat-icon>\n </button>\n </span>\n</ng-template>\n\n<ng-template #formula>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.formula\" [matTooltip]=\"tooltip(config.tooltips.formula)\">\n <button class=\"ql-formula\"></button>\n </span>\n</ng-template>", styles: [".ql-toolbar{display:grid;grid-template-columns:1fr auto}mat-icon{color:#ff4500}quill-editor.readonly .ql-toolbar{opacity:.5}::ng-deep quill-editor.no-toolbar .ql-toolbar{height:0;padding:0;visibility:hidden}::ng-deep quill-editor.no-border .ql-container{border:none}::ng-deep quill-editor.readonly .ql-container{background-color:#f5f5f5!important}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i6.QuillEditorComponent, selector: "quill-editor" }] });
|
|
130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: EditorComponent, decorators: [{
|
|
131
|
+
type: Component,
|
|
132
|
+
args: [{ selector: 'cpquill-editor-with-mention', providers: [{
|
|
133
|
+
provide: NG_VALUE_ACCESSOR,
|
|
134
|
+
useExisting: forwardRef(() => EditorComponent),
|
|
135
|
+
multi: true
|
|
136
|
+
}], template: "<ng-container *ngIf=\"users\">\n <form>\n <quill-editor name=\"editor\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"updateChanges()\"\n\n [placeholder]=\"placeholder\"\n [format]=\"format\"\n [style.height]=\"fullscreen ? fullscreenHeight : height\"\n [style.width]=\"fullscreen ? fullscreenWidth : width\"\n [readOnly]=\"readonly\"\n [class.readonly]=\"readonly && applyReadonlyStyle\"\n [class.no-toolbar]=\"!showToolbar\"\n [class.no-border]=\"!showBorder\"\n [modules]=\"modules\"\n \n (onBlur)=\"onBlur.emit($event)\"\n (onContentChanged)=\"onContentChanged.emit($event)\"\n (onEditorChanged)=\"onEditorChanged.emit($event)\"\n (onEditorCreated)=\"onEditorCreated.emit()\"\n (onFocus)=\"onFocus.emit($event)\"\n (onSelectionChanged)=\"onSelectionChanged.emit($event)\">\n \n <div quill-editor-toolbar *ngIf=\"showToolbar\">\n <ng-container [ngTemplateOutlet]=\"toolbar\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"editorSize\"></ng-container>\n </div>\n </quill-editor>\n </form>\n</ng-container>\n\n<ng-template #toolbar>\n <div>\n <ng-container [ngTemplateOutlet]=\"fontStyle\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"blockStyle\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"headingStyle\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"listStyle\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"scriptStyle\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"indentStyle\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"rtl\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"fontSize\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"heading\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"color\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"font\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"align\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"clean\"></ng-container>\n <nt-container [ngTemplateOutlet]=\"formula\"></nt-container>\n <ng-container [ngTemplateOutlet]=\"media\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #fontStyle>\n <span class=\"ql-formats\" *ngIf=\"config.showFontStyle\">\n <button class=\"ql-bold\" *ngIf=\"config.buttons.bold\" [matTooltip]=\"tooltip(config.tooltips.bold)\"></button>\n <button class=\"ql-italic\" *ngIf=\"config.buttons.italic\" [matTooltip]=\"tooltip(config.tooltips.italic)\"></button>\n <button class=\"ql-underline\" *ngIf=\"config.buttons.underline\" [matTooltip]=\"tooltip(config.tooltips.underline)\"></button>\n <button class=\"ql-strike\" *ngIf=\"config.buttons.strike\" [matTooltip]=\"tooltip(config.tooltips.strike)\"></button>\n </span>\n</ng-template>\n\n<ng-template #blockStyle>\n <span class=\"ql-formats\" *ngIf=\"config.showBlockStyle\">\n <button class=\"ql-blockquote\" *ngIf=\"config.buttons.blockquote\" [matTooltip]=\"tooltip(config.tooltips.blockquote)\"></button>\n <button class=\"ql-code-block\" *ngIf=\"config.buttons.codeblock\" [matTooltip]=\"tooltip(config.tooltips.codeblock)\"></button>\n </span>\n</ng-template>\n\n<ng-template #headingStyle>\n <span class=\"ql-formats\" *ngIf=\"config.showQuickHeadingStyle\">\n <button class=\"ql-header\" value=\"1\" *ngIf=\"config.buttons.h1\" [matTooltip]=\"tooltip(config.tooltips.h1)\"></button>\n <button class=\"ql-header\" value=\"2\" *ngIf=\"config.buttons.h2\" [matTooltip]=\"tooltip(config.tooltips.h2)\"></button>\n </span>\n</ng-template>\n\n<ng-template #listStyle>\n <span class=\"ql-formats\" *ngIf=\"config.showListStyle\">\n <button class=\"ql-list\" value=\"ordered\" *ngIf=\"config.buttons.ordered\" [matTooltip]=\"tooltip(config.tooltips.ordered)\"></button>\n <button class=\"ql-list\" value=\"bullet\" *ngIf=\"config.buttons.bulleted\" [matTooltip]=\"tooltip(config.tooltips.bulleted)\"></button>\n </span>\n</ng-template>\n\n<ng-template #scriptStyle>\n <span class=\"ql-formats\" *ngIf=\"config.showScriptStyle\">\n <button class=\"ql-script\" value=\"sub\" *ngIf=\"config.buttons.subScript\" [matTooltip]=\"tooltip(config.tooltips.subScript)\"></button>\n <button class=\"ql-script\" value=\"super\" *ngIf=\"config.buttons.superScript\" [matTooltip]=\"tooltip(config.tooltips.superScript)\"></button>\n </span>\n</ng-template>\n \n<ng-template #indentStyle>\n <span class=\"ql-formats\" *ngIf=\"config.showIndentStyle\">\n <button class=\"ql-indent\" value=\"-1\" *ngIf=\"config.buttons.decreaseIndent\" [matTooltip]=\"tooltip(config.tooltips.decreaseIndent)\"></button>\n <button class=\"ql-indent\" value=\"+1\" *ngIf=\"config.buttons.increaseIndent\" [matTooltip]=\"tooltip(config.tooltips.increaseIndent)\"></button>\n </span>\n</ng-template>\n\n<ng-template #rtl>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.rtl\">\n <button class=\"ql-direction\" value=\"rtl\" [matTooltip]=\"tooltip(config.tooltips.rtl)\"></button>\n </span>\n</ng-template>\n\n<ng-template #fontSize>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.fontSize\" [matTooltip]=\"tooltip(config.tooltips.fontSize)\">\n <select class=\"ql-size\">\n <option value=\"small\"></option>\n <option selected></option>\n <option value=\"large\"></option>\n <option value=\"huge\"></option>\n </select>\n </span>\n</ng-template>\n\n<ng-template #heading>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.headingStyle\" [matTooltip]=\"tooltip(config.tooltips.headingStyle)\">\n <select class=\"ql-header\">\n <option value=\"1\"></option>\n <option value=\"2\"></option>\n <option value=\"3\"></option>\n <option value=\"4\"></option>\n <option value=\"5\"></option>\n <option value=\"6\"></option>\n <option selected=\"selected\"></option>\n </select>\n </span>\n</ng-template>\n\n<ng-template #color>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.color\" [matTooltip]=\"tooltip(config.tooltips.color)\">\n <select class=\"ql-color\"></select>\n <select class=\"ql-background\"></select>\n </span>\n</ng-template>\n\n<ng-template #font>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.font\" [matTooltip]=\"tooltip(config.tooltips.font)\">\n <select class=\"ql-font\">\n <option selected></option>\n <option value=\"serif\"></option>\n <option value=\"monospace\"></option>\n </select>\n </span>\n</ng-template>\n\n<ng-template #align>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.align\" [matTooltip]=\"tooltip(config.tooltips.align)\">\n <select class=\"ql-align\">\n <option selected></option>\n <option value=\"center\"></option>\n <option value=\"right\"></option>\n <option value=\"justify\"></option>\n </select>\n </span>\n</ng-template>\n\n<ng-template #clean>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.clean\" [matTooltip]=\"tooltip(config.tooltips.clean)\">\n <button class=\"ql-clean\"></button>\n </span>\n</ng-template>\n\n<ng-template #media>\n <span class=\"ql-formats\" *ngIf=\"config.showMedia\">\n <button class=\"ql-link\" *ngIf=\"config.buttons.link\" [matTooltip]=\"tooltip(config.tooltips.link)\"></button>\n <button class=\"ql-image\" *ngIf=\"config.buttons.image\" [matTooltip]=\"tooltip(config.tooltips.image)\"></button>\n <button class=\"ql-video\" *ngIf=\"config.buttons.video\" [matTooltip]=\"tooltip(config.tooltips.video)\"></button>\n </span>\n</ng-template>\n\n<ng-template #editorSize>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.editorSize\">\n <button id=\"fullscreen\"\n [matTooltip]=\"tooltip(fullscreen ?\n (fullscreenMode === 'expand' ? config.tooltips.minimize : config.tooltips.popin) :\n (fullscreenMode === 'expand' ? config.tooltips.maximize : config.tooltips.popout))\">\n\n <mat-icon (click)=\"toggleFullscreen()\">\n {{ fullscreen ?\n (fullscreenMode === 'expand' ? config.icons.minimize : config.icons.popin) :\n (fullscreenMode === 'expand' ? config.icons.maximize : config.icons.popout)\n }}\n </mat-icon>\n </button>\n </span>\n</ng-template>\n\n<ng-template #formula>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.formula\" [matTooltip]=\"tooltip(config.tooltips.formula)\">\n <button class=\"ql-formula\"></button>\n </span>\n</ng-template>", styles: [".ql-toolbar{display:grid;grid-template-columns:1fr auto}mat-icon{color:#ff4500}quill-editor.readonly .ql-toolbar{opacity:.5}::ng-deep quill-editor.no-toolbar .ql-toolbar{height:0;padding:0;visibility:hidden}::ng-deep quill-editor.no-border .ql-container{border:none}::ng-deep quill-editor.readonly .ql-container{background-color:#f5f5f5!important}\n"] }]
|
|
137
|
+
}], ctorParameters: function () {
|
|
138
|
+
return [{ type: undefined, decorators: [{
|
|
139
|
+
type: Optional
|
|
140
|
+
}, {
|
|
141
|
+
type: Inject,
|
|
142
|
+
args: [MAT_DIALOG_DATA]
|
|
143
|
+
}] }, { type: i1.MatDialogRef, decorators: [{
|
|
144
|
+
type: Optional
|
|
145
|
+
}] }, { type: i1.MatDialog }, { type: i7.ActiveDirectoryService, decorators: [{
|
|
146
|
+
type: Inject,
|
|
147
|
+
args: [ActiveDirectoryService]
|
|
148
|
+
}] }];
|
|
149
|
+
}, propDecorators: { users: [{
|
|
150
|
+
type: Input
|
|
151
|
+
}] } });
|
|
152
|
+
|
|
153
|
+
class QuillMentionModule {
|
|
154
|
+
constructor(parentModule) {
|
|
155
|
+
if (parentModule) {
|
|
156
|
+
throw new Error('QuillMentionModule is already loaded. Import it in the AppModule only');
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
static forRoot() {
|
|
160
|
+
return {
|
|
161
|
+
ngModule: QuillMentionModule
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
QuillMentionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: QuillMentionModule, deps: [{ token: QuillMentionModule, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
166
|
+
QuillMentionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: QuillMentionModule, declarations: [EditorComponent], imports: [CommonModule,
|
|
167
|
+
FormsModule,
|
|
168
|
+
ReactiveFormsModule,
|
|
169
|
+
MatButtonModule,
|
|
170
|
+
MatDialogModule,
|
|
171
|
+
MatIconModule,
|
|
172
|
+
MatTooltipModule, i6.QuillModule] });
|
|
173
|
+
QuillMentionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: QuillMentionModule, imports: [CommonModule,
|
|
174
|
+
FormsModule,
|
|
175
|
+
ReactiveFormsModule,
|
|
176
|
+
MatButtonModule,
|
|
177
|
+
MatDialogModule,
|
|
178
|
+
MatIconModule,
|
|
179
|
+
MatTooltipModule,
|
|
180
|
+
QuillModule.forRoot()] });
|
|
181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: QuillMentionModule, decorators: [{
|
|
182
|
+
type: NgModule,
|
|
183
|
+
args: [{
|
|
184
|
+
declarations: [
|
|
185
|
+
EditorComponent
|
|
186
|
+
],
|
|
187
|
+
imports: [
|
|
188
|
+
CommonModule,
|
|
189
|
+
FormsModule,
|
|
190
|
+
ReactiveFormsModule,
|
|
191
|
+
MatButtonModule,
|
|
192
|
+
MatDialogModule,
|
|
193
|
+
MatIconModule,
|
|
194
|
+
MatTooltipModule,
|
|
195
|
+
QuillModule.forRoot()
|
|
196
|
+
],
|
|
197
|
+
exports: []
|
|
198
|
+
}]
|
|
199
|
+
}], ctorParameters: function () {
|
|
200
|
+
return [{ type: QuillMentionModule, decorators: [{
|
|
201
|
+
type: Optional
|
|
202
|
+
}, {
|
|
203
|
+
type: SkipSelf
|
|
204
|
+
}] }];
|
|
205
|
+
} });
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Generated bundle index. Do not edit.
|
|
209
|
+
*/
|
|
210
|
+
|
|
211
|
+
export { QuillMentionModule };
|
|
212
|
+
//# sourceMappingURL=cleavelandprice-ngx-lib-quill-mention.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleavelandprice-ngx-lib-quill-mention.mjs","sources":["../../../../projects/cleavelandprice/ngx-lib/quill/mention/src/components/editor/editor.component.ts","../../../../projects/cleavelandprice/ngx-lib/quill/mention/src/components/editor/editor.component.html","../../../../projects/cleavelandprice/ngx-lib/quill/mention/src/quill-mention.module.ts","../../../../projects/cleavelandprice/ngx-lib/quill/mention/src/cleavelandprice-ngx-lib-quill-mention.ts"],"sourcesContent":["import { Component, EventEmitter, Inject, Input, OnInit, Output, ViewChild, Optional, forwardRef } from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from \"@angular/forms\";\n//import { FormGroup } from '@angular/forms';\nimport { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { ActiveDirectoryService, User } from '@cleavelandprice/ngx-lib/active-directory';\n\nimport { ContentChange, Blur, Focus, EditorChangeContent, EditorChangeSelection, SelectionChange, QuillEditorComponent } from 'ngx-quill';\n\nimport 'quill-mention';\n\n//#region Moved to client responsibility\n//import Quill from 'quill';\n\n// This doesn't work when done from the library - it must be done from the client app\n//import ImageResize from 'quill-image-resize-module';\n//Quill.register('modules/imageResize', ImageResize);\n\n// Treating ImageDrop the same way as ImageResize, even though it doesn't have the same problem described above\n//import { ImageDrop } from 'quill-image-drop-module';\n\n//#endregion\n\nimport { Config, EditorComponent as EditorComponentBase } from '@cleavelandprice/ngx-lib/quill';\nimport { DialogData } from '../../model/dialog-data';\n\n@Component({\n selector: 'cpquill-editor-with-mention',\n templateUrl: './editor.component.html',\n styleUrls: ['./editor.component.css'],\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => EditorComponent),\n multi: true\n }]\n})\nexport class EditorComponent extends EditorComponentBase implements OnInit, ControlValueAccessor {\n @Input() users: User[] | undefined;\n\n constructor(@Optional() @Inject(MAT_DIALOG_DATA) data: DialogData,\n @Optional() private dlgRef: MatDialogRef<EditorComponent>,\n private dlg: MatDialog,\n @Inject(ActiveDirectoryService) private activeDirectoryService: ActiveDirectoryService) {\n \n super(data, dlgRef, dlg);\n }\n\n override ngOnInit(): void {\n this.initialize();\n \n if (!this.users) {\n this.activeDirectoryService.getUsers().subscribe(users =>\n this.users = users\n );\n }\n }\n\n override toggleFullscreen(): void {\n if (this.fullscreenMode === 'expand') {\n this.fullscreen = !this.fullscreen;\n this.fullscreenChanged.emit(this.fullscreen);\n }\n else {\n if (this.fullscreen) {\n this.dlgRef.close(this.value);\n this.fullscreenChanged.emit(false);\n } else {\n const data: DialogData = {\n\n value: this.value,\n config: this.config,\n placeholder: this.placeholder,\n format: this.format,\n height: this.fullscreenHeight,\n width: '100%',\n maxHeight: this.fullscreenHeight,\n maxWidth: '100%',\n enableTooltips: this.enableTooltips!,\n fullscreen: true,\n fullscreenMode: this.fullscreenMode,\n readonly: this.readonly!,\n applyReadonlyStyle: this.applyReadonlyStyle!,\n showToolbar: this.showToolbar!,\n showBorder: this.showBorder!,\n users: this.users\n };\n\n this.dlg.open(EditorComponent, {\n disableClose: true,\n width: this.fullscreenWidth,\n height: this.fullscreenHeight,\n data\n })\n .afterClosed()\n .subscribe(value => {\n this.value = value;\n this.updateChanges();\n });\n\n this.fullscreenChanged.emit(true);\n }\n }\n }\n\n override get modules() {\n if (!this.users) { return {}; }\n\n const modules = {\n mention: {\n allowedChars: /^[A-Za-z\\sÅÄÖåäö]*$/,\n\n onSelect: (item: DOMStringMap, insertItem: any) => {\n const editor = this.editor!.quillEditor\n insertItem(item)\n // necessary because quill-mention triggers changes as 'api' instead of 'user'\n editor.insertText(editor.getLength() - 1, '', 'user')\n },\n\n source: (searchTerm: string, renderList: any) => {\n if (searchTerm.length === 0) {\n renderList(this.users?.map(u => ({ value: `${u.displayName} (${u.sAMAccountName.toLowerCase()})` })), searchTerm)\n } else {\n const matches: any[] = []\n\n this.users!.forEach((entry) => {\n if (\n entry.displayName.toLowerCase().indexOf(searchTerm.toLowerCase()) !== -1 ||\n entry.sAMAccountName.toLowerCase().indexOf(searchTerm.toLowerCase()) !== -1\n ) {\n matches.push({ value: `${entry.displayName} (${entry.sAMAccountName.toLowerCase()})` })\n }\n })\n\n renderList(matches, searchTerm)\n }\n }\n }\n };\n\n if (!this.showToolbar) {\n modules['toolbar'] = [];\n }\n\n if (this.imageResizeModule) {\n modules['imageResize'] = {};\n }\n\n if (this.imageDropModule) {\n modules['imageDrop'] = true;\n }\n\n if (this.syntaxModule) {\n modules['syntax'] = true;\n }\n\n return modules;\n }\n}","<ng-container *ngIf=\"users\">\n <form>\n <quill-editor name=\"editor\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"updateChanges()\"\n\n [placeholder]=\"placeholder\"\n [format]=\"format\"\n [style.height]=\"fullscreen ? fullscreenHeight : height\"\n [style.width]=\"fullscreen ? fullscreenWidth : width\"\n [readOnly]=\"readonly\"\n [class.readonly]=\"readonly && applyReadonlyStyle\"\n [class.no-toolbar]=\"!showToolbar\"\n [class.no-border]=\"!showBorder\"\n [modules]=\"modules\"\n \n (onBlur)=\"onBlur.emit($event)\"\n (onContentChanged)=\"onContentChanged.emit($event)\"\n (onEditorChanged)=\"onEditorChanged.emit($event)\"\n (onEditorCreated)=\"onEditorCreated.emit()\"\n (onFocus)=\"onFocus.emit($event)\"\n (onSelectionChanged)=\"onSelectionChanged.emit($event)\">\n \n <div quill-editor-toolbar *ngIf=\"showToolbar\">\n <ng-container [ngTemplateOutlet]=\"toolbar\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"editorSize\"></ng-container>\n </div>\n </quill-editor>\n </form>\n</ng-container>\n\n<ng-template #toolbar>\n <div>\n <ng-container [ngTemplateOutlet]=\"fontStyle\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"blockStyle\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"headingStyle\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"listStyle\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"scriptStyle\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"indentStyle\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"rtl\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"fontSize\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"heading\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"color\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"font\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"align\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"clean\"></ng-container>\n <nt-container [ngTemplateOutlet]=\"formula\"></nt-container>\n <ng-container [ngTemplateOutlet]=\"media\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #fontStyle>\n <span class=\"ql-formats\" *ngIf=\"config.showFontStyle\">\n <button class=\"ql-bold\" *ngIf=\"config.buttons.bold\" [matTooltip]=\"tooltip(config.tooltips.bold)\"></button>\n <button class=\"ql-italic\" *ngIf=\"config.buttons.italic\" [matTooltip]=\"tooltip(config.tooltips.italic)\"></button>\n <button class=\"ql-underline\" *ngIf=\"config.buttons.underline\" [matTooltip]=\"tooltip(config.tooltips.underline)\"></button>\n <button class=\"ql-strike\" *ngIf=\"config.buttons.strike\" [matTooltip]=\"tooltip(config.tooltips.strike)\"></button>\n </span>\n</ng-template>\n\n<ng-template #blockStyle>\n <span class=\"ql-formats\" *ngIf=\"config.showBlockStyle\">\n <button class=\"ql-blockquote\" *ngIf=\"config.buttons.blockquote\" [matTooltip]=\"tooltip(config.tooltips.blockquote)\"></button>\n <button class=\"ql-code-block\" *ngIf=\"config.buttons.codeblock\" [matTooltip]=\"tooltip(config.tooltips.codeblock)\"></button>\n </span>\n</ng-template>\n\n<ng-template #headingStyle>\n <span class=\"ql-formats\" *ngIf=\"config.showQuickHeadingStyle\">\n <button class=\"ql-header\" value=\"1\" *ngIf=\"config.buttons.h1\" [matTooltip]=\"tooltip(config.tooltips.h1)\"></button>\n <button class=\"ql-header\" value=\"2\" *ngIf=\"config.buttons.h2\" [matTooltip]=\"tooltip(config.tooltips.h2)\"></button>\n </span>\n</ng-template>\n\n<ng-template #listStyle>\n <span class=\"ql-formats\" *ngIf=\"config.showListStyle\">\n <button class=\"ql-list\" value=\"ordered\" *ngIf=\"config.buttons.ordered\" [matTooltip]=\"tooltip(config.tooltips.ordered)\"></button>\n <button class=\"ql-list\" value=\"bullet\" *ngIf=\"config.buttons.bulleted\" [matTooltip]=\"tooltip(config.tooltips.bulleted)\"></button>\n </span>\n</ng-template>\n\n<ng-template #scriptStyle>\n <span class=\"ql-formats\" *ngIf=\"config.showScriptStyle\">\n <button class=\"ql-script\" value=\"sub\" *ngIf=\"config.buttons.subScript\" [matTooltip]=\"tooltip(config.tooltips.subScript)\"></button>\n <button class=\"ql-script\" value=\"super\" *ngIf=\"config.buttons.superScript\" [matTooltip]=\"tooltip(config.tooltips.superScript)\"></button>\n </span>\n</ng-template>\n \n<ng-template #indentStyle>\n <span class=\"ql-formats\" *ngIf=\"config.showIndentStyle\">\n <button class=\"ql-indent\" value=\"-1\" *ngIf=\"config.buttons.decreaseIndent\" [matTooltip]=\"tooltip(config.tooltips.decreaseIndent)\"></button>\n <button class=\"ql-indent\" value=\"+1\" *ngIf=\"config.buttons.increaseIndent\" [matTooltip]=\"tooltip(config.tooltips.increaseIndent)\"></button>\n </span>\n</ng-template>\n\n<ng-template #rtl>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.rtl\">\n <button class=\"ql-direction\" value=\"rtl\" [matTooltip]=\"tooltip(config.tooltips.rtl)\"></button>\n </span>\n</ng-template>\n\n<ng-template #fontSize>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.fontSize\" [matTooltip]=\"tooltip(config.tooltips.fontSize)\">\n <select class=\"ql-size\">\n <option value=\"small\"></option>\n <option selected></option>\n <option value=\"large\"></option>\n <option value=\"huge\"></option>\n </select>\n </span>\n</ng-template>\n\n<ng-template #heading>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.headingStyle\" [matTooltip]=\"tooltip(config.tooltips.headingStyle)\">\n <select class=\"ql-header\">\n <option value=\"1\"></option>\n <option value=\"2\"></option>\n <option value=\"3\"></option>\n <option value=\"4\"></option>\n <option value=\"5\"></option>\n <option value=\"6\"></option>\n <option selected=\"selected\"></option>\n </select>\n </span>\n</ng-template>\n\n<ng-template #color>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.color\" [matTooltip]=\"tooltip(config.tooltips.color)\">\n <select class=\"ql-color\"></select>\n <select class=\"ql-background\"></select>\n </span>\n</ng-template>\n\n<ng-template #font>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.font\" [matTooltip]=\"tooltip(config.tooltips.font)\">\n <select class=\"ql-font\">\n <option selected></option>\n <option value=\"serif\"></option>\n <option value=\"monospace\"></option>\n </select>\n </span>\n</ng-template>\n\n<ng-template #align>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.align\" [matTooltip]=\"tooltip(config.tooltips.align)\">\n <select class=\"ql-align\">\n <option selected></option>\n <option value=\"center\"></option>\n <option value=\"right\"></option>\n <option value=\"justify\"></option>\n </select>\n </span>\n</ng-template>\n\n<ng-template #clean>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.clean\" [matTooltip]=\"tooltip(config.tooltips.clean)\">\n <button class=\"ql-clean\"></button>\n </span>\n</ng-template>\n\n<ng-template #media>\n <span class=\"ql-formats\" *ngIf=\"config.showMedia\">\n <button class=\"ql-link\" *ngIf=\"config.buttons.link\" [matTooltip]=\"tooltip(config.tooltips.link)\"></button>\n <button class=\"ql-image\" *ngIf=\"config.buttons.image\" [matTooltip]=\"tooltip(config.tooltips.image)\"></button>\n <button class=\"ql-video\" *ngIf=\"config.buttons.video\" [matTooltip]=\"tooltip(config.tooltips.video)\"></button>\n </span>\n</ng-template>\n\n<ng-template #editorSize>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.editorSize\">\n <button id=\"fullscreen\"\n [matTooltip]=\"tooltip(fullscreen ?\n (fullscreenMode === 'expand' ? config.tooltips.minimize : config.tooltips.popin) :\n (fullscreenMode === 'expand' ? config.tooltips.maximize : config.tooltips.popout))\">\n\n <mat-icon (click)=\"toggleFullscreen()\">\n {{ fullscreen ?\n (fullscreenMode === 'expand' ? config.icons.minimize : config.icons.popin) :\n (fullscreenMode === 'expand' ? config.icons.maximize : config.icons.popout)\n }}\n </mat-icon>\n </button>\n </span>\n</ng-template>\n\n<ng-template #formula>\n <span class=\"ql-formats\" *ngIf=\"config.buttons.formula\" [matTooltip]=\"tooltip(config.tooltips.formula)\">\n <button class=\"ql-formula\"></button>\n </span>\n</ng-template>","import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\n\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatDialogModule } from '@angular/material/dialog';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\nimport { QuillModule as NgxQuillModule } from 'ngx-quill';\nimport { EditorComponent } from './components/editor/editor.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n \n EditorComponent\n ],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n\r\n MatButtonModule,\r\n MatDialogModule,\r\n MatIconModule,\r\n MatTooltipModule,\r\n\r\n NgxQuillModule.forRoot()\r\n ],\r\n exports: [\r\n ]\r\n})\r\nexport class QuillMentionModule {\r\n static forRoot(): ModuleWithProviders<QuillMentionModule> {\r\n return {\r\n ngModule: QuillMentionModule\r\n };\r\n }\r\n\r\n constructor(@Optional() @SkipSelf() parentModule: QuillMentionModule) {\r\n if (parentModule) {\r\n throw new Error(\r\n 'QuillMentionModule is already loaded. Import it in the AppModule only');\r\n }\r\n }\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["EditorComponentBase","i1","NgxQuillModule"],"mappings":";;;;;;;;;;;;;;;;;;;;AAmCM,MAAO,eAAgB,SAAQA,iBAAmB,CAAA;AAGtD,IAAA,WAAA,CAAiD,IAA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