@energycap/components 0.39.20 → 0.39.21-ECAP-25650-file-upload-validation-support.20240802-1011
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 +19 -14
- package/esm2020/lib/core/validation-message.service.mjs +4 -1
- package/esm2020/lib/shared/page/page-base/page-base.component.mjs +7 -3
- package/fesm2015/energycap-components.mjs +24 -12
- package/fesm2015/energycap-components.mjs.map +1 -1
- package/fesm2020/energycap-components.mjs +24 -12
- package/fesm2020/energycap-components.mjs.map +1 -1
- package/lib/controls/file-upload/file-upload.component.d.ts +10 -3
- package/lib/shared/page/page-base/page-base.component.d.ts +2 -2
- package/package.json +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ElementRef, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
2
|
-
import {
|
2
|
+
import { FormControl, FormGroup, ValidatorFn } from '@angular/forms';
|
3
3
|
import { ValidationMessageService } from '../../core/validation-message.service';
|
4
4
|
import { FormGroupHelper } from '../../shared/form-group.helper';
|
5
5
|
import { FormControlBase } from '../form-control-base';
|
@@ -10,10 +10,17 @@ export declare const FileTypeExtensions: {
|
|
10
10
|
zip: string[];
|
11
11
|
excel: string[];
|
12
12
|
};
|
13
|
+
export type FileUploadFormGroup = {
|
14
|
+
file: FormControl<File | null>;
|
15
|
+
name: FormControl<string | null>;
|
16
|
+
base64FileString: FormControl<string | null>;
|
17
|
+
uploadResult: FormControl<any>;
|
18
|
+
};
|
13
19
|
export declare class FileUploadComponent extends FormControlBase implements OnInit, OnChanges {
|
14
20
|
protected validationMessageService: ValidationMessageService;
|
15
21
|
protected formGroupHelper: FormGroupHelper;
|
16
|
-
static getFormModel(validators: ValidatorFn[], disabled?: boolean):
|
22
|
+
static getFormModel(validators: ValidatorFn[], disabled?: boolean): FormGroup<FileUploadFormGroup>;
|
23
|
+
formModel: FormGroup<FileUploadFormGroup>;
|
17
24
|
/**
|
18
25
|
* The value of the textbox input's placeholder
|
19
26
|
*/
|
@@ -98,5 +105,5 @@ export declare class FileUploadComponent extends FormControlBase implements OnIn
|
|
98
105
|
private handleMultipleFiles;
|
99
106
|
private readFile;
|
100
107
|
static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, never>;
|
101
|
-
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"; "buttonType": "buttonType"; "multiSelect": "multiSelect"; }, {}, never, never, false, never>;
|
108
|
+
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>;
|
102
109
|
}
|
@@ -5,13 +5,13 @@ import { TranslateService } from '@ngx-translate/core';
|
|
5
5
|
import { Observable, Subject } from 'rxjs';
|
6
6
|
import { NavItem } from '../../../controls/navigation/nav-item';
|
7
7
|
import { ErrorService } from '../../../core/error.service';
|
8
|
+
import { RouterHelper } from '../../../core/router-helper.service';
|
8
9
|
import { ScrollService } from '../../../core/scroll.service';
|
9
10
|
import { DialogService } from '../../../display/dialog/dialog.service';
|
10
|
-
import { SplashService } from '../../../display/splash/splash.service';
|
11
11
|
import { Help } from '../../../display/help/help-types';
|
12
|
+
import { SplashService } from '../../../display/splash/splash.service';
|
12
13
|
import { Overlay } from '../../../display/view-overlay/view-overlay.component';
|
13
14
|
import { PageStatus } from '../page-statuses';
|
14
|
-
import { RouterHelper } from '../../../core/router-helper.service';
|
15
15
|
import * as i0 from "@angular/core";
|
16
16
|
export declare class PageInitResult {
|
17
17
|
title?: string;
|