@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
97 lines • 68.6 kB
JavaScript
/**
* @license
* Copyright ASW (A Software World) All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file
*/
import { Component, Inject } from '@angular/core';
import { Validators } from '@angular/forms';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { Constants, Icons } from '@asoftwareworld/form-builder-pro/common';
import { ObjectUtils } from '@asoftwareworld/form-builder-pro/utils';
import * as i0 from "@angular/core";
import * as i1 from "@angular/forms";
import * as i2 from "@angular/material/dialog";
import * as i3 from "@angular/common";
import * as i4 from "@angular/material/core";
import * as i5 from "@angular/material/button";
import * as i6 from "@angular/material/button-toggle";
import * as i7 from "@angular/material/input";
import * as i8 from "@angular/material/form-field";
import * as i9 from "@angular/material/select";
import * as i10 from "@angular/material/slide-toggle";
import * as i11 from "@angular/material/tooltip";
import * as i12 from "@asoftwareworld/form-builder-pro/core";
import * as i13 from "@asoftwareworld/form-builder-pro/common";
export class AswImageDialog {
formBuilder;
dialogRef;
data;
constants = Constants;
icons = Icons;
aswImageForm;
objectUtils = ObjectUtils;
status = true;
control;
constructor(formBuilder, dialogRef, data) {
this.formBuilder = formBuilder;
this.dialogRef = dialogRef;
this.data = data;
}
ngOnInit() {
this.control = this.data.control;
this.validateFormBuilder();
this.editProperty(this.control);
}
validateFormBuilder() {
this.aswImageForm = this.formBuilder.group({
label: ['', [Validators.required, Validators.minLength(5)]],
class: [],
imageUrl: [],
imageShape: [],
height: ['', [Validators.max(600), Validators.min(0)]],
width: ['', [Validators.max(600), Validators.min(0)]],
isUploadHide: [true]
});
}
editProperty(control) {
this.aswImageForm.setValue({
label: control.label,
class: control.class,
imageUrl: control.imageUrl,
imageShape: control.imageShape,
width: control.width,
height: control.height,
isUploadHide: control.isUploadHide ?? true
});
}
onNoClick() {
this.dialogRef.close();
}
onSubmit() {
if (this.aswImageForm.invalid) {
return;
}
this.aswImageForm.value.controlType = this.control.controlType;
this.aswImageForm.value.id = this.control.id;
this.aswImageForm.value.guid = this.control.guid;
this.dialogRef.close(this.aswImageForm.value);
}
onChange(event) {
this.status = event.checked ? true : false;
if (event.checked === undefined) {
this.status = event.target.checked ? true : false;
}
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AswImageDialog, deps: [{ token: i1.FormBuilder }, { token: i2.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: AswImageDialog, selector: "asw-image-dialog", ngImport: i0, template: "<div class=\"asw-dialog-header\">\r\n <div class=\"asw-edit-row-dialog\">\r\n <div class=\"asw-dialog-header clearfix\">\r\n <div class=\"asw-dialog-about\">\r\n <h1 mat-dialog-title class=\"asw-m-0\">{{'FormControl.Edit' | aswTranslate}} {{control.label | aswTranslate}}</h1>\r\n </div>\r\n </div>\r\n </div>\r\n <button mat-icon-button (click)=\"onNoClick()\" aria-label=\"Close dialog\" class=\"asw-mt-2 asw-me-2\">\r\n <div [innerHTML]=\"icons.close | aswSafeHtml\"></div>\r\n </button>\r\n</div>\r\n<form [formGroup]=\"aswImageForm\" (ngSubmit)=\"onSubmit()\">\r\n <mat-dialog-content class=\"mat-typography\">\r\n <div class=\"asw-row\">\r\n <ng-container *ngIf=\"data.CSSFramework === 'material'; else bootstrap\">\r\n <div class=\"asw-col-md-12\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n <mat-label>{{'FormControl.Label' | aswTranslate}}</mat-label>\r\n <input matInput type=\"text\"\r\n name=\"label\"\r\n placeholder=\"{{'FormControl.Label' | aswTranslate}}\"\r\n matTooltip=\"{{'FormControl.Label' | aswTranslate}}\"\r\n formControlName=\"label\" required>\r\n <mat-error *ngFor=\"let validation of constants.accountValidationMessages.label\">\r\n <ng-container *ngIf=\"aswImageForm.get('label')?.hasError(validation.type) && (aswImageForm.get('label')?.dirty || aswImageForm.get('label')?.touched)\">\r\n {{validation.message | aswTranslate}}\r\n </ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n <mat-label>{{'FormControl.Imageurl' | aswTranslate}}</mat-label>\r\n <input matInput type=\"text\"\r\n name=\"label\"\r\n placeholder=\"{{'FormControl.Imageurl' | aswTranslate}}\"\r\n matTooltip=\"{{'FormControl.Imageurl' | aswTranslate}}\"\r\n formControlName=\"imageUrl\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n <mat-label>{{'FormControl.Height' | aswTranslate}}</mat-label>\r\n <input matInput type=\"text\"\r\n name=\"label\"\r\n min=\"0\" \r\n max=\"600\"\r\n placeholder=\"{{'FormControl.Height' | aswTranslate}}\"\r\n (keypress)=\"objectUtils.keyPressNumbersWithDecimal($event)\"\r\n matTooltip=\"{{'FormControl.Height' | aswTranslate}}\"\r\n formControlName=\"height\">\r\n <mat-error *ngFor=\"let validation of constants.accountValidationMessages.height\">\r\n <ng-container *ngIf=\"aswImageForm.get('height')?.hasError(validation.type) && (aswImageForm.get('height')?.dirty || aswImageForm.get('height')?.touched)\">\r\n {{validation.message | aswTranslate}}\r\n </ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n <mat-label>{{'FormControl.Width' | aswTranslate}}</mat-label>\r\n <input matInput type=\"text\"\r\n name=\"label\"\r\n min=\"0\" \r\n max=\"600\"\r\n placeholder=\"{{'FormControl.Width' | aswTranslate}}\"\r\n (keypress)=\"objectUtils.keyPressNumbersWithDecimal($event)\"\r\n matTooltip=\"{{'FormControl.Width' | aswTranslate}}\"\r\n formControlName=\"width\">\r\n <mat-error *ngFor=\"let validation of constants.accountValidationMessages.width\">\r\n <ng-container *ngIf=\"aswImageForm.get('width')?.hasError(validation.type) && (aswImageForm.get('width')?.dirty || aswImageForm.get('width')?.touched)\">\r\n {{validation.message | aswTranslate}}\r\n </ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n <mat-label>{{'FormControl.SelectImageShape' | aswTranslate}}</mat-label>\r\n <mat-select formControlName=\"imageShape\" matTooltip=\"{{'FormControl.SelectImageShape' | aswTranslate}}\">\r\n <mat-option value=\"asw-circular-square\">Circle</mat-option>\r\n <mat-option value=\"asw-original\">Square</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <mat-slide-toggle color=\"primary\"\r\n #isUploadHide\r\n formControlName=\"isUploadHide\"\r\n (change)=\"onChange($event)\">\r\n {{(status ? 'FormControl.UploadHide' : 'FormControl.UploadShow') | aswTranslate}}\r\n </mat-slide-toggle>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <div class=\"asw-mb-3\">\r\n {{'FormControl.Style' | aswTranslate}}: \r\n <mat-button-toggle-group formControlName=\"class\" name=\"fontStyle\" aria-label=\"Font Style\">\r\n <mat-button-toggle value=\"asw-text-start\" aria-label=\"Text align left\">\r\n <span [innerHTML]=\"icons.justifyLeft | aswSafeHtml\"></span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"asw-text-center\" aria-label=\"Text align center\">\r\n <span [innerHTML]=\"icons.justifyCenter | aswSafeHtml\"></span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"asw-text-end\" aria-label=\"Text align right\">\r\n <span [innerHTML]=\"icons.justifyRight | aswSafeHtml\"></span>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div> \r\n </div>\r\n </ng-container>\r\n <ng-template #bootstrap>\r\n <div class=\"asw-col-md-12\">\r\n <div class=\"asw-mb-3\">\r\n <label class=\"asw-input-label asw-invalid-label {{(aswImageForm.get('label')?.invalid && (aswImageForm.get('label')?.dirty || aswImageForm.get('label')?.touched)) ? 'asw-red-color' : ''}}\">{{'FormControl.Label' | aswTranslate}}</label>\r\n <input type=\"text\"\r\n name=\"label\"\r\n class=\"asw-input-control\"\r\n [class.asw-is-invalid]=\"(aswImageForm.get('label')?.invalid && (aswImageForm.get('label')?.dirty || aswImageForm.get('label')?.touched))\"\r\n matTooltip=\"{{'FormControl.Label' | aswTranslate}}\"\r\n formControlName=\"label\" required>\r\n <div *ngFor=\"let validation of constants.accountValidationMessages.label\" class=\"invalid-feedback\">\r\n <ng-container *ngIf=\"aswImageForm.get('label')?.hasError(validation.type) && (aswImageForm.get('label')?.dirty || aswImageForm.get('label')?.touched)\">\r\n {{validation.message | aswTranslate}}\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <div class=\"asw-mb-3\">\r\n <label class=\"asw-input-label\">{{'FormControl.Imageurl' | aswTranslate}}</label>\r\n <input type=\"text\"\r\n name=\"label\"\r\n class=\"asw-input-control\"\r\n matTooltip=\"{{'FormControl.Imageurl' | aswTranslate}}\"\r\n formControlName=\"imageUrl\">\r\n </div>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <div class=\"asw-mb-3\">\r\n <label class=\"asw-input-label asw-invalid-label {{(aswImageForm.get('height')?.invalid && (aswImageForm.get('height')?.dirty || aswImageForm.get('height')?.touched)) ? 'asw-red-color' : ''}}\">{{'FormControl.Height' | aswTranslate}}</label>\r\n <input type=\"text\"\r\n name=\"label\"\r\n min=\"0\" \r\n max=\"600\"\r\n class=\"asw-input-control\"\r\n [class.asw-is-invalid]=\"(aswImageForm.get('height')?.invalid && (aswImageForm.get('height')?.dirty || aswImageForm.get('height')?.touched))\"\r\n (keypress)=\"objectUtils.keyPressNumbersWithDecimal($event)\"\r\n matTooltip=\"{{'FormControl.Height' | aswTranslate}}\"\r\n formControlName=\"height\">\r\n <div *ngFor=\"let validation of constants.accountValidationMessages.height\" class=\"invalid-feedback\">\r\n <ng-container *ngIf=\"aswImageForm.get('height')?.hasError(validation.type) && (aswImageForm.get('height')?.dirty || aswImageForm.get('height')?.touched)\">\r\n {{validation.message | aswTranslate}}\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <div class=\"asw-mb-3\">\r\n <label class=\"asw-input-label asw-invalid-label {{(aswImageForm.get('width')?.invalid && (aswImageForm.get('width')?.dirty || aswImageForm.get('width')?.touched)) ? 'asw-red-color' : ''}}\">{{'FormControl.Width' | aswTranslate}}</label>\r\n <input type=\"text\"\r\n name=\"label\"\r\n min=\"0\" \r\n max=\"600\"\r\n class=\"asw-input-control\"\r\n [class.asw-is-invalid]=\"(aswImageForm.get('width')?.invalid && (aswImageForm.get('width')?.dirty || aswImageForm.get('width')?.touched))\"\r\n (keypress)=\"objectUtils.keyPressNumbersWithDecimal($event)\"\r\n matTooltip=\"{{'FormControl.Width' | aswTranslate}}\"\r\n formControlName=\"width\">\r\n <div *ngFor=\"let validation of constants.accountValidationMessages.width\" class=\"invalid-feedback\">\r\n <ng-container *ngIf=\"aswImageForm.get('width')?.hasError(validation.type) && (aswImageForm.get('width')?.dirty || aswImageForm.get('width')?.touched)\">\r\n {{validation.message | aswTranslate}}\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <div class=\"asw-mb-3\">\r\n <label class=\"asw-input-label\">{{'FormControl.SelectImageShape' | aswTranslate}}</label>\r\n <select formControlName=\"imageShape\" class=\"asw-select\" matTooltip=\"{{'FormControl.SelectImageShape' | aswTranslate}}\">\r\n <option value=\"asw-circular-square\">Circle</option>\r\n <option value=\"asw-original\">Square</option>\r\n </select>\r\n </div>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <div class=\"asw-mb-3\">\r\n <div class=\"asw-form-check asw-form-switch\">\r\n <input class=\"asw-form-check-input\" \r\n type=\"checkbox\"\r\n id=\"isUploadHide\" \r\n #isUploadHide\r\n formControlName=\"isUploadHide\"\r\n (change)=\"onChange($event)\">\r\n <label class=\"asw-form-check-label\" for=\"isUploadHide\">\r\n {{(status ? 'FormControl.UploadHide' : 'FormControl.UploadShow') | aswTranslate}}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <div class=\"asw-mb-3\">\r\n {{'FormControl.Style' | aswTranslate}}: \r\n <mat-button-toggle-group formControlName=\"class\" name=\"fontStyle\" aria-label=\"Font Style\">\r\n <mat-button-toggle value=\"asw-text-start\" aria-label=\"Text align left\">\r\n <span [innerHTML]=\"icons.justifyLeft | aswSafeHtml\"></span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"asw-text-center\" aria-label=\"Text align center\">\r\n <span [innerHTML]=\"icons.justifyCenter | aswSafeHtml\"></span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"asw-text-end\" aria-label=\"Text align right\">\r\n <span [innerHTML]=\"icons.justifyRight | aswSafeHtml\"></span>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div> \r\n </div>\r\n </ng-template>\r\n </div>\r\n </mat-dialog-content>\r\n <mat-dialog-actions align=\"end\">\r\n <button type=\"button\"\r\n class=\"asw-button asw-button-danger asw-mb-1 asw-me-2\"\r\n (click)=\"onNoClick()\">\r\n {{'FormControl.No' | aswTranslate}}\r\n </button>\r\n <button type=\"submit\"\r\n class=\"asw-button asw-button-primary asw-mb-1\"\r\n cdkFocusInitial>\r\n {{'FormControl.Yes' | aswTranslate}}\r\n </button>\r\n </mat-dialog-actions>\r\n</form>\r\n\r\n", dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: i6.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i6.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i9.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i10.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "directive", type: i11.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i12.AswTranslatePipe, name: "aswTranslate" }, { kind: "pipe", type: i13.AswSafeHtmlPipe, name: "aswSafeHtml" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AswImageDialog, decorators: [{
type: Component,
args: [{ selector: 'asw-image-dialog', template: "<div class=\"asw-dialog-header\">\r\n <div class=\"asw-edit-row-dialog\">\r\n <div class=\"asw-dialog-header clearfix\">\r\n <div class=\"asw-dialog-about\">\r\n <h1 mat-dialog-title class=\"asw-m-0\">{{'FormControl.Edit' | aswTranslate}} {{control.label | aswTranslate}}</h1>\r\n </div>\r\n </div>\r\n </div>\r\n <button mat-icon-button (click)=\"onNoClick()\" aria-label=\"Close dialog\" class=\"asw-mt-2 asw-me-2\">\r\n <div [innerHTML]=\"icons.close | aswSafeHtml\"></div>\r\n </button>\r\n</div>\r\n<form [formGroup]=\"aswImageForm\" (ngSubmit)=\"onSubmit()\">\r\n <mat-dialog-content class=\"mat-typography\">\r\n <div class=\"asw-row\">\r\n <ng-container *ngIf=\"data.CSSFramework === 'material'; else bootstrap\">\r\n <div class=\"asw-col-md-12\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n <mat-label>{{'FormControl.Label' | aswTranslate}}</mat-label>\r\n <input matInput type=\"text\"\r\n name=\"label\"\r\n placeholder=\"{{'FormControl.Label' | aswTranslate}}\"\r\n matTooltip=\"{{'FormControl.Label' | aswTranslate}}\"\r\n formControlName=\"label\" required>\r\n <mat-error *ngFor=\"let validation of constants.accountValidationMessages.label\">\r\n <ng-container *ngIf=\"aswImageForm.get('label')?.hasError(validation.type) && (aswImageForm.get('label')?.dirty || aswImageForm.get('label')?.touched)\">\r\n {{validation.message | aswTranslate}}\r\n </ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n <mat-label>{{'FormControl.Imageurl' | aswTranslate}}</mat-label>\r\n <input matInput type=\"text\"\r\n name=\"label\"\r\n placeholder=\"{{'FormControl.Imageurl' | aswTranslate}}\"\r\n matTooltip=\"{{'FormControl.Imageurl' | aswTranslate}}\"\r\n formControlName=\"imageUrl\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n <mat-label>{{'FormControl.Height' | aswTranslate}}</mat-label>\r\n <input matInput type=\"text\"\r\n name=\"label\"\r\n min=\"0\" \r\n max=\"600\"\r\n placeholder=\"{{'FormControl.Height' | aswTranslate}}\"\r\n (keypress)=\"objectUtils.keyPressNumbersWithDecimal($event)\"\r\n matTooltip=\"{{'FormControl.Height' | aswTranslate}}\"\r\n formControlName=\"height\">\r\n <mat-error *ngFor=\"let validation of constants.accountValidationMessages.height\">\r\n <ng-container *ngIf=\"aswImageForm.get('height')?.hasError(validation.type) && (aswImageForm.get('height')?.dirty || aswImageForm.get('height')?.touched)\">\r\n {{validation.message | aswTranslate}}\r\n </ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n <mat-label>{{'FormControl.Width' | aswTranslate}}</mat-label>\r\n <input matInput type=\"text\"\r\n name=\"label\"\r\n min=\"0\" \r\n max=\"600\"\r\n placeholder=\"{{'FormControl.Width' | aswTranslate}}\"\r\n (keypress)=\"objectUtils.keyPressNumbersWithDecimal($event)\"\r\n matTooltip=\"{{'FormControl.Width' | aswTranslate}}\"\r\n formControlName=\"width\">\r\n <mat-error *ngFor=\"let validation of constants.accountValidationMessages.width\">\r\n <ng-container *ngIf=\"aswImageForm.get('width')?.hasError(validation.type) && (aswImageForm.get('width')?.dirty || aswImageForm.get('width')?.touched)\">\r\n {{validation.message | aswTranslate}}\r\n </ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n <mat-label>{{'FormControl.SelectImageShape' | aswTranslate}}</mat-label>\r\n <mat-select formControlName=\"imageShape\" matTooltip=\"{{'FormControl.SelectImageShape' | aswTranslate}}\">\r\n <mat-option value=\"asw-circular-square\">Circle</mat-option>\r\n <mat-option value=\"asw-original\">Square</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <mat-slide-toggle color=\"primary\"\r\n #isUploadHide\r\n formControlName=\"isUploadHide\"\r\n (change)=\"onChange($event)\">\r\n {{(status ? 'FormControl.UploadHide' : 'FormControl.UploadShow') | aswTranslate}}\r\n </mat-slide-toggle>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <div class=\"asw-mb-3\">\r\n {{'FormControl.Style' | aswTranslate}}: \r\n <mat-button-toggle-group formControlName=\"class\" name=\"fontStyle\" aria-label=\"Font Style\">\r\n <mat-button-toggle value=\"asw-text-start\" aria-label=\"Text align left\">\r\n <span [innerHTML]=\"icons.justifyLeft | aswSafeHtml\"></span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"asw-text-center\" aria-label=\"Text align center\">\r\n <span [innerHTML]=\"icons.justifyCenter | aswSafeHtml\"></span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"asw-text-end\" aria-label=\"Text align right\">\r\n <span [innerHTML]=\"icons.justifyRight | aswSafeHtml\"></span>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div> \r\n </div>\r\n </ng-container>\r\n <ng-template #bootstrap>\r\n <div class=\"asw-col-md-12\">\r\n <div class=\"asw-mb-3\">\r\n <label class=\"asw-input-label asw-invalid-label {{(aswImageForm.get('label')?.invalid && (aswImageForm.get('label')?.dirty || aswImageForm.get('label')?.touched)) ? 'asw-red-color' : ''}}\">{{'FormControl.Label' | aswTranslate}}</label>\r\n <input type=\"text\"\r\n name=\"label\"\r\n class=\"asw-input-control\"\r\n [class.asw-is-invalid]=\"(aswImageForm.get('label')?.invalid && (aswImageForm.get('label')?.dirty || aswImageForm.get('label')?.touched))\"\r\n matTooltip=\"{{'FormControl.Label' | aswTranslate}}\"\r\n formControlName=\"label\" required>\r\n <div *ngFor=\"let validation of constants.accountValidationMessages.label\" class=\"invalid-feedback\">\r\n <ng-container *ngIf=\"aswImageForm.get('label')?.hasError(validation.type) && (aswImageForm.get('label')?.dirty || aswImageForm.get('label')?.touched)\">\r\n {{validation.message | aswTranslate}}\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <div class=\"asw-mb-3\">\r\n <label class=\"asw-input-label\">{{'FormControl.Imageurl' | aswTranslate}}</label>\r\n <input type=\"text\"\r\n name=\"label\"\r\n class=\"asw-input-control\"\r\n matTooltip=\"{{'FormControl.Imageurl' | aswTranslate}}\"\r\n formControlName=\"imageUrl\">\r\n </div>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <div class=\"asw-mb-3\">\r\n <label class=\"asw-input-label asw-invalid-label {{(aswImageForm.get('height')?.invalid && (aswImageForm.get('height')?.dirty || aswImageForm.get('height')?.touched)) ? 'asw-red-color' : ''}}\">{{'FormControl.Height' | aswTranslate}}</label>\r\n <input type=\"text\"\r\n name=\"label\"\r\n min=\"0\" \r\n max=\"600\"\r\n class=\"asw-input-control\"\r\n [class.asw-is-invalid]=\"(aswImageForm.get('height')?.invalid && (aswImageForm.get('height')?.dirty || aswImageForm.get('height')?.touched))\"\r\n (keypress)=\"objectUtils.keyPressNumbersWithDecimal($event)\"\r\n matTooltip=\"{{'FormControl.Height' | aswTranslate}}\"\r\n formControlName=\"height\">\r\n <div *ngFor=\"let validation of constants.accountValidationMessages.height\" class=\"invalid-feedback\">\r\n <ng-container *ngIf=\"aswImageForm.get('height')?.hasError(validation.type) && (aswImageForm.get('height')?.dirty || aswImageForm.get('height')?.touched)\">\r\n {{validation.message | aswTranslate}}\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <div class=\"asw-mb-3\">\r\n <label class=\"asw-input-label asw-invalid-label {{(aswImageForm.get('width')?.invalid && (aswImageForm.get('width')?.dirty || aswImageForm.get('width')?.touched)) ? 'asw-red-color' : ''}}\">{{'FormControl.Width' | aswTranslate}}</label>\r\n <input type=\"text\"\r\n name=\"label\"\r\n min=\"0\" \r\n max=\"600\"\r\n class=\"asw-input-control\"\r\n [class.asw-is-invalid]=\"(aswImageForm.get('width')?.invalid && (aswImageForm.get('width')?.dirty || aswImageForm.get('width')?.touched))\"\r\n (keypress)=\"objectUtils.keyPressNumbersWithDecimal($event)\"\r\n matTooltip=\"{{'FormControl.Width' | aswTranslate}}\"\r\n formControlName=\"width\">\r\n <div *ngFor=\"let validation of constants.accountValidationMessages.width\" class=\"invalid-feedback\">\r\n <ng-container *ngIf=\"aswImageForm.get('width')?.hasError(validation.type) && (aswImageForm.get('width')?.dirty || aswImageForm.get('width')?.touched)\">\r\n {{validation.message | aswTranslate}}\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <div class=\"asw-mb-3\">\r\n <label class=\"asw-input-label\">{{'FormControl.SelectImageShape' | aswTranslate}}</label>\r\n <select formControlName=\"imageShape\" class=\"asw-select\" matTooltip=\"{{'FormControl.SelectImageShape' | aswTranslate}}\">\r\n <option value=\"asw-circular-square\">Circle</option>\r\n <option value=\"asw-original\">Square</option>\r\n </select>\r\n </div>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <div class=\"asw-mb-3\">\r\n <div class=\"asw-form-check asw-form-switch\">\r\n <input class=\"asw-form-check-input\" \r\n type=\"checkbox\"\r\n id=\"isUploadHide\" \r\n #isUploadHide\r\n formControlName=\"isUploadHide\"\r\n (change)=\"onChange($event)\">\r\n <label class=\"asw-form-check-label\" for=\"isUploadHide\">\r\n {{(status ? 'FormControl.UploadHide' : 'FormControl.UploadShow') | aswTranslate}}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"asw-col-md-6\">\r\n <div class=\"asw-mb-3\">\r\n {{'FormControl.Style' | aswTranslate}}: \r\n <mat-button-toggle-group formControlName=\"class\" name=\"fontStyle\" aria-label=\"Font Style\">\r\n <mat-button-toggle value=\"asw-text-start\" aria-label=\"Text align left\">\r\n <span [innerHTML]=\"icons.justifyLeft | aswSafeHtml\"></span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"asw-text-center\" aria-label=\"Text align center\">\r\n <span [innerHTML]=\"icons.justifyCenter | aswSafeHtml\"></span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"asw-text-end\" aria-label=\"Text align right\">\r\n <span [innerHTML]=\"icons.justifyRight | aswSafeHtml\"></span>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div> \r\n </div>\r\n </ng-template>\r\n </div>\r\n </mat-dialog-content>\r\n <mat-dialog-actions align=\"end\">\r\n <button type=\"button\"\r\n class=\"asw-button asw-button-danger asw-mb-1 asw-me-2\"\r\n (click)=\"onNoClick()\">\r\n {{'FormControl.No' | aswTranslate}}\r\n </button>\r\n <button type=\"submit\"\r\n class=\"asw-button asw-button-primary asw-mb-1\"\r\n cdkFocusInitial>\r\n {{'FormControl.Yes' | aswTranslate}}\r\n </button>\r\n </mat-dialog-actions>\r\n</form>\r\n\r\n" }]
}], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i2.MatDialogRef }, { type: undefined, decorators: [{
type: Inject,
args: [MAT_DIALOG_DATA]
}] }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW1hZ2UtZGlhbG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gICAgaW1hZ2VTaGFwZTogW10sXG4gICAgICAgICAgICBoZWlnaHQ6IFsnJywgW1ZhbGlkYXRvcnMubWF4KDYwMCksIFZhbGlkYXRvcnMubWluKDApXV0sXG4gICAgICAgICAgICB3aWR0aDogWycnLCBbVmFsaWRhdG9ycy5tYXgoNjAwKSwgVmFsaWRhdG9ycy5taW4oMCldXSxcbiAgICAgICAgICAgIGlzVXBsb2FkSGlkZTogW3RydWVdXG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIGVkaXRQcm9wZXJ0eShjb250cm9sOiBhbnkpOiB2b2lkIHtcbiAgICAgICAgdGhpcy5hc3dJbWFnZUZvcm0uc2V0VmFsdWUoe1xuICAgICAgICAgICAgbGFiZWw6IGNvbnRyb2wubGFiZWwsXG4gICAgICAgICAgICBjbGFzczogY29udHJvbC5jbGFzcyxcbiAgICAgICAgICAgIGltYWdlVXJsOiBjb250cm9sLmltYWdlVXJsLFxuICAgICAgICAgICAgaW1hZ2VTaGFwZTogY29udHJvbC5pbWFnZVNoYXBlLFxuICAgICAgICAgICAgd2lkdGg6IGNvbnRyb2wud2lkdGgsXG4gICAgICAgICAgICBoZWlnaHQ6IGNvbnRyb2wuaGVpZ2h0LFxuICAgICAgICAgICAgaXNVcGxvYWRIaWRlOiBjb250cm9sLmlzVXBsb2FkSGlkZSA/PyB0cnVlXG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIG9uTm9DbGljaygpOiB2b2lkIHtcbiAgICAgICAgdGhpcy5kaWFsb2dSZWYuY2xvc2UoKTtcbiAgICB9XG5cbiAgICBvblN1Ym1pdCgpOiB2b2lkIHtcbiAgICAgICAgaWYgKHRoaXMuYXN3SW1hZ2VGb3JtLmludmFsaWQpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLmFzd0ltYWdlRm9ybS52YWx1ZS5jb250cm9sVHlwZSA9IHRoaXMuY29udHJvbC5jb250cm9sVHlwZTtcbiAgICAgICAgdG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gICAgICAgICAgIG1hdFRvb2x0aXA9XCJ7eydGb3JtQ29udHJvbC5MYWJlbCcgfCBhc3dUcmFuc2xhdGV9fVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtQ29udHJvbE5hbWU9XCJsYWJlbFwiIHJlcXVpcmVkPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8bWF0LWVycm9yICpuZ0Zvcj1cImxldCB2YWxpZGF0aW9uIG9mIGNvbnN0YW50cy5hY2NvdW50VmFsaWRhdGlvbk1lc3NhZ2VzLmxhYmVsXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ0lmPVwiYXN3SW1hZ2VGb3JtLmdldCgnbGFiZWwnKT8uaGFzRXJyb3IodmFsaWRhdGlvbi50eXBlKSAmJiAoYXN3SW1hZ2VGb3JtLmdldCgnbGFiZWwnKT8uZGlydHkgfHwgYXN3SW1hZ2VGb3JtLmdldCgnbGFiZWwnKT8udG91Y2hlZClcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7e3ZhbGlkYXRpb24ubWVzc2FnZSB8IGFzd1RyYW5zbGF0ZX19XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L25nLWNvbnRhaW5l