@energycap/components 0.39.4-ECAP-23220-bc-file-upload-dialog.20231220-1530 → 0.39.4-ECAP-23220-bc-file-upload-dialog.20231221-0959
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/esm2020/lib/controls/file-upload/file-upload.component.mjs +27 -45
- package/fesm2015/energycap-components.mjs +28 -47
- package/fesm2015/energycap-components.mjs.map +1 -1
- package/fesm2020/energycap-components.mjs +26 -44
- package/fesm2020/energycap-components.mjs.map +1 -1
- package/lib/controls/file-upload/file-upload.component.d.ts +11 -3
- package/package.json +1 -1
@@ -34,7 +34,13 @@ export declare class FileUploadComponent extends FormControlBase implements OnIn
|
|
34
34
|
* setting the formModel with the file information. If the promise resolves it will continue
|
35
35
|
* and set the file name and contents to the formModel, otherwise on failure it'll do nothing.
|
36
36
|
*/
|
37
|
-
onFileSelected?: (
|
37
|
+
onFileSelected?: (file: File) => Promise<any>;
|
38
|
+
/**
|
39
|
+
* Optional callback supported for when the hosting page needs to process multiple files
|
40
|
+
* We simply map the FileList to an array of File objects and pass that array to the
|
41
|
+
* callback and let the hosting page handle the processing
|
42
|
+
*/
|
43
|
+
onMultipleFilesSelected?: (files: File[]) => Promise<any>;
|
38
44
|
/**
|
39
45
|
* Optional display type that controls whether the file input textbox is displayed or
|
40
46
|
* simply a button the user clicks to launch the OS file storage dialog.
|
@@ -82,9 +88,11 @@ export declare class FileUploadComponent extends FormControlBase implements OnIn
|
|
82
88
|
* @param onFileSelectedResult
|
83
89
|
*/
|
84
90
|
private patchFileResult;
|
85
|
-
|
91
|
+
/** Maps the files to an array of File objects and sends them along
|
92
|
+
* to the derived onMultipleFileSelected method in the hosting component
|
93
|
+
*/
|
86
94
|
private handleMultipleFiles;
|
87
95
|
private readFile;
|
88
96
|
static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, never>;
|
89
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "ec-file-upload", never, { "placeholder": "placeholder"; "fileType": "fileType"; "fileOutput": "fileOutput"; "customExtensions": "customExtensions"; "onFileSelected": "onFileSelected"; "displayType": "displayType"; "buttonLabel": "buttonLabel"; "multiSelect": "multiSelect"; }, {}, never, never, false, never>;
|
97
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "ec-file-upload", never, { "placeholder": "placeholder"; "fileType": "fileType"; "fileOutput": "fileOutput"; "customExtensions": "customExtensions"; "onFileSelected": "onFileSelected"; "onMultipleFilesSelected": "onMultipleFilesSelected"; "displayType": "displayType"; "buttonLabel": "buttonLabel"; "multiSelect": "multiSelect"; }, {}, never, never, false, never>;
|
90
98
|
}
|