@ieeesa-npm/presentation 0.25.7 → 0.25.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 +11 -1
- package/esm2022/lib/components/autocomplete/autocomplete.component.mjs +3 -3
- 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/date-picker/date-picker.component.mjs +3 -3
- package/esm2022/lib/components/dynamic-form/dynamic-form.component.mjs +28 -8
- package/esm2022/lib/components/file-upload/file-upload.component.mjs +126 -9
- package/esm2022/lib/components/form-error/form-error.component.mjs +3 -3
- package/esm2022/lib/components/input/input.component.mjs +3 -3
- package/esm2022/lib/components/multi-select-autocomplete/multi-select-autocomplete.component.mjs +3 -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/select/select.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/components/time-picker/time-picker.component.mjs +3 -3
- package/esm2022/lib/directives/dynamic-form-field/dynamic-form-field.directive.mjs +14 -2
- package/esm2022/lib/models/delete-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-upload-payload-model.mjs +2 -0
- 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/tab.model.mjs +1 -1
- package/esm2022/lib/models/view-files-format.model.mjs +7 -0
- package/esm2022/lib/services/file-upload.service.mjs +97 -29
- package/esm2022/public-api.mjs +9 -1
- package/fesm2022/ieeesa-npm-presentation.mjs +350 -85
- package/fesm2022/ieeesa-npm-presentation.mjs.map +1 -1
- package/lib/components/chips/chips.component.d.ts +10 -0
- package/lib/components/dynamic-form/dynamic-form.component.d.ts +15 -4
- package/lib/components/file-upload/file-upload.component.d.ts +60 -3
- package/lib/components/tabs/tabs.component.d.ts +10 -1
- package/lib/directives/dynamic-form-field/dynamic-form-field.directive.d.ts +5 -1
- package/lib/models/delete-file.model.d.ts +10 -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-upload-payload-model.d.ts +3 -0
- package/lib/models/file-upload-response.model.d.ts +11 -0
- package/lib/models/file-upload-status.model.d.ts +6 -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 +46 -11
- package/package.json +1 -1
- package/public-api.d.ts +8 -0
- package/src/lib/assets/constants.json +11 -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;
|
|
@@ -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,7 @@ 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 '@presentation/models/file-upload-status.model';
|
|
17
18
|
import * as i0 from "@angular/core";
|
|
18
19
|
/**
|
|
19
20
|
* Creates a reactive form dynamically based on the passed form field configuration and handles the form events.
|
|
@@ -22,8 +23,9 @@ import * as i0 from "@angular/core";
|
|
|
22
23
|
* @implements {OnInit}
|
|
23
24
|
* @implements {AfterContentInit}
|
|
24
25
|
*/
|
|
25
|
-
export declare class DynamicFormComponent implements OnInit, AfterContentInit {
|
|
26
|
+
export declare class DynamicFormComponent implements OnInit, AfterContentInit, AfterViewInit {
|
|
26
27
|
private fb;
|
|
28
|
+
private elementRef;
|
|
27
29
|
formFields: QueryList<DynamicFormFieldDirective>;
|
|
28
30
|
private _formGroups;
|
|
29
31
|
/**
|
|
@@ -46,6 +48,9 @@ export declare class DynamicFormComponent implements OnInit, AfterContentInit {
|
|
|
46
48
|
*/
|
|
47
49
|
set searchResponse(value: any);
|
|
48
50
|
get searchResponse(): any;
|
|
51
|
+
private _fileUploadStatus;
|
|
52
|
+
get fileUploadStatus(): FileUploadStatus;
|
|
53
|
+
set fileUploadStatus(value: FileUploadStatus);
|
|
49
54
|
colWidth: FormGrid;
|
|
50
55
|
isLegendVisible: boolean;
|
|
51
56
|
rightButtonLabel: string;
|
|
@@ -53,6 +58,7 @@ export declare class DynamicFormComponent implements OnInit, AfterContentInit {
|
|
|
53
58
|
isSubmitButtonDisabled: boolean;
|
|
54
59
|
isLeftButtonDisabled: boolean;
|
|
55
60
|
isLeftButtonNeeded: boolean;
|
|
61
|
+
isRightButtonNeeded: boolean;
|
|
56
62
|
actionButtonAlign: AlignType;
|
|
57
63
|
alignmentType: typeof AlignType;
|
|
58
64
|
formSubmit: EventEmitter<any>;
|
|
@@ -94,7 +100,7 @@ export declare class DynamicFormComponent implements OnInit, AfterContentInit {
|
|
|
94
100
|
formGroupArray: FormGroup[];
|
|
95
101
|
formControlArray: any[];
|
|
96
102
|
legendsArray: string[];
|
|
97
|
-
constructor(fb: FormBuilder);
|
|
103
|
+
constructor(fb: FormBuilder, elementRef: ElementRef);
|
|
98
104
|
/**
|
|
99
105
|
* Implementation of ngOnInit lifecycle hook method to create form group
|
|
100
106
|
* @memberof DynamicFormComponent
|
|
@@ -105,6 +111,11 @@ export declare class DynamicFormComponent implements OnInit, AfterContentInit {
|
|
|
105
111
|
* @memberof DynamicFormComponent
|
|
106
112
|
*/
|
|
107
113
|
ngAfterContentInit(): void;
|
|
114
|
+
/**
|
|
115
|
+
* Sets the focus to the first field.
|
|
116
|
+
* @memberof DynamicFormComponent
|
|
117
|
+
*/
|
|
118
|
+
ngAfterViewInit(): void;
|
|
108
119
|
/**
|
|
109
120
|
* Creates form group on the basis of formGroups configuration input
|
|
110
121
|
* @return {void}
|
|
@@ -315,5 +326,5 @@ export declare class DynamicFormComponent implements OnInit, AfterContentInit {
|
|
|
315
326
|
*/
|
|
316
327
|
onCheckboxCTAButtonClick(event: IconButton): void;
|
|
317
328
|
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>;
|
|
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>;
|
|
319
330
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
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';
|
|
7
10
|
import * as i0 from "@angular/core";
|
|
8
11
|
/**
|
|
9
12
|
* Provides functionality for uploading files to aws s3 bucket.
|
|
@@ -14,6 +17,7 @@ import * as i0 from "@angular/core";
|
|
|
14
17
|
export declare class FileUploadComponent implements OnInit {
|
|
15
18
|
formUtilityService: FormUtilityService;
|
|
16
19
|
fileUploadService: FileUploadService;
|
|
20
|
+
fileField: ElementRef;
|
|
17
21
|
constants: {
|
|
18
22
|
ariaLabel: {
|
|
19
23
|
clear: string;
|
|
@@ -229,6 +233,13 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
229
233
|
allowedFileFormat: string;
|
|
230
234
|
browseFiles: string;
|
|
231
235
|
uploadProgress: string;
|
|
236
|
+
upload: string;
|
|
237
|
+
mb: string;
|
|
238
|
+
uploadFor: string;
|
|
239
|
+
uploadErrorMsg: string;
|
|
240
|
+
of: string;
|
|
241
|
+
filesUploaded: string;
|
|
242
|
+
fileAlreadyExists: string;
|
|
232
243
|
};
|
|
233
244
|
ariaLabel: {
|
|
234
245
|
fileUpload: string;
|
|
@@ -265,6 +276,9 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
265
276
|
"2064": string;
|
|
266
277
|
};
|
|
267
278
|
};
|
|
279
|
+
limit: {
|
|
280
|
+
maxFileUpload: number;
|
|
281
|
+
};
|
|
268
282
|
};
|
|
269
283
|
list: {
|
|
270
284
|
defaultIndentation: number;
|
|
@@ -289,6 +303,13 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
289
303
|
allowedFileFormat: string;
|
|
290
304
|
browseFiles: string;
|
|
291
305
|
uploadProgress: string;
|
|
306
|
+
upload: string;
|
|
307
|
+
mb: string;
|
|
308
|
+
uploadFor: string;
|
|
309
|
+
uploadErrorMsg: string;
|
|
310
|
+
of: string;
|
|
311
|
+
filesUploaded: string;
|
|
312
|
+
fileAlreadyExists: string;
|
|
292
313
|
};
|
|
293
314
|
fileUploadAriaLabel: {
|
|
294
315
|
fileUpload: string;
|
|
@@ -318,11 +339,15 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
318
339
|
group: FormGroup;
|
|
319
340
|
isValidFileType: boolean;
|
|
320
341
|
isValidFileSize: boolean;
|
|
342
|
+
isValidMaxFileUploadLimit: boolean;
|
|
321
343
|
selectedFiles: FileList | File | any;
|
|
322
344
|
selectedFileNames: string;
|
|
323
345
|
isFormField: boolean;
|
|
324
346
|
totalSize: number;
|
|
325
347
|
uploadedFiles: FileList | File | any;
|
|
348
|
+
actionButtonAlign: AlignType;
|
|
349
|
+
alignmentType: typeof AlignType;
|
|
350
|
+
isUploadButtonDisabled: boolean;
|
|
326
351
|
formControlName: string;
|
|
327
352
|
isFileSelected: boolean;
|
|
328
353
|
supportMessage: string;
|
|
@@ -330,8 +355,17 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
330
355
|
isMultiFileUpload: boolean;
|
|
331
356
|
isUploadInProgress: boolean;
|
|
332
357
|
fileUploadHeading: string;
|
|
358
|
+
isAllowAnyFileType: boolean;
|
|
359
|
+
viewFilesFormat: ViewFilesFormat;
|
|
360
|
+
isUploadButtonNeeded: boolean;
|
|
333
361
|
maxUploadFileSize: number;
|
|
334
362
|
private uploadedSizeValue;
|
|
363
|
+
fileUploadErrorPosition: string;
|
|
364
|
+
maxFilesUploadLimit: number;
|
|
365
|
+
maxFilesUploadLimitErrorMessage: string;
|
|
366
|
+
private _fileUploadStatus;
|
|
367
|
+
get fileUploadStatus(): FileUploadStatus;
|
|
368
|
+
set fileUploadStatus(value: FileUploadStatus);
|
|
335
369
|
get uploadedSize(): number;
|
|
336
370
|
set uploadedSize(value: number);
|
|
337
371
|
uploadSelectedFiles: EventEmitter<File | FileList>;
|
|
@@ -348,7 +382,7 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
348
382
|
*/
|
|
349
383
|
getAllowedFileFormatSizeMessage(): void;
|
|
350
384
|
/**
|
|
351
|
-
* Handles the selected
|
|
385
|
+
* Handles the selected file(s) and emits FileUpload event emitter for uploading the file(s).
|
|
352
386
|
* @param {(File | FileList)} file
|
|
353
387
|
* @memberof FileUploadComponent
|
|
354
388
|
*/
|
|
@@ -393,6 +427,29 @@ export declare class FileUploadComponent implements OnInit {
|
|
|
393
427
|
* @memberof FileUploadComponent
|
|
394
428
|
*/
|
|
395
429
|
trackByFn(index: number): number | string;
|
|
430
|
+
/**
|
|
431
|
+
* Triggers on browse element clicked
|
|
432
|
+
* @memberof FileUploadComponent
|
|
433
|
+
*/
|
|
434
|
+
fileClick(): void;
|
|
435
|
+
/**
|
|
436
|
+
* Display comma separated failed file names
|
|
437
|
+
* @param {string[]} filesNamesUploadFailed
|
|
438
|
+
* @return {*} {string}
|
|
439
|
+
* @memberof FileUploadComponent
|
|
440
|
+
*/
|
|
441
|
+
displayFileNames(fileNames: string[]): string;
|
|
442
|
+
/**
|
|
443
|
+
* Removes file from respective properties used.
|
|
444
|
+
* @param {number} index
|
|
445
|
+
* @memberof FileUploadComponent
|
|
446
|
+
*/
|
|
447
|
+
removeFile(index: number): void;
|
|
448
|
+
/**
|
|
449
|
+
* Disabled file upload button
|
|
450
|
+
* @memberof FileUploadComponent
|
|
451
|
+
*/
|
|
452
|
+
disableUploadButton(): void;
|
|
396
453
|
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>;
|
|
454
|
+
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>;
|
|
398
455
|
}
|
|
@@ -6,6 +6,7 @@ import { ConfirmationModalData } from '../../models/confirmation-modal-data.mode
|
|
|
6
6
|
import { Subject } from 'rxjs';
|
|
7
7
|
import { FormGroup } from '@angular/forms';
|
|
8
8
|
import { EventsAndMeetingRouteConfig, UserPermission } from '@ieeesa-npm/shared';
|
|
9
|
+
import { DynamicProperties } from '@presentation/models/dynamic-properties.model';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
export declare class TabsComponent implements OnInit, OnDestroy {
|
|
11
12
|
dialog: MatDialog;
|
|
@@ -28,12 +29,14 @@ export declare class TabsComponent implements OnInit, OnDestroy {
|
|
|
28
29
|
constants: any;
|
|
29
30
|
modalConfigTexts: any;
|
|
30
31
|
isViewOnly: string | boolean;
|
|
32
|
+
isMemberOfGroup: string | boolean;
|
|
31
33
|
eventId: string;
|
|
32
34
|
meetingId: string;
|
|
33
35
|
actionType: any;
|
|
34
36
|
routePaths: EventsAndMeetingRouteConfig;
|
|
35
37
|
apiBaseURL: string;
|
|
36
38
|
userPermissions: UserPermission[];
|
|
39
|
+
dynamicProperties: DynamicProperties[];
|
|
37
40
|
constructor(dialog: MatDialog);
|
|
38
41
|
/**
|
|
39
42
|
* Verifies tabs count and calls createComponent() to load selected component.
|
|
@@ -59,6 +62,12 @@ export declare class TabsComponent implements OnInit, OnDestroy {
|
|
|
59
62
|
* @memberof TabsComponent
|
|
60
63
|
*/
|
|
61
64
|
createComponent(tab: Tab): void;
|
|
65
|
+
/**
|
|
66
|
+
* Sets dynamic input property which is being sent by the consumer component and its value is not undefined for the component loaded by the tab component.
|
|
67
|
+
* @param {[]} properties
|
|
68
|
+
* @memberof TabsComponent
|
|
69
|
+
*/
|
|
70
|
+
setDynamicComponentProperty(properties: []): void;
|
|
62
71
|
/**
|
|
63
72
|
* Returns unique identifier for the tab.
|
|
64
73
|
* @param {number} index
|
|
@@ -73,5 +82,5 @@ export declare class TabsComponent implements OnInit, OnDestroy {
|
|
|
73
82
|
*/
|
|
74
83
|
ngOnDestroy(): void;
|
|
75
84
|
static ɵfac: i0.ɵɵFactoryDeclaration<TabsComponent, never>;
|
|
76
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TabsComponent, "ieeesa-tabs", never, { "selectedTabIndex": { "alias": "selectedTabIndex"; "required": false; }; "tabs": { "alias": "tabs"; "required": false; }; "isFormChanged": { "alias": "isFormChanged"; "required": false; }; "confirmationModalConfig": { "alias": "confirmationModalConfig"; "required": false; }; "isViewOnly": { "alias": "isViewOnly"; "required": false; }; "eventId": { "alias": "eventId"; "required": false; }; "meetingId": { "alias": "meetingId"; "required": false; }; "actionType": { "alias": "actionType"; "required": false; }; "routePaths": { "alias": "routePaths"; "required": false; }; "apiBaseURL": { "alias": "apiBaseURL"; "required": false; }; "userPermissions": { "alias": "userPermissions"; "required": false; }; }, { "selectedIndexChange": "selectedIndexChange"; }, never, never, true, never>;
|
|
85
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TabsComponent, "ieeesa-tabs", never, { "selectedTabIndex": { "alias": "selectedTabIndex"; "required": false; }; "tabs": { "alias": "tabs"; "required": false; }; "isFormChanged": { "alias": "isFormChanged"; "required": false; }; "confirmationModalConfig": { "alias": "confirmationModalConfig"; "required": false; }; "isViewOnly": { "alias": "isViewOnly"; "required": false; }; "isMemberOfGroup": { "alias": "isMemberOfGroup"; "required": false; }; "eventId": { "alias": "eventId"; "required": false; }; "meetingId": { "alias": "meetingId"; "required": false; }; "actionType": { "alias": "actionType"; "required": false; }; "routePaths": { "alias": "routePaths"; "required": false; }; "apiBaseURL": { "alias": "apiBaseURL"; "required": false; }; "userPermissions": { "alias": "userPermissions"; "required": false; }; }, { "selectedIndexChange": "selectedIndexChange"; }, never, never, true, never>;
|
|
77
86
|
}
|
|
@@ -12,6 +12,7 @@ import { SelectOpenedState } from '../../models/select-opened-state.model';
|
|
|
12
12
|
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
|
+
import { FileUploadStatus } from '@presentation/models/file-upload-status.model';
|
|
15
16
|
import * as i0 from "@angular/core";
|
|
16
17
|
/**
|
|
17
18
|
* Provides the implementation of DynamicFormFieldDirective which hosts and creates the form fields components dynamically.
|
|
@@ -38,6 +39,9 @@ export declare class DynamicFormFieldDirective implements FormField, OnInit, OnD
|
|
|
38
39
|
*/
|
|
39
40
|
set group(value: FormGroup);
|
|
40
41
|
get group(): FormGroup;
|
|
42
|
+
private _fileUploadStatus;
|
|
43
|
+
get fileUploadStatus(): FileUploadStatus;
|
|
44
|
+
set fileUploadStatus(value: FileUploadStatus);
|
|
41
45
|
private _submitResponse;
|
|
42
46
|
/**
|
|
43
47
|
* Sets the submit response of form submit event
|
|
@@ -99,5 +103,5 @@ export declare class DynamicFormFieldDirective implements FormField, OnInit, OnD
|
|
|
99
103
|
*/
|
|
100
104
|
ngOnDestroy(): void;
|
|
101
105
|
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormFieldDirective, never>;
|
|
102
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DynamicFormFieldDirective, "[ieeesaDynamicFormField]", never, { "config": { "alias": "config"; "required": false; }; "group": { "alias": "group"; "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>;
|
|
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>;
|
|
103
107
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare enum DynamicProperties {
|
|
2
|
+
EVENT_ID = "eventId",
|
|
3
|
+
MEETING_ID = "meetingId",
|
|
4
|
+
ROUTE_PATHS = "routePaths",
|
|
5
|
+
API_BASE_URL = "apiBaseURL",
|
|
6
|
+
USER_PERMISSIONS = "userPermissions",
|
|
7
|
+
ACTION_TYPE = "actionType",
|
|
8
|
+
IS_VIEW_ONLY = "isViewOnly",
|
|
9
|
+
IS_MEMBER_OF_GROUP = "isMemberOfGroup"
|
|
10
|
+
}
|
|
@@ -10,6 +10,8 @@ import { SlideToggleOption } from './slide-toggle-options.model';
|
|
|
10
10
|
import { ColorFormat, ColorsAnimation } from './color-format.model';
|
|
11
11
|
import { AllowedFileTypes } from './allowed-file-types.model';
|
|
12
12
|
import { EditorConfig } from 'ngx-simple-text-editor';
|
|
13
|
+
import { ViewFilesFormat } from './view-files-format.model';
|
|
14
|
+
import { AlignType } from './align-type.model';
|
|
13
15
|
export interface FieldConfig {
|
|
14
16
|
isSortNeeded?: boolean;
|
|
15
17
|
disabled?: boolean;
|
|
@@ -84,4 +86,11 @@ export interface FieldConfig {
|
|
|
84
86
|
canHideTextInput?: boolean;
|
|
85
87
|
multiSelectAutoCompleteOptions?: AutoCompleteOption[];
|
|
86
88
|
editorConfig?: EditorConfig;
|
|
89
|
+
isAllowAnyFileType?: boolean;
|
|
90
|
+
viewFilesFormat?: ViewFilesFormat;
|
|
91
|
+
isUploadButtonNeeded?: boolean;
|
|
92
|
+
actionButtonAlign?: AlignType;
|
|
93
|
+
fileUploadErrorPosition?: string;
|
|
94
|
+
maxFilesUploadLimit?: number;
|
|
95
|
+
maxFilesUploadLimitErrorMessage?: string;
|
|
87
96
|
}
|
|
@@ -3,6 +3,9 @@ import { OnDestroy } from '@angular/core';
|
|
|
3
3
|
import { AlertsService, HttpService, LoaderNotificationService } from '@ieeesa-npm/utility';
|
|
4
4
|
import { FileUploadPresignedUrl } from '../models/file-upload-presigned-url-res.model';
|
|
5
5
|
import { Observable, Subject } from 'rxjs';
|
|
6
|
+
import { FileUploadPayload } from '../models/file-upload-payload-model';
|
|
7
|
+
import { FileUploadBodyResponse, FileUploadResponse } from '../models/file-upload-response.model';
|
|
8
|
+
import { DeleteFileResponse } from '../models/delete-file.model';
|
|
6
9
|
import * as i0 from "@angular/core";
|
|
7
10
|
/**
|
|
8
11
|
* This service interacts with the server to obtain pre-signed URLs for file upload and uploads files to Amazon S3.
|
|
@@ -192,12 +195,7 @@ export declare class FileUploadService implements OnDestroy {
|
|
|
192
195
|
ariaLabel: {
|
|
193
196
|
spinner: string;
|
|
194
197
|
};
|
|
195
|
-
};
|
|
196
|
-
* Retrieves presigned URL for downloading files to Amazon S3 bucket.
|
|
197
|
-
* @param {(File | FileList)} file
|
|
198
|
-
* @return {Observable<string>}
|
|
199
|
-
* @memberof FileUploadService
|
|
200
|
-
*/
|
|
198
|
+
};
|
|
201
199
|
defaultWelcomeBgColor: string;
|
|
202
200
|
timePicker: {
|
|
203
201
|
defaultTimeFormat: number;
|
|
@@ -233,6 +231,13 @@ export declare class FileUploadService implements OnDestroy {
|
|
|
233
231
|
allowedFileFormat: string;
|
|
234
232
|
browseFiles: string;
|
|
235
233
|
uploadProgress: string;
|
|
234
|
+
upload: string;
|
|
235
|
+
mb: string;
|
|
236
|
+
uploadFor: string;
|
|
237
|
+
uploadErrorMsg: string;
|
|
238
|
+
of: string;
|
|
239
|
+
filesUploaded: string;
|
|
240
|
+
fileAlreadyExists: string;
|
|
236
241
|
};
|
|
237
242
|
ariaLabel: {
|
|
238
243
|
fileUpload: string;
|
|
@@ -269,6 +274,9 @@ export declare class FileUploadService implements OnDestroy {
|
|
|
269
274
|
"2064": string;
|
|
270
275
|
};
|
|
271
276
|
};
|
|
277
|
+
limit: {
|
|
278
|
+
maxFileUpload: number;
|
|
279
|
+
};
|
|
272
280
|
};
|
|
273
281
|
list: {
|
|
274
282
|
defaultIndentation: number;
|
|
@@ -290,6 +298,9 @@ export declare class FileUploadService implements OnDestroy {
|
|
|
290
298
|
fileByteArray: Uint8Array | undefined;
|
|
291
299
|
httpClient: HttpClient;
|
|
292
300
|
isFileUploading: boolean;
|
|
301
|
+
filesNamesUploadFailed: string[];
|
|
302
|
+
filesUploadedSuccessfullyCount: number;
|
|
303
|
+
uploadedFileName: string;
|
|
293
304
|
constructor(httpService: HttpService, handler: HttpBackend, alertService: AlertsService, loaderNotificationService: LoaderNotificationService);
|
|
294
305
|
/**
|
|
295
306
|
* Sets the base URL for API requests.
|
|
@@ -305,13 +316,30 @@ export declare class FileUploadService implements OnDestroy {
|
|
|
305
316
|
*/
|
|
306
317
|
getFileUploadPresignedUrl(file: File | FileList, appId: string): Observable<FileUploadPresignedUrl>;
|
|
307
318
|
/**
|
|
308
|
-
*
|
|
309
|
-
* @param
|
|
310
|
-
* @param
|
|
319
|
+
* Gets pre-signed URL for the files to be uploaded in S3 bucket
|
|
320
|
+
* @param fileUploadPayload
|
|
321
|
+
* @param fileUploadAPIPath
|
|
322
|
+
*/
|
|
323
|
+
getPreSignedURL(fileUploadPayload: FileUploadPayload, fileUploadAPIPath?: string): Observable<FileUploadResponse>;
|
|
324
|
+
/**
|
|
325
|
+
* Uploads file to AWS S3 using a pre-signed URL.
|
|
326
|
+
* @param {string} preSignedUrl
|
|
327
|
+
* @param files
|
|
328
|
+
* @param isMultipleFileUpload
|
|
311
329
|
* @return {Observable<any>} -Returns an observable that emits the response after uploading the file to S3.
|
|
312
330
|
* @memberof FileUploadService
|
|
313
331
|
*/
|
|
314
|
-
uploadFileToS3(
|
|
332
|
+
uploadFileToS3(preSignedUrl: FileUploadBodyResponse[] | string, files: File | FileList, isMultipleFileUpload?: boolean): Observable<any>;
|
|
333
|
+
/**
|
|
334
|
+
* Makes http call to AWS to upload file in S3 bucket
|
|
335
|
+
* @param {string} preSignedUrl
|
|
336
|
+
* @param {File} file
|
|
337
|
+
* @param {string} fileType
|
|
338
|
+
* @param {number} fileSize
|
|
339
|
+
* @return {*} {Observable<any>}
|
|
340
|
+
* @memberof FileUploadService
|
|
341
|
+
*/
|
|
342
|
+
httpCallToAWS(preSignedUrl: string, file: File, fileType: string, fileSize: number): Observable<any>;
|
|
315
343
|
/**
|
|
316
344
|
* Gets file upload progress.
|
|
317
345
|
* @param {*} message
|
|
@@ -325,7 +353,7 @@ export declare class FileUploadService implements OnDestroy {
|
|
|
325
353
|
* @return {*}
|
|
326
354
|
* @memberof FileUploadService
|
|
327
355
|
*/
|
|
328
|
-
getEventMessage(event: HttpEvent<any>, file: File
|
|
356
|
+
getEventMessage(event: HttpEvent<any>, file: File): string | boolean;
|
|
329
357
|
/**
|
|
330
358
|
* Converts file to byte array.
|
|
331
359
|
* @param {File} file
|
|
@@ -388,6 +416,13 @@ export declare class FileUploadService implements OnDestroy {
|
|
|
388
416
|
* @memberof FileUploadService
|
|
389
417
|
*/
|
|
390
418
|
private getFileExtension;
|
|
419
|
+
/**
|
|
420
|
+
* Deletes file by given fileId
|
|
421
|
+
* @param {string} fileId
|
|
422
|
+
* @return {*} {Observable<DeleteFileResponse>}
|
|
423
|
+
* @memberof FileUploadService
|
|
424
|
+
*/
|
|
425
|
+
deleteFile(deleteFileApiPath: string): Observable<DeleteFileResponse>;
|
|
391
426
|
/**
|
|
392
427
|
* Implementation of ngOnDestroy lifecycle hook method to unsubscribe the open observable subscriptions.
|
|
393
428
|
* @memberof FileUploadService
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -51,8 +51,11 @@ export * from './lib/models/calendar.model';
|
|
|
51
51
|
export * from './lib/models/checkbox-option.model';
|
|
52
52
|
export * from './lib/models/confirmation-modal-data.model';
|
|
53
53
|
export * from './lib/models/date-picker.model';
|
|
54
|
+
export * from './lib/models/delete-file.model';
|
|
55
|
+
export * from './lib/models/dynamic-properties.model';
|
|
54
56
|
export * from './lib/models/event-emit-type.model';
|
|
55
57
|
export * from './lib/models/field-config.model';
|
|
58
|
+
export * from './lib/models/file-attachment.model';
|
|
56
59
|
export * from './lib/models/footer-config.model';
|
|
57
60
|
export * from './lib/models/form-control-types.model';
|
|
58
61
|
export * from './lib/models/form-field.model';
|
|
@@ -79,6 +82,8 @@ export * from './lib/models/table-actions.model';
|
|
|
79
82
|
export * from './lib/models/table-schema.model';
|
|
80
83
|
export * from './lib/models/breadcrumb.model';
|
|
81
84
|
export * from './lib/models/tile.model';
|
|
85
|
+
export * from './lib/models/file-upload-response.model';
|
|
86
|
+
export * from './lib/models/file-upload-status.model';
|
|
82
87
|
export * from './lib/models/filters-options.model';
|
|
83
88
|
export * from './lib/models/profile-menu.model';
|
|
84
89
|
export * from './lib/models/slide-toggle-options.model';
|
|
@@ -87,10 +92,13 @@ export * from './lib/models/card-button.model';
|
|
|
87
92
|
export * from './lib/models/card-info.model';
|
|
88
93
|
export * from './lib/models/color-format.model';
|
|
89
94
|
export * from './lib/models/allowed-file-types.model';
|
|
95
|
+
export * from './lib/models/file-upload-payload-model';
|
|
90
96
|
export * from './lib/models/file-upload-presigned-url-res.model';
|
|
97
|
+
export * from './lib/models/file-upload-response.model';
|
|
91
98
|
export * from './lib/models/accordion-info.model';
|
|
92
99
|
export * from './lib/models/inactive-tenant.model';
|
|
93
100
|
export * from './lib/models/table-column-menu-info.model';
|
|
101
|
+
export * from './lib/models/view-files-format.model';
|
|
94
102
|
export * from './lib/services/datepicker.service';
|
|
95
103
|
export * from './lib/services/form-utility.service';
|
|
96
104
|
export * from './lib/services/file-upload.service';
|
|
@@ -548,7 +548,14 @@
|
|
|
548
548
|
"allowedFileSize2": "mb only;",
|
|
549
549
|
"allowedFileFormat": "Allowed file format(s): ",
|
|
550
550
|
"browseFiles": "Browse Files",
|
|
551
|
-
"uploadProgress": "Uploading... please wait"
|
|
551
|
+
"uploadProgress": "Uploading... please wait",
|
|
552
|
+
"upload": "Upload",
|
|
553
|
+
"mb": "MB",
|
|
554
|
+
"uploadFor": "Upload for",
|
|
555
|
+
"uploadErrorMsg": "could not be completed. Please try again",
|
|
556
|
+
"of": "of",
|
|
557
|
+
"filesUploaded": "files Uploaded",
|
|
558
|
+
"fileAlreadyExists": "already exists"
|
|
552
559
|
},
|
|
553
560
|
"ariaLabel": {
|
|
554
561
|
"fileUpload": "Drag and Drop your files here or Click 'Browse Files'.",
|
|
@@ -586,6 +593,9 @@
|
|
|
586
593
|
"2063": "File Name is required.",
|
|
587
594
|
"2064": "Application Id or Domain is required."
|
|
588
595
|
}
|
|
596
|
+
},
|
|
597
|
+
"limit": {
|
|
598
|
+
"maxFileUpload": 5
|
|
589
599
|
}
|
|
590
600
|
},
|
|
591
601
|
"list": {
|