@eqproject/eqp-attachments 3.1.8 → 3.1.9

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.
@@ -1 +1 @@
1
- {"version":3,"file":"eqproject-eqp-attachments.mjs","sources":["../../../projects/eqp-attachments/src/lib/helpers/attachment.helper.ts","../../../projects/eqp-attachments/src/lib/interfaces/IAttachment.ts","../../../projects/eqp-attachments/src/lib/services/eqp-attachment-dialog.service.ts","../../../projects/eqp-attachments/src/lib/services/eqp-attachment.service.ts","../../../projects/eqp-attachments/src/lib/eqp-attachments.component.ts","../../../projects/eqp-attachments/src/lib/eqp-attachments.component.html","../../../projects/eqp-attachments/src/lib/modules/material.module.ts","../../../projects/eqp-attachments/src/lib/eqp-attachments.module.ts","../../../projects/eqp-attachments/src/public-api.ts","../../../projects/eqp-attachments/src/eqproject-eqp-attachments.ts"],"sourcesContent":["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 static readonly dropboxCredentials: any = { \r\n url: 'https://www.dropbox.com/static/api/2/dropins.js', \r\n apiKey: \"aj2xjzms4dl1sch\",\r\n accessToken: \"l.BbasuuUFe42u-fXvpmDEteNkGMH-yPTxD79JhRjkBcR94Fm2QLgIjEETvx8TY36HsQQsIe24ofcNjYlg9IhSB7Fguqbi7wH-Jg6bW_3Q8VemsH4pC7Iakat643EzRcw7OMObPSs\"\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 { TemplateRef } from \"@angular/core\";\r\n\r\nexport 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 isUploading?: boolean;\r\n LargeFile?: File;\r\n IsLargeFile?: boolean;\r\n}\r\n\r\nexport enum AttachmentType {\r\n FILE = 1,\r\n LINK = 2,\r\n DROPBOX = 3\r\n}\r\n\r\nexport enum CropOptionEnum {\r\n ROTATE = 1,\r\n FLIP = 2\r\n}\r\n\r\nexport type AttachmentCardSize = 'small' | 'medium' | 'large' | 'custom';\r\n\r\nexport type Layout = 'full' | 'compact';\r\n\r\n\r\nexport interface AttachmentFieldColumn {\r\n key: string;\r\n display: string;\r\n type?: TypeAttachmentColumn;\r\n styles?: { flex: string };\r\n externalTemplate?: TemplateRef<any>;\r\n position?: number;\r\n class?: string;\r\n hidden?: boolean | (() => boolean);\r\n}\r\n\r\nexport interface AttachmentMenuAction {\r\n key?: string;\r\n name: string;\r\n icon: string;\r\n fn: (attachment: IAttachmentDTO) => void;\r\n disabled?: (attachment: IAttachmentDTO) => boolean;\r\n hidden?: (attachment: IAttachmentDTO) => boolean;\r\n position?: number;\r\n}\r\n\r\nexport enum TypeAttachmentColumn {\r\n DATE = 'date',\r\n TEMPLATE = 'template',\r\n TEXT = 'text'\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 { Injectable } from \"@angular/core\";\r\nimport { AttachmentHelperService } from \"../helpers/attachment.helper\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class EqpAttachmentService {\r\n constructor() {}\r\n\r\n loadDropboxScript() {\r\n const script = document.createElement(\"script\");\r\n script.type = \"text/javascript\";\r\n script.src = AttachmentHelperService.dropboxCredentials.url;\r\n script.id = \"dropboxjs\";\r\n script.dataset.appKey = AttachmentHelperService.dropboxCredentials.apiKey;\r\n document.body.appendChild(script);\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport {\r\n ChangeDetectorRef,\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnInit,\r\n Output,\r\n TemplateRef,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { FormBuilder, FormGroup, Validators } from \"@angular/forms\";\r\nimport { MatDialog, MatDialogRef } from \"@angular/material/dialog\";\r\nimport { DomSanitizer } from \"@angular/platform-browser\";\r\nimport imageCompression from \"browser-image-compression\";\r\nimport { base64ToFile, ImageCroppedEvent, ImageCropperComponent, ImageTransform } from \"ngx-image-cropper\";\r\nimport { AttachmentHelperService } from \"./helpers/attachment.helper\";\r\nimport { AttachmentCardSize, AttachmentFieldColumn, AttachmentMenuAction, AttachmentType, CropOptionEnum, IAttachmentDTO, TypeAttachmentColumn } from \"./interfaces/IAttachment\";\r\nimport { IOptions } from \"./interfaces/IOptions\";\r\nimport { EqpAttachmentDialogService } from \"./services/eqp-attachment-dialog.service\";\r\nimport { EqpAttachmentService } from \"./services/eqp-attachment.service\";\r\n\r\ndeclare var Dropbox: any;\r\n\r\nconst toBase64 = (file) =>\r\n 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 //#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 * 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 * Nel caso si vuole gestire un solo elemento senza passarlo come array, lo passo come singolo allegato e gestisco nella libreria l'array.\r\n */\r\n @Input(\"singleAttachment\") singleAttachment: 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 * 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 = {\r\n maxSizeMB: 0.5,\r\n maxWidthOrHeight: 1920,\r\n useWebWorker: true\r\n };\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 * Permette di stabilire, in caso di gestione allegati multipli, se la tabella contenente l'elenco\r\n * degli allegati deve contenere il campo di ricerca oppure no\r\n */\r\n @Input(\"isTableSearcheable\") isTableSearcheable: 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 * Permette di scegliere il modo in cui i file devono essere caricati\r\n */\r\n // @Input(\"uploadType\") uploadType: UploadTypeEnum = UploadTypeEnum.FILE_AND_LINK;\r\n\r\n /**\r\n * Permette di stabilire se i pulsanti per il caricamento dei file sono separati o in un menù a tendina\r\n */\r\n @Input(\"separatedUploadButtons\") separatedUploadButtons: boolean = false;\r\n\r\n /**\r\n * Permette di scegliere se dare la possibilità di vedere o no l'anteprima\r\n */\r\n @Input(\"showPreview\") showPreview: boolean = true;\r\n\r\n /**\r\n * In caso di allegato singolo, permette di scegliere se aggiungere file tramite drag and drop\r\n */\r\n @Input(\"singleAttachmentDragAndDrop\") singleAttachmentDragAndDrop: boolean = true;\r\n\r\n /**\r\n * Array di opzioni che si possono utilizzare per il crop\r\n */\r\n @Input(\"cropOptions\") cropOptions: Array<CropOptionEnum> = [1, 2];\r\n\r\n /**\r\n * Classe custom da assegnare al dialog del crop immagini\r\n */\r\n @Input(\"cropDialogClass\") cropDialogClass: string;\r\n\r\n @Input() maxFileSizeMB: number = 500; // Default max size of 100 MB\r\n @Input() cardSize: AttachmentCardSize = 'small'; // Default\r\n @Input() customCardWidthPx: number = 200; // Larghezza custom in px\r\n @Input() customCardHeightPx: number = 180; // Altezza custom in px\r\n\r\n @Input() layout: 'full' | 'compact' = 'compact';\r\n\r\n /**\r\n * Input per definire le label da usare nel componente\r\n */\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(\"uploadWithDropboxLabel\") uploadWithDropboxLabel: string = \"Carica con Dropbox\";\r\n @Input(\"cropLabel\") cropLabel: string = \"Scegli le dimensioni dell'immagine\";\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 =\r\n \"Non è possibile selezionare un file che non sia un'immagine.\";\r\n @Input(\"wrongTypeSelectedErrorMessage\") wrongTypeSelectedErrorMessage: string =\r\n \"Non è possibile caricare il file selezionato.\";\r\n @Input(\"videoPreviewErrorMessage\") videoPreviewErrorMessage: string =\r\n \"Impossibile aprire l'anteprima di un file video.\";\r\n @Input(\"videoPreviewErrorMessage\") audioPreviewErrorMessage: string =\r\n \"Impossibile aprire l'anteprima di un file audio.\";\r\n @Input(\"flipHorinzontalLabel\") flipHorinzontalLabel: string = \"Capovolgi orizzontalmente\";\r\n @Input(\"flipVerticalLabel\") flipVerticalLabel: string = \"Capovolgi verticalmente\";\r\n @Input(\"rotateRightLabel\") rotateRightLabel: string = \"Ruota a destra\";\r\n @Input(\"rotateLeftLabel\") rotateLeftLabel: string = \"Ruota a sinistra\";\r\n @Input(\"base64LimitMB\") base64LimitMB: number = 100;\r\n @Input() uploadTitle = 'Upload file';\r\n @Input() uploadSubtitle = 'Drag & drop files o click';\r\n @Input() dropHereLabel = 'Rilascia i file qui';\r\n @Input() supportedFormatsLabel = 'Formati supportati: JPEG, PNG, PDF (Max 100MB)';\r\n @Input() browseFilesLabel = 'Cerca i file';\r\n @Input() uploadSummaryLabel = 'Lista allegati';\r\n @Input() filesLabel = 'Files';\r\n @Input() totalSizeLabel = 'Dimensione totale';\r\n @Input() emptyStateLabel = 'Non sono presenti file caricati';\r\n @Input() addedSuccessfullyLabel = 'file(s) caricati con successo.';\r\n @Input() removedLabel = 'File rimosso';\r\n // @Input() removeLabel = 'Rimuovi file';\r\n @Input() chooseView = true;\r\n @Input() showSummary = false;\r\n @Input(\"viewMode\") viewMode: 'card' | 'table' = 'table';\r\n @Input(\"showUploadTitle\") showUploadTitle: boolean = true;\r\n @Input(\"showDropArea\") showDropArea: boolean = true;\r\n @Input() hiddenColumns: string[] = [];\r\n @Input() hiddenActions: string[] = [];\r\n @Input() showActionButtons: boolean = false;\r\n\r\n @Input() videoCompression: {\r\n enabled: boolean,\r\n maxWidth?: number,\r\n bitrate?: number\r\n } = { enabled: false, maxWidth: 1280, bitrate: 2500000 };\r\n\r\n private _customMenuActions: AttachmentMenuAction[] = [];\r\n _sortedMenuActions: AttachmentMenuAction[] = [];\r\n\r\n /**\r\n * SOLO quando [customMenuActions]=\"...\" cambia.\r\n */\r\n @Input()\r\n set customMenuActions(value: AttachmentMenuAction[]) {\r\n this._customMenuActions = value || [];\r\n this.setupMenuActions();\r\n }\r\n\r\n get customMenuActions(): AttachmentMenuAction[] {\r\n return this._customMenuActions;\r\n }\r\n\r\n private _customColumns: AttachmentFieldColumn[] = [];\r\n\r\n /**\r\n * SOLO quando [customColumns]=\"...\" cambia.\r\n */\r\n @Input()\r\n set customColumns(value: AttachmentFieldColumn[]) {\r\n this._customColumns = value || [];\r\n this.setupTableColumns();\r\n }\r\n\r\n get customColumns(): AttachmentFieldColumn[] {\r\n return this._customColumns;\r\n }\r\n\r\n //#endregion\r\n\r\n //#region @Output del componente\r\n\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 //#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 attachmentType = AttachmentType;\r\n // uploadTypeEnum = UploadTypeEnum;\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 dialogRefAddAttachment: MatDialogRef<TemplateRef<any>>;\r\n @ViewChild(\"dialogAddMultipleAttachment\", { static: true }) dialogAddMultipleAttachment: TemplateRef<any>;\r\n dialogRefCropImage: MatDialogRef<TemplateRef<any>>;\r\n @ViewChild(\"dialogCropImage\", { static: true }) dialogCropImage: TemplateRef<any>;\r\n\r\n @ViewChild('addingLinkTemplate') addingLinkTemplate: 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 canvasRotation = 0;\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(\"inlinePreviewTemplate\", { static: true }) inlinePreviewTemplate: TemplateRef<any>;\r\n @ViewChild(\"dialogPreview\", { static: true }) dialogPreview: TemplateRef<any>;\r\n\r\n imageFile: File;\r\n\r\n addingLinkMode: boolean = false;\r\n\r\n //#region Sezione nuova refactoring\r\n\r\n // Proprietà interna che conterrà l'array finale di colonne ordinate\r\n _tableColumns: AttachmentFieldColumn[] = [];\r\n @ViewChild('defaultFileTemplate', { static: true }) defaultFileTemplate: TemplateRef<any>;\r\n @ViewChild('defaultActionsTemplate', { static: true }) defaultActionsTemplate: TemplateRef<any>;\r\n\r\n // Stato drag & drop e toast\r\n dragOver = false;\r\n toast = {\r\n visible: false as boolean,\r\n type: 'success' as 'success' | 'error',\r\n text: '' as string,\r\n timeoutId: 0 as any\r\n };\r\n\r\n progressPercent = 0;\r\n totalSizeBytes = 0;\r\n get totalSizeFormatted(): string { return this.formatFileSize(this.totalSizeBytes); }\r\n\r\n // Utility per formattare bytes (2 decimali)\r\n formatFileSize(bytes: number): string {\r\n if (!bytes || bytes <= 0) return '0 Bytes';\r\n const k = 1024;\r\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];\r\n const i = Math.floor(Math.log(bytes) / Math.log(k));\r\n return `${parseFloat((bytes / Math.pow(k, i)).toFixed(2))} ${sizes[i]}`;\r\n }\r\n\r\n // Mostra toast con auto‑hide e reset progress bar CSS\r\n showToast(message: string, type: 'success' | 'error' = 'success', durationMs = 3000) {\r\n if (this.toast.visible && this.toast.text === message) {\r\n return;\r\n }\r\n\r\n // Cancella il timeout precedente se esiste\r\n if (this.toast.timeoutId) {\r\n clearTimeout(this.toast.timeoutId);\r\n }\r\n\r\n // Calcola una durata dinamica\r\n const duration = durationMs || Math.max(4000, message.length * 100);\r\n\r\n this.toast.text = message;\r\n this.toast.type = type;\r\n this.toast.visible = true;\r\n\r\n // Imposta il nuovo timeout per nascondere automaticamente il toast\r\n this.toast.timeoutId = setTimeout(() => {\r\n this.toast.visible = false;\r\n }, duration);\r\n }\r\n\r\n #endregion\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 eqpAttachmentService: EqpAttachmentService\r\n ) { }\r\n\r\n ngOnInit() {\r\n\r\n // Inizializza metriche e progress in base allo stato iniziale\r\n this.recomputeTotalsAndProgress();\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) this.acceptedFileTypes = \"image/*\";\r\n else 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, AttachmentType.DROPBOX];\r\n else if (\r\n this.allowedTypes.find((t) => t != AttachmentType.FILE && t != AttachmentType.LINK && t != AttachmentType.DROPBOX)\r\n ) {\r\n EqpAttachmentDialogService.Warning(\r\n 'Almeno uno degli AttachmentType selezionati nel parametro \"allowedTypes\" non esiste.'\r\n );\r\n this.allowedTypes = [AttachmentType.FILE, AttachmentType.LINK, AttachmentType.DROPBOX];\r\n }\r\n\r\n if (this.attachmentsList == null) this.attachmentsList = new Array<IAttachmentDTO>();\r\n\r\n // Se è stato passato un singolo allegato lo aggiungo alla lista\r\n if (this.singleAttachment != null && this.attachmentsList.length == 0) {\r\n this.attachmentsList.push(this.singleAttachment);\r\n }\r\n\r\n this.checkAttachmentImage();\r\n\r\n if (this.allowedTypes.includes(3)) {\r\n this.eqpAttachmentService.loadDropboxScript();\r\n }\r\n\r\n this.setupTableColumns();\r\n this.setupMenuActions();\r\n }\r\n\r\n setViewMode(mode: 'card' | 'table'): void {\r\n this.viewMode = mode;\r\n }\r\n\r\n // Ricalcola la somma pesata sugli allegati presenti\r\n private recomputeTotalsAndProgress() {\r\n this.totalSizeBytes = (this.attachmentsList || [])\r\n .filter(a => !!a)\r\n .reduce((sum, a) => sum + this.bytesFromBase64(a.FileDataBase64 || a.FileThumbnailBase64 || ''), 0);\r\n\r\n // Progress fittizio: 100% se presenti file, 0 se vuoto\r\n this.progressPercent = (this.attachmentsList && this.attachmentsList.length > 0) ? 100 : 0;\r\n }\r\n\r\n ngOnDestroy() {\r\n if (this.toast.timeoutId) clearTimeout(this.toast.timeoutId);\r\n }\r\n\r\n // Calcola i byte da una stringa Base64 pura (senza prefisso data:...)\r\n public bytesFromBase64(base64: string): number {\r\n if (!base64) return 0;\r\n // Rimuovi eventuale prefisso data URL\r\n const commaIdx = base64.indexOf(',');\r\n const b64 = commaIdx >= 0 ? base64.substring(commaIdx + 1) : base64;\r\n // Conta padding\r\n let padding = 0;\r\n if (b64.endsWith('==')) padding = 2;\r\n else if (b64.endsWith('=')) padding = 1;\r\n // Formula esatta: (3 * (len / 4)) - padding\r\n const len = b64.length;\r\n return Math.max(0, (3 * Math.floor(len / 4)) - padding);\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 * 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(\r\n this.deleteDialogMessage,\r\n () => {\r\n this.removeAttachmentFromList(this.attachmentsList.indexOf(element));\r\n },\r\n true,\r\n this.deleteDialogTitle\r\n );\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 this.localEditedAttachments.emit(this.attachmentsList);\r\n\r\n this.recomputeTotalsAndProgress();\r\n this.showToast(this.removedLabel || 'File removed', 'success');\r\n\r\n }\r\n\r\n private simulateProgress() {\r\n this.progressPercent = 0;\r\n setTimeout(() => {\r\n this.progressPercent = 30;\r\n setTimeout(() => {\r\n this.progressPercent = 60;\r\n setTimeout(() => {\r\n this.progressPercent = 100;\r\n }, 200);\r\n }, 200);\r\n }, 100);\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 if (attachment.AttachmentType == AttachmentType.LINK) {\r\n window.open(attachment.FilePath, \"_blank\");\r\n return;\r\n }\r\n\r\n if (attachment.LargeFile) {\r\n const file = attachment.LargeFile;\r\n const url = URL.createObjectURL(file);\r\n const link = document.createElement(\"a\");\r\n link.href = url;\r\n link.download = attachment.FileName || file.name;\r\n link.click();\r\n setTimeout(() => URL.revokeObjectURL(url), 1000);\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 * 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) return \"fas fa-link\";\r\n else return AttachmentHelperService.getIconFromFileExtensione(attachment.FileExtension);\r\n }\r\n\r\n //#endregion\r\n\r\n /**\r\n * In caso di allegato singolo, sceglie quale metodo richiamare in base al tipo di allegato\r\n */\r\n addFile(attachmentType: AttachmentType, imageInput = null) {\r\n if (attachmentType == AttachmentType.LINK) {\r\n this.switchToAddingLinkMode();\r\n } else if (attachmentType == AttachmentType.FILE) {\r\n imageInput.click();\r\n } else {\r\n this.chooseDropboxFile();\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) this.newAttachmentForm.reset();\r\n\r\n this.dialogRefCropImage.close();\r\n this.restoreOriginalDimensions();\r\n\r\n if (emitCloseEvent == true && this.abortAddAttachment) 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 && !this.newAttachment.LargeFile;\r\n } else {\r\n return !this.newAttachment.FilePath;\r\n }\r\n } else {\r\n return (\r\n this.newMultipleAttachments.filter(\r\n (p) =>\r\n (p.AttachmentType == AttachmentType.FILE && !p.FileDataBase64 && !p.LargeFile) ||\r\n (p.AttachmentType == AttachmentType.LINK && !p.FilePath)\r\n ).length > 0\r\n );\r\n }\r\n }\r\n\r\n confirmAddAttachment() {\r\n if (this.newAttachment.IsImage && this.imageCropper) {\r\n this.newAttachment.FileDataBase64 = this.imageCropper.crop().base64.split(\";base64,\")[1];\r\n }\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) this.attachmentsList = new Array<IAttachmentDTO>();\r\n\r\n this.attachmentsList.push(this.newAttachment);\r\n } else {\r\n if (this.newMultipleAttachments == null || this.newMultipleAttachments.length == 0) return;\r\n\r\n if (this.attachmentsList == null) this.attachmentsList = new Array<IAttachmentDTO>();\r\n\r\n this.attachmentsList = this.attachmentsList.concat(this.newMultipleAttachments);\r\n }\r\n\r\n this.localEditedAttachments.emit(this.attachmentsList);\r\n\r\n if (this.newAttachment.IsImage) {\r\n this.dialogRefCropImage.close();\r\n this.restoreOriginalDimensions();\r\n }\r\n\r\n if (this.newAttachment.AttachmentType === AttachmentType.LINK) {\r\n this.newAttachment = {} as IAttachmentDTO;\r\n if (this.newAttachmentForm) this.newAttachmentForm.reset();\r\n }\r\n\r\n this.resetSelectedFiles();\r\n }\r\n\r\n // 2. RESET TOTALE: Svuotiamo le proprietà di classe per evitare che \r\n // residui di upload precedenti (singoli o multipli) vengano trascinati.\r\n private resetSelectedFiles() {\r\n this.newAttachment = {} as IAttachmentDTO;\r\n this.newMultipleAttachments = [];\r\n this.selectedFile = null;\r\n this.selectedFiles = [];\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 = { ...row };\r\n\r\n\r\n if (this.getAttachmentEndpoint && this.selectedAttachment.IsImage && !this.selectedAttachment.FileDataBase64) {\r\n await this.getAttachmentByID()\r\n .then((res) => {\r\n this.selectedAttachment.FileDataBase64 = res.FileDataBase64;\r\n })\r\n .catch((err) => {\r\n EqpAttachmentDialogService.Error(err);\r\n });\r\n }\r\n\r\n if (this.selectedAttachment.AttachmentType == AttachmentType.LINK) {\r\n this.selectedAttachment.TrustedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(\r\n this.selectedAttachment.FilePath\r\n );\r\n }\r\n else if (this.selectedAttachment.FileContentType?.startsWith(\"video/\") && this.selectedAttachment.LargeFile) {\r\n const videoUrl = URL.createObjectURL(this.selectedAttachment.LargeFile);\r\n // Usiamo bypassSecurityTrustUrl per la sorgente del video\r\n this.selectedAttachment.TrustedUrl = this.sanitizer.bypassSecurityTrustUrl(videoUrl);\r\n }\r\n else if (\r\n this.selectedAttachment.IsImage &&\r\n !this.selectedAttachment.FileDataBase64 &&\r\n !this.selectedAttachment.FileThumbnailBase64\r\n ) {\r\n EqpAttachmentDialogService.Info(\"Impossibile aprire l'anteprima dell'allegato, file mancante.\");\r\n return;\r\n }\r\n else if (this.selectedAttachment.FileContentType === 'application/pdf' && this.selectedAttachment.FileDataBase64) {\r\n this.selectedAttachment.TrustedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(\r\n `data:application/pdf;base64,${this.selectedAttachment.FileDataBase64}`\r\n );\r\n }\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 const dialogRef = this.dialog.open(this.dialogPreview, {\r\n panelClass: 'eqp-attachments-preview-dialog',\r\n maxWidth: '95vw',\r\n width: row.IsImage || row.FileContentType?.startsWith('video/') ? 'auto' : '1100px',\r\n });\r\n\r\n // Pulizia della memoria quando il dialog si chiude\r\n dialogRef.afterClosed().subscribe(() => {\r\n if (this.selectedAttachment?.FileContentType?.startsWith(\"video/\")) {\r\n URL.revokeObjectURL(this.selectedAttachment.TrustedUrl as any);\r\n }\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 onFileAdded(event, isFileDropped: boolean = false) {\r\n\r\n if (this.isDisabled) {\r\n EqpAttachmentDialogService.Info(\"Caricamento allegati non disponibile.\");\r\n event.preventDefault();\r\n return;\r\n }\r\n this.showCropImage = false;\r\n\r\n this.resetSelectedFiles();\r\n\r\n const filesOnInput: File[] = isFileDropped\r\n ? (event as File[])\r\n : Array.from((event.target as HTMLInputElement)?.files || []);\r\n\r\n const { validFiles, oversizedFiles } = this.validationFile(filesOnInput);\r\n\r\n if (!validFiles || validFiles.length === 0) {\r\n if (!isFileDropped && event?.target instanceof HTMLInputElement) {\r\n event.target.value = '';\r\n }\r\n return;\r\n }\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 ([...validFiles].length == 1 || this.loadMultipleFiles != true) {\r\n this.selectedFile = validFiles[0];\r\n this.selectedFiles = validFiles;\r\n if (!this.selectedFile) 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) return;\r\n\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(validFiles[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 setTimeout(() => {\r\n this.showCropImage = true;\r\n this.imageFile = event;\r\n\r\n this.dialogRefCropImage = this.dialog.open(this.dialogCropImage, {\r\n disableClose: true,\r\n hasBackdrop: true,\r\n width: \"60%\",\r\n maxHeight: \"80%\",\r\n maxWidth: \"70vh\",\r\n panelClass: ['eqp-attachments-dialog', 'crop-dialog']\r\n });\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 this.confirmAddAttachment();\r\n }\r\n\r\n } else {\r\n this.selectedFiles = validFiles;\r\n if (!this.selectedFiles || this.selectedFiles.length == 0) return;\r\n\r\n if (!this.newMultipleAttachments) this.newMultipleAttachments = [];\r\n for (let i = 0; i < this.selectedFiles.length; i++) {\r\n let newAttachment: IAttachmentDTO = await this.createAttachmentFromUploadedFile(\r\n this.selectedFiles[i],\r\n true,\r\n 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) return;\r\n\r\n this.newMultipleAttachments.push(newAttachment);\r\n }\r\n this.confirmAddAttachment();\r\n }\r\n\r\n this.recomputeTotalsAndProgress();\r\n this.simulateProgress();\r\n // Caso 1: Successo Parziale (alcuni file validi, altri no)\r\n if (oversizedFiles.length > 0 && validFiles.length > 0) {\r\n const fileNames = oversizedFiles.join(', ');\r\n this.showToast(\r\n `${validFiles.length} file aggiunti. ${oversizedFiles.length} non caricati perché troppo grandi (${fileNames}).`,\r\n 'error'\r\n );\r\n }\r\n // Caso 2: Nessun file valido\r\n else if (oversizedFiles.length > 0 && validFiles.length === 0) {\r\n }\r\n // Caso 3: Tutti i file validi\r\n else if (oversizedFiles.length === 0 && validFiles.length > 0) {\r\n this.showToast(\r\n `${validFiles.length} ${this.addedSuccessfullyLabel || 'file(s) aggiunti con successo.'}`,\r\n 'success'\r\n );\r\n }\r\n\r\n //Resetto il valore del file input in modo da scatenare il change anche se si dovesse caricare lo stesso file\r\n if (!isFileDropped) event.target.value = \"\";\r\n }\r\n\r\n private validationFile(filesOnInput: File[]) {\r\n const validFiles: File[] = [];\r\n const oversizedFiles: string[] = [];\r\n\r\n for (const file of filesOnInput) {\r\n const fileSizeMB = file.size / 1024 / 1024;\r\n if (fileSizeMB > this.maxFileSizeMB) {\r\n oversizedFiles.push(file.name);\r\n } else {\r\n validFiles.push(file);\r\n }\r\n }\r\n\r\n if (oversizedFiles.length > 0) {\r\n const fileNames = oversizedFiles.join(', ');\r\n this.showToast(\r\n `File(s) troppo grandi: ${fileNames}. Limite: ${this.maxFileSizeMB}MB`,\r\n 'error'\r\n );\r\n }\r\n\r\n return { validFiles, oversizedFiles };\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(\r\n currentFile: File,\r\n getBase64: boolean = true,\r\n cropFile: boolean = false\r\n ): Promise<IAttachmentDTO> {\r\n let newAttachment: IAttachmentDTO = {} as IAttachmentDTO;\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 const fileSizeMB = currentFile.size / 1024 / 1024;\r\n const isLargeFile = fileSizeMB > this.base64LimitMB;\r\n const isVideo = currentFile.type.startsWith('video');\r\n\r\n if (isVideo) {\r\n let finalFile: File | Blob = currentFile;\r\n\r\n // Miniatura del video\r\n newAttachment.FileThumbnailBase64 = await this.generateVideoThumbnail(currentFile);\r\n\r\n // Se la compressione è abilitata, elaboriamo il video\r\n if (this.videoCompression.enabled) {\r\n // this.showToast(\"Compressione video in corso...\", \"info\");\r\n finalFile = await this.compressVideoNative(currentFile, this.videoCompression);\r\n\r\n // Aggiorniamo i dati dell'allegato con il nuovo file compresso\r\n newAttachment.FileName = currentFile.name.replace(/\\.[^/.]+$/, \"\") + \".webm\";\r\n newAttachment.FileContentType = \"video/webm\";\r\n }\r\n\r\n newAttachment.LargeFile = finalFile as File;\r\n newAttachment.IsLargeFile = true;\r\n return newAttachment;\r\n }\r\n\r\n if (isLargeFile) {\r\n // CASO LARGE FILE:\r\n // Popoliamo OriginalFile e forziamo il Base64 a null.\r\n newAttachment.FileDataBase64 = null;\r\n newAttachment.LargeFile = currentFile;\r\n newAttachment.IsLargeFile = true;\r\n getBase64 = false;\r\n }\r\n\r\n if (getBase64 == true) {\r\n let base64Result = await this.getBase64FromFile(currentFile);\r\n newAttachment.FileDataBase64 = base64Result.Base64File;\r\n if (!newAttachment.FileContentType && base64Result.ContentType) {\r\n newAttachment.FileContentType = base64Result.ContentType;\r\n }\r\n\r\n if (newAttachment.IsImage && newAttachment.FileDataBase64 && cropFile) {\r\n this.getCroppedAndUpload(`data:${base64Result.ContentType};base64,${base64Result.Base64File}`, newAttachment);\r\n }\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 const fileSizeMB = currentFile.size / 1024 / 1024;\r\n if (fileSizeMB > this.base64LimitMB) {\r\n return {\r\n Base64File: null,\r\n ContentType: currentFile.type\r\n };\r\n }\r\n // Procedura standard\r\n try {\r\n let base64File = await toBase64(currentFile);\r\n let contentType: string = null;\r\n if (base64File) {\r\n contentType = base64File.split(\",\")[0].split(\":\")[1].split(\";\")[0];\r\n base64File = base64File.split(\",\")[1];\r\n }\r\n return {\r\n Base64File: base64File,\r\n ContentType: contentType\r\n };\r\n } catch (ex) {\r\n return { Base64File: null, ContentType: null };\r\n }\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 // Se accetto tutto, esco subito\r\n if (this.acceptedFileTypes === \"*\") return true;\r\n\r\n const isTypeValid = (mimeType: string): boolean => {\r\n if (!mimeType) return false;\r\n\r\n // Controllo corrispondenza esatta (es. image/png)\r\n if (this.acceptedFileTypes.includes(mimeType)) return true;\r\n\r\n const wildcards = this.acceptedFileTypes.split(\",\").filter(t => t.includes(\"*\"));\r\n for (let t of wildcards) {\r\n const prefix = t.split(\"*\")[0]; // Prende \"image/\" da \"image/*\"\r\n if (mimeType.startsWith(prefix)) return true;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n if (this.loadMultipleFiles !== true) {\r\n // Caso Singolo\r\n return isTypeValid(this.selectedFile.type);\r\n } else {\r\n // Caso Multiplo: TUTTI i file selezionati devono essere validi\r\n return Array.from(this.selectedFiles).every(file => isTypeValid(file.type));\r\n }\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 //#region Gestione crop file\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 this.canvasRotation = 0;\r\n this.transform = {};\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, this.newAttachment);\r\n }\r\n\r\n getCroppedAndUpload(file, newAttachment: IAttachmentDTO) {\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 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 newAttachment.FileDataBase64 = resultReader.substring(resultReader.indexOf(marker) + marker.length);\r\n self.showCropImage = false;\r\n if (self.newAttachmentForm) {\r\n self.newAttachmentForm.enable();\r\n }\r\n };\r\n\r\n fileReader.readAsDataURL(fileCompressed);\r\n });\r\n }\r\n\r\n rotateLeft() {\r\n this.canvasRotation--;\r\n this.flipAfterRotate();\r\n }\r\n\r\n rotateRight() {\r\n this.canvasRotation++;\r\n this.flipAfterRotate();\r\n }\r\n\r\n private flipAfterRotate() {\r\n const flippedH = this.transform.flipH;\r\n const flippedV = this.transform.flipV;\r\n this.transform = {\r\n ...this.transform,\r\n flipH: flippedV,\r\n flipV: flippedH\r\n };\r\n }\r\n\r\n flipHorizontal() {\r\n this.transform = {\r\n ...this.transform,\r\n flipH: !this.transform.flipH\r\n };\r\n }\r\n\r\n flipVertical() {\r\n this.transform = {\r\n ...this.transform,\r\n flipV: !this.transform.flipV\r\n };\r\n }\r\n\r\n //#endregion\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 if (this.imageInput) 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 this.dialogRefCropImage.close();\r\n this.restoreOriginalDimensions();\r\n }\r\n\r\n //#endregion\r\n\r\n fileDropped(event: DragEvent): void {\r\n\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.dragOver = false;\r\n\r\n const files = event.dataTransfer?.files;\r\n\r\n if (files && files.length > 0) {\r\n this.onFileAdded({ target: { files: files } });\r\n }\r\n }\r\n\r\n // Se il caricamento del file dropbox va a buon fine, la funzione di callback restituisce un array di oggetti.\r\n // Viene poi fatta una XMLHttpRequest con responseType 'blob' per convertire il primo elemento della response in un Blob.\r\n chooseDropboxFile() {\r\n if (this.isDisabled) return;\r\n var options = {\r\n success: (files: any[]) => {\r\n const xhr = new XMLHttpRequest();\r\n xhr.open(\"GET\", files[0].link);\r\n xhr.setRequestHeader(\"Authorization\", `Bearer ${AttachmentHelperService.dropboxCredentials.accessToken}`);\r\n xhr.responseType = \"blob\";\r\n\r\n xhr.onload = () => {\r\n const blob = xhr.response;\r\n const file = new File([blob], files[0].name, { type: blob.type });\r\n let filesAdded = [file];\r\n this.onFileAdded(filesAdded, true);\r\n };\r\n\r\n xhr.send();\r\n },\r\n linkType: \"direct\",\r\n multiselect: false,\r\n extensions: [\".jpg\", \".png\", \".pdf\", \".doc\", \".docx\", \".txt\"]\r\n };\r\n Dropbox.choose(options);\r\n }\r\n\r\n // Workaround dropzone: disabilito il click degli elementi inclusi nella dropzone per evitare di cliccare due volte\r\n onSelectFile(event, fileInput) {\r\n if (\r\n (event.target as HTMLButtonElement).tagName === \"BUTTON\" ||\r\n (event.target as HTMLButtonElement).tagName === \"INPUT\" ||\r\n this.addingLinkMode == true\r\n ) {\r\n return;\r\n }\r\n fileInput.click();\r\n }\r\n\r\n /**\r\n * Apre il dialogo per l'inserimento del link.\r\n */\r\n switchToAddingLinkMode(): void {\r\n\r\n if (this.isDisabled) return;\r\n\r\n this.newAttachmentForm = this.formBuilder.group({\r\n fileName: [''],\r\n filePath: ['', [Validators.required, Validators.pattern('https?://.+')]]\r\n });\r\n\r\n const dialogRef = this.dialog.open(this.addingLinkTemplate, {\r\n width: '500px',\r\n panelClass: 'eqp-attachments-dialog'\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(result => {\r\n if (result) {\r\n // Crea l'oggetto per il nuovo link dai dati del form\r\n const newLinkObject: IAttachmentDTO = {\r\n ID: 0,\r\n AttachmentType: AttachmentType.LINK,\r\n FileName: result.fileName,\r\n FilePath: result.filePath,\r\n IsImage: false\r\n };\r\n\r\n this.newAttachment = newLinkObject;\r\n this.newMultipleAttachments = [newLinkObject];\r\n\r\n\r\n this.confirmAddAttachment();\r\n }\r\n });\r\n }\r\n\r\n\r\n\r\n // Metodo per ottenere le classi CSS dinamiche\r\n getCardClass(att: IAttachmentDTO): { [key: string]: boolean } {\r\n return {\r\n 'file-preview': true,\r\n 'uploading': !!att.isUploading,\r\n 'card-small': this.cardSize === 'small',\r\n 'card-medium': this.cardSize === 'medium',\r\n 'card-large': this.cardSize === 'large',\r\n };\r\n }\r\n\r\n // Questa funzione ora si applica al contenitore, non alla singola card.\r\n getPreviewsContainerStyle(): { [key: string]: string } {\r\n let minWidth = '200px'; // Dimensione di default per 'medium'\r\n\r\n if (this.cardSize === 'small') {\r\n minWidth = '140px';\r\n } else if (this.cardSize === 'large') {\r\n minWidth = '280px';\r\n } else if (this.cardSize === 'custom') {\r\n minWidth = `${this.customCardWidthPx}px`;\r\n }\r\n\r\n return { '--card-min-width': minWidth };\r\n }\r\n\r\n handlePrimaryAction(attachment: IAttachmentDTO): void {\r\n // Se il file può essere visualizzato in anteprima, apri il dialog\r\n if (this.canBePreviewed(attachment)) {\r\n this.openPreviewDialog(attachment);\r\n }\r\n // Altrimenti, esegui l'azione di default (download per file, apri per link)\r\n else {\r\n this.viewAttachment(attachment);\r\n }\r\n }\r\n\r\n /**\r\n * Determines if an attachment can be previewed in the dialog.\r\n * @param att The attachment to check.\r\n * @returns `true` if a preview is available, otherwise `false`.\r\n */\r\n canBePreviewed(att: IAttachmentDTO): boolean {\r\n if (!att) {\r\n return false;\r\n }\r\n\r\n // Case 1: It's an image with Base64 data.\r\n const isPreviewableImage = att.IsImage && !!att.FileDataBase64;\r\n\r\n // Case 2: It's a PDF with Base64 data.\r\n const isPreviewablePdf = att.FileContentType === 'application/pdf' && !!att.FileDataBase64;\r\n\r\n // Case 3: It's a remote document with a URL (for Google Viewer).\r\n const isRemoteDocument = !att.IsImage && !!att.FilePath && !!this.productionBaseUrl;\r\n\r\n //Case 4: Video - È un video e abbiamo il file binario salvato in LargeFile\r\n const isPreviewableVideo = att.FileContentType?.startsWith('video/') && !!att.LargeFile;\r\n\r\n // A preview is possible if any of these conditions are true.\r\n return isPreviewableImage || isPreviewablePdf || isRemoteDocument || isPreviewableVideo;\r\n }\r\n\r\n private isColumnHidden(col: AttachmentFieldColumn): boolean {\r\n // 1) hiddenColumns\r\n if (this.hiddenColumns?.includes(col.key)) return true;\r\n\r\n // 2) hidden definito sulla colonna (boolean o funzione senza args)\r\n if (typeof col.hidden === 'function') return !!col.hidden();\r\n return !!col.hidden;\r\n }\r\n\r\n isActionHidden(action: AttachmentMenuAction, att?: IAttachmentDTO): boolean {\r\n if (this.hiddenActions?.includes(action.key)) return true;\r\n if (typeof action.hidden === 'function') return !!action.hidden(att);\r\n return !!action.hidden;\r\n }\r\n\r\n /**\r\n * Unisce le colonne di default con quelle custom e le ordina.\r\n */\r\n private setupTableColumns(): void {\r\n // Definiamo le colonne standard con una posizione\r\n const defaultFileColumn: AttachmentFieldColumn = {\r\n key: 'file',\r\n display: 'File',\r\n type: TypeAttachmentColumn.TEMPLATE,\r\n externalTemplate: this.defaultFileTemplate,\r\n styles: { flex: '1 1 0%' },\r\n position: 10\r\n };\r\n\r\n const defaultActionsColumn: AttachmentFieldColumn = {\r\n key: 'actions',\r\n display: 'Azioni',\r\n type: TypeAttachmentColumn.TEMPLATE,\r\n externalTemplate: this.defaultActionsTemplate,\r\n position: 100,\r\n class: 'col-actions',\r\n styles: { flex: '0 0 150px' }\r\n };\r\n\r\n const processedCustomColumns = this._customColumns.map(col => {\r\n // Flex di default\r\n if (!col.styles || !col.styles.flex) {\r\n return {\r\n ...col,\r\n styles: { ...col.styles, flex: '1 1 0%' }\r\n };\r\n }\r\n return col;\r\n });\r\n\r\n const allColumns = [\r\n defaultFileColumn,\r\n defaultActionsColumn,\r\n ...processedCustomColumns\r\n ];\r\n\r\n // Ordiniamo l'array finale in base alla proprietà 'position'\r\n this._tableColumns = allColumns.filter(col => !this.isColumnHidden(col))\r\n .sort((a, b) => {\r\n const posA = a.position || 99;\r\n const posB = b.position || 99;\r\n return posA - posB;\r\n });\r\n }\r\n\r\n private setupMenuActions(): void {\r\n const defaultPreviewAction: AttachmentMenuAction = {\r\n key: 'preview',\r\n icon: 'visibility',\r\n name: 'Anteprima',\r\n fn: (att) => this.openPreviewDialog(att),\r\n disabled: (att) => !this.canBePreviewed(att),\r\n position: 10\r\n };\r\n\r\n const defaultDeleteAction: AttachmentMenuAction = {\r\n key: 'delete',\r\n icon: 'delete',\r\n name: 'Elimina',\r\n fn: (att) => this.deleteAttachment(att),\r\n disabled: () => this.disableAction,\r\n position: 100\r\n };\r\n\r\n const allActions = [\r\n defaultPreviewAction,\r\n defaultDeleteAction,\r\n ...this._customMenuActions\r\n ];\r\n\r\n // Ordiniamo l'array finale in base alla proprietà 'position'\r\n this._sortedMenuActions = allActions.sort((a, b) => {\r\n const posA = a.position || 99;\r\n const posB = b.position || 99;\r\n return posA - posB;\r\n });\r\n }\r\n\r\n private generateVideoThumbnail(file: File): Promise<string> {\r\n return new Promise((resolve, reject) => {\r\n const video = document.createElement('video');\r\n const canvas = document.createElement('canvas');\r\n const context = canvas.getContext('2d');\r\n\r\n // Crea un URL temporaneo per il file video\r\n const videoUrl = URL.createObjectURL(file);\r\n video.src = videoUrl;\r\n video.preload = 'metadata';\r\n video.muted = true;\r\n video.playsInline = true;\r\n\r\n video.onloadedmetadata = () => {\r\n // Vai al secondo 1 (per evitare il fotogramma nero iniziale)\r\n video.currentTime = 1;\r\n };\r\n\r\n video.onseeked = () => {\r\n // Imposta le dimensioni del canvas uguali al video\r\n canvas.width = video.videoWidth;\r\n canvas.height = video.videoHeight;\r\n\r\n // Disegna il fotogramma sul canvas\r\n context.drawImage(video, 0, 0, canvas.width, canvas.height);\r\n\r\n // Estrai il Base64 (qualità 0.7 per risparmiare spazio)\r\n const thumbnail = canvas.toDataURL('image/jpeg', 0.7);\r\n\r\n // Pulisci la memoria\r\n URL.revokeObjectURL(videoUrl);\r\n resolve(thumbnail.split(',')[1]); // Restituiamo solo la parte Base64\r\n };\r\n\r\n video.onerror = (err) => {\r\n URL.revokeObjectURL(videoUrl);\r\n reject(err);\r\n };\r\n });\r\n }\r\n\r\n private compressVideoNative(file: File, config: any): Promise<Blob> {\r\n return new Promise((resolve, reject) => {\r\n const video = document.createElement('video');\r\n const canvas = document.createElement('canvas');\r\n const ctx = canvas.getContext('2d');\r\n const videoUrl = URL.createObjectURL(file);\r\n\r\n video.src = videoUrl;\r\n video.muted = true;\r\n video.play();\r\n\r\n video.onloadeddata = () => {\r\n // Calcoliamo le nuove dimensioni mantenendo l'aspect ratio\r\n let width = video.videoWidth;\r\n let height = video.videoHeight;\r\n if (width > config.maxWidth) {\r\n height = Math.round((config.maxWidth * height) / width);\r\n width = config.maxWidth;\r\n }\r\n\r\n canvas.width = width;\r\n canvas.height = height;\r\n\r\n // Catturiamo lo stream dal canvas a 30fps\r\n const stream = canvas.captureStream(30);\r\n const recorder = new MediaRecorder(stream, {\r\n mimeType: 'video/webm;codecs=vp8', // Formato web ottimizzato\r\n videoBitsPerSecond: config.bitrate\r\n });\r\n\r\n const chunks: Blob[] = [];\r\n recorder.ondataavailable = (e) => chunks.push(e.data);\r\n recorder.onstop = () => {\r\n const compressedBlob = new Blob(chunks, { type: 'video/webm' });\r\n URL.revokeObjectURL(videoUrl);\r\n resolve(compressedBlob);\r\n };\r\n\r\n recorder.start();\r\n\r\n // Funzione che disegna ogni frame sul canvas\r\n const drawFrame = () => {\r\n if (video.paused || video.ended) {\r\n recorder.stop();\r\n return;\r\n }\r\n ctx.drawImage(video, 0, 0, width, height);\r\n requestAnimationFrame(drawFrame);\r\n };\r\n drawFrame();\r\n };\r\n\r\n video.onerror = reject;\r\n });\r\n }\r\n}\r\n","<!-- Se richiesta la gestione singola mostra il pulsante di caricamento di un singolo file -->\r\n@if(showUploadTitle == true || chooseView == true){\r\n<div class=\"header\">\r\n @if(showUploadTitle == true){\r\n <h4>{{ uploadTitle }}</h4>\r\n }\r\n @if(chooseView == true){\r\n <mat-button-toggle-group [value]=\"viewMode\" (change)=\"setViewMode($event.value)\"\r\n aria-label=\"Modalità di visualizzazione\">\r\n <mat-button-toggle value=\"card\"><mat-icon>grid_view</mat-icon></mat-button-toggle>\r\n <mat-button-toggle value=\"table\"><mat-icon>view_list</mat-icon></mat-button-toggle>\r\n </mat-button-toggle-group>\r\n }\r\n</div>\r\n}\r\n\r\n<!-- Gestione singolo -->\r\n@if (multipleAttachment != true) {\r\n@if (!singleAttachmentDragAndDrop) {\r\n@if (!addingLinkMode) {\r\n<div class=\"text-center\">\r\n <ng-container [ngTemplateOutlet]=\"addAttachmentButton\"></ng-container>\r\n</div>\r\n} @else {\r\n<div class=\"text-center\">\r\n <ng-container [ngTemplateOutlet]=\"addingLinkTemplate\"></ng-container>\r\n</div>\r\n}\r\n} @else {\r\n<input #fileInput id=\"file_attachment\" name=\"file_attachment\" type=\"file\" hidden (change)=\"onFileAdded($event)\"\r\n [accept]=\"acceptedFileTypes\" [multiple]=\"loadMultipleFiles\" />\r\n\r\n@if (allowedTypes && allowedTypes.includes(1) && (!attachmentsList || attachmentsList.length == 0 ||\r\n(attachmentsList.length > 0 && !attachmentsList[0]))) {\r\n\r\n@if (showDropArea == true) {\r\n<!-- FULL -->\r\n@if (layout === 'full') {\r\n\r\n<div class=\"dropbox\" [class.dragover]=\"dragOver\" (dragover)=\"dragOver = true; $event.preventDefault()\"\r\n (dragleave)=\"dragOver = false\" (drop)=\"dragOver = false; fileDropped($event)\"\r\n (click)=\"onSelectFile($event, fileInput)\" role=\"button\" tabindex=\"0\" (keydown.enter)=\"fileInput.click()\"\r\n (keydown.space)=\"fileInput.click()\">\r\n <div class=\"dropbox-icon\">📁</div>\r\n <div class=\"dropbox-text\">{{ dropHereLabel }}</div>\r\n <div class=\"dropbox-subtext\">\r\n {{ supportedFormatsLabel }}\r\n </div>\r\n <button class=\"browse-btn\" type=\"button\" (click)=\"$event.stopPropagation(); fileInput.click()\">\r\n {{ browseFilesLabel }}\r\n </button>\r\n <div class=\"secondary-action\">\r\n @if (allowedTypes.includes(2) || allowedTypes.includes(3)) {\r\n @if (allowedTypes.includes(2) && allowedTypes.includes(3)) {\r\n <a class=\"secondary-action-link\" [matMenuTriggerFor]=\"isDisabled ? null : linkMenu\"\r\n [class.disabled-link]=\"isDisabled\" (click)=\"$event.stopPropagation()\">\r\n o aggiungi da web\r\n </a>\r\n <mat-menu #linkMenu=\"matMenu\">\r\n <button mat-menu-item (click)=\"switchToAddingLinkMode()\">\r\n <mat-icon>link</mat-icon>\r\n <span>Aggiungi da link</span>\r\n </button>\r\n <button mat-menu-item (click)=\"chooseDropboxFile()\">\r\n <mat-icon>cloud_queue</mat-icon>\r\n <span>Carica da Dropbox</span>\r\n </button>\r\n </mat-menu>\r\n }\r\n\r\n @else if (allowedTypes.includes(2)) {\r\n <a [class.disabled-link]=\"isDisabled\" class=\"secondary-action-link\"\r\n (click)=\"$event.stopPropagation(); switchToAddingLinkMode()\">\r\n aggiungi un link\r\n </a>\r\n }\r\n\r\n @else if (allowedTypes.includes(3)) {\r\n <a [class.disabled-link]=\"isDisabled\" class=\"secondary-action-link\"\r\n (click)=\"$event.stopPropagation(); chooseDropboxFile()\">\r\n carica da Dropbox\r\n </a>\r\n }\r\n }\r\n </div>\r\n</div>\r\n}@else {\r\n<div class=\"compact-uploader\" [class.dragover]=\"dragOver\" (dragover)=\"dragOver = true; $event.preventDefault()\"\r\n (dragleave)=\"dragOver = false\" (drop)=\"dragOver = false; fileDropped($event)\">\r\n <div class=\"compact-icon\"><mat-icon>folder_open</mat-icon></div>\r\n <div class=\"compact-text\" (click)=\"onSelectFile($event, fileInput)\">\r\n <div class=\"compact-title\">Trascina i file o seleziona dal computer</div>\r\n <div class=\"compact-subtitle\">{{ supportedFormatsLabel }}</div>\r\n </div>\r\n <div class=\"compact-actions\">\r\n <button mat-stroked-button color=\"primary\" [disabled]=\"isDisabled\"\r\n (click)=\"$event.stopPropagation(); fileInput.click()\">Sfoglia</button>\r\n @if (allowedTypes.includes(2) || allowedTypes.includes(3)) {\r\n <button mat-stroked-button [disabled]=\"isDisabled\" [matMenuTriggerFor]=\"compactLinkMenu\"\r\n (click)=\"$event.stopPropagation()\">Link</button>\r\n <mat-menu #compactLinkMenu=\"matMenu\">\r\n @if (allowedTypes.includes(2)) { <button mat-menu-item [disabled]=\"isDisabled\"\r\n (click)=\"switchToAddingLinkMode()\">{{ openLinkLabel }}</button> }\r\n @if (allowedTypes.includes(3)) { <button mat-menu-item [disabled]=\"isDisabled\" (click)=\"chooseDropboxFile()\">{{\r\n uploadWithDropboxLabel }}</button> }\r\n </mat-menu>\r\n }\r\n </div>\r\n</div>\r\n}\r\n}\r\n}\r\n}\r\n\r\n<!-- Azioni singolo elemento (come prima) -->\r\n<div class=\"text-center\">\r\n @if (attachmentsList && attachmentsList.length > 0 && attachmentsList[0] && showActionButtons == true) {\r\n <button class=\"mb-2 me-2 eqp-attachments-download-btn\" (click)=\"viewAttachment(attachmentsList[0])\" type=\"button\"\r\n mat-raised-button color=\"primary\">\r\n @if (attachmentsList[0].AttachmentType == AttachmentType.FILE) {\r\n <mat-icon>download</mat-icon>\r\n } @else {\r\n <mat-icon>open_in_new</mat-icon>\r\n }\r\n {{ attachmentsList[0].AttachmentType == AttachmentType.FILE ? downloadLabel : openLinkLabel }}\r\n </button>\r\n\r\n @if (showPreview && (!attachmentsList[0].FileContentType || (!attachmentsList[0].FileContentType.startsWith('video')\r\n && !attachmentsList[0].FileContentType.startsWith('audio'))) && attachmentsList[0].IsImage == true) {\r\n <button class=\"mb-2 me-2 eqp-attachments-preview-btn\" (click)=\"openPreviewDialog(attachmentsList[0])\" type=\"button\"\r\n mat-raised-button color=\"primary\">\r\n <mat-icon>visibility</mat-icon> {{ previewLabel }}\r\n </button>\r\n }\r\n\r\n <button [disabled]=\"disableAction\" class=\"mb-2 eqp-attachments-delete-btn\"\r\n (click)=\"deleteAttachment(attachmentsList[0])\" type=\"button\" mat-raised-button [disabled]=\"isDisabled\">\r\n <mat-icon>delete</mat-icon> {{ deleteLabel }}\r\n </button>\r\n }\r\n</div>\r\n}\r\n\r\n<!-- Gestione multipla -->\r\n@if (multipleAttachment == true && showDropArea == true) {\r\n<input #fileInput id=\"file_attachment_multi\" name=\"file_attachment_multi\" type=\"file\" hidden\r\n (change)=\"onFileAdded($event)\" [accept]=\"acceptedFileTypes\" [multiple]=\"loadMultipleFiles\" />\r\n\r\n@if (layout === 'full') {\r\n<div class=\"dropbox\" [class.dragover]=\"dragOver\" (dragover)=\"dragOver = true; $event.preventDefault()\"\r\n (dragleave)=\"dragOver = false\" (drop)=\"dragOver = false; fileDropped($event)\"\r\n (click)=\"onSelectFile($event, fileInput)\" role=\"button\" tabindex=\"0\" (keydown.enter)=\"fileInput.click()\"\r\n (keydown.space)=\"fileInput.click()\">\r\n <div class=\"dropbox-icon\">📁</div>\r\n <div class=\"dropbox-text\">{{ dropHereLabel }}</div>\r\n <div class=\"dropbox-subtext\">\r\n {{ supportedFormatsLabel }}\r\n </div>\r\n <button class=\"browse-btn\" type=\"button\" (click)=\"$event.stopPropagation(); fileInput.click()\">\r\n {{ browseFilesLabel }}\r\n </button>\r\n @if (allowedTypes.includes(2)) {\r\n <div class=\"secondary-action-link\">\r\n o <a (click)=\"$event.stopPropagation(); switchToAddingLinkMode()\">aggiungi un link</a>\r\n </div>\r\n }\r\n</div>\r\n}@else{\r\n<div class=\"compact-uploader\" [class.dragover]=\"dragOver\" (dragover)=\"dragOver = true; $event.preventDefault()\"\r\n (dragleave)=\"dragOver = false\" (drop)=\"dragOver = false; fileDropped($event)\">\r\n <div class=\"compact-icon\"><mat-icon>folder_open</mat-icon></div>\r\n <div class=\"compact-text\" (click)=\"onSelectFile($event, fileInput)\">\r\n <div class=\"compact-title\">Trascina i file o seleziona dal computer</div>\r\n <div class=\"compact-subtitle\">{{ supportedFormatsLabel }}</div>\r\n </div>\r\n <div class=\"compact-actions\">\r\n <button mat-stroked-button [disabled]=\"isDisabled\" color=\"primary\"\r\n (click)=\"$event.stopPropagation(); fileInput.click()\">Sfoglia</button>\r\n @if (allowedTypes.includes(2) || allowedTypes.includes(3)) {\r\n <button mat-stroked-button [disabled]=\"isDisabled\" [matMenuTriggerFor]=\"compactLinkMenu\"\r\n (click)=\"$event.stopPropagation()\">Link</button>\r\n <mat-menu #compactLinkMenu=\"matMenu\">\r\n @if (allowedTypes.includes(2)) { <button mat-menu-item [disabled]=\"isDisabled\"\r\n (click)=\"switchToAddingLinkMode()\">{{ openLinkLabel }}</button> }\r\n @if (allowedTypes.includes(3)) { <button mat-menu-item [disabled]=\"isDisabled\" (click)=\"chooseDropboxFile()\">{{\r\n uploadWithDropboxLabel }}</button> }\r\n </mat-menu>\r\n }\r\n </div>\r\n</div>\r\n}\r\n}\r\n\r\n@if (attachmentsList?.length > 0 && showSummary) {\r\n<div class=\"upload-stats\">\r\n\r\n <div class=\"stats-info\">\r\n <div class=\"stat-item\">\r\n <div class=\"stat-value\">{{ attachmentsList?.length }}</div>\r\n <div class=\"stat-label\">{{ filesLabel }}</div>\r\n </div>\r\n <div class=\"stat-item\">\r\n <div class=\"stat-value\">{{ totalSizeFormatted }}</div>\r\n <div class=\"stat-label\">{{ totalSizeLabel }}</div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"progress-bar\">\r\n <div class=\"progress-fill\" [style.width.%]=\"progressPercent\"></div>\r\n </div>\r\n\r\n</div>\r\n} @else if(attachmentsList?.length == 0){\r\n<div class=\"empty-state\">{{ emptyStateLabel }}</div>\r\n}\r\n\r\n<!-- Griglia anteprime card (vale per singolo e multiplo) -->\r\n@if (viewMode === 'card') {\r\n\r\n<div class=\"file-previews\" [ngStyle]=\"getPreviewsContainerStyle()\">\r\n @for (att of attachmentsList; track att.ID) {\r\n <div [ngClass]=\"getCardClass(att)\">\r\n <div class=\"preview-img-container\" (click)=\"!att.isUploading && handlePrimaryAction(att)\">\r\n\r\n @if (att.IsImage || att.FileThumbnailBase64) {\r\n <img class=\"preview-img\" [src]=\"'data:image/jpeg;base64,' + (att.FileThumbnailBase64 || att.FileDataBase64)\"\r\n [alt]=\"att.FileName\" />\r\n } @else {\r\n <div class=\"file-icon\"><i [ngClass]=\"getAttachmentIcon(att)\"></i></div>\r\n }\r\n\r\n <div class=\"preview-action-overlay\">\r\n @if (att.FileContentType?.startsWith('video/')) {\r\n <mat-icon>play_arrow</mat-icon>\r\n }\r\n @else if (att.IsImage && canBePreviewed(att)) {\r\n <mat-icon>visibility</mat-icon>\r\n }\r\n @else if (att.FileContentType === 'application/pdf' && canBePreviewed(att)) {\r\n <mat-icon>open_in_new</mat-icon>\r\n }\r\n @else if (att.AttachmentType === AttachmentType.FILE) {\r\n <mat-icon>download</mat-icon>\r\n }\r\n @else {\r\n <mat-icon>open_in_new</mat-icon>\r\n }\r\n </div>\r\n\r\n </div>\r\n\r\n <div class=\"file-info\">\r\n <div class=\"file-name\" [title]=\"att.FileName\">{{ att.FileName }}</div>\r\n </div>\r\n\r\n @if(!disableAction){\r\n <button mat-icon-button class=\"remove-btn\" type=\"button\" aria-label=\"Rimuovi allegato\"\r\n (click)=\"deleteAttachment(att)\" [disabled]=\"att.isUploading\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (att.isUploading) {\r\n <div class=\"upload-spinner\"></div>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n} @else if(viewMode === 'table' && attachmentsList?.length > 0) {\r\n\r\n\r\n<div class=\"table-view-container\">\r\n\r\n <div class=\"table-header\">\r\n @for (col of _tableColumns; track col.key) {\r\n <div class=\"table-cell\" [style.flex]=\"col.styles?.flex\" [ngClass]=\"col.class\">\r\n {{ col.display }}\r\n </div>\r\n }\r\n </div>\r\n\r\n @for (att of attachmentsList; track att.ID) {\r\n <div class=\"table-row\">\r\n\r\n @for (col of _tableColumns; track col.key) {\r\n <div class=\"table-cell\" [style.flex]=\"col.styles?.flex\" [ngClass]=\"col.class\">\r\n\r\n @switch (col.type) {\r\n\r\n @case ('template') {\r\n <div class=\"template-wrapper\">\r\n <ng-container [ngTemplateOutlet]=\"col.externalTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: att }\"></ng-container>\r\n </div>\r\n }\r\n @case ('date') {\r\n <span class=\"metadata-value\">{{ att[col.key] | date:'dd/MM/yyyy' }}</span>\r\n }\r\n @default {\r\n <span class=\"metadata-value\">{{ att[col.key] }}</span>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n</div>\r\n}\r\n\r\n<!-- Notifica toast -->\r\n<div class=\"upload-notification\" [class.show]=\"toast?.visible\" [class.success]=\"toast?.type === 'success'\"\r\n [class.error]=\"toast?.type === 'error'\">\r\n <span>{{ toast?.text }}</span>\r\n <div class=\"notification-progress\"></div>\r\n</div>\r\n\r\n<ng-template #defaultFileTemplate let-att>\r\n <i class=\"file-icon-small\" [ngClass]=\"getAttachmentIcon(att)\"></i>\r\n <div class=\"file-info-text\">\r\n <span class=\"file-name-table\">{{ att.FileName }}</span>\r\n <span class=\"file-type-table\">{{ att.FileExtension || 'Link' }}</span>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #defaultActionsTemplate let-att>\r\n <button mat-icon-button (click)=\"handlePrimaryAction(att)\"\r\n [matTooltip]=\"att.FileContentType?.startsWith('video/') ? 'Riproduci video' : 'Visualizza/Scarica'\">\r\n\r\n <mat-icon>\r\n @if (att.FileContentType?.startsWith('video/')) {\r\n play_arrow\r\n } @else {\r\n {{ att.AttachmentType === AttachmentType.FILE ? 'download' : 'open_in_new' }}\r\n }\r\n </mat-icon>\r\n </button>\r\n\r\n <button mat-icon-button [matMenuTriggerFor]=\"actionsMenu\" matTooltip=\"Altre opzioni\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n\r\n <mat-menu #actionsMenu=\"matMenu\">\r\n @for (action of _sortedMenuActions; track action.name) {\r\n @if (!isActionHidden(action, att)) {\r\n <button mat-menu-item (click)=\"action.fn(att)\" [disabled]=\"action.disabled ? action.disabled(att) : false\">\r\n <mat-icon [color]=\"action.icon === 'delete' ? 'warn' : undefined\">\r\n {{ action.icon }}\r\n </mat-icon>\r\n <span>{{ action.name }}</span>\r\n </button>\r\n }\r\n }\r\n </mat-menu>\r\n</ng-template>\r\n\r\n\r\n<ng-template #dialogCropImage>\r\n <div style=\"overflow-x: hidden\" [ngClass]=\"cropDialogClass\">\r\n <!-- @if (showCropImage == true) { -->\r\n <ng-container [ngTemplateOutlet]=\"croppieTemplate\" [ngTemplateOutletContext]=\"{ form: newAttachmentForm }\">\r\n </ng-container>\r\n <!-- } -->\r\n </div>\r\n</ng-template>\r\n\r\n\r\n<ng-template #inlinePreviewTemplate let-row=\"row\">\r\n @if (row.AttachmentType != AttachmentType.LINK && row.IsImage) {\r\n <div class=\"inline-preview-container\" (click)=\"openPreviewDialog(row)\">\r\n <img [src]=\"'data:image/png;base64,' + (row.FileThumbnailBase64 ? row.FileThumbnailBase64 : row.FileDataBase64)\" />\r\n </div>\r\n } @else if (row.AttachmentType != AttachmentType.LINK && !row.IsImage) {\r\n <div class=\"inline-preview-container\" (click)=\"openPreviewDialog(row)\">\r\n <i [ngClass]=\"getAttachmentIcon(row)\"></i>\r\n </div>\r\n }\r\n</ng-template>\r\n\r\n\r\n<ng-template #dialogPreview>\r\n <div class=\"modern-dialog-container\"> @if (selectedAttachment) {\r\n <div mat-dialog-title class=\"preview-header\">\r\n <div class=\"header-info\">\r\n <div class=\"title-group\">\r\n <span class=\"main-t\">{{ previewLabel }}</span>\r\n <span class=\"file-t\">{{ selectedAttachment.FileName }}</span>\r\n </div>\r\n </div>\r\n <button mat-icon-button mat-dialog-close class=\"close-btn\"><mat-icon>close</mat-icon></button>\r\n </div>\r\n\r\n <mat-dialog-content class=\"preview-content-area\">\r\n <div class=\"media-viewer-wrapper\">\r\n @if (selectedAttachment.IsImage) {\r\n <img class=\"main-preview-media\"\r\n [src]=\"'data:image/png;base64,' + (selectedAttachment.FileDataBase64 || selectedAttachment.FileThumbnailBase64)\"\r\n [alt]=\"selectedAttachment.FileName\" />\r\n }\r\n @else if (selectedAttachment.FileContentType?.startsWith('video/')) {\r\n <video controls autoplay playsinline class=\"main-preview-media video-player\">\r\n <source [src]=\"selectedAttachment.TrustedUrl\" [type]=\"selectedAttachment.FileContentType\">\r\n Il tuo browser non supporta il video.\r\n </video>\r\n }\r\n @else {\r\n <div class=\"iframe-container\">\r\n <iframe class=\"preview-iframe-modern\" [src]=\"selectedAttachment.TrustedUrl\"\r\n [title]=\"selectedAttachment.FileName\"></iframe>\r\n </div>\r\n }\r\n </div>\r\n </mat-dialog-content>\r\n\r\n <mat-dialog-actions align=\"end\" class=\"preview-actions\">\r\n <button mat-button mat-dialog-close class=\"btn-close\">Chiudi</button>\r\n @if (selectedAttachment.AttachmentType !== AttachmentType.LINK) {\r\n <button mat-raised-button color=\"primary\" (click)=\"viewAttachment(selectedAttachment)\" class=\"btn-download\">\r\n <mat-icon>download</mat-icon> <span>{{ downloadLabel }}</span>\r\n </button>\r\n }\r\n </mat-dialog-actions>\r\n }\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 <input #fileInput style=\"display: none\" id=\"file_attachment\" name=\"file_attachment\" type=\"file\"\r\n (change)=\"onFileAdded($event)\" [accept]=\"acceptedFileTypes\" [multiple]=\"loadMultipleFiles\" />\r\n\r\n @if (allowedTypes && allowedTypes.length == 1 && (multipleAttachment == true || !attachmentsList ||\r\n attachmentsList.length == 0 || (attachmentsList.length > 0 && !attachmentsList[0]))) {\r\n <button class=\"btn btn-primary mb-4 me-5 eqp-attachments-add-btn\" mat-raised-button color=\"primary\" type=\"button\"\r\n (click)=\"addFile(allowedTypes[0], fileInput)\" [disabled]=\"isDisabled\">\r\n @if (allowedTypes[0] == 1) { <mat-icon>cloud_upload</mat-icon> }\r\n @if (allowedTypes[0] == 2) { <i class=\"fas fa-link\"></i> }\r\n @if (allowedTypes[0] == 3) { <i class=\"fa-brands fa-dropbox\"></i> }\r\n <span style=\"margin-left: 10px\">\r\n {{ allowedTypes[0] == 1 ? (addButtonLabel + \" file\") : allowedTypes[0] == 2 ? (addButtonLabel + \" link\") :\r\n uploadWithDropboxLabel }}\r\n </span>\r\n </button>\r\n }\r\n\r\n @if (!separatedUploadButtons && allowedTypes && allowedTypes.length > 1 && (multipleAttachment == true ||\r\n !attachmentsList || attachmentsList.length == 0 || (attachmentsList.length > 0 && !attachmentsList[0]))) {\r\n <button class=\"btn btn-primary mb-4 me-5 eqp-attachments-add-btn\" mat-raised-button color=\"primary\" type=\"button\"\r\n [matMenuTriggerFor]=\"attachmentTypeMenu\" [disabled]=\"isDisabled\">\r\n @if (multipleAttachment != true) { <mat-icon>cloud_upload</mat-icon> } @else { <mat-icon>add</mat-icon> }\r\n <span style=\"margin-left: 0px\">{{ addButtonLabel }}</span>\r\n </button>\r\n\r\n <mat-menu #attachmentTypeMenu=\"matMenu\">\r\n <input #imageInput style=\"display: none\" id=\"file_attachment\" name=\"file_attachment\" type=\"file\"\r\n (change)=\"onFileAdded($event)\" [accept]=\"acceptedFileTypes\" [multiple]=\"loadMultipleFiles\" />\r\n @if (allowedTypes.includes(1)) {\r\n <button mat-menu-item (click)=\"imageInput.click()\" 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 }\r\n @if (allowedTypes.includes(2)) {\r\n <button mat-menu-item [disabled]=\"isDisabled\" (click)=\"switchToAddingLinkMode()\" 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 }\r\n @if (allowedTypes.includes(3)) {\r\n <button mat-menu-item (click)=\"chooseDropboxFile()\" class=\"eqp-attachments-link-btn\">\r\n <i class=\"fa-brands fa-dropbox\"></i>\r\n <span style=\"margin-left: 10px\">Dropbox</span>\r\n </button>\r\n }\r\n </mat-menu>\r\n }\r\n\r\n @if (separatedUploadButtons && allowedTypes && allowedTypes.length > 1 && (multipleAttachment == true ||\r\n !attachmentsList || attachmentsList.length == 0 || (attachmentsList.length > 0 && !attachmentsList[0]))) {\r\n <div class=\"btn-group\">\r\n @if (allowedTypes.includes(1)) {\r\n <button (click)=\"imageInput.click()\" class=\"btn btn-secondary eqp-attachments-add-btn\" mat-raised-button\r\n color=\"secondary\" type=\"button\">\r\n <i class=\"fa-solid fa-cloud-upload\"></i>\r\n <span style=\"margin-left: 10px\">File</span>\r\n </button>\r\n }\r\n <input #imageInput style=\"display: none\" id=\"file_attachment\" name=\"file_attachment\" type=\"file\"\r\n (change)=\"onFileAdded($event)\" [accept]=\"acceptedFileTypes\" [multiple]=\"loadMultipleFiles\" />\r\n @if (allowedTypes.includes(2)) {\r\n <button (click)=\"switchToAddingLinkMode()\" class=\"btn btn-secondary eqp-attachments-add-btn\" mat-raised-button\r\n color=\"secondary\" type=\"button\">\r\n <i class=\"fas fa-link\"></i>\r\n <span style=\"margin-left: 10px\">Link</span>\r\n </button>\r\n }\r\n @if (allowedTypes.includes(3)) {\r\n <button (click)=\"chooseDropboxFile()\" class=\"btn btn-secondary eqp-attachments-add-btn\" mat-raised-button\r\n color=\"secondary\" type=\"button\">\r\n <i class=\"fa-brands fa-dropbox\"></i>\r\n <span style=\"margin-left: 10px\">Dropbox</span>\r\n </button>\r\n }\r\n </div>\r\n }\r\n</ng-template>\r\n\r\n\r\n<ng-template #croppieTemplate>\r\n <div class=\"modern-dialog-container\">\r\n <div mat-dialog-title class=\"preview-header\">\r\n <div class=\"header-info\">\r\n <div class=\"title-group\">\r\n <span class=\"main-t\">{{ cropLabel }}</span>\r\n <span class=\"file-t\">Regola le dimensioni e l'orientamento</span>\r\n </div>\r\n </div>\r\n <button mat-icon-button type=\"button\" (click)=\"abortFile()\" class=\"close-btn\"><mat-icon>close</mat-icon></button>\r\n </div>\r\n\r\n <mat-dialog-content class=\"preview-content-area\">\r\n <div class=\"crop-toolbar\">\r\n @if (cropOptions.includes(1)) {\r\n <button mat-icon-button [matTooltip]=\"rotateLeftLabel\"\r\n (click)=\"rotateLeft()\"><mat-icon>rotate_left</mat-icon></button>\r\n <button mat-icon-button [matTooltip]=\"rotateRightLabel\"\r\n (click)=\"rotateRight()\"><mat-icon>rotate_right</mat-icon></button>\r\n }\r\n @if (cropOptions.includes(2)) {\r\n <button mat-icon-button [matTooltip]=\"flipHorinzontalLabel\"\r\n (click)=\"flipHorizontal()\"><mat-icon>flip_horizontal</mat-icon></button>\r\n <button mat-icon-button [matTooltip]=\"flipVerticalLabel\"\r\n (click)=\"flipVertical()\"><mat-icon>flip_vertical</mat-icon></button>\r\n }\r\n <button mat-icon-button matTooltip=\"Reset\"\r\n (click)=\"restoreOriginalDimensions()\"><mat-icon>replay</mat-icon></button>\r\n </div>\r\n\r\n <div class=\"media-viewer-wrapper\">\r\n <div class=\"crop-container-modern\">\r\n <image-cropper [imageFile]=\"selectedFile\" [maintainAspectRatio]=\"false\" [canvasRotation]=\"canvasRotation\"\r\n [transform]=\"transform\" format=\"png\" (imageCropped)=\"imageCropped($event)\" [resizeToWidth]=\"customWidth\"\r\n [resizeToHeight]=\"customHeight\" [output]=\"'base64'\" [containWithinAspectRatio]=\"true\" [onlyScaleDown]=\"true\"\r\n [alignImage]=\"'center'\">\r\n </image-cropper>\r\n </div>\r\n </div>\r\n </mat-dialog-content>\r\n\r\n <mat-dialog-actions align=\"end\" class=\"preview-actions\">\r\n <button mat-button (click)=\"abortFile()\" class=\"btn-close\">{{ abortLabel }}</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"confirmAddAttachment()\" class=\"btn-download\">\r\n <mat-icon>check</mat-icon> {{ confirmLabel }}\r\n </button>\r\n </mat-dialog-actions>\r\n </div>\r\n</ng-template>\r\n\r\n\r\n\r\n<!-- TEMPLATE PER FORM DI AGGIUNTA DI UN LINK -->\r\n<ng-template #addingLinkTemplate>\r\n <div class=\"modern-dialog-container\">\r\n <div mat-dialog-title class=\"preview-header\">\r\n <div class=\"header-info\">\r\n <div class=\"type-icon-wrapper\">\r\n <mat-icon>link</mat-icon>\r\n </div>\r\n <div class=\"title-group\">\r\n <span class=\"main-t\">Aggiungi un link</span>\r\n <span class=\"file-t\">Inserisci l'URL della risorsa web</span>\r\n </div>\r\n </div>\r\n <button mat-icon-button mat-dialog-close class=\"close-btn\"><mat-icon>close</mat-icon></button>\r\n </div>\r\n\r\n <mat-dialog-content class=\"add-link-modern-content\">\r\n <form [formGroup]=\"newAttachmentForm\" class=\"add-link-form\">\r\n <mat-form-field appearance=\"outline\" class=\"w-100 mt-3\">\r\n <mat-label>URL del collegamento</mat-label>\r\n <input matInput formControlName=\"filePath\" placeholder=\"https://...\" required>\r\n <mat-icon matSuffix>language</mat-icon>\r\n </mat-form-field>\r\n\r\n <mat-form-field appearance=\"outline\" class=\"w-100\">\r\n <mat-label>Titolo (opzionale)</mat-label>\r\n <input matInput formControlName=\"fileName\" placeholder=\"Es. Documento Progetto\">\r\n <mat-icon matSuffix>title</mat-icon>\r\n </mat-form-field>\r\n </form>\r\n </mat-dialog-content>\r\n\r\n <mat-dialog-actions align=\"end\" class=\"preview-actions\">\r\n <button mat-button mat-dialog-close class=\"btn-close\">Annulla</button>\r\n <button mat-raised-button color=\"primary\" [mat-dialog-close]=\"newAttachmentForm.value\"\r\n [disabled]=\"newAttachmentForm.invalid\" class=\"btn-download\">\r\n <mat-icon>add</mat-icon> Aggiungi\r\n </button>\r\n </mat-dialog-actions>\r\n </div>\r\n</ng-template>","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 { ImageCropperComponent } from 'ngx-image-cropper';\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 ImageCropperComponent\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","/**\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AClB,qBAAqB;wBACrB,cAAc;wBACd,aAAa;wBACb,wBAAwB;wBACxB,oBAAoB;wBACpB,eAAe;wBACf,gBAAgB;wBAChB,iBAAiB;wBACjB,cAAc;wBACd,aAAa;wBACb;AAAmB,qBAAA;AACtB,iBAAA;;;MCpFY,oBAAoB,CAAA;wGAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;yGAApB,oBAAoB,EAAA,YAAA,EAAA,CAVhB,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAEpC,cAAc;YACd,WAAW;YACX,YAAY;YACZ,mBAAmB;AACnB,YAAA,qBAAqB,aAEb,uBAAuB,CAAA,EAAA,CAAA;AAEtB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAR7B,cAAc;YACd,WAAW;YACX,YAAY;YACZ,mBAAmB;YACnB,qBAAqB,CAAA,EAAA,CAAA;;4FAIZ,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAXhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,uBAAuB,CAAC;AACvC,oBAAA,OAAO,EAAE;wBACP,cAAc;wBACd,WAAW;wBACX,YAAY;wBACZ,mBAAmB;wBACnB;AACD,qBAAA;oBACD,OAAO,EAAE,CAAC,uBAAuB;AAClC,iBAAA;;;ACjBD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"eqproject-eqp-attachments.mjs","sources":["../../../projects/eqp-attachments/src/lib/helpers/attachment.helper.ts","../../../projects/eqp-attachments/src/lib/interfaces/IAttachment.ts","../../../projects/eqp-attachments/src/lib/services/eqp-attachment-dialog.service.ts","../../../projects/eqp-attachments/src/lib/services/eqp-attachment.service.ts","../../../projects/eqp-attachments/src/lib/eqp-attachments.component.ts","../../../projects/eqp-attachments/src/lib/eqp-attachments.component.html","../../../projects/eqp-attachments/src/lib/modules/material.module.ts","../../../projects/eqp-attachments/src/lib/eqp-attachments.module.ts","../../../projects/eqp-attachments/src/public-api.ts","../../../projects/eqp-attachments/src/eqproject-eqp-attachments.ts"],"sourcesContent":["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 static readonly dropboxCredentials: any = { \r\n url: 'https://www.dropbox.com/static/api/2/dropins.js', \r\n apiKey: \"aj2xjzms4dl1sch\",\r\n accessToken: \"l.BbasuuUFe42u-fXvpmDEteNkGMH-yPTxD79JhRjkBcR94Fm2QLgIjEETvx8TY36HsQQsIe24ofcNjYlg9IhSB7Fguqbi7wH-Jg6bW_3Q8VemsH4pC7Iakat643EzRcw7OMObPSs\"\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 { TemplateRef } from \"@angular/core\";\r\n\r\nexport 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 isUploading?: boolean;\r\n LargeFile?: File;\r\n IsLargeFile?: boolean;\r\n}\r\n\r\nexport enum AttachmentType {\r\n FILE = 1,\r\n LINK = 2,\r\n DROPBOX = 3\r\n}\r\n\r\nexport enum CropOptionEnum {\r\n ROTATE = 1,\r\n FLIP = 2\r\n}\r\n\r\nexport type AttachmentCardSize = 'small' | 'medium' | 'large' | 'custom';\r\n\r\nexport type Layout = 'full' | 'compact';\r\n\r\n\r\nexport interface AttachmentFieldColumn {\r\n key: string;\r\n display: string;\r\n type?: TypeAttachmentColumn;\r\n styles?: { flex: string };\r\n externalTemplate?: TemplateRef<any>;\r\n position?: number;\r\n class?: string;\r\n hidden?: boolean | (() => boolean);\r\n}\r\n\r\nexport interface AttachmentMenuAction {\r\n key?: string;\r\n name: string;\r\n icon: string;\r\n fn: (attachment: IAttachmentDTO) => void;\r\n disabled?: (attachment: IAttachmentDTO) => boolean;\r\n hidden?: (attachment: IAttachmentDTO) => boolean;\r\n position?: number;\r\n}\r\n\r\nexport enum TypeAttachmentColumn {\r\n DATE = 'date',\r\n TEMPLATE = 'template',\r\n TEXT = 'text'\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 { Injectable } from \"@angular/core\";\r\nimport { AttachmentHelperService } from \"../helpers/attachment.helper\";\r\n\r\n@Injectable({\r\n providedIn: \"root\"\r\n})\r\nexport class EqpAttachmentService {\r\n constructor() {}\r\n\r\n loadDropboxScript() {\r\n const script = document.createElement(\"script\");\r\n script.type = \"text/javascript\";\r\n script.src = AttachmentHelperService.dropboxCredentials.url;\r\n script.id = \"dropboxjs\";\r\n script.dataset.appKey = AttachmentHelperService.dropboxCredentials.apiKey;\r\n document.body.appendChild(script);\r\n }\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport {\r\n ChangeDetectorRef,\r\n Component,\r\n EventEmitter,\r\n Input,\r\n OnInit,\r\n Output,\r\n TemplateRef,\r\n ViewChild\r\n} from \"@angular/core\";\r\nimport { FormBuilder, FormGroup, Validators } from \"@angular/forms\";\r\nimport { MatDialog, MatDialogRef } from \"@angular/material/dialog\";\r\nimport { DomSanitizer } from \"@angular/platform-browser\";\r\nimport imageCompression from \"browser-image-compression\";\r\nimport { base64ToFile, ImageCroppedEvent, ImageCropperComponent, ImageTransform } from \"ngx-image-cropper\";\r\nimport { AttachmentHelperService } from \"./helpers/attachment.helper\";\r\nimport { AttachmentCardSize, AttachmentFieldColumn, AttachmentMenuAction, AttachmentType, CropOptionEnum, IAttachmentDTO, TypeAttachmentColumn } from \"./interfaces/IAttachment\";\r\nimport { IOptions } from \"./interfaces/IOptions\";\r\nimport { EqpAttachmentDialogService } from \"./services/eqp-attachment-dialog.service\";\r\nimport { EqpAttachmentService } from \"./services/eqp-attachment.service\";\r\n\r\ndeclare var Dropbox: any;\r\n\r\nconst toBase64 = (file) =>\r\n 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 //#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 * 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 * Nel caso si vuole gestire un solo elemento senza passarlo come array, lo passo come singolo allegato e gestisco nella libreria l'array.\r\n */\r\n @Input(\"singleAttachment\") singleAttachment: 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 * 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 = {\r\n maxSizeMB: 0.5,\r\n maxWidthOrHeight: 1920,\r\n useWebWorker: true\r\n };\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 * Permette di stabilire, in caso di gestione allegati multipli, se la tabella contenente l'elenco\r\n * degli allegati deve contenere il campo di ricerca oppure no\r\n */\r\n @Input(\"isTableSearcheable\") isTableSearcheable: 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 * Permette di scegliere il modo in cui i file devono essere caricati\r\n */\r\n // @Input(\"uploadType\") uploadType: UploadTypeEnum = UploadTypeEnum.FILE_AND_LINK;\r\n\r\n /**\r\n * Permette di stabilire se i pulsanti per il caricamento dei file sono separati o in un menù a tendina\r\n */\r\n @Input(\"separatedUploadButtons\") separatedUploadButtons: boolean = false;\r\n\r\n /**\r\n * Permette di scegliere se dare la possibilità di vedere o no l'anteprima\r\n */\r\n @Input(\"showPreview\") showPreview: boolean = true;\r\n\r\n /**\r\n * In caso di allegato singolo, permette di scegliere se aggiungere file tramite drag and drop\r\n */\r\n @Input(\"singleAttachmentDragAndDrop\") singleAttachmentDragAndDrop: boolean = true;\r\n\r\n /**\r\n * Array di opzioni che si possono utilizzare per il crop\r\n */\r\n @Input(\"cropOptions\") cropOptions: Array<CropOptionEnum> = [1, 2];\r\n\r\n /**\r\n * Classe custom da assegnare al dialog del crop immagini\r\n */\r\n @Input(\"cropDialogClass\") cropDialogClass: string;\r\n\r\n @Input() maxFileSizeMB: number = 500; // Default max size of 100 MB\r\n @Input() cardSize: AttachmentCardSize = 'small'; // Default\r\n @Input() customCardWidthPx: number = 200; // Larghezza custom in px\r\n @Input() customCardHeightPx: number = 180; // Altezza custom in px\r\n\r\n @Input() layout: 'full' | 'compact' = 'compact';\r\n\r\n /**\r\n * Input per definire le label da usare nel componente\r\n */\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(\"uploadWithDropboxLabel\") uploadWithDropboxLabel: string = \"Carica con Dropbox\";\r\n @Input(\"cropLabel\") cropLabel: string = \"Scegli le dimensioni dell'immagine\";\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 =\r\n \"Non è possibile selezionare un file che non sia un'immagine.\";\r\n @Input(\"wrongTypeSelectedErrorMessage\") wrongTypeSelectedErrorMessage: string =\r\n \"Non è possibile caricare il file selezionato.\";\r\n @Input(\"videoPreviewErrorMessage\") videoPreviewErrorMessage: string =\r\n \"Impossibile aprire l'anteprima di un file video.\";\r\n @Input(\"videoPreviewErrorMessage\") audioPreviewErrorMessage: string =\r\n \"Impossibile aprire l'anteprima di un file audio.\";\r\n @Input(\"flipHorinzontalLabel\") flipHorinzontalLabel: string = \"Capovolgi orizzontalmente\";\r\n @Input(\"flipVerticalLabel\") flipVerticalLabel: string = \"Capovolgi verticalmente\";\r\n @Input(\"rotateRightLabel\") rotateRightLabel: string = \"Ruota a destra\";\r\n @Input(\"rotateLeftLabel\") rotateLeftLabel: string = \"Ruota a sinistra\";\r\n @Input(\"base64LimitMB\") base64LimitMB: number = 100;\r\n @Input() uploadTitle = 'Upload file';\r\n @Input() uploadSubtitle = 'Drag & drop files o click';\r\n @Input() dropHereLabel = 'Rilascia i file qui';\r\n @Input() supportedFormatsLabel = 'Formati supportati: JPEG, PNG, PDF (Max 100MB)';\r\n @Input() browseFilesLabel = 'Cerca i file';\r\n @Input() uploadSummaryLabel = 'Lista allegati';\r\n @Input() filesLabel = 'Files';\r\n @Input() totalSizeLabel = 'Dimensione totale';\r\n @Input() emptyStateLabel = 'Non sono presenti file caricati';\r\n @Input() addedSuccessfullyLabel = 'file(s) caricati con successo.';\r\n @Input() removedLabel = 'File rimosso';\r\n // @Input() removeLabel = 'Rimuovi file';\r\n @Input() chooseView = true;\r\n @Input() showSummary = false;\r\n @Input(\"viewMode\") viewMode: 'card' | 'table' = 'table';\r\n @Input(\"showUploadTitle\") showUploadTitle: boolean = true;\r\n @Input(\"showDropArea\") showDropArea: boolean = true;\r\n @Input() hiddenColumns: string[] = [];\r\n @Input() hiddenActions: string[] = [];\r\n @Input() showActionButtons: boolean = false;\r\n/**\r\n * Se TRUE allora mostra il dialog di crop per le immagini singole.\r\n * Se FALSE carica l'immagine direttamente (applicando comunque la compressione se attiva).\r\n */\r\n@Input(\"enableImageCrop\") enableImageCrop: boolean = true;\r\n\r\n @Input() videoCompression: {\r\n enabled: boolean,\r\n maxWidth?: number,\r\n bitrate?: number\r\n } = { enabled: false, maxWidth: 1280, bitrate: 2500000 };\r\n\r\n private _customMenuActions: AttachmentMenuAction[] = [];\r\n _sortedMenuActions: AttachmentMenuAction[] = [];\r\n\r\n /**\r\n * SOLO quando [customMenuActions]=\"...\" cambia.\r\n */\r\n @Input()\r\n set customMenuActions(value: AttachmentMenuAction[]) {\r\n this._customMenuActions = value || [];\r\n this.setupMenuActions();\r\n }\r\n\r\n get customMenuActions(): AttachmentMenuAction[] {\r\n return this._customMenuActions;\r\n }\r\n\r\n private _customColumns: AttachmentFieldColumn[] = [];\r\n\r\n /**\r\n * SOLO quando [customColumns]=\"...\" cambia.\r\n */\r\n @Input()\r\n set customColumns(value: AttachmentFieldColumn[]) {\r\n this._customColumns = value || [];\r\n this.setupTableColumns();\r\n }\r\n\r\n get customColumns(): AttachmentFieldColumn[] {\r\n return this._customColumns;\r\n }\r\n\r\n //#endregion\r\n\r\n //#region @Output del componente\r\n\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 //#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 attachmentType = AttachmentType;\r\n // uploadTypeEnum = UploadTypeEnum;\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 dialogRefAddAttachment: MatDialogRef<TemplateRef<any>>;\r\n @ViewChild(\"dialogAddMultipleAttachment\", { static: true }) dialogAddMultipleAttachment: TemplateRef<any>;\r\n dialogRefCropImage: MatDialogRef<TemplateRef<any>>;\r\n @ViewChild(\"dialogCropImage\", { static: true }) dialogCropImage: TemplateRef<any>;\r\n\r\n @ViewChild('addingLinkTemplate') addingLinkTemplate: 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 canvasRotation = 0;\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(\"inlinePreviewTemplate\", { static: true }) inlinePreviewTemplate: TemplateRef<any>;\r\n @ViewChild(\"dialogPreview\", { static: true }) dialogPreview: TemplateRef<any>;\r\n\r\n imageFile: File;\r\n\r\n addingLinkMode: boolean = false;\r\n\r\n //#region Sezione nuova refactoring\r\n\r\n // Proprietà interna che conterrà l'array finale di colonne ordinate\r\n _tableColumns: AttachmentFieldColumn[] = [];\r\n @ViewChild('defaultFileTemplate', { static: true }) defaultFileTemplate: TemplateRef<any>;\r\n @ViewChild('defaultActionsTemplate', { static: true }) defaultActionsTemplate: TemplateRef<any>;\r\n\r\n // Stato drag & drop e toast\r\n dragOver = false;\r\n toast = {\r\n visible: false as boolean,\r\n type: 'success' as 'success' | 'error',\r\n text: '' as string,\r\n timeoutId: 0 as any\r\n };\r\n\r\n progressPercent = 0;\r\n totalSizeBytes = 0;\r\n get totalSizeFormatted(): string { return this.formatFileSize(this.totalSizeBytes); }\r\n\r\n // Utility per formattare bytes (2 decimali)\r\n formatFileSize(bytes: number): string {\r\n if (!bytes || bytes <= 0) return '0 Bytes';\r\n const k = 1024;\r\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];\r\n const i = Math.floor(Math.log(bytes) / Math.log(k));\r\n return `${parseFloat((bytes / Math.pow(k, i)).toFixed(2))} ${sizes[i]}`;\r\n }\r\n\r\n // Mostra toast con auto‑hide e reset progress bar CSS\r\n showToast(message: string, type: 'success' | 'error' = 'success', durationMs = 3000) {\r\n if (this.toast.visible && this.toast.text === message) {\r\n return;\r\n }\r\n\r\n // Cancella il timeout precedente se esiste\r\n if (this.toast.timeoutId) {\r\n clearTimeout(this.toast.timeoutId);\r\n }\r\n\r\n // Calcola una durata dinamica\r\n const duration = durationMs || Math.max(4000, message.length * 100);\r\n\r\n this.toast.text = message;\r\n this.toast.type = type;\r\n this.toast.visible = true;\r\n\r\n // Imposta il nuovo timeout per nascondere automaticamente il toast\r\n this.toast.timeoutId = setTimeout(() => {\r\n this.toast.visible = false;\r\n }, duration);\r\n }\r\n\r\n #endregion\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 eqpAttachmentService: EqpAttachmentService\r\n ) { }\r\n\r\n ngOnInit() {\r\n\r\n // Inizializza metriche e progress in base allo stato iniziale\r\n this.recomputeTotalsAndProgress();\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) this.acceptedFileTypes = \"image/*\";\r\n else 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, AttachmentType.DROPBOX];\r\n else if (\r\n this.allowedTypes.find((t) => t != AttachmentType.FILE && t != AttachmentType.LINK && t != AttachmentType.DROPBOX)\r\n ) {\r\n EqpAttachmentDialogService.Warning(\r\n 'Almeno uno degli AttachmentType selezionati nel parametro \"allowedTypes\" non esiste.'\r\n );\r\n this.allowedTypes = [AttachmentType.FILE, AttachmentType.LINK, AttachmentType.DROPBOX];\r\n }\r\n\r\n if (this.attachmentsList == null) this.attachmentsList = new Array<IAttachmentDTO>();\r\n\r\n // Se è stato passato un singolo allegato lo aggiungo alla lista\r\n if (this.singleAttachment != null && this.attachmentsList.length == 0) {\r\n this.attachmentsList.push(this.singleAttachment);\r\n }\r\n\r\n this.checkAttachmentImage();\r\n\r\n if (this.allowedTypes.includes(3)) {\r\n this.eqpAttachmentService.loadDropboxScript();\r\n }\r\n\r\n this.setupTableColumns();\r\n this.setupMenuActions();\r\n }\r\n\r\n setViewMode(mode: 'card' | 'table'): void {\r\n this.viewMode = mode;\r\n }\r\n\r\n // Ricalcola la somma pesata sugli allegati presenti\r\n private recomputeTotalsAndProgress() {\r\n this.totalSizeBytes = (this.attachmentsList || [])\r\n .filter(a => !!a)\r\n .reduce((sum, a) => sum + this.bytesFromBase64(a.FileDataBase64 || a.FileThumbnailBase64 || ''), 0);\r\n\r\n // Progress fittizio: 100% se presenti file, 0 se vuoto\r\n this.progressPercent = (this.attachmentsList && this.attachmentsList.length > 0) ? 100 : 0;\r\n }\r\n\r\n ngOnDestroy() {\r\n if (this.toast.timeoutId) clearTimeout(this.toast.timeoutId);\r\n }\r\n\r\n // Calcola i byte da una stringa Base64 pura (senza prefisso data:...)\r\n public bytesFromBase64(base64: string): number {\r\n if (!base64) return 0;\r\n // Rimuovi eventuale prefisso data URL\r\n const commaIdx = base64.indexOf(',');\r\n const b64 = commaIdx >= 0 ? base64.substring(commaIdx + 1) : base64;\r\n // Conta padding\r\n let padding = 0;\r\n if (b64.endsWith('==')) padding = 2;\r\n else if (b64.endsWith('=')) padding = 1;\r\n // Formula esatta: (3 * (len / 4)) - padding\r\n const len = b64.length;\r\n return Math.max(0, (3 * Math.floor(len / 4)) - padding);\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 * 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(\r\n this.deleteDialogMessage,\r\n () => {\r\n this.removeAttachmentFromList(this.attachmentsList.indexOf(element));\r\n },\r\n true,\r\n this.deleteDialogTitle\r\n );\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 this.localEditedAttachments.emit(this.attachmentsList);\r\n\r\n this.recomputeTotalsAndProgress();\r\n this.showToast(this.removedLabel || 'File removed', 'success');\r\n\r\n }\r\n\r\n private simulateProgress() {\r\n this.progressPercent = 0;\r\n setTimeout(() => {\r\n this.progressPercent = 30;\r\n setTimeout(() => {\r\n this.progressPercent = 60;\r\n setTimeout(() => {\r\n this.progressPercent = 100;\r\n }, 200);\r\n }, 200);\r\n }, 100);\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 if (attachment.AttachmentType == AttachmentType.LINK) {\r\n window.open(attachment.FilePath, \"_blank\");\r\n return;\r\n }\r\n\r\n if (attachment.LargeFile) {\r\n const file = attachment.LargeFile;\r\n const url = URL.createObjectURL(file);\r\n const link = document.createElement(\"a\");\r\n link.href = url;\r\n link.download = attachment.FileName || file.name;\r\n link.click();\r\n setTimeout(() => URL.revokeObjectURL(url), 1000);\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 * 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) return \"fas fa-link\";\r\n else return AttachmentHelperService.getIconFromFileExtensione(attachment.FileExtension);\r\n }\r\n\r\n //#endregion\r\n\r\n /**\r\n * In caso di allegato singolo, sceglie quale metodo richiamare in base al tipo di allegato\r\n */\r\n addFile(attachmentType: AttachmentType, imageInput = null) {\r\n if (attachmentType == AttachmentType.LINK) {\r\n this.switchToAddingLinkMode();\r\n } else if (attachmentType == AttachmentType.FILE) {\r\n imageInput.click();\r\n } else {\r\n this.chooseDropboxFile();\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) this.newAttachmentForm.reset();\r\n\r\n this.dialogRefCropImage.close();\r\n this.restoreOriginalDimensions();\r\n\r\n if (emitCloseEvent == true && this.abortAddAttachment) 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 && !this.newAttachment.LargeFile;\r\n } else {\r\n return !this.newAttachment.FilePath;\r\n }\r\n } else {\r\n return (\r\n this.newMultipleAttachments.filter(\r\n (p) =>\r\n (p.AttachmentType == AttachmentType.FILE && !p.FileDataBase64 && !p.LargeFile) ||\r\n (p.AttachmentType == AttachmentType.LINK && !p.FilePath)\r\n ).length > 0\r\n );\r\n }\r\n }\r\n\r\n confirmAddAttachment() {\r\n if (this.newAttachment.IsImage && this.imageCropper) {\r\n this.newAttachment.FileDataBase64 = this.imageCropper.crop().base64.split(\";base64,\")[1];\r\n }\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) this.attachmentsList = new Array<IAttachmentDTO>();\r\n\r\n this.attachmentsList.push(this.newAttachment);\r\n } else {\r\n if (this.newMultipleAttachments == null || this.newMultipleAttachments.length == 0) return;\r\n\r\n if (this.attachmentsList == null) this.attachmentsList = new Array<IAttachmentDTO>();\r\n\r\n this.attachmentsList = this.attachmentsList.concat(this.newMultipleAttachments);\r\n }\r\n\r\n this.localEditedAttachments.emit(this.attachmentsList);\r\n\r\n if (this.newAttachment.IsImage) {\r\n this.dialogRefCropImage.close();\r\n this.restoreOriginalDimensions();\r\n }\r\n\r\n if (this.newAttachment.AttachmentType === AttachmentType.LINK) {\r\n this.newAttachment = {} as IAttachmentDTO;\r\n if (this.newAttachmentForm) this.newAttachmentForm.reset();\r\n }\r\n\r\n this.resetSelectedFiles();\r\n }\r\n\r\n // 2. RESET TOTALE: Svuotiamo le proprietà di classe per evitare che \r\n // residui di upload precedenti (singoli o multipli) vengano trascinati.\r\n private resetSelectedFiles() {\r\n this.newAttachment = {} as IAttachmentDTO;\r\n this.newMultipleAttachments = [];\r\n this.selectedFile = null;\r\n this.selectedFiles = [];\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 = { ...row };\r\n\r\n\r\n if (this.getAttachmentEndpoint && this.selectedAttachment.IsImage && !this.selectedAttachment.FileDataBase64) {\r\n await this.getAttachmentByID()\r\n .then((res) => {\r\n this.selectedAttachment.FileDataBase64 = res.FileDataBase64;\r\n })\r\n .catch((err) => {\r\n EqpAttachmentDialogService.Error(err);\r\n });\r\n }\r\n\r\n if (this.selectedAttachment.AttachmentType == AttachmentType.LINK) {\r\n this.selectedAttachment.TrustedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(\r\n this.selectedAttachment.FilePath\r\n );\r\n }\r\n else if (this.selectedAttachment.FileContentType?.startsWith(\"video/\") && this.selectedAttachment.LargeFile) {\r\n const videoUrl = URL.createObjectURL(this.selectedAttachment.LargeFile);\r\n // Usiamo bypassSecurityTrustUrl per la sorgente del video\r\n this.selectedAttachment.TrustedUrl = this.sanitizer.bypassSecurityTrustUrl(videoUrl);\r\n }\r\n else if (\r\n this.selectedAttachment.IsImage &&\r\n !this.selectedAttachment.FileDataBase64 &&\r\n !this.selectedAttachment.FileThumbnailBase64\r\n ) {\r\n EqpAttachmentDialogService.Info(\"Impossibile aprire l'anteprima dell'allegato, file mancante.\");\r\n return;\r\n }\r\n else if (this.selectedAttachment.FileContentType === 'application/pdf' && this.selectedAttachment.FileDataBase64) {\r\n this.selectedAttachment.TrustedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(\r\n `data:application/pdf;base64,${this.selectedAttachment.FileDataBase64}`\r\n );\r\n }\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 const dialogRef = this.dialog.open(this.dialogPreview, {\r\n panelClass: 'eqp-attachments-preview-dialog',\r\n maxWidth: '95vw',\r\n width: row.IsImage || row.FileContentType?.startsWith('video/') ? 'auto' : '1100px',\r\n });\r\n\r\n // Pulizia della memoria quando il dialog si chiude\r\n dialogRef.afterClosed().subscribe(() => {\r\n if (this.selectedAttachment?.FileContentType?.startsWith(\"video/\")) {\r\n URL.revokeObjectURL(this.selectedAttachment.TrustedUrl as any);\r\n }\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 onFileAdded(event, isFileDropped: boolean = false) {\r\n\r\n if (this.isDisabled) {\r\n EqpAttachmentDialogService.Info(\"Caricamento allegati non disponibile.\");\r\n event.preventDefault();\r\n return;\r\n }\r\n this.showCropImage = false;\r\n\r\n this.resetSelectedFiles();\r\n\r\n const filesOnInput: File[] = isFileDropped\r\n ? (event as File[])\r\n : Array.from((event.target as HTMLInputElement)?.files || []);\r\n\r\n const { validFiles, oversizedFiles } = this.validationFile(filesOnInput);\r\n\r\n if (!validFiles || validFiles.length === 0) {\r\n if (!isFileDropped && event?.target instanceof HTMLInputElement) {\r\n event.target.value = '';\r\n }\r\n return;\r\n }\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 ([...validFiles].length == 1 || this.loadMultipleFiles != true) {\r\n this.selectedFile = validFiles[0];\r\n this.selectedFiles = validFiles;\r\n if (!this.selectedFile) 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) return;\r\n\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 && this.enableImageCrop) {\r\n this.getImageDimensions(validFiles[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 setTimeout(() => {\r\n this.showCropImage = true;\r\n this.imageFile = event;\r\n\r\n this.dialogRefCropImage = this.dialog.open(this.dialogCropImage, {\r\n disableClose: true,\r\n hasBackdrop: true,\r\n width: \"60%\",\r\n maxHeight: \"80%\",\r\n maxWidth: \"70vh\",\r\n panelClass: ['eqp-attachments-dialog', 'crop-dialog']\r\n });\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 this.confirmAddAttachment();\r\n }\r\n\r\n } else {\r\n this.selectedFiles = validFiles;\r\n if (!this.selectedFiles || this.selectedFiles.length == 0) return;\r\n\r\n if (!this.newMultipleAttachments) this.newMultipleAttachments = [];\r\n for (let i = 0; i < this.selectedFiles.length; i++) {\r\n let newAttachment: IAttachmentDTO = await this.createAttachmentFromUploadedFile(\r\n this.selectedFiles[i],\r\n true,\r\n 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) return;\r\n\r\n this.newMultipleAttachments.push(newAttachment);\r\n }\r\n this.confirmAddAttachment();\r\n }\r\n\r\n this.recomputeTotalsAndProgress();\r\n this.simulateProgress();\r\n // Caso 1: Successo Parziale (alcuni file validi, altri no)\r\n if (oversizedFiles.length > 0 && validFiles.length > 0) {\r\n const fileNames = oversizedFiles.join(', ');\r\n this.showToast(\r\n `${validFiles.length} file aggiunti. ${oversizedFiles.length} non caricati perché troppo grandi (${fileNames}).`,\r\n 'error'\r\n );\r\n }\r\n // Caso 2: Nessun file valido\r\n else if (oversizedFiles.length > 0 && validFiles.length === 0) {\r\n }\r\n // Caso 3: Tutti i file validi\r\n else if (oversizedFiles.length === 0 && validFiles.length > 0) {\r\n this.showToast(\r\n `${validFiles.length} ${this.addedSuccessfullyLabel || 'file(s) aggiunti con successo.'}`,\r\n 'success'\r\n );\r\n }\r\n\r\n //Resetto il valore del file input in modo da scatenare il change anche se si dovesse caricare lo stesso file\r\n if (!isFileDropped) event.target.value = \"\";\r\n }\r\n\r\n private validationFile(filesOnInput: File[]) {\r\n const validFiles: File[] = [];\r\n const oversizedFiles: string[] = [];\r\n\r\n for (const file of filesOnInput) {\r\n const fileSizeMB = file.size / 1024 / 1024;\r\n if (fileSizeMB > this.maxFileSizeMB) {\r\n oversizedFiles.push(file.name);\r\n } else {\r\n validFiles.push(file);\r\n }\r\n }\r\n\r\n if (oversizedFiles.length > 0) {\r\n const fileNames = oversizedFiles.join(', ');\r\n this.showToast(\r\n `File(s) troppo grandi: ${fileNames}. Limite: ${this.maxFileSizeMB}MB`,\r\n 'error'\r\n );\r\n }\r\n\r\n return { validFiles, oversizedFiles };\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(\r\n currentFile: File,\r\n getBase64: boolean = true,\r\n cropFile: boolean = false\r\n ): Promise<IAttachmentDTO> {\r\n let newAttachment: IAttachmentDTO = {} as IAttachmentDTO;\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 const fileSizeMB = currentFile.size / 1024 / 1024;\r\n const isLargeFile = fileSizeMB > this.base64LimitMB;\r\n const isVideo = currentFile.type.startsWith('video');\r\n\r\n if (isVideo) {\r\n let finalFile: File | Blob = currentFile;\r\n\r\n // Miniatura del video\r\n newAttachment.FileThumbnailBase64 = await this.generateVideoThumbnail(currentFile);\r\n\r\n // Se la compressione è abilitata, elaboriamo il video\r\n if (this.videoCompression.enabled) {\r\n // this.showToast(\"Compressione video in corso...\", \"info\");\r\n finalFile = await this.compressVideoNative(currentFile, this.videoCompression);\r\n\r\n // Aggiorniamo i dati dell'allegato con il nuovo file compresso\r\n newAttachment.FileName = currentFile.name.replace(/\\.[^/.]+$/, \"\") + \".webm\";\r\n newAttachment.FileContentType = \"video/webm\";\r\n }\r\n\r\n newAttachment.LargeFile = finalFile as File;\r\n newAttachment.IsLargeFile = true;\r\n return newAttachment;\r\n }\r\n\r\n if (isLargeFile) {\r\n // CASO LARGE FILE:\r\n // Popoliamo OriginalFile e forziamo il Base64 a null.\r\n newAttachment.FileDataBase64 = null;\r\n newAttachment.LargeFile = currentFile;\r\n newAttachment.IsLargeFile = true;\r\n getBase64 = false;\r\n }\r\n\r\n if (getBase64 == true) {\r\n let base64Result = await this.getBase64FromFile(currentFile);\r\n newAttachment.FileDataBase64 = base64Result.Base64File;\r\n if (!newAttachment.FileContentType && base64Result.ContentType) {\r\n newAttachment.FileContentType = base64Result.ContentType;\r\n }\r\n\r\n if (newAttachment.IsImage && newAttachment.FileDataBase64 && cropFile) {\r\n this.getCroppedAndUpload(`data:${base64Result.ContentType};base64,${base64Result.Base64File}`, newAttachment);\r\n }\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 const fileSizeMB = currentFile.size / 1024 / 1024;\r\n if (fileSizeMB > this.base64LimitMB) {\r\n return {\r\n Base64File: null,\r\n ContentType: currentFile.type\r\n };\r\n }\r\n // Procedura standard\r\n try {\r\n let base64File = await toBase64(currentFile);\r\n let contentType: string = null;\r\n if (base64File) {\r\n contentType = base64File.split(\",\")[0].split(\":\")[1].split(\";\")[0];\r\n base64File = base64File.split(\",\")[1];\r\n }\r\n return {\r\n Base64File: base64File,\r\n ContentType: contentType\r\n };\r\n } catch (ex) {\r\n return { Base64File: null, ContentType: null };\r\n }\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 // Se accetto tutto, esco subito\r\n if (this.acceptedFileTypes === \"*\") return true;\r\n\r\n const isTypeValid = (mimeType: string): boolean => {\r\n if (!mimeType) return false;\r\n\r\n // Controllo corrispondenza esatta (es. image/png)\r\n if (this.acceptedFileTypes.includes(mimeType)) return true;\r\n\r\n const wildcards = this.acceptedFileTypes.split(\",\").filter(t => t.includes(\"*\"));\r\n for (let t of wildcards) {\r\n const prefix = t.split(\"*\")[0]; // Prende \"image/\" da \"image/*\"\r\n if (mimeType.startsWith(prefix)) return true;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n if (this.loadMultipleFiles !== true) {\r\n // Caso Singolo\r\n return isTypeValid(this.selectedFile.type);\r\n } else {\r\n // Caso Multiplo: TUTTI i file selezionati devono essere validi\r\n return Array.from(this.selectedFiles).every(file => isTypeValid(file.type));\r\n }\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 //#region Gestione crop file\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 this.canvasRotation = 0;\r\n this.transform = {};\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, this.newAttachment);\r\n }\r\n\r\n getCroppedAndUpload(file, newAttachment: IAttachmentDTO) {\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 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 newAttachment.FileDataBase64 = resultReader.substring(resultReader.indexOf(marker) + marker.length);\r\n self.showCropImage = false;\r\n if (self.newAttachmentForm) {\r\n self.newAttachmentForm.enable();\r\n }\r\n };\r\n\r\n fileReader.readAsDataURL(fileCompressed);\r\n });\r\n }\r\n\r\n rotateLeft() {\r\n this.canvasRotation--;\r\n this.flipAfterRotate();\r\n }\r\n\r\n rotateRight() {\r\n this.canvasRotation++;\r\n this.flipAfterRotate();\r\n }\r\n\r\n private flipAfterRotate() {\r\n const flippedH = this.transform.flipH;\r\n const flippedV = this.transform.flipV;\r\n this.transform = {\r\n ...this.transform,\r\n flipH: flippedV,\r\n flipV: flippedH\r\n };\r\n }\r\n\r\n flipHorizontal() {\r\n this.transform = {\r\n ...this.transform,\r\n flipH: !this.transform.flipH\r\n };\r\n }\r\n\r\n flipVertical() {\r\n this.transform = {\r\n ...this.transform,\r\n flipV: !this.transform.flipV\r\n };\r\n }\r\n\r\n //#endregion\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 if (this.imageInput) 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 this.dialogRefCropImage.close();\r\n this.restoreOriginalDimensions();\r\n }\r\n\r\n //#endregion\r\n\r\n fileDropped(event: DragEvent): void {\r\n\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.dragOver = false;\r\n\r\n const files = event.dataTransfer?.files;\r\n\r\n if (files && files.length > 0) {\r\n this.onFileAdded({ target: { files: files } });\r\n }\r\n }\r\n\r\n // Se il caricamento del file dropbox va a buon fine, la funzione di callback restituisce un array di oggetti.\r\n // Viene poi fatta una XMLHttpRequest con responseType 'blob' per convertire il primo elemento della response in un Blob.\r\n chooseDropboxFile() {\r\n if (this.isDisabled) return;\r\n var options = {\r\n success: (files: any[]) => {\r\n const xhr = new XMLHttpRequest();\r\n xhr.open(\"GET\", files[0].link);\r\n xhr.setRequestHeader(\"Authorization\", `Bearer ${AttachmentHelperService.dropboxCredentials.accessToken}`);\r\n xhr.responseType = \"blob\";\r\n\r\n xhr.onload = () => {\r\n const blob = xhr.response;\r\n const file = new File([blob], files[0].name, { type: blob.type });\r\n let filesAdded = [file];\r\n this.onFileAdded(filesAdded, true);\r\n };\r\n\r\n xhr.send();\r\n },\r\n linkType: \"direct\",\r\n multiselect: false,\r\n extensions: [\".jpg\", \".png\", \".pdf\", \".doc\", \".docx\", \".txt\"]\r\n };\r\n Dropbox.choose(options);\r\n }\r\n\r\n // Workaround dropzone: disabilito il click degli elementi inclusi nella dropzone per evitare di cliccare due volte\r\n onSelectFile(event, fileInput) {\r\n if (\r\n (event.target as HTMLButtonElement).tagName === \"BUTTON\" ||\r\n (event.target as HTMLButtonElement).tagName === \"INPUT\" ||\r\n this.addingLinkMode == true\r\n ) {\r\n return;\r\n }\r\n fileInput.click();\r\n }\r\n\r\n /**\r\n * Apre il dialogo per l'inserimento del link.\r\n */\r\n switchToAddingLinkMode(): void {\r\n\r\n if (this.isDisabled) return;\r\n\r\n this.newAttachmentForm = this.formBuilder.group({\r\n fileName: [''],\r\n filePath: ['', [Validators.required, Validators.pattern('https?://.+')]]\r\n });\r\n\r\n const dialogRef = this.dialog.open(this.addingLinkTemplate, {\r\n width: '500px',\r\n panelClass: 'eqp-attachments-dialog'\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(result => {\r\n if (result) {\r\n // Crea l'oggetto per il nuovo link dai dati del form\r\n const newLinkObject: IAttachmentDTO = {\r\n ID: 0,\r\n AttachmentType: AttachmentType.LINK,\r\n FileName: result.fileName,\r\n FilePath: result.filePath,\r\n IsImage: false\r\n };\r\n\r\n this.newAttachment = newLinkObject;\r\n this.newMultipleAttachments = [newLinkObject];\r\n\r\n\r\n this.confirmAddAttachment();\r\n }\r\n });\r\n }\r\n\r\n\r\n\r\n // Metodo per ottenere le classi CSS dinamiche\r\n getCardClass(att: IAttachmentDTO): { [key: string]: boolean } {\r\n return {\r\n 'file-preview': true,\r\n 'uploading': !!att.isUploading,\r\n 'card-small': this.cardSize === 'small',\r\n 'card-medium': this.cardSize === 'medium',\r\n 'card-large': this.cardSize === 'large',\r\n };\r\n }\r\n\r\n // Questa funzione ora si applica al contenitore, non alla singola card.\r\n getPreviewsContainerStyle(): { [key: string]: string } {\r\n let minWidth = '200px'; // Dimensione di default per 'medium'\r\n\r\n if (this.cardSize === 'small') {\r\n minWidth = '140px';\r\n } else if (this.cardSize === 'large') {\r\n minWidth = '280px';\r\n } else if (this.cardSize === 'custom') {\r\n minWidth = `${this.customCardWidthPx}px`;\r\n }\r\n\r\n return { '--card-min-width': minWidth };\r\n }\r\n\r\n handlePrimaryAction(attachment: IAttachmentDTO): void {\r\n // Se il file può essere visualizzato in anteprima, apri il dialog\r\n if (this.canBePreviewed(attachment)) {\r\n this.openPreviewDialog(attachment);\r\n }\r\n // Altrimenti, esegui l'azione di default (download per file, apri per link)\r\n else {\r\n this.viewAttachment(attachment);\r\n }\r\n }\r\n\r\n /**\r\n * Determines if an attachment can be previewed in the dialog.\r\n * @param att The attachment to check.\r\n * @returns `true` if a preview is available, otherwise `false`.\r\n */\r\n canBePreviewed(att: IAttachmentDTO): boolean {\r\n if (!att) {\r\n return false;\r\n }\r\n\r\n // Case 1: It's an image with Base64 data.\r\n const isPreviewableImage = att.IsImage && !!att.FileDataBase64;\r\n\r\n // Case 2: It's a PDF with Base64 data.\r\n const isPreviewablePdf = att.FileContentType === 'application/pdf' && !!att.FileDataBase64;\r\n\r\n // Case 3: It's a remote document with a URL (for Google Viewer).\r\n const isRemoteDocument = !att.IsImage && !!att.FilePath && !!this.productionBaseUrl;\r\n\r\n //Case 4: Video - È un video e abbiamo il file binario salvato in LargeFile\r\n const isPreviewableVideo = att.FileContentType?.startsWith('video/') && !!att.LargeFile;\r\n\r\n // A preview is possible if any of these conditions are true.\r\n return isPreviewableImage || isPreviewablePdf || isRemoteDocument || isPreviewableVideo;\r\n }\r\n\r\n private isColumnHidden(col: AttachmentFieldColumn): boolean {\r\n // 1) hiddenColumns\r\n if (this.hiddenColumns?.includes(col.key)) return true;\r\n\r\n // 2) hidden definito sulla colonna (boolean o funzione senza args)\r\n if (typeof col.hidden === 'function') return !!col.hidden();\r\n return !!col.hidden;\r\n }\r\n\r\n isActionHidden(action: AttachmentMenuAction, att?: IAttachmentDTO): boolean {\r\n if (this.hiddenActions?.includes(action.key)) return true;\r\n if (typeof action.hidden === 'function') return !!action.hidden(att);\r\n return !!action.hidden;\r\n }\r\n\r\n /**\r\n * Unisce le colonne di default con quelle custom e le ordina.\r\n */\r\n private setupTableColumns(): void {\r\n // Definiamo le colonne standard con una posizione\r\n const defaultFileColumn: AttachmentFieldColumn = {\r\n key: 'file',\r\n display: 'File',\r\n type: TypeAttachmentColumn.TEMPLATE,\r\n externalTemplate: this.defaultFileTemplate,\r\n styles: { flex: '1 1 0%' },\r\n position: 10\r\n };\r\n\r\n const defaultActionsColumn: AttachmentFieldColumn = {\r\n key: 'actions',\r\n display: 'Azioni',\r\n type: TypeAttachmentColumn.TEMPLATE,\r\n externalTemplate: this.defaultActionsTemplate,\r\n position: 100,\r\n class: 'col-actions',\r\n styles: { flex: '0 0 150px' }\r\n };\r\n\r\n const processedCustomColumns = this._customColumns.map(col => {\r\n // Flex di default\r\n if (!col.styles || !col.styles.flex) {\r\n return {\r\n ...col,\r\n styles: { ...col.styles, flex: '1 1 0%' }\r\n };\r\n }\r\n return col;\r\n });\r\n\r\n const allColumns = [\r\n defaultFileColumn,\r\n defaultActionsColumn,\r\n ...processedCustomColumns\r\n ];\r\n\r\n // Ordiniamo l'array finale in base alla proprietà 'position'\r\n this._tableColumns = allColumns.filter(col => !this.isColumnHidden(col))\r\n .sort((a, b) => {\r\n const posA = a.position || 99;\r\n const posB = b.position || 99;\r\n return posA - posB;\r\n });\r\n }\r\n\r\n private setupMenuActions(): void {\r\n const defaultPreviewAction: AttachmentMenuAction = {\r\n key: 'preview',\r\n icon: 'visibility',\r\n name: 'Anteprima',\r\n fn: (att) => this.openPreviewDialog(att),\r\n disabled: (att) => !this.canBePreviewed(att),\r\n position: 10\r\n };\r\n\r\n const defaultDeleteAction: AttachmentMenuAction = {\r\n key: 'delete',\r\n icon: 'delete',\r\n name: 'Elimina',\r\n fn: (att) => this.deleteAttachment(att),\r\n disabled: () => this.disableAction,\r\n position: 100\r\n };\r\n\r\n const allActions = [\r\n defaultPreviewAction,\r\n defaultDeleteAction,\r\n ...this._customMenuActions\r\n ];\r\n\r\n // Ordiniamo l'array finale in base alla proprietà 'position'\r\n this._sortedMenuActions = allActions.sort((a, b) => {\r\n const posA = a.position || 99;\r\n const posB = b.position || 99;\r\n return posA - posB;\r\n });\r\n }\r\n\r\n private generateVideoThumbnail(file: File): Promise<string> {\r\n return new Promise((resolve, reject) => {\r\n const video = document.createElement('video');\r\n const canvas = document.createElement('canvas');\r\n const context = canvas.getContext('2d');\r\n\r\n // Crea un URL temporaneo per il file video\r\n const videoUrl = URL.createObjectURL(file);\r\n video.src = videoUrl;\r\n video.preload = 'metadata';\r\n video.muted = true;\r\n video.playsInline = true;\r\n\r\n video.onloadedmetadata = () => {\r\n // Vai al secondo 1 (per evitare il fotogramma nero iniziale)\r\n video.currentTime = 1;\r\n };\r\n\r\n video.onseeked = () => {\r\n // Imposta le dimensioni del canvas uguali al video\r\n canvas.width = video.videoWidth;\r\n canvas.height = video.videoHeight;\r\n\r\n // Disegna il fotogramma sul canvas\r\n context.drawImage(video, 0, 0, canvas.width, canvas.height);\r\n\r\n // Estrai il Base64 (qualità 0.7 per risparmiare spazio)\r\n const thumbnail = canvas.toDataURL('image/jpeg', 0.7);\r\n\r\n // Pulisci la memoria\r\n URL.revokeObjectURL(videoUrl);\r\n resolve(thumbnail.split(',')[1]); // Restituiamo solo la parte Base64\r\n };\r\n\r\n video.onerror = (err) => {\r\n URL.revokeObjectURL(videoUrl);\r\n reject(err);\r\n };\r\n });\r\n }\r\n\r\n private compressVideoNative(file: File, config: any): Promise<Blob> {\r\n return new Promise((resolve, reject) => {\r\n const video = document.createElement('video');\r\n const canvas = document.createElement('canvas');\r\n const ctx = canvas.getContext('2d');\r\n const videoUrl = URL.createObjectURL(file);\r\n\r\n video.src = videoUrl;\r\n video.muted = true;\r\n video.play();\r\n\r\n video.onloadeddata = () => {\r\n // Calcoliamo le nuove dimensioni mantenendo l'aspect ratio\r\n let width = video.videoWidth;\r\n let height = video.videoHeight;\r\n if (width > config.maxWidth) {\r\n height = Math.round((config.maxWidth * height) / width);\r\n width = config.maxWidth;\r\n }\r\n\r\n canvas.width = width;\r\n canvas.height = height;\r\n\r\n // Catturiamo lo stream dal canvas a 30fps\r\n const stream = canvas.captureStream(30);\r\n const recorder = new MediaRecorder(stream, {\r\n mimeType: 'video/webm;codecs=vp8', // Formato web ottimizzato\r\n videoBitsPerSecond: config.bitrate\r\n });\r\n\r\n const chunks: Blob[] = [];\r\n recorder.ondataavailable = (e) => chunks.push(e.data);\r\n recorder.onstop = () => {\r\n const compressedBlob = new Blob(chunks, { type: 'video/webm' });\r\n URL.revokeObjectURL(videoUrl);\r\n resolve(compressedBlob);\r\n };\r\n\r\n recorder.start();\r\n\r\n // Funzione che disegna ogni frame sul canvas\r\n const drawFrame = () => {\r\n if (video.paused || video.ended) {\r\n recorder.stop();\r\n return;\r\n }\r\n ctx.drawImage(video, 0, 0, width, height);\r\n requestAnimationFrame(drawFrame);\r\n };\r\n drawFrame();\r\n };\r\n\r\n video.onerror = reject;\r\n });\r\n }\r\n}\r\n","<!-- Se richiesta la gestione singola mostra il pulsante di caricamento di un singolo file -->\r\n@if(showUploadTitle == true || chooseView == true){\r\n<div class=\"header\">\r\n @if(showUploadTitle == true){\r\n <h4>{{ uploadTitle }}</h4>\r\n }\r\n @if(chooseView == true){\r\n <mat-button-toggle-group [value]=\"viewMode\" (change)=\"setViewMode($event.value)\"\r\n aria-label=\"Modalità di visualizzazione\">\r\n <mat-button-toggle value=\"card\"><mat-icon>grid_view</mat-icon></mat-button-toggle>\r\n <mat-button-toggle value=\"table\"><mat-icon>view_list</mat-icon></mat-button-toggle>\r\n </mat-button-toggle-group>\r\n }\r\n</div>\r\n}\r\n\r\n<!-- Gestione singolo -->\r\n@if (multipleAttachment != true) {\r\n@if (!singleAttachmentDragAndDrop) {\r\n@if (!addingLinkMode) {\r\n<div class=\"text-center\">\r\n <ng-container [ngTemplateOutlet]=\"addAttachmentButton\"></ng-container>\r\n</div>\r\n} @else {\r\n<div class=\"text-center\">\r\n <ng-container [ngTemplateOutlet]=\"addingLinkTemplate\"></ng-container>\r\n</div>\r\n}\r\n} @else {\r\n<input #fileInput id=\"file_attachment\" name=\"file_attachment\" type=\"file\" hidden (change)=\"onFileAdded($event)\"\r\n [accept]=\"acceptedFileTypes\" [multiple]=\"loadMultipleFiles\" />\r\n\r\n@if (allowedTypes && allowedTypes.includes(1) && (!attachmentsList || attachmentsList.length == 0 ||\r\n(attachmentsList.length > 0 && !attachmentsList[0]))) {\r\n\r\n@if (showDropArea == true) {\r\n<!-- FULL -->\r\n@if (layout === 'full') {\r\n\r\n<div class=\"dropbox\" [class.dragover]=\"dragOver\" (dragover)=\"dragOver = true; $event.preventDefault()\"\r\n (dragleave)=\"dragOver = false\" (drop)=\"dragOver = false; fileDropped($event)\"\r\n (click)=\"onSelectFile($event, fileInput)\" role=\"button\" tabindex=\"0\" (keydown.enter)=\"fileInput.click()\"\r\n (keydown.space)=\"fileInput.click()\">\r\n <div class=\"dropbox-icon\">📁</div>\r\n <div class=\"dropbox-text\">{{ dropHereLabel }}</div>\r\n <div class=\"dropbox-subtext\">\r\n {{ supportedFormatsLabel }}\r\n </div>\r\n <button class=\"browse-btn\" type=\"button\" (click)=\"$event.stopPropagation(); fileInput.click()\">\r\n {{ browseFilesLabel }}\r\n </button>\r\n <div class=\"secondary-action\">\r\n @if (allowedTypes.includes(2) || allowedTypes.includes(3)) {\r\n @if (allowedTypes.includes(2) && allowedTypes.includes(3)) {\r\n <a class=\"secondary-action-link\" [matMenuTriggerFor]=\"isDisabled ? null : linkMenu\"\r\n [class.disabled-link]=\"isDisabled\" (click)=\"$event.stopPropagation()\">\r\n o aggiungi da web\r\n </a>\r\n <mat-menu #linkMenu=\"matMenu\">\r\n <button mat-menu-item (click)=\"switchToAddingLinkMode()\">\r\n <mat-icon>link</mat-icon>\r\n <span>Aggiungi da link</span>\r\n </button>\r\n <button mat-menu-item (click)=\"chooseDropboxFile()\">\r\n <mat-icon>cloud_queue</mat-icon>\r\n <span>Carica da Dropbox</span>\r\n </button>\r\n </mat-menu>\r\n }\r\n\r\n @else if (allowedTypes.includes(2)) {\r\n <a [class.disabled-link]=\"isDisabled\" class=\"secondary-action-link\"\r\n (click)=\"$event.stopPropagation(); switchToAddingLinkMode()\">\r\n aggiungi un link\r\n </a>\r\n }\r\n\r\n @else if (allowedTypes.includes(3)) {\r\n <a [class.disabled-link]=\"isDisabled\" class=\"secondary-action-link\"\r\n (click)=\"$event.stopPropagation(); chooseDropboxFile()\">\r\n carica da Dropbox\r\n </a>\r\n }\r\n }\r\n </div>\r\n</div>\r\n}@else {\r\n<div class=\"compact-uploader\" [class.dragover]=\"dragOver\" (dragover)=\"dragOver = true; $event.preventDefault()\"\r\n (dragleave)=\"dragOver = false\" (drop)=\"dragOver = false; fileDropped($event)\">\r\n <div class=\"compact-icon\"><mat-icon>folder_open</mat-icon></div>\r\n <div class=\"compact-text\" (click)=\"onSelectFile($event, fileInput)\">\r\n <div class=\"compact-title\">Trascina i file o seleziona dal computer</div>\r\n <div class=\"compact-subtitle\">{{ supportedFormatsLabel }}</div>\r\n </div>\r\n <div class=\"compact-actions\">\r\n <button mat-stroked-button color=\"primary\" [disabled]=\"isDisabled\"\r\n (click)=\"$event.stopPropagation(); fileInput.click()\">Sfoglia</button>\r\n @if (allowedTypes.includes(2) || allowedTypes.includes(3)) {\r\n <button mat-stroked-button [disabled]=\"isDisabled\" [matMenuTriggerFor]=\"compactLinkMenu\"\r\n (click)=\"$event.stopPropagation()\">Link</button>\r\n <mat-menu #compactLinkMenu=\"matMenu\">\r\n @if (allowedTypes.includes(2)) { <button mat-menu-item [disabled]=\"isDisabled\"\r\n (click)=\"switchToAddingLinkMode()\">{{ openLinkLabel }}</button> }\r\n @if (allowedTypes.includes(3)) { <button mat-menu-item [disabled]=\"isDisabled\" (click)=\"chooseDropboxFile()\">{{\r\n uploadWithDropboxLabel }}</button> }\r\n </mat-menu>\r\n }\r\n </div>\r\n</div>\r\n}\r\n}\r\n}\r\n}\r\n\r\n<!-- Azioni singolo elemento (come prima) -->\r\n<div class=\"text-center\">\r\n @if (attachmentsList && attachmentsList.length > 0 && attachmentsList[0] && showActionButtons == true) {\r\n <button class=\"mb-2 me-2 eqp-attachments-download-btn\" (click)=\"viewAttachment(attachmentsList[0])\" type=\"button\"\r\n mat-raised-button color=\"primary\">\r\n @if (attachmentsList[0].AttachmentType == AttachmentType.FILE) {\r\n <mat-icon>download</mat-icon>\r\n } @else {\r\n <mat-icon>open_in_new</mat-icon>\r\n }\r\n {{ attachmentsList[0].AttachmentType == AttachmentType.FILE ? downloadLabel : openLinkLabel }}\r\n </button>\r\n\r\n @if (showPreview && (!attachmentsList[0].FileContentType || (!attachmentsList[0].FileContentType.startsWith('video')\r\n && !attachmentsList[0].FileContentType.startsWith('audio'))) && attachmentsList[0].IsImage == true) {\r\n <button class=\"mb-2 me-2 eqp-attachments-preview-btn\" (click)=\"openPreviewDialog(attachmentsList[0])\" type=\"button\"\r\n mat-raised-button color=\"primary\">\r\n <mat-icon>visibility</mat-icon> {{ previewLabel }}\r\n </button>\r\n }\r\n\r\n <button [disabled]=\"disableAction\" class=\"mb-2 eqp-attachments-delete-btn\"\r\n (click)=\"deleteAttachment(attachmentsList[0])\" type=\"button\" mat-raised-button [disabled]=\"isDisabled\">\r\n <mat-icon>delete</mat-icon> {{ deleteLabel }}\r\n </button>\r\n }\r\n</div>\r\n}\r\n\r\n<!-- Gestione multipla -->\r\n@if (multipleAttachment == true && showDropArea == true) {\r\n<input #fileInput id=\"file_attachment_multi\" name=\"file_attachment_multi\" type=\"file\" hidden\r\n (change)=\"onFileAdded($event)\" [accept]=\"acceptedFileTypes\" [multiple]=\"loadMultipleFiles\" />\r\n\r\n@if (layout === 'full') {\r\n<div class=\"dropbox\" [class.dragover]=\"dragOver\" (dragover)=\"dragOver = true; $event.preventDefault()\"\r\n (dragleave)=\"dragOver = false\" (drop)=\"dragOver = false; fileDropped($event)\"\r\n (click)=\"onSelectFile($event, fileInput)\" role=\"button\" tabindex=\"0\" (keydown.enter)=\"fileInput.click()\"\r\n (keydown.space)=\"fileInput.click()\">\r\n <div class=\"dropbox-icon\">📁</div>\r\n <div class=\"dropbox-text\">{{ dropHereLabel }}</div>\r\n <div class=\"dropbox-subtext\">\r\n {{ supportedFormatsLabel }}\r\n </div>\r\n <button class=\"browse-btn\" type=\"button\" (click)=\"$event.stopPropagation(); fileInput.click()\">\r\n {{ browseFilesLabel }}\r\n </button>\r\n @if (allowedTypes.includes(2)) {\r\n <div class=\"secondary-action-link\">\r\n o <a (click)=\"$event.stopPropagation(); switchToAddingLinkMode()\">aggiungi un link</a>\r\n </div>\r\n }\r\n</div>\r\n}@else{\r\n<div class=\"compact-uploader\" [class.dragover]=\"dragOver\" (dragover)=\"dragOver = true; $event.preventDefault()\"\r\n (dragleave)=\"dragOver = false\" (drop)=\"dragOver = false; fileDropped($event)\">\r\n <div class=\"compact-icon\"><mat-icon>folder_open</mat-icon></div>\r\n <div class=\"compact-text\" (click)=\"onSelectFile($event, fileInput)\">\r\n <div class=\"compact-title\">Trascina i file o seleziona dal computer</div>\r\n <div class=\"compact-subtitle\">{{ supportedFormatsLabel }}</div>\r\n </div>\r\n <div class=\"compact-actions\">\r\n <button mat-stroked-button [disabled]=\"isDisabled\" color=\"primary\"\r\n (click)=\"$event.stopPropagation(); fileInput.click()\">Sfoglia</button>\r\n @if (allowedTypes.includes(2) || allowedTypes.includes(3)) {\r\n <button mat-stroked-button [disabled]=\"isDisabled\" [matMenuTriggerFor]=\"compactLinkMenu\"\r\n (click)=\"$event.stopPropagation()\">Link</button>\r\n <mat-menu #compactLinkMenu=\"matMenu\">\r\n @if (allowedTypes.includes(2)) { <button mat-menu-item [disabled]=\"isDisabled\"\r\n (click)=\"switchToAddingLinkMode()\">{{ openLinkLabel }}</button> }\r\n @if (allowedTypes.includes(3)) { <button mat-menu-item [disabled]=\"isDisabled\" (click)=\"chooseDropboxFile()\">{{\r\n uploadWithDropboxLabel }}</button> }\r\n </mat-menu>\r\n }\r\n </div>\r\n</div>\r\n}\r\n}\r\n\r\n@if (attachmentsList?.length > 0 && showSummary) {\r\n<div class=\"upload-stats\">\r\n\r\n <div class=\"stats-info\">\r\n <div class=\"stat-item\">\r\n <div class=\"stat-value\">{{ attachmentsList?.length }}</div>\r\n <div class=\"stat-label\">{{ filesLabel }}</div>\r\n </div>\r\n <div class=\"stat-item\">\r\n <div class=\"stat-value\">{{ totalSizeFormatted }}</div>\r\n <div class=\"stat-label\">{{ totalSizeLabel }}</div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"progress-bar\">\r\n <div class=\"progress-fill\" [style.width.%]=\"progressPercent\"></div>\r\n </div>\r\n\r\n</div>\r\n} @else if(attachmentsList?.length == 0){\r\n<div class=\"empty-state\">{{ emptyStateLabel }}</div>\r\n}\r\n\r\n<!-- Griglia anteprime card (vale per singolo e multiplo) -->\r\n@if (viewMode === 'card') {\r\n\r\n<div class=\"file-previews\" [ngStyle]=\"getPreviewsContainerStyle()\">\r\n @for (att of attachmentsList; track att.ID) {\r\n <div [ngClass]=\"getCardClass(att)\">\r\n <div class=\"preview-img-container\" (click)=\"!att.isUploading && handlePrimaryAction(att)\">\r\n\r\n @if (att.IsImage || att.FileThumbnailBase64) {\r\n <img class=\"preview-img\" [src]=\"'data:image/jpeg;base64,' + (att.FileThumbnailBase64 || att.FileDataBase64)\"\r\n [alt]=\"att.FileName\" />\r\n } @else {\r\n <div class=\"file-icon\"><i [ngClass]=\"getAttachmentIcon(att)\"></i></div>\r\n }\r\n\r\n <div class=\"preview-action-overlay\">\r\n @if (att.FileContentType?.startsWith('video/')) {\r\n <mat-icon>play_arrow</mat-icon>\r\n }\r\n @else if (att.IsImage && canBePreviewed(att)) {\r\n <mat-icon>visibility</mat-icon>\r\n }\r\n @else if (att.FileContentType === 'application/pdf' && canBePreviewed(att)) {\r\n <mat-icon>open_in_new</mat-icon>\r\n }\r\n @else if (att.AttachmentType === AttachmentType.FILE) {\r\n <mat-icon>download</mat-icon>\r\n }\r\n @else {\r\n <mat-icon>open_in_new</mat-icon>\r\n }\r\n </div>\r\n\r\n </div>\r\n\r\n <div class=\"file-info\">\r\n <div class=\"file-name\" [title]=\"att.FileName\">{{ att.FileName }}</div>\r\n </div>\r\n\r\n @if(!disableAction){\r\n <button mat-icon-button class=\"remove-btn\" type=\"button\" aria-label=\"Rimuovi allegato\"\r\n (click)=\"deleteAttachment(att)\" [disabled]=\"att.isUploading\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (att.isUploading) {\r\n <div class=\"upload-spinner\"></div>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n} @else if(viewMode === 'table' && attachmentsList?.length > 0) {\r\n\r\n\r\n<div class=\"table-view-container\">\r\n\r\n <div class=\"table-header\">\r\n @for (col of _tableColumns; track col.key) {\r\n <div class=\"table-cell\" [style.flex]=\"col.styles?.flex\" [ngClass]=\"col.class\">\r\n {{ col.display }}\r\n </div>\r\n }\r\n </div>\r\n\r\n @for (att of attachmentsList; track att.ID) {\r\n <div class=\"table-row\">\r\n\r\n @for (col of _tableColumns; track col.key) {\r\n <div class=\"table-cell\" [style.flex]=\"col.styles?.flex\" [ngClass]=\"col.class\">\r\n\r\n @switch (col.type) {\r\n\r\n @case ('template') {\r\n <div class=\"template-wrapper\">\r\n <ng-container [ngTemplateOutlet]=\"col.externalTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: att }\"></ng-container>\r\n </div>\r\n }\r\n @case ('date') {\r\n <span class=\"metadata-value\">{{ att[col.key] | date:'dd/MM/yyyy' }}</span>\r\n }\r\n @default {\r\n <span class=\"metadata-value\">{{ att[col.key] }}</span>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n</div>\r\n}\r\n\r\n<!-- Notifica toast -->\r\n<div class=\"upload-notification\" [class.show]=\"toast?.visible\" [class.success]=\"toast?.type === 'success'\"\r\n [class.error]=\"toast?.type === 'error'\">\r\n <span>{{ toast?.text }}</span>\r\n <div class=\"notification-progress\"></div>\r\n</div>\r\n\r\n<ng-template #defaultFileTemplate let-att>\r\n <i class=\"file-icon-small\" [ngClass]=\"getAttachmentIcon(att)\"></i>\r\n <div class=\"file-info-text\">\r\n <span class=\"file-name-table\">{{ att.FileName }}</span>\r\n <span class=\"file-type-table\">{{ att.FileExtension || 'Link' }}</span>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #defaultActionsTemplate let-att>\r\n <button mat-icon-button (click)=\"handlePrimaryAction(att)\"\r\n [matTooltip]=\"att.FileContentType?.startsWith('video/') ? 'Riproduci video' : 'Visualizza/Scarica'\">\r\n\r\n <mat-icon>\r\n @if (att.FileContentType?.startsWith('video/')) {\r\n play_arrow\r\n } @else {\r\n {{ att.AttachmentType === AttachmentType.FILE ? 'download' : 'open_in_new' }}\r\n }\r\n </mat-icon>\r\n </button>\r\n\r\n <button mat-icon-button [matMenuTriggerFor]=\"actionsMenu\" matTooltip=\"Altre opzioni\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n\r\n <mat-menu #actionsMenu=\"matMenu\">\r\n @for (action of _sortedMenuActions; track action.name) {\r\n @if (!isActionHidden(action, att)) {\r\n <button mat-menu-item (click)=\"action.fn(att)\" [disabled]=\"action.disabled ? action.disabled(att) : false\">\r\n <mat-icon [color]=\"action.icon === 'delete' ? 'warn' : undefined\">\r\n {{ action.icon }}\r\n </mat-icon>\r\n <span>{{ action.name }}</span>\r\n </button>\r\n }\r\n }\r\n </mat-menu>\r\n</ng-template>\r\n\r\n\r\n<ng-template #dialogCropImage>\r\n <div style=\"overflow-x: hidden\" [ngClass]=\"cropDialogClass\">\r\n <!-- @if (showCropImage == true) { -->\r\n <ng-container [ngTemplateOutlet]=\"croppieTemplate\" [ngTemplateOutletContext]=\"{ form: newAttachmentForm }\">\r\n </ng-container>\r\n <!-- } -->\r\n </div>\r\n</ng-template>\r\n\r\n\r\n<ng-template #inlinePreviewTemplate let-row=\"row\">\r\n @if (row.AttachmentType != AttachmentType.LINK && row.IsImage) {\r\n <div class=\"inline-preview-container\" (click)=\"openPreviewDialog(row)\">\r\n <img [src]=\"'data:image/png;base64,' + (row.FileThumbnailBase64 ? row.FileThumbnailBase64 : row.FileDataBase64)\" />\r\n </div>\r\n } @else if (row.AttachmentType != AttachmentType.LINK && !row.IsImage) {\r\n <div class=\"inline-preview-container\" (click)=\"openPreviewDialog(row)\">\r\n <i [ngClass]=\"getAttachmentIcon(row)\"></i>\r\n </div>\r\n }\r\n</ng-template>\r\n\r\n\r\n<ng-template #dialogPreview>\r\n <div class=\"modern-dialog-container\"> @if (selectedAttachment) {\r\n <div mat-dialog-title class=\"preview-header\">\r\n <div class=\"header-info\">\r\n <div class=\"title-group\">\r\n <span class=\"main-t\">{{ previewLabel }}</span>\r\n <span class=\"file-t\">{{ selectedAttachment.FileName }}</span>\r\n </div>\r\n </div>\r\n <button mat-icon-button mat-dialog-close class=\"close-btn\"><mat-icon>close</mat-icon></button>\r\n </div>\r\n\r\n <mat-dialog-content class=\"preview-content-area\">\r\n <div class=\"media-viewer-wrapper\">\r\n @if (selectedAttachment.IsImage) {\r\n <img class=\"main-preview-media\"\r\n [src]=\"'data:image/png;base64,' + (selectedAttachment.FileDataBase64 || selectedAttachment.FileThumbnailBase64)\"\r\n [alt]=\"selectedAttachment.FileName\" />\r\n }\r\n @else if (selectedAttachment.FileContentType?.startsWith('video/')) {\r\n <video controls autoplay playsinline class=\"main-preview-media video-player\">\r\n <source [src]=\"selectedAttachment.TrustedUrl\" [type]=\"selectedAttachment.FileContentType\">\r\n Il tuo browser non supporta il video.\r\n </video>\r\n }\r\n @else {\r\n <div class=\"iframe-container\">\r\n <iframe class=\"preview-iframe-modern\" [src]=\"selectedAttachment.TrustedUrl\"\r\n [title]=\"selectedAttachment.FileName\"></iframe>\r\n </div>\r\n }\r\n </div>\r\n </mat-dialog-content>\r\n\r\n <mat-dialog-actions align=\"end\" class=\"preview-actions\">\r\n <button mat-button mat-dialog-close class=\"btn-close\">Chiudi</button>\r\n @if (selectedAttachment.AttachmentType !== AttachmentType.LINK) {\r\n <button mat-raised-button color=\"primary\" (click)=\"viewAttachment(selectedAttachment)\" class=\"btn-download\">\r\n <mat-icon>download</mat-icon> <span>{{ downloadLabel }}</span>\r\n </button>\r\n }\r\n </mat-dialog-actions>\r\n }\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 <input #fileInput style=\"display: none\" id=\"file_attachment\" name=\"file_attachment\" type=\"file\"\r\n (change)=\"onFileAdded($event)\" [accept]=\"acceptedFileTypes\" [multiple]=\"loadMultipleFiles\" />\r\n\r\n @if (allowedTypes && allowedTypes.length == 1 && (multipleAttachment == true || !attachmentsList ||\r\n attachmentsList.length == 0 || (attachmentsList.length > 0 && !attachmentsList[0]))) {\r\n <button class=\"btn btn-primary mb-4 me-5 eqp-attachments-add-btn\" mat-raised-button color=\"primary\" type=\"button\"\r\n (click)=\"addFile(allowedTypes[0], fileInput)\" [disabled]=\"isDisabled\">\r\n @if (allowedTypes[0] == 1) { <mat-icon>cloud_upload</mat-icon> }\r\n @if (allowedTypes[0] == 2) { <i class=\"fas fa-link\"></i> }\r\n @if (allowedTypes[0] == 3) { <i class=\"fa-brands fa-dropbox\"></i> }\r\n <span style=\"margin-left: 10px\">\r\n {{ allowedTypes[0] == 1 ? (addButtonLabel + \" file\") : allowedTypes[0] == 2 ? (addButtonLabel + \" link\") :\r\n uploadWithDropboxLabel }}\r\n </span>\r\n </button>\r\n }\r\n\r\n @if (!separatedUploadButtons && allowedTypes && allowedTypes.length > 1 && (multipleAttachment == true ||\r\n !attachmentsList || attachmentsList.length == 0 || (attachmentsList.length > 0 && !attachmentsList[0]))) {\r\n <button class=\"btn btn-primary mb-4 me-5 eqp-attachments-add-btn\" mat-raised-button color=\"primary\" type=\"button\"\r\n [matMenuTriggerFor]=\"attachmentTypeMenu\" [disabled]=\"isDisabled\">\r\n @if (multipleAttachment != true) { <mat-icon>cloud_upload</mat-icon> } @else { <mat-icon>add</mat-icon> }\r\n <span style=\"margin-left: 0px\">{{ addButtonLabel }}</span>\r\n </button>\r\n\r\n <mat-menu #attachmentTypeMenu=\"matMenu\">\r\n <input #imageInput style=\"display: none\" id=\"file_attachment\" name=\"file_attachment\" type=\"file\"\r\n (change)=\"onFileAdded($event)\" [accept]=\"acceptedFileTypes\" [multiple]=\"loadMultipleFiles\" />\r\n @if (allowedTypes.includes(1)) {\r\n <button mat-menu-item (click)=\"imageInput.click()\" 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 }\r\n @if (allowedTypes.includes(2)) {\r\n <button mat-menu-item [disabled]=\"isDisabled\" (click)=\"switchToAddingLinkMode()\" 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 }\r\n @if (allowedTypes.includes(3)) {\r\n <button mat-menu-item (click)=\"chooseDropboxFile()\" class=\"eqp-attachments-link-btn\">\r\n <i class=\"fa-brands fa-dropbox\"></i>\r\n <span style=\"margin-left: 10px\">Dropbox</span>\r\n </button>\r\n }\r\n </mat-menu>\r\n }\r\n\r\n @if (separatedUploadButtons && allowedTypes && allowedTypes.length > 1 && (multipleAttachment == true ||\r\n !attachmentsList || attachmentsList.length == 0 || (attachmentsList.length > 0 && !attachmentsList[0]))) {\r\n <div class=\"btn-group\">\r\n @if (allowedTypes.includes(1)) {\r\n <button (click)=\"imageInput.click()\" class=\"btn btn-secondary eqp-attachments-add-btn\" mat-raised-button\r\n color=\"secondary\" type=\"button\">\r\n <i class=\"fa-solid fa-cloud-upload\"></i>\r\n <span style=\"margin-left: 10px\">File</span>\r\n </button>\r\n }\r\n <input #imageInput style=\"display: none\" id=\"file_attachment\" name=\"file_attachment\" type=\"file\"\r\n (change)=\"onFileAdded($event)\" [accept]=\"acceptedFileTypes\" [multiple]=\"loadMultipleFiles\" />\r\n @if (allowedTypes.includes(2)) {\r\n <button (click)=\"switchToAddingLinkMode()\" class=\"btn btn-secondary eqp-attachments-add-btn\" mat-raised-button\r\n color=\"secondary\" type=\"button\">\r\n <i class=\"fas fa-link\"></i>\r\n <span style=\"margin-left: 10px\">Link</span>\r\n </button>\r\n }\r\n @if (allowedTypes.includes(3)) {\r\n <button (click)=\"chooseDropboxFile()\" class=\"btn btn-secondary eqp-attachments-add-btn\" mat-raised-button\r\n color=\"secondary\" type=\"button\">\r\n <i class=\"fa-brands fa-dropbox\"></i>\r\n <span style=\"margin-left: 10px\">Dropbox</span>\r\n </button>\r\n }\r\n </div>\r\n }\r\n</ng-template>\r\n\r\n\r\n<ng-template #croppieTemplate>\r\n <div class=\"modern-dialog-container\">\r\n <div mat-dialog-title class=\"preview-header\">\r\n <div class=\"header-info\">\r\n <div class=\"title-group\">\r\n <span class=\"main-t\">{{ cropLabel }}</span>\r\n <span class=\"file-t\">Regola le dimensioni e l'orientamento</span>\r\n </div>\r\n </div>\r\n <button mat-icon-button type=\"button\" (click)=\"abortFile()\" class=\"close-btn\"><mat-icon>close</mat-icon></button>\r\n </div>\r\n\r\n <mat-dialog-content class=\"preview-content-area\">\r\n <div class=\"crop-toolbar\">\r\n @if (cropOptions.includes(1)) {\r\n <button mat-icon-button [matTooltip]=\"rotateLeftLabel\"\r\n (click)=\"rotateLeft()\"><mat-icon>rotate_left</mat-icon></button>\r\n <button mat-icon-button [matTooltip]=\"rotateRightLabel\"\r\n (click)=\"rotateRight()\"><mat-icon>rotate_right</mat-icon></button>\r\n }\r\n @if (cropOptions.includes(2)) {\r\n <button mat-icon-button [matTooltip]=\"flipHorinzontalLabel\"\r\n (click)=\"flipHorizontal()\"><mat-icon>flip_horizontal</mat-icon></button>\r\n <button mat-icon-button [matTooltip]=\"flipVerticalLabel\"\r\n (click)=\"flipVertical()\"><mat-icon>flip_vertical</mat-icon></button>\r\n }\r\n <button mat-icon-button matTooltip=\"Reset\"\r\n (click)=\"restoreOriginalDimensions()\"><mat-icon>replay</mat-icon></button>\r\n </div>\r\n\r\n <div class=\"media-viewer-wrapper\">\r\n <div class=\"crop-container-modern\">\r\n <image-cropper [imageFile]=\"selectedFile\" [maintainAspectRatio]=\"false\" [canvasRotation]=\"canvasRotation\"\r\n [transform]=\"transform\" format=\"png\" (imageCropped)=\"imageCropped($event)\" [resizeToWidth]=\"customWidth\"\r\n [resizeToHeight]=\"customHeight\" [output]=\"'base64'\" [containWithinAspectRatio]=\"true\" [onlyScaleDown]=\"true\"\r\n [alignImage]=\"'center'\">\r\n </image-cropper>\r\n </div>\r\n </div>\r\n </mat-dialog-content>\r\n\r\n <mat-dialog-actions align=\"end\" class=\"preview-actions\">\r\n <button mat-button (click)=\"abortFile()\" class=\"btn-close\">{{ abortLabel }}</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"confirmAddAttachment()\" class=\"btn-download\">\r\n <mat-icon>check</mat-icon> {{ confirmLabel }}\r\n </button>\r\n </mat-dialog-actions>\r\n </div>\r\n</ng-template>\r\n\r\n\r\n\r\n<!-- TEMPLATE PER FORM DI AGGIUNTA DI UN LINK -->\r\n<ng-template #addingLinkTemplate>\r\n <div class=\"modern-dialog-container\">\r\n <div mat-dialog-title class=\"preview-header\">\r\n <div class=\"header-info\">\r\n <div class=\"type-icon-wrapper\">\r\n <mat-icon>link</mat-icon>\r\n </div>\r\n <div class=\"title-group\">\r\n <span class=\"main-t\">Aggiungi un link</span>\r\n <span class=\"file-t\">Inserisci l'URL della risorsa web</span>\r\n </div>\r\n </div>\r\n <button mat-icon-button mat-dialog-close class=\"close-btn\"><mat-icon>close</mat-icon></button>\r\n </div>\r\n\r\n <mat-dialog-content class=\"add-link-modern-content\">\r\n <form [formGroup]=\"newAttachmentForm\" class=\"add-link-form\">\r\n <mat-form-field appearance=\"outline\" class=\"w-100 mt-3\">\r\n <mat-label>URL del collegamento</mat-label>\r\n <input matInput formControlName=\"filePath\" placeholder=\"https://...\" required>\r\n <mat-icon matSuffix>language</mat-icon>\r\n </mat-form-field>\r\n\r\n <mat-form-field appearance=\"outline\" class=\"w-100\">\r\n <mat-label>Titolo (opzionale)</mat-label>\r\n <input matInput formControlName=\"fileName\" placeholder=\"Es. Documento Progetto\">\r\n <mat-icon matSuffix>title</mat-icon>\r\n </mat-form-field>\r\n </form>\r\n </mat-dialog-content>\r\n\r\n <mat-dialog-actions align=\"end\" class=\"preview-actions\">\r\n <button mat-button mat-dialog-close class=\"btn-close\">Annulla</button>\r\n <button mat-raised-button color=\"primary\" [mat-dialog-close]=\"newAttachmentForm.value\"\r\n [disabled]=\"newAttachmentForm.invalid\" class=\"btn-download\">\r\n <mat-icon>add</mat-icon> Aggiungi\r\n </button>\r\n </mat-dialog-actions>\r\n </div>\r\n</ng-template>","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 { ImageCropperComponent } from 'ngx-image-cropper';\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 ImageCropperComponent\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"],"names":["i5.EqpAttachmentService"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAMa,uBAAuB,CAAA;AAEhC,IAAA,OAAgB,cAAc,GAAa,CAAC,WAAW,E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