UNPKG

@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

124 lines 67.7 kB
/** * @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 * 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/input"; import * as i7 from "@angular/material/form-field"; import * as i8 from "@angular/material/select"; import * as i9 from "@angular/material/tooltip"; import * as i10 from "@asoftwareworld/form-builder-pro/core"; import * as i11 from "@asoftwareworld/form-builder-pro/common"; export class AswCalculationDialog { formBuilder; dialogRef; data; constants = Constants; icons = Icons; aswEditCalculationForm; constructor(formBuilder, dialogRef, data) { this.formBuilder = formBuilder; this.dialogRef = dialogRef; this.data = data; } ngOnInit() { this.validateFormBuilder(); this.editProperty(this.data.control); } validateFormBuilder() { this.aswEditCalculationForm = this.formBuilder.group({ tooltip: [], label: ['', [Validators.required, Validators.minLength(2)]], value: [{ value: '', disabled: true }], style: ['', [Validators.required]], customClass: [], operations: this.formBuilder.array([this.createOperations()]) }); } editProperty(control) { this.aswEditCalculationForm.patchValue({ tooltip: control.tooltip, label: control.label, customClass: control.customClass ?? '', value: control.value, style: control.style }); const operationFormGroup = control.operations.map((operation) => this.formBuilder.group(operation)); const operationFormArray = this.formBuilder.array(operationFormGroup); this.aswEditCalculationForm.setControl('operations', operationFormArray); } get operations() { return this.aswEditCalculationForm.get('operations'); } createOperations() { return this.formBuilder.group({ id: [], label: [], value: [], operationValue: ['', [Validators.required]], control: [''] }); } onNoClick() { this.dialogRef.close(); } addNewOperation() { this.operations.push(this.createOperations()); } removeOperation(index) { this.operations.removeAt(index); } onSubmit() { if (this.aswEditCalculationForm.invalid) { return; } this.aswEditCalculationForm.value.controlType = this.data.control.controlType; this.aswEditCalculationForm.value.id = this.data.control.id; this.aswEditCalculationForm.value.guid = this.data.control.guid; this.aswEditCalculationForm.value.placeholder = this.data.control.placeholder; this.aswEditCalculationForm.value.operations.forEach((operation) => { operation.id = operation.control.guid; operation.label = operation.control.label; operation.value = operation.control.value; }); this.dialogRef.close(this.aswEditCalculationForm.value); } onOperationChange(event, operation) { if (event.target.value === 'x̄') { operation.controls.label.setErrors(null); } else { operation.controls.label.setValidators(Validators.required); } } onOperatorChange(event, operator) { this.data.numberControls.forEach((operation) => { if (event.target.value === operation.label) { operator.value.id = operation.guid; operator.value.control = operation; } }); } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AswCalculationDialog, 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: AswCalculationDialog, selector: "asw-calculation-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.EditCalculation' | 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]=\"aswEditCalculationForm\" (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-6\">\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=\"aswEditCalculationForm.get('label')?.hasError(validation.type) && (aswEditCalculationForm.get('label')?.dirty || aswEditCalculationForm.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.Tooltip' | aswTranslate}}</mat-label>\r\n <input matInput type=\"text\"\r\n name=\"tooltip\"\r\n placeholder=\"{{'FormControl.Tooltip' | aswTranslate}}\"\r\n matTooltip=\"{{'FormControl.Tooltip' | aswTranslate}}\"\r\n formControlName=\"tooltip\">\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.Style' | aswTranslate}}</mat-label>\r\n <mat-select formControlName=\"style\" matTooltip=\"{{'FormControl.SelectStyle' | aswTranslate}}\">\r\n <mat-option value=\"legacy\">Legacy</mat-option>\r\n <mat-option value=\"standard\">Standard</mat-option>\r\n <mat-option value=\"fill\">Fill</mat-option>\r\n <mat-option value=\"outline\">Outline</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-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n <mat-label>{{'FormControl.Value' | aswTranslate}}</mat-label>\r\n <input matInput type=\"text\"\r\n name=\"value\"\r\n placeholder=\"{{'FormControl.Value' | aswTranslate}}\"\r\n matTooltip=\"{{'FormControl.Value' | aswTranslate}}\"\r\n formControlName=\"value\"> \r\n </mat-form-field>\r\n </div>\r\n <ng-container *ngIf=\"!data.propertyPersonalization.includes('customCSSClass')\">\r\n <div class=\"asw-col-md-12\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n <mat-label>{{'FormControl.CustomCSSClass' | aswTranslate}}</mat-label>\r\n <input matInput type=\"text\"\r\n name=\"customClass\"\r\n placeholder=\"{{'FormControl.CustomCSSClass' | aswTranslate}}\"\r\n matTooltip=\"{{'FormControl.CustomCSSClass' | aswTranslate}}\"\r\n formControlName=\"customClass\">\r\n </mat-form-field>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #bootstrap>\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 {{(aswEditCalculationForm.get('label')?.invalid && (aswEditCalculationForm.get('label')?.dirty || aswEditCalculationForm.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 matTooltip=\"{{'FormControl.Label' | aswTranslate}}\"\r\n [class.asw-is-invalid]=\"(aswEditCalculationForm.get('label')?.invalid && (aswEditCalculationForm.get('label')?.dirty || aswEditCalculationForm.get('label')?.touched))\"\r\n formControlName=\"label\" required>\r\n <div *ngFor=\"let validation of constants.accountValidationMessages.label\" class=\"invalid-feedback\">\r\n <ng-container *ngIf=\"aswEditCalculationForm.get('label')?.hasError(validation.type) && (aswEditCalculationForm.get('label')?.dirty || aswEditCalculationForm.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.Tooltip' | aswTranslate}}</label>\r\n <input type=\"text\"\r\n name=\"tooltip\"\r\n class=\"asw-input-control\"\r\n matTooltip=\"{{'FormControl.Tooltip' | aswTranslate}}\"\r\n formControlName=\"tooltip\">\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"!data.propertyPersonalization.includes('customCSSClass')\">\r\n <div class=\"asw-col-md-12\">\r\n <div class=\"asw-mb-3\">\r\n <label class=\"asw-input-label\">{{'FormControl.CustomCSSClass' | aswTranslate}}</label>\r\n <input type=\"text\"\r\n name=\"customClass\"\r\n class=\"asw-input-control\"\r\n matTooltip=\"{{'FormControl.CustomCSSClass' | aswTranslate}}\"\r\n formControlName=\"customClass\">\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"asw-col-md-12\">\r\n <div class=\"asw-mb-3\">\r\n <label class=\"asw-input-label\">{{'FormControl.Value' | aswTranslate}}</label>\r\n <input type=\"text\"\r\n name=\"value\"\r\n class=\"asw-input-control\"\r\n matTooltip=\"{{'FormControl.Value' | aswTranslate}}\"\r\n formControlName=\"value\"> \r\n </div>\r\n </div>\r\n </ng-template> \r\n <div class=\"asw-col-md-12\" *ngIf=\"operations.controls.length != 0\">\r\n <table class=\"asw-table asw-table-sm asw-table-bordered\">\r\n <thead>\r\n <tr>\r\n <th>{{'FormControl.Operation' | aswTranslate}}</th>\r\n <th>{{'FormControl.Operator' | aswTranslate}}</th>\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container formArrayName=\"operations\">\r\n <tr *ngFor=\"let op of operations.controls; let index = index; let last=last;\" \r\n [formGroupName]=\"index\">\r\n <td>\r\n <ng-container *ngIf=\"index!==0\">\r\n <select formControlName=\"operationValue\" \r\n (change)=\"onOperationChange($event, op)\"\r\n matTooltip=\"{{'FormControl.SelectOperation' | aswTranslate}} {{index+1}}\" required class=\"asw-select\">\r\n <option *ngFor=\"let operation of constants.operations\" [value]=\"operation.value\">\r\n {{operation.label}}\r\n </option>\r\n </select>\r\n <ng-container *ngFor=\"let validation of constants.accountValidationMessages.operationValue\">\r\n <mat-error *ngIf=\"operations.controls[index].get('operationValue')?.hasError(validation.type) && (operations.controls[index].get('operationValue')?.dirty || operations.controls[index].get('operationValue')?.touched)\">\r\n {{validation.message | aswTranslate}}\r\n </mat-error>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n <td>\r\n <ng-container *ngIf=\"operations.controls[index].value.operationValue != 'x\u0304'\">\r\n <select formControlName=\"label\"\r\n (change)=\"onOperatorChange($event, op)\"\r\n matTooltip=\"{{'FormControl.SelectOperator' | aswTranslate}} {{index+1}}\" required class=\"asw-select\">\r\n <option *ngFor=\"let control of data.numberControls\" [value]=\"control.label\">\r\n {{control.label}}\r\n </option>\r\n </select>\r\n <ng-container *ngFor=\"let validation of constants.accountValidationMessages.control\">\r\n <mat-error *ngIf=\"operations.controls[index].get('control')?.hasError(validation.type) && (operations.controls[index].get('control')?.dirty || operations.controls[index].get('control')?.touched)\">\r\n {{validation.message | aswTranslate}}\r\n </mat-error>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n <td class=\"asw-text-center\"> \r\n <button mat-icon-button *ngIf=\"index != 0\"\r\n type=\"button\" \r\n matTooltip=\"{{'FormControl.Delete' | aswTranslate}}\" \r\n [matTooltipPosition]=\"'below'\" \r\n (click)=\"removeOperation(index)\">\r\n <span [innerHTML]=\"icons.delete2 | aswSafeHtml\"></span>\r\n </button>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n <tr>\r\n <td colspan=\"3\">\r\n <button class=\"asw-button asw-button-primary asw-button-sm\"\r\n type=\"button\" \r\n matTooltip=\"{{'FormControl.Add' | aswTranslate}}\" \r\n [matTooltipPosition]=\"'below'\"\r\n (click)=\"addNewOperation()\">\r\n <span class=\"asw-icon asw-me-1\" [innerHTML]=\"icons.add | aswSafeHtml\"></span>\r\n {{'FormControl.AddOperation' | aswTranslate}}\r\n </button>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\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-me-2 asw-mb-1\"\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.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: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { 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: 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: i6.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: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i8.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: "directive", type: i9.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i10.AswTranslatePipe, name: "aswTranslate" }, { kind: "pipe", type: i11.AswSafeHtmlPipe, name: "aswSafeHtml" }] }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AswCalculationDialog, decorators: [{ type: Component, args: [{ selector: 'asw-calculation-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.EditCalculation' | 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]=\"aswEditCalculationForm\" (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-6\">\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=\"aswEditCalculationForm.get('label')?.hasError(validation.type) && (aswEditCalculationForm.get('label')?.dirty || aswEditCalculationForm.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.Tooltip' | aswTranslate}}</mat-label>\r\n <input matInput type=\"text\"\r\n name=\"tooltip\"\r\n placeholder=\"{{'FormControl.Tooltip' | aswTranslate}}\"\r\n matTooltip=\"{{'FormControl.Tooltip' | aswTranslate}}\"\r\n formControlName=\"tooltip\">\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.Style' | aswTranslate}}</mat-label>\r\n <mat-select formControlName=\"style\" matTooltip=\"{{'FormControl.SelectStyle' | aswTranslate}}\">\r\n <mat-option value=\"legacy\">Legacy</mat-option>\r\n <mat-option value=\"standard\">Standard</mat-option>\r\n <mat-option value=\"fill\">Fill</mat-option>\r\n <mat-option value=\"outline\">Outline</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-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n <mat-label>{{'FormControl.Value' | aswTranslate}}</mat-label>\r\n <input matInput type=\"text\"\r\n name=\"value\"\r\n placeholder=\"{{'FormControl.Value' | aswTranslate}}\"\r\n matTooltip=\"{{'FormControl.Value' | aswTranslate}}\"\r\n formControlName=\"value\"> \r\n </mat-form-field>\r\n </div>\r\n <ng-container *ngIf=\"!data.propertyPersonalization.includes('customCSSClass')\">\r\n <div class=\"asw-col-md-12\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-width-100\">\r\n <mat-label>{{'FormControl.CustomCSSClass' | aswTranslate}}</mat-label>\r\n <input matInput type=\"text\"\r\n name=\"customClass\"\r\n placeholder=\"{{'FormControl.CustomCSSClass' | aswTranslate}}\"\r\n matTooltip=\"{{'FormControl.CustomCSSClass' | aswTranslate}}\"\r\n formControlName=\"customClass\">\r\n </mat-form-field>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #bootstrap>\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 {{(aswEditCalculationForm.get('label')?.invalid && (aswEditCalculationForm.get('label')?.dirty || aswEditCalculationForm.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 matTooltip=\"{{'FormControl.Label' | aswTranslate}}\"\r\n [class.asw-is-invalid]=\"(aswEditCalculationForm.get('label')?.invalid && (aswEditCalculationForm.get('label')?.dirty || aswEditCalculationForm.get('label')?.touched))\"\r\n formControlName=\"label\" required>\r\n <div *ngFor=\"let validation of constants.accountValidationMessages.label\" class=\"invalid-feedback\">\r\n <ng-container *ngIf=\"aswEditCalculationForm.get('label')?.hasError(validation.type) && (aswEditCalculationForm.get('label')?.dirty || aswEditCalculationForm.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.Tooltip' | aswTranslate}}</label>\r\n <input type=\"text\"\r\n name=\"tooltip\"\r\n class=\"asw-input-control\"\r\n matTooltip=\"{{'FormControl.Tooltip' | aswTranslate}}\"\r\n formControlName=\"tooltip\">\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"!data.propertyPersonalization.includes('customCSSClass')\">\r\n <div class=\"asw-col-md-12\">\r\n <div class=\"asw-mb-3\">\r\n <label class=\"asw-input-label\">{{'FormControl.CustomCSSClass' | aswTranslate}}</label>\r\n <input type=\"text\"\r\n name=\"customClass\"\r\n class=\"asw-input-control\"\r\n matTooltip=\"{{'FormControl.CustomCSSClass' | aswTranslate}}\"\r\n formControlName=\"customClass\">\r\n </div>\r\n </div>\r\n </ng-container>\r\n <div class=\"asw-col-md-12\">\r\n <div class=\"asw-mb-3\">\r\n <label class=\"asw-input-label\">{{'FormControl.Value' | aswTranslate}}</label>\r\n <input type=\"text\"\r\n name=\"value\"\r\n class=\"asw-input-control\"\r\n matTooltip=\"{{'FormControl.Value' | aswTranslate}}\"\r\n formControlName=\"value\"> \r\n </div>\r\n </div>\r\n </ng-template> \r\n <div class=\"asw-col-md-12\" *ngIf=\"operations.controls.length != 0\">\r\n <table class=\"asw-table asw-table-sm asw-table-bordered\">\r\n <thead>\r\n <tr>\r\n <th>{{'FormControl.Operation' | aswTranslate}}</th>\r\n <th>{{'FormControl.Operator' | aswTranslate}}</th>\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container formArrayName=\"operations\">\r\n <tr *ngFor=\"let op of operations.controls; let index = index; let last=last;\" \r\n [formGroupName]=\"index\">\r\n <td>\r\n <ng-container *ngIf=\"index!==0\">\r\n <select formControlName=\"operationValue\" \r\n (change)=\"onOperationChange($event, op)\"\r\n matTooltip=\"{{'FormControl.SelectOperation' | aswTranslate}} {{index+1}}\" required class=\"asw-select\">\r\n <option *ngFor=\"let operation of constants.operations\" [value]=\"operation.value\">\r\n {{operation.label}}\r\n </option>\r\n </select>\r\n <ng-container *ngFor=\"let validation of constants.accountValidationMessages.operationValue\">\r\n <mat-error *ngIf=\"operations.controls[index].get('operationValue')?.hasError(validation.type) && (operations.controls[index].get('operationValue')?.dirty || operations.controls[index].get('operationValue')?.touched)\">\r\n {{validation.message | aswTranslate}}\r\n </mat-error>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n <td>\r\n <ng-container *ngIf=\"operations.controls[index].value.operationValue != 'x\u0304'\">\r\n <select formControlName=\"label\"\r\n (change)=\"onOperatorChange($event, op)\"\r\n matTooltip=\"{{'FormControl.SelectOperator' | aswTranslate}} {{index+1}}\" required class=\"asw-select\">\r\n <option *ngFor=\"let control of data.numberControls\" [value]=\"control.label\">\r\n {{control.label}}\r\n </option>\r\n </select>\r\n <ng-container *ngFor=\"let validation of constants.accountValidationMessages.control\">\r\n <mat-error *ngIf=\"operations.controls[index].get('control')?.hasError(validation.type) && (operations.controls[index].get('control')?.dirty || operations.controls[index].get('control')?.touched)\">\r\n {{validation.message | aswTranslate}}\r\n </mat-error>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n <td class=\"asw-text-center\"> \r\n <button mat-icon-button *ngIf=\"index != 0\"\r\n type=\"button\" \r\n matTooltip=\"{{'FormControl.Delete' | aswTranslate}}\" \r\n [matTooltipPosition]=\"'below'\" \r\n (click)=\"removeOperation(index)\">\r\n <span [innerHTML]=\"icons.delete2 | aswSafeHtml\"></span>\r\n </button>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n <tr>\r\n <td colspan=\"3\">\r\n <button class=\"asw-button asw-button-primary asw-button-sm\"\r\n type=\"button\" \r\n matTooltip=\"{{'FormControl.Add' | aswTranslate}}\" \r\n [matTooltipPosition]=\"'below'\"\r\n (click)=\"addNewOperation()\">\r\n <span class=\"asw-icon asw-me-1\" [innerHTML]=\"icons.add | aswSafeHtml\"></span>\r\n {{'FormControl.AddOperation' | aswTranslate}}\r\n </button>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\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-me-2 asw-mb-1\"\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2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5jb250cm9sLmd1aWQ7XG4gICAgICAgICAgICBvcGVyYXRpb24ubGFiZWwgPSBvcGVyYXRpb24uY29udHJvbC5sYWJlbDtcbiAgICAgICAgICAgIG9wZXJhdGlvbi52YWx1ZSA9IG9wZXJhdGlvbi5jb250cm9sLnZhbHVlO1xuICAgICAgICB9KTtcbiAgICAgICAgdGhpcy5kaWFsb2dSZWYuY2xvc2UodGhpcy5hc3dFZGl0Q2FsY3VsYXRpb25Gb3JtLnZhbHVlKTtcbiAgICB9XG5cbiAgICBvbk9wZXJhdGlvbkNoYW5nZShldmVudDogYW55LCBvcGVyYXRpb246IGFueSk6IHZvaWQge1xuICAgICAgICBpZiAoZXZlbnQudGFyZ2V0LnZhbHVlID09PSAneMyEJykge1xuICAgICAgICAgICAgb3BlcmF0aW9uLmNvbnRyb2xzLmxhYmVsLnNldEVycm9ycyhudWxsKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIG9wZXJhdGlvbi5jb250cm9scy5sYWJlbC5zZXRWYWxpZGF0b3JzKFZhbGlkYXRvcnMucmVxdWlyZWQpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgb25PcGVyYXRvckNoYW5nZShldmVudDogYW55LCBvcGVyYXRvcjogYW55KTogdm9pZCB7XG4gICAgICAgIHRoaXMuZGF0YS5udW1iZXJDb250cm9scy5mb3JFYWNoKChvcGVyYXRpb246IGFueSkgPT4ge1xuICAgICAgICAgICAgaWYgKGV2ZW50LnRhcmdldC52YWx1ZSA9PT0gb3BlcmF0aW9uLmxhYmVsKSB7XG4gICAgICAgICAgICAgICAgb3BlcmF0b3IudmFsdWUuaWQgPSBvcGVyYXRpb24uZ3VpZDtcbiAgICAgICAgICAgICAgICBvcGVyYXRvci52YWx1ZS5jb250cm9sID0gb3BlcmF0aW9uO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG59XG4iLCI8ZGl2IGNsYXNzPVwiYXN3LWRpYWxvZy1oZWFkZXJcIj5ccl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