source: trip-planner-front/node_modules/primeng/esm2020/editor/editor.mjs@ b738035

Last change on this file since b738035 was 59329aa, checked in by Ema <ema_spirova@…>, 3 years ago

adding photos

  • Property mode set to 100644
File size: 28.9 KB
Line 
1import { NgModule, Component, Input, Output, EventEmitter, ContentChild, forwardRef, ChangeDetectionStrategy, ViewEncapsulation, ContentChildren } from '@angular/core';
2import { CommonModule } from '@angular/common';
3import { SharedModule, Header, PrimeTemplate } from 'primeng/api';
4import { DomHandler } from 'primeng/dom';
5import { NG_VALUE_ACCESSOR } from '@angular/forms';
6import * as Quill from "quill";
7import * as i0 from "@angular/core";
8import * as i1 from "@angular/common";
9export const EDITOR_VALUE_ACCESSOR = {
10 provide: NG_VALUE_ACCESSOR,
11 useExisting: forwardRef(() => Editor),
12 multi: true
13};
14export class Editor {
15 constructor(el) {
16 this.el = el;
17 this.onTextChange = new EventEmitter();
18 this.onSelectionChange = new EventEmitter();
19 this.onInit = new EventEmitter();
20 this.onModelChange = () => { };
21 this.onModelTouched = () => { };
22 }
23 ngAfterViewInit() {
24 let editorElement = DomHandler.findSingle(this.el.nativeElement, 'div.p-editor-content');
25 let toolbarElement = DomHandler.findSingle(this.el.nativeElement, 'div.p-editor-toolbar');
26 let defaultModule = { toolbar: toolbarElement };
27 let modules = this.modules ? { ...defaultModule, ...this.modules } : defaultModule;
28 this.quill = new Quill(editorElement, {
29 modules: modules,
30 placeholder: this.placeholder,
31 readOnly: this.readonly,
32 theme: 'snow',
33 formats: this.formats,
34 bounds: this.bounds,
35 debug: this.debug,
36 scrollingContainer: this.scrollingContainer
37 });
38 if (this.value) {
39 this.quill.setContents(this.quill.clipboard.convert(this.value));
40 }
41 this.quill.on('text-change', (delta, oldContents, source) => {
42 if (source === 'user') {
43 let html = DomHandler.findSingle(editorElement, '.ql-editor').innerHTML;
44 let text = this.quill.getText().trim();
45 if (html === '<p><br></p>') {
46 html = null;
47 }
48 this.onTextChange.emit({
49 htmlValue: html,
50 textValue: text,
51 delta: delta,
52 source: source
53 });
54 this.onModelChange(html);
55 this.onModelTouched();
56 }
57 });
58 this.quill.on('selection-change', (range, oldRange, source) => {
59 this.onSelectionChange.emit({
60 range: range,
61 oldRange: oldRange,
62 source: source
63 });
64 });
65 this.onInit.emit({
66 editor: this.quill
67 });
68 }
69 ngAfterContentInit() {
70 this.templates.forEach((item) => {
71 switch (item.getType()) {
72 case 'header':
73 this.headerTemplate = item.template;
74 break;
75 }
76 });
77 }
78 writeValue(value) {
79 this.value = value;
80 if (this.quill) {
81 if (value)
82 this.quill.setContents(this.quill.clipboard.convert(value));
83 else
84 this.quill.setText('');
85 }
86 }
87 registerOnChange(fn) {
88 this.onModelChange = fn;
89 }
90 registerOnTouched(fn) {
91 this.onModelTouched = fn;
92 }
93 getQuill() {
94 return this.quill;
95 }
96 get readonly() {
97 return this._readonly;
98 }
99 set readonly(val) {
100 this._readonly = val;
101 if (this.quill) {
102 if (this._readonly)
103 this.quill.disable();
104 else
105 this.quill.enable();
106 }
107 }
108}
109Editor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Editor, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
110Editor.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: Editor, selector: "p-editor", inputs: { style: "style", styleClass: "styleClass", placeholder: "placeholder", formats: "formats", modules: "modules", bounds: "bounds", scrollingContainer: "scrollingContainer", debug: "debug", readonly: "readonly" }, outputs: { onTextChange: "onTextChange", onSelectionChange: "onSelectionChange", onInit: "onInit" }, host: { classAttribute: "p-element" }, providers: [EDITOR_VALUE_ACCESSOR], queries: [{ propertyName: "toolbar", first: true, predicate: Header, descendants: true }, { propertyName: "templates", predicate: PrimeTemplate }], ngImport: i0, template: `
111 <div [ngClass]="'p-editor-container'" [class]="styleClass">
112 <div class="p-editor-toolbar" *ngIf="toolbar || headerTemplate">
113 <ng-content select="p-header"></ng-content>
114 <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>
115 </div>
116 <div class="p-editor-toolbar" *ngIf="!toolbar && !headerTemplate">
117 <span class="ql-formats">
118 <select class="ql-header">
119 <option value="1">Heading</option>
120 <option value="2">Subheading</option>
121 <option selected>Normal</option>
122 </select>
123 <select class="ql-font">
124 <option selected>Sans Serif</option>
125 <option value="serif">Serif</option>
126 <option value="monospace">Monospace</option>
127 </select>
128 </span>
129 <span class="ql-formats">
130 <button class="ql-bold" aria-label="Bold" type="button"></button>
131 <button class="ql-italic" aria-label="Italic" type="button"></button>
132 <button class="ql-underline" aria-label="Underline" type="button"></button>
133 </span>
134 <span class="ql-formats">
135 <select class="ql-color"></select>
136 <select class="ql-background"></select>
137 </span>
138 <span class="ql-formats">
139 <button class="ql-list" value="ordered" aria-label="Ordered List" type="button"></button>
140 <button class="ql-list" value="bullet" aria-label="Unordered List" type="button"></button>
141 <select class="ql-align">
142 <option selected></option>
143 <option value="center">center</option>
144 <option value="right">right</option>
145 <option value="justify">justify</option>
146 </select>
147 </span>
148 <span class="ql-formats">
149 <button class="ql-link" aria-label="Insert Link" type="button"></button>
150 <button class="ql-image" aria-label="Insert Image" type="button"></button>
151 <button class="ql-code-block" aria-label="Insert Code Block" type="button"></button>
152 </span>
153 <span class="ql-formats">
154 <button class="ql-clean" aria-label="Remove Styles" type="button"></button>
155 </span>
156 </div>
157 <div class="p-editor-content" [ngStyle]="style"></div>
158 </div>
159 `, isInline: true, styles: [".p-editor-container .p-editor-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options .ql-picker-item{width:auto;height:auto}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
160i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Editor, decorators: [{
161 type: Component,
162 args: [{ selector: 'p-editor', template: `
163 <div [ngClass]="'p-editor-container'" [class]="styleClass">
164 <div class="p-editor-toolbar" *ngIf="toolbar || headerTemplate">
165 <ng-content select="p-header"></ng-content>
166 <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>
167 </div>
168 <div class="p-editor-toolbar" *ngIf="!toolbar && !headerTemplate">
169 <span class="ql-formats">
170 <select class="ql-header">
171 <option value="1">Heading</option>
172 <option value="2">Subheading</option>
173 <option selected>Normal</option>
174 </select>
175 <select class="ql-font">
176 <option selected>Sans Serif</option>
177 <option value="serif">Serif</option>
178 <option value="monospace">Monospace</option>
179 </select>
180 </span>
181 <span class="ql-formats">
182 <button class="ql-bold" aria-label="Bold" type="button"></button>
183 <button class="ql-italic" aria-label="Italic" type="button"></button>
184 <button class="ql-underline" aria-label="Underline" type="button"></button>
185 </span>
186 <span class="ql-formats">
187 <select class="ql-color"></select>
188 <select class="ql-background"></select>
189 </span>
190 <span class="ql-formats">
191 <button class="ql-list" value="ordered" aria-label="Ordered List" type="button"></button>
192 <button class="ql-list" value="bullet" aria-label="Unordered List" type="button"></button>
193 <select class="ql-align">
194 <option selected></option>
195 <option value="center">center</option>
196 <option value="right">right</option>
197 <option value="justify">justify</option>
198 </select>
199 </span>
200 <span class="ql-formats">
201 <button class="ql-link" aria-label="Insert Link" type="button"></button>
202 <button class="ql-image" aria-label="Insert Image" type="button"></button>
203 <button class="ql-code-block" aria-label="Insert Code Block" type="button"></button>
204 </span>
205 <span class="ql-formats">
206 <button class="ql-clean" aria-label="Remove Styles" type="button"></button>
207 </span>
208 </div>
209 <div class="p-editor-content" [ngStyle]="style"></div>
210 </div>
211 `, providers: [EDITOR_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
212 'class': 'p-element'
213 }, styles: [".p-editor-container .p-editor-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options .ql-picker-item{width:auto;height:auto}\n"] }]
214 }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { onTextChange: [{
215 type: Output
216 }], onSelectionChange: [{
217 type: Output
218 }], toolbar: [{
219 type: ContentChild,
220 args: [Header]
221 }], style: [{
222 type: Input
223 }], styleClass: [{
224 type: Input
225 }], placeholder: [{
226 type: Input
227 }], formats: [{
228 type: Input
229 }], modules: [{
230 type: Input
231 }], bounds: [{
232 type: Input
233 }], scrollingContainer: [{
234 type: Input
235 }], debug: [{
236 type: Input
237 }], onInit: [{
238 type: Output
239 }], templates: [{
240 type: ContentChildren,
241 args: [PrimeTemplate]
242 }], readonly: [{
243 type: Input
244 }] } });
245export class EditorModule {
246}
247EditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: EditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
248EditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: EditorModule, declarations: [Editor], imports: [CommonModule], exports: [Editor, SharedModule] });
249EditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: EditorModule, imports: [[CommonModule], SharedModule] });
250i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: EditorModule, decorators: [{
251 type: NgModule,
252 args: [{
253 imports: [CommonModule],
254 exports: [Editor, SharedModule],
255 declarations: [Editor]
256 }]
257 }] });
258//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWRpdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FwcC9jb21wb25lbnRzL2VkaXRvci9lZGl0b3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HNcIj5cbiAgICAgICAgICAgICAgICAgICAgPHNlbGVjdCBjbGFzcz1cInFsLWhlYWRlclwiPlxuICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9XCIxXCI+SGVhZGluZzwvb3B0aW9uPlxuICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9XCIyXCI+U3ViaGVhZGluZzwvb3B0aW9uPlxuICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gc2VsZWN0ZWQ+Tm9ybWFsPC9vcHRpb24+XG4gICAgICAgICAgICAgICAgICAgIDwvc2VsZWN0PlxuICAgICAgICAgICAgICAgICAgICA8c2VsZWN0IGNsYXNzPVwicWwtZm9udFwiPlxuICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gc2VsZWN0ZWQ+U2FucyBTZXJpZjwvb3B0aW9uPlxuICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9XCJzZXJpZlwiPlNlcmlmPC9vcHRpb24+XG4gICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT1cIm1vbm9zcGFjZVwiPk1vbm9zcGFjZTwvb3B0aW9uPlxuICAgICAgICAgICAgICAgICAgICA8L3NlbGVjdD5cbiAgICAgICAgICAgICAgICA8L3NwYW4+XG4gICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9XCJxbC1mb3JtYXRzXCI+XG4gICAgICAgICAgICAgICAgICAgIDxidXR0b24gY2xhc3M9XCJxbC1ib2xkXCIgYXJpYS1sYWJlbD1cIkJvbGRcIiB0eXBlPVwiYnV0dG9uXCI+PC9idXR0b24+XG4gICAgICAgICAgICAgICAgICAgIDxidXR0b24gY2xhc3M9XCJxbC1pdGFsaWNcIiBhcmlhLWxhYmVsPVwiSXRhbGljXCIgdHlwZT1cImJ1dHRvblwiPjwvYnV0dG9uPlxuICAgICAgICAgICAgICAgICAgICA8YnV0dG9uIGNsYXNzPVwicWwtdW5kZXJsaW5lXCIgYXJpYS1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iAgICAgICAgICAgIGJvdW5kczogdGhpcy5ib3VuZHMsXG4gICAgICAgICAgICBkZWJ1ZzogdGhpcy5kZWJ1ZyxcbiAgICAgICAgICAgIHNjcm9sbGluZ0NvbnRhaW5lcjogdGhpcy5zY3JvbGxpbmdDb250YWluZXJcbiAgICAgICAgfSk7XG5cbiAgICAgICAgaWYgKHRoaXMudmFsdWUpIHtcbiAgICAgICAgICAgIHRoaXMucXVpbGwuc2V0Q29udGVudHModGhpcy5xdWlsbC5jbGlwYm9hcmQuY29udmVydCh0aGlzLnZhbHVlKSk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnF1aWxsLm9uKCd0ZXh0LWNoYW5nZScsIChkZWx0YSwgb2xkQ29udGVudHMsIHNvdXJjZSkgPT4ge1xuICAgICAgICAgICAgaWYgKHNvdXJjZSA9PT0gJ3VzZXInKSB7XG4gICAgICAgICAgICAgICAgbGV0IGh0bWwgPSBEb21IYW5kbGVyLmZpbmRTaW5nbGUoZWRpdG9yRWxlbWVudCwgJy5xbC1lZGl0b3InKS5pbm5lckhUTUw7XG4gICAgICAgICAgICAgICAgbGV0IHRleHQgPSB0aGlzLnF1aWxsLmdldFRleHQoKS50cmltKCk7XG4gICAgICAgICAgICAgICAgaWYgKGh0bWwgPT09ICc8cD48YnI+PC9wPicpIHtcbiAgICAgICAgICAgICAgICAgICAgaHRtbCA9IG51bGw7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy5vblRleHRDaGFuZ2UuZW1pdCh7XG4gICAgICAgICAgICAgICAgICAgIGh0bWxWYWx1ZTogaHRtbCxcbiAgICAgICAgICAgICAgICAgICAgdGV4dFZhbHVlOiB0ZXh0LFxuICAgICAgICAgICAgICAgICAgICBkZWx0YTogZGVsdGEsXG4gICAgICAgICAgICAgICAgICAgIHNvdXJjZTogc291cmNlXG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICB0aGlzLm9uTW9kZWxDaGFuZ2UoaHRtbCk7XG4gICAgICAgICAgICAgICAgdGhpcy5vbk1vZGVsVG91Y2hlZCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICB0aGlzLnF1aWxsLm9uKCdzZWxlY3Rpb24tY2hhbmdlJywgKHJhbmdlLCBvbGRSYW5nZSwgc291cmNlKSA9PiB7XG4gICAgICAgICAgICB0aGlzLm9uU2VsZWN0aW9uQ2hhbmdlLmVtaXQoe1xuICAgICAgICAgICAgICAgIHJhbmdlOiByYW5nZSxcbiAgICAgICAgICAgICAgICBvbGRSYW5nZTogb2xkUmFuZ2UsXG4gICAgICAgICAgICAgICAgc291cmNlOiBzb3VyY2VcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcblxuICAgICAgICB0aGlzLm9uSW5pdC5lbWl0KHtcbiAgICAgICAgICAgIGVkaXRvcjogdGhpcy5xdWlsbFxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBuZ0FmdGVyQ29udGVudEluaXQoKSB7XG4gICAgICAgIHRoaXMudGVtcGxhdGVzLmZvckVhY2goKGl0ZW0pID0+IHtcbiAgICAgICAgICAgIHN3aXRjaChpdGVtLmdldFR5cGUoKSkge1xuICAgICAgICAgICAgICAgIGNhc2UgJ2hlYWRlcic6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaGVhZGVyVGVtcGxhdGUgPSBpdGVtLnRlbXBsYXRlO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICB3cml0ZVZhbHVlKHZhbHVlOiBhbnkpIDogdm9pZCB7XG4gICAgICAgIHRoaXMudmFsdWUgPSB2YWx1ZTtcblxuICAgICAgICBpZiAodGhpcy5xdWlsbCkge1xuICAgICAgICAgICAgaWYgKHZhbHVlKVxuICAgICAgICAgICAgICAgIHRoaXMucXVpbGwuc2V0Q29udGVudHModGhpcy5xdWlsbC5jbGlwYm9hcmQuY29udmVydCh2YWx1ZSkpO1xuICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgIHRoaXMucXVpbGwuc2V0VGV4dCgnJyk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZWdpc3Rlck9uQ2hhbmdlKGZuOiBGdW5jdGlvbik6IHZvaWQge1xuICAgICAgICB0aGlzLm9uTW9kZWxDaGFuZ2UgPSBmbjtcbiAgICB9XG5cbiAgICByZWdpc3Rlck9uVG91Y2hlZChmbjogRnVuY3Rpb24pOiB2b2lkIHtcbiAgICAgICAgdGhpcy5vbk1vZGVsVG91Y2hlZCA9IGZuO1xuICAgIH1cblxuICAgIGdldFF1aWxsKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5xdWlsbDtcbiAgICB9XG5cbiAgICBASW5wdXQoKSBnZXQgcmVhZG9ubHkoKTogYm9vbGVhbiB7XG4gICAgICAgIHJldHVybiB0aGlzLl9yZWFkb25seTtcbiAgICB9XG5cbiAgICBzZXQgcmVhZG9ubHkodmFsOmJvb2xlYW4pIHtcbiAgICAgICAgdGhpcy5fcmVhZG9ubHkgPSB2YWw7XG5cbiAgICAgICAgaWYgKHRoaXMucXVpbGwpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLl9yZWFkb25seSlcbiAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLmRpc2FibGUoKTtcbiAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICB0aGlzLnF1aWxsLmVuYWJsZSgpO1xuICAgICAgICB9XG4gICAgfVxufVxuXG5ATmdNb2R1bGUoe1xuICAgIGltcG9ydHM6IFtDb21tb25Nb2R1bGVdLFxuICAgIGV4cG9ydHM6IFtFZGl0b3IsU2hhcmVkTW9kdWxlXSxcbiAgICBkZWNsYXJhdGlvbnM6IFtFZGl0b3JdXG59KVxuZXhwb3J0IGNsYXNzIEVkaXRvck1vZHVsZSB7IH1cbiJdfQ==
Note: See TracBrowser for help on using the repository browser.