@eqproject/eqp-attachments 3.1.13 → 21.0.0
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 +591 -433
- package/fesm2022/eqproject-eqp-attachments.mjs +381 -558
- package/fesm2022/eqproject-eqp-attachments.mjs.map +1 -1
- package/package.json +6 -8
- package/types/eqproject-eqp-attachments.d.ts +581 -0
- package/esm2022/eqproject-eqp-attachments.mjs +0 -5
- package/esm2022/lib/eqp-attachments.component.mjs +0 -1588
- package/esm2022/lib/eqp-attachments.module.mjs +0 -35
- package/esm2022/lib/helpers/attachment.helper.mjs +0 -66
- package/esm2022/lib/interfaces/IAttachment.mjs +0 -18
- package/esm2022/lib/interfaces/IOptions.mjs +0 -2
- package/esm2022/lib/modules/material.module.mjs +0 -231
- package/esm2022/lib/services/eqp-attachment-dialog.service.mjs +0 -103
- package/esm2022/lib/services/eqp-attachment.service.mjs +0 -23
- package/esm2022/public-api.mjs +0 -10
- package/index.d.ts +0 -5
- package/lib/eqp-attachments.component.d.ts +0 -413
- package/lib/eqp-attachments.module.d.ts +0 -11
- package/lib/helpers/attachment.helper.d.ts +0 -20
- package/lib/interfaces/IAttachment.d.ts +0 -53
- package/lib/interfaces/IOptions.d.ts +0 -11
- package/lib/modules/material.module.d.ts +0 -37
- package/lib/services/eqp-attachment-dialog.service.d.ts +0 -31
- package/lib/services/eqp-attachment.service.d.ts +0 -7
- package/public-api.d.ts +0 -6
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eqproject/eqp-attachments",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "21.0.0",
|
|
4
4
|
"description": "Dynamic attachments component - Angular Material based",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "EqProject"
|
|
7
7
|
},
|
|
8
8
|
"peerDependencies": {
|
|
9
|
-
"@angular/cdk": "^
|
|
10
|
-
"@angular/common": "^
|
|
11
|
-
"@angular/core": "^
|
|
9
|
+
"@angular/cdk": "^21.0.0",
|
|
10
|
+
"@angular/common": "^21.0.0",
|
|
11
|
+
"@angular/core": "^21.0.0"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"browser-image-compression": "^2.0.2",
|
|
@@ -17,15 +17,13 @@
|
|
|
17
17
|
"tslib": "^2.6.2"
|
|
18
18
|
},
|
|
19
19
|
"module": "fesm2022/eqproject-eqp-attachments.mjs",
|
|
20
|
-
"typings": "
|
|
20
|
+
"typings": "types/eqproject-eqp-attachments.d.ts",
|
|
21
21
|
"exports": {
|
|
22
22
|
"./package.json": {
|
|
23
23
|
"default": "./package.json"
|
|
24
24
|
},
|
|
25
25
|
".": {
|
|
26
|
-
"types": "./
|
|
27
|
-
"esm2022": "./esm2022/eqproject-eqp-attachments.mjs",
|
|
28
|
-
"esm": "./esm2022/eqproject-eqp-attachments.mjs",
|
|
26
|
+
"types": "./types/eqproject-eqp-attachments.d.ts",
|
|
29
27
|
"default": "./fesm2022/eqproject-eqp-attachments.mjs"
|
|
30
28
|
}
|
|
31
29
|
},
|
|
@@ -0,0 +1,581 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef, OnInit } from '@angular/core';
|
|
3
|
+
import { HttpClient } from '@angular/common/http';
|
|
4
|
+
import * as i3$1 from '@angular/forms';
|
|
5
|
+
import { FormGroup, FormBuilder } from '@angular/forms';
|
|
6
|
+
import * as i25 from '@angular/material/dialog';
|
|
7
|
+
import { MatDialogRef, MatDialog } from '@angular/material/dialog';
|
|
8
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
9
|
+
import * as i5$1 from 'ngx-image-cropper';
|
|
10
|
+
import { ImageTransform, ImageCropperComponent, ImageCroppedEvent } from 'ngx-image-cropper';
|
|
11
|
+
import * as i1 from '@angular/material/checkbox';
|
|
12
|
+
import * as i2 from '@angular/material/button';
|
|
13
|
+
import * as i3 from '@angular/material/input';
|
|
14
|
+
import * as i4 from '@angular/material/autocomplete';
|
|
15
|
+
import * as i5 from '@angular/material/datepicker';
|
|
16
|
+
import * as i6 from '@angular/material/form-field';
|
|
17
|
+
import * as i7 from '@angular/material/radio';
|
|
18
|
+
import * as i8 from '@angular/material/select';
|
|
19
|
+
import * as i9 from '@angular/material/slider';
|
|
20
|
+
import * as i10 from '@angular/material/slide-toggle';
|
|
21
|
+
import * as i11 from '@angular/material/menu';
|
|
22
|
+
import * as i12 from '@angular/material/sidenav';
|
|
23
|
+
import * as i13 from '@angular/material/toolbar';
|
|
24
|
+
import * as i14 from '@angular/material/list';
|
|
25
|
+
import * as i15 from '@angular/material/grid-list';
|
|
26
|
+
import * as i16 from '@angular/material/card';
|
|
27
|
+
import * as i17 from '@angular/material/stepper';
|
|
28
|
+
import * as i18 from '@angular/material/tabs';
|
|
29
|
+
import * as i19 from '@angular/material/expansion';
|
|
30
|
+
import * as i20 from '@angular/material/button-toggle';
|
|
31
|
+
import * as i21 from '@angular/material/chips';
|
|
32
|
+
import * as i22 from '@angular/material/icon';
|
|
33
|
+
import * as i23 from '@angular/material/progress-spinner';
|
|
34
|
+
import * as i24 from '@angular/material/progress-bar';
|
|
35
|
+
import * as i26 from '@angular/material/tooltip';
|
|
36
|
+
import * as i27 from '@angular/material/snack-bar';
|
|
37
|
+
import * as i28 from '@angular/material/table';
|
|
38
|
+
import * as i29 from '@angular/material/sort';
|
|
39
|
+
import * as i30 from '@angular/material/paginator';
|
|
40
|
+
import * as i31 from '@angular/material/core';
|
|
41
|
+
import * as i4$1 from '@angular/common';
|
|
42
|
+
|
|
43
|
+
interface IAttachmentDTO {
|
|
44
|
+
ID: number | string;
|
|
45
|
+
FileName?: string;
|
|
46
|
+
FileContentType?: string;
|
|
47
|
+
FileExtension?: string;
|
|
48
|
+
FilePath?: string;
|
|
49
|
+
AttachmentType?: AttachmentType;
|
|
50
|
+
FileDataBase64?: string;
|
|
51
|
+
IsImage?: boolean;
|
|
52
|
+
FileThumbnailBase64?: string;
|
|
53
|
+
TrustedUrl?: any;
|
|
54
|
+
isUploading?: boolean;
|
|
55
|
+
LargeFile?: File;
|
|
56
|
+
IsLargeFile?: boolean;
|
|
57
|
+
}
|
|
58
|
+
declare enum AttachmentType {
|
|
59
|
+
FILE = 1,
|
|
60
|
+
LINK = 2,
|
|
61
|
+
DROPBOX = 3
|
|
62
|
+
}
|
|
63
|
+
declare enum CropOptionEnum {
|
|
64
|
+
ROTATE = 1,
|
|
65
|
+
FLIP = 2
|
|
66
|
+
}
|
|
67
|
+
type AttachmentCardSize = 'small' | 'medium' | 'large' | 'custom';
|
|
68
|
+
type Layout = 'full' | 'compact';
|
|
69
|
+
interface AttachmentFieldColumn {
|
|
70
|
+
key: string;
|
|
71
|
+
display: string;
|
|
72
|
+
type?: TypeAttachmentColumn;
|
|
73
|
+
styles?: {
|
|
74
|
+
flex: string;
|
|
75
|
+
};
|
|
76
|
+
externalTemplate?: TemplateRef<any>;
|
|
77
|
+
position?: number;
|
|
78
|
+
class?: string;
|
|
79
|
+
hidden?: boolean | (() => boolean);
|
|
80
|
+
}
|
|
81
|
+
interface AttachmentMenuAction {
|
|
82
|
+
key?: string;
|
|
83
|
+
name: string;
|
|
84
|
+
icon: string;
|
|
85
|
+
fn: (attachment: IAttachmentDTO) => void;
|
|
86
|
+
disabled?: (attachment: IAttachmentDTO) => boolean;
|
|
87
|
+
hidden?: (attachment: IAttachmentDTO) => boolean;
|
|
88
|
+
position?: number;
|
|
89
|
+
}
|
|
90
|
+
declare enum TypeAttachmentColumn {
|
|
91
|
+
DATE = "date",
|
|
92
|
+
TEMPLATE = "template",
|
|
93
|
+
TEXT = "text"
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Interfaccia presa dal pacchetto "browser-image-compression" per specificare le opzioni di compressione
|
|
98
|
+
*/
|
|
99
|
+
interface IOptions {
|
|
100
|
+
/** @default Number.POSITIVE_INFINITY */
|
|
101
|
+
maxSizeMB?: number;
|
|
102
|
+
/** @default undefined */
|
|
103
|
+
maxWidthOrHeight?: number;
|
|
104
|
+
/** @default false */
|
|
105
|
+
useWebWorker?: boolean;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
declare class EqpAttachmentService {
|
|
109
|
+
constructor();
|
|
110
|
+
loadDropboxScript(): void;
|
|
111
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EqpAttachmentService, never>;
|
|
112
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<EqpAttachmentService>;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
declare class EqpAttachmentsComponent implements OnInit {
|
|
116
|
+
#private;
|
|
117
|
+
private dialog;
|
|
118
|
+
private formBuilder;
|
|
119
|
+
private sanitizer;
|
|
120
|
+
private http;
|
|
121
|
+
private eqpAttachmentService;
|
|
122
|
+
/**
|
|
123
|
+
* Se TRUE allora nasconde la colonna per le azioni sull'allegato (nel caso "multipleAttachment" è TRUE).
|
|
124
|
+
*/
|
|
125
|
+
readonly disableAction: _angular_core.InputSignal<boolean>;
|
|
126
|
+
/**
|
|
127
|
+
* Se TRUE mostra il titolo nell'header nel caso in cui "multipleAttachment" è TRUE ("Elenco allegati" di default).
|
|
128
|
+
*/
|
|
129
|
+
readonly showHeader: _angular_core.InputSignal<boolean>;
|
|
130
|
+
/**
|
|
131
|
+
* Sorgente dati da visualizzare. Nel caso si vuole gestire un singolo allegato va passato in ogni caso come Array.
|
|
132
|
+
*/
|
|
133
|
+
attachmentsList: Array<IAttachmentDTO>;
|
|
134
|
+
/**
|
|
135
|
+
* Nel caso si vuole gestire un solo elemento senza passarlo come array, lo passo come singolo allegato e gestisco nella libreria l'array.
|
|
136
|
+
*/
|
|
137
|
+
readonly singleAttachment: _angular_core.InputSignal<IAttachmentDTO>;
|
|
138
|
+
/**
|
|
139
|
+
* Se TRUE non mostra la MatCard (nel caso in cui "multipleAttachment" è TRUE).
|
|
140
|
+
*/
|
|
141
|
+
readonly showMatCard: _angular_core.InputSignal<boolean>;
|
|
142
|
+
/**
|
|
143
|
+
* 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".
|
|
144
|
+
* Se TRUE allora il componente mostra l'elenco di tutti gli allegati ricevuto nel parametro "attachmentsList".
|
|
145
|
+
*/
|
|
146
|
+
readonly multipleAttachment: _angular_core.InputSignal<boolean>;
|
|
147
|
+
/**
|
|
148
|
+
* Se assume il valore TRUE allora sarà possibile caricare più file per volta. Questa funzionalità è attiva
|
|
149
|
+
* SOLO se si gestiscono allegati multipli, quindi se l'input 'multipleAttachment' assume il valore TRUE, altrimenti è sempre disabilitata.
|
|
150
|
+
*/
|
|
151
|
+
readonly loadMultipleFiles: _angular_core.InputSignal<boolean>;
|
|
152
|
+
/**
|
|
153
|
+
* Imposta il messaggio da visualizzare nel caso in cui la tabella degli allegati (nel caso in cui "multipleAttachment" è TRUE) è vuota.
|
|
154
|
+
*/
|
|
155
|
+
readonly emptyTableMessage: _angular_core.InputSignal<string>;
|
|
156
|
+
/**
|
|
157
|
+
* Se TRUE allora permette di selezionare soltanto file di tipo immagine, avente uno dei mimetype
|
|
158
|
+
* specificati dentro AttachmentHelperService.
|
|
159
|
+
* Se FALSE permette di selezionare qualsiasi tipo di file
|
|
160
|
+
*/
|
|
161
|
+
readonly allowOnlyImages: _angular_core.InputSignal<boolean>;
|
|
162
|
+
/**
|
|
163
|
+
* Specifica i tipi di file che è possibile caricare
|
|
164
|
+
*/
|
|
165
|
+
acceptedFileTypes: string;
|
|
166
|
+
/**
|
|
167
|
+
* Se TRUE disabilita il pulsante di Aggiunta allegato (a prescindere dal valore del parametro "multipleAttachment").
|
|
168
|
+
*/
|
|
169
|
+
readonly isDisabled: _angular_core.InputSignal<boolean>;
|
|
170
|
+
/**
|
|
171
|
+
* Mostra/nasconde la colonna per visualizzare l'anteprima dei file nella tabella (caso multipleAtatchments = true).
|
|
172
|
+
*/
|
|
173
|
+
readonly showInlinePreview: _angular_core.InputSignal<boolean>;
|
|
174
|
+
/**
|
|
175
|
+
* Endpoint da chiamare per recueprare l'IAttachmentDTO completo da vedere nell'anteprima. La chiamata sarà in POST e nel body
|
|
176
|
+
* conterrà l'IAttachmentDTO selezionato dall'utente.
|
|
177
|
+
* La chiamata viene eseguita solo per l'anteprima delle immagini essendo necessario il base64 completo dell'immagine a dimensione reale.
|
|
178
|
+
* Per documenti/link basta che sia popolata la proprietà FilePath di IAttachmentDTO.
|
|
179
|
+
*/
|
|
180
|
+
readonly getAttachmentEndpoint: _angular_core.InputSignal<string>;
|
|
181
|
+
/**
|
|
182
|
+
* Hostname dell'ambiente di produzione dell'applicativo. Necessario per visualizzare l'anteprima dei documenti
|
|
183
|
+
* tramite il viewer di google.
|
|
184
|
+
* NOTA: Per visualizzare l'anteprima è necessario che la prorietà FilePath dell'IAttachmentDTO sia popolata e che
|
|
185
|
+
* sia abilitato l'accesso alla cartella sul server tramite hostname.
|
|
186
|
+
*/
|
|
187
|
+
readonly productionBaseUrl: _angular_core.InputSignal<string>;
|
|
188
|
+
/**
|
|
189
|
+
* Opzioni per la compressione delle immagini caricate.
|
|
190
|
+
*/
|
|
191
|
+
readonly compressionOptions: _angular_core.InputSignal<IOptions>;
|
|
192
|
+
/**
|
|
193
|
+
* Array di AttachmentType che si possono aggiungere
|
|
194
|
+
*/
|
|
195
|
+
allowedTypes: Array<AttachmentType>;
|
|
196
|
+
/**
|
|
197
|
+
* Permette di stabilire se la eqp-table contenente l'elenco degli allegati utilizza
|
|
198
|
+
* il multilingua oppure no
|
|
199
|
+
*/
|
|
200
|
+
readonly isEqpTableMultiLanguage: _angular_core.InputSignal<boolean>;
|
|
201
|
+
/**
|
|
202
|
+
* Permette di stabilire, in caso di gestione allegati multipli, se la tabella contenente l'elenco
|
|
203
|
+
* degli allegati deve essere paginata oppure no
|
|
204
|
+
*/
|
|
205
|
+
readonly tablePaginatorVisible: _angular_core.InputSignal<boolean>;
|
|
206
|
+
/**
|
|
207
|
+
* Permette di stabilire, in caso di gestione allegati multipli, se la tabella contenente l'elenco
|
|
208
|
+
* degli allegati deve contenere il campo di ricerca oppure no
|
|
209
|
+
*/
|
|
210
|
+
readonly isTableSearcheable: _angular_core.InputSignal<boolean>;
|
|
211
|
+
/**
|
|
212
|
+
* In caso di gestione allegati multipli, permette di stabilire la dimensione pagina di default
|
|
213
|
+
* per la tabella contenente l'elenco degli allegati
|
|
214
|
+
*/
|
|
215
|
+
readonly tablePaginatorSize: _angular_core.InputSignal<number>;
|
|
216
|
+
/**
|
|
217
|
+
* Permette di scegliere il modo in cui i file devono essere caricati
|
|
218
|
+
*/
|
|
219
|
+
/**
|
|
220
|
+
* Permette di stabilire se i pulsanti per il caricamento dei file sono separati o in un menù a tendina
|
|
221
|
+
*/
|
|
222
|
+
readonly separatedUploadButtons: _angular_core.InputSignal<boolean>;
|
|
223
|
+
/**
|
|
224
|
+
* Permette di scegliere se dare la possibilità di vedere o no l'anteprima
|
|
225
|
+
*/
|
|
226
|
+
readonly showPreview: _angular_core.InputSignal<boolean>;
|
|
227
|
+
/**
|
|
228
|
+
* In caso di allegato singolo, permette di scegliere se aggiungere file tramite drag and drop
|
|
229
|
+
*/
|
|
230
|
+
readonly singleAttachmentDragAndDrop: _angular_core.InputSignal<boolean>;
|
|
231
|
+
/**
|
|
232
|
+
* Array di opzioni che si possono utilizzare per il crop
|
|
233
|
+
*/
|
|
234
|
+
readonly cropOptions: _angular_core.InputSignal<CropOptionEnum[]>;
|
|
235
|
+
/**
|
|
236
|
+
* Classe custom da assegnare al dialog del crop immagini
|
|
237
|
+
*/
|
|
238
|
+
readonly cropDialogClass: _angular_core.InputSignal<string>;
|
|
239
|
+
readonly maxFileSizeMB: _angular_core.InputSignal<number>;
|
|
240
|
+
readonly cardSize: _angular_core.InputSignal<AttachmentCardSize>;
|
|
241
|
+
readonly customCardWidthPx: _angular_core.InputSignal<number>;
|
|
242
|
+
readonly customCardHeightPx: _angular_core.InputSignal<number>;
|
|
243
|
+
readonly layout: _angular_core.InputSignal<"full" | "compact">;
|
|
244
|
+
/**
|
|
245
|
+
* Input per definire le label da usare nel componente
|
|
246
|
+
*/
|
|
247
|
+
readonly openLinkLabel: _angular_core.InputSignal<string>;
|
|
248
|
+
readonly addButtonLabel: _angular_core.InputSignal<string>;
|
|
249
|
+
readonly downloadLabel: _angular_core.InputSignal<string>;
|
|
250
|
+
readonly deleteLabel: _angular_core.InputSignal<string>;
|
|
251
|
+
readonly fileNameLabel: _angular_core.InputSignal<string>;
|
|
252
|
+
readonly previewLabel: _angular_core.InputSignal<string>;
|
|
253
|
+
readonly uploadFileLabel: _angular_core.InputSignal<string>;
|
|
254
|
+
readonly confirmLabel: _angular_core.InputSignal<string>;
|
|
255
|
+
readonly abortLabel: _angular_core.InputSignal<string>;
|
|
256
|
+
readonly saveLabel: _angular_core.InputSignal<string>;
|
|
257
|
+
readonly exitLabel: _angular_core.InputSignal<string>;
|
|
258
|
+
readonly uploadWithDropboxLabel: _angular_core.InputSignal<string>;
|
|
259
|
+
readonly cropLabel: _angular_core.InputSignal<string>;
|
|
260
|
+
readonly deleteDialogTitle: _angular_core.InputSignal<string>;
|
|
261
|
+
readonly deleteDialogMessage: _angular_core.InputSignal<string>;
|
|
262
|
+
readonly noImageSelectedErrorMessage: _angular_core.InputSignal<string>;
|
|
263
|
+
readonly wrongTypeSelectedErrorMessage: _angular_core.InputSignal<string>;
|
|
264
|
+
readonly videoPreviewErrorMessage: _angular_core.InputSignal<string>;
|
|
265
|
+
readonly audioPreviewErrorMessage: _angular_core.InputSignal<string>;
|
|
266
|
+
readonly flipHorinzontalLabel: _angular_core.InputSignal<string>;
|
|
267
|
+
readonly flipVerticalLabel: _angular_core.InputSignal<string>;
|
|
268
|
+
readonly rotateRightLabel: _angular_core.InputSignal<string>;
|
|
269
|
+
readonly rotateLeftLabel: _angular_core.InputSignal<string>;
|
|
270
|
+
readonly base64LimitMB: _angular_core.InputSignal<number>;
|
|
271
|
+
readonly uploadTitle: _angular_core.InputSignal<string>;
|
|
272
|
+
readonly uploadSubtitle: _angular_core.InputSignal<string>;
|
|
273
|
+
readonly dropHereLabel: _angular_core.InputSignal<string>;
|
|
274
|
+
readonly supportedFormatsLabel: _angular_core.InputSignal<string>;
|
|
275
|
+
readonly browseFilesLabel: _angular_core.InputSignal<string>;
|
|
276
|
+
readonly uploadSummaryLabel: _angular_core.InputSignal<string>;
|
|
277
|
+
readonly filesLabel: _angular_core.InputSignal<string>;
|
|
278
|
+
readonly totalSizeLabel: _angular_core.InputSignal<string>;
|
|
279
|
+
readonly emptyStateLabel: _angular_core.InputSignal<string>;
|
|
280
|
+
readonly addedSuccessfullyLabel: _angular_core.InputSignal<string>;
|
|
281
|
+
readonly removedLabel: _angular_core.InputSignal<string>;
|
|
282
|
+
readonly chooseView: _angular_core.InputSignal<boolean>;
|
|
283
|
+
readonly showSummary: _angular_core.InputSignal<boolean>;
|
|
284
|
+
viewMode: "card" | "table";
|
|
285
|
+
readonly showUploadTitle: _angular_core.InputSignal<boolean>;
|
|
286
|
+
readonly showDropArea: _angular_core.InputSignal<boolean>;
|
|
287
|
+
readonly hiddenColumns: _angular_core.InputSignal<string[]>;
|
|
288
|
+
readonly hiddenActions: _angular_core.InputSignal<string[]>;
|
|
289
|
+
readonly showActionButtons: _angular_core.InputSignal<boolean>;
|
|
290
|
+
/**
|
|
291
|
+
* Se TRUE allora mostra il dialog di crop per le immagini singole.
|
|
292
|
+
* Se FALSE carica l'immagine direttamente (applicando comunque la compressione se attiva).
|
|
293
|
+
*/
|
|
294
|
+
readonly enableImageCrop: _angular_core.InputSignal<boolean>;
|
|
295
|
+
/**
|
|
296
|
+
* Hook globale: decide se nascondere un’azione per quello specifico allegato.
|
|
297
|
+
*/
|
|
298
|
+
readonly actionHiddenFn: _angular_core.InputSignal<(actionKey: string, att?: IAttachmentDTO) => boolean>;
|
|
299
|
+
/**
|
|
300
|
+
* Hook globale: decide se disabilitare un’azione per quello specifico allegato.
|
|
301
|
+
*/
|
|
302
|
+
readonly actionDisabledFn: _angular_core.InputSignal<(actionKey: string, att?: IAttachmentDTO) => boolean>;
|
|
303
|
+
readonly videoCompression: _angular_core.InputSignal<{
|
|
304
|
+
enabled: boolean;
|
|
305
|
+
maxWidth?: number;
|
|
306
|
+
bitrate?: number;
|
|
307
|
+
crf?: number;
|
|
308
|
+
preset?: string;
|
|
309
|
+
maxFps?: number;
|
|
310
|
+
audioBitrate?: number;
|
|
311
|
+
}>;
|
|
312
|
+
readonly customMenuActions: _angular_core.InputSignal<AttachmentMenuAction[]>;
|
|
313
|
+
_sortedMenuActions: AttachmentMenuAction[];
|
|
314
|
+
/**
|
|
315
|
+
* SOLO quando [customColumns]="..." cambia.
|
|
316
|
+
*/
|
|
317
|
+
readonly customColumns: _angular_core.InputSignal<AttachmentFieldColumn[]>;
|
|
318
|
+
/**
|
|
319
|
+
* Restituisce la lista aggiornata degli allegati.
|
|
320
|
+
*/
|
|
321
|
+
readonly localEditedAttachments: _angular_core.OutputEmitterRef<IAttachmentDTO[]>;
|
|
322
|
+
/**
|
|
323
|
+
* Evento scatenato alla pressione del pulsante ESCI della modale di caricamento file.
|
|
324
|
+
*/
|
|
325
|
+
readonly abortAddAttachment: _angular_core.OutputEmitterRef<void>;
|
|
326
|
+
/**
|
|
327
|
+
* Evento di output che restituisce l'IAttachmentDTO selezionato per il download nel caso FileDataBase64, FileContentType o FileName non fossero specificati.
|
|
328
|
+
*/
|
|
329
|
+
readonly downloadAttachment: _angular_core.OutputEmitterRef<IAttachmentDTO>;
|
|
330
|
+
/**
|
|
331
|
+
* Evento di output che restituisce l'elemento eliminato prima che questo venga effettivamente rismosso dalla lista.
|
|
332
|
+
*/
|
|
333
|
+
readonly onDeleteAttachment: _angular_core.OutputEmitterRef<IAttachmentDTO>;
|
|
334
|
+
newAttachment: IAttachmentDTO;
|
|
335
|
+
newMultipleAttachments: Array<IAttachmentDTO>;
|
|
336
|
+
attachmentType: typeof AttachmentType;
|
|
337
|
+
newAttachmentForm: FormGroup;
|
|
338
|
+
selectedFile: File;
|
|
339
|
+
selectedFiles: Array<File>;
|
|
340
|
+
showCropImage: boolean;
|
|
341
|
+
readonly dialogAddAttachment: _angular_core.Signal<TemplateRef<any>>;
|
|
342
|
+
dialogRefAddAttachment: MatDialogRef<TemplateRef<any>>;
|
|
343
|
+
readonly dialogAddMultipleAttachment: _angular_core.Signal<TemplateRef<any>>;
|
|
344
|
+
dialogRefCropImage: MatDialogRef<TemplateRef<any>>;
|
|
345
|
+
readonly dialogCropImage: _angular_core.Signal<TemplateRef<any>>;
|
|
346
|
+
readonly addingLinkTemplate: _angular_core.Signal<TemplateRef<any>>;
|
|
347
|
+
imageChangedEvent: any;
|
|
348
|
+
croppedImage: any;
|
|
349
|
+
transform: ImageTransform;
|
|
350
|
+
canvasRotation: number;
|
|
351
|
+
readonly imageCropper: _angular_core.Signal<ImageCropperComponent>;
|
|
352
|
+
readonly imageInput: _angular_core.Signal<any>;
|
|
353
|
+
AttachmentType: typeof AttachmentType;
|
|
354
|
+
selectedAttachment: IAttachmentDTO;
|
|
355
|
+
originalWidth: number;
|
|
356
|
+
originalHeight: number;
|
|
357
|
+
customWidth: number;
|
|
358
|
+
customHeight: number;
|
|
359
|
+
readonly inlinePreviewTemplate: _angular_core.Signal<TemplateRef<any>>;
|
|
360
|
+
readonly dialogPreview: _angular_core.Signal<TemplateRef<any>>;
|
|
361
|
+
imageFile: File;
|
|
362
|
+
addingLinkMode: _angular_core.WritableSignal<boolean>;
|
|
363
|
+
_tableColumns: AttachmentFieldColumn[];
|
|
364
|
+
readonly defaultFileTemplate: _angular_core.Signal<TemplateRef<any>>;
|
|
365
|
+
readonly defaultActionsTemplate: _angular_core.Signal<TemplateRef<any>>;
|
|
366
|
+
dragOver: boolean;
|
|
367
|
+
toast: {
|
|
368
|
+
visible: boolean;
|
|
369
|
+
type: "success" | "error" | "info";
|
|
370
|
+
text: string;
|
|
371
|
+
timeoutId: any;
|
|
372
|
+
};
|
|
373
|
+
progressPercent: _angular_core.WritableSignal<number>;
|
|
374
|
+
totalSizeBytes: _angular_core.WritableSignal<number>;
|
|
375
|
+
readonly totalSizeFormatted: _angular_core.Signal<string>;
|
|
376
|
+
formatFileSize(bytes: number): string;
|
|
377
|
+
showToast(message: string, type?: "success" | "error" | "info", durationMs?: number): void;
|
|
378
|
+
constructor(dialog: MatDialog, formBuilder: FormBuilder, sanitizer: DomSanitizer, http: HttpClient, eqpAttachmentService: EqpAttachmentService);
|
|
379
|
+
ngOnInit(): void;
|
|
380
|
+
setViewMode(mode: "card" | "table"): void;
|
|
381
|
+
private recomputeTotalsAndProgress;
|
|
382
|
+
ngOnDestroy(): void;
|
|
383
|
+
bytesFromBase64(base64: string): number;
|
|
384
|
+
checkAttachmentImage(): void;
|
|
385
|
+
/**
|
|
386
|
+
* Elimina un allegato eliminando anche il file presente nello storage di archiviazione utilizzato (AWS o cartella progetto)
|
|
387
|
+
* @param element IAttachmentDTO da cancellare
|
|
388
|
+
*/
|
|
389
|
+
deleteAttachment(element: IAttachmentDTO): void;
|
|
390
|
+
/**
|
|
391
|
+
* Rimuove l'allegato selezionato dalla lista "attachmentsList" e invoca l'evento di output che restituisce la lista aggiornata.
|
|
392
|
+
* @param attachmentIndex Indice dell'attachment da rimuovere
|
|
393
|
+
*/
|
|
394
|
+
removeAttachmentFromList(attachmentIndex: number): void;
|
|
395
|
+
private simulateProgress;
|
|
396
|
+
/**
|
|
397
|
+
* Scarica l'allegato o apre il link
|
|
398
|
+
* @param element Allegato da mostrare
|
|
399
|
+
*/
|
|
400
|
+
viewAttachment(attachment: IAttachmentDTO): void;
|
|
401
|
+
/**
|
|
402
|
+
* Ridefinisce l'icona da mostrare nella colonna dell'eqp-table per ogni file.
|
|
403
|
+
* L'icona varia in base all'estensione del file
|
|
404
|
+
* @param attachment
|
|
405
|
+
*/
|
|
406
|
+
getAttachmentIcon(attachment: IAttachmentDTO): string;
|
|
407
|
+
/**
|
|
408
|
+
* In caso di allegato singolo, sceglie quale metodo richiamare in base al tipo di allegato
|
|
409
|
+
*/
|
|
410
|
+
addFile(attachmentType: AttachmentType, imageInput?: any): void;
|
|
411
|
+
createAttachmentForm(): void;
|
|
412
|
+
close(emitCloseEvent?: boolean): void;
|
|
413
|
+
/**
|
|
414
|
+
* In base al tipo di allegato controlla se disabilitare o meno il pulsante per salvare.
|
|
415
|
+
* Funzione usata nel [disable] del pulsante "Salva" del dialog per l'aggiunta di un allegato.
|
|
416
|
+
* @returns
|
|
417
|
+
*/
|
|
418
|
+
disableSave(): boolean;
|
|
419
|
+
confirmAddAttachment(): void;
|
|
420
|
+
private resetSelectedFiles;
|
|
421
|
+
/**
|
|
422
|
+
* Apre il dialog per l'anteprima dell'allegato selezionato.
|
|
423
|
+
* @param row
|
|
424
|
+
* @returns
|
|
425
|
+
*/
|
|
426
|
+
openPreviewDialog(row: IAttachmentDTO): Promise<void>;
|
|
427
|
+
getAttachmentByID(): Promise<IAttachmentDTO>;
|
|
428
|
+
/**
|
|
429
|
+
* Evento scatenato alla selezione del file (o dei file).
|
|
430
|
+
* 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
|
|
431
|
+
* mostrare le funzionalità del croppie (per ritagliare l'immagine) oppure no.
|
|
432
|
+
* Se il file caricato non è un immagine allora genera direttamente il base64 e lo associa all'allegato da salvare.
|
|
433
|
+
* Se invece il caricamento dei file è MULTIPLO e sono presenti più file allora esegue le stesse operazioni ignorando però il contrllo
|
|
434
|
+
* immagine per il croppie (in caso di caricamento multiplo le funzionalità del croppie sono disabilitate).
|
|
435
|
+
*/
|
|
436
|
+
onFileAdded(event: any, isFileDropped?: boolean): Promise<void>;
|
|
437
|
+
private validationFile;
|
|
438
|
+
/**
|
|
439
|
+
* A partire dal FILE ricevuto in input ricostruisce l'oggetto IAttachmentDTO e lo restituisce.
|
|
440
|
+
* Se il parametro getBase64 viene passato a TRUE allora, sempre a partire dal file,genera il base64 e
|
|
441
|
+
* ricava il ContentType da associare all'oggetto IAttachmentDTO da restituire
|
|
442
|
+
* @param currentFile Oggetto FILE da processare
|
|
443
|
+
* @param getBase64 Se TRUE allora calcola base64 e ContentType del file passato in input
|
|
444
|
+
* @returns Restituisce un oggetto di tipo IAttachmentDTO
|
|
445
|
+
*/
|
|
446
|
+
private createAttachmentFromUploadedFile;
|
|
447
|
+
/**
|
|
448
|
+
* A partire dal file passato in input restituisce un oggetto
|
|
449
|
+
* contenente il base64 del file e il suo contentType
|
|
450
|
+
* @param currentFile Oggetto File da cui estrapolare base64 e contentType
|
|
451
|
+
* @returns Restituisce un oggetto avente le proprietà Base64File e ContentType
|
|
452
|
+
*/
|
|
453
|
+
private getBase64FromFile;
|
|
454
|
+
/**
|
|
455
|
+
* Controlla se il file che si sta caricando è supportato dal sistema.
|
|
456
|
+
* @returns
|
|
457
|
+
*/
|
|
458
|
+
private checkAcceptedFiles;
|
|
459
|
+
/**
|
|
460
|
+
* Se eqp-attachments è stata configurata per il caricamento delle sole immagini allora verifica che il file passato in
|
|
461
|
+
* input sia effettivamente un immagine o no.
|
|
462
|
+
* Se il controllo va a buon fine restituisce TRUE altrimenti mostra un messaggio d'errore e restituisce FALSE
|
|
463
|
+
*/
|
|
464
|
+
private checkAllowOnlyImageFile;
|
|
465
|
+
getImageDimensions(img: any): void;
|
|
466
|
+
restoreOriginalDimensions(): void;
|
|
467
|
+
onDimensionsChange(dimension: string): void;
|
|
468
|
+
imageCropped(event: ImageCroppedEvent): void;
|
|
469
|
+
getCroppedAndUpload(file: any, newAttachment: IAttachmentDTO): void;
|
|
470
|
+
rotateLeft(): void;
|
|
471
|
+
rotateRight(): void;
|
|
472
|
+
private flipAfterRotate;
|
|
473
|
+
flipHorizontal(): void;
|
|
474
|
+
flipVertical(): void;
|
|
475
|
+
/**
|
|
476
|
+
* Annulla la selezione del file, svuotando l'input e resettando tutte le proprietà dell'IAttachmentDTO
|
|
477
|
+
*/
|
|
478
|
+
abortFile(): void;
|
|
479
|
+
fileDropped(event: DragEvent): void;
|
|
480
|
+
chooseDropboxFile(): void;
|
|
481
|
+
onSelectFile(event: any, fileInput: any): void;
|
|
482
|
+
/**
|
|
483
|
+
* Apre il dialogo per l'inserimento del link.
|
|
484
|
+
*/
|
|
485
|
+
switchToAddingLinkMode(): void;
|
|
486
|
+
getCardClass(att: IAttachmentDTO): {
|
|
487
|
+
[key: string]: boolean;
|
|
488
|
+
};
|
|
489
|
+
getPreviewsContainerStyle(): {
|
|
490
|
+
[key: string]: string;
|
|
491
|
+
};
|
|
492
|
+
handlePrimaryAction(attachment: IAttachmentDTO): void;
|
|
493
|
+
/**
|
|
494
|
+
* Determines if an attachment can be previewed in the dialog.
|
|
495
|
+
* @param att The attachment to check.
|
|
496
|
+
* @returns `true` if a preview is available, otherwise `false`.
|
|
497
|
+
*/
|
|
498
|
+
canBePreviewed(att: IAttachmentDTO): boolean;
|
|
499
|
+
private isColumnHidden;
|
|
500
|
+
isActionHidden(action: AttachmentMenuAction, att?: IAttachmentDTO): boolean;
|
|
501
|
+
isActionDisabled(action: AttachmentMenuAction, att?: IAttachmentDTO): boolean;
|
|
502
|
+
isDeleteHidden(att: IAttachmentDTO): boolean;
|
|
503
|
+
isDeleteDisabled(att: IAttachmentDTO): boolean;
|
|
504
|
+
isPrimaryActionHidden(att: IAttachmentDTO): boolean;
|
|
505
|
+
isPrimaryActionDisabled(att: IAttachmentDTO): boolean;
|
|
506
|
+
/**
|
|
507
|
+
* Unisce le colonne di default con quelle custom e le ordina.
|
|
508
|
+
*/
|
|
509
|
+
private setupTableColumns;
|
|
510
|
+
private setupMenuActions;
|
|
511
|
+
private generateVideoThumbnail;
|
|
512
|
+
private compressVideoApi;
|
|
513
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EqpAttachmentsComponent, never>;
|
|
514
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EqpAttachmentsComponent, "eqp-attachments", never, { "disableAction": { "alias": "disableAction"; "required": false; "isSignal": true; }; "showHeader": { "alias": "showHeader"; "required": false; "isSignal": true; }; "attachmentsList": { "alias": "attachmentsList"; "required": false; }; "singleAttachment": { "alias": "singleAttachment"; "required": false; "isSignal": true; }; "showMatCard": { "alias": "showMatCard"; "required": false; "isSignal": true; }; "multipleAttachment": { "alias": "multipleAttachment"; "required": false; "isSignal": true; }; "loadMultipleFiles": { "alias": "loadMultipleFiles"; "required": false; "isSignal": true; }; "emptyTableMessage": { "alias": "emptyTableMessage"; "required": false; "isSignal": true; }; "allowOnlyImages": { "alias": "allowOnlyImages"; "required": false; "isSignal": true; }; "acceptedFileTypes": { "alias": "acceptedFileTypes"; "required": false; }; "isDisabled": { "alias": "isDisabled"; "required": false; "isSignal": true; }; "showInlinePreview": { "alias": "showInlinePreview"; "required": false; "isSignal": true; }; "getAttachmentEndpoint": { "alias": "getAttachmentEndpoint"; "required": false; "isSignal": true; }; "productionBaseUrl": { "alias": "productionBaseUrl"; "required": false; "isSignal": true; }; "compressionOptions": { "alias": "compressionOptions"; "required": false; "isSignal": true; }; "allowedTypes": { "alias": "allowedTypes"; "required": false; }; "isEqpTableMultiLanguage": { "alias": "isEqpTableMultiLanguage"; "required": false; "isSignal": true; }; "tablePaginatorVisible": { "alias": "tablePaginatorVisible"; "required": false; "isSignal": true; }; "isTableSearcheable": { "alias": "isTableSearcheable"; "required": false; "isSignal": true; }; "tablePaginatorSize": { "alias": "tablePaginatorSize"; "required": false; "isSignal": true; }; "separatedUploadButtons": { "alias": "separatedUploadButtons"; "required": false; "isSignal": true; }; "showPreview": { "alias": "showPreview"; "required": false; "isSignal": true; }; "singleAttachmentDragAndDrop": { "alias": "singleAttachmentDragAndDrop"; "required": false; "isSignal": true; }; "cropOptions": { "alias": "cropOptions"; "required": false; "isSignal": true; }; "cropDialogClass": { "alias": "cropDialogClass"; "required": false; "isSignal": true; }; "maxFileSizeMB": { "alias": "maxFileSizeMB"; "required": false; "isSignal": true; }; "cardSize": { "alias": "cardSize"; "required": false; "isSignal": true; }; "customCardWidthPx": { "alias": "customCardWidthPx"; "required": false; "isSignal": true; }; "customCardHeightPx": { "alias": "customCardHeightPx"; "required": false; "isSignal": true; }; "layout": { "alias": "layout"; "required": false; "isSignal": true; }; "openLinkLabel": { "alias": "openLinkLabel"; "required": false; "isSignal": true; }; "addButtonLabel": { "alias": "addButtonLabel"; "required": false; "isSignal": true; }; "downloadLabel": { "alias": "downloadLabel"; "required": false; "isSignal": true; }; "deleteLabel": { "alias": "deleteLabel"; "required": false; "isSignal": true; }; "fileNameLabel": { "alias": "fileNameLabel"; "required": false; "isSignal": true; }; "previewLabel": { "alias": "previewLabel"; "required": false; "isSignal": true; }; "uploadFileLabel": { "alias": "uploadFileLabel"; "required": false; "isSignal": true; }; "confirmLabel": { "alias": "confirmLabel"; "required": false; "isSignal": true; }; "abortLabel": { "alias": "abortLabel"; "required": false; "isSignal": true; }; "saveLabel": { "alias": "saveLabel"; "required": false; "isSignal": true; }; "exitLabel": { "alias": "exitLabel"; "required": false; "isSignal": true; }; "uploadWithDropboxLabel": { "alias": "uploadWithDropboxLabel"; "required": false; "isSignal": true; }; "cropLabel": { "alias": "cropLabel"; "required": false; "isSignal": true; }; "deleteDialogTitle": { "alias": "deleteDialogTitle"; "required": false; "isSignal": true; }; "deleteDialogMessage": { "alias": "deleteDialogMessage"; "required": false; "isSignal": true; }; "noImageSelectedErrorMessage": { "alias": "noImageSelectedErrorMessage"; "required": false; "isSignal": true; }; "wrongTypeSelectedErrorMessage": { "alias": "wrongTypeSelectedErrorMessage"; "required": false; "isSignal": true; }; "videoPreviewErrorMessage": { "alias": "videoPreviewErrorMessage"; "required": false; "isSignal": true; }; "audioPreviewErrorMessage": { "alias": "videoPreviewErrorMessage"; "required": false; "isSignal": true; }; "flipHorinzontalLabel": { "alias": "flipHorinzontalLabel"; "required": false; "isSignal": true; }; "flipVerticalLabel": { "alias": "flipVerticalLabel"; "required": false; "isSignal": true; }; "rotateRightLabel": { "alias": "rotateRightLabel"; "required": false; "isSignal": true; }; "rotateLeftLabel": { "alias": "rotateLeftLabel"; "required": false; "isSignal": true; }; "base64LimitMB": { "alias": "base64LimitMB"; "required": false; "isSignal": true; }; "uploadTitle": { "alias": "uploadTitle"; "required": false; "isSignal": true; }; "uploadSubtitle": { "alias": "uploadSubtitle"; "required": false; "isSignal": true; }; "dropHereLabel": { "alias": "dropHereLabel"; "required": false; "isSignal": true; }; "supportedFormatsLabel": { "alias": "supportedFormatsLabel"; "required": false; "isSignal": true; }; "browseFilesLabel": { "alias": "browseFilesLabel"; "required": false; "isSignal": true; }; "uploadSummaryLabel": { "alias": "uploadSummaryLabel"; "required": false; "isSignal": true; }; "filesLabel": { "alias": "filesLabel"; "required": false; "isSignal": true; }; "totalSizeLabel": { "alias": "totalSizeLabel"; "required": false; "isSignal": true; }; "emptyStateLabel": { "alias": "emptyStateLabel"; "required": false; "isSignal": true; }; "addedSuccessfullyLabel": { "alias": "addedSuccessfullyLabel"; "required": false; "isSignal": true; }; "removedLabel": { "alias": "removedLabel"; "required": false; "isSignal": true; }; "chooseView": { "alias": "chooseView"; "required": false; "isSignal": true; }; "showSummary": { "alias": "showSummary"; "required": false; "isSignal": true; }; "viewMode": { "alias": "viewMode"; "required": false; }; "showUploadTitle": { "alias": "showUploadTitle"; "required": false; "isSignal": true; }; "showDropArea": { "alias": "showDropArea"; "required": false; "isSignal": true; }; "hiddenColumns": { "alias": "hiddenColumns"; "required": false; "isSignal": true; }; "hiddenActions": { "alias": "hiddenActions"; "required": false; "isSignal": true; }; "showActionButtons": { "alias": "showActionButtons"; "required": false; "isSignal": true; }; "enableImageCrop": { "alias": "enableImageCrop"; "required": false; "isSignal": true; }; "actionHiddenFn": { "alias": "actionHiddenFn"; "required": false; "isSignal": true; }; "actionDisabledFn": { "alias": "actionDisabledFn"; "required": false; "isSignal": true; }; "videoCompression": { "alias": "videoCompression"; "required": false; "isSignal": true; }; "customMenuActions": { "alias": "customMenuActions"; "required": false; "isSignal": true; }; "customColumns": { "alias": "customColumns"; "required": false; "isSignal": true; }; }, { "localEditedAttachments": "localEditedAttachments"; "abortAddAttachment": "abortAddAttachment"; "downloadAttachment": "downloadAttachment"; "onDeleteAttachment": "onDeleteAttachment"; }, never, never, false, never>;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
declare class MaterialModule {
|
|
518
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaterialModule, never>;
|
|
519
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<MaterialModule, never, [typeof i1.MatCheckboxModule, typeof i2.MatButtonModule, typeof i3.MatInputModule, typeof i4.MatAutocompleteModule, typeof i5.MatDatepickerModule, typeof i6.MatFormFieldModule, typeof i7.MatRadioModule, typeof i8.MatSelectModule, typeof i9.MatSliderModule, typeof i10.MatSlideToggleModule, typeof i11.MatMenuModule, typeof i12.MatSidenavModule, typeof i13.MatToolbarModule, typeof i14.MatListModule, typeof i15.MatGridListModule, typeof i16.MatCardModule, typeof i17.MatStepperModule, typeof i18.MatTabsModule, typeof i19.MatExpansionModule, typeof i20.MatButtonToggleModule, typeof i21.MatChipsModule, typeof i22.MatIconModule, typeof i23.MatProgressSpinnerModule, typeof i24.MatProgressBarModule, typeof i25.MatDialogModule, typeof i26.MatTooltipModule, typeof i27.MatSnackBarModule, typeof i28.MatTableModule, typeof i29.MatSortModule, typeof i30.MatPaginatorModule, typeof i5.MatDatepickerModule, typeof i31.MatNativeDateModule], [typeof i1.MatCheckboxModule, typeof i2.MatButtonModule, typeof i3.MatInputModule, typeof i4.MatAutocompleteModule, typeof i5.MatDatepickerModule, typeof i6.MatFormFieldModule, typeof i7.MatRadioModule, typeof i8.MatSelectModule, typeof i9.MatSliderModule, typeof i10.MatSlideToggleModule, typeof i11.MatMenuModule, typeof i12.MatSidenavModule, typeof i13.MatToolbarModule, typeof i14.MatListModule, typeof i15.MatGridListModule, typeof i16.MatCardModule, typeof i17.MatStepperModule, typeof i18.MatTabsModule, typeof i19.MatExpansionModule, typeof i20.MatButtonToggleModule, typeof i21.MatChipsModule, typeof i22.MatIconModule, typeof i23.MatProgressSpinnerModule, typeof i24.MatProgressBarModule, typeof i25.MatDialogModule, typeof i26.MatTooltipModule, typeof i27.MatSnackBarModule, typeof i28.MatTableModule, typeof i29.MatSortModule, typeof i30.MatPaginatorModule]>;
|
|
520
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<MaterialModule>;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
declare class EqpAttachmentsModule {
|
|
524
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EqpAttachmentsModule, never>;
|
|
525
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<EqpAttachmentsModule, [typeof EqpAttachmentsComponent], [typeof MaterialModule, typeof i3$1.FormsModule, typeof i4$1.CommonModule, typeof i3$1.ReactiveFormsModule, typeof i5$1.ImageCropperComponent], [typeof EqpAttachmentsComponent]>;
|
|
526
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<EqpAttachmentsModule>;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
declare class AttachmentHelperService {
|
|
530
|
+
static readonly imageMimeTypes: string[];
|
|
531
|
+
static readonly fileExtensionIcon: any;
|
|
532
|
+
static readonly dropboxCredentials: any;
|
|
533
|
+
constructor();
|
|
534
|
+
/**
|
|
535
|
+
* Restituisce TRUE se il mime type passato nel parametro corrisponde ad un mime type di un'immagine
|
|
536
|
+
* @param mimeType Mime Type da verificare
|
|
537
|
+
*/
|
|
538
|
+
static checkImageFromMimeType(mimeType: string): boolean;
|
|
539
|
+
/**
|
|
540
|
+
* In base all'estensione passata come parametro, restituisce la FontAwesome corretta da utilizzare.
|
|
541
|
+
* Se l'estensione non viene trovata nella costante riportata dentro common.model.ts restituisce un icona standard
|
|
542
|
+
* @param extension Estensione del file per cui restituire l'icona corretta
|
|
543
|
+
*/
|
|
544
|
+
static getIconFromFileExtensione(extension: string): string;
|
|
545
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AttachmentHelperService, never>;
|
|
546
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AttachmentHelperService>;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
declare class EqpAttachmentDialogService {
|
|
550
|
+
constructor();
|
|
551
|
+
/**
|
|
552
|
+
* Mostra uno sweet alert di tipo ERROR con il messaggio passato come parametro.
|
|
553
|
+
* @param message Messaggio d'errore da mostrare nello sweetalert
|
|
554
|
+
* @param title Titolo dello sweetalert (di default mostra 'Errore')
|
|
555
|
+
*/
|
|
556
|
+
static Error(message: string | string[], title?: string): void;
|
|
557
|
+
/**
|
|
558
|
+
* Mostra uno sweetalert di tipo CONFIRM con il messaggio passato come parametro e se viene premuto
|
|
559
|
+
* CONFERMA lancia la funzione di callback passata come parametro
|
|
560
|
+
* @param message Messaggio da mostrare nello sweetalert
|
|
561
|
+
* @param title Titolo dello sweetalert (di default mostra 'Info')
|
|
562
|
+
*/
|
|
563
|
+
static Confirm(message: string | string[], confirmCallback: any, isWarning?: boolean, title?: string, customWidth?: string): void;
|
|
564
|
+
/**
|
|
565
|
+
* Mostra uno sweetalert di tipo INFO con il messaggio passato come parametro
|
|
566
|
+
* @param message Messaggio da mostrare nello sweetalert
|
|
567
|
+
* @param title Titolo dello sweetalert (di default mostra 'Info')
|
|
568
|
+
*/
|
|
569
|
+
static Info(message: string, title?: string, isToast?: boolean): void;
|
|
570
|
+
/**
|
|
571
|
+
* Mostra uno sweetalert di tipo WARNING con il messaggio passato come parametro
|
|
572
|
+
* @param message Messaggio da mostrare nello sweetalert
|
|
573
|
+
* @param title Titolo dello sweetalert (di default mostra 'Attenzione!')
|
|
574
|
+
*/
|
|
575
|
+
static Warning(message: string | string[], title?: string, isToast?: boolean): void;
|
|
576
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EqpAttachmentDialogService, never>;
|
|
577
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<EqpAttachmentDialogService>;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
export { AttachmentHelperService, AttachmentType, CropOptionEnum, EqpAttachmentDialogService, EqpAttachmentsComponent, EqpAttachmentsModule, TypeAttachmentColumn };
|
|
581
|
+
export type { AttachmentCardSize, AttachmentFieldColumn, AttachmentMenuAction, IAttachmentDTO, IOptions, Layout };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './public-api';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXFwcm9qZWN0LWVxcC1hdHRhY2htZW50cy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2VxcC1hdHRhY2htZW50cy9zcmMvZXFwcm9qZWN0LWVxcC1hdHRhY2htZW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuIl19
|