@eqproject/eqp-attachments 0.1.1 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/bundles/eqproject-eqp-attachments.umd.js +111 -11
- package/bundles/eqproject-eqp-attachments.umd.js.map +1 -1
- package/bundles/eqproject-eqp-attachments.umd.min.js +1 -1
- package/bundles/eqproject-eqp-attachments.umd.min.js.map +1 -1
- package/eqproject-eqp-attachments.metadata.json +1 -1
- package/esm2015/lib/eqp-attachments.component.js +83 -12
- package/esm2015/lib/helpers/attachment.helper.js +19 -1
- package/esm5/lib/eqp-attachments.component.js +95 -13
- package/esm5/lib/helpers/attachment.helper.js +19 -1
- package/fesm2015/eqproject-eqp-attachments.js +100 -11
- package/fesm2015/eqproject-eqp-attachments.js.map +1 -1
- package/fesm5/eqproject-eqp-attachments.js +112 -12
- package/fesm5/eqproject-eqp-attachments.js.map +1 -1
- package/lib/eqp-attachments.component.d.ts +25 -2
- package/package.json +1 -1
|
@@ -51,6 +51,10 @@ export declare class EqpAttachmentsComponent implements OnInit {
|
|
|
51
51
|
* Se FALSE permette di selezionare qualsiasi tipo di file
|
|
52
52
|
*/
|
|
53
53
|
allowOnlyImages: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Specifica i tipi di file che è possibile caricare
|
|
56
|
+
*/
|
|
57
|
+
acceptedFileTypes: string;
|
|
54
58
|
/**
|
|
55
59
|
* Se TRUE disabilita il pulsante di Aggiunta allegato (a prescindere dal valore del parametro "multipleAttachment").
|
|
56
60
|
*/
|
|
@@ -96,6 +100,9 @@ export declare class EqpAttachmentsComponent implements OnInit {
|
|
|
96
100
|
deleteDialogTitle: string;
|
|
97
101
|
deleteDialogMessage: string;
|
|
98
102
|
noImageSelectedErrorMessage: string;
|
|
103
|
+
wrongTypeSelectedErrorMessage: string;
|
|
104
|
+
videoPreviewErrorMessage: string;
|
|
105
|
+
audioPreviewErrorMessage: string;
|
|
99
106
|
/**
|
|
100
107
|
* Restituisce la lista aggiornata degli allegati.
|
|
101
108
|
*/
|
|
@@ -114,7 +121,6 @@ export declare class EqpAttachmentsComponent implements OnInit {
|
|
|
114
121
|
newAttachmentForm: FormGroup;
|
|
115
122
|
selectedFile: File;
|
|
116
123
|
showCropImage: boolean;
|
|
117
|
-
acceptedFileTypes: string;
|
|
118
124
|
dialogAddAttachment: TemplateRef<any>;
|
|
119
125
|
imageChangedEvent: any;
|
|
120
126
|
croppedImage: any;
|
|
@@ -132,6 +138,7 @@ export declare class EqpAttachmentsComponent implements OnInit {
|
|
|
132
138
|
dialogPreview: TemplateRef<any>;
|
|
133
139
|
constructor(dialog: MatDialog, formBuilder: FormBuilder, sanitizer: DomSanitizer, http: HttpClient);
|
|
134
140
|
ngOnInit(): void;
|
|
141
|
+
reloadData(): void;
|
|
135
142
|
checkAttachmentImage(): void;
|
|
136
143
|
/**
|
|
137
144
|
* Configura le colonne per l'eqp-table nel caso in cui il parametro "multipleAttachments" è TRUE.
|
|
@@ -163,14 +170,30 @@ export declare class EqpAttachmentsComponent implements OnInit {
|
|
|
163
170
|
*/
|
|
164
171
|
openModalAddAttachment(attachmentType: AttachmentType): void;
|
|
165
172
|
close(): void;
|
|
173
|
+
/**
|
|
174
|
+
* In base al tipo di allegato controlla se disabilitare o meno il pulsante per salvare.
|
|
175
|
+
* Funzione usata nel [disable] del pulsante "Salva" del dialog per l'aggiunta di un allegato.
|
|
176
|
+
* @returns
|
|
177
|
+
*/
|
|
178
|
+
disableSave(): boolean;
|
|
166
179
|
confirmAddAttachment(): void;
|
|
167
|
-
|
|
180
|
+
/**
|
|
181
|
+
* Apre il dialog per l'anteprima dell'allegato selezionato.
|
|
182
|
+
* @param row
|
|
183
|
+
* @returns
|
|
184
|
+
*/
|
|
185
|
+
openPreviewDialog(row: IAttachmentDTO): Promise<void>;
|
|
168
186
|
getAttachmentByID(): Promise<IAttachmentDTO>;
|
|
169
187
|
/**
|
|
170
188
|
* Se il file caricato è un immagine allora mostra le funzionalità del croppie per ritagliare l'immagine altrimenti
|
|
171
189
|
* converte il file in base64 e lo associa all'allegato da salvare
|
|
172
190
|
*/
|
|
173
191
|
onFileInputChange(event: any): Promise<void>;
|
|
192
|
+
/**
|
|
193
|
+
* Controlla se il file che si sta caricando è supportato dal sistema.
|
|
194
|
+
* @returns
|
|
195
|
+
*/
|
|
196
|
+
checkAcceptedFiles(): boolean;
|
|
174
197
|
getImageDimensions(img: any): void;
|
|
175
198
|
restoreOriginalDimensions(): void;
|
|
176
199
|
onDimensionsChange(dimension: string): void;
|