@eqproject/eqp-attachments 0.1.13 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/bundles/eqproject-eqp-attachments.umd.js +45 -4
- package/bundles/eqproject-eqp-attachments.umd.js.map +1 -1
- package/bundles/eqproject-eqp-attachments.umd.min.js +1 -1
- package/bundles/eqproject-eqp-attachments.umd.min.js.map +1 -1
- package/eqproject-eqp-attachments.metadata.json +1 -1
- package/esm2015/lib/eqp-attachments.component.js +46 -6
- package/esm5/lib/eqp-attachments.component.js +47 -6
- package/fesm2015/eqproject-eqp-attachments.js +44 -4
- package/fesm2015/eqproject-eqp-attachments.js.map +1 -1
- package/fesm5/eqproject-eqp-attachments.js +45 -4
- package/fesm5/eqproject-eqp-attachments.js.map +1 -1
- package/lib/eqp-attachments.component.d.ts +28 -4
- package/package.json +1 -1
|
@@ -303,9 +303,20 @@ var EqpAttachmentsComponent = /** @class */ (function () {
|
|
|
303
303
|
*/
|
|
304
304
|
this.allowedTypes = [AttachmentType.FILE, AttachmentType.LINK];
|
|
305
305
|
/**
|
|
306
|
-
*
|
|
306
|
+
* Permette di stabilire se la eqp-table contenente l'elenco degli allegati utilizza
|
|
307
|
+
* il multilingua oppure no
|
|
307
308
|
*/
|
|
308
309
|
this.isEqpTableMultiLanguage = false;
|
|
310
|
+
/**
|
|
311
|
+
* Permette di stabilire, in caso di gestione allegati multipli, se la tabella contenente l'elenco
|
|
312
|
+
* degli allegati deve essere paginata oppure no
|
|
313
|
+
*/
|
|
314
|
+
this.tablePaginatorVisible = true;
|
|
315
|
+
/**
|
|
316
|
+
* In caso di gestione allegati multipli, permette di stabilire la dimensione pagina di default
|
|
317
|
+
* per la tabella contenente l'elenco degli allegati
|
|
318
|
+
*/
|
|
319
|
+
this.tablePaginatorSize = null;
|
|
309
320
|
/**
|
|
310
321
|
* Input per definire le label da usare nel componente
|
|
311
322
|
*/
|
|
@@ -334,6 +345,10 @@ var EqpAttachmentsComponent = /** @class */ (function () {
|
|
|
334
345
|
* Restituisce la lista aggiornata degli allegati.
|
|
335
346
|
*/
|
|
336
347
|
this.localEditedAttachments = new EventEmitter();
|
|
348
|
+
/**
|
|
349
|
+
* Evento scatenato alla pressione del pulsante ESCI della modale di caricamento file.
|
|
350
|
+
*/
|
|
351
|
+
this.abortAddAttachment = new EventEmitter();
|
|
337
352
|
/**
|
|
338
353
|
* Evento di output che restituisce l'IAttachmentDTO selezionato per il download nel caso FileDataBase64, FileContentType o FileName non fossero specificati.
|
|
339
354
|
*/
|
|
@@ -342,6 +357,14 @@ var EqpAttachmentsComponent = /** @class */ (function () {
|
|
|
342
357
|
* Evento di output che restituisce l'elemento eliminato prima che questo venga effettivamente rismosso dalla lista.
|
|
343
358
|
*/
|
|
344
359
|
this.onDeleteAttachment = new EventEmitter();
|
|
360
|
+
/**
|
|
361
|
+
* Evento di output scatenato durante l'AfterViewInit del componente che restituisce l'istanza corrente del componente.
|
|
362
|
+
* Questo evento avvisa quando il componente è stato renderizzato, utile per esempio quando si vogliono aggiungere delle colonne
|
|
363
|
+
* alla visualizzazione con allegati multipli lasciando però quelle pre esistenti. Questo si può fare intervenendo sulla
|
|
364
|
+
* proprietà "attachmentsColumns" di questo componente tramite l'istanza passata come paramentro oppure tramite ViewChild
|
|
365
|
+
* dal componente che lo ospita.
|
|
366
|
+
*/
|
|
367
|
+
this.onComponentLoaded = new EventEmitter();
|
|
345
368
|
//#endregion
|
|
346
369
|
//#region Proprietà per gestione caricamento nuovo allegato
|
|
347
370
|
this.newAttachment = {};
|
|
@@ -380,6 +403,9 @@ var EqpAttachmentsComponent = /** @class */ (function () {
|
|
|
380
403
|
this.attachmentsList = new Array();
|
|
381
404
|
this.checkAttachmentImage();
|
|
382
405
|
};
|
|
406
|
+
EqpAttachmentsComponent.prototype.ngAfterViewInit = function () {
|
|
407
|
+
this.onComponentLoaded.emit(this);
|
|
408
|
+
};
|
|
383
409
|
EqpAttachmentsComponent.prototype.reloadData = function () {
|
|
384
410
|
if (this.attachmentTable)
|
|
385
411
|
this.attachmentTable.reloadDatatable();
|
|
@@ -519,13 +545,16 @@ var EqpAttachmentsComponent = /** @class */ (function () {
|
|
|
519
545
|
customWidth: [this.customWidth]
|
|
520
546
|
});
|
|
521
547
|
};
|
|
522
|
-
EqpAttachmentsComponent.prototype.close = function () {
|
|
548
|
+
EqpAttachmentsComponent.prototype.close = function (emitCloseEvent) {
|
|
549
|
+
if (emitCloseEvent === void 0) { emitCloseEvent = true; }
|
|
523
550
|
this.newAttachment = {};
|
|
524
551
|
this.newMultipleAttachments = new Array();
|
|
525
552
|
this.abortFile();
|
|
526
553
|
if (this.newAttachmentForm)
|
|
527
554
|
this.newAttachmentForm.reset();
|
|
528
555
|
this.dialofRefAddAttachment.close();
|
|
556
|
+
if (emitCloseEvent == true && this.abortAddAttachment)
|
|
557
|
+
this.abortAddAttachment.emit();
|
|
529
558
|
};
|
|
530
559
|
/**
|
|
531
560
|
* In base al tipo di allegato controlla se disabilitare o meno il pulsante per salvare.
|
|
@@ -563,7 +592,7 @@ var EqpAttachmentsComponent = /** @class */ (function () {
|
|
|
563
592
|
if (this.attachmentTable)
|
|
564
593
|
this.attachmentTable.reloadDatatable();
|
|
565
594
|
this.localEditedAttachments.emit(this.attachmentsList);
|
|
566
|
-
this.close();
|
|
595
|
+
this.close(false);
|
|
567
596
|
};
|
|
568
597
|
/**
|
|
569
598
|
* Apre il dialog per l'anteprima dell'allegato selezionato.
|
|
@@ -977,6 +1006,12 @@ var EqpAttachmentsComponent = /** @class */ (function () {
|
|
|
977
1006
|
__decorate([
|
|
978
1007
|
Input("isEqpTableMultiLanguage")
|
|
979
1008
|
], EqpAttachmentsComponent.prototype, "isEqpTableMultiLanguage", void 0);
|
|
1009
|
+
__decorate([
|
|
1010
|
+
Input("tablePaginatorVisible")
|
|
1011
|
+
], EqpAttachmentsComponent.prototype, "tablePaginatorVisible", void 0);
|
|
1012
|
+
__decorate([
|
|
1013
|
+
Input("tablePaginatorSize")
|
|
1014
|
+
], EqpAttachmentsComponent.prototype, "tablePaginatorSize", void 0);
|
|
980
1015
|
__decorate([
|
|
981
1016
|
Input("downloadTooltipPosition")
|
|
982
1017
|
], EqpAttachmentsComponent.prototype, "downloadTooltipPosition", void 0);
|
|
@@ -1037,12 +1072,18 @@ var EqpAttachmentsComponent = /** @class */ (function () {
|
|
|
1037
1072
|
__decorate([
|
|
1038
1073
|
Output()
|
|
1039
1074
|
], EqpAttachmentsComponent.prototype, "localEditedAttachments", void 0);
|
|
1075
|
+
__decorate([
|
|
1076
|
+
Output()
|
|
1077
|
+
], EqpAttachmentsComponent.prototype, "abortAddAttachment", void 0);
|
|
1040
1078
|
__decorate([
|
|
1041
1079
|
Output("downloadAttachment")
|
|
1042
1080
|
], EqpAttachmentsComponent.prototype, "downloadAttachment", void 0);
|
|
1043
1081
|
__decorate([
|
|
1044
1082
|
Output("onDeleteAttachment")
|
|
1045
1083
|
], EqpAttachmentsComponent.prototype, "onDeleteAttachment", void 0);
|
|
1084
|
+
__decorate([
|
|
1085
|
+
Output("onComponentLoaded")
|
|
1086
|
+
], EqpAttachmentsComponent.prototype, "onComponentLoaded", void 0);
|
|
1046
1087
|
__decorate([
|
|
1047
1088
|
ViewChild('dialogAddAttachment', { static: true })
|
|
1048
1089
|
], EqpAttachmentsComponent.prototype, "dialogAddAttachment", void 0);
|
|
@@ -1067,7 +1108,7 @@ var EqpAttachmentsComponent = /** @class */ (function () {
|
|
|
1067
1108
|
EqpAttachmentsComponent = __decorate([
|
|
1068
1109
|
Component({
|
|
1069
1110
|
selector: 'eqp-attachments',
|
|
1070
|
-
template: "<!-- Se richiesta la gestione multipla mostra il pulsante di aggiunta e la tabella con l'elenco allegati -->\r\n<div *ngIf=\"multipleAttachment == true\">\r\n <mat-card [ngStyle]=\"{ 'box-shadow': showMatCard == false ? 'none' : null }\">\r\n <mat-card-header>\r\n <div class=\"col-md-6\">\r\n <div class=\"text-nowrap eqp-attachments-header-title\" *ngIf=\"showHeader == true\">\r\n {{headerTitle}}\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 text-right\">\r\n <div class=\"row justify-content-end\">\r\n <!-- Template del button per l'aggiunta di un allegato -->\r\n <ng-container *ngTemplateOutlet=\"addAttachmentButton\"></ng-container>\r\n </div>\r\n </div>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <eqp-table #attachmentTable [createMatCard]=\"false\" #table [columns]=\"attachmentsColumns\"\r\n [isMultiLanguage]=\"isEqpTableMultiLanguage\" [data]=\"attachmentsList\"\r\n [emptyTableMessage]=\"emptyTableMessage\" [searchText]=\"eqpTableSearchText\">\r\n </eqp-table>\r\n </mat-card-content>\r\n </mat-card>\r\n</div>\r\n\r\n<!-- Se richiesta la gestione singola mostra il pulsante di caricamento di un singolo file -->\r\n<div *ngIf=\"multipleAttachment != true\">\r\n <!-- Template del button per l'aggiunta di un allegato -->\r\n <ng-container *ngTemplateOutlet=\"addAttachmentButton\"></ng-container>\r\n\r\n <button class=\"mb-2 mr-2 eqp-attachments-download-btn\" (click)=\"viewAttachment(attachmentsList[0])\" type=\"button\"\r\n mat-raised-button *ngIf=\"attachmentsList && attachmentsList.length > 0 && attachmentsList[0]\" color=\"primary\">\r\n <mat-icon *ngIf=\"attachmentsList[0].AttachmentType == AttachmentType.FILE\">download</mat-icon>\r\n <mat-icon *ngIf=\"attachmentsList[0].AttachmentType != AttachmentType.FILE\">open_in_new</mat-icon>\r\n {{attachmentsList[0].AttachmentType == AttachmentType.FILE ? downloadLabel : openLinkLabel}}\r\n </button>\r\n <button class=\"mb-2 mr-2 eqp-attachments-preview-btn\" (click)=\"openPreviewDialog(attachmentsList[0])\" type=\"button\"\r\n mat-raised-button color=\"primary\"\r\n *ngIf=\"attachmentsList && attachmentsList.length > 0 && attachmentsList[0] && (!attachmentsList[0].FileContentType || (!attachmentsList[0].FileContentType.startsWith('video') && !attachmentsList[0].FileContentType.startsWith('audio')))\">\r\n <mat-icon>visibility</mat-icon> {{previewLabel}}\r\n </button>\r\n <button class=\"mb-2 eqp-attachments-delete-btn\" (click)=\"deleteAttachment(attachmentsList[0])\" type=\"button\"\r\n mat-raised-button *ngIf=\"attachmentsList && attachmentsList.length > 0 && attachmentsList[0]\"\r\n [disabled]=\"isDisabled\">\r\n <mat-icon>delete</mat-icon> {{deleteLabel}}\r\n </button>\r\n\r\n <div class=\"row\" style=\"margin-top: 10px;\"\r\n *ngIf=\"attachmentsList.length > 0 && attachmentsList[0] && attachmentsList[0].FileDataBase64 && attachmentsList[0].IsImage == true\">\r\n <div class=\"col-sm-12\">\r\n <div class=\"single-attachment-inline-preview-container\">\r\n <img src=\"data:image/png;base64,{{attachmentsList[0].FileDataBase64}}\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row\" *ngIf=\"attachmentsList.length > 0 && attachmentsList[0] && attachmentsList[0].IsImage != true\">\r\n <div class=\"col-sm-12\">\r\n <mat-form-field>\r\n <mat-label>{{fileNameLabel}}</mat-label>\r\n <input readonly matInput [(ngModel)]=\"attachmentsList[0].FileName\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n\r\n<ng-template #dialogAddAttachment>\r\n <div class=\"container-fluid eqp-attachments-dialog-add-container\"\r\n style=\"max-height: 70vh !important; overflow-x: hidden; overflow-y: auto;\">\r\n <form [formGroup]=\"newAttachmentForm\" (ngSubmit)=\"confirmAddAttachment()\" *ngIf=\"newAttachmentForm\">\r\n <div class=\"row\">\r\n <div class=\"header-title-standard\"> {{addButtonLabel}} {{ newAttachment.AttachmentType ==\r\n attachmentType.FILE ?\r\n 'File' : 'Link'}} </div>\r\n </div>\r\n <div class=\"row\" style=\"margin-top: 20px;\">\r\n <div class=\"col-sm-12\" *ngIf=\"newAttachment.AttachmentType == attachmentType.FILE\">\r\n <input #imageInput style=\"display:none;\" id=\"file_attachment\"\r\n name=\"file_attachment\" type=\"file\" (change)=\"onFileInputChange($event)\"\r\n [accept]=\"acceptedFileTypes\" [multiple]=\"loadMultipleFiles\"/>\r\n <button (click)=\"imageInput.click()\" type=\"button\" style=\"margin-left: 10px;\" id=\"file_attachment\"\r\n mat-raised-button color=\"primary\" [disabled]=\"showCropImage == true\"\r\n class=\"mb-2 btn btn-primary eqp-attachments-upload-btn\" *ngIf=\"(loadMultipleFiles != true && !newAttachment.FileDataBase64) || (loadMultipleFiles == true && newMultipleAttachments && newMultipleAttachments.length == 0)\">\r\n <mat-icon>cloud_upload</mat-icon>\r\n {{uploadFileLabel}}\r\n </button>\r\n <button (click)=\"abortFile()\" type=\"button\" style=\"margin-left: 10px;\" mat-raised-button\r\n *ngIf=\"(loadMultipleFiles != true && newAttachment.FileDataBase64) || (loadMultipleFiles == true && newMultipleAttachments && newMultipleAttachments.length > 0)\" class=\"mb-2 eqp-attachments-delete-btn\">\r\n <mat-icon>delete</mat-icon> {{deleteLabel}}\r\n </button>\r\n </div>\r\n <div class=\"col-sm-12\" *ngIf=\"newAttachment.AttachmentType == 2 || (selectedFile && loadMultipleFiles != true)\">\r\n <mat-form-field style=\"width: 100%;\">\r\n <mat-label> {{fileNameLabel}} </mat-label>\r\n <input formControlName=\"name\" matInput [(ngModel)]=\"newAttachment.FileName\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12\" *ngIf=\"newAttachment.AttachmentType == 2\">\r\n <mat-form-field style=\"width: 100%;\">\r\n <mat-label> Link </mat-label>\r\n <input formControlName=\"path\" required matInput [(ngModel)]=\"newAttachment.FilePath\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <!-- Riporta l'elenco dei nomi dei file caricati contemporaneamente (visibile solo se loadMultipleFiles = TRUE e se ci sono realmente pi\u00F9 file senza link) -->\r\n <div class=\"row\" *ngIf=\"loadMultipleFiles == true && newMultipleAttachments && newMultipleAttachments.length > 0 && newMultipleAttachments[0].AttachmentType != attachmentType.LINK\">\r\n <div class=\"col-12\" *ngFor=\"let attach of newMultipleAttachments\">\r\n <mat-form-field style=\"width: 100%\">\r\n <mat-label> {{fileNameLabel}} </mat-label>\r\n <input disabled matInput [(ngModel)]=\"attach.FileName\" [ngModelOptions]=\"{standalone: true}\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <!-- Riporta la preview dell'immagine quando \u00E8 richiesto il caricamento MULTIPLO ma \u00E8 stata selezionata una sola immagine (quindi \u00E8 entrato in gioco anche il croppie) -->\r\n <div class=\"row\" *ngIf=\"loadMultipleFiles == true && showCropImage != true && newMultipleAttachments && newMultipleAttachments.length == 1 && newMultipleAttachments[0].IsImage == true\" style=\"margin-top: 10px;\">\r\n <div class=\"col-4\">\r\n <div class=\"single-attachment-inline-preview-container\">\r\n <img src=\"data:image/png;base64,{{newMultipleAttachments[0].FileDataBase64}}\">\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Riporta la preview dell'immagine quando \u00E8 richiesto il caricamento SINGOLO ed \u00E8 stata selezionata un'immagine -->\r\n <div class=\"row\" *ngIf=\"loadMultipleFiles != true && showCropImage != true && newAttachment.FileDataBase64 && newAttachment.IsImage == true\" style=\"margin-top: 10px;\">\r\n <div class=\"col-4\">\r\n <div class=\"single-attachment-inline-preview-container\">\r\n <img src=\"data:image/png;base64,{{newAttachment.FileDataBase64}}\">\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Richiama il template per le funzionalit\u00E0 del CROPPIE -->\r\n <ng-container [ngTemplateOutlet]=\"croppieTemplate\" [ngTemplateOutletContext]=\"{form: newAttachmentForm}\" *ngIf=\"showCropImage == true\"></ng-container>\r\n\r\n <div class=\"row mt-2\">\r\n <div class=\"col-sm-12 text-right\">\r\n <button class=\"btn btn-primary mat-raised-button eqp-attachments-save-btn mr-2\" type=\"submit\"\r\n [disabled]=\"showCropImage == true || (loadMultipleFiles != true && newAttachmentForm?.disabled == true) || disableSave()\">\r\n {{saveLabel}}\r\n </button>\r\n <button class=\"btn mat-raised-button eqp-attachments-exit-btn\" (click)=\"close()\"\r\n [disabled]=\"showCropImage == true\" type=\"button\">\r\n {{exitLabel}}\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #inlinePreviewTemplate let-row=\"row\">\r\n <div class=\"inline-preview-container\" *ngIf=\"row.AttachmentType != AttachmentType.LINK && row.IsImage\" (click)=\"openPreviewDialog(row)\">\r\n <img src=\"data:image/png;base64,{{row.FileThumbnailBase64 ? row.FileThumbnailBase64 : row.FileDataBase64}}\">\r\n </div>\r\n <div class=\"inline-preview-container\" *ngIf=\"row.AttachmentType != AttachmentType.LINK && !row.IsImage\" (click)=\"openPreviewDialog(row)\">\r\n <i [ngClass]=\"getAttachmentIcon(row)\"></i>\r\n </div>\r\n</ng-template>\r\n\r\n\r\n<ng-template #dialogPreview>\r\n <div class=\"container-fluid\" style=\"max-height: 70vh !important;\" *ngIf=\"selectedAttachment\">\r\n <div class=\"row\">\r\n <div class=\"header-title-standard\">\r\n {{previewLabel}} {{ selectedAttachment?.AttachmentType == attachmentType.FILE ? 'File' : 'Link'}}\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mt-2\">\r\n <!-- ANTEPRIMA IMMAGINE -->\r\n <div class=\"col-12 text-center preview-container\" *ngIf=\"selectedAttachment.IsImage\">\r\n <img class=\"image-preview\"\r\n src=\"data:image/png;base64,{{selectedAttachment.FileDataBase64 ? selectedAttachment.FileDataBase64 : selectedAttachment.FileThumbnailBase64}}\">\r\n </div>\r\n\r\n <!-- ANTEPRIMA LINK -->\r\n <div class=\"col-12 preview-container\" *ngIf=\"!selectedAttachment.IsImage\">\r\n <iframe class=\"link-preview\" [src]=\"selectedAttachment.TrustedUrl\"\r\n [title]=\"selectedAttachment.FileName\"></iframe>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mt-3\">\r\n <div class=\"col-sm-12 text-right\">\r\n <button class=\"btn btn-primary mat-raised-button eqp-attachments-save-btn mr-2\" type=\"submit\"\r\n (click)=\"viewAttachment(selectedAttachment)\"\r\n *ngIf=\"selectedAttachment.AttachmentType != AttachmentType.LINK\">\r\n {{downloadLabel}}\r\n </button>\r\n <button class=\"btn mat-raised-button eqp-attachments-exit-btn\" mat-dialog-close type=\"button\"\r\n (click)=\"selectedAttachment = null\">\r\n {{exitLabel}}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n\r\n<!-- TEMPLATE PER IL PULSANTE DI AGGIUNTA NUOVO ALLEGATO -->\r\n<ng-template #addAttachmentButton>\r\n\r\n <!-- \r\n Pulsanti per l'aggiunta di un file o un link. Ne viene visualizzato uno se:\r\n - gli allowedTypes sono stati specificati, nell'array ne \u00E8 presente uno solo, quello inserito \u00E8 AttachmentType.FILE (o AttachmentType.LINK) \r\n e sono nella gestione di pi\u00F9 allegati (multipleAttachment == true)\r\n OPPURE\r\n - gli allowedTypes sono stati specificati, nell'array ne \u00E8 presente uno solo, quello inserito \u00E8 AttachmentType.FILE (o AttachmentType.LINK) \r\n e sono nella gestione di un singolo allegato (multipleAttachment == true) e non ne \u00E8 ancora stato selezionato uno (ovvero attachmentsList non esiste o non ha elementi)\r\n -->\r\n <button class=\"btn btn-primary mb-4 mr-5 eqp-attachments-add-btn\" mat-raised-button color=\"primary\" type=\"button\"\r\n *ngIf=\"allowedTypes && allowedTypes.length == 1 && (multipleAttachment == true || (!attachmentsList || attachmentsList.length == 0 || (attachmentsList.length > 0 && !attachmentsList[0])))\"\r\n (click)=\"openModalAddAttachment(allowedTypes[0])\" [disabled]=\"isDisabled\">\r\n <!-- Per l'aggiunta dei file mostro un'icona diversa dall'aggiunta dei link -->\r\n <mat-icon *ngIf=\"allowedTypes[0] == 1\">cloud_upload</mat-icon>\r\n <i class=\"fas fa-link\" *ngIf=\"allowedTypes[0] == 2\"></i>\r\n <span style=\"margin-left: 10px;\">{{addButtonLabel}} {{allowedTypes[0] == 1 ? \"file\" : \"link\"}}</span>\r\n </button>\r\n\r\n\r\n <!-- Pulsante per aprire il menu per la scelta del tipo di Attachment da creare -->\r\n <button class=\"btn btn-primary mb-4 mr-5 eqp-attachments-add-btn\" mat-raised-button color=\"primary\" type=\"button\"\r\n [matMenuTriggerFor]=\"attachmentTypeMenu\" [disabled]=\"isDisabled\"\r\n *ngIf=\"allowedTypes && allowedTypes.length > 1 && (multipleAttachment == true || (!attachmentsList || attachmentsList.length == 0 || (attachmentsList.length > 0 && !attachmentsList[0])))\">\r\n <mat-icon *ngIf=\"multipleAttachment != true\">cloud_upload</mat-icon>\r\n <mat-icon *ngIf=\"multipleAttachment == true\">add</mat-icon>\r\n <span style=\"margin-left: 0px;\"> {{addButtonLabel}} </span>\r\n </button>\r\n <mat-menu #attachmentTypeMenu=\"matMenu\">\r\n <button mat-menu-item (click)=\"openModalAddAttachment(1)\" class=\"eqp-attachments-file-btn\">\r\n <i class=\"fas fa-file\"></i>\r\n <span style=\"margin-left: 10px;\">File</span>\r\n </button>\r\n <button mat-menu-item (click)=\"openModalAddAttachment(2)\" class=\"eqp-attachments-link-btn\">\r\n <i class=\"fas fa-link\"></i>\r\n <span style=\"margin-left: 10px;\">Link</span>\r\n </button>\r\n </mat-menu>\r\n</ng-template>\r\n\r\n\r\n<ng-template #croppieTemplate let-form=\"form\">\r\n <div class=\"row mt-2 mb-2\" [formGroup]=\"form\">\r\n <div class=\"col-md-12 d-flex align-items-center justify-content-center\">\r\n <span class=\"mr-1\">Max H(px):</span>\r\n <mat-form-field>\r\n <input formControlName=\"customHeight\" type=\"number\" matInput [(ngModel)]=\"customHeight\"\r\n (change)=\"onDimensionsChange('H')\">\r\n </mat-form-field>\r\n\r\n <span class=\"ml-2 mr-1\">Max W(px):</span>\r\n <mat-form-field>\r\n <input formControlName=\"customWidth\" type=\"number\" matInput [(ngModel)]=\"customWidth\"\r\n (change)=\"onDimensionsChange('W')\">\r\n </mat-form-field>\r\n\r\n <button class=\"btn btn-primary mat-raised-button ml-2\" (click)=\"restoreOriginalDimensions()\"\r\n [disabled]=\"customWidth == originalWidth && customHeight == originalHeight\">\r\n <mat-icon style=\"vertical-align: middle;\">replay</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"row justify-content-center\">\r\n <div style=\"max-height: 450px; max-width: 450px;\">\r\n <image-cropper [imageChangedEvent]=\"imageChangedEvent\" [maintainAspectRatio]=\"false\"\r\n [autoCrop]=\"false\" [containWithinAspectRatio]=\"false\" [aspectRatio]=\"4/3\"\r\n [cropperMinWidth]=\"128\" [onlyScaleDown]=\"true\" [roundCropper]=\"false\" [canvasRotation]=\"0\"\r\n [transform]=\"transform\" [alignImage]=\"'left'\" format=\"png\" (imageCropped)=\"imageCropped($event)\"\r\n [resizeToWidth]=\"customWidth\" [resizeToHeight]=\"customHeight\">\r\n </image-cropper>\r\n </div>\r\n </div>\r\n <div class=\"row justify-content-center mt-2\">\r\n <div style=\"max-height: 450px; max-width: 450px;\">\r\n <button class=\"btn btn-primary mat-raised-button eqp-attachments-confirm-btn mr-2\" type=\"button\"\r\n (click)=\"confirmCrop()\">\r\n {{confirmLabel}}\r\n </button>\r\n <button class=\"btn mat-raised-button eqp-attachments-abort-btn\" type=\"button\" (click)=\"abortFile()\">\r\n {{abortLabel}}\r\n </button>\r\n </div>\r\n </div>\r\n</ng-template>",
|
|
1111
|
+
template: "<!-- Se richiesta la gestione multipla mostra il pulsante di aggiunta e la tabella con l'elenco allegati -->\r\n<div *ngIf=\"multipleAttachment == true\">\r\n <mat-card [ngStyle]=\"{ 'box-shadow': showMatCard == false ? 'none' : null }\">\r\n <mat-card-header>\r\n <div class=\"col-md-6\">\r\n <div class=\"text-nowrap eqp-attachments-header-title\" *ngIf=\"showHeader == true\">\r\n {{headerTitle}}\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 text-right\">\r\n <div class=\"row justify-content-end\">\r\n <!-- Template del button per l'aggiunta di un allegato -->\r\n <ng-container *ngTemplateOutlet=\"addAttachmentButton\"></ng-container>\r\n </div>\r\n </div>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <eqp-table #attachmentTable [createMatCard]=\"false\" #table [columns]=\"attachmentsColumns\"\r\n [isMultiLanguage]=\"isEqpTableMultiLanguage\" [data]=\"attachmentsList\"\r\n [paginatorVisible]=\"tablePaginatorVisible\" [matPaginatorSize]=\"tablePaginatorSize\"\r\n [emptyTableMessage]=\"emptyTableMessage\" [searchText]=\"eqpTableSearchText\">\r\n </eqp-table>\r\n </mat-card-content>\r\n </mat-card>\r\n</div>\r\n\r\n<!-- Se richiesta la gestione singola mostra il pulsante di caricamento di un singolo file -->\r\n<div *ngIf=\"multipleAttachment != true\">\r\n <!-- Template del button per l'aggiunta di un allegato -->\r\n <ng-container *ngTemplateOutlet=\"addAttachmentButton\"></ng-container>\r\n\r\n <button class=\"mb-2 mr-2 eqp-attachments-download-btn\" (click)=\"viewAttachment(attachmentsList[0])\" type=\"button\"\r\n mat-raised-button *ngIf=\"attachmentsList && attachmentsList.length > 0 && attachmentsList[0]\" color=\"primary\">\r\n <mat-icon *ngIf=\"attachmentsList[0].AttachmentType == AttachmentType.FILE\">download</mat-icon>\r\n <mat-icon *ngIf=\"attachmentsList[0].AttachmentType != AttachmentType.FILE\">open_in_new</mat-icon>\r\n {{attachmentsList[0].AttachmentType == AttachmentType.FILE ? downloadLabel : openLinkLabel}}\r\n </button>\r\n <button class=\"mb-2 mr-2 eqp-attachments-preview-btn\" (click)=\"openPreviewDialog(attachmentsList[0])\" type=\"button\"\r\n mat-raised-button color=\"primary\"\r\n *ngIf=\"attachmentsList && attachmentsList.length > 0 && attachmentsList[0] && (!attachmentsList[0].FileContentType || (!attachmentsList[0].FileContentType.startsWith('video') && !attachmentsList[0].FileContentType.startsWith('audio')))\">\r\n <mat-icon>visibility</mat-icon> {{previewLabel}}\r\n </button>\r\n <button class=\"mb-2 eqp-attachments-delete-btn\" (click)=\"deleteAttachment(attachmentsList[0])\" type=\"button\"\r\n mat-raised-button *ngIf=\"attachmentsList && attachmentsList.length > 0 && attachmentsList[0]\"\r\n [disabled]=\"isDisabled\">\r\n <mat-icon>delete</mat-icon> {{deleteLabel}}\r\n </button>\r\n\r\n <div class=\"row\" style=\"margin-top: 10px;\"\r\n *ngIf=\"attachmentsList.length > 0 && attachmentsList[0] && attachmentsList[0].FileDataBase64 && attachmentsList[0].IsImage == true\">\r\n <div class=\"col-sm-12\">\r\n <div class=\"single-attachment-inline-preview-container\">\r\n <img src=\"data:image/png;base64,{{attachmentsList[0].FileDataBase64}}\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row\" *ngIf=\"attachmentsList.length > 0 && attachmentsList[0] && attachmentsList[0].IsImage != true\">\r\n <div class=\"col-sm-12\">\r\n <mat-form-field>\r\n <mat-label>{{fileNameLabel}}</mat-label>\r\n <input readonly matInput [(ngModel)]=\"attachmentsList[0].FileName\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n\r\n<ng-template #dialogAddAttachment>\r\n <div class=\"container-fluid eqp-attachments-dialog-add-container\"\r\n style=\"max-height: 70vh !important; overflow-x: hidden; overflow-y: auto;\">\r\n <form [formGroup]=\"newAttachmentForm\" (ngSubmit)=\"confirmAddAttachment()\" *ngIf=\"newAttachmentForm\">\r\n <div class=\"row\">\r\n <div class=\"header-title-standard\"> {{addButtonLabel}} {{ newAttachment.AttachmentType ==\r\n attachmentType.FILE ?\r\n 'File' : 'Link'}} </div>\r\n </div>\r\n <div class=\"row\" style=\"margin-top: 20px;\">\r\n <div class=\"col-sm-12\" *ngIf=\"newAttachment.AttachmentType == attachmentType.FILE\">\r\n <input #imageInput style=\"display:none;\" id=\"file_attachment\"\r\n name=\"file_attachment\" type=\"file\" (change)=\"onFileInputChange($event)\"\r\n [accept]=\"acceptedFileTypes\" [multiple]=\"loadMultipleFiles\"/>\r\n <button (click)=\"imageInput.click()\" type=\"button\" style=\"margin-left: 10px;\" id=\"file_attachment\"\r\n mat-raised-button color=\"primary\" [disabled]=\"showCropImage == true\"\r\n class=\"mb-2 btn btn-primary eqp-attachments-upload-btn\" *ngIf=\"(loadMultipleFiles != true && !newAttachment.FileDataBase64) || (loadMultipleFiles == true && newMultipleAttachments && newMultipleAttachments.length == 0)\">\r\n <mat-icon>cloud_upload</mat-icon>\r\n {{uploadFileLabel}}\r\n </button>\r\n <button (click)=\"abortFile()\" type=\"button\" style=\"margin-left: 10px;\" mat-raised-button\r\n *ngIf=\"(loadMultipleFiles != true && newAttachment.FileDataBase64) || (loadMultipleFiles == true && newMultipleAttachments && newMultipleAttachments.length > 0)\" class=\"mb-2 eqp-attachments-delete-btn\">\r\n <mat-icon>delete</mat-icon> {{deleteLabel}}\r\n </button>\r\n </div>\r\n <div class=\"col-sm-12\" *ngIf=\"newAttachment.AttachmentType == 2 || (selectedFile && loadMultipleFiles != true)\">\r\n <mat-form-field style=\"width: 100%;\">\r\n <mat-label> {{fileNameLabel}} </mat-label>\r\n <input formControlName=\"name\" matInput [(ngModel)]=\"newAttachment.FileName\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-sm-12\" *ngIf=\"newAttachment.AttachmentType == 2\">\r\n <mat-form-field style=\"width: 100%;\">\r\n <mat-label> Link </mat-label>\r\n <input formControlName=\"path\" required matInput [(ngModel)]=\"newAttachment.FilePath\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <!-- Riporta l'elenco dei nomi dei file caricati contemporaneamente (visibile solo se loadMultipleFiles = TRUE e se ci sono realmente pi\u00F9 file senza link) -->\r\n <div class=\"row\" *ngIf=\"loadMultipleFiles == true && newMultipleAttachments && newMultipleAttachments.length > 0 && newMultipleAttachments[0].AttachmentType != attachmentType.LINK\">\r\n <div class=\"col-12\" *ngFor=\"let attach of newMultipleAttachments\">\r\n <mat-form-field style=\"width: 100%\">\r\n <mat-label> {{fileNameLabel}} </mat-label>\r\n <input disabled matInput [(ngModel)]=\"attach.FileName\" [ngModelOptions]=\"{standalone: true}\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <!-- Riporta la preview dell'immagine quando \u00E8 richiesto il caricamento MULTIPLO ma \u00E8 stata selezionata una sola immagine (quindi \u00E8 entrato in gioco anche il croppie) -->\r\n <div class=\"row\" *ngIf=\"loadMultipleFiles == true && showCropImage != true && newMultipleAttachments && newMultipleAttachments.length == 1 && newMultipleAttachments[0].IsImage == true\" style=\"margin-top: 10px;\">\r\n <div class=\"col-4\">\r\n <div class=\"single-attachment-inline-preview-container\">\r\n <img src=\"data:image/png;base64,{{newMultipleAttachments[0].FileDataBase64}}\">\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Riporta la preview dell'immagine quando \u00E8 richiesto il caricamento SINGOLO ed \u00E8 stata selezionata un'immagine -->\r\n <div class=\"row\" *ngIf=\"loadMultipleFiles != true && showCropImage != true && newAttachment.FileDataBase64 && newAttachment.IsImage == true\" style=\"margin-top: 10px;\">\r\n <div class=\"col-4\">\r\n <div class=\"single-attachment-inline-preview-container\">\r\n <img src=\"data:image/png;base64,{{newAttachment.FileDataBase64}}\">\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Richiama il template per le funzionalit\u00E0 del CROPPIE -->\r\n <ng-container [ngTemplateOutlet]=\"croppieTemplate\" [ngTemplateOutletContext]=\"{form: newAttachmentForm}\" *ngIf=\"showCropImage == true\"></ng-container>\r\n\r\n <div class=\"row mt-2\">\r\n <div class=\"col-sm-12 text-right\">\r\n <button class=\"btn btn-primary mat-raised-button eqp-attachments-save-btn mr-2\" type=\"submit\"\r\n [disabled]=\"showCropImage == true || (loadMultipleFiles != true && newAttachmentForm?.disabled == true) || disableSave()\">\r\n {{saveLabel}}\r\n </button>\r\n <button class=\"btn mat-raised-button eqp-attachments-exit-btn\" (click)=\"close()\"\r\n [disabled]=\"showCropImage == true\" type=\"button\">\r\n {{exitLabel}}\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #inlinePreviewTemplate let-row=\"row\">\r\n <div class=\"inline-preview-container\" *ngIf=\"row.AttachmentType != AttachmentType.LINK && row.IsImage\" (click)=\"openPreviewDialog(row)\">\r\n <img src=\"data:image/png;base64,{{row.FileThumbnailBase64 ? row.FileThumbnailBase64 : row.FileDataBase64}}\">\r\n </div>\r\n <div class=\"inline-preview-container\" *ngIf=\"row.AttachmentType != AttachmentType.LINK && !row.IsImage\" (click)=\"openPreviewDialog(row)\">\r\n <i [ngClass]=\"getAttachmentIcon(row)\"></i>\r\n </div>\r\n</ng-template>\r\n\r\n\r\n<ng-template #dialogPreview>\r\n <div class=\"container-fluid\" style=\"max-height: 70vh !important;\" *ngIf=\"selectedAttachment\">\r\n <div class=\"row\">\r\n <div class=\"header-title-standard\">\r\n {{previewLabel}} {{ selectedAttachment?.AttachmentType == attachmentType.FILE ? 'File' : 'Link'}}\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mt-2\">\r\n <!-- ANTEPRIMA IMMAGINE -->\r\n <div class=\"col-12 text-center preview-container\" *ngIf=\"selectedAttachment.IsImage\">\r\n <img class=\"image-preview\"\r\n src=\"data:image/png;base64,{{selectedAttachment.FileDataBase64 ? selectedAttachment.FileDataBase64 : selectedAttachment.FileThumbnailBase64}}\">\r\n </div>\r\n\r\n <!-- ANTEPRIMA LINK -->\r\n <div class=\"col-12 preview-container\" *ngIf=\"!selectedAttachment.IsImage\">\r\n <iframe class=\"link-preview\" [src]=\"selectedAttachment.TrustedUrl\"\r\n [title]=\"selectedAttachment.FileName\"></iframe>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mt-3\">\r\n <div class=\"col-sm-12 text-right\">\r\n <button class=\"btn btn-primary mat-raised-button eqp-attachments-save-btn mr-2\" type=\"submit\"\r\n (click)=\"viewAttachment(selectedAttachment)\"\r\n *ngIf=\"selectedAttachment.AttachmentType != AttachmentType.LINK\">\r\n {{downloadLabel}}\r\n </button>\r\n <button class=\"btn mat-raised-button eqp-attachments-exit-btn\" mat-dialog-close type=\"button\"\r\n (click)=\"selectedAttachment = null\">\r\n {{exitLabel}}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n\r\n<!-- TEMPLATE PER IL PULSANTE DI AGGIUNTA NUOVO ALLEGATO -->\r\n<ng-template #addAttachmentButton>\r\n\r\n <!-- \r\n Pulsanti per l'aggiunta di un file o un link. Ne viene visualizzato uno se:\r\n - gli allowedTypes sono stati specificati, nell'array ne \u00E8 presente uno solo, quello inserito \u00E8 AttachmentType.FILE (o AttachmentType.LINK) \r\n e sono nella gestione di pi\u00F9 allegati (multipleAttachment == true)\r\n OPPURE\r\n - gli allowedTypes sono stati specificati, nell'array ne \u00E8 presente uno solo, quello inserito \u00E8 AttachmentType.FILE (o AttachmentType.LINK) \r\n e sono nella gestione di un singolo allegato (multipleAttachment == true) e non ne \u00E8 ancora stato selezionato uno (ovvero attachmentsList non esiste o non ha elementi)\r\n -->\r\n <button class=\"btn btn-primary mb-4 mr-5 eqp-attachments-add-btn\" mat-raised-button color=\"primary\" type=\"button\"\r\n *ngIf=\"allowedTypes && allowedTypes.length == 1 && (multipleAttachment == true || (!attachmentsList || attachmentsList.length == 0 || (attachmentsList.length > 0 && !attachmentsList[0])))\"\r\n (click)=\"openModalAddAttachment(allowedTypes[0])\" [disabled]=\"isDisabled\">\r\n <!-- Per l'aggiunta dei file mostro un'icona diversa dall'aggiunta dei link -->\r\n <mat-icon *ngIf=\"allowedTypes[0] == 1\">cloud_upload</mat-icon>\r\n <i class=\"fas fa-link\" *ngIf=\"allowedTypes[0] == 2\"></i>\r\n <span style=\"margin-left: 10px;\">{{addButtonLabel}} {{allowedTypes[0] == 1 ? \"file\" : \"link\"}}</span>\r\n </button>\r\n\r\n\r\n <!-- Pulsante per aprire il menu per la scelta del tipo di Attachment da creare -->\r\n <button class=\"btn btn-primary mb-4 mr-5 eqp-attachments-add-btn\" mat-raised-button color=\"primary\" type=\"button\"\r\n [matMenuTriggerFor]=\"attachmentTypeMenu\" [disabled]=\"isDisabled\"\r\n *ngIf=\"allowedTypes && allowedTypes.length > 1 && (multipleAttachment == true || (!attachmentsList || attachmentsList.length == 0 || (attachmentsList.length > 0 && !attachmentsList[0])))\">\r\n <mat-icon *ngIf=\"multipleAttachment != true\">cloud_upload</mat-icon>\r\n <mat-icon *ngIf=\"multipleAttachment == true\">add</mat-icon>\r\n <span style=\"margin-left: 0px;\"> {{addButtonLabel}} </span>\r\n </button>\r\n <mat-menu #attachmentTypeMenu=\"matMenu\">\r\n <button mat-menu-item (click)=\"openModalAddAttachment(1)\" class=\"eqp-attachments-file-btn\">\r\n <i class=\"fas fa-file\"></i>\r\n <span style=\"margin-left: 10px;\">File</span>\r\n </button>\r\n <button mat-menu-item (click)=\"openModalAddAttachment(2)\" class=\"eqp-attachments-link-btn\">\r\n <i class=\"fas fa-link\"></i>\r\n <span style=\"margin-left: 10px;\">Link</span>\r\n </button>\r\n </mat-menu>\r\n</ng-template>\r\n\r\n\r\n<ng-template #croppieTemplate let-form=\"form\">\r\n <div class=\"row mt-2 mb-2\" [formGroup]=\"form\">\r\n <div class=\"col-md-12 d-flex align-items-center justify-content-center\">\r\n <span class=\"mr-1\">Max H(px):</span>\r\n <mat-form-field>\r\n <input formControlName=\"customHeight\" type=\"number\" matInput [(ngModel)]=\"customHeight\"\r\n (change)=\"onDimensionsChange('H')\">\r\n </mat-form-field>\r\n\r\n <span class=\"ml-2 mr-1\">Max W(px):</span>\r\n <mat-form-field>\r\n <input formControlName=\"customWidth\" type=\"number\" matInput [(ngModel)]=\"customWidth\"\r\n (change)=\"onDimensionsChange('W')\">\r\n </mat-form-field>\r\n\r\n <button class=\"btn btn-primary mat-raised-button ml-2\" (click)=\"restoreOriginalDimensions()\"\r\n [disabled]=\"customWidth == originalWidth && customHeight == originalHeight\">\r\n <mat-icon style=\"vertical-align: middle;\">replay</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"row justify-content-center\">\r\n <div style=\"max-height: 450px; max-width: 450px;\">\r\n <image-cropper [imageChangedEvent]=\"imageChangedEvent\" [maintainAspectRatio]=\"false\"\r\n [autoCrop]=\"false\" [containWithinAspectRatio]=\"false\" [aspectRatio]=\"4/3\"\r\n [cropperMinWidth]=\"128\" [onlyScaleDown]=\"true\" [roundCropper]=\"false\" [canvasRotation]=\"0\"\r\n [transform]=\"transform\" [alignImage]=\"'left'\" format=\"png\" (imageCropped)=\"imageCropped($event)\"\r\n [resizeToWidth]=\"customWidth\" [resizeToHeight]=\"customHeight\">\r\n </image-cropper>\r\n </div>\r\n </div>\r\n <div class=\"row justify-content-center mt-2\">\r\n <div style=\"max-height: 450px; max-width: 450px;\">\r\n <button class=\"btn btn-primary mat-raised-button eqp-attachments-confirm-btn mr-2\" type=\"button\"\r\n (click)=\"confirmCrop()\">\r\n {{confirmLabel}}\r\n </button>\r\n <button class=\"btn mat-raised-button eqp-attachments-abort-btn\" type=\"button\" (click)=\"abortFile()\">\r\n {{abortLabel}}\r\n </button>\r\n </div>\r\n </div>\r\n</ng-template>",
|
|
1071
1112
|
styles: [".eqp-attachments-header-title{font-weight:700;font-size:19px;line-height:24px;margin-bottom:auto}.single-attachment-inline-preview-container{max-height:400px;max-width:400px;display:flex;align-items:center}.single-attachment-inline-preview-container img{max-width:100%;max-height:120px}.inline-preview-container{max-height:100px;max-width:100px;display:flex;align-items:center;justify-content:center;width:100%;cursor:pointer}.inline-preview-container img{max-width:100%;max-height:100px}.inline-preview-container i{font-size:25px;margin:auto}.preview-container{max-height:60vh;max-width:100%}.preview-container .image-preview{max-width:100%;max-height:100%}.preview-container .link-preview{width:70vw;height:55vh}"]
|
|
1072
1113
|
})
|
|
1073
1114
|
], EqpAttachmentsComponent);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eqproject-eqp-attachments.js","sources":["ng://@eqproject/eqp-attachments/lib/interfaces/IAttachment.ts","ng://@eqproject/eqp-attachments/lib/helpers/attachment.helper.ts","ng://@eqproject/eqp-attachments/lib/services/eqp-attachment-dialog.service.ts","ng://@eqproject/eqp-attachments/lib/eqp-attachments.component.ts","ng://@eqproject/eqp-attachments/lib/modules/material.module.ts","ng://@eqproject/eqp-attachments/lib/eqp-attachments.module.ts","ng://@eqproject/eqp-attachments/public-api.ts","ng://@eqproject/eqp-attachments/eqproject-eqp-attachments.ts"],"sourcesContent":["export interface IAttachmentDTO {\r\n ID: number | string;\r\n FileName?: string;\r\n FileContentType?: string;\r\n FileExtension?: string;\r\n FilePath?: string;\r\n AttachmentType?: AttachmentType;\r\n FileDataBase64?: string;\r\n IsImage?: boolean;\r\n FileThumbnailBase64?: string;\r\n TrustedUrl?: any;\r\n}\r\n\r\nexport enum AttachmentType {\r\n FILE = 1,\r\n LINK = 2\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AttachmentHelperService {\r\n\r\n static readonly imageMimeTypes: string[] = [\"image/bmp\", \"image/gif\", \"image/jpeg\", \"image/tiff\", \"image/png\"];\r\n\r\n static readonly fileExtensionIcon: any = {\r\n \"txt\": \"fas fa-file-text\",\r\n \"pdf\": \"fas fa-file-pdf\",\r\n \"doc\": \"fas fa-file-word\",\r\n \"docx\": \"fas fa-file-word\",\r\n \"xls\": \"fas fa-file-excel\",\r\n \"xlsx\": \"fas fa-file-excel\",\r\n \"jpg\": \"fas fa-file-image\",\r\n \"jpeg\": \"fas fa-file-image\",\r\n \"png\": \"fas fa-file-image\",\r\n \"bmp\": \"fas fa-file-image\",\r\n\r\n \"mkv\": \"fas fa-file-video\",\r\n \"flv\": \"fas fa-file-video\",\r\n \"gif\": \"fas fa-file-video\",\r\n \"gifv\": \"fas fa-file-video\",\r\n \"avi\": \"fas fa-file-video\",\r\n \"wmv\": \"fas fa-file-video\",\r\n \"mp4\": \"fas fa-file-video\",\r\n \"m4p\": \"fas fa-file-video\",\r\n \"m4v\": \"fas fa-file-video\",\r\n \"mpg\": \"fas fa-file-video\",\r\n \"mp2\": \"fas fa-file-video\",\r\n \"mpeg\": \"fas fa-file-video\",\r\n \"mpe\": \"fas fa-file-video\",\r\n \"mpv\": \"fas fa-file-video\",\r\n \"m2v\": \"fas fa-file-video\",\r\n \"3gp\": \"fas fa-file-video\",\r\n \"3g2\": \"fas fa-file-video\",\r\n\r\n \"mp3\": \"fas fa-file-audio\",\r\n };\r\n\r\n constructor() { }\r\n\r\n /**\r\n * Restituisce TRUE se il mime type passato nel parametro corrisponde ad un mime type di un'immagine\r\n * @param mimeType Mime Type da verificare\r\n */\r\n static checkImageFromMimeType(mimeType: string): boolean {\r\n return this.imageMimeTypes.find(s => s == mimeType) != null;\r\n }\r\n\r\n /**\r\n * In base all'estensione passata come parametro, restituisce la FontAwesome corretta da utilizzare.\r\n * Se l'estensione non viene trovata nella costante riportata dentro common.model.ts restituisce un icona standard\r\n * @param extension Estensione del file per cui restituire l'icona corretta\r\n */\r\n static getIconFromFileExtensione(extension: string): string {\r\n let fileIcon = this.fileExtensionIcon[extension];\r\n return fileIcon ?? \"fas fa-file\";\r\n }\r\n\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport Swal from 'sweetalert2';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class EqpAttachmentDialogService {\r\n\r\n constructor() { }\r\n\r\n /**\r\n * Mostra uno sweet alert di tipo ERROR con il messaggio passato come parametro.\r\n * @param message Messaggio d'errore da mostrare nello sweetalert\r\n * @param title Titolo dello sweetalert (di default mostra 'Errore')\r\n */\r\n static Error(message: string | string[], title: string = null) {\r\n let currentTitle = title != null ? title : 'Errore';\r\n if (Array.isArray(message)) {\r\n currentTitle = title != null ? title : 'Errore';\r\n let htmlErrors: string = message.join(\"<br>\");\r\n Swal.fire({\r\n title: currentTitle,\r\n html: htmlErrors,\r\n icon: 'error'\r\n });\r\n }\r\n else {\r\n Swal.fire(currentTitle, message, 'error');\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Mostra uno sweetalert di tipo CONFIRM con il messaggio passato come parametro e se viene premuto\r\n * CONFERMA lancia la funzione di callback passata come parametro\r\n * @param message Messaggio da mostrare nello sweetalert\r\n * @param title Titolo dello sweetalert (di default mostra 'Info')\r\n */\r\n static Confirm(message: string | string[], confirmCallback: any, isWarning: boolean = false, title: string = null, customWidth: string = null) {\r\n\r\n let currentTitle = title != null ? title : 'Sei sicuro di voler procedere?';\r\n if (Array.isArray(message)) {\r\n let htmlErrors: string = message.join(\"<br>\");\r\n Swal.fire({\r\n title: currentTitle,\r\n html: htmlErrors,\r\n width: customWidth ? customWidth : '32rem',\r\n icon: !isWarning ? 'question' : 'warning',\r\n showCancelButton: true,\r\n allowOutsideClick: false,\r\n allowEscapeKey: false\r\n }).then((result) => {\r\n if (result.value && confirmCallback) {\r\n confirmCallback();\r\n }\r\n });\r\n }\r\n else {\r\n Swal.fire({\r\n title: currentTitle,\r\n text: message,\r\n width: customWidth ? customWidth : '32rem',\r\n icon: !isWarning ? 'question' : 'warning',\r\n showCancelButton: true,\r\n allowOutsideClick: false,\r\n allowEscapeKey: false\r\n }).then((result) => {\r\n if (result.value && confirmCallback) {\r\n confirmCallback();\r\n }\r\n })\r\n }\r\n }\r\n\r\n /**\r\n * Mostra uno sweetalert di tipo INFO con il messaggio passato come parametro\r\n * @param message Messaggio da mostrare nello sweetalert\r\n * @param title Titolo dello sweetalert (di default mostra 'Info')\r\n */\r\n static Info(message: string, title: string = null, isToast: boolean = null) {\r\n let currentTitle = title != null ? title : \"Informazione:\";\r\n Swal.fire(currentTitle, message, 'info');\r\n }\r\n\r\n /**\r\n * Mostra uno sweetalert di tipo WARNING con il messaggio passato come parametro\r\n * @param message Messaggio da mostrare nello sweetalert\r\n * @param title Titolo dello sweetalert (di default mostra 'Attenzione!')\r\n */\r\n static Warning(message: string | string[], title: string = null, isToast: boolean = null) {\r\n let currentTitle = title != null ? title : \"Attenzione!\";\r\n\r\n if (Array.isArray(message)) {\r\n let htmlWarnings: string = message.join(\"<br>\");\r\n Swal.fire({\r\n title: currentTitle,\r\n html: htmlWarnings,\r\n icon: 'warning'\r\n });\r\n } else {\r\n Swal.fire(currentTitle, message, 'warning');\r\n }\r\n }\r\n}\r\n","import { ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output, TemplateRef, ViewChild } from '@angular/core';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport { base64ToFile, ImageCroppedEvent, ImageCropperComponent, ImageTransform } from 'ngx-image-cropper';\r\nimport imageCompression from 'browser-image-compression'\r\nimport { AttachmentType, IAttachmentDTO } from './interfaces/IAttachment';\r\nimport { ConfigColumn, EqpTableComponent, TooltipPositionType, TypeColumn } from '@eqproject/eqp-table';\r\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\r\nimport { AttachmentHelperService } from './helpers/attachment.helper';\r\nimport { EqpAttachmentDialogService } from './services/eqp-attachment-dialog.service';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { IOptions } from './interfaces/IOptions';\r\n\r\nconst toBase64 = file => new Promise<string>((resolve, reject) => {\r\n const reader = new FileReader();\r\n reader.readAsDataURL(file);\r\n reader.onload = () => resolve(reader.result.toString());\r\n reader.onerror = error => reject(error);\r\n});\r\n\r\n@Component({\r\n selector: 'eqp-attachments',\r\n templateUrl: './eqp-attachments.component.html',\r\n styleUrls: ['./eqp-attachments.component.scss']\r\n})\r\nexport class EqpAttachmentsComponent implements OnInit {\r\n\r\n //#region @Input del componente\r\n\r\n /**\r\n * Se TRUE allora nasconde la colonna per le azioni sull'allegato (nel caso \"multipleAttachment\" è TRUE).\r\n */\r\n @Input(\"disableAction\") disableAction: boolean = false;\r\n\r\n /**\r\n * Se TRUE mostra il titolo nell'header nel caso in cui \"multipleAttachment\" è TRUE (\"Elenco allegati\" di default).\r\n */\r\n @Input(\"showHeader\") showHeader: boolean = true;\r\n\r\n /**\r\n * Titolo da visualizzare se il parametro \"showHeader\" è TRUE. Di devault viene visualizzato \"Elenco allegati\".\r\n */\r\n @Input(\"headerTitle\") headerTitle: string = \"Elenco allegati\";\r\n\r\n /**\r\n * Sorgente dati da visualizzare. Nel caso si vuole gestire un singolo allegato va passato in ogni caso come Array.\r\n */\r\n @Input(\"attachmentsList\") attachmentsList: Array<IAttachmentDTO> = null;\r\n\r\n /**\r\n * Se TRUE non mostra la MatCard (nel caso in cui \"multipleAttachment\" è TRUE).\r\n */\r\n @Input(\"showMatCard\") showMatCard: boolean = true;\r\n\r\n /**\r\n * Se FALSE allora il componente mostra solo il pulsante di caricamento di un singolo file, una volta caricato il file invoca l'evento di output \"localEditedAttachments\".\r\n * Se TRUE allora il componente mostra l'elenco di tutti gli allegati ricevuto nel parametro \"attachmentsList\".\r\n */\r\n @Input(\"multipleAttachment\") multipleAttachment: boolean = true;\r\n\r\n /**\r\n * Se assume il valore TRUE allora sarà possibile caricare più file per volta. Questa funzionalità è attiva\r\n * SOLO se si gestiscono allegati multipli, quindi se l'input 'multipleAttachment' assume il valore TRUE, altrimenti è sempre disabilitata.\r\n */\r\n @Input(\"loadMultipleFiles\") loadMultipleFiles: boolean = false;\r\n\r\n /**\r\n * Configurazione delle colonne della eqp-table per la visualizzazione degli allegati (caso \"multipleAttachment\" è TRUE).\r\n */\r\n @Input(\"attachmentsColumns\") attachmentsColumns: Array<ConfigColumn> = null;\r\n\r\n /**\r\n * Imposta il messaggio da visualizzare nel caso in cui la tabella degli allegati (nel caso in cui \"multipleAttachment\" è TRUE) è vuota.\r\n */\r\n @Input(\"emptyTableMessage\") emptyTableMessage: string = \"Nessun dato trovato\";\r\n\r\n /**\r\n * Se TRUE allora permette di selezionare soltanto file di tipo immagine, avente uno dei mimetype\r\n * specificati dentro AttachmentHelperService.\r\n * Se FALSE permette di selezionare qualsiasi tipo di file\r\n */\r\n @Input(\"allowOnlyImages\") allowOnlyImages: boolean = false;\r\n\r\n /**\r\n * Specifica i tipi di file che è possibile caricare\r\n */\r\n @Input(\"acceptedFileTypes\") acceptedFileTypes: string;\r\n\r\n /**\r\n * Se TRUE disabilita il pulsante di Aggiunta allegato (a prescindere dal valore del parametro \"multipleAttachment\").\r\n */\r\n @Input(\"isDisabled\") isDisabled: boolean = false;\r\n\r\n /**\r\n * Mostra/nasconde la colonna per visualizzare l'anteprima dei file nella tabella (caso multipleAtatchments = true).\r\n */\r\n @Input(\"showInlinePreview\") showInlinePreview: boolean = false;\r\n\r\n /**\r\n * Endpoint da chiamare per recueprare l'IAttachmentDTO completo da vedere nell'anteprima. La chiamata sarà in POST e nel body\r\n * conterrà l'IAttachmentDTO selezionato dall'utente.\r\n * La chiamata viene eseguita solo per l'anteprima delle immagini essendo necessario il base64 completo dell'immagine a dimensione reale.\r\n * Per documenti/link basta che sia popolata la proprietà FilePath di IAttachmentDTO.\r\n */\r\n @Input(\"getAttachmentEndpoint\") getAttachmentEndpoint: string = null;\r\n\r\n /**\r\n * Hostname dell'ambiente di produzione dell'applicativo. Necessario per visualizzare l'anteprima dei documenti\r\n * tramite il viewer di google.\r\n * NOTA: Per visualizzare l'anteprima è necessario che la prorietà FilePath dell'IAttachmentDTO sia popolata e che\r\n * sia abilitato l'accesso alla cartella sul server tramite hostname.\r\n */\r\n @Input(\"productionBaseUrl\") productionBaseUrl: string = null;\r\n\r\n /**\r\n * Opzioni per la compressione delle immagini caricate.\r\n */\r\n @Input(\"compressionOptions\") compressionOptions: IOptions = { maxSizeMB: 0.5, maxWidthOrHeight: 1920, useWebWorker: true };\r\n\r\n /**\r\n * Array di AttachmentType che si possono aggiungere\r\n */\r\n @Input(\"allowedTypes\") allowedTypes: Array<AttachmentType> = [AttachmentType.FILE, AttachmentType.LINK];\r\n\r\n /**\r\n * Booleano per impostare la eqp-table nella modalità multilingua\r\n */\r\n @Input(\"isEqpTableMultiLanguage\") isEqpTableMultiLanguage: boolean = false;\r\n\r\n /**\r\n * Input per definire le label da usare nel componente\r\n */\r\n @Input(\"downloadTooltipPosition\") downloadTooltipPosition: TooltipPositionType = TooltipPositionType.Below;\r\n @Input(\"openLinkLabel\") openLinkLabel: string = \"Apri link\";\r\n @Input(\"addButtonLabel\") addButtonLabel: string = \"Aggiungi\";\r\n @Input(\"downloadLabel\") downloadLabel: string = \"Download\";\r\n @Input(\"deleteLabel\") deleteLabel: string = \"Elimina\";\r\n @Input(\"fileNameLabel\") fileNameLabel: string = \"Nome file\";\r\n @Input(\"previewLabel\") previewLabel: string = \"Anteprima\";\r\n @Input(\"uploadFileLabel\") uploadFileLabel: string = \"Carica file\";\r\n @Input(\"confirmLabel\") confirmLabel: string = \"Conferma\";\r\n @Input(\"abortLabel\") abortLabel: string = \"Annulla\";\r\n @Input(\"saveLabel\") saveLabel: string = \"Salva\";\r\n @Input(\"exitLabel\") exitLabel: string = \"Esci\";\r\n @Input(\"eqpTableSearchText\") eqpTableSearchText: string = \"Cerca\";\r\n @Input(\"deleteDialogTitle\") deleteDialogTitle: string = null;\r\n @Input(\"deleteDialogMessage\") deleteDialogMessage: string = \"Sei sicuro di voler cancellare quest'allegato?\";\r\n @Input(\"noImageSelectedErrorMessage\") noImageSelectedErrorMessage: string = \"Non è possibile selezionare un file che non sia un'immagine.\";\r\n @Input(\"wrongTypeSelectedErrorMessage\") wrongTypeSelectedErrorMessage: string = \"Non è possibile caricare il file selezionato.\";\r\n @Input(\"videoPreviewErrorMessage\") videoPreviewErrorMessage: string = \"Impossibile aprire l'anteprima di un file video.\";\r\n @Input(\"videoPreviewErrorMessage\") audioPreviewErrorMessage: string = \"Impossibile aprire l'anteprima di un file audio.\";\r\n //#endregion\r\n\r\n //#region @Output del componente\r\n\r\n /**\r\n * Restituisce la lista aggiornata degli allegati.\r\n */\r\n @Output() localEditedAttachments: EventEmitter<Array<IAttachmentDTO>> = new EventEmitter<Array<IAttachmentDTO>>();\r\n\r\n /**\r\n * Evento di output che restituisce l'IAttachmentDTO selezionato per il download nel caso FileDataBase64, FileContentType o FileName non fossero specificati.\r\n */\r\n @Output(\"downloadAttachment\") downloadAttachment: EventEmitter<IAttachmentDTO> = new EventEmitter<IAttachmentDTO>();\r\n\r\n /**\r\n * Evento di output che restituisce l'elemento eliminato prima che questo venga effettivamente rismosso dalla lista.\r\n */\r\n @Output(\"onDeleteAttachment\") onDeleteAttachment: EventEmitter<IAttachmentDTO> = new EventEmitter<IAttachmentDTO>();\r\n\r\n //#endregion\r\n\r\n //#region Proprietà per gestione caricamento nuovo allegato\r\n newAttachment: IAttachmentDTO = {} as IAttachmentDTO;\r\n newMultipleAttachments: Array<IAttachmentDTO> = [];\r\n dialofRefAddAttachment: MatDialogRef<TemplateRef<any>>;\r\n attachmentType = AttachmentType;\r\n newAttachmentForm: FormGroup;\r\n selectedFile: File = null;\r\n selectedFiles: Array<File> = null;\r\n showCropImage: boolean = false;\r\n @ViewChild('dialogAddAttachment', { static: true }) dialogAddAttachment: TemplateRef<any>;\r\n @ViewChild('dialogAddMultipleAttachment', { static: true }) dialogAddMultipleAttachment: TemplateRef<any>;\r\n //#endregion\r\n\r\n //#region Proprietà per gestione ridimensionamento file di tipo image\r\n imageChangedEvent: any = '';\r\n croppedImage: any = '';\r\n transform: ImageTransform = {};\r\n @ViewChild(ImageCropperComponent) imageCropper: ImageCropperComponent;\r\n @ViewChild('imageInput') imageInput: any;\r\n //#endregion\r\n\r\n AttachmentType = AttachmentType;\r\n selectedAttachment: IAttachmentDTO;\r\n\r\n originalWidth: number;\r\n originalHeight: number;\r\n customWidth: number;\r\n customHeight: number;\r\n\r\n @ViewChild('attachmentTable', { static: false }) attachmentTable: EqpTableComponent;\r\n @ViewChild('inlinePreviewTemplate', { static: true }) inlinePreviewTemplate: TemplateRef<any>;\r\n @ViewChild('dialogPreview', { static: true }) dialogPreview: TemplateRef<any>;\r\n\r\n constructor(\r\n private dialog: MatDialog,\r\n private formBuilder: FormBuilder,\r\n private sanitizer: DomSanitizer,\r\n private http: HttpClient,\r\n private cd: ChangeDetectorRef\r\n ) {\r\n }\r\n\r\n ngOnInit() {\r\n\r\n //Se è stata richiesta la gestione delle sole immagini allora imposta il filtro per le estensioni possibili da caricare\r\n if (!this.acceptedFileTypes)\r\n if (this.allowOnlyImages == true)\r\n this.acceptedFileTypes = \"image/*\";\r\n else\r\n this.acceptedFileTypes = \"*\";\r\n\r\n // Se non sono stati specificati i tipi da gestire ma è stato passato null o un array vuoto imposto i tipi di default.\r\n if (!this.allowedTypes || this.allowedTypes.length == 0)\r\n this.allowedTypes = [AttachmentType.FILE, AttachmentType.LINK];\r\n else if (this.allowedTypes.find(t => t != AttachmentType.FILE && t != AttachmentType.LINK)) {\r\n EqpAttachmentDialogService.Warning(\"Almeno uno degli AttachmentType selezionati nel parametro \\\"allowedTypes\\\" non esiste.\")\r\n this.allowedTypes = [AttachmentType.FILE, AttachmentType.LINK];\r\n }\r\n\r\n\r\n //Se è stata richiesta la gestione multipla degli allegati allora configura l'eqp-table\r\n if (this.multipleAttachment == true && (!this.attachmentsColumns || this.attachmentsColumns.length == 0)) {\r\n this.configureColumns();\r\n }\r\n\r\n if (this.attachmentsList == null)\r\n this.attachmentsList = new Array<IAttachmentDTO>();\r\n\r\n this.checkAttachmentImage();\r\n }\r\n\r\n public reloadData() {\r\n if (this.attachmentTable)\r\n this.attachmentTable.reloadDatatable();\r\n }\r\n\r\n checkAttachmentImage() {\r\n this.attachmentsList.forEach(a => {\r\n a.IsImage = AttachmentHelperService.checkImageFromMimeType(a.FileContentType);\r\n });\r\n }\r\n\r\n //#region Gestione elenco allegati\r\n\r\n /**\r\n * Configura le colonne per l'eqp-table nel caso in cui il parametro \"multipleAttachments\" è TRUE.\r\n */\r\n configureColumns() {\r\n this.attachmentsColumns = [];\r\n if (this.disableAction != true) {\r\n this.attachmentsColumns.push({\r\n key: \"action\", display: \"\",\r\n type: TypeColumn.MenuAction, buttonMenuIcon: \"more_vert\", styles: { flex: \"0 0 6%\" },\r\n actions: [\r\n { name: this.deleteLabel, icon: \"delete\", fn: (element, index, col) => this.deleteAttachment(element) },\r\n ],\r\n })\r\n }\r\n\r\n let downloadColumn = {\r\n key: \"attachment\", display: \"\",\r\n type: TypeColumn.SimpleAction, styles: { flex: \"0 0 6%\" },\r\n actions: [\r\n {\r\n name: '', fontawesome: true,\r\n icon: (element) => { return this.showInlinePreview ? (element.AttachmentType == AttachmentType.FILE ? \"fas fa-cloud-download-alt\" : \"fas fa-external-link-alt\") : this.getAttachmentIcon(element); },\r\n fn: (element, col, elementIndex) => this.viewAttachment(element),\r\n tooltip: { tooltipText: (element) => { return element.AttachmentType == AttachmentType.FILE ? this.downloadLabel : this.openLinkLabel; }, tooltipPosition: this.downloadTooltipPosition }\r\n },\r\n ]\r\n };\r\n\r\n let inlinePreviewColumn = {\r\n key: \"InlinePreview\", display: this.previewLabel,\r\n type: TypeColumn.ExternalTemplate,\r\n externalTemplate: this.inlinePreviewTemplate,\r\n styles: { flex: \"0 0 10%\" }\r\n };\r\n\r\n let fileNameColumn = { key: \"FileName\", display: this.fileNameLabel };\r\n\r\n if (this.showInlinePreview) {\r\n this.attachmentsColumns.push(inlinePreviewColumn);\r\n this.attachmentsColumns.push(fileNameColumn);\r\n this.attachmentsColumns.push(downloadColumn);\r\n } else {\r\n this.attachmentsColumns.push(downloadColumn);\r\n this.attachmentsColumns.push(fileNameColumn);\r\n }\r\n }\r\n\r\n /**\r\n * Elimina un allegato eliminando anche il file presente nello storage di archiviazione utilizzato (AWS o cartella progetto)\r\n * @param element IAttachmentDTO da cancellare\r\n */\r\n deleteAttachment(element: IAttachmentDTO) {\r\n EqpAttachmentDialogService.Confirm(this.deleteDialogMessage, () => {\r\n this.removeAttachmentFromList(this.attachmentsList.indexOf(element));\r\n }, true, this.deleteDialogTitle);\r\n }\r\n\r\n /**\r\n * Rimuove l'allegato selezionato dalla lista \"attachmentsList\" e invoca l'evento di output che restituisce la lista aggiornata.\r\n * @param attachmentIndex Indice dell'attachment da rimuovere\r\n */\r\n removeAttachmentFromList(attachmentIndex: number) {\r\n this.onDeleteAttachment.emit(this.attachmentsList[attachmentIndex]);\r\n\r\n this.attachmentsList.splice(attachmentIndex, 1);\r\n if (this.attachmentTable)\r\n this.attachmentTable.reloadDatatable();\r\n this.localEditedAttachments.emit(this.attachmentsList);\r\n }\r\n\r\n\r\n /**\r\n * Scarica l'allegato o apre il link\r\n * @param element Allegato da mostrare\r\n */\r\n viewAttachment(attachment: IAttachmentDTO) {\r\n\r\n if (attachment.AttachmentType == AttachmentType.LINK) {\r\n window.open(attachment.FilePath, '_blank');\r\n return;\r\n }\r\n\r\n if (attachment.FileDataBase64 && attachment.FileContentType && attachment.FileName) {\r\n let source = `data:${attachment.FileContentType};base64,${attachment.FileDataBase64}`;\r\n const link = document.createElement(\"a\");\r\n link.href = source;\r\n link.download = `${attachment.FileName}`\r\n link.click();\r\n } else {\r\n this.downloadAttachment.emit(attachment);\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Ridefinisce l'icona da mostrare nella colonna dell'eqp-table per ogni file.\r\n * L'icona varia in base all'estensione del file\r\n * @param attachment \r\n */\r\n getAttachmentIcon(attachment: IAttachmentDTO) {\r\n if (attachment.AttachmentType == AttachmentType.LINK)\r\n return \"fas fa-link\";\r\n else\r\n return AttachmentHelperService.getIconFromFileExtensione(attachment.FileExtension);\r\n }\r\n\r\n //#endregion\r\n\r\n /**\r\n * Apre la modale per la definizione dei parametri del nuovo file\r\n */\r\n openModalAddAttachment(attachmentType: AttachmentType) {\r\n\r\n //Se è stato richiesto il caricamento di un LINK o è impostato il caricamento di FILE SINGOLO allora apre la modale per\r\n //il caricamento singolo del file altrimenti apre quella per il caricamento multiplo\r\n // if (attachmentType == AttachmentType.LINK || (attachmentType == AttachmentType.FILE && this.loadMultipleFiles != true)) {\r\n this.newAttachment = {} as IAttachmentDTO;\r\n this.newAttachment.IsImage = false;\r\n this.newAttachment.AttachmentType = attachmentType;\r\n this.newMultipleAttachments = new Array<IAttachmentDTO>();\r\n if(attachmentType == AttachmentType.LINK)\r\n this.newMultipleAttachments.push(this.newAttachment);\r\n\r\n this.createAttachmentForm();\r\n\r\n //Apre la modale\r\n this.dialofRefAddAttachment = this.dialog.open(this.dialogAddAttachment, {\r\n disableClose: true,\r\n hasBackdrop: true,\r\n width: '60%',\r\n maxHeight: '80%'\r\n });\r\n \r\n\r\n }\r\n\r\n createAttachmentForm() {\r\n //Crea la form per la validazione dei campi\r\n this.newAttachmentForm = this.formBuilder.group({\r\n type: [this.newAttachment.AttachmentType, Validators.required],\r\n name: [this.newAttachment.FileName],\r\n path: [this.newAttachment.FilePath],\r\n customHeight: [this.customHeight],\r\n customWidth: [this.customWidth]\r\n });\r\n }\r\n\r\n close() {\r\n this.newAttachment = {} as IAttachmentDTO;\r\n this.newMultipleAttachments = new Array<IAttachmentDTO>();\r\n this.abortFile();\r\n if (this.newAttachmentForm)\r\n this.newAttachmentForm.reset();\r\n\r\n this.dialofRefAddAttachment.close();\r\n }\r\n\r\n /**\r\n * In base al tipo di allegato controlla se disabilitare o meno il pulsante per salvare.\r\n * Funzione usata nel [disable] del pulsante \"Salva\" del dialog per l'aggiunta di un allegato.\r\n * @returns \r\n */\r\n disableSave() {\r\n if (this.loadMultipleFiles != true) {\r\n if (this.newAttachment.AttachmentType == AttachmentType.FILE) {\r\n return !this.newAttachment.FileDataBase64;\r\n } else {\r\n return !this.newAttachment.FilePath;\r\n }\r\n }\r\n else {\r\n return this.newMultipleAttachments.filter(p => (p.AttachmentType == AttachmentType.FILE && !p.FileDataBase64) || (p.AttachmentType == AttachmentType.LINK && !p.FilePath)).length > 0;\r\n }\r\n\r\n }\r\n\r\n confirmAddAttachment() {\r\n\r\n if (this.loadMultipleFiles != true) {\r\n if (this.newAttachment.AttachmentType == AttachmentType.LINK && !this.newAttachment.FileName)\r\n this.newAttachment.FileName = this.newAttachment.FilePath;\r\n\r\n if (this.attachmentsList == null)\r\n this.attachmentsList = new Array<IAttachmentDTO>();\r\n\r\n this.attachmentsList.push(this.newAttachment);\r\n }\r\n else {\r\n if (this.newMultipleAttachments == null || this.newMultipleAttachments.length == 0)\r\n return;\r\n\r\n if (this.attachmentsList == null)\r\n this.attachmentsList = new Array<IAttachmentDTO>();\r\n\r\n this.attachmentsList = this.attachmentsList.concat(this.newMultipleAttachments);\r\n }\r\n\r\n if (this.attachmentTable)\r\n this.attachmentTable.reloadDatatable();\r\n\r\n this.localEditedAttachments.emit(this.attachmentsList);\r\n this.close();\r\n }\r\n\r\n /**\r\n * Apre il dialog per l'anteprima dell'allegato selezionato.\r\n * @param row \r\n * @returns \r\n */\r\n async openPreviewDialog(row: IAttachmentDTO) {\r\n this.selectedAttachment = JSON.parse(JSON.stringify(row));\r\n\r\n if (this.selectedAttachment.AttachmentType == AttachmentType.FILE) {\r\n if (this.selectedAttachment.FileContentType.startsWith(\"video\")) {\r\n EqpAttachmentDialogService.Warning(this.videoPreviewErrorMessage);\r\n return;\r\n } else if (this.selectedAttachment.FileContentType.startsWith(\"audio\")) {\r\n EqpAttachmentDialogService.Warning(this.audioPreviewErrorMessage);\r\n return;\r\n }\r\n }\r\n\r\n if (this.getAttachmentEndpoint && this.selectedAttachment.IsImage && !this.selectedAttachment.FileDataBase64) {\r\n await this.getAttachmentByID()\r\n .then((res) => { this.selectedAttachment.FileDataBase64 = res.FileDataBase64; })\r\n .catch((err) => { EqpAttachmentDialogService.Error(err); });\r\n }\r\n\r\n if (this.selectedAttachment.AttachmentType == AttachmentType.LINK) {\r\n this.selectedAttachment.TrustedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(this.selectedAttachment.FilePath);\r\n } else if (this.selectedAttachment.IsImage && !this.selectedAttachment.FileDataBase64 && !this.selectedAttachment.FileThumbnailBase64) {\r\n EqpAttachmentDialogService.Info(\"Impossibile aprire l'anteprima dell'allegato, file mancante.\")\r\n return;\r\n } else if (!this.selectedAttachment.IsImage) {\r\n if (this.selectedAttachment.FilePath && this.productionBaseUrl) {\r\n this.selectedAttachment.TrustedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(\r\n \"https://docs.google.com/gview?url=\" +\r\n this.productionBaseUrl +\r\n \"/\" +\r\n this.selectedAttachment.FilePath +\r\n \"&embedded=true\"\r\n );\r\n } else {\r\n EqpAttachmentDialogService.Info(\"Impossibile aprire l'anteprima del documento!\");\r\n return;\r\n }\r\n }\r\n\r\n this.dialog.open(this.dialogPreview, {\r\n disableClose: true,\r\n hasBackdrop: true,\r\n });\r\n }\r\n\r\n async getAttachmentByID() {\r\n return this.http.post<IAttachmentDTO>(this.getAttachmentEndpoint, this.selectedAttachment).toPromise();\r\n }\r\n\r\n //#region Gestione caricamento file\r\n\r\n /** \r\n * Evento scatenato alla selezione del file (o dei file).\r\n * Se il caricamento è SINGOLO o se comunque è stato selezionato un solo file allora si occupa di controllare se si tratta di un immagine in modo da\r\n * mostrare le funzionalità del croppie (per ritagliare l'immagine) oppure no.\r\n * Se il file caricato non è un immagine allora genera direttamente il base64 e lo associa all'allegato da salvare.\r\n * Se invece il caricamento dei file è MULTIPLO e sono presenti più file allora esegue le stesse operazioni ignorando però il contrllo\r\n * immagine per il croppie (in caso di caricamento multiplo le funzionalità del croppie sono disabilitate).\r\n */\r\n async onFileInputChange(event) {\r\n this.showCropImage = false;\r\n\r\n //Se è stato richiesto il caricamento SINGOLO oppure se il caricamento è MULTIPLO ma è stato selezionato un solo file\r\n //allora verifica se il file è un immagine (per mostrare il CROPPIE)\r\n if ([...event.target.files].length == 1 || this.loadMultipleFiles != true) {\r\n this.selectedFile = event.target.files[0];\r\n this.selectedFiles = event.target.files;\r\n if (!this.selectedFile)\r\n return;\r\n\r\n //Memorizza i dati per l'allegato \r\n this.newAttachment = await this.createAttachmentFromUploadedFile(this.selectedFile, false);\r\n this.newMultipleAttachments = new Array<IAttachmentDTO>();\r\n this.newMultipleAttachments.push(this.newAttachment);\r\n\r\n //Se è stata richiesta la gestione delle sole immagini ma per errore è stato selezionato un file che non è un immagine\r\n let checkOnlyImage = this.checkAllowOnlyImageFile(this.newAttachment);\r\n if (checkOnlyImage == false)\r\n return;\r\n\r\n\r\n if (this.loadMultipleFiles == true && [...event.target.files].length == 1)\r\n this.createAttachmentForm();\r\n\r\n //Verifica se il file caricato è un'immagine oppure no. Se è un immagine, prima di caricarla mostra il croppie per il resize.\r\n //Se non è un immagine allora genera il Base64 \r\n if (this.newAttachment.IsImage == true) {\r\n this.getImageDimensions(event.target.files[0])\r\n\r\n //Mostra il croppie e disabilita la form finchè non termina la modifica dell'immagine\r\n this.newAttachmentForm.disable();\r\n this.newAttachmentForm.controls[\"customWidth\"].enable();\r\n this.newAttachmentForm.controls[\"customHeight\"].enable();\r\n this.showCropImage = true;\r\n this.imageChangedEvent = event;\r\n }\r\n else {\r\n this.showCropImage = false;\r\n let base64Result = await this.getBase64FromFile(this.selectedFile);\r\n this.newAttachment.FileDataBase64 = base64Result.Base64File;\r\n this.newAttachment.FileContentType = base64Result.ContentType;\r\n }\r\n }\r\n else {\r\n this.selectedFiles = event.target.files;\r\n if (!this.selectedFiles || this.selectedFiles.length == 0)\r\n return;\r\n\r\n this.newMultipleAttachments = new Array<IAttachmentDTO>();\r\n for (let i = 0; i < this.selectedFiles.length; i++) {\r\n let newAttachment: IAttachmentDTO = await this.createAttachmentFromUploadedFile(this.selectedFiles[i], true);\r\n\r\n //Se è stata richiesta la gestione delle sole immagini ma per errore è stato selezionato un file che non è un immagine\r\n let checkOnlyImage = this.checkAllowOnlyImageFile(newAttachment);\r\n if (checkOnlyImage == false)\r\n return;\r\n\r\n this.newMultipleAttachments.push(newAttachment);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * A partire dal FILE ricevuto in input ricostruisce l'oggetto IAttachmentDTO e lo restituisce.\r\n * Se il parametro getBase64 viene passato a TRUE allora, sempre a partire dal file,genera il base64 e \r\n * ricava il ContentType da associare all'oggetto IAttachmentDTO da restituire\r\n * @param currentFile Oggetto FILE da processare\r\n * @param getBase64 Se TRUE allora calcola base64 e ContentType del file passato in input\r\n * @returns Restituisce un oggetto di tipo IAttachmentDTO\r\n */\r\n private async createAttachmentFromUploadedFile(currentFile: File, getBase64: boolean = true): Promise<IAttachmentDTO> {\r\n let newAttachment: IAttachmentDTO = {} as IAttachmentDTO;\r\n\r\n //Memorizza i dati per l'allegato \r\n newAttachment.AttachmentType = AttachmentType.FILE;\r\n newAttachment.FileContentType = currentFile.type;\r\n newAttachment.FileName = currentFile.name;\r\n newAttachment.FileExtension = currentFile.name.substr(currentFile.name.lastIndexOf('.') + 1);\r\n newAttachment.IsImage = AttachmentHelperService.checkImageFromMimeType(currentFile.type);\r\n\r\n if (getBase64 == true) {\r\n let base64Result = await this.getBase64FromFile(currentFile);\r\n newAttachment.FileDataBase64 = base64Result.Base64File;\r\n newAttachment.FileContentType = base64Result.ContentType;\r\n }\r\n\r\n return newAttachment;\r\n }\r\n\r\n /**\r\n * A partire dal file passato in input restituisce un oggetto\r\n * contenente il base64 del file e il suo contentType\r\n * @param currentFile Oggetto File da cui estrapolare base64 e contentType\r\n * @returns Restituisce un oggetto avente le proprietà Base64File e ContentType\r\n */\r\n private async getBase64FromFile(currentFile: File): Promise<any> {\r\n let base64File = await toBase64(currentFile);\r\n let contentType: string = null;\r\n if (base64File) {\r\n // Loris 20/01/2022: PROBLEMA - Quando eseguo l'upload di un file .sql non viene salvato/scaricato correttamente.\r\n // Questo succede perchè non viene popolato il FileContentType. Per risolvere il problema\r\n // faccio un controllo e se non esiste il FileContentType allora lo recupero dal base64 ottenuto.\r\n contentType = base64File.split(\",\")[0].split(\":\")[1].split(\";\")[0];\r\n // Un altro metodo per leggere il ccontent type del file è tramite una regular expression:\r\n base64File = base64File.split(\",\")[1];\r\n }\r\n\r\n let result = {\r\n Base64File: base64File,\r\n ContentType: contentType\r\n }\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Controlla se il file che si sta caricando è supportato dal sistema.\r\n * @returns \r\n */\r\n private checkAcceptedFiles(): boolean {\r\n if ((this.loadMultipleFiles != true && this.selectedFile.type.startsWith(\"video\"))\r\n || (this.loadMultipleFiles == true && [...this.selectedFiles].filter(p => p.type.startsWith(\"video\")).length > 0))\r\n return false;\r\n\r\n if (this.acceptedFileTypes == \"*\")\r\n return true;\r\n\r\n //Verifica che i tipi del file (o dei file) caricati siano coerenti con quelli accettati dalla direttiva\r\n let accepted: boolean = true\r\n if (this.loadMultipleFiles != true)\r\n accepted = this.acceptedFileTypes.includes(this.selectedFile.type);\r\n else {\r\n let uploadedFileTypes: string[] = [...this.selectedFiles].map(p => p.type);\r\n uploadedFileTypes.forEach(type => {\r\n if (!this.acceptedFileTypes.includes(type))\r\n accepted = false;\r\n });\r\n }\r\n\r\n //Questo controllo permette di gestire le casistiche per cui vengono indicati come tipi validi, ad esempio, 'image/*'\r\n if (!accepted && this.loadMultipleFiles != true) {\r\n for (let t of this.acceptedFileTypes.split(\",\").filter(t => t.includes(\"*\"))) {\r\n accepted = this.selectedFile.type.startsWith(t.split(\"*\")[0]);\r\n if (accepted)\r\n break;\r\n }\r\n }\r\n return accepted;\r\n }\r\n\r\n /**\r\n * Se eqp-attachments è stata configurata per il caricamento delle sole immagini allora verifica che il file passato in\r\n * input sia effettivamente un immagine o no.\r\n * Se il controllo va a buon fine restituisce TRUE altrimenti mostra un messaggio d'errore e restituisce FALSE\r\n */\r\n private checkAllowOnlyImageFile(newAttachment): boolean {\r\n if (this.allowOnlyImages == true && newAttachment.IsImage != true) {\r\n EqpAttachmentDialogService.Error(this.noImageSelectedErrorMessage);\r\n this.abortFile();\r\n return false;\r\n } else if (!this.checkAcceptedFiles()) {\r\n EqpAttachmentDialogService.Error(this.wrongTypeSelectedErrorMessage);\r\n this.abortFile();\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n getImageDimensions(img: any) {\r\n const reader = new FileReader();\r\n reader.onload = (e: any) => {\r\n const image = new Image();\r\n image.src = e.target.result;\r\n image.onload = rs => {\r\n this.originalHeight = rs.currentTarget['height'];\r\n this.originalWidth = rs.currentTarget['width'];\r\n\r\n if (this.originalWidth > 1280) {\r\n this.customWidth = 1280;\r\n this.customHeight = Math.round((1280 * this.originalHeight) / this.originalWidth);\r\n } else {\r\n this.customHeight = rs.currentTarget['height'];\r\n this.customWidth = rs.currentTarget['width'];\r\n }\r\n };\r\n };\r\n reader.readAsDataURL(img);\r\n }\r\n\r\n restoreOriginalDimensions() {\r\n this.customWidth = this.originalWidth;\r\n this.customHeight = this.originalHeight;\r\n }\r\n\r\n onDimensionsChange(dimension: string) {\r\n if (dimension == \"H\") {\r\n this.customWidth = Math.round((this.customHeight * this.originalWidth) / this.originalHeight);\r\n } else if (dimension == \"W\") {\r\n this.customHeight = Math.round((this.customWidth * this.originalHeight) / this.originalWidth);\r\n }\r\n }\r\n\r\n imageCropped(event: ImageCroppedEvent) {\r\n this.croppedImage = event.base64;\r\n this.getCroppedAndUpload(this.croppedImage);\r\n }\r\n\r\n getCroppedAndUpload(file) {\r\n var self = this;\r\n\r\n var file: any = base64ToFile(file);\r\n\r\n const options = this.compressionOptions;\r\n\r\n /**\r\n * Comprime l'immagine passando come parametri le options create nell'oggetto sopra, e il file dal reader principale\r\n */\r\n imageCompression(file, options).then((fileCompressed => {\r\n\r\n let fileReader = new FileReader();\r\n\r\n //Faccio la push di ogni file all'interno dell'array di file dell'item da mandare al server\r\n fileReader.onload = function () {\r\n let resultReader = <string>fileReader.result;\r\n var marker = ';base64,';\r\n self.newAttachment.FileDataBase64 = resultReader.substring(resultReader.indexOf(marker) + marker.length);\r\n self.showCropImage = false;\r\n self.newAttachmentForm.enable();\r\n };\r\n\r\n fileReader.readAsDataURL(fileCompressed);\r\n\r\n }));\r\n\r\n }\r\n\r\n confirmCrop() {\r\n this.imageCropper.crop();\r\n }\r\n\r\n /**\r\n * Annulla la selezione del file, svuotando l'input e resettando tutte le proprietà dell'IAttachmentDTO\r\n */\r\n abortFile() {\r\n this.imageChangedEvent = '';\r\n if (this.imageInput)\r\n this.imageInput.nativeElement.value = '';\r\n\r\n this.selectedFile = null;\r\n this.selectedFiles = null;\r\n this.showCropImage = false;\r\n\r\n this.newAttachment.IsImage = false;\r\n this.newAttachment.FileDataBase64 = null;\r\n this.newAttachment.FileName = null;\r\n this.newAttachment.FileExtension = null;\r\n this.newAttachment.FileContentType = null;\r\n\r\n this.newMultipleAttachments = new Array<IAttachmentDTO>();\r\n\r\n this.customHeight = null;\r\n this.customWidth = null;\r\n this.originalHeight = null;\r\n this.originalWidth = null;\r\n }\r\n\r\n //#endregion\r\n}","import { NgModule } from '@angular/core';\r\n\r\n//Angular Material Components\r\nimport { MatCheckboxModule } from '@angular/material/checkbox';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\r\nimport { MatDatepickerModule } from '@angular/material/datepicker';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatRadioModule } from '@angular/material/radio';\r\nimport { MatSelectModule } from '@angular/material/select';\r\nimport { MatSliderModule } from '@angular/material/slider';\r\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\r\nimport { MatMenuModule } from '@angular/material/menu';\r\nimport { MatSidenavModule } from '@angular/material/sidenav';\r\nimport { MatToolbarModule } from '@angular/material/toolbar';\r\nimport { MatListModule } from '@angular/material/list';\r\nimport { MatGridListModule } from '@angular/material/grid-list';\r\nimport { MatCardModule } from '@angular/material/card';\r\nimport { MatStepperModule } from '@angular/material/stepper';\r\nimport { MatTabsModule } from '@angular/material/tabs';\r\nimport { MatExpansionModule } from '@angular/material/expansion';\r\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\r\nimport { MatChipsModule } from '@angular/material/chips';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\r\nimport { MatDialogModule } from '@angular/material/dialog';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\r\nimport { MatTableModule } from '@angular/material/table';\r\nimport { MatSortModule } from '@angular/material/sort';\r\nimport { MatPaginatorModule } from '@angular/material/paginator';\r\nimport { MatNativeDateModule } from '@angular/material/core';\r\n\r\n\r\n@NgModule({\r\n imports: [\r\n MatCheckboxModule,\r\n MatButtonModule,\r\n MatInputModule,\r\n MatAutocompleteModule,\r\n MatDatepickerModule,\r\n MatFormFieldModule,\r\n MatRadioModule,\r\n MatSelectModule,\r\n MatSliderModule,\r\n MatSlideToggleModule,\r\n MatMenuModule,\r\n MatSidenavModule,\r\n MatToolbarModule,\r\n MatListModule,\r\n MatGridListModule,\r\n MatCardModule,\r\n MatStepperModule,\r\n MatTabsModule,\r\n MatExpansionModule,\r\n MatButtonToggleModule,\r\n MatChipsModule,\r\n MatIconModule,\r\n MatProgressSpinnerModule,\r\n MatProgressBarModule,\r\n MatDialogModule,\r\n MatTooltipModule,\r\n MatSnackBarModule,\r\n MatTableModule,\r\n MatSortModule,\r\n MatPaginatorModule,\r\n MatDatepickerModule,\r\n MatNativeDateModule\r\n ],\r\n exports: [\r\n MatCheckboxModule,\r\n MatButtonModule,\r\n MatInputModule,\r\n MatAutocompleteModule,\r\n MatDatepickerModule,\r\n MatFormFieldModule,\r\n MatRadioModule,\r\n MatSelectModule,\r\n MatSliderModule,\r\n MatSlideToggleModule,\r\n MatMenuModule,\r\n MatSidenavModule,\r\n MatToolbarModule,\r\n MatListModule,\r\n MatGridListModule,\r\n MatCardModule,\r\n MatStepperModule,\r\n MatTabsModule,\r\n MatExpansionModule,\r\n MatButtonToggleModule,\r\n MatChipsModule,\r\n MatIconModule,\r\n MatProgressSpinnerModule,\r\n MatProgressBarModule,\r\n MatDialogModule,\r\n MatTooltipModule,\r\n MatSnackBarModule,\r\n MatTableModule,\r\n MatSortModule,\r\n MatPaginatorModule],\r\n})\r\nexport class MaterialModule { }","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { EqpAttachmentsComponent } from './eqp-attachments.component';\r\nimport { MaterialModule } from './modules/material.module';\r\nimport { ImageCropperModule } from 'ngx-image-cropper';\r\nimport { EqpTableModule } from '@eqproject/eqp-table';\r\n\r\n\r\n@NgModule({\r\n declarations: [EqpAttachmentsComponent],\r\n imports: [\r\n MaterialModule,\r\n FormsModule,\r\n CommonModule,\r\n ReactiveFormsModule,\r\n ImageCropperModule,\r\n EqpTableModule\r\n ],\r\n exports: [EqpAttachmentsComponent]\r\n})\r\nexport class EqpAttachmentsModule { }\r\n","/*\r\n * Public API Surface of eqp-attachments\r\n */\r\n\r\nexport * from './lib/eqp-attachments.component';\r\nexport * from './lib/eqp-attachments.module';\r\nexport * from './lib/interfaces/IAttachment';\r\nexport * from './lib/interfaces/IOptions';\r\nexport * from './lib/helpers/attachment.helper';\r\nexport * from './lib/services/eqp-attachment-dialog.service';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {MaterialModule as ɵa} from './lib/modules/material.module';"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAaY;AAAZ,WAAY,cAAc;IACtB,mDAAQ,CAAA;IACR,mDAAQ,CAAA;AACZ,CAAC,EAHW,cAAc,KAAd,cAAc;;;IC8BtB;KAAiB;;;;;IAMV,8CAAsB,GAA7B,UAA8B,QAAgB;QAC1C,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,IAAI,QAAQ,GAAA,CAAC,IAAI,IAAI,CAAC;KAC/D;;;;;;IAOM,iDAAyB,GAAhC,UAAiC,SAAiB;QAC9C,IAAI,QAAQ,GAAG,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;QACjD,QAAO,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,aAAa,EAAC;KACpC;IArDe,sCAAc,GAAa,CAAC,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;IAE/F,yCAAiB,GAAQ;QACrC,KAAK,EAAE,kBAAkB;QACzB,KAAK,EAAE,iBAAiB;QACxB,KAAK,EAAE,kBAAkB;QACzB,MAAM,EAAE,kBAAkB;QAC1B,KAAK,EAAE,mBAAmB;QAC1B,MAAM,EAAE,mBAAmB;QAC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B;gBAChB,iBAAiB;gBACjB,cAAc;gBACd,aAAa;gBACb,kBAAkB;aAAC;SACtB,CAAC;OACW,cAAc,CAAI;IAAD,qBAAC;CAA/B;;;IClFA;KAAqC;IAAxB,oBAAoB;QAZhC,QAAQ,CAAC;YACR,YAAY,EAAE,CAAC,uBAAuB,CAAC;YACvC,OAAO,EAAE;gBACP,cAAc;gBACd,WAAW;gBACX,YAAY;gBACZ,mBAAmB;gBACnB,kBAAkB;gBAClB,cAAc;aACf;YACD,OAAO,EAAE,CAAC,uBAAuB,CAAC;SACnC,CAAC;OACW,oBAAoB,CAAI;IAAD,2BAAC;CAArC;;ACrBA;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"eqproject-eqp-attachments.js","sources":["ng://@eqproject/eqp-attachments/lib/interfaces/IAttachment.ts","ng://@eqproject/eqp-attachments/lib/helpers/attachment.helper.ts","ng://@eqproject/eqp-attachments/lib/services/eqp-attachment-dialog.service.ts","ng://@eqproject/eqp-attachments/lib/eqp-attachments.component.ts","ng://@eqproject/eqp-attachments/lib/modules/material.module.ts","ng://@eqproject/eqp-attachments/lib/eqp-attachments.module.ts","ng://@eqproject/eqp-attachments/public-api.ts","ng://@eqproject/eqp-attachments/eqproject-eqp-attachments.ts"],"sourcesContent":["export interface IAttachmentDTO {\r\n ID: number | string;\r\n FileName?: string;\r\n FileContentType?: string;\r\n FileExtension?: string;\r\n FilePath?: string;\r\n AttachmentType?: AttachmentType;\r\n FileDataBase64?: string;\r\n IsImage?: boolean;\r\n FileThumbnailBase64?: string;\r\n TrustedUrl?: any;\r\n}\r\n\r\nexport enum AttachmentType {\r\n FILE = 1,\r\n LINK = 2\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AttachmentHelperService {\r\n\r\n static readonly imageMimeTypes: string[] = [\"image/bmp\", \"image/gif\", \"image/jpeg\", \"image/tiff\", \"image/png\"];\r\n\r\n static readonly fileExtensionIcon: any = {\r\n \"txt\": \"fas fa-file-text\",\r\n \"pdf\": \"fas fa-file-pdf\",\r\n \"doc\": \"fas fa-file-word\",\r\n \"docx\": \"fas fa-file-word\",\r\n \"xls\": \"fas fa-file-excel\",\r\n \"xlsx\": \"fas fa-file-excel\",\r\n \"jpg\": \"fas fa-file-image\",\r\n \"jpeg\": \"fas fa-file-image\",\r\n \"png\": \"fas fa-file-image\",\r\n \"bmp\": \"fas fa-file-image\",\r\n\r\n \"mkv\": \"fas fa-file-video\",\r\n \"flv\": \"fas fa-file-video\",\r\n \"gif\": \"fas fa-file-video\",\r\n \"gifv\": \"fas fa-file-video\",\r\n \"avi\": \"fas fa-file-video\",\r\n \"wmv\": \"fas fa-file-video\",\r\n \"mp4\": \"fas fa-file-video\",\r\n \"m4p\": \"fas fa-file-video\",\r\n \"m4v\": \"fas fa-file-video\",\r\n \"mpg\": \"fas fa-file-video\",\r\n \"mp2\": \"fas fa-file-video\",\r\n \"mpeg\": \"fas fa-file-video\",\r\n \"mpe\": \"fas fa-file-video\",\r\n \"mpv\": \"fas fa-file-video\",\r\n \"m2v\": \"fas fa-file-video\",\r\n \"3gp\": \"fas fa-file-video\",\r\n \"3g2\": \"fas fa-file-video\",\r\n\r\n \"mp3\": \"fas fa-file-audio\",\r\n };\r\n\r\n constructor() { }\r\n\r\n /**\r\n * Restituisce TRUE se il mime type passato nel parametro corrisponde ad un mime type di un'immagine\r\n * @param mimeType Mime Type da verificare\r\n */\r\n static checkImageFromMimeType(mimeType: string): boolean {\r\n return this.imageMimeTypes.find(s => s == mimeType) != null;\r\n }\r\n\r\n /**\r\n * In base all'estensione passata come parametro, restituisce la FontAwesome corretta da utilizzare.\r\n * Se l'estensione non viene trovata nella costante riportata dentro common.model.ts restituisce un icona standard\r\n * @param extension Estensione del file per cui restituire l'icona corretta\r\n */\r\n static getIconFromFileExtensione(extension: string): string {\r\n let fileIcon = this.fileExtensionIcon[extension];\r\n return fileIcon ?? \"fas fa-file\";\r\n }\r\n\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport Swal from 'sweetalert2';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class EqpAttachmentDialogService {\r\n\r\n constructor() { }\r\n\r\n /**\r\n * Mostra uno sweet alert di tipo ERROR con il messaggio passato come parametro.\r\n * @param message Messaggio d'errore da mostrare nello sweetalert\r\n * @param title Titolo dello sweetalert (di default mostra 'Errore')\r\n */\r\n static Error(message: string | string[], title: string = null) {\r\n let currentTitle = title != null ? title : 'Errore';\r\n if (Array.isArray(message)) {\r\n currentTitle = title != null ? title : 'Errore';\r\n let htmlErrors: string = message.join(\"<br>\");\r\n Swal.fire({\r\n title: currentTitle,\r\n html: htmlErrors,\r\n icon: 'error'\r\n });\r\n }\r\n else {\r\n Swal.fire(currentTitle, message, 'error');\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Mostra uno sweetalert di tipo CONFIRM con il messaggio passato come parametro e se viene premuto\r\n * CONFERMA lancia la funzione di callback passata come parametro\r\n * @param message Messaggio da mostrare nello sweetalert\r\n * @param title Titolo dello sweetalert (di default mostra 'Info')\r\n */\r\n static Confirm(message: string | string[], confirmCallback: any, isWarning: boolean = false, title: string = null, customWidth: string = null) {\r\n\r\n let currentTitle = title != null ? title : 'Sei sicuro di voler procedere?';\r\n if (Array.isArray(message)) {\r\n let htmlErrors: string = message.join(\"<br>\");\r\n Swal.fire({\r\n title: currentTitle,\r\n html: htmlErrors,\r\n width: customWidth ? customWidth : '32rem',\r\n icon: !isWarning ? 'question' : 'warning',\r\n showCancelButton: true,\r\n allowOutsideClick: false,\r\n allowEscapeKey: false\r\n }).then((result) => {\r\n if (result.value && confirmCallback) {\r\n confirmCallback();\r\n }\r\n });\r\n }\r\n else {\r\n Swal.fire({\r\n title: currentTitle,\r\n text: message,\r\n width: customWidth ? customWidth : '32rem',\r\n icon: !isWarning ? 'question' : 'warning',\r\n showCancelButton: true,\r\n allowOutsideClick: false,\r\n allowEscapeKey: false\r\n }).then((result) => {\r\n if (result.value && confirmCallback) {\r\n confirmCallback();\r\n }\r\n })\r\n }\r\n }\r\n\r\n /**\r\n * Mostra uno sweetalert di tipo INFO con il messaggio passato come parametro\r\n * @param message Messaggio da mostrare nello sweetalert\r\n * @param title Titolo dello sweetalert (di default mostra 'Info')\r\n */\r\n static Info(message: string, title: string = null, isToast: boolean = null) {\r\n let currentTitle = title != null ? title : \"Informazione:\";\r\n Swal.fire(currentTitle, message, 'info');\r\n }\r\n\r\n /**\r\n * Mostra uno sweetalert di tipo WARNING con il messaggio passato come parametro\r\n * @param message Messaggio da mostrare nello sweetalert\r\n * @param title Titolo dello sweetalert (di default mostra 'Attenzione!')\r\n */\r\n static Warning(message: string | string[], title: string = null, isToast: boolean = null) {\r\n let currentTitle = title != null ? title : \"Attenzione!\";\r\n\r\n if (Array.isArray(message)) {\r\n let htmlWarnings: string = message.join(\"<br>\");\r\n Swal.fire({\r\n title: currentTitle,\r\n html: htmlWarnings,\r\n icon: 'warning'\r\n });\r\n } else {\r\n Swal.fire(currentTitle, message, 'warning');\r\n }\r\n }\r\n}\r\n","import { AfterViewInit, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output, TemplateRef, ViewChild } from '@angular/core';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport { base64ToFile, ImageCroppedEvent, ImageCropperComponent, ImageTransform } from 'ngx-image-cropper';\r\nimport imageCompression from 'browser-image-compression'\r\nimport { AttachmentType, IAttachmentDTO } from './interfaces/IAttachment';\r\nimport { ConfigColumn, EqpTableComponent, TooltipPositionType, TypeColumn } from '@eqproject/eqp-table';\r\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\r\nimport { AttachmentHelperService } from './helpers/attachment.helper';\r\nimport { EqpAttachmentDialogService } from './services/eqp-attachment-dialog.service';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { IOptions } from './interfaces/IOptions';\r\n\r\nconst toBase64 = file => new Promise<string>((resolve, reject) => {\r\n const reader = new FileReader();\r\n reader.readAsDataURL(file);\r\n reader.onload = () => resolve(reader.result.toString());\r\n reader.onerror = error => reject(error);\r\n});\r\n\r\n@Component({\r\n selector: 'eqp-attachments',\r\n templateUrl: './eqp-attachments.component.html',\r\n styleUrls: ['./eqp-attachments.component.scss']\r\n})\r\nexport class EqpAttachmentsComponent implements OnInit, AfterViewInit {\r\n\r\n //#region @Input del componente\r\n\r\n /**\r\n * Se TRUE allora nasconde la colonna per le azioni sull'allegato (nel caso \"multipleAttachment\" è TRUE).\r\n */\r\n @Input(\"disableAction\") disableAction: boolean = false;\r\n\r\n /**\r\n * Se TRUE mostra il titolo nell'header nel caso in cui \"multipleAttachment\" è TRUE (\"Elenco allegati\" di default).\r\n */\r\n @Input(\"showHeader\") showHeader: boolean = true;\r\n\r\n /**\r\n * Titolo da visualizzare se il parametro \"showHeader\" è TRUE. Di devault viene visualizzato \"Elenco allegati\".\r\n */\r\n @Input(\"headerTitle\") headerTitle: string = \"Elenco allegati\";\r\n\r\n /**\r\n * Sorgente dati da visualizzare. Nel caso si vuole gestire un singolo allegato va passato in ogni caso come Array.\r\n */\r\n @Input(\"attachmentsList\") attachmentsList: Array<IAttachmentDTO> = null;\r\n\r\n /**\r\n * Se TRUE non mostra la MatCard (nel caso in cui \"multipleAttachment\" è TRUE).\r\n */\r\n @Input(\"showMatCard\") showMatCard: boolean = true;\r\n\r\n /**\r\n * Se FALSE allora il componente mostra solo il pulsante di caricamento di un singolo file, una volta caricato il file invoca l'evento di output \"localEditedAttachments\".\r\n * Se TRUE allora il componente mostra l'elenco di tutti gli allegati ricevuto nel parametro \"attachmentsList\".\r\n */\r\n @Input(\"multipleAttachment\") multipleAttachment: boolean = true;\r\n\r\n /**\r\n * Se assume il valore TRUE allora sarà possibile caricare più file per volta. Questa funzionalità è attiva\r\n * SOLO se si gestiscono allegati multipli, quindi se l'input 'multipleAttachment' assume il valore TRUE, altrimenti è sempre disabilitata.\r\n */\r\n @Input(\"loadMultipleFiles\") loadMultipleFiles: boolean = false;\r\n\r\n /**\r\n * Configurazione delle colonne della eqp-table per la visualizzazione degli allegati (caso \"multipleAttachment\" è TRUE).\r\n */\r\n @Input(\"attachmentsColumns\") attachmentsColumns: Array<ConfigColumn> = null;\r\n\r\n /**\r\n * Imposta il messaggio da visualizzare nel caso in cui la tabella degli allegati (nel caso in cui \"multipleAttachment\" è TRUE) è vuota.\r\n */\r\n @Input(\"emptyTableMessage\") emptyTableMessage: string = \"Nessun dato trovato\";\r\n\r\n /**\r\n * Se TRUE allora permette di selezionare soltanto file di tipo immagine, avente uno dei mimetype\r\n * specificati dentro AttachmentHelperService.\r\n * Se FALSE permette di selezionare qualsiasi tipo di file\r\n */\r\n @Input(\"allowOnlyImages\") allowOnlyImages: boolean = false;\r\n\r\n /**\r\n * Specifica i tipi di file che è possibile caricare\r\n */\r\n @Input(\"acceptedFileTypes\") acceptedFileTypes: string;\r\n\r\n /**\r\n * Se TRUE disabilita il pulsante di Aggiunta allegato (a prescindere dal valore del parametro \"multipleAttachment\").\r\n */\r\n @Input(\"isDisabled\") isDisabled: boolean = false;\r\n\r\n /**\r\n * Mostra/nasconde la colonna per visualizzare l'anteprima dei file nella tabella (caso multipleAtatchments = true).\r\n */\r\n @Input(\"showInlinePreview\") showInlinePreview: boolean = false;\r\n\r\n /**\r\n * Endpoint da chiamare per recueprare l'IAttachmentDTO completo da vedere nell'anteprima. La chiamata sarà in POST e nel body\r\n * conterrà l'IAttachmentDTO selezionato dall'utente.\r\n * La chiamata viene eseguita solo per l'anteprima delle immagini essendo necessario il base64 completo dell'immagine a dimensione reale.\r\n * Per documenti/link basta che sia popolata la proprietà FilePath di IAttachmentDTO.\r\n */\r\n @Input(\"getAttachmentEndpoint\") getAttachmentEndpoint: string = null;\r\n\r\n /**\r\n * Hostname dell'ambiente di produzione dell'applicativo. Necessario per visualizzare l'anteprima dei documenti\r\n * tramite il viewer di google.\r\n * NOTA: Per visualizzare l'anteprima è necessario che la prorietà FilePath dell'IAttachmentDTO sia popolata e che\r\n * sia abilitato l'accesso alla cartella sul server tramite hostname.\r\n */\r\n @Input(\"productionBaseUrl\") productionBaseUrl: string = null;\r\n\r\n /**\r\n * Opzioni per la compressione delle immagini caricate.\r\n */\r\n @Input(\"compressionOptions\") compressionOptions: IOptions = { maxSizeMB: 0.5, maxWidthOrHeight: 1920, useWebWorker: true };\r\n\r\n /**\r\n * Array di AttachmentType che si possono aggiungere\r\n */\r\n @Input(\"allowedTypes\") allowedTypes: Array<AttachmentType> = [AttachmentType.FILE, AttachmentType.LINK];\r\n\r\n /**\r\n * Permette di stabilire se la eqp-table contenente l'elenco degli allegati utilizza\r\n * il multilingua oppure no\r\n */\r\n @Input(\"isEqpTableMultiLanguage\") isEqpTableMultiLanguage: boolean = false;\r\n\r\n /**\r\n * Permette di stabilire, in caso di gestione allegati multipli, se la tabella contenente l'elenco \r\n * degli allegati deve essere paginata oppure no\r\n */\r\n @Input(\"tablePaginatorVisible\") tablePaginatorVisible: boolean = true;\r\n\r\n /**\r\n * In caso di gestione allegati multipli, permette di stabilire la dimensione pagina di default \r\n * per la tabella contenente l'elenco degli allegati\r\n */\r\n @Input(\"tablePaginatorSize\") tablePaginatorSize: number = null;\r\n\r\n /**\r\n * Input per definire le label da usare nel componente\r\n */\r\n @Input(\"downloadTooltipPosition\") downloadTooltipPosition: TooltipPositionType = TooltipPositionType.Below;\r\n @Input(\"openLinkLabel\") openLinkLabel: string = \"Apri link\";\r\n @Input(\"addButtonLabel\") addButtonLabel: string = \"Aggiungi\";\r\n @Input(\"downloadLabel\") downloadLabel: string = \"Download\";\r\n @Input(\"deleteLabel\") deleteLabel: string = \"Elimina\";\r\n @Input(\"fileNameLabel\") fileNameLabel: string = \"Nome file\";\r\n @Input(\"previewLabel\") previewLabel: string = \"Anteprima\";\r\n @Input(\"uploadFileLabel\") uploadFileLabel: string = \"Carica file\";\r\n @Input(\"confirmLabel\") confirmLabel: string = \"Conferma\";\r\n @Input(\"abortLabel\") abortLabel: string = \"Annulla\";\r\n @Input(\"saveLabel\") saveLabel: string = \"Salva\";\r\n @Input(\"exitLabel\") exitLabel: string = \"Esci\";\r\n @Input(\"eqpTableSearchText\") eqpTableSearchText: string = \"Cerca\";\r\n @Input(\"deleteDialogTitle\") deleteDialogTitle: string = null;\r\n @Input(\"deleteDialogMessage\") deleteDialogMessage: string = \"Sei sicuro di voler cancellare quest'allegato?\";\r\n @Input(\"noImageSelectedErrorMessage\") noImageSelectedErrorMessage: string = \"Non è possibile selezionare un file che non sia un'immagine.\";\r\n @Input(\"wrongTypeSelectedErrorMessage\") wrongTypeSelectedErrorMessage: string = \"Non è possibile caricare il file selezionato.\";\r\n @Input(\"videoPreviewErrorMessage\") videoPreviewErrorMessage: string = \"Impossibile aprire l'anteprima di un file video.\";\r\n @Input(\"videoPreviewErrorMessage\") audioPreviewErrorMessage: string = \"Impossibile aprire l'anteprima di un file audio.\";\r\n //#endregion\r\n\r\n //#region @Output del componente\r\n\r\n /**\r\n * Restituisce la lista aggiornata degli allegati.\r\n */\r\n @Output() localEditedAttachments: EventEmitter<Array<IAttachmentDTO>> = new EventEmitter<Array<IAttachmentDTO>>();\r\n\r\n /**\r\n * Evento scatenato alla pressione del pulsante ESCI della modale di caricamento file.\r\n */\r\n @Output() abortAddAttachment: EventEmitter<any> = new EventEmitter<any>();\r\n\r\n /**\r\n * Evento di output che restituisce l'IAttachmentDTO selezionato per il download nel caso FileDataBase64, FileContentType o FileName non fossero specificati.\r\n */\r\n @Output(\"downloadAttachment\") downloadAttachment: EventEmitter<IAttachmentDTO> = new EventEmitter<IAttachmentDTO>();\r\n\r\n /**\r\n * Evento di output che restituisce l'elemento eliminato prima che questo venga effettivamente rismosso dalla lista.\r\n */\r\n @Output(\"onDeleteAttachment\") onDeleteAttachment: EventEmitter<IAttachmentDTO> = new EventEmitter<IAttachmentDTO>();\r\n\r\n /**\r\n * Evento di output scatenato durante l'AfterViewInit del componente che restituisce l'istanza corrente del componente.\r\n * Questo evento avvisa quando il componente è stato renderizzato, utile per esempio quando si vogliono aggiungere delle colonne \r\n * alla visualizzazione con allegati multipli lasciando però quelle pre esistenti. Questo si può fare intervenendo sulla \r\n * proprietà \"attachmentsColumns\" di questo componente tramite l'istanza passata come paramentro oppure tramite ViewChild \r\n * dal componente che lo ospita.\r\n */\r\n @Output(\"onComponentLoaded\") onComponentLoaded: EventEmitter<EqpAttachmentsComponent> = new EventEmitter<EqpAttachmentsComponent>();\r\n\r\n //#endregion\r\n\r\n //#region Proprietà per gestione caricamento nuovo allegato\r\n newAttachment: IAttachmentDTO = {} as IAttachmentDTO;\r\n newMultipleAttachments: Array<IAttachmentDTO> = [];\r\n dialofRefAddAttachment: MatDialogRef<TemplateRef<any>>;\r\n attachmentType = AttachmentType;\r\n newAttachmentForm: FormGroup;\r\n selectedFile: File = null;\r\n selectedFiles: Array<File> = null;\r\n showCropImage: boolean = false;\r\n @ViewChild('dialogAddAttachment', { static: true }) dialogAddAttachment: TemplateRef<any>;\r\n @ViewChild('dialogAddMultipleAttachment', { static: true }) dialogAddMultipleAttachment: TemplateRef<any>;\r\n //#endregion\r\n\r\n //#region Proprietà per gestione ridimensionamento file di tipo image\r\n imageChangedEvent: any = '';\r\n croppedImage: any = '';\r\n transform: ImageTransform = {};\r\n @ViewChild(ImageCropperComponent) imageCropper: ImageCropperComponent;\r\n @ViewChild('imageInput') imageInput: any;\r\n //#endregion\r\n\r\n AttachmentType = AttachmentType;\r\n selectedAttachment: IAttachmentDTO;\r\n\r\n originalWidth: number;\r\n originalHeight: number;\r\n customWidth: number;\r\n customHeight: number;\r\n\r\n @ViewChild('attachmentTable', { static: false }) attachmentTable: EqpTableComponent;\r\n @ViewChild('inlinePreviewTemplate', { static: true }) inlinePreviewTemplate: TemplateRef<any>;\r\n @ViewChild('dialogPreview', { static: true }) dialogPreview: TemplateRef<any>;\r\n\r\n constructor(\r\n private dialog: MatDialog,\r\n private formBuilder: FormBuilder,\r\n private sanitizer: DomSanitizer,\r\n private http: HttpClient,\r\n private cd: ChangeDetectorRef\r\n ) {\r\n }\r\n\r\n ngOnInit() {\r\n\r\n //Se è stata richiesta la gestione delle sole immagini allora imposta il filtro per le estensioni possibili da caricare\r\n if (!this.acceptedFileTypes)\r\n if (this.allowOnlyImages == true)\r\n this.acceptedFileTypes = \"image/*\";\r\n else\r\n this.acceptedFileTypes = \"*\";\r\n\r\n // Se non sono stati specificati i tipi da gestire ma è stato passato null o un array vuoto imposto i tipi di default.\r\n if (!this.allowedTypes || this.allowedTypes.length == 0)\r\n this.allowedTypes = [AttachmentType.FILE, AttachmentType.LINK];\r\n else if (this.allowedTypes.find(t => t != AttachmentType.FILE && t != AttachmentType.LINK)) {\r\n EqpAttachmentDialogService.Warning(\"Almeno uno degli AttachmentType selezionati nel parametro \\\"allowedTypes\\\" non esiste.\")\r\n this.allowedTypes = [AttachmentType.FILE, AttachmentType.LINK];\r\n }\r\n\r\n\r\n //Se è stata richiesta la gestione multipla degli allegati allora configura l'eqp-table\r\n if (this.multipleAttachment == true && (!this.attachmentsColumns || this.attachmentsColumns.length == 0)) {\r\n this.configureColumns();\r\n }\r\n\r\n if (this.attachmentsList == null)\r\n this.attachmentsList = new Array<IAttachmentDTO>();\r\n\r\n this.checkAttachmentImage();\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.onComponentLoaded.emit(this);\r\n }\r\n\r\n public reloadData() {\r\n if (this.attachmentTable)\r\n this.attachmentTable.reloadDatatable();\r\n }\r\n\r\n checkAttachmentImage() {\r\n this.attachmentsList.forEach(a => {\r\n a.IsImage = AttachmentHelperService.checkImageFromMimeType(a.FileContentType);\r\n });\r\n }\r\n\r\n //#region Gestione elenco allegati\r\n\r\n /**\r\n * Configura le colonne per l'eqp-table nel caso in cui il parametro \"multipleAttachments\" è TRUE.\r\n */\r\n configureColumns() {\r\n this.attachmentsColumns = [];\r\n if (this.disableAction != true) {\r\n this.attachmentsColumns.push({\r\n key: \"action\", display: \"\",\r\n type: TypeColumn.MenuAction, buttonMenuIcon: \"more_vert\", styles: { flex: \"0 0 6%\" },\r\n actions: [\r\n { name: this.deleteLabel, icon: \"delete\", fn: (element, index, col) => this.deleteAttachment(element) },\r\n ],\r\n })\r\n }\r\n\r\n let downloadColumn = {\r\n key: \"attachment\", display: \"\",\r\n type: TypeColumn.SimpleAction, styles: { flex: \"0 0 6%\" },\r\n actions: [\r\n {\r\n name: '', fontawesome: true,\r\n icon: (element) => { return this.showInlinePreview ? (element.AttachmentType == AttachmentType.FILE ? \"fas fa-cloud-download-alt\" : \"fas fa-external-link-alt\") : this.getAttachmentIcon(element); },\r\n fn: (element, col, elementIndex) => this.viewAttachment(element),\r\n tooltip: { tooltipText: (element) => { return element.AttachmentType == AttachmentType.FILE ? this.downloadLabel : this.openLinkLabel; }, tooltipPosition: this.downloadTooltipPosition }\r\n },\r\n ]\r\n };\r\n\r\n let inlinePreviewColumn = {\r\n key: \"InlinePreview\", display: this.previewLabel,\r\n type: TypeColumn.ExternalTemplate,\r\n externalTemplate: this.inlinePreviewTemplate,\r\n styles: { flex: \"0 0 10%\" }\r\n };\r\n\r\n let fileNameColumn = { key: \"FileName\", display: this.fileNameLabel };\r\n\r\n if (this.showInlinePreview) {\r\n this.attachmentsColumns.push(inlinePreviewColumn);\r\n this.attachmentsColumns.push(fileNameColumn);\r\n this.attachmentsColumns.push(downloadColumn);\r\n } else {\r\n this.attachmentsColumns.push(downloadColumn);\r\n this.attachmentsColumns.push(fileNameColumn);\r\n }\r\n }\r\n\r\n /**\r\n * Elimina un allegato eliminando anche il file presente nello storage di archiviazione utilizzato (AWS o cartella progetto)\r\n * @param element IAttachmentDTO da cancellare\r\n */\r\n deleteAttachment(element: IAttachmentDTO) {\r\n EqpAttachmentDialogService.Confirm(this.deleteDialogMessage, () => {\r\n this.removeAttachmentFromList(this.attachmentsList.indexOf(element));\r\n }, true, this.deleteDialogTitle);\r\n }\r\n\r\n /**\r\n * Rimuove l'allegato selezionato dalla lista \"attachmentsList\" e invoca l'evento di output che restituisce la lista aggiornata.\r\n * @param attachmentIndex Indice dell'attachment da rimuovere\r\n */\r\n removeAttachmentFromList(attachmentIndex: number) {\r\n this.onDeleteAttachment.emit(this.attachmentsList[attachmentIndex]);\r\n\r\n this.attachmentsList.splice(attachmentIndex, 1);\r\n if (this.attachmentTable)\r\n this.attachmentTable.reloadDatatable();\r\n this.localEditedAttachments.emit(this.attachmentsList);\r\n }\r\n\r\n\r\n /**\r\n * Scarica l'allegato o apre il link\r\n * @param element Allegato da mostrare\r\n */\r\n viewAttachment(attachment: IAttachmentDTO) {\r\n\r\n if (attachment.AttachmentType == AttachmentType.LINK) {\r\n window.open(attachment.FilePath, '_blank');\r\n return;\r\n }\r\n\r\n if (attachment.FileDataBase64 && attachment.FileContentType && attachment.FileName) {\r\n let source = `data:${attachment.FileContentType};base64,${attachment.FileDataBase64}`;\r\n const link = document.createElement(\"a\");\r\n link.href = source;\r\n link.download = `${attachment.FileName}`\r\n link.click();\r\n } else {\r\n this.downloadAttachment.emit(attachment);\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Ridefinisce l'icona da mostrare nella colonna dell'eqp-table per ogni file.\r\n * L'icona varia in base all'estensione del file\r\n * @param attachment \r\n */\r\n getAttachmentIcon(attachment: IAttachmentDTO) {\r\n if (attachment.AttachmentType == AttachmentType.LINK)\r\n return \"fas fa-link\";\r\n else\r\n return AttachmentHelperService.getIconFromFileExtensione(attachment.FileExtension);\r\n }\r\n\r\n //#endregion\r\n\r\n /**\r\n * Apre la modale per la definizione dei parametri del nuovo file\r\n */\r\n openModalAddAttachment(attachmentType: AttachmentType) {\r\n\r\n //Se è stato richiesto il caricamento di un LINK o è impostato il caricamento di FILE SINGOLO allora apre la modale per\r\n //il caricamento singolo del file altrimenti apre quella per il caricamento multiplo\r\n // if (attachmentType == AttachmentType.LINK || (attachmentType == AttachmentType.FILE && this.loadMultipleFiles != true)) {\r\n this.newAttachment = {} as IAttachmentDTO;\r\n this.newAttachment.IsImage = false;\r\n this.newAttachment.AttachmentType = attachmentType;\r\n this.newMultipleAttachments = new Array<IAttachmentDTO>();\r\n if (attachmentType == AttachmentType.LINK)\r\n this.newMultipleAttachments.push(this.newAttachment);\r\n\r\n this.createAttachmentForm();\r\n\r\n //Apre la modale\r\n this.dialofRefAddAttachment = this.dialog.open(this.dialogAddAttachment, {\r\n disableClose: true,\r\n hasBackdrop: true,\r\n width: '60%',\r\n maxHeight: '80%'\r\n });\r\n\r\n\r\n }\r\n\r\n createAttachmentForm() {\r\n //Crea la form per la validazione dei campi\r\n this.newAttachmentForm = this.formBuilder.group({\r\n type: [this.newAttachment.AttachmentType, Validators.required],\r\n name: [this.newAttachment.FileName],\r\n path: [this.newAttachment.FilePath],\r\n customHeight: [this.customHeight],\r\n customWidth: [this.customWidth]\r\n });\r\n }\r\n\r\n close(emitCloseEvent = true) {\r\n this.newAttachment = {} as IAttachmentDTO;\r\n this.newMultipleAttachments = new Array<IAttachmentDTO>();\r\n this.abortFile();\r\n if (this.newAttachmentForm)\r\n this.newAttachmentForm.reset();\r\n\r\n this.dialofRefAddAttachment.close();\r\n\r\n\r\n if (emitCloseEvent == true && this.abortAddAttachment)\r\n this.abortAddAttachment.emit();\r\n }\r\n\r\n /**\r\n * In base al tipo di allegato controlla se disabilitare o meno il pulsante per salvare.\r\n * Funzione usata nel [disable] del pulsante \"Salva\" del dialog per l'aggiunta di un allegato.\r\n * @returns \r\n */\r\n disableSave() {\r\n if (this.loadMultipleFiles != true) {\r\n if (this.newAttachment.AttachmentType == AttachmentType.FILE) {\r\n return !this.newAttachment.FileDataBase64;\r\n } else {\r\n return !this.newAttachment.FilePath;\r\n }\r\n }\r\n else {\r\n return this.newMultipleAttachments.filter(p => (p.AttachmentType == AttachmentType.FILE && !p.FileDataBase64) || (p.AttachmentType == AttachmentType.LINK && !p.FilePath)).length > 0;\r\n }\r\n\r\n }\r\n\r\n confirmAddAttachment() {\r\n\r\n if (this.loadMultipleFiles != true) {\r\n if (this.newAttachment.AttachmentType == AttachmentType.LINK && !this.newAttachment.FileName)\r\n this.newAttachment.FileName = this.newAttachment.FilePath;\r\n\r\n if (this.attachmentsList == null)\r\n this.attachmentsList = new Array<IAttachmentDTO>();\r\n\r\n this.attachmentsList.push(this.newAttachment);\r\n }\r\n else {\r\n if (this.newMultipleAttachments == null || this.newMultipleAttachments.length == 0)\r\n return;\r\n\r\n if (this.attachmentsList == null)\r\n this.attachmentsList = new Array<IAttachmentDTO>();\r\n\r\n this.attachmentsList = this.attachmentsList.concat(this.newMultipleAttachments);\r\n }\r\n\r\n if (this.attachmentTable)\r\n this.attachmentTable.reloadDatatable();\r\n\r\n this.localEditedAttachments.emit(this.attachmentsList);\r\n this.close(false);\r\n }\r\n\r\n /**\r\n * Apre il dialog per l'anteprima dell'allegato selezionato.\r\n * @param row \r\n * @returns \r\n */\r\n async openPreviewDialog(row: IAttachmentDTO) {\r\n this.selectedAttachment = JSON.parse(JSON.stringify(row));\r\n\r\n if (this.selectedAttachment.AttachmentType == AttachmentType.FILE) {\r\n if (this.selectedAttachment.FileContentType.startsWith(\"video\")) {\r\n EqpAttachmentDialogService.Warning(this.videoPreviewErrorMessage);\r\n return;\r\n } else if (this.selectedAttachment.FileContentType.startsWith(\"audio\")) {\r\n EqpAttachmentDialogService.Warning(this.audioPreviewErrorMessage);\r\n return;\r\n }\r\n }\r\n\r\n if (this.getAttachmentEndpoint && this.selectedAttachment.IsImage && !this.selectedAttachment.FileDataBase64) {\r\n await this.getAttachmentByID()\r\n .then((res) => { this.selectedAttachment.FileDataBase64 = res.FileDataBase64; })\r\n .catch((err) => { EqpAttachmentDialogService.Error(err); });\r\n }\r\n\r\n if (this.selectedAttachment.AttachmentType == AttachmentType.LINK) {\r\n this.selectedAttachment.TrustedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(this.selectedAttachment.FilePath);\r\n } else if (this.selectedAttachment.IsImage && !this.selectedAttachment.FileDataBase64 && !this.selectedAttachment.FileThumbnailBase64) {\r\n EqpAttachmentDialogService.Info(\"Impossibile aprire l'anteprima dell'allegato, file mancante.\")\r\n return;\r\n } else if (!this.selectedAttachment.IsImage) {\r\n if (this.selectedAttachment.FilePath && this.productionBaseUrl) {\r\n this.selectedAttachment.TrustedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(\r\n \"https://docs.google.com/gview?url=\" +\r\n this.productionBaseUrl +\r\n \"/\" +\r\n this.selectedAttachment.FilePath +\r\n \"&embedded=true\"\r\n );\r\n } else {\r\n EqpAttachmentDialogService.Info(\"Impossibile aprire l'anteprima del documento!\");\r\n return;\r\n }\r\n }\r\n\r\n this.dialog.open(this.dialogPreview, {\r\n disableClose: true,\r\n hasBackdrop: true,\r\n });\r\n }\r\n\r\n async getAttachmentByID() {\r\n return this.http.post<IAttachmentDTO>(this.getAttachmentEndpoint, this.selectedAttachment).toPromise();\r\n }\r\n\r\n //#region Gestione caricamento file\r\n\r\n /** \r\n * Evento scatenato alla selezione del file (o dei file).\r\n * Se il caricamento è SINGOLO o se comunque è stato selezionato un solo file allora si occupa di controllare se si tratta di un immagine in modo da\r\n * mostrare le funzionalità del croppie (per ritagliare l'immagine) oppure no.\r\n * Se il file caricato non è un immagine allora genera direttamente il base64 e lo associa all'allegato da salvare.\r\n * Se invece il caricamento dei file è MULTIPLO e sono presenti più file allora esegue le stesse operazioni ignorando però il contrllo\r\n * immagine per il croppie (in caso di caricamento multiplo le funzionalità del croppie sono disabilitate).\r\n */\r\n async onFileInputChange(event) {\r\n this.showCropImage = false;\r\n\r\n //Se è stato richiesto il caricamento SINGOLO oppure se il caricamento è MULTIPLO ma è stato selezionato un solo file\r\n //allora verifica se il file è un immagine (per mostrare il CROPPIE)\r\n if ([...event.target.files].length == 1 || this.loadMultipleFiles != true) {\r\n this.selectedFile = event.target.files[0];\r\n this.selectedFiles = event.target.files;\r\n if (!this.selectedFile)\r\n return;\r\n\r\n //Memorizza i dati per l'allegato \r\n this.newAttachment = await this.createAttachmentFromUploadedFile(this.selectedFile, false);\r\n this.newMultipleAttachments = new Array<IAttachmentDTO>();\r\n this.newMultipleAttachments.push(this.newAttachment);\r\n\r\n //Se è stata richiesta la gestione delle sole immagini ma per errore è stato selezionato un file che non è un immagine\r\n let checkOnlyImage = this.checkAllowOnlyImageFile(this.newAttachment);\r\n if (checkOnlyImage == false)\r\n return;\r\n\r\n\r\n if (this.loadMultipleFiles == true && [...event.target.files].length == 1)\r\n this.createAttachmentForm();\r\n\r\n //Verifica se il file caricato è un'immagine oppure no. Se è un immagine, prima di caricarla mostra il croppie per il resize.\r\n //Se non è un immagine allora genera il Base64 \r\n if (this.newAttachment.IsImage == true) {\r\n this.getImageDimensions(event.target.files[0])\r\n\r\n //Mostra il croppie e disabilita la form finchè non termina la modifica dell'immagine\r\n this.newAttachmentForm.disable();\r\n this.newAttachmentForm.controls[\"customWidth\"].enable();\r\n this.newAttachmentForm.controls[\"customHeight\"].enable();\r\n this.showCropImage = true;\r\n this.imageChangedEvent = event;\r\n }\r\n else {\r\n this.showCropImage = false;\r\n let base64Result = await this.getBase64FromFile(this.selectedFile);\r\n this.newAttachment.FileDataBase64 = base64Result.Base64File;\r\n this.newAttachment.FileContentType = base64Result.ContentType;\r\n }\r\n }\r\n else {\r\n this.selectedFiles = event.target.files;\r\n if (!this.selectedFiles || this.selectedFiles.length == 0)\r\n return;\r\n\r\n this.newMultipleAttachments = new Array<IAttachmentDTO>();\r\n for (let i = 0; i < this.selectedFiles.length; i++) {\r\n let newAttachment: IAttachmentDTO = await this.createAttachmentFromUploadedFile(this.selectedFiles[i], true);\r\n\r\n //Se è stata richiesta la gestione delle sole immagini ma per errore è stato selezionato un file che non è un immagine\r\n let checkOnlyImage = this.checkAllowOnlyImageFile(newAttachment);\r\n if (checkOnlyImage == false)\r\n return;\r\n\r\n this.newMultipleAttachments.push(newAttachment);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * A partire dal FILE ricevuto in input ricostruisce l'oggetto IAttachmentDTO e lo restituisce.\r\n * Se il parametro getBase64 viene passato a TRUE allora, sempre a partire dal file,genera il base64 e \r\n * ricava il ContentType da associare all'oggetto IAttachmentDTO da restituire\r\n * @param currentFile Oggetto FILE da processare\r\n * @param getBase64 Se TRUE allora calcola base64 e ContentType del file passato in input\r\n * @returns Restituisce un oggetto di tipo IAttachmentDTO\r\n */\r\n private async createAttachmentFromUploadedFile(currentFile: File, getBase64: boolean = true): Promise<IAttachmentDTO> {\r\n let newAttachment: IAttachmentDTO = {} as IAttachmentDTO;\r\n\r\n //Memorizza i dati per l'allegato \r\n newAttachment.AttachmentType = AttachmentType.FILE;\r\n newAttachment.FileContentType = currentFile.type;\r\n newAttachment.FileName = currentFile.name;\r\n newAttachment.FileExtension = currentFile.name.substr(currentFile.name.lastIndexOf('.') + 1);\r\n newAttachment.IsImage = AttachmentHelperService.checkImageFromMimeType(currentFile.type);\r\n\r\n if (getBase64 == true) {\r\n let base64Result = await this.getBase64FromFile(currentFile);\r\n newAttachment.FileDataBase64 = base64Result.Base64File;\r\n newAttachment.FileContentType = base64Result.ContentType;\r\n }\r\n\r\n return newAttachment;\r\n }\r\n\r\n /**\r\n * A partire dal file passato in input restituisce un oggetto\r\n * contenente il base64 del file e il suo contentType\r\n * @param currentFile Oggetto File da cui estrapolare base64 e contentType\r\n * @returns Restituisce un oggetto avente le proprietà Base64File e ContentType\r\n */\r\n private async getBase64FromFile(currentFile: File): Promise<any> {\r\n let base64File = await toBase64(currentFile);\r\n let contentType: string = null;\r\n if (base64File) {\r\n // Loris 20/01/2022: PROBLEMA - Quando eseguo l'upload di un file .sql non viene salvato/scaricato correttamente.\r\n // Questo succede perchè non viene popolato il FileContentType. Per risolvere il problema\r\n // faccio un controllo e se non esiste il FileContentType allora lo recupero dal base64 ottenuto.\r\n contentType = base64File.split(\",\")[0].split(\":\")[1].split(\";\")[0];\r\n // Un altro metodo per leggere il ccontent type del file è tramite una regular expression:\r\n base64File = base64File.split(\",\")[1];\r\n }\r\n\r\n let result = {\r\n Base64File: base64File,\r\n ContentType: contentType\r\n }\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Controlla se il file che si sta caricando è supportato dal sistema.\r\n * @returns \r\n */\r\n private checkAcceptedFiles(): boolean {\r\n if ((this.loadMultipleFiles != true && this.selectedFile.type.startsWith(\"video\"))\r\n || (this.loadMultipleFiles == true && [...this.selectedFiles].filter(p => p.type.startsWith(\"video\")).length > 0))\r\n return false;\r\n\r\n if (this.acceptedFileTypes == \"*\")\r\n return true;\r\n\r\n //Verifica che i tipi del file (o dei file) caricati siano coerenti con quelli accettati dalla direttiva\r\n let accepted: boolean = true\r\n if (this.loadMultipleFiles != true)\r\n accepted = this.acceptedFileTypes.includes(this.selectedFile.type);\r\n else {\r\n let uploadedFileTypes: string[] = [...this.selectedFiles].map(p => p.type);\r\n uploadedFileTypes.forEach(type => {\r\n if (!this.acceptedFileTypes.includes(type))\r\n accepted = false;\r\n });\r\n }\r\n\r\n //Questo controllo permette di gestire le casistiche per cui vengono indicati come tipi validi, ad esempio, 'image/*'\r\n if (!accepted && this.loadMultipleFiles != true) {\r\n for (let t of this.acceptedFileTypes.split(\",\").filter(t => t.includes(\"*\"))) {\r\n accepted = this.selectedFile.type.startsWith(t.split(\"*\")[0]);\r\n if (accepted)\r\n break;\r\n }\r\n }\r\n return accepted;\r\n }\r\n\r\n /**\r\n * Se eqp-attachments è stata configurata per il caricamento delle sole immagini allora verifica che il file passato in\r\n * input sia effettivamente un immagine o no.\r\n * Se il controllo va a buon fine restituisce TRUE altrimenti mostra un messaggio d'errore e restituisce FALSE\r\n */\r\n private checkAllowOnlyImageFile(newAttachment): boolean {\r\n if (this.allowOnlyImages == true && newAttachment.IsImage != true) {\r\n EqpAttachmentDialogService.Error(this.noImageSelectedErrorMessage);\r\n this.abortFile();\r\n return false;\r\n } else if (!this.checkAcceptedFiles()) {\r\n EqpAttachmentDialogService.Error(this.wrongTypeSelectedErrorMessage);\r\n this.abortFile();\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n getImageDimensions(img: any) {\r\n const reader = new FileReader();\r\n reader.onload = (e: any) => {\r\n const image = new Image();\r\n image.src = e.target.result;\r\n image.onload = rs => {\r\n this.originalHeight = rs.currentTarget['height'];\r\n this.originalWidth = rs.currentTarget['width'];\r\n\r\n if (this.originalWidth > 1280) {\r\n this.customWidth = 1280;\r\n this.customHeight = Math.round((1280 * this.originalHeight) / this.originalWidth);\r\n } else {\r\n this.customHeight = rs.currentTarget['height'];\r\n this.customWidth = rs.currentTarget['width'];\r\n }\r\n };\r\n };\r\n reader.readAsDataURL(img);\r\n }\r\n\r\n restoreOriginalDimensions() {\r\n this.customWidth = this.originalWidth;\r\n this.customHeight = this.originalHeight;\r\n }\r\n\r\n onDimensionsChange(dimension: string) {\r\n if (dimension == \"H\") {\r\n this.customWidth = Math.round((this.customHeight * this.originalWidth) / this.originalHeight);\r\n } else if (dimension == \"W\") {\r\n this.customHeight = Math.round((this.customWidth * this.originalHeight) / this.originalWidth);\r\n }\r\n }\r\n\r\n imageCropped(event: ImageCroppedEvent) {\r\n this.croppedImage = event.base64;\r\n this.getCroppedAndUpload(this.croppedImage);\r\n }\r\n\r\n getCroppedAndUpload(file) {\r\n var self = this;\r\n\r\n var file: any = base64ToFile(file);\r\n\r\n const options = this.compressionOptions;\r\n\r\n /**\r\n * Comprime l'immagine passando come parametri le options create nell'oggetto sopra, e il file dal reader principale\r\n */\r\n imageCompression(file, options).then((fileCompressed => {\r\n\r\n let fileReader = new FileReader();\r\n\r\n //Faccio la push di ogni file all'interno dell'array di file dell'item da mandare al server\r\n fileReader.onload = function () {\r\n let resultReader = <string>fileReader.result;\r\n var marker = ';base64,';\r\n self.newAttachment.FileDataBase64 = resultReader.substring(resultReader.indexOf(marker) + marker.length);\r\n self.showCropImage = false;\r\n self.newAttachmentForm.enable();\r\n };\r\n\r\n fileReader.readAsDataURL(fileCompressed);\r\n\r\n }));\r\n\r\n }\r\n\r\n confirmCrop() {\r\n this.imageCropper.crop();\r\n }\r\n\r\n /**\r\n * Annulla la selezione del file, svuotando l'input e resettando tutte le proprietà dell'IAttachmentDTO\r\n */\r\n abortFile() {\r\n this.imageChangedEvent = '';\r\n if (this.imageInput)\r\n this.imageInput.nativeElement.value = '';\r\n\r\n this.selectedFile = null;\r\n this.selectedFiles = null;\r\n this.showCropImage = false;\r\n\r\n this.newAttachment.IsImage = false;\r\n this.newAttachment.FileDataBase64 = null;\r\n this.newAttachment.FileName = null;\r\n this.newAttachment.FileExtension = null;\r\n this.newAttachment.FileContentType = null;\r\n\r\n this.newMultipleAttachments = new Array<IAttachmentDTO>();\r\n\r\n this.customHeight = null;\r\n this.customWidth = null;\r\n this.originalHeight = null;\r\n this.originalWidth = null;\r\n }\r\n\r\n //#endregion\r\n}","import { NgModule } from '@angular/core';\r\n\r\n//Angular Material Components\r\nimport { MatCheckboxModule } from '@angular/material/checkbox';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\r\nimport { MatDatepickerModule } from '@angular/material/datepicker';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatRadioModule } from '@angular/material/radio';\r\nimport { MatSelectModule } from '@angular/material/select';\r\nimport { MatSliderModule } from '@angular/material/slider';\r\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\r\nimport { MatMenuModule } from '@angular/material/menu';\r\nimport { MatSidenavModule } from '@angular/material/sidenav';\r\nimport { MatToolbarModule } from '@angular/material/toolbar';\r\nimport { MatListModule } from '@angular/material/list';\r\nimport { MatGridListModule } from '@angular/material/grid-list';\r\nimport { MatCardModule } from '@angular/material/card';\r\nimport { MatStepperModule } from '@angular/material/stepper';\r\nimport { MatTabsModule } from '@angular/material/tabs';\r\nimport { MatExpansionModule } from '@angular/material/expansion';\r\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\r\nimport { MatChipsModule } from '@angular/material/chips';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\r\nimport { MatDialogModule } from '@angular/material/dialog';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\r\nimport { MatTableModule } from '@angular/material/table';\r\nimport { MatSortModule } from '@angular/material/sort';\r\nimport { MatPaginatorModule } from '@angular/material/paginator';\r\nimport { MatNativeDateModule } from '@angular/material/core';\r\n\r\n\r\n@NgModule({\r\n imports: [\r\n MatCheckboxModule,\r\n MatButtonModule,\r\n MatInputModule,\r\n MatAutocompleteModule,\r\n MatDatepickerModule,\r\n MatFormFieldModule,\r\n MatRadioModule,\r\n MatSelectModule,\r\n MatSliderModule,\r\n MatSlideToggleModule,\r\n MatMenuModule,\r\n MatSidenavModule,\r\n MatToolbarModule,\r\n MatListModule,\r\n MatGridListModule,\r\n MatCardModule,\r\n MatStepperModule,\r\n MatTabsModule,\r\n MatExpansionModule,\r\n MatButtonToggleModule,\r\n MatChipsModule,\r\n MatIconModule,\r\n MatProgressSpinnerModule,\r\n MatProgressBarModule,\r\n MatDialogModule,\r\n MatTooltipModule,\r\n MatSnackBarModule,\r\n MatTableModule,\r\n MatSortModule,\r\n MatPaginatorModule,\r\n MatDatepickerModule,\r\n MatNativeDateModule\r\n ],\r\n exports: [\r\n MatCheckboxModule,\r\n MatButtonModule,\r\n MatInputModule,\r\n MatAutocompleteModule,\r\n MatDatepickerModule,\r\n MatFormFieldModule,\r\n MatRadioModule,\r\n MatSelectModule,\r\n MatSliderModule,\r\n MatSlideToggleModule,\r\n MatMenuModule,\r\n MatSidenavModule,\r\n MatToolbarModule,\r\n MatListModule,\r\n MatGridListModule,\r\n MatCardModule,\r\n MatStepperModule,\r\n MatTabsModule,\r\n MatExpansionModule,\r\n MatButtonToggleModule,\r\n MatChipsModule,\r\n MatIconModule,\r\n MatProgressSpinnerModule,\r\n MatProgressBarModule,\r\n MatDialogModule,\r\n MatTooltipModule,\r\n MatSnackBarModule,\r\n MatTableModule,\r\n MatSortModule,\r\n MatPaginatorModule],\r\n})\r\nexport class MaterialModule { }","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { EqpAttachmentsComponent } from './eqp-attachments.component';\r\nimport { MaterialModule } from './modules/material.module';\r\nimport { ImageCropperModule } from 'ngx-image-cropper';\r\nimport { EqpTableModule } from '@eqproject/eqp-table';\r\n\r\n\r\n@NgModule({\r\n declarations: [EqpAttachmentsComponent],\r\n imports: [\r\n MaterialModule,\r\n FormsModule,\r\n CommonModule,\r\n ReactiveFormsModule,\r\n ImageCropperModule,\r\n EqpTableModule\r\n ],\r\n exports: [EqpAttachmentsComponent]\r\n})\r\nexport class EqpAttachmentsModule { }\r\n","/*\r\n * Public API Surface of eqp-attachments\r\n */\r\n\r\nexport * from './lib/eqp-attachments.component';\r\nexport * from './lib/eqp-attachments.module';\r\nexport * from './lib/interfaces/IAttachment';\r\nexport * from './lib/interfaces/IOptions';\r\nexport * from './lib/helpers/attachment.helper';\r\nexport * from './lib/services/eqp-attachment-dialog.service';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {MaterialModule as ɵa} from './lib/modules/material.module';"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAaY;AAAZ,WAAY,cAAc;IACtB,mDAAQ,CAAA;IACR,mDAAQ,CAAA;AACZ,CAAC,EAHW,cAAc,KAAd,cAAc;;;IC8BtB;KAAiB;;;;;IAMV,8CAAsB,GAA7B,UAA8B,QAAgB;QAC1C,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,IAAI,QAAQ,GAAA,CAAC,IAAI,IAAI,CAAC;KAC/D;;;;;;IAOM,iDAAyB,GAAhC,UAAiC,SAAiB;QAC9C,IAAI,QAAQ,GAAG,IAAI,CAAC,i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