@asoftwareworld/form-builder-pro
Version:
ASW Form Builder Pro helps you with rapid development and designed web forms which includes several controls. The key feature of Form Builder is to make your content attractive and effective. We can customize our control at run time and preview the same b
427 lines • 87 kB
JavaScript
import { DOCUMENT } from '@angular/common';
import { Component, EventEmitter, Inject, Input, Output, ViewChild } from '@angular/core';
import { Constants, Icons } from '@asoftwareworld/form-builder-pro/common';
import { AswEditorDialog } from '../editor-dialog/editor-dialog';
import * as i0 from "@angular/core";
import * as i1 from "./../editor.service";
import * as i2 from "@angular/material/dialog";
import * as i3 from "@angular/common";
import * as i4 from "@angular/forms";
import * as i5 from "@angular/material/tooltip";
import * as i6 from "@asoftwareworld/form-builder-pro/color-picker";
import * as i7 from "../editor-select/editor-select";
import * as i8 from "@asoftwareworld/form-builder-pro/common";
export class AswEditorToolbar {
renderer;
aswEditorService;
doc;
dialog;
elementDOM;
htmlMode = false;
linkSelected = false;
block = 'default';
fontSize = '3';
foreColour;
backColor;
icons = Icons;
colorsName = [];
constant = Constants;
textColor = '#000105';
backgroundColor = '#ffffff';
selectedColor;
show = false;
headings = [
{
label: 'Heading 1',
value: 'h1'
},
{
label: 'Heading 2',
value: 'h2'
},
{
label: 'Heading 3',
value: 'h3'
},
{
label: 'Heading 4',
value: 'h4'
},
{
label: 'Heading 5',
value: 'h5'
},
{
label: 'Heading 6',
value: 'h6'
},
{
label: 'Heading 7',
value: 'h7'
},
{
label: 'Paragraph',
value: 'p'
},
{
label: 'Predefined',
value: 'pre'
},
{
label: 'Standard',
value: 'div'
},
{
label: 'default',
value: 'default'
}
];
fontSizes = [
{
label: '1',
value: '1'
},
{
label: '2',
value: '2'
},
{
label: '3',
value: '3'
},
{
label: '4',
value: '4'
},
{
label: '5',
value: '5'
},
{
label: '6',
value: '6'
},
{
label: '7',
value: '7'
}
];
customClassId = '-1';
customClasses$ = [];
customClassList = [{ label: '', value: '' }];
// uploadUrl: string;
tagMap = {
BLOCKQUOTE: 'indent',
A: 'link'
};
select = ['H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'P', 'PRE', 'DIV'];
buttons = ['bold', 'italic', 'underline', 'strikeThrough', 'subscript', 'superscript', 'justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull', 'indent', 'outdent', 'insertUnorderedList', 'insertOrderedList', 'link'];
id;
uploadUrl;
upload;
showToolbar;
fonts = [{ label: '', value: '' }];
set customClasses(classes) {
if (classes) {
this.customClasses$ = classes;
this.customClassList = this.customClasses$.map((x, i) => ({ label: x.name, value: i.toString() }));
this.customClassList.unshift({ label: 'Clear Class', value: '-1' });
}
}
set defaultFontSize(value) {
if (value) {
this.fontSize = value;
}
}
hiddenButtons;
execute = new EventEmitter();
myInputFile;
get isLinkButtonDisabled() {
return this.htmlMode || !Boolean(this.aswEditorService.selectedText);
}
constructor(renderer, aswEditorService, doc, dialog, elementDOM) {
this.renderer = renderer;
this.aswEditorService = aswEditorService;
this.doc = doc;
this.dialog = dialog;
this.elementDOM = elementDOM;
}
ngOnInit() {
this.colorsName = Object.keys(this.constant.colors);
}
/**
* Trigger command from editor header buttons
* @param command string from toolbar buttons
*/
triggerCommand(command) {
this.execute.emit(command);
}
/**
* highlight editor buttons when cursor moved or positioning
*/
triggerButtons() {
if (!this.showToolbar) {
return;
}
this.buttons.forEach((e) => {
const result = this.doc.queryCommandState(e);
const elementById = this.getChildById(e + '-' + this.id);
if (result) {
this.renderer.addClass(elementById, 'active');
}
else {
this.renderer.removeClass(elementById, 'active');
}
});
}
getChildById(id) {
return this.elementDOM.nativeElement.querySelector(`#${id}`);
}
/**
* trigger highlight editor buttons when cursor moved or positioning in block
*/
triggerBlocks(nodes) {
if (!this.showToolbar) {
return;
}
this.linkSelected = nodes.findIndex((x) => x.nodeName === 'A') > -1;
let found = false;
this.select.forEach((y) => {
const node = nodes.find((x) => x.nodeName === y);
if (node !== undefined && y === node.nodeName) {
if (found === false) {
this.block = node.nodeName.toLowerCase();
found = true;
}
}
else if (found === false) {
this.block = 'default';
}
});
found = false;
if (this.customClasses$) {
this.customClasses$.forEach((y, index) => {
const node = nodes.find((x) => {
if (x instanceof Element) {
return x.className === y.class;
}
});
if (node !== undefined) {
if (found === false) {
this.customClassId = index.toString();
found = true;
}
}
else if (found === false) {
this.customClassId = '-1';
}
});
}
Object.keys(this.tagMap).map((e) => {
const elementById = this.getChildById(this.tagMap[e] + '-' + this.id);
const node = nodes.find((x) => x.nodeName === e);
if (node !== undefined && e === node.nodeName) {
this.renderer.addClass(elementById, 'active');
}
else {
this.renderer.removeClass(elementById, 'active');
}
});
this.foreColour = this.doc.queryCommandValue('ForeColor');
this.fontSize = this.doc.queryCommandValue('FontSize');
// this.fontName = this.doc.queryCommandValue('FontName').replace(/"/g, '');
this.backColor = this.doc.queryCommandValue('backColor');
}
/**
* insert URL link
*/
insertUrl() {
let url = 'https://';
const selection = this.aswEditorService.savedSelection;
if (selection && selection.commonAncestorContainer.parentElement?.nodeName === 'A') {
const parent = selection.commonAncestorContainer.parentElement;
if (parent.href !== '') {
url = parent.href;
}
}
// const dialogRef = this.dialog.open(AswEditorDialog, {
// width: '450px',
// data: { linkTo: url }
// });
// dialogRef.afterClosed().subscribe((result) => {
// if (result !== undefined) {
// url = result;
// this.aswEditorService.createLink(url);
// }
// });
url = prompt('Insert URL link', url);
if (url && url !== '' && url !== 'https://') {
this.aswEditorService.createLink(url);
}
}
/**
* insert Video link
*/
insertVideo() {
this.execute.emit('');
const dialogRef = this.dialog.open(AswEditorDialog, {
width: '450px',
data: { linkTo: `https://` }
});
dialogRef.afterClosed().subscribe((result) => {
if (result !== undefined) {
const url = result;
if (url && url !== '' && url !== `https://`) {
this.aswEditorService.insertVideo(url);
}
}
});
}
/** insert color */
insertColor(color, where) {
if (where === 'textColor') {
this.textColor = color;
}
else {
this.backgroundColor = color;
}
this.aswEditorService.insertColor(color, where);
this.execute.emit('');
this.show = false;
}
/**
* Change status of visibility to color picker
*/
toggleColors(where) {
this.show = !this.show;
this.selectedColor = where;
}
/**
* Change color from input
*/
setColor(data) {
this.insertColor(data.colorCode, data.where);
}
/**
* set font Name/family
* @param foreColor string
*/
setFontName(foreColor) {
this.aswEditorService.setFontName(foreColor);
this.execute.emit('');
}
/**
* set font Size
* @param fontSize string
*/
setFontSize(fontSize) {
this.aswEditorService.setFontSize(fontSize);
this.execute.emit('');
}
/**
* toggle editor mode (WYSIWYG or SOURCE)
* @param m boolean
*/
setEditorMode(m) {
const toggleEditorModeButton = this.getChildById('toggleEditorMode' + '-' + this.id);
if (m) {
this.renderer.addClass(toggleEditorModeButton, 'active');
}
else {
this.renderer.removeClass(toggleEditorModeButton, 'active');
}
this.htmlMode = m;
}
/**
* Upload image when file is selected.
*/
onFileChanged(event) {
const file = event.target.files[0];
if (file.type.includes('image/')) {
if (this.upload) {
this.upload(file).subscribe((response) => this.watchUploadImage(response, event));
}
else if (this.uploadUrl) {
this.aswEditorService.uploadImage(file).subscribe((response) => this.watchUploadImage(response, event));
}
else {
const reader = new FileReader();
reader.onload = (e) => {
const fr = e.currentTarget;
if (fr.result) {
this.aswEditorService.insertImage(fr.result.toString());
}
};
reader.readAsDataURL(file);
}
}
}
watchUploadImage(response, event) {
const { imageUrl } = response.body;
this.aswEditorService.insertImage(imageUrl);
event.srcElement.value = null;
}
/**
* Set custom class
*/
setCustomClass(classId) {
if (classId === '-1') {
this.execute.emit('clear');
}
else {
this.aswEditorService.createCustomClass(this.customClasses$[+classId]);
}
}
isButtonHidden(name) {
if (!name) {
return false;
}
if (!(this.hiddenButtons instanceof Array)) {
return false;
}
let result;
for (const arr of this.hiddenButtons) {
if (arr instanceof Array) {
result = arr.find((item) => item === name);
}
if (result) {
break;
}
}
return result !== undefined;
}
focus() {
this.execute.emit('focus');
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AswEditorToolbar, deps: [{ token: i0.Renderer2 }, { token: i1.AswEditorService }, { token: DOCUMENT }, { token: i2.MatDialog }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: AswEditorToolbar, selector: "asw-editor-toolbar", inputs: { id: "id", uploadUrl: "uploadUrl", upload: "upload", showToolbar: "showToolbar", fonts: "fonts", customClasses: "customClasses", defaultFontSize: "defaultFontSize", hiddenButtons: "hiddenButtons" }, outputs: { execute: "execute" }, viewQueries: [{ propertyName: "myInputFile", first: true, predicate: ["fileInput"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"asw-editor-toolbar\" *ngIf=\"showToolbar\">\r\n <div class=\"asw-editor-toolbar-set\">\r\n <button type=\"button\" matTooltip=\"Undo (Ctrl+Z)\" class=\"asw-editor-button\" (click)=\"triggerCommand('undo')\"\r\n [hidden]=\"isButtonHidden('undo')\" tabindex=\"-1\">\r\n <div [innerHTML]=\"icons.undo | aswSafeHtml\"></div>\r\n </button>\r\n <button type=\"button\" matTooltip=\"Redo (Ctrl+Y)\" class=\"asw-editor-button\" (click)=\"triggerCommand('redo')\"\r\n [hidden]=\"isButtonHidden('redo')\" tabindex=\"-1\">\r\n <div [innerHTML]=\"icons.redo | aswSafeHtml\"></div>\r\n </button>\r\n </div>\r\n <div class=\"asw-editor-toolbar-set\">\r\n <button [id]=\"'bold-'+id\" type=\"button\" matTooltip=\"Bold (Ctrl+B)\" class=\"asw-editor-button\" (click)=\"triggerCommand('bold')\"\r\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('bold')\" tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.bold | aswSafeHtml\"></div>\r\n </button>\r\n <button [id]=\"'italic-'+id\" type=\"button\" matTooltip=\"Italic (Ctrl+I)\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('italic')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('italic')\"\r\n tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.italic | aswSafeHtml\"></div>\r\n </button>\r\n <button [id]=\"'underline-'+id\" type=\"button\" matTooltip=\"Underline (Ctrl+U)\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('underline')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('underline')\"\r\n tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.underline | aswSafeHtml\"></div>\r\n </button>\r\n <button [id]=\"'strikeThrough-'+id\" type=\"button\" matTooltip=\"Strikethrough\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('strikeThrough')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('strikeThrough')\"\r\n tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.strikeThrough | aswSafeHtml\"></div>\r\n </button>\r\n <!-- <button [id]=\"'subscript-'+id\" type=\"button\" matTooltip=\"Subscript\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('subscript')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('subscript')\"\r\n tabindex=\"-1\">\r\n <mat-icon [ngClass]=\"{'asw-icon-disabled': htmlMode }\">subscript</mat-icon>\r\n </button>\r\n <button [id]=\"'superscript-'+id\" type=\"button\" matTooltip=\"Superscript\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('superscript')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('superscript')\"\r\n tabindex=\"-1\">\r\n <mat-icon [ngClass]=\"{'asw-icon-disabled': htmlMode }\">superscript</mat-icon>\r\n </button> -->\r\n </div>\r\n <div class=\"asw-editor-toolbar-set\">\r\n <button [id]=\"'foregroundColorPicker-'+id\" type=\"button\" class=\"asw-editor-button\"\r\n (click)=\"toggleColors('textColor')\" matTooltip=\"Text color\" [disabled]=\"htmlMode\"\r\n [hidden]=\"isButtonHidden('textColor')\" tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.formatColorText | aswSafeHtml\"></div>\r\n </button>\r\n <ng-container *ngIf=\"show\">\r\n <asw-color-picker [textColor]=\"textColor\"\r\n [isEditor]=\"true\"\r\n [backgroundColor]=\"backgroundColor\"\r\n (colorChange)=\"setColor($event)\"></asw-color-picker>\r\n </ng-container>\r\n </div>\r\n <div class=\"asw-editor-toolbar-set\">\r\n <button [id]=\"'alignLeft-'+id\" type=\"button\" matTooltip=\"Align left\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('justifyLeft')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('justifyLeft')\"\r\n tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.justifyLeft | aswSafeHtml\"></div>\r\n </button>\r\n <button [id]=\"'alignCenter-'+id\" type=\"button\" matTooltip=\"Align center\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('justifyCenter')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('justifyCenter')\"\r\n tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.justifyCenter | aswSafeHtml\"></div>\r\n </button>\r\n <button [id]=\"'alignRight-'+id\" type=\"button\" matTooltip=\"Align right\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('justifyRight')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('justifyRight')\"\r\n tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.justifyRight | aswSafeHtml\"></div>\r\n </button>\r\n <button [id]=\"'justifyFull-'+id\" type=\"button\" matTooltip=\"Justify Full\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('justifyFull')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('justifyFull')\"\r\n tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.justifyFull | aswSafeHtml\"></div>\r\n </button>\r\n </div>\r\n <div class=\"asw-editor-toolbar-set\">\r\n <button [id]=\"'indent-'+id\" type=\"button\" matTooltip=\"Indent\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('indent')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('indent')\"\r\n tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.indent | aswSafeHtml\"></div>\r\n </button>\r\n <button [id]=\"'outdent-'+id\" type=\"button\" matTooltip=\"Outdent\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('outdent')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('outdent')\"\r\n tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.outdent | aswSafeHtml\"></div>\r\n </button>\r\n </div>\r\n <div class=\"asw-editor-toolbar-set\">\r\n <button [id]=\"'insertUnorderedList-'+id\" type=\"button\" matTooltip=\"Unordered List\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('insertUnorderedList')\" [disabled]=\"htmlMode\"\r\n [hidden]=\"isButtonHidden('insertUnorderedList')\" tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.formatListBulleted | aswSafeHtml\"></div>\r\n </button>\r\n <button [id]=\"'insertOrderedList-'+id\" type=\"button\" matTooltip=\"Ordered List\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('insertOrderedList')\" [disabled]=\"htmlMode\"\r\n [hidden]=\"isButtonHidden('insertOrderedList')\" tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.formatListNumbered | aswSafeHtml\"></div>\r\n </button>\r\n </div>\r\n <div class=\"asw-editor-toolbar-set\">\r\n <asw-editor-select class=\"select-heading\" [options]=\"headings\" [(ngModel)]=\"block\"\r\n (change)=\"triggerCommand(block)\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('heading')\" tabindex=\"-1\">\r\n </asw-editor-select>\r\n </div>\r\n <!-- <div class=\"asw-editor-toolbar-set\">\r\n <asw-editor-select class=\"select-font\" [options]=\"fonts\" [(ngModel)]=\"fontName\" (change)=\"setFontName(fontName)\"\r\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('fontName')\" tabindex=\"-1\"></asw-editor-select>\r\n </div> -->\r\n <div class=\"asw-editor-toolbar-set\">\r\n <asw-editor-select class=\"select-font-size\" [options]=\"fontSizes\" [(ngModel)]=\"fontSize\"\r\n (change)=\"setFontSize(fontSize)\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('fontSize')\" tabindex=\"-1\">\r\n </asw-editor-select>\r\n </div>\r\n \r\n <div *ngIf=\"customClasses$\" class=\"asw-editor-toolbar-set\">\r\n <asw-editor-select class=\"select-custom-style\" [options]=\"customClassList\" [(ngModel)]=\"customClassId\"\r\n (change)=\"setCustomClass(customClassId)\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('customClasses')\"\r\n tabindex=\"-1\"></asw-editor-select>\r\n </div>\r\n <div class=\"asw-editor-toolbar-set\">\r\n <button [id]=\"'link-'+id\" type=\"button\" class=\"asw-editor-button\" (click)=\"insertUrl()\" matTooltip=\"Insert Link\"\r\n [disabled]=\"isLinkButtonDisabled\" [hidden]=\"isButtonHidden('link')\" tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.link | aswSafeHtml\"></div>\r\n </button>\r\n <button [id]=\"'unlink-'+id\" type=\"button\" class=\"asw-editor-button\" (click)=\"triggerCommand('unlink')\"\r\n matTooltip=\"Unlink\" [disabled]=\"htmlMode || !linkSelected\" [hidden]=\"isButtonHidden('unlink')\" tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.unlink | aswSafeHtml\"></div>\r\n </button>\r\n <!-- ToDO: need to improve for image and video upload -->\r\n <!-- <input style=\"display: none\" accept=\"image/*\" type=\"file\" (change)=\"onFileChanged($event)\" #fileInput>\r\n <button [id]=\"'insertImage-'+id\" type=\"button\" class=\"asw-editor-button\" (click)=\"focus(); fileInput.click()\"\r\n matTooltip=\"Insert Image\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('insertImage')\" tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.image | aswSafeHtml\"></div>\r\n </button>\r\n <button [id]=\"'insertVideo-'+id\" type=\"button\" class=\"asw-editor-button\" (click)=\"insertVideo()\"\r\n matTooltip=\"Insert Video\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('insertVideo')\" tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.videoCam | aswSafeHtml\"></div>\r\n </button> -->\r\n <button [id]=\"'insertHorizontalRule-'+id\" type=\"button\" matTooltip=\"Horizontal Line\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('insertHorizontalRule')\" [disabled]=\"htmlMode\"\r\n [hidden]=\"isButtonHidden('insertHorizontalRule')\" tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.remove | aswSafeHtml\"></div>\r\n </button>\r\n </div>\r\n <div class=\"asw-editor-toolbar-set\">\r\n <button [id]=\"'clearFormatting-'+id\" type=\"button\" matTooltip=\"Remove formatting\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('removeFormat')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('removeFormat')\"\r\n tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.formatClear | aswSafeHtml\"></div>\r\n </button>\r\n </div>\r\n <div class=\"asw-editor-toolbar-set\">\r\n <button [id]=\"'toggleEditorMode-'+id\" type=\"button\" matTooltip=\"HTML Code\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('toggleEditorMode')\" [hidden]=\"isButtonHidden('toggleEditorMode')\" tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.code | aswSafeHtml\"></div>\r\n </button>\r\n </div>\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i6.AswColorPicker, selector: "asw-color-picker", inputs: ["isEditor", "textColor", "backgroundColor"], outputs: ["colorChange"] }, { kind: "component", type: i7.AswEditorSelect, selector: "asw-editor-select", inputs: ["options", "hidden"], outputs: ["change"] }, { kind: "pipe", type: i8.AswSafeHtmlPipe, name: "aswSafeHtml" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AswEditorToolbar, decorators: [{
type: Component,
args: [{ selector: 'asw-editor-toolbar', template: "<div class=\"asw-editor-toolbar\" *ngIf=\"showToolbar\">\r\n <div class=\"asw-editor-toolbar-set\">\r\n <button type=\"button\" matTooltip=\"Undo (Ctrl+Z)\" class=\"asw-editor-button\" (click)=\"triggerCommand('undo')\"\r\n [hidden]=\"isButtonHidden('undo')\" tabindex=\"-1\">\r\n <div [innerHTML]=\"icons.undo | aswSafeHtml\"></div>\r\n </button>\r\n <button type=\"button\" matTooltip=\"Redo (Ctrl+Y)\" class=\"asw-editor-button\" (click)=\"triggerCommand('redo')\"\r\n [hidden]=\"isButtonHidden('redo')\" tabindex=\"-1\">\r\n <div [innerHTML]=\"icons.redo | aswSafeHtml\"></div>\r\n </button>\r\n </div>\r\n <div class=\"asw-editor-toolbar-set\">\r\n <button [id]=\"'bold-'+id\" type=\"button\" matTooltip=\"Bold (Ctrl+B)\" class=\"asw-editor-button\" (click)=\"triggerCommand('bold')\"\r\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('bold')\" tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.bold | aswSafeHtml\"></div>\r\n </button>\r\n <button [id]=\"'italic-'+id\" type=\"button\" matTooltip=\"Italic (Ctrl+I)\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('italic')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('italic')\"\r\n tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.italic | aswSafeHtml\"></div>\r\n </button>\r\n <button [id]=\"'underline-'+id\" type=\"button\" matTooltip=\"Underline (Ctrl+U)\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('underline')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('underline')\"\r\n tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.underline | aswSafeHtml\"></div>\r\n </button>\r\n <button [id]=\"'strikeThrough-'+id\" type=\"button\" matTooltip=\"Strikethrough\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('strikeThrough')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('strikeThrough')\"\r\n tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.strikeThrough | aswSafeHtml\"></div>\r\n </button>\r\n <!-- <button [id]=\"'subscript-'+id\" type=\"button\" matTooltip=\"Subscript\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('subscript')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('subscript')\"\r\n tabindex=\"-1\">\r\n <mat-icon [ngClass]=\"{'asw-icon-disabled': htmlMode }\">subscript</mat-icon>\r\n </button>\r\n <button [id]=\"'superscript-'+id\" type=\"button\" matTooltip=\"Superscript\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('superscript')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('superscript')\"\r\n tabindex=\"-1\">\r\n <mat-icon [ngClass]=\"{'asw-icon-disabled': htmlMode }\">superscript</mat-icon>\r\n </button> -->\r\n </div>\r\n <div class=\"asw-editor-toolbar-set\">\r\n <button [id]=\"'foregroundColorPicker-'+id\" type=\"button\" class=\"asw-editor-button\"\r\n (click)=\"toggleColors('textColor')\" matTooltip=\"Text color\" [disabled]=\"htmlMode\"\r\n [hidden]=\"isButtonHidden('textColor')\" tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.formatColorText | aswSafeHtml\"></div>\r\n </button>\r\n <ng-container *ngIf=\"show\">\r\n <asw-color-picker [textColor]=\"textColor\"\r\n [isEditor]=\"true\"\r\n [backgroundColor]=\"backgroundColor\"\r\n (colorChange)=\"setColor($event)\"></asw-color-picker>\r\n </ng-container>\r\n </div>\r\n <div class=\"asw-editor-toolbar-set\">\r\n <button [id]=\"'alignLeft-'+id\" type=\"button\" matTooltip=\"Align left\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('justifyLeft')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('justifyLeft')\"\r\n tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.justifyLeft | aswSafeHtml\"></div>\r\n </button>\r\n <button [id]=\"'alignCenter-'+id\" type=\"button\" matTooltip=\"Align center\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('justifyCenter')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('justifyCenter')\"\r\n tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.justifyCenter | aswSafeHtml\"></div>\r\n </button>\r\n <button [id]=\"'alignRight-'+id\" type=\"button\" matTooltip=\"Align right\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('justifyRight')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('justifyRight')\"\r\n tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.justifyRight | aswSafeHtml\"></div>\r\n </button>\r\n <button [id]=\"'justifyFull-'+id\" type=\"button\" matTooltip=\"Justify Full\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('justifyFull')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('justifyFull')\"\r\n tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.justifyFull | aswSafeHtml\"></div>\r\n </button>\r\n </div>\r\n <div class=\"asw-editor-toolbar-set\">\r\n <button [id]=\"'indent-'+id\" type=\"button\" matTooltip=\"Indent\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('indent')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('indent')\"\r\n tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.indent | aswSafeHtml\"></div>\r\n </button>\r\n <button [id]=\"'outdent-'+id\" type=\"button\" matTooltip=\"Outdent\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('outdent')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('outdent')\"\r\n tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.outdent | aswSafeHtml\"></div>\r\n </button>\r\n </div>\r\n <div class=\"asw-editor-toolbar-set\">\r\n <button [id]=\"'insertUnorderedList-'+id\" type=\"button\" matTooltip=\"Unordered List\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('insertUnorderedList')\" [disabled]=\"htmlMode\"\r\n [hidden]=\"isButtonHidden('insertUnorderedList')\" tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.formatListBulleted | aswSafeHtml\"></div>\r\n </button>\r\n <button [id]=\"'insertOrderedList-'+id\" type=\"button\" matTooltip=\"Ordered List\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('insertOrderedList')\" [disabled]=\"htmlMode\"\r\n [hidden]=\"isButtonHidden('insertOrderedList')\" tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.formatListNumbered | aswSafeHtml\"></div>\r\n </button>\r\n </div>\r\n <div class=\"asw-editor-toolbar-set\">\r\n <asw-editor-select class=\"select-heading\" [options]=\"headings\" [(ngModel)]=\"block\"\r\n (change)=\"triggerCommand(block)\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('heading')\" tabindex=\"-1\">\r\n </asw-editor-select>\r\n </div>\r\n <!-- <div class=\"asw-editor-toolbar-set\">\r\n <asw-editor-select class=\"select-font\" [options]=\"fonts\" [(ngModel)]=\"fontName\" (change)=\"setFontName(fontName)\"\r\n [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('fontName')\" tabindex=\"-1\"></asw-editor-select>\r\n </div> -->\r\n <div class=\"asw-editor-toolbar-set\">\r\n <asw-editor-select class=\"select-font-size\" [options]=\"fontSizes\" [(ngModel)]=\"fontSize\"\r\n (change)=\"setFontSize(fontSize)\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('fontSize')\" tabindex=\"-1\">\r\n </asw-editor-select>\r\n </div>\r\n \r\n <div *ngIf=\"customClasses$\" class=\"asw-editor-toolbar-set\">\r\n <asw-editor-select class=\"select-custom-style\" [options]=\"customClassList\" [(ngModel)]=\"customClassId\"\r\n (change)=\"setCustomClass(customClassId)\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('customClasses')\"\r\n tabindex=\"-1\"></asw-editor-select>\r\n </div>\r\n <div class=\"asw-editor-toolbar-set\">\r\n <button [id]=\"'link-'+id\" type=\"button\" class=\"asw-editor-button\" (click)=\"insertUrl()\" matTooltip=\"Insert Link\"\r\n [disabled]=\"isLinkButtonDisabled\" [hidden]=\"isButtonHidden('link')\" tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.link | aswSafeHtml\"></div>\r\n </button>\r\n <button [id]=\"'unlink-'+id\" type=\"button\" class=\"asw-editor-button\" (click)=\"triggerCommand('unlink')\"\r\n matTooltip=\"Unlink\" [disabled]=\"htmlMode || !linkSelected\" [hidden]=\"isButtonHidden('unlink')\" tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.unlink | aswSafeHtml\"></div>\r\n </button>\r\n <!-- ToDO: need to improve for image and video upload -->\r\n <!-- <input style=\"display: none\" accept=\"image/*\" type=\"file\" (change)=\"onFileChanged($event)\" #fileInput>\r\n <button [id]=\"'insertImage-'+id\" type=\"button\" class=\"asw-editor-button\" (click)=\"focus(); fileInput.click()\"\r\n matTooltip=\"Insert Image\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('insertImage')\" tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.image | aswSafeHtml\"></div>\r\n </button>\r\n <button [id]=\"'insertVideo-'+id\" type=\"button\" class=\"asw-editor-button\" (click)=\"insertVideo()\"\r\n matTooltip=\"Insert Video\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('insertVideo')\" tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.videoCam | aswSafeHtml\"></div>\r\n </button> -->\r\n <button [id]=\"'insertHorizontalRule-'+id\" type=\"button\" matTooltip=\"Horizontal Line\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('insertHorizontalRule')\" [disabled]=\"htmlMode\"\r\n [hidden]=\"isButtonHidden('insertHorizontalRule')\" tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.remove | aswSafeHtml\"></div>\r\n </button>\r\n </div>\r\n <div class=\"asw-editor-toolbar-set\">\r\n <button [id]=\"'clearFormatting-'+id\" type=\"button\" matTooltip=\"Remove formatting\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('removeFormat')\" [disabled]=\"htmlMode\" [hidden]=\"isButtonHidden('removeFormat')\"\r\n tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.formatClear | aswSafeHtml\"></div>\r\n </button>\r\n </div>\r\n <div class=\"asw-editor-toolbar-set\">\r\n <button [id]=\"'toggleEditorMode-'+id\" type=\"button\" matTooltip=\"HTML Code\" class=\"asw-editor-button\"\r\n (click)=\"triggerCommand('toggleEditorMode')\" [hidden]=\"isButtonHidden('toggleEditorMode')\" tabindex=\"-1\">\r\n <div [ngClass]=\"{'asw-icon-disabled': htmlMode }\" [innerHTML]=\"icons.code | aswSafeHtml\"></div>\r\n </button>\r\n </div>\r\n <ng-content></ng-content>\r\n</div>\r\n" }]
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i1.AswEditorService }, { type: undefined, decorators: [{
type: Inject,
args: [DOCUMENT]
}] }, { type: i2.MatDialog }, { type: i0.ElementRef }], propDecorators: { id: [{
type: Input
}], uploadUrl: [{
type: Input
}], upload: [{
type: Input
}], showToolbar: [{
type: Input
}], fonts: [{
type: Input
}], customClasses: [{
type: Input
}], defaultFontSize: [{
type: Input
}], hiddenButtons: [{
type: Input
}], execute: [{
type: Output
}],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