@ieeesa-npm/presentation 0.26.7 → 0.26.9
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/esm2022/lib/assets/constants.json +28 -1
- package/esm2022/lib/components/checkbox/checkbox.component.mjs +3 -3
- package/esm2022/lib/components/color-picker/color-picker.component.mjs +2 -2
- package/esm2022/lib/components/dynamic-form/dynamic-form.component.mjs +36 -8
- package/esm2022/lib/components/file-download/file-download.component.mjs +132 -0
- package/esm2022/lib/components/file-upload/file-upload.component.mjs +148 -10
- package/esm2022/lib/components/form-error/form-error.component.mjs +3 -3
- package/esm2022/lib/components/list/list.component.mjs +24 -3
- package/esm2022/lib/components/notification/notification.component.mjs +3 -3
- package/esm2022/lib/components/radio/radio.component.mjs +3 -3
- package/esm2022/lib/components/tabs/tabs.component.mjs +30 -10
- package/esm2022/lib/components/text-area/text-area.component.mjs +3 -3
- package/esm2022/lib/directives/dynamic-form-field/dynamic-form-field.directive.mjs +26 -2
- package/esm2022/lib/models/delete-file.model.mjs +2 -0
- package/esm2022/lib/models/download-file.model.mjs +2 -0
- package/esm2022/lib/models/dynamic-properties.model.mjs +13 -0
- package/esm2022/lib/models/field-config.model.mjs +1 -1
- package/esm2022/lib/models/file-attachment.model.mjs +2 -0
- package/esm2022/lib/models/file-download-config.model.mjs +2 -0
- package/esm2022/lib/models/file-upload-payload-model.mjs +2 -0
- package/esm2022/lib/models/file-upload-presigned-url-res.model.mjs +1 -1
- package/esm2022/lib/models/file-upload-response.model.mjs +2 -0
- package/esm2022/lib/models/file-upload-status.model.mjs +2 -0
- package/esm2022/lib/models/list-item.model.mjs +1 -1
- package/esm2022/lib/models/tab.model.mjs +1 -1
- package/esm2022/lib/models/view-files-format.model.mjs +7 -0
- package/esm2022/lib/services/file-upload.service.mjs +105 -30
- package/esm2022/public-api.mjs +11 -1
- package/fesm2022/ieeesa-npm-presentation.mjs +565 -96
- package/fesm2022/ieeesa-npm-presentation.mjs.map +1 -1
- package/lib/components/chips/chips.component.d.ts +25 -0
- package/lib/components/dynamic-form/dynamic-form.component.d.ts +19 -4
- package/lib/components/file-download/file-download.component.d.ts +362 -0
- package/lib/components/file-upload/file-upload.component.d.ts +91 -5
- package/lib/components/list/list.component.d.ts +12 -1
- package/lib/components/tabs/tabs.component.d.ts +10 -1
- package/lib/directives/dynamic-form-field/dynamic-form-field.directive.d.ts +9 -1
- package/lib/models/delete-file.model.d.ts +10 -0
- package/lib/models/download-file.model.d.ts +4 -0
- package/lib/models/dynamic-properties.model.d.ts +10 -0
- package/lib/models/field-config.model.d.ts +9 -0
- package/lib/models/file-attachment.model.d.ts +9 -0
- package/lib/models/file-download-config.model.d.ts +8 -0
- package/lib/models/file-upload-payload-model.d.ts +3 -0
- package/lib/models/file-upload-presigned-url-res.model.d.ts +18 -0
- package/lib/models/file-upload-response.model.d.ts +11 -0
- package/lib/models/file-upload-status.model.d.ts +8 -0
- package/lib/models/list-item.model.d.ts +2 -0
- package/lib/models/tab.model.d.ts +1 -0
- package/lib/models/view-files-format.model.d.ts +4 -0
- package/lib/services/file-upload.service.d.ts +71 -13
- package/package.json +1 -1
- package/public-api.d.ts +10 -0
- package/src/lib/assets/constants.json +28 -1
|
@@ -238,6 +238,13 @@ export declare class ChipsComponent implements OnInit, OnDestroy {
|
|
|
238
238
|
allowedFileFormat: string;
|
|
239
239
|
browseFiles: string;
|
|
240
240
|
uploadProgress: string;
|
|
241
|
+
upload: string;
|
|
242
|
+
mb: string;
|
|
243
|
+
uploadFor: string;
|
|
244
|
+
uploadErrorMsg: string;
|
|
245
|
+
of: string;
|
|
246
|
+
filesUploaded: string;
|
|
247
|
+
fileAlreadyExists: string;
|
|
241
248
|
};
|
|
242
249
|
ariaLabel: {
|
|
243
250
|
fileUpload: string;
|
|
@@ -274,6 +281,9 @@ export declare class ChipsComponent implements OnInit, OnDestroy {
|
|
|
274
281
|
"2064": string;
|
|
275
282
|
};
|
|
276
283
|
};
|
|
284
|
+
limit: {
|
|
285
|
+
maxFileUpload: number;
|
|
286
|
+
};
|
|
277
287
|
};
|
|
278
288
|
list: {
|
|
279
289
|
defaultIndentation: number;
|
|
@@ -290,6 +300,21 @@ export declare class ChipsComponent implements OnInit, OnDestroy {
|
|
|
290
300
|
colorPicker: string;
|
|
291
301
|
};
|
|
292
302
|
};
|
|
303
|
+
fileDownload: {
|
|
304
|
+
buttons: {
|
|
305
|
+
id: number;
|
|
306
|
+
ariaLabel: string;
|
|
307
|
+
iconURL: string;
|
|
308
|
+
toolTip: string;
|
|
309
|
+
disabled: boolean;
|
|
310
|
+
}[];
|
|
311
|
+
preSignedDuration: string;
|
|
312
|
+
message: {
|
|
313
|
+
errors: {
|
|
314
|
+
errorReadingFile: string;
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
};
|
|
293
318
|
};
|
|
294
319
|
chipsType: typeof ChipsType;
|
|
295
320
|
orientations: typeof ChipOrientation;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AfterContentInit, EventEmitter, OnInit, QueryList } from '@angular/core';
|
|
1
|
+
import { AfterContentInit, AfterViewInit, ElementRef, EventEmitter, OnInit, QueryList } from '@angular/core';
|
|
2
2
|
import { FormArray, FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
|
3
3
|
import { FormModel } from '../../models/form.model';
|
|
4
4
|
import { FieldConfig } from '../../models/field-config.model';
|
|
@@ -14,6 +14,8 @@ import { SelectOpenedState } from '../../models/select-opened-state.model';
|
|
|
14
14
|
import { RadioOption } from '../../models/radio-option.model';
|
|
15
15
|
import { IconButton } from '../../models/icon-button.model';
|
|
16
16
|
import { AutoCompleteOption } from '../../models/autocomplete-option.model';
|
|
17
|
+
import { FileUploadStatus } from '../../models/file-upload-status.model';
|
|
18
|
+
import { FileDownloadConfig } from '../../models/file-download-config.model';
|
|
17
19
|
import * as i0 from "@angular/core";
|
|
18
20
|
/**
|
|
19
21
|
* Creates a reactive form dynamically based on the passed form field configuration and handles the form events.
|
|
@@ -22,8 +24,9 @@ import * as i0 from "@angular/core";
|
|
|
22
24
|
* @implements {OnInit}
|
|
23
25
|
* @implements {AfterContentInit}
|
|
24
26
|
*/
|
|
25
|
-
export declare class DynamicFormComponent implements OnInit, AfterContentInit {
|
|
27
|
+
export declare class DynamicFormComponent implements OnInit, AfterContentInit, AfterViewInit {
|
|
26
28
|
private fb;
|
|
29
|
+
private elementRef;
|
|
27
30
|
formFields: QueryList<DynamicFormFieldDirective>;
|
|
28
31
|
private _formGroups;
|
|
29
32
|
/**
|
|
@@ -46,6 +49,9 @@ export declare class DynamicFormComponent implements OnInit, AfterContentInit {
|
|
|
46
49
|
*/
|
|
47
50
|
set searchResponse(value: any);
|
|
48
51
|
get searchResponse(): any;
|
|
52
|
+
private _fileUploadStatus;
|
|
53
|
+
get fileUploadStatus(): FileUploadStatus;
|
|
54
|
+
set fileUploadStatus(value: FileUploadStatus);
|
|
49
55
|
colWidth: FormGrid;
|
|
50
56
|
isLegendVisible: boolean;
|
|
51
57
|
rightButtonLabel: string;
|
|
@@ -53,7 +59,11 @@ export declare class DynamicFormComponent implements OnInit, AfterContentInit {
|
|
|
53
59
|
isSubmitButtonDisabled: boolean;
|
|
54
60
|
isLeftButtonDisabled: boolean;
|
|
55
61
|
isLeftButtonNeeded: boolean;
|
|
62
|
+
isRightButtonNeeded: boolean;
|
|
56
63
|
actionButtonAlign: AlignType;
|
|
64
|
+
_fileDownloadConfig: FileDownloadConfig;
|
|
65
|
+
set fileDownloadConfig(value: FileDownloadConfig);
|
|
66
|
+
get fileDownloadConfig(): FileDownloadConfig;
|
|
57
67
|
alignmentType: typeof AlignType;
|
|
58
68
|
formSubmit: EventEmitter<any>;
|
|
59
69
|
formChange: EventEmitter<any>;
|
|
@@ -94,7 +104,7 @@ export declare class DynamicFormComponent implements OnInit, AfterContentInit {
|
|
|
94
104
|
formGroupArray: FormGroup[];
|
|
95
105
|
formControlArray: any[];
|
|
96
106
|
legendsArray: string[];
|
|
97
|
-
constructor(fb: FormBuilder);
|
|
107
|
+
constructor(fb: FormBuilder, elementRef: ElementRef);
|
|
98
108
|
/**
|
|
99
109
|
* Implementation of ngOnInit lifecycle hook method to create form group
|
|
100
110
|
* @memberof DynamicFormComponent
|
|
@@ -105,6 +115,11 @@ export declare class DynamicFormComponent implements OnInit, AfterContentInit {
|
|
|
105
115
|
* @memberof DynamicFormComponent
|
|
106
116
|
*/
|
|
107
117
|
ngAfterContentInit(): void;
|
|
118
|
+
/**
|
|
119
|
+
* Sets the focus to the first field.
|
|
120
|
+
* @memberof DynamicFormComponent
|
|
121
|
+
*/
|
|
122
|
+
ngAfterViewInit(): void;
|
|
108
123
|
/**
|
|
109
124
|
* Creates form group on the basis of formGroups configuration input
|
|
110
125
|
* @return {void}
|
|
@@ -315,5 +330,5 @@ export declare class DynamicFormComponent implements OnInit, AfterContentInit {
|
|
|
315
330
|
*/
|
|
316
331
|
onCheckboxCTAButtonClick(event: IconButton): void;
|
|
317
332
|
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormComponent, never>;
|
|
318
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFormComponent, "ieeesa-dynamic-form", ["dynamicForm"], { "formGroups": { "alias": "formGroups"; "required": false; }; "submitResponse": { "alias": "submitResponse"; "required": false; }; "searchResponse": { "alias": "searchResponse"; "required": false; }; "colWidth": { "alias": "colWidth"; "required": false; }; "isLegendVisible": { "alias": "isLegendVisible"; "required": false; }; "rightButtonLabel": { "alias": "rightButtonLabel"; "required": false; }; "leftButtonLabel": { "alias": "leftButtonLabel"; "required": false; }; "isSubmitButtonDisabled": { "alias": "isSubmitButtonDisabled"; "required": false; }; "isLeftButtonDisabled": { "alias": "isLeftButtonDisabled"; "required": false; }; "isLeftButtonNeeded": { "alias": "isLeftButtonNeeded"; "required": false; }; "actionButtonAlign": { "alias": "actionButtonAlign"; "required": false; }; }, { "formSubmit": "formSubmit"; "formChange": "formChange"; "formInput": "formInput"; "formLeftButtonClicked": "formLeftButtonClicked"; "formSearchApply": "formSearchApply"; "formGroupsReference": "formGroupsReference"; "dropdownChange": "dropdownChange"; "formCheckboxSelection": "formCheckboxSelection"; "formDateSelected": "formDateSelected"; "formSelectSearch": "formSelectSearch"; "formControlChange": "formControlChange"; "formAutoCompleteSearch": "formAutoCompleteSearch"; "formAutoCompleteClearSearchValue": "formAutoCompleteClearSearchValue"; "autoCompleteOptionSelected": "autoCompleteOptionSelected"; "formAfterContentInit": "formAfterContentInit"; "formSelectedDateRange": "formSelectedDateRange"; "addFormGroup": "addFormGroup"; "formTimeSelected": "formTimeSelected"; "supportTextLinkClick": "supportTextLinkClick"; "formSlideToggleChange": "formSlideToggleChange"; "formFileUpload": "formFileUpload"; "dropdownOpenedChange": "dropdownOpenedChange"; "formColorPickerChange": "formColorPickerChange"; "formRadioOptionSelected": "formRadioOptionSelected"; "ctaButtonClick": "ctaButtonClick"; "formMultiSelectAutoCompleteSearch": "formMultiSelectAutoCompleteSearch"; "formMultiSelectAutoCompleteClearSearchValue": "formMultiSelectAutoCompleteClearSearchValue"; "multiSelectAutoCompleteOptionsSelected": "multiSelectAutoCompleteOptionsSelected"; "formRichTextEditorContentChange": "formRichTextEditorContentChange"; }, never, ["[component]"], true, never>;
|
|
333
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFormComponent, "ieeesa-dynamic-form", ["dynamicForm"], { "formGroups": { "alias": "formGroups"; "required": false; }; "submitResponse": { "alias": "submitResponse"; "required": false; }; "searchResponse": { "alias": "searchResponse"; "required": false; }; "fileUploadStatus": { "alias": "fileUploadStatus"; "required": false; }; "colWidth": { "alias": "colWidth"; "required": false; }; "isLegendVisible": { "alias": "isLegendVisible"; "required": false; }; "rightButtonLabel": { "alias": "rightButtonLabel"; "required": false; }; "leftButtonLabel": { "alias": "leftButtonLabel"; "required": false; }; "isSubmitButtonDisabled": { "alias": "isSubmitButtonDisabled"; "required": false; }; "isLeftButtonDisabled": { "alias": "isLeftButtonDisabled"; "required": false; }; "isLeftButtonNeeded": { "alias": "isLeftButtonNeeded"; "required": false; }; "isRightButtonNeeded": { "alias": "isRightButtonNeeded"; "required": false; }; "actionButtonAlign": { "alias": "actionButtonAlign"; "required": false; }; "fileDownloadConfig": { "alias": "fileDownloadConfig"; "required": false; }; }, { "formSubmit": "formSubmit"; "formChange": "formChange"; "formInput": "formInput"; "formLeftButtonClicked": "formLeftButtonClicked"; "formSearchApply": "formSearchApply"; "formGroupsReference": "formGroupsReference"; "dropdownChange": "dropdownChange"; "formCheckboxSelection": "formCheckboxSelection"; "formDateSelected": "formDateSelected"; "formSelectSearch": "formSelectSearch"; "formControlChange": "formControlChange"; "formAutoCompleteSearch": "formAutoCompleteSearch"; "formAutoCompleteClearSearchValue": "formAutoCompleteClearSearchValue"; "autoCompleteOptionSelected": "autoCompleteOptionSelected"; "formAfterContentInit": "formAfterContentInit"; "formSelectedDateRange": "formSelectedDateRange"; "addFormGroup": "addFormGroup"; "formTimeSelected": "formTimeSelected"; "supportTextLinkClick": "supportTextLinkClick"; "formSlideToggleChange": "formSlideToggleChange"; "formFileUpload": "formFileUpload"; "dropdownOpenedChange": "dropdownOpenedChange"; "formColorPickerChange": "formColorPickerChange"; "formRadioOptionSelected": "formRadioOptionSelected"; "ctaButtonClick": "ctaButtonClick"; "formMultiSelectAutoCompleteSearch": "formMultiSelectAutoCompleteSearch"; "formMultiSelectAutoCompleteClearSearchValue": "formMultiSelectAutoCompleteClearSearchValue"; "multiSelectAutoCompleteOptionsSelected": "multiSelectAutoCompleteOptionsSelected"; "formRichTextEditorContentChange": "formRichTextEditorContentChange"; }, never, ["[component]"], true, never>;
|
|
319
334
|
}
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
import { EventEmitter, OnDestroy } from '@angular/core';
|
|
2
|
+
import { FormUtilityService } from '../../services/form-utility.service';
|
|
3
|
+
import { FileUploadService } from '../../services/file-upload.service';
|
|
4
|
+
import { FileDownloadConfig } from '../../models/file-download-config.model';
|
|
5
|
+
import { DownloadFile } from '../../models/download-file.model';
|
|
6
|
+
import { Subject } from 'rxjs';
|
|
7
|
+
import { SharedService } from '@ieeesa-npm/shared';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class FileDownloadComponent implements OnDestroy {
|
|
10
|
+
formUtilityService: FormUtilityService;
|
|
11
|
+
sharedService: SharedService;
|
|
12
|
+
fileUploadService: FileUploadService;
|
|
13
|
+
constants: {
|
|
14
|
+
ariaLabel: {
|
|
15
|
+
clear: string;
|
|
16
|
+
warning: string;
|
|
17
|
+
previousMonth: string;
|
|
18
|
+
nextMonth: string;
|
|
19
|
+
menuIcon: string;
|
|
20
|
+
close: string;
|
|
21
|
+
search: string;
|
|
22
|
+
addFormGroup: string;
|
|
23
|
+
};
|
|
24
|
+
button: {
|
|
25
|
+
cancel: string;
|
|
26
|
+
ok: string;
|
|
27
|
+
add: string;
|
|
28
|
+
};
|
|
29
|
+
modalConfig: {
|
|
30
|
+
ariaLabel: string;
|
|
31
|
+
autoFocus: string;
|
|
32
|
+
width: string;
|
|
33
|
+
};
|
|
34
|
+
chips: {
|
|
35
|
+
noOfDefaultVisibleChips: number;
|
|
36
|
+
label: {
|
|
37
|
+
viewAll: string;
|
|
38
|
+
viewLess: string;
|
|
39
|
+
};
|
|
40
|
+
ariaLabel: {
|
|
41
|
+
chipsList: string;
|
|
42
|
+
};
|
|
43
|
+
icons: {
|
|
44
|
+
arrow: {
|
|
45
|
+
id: number;
|
|
46
|
+
iconURL: string;
|
|
47
|
+
toolTip: string;
|
|
48
|
+
ariaLabel: string;
|
|
49
|
+
};
|
|
50
|
+
remove: {
|
|
51
|
+
id: number;
|
|
52
|
+
iconURL: string;
|
|
53
|
+
toolTip: string;
|
|
54
|
+
ariaLabel: string;
|
|
55
|
+
};
|
|
56
|
+
check: {
|
|
57
|
+
id: number;
|
|
58
|
+
iconURL: string;
|
|
59
|
+
toolTip: string;
|
|
60
|
+
ariaLabel: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
dataTable: {
|
|
65
|
+
label: {
|
|
66
|
+
clearAll: string;
|
|
67
|
+
};
|
|
68
|
+
message: {
|
|
69
|
+
noRecordFound: string;
|
|
70
|
+
};
|
|
71
|
+
ariaLabel: {
|
|
72
|
+
search: string;
|
|
73
|
+
selectAll: string;
|
|
74
|
+
select: string;
|
|
75
|
+
link: string;
|
|
76
|
+
pagination: string;
|
|
77
|
+
};
|
|
78
|
+
buttons: {
|
|
79
|
+
id: number;
|
|
80
|
+
iconURL: string;
|
|
81
|
+
toolTip: string;
|
|
82
|
+
ariaLabel: string;
|
|
83
|
+
}[];
|
|
84
|
+
};
|
|
85
|
+
datePicker: {
|
|
86
|
+
selectDateLabel: string;
|
|
87
|
+
dateFormatLabel: string;
|
|
88
|
+
startDateLabel: string;
|
|
89
|
+
endDateLabel: string;
|
|
90
|
+
datePickerIcon: string;
|
|
91
|
+
};
|
|
92
|
+
dropdown: {
|
|
93
|
+
placeholderText: string;
|
|
94
|
+
};
|
|
95
|
+
filter: {
|
|
96
|
+
label: {
|
|
97
|
+
filterBy: string;
|
|
98
|
+
applyButton: string;
|
|
99
|
+
clearAll: string;
|
|
100
|
+
};
|
|
101
|
+
buttons: {
|
|
102
|
+
id: number;
|
|
103
|
+
iconURL: string;
|
|
104
|
+
toolTip: string;
|
|
105
|
+
ariaLabel: string;
|
|
106
|
+
}[];
|
|
107
|
+
};
|
|
108
|
+
textarea: {
|
|
109
|
+
maxLengthDefault: number;
|
|
110
|
+
leftCharacters: string;
|
|
111
|
+
};
|
|
112
|
+
autocomplete: {
|
|
113
|
+
minCharToSearch: number;
|
|
114
|
+
debounceTime: number;
|
|
115
|
+
};
|
|
116
|
+
multiSelectAutoComplete: {
|
|
117
|
+
label: {
|
|
118
|
+
clearAll: string;
|
|
119
|
+
};
|
|
120
|
+
ariaLabel: {
|
|
121
|
+
selectedOption: string;
|
|
122
|
+
removeOption: string;
|
|
123
|
+
};
|
|
124
|
+
icons: {
|
|
125
|
+
remove: string;
|
|
126
|
+
clearAll: string;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
header: {
|
|
130
|
+
alt: {
|
|
131
|
+
logo: string;
|
|
132
|
+
};
|
|
133
|
+
ariaLabel: {
|
|
134
|
+
helpLink: string;
|
|
135
|
+
hamburgerMenu: string;
|
|
136
|
+
};
|
|
137
|
+
label: {
|
|
138
|
+
signOut: string;
|
|
139
|
+
};
|
|
140
|
+
buttons: {
|
|
141
|
+
id: number;
|
|
142
|
+
iconURL: string;
|
|
143
|
+
toolTip: string;
|
|
144
|
+
ariaLabel: string;
|
|
145
|
+
}[];
|
|
146
|
+
userProfileMenuOptions: {
|
|
147
|
+
id: number;
|
|
148
|
+
iconURL: string;
|
|
149
|
+
label: string;
|
|
150
|
+
ariaLabel: string;
|
|
151
|
+
toolTip: string;
|
|
152
|
+
isToolTipNeeded: boolean;
|
|
153
|
+
}[];
|
|
154
|
+
errors: {
|
|
155
|
+
"2029": string;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
footer: {
|
|
159
|
+
alt: {
|
|
160
|
+
logo: string;
|
|
161
|
+
};
|
|
162
|
+
links: {
|
|
163
|
+
label: string;
|
|
164
|
+
ariaLabel: string;
|
|
165
|
+
redirectUrl: string;
|
|
166
|
+
}[];
|
|
167
|
+
ieeeLogo: string;
|
|
168
|
+
copyright: {
|
|
169
|
+
link: string;
|
|
170
|
+
textPart1: string;
|
|
171
|
+
textPart2: string;
|
|
172
|
+
hyperLinkPart3: string;
|
|
173
|
+
textPart4: string;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
welcome: {
|
|
177
|
+
buttons: {
|
|
178
|
+
label: string;
|
|
179
|
+
ariaLabel: string;
|
|
180
|
+
url: string;
|
|
181
|
+
}[];
|
|
182
|
+
};
|
|
183
|
+
breadcrumb: {
|
|
184
|
+
label: {
|
|
185
|
+
initial: string;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
loader: {
|
|
189
|
+
ariaLabel: {
|
|
190
|
+
spinner: string;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
defaultWelcomeBgColor: string;
|
|
194
|
+
timePicker: {
|
|
195
|
+
defaultTimeFormat: number;
|
|
196
|
+
timePickerIcon: string;
|
|
197
|
+
};
|
|
198
|
+
colorPicker: {
|
|
199
|
+
label: {
|
|
200
|
+
select: string;
|
|
201
|
+
cancel: string;
|
|
202
|
+
};
|
|
203
|
+
ariaLabel: {
|
|
204
|
+
colorPicker: string;
|
|
205
|
+
next: string;
|
|
206
|
+
back: string;
|
|
207
|
+
select: string;
|
|
208
|
+
cancel: string;
|
|
209
|
+
hexCodeInput: string;
|
|
210
|
+
palette: string;
|
|
211
|
+
};
|
|
212
|
+
defaultColor: string;
|
|
213
|
+
ariaDescription: string;
|
|
214
|
+
ariaDescribedById: string;
|
|
215
|
+
paletteColors: {
|
|
216
|
+
name: string;
|
|
217
|
+
hexCode: string;
|
|
218
|
+
}[];
|
|
219
|
+
};
|
|
220
|
+
fileUpload: {
|
|
221
|
+
label: {
|
|
222
|
+
fileUpload: string;
|
|
223
|
+
allowedFileSize1: string;
|
|
224
|
+
allowedFileSize2: string;
|
|
225
|
+
allowedFileFormat: string;
|
|
226
|
+
browseFiles: string;
|
|
227
|
+
uploadProgress: string;
|
|
228
|
+
upload: string;
|
|
229
|
+
mb: string;
|
|
230
|
+
uploadFor: string;
|
|
231
|
+
uploadErrorMsg: string;
|
|
232
|
+
of: string;
|
|
233
|
+
filesUploaded: string;
|
|
234
|
+
fileAlreadyExists: string;
|
|
235
|
+
};
|
|
236
|
+
ariaLabel: {
|
|
237
|
+
fileUpload: string;
|
|
238
|
+
browseFiles: string;
|
|
239
|
+
fileUploadIcon: string;
|
|
240
|
+
removeFileIcon: string;
|
|
241
|
+
deleteFileIcon: string;
|
|
242
|
+
fileDownload: string;
|
|
243
|
+
fileUploadInput: string;
|
|
244
|
+
};
|
|
245
|
+
iconUrl: {
|
|
246
|
+
fileUploadIcon: string;
|
|
247
|
+
fileRemoveIcon: string;
|
|
248
|
+
deleteIcon: string;
|
|
249
|
+
};
|
|
250
|
+
buttons: {
|
|
251
|
+
id: number;
|
|
252
|
+
ariaLabel: string;
|
|
253
|
+
iconURL: string;
|
|
254
|
+
toolTip: string;
|
|
255
|
+
disabled: boolean;
|
|
256
|
+
}[];
|
|
257
|
+
message: {
|
|
258
|
+
error: {
|
|
259
|
+
errorReadingFile: string;
|
|
260
|
+
invalidFileFormat: string;
|
|
261
|
+
invalidFileSize: string;
|
|
262
|
+
"2026": string;
|
|
263
|
+
"2059": string;
|
|
264
|
+
"2060": string;
|
|
265
|
+
"2061": string;
|
|
266
|
+
"2062": string;
|
|
267
|
+
"2063": string;
|
|
268
|
+
"2064": string;
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
limit: {
|
|
272
|
+
maxFileUpload: number;
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
list: {
|
|
276
|
+
defaultIndentation: number;
|
|
277
|
+
};
|
|
278
|
+
search: {
|
|
279
|
+
searchIcon: string;
|
|
280
|
+
};
|
|
281
|
+
richTextEditor: {
|
|
282
|
+
label: {
|
|
283
|
+
editor: string;
|
|
284
|
+
};
|
|
285
|
+
ariaLabel: {
|
|
286
|
+
editor: string;
|
|
287
|
+
colorPicker: string;
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
fileDownload: {
|
|
291
|
+
buttons: {
|
|
292
|
+
id: number;
|
|
293
|
+
ariaLabel: string;
|
|
294
|
+
iconURL: string;
|
|
295
|
+
toolTip: string;
|
|
296
|
+
disabled: boolean;
|
|
297
|
+
}[];
|
|
298
|
+
preSignedDuration: string;
|
|
299
|
+
message: {
|
|
300
|
+
errors: {
|
|
301
|
+
errorReadingFile: string;
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
destroy$: Subject<boolean>;
|
|
307
|
+
preSignedUrl: string;
|
|
308
|
+
fileName: string;
|
|
309
|
+
downloadFiles: File | FileList | any | DownloadFile[];
|
|
310
|
+
fileDownloadConfig: FileDownloadConfig;
|
|
311
|
+
isPublicAPI?: boolean;
|
|
312
|
+
domainUrl?: string;
|
|
313
|
+
downloadSelectedFile: EventEmitter<File | DownloadFile>;
|
|
314
|
+
deleteSelectedFile: EventEmitter<File | DownloadFile>;
|
|
315
|
+
fileDeleteBtn: {
|
|
316
|
+
id: number;
|
|
317
|
+
ariaLabel: string;
|
|
318
|
+
iconURL: string;
|
|
319
|
+
toolTip: string;
|
|
320
|
+
disabled: boolean;
|
|
321
|
+
};
|
|
322
|
+
constructor(formUtilityService: FormUtilityService, sharedService: SharedService, fileUploadService: FileUploadService);
|
|
323
|
+
/**
|
|
324
|
+
* Gets the download AWS pre-signed URL from API on button click or emit the downloadSelectedFile if isNotDownloadFileInternally flg is true.
|
|
325
|
+
* @param {File } file
|
|
326
|
+
* @memberof FileDownloadedComponent
|
|
327
|
+
*/
|
|
328
|
+
onDownloadFile(file: File | DownloadFile): void;
|
|
329
|
+
/**
|
|
330
|
+
* Retrieves pre-signed URL for downloading the selected file from Amazon S3 bucket.
|
|
331
|
+
* @memberof FileDownloadedComponent
|
|
332
|
+
*/
|
|
333
|
+
getFileDownloadPresignedUrls(file: File | DownloadFile): void;
|
|
334
|
+
/**
|
|
335
|
+
* Removes the selected file from the downloaded files list.
|
|
336
|
+
* @param {number} index
|
|
337
|
+
* @param {File } file
|
|
338
|
+
* @memberof FileDownloadedComponent
|
|
339
|
+
*/
|
|
340
|
+
onDeleteFile(file: File | DownloadFile, index: number): void;
|
|
341
|
+
/**
|
|
342
|
+
* Returns unique identifier for the file list.
|
|
343
|
+
* @param {number} index
|
|
344
|
+
* @return {(number | string)}
|
|
345
|
+
* @memberof FileDownloadComponent
|
|
346
|
+
*/
|
|
347
|
+
trackByFn(index: number): number | string;
|
|
348
|
+
/**
|
|
349
|
+
* Cleans up resources when the component is destroyed.
|
|
350
|
+
* @memberof FileDownloadComponent
|
|
351
|
+
*/
|
|
352
|
+
ngOnDestroy(): void;
|
|
353
|
+
/**
|
|
354
|
+
* Download the file using generated presigned Url.
|
|
355
|
+
* @param {string} fileDownloadPresignedUrl
|
|
356
|
+
* @param {string} fileName
|
|
357
|
+
* @memberof FileDownloadComponent
|
|
358
|
+
*/
|
|
359
|
+
downloadFileFromPresignedUrl(fileDownloadPresignedUrl: string, fileName: string): void;
|
|
360
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileDownloadComponent, never>;
|
|
361
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileDownloadComponent, "ieeesa-file-download", never, { "downloadFiles": { "alias": "downloadFiles"; "required": false; }; "fileDownloadConfig": { "alias": "fileDownloadConfig"; "required": false; }; "isPublicAPI": { "alias": "isPublicAPI"; "required": false; }; "domainUrl": { "alias": "domainUrl"; "required": false; }; }, { "downloadSelectedFile": "downloadSelectedFile"; "deleteSelectedFile": "deleteSelectedFile"; }, never, never, true, never>;
|
|
362
|
+
}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
1
|
+
import { ElementRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { FormGroup } from '@angular/forms';
|
|
3
3
|
import { FormUtilityService } from '../../services/form-utility.service';
|
|
4
4
|
import { FieldConfig } from '../../models/field-config.model';
|
|
5
5
|
import { AllowedFileTypes } from '../../models/allowed-file-types.model';
|
|
6
6
|
import { FileUploadService } from '../../services/file-upload.service';
|
|
7
|
+
import { ViewFilesFormat } from '../../models/view-files-format.model';
|
|
8
|
+
import { AlignType } from '../../models/align-type.model';
|
|
9
|
+
import { FileUploadStatus } from '../../models/file-upload-status.model';
|
|
10
|
+
import { FileDownloadConfig } from '../../models/file-download-config.model';
|
|
11
|
+
import { DownloadFile } from '@presentation/models/download-file.model';
|
|
7
12
|
import * as i0 from "@angular/core";
|
|
8
13
|
/**
|
|
9
14
|
* Provides functionality for uploading files to aws s3 bucket.
|
|
@@ -14,6 +19,7 @@ import * as i0 from "@angular/core";
|
|
|
14
19
|
export declare class FileUploadComponent implements OnInit {
|
|
15
20
|
formUtilityService: FormUtilityService;
|
|
16
21
|
fileUploadService: FileUploadService;
|
|
22
|
+
fileField: ElementRef;
|
|
17
23
|
constants: {
|
|
18
24
|
ariaLabel: {
|
|
19
25
|
clear: string;
|
|
@@ -208,6 +214,10 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
208
214
|
colorPicker: string;
|
|
209
215
|
next: string;
|
|
210
216
|
back: string;
|
|
217
|
+
/**
|
|
218
|
+
* Formats allowed file format and size message in required format.
|
|
219
|
+
* @memberof FileUploadComponent
|
|
220
|
+
*/
|
|
211
221
|
select: string;
|
|
212
222
|
cancel: string;
|
|
213
223
|
hexCodeInput: string;
|
|
@@ -229,6 +239,13 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
229
239
|
allowedFileFormat: string;
|
|
230
240
|
browseFiles: string;
|
|
231
241
|
uploadProgress: string;
|
|
242
|
+
upload: string;
|
|
243
|
+
mb: string;
|
|
244
|
+
uploadFor: string;
|
|
245
|
+
uploadErrorMsg: string;
|
|
246
|
+
of: string;
|
|
247
|
+
filesUploaded: string;
|
|
248
|
+
fileAlreadyExists: string;
|
|
232
249
|
};
|
|
233
250
|
ariaLabel: {
|
|
234
251
|
fileUpload: string;
|
|
@@ -265,6 +282,9 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
265
282
|
"2064": string;
|
|
266
283
|
};
|
|
267
284
|
};
|
|
285
|
+
limit: {
|
|
286
|
+
maxFileUpload: number;
|
|
287
|
+
};
|
|
268
288
|
};
|
|
269
289
|
list: {
|
|
270
290
|
defaultIndentation: number;
|
|
@@ -281,6 +301,21 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
281
301
|
colorPicker: string;
|
|
282
302
|
};
|
|
283
303
|
};
|
|
304
|
+
fileDownload: {
|
|
305
|
+
buttons: {
|
|
306
|
+
id: number;
|
|
307
|
+
ariaLabel: string;
|
|
308
|
+
iconURL: string;
|
|
309
|
+
toolTip: string;
|
|
310
|
+
disabled: boolean;
|
|
311
|
+
}[];
|
|
312
|
+
preSignedDuration: string;
|
|
313
|
+
message: {
|
|
314
|
+
errors: {
|
|
315
|
+
errorReadingFile: string;
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
};
|
|
284
319
|
};
|
|
285
320
|
fileUploadLabel: {
|
|
286
321
|
fileUpload: string;
|
|
@@ -289,6 +324,13 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
289
324
|
allowedFileFormat: string;
|
|
290
325
|
browseFiles: string;
|
|
291
326
|
uploadProgress: string;
|
|
327
|
+
upload: string;
|
|
328
|
+
mb: string;
|
|
329
|
+
uploadFor: string;
|
|
330
|
+
uploadErrorMsg: string;
|
|
331
|
+
of: string;
|
|
332
|
+
filesUploaded: string;
|
|
333
|
+
fileAlreadyExists: string;
|
|
292
334
|
};
|
|
293
335
|
fileUploadAriaLabel: {
|
|
294
336
|
fileUpload: string;
|
|
@@ -318,11 +360,15 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
318
360
|
group: FormGroup;
|
|
319
361
|
isValidFileType: boolean;
|
|
320
362
|
isValidFileSize: boolean;
|
|
363
|
+
isValidMaxFileUploadLimit: boolean;
|
|
321
364
|
selectedFiles: FileList | File | any;
|
|
322
365
|
selectedFileNames: string;
|
|
323
366
|
isFormField: boolean;
|
|
324
367
|
totalSize: number;
|
|
325
368
|
uploadedFiles: FileList | File | any;
|
|
369
|
+
actionButtonAlign: AlignType;
|
|
370
|
+
alignmentType: typeof AlignType;
|
|
371
|
+
isUploadButtonDisabled: boolean;
|
|
326
372
|
formControlName: string;
|
|
327
373
|
isFileSelected: boolean;
|
|
328
374
|
supportMessage: string;
|
|
@@ -330,12 +376,24 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
330
376
|
isMultiFileUpload: boolean;
|
|
331
377
|
isUploadInProgress: boolean;
|
|
332
378
|
fileUploadHeading: string;
|
|
379
|
+
isAllowAnyFileType: boolean;
|
|
380
|
+
viewFilesFormat: ViewFilesFormat;
|
|
381
|
+
isUploadButtonNeeded: boolean;
|
|
333
382
|
maxUploadFileSize: number;
|
|
334
383
|
private uploadedSizeValue;
|
|
384
|
+
fileUploadErrorPosition: string;
|
|
385
|
+
maxFilesUploadLimit: number;
|
|
386
|
+
maxFilesUploadLimitErrorMessage: string;
|
|
387
|
+
private _fileUploadStatus;
|
|
388
|
+
get fileUploadStatus(): FileUploadStatus;
|
|
389
|
+
set fileUploadStatus(value: FileUploadStatus);
|
|
335
390
|
get uploadedSize(): number;
|
|
336
391
|
set uploadedSize(value: number);
|
|
392
|
+
_fileDownloadConfig: FileDownloadConfig;
|
|
393
|
+
set fileDownloadConfig(value: FileDownloadConfig);
|
|
394
|
+
get fileDownloadConfig(): FileDownloadConfig;
|
|
337
395
|
uploadSelectedFiles: EventEmitter<File | FileList>;
|
|
338
|
-
downloadSelectedFile: EventEmitter<File |
|
|
396
|
+
downloadSelectedFile: EventEmitter<File | DownloadFile>;
|
|
339
397
|
constructor(formUtilityService: FormUtilityService, fileUploadService: FileUploadService);
|
|
340
398
|
/**
|
|
341
399
|
* Initializes component properties and retrieves configuration.
|
|
@@ -348,7 +406,7 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
348
406
|
*/
|
|
349
407
|
getAllowedFileFormatSizeMessage(): void;
|
|
350
408
|
/**
|
|
351
|
-
* Handles the selected
|
|
409
|
+
* Handles the selected file(s) and emits FileUpload event emitter for uploading the file(s).
|
|
352
410
|
* @param {(File | FileList)} file
|
|
353
411
|
* @memberof FileUploadComponent
|
|
354
412
|
*/
|
|
@@ -385,7 +443,7 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
385
443
|
* Emits file download event emitter.
|
|
386
444
|
* @memberof FileUploadComponent
|
|
387
445
|
*/
|
|
388
|
-
downloadFile(): void;
|
|
446
|
+
downloadFile(file: File | DownloadFile): void;
|
|
389
447
|
/**
|
|
390
448
|
* Returns unique identifier for the file list.
|
|
391
449
|
* @param {number} index
|
|
@@ -393,6 +451,34 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
393
451
|
* @memberof FileUploadComponent
|
|
394
452
|
*/
|
|
395
453
|
trackByFn(index: number): number | string;
|
|
454
|
+
/**
|
|
455
|
+
* Triggers on browse element clicked
|
|
456
|
+
* @memberof FileUploadComponent
|
|
457
|
+
*/
|
|
458
|
+
fileClick(): void;
|
|
459
|
+
/**
|
|
460
|
+
* Display comma separated failed file names
|
|
461
|
+
* @param {string[]} filesNamesUploadFailed
|
|
462
|
+
* @return {*} {string}
|
|
463
|
+
* @memberof FileUploadComponent
|
|
464
|
+
*/
|
|
465
|
+
displayFileNames(fileNames: string[]): string;
|
|
466
|
+
/**
|
|
467
|
+
* Removes file from respective properties used.
|
|
468
|
+
* @param {number} index
|
|
469
|
+
* @memberof FileUploadComponent
|
|
470
|
+
*/
|
|
471
|
+
removeFile(index: number): void;
|
|
472
|
+
/**
|
|
473
|
+
* Disabled file upload button
|
|
474
|
+
* @memberof FileUploadComponent
|
|
475
|
+
*/
|
|
476
|
+
disableUploadButton(): void;
|
|
477
|
+
/**
|
|
478
|
+
* Based on isMultiFileUpload flag return files to download.
|
|
479
|
+
* @memberof FileUploadComponent
|
|
480
|
+
*/
|
|
481
|
+
getFilesToDownload(): DownloadFile[];
|
|
396
482
|
static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, never>;
|
|
397
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "ieeesa-file-upload", never, { "formControlName": { "alias": "formControlName"; "required": false; }; "isFileSelected": { "alias": "isFileSelected"; "required": false; }; "supportMessage": { "alias": "supportMessage"; "required": false; }; "allowedFileTypes": { "alias": "allowedFileTypes"; "required": false; }; "isMultiFileUpload": { "alias": "isMultiFileUpload"; "required": false; }; "isUploadInProgress": { "alias": "isUploadInProgress"; "required": false; }; "fileUploadHeading": { "alias": "fileUploadHeading"; "required": false; }; "maxUploadFileSize": { "alias": "maxUploadFileSize"; "required": false; }; "uploadedSize": { "alias": "uploadedSize"; "required": false; }; }, { "uploadSelectedFiles": "uploadSelectedFiles"; "downloadSelectedFile": "downloadSelectedFile"; }, never, never, true, never>;
|
|
483
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "ieeesa-file-upload", never, { "maxFileSizeErrorMessage": { "alias": "maxFileSizeErrorMessage"; "required": false; }; "actionButtonAlign": { "alias": "actionButtonAlign"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "isFileSelected": { "alias": "isFileSelected"; "required": false; }; "supportMessage": { "alias": "supportMessage"; "required": false; }; "allowedFileTypes": { "alias": "allowedFileTypes"; "required": false; }; "isMultiFileUpload": { "alias": "isMultiFileUpload"; "required": false; }; "isUploadInProgress": { "alias": "isUploadInProgress"; "required": false; }; "fileUploadHeading": { "alias": "fileUploadHeading"; "required": false; }; "isAllowAnyFileType": { "alias": "isAllowAnyFileType"; "required": false; }; "viewFilesFormat": { "alias": "viewFilesFormat"; "required": false; }; "isUploadButtonNeeded": { "alias": "isUploadButtonNeeded"; "required": false; }; "maxUploadFileSize": { "alias": "maxUploadFileSize"; "required": false; }; "fileUploadErrorPosition": { "alias": "fileUploadErrorPosition"; "required": false; }; "maxFilesUploadLimit": { "alias": "maxFilesUploadLimit"; "required": false; }; "maxFilesUploadLimitErrorMessage": { "alias": "maxFilesUploadLimitErrorMessage"; "required": false; }; "fileUploadStatus": { "alias": "fileUploadStatus"; "required": false; }; "uploadedSize": { "alias": "uploadedSize"; "required": false; }; "fileDownloadConfig": { "alias": "fileDownloadConfig"; "required": false; }; }, { "uploadSelectedFiles": "uploadSelectedFiles"; "downloadSelectedFile": "downloadSelectedFile"; }, never, never, true, never>;
|
|
398
484
|
}
|