fx-form-builder-wrapper 2.0.56 → 2.0.59
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.
|
@@ -4,12 +4,14 @@ import { FxBaseComponent, FxSetting, FxValidation } from '@instantsys-labs/fx';
|
|
|
4
4
|
import { FxBuilderWrapperService } from '../../fx-builder-wrapper.service';
|
|
5
5
|
import { UploadEvent } from 'primeng/fileupload';
|
|
6
6
|
import { ConfirmationService, MessageService } from 'primeng/api';
|
|
7
|
+
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class UploaderComponent extends FxBaseComponent implements OnInit {
|
|
9
10
|
private cdr;
|
|
10
11
|
private fxBuilderWrapperService;
|
|
11
12
|
private messageService;
|
|
12
13
|
private confirmationService;
|
|
14
|
+
private sanitizer;
|
|
13
15
|
uploadFileControl: FormControl<any>;
|
|
14
16
|
uploadedFiles: Array<any>;
|
|
15
17
|
formattedData: any;
|
|
@@ -18,11 +20,15 @@ export declare class UploaderComponent extends FxBaseComponent implements OnInit
|
|
|
18
20
|
value: number;
|
|
19
21
|
}[];
|
|
20
22
|
visible: boolean;
|
|
23
|
+
fileVisible: boolean;
|
|
21
24
|
selecteImageUrl: string;
|
|
25
|
+
fileUrl: SafeResourceUrl | null;
|
|
26
|
+
fileType: string | null;
|
|
27
|
+
fileName: string | null;
|
|
22
28
|
private destroy$;
|
|
23
29
|
private http;
|
|
24
30
|
fileInput: ElementRef<HTMLInputElement>;
|
|
25
|
-
constructor(cdr: ChangeDetectorRef, fxBuilderWrapperService: FxBuilderWrapperService, messageService: MessageService, confirmationService: ConfirmationService);
|
|
31
|
+
constructor(cdr: ChangeDetectorRef, fxBuilderWrapperService: FxBuilderWrapperService, messageService: MessageService, confirmationService: ConfirmationService, sanitizer: DomSanitizer);
|
|
26
32
|
uploadedImages: {
|
|
27
33
|
[key: string]: {
|
|
28
34
|
result: string;
|
|
@@ -36,11 +42,14 @@ export declare class UploaderComponent extends FxBaseComponent implements OnInit
|
|
|
36
42
|
deleteFile(index: number): void;
|
|
37
43
|
protected settings(): FxSetting[];
|
|
38
44
|
protected validations(): FxValidation[];
|
|
39
|
-
detectFileType(file: File): 'image' | 'csv' | 'text' | 'pdf' | 'excel' | 'word' | 'other';
|
|
45
|
+
detectFileType(file: File): 'image' | 'csv' | 'text' | 'pdf' | 'excel' | 'word' | 'stl' | 'other';
|
|
40
46
|
openFileDialog(): void;
|
|
41
47
|
onBasicUploadAuto(event: UploadEvent): void;
|
|
42
48
|
closeDialog(): void;
|
|
43
49
|
onImageSelect(url: string): void;
|
|
50
|
+
onFileClick(file: any, name: any): void;
|
|
51
|
+
private loadFile;
|
|
52
|
+
closeFileDialog(): void;
|
|
44
53
|
static ɵfac: i0.ɵɵFactoryDeclaration<UploaderComponent, never>;
|
|
45
54
|
static ɵcmp: i0.ɵɵComponentDeclaration<UploaderComponent, "fx-uploader", never, {}, {}, never, never, true, never>;
|
|
46
55
|
}
|