@ieeesa-npm/presentation 0.27.2 → 0.27.3
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 +20 -0
- package/esm2022/lib/components/dynamic-form/dynamic-form.component.mjs +11 -3
- package/esm2022/lib/components/file-download/file-download.component.mjs +132 -0
- package/esm2022/lib/components/file-upload/file-upload.component.mjs +25 -5
- package/esm2022/lib/components/list/list.component.mjs +23 -3
- package/esm2022/lib/directives/dynamic-form-field/dynamic-form-field.directive.mjs +14 -2
- package/esm2022/lib/models/download-file.model.mjs +1 -1
- package/esm2022/lib/models/file-download-config.model.mjs +2 -0
- package/esm2022/lib/models/file-upload-presigned-url-res.model.mjs +1 -1
- package/esm2022/lib/models/file-upload-status.model.mjs +1 -1
- package/esm2022/lib/models/list-item.model.mjs +1 -1
- package/esm2022/lib/services/file-upload.service.mjs +13 -4
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/ieeesa-npm-presentation.mjs +243 -35
- package/fesm2022/ieeesa-npm-presentation.mjs.map +1 -1
- package/lib/components/chips/chips.component.d.ts +18 -0
- package/lib/components/dynamic-form/dynamic-form.component.d.ts +5 -1
- package/lib/components/file-download/file-download.component.d.ts +365 -0
- package/lib/components/file-upload/file-upload.component.d.ts +31 -8
- package/lib/components/list/list.component.d.ts +12 -1
- package/lib/directives/dynamic-form-field/dynamic-form-field.directive.d.ts +5 -1
- package/lib/models/download-file.model.d.ts +1 -1
- package/lib/models/file-download-config.model.d.ts +8 -0
- package/lib/models/file-upload-presigned-url-res.model.d.ts +18 -0
- package/lib/models/file-upload-status.model.d.ts +1 -1
- package/lib/models/list-item.model.d.ts +2 -0
- package/lib/services/file-upload.service.d.ts +35 -9
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
- package/src/lib/assets/constants.json +20 -0
|
@@ -300,6 +300,24 @@ export declare class ChipsComponent implements OnInit, OnDestroy {
|
|
|
300
300
|
colorPicker: string;
|
|
301
301
|
};
|
|
302
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
|
+
"5038": string;
|
|
316
|
+
"6027": string;
|
|
317
|
+
"6028": string;
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
};
|
|
303
321
|
};
|
|
304
322
|
chipsType: typeof ChipsType;
|
|
305
323
|
orientations: typeof ChipOrientation;
|
|
@@ -15,6 +15,7 @@ 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
17
|
import { FileUploadStatus } from '../../models/file-upload-status.model';
|
|
18
|
+
import { FileDownloadConfig } from '../../models/file-download-config.model';
|
|
18
19
|
import * as i0 from "@angular/core";
|
|
19
20
|
/**
|
|
20
21
|
* Creates a reactive form dynamically based on the passed form field configuration and handles the form events.
|
|
@@ -60,6 +61,9 @@ export declare class DynamicFormComponent implements OnInit, AfterContentInit, A
|
|
|
60
61
|
isLeftButtonNeeded: boolean;
|
|
61
62
|
isRightButtonNeeded: boolean;
|
|
62
63
|
actionButtonAlign: AlignType;
|
|
64
|
+
_fileDownloadConfig: FileDownloadConfig;
|
|
65
|
+
set fileDownloadConfig(value: FileDownloadConfig);
|
|
66
|
+
get fileDownloadConfig(): FileDownloadConfig;
|
|
63
67
|
alignmentType: typeof AlignType;
|
|
64
68
|
formSubmit: EventEmitter<any>;
|
|
65
69
|
formChange: EventEmitter<any>;
|
|
@@ -326,5 +330,5 @@ export declare class DynamicFormComponent implements OnInit, AfterContentInit, A
|
|
|
326
330
|
*/
|
|
327
331
|
onCheckboxCTAButtonClick(event: IconButton): void;
|
|
328
332
|
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormComponent, never>;
|
|
329
|
-
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; }; }, { "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>;
|
|
330
334
|
}
|
|
@@ -0,0 +1,365 @@
|
|
|
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
|
+
"5038": string;
|
|
303
|
+
"6027": string;
|
|
304
|
+
"6028": string;
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
destroy$: Subject<boolean>;
|
|
310
|
+
preSignedUrl: string;
|
|
311
|
+
fileName: string;
|
|
312
|
+
downloadFiles: File | FileList | any | DownloadFile[];
|
|
313
|
+
fileDownloadConfig: FileDownloadConfig;
|
|
314
|
+
isPublicAPI?: boolean;
|
|
315
|
+
domainUrl?: string;
|
|
316
|
+
downloadSelectedFile: EventEmitter<File | DownloadFile>;
|
|
317
|
+
deleteSelectedFile: EventEmitter<File | DownloadFile>;
|
|
318
|
+
fileDeleteBtn: {
|
|
319
|
+
id: number;
|
|
320
|
+
ariaLabel: string;
|
|
321
|
+
iconURL: string;
|
|
322
|
+
toolTip: string;
|
|
323
|
+
disabled: boolean;
|
|
324
|
+
};
|
|
325
|
+
constructor(formUtilityService: FormUtilityService, sharedService: SharedService, fileUploadService: FileUploadService);
|
|
326
|
+
/**
|
|
327
|
+
* Gets the download AWS pre-signed URL from API on button click or emit the downloadSelectedFile if isNotDownloadFileInternally flg is true.
|
|
328
|
+
* @param {File } file
|
|
329
|
+
* @memberof FileDownloadedComponent
|
|
330
|
+
*/
|
|
331
|
+
onDownloadFile(file: File | DownloadFile): void;
|
|
332
|
+
/**
|
|
333
|
+
* Retrieves pre-signed URL for downloading the selected file from Amazon S3 bucket.
|
|
334
|
+
* @memberof FileDownloadedComponent
|
|
335
|
+
*/
|
|
336
|
+
getFileDownloadPresignedUrls(file: File | DownloadFile): void;
|
|
337
|
+
/**
|
|
338
|
+
* Removes the selected file from the downloaded files list.
|
|
339
|
+
* @param {number} index
|
|
340
|
+
* @param {File } file
|
|
341
|
+
* @memberof FileDownloadedComponent
|
|
342
|
+
*/
|
|
343
|
+
onDeleteFile(file: File | DownloadFile, index: number): void;
|
|
344
|
+
/**
|
|
345
|
+
* Returns unique identifier for the file list.
|
|
346
|
+
* @param {number} index
|
|
347
|
+
* @return {(number | string)}
|
|
348
|
+
* @memberof FileDownloadComponent
|
|
349
|
+
*/
|
|
350
|
+
trackByFn(index: number): number | string;
|
|
351
|
+
/**
|
|
352
|
+
* Cleans up resources when the component is destroyed.
|
|
353
|
+
* @memberof FileDownloadComponent
|
|
354
|
+
*/
|
|
355
|
+
ngOnDestroy(): void;
|
|
356
|
+
/**
|
|
357
|
+
* Download the file using generated presigned Url.
|
|
358
|
+
* @param {string} fileDownloadPresignedUrl
|
|
359
|
+
* @param {string} fileName
|
|
360
|
+
* @memberof FileDownloadComponent
|
|
361
|
+
*/
|
|
362
|
+
downloadFileFromPresignedUrl(fileDownloadPresignedUrl: string, fileName: string): void;
|
|
363
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileDownloadComponent, never>;
|
|
364
|
+
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>;
|
|
365
|
+
}
|
|
@@ -7,6 +7,8 @@ import { FileUploadService } from '../../services/file-upload.service';
|
|
|
7
7
|
import { ViewFilesFormat } from '../../models/view-files-format.model';
|
|
8
8
|
import { AlignType } from '../../models/align-type.model';
|
|
9
9
|
import { FileUploadStatus } from '../../models/file-upload-status.model';
|
|
10
|
+
import { FileDownloadConfig } from '../../models/file-download-config.model';
|
|
11
|
+
import { DownloadFile } from '../../models/download-file.model';
|
|
10
12
|
import * as i0 from "@angular/core";
|
|
11
13
|
/**
|
|
12
14
|
* Provides functionality for uploading files to aws s3 bucket.
|
|
@@ -217,11 +219,6 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
217
219
|
hexCodeInput: string;
|
|
218
220
|
palette: string;
|
|
219
221
|
};
|
|
220
|
-
/**
|
|
221
|
-
* Handles the selected file(s) and emits FileUpload event emitter for uploading the file(s).
|
|
222
|
-
* @param {(File | FileList)} file
|
|
223
|
-
* @memberof FileUploadComponent
|
|
224
|
-
*/
|
|
225
222
|
defaultColor: string;
|
|
226
223
|
ariaDescription: string;
|
|
227
224
|
ariaDescribedById: string;
|
|
@@ -300,6 +297,24 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
300
297
|
colorPicker: string;
|
|
301
298
|
};
|
|
302
299
|
};
|
|
300
|
+
fileDownload: {
|
|
301
|
+
buttons: {
|
|
302
|
+
id: number;
|
|
303
|
+
ariaLabel: string;
|
|
304
|
+
iconURL: string;
|
|
305
|
+
toolTip: string;
|
|
306
|
+
disabled: boolean;
|
|
307
|
+
}[];
|
|
308
|
+
preSignedDuration: string;
|
|
309
|
+
message: {
|
|
310
|
+
errors: {
|
|
311
|
+
errorReadingFile: string;
|
|
312
|
+
"5038": string;
|
|
313
|
+
"6027": string;
|
|
314
|
+
"6028": string;
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
};
|
|
303
318
|
};
|
|
304
319
|
fileUploadLabel: {
|
|
305
320
|
fileUpload: string;
|
|
@@ -373,8 +388,11 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
373
388
|
set fileUploadStatus(value: FileUploadStatus);
|
|
374
389
|
get uploadedSize(): number;
|
|
375
390
|
set uploadedSize(value: number);
|
|
391
|
+
_fileDownloadConfig: FileDownloadConfig;
|
|
392
|
+
set fileDownloadConfig(value: FileDownloadConfig);
|
|
393
|
+
get fileDownloadConfig(): FileDownloadConfig;
|
|
376
394
|
uploadSelectedFiles: EventEmitter<File | FileList>;
|
|
377
|
-
downloadSelectedFile: EventEmitter<File |
|
|
395
|
+
downloadSelectedFile: EventEmitter<File | DownloadFile>;
|
|
378
396
|
constructor(formUtilityService: FormUtilityService, fileUploadService: FileUploadService);
|
|
379
397
|
/**
|
|
380
398
|
* Initializes component properties and retrieves configuration.
|
|
@@ -424,7 +442,7 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
424
442
|
* Emits file download event emitter.
|
|
425
443
|
* @memberof FileUploadComponent
|
|
426
444
|
*/
|
|
427
|
-
downloadFile(): void;
|
|
445
|
+
downloadFile(file: File | DownloadFile): void;
|
|
428
446
|
/**
|
|
429
447
|
* Returns unique identifier for the file list.
|
|
430
448
|
* @param {number} index
|
|
@@ -455,6 +473,11 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
455
473
|
* @memberof FileUploadComponent
|
|
456
474
|
*/
|
|
457
475
|
disableUploadButton(): void;
|
|
476
|
+
/**
|
|
477
|
+
* Based on isMultiFileUpload flag return files to download.
|
|
478
|
+
* @memberof FileUploadComponent
|
|
479
|
+
*/
|
|
480
|
+
getFilesToDownload(): DownloadFile[];
|
|
458
481
|
static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, never>;
|
|
459
|
-
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; }; }, { "uploadSelectedFiles": "uploadSelectedFiles"; "downloadSelectedFile": "downloadSelectedFile"; }, never, never, true, never>;
|
|
482
|
+
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>;
|
|
460
483
|
}
|
|
@@ -2,6 +2,8 @@ import { ElementRef, EventEmitter, OnDestroy } from '@angular/core';
|
|
|
2
2
|
import { ListHeader, ListItem } from '../../models/list-item.model';
|
|
3
3
|
import { Menu } from '../../models/menu.model';
|
|
4
4
|
import { IconButton } from '../../models/icon-button.model';
|
|
5
|
+
import { FileDownloadConfig } from '../../models/file-download-config.model';
|
|
6
|
+
import { DownloadFile } from '../../models/download-file.model';
|
|
5
7
|
import * as i0 from "@angular/core";
|
|
6
8
|
export declare class ListComponent implements OnDestroy {
|
|
7
9
|
elementRef: ElementRef;
|
|
@@ -17,6 +19,7 @@ export declare class ListComponent implements OnDestroy {
|
|
|
17
19
|
set listHeaderConfig(listHeaderDetail: ListHeader);
|
|
18
20
|
get listHeaderConfig(): ListHeader;
|
|
19
21
|
hyperLinkAndButtonClick: EventEmitter<Event>;
|
|
22
|
+
downloadSelectedFile: EventEmitter<File | DownloadFile>;
|
|
20
23
|
constants: any;
|
|
21
24
|
indentation: any;
|
|
22
25
|
addListButton: IconButton;
|
|
@@ -24,6 +27,9 @@ export declare class ListComponent implements OnDestroy {
|
|
|
24
27
|
set addListButtonConfig(addListButton: IconButton);
|
|
25
28
|
get addListButtonConfig(): IconButton;
|
|
26
29
|
domChangeEvent: EventEmitter<MutationRecord>;
|
|
30
|
+
_fileDownloadConfig: FileDownloadConfig;
|
|
31
|
+
set fileDownloadConfig(value: FileDownloadConfig);
|
|
32
|
+
get fileDownloadConfig(): FileDownloadConfig;
|
|
27
33
|
constructor(elementRef: ElementRef);
|
|
28
34
|
/**
|
|
29
35
|
* Emits hyperLinkAndButtonClick event on click of hyper link.
|
|
@@ -64,11 +70,16 @@ export declare class ListComponent implements OnDestroy {
|
|
|
64
70
|
* @memberof ListComponent
|
|
65
71
|
*/
|
|
66
72
|
onDomChange(event: MutationRecord): void;
|
|
73
|
+
/**
|
|
74
|
+
* Emits file download event emitter.
|
|
75
|
+
* @memberof ListComponent
|
|
76
|
+
*/
|
|
77
|
+
downloadFile(file: File | DownloadFile): void;
|
|
67
78
|
/**
|
|
68
79
|
* Removing the event listeners on destroy.
|
|
69
80
|
* @memberof ListComponent
|
|
70
81
|
*/
|
|
71
82
|
ngOnDestroy(): void;
|
|
72
83
|
static ɵfac: i0.ɵɵFactoryDeclaration<ListComponent, never>;
|
|
73
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ListComponent, "ieeesa-list", never, { "listDataItems": { "alias": "listDataItems"; "required": false; }; "listHeaderConfig": { "alias": "listHeaderConfig"; "required": false; }; "indentation": { "alias": "indentation"; "required": false; }; "addListButtonConfig": { "alias": "addListButtonConfig"; "required": false; }; }, { "selectedItemAndAction": "selectedItemAndAction"; "reorderedList": "reorderedList"; "hyperLinkAndButtonClick": "hyperLinkAndButtonClick"; "domChangeEvent": "domChangeEvent"; }, never, never, true, never>;
|
|
84
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ListComponent, "ieeesa-list", never, { "listDataItems": { "alias": "listDataItems"; "required": false; }; "listHeaderConfig": { "alias": "listHeaderConfig"; "required": false; }; "indentation": { "alias": "indentation"; "required": false; }; "addListButtonConfig": { "alias": "addListButtonConfig"; "required": false; }; "fileDownloadConfig": { "alias": "fileDownloadConfig"; "required": false; }; }, { "selectedItemAndAction": "selectedItemAndAction"; "reorderedList": "reorderedList"; "hyperLinkAndButtonClick": "hyperLinkAndButtonClick"; "downloadSelectedFile": "downloadSelectedFile"; "domChangeEvent": "domChangeEvent"; }, never, never, true, never>;
|
|
74
85
|
}
|
|
@@ -13,6 +13,7 @@ import { RadioOption } from '../../models/radio-option.model';
|
|
|
13
13
|
import { IconButton } from '../../models/icon-button.model';
|
|
14
14
|
import { AutoCompleteOption } from '../../models/autocomplete-option.model';
|
|
15
15
|
import { FileUploadStatus } from '../../models/file-upload-status.model';
|
|
16
|
+
import { FileDownloadConfig } from '../../models/file-download-config.model';
|
|
16
17
|
import * as i0 from "@angular/core";
|
|
17
18
|
/**
|
|
18
19
|
* Provides the implementation of DynamicFormFieldDirective which hosts and creates the form fields components dynamically.
|
|
@@ -42,6 +43,9 @@ export declare class DynamicFormFieldDirective implements FormField, OnInit, OnD
|
|
|
42
43
|
private _fileUploadStatus;
|
|
43
44
|
get fileUploadStatus(): FileUploadStatus;
|
|
44
45
|
set fileUploadStatus(value: FileUploadStatus);
|
|
46
|
+
_fileDownloadConfig: FileDownloadConfig;
|
|
47
|
+
set fileDownloadConfig(value: FileDownloadConfig);
|
|
48
|
+
get fileDownloadConfig(): FileDownloadConfig;
|
|
45
49
|
private _submitResponse;
|
|
46
50
|
/**
|
|
47
51
|
* Sets the submit response of form submit event
|
|
@@ -103,5 +107,5 @@ export declare class DynamicFormFieldDirective implements FormField, OnInit, OnD
|
|
|
103
107
|
*/
|
|
104
108
|
ngOnDestroy(): void;
|
|
105
109
|
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormFieldDirective, never>;
|
|
106
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DynamicFormFieldDirective, "[ieeesaDynamicFormField]", never, { "config": { "alias": "config"; "required": false; }; "group": { "alias": "group"; "required": false; }; "fileUploadStatus": { "alias": "fileUploadStatus"; "required": false; }; "submitResponse": { "alias": "submitResponse"; "required": false; }; "searchResponse": { "alias": "searchResponse"; "required": false; }; }, { "formSearchApply": "formSearchApply"; "formDropdownSelected": "formDropdownSelected"; "formDateSelected": "formDateSelected"; "formTimeSelected": "formTimeSelected"; "formSelectedDateRange": "formSelectedDateRange"; "formSelectSearch": "formSelectSearch"; "formAutoCompleteSearch": "formAutoCompleteSearch"; "autoCompleteClearSearchValue": "autoCompleteClearSearchValue"; "autoCompleteOptionSelected": "autoCompleteOptionSelected"; "formCheckboxSelection": "formCheckboxSelection"; "formInputValue": "formInputValue"; "addFormGroup": "addFormGroup"; "supportTextLinkClick": "supportTextLinkClick"; "formSlideToggleChange": "formSlideToggleChange"; "dropdownOpenedChange": "dropdownOpenedChange"; "formColorPickerChange": "formColorPickerChange"; "formFileUpload": "formFileUpload"; "formRadioOptionSelected": "formRadioOptionSelected"; "ctaButtonClick": "ctaButtonClick"; "formMultiSelectAutoCompleteSearch": "formMultiSelectAutoCompleteSearch"; "multiSelectAutoCompleteClearSearchValue": "multiSelectAutoCompleteClearSearchValue"; "multiSelectAutoCompleteOptionsSelected": "multiSelectAutoCompleteOptionsSelected"; "formRichTextEditorContentChange": "formRichTextEditorContentChange"; }, never, never, true, never>;
|
|
110
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DynamicFormFieldDirective, "[ieeesaDynamicFormField]", never, { "config": { "alias": "config"; "required": false; }; "group": { "alias": "group"; "required": false; }; "fileUploadStatus": { "alias": "fileUploadStatus"; "required": false; }; "fileDownloadConfig": { "alias": "fileDownloadConfig"; "required": false; }; "submitResponse": { "alias": "submitResponse"; "required": false; }; "searchResponse": { "alias": "searchResponse"; "required": false; }; }, { "formSearchApply": "formSearchApply"; "formDropdownSelected": "formDropdownSelected"; "formDateSelected": "formDateSelected"; "formTimeSelected": "formTimeSelected"; "formSelectedDateRange": "formSelectedDateRange"; "formSelectSearch": "formSelectSearch"; "formAutoCompleteSearch": "formAutoCompleteSearch"; "autoCompleteClearSearchValue": "autoCompleteClearSearchValue"; "autoCompleteOptionSelected": "autoCompleteOptionSelected"; "formCheckboxSelection": "formCheckboxSelection"; "formInputValue": "formInputValue"; "addFormGroup": "addFormGroup"; "supportTextLinkClick": "supportTextLinkClick"; "formSlideToggleChange": "formSlideToggleChange"; "dropdownOpenedChange": "dropdownOpenedChange"; "formColorPickerChange": "formColorPickerChange"; "formFileUpload": "formFileUpload"; "formRadioOptionSelected": "formRadioOptionSelected"; "ctaButtonClick": "ctaButtonClick"; "formMultiSelectAutoCompleteSearch": "formMultiSelectAutoCompleteSearch"; "multiSelectAutoCompleteClearSearchValue": "multiSelectAutoCompleteClearSearchValue"; "multiSelectAutoCompleteOptionsSelected": "multiSelectAutoCompleteOptionsSelected"; "formRichTextEditorContentChange": "formRichTextEditorContentChange"; }, never, never, true, never>;
|
|
107
111
|
}
|
|
@@ -9,6 +9,24 @@ export interface GetFileDownloadPresignedUrlPayload {
|
|
|
9
9
|
domain: string;
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
+
export interface GetFileDownloadPresignedUrlByAttachmentIdPayload {
|
|
13
|
+
payload: {
|
|
14
|
+
attachmentId?: string;
|
|
15
|
+
preSignedDuration: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface GetFileDownloadPresignedUrlByAttachmentIdResponse {
|
|
19
|
+
status: boolean;
|
|
20
|
+
message: string;
|
|
21
|
+
body: {
|
|
22
|
+
preSignedUrl: string;
|
|
23
|
+
fileName: string;
|
|
24
|
+
s3Path?: string;
|
|
25
|
+
errorMessage?: string;
|
|
26
|
+
} | null | {
|
|
27
|
+
errorCodes: string[];
|
|
28
|
+
};
|
|
29
|
+
}
|
|
12
30
|
export interface GetFileUploadPresignedUrlPayload {
|
|
13
31
|
payload: {
|
|
14
32
|
fileName: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IconButton } from '../models/icon-button.model';
|
|
2
|
+
import { DownloadFile } from './download-file.model';
|
|
2
3
|
import { Menu } from './menu.model';
|
|
3
4
|
export interface ListItem {
|
|
4
5
|
id: string;
|
|
@@ -13,6 +14,7 @@ export interface ListItem {
|
|
|
13
14
|
itemLevel?: number;
|
|
14
15
|
actionMenus?: Menu[];
|
|
15
16
|
actionIcon?: IconButton;
|
|
17
|
+
attachments?: DownloadFile[];
|
|
16
18
|
}
|
|
17
19
|
export interface ListHeader {
|
|
18
20
|
title: string;
|