@energycap/components 0.39.21-ECAP-25650-file-upload-validation-support.20240805-1645 → 0.39.21-ECAP-25650-file-upload-validation-support.20240805-1706
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.
@@ -19,11 +19,12 @@ export type FileUploadFormGroup = {
|
|
19
19
|
export type InvalidFileError = {
|
20
20
|
invalidFile: true;
|
21
21
|
};
|
22
|
+
export type FileValidatorCallback = (file: File | null | undefined, base64: string | null | undefined) => Promise<InvalidFileError | null>;
|
22
23
|
export declare class FileUploadComponent extends FormControlBase implements OnInit, OnChanges {
|
23
24
|
protected validationMessageService: ValidationMessageService;
|
24
25
|
protected formGroupHelper: FormGroupHelper;
|
25
26
|
static getFormModel(validators: ValidatorFn[], disabled?: boolean, fileValidators?: AsyncValidatorFn | AsyncValidatorFn[]): FormGroup<FileUploadFormGroup>;
|
26
|
-
static getFileValidator(callback:
|
27
|
+
static getFileValidator(callback: FileValidatorCallback): AsyncValidatorFn;
|
27
28
|
formModel: FormGroup<FileUploadFormGroup>;
|
28
29
|
/**
|
29
30
|
* The value of the textbox input's placeholder
|
package/package.json
CHANGED