@energycap/components 0.39.23 → 0.39.24-ECAP-26526-file-upload-validation-fix.20240910-1046

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.
@@ -80,6 +80,13 @@ export declare class FileUploadComponent extends FormControlBase implements OnIn
80
80
  * Optional property to control whether the user can select multiple files
81
81
  */
82
82
  multiSelect?: boolean;
83
+ /**
84
+ * When true, the onFileSelected callback will not be called if the form is invalid.
85
+ * This is useful when the file needs to be validated before it can be uploaded.
86
+ * For server-side validation, leave this as false and use the onFileSelected callback
87
+ * to upload the file and handle any errors thrown by the API.
88
+ */
89
+ validateBeforeUpload: boolean;
83
90
  fileInput?: ElementRef;
84
91
  /** Property bound to the file input to filter what file types are shown in the dialog */
85
92
  fileTypeAccept: string | undefined;
@@ -113,5 +120,5 @@ export declare class FileUploadComponent extends FormControlBase implements OnIn
113
120
  private handleMultipleFiles;
114
121
  private readFile;
115
122
  static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, never>;
116
- static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "ec-file-upload", never, { "formModel": "formModel"; "placeholder": "placeholder"; "fileType": "fileType"; "fileOutput": "fileOutput"; "customExtensions": "customExtensions"; "onFileSelected": "onFileSelected"; "onMultipleFilesSelected": "onMultipleFilesSelected"; "displayType": "displayType"; "buttonLabel": "buttonLabel"; "buttonType": "buttonType"; "multiSelect": "multiSelect"; }, {}, never, never, false, never>;
123
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "ec-file-upload", never, { "formModel": "formModel"; "placeholder": "placeholder"; "fileType": "fileType"; "fileOutput": "fileOutput"; "customExtensions": "customExtensions"; "onFileSelected": "onFileSelected"; "onMultipleFilesSelected": "onMultipleFilesSelected"; "displayType": "displayType"; "buttonLabel": "buttonLabel"; "buttonType": "buttonType"; "multiSelect": "multiSelect"; "validateBeforeUpload": "validateBeforeUpload"; }, {}, never, never, false, never>;
117
124
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@energycap/components",
3
- "version": "0.39.23",
3
+ "version": "0.39.24-ECAP-26526-file-upload-validation-fix.20240910-1046",
4
4
  "dependencies": {
5
5
  "tslib": "^2.0.0"
6
6
  },