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

209 lines 68.2 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 { 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/platform-browser"; import * as i4 from "@angular/common"; import * as i5 from "@asoftwareworld/form-builder-pro/image-crop"; import * as i6 from "@angular/material/button"; import * as i7 from "@angular/material/button-toggle"; import * as i8 from "@angular/material/card"; 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 AswImageUploadDialog { formBuilder; dialogRef; control; sanitizer; icons = Icons; constants = Constants; aswImageCropForm; imageChangedEvent = ''; croppedImage = ''; roundCropper = false; canvasRotation = 0; rotation; translateH = 0; translateV = 0; scale = 1; aspectRatio = 1; showCropper = false; containWithinAspectRatio = false; transform = { translateUnit: 'px' }; imageURL; isImageLoaded = false; allowMoveImage = false; constructor(formBuilder, dialogRef, control, sanitizer) { this.formBuilder = formBuilder; this.dialogRef = dialogRef; this.control = control; this.sanitizer = sanitizer; } ngOnInit() { this.validateFormBuilder(); this.editProperty(this.control); this.croppedImage = this.control.imageUrl; this.isImageLoaded = this.control.imageUrl ? false : true; } fileChangeEvent(event) { this.isImageLoaded = true; this.imageChangedEvent = event; } removeImage() { this.isImageLoaded = true; this.imageChangedEvent = null; } imageCropped(event) { this.croppedImage = this.sanitizer.bypassSecurityTrustUrl(event.objectUrl || event.base64 || ''); } imageLoaded() { this.showCropper = true; } cropperReady(sourceImageDimensions) { this.isImageLoaded = false; } loadImageFailed() { console.log('Load failed'); } rotateLeft() { this.isImageLoaded = true; setTimeout(() => { // Use timeout because rotating image is a heavy operation and will block the ui thread this.canvasRotation--; this.flipAfterRotate(); }); } rotateRight() { this.isImageLoaded = true; setTimeout(() => { this.canvasRotation++; this.flipAfterRotate(); }); } moveLeft() { this.transform = { ...this.transform, translateH: ++this.translateH }; } moveRight() { this.transform = { ...this.transform, translateH: --this.translateH }; } moveTop() { this.transform = { ...this.transform, translateV: ++this.translateV }; } moveBottom() { this.transform = { ...this.transform, translateV: --this.translateV }; } flipAfterRotate() { const flippedH = this.transform.flipH; const flippedV = this.transform.flipV; this.transform = { ...this.transform, flipH: flippedV, flipV: flippedH }; this.translateH = 0; this.translateV = 0; } flipHorizontal() { this.transform = { ...this.transform, flipH: !this.transform.flipH }; } flipVertical() { this.transform = { ...this.transform, flipV: !this.transform.flipV }; } resetImage() { this.scale = 1; this.rotation = 0; this.canvasRotation = 0; this.transform = { translateUnit: 'px' }; } zoomOut() { this.scale -= 0.1; this.transform = { ...this.transform, scale: this.scale }; } zoomIn() { this.scale += 0.1; this.transform = { ...this.transform, scale: this.scale }; } setRoundCropper(isCircle) { this.roundCropper = isCircle; } toggleContainWithinAspectRatio() { this.containWithinAspectRatio = !this.containWithinAspectRatio; } updateRotation() { this.transform = { ...this.transform, rotate: this.rotation }; } onNoClick() { this.dialogRef.close(); } validateFormBuilder() { this.aswImageCropForm = this.formBuilder.group({ file: [null] }); } editProperty(control) { if (control.event) { this.isImageLoaded = false; } this.aswImageCropForm.setValue({ file: control.imageUrl }); } onSubmit() { if (this.aswImageCropForm.invalid) { return; } this.control.imageUrl = this.croppedImage.changingThisBreaksApplicationSecurity; this.dialogRef.close(this.control); } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AswImageUploadDialog, deps: [{ token: i1.FormBuilder }, { token: i2.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: AswImageUploadDialog, selector: "asw-image-upload-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]=\"aswImageCropForm\" (ngSubmit)=\"onSubmit()\">\r\n <mat-dialog-content class=\"mat-typography\">\r\n <div class=\"asw-row asw-p-2\">\r\n <div class=\"asw-col-md-9\">\r\n <div class=\"asw-sticky-top\">\r\n <mat-card>\r\n <mat-card-content>\r\n <div class=\"asw-img-crop-area\">\r\n <asw-image-crop\r\n [imageChangedEvent]=\"imageChangedEvent\"\r\n [imageURL]=\"imageURL\"\r\n [imageBase64]=\"control.imageUrl\"\r\n [maintainAspectRatio]=\"true\"\r\n [containWithinAspectRatio]=\"containWithinAspectRatio\"\r\n [aspectRatio]=\"aspectRatio\"\r\n [resizeToWidth]=\"500\"\r\n [imageQuality]=\"92\"\r\n [onlyScaleDown]=\"true\"\r\n [roundCropper]=\"roundCropper\"\r\n [canvasRotation]=\"canvasRotation\"\r\n [(transform)]=\"transform\"\r\n [alignImage]=\"'center'\"\r\n [style.display]=\"showCropper ? null : 'none'\"\r\n [allowMoveImage]=\"allowMoveImage\"\r\n output=\"base64\"\r\n format=\"png\"\r\n (imageCropped)=\"imageCropped($event)\"\r\n (imageLoaded)=\"imageLoaded()\"\r\n (cropperReady)=\"cropperReady($event)\"\r\n (loadImageFailed)=\"loadImageFailed()\">\r\n </asw-image-crop>\r\n </div>\r\n </mat-card-content>\r\n </mat-card>\r\n </div>\r\n </div>\r\n <div class=\"asw-col-md-3\">\r\n <mat-card>\r\n <mat-card-content>\r\n <div class=\"asw-row\">\r\n <div class=\"asw-col-md-12 asw-d-grid\">\r\n <button class=\"asw-button asw-button-primary\" type=\"button\"\r\n (click)=\"fileInput.click()\"\r\n matTooltip=\"{{'FormControl.LoadImage' | aswTranslate}}\" \r\n *ngIf=\"isImageLoaded\">\r\n <input style=\"display: none\" \r\n type=\"file\" \r\n #fileInput \r\n (change)=\"fileChangeEvent($event)\"\r\n id=\"imageUpload\" \r\n accept=\"image/*\">\r\n {{'FormControl.LoadImage' | aswTranslate}}\r\n </button>\r\n <button class=\"asw-button asw-button-primary\" type=\"button\"\r\n matTooltip=\"{{'FormControl.RemoveImage' | aswTranslate}}\"\r\n *ngIf=\"!isImageLoaded\" \r\n (click)=\"removeImage()\">\r\n {{'FormControl.RemoveImage' | aswTranslate}}\r\n </button>\r\n </div>\r\n </div>\r\n <h6 class=\"asw-fs-6 asw-my-2\">{{'FormControl.CropType' | aswTranslate}}:</h6>\r\n <div class=\"asw-pb-2\">\r\n <mat-button-toggle-group class=\"asw-width-100\">\r\n <mat-button-toggle matTooltip=\"{{'FormControl.Square' | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\"\r\n class=\"asw-width-100\" \r\n (change)=\"setRoundCropper(false)\">\r\n {{'FormControl.Square' | aswTranslate}}\r\n </mat-button-toggle>\r\n <mat-button-toggle matTooltip=\"{{'FormControl.Circle' | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\"\r\n class=\"asw-width-100\"\r\n (change)=\"setRoundCropper(true)\">\r\n {{'FormControl.Circle' | aswTranslate}}\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n <div class=\"asw-pb-2\">\r\n <mat-button-toggle-group class=\"asw-width-100\">\r\n <mat-button-toggle matTooltip=\"{{(containWithinAspectRatio?'FormControl.FillAspectRatio':'FormControl.ContainWithinAspectRatio') | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\" \r\n class=\"asw-width-100\"\r\n (change)=\"toggleContainWithinAspectRatio()\">\r\n {{(containWithinAspectRatio?'FormControl.FillAspectRatio':'FormControl.ContainWithinAspectRatio') | aswTranslate}}\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n <mat-button-toggle-group class=\"asw-width-100\">\r\n <mat-button-toggle matTooltip=\"{{'FormControl.SwapHorizontal' | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\"\r\n class=\"asw-width-100\"\r\n (change)=\"flipHorizontal()\">\r\n <span [ngClass]=\"{'asw-icon-disabled': isImageLoaded }\" [innerHTML]=\"icons.swapHoriz | aswSafeHtml\"></span>\r\n </mat-button-toggle>\r\n <mat-button-toggle matTooltip=\"{{'FormControl.SwapVertical' | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\"\r\n class=\"asw-width-100\"\r\n (change)=\"flipVertical()\">\r\n <span [ngClass]=\"{'asw-icon-disabled': isImageLoaded }\" [innerHTML]=\"icons.swapVert | aswSafeHtml\"></span>\r\n </mat-button-toggle>\r\n <mat-button-toggle [disabled]=\"isImageLoaded\" \r\n matTooltip=\"{{'FormControl.LeftRotate' | aswTranslate}}\"\r\n class=\"asw-width-100\"\r\n (change)=\"rotateLeft()\">\r\n <span [ngClass]=\"{'asw-icon-disabled': isImageLoaded }\" [innerHTML]=\"icons.rotateLeft | aswSafeHtml\"></span>\r\n </mat-button-toggle>\r\n <mat-button-toggle matTooltip=\"{{'FormControl.RightRotate' | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\"\r\n class=\"asw-width-100\"\r\n (change)=\"rotateRight()\">\r\n <span [ngClass]=\"{'asw-icon-disabled': isImageLoaded }\" [innerHTML]=\"icons.rotateRight | aswSafeHtml\"></span>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n <!-- <mat-button-toggle-group>\r\n <mat-button-toggle matTooltip=\"{{'FormControl.MoveLeft' | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\" \r\n (change)=\"moveLeft()\">\r\n <div [ngClass]=\"{'asw-icon-disabled': isImageLoaded }\" [innerHTML]=\"icons.west | aswSafeHtml\"></div>\r\n </mat-button-toggle>\r\n <mat-button-toggle matTooltip=\"{{'FormControl.MoveRight' | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\" \r\n (change)=\"moveRight()\">\r\n <div [ngClass]=\"{'asw-icon-disabled': isImageLoaded }\" [innerHTML]=\"icons.east | aswSafeHtml\"></div>\r\n </mat-button-toggle>\r\n <mat-button-toggle matTooltip=\"{{'FormControl.MoveTop' | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\" \r\n (change)=\"moveTop()\">\r\n <div [ngClass]=\"{'asw-icon-disabled': isImageLoaded }\" [innerHTML]=\"icons.verticalAlignTop | aswSafeHtml\"></div>\r\n </mat-button-toggle>\r\n <mat-button-toggle matTooltip=\"{{'FormControl.MoveBottom' | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\" \r\n (change)=\"moveBottom()\">\r\n <div [ngClass]=\"{'asw-icon-disabled': isImageLoaded }\" [innerHTML]=\"icons.verticalAlignBottom | aswSafeHtml\"></div>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group> -->\r\n <h6 class=\"asw-fs-6 asw-my-2\">{{'FormControl.ImageSize' | aswTranslate}}:</h6>\r\n <div class=\"asw-pb-2\">\r\n <mat-button-toggle-group class=\"asw-width-100\">\r\n <mat-button-toggle matTooltip=\"{{'FormControl.ZoomIn' | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\"\r\n class=\"asw-width-100\" \r\n (change)=\"zoomIn()\">\r\n {{'FormControl.ZoomIn' | aswTranslate}}\r\n </mat-button-toggle>\r\n <mat-button-toggle matTooltip=\"{{'FormControl.ZoomOut' | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\"\r\n class=\"asw-width-100\"\r\n (change)=\"zoomOut()\">\r\n {{'FormControl.ZoomOut' | aswTranslate}}\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n <div class=\"asw-row asw-pt-2\">\r\n <div class=\"asw-col-md-12 asw-d-grid\">\r\n <button class=\"asw-button asw-button-secondary\" type=\"button\"\r\n [disabled]=\"isImageLoaded\"\r\n matTooltip=\"{{'FormControl.ResetImage' | aswTranslate}}\"\r\n (click)=\"resetImage()\">\r\n {{'FormControl.ResetImage' | aswTranslate}}\r\n </button>\r\n </div>\r\n </div>\r\n <h6 class=\"asw-fs-6 asw-my-2\">{{'FormControl.ImagePreview' | aswTranslate}}:</h6>\r\n <div class=\"asw-img-crop-preview\"> \r\n <img [src]=\"croppedImage\" /> \r\n </div> \r\n </mat-card-content>\r\n </mat-card>\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-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>", dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i5.AswImageCropComponent, selector: "asw-image-crop", inputs: ["imageChangedEvent", "imageURL", "imageBase64", "imageFile", "imageAltText", "cropperFrameAriaLabel", "output", "format", "transform", "maintainAspectRatio", "aspectRatio", "resetCropOnAspectRatioChange", "resizeToWidth", "resizeToHeight", "cropperMinWidth", "cropperMinHeight", "cropperMaxHeight", "cropperMaxWidth", "cropperStaticWidth", "cropperStaticHeight", "canvasRotation", "initialStepSize", "roundCropper", "onlyScaleDown", "imageQuality", "autoCrop", "backgroundColor", "containWithinAspectRatio", "hideResizeSquares", "allowMoveImage", "cropper", "alignImage", "disabled", "hidden"], outputs: ["imageCropped", "startCropImage", "imageLoaded", "cropperReady", "loadImageFailed", "transformChange"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: i7.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i7.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "component", type: i8.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i8.MatCardContent, selector: "mat-card-content" }, { 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: 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: AswImageUploadDialog, decorators: [{ type: Component, args: [{ selector: 'asw-image-upload-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]=\"aswImageCropForm\" (ngSubmit)=\"onSubmit()\">\r\n <mat-dialog-content class=\"mat-typography\">\r\n <div class=\"asw-row asw-p-2\">\r\n <div class=\"asw-col-md-9\">\r\n <div class=\"asw-sticky-top\">\r\n <mat-card>\r\n <mat-card-content>\r\n <div class=\"asw-img-crop-area\">\r\n <asw-image-crop\r\n [imageChangedEvent]=\"imageChangedEvent\"\r\n [imageURL]=\"imageURL\"\r\n [imageBase64]=\"control.imageUrl\"\r\n [maintainAspectRatio]=\"true\"\r\n [containWithinAspectRatio]=\"containWithinAspectRatio\"\r\n [aspectRatio]=\"aspectRatio\"\r\n [resizeToWidth]=\"500\"\r\n [imageQuality]=\"92\"\r\n [onlyScaleDown]=\"true\"\r\n [roundCropper]=\"roundCropper\"\r\n [canvasRotation]=\"canvasRotation\"\r\n [(transform)]=\"transform\"\r\n [alignImage]=\"'center'\"\r\n [style.display]=\"showCropper ? null : 'none'\"\r\n [allowMoveImage]=\"allowMoveImage\"\r\n output=\"base64\"\r\n format=\"png\"\r\n (imageCropped)=\"imageCropped($event)\"\r\n (imageLoaded)=\"imageLoaded()\"\r\n (cropperReady)=\"cropperReady($event)\"\r\n (loadImageFailed)=\"loadImageFailed()\">\r\n </asw-image-crop>\r\n </div>\r\n </mat-card-content>\r\n </mat-card>\r\n </div>\r\n </div>\r\n <div class=\"asw-col-md-3\">\r\n <mat-card>\r\n <mat-card-content>\r\n <div class=\"asw-row\">\r\n <div class=\"asw-col-md-12 asw-d-grid\">\r\n <button class=\"asw-button asw-button-primary\" type=\"button\"\r\n (click)=\"fileInput.click()\"\r\n matTooltip=\"{{'FormControl.LoadImage' | aswTranslate}}\" \r\n *ngIf=\"isImageLoaded\">\r\n <input style=\"display: none\" \r\n type=\"file\" \r\n #fileInput \r\n (change)=\"fileChangeEvent($event)\"\r\n id=\"imageUpload\" \r\n accept=\"image/*\">\r\n {{'FormControl.LoadImage' | aswTranslate}}\r\n </button>\r\n <button class=\"asw-button asw-button-primary\" type=\"button\"\r\n matTooltip=\"{{'FormControl.RemoveImage' | aswTranslate}}\"\r\n *ngIf=\"!isImageLoaded\" \r\n (click)=\"removeImage()\">\r\n {{'FormControl.RemoveImage' | aswTranslate}}\r\n </button>\r\n </div>\r\n </div>\r\n <h6 class=\"asw-fs-6 asw-my-2\">{{'FormControl.CropType' | aswTranslate}}:</h6>\r\n <div class=\"asw-pb-2\">\r\n <mat-button-toggle-group class=\"asw-width-100\">\r\n <mat-button-toggle matTooltip=\"{{'FormControl.Square' | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\"\r\n class=\"asw-width-100\" \r\n (change)=\"setRoundCropper(false)\">\r\n {{'FormControl.Square' | aswTranslate}}\r\n </mat-button-toggle>\r\n <mat-button-toggle matTooltip=\"{{'FormControl.Circle' | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\"\r\n class=\"asw-width-100\"\r\n (change)=\"setRoundCropper(true)\">\r\n {{'FormControl.Circle' | aswTranslate}}\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n <div class=\"asw-pb-2\">\r\n <mat-button-toggle-group class=\"asw-width-100\">\r\n <mat-button-toggle matTooltip=\"{{(containWithinAspectRatio?'FormControl.FillAspectRatio':'FormControl.ContainWithinAspectRatio') | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\" \r\n class=\"asw-width-100\"\r\n (change)=\"toggleContainWithinAspectRatio()\">\r\n {{(containWithinAspectRatio?'FormControl.FillAspectRatio':'FormControl.ContainWithinAspectRatio') | aswTranslate}}\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n <mat-button-toggle-group class=\"asw-width-100\">\r\n <mat-button-toggle matTooltip=\"{{'FormControl.SwapHorizontal' | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\"\r\n class=\"asw-width-100\"\r\n (change)=\"flipHorizontal()\">\r\n <span [ngClass]=\"{'asw-icon-disabled': isImageLoaded }\" [innerHTML]=\"icons.swapHoriz | aswSafeHtml\"></span>\r\n </mat-button-toggle>\r\n <mat-button-toggle matTooltip=\"{{'FormControl.SwapVertical' | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\"\r\n class=\"asw-width-100\"\r\n (change)=\"flipVertical()\">\r\n <span [ngClass]=\"{'asw-icon-disabled': isImageLoaded }\" [innerHTML]=\"icons.swapVert | aswSafeHtml\"></span>\r\n </mat-button-toggle>\r\n <mat-button-toggle [disabled]=\"isImageLoaded\" \r\n matTooltip=\"{{'FormControl.LeftRotate' | aswTranslate}}\"\r\n class=\"asw-width-100\"\r\n (change)=\"rotateLeft()\">\r\n <span [ngClass]=\"{'asw-icon-disabled': isImageLoaded }\" [innerHTML]=\"icons.rotateLeft | aswSafeHtml\"></span>\r\n </mat-button-toggle>\r\n <mat-button-toggle matTooltip=\"{{'FormControl.RightRotate' | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\"\r\n class=\"asw-width-100\"\r\n (change)=\"rotateRight()\">\r\n <span [ngClass]=\"{'asw-icon-disabled': isImageLoaded }\" [innerHTML]=\"icons.rotateRight | aswSafeHtml\"></span>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n <!-- <mat-button-toggle-group>\r\n <mat-button-toggle matTooltip=\"{{'FormControl.MoveLeft' | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\" \r\n (change)=\"moveLeft()\">\r\n <div [ngClass]=\"{'asw-icon-disabled': isImageLoaded }\" [innerHTML]=\"icons.west | aswSafeHtml\"></div>\r\n </mat-button-toggle>\r\n <mat-button-toggle matTooltip=\"{{'FormControl.MoveRight' | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\" \r\n (change)=\"moveRight()\">\r\n <div [ngClass]=\"{'asw-icon-disabled': isImageLoaded }\" [innerHTML]=\"icons.east | aswSafeHtml\"></div>\r\n </mat-button-toggle>\r\n <mat-button-toggle matTooltip=\"{{'FormControl.MoveTop' | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\" \r\n (change)=\"moveTop()\">\r\n <div [ngClass]=\"{'asw-icon-disabled': isImageLoaded }\" [innerHTML]=\"icons.verticalAlignTop | aswSafeHtml\"></div>\r\n </mat-button-toggle>\r\n <mat-button-toggle matTooltip=\"{{'FormControl.MoveBottom' | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\" \r\n (change)=\"moveBottom()\">\r\n <div [ngClass]=\"{'asw-icon-disabled': isImageLoaded }\" [innerHTML]=\"icons.verticalAlignBottom | aswSafeHtml\"></div>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group> -->\r\n <h6 class=\"asw-fs-6 asw-my-2\">{{'FormControl.ImageSize' | aswTranslate}}:</h6>\r\n <div class=\"asw-pb-2\">\r\n <mat-button-toggle-group class=\"asw-width-100\">\r\n <mat-button-toggle matTooltip=\"{{'FormControl.ZoomIn' | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\"\r\n class=\"asw-width-100\" \r\n (change)=\"zoomIn()\">\r\n {{'FormControl.ZoomIn' | aswTranslate}}\r\n </mat-button-toggle>\r\n <mat-button-toggle matTooltip=\"{{'FormControl.ZoomOut' | aswTranslate}}\"\r\n [disabled]=\"isImageLoaded\"\r\n class=\"asw-width-100\"\r\n (change)=\"zoomOut()\">\r\n {{'FormControl.ZoomOut' | aswTranslate}}\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n <div class=\"asw-row asw-pt-2\">\r\n <div class=\"asw-col-md-12 asw-d-grid\">\r\n <button class=\"asw-button asw-button-secondary\" type=\"button\"\r\n [disabled]=\"isImageLoaded\"\r\n matTooltip=\"{{'FormControl.ResetImage' | aswTranslate}}\"\r\n (click)=\"resetImage()\">\r\n {{'FormControl.ResetImage' | aswTranslate}}\r\n </button>\r\n </div>\r\n </div>\r\n <h6 class=\"asw-fs-6 asw-my-2\">{{'FormControl.ImagePreview' | aswTranslate}}:</h6>\r\n <div class=\"asw-img-crop-preview\"> \r\n <img [src]=\"croppedImage\" /> \r\n </div> \r\n </mat-card-content>\r\n </mat-card>\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-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>" }] }], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i2.MatDialogRef }, { type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA] }] }, { type: i3.DomSanitizer }] }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW1hZ2UtdXBsb2FkLWRpYWxvZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL2Zvcm0tY29udHJvbC9pbWFnZS9pbWFnZ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bnNmb3JtID0ge1xuICAgICAgICAgICAgLi4udGhpcy50cmFuc2Zvcm0sXG4gICAgICAgICAgICB0cmFuc2xhdGVWOiAtLXRoaXMudHJhbnNsYXRlVlxuICAgICAgICB9O1xuICAgIH1cblxuICAgIHByaXZhdGUgZmxpcEFmdGVyUm90YXRlKCk6IHZvaWQge1xuICAgICAgICBjb25zdCBmbGlwcGVkSCA9IHRoaXMudHJhbnNmb3JtLmZsaXBIO1xuICAgICAgICBjb25zdCBmbGlwcGVkViA9IHRoaXMudHJhbnNmb3JtLmZsaXBWO1xuICAgICAgICB0aGlzLnRyYW5zZm9ybSA9IHtcbiAgICAgICAgICAgIC4uLnRoaXMudHJhbnNmb3JtLFxuICAgICAgICAgICAgZmxpcEg6IGZsaXBwZWRWLFxuICAgICAgICAgICAgZmxpcFY6IGZsaXBwZWRIXG4gICAgICAgIH07XG4gICAgICAgIHRoaXMudHJhbnNsYXRlSCA9IDA7XG4gICAgICAgIHRoaXMudHJhbnNsYXRlViA9IDA7XG4gICAgfVxuXG4gICAgZmxpcEhvcml6b250YWwoKTogdm9pZCB7XG4gICAgICAgIHRoaXMudHJhbnNmb3JtID0ge1xuICAgICAgICAgICAgLi4udGhpcy50cmFuc2Zvcm0sXG4gICAgICAgICAgICBmbGlwSDogIXRoaXMudHJhbnNmb3JtLmZsaXBIXG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgZmxpcFZlcnRpY2FsKCk6IHZvaWQge1xuICAgICAgICB0aGlzLnRyYW5zZm9ybSA9IHtcbiAgICAgICAgICAgIC4uLnRoaXMudHJhbnNmb3JtLFxuICAgICAgICAgICAgZmxpcFY6ICF0aGlzLnRyYW5zZm9ybS5mbGlwVlxuICAgICAgICB9O1xuICAgIH1cblxuICAgIHJlc2V0SW1hZ2UoKTogdm9pZCB7XG4gICAgICAgIHRoaXMuc2NhbGUgPSAxO1xuICAgICAgICB0aGlzLnJvdGF0aW9uID0gMDtcbiAgICAgICAgdGhpcy5jYW52YXNSb3Rhd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