@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
|
@@ -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
|
}
|
|
@@ -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 '../../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,8 @@ 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 '../../models/file-upload-status.model';
|
|
16
|
+
import { FileDownloadConfig } from '../../models/file-download-config.model';
|
|
15
17
|
import * as i0 from "@angular/core";
|
|
16
18
|
/**
|
|
17
19
|
* Provides the implementation of DynamicFormFieldDirective which hosts and creates the form fields components dynamically.
|
|
@@ -38,6 +40,12 @@ export declare class DynamicFormFieldDirective implements FormField, OnInit, OnD
|
|
|
38
40
|
*/
|
|
39
41
|
set group(value: FormGroup);
|
|
40
42
|
get group(): FormGroup;
|
|
43
|
+
private _fileUploadStatus;
|
|
44
|
+
get fileUploadStatus(): FileUploadStatus;
|
|
45
|
+
set fileUploadStatus(value: FileUploadStatus);
|
|
46
|
+
_fileDownloadConfig: FileDownloadConfig;
|
|
47
|
+
set fileDownloadConfig(value: FileDownloadConfig);
|
|
48
|
+
get fileDownloadConfig(): FileDownloadConfig;
|
|
41
49
|
private _submitResponse;
|
|
42
50
|
/**
|
|
43
51
|
* Sets the submit response of form submit event
|
|
@@ -99,5 +107,5 @@ export declare class DynamicFormFieldDirective implements FormField, OnInit, OnD
|
|
|
99
107
|
*/
|
|
100
108
|
ngOnDestroy(): void;
|
|
101
109
|
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>;
|
|
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>;
|
|
103
111
|
}
|
|
@@ -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
|
}
|
|
@@ -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;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DownloadFile } from './download-file.model';
|
|
2
|
+
export interface FileUploadStatus {
|
|
3
|
+
filesUploadedSuccessfullyCount: number;
|
|
4
|
+
filesNamesUploadFailed: string[];
|
|
5
|
+
alreadyExistsFiles: string[];
|
|
6
|
+
isUploadingStart: boolean;
|
|
7
|
+
uploadedFiles: DownloadFile[];
|
|
8
|
+
}
|
|
@@ -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;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { HttpBackend, HttpClient, HttpEvent } from '@angular/common/http';
|
|
2
2
|
import { OnDestroy } from '@angular/core';
|
|
3
3
|
import { AlertsService, HttpService, LoaderNotificationService } from '@ieeesa-npm/utility';
|
|
4
|
-
import { FileUploadPresignedUrl } from '../models/file-upload-presigned-url-res.model';
|
|
4
|
+
import { FileUploadPresignedUrl, GetFileDownloadPresignedUrlByAttachmentIdResponse } 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';
|
|
9
|
+
import { DownloadFile } from '../models/download-file.model';
|
|
6
10
|
import * as i0 from "@angular/core";
|
|
7
11
|
/**
|
|
8
12
|
* This service interacts with the server to obtain pre-signed URLs for file upload and uploads files to Amazon S3.
|
|
@@ -192,15 +196,17 @@ export declare class FileUploadService implements OnDestroy {
|
|
|
192
196
|
ariaLabel: {
|
|
193
197
|
spinner: string;
|
|
194
198
|
};
|
|
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
|
-
*/
|
|
199
|
+
};
|
|
201
200
|
defaultWelcomeBgColor: string;
|
|
202
201
|
timePicker: {
|
|
203
202
|
defaultTimeFormat: number;
|
|
203
|
+
/**
|
|
204
|
+
* Return distinct message for sent, upload progress, & response events.
|
|
205
|
+
* @param {HttpEvent<any>} event
|
|
206
|
+
* @param {(File | FileList)} file
|
|
207
|
+
* @return {*}
|
|
208
|
+
* @memberof FileUploadService
|
|
209
|
+
*/
|
|
204
210
|
timePickerIcon: string;
|
|
205
211
|
};
|
|
206
212
|
colorPicker: {
|
|
@@ -233,6 +239,13 @@ export declare class FileUploadService implements OnDestroy {
|
|
|
233
239
|
allowedFileFormat: string;
|
|
234
240
|
browseFiles: string;
|
|
235
241
|
uploadProgress: string;
|
|
242
|
+
upload: string;
|
|
243
|
+
mb: string;
|
|
244
|
+
uploadFor: string;
|
|
245
|
+
uploadErrorMsg: string;
|
|
246
|
+
of: string;
|
|
247
|
+
filesUploaded: string;
|
|
248
|
+
fileAlreadyExists: string;
|
|
236
249
|
};
|
|
237
250
|
ariaLabel: {
|
|
238
251
|
fileUpload: string;
|
|
@@ -269,6 +282,9 @@ export declare class FileUploadService implements OnDestroy {
|
|
|
269
282
|
"2064": string;
|
|
270
283
|
};
|
|
271
284
|
};
|
|
285
|
+
limit: {
|
|
286
|
+
maxFileUpload: number;
|
|
287
|
+
};
|
|
272
288
|
};
|
|
273
289
|
list: {
|
|
274
290
|
defaultIndentation: number;
|
|
@@ -285,11 +301,29 @@ export declare class FileUploadService implements OnDestroy {
|
|
|
285
301
|
colorPicker: string;
|
|
286
302
|
};
|
|
287
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
|
+
};
|
|
288
319
|
};
|
|
289
320
|
apiBaseUrl: string;
|
|
290
321
|
fileByteArray: Uint8Array | undefined;
|
|
291
322
|
httpClient: HttpClient;
|
|
292
323
|
isFileUploading: boolean;
|
|
324
|
+
filesNamesUploadFailed: string[];
|
|
325
|
+
filesUploadedSuccessfullyCount: number;
|
|
326
|
+
uploadedFileName: string;
|
|
293
327
|
constructor(httpService: HttpService, handler: HttpBackend, alertService: AlertsService, loaderNotificationService: LoaderNotificationService);
|
|
294
328
|
/**
|
|
295
329
|
* Sets the base URL for API requests.
|
|
@@ -305,13 +339,30 @@ export declare class FileUploadService implements OnDestroy {
|
|
|
305
339
|
*/
|
|
306
340
|
getFileUploadPresignedUrl(file: File | FileList, appId: string): Observable<FileUploadPresignedUrl>;
|
|
307
341
|
/**
|
|
308
|
-
*
|
|
309
|
-
* @param
|
|
310
|
-
* @param
|
|
342
|
+
* Gets pre-signed URL for the files to be uploaded in S3 bucket
|
|
343
|
+
* @param fileUploadPayload
|
|
344
|
+
* @param fileUploadAPIPath
|
|
345
|
+
*/
|
|
346
|
+
getPreSignedURL(fileUploadPayload: FileUploadPayload, fileUploadAPIPath?: string): Observable<FileUploadResponse>;
|
|
347
|
+
/**
|
|
348
|
+
* Uploads file to AWS S3 using a pre-signed URL.
|
|
349
|
+
* @param {string} preSignedUrl
|
|
350
|
+
* @param files
|
|
351
|
+
* @param isMultipleFileUpload
|
|
311
352
|
* @return {Observable<any>} -Returns an observable that emits the response after uploading the file to S3.
|
|
312
353
|
* @memberof FileUploadService
|
|
313
354
|
*/
|
|
314
|
-
uploadFileToS3(
|
|
355
|
+
uploadFileToS3(preSignedUrl: FileUploadBodyResponse[] | string, files: File | FileList, isMultipleFileUpload?: boolean): Observable<any>;
|
|
356
|
+
/**
|
|
357
|
+
* Makes http call to AWS to upload file in S3 bucket
|
|
358
|
+
* @param {string} preSignedUrl
|
|
359
|
+
* @param {File} file
|
|
360
|
+
* @param {string} fileType
|
|
361
|
+
* @param {number} fileSize
|
|
362
|
+
* @return {*} {Observable<any>}
|
|
363
|
+
* @memberof FileUploadService
|
|
364
|
+
*/
|
|
365
|
+
httpCallToAWS(preSignedUrl: string, file: File, fileType: string, fileSize: number): Observable<any>;
|
|
315
366
|
/**
|
|
316
367
|
* Gets file upload progress.
|
|
317
368
|
* @param {*} message
|
|
@@ -325,7 +376,7 @@ export declare class FileUploadService implements OnDestroy {
|
|
|
325
376
|
* @return {*}
|
|
326
377
|
* @memberof FileUploadService
|
|
327
378
|
*/
|
|
328
|
-
getEventMessage(event: HttpEvent<any>, file: File
|
|
379
|
+
getEventMessage(event: HttpEvent<any>, file: File): string | boolean;
|
|
329
380
|
/**
|
|
330
381
|
* Converts file to byte array.
|
|
331
382
|
* @param {File} file
|
|
@@ -355,7 +406,7 @@ export declare class FileUploadService implements OnDestroy {
|
|
|
355
406
|
* @return {Observable<string>}
|
|
356
407
|
* @memberof FileUploadService
|
|
357
408
|
*/
|
|
358
|
-
getFileDownloadPresignedUrls(file: File | FileList | string, isPublicAPI?: boolean, domainUrl?: string): Observable<string>;
|
|
409
|
+
getFileDownloadPresignedUrls(file: File | FileList | string | DownloadFile, isPublicAPI?: boolean, domainUrl?: string, downloadUri?: string): Observable<string | GetFileDownloadPresignedUrlByAttachmentIdResponse>;
|
|
359
410
|
/**
|
|
360
411
|
* Downloads file to AWS S3 using a presigned URL.
|
|
361
412
|
* @return {Observable<any>}
|
|
@@ -388,6 +439,13 @@ export declare class FileUploadService implements OnDestroy {
|
|
|
388
439
|
* @memberof FileUploadService
|
|
389
440
|
*/
|
|
390
441
|
private getFileExtension;
|
|
442
|
+
/**
|
|
443
|
+
* Deletes file by given fileId
|
|
444
|
+
* @param {string} fileId
|
|
445
|
+
* @return {*} {Observable<DeleteFileResponse>}
|
|
446
|
+
* @memberof FileUploadService
|
|
447
|
+
*/
|
|
448
|
+
deleteFile(deleteFileApiPath: string): Observable<DeleteFileResponse>;
|
|
391
449
|
/**
|
|
392
450
|
* Implementation of ngOnDestroy lifecycle hook method to unsubscribe the open observable subscriptions.
|
|
393
451
|
* @memberof FileUploadService
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export * from './lib/components/slide-toggle/slide-toggle.component';
|
|
|
34
34
|
export * from './lib/components/card/card.component';
|
|
35
35
|
export * from './lib/components/color-picker/color-picker.component';
|
|
36
36
|
export * from './lib/components/file-upload/file-upload.component';
|
|
37
|
+
export * from './lib/components/file-download/file-download.component';
|
|
37
38
|
export * from './lib/components/accordion/accordion.component';
|
|
38
39
|
export * from './lib/components/inactive-tenant/inactive-tenant.component';
|
|
39
40
|
export * from './lib/components/image-preview/image-preview.component';
|
|
@@ -51,8 +52,12 @@ export * from './lib/models/calendar.model';
|
|
|
51
52
|
export * from './lib/models/checkbox-option.model';
|
|
52
53
|
export * from './lib/models/confirmation-modal-data.model';
|
|
53
54
|
export * from './lib/models/date-picker.model';
|
|
55
|
+
export * from './lib/models/delete-file.model';
|
|
56
|
+
export * from './lib/models/download-file.model';
|
|
57
|
+
export * from './lib/models/dynamic-properties.model';
|
|
54
58
|
export * from './lib/models/event-emit-type.model';
|
|
55
59
|
export * from './lib/models/field-config.model';
|
|
60
|
+
export * from './lib/models/file-attachment.model';
|
|
56
61
|
export * from './lib/models/footer-config.model';
|
|
57
62
|
export * from './lib/models/form-control-types.model';
|
|
58
63
|
export * from './lib/models/form-field.model';
|
|
@@ -79,6 +84,8 @@ export * from './lib/models/table-actions.model';
|
|
|
79
84
|
export * from './lib/models/table-schema.model';
|
|
80
85
|
export * from './lib/models/breadcrumb.model';
|
|
81
86
|
export * from './lib/models/tile.model';
|
|
87
|
+
export * from './lib/models/file-upload-response.model';
|
|
88
|
+
export * from './lib/models/file-upload-status.model';
|
|
82
89
|
export * from './lib/models/filters-options.model';
|
|
83
90
|
export * from './lib/models/profile-menu.model';
|
|
84
91
|
export * from './lib/models/slide-toggle-options.model';
|
|
@@ -87,10 +94,13 @@ export * from './lib/models/card-button.model';
|
|
|
87
94
|
export * from './lib/models/card-info.model';
|
|
88
95
|
export * from './lib/models/color-format.model';
|
|
89
96
|
export * from './lib/models/allowed-file-types.model';
|
|
97
|
+
export * from './lib/models/file-upload-payload-model';
|
|
90
98
|
export * from './lib/models/file-upload-presigned-url-res.model';
|
|
99
|
+
export * from './lib/models/file-upload-response.model';
|
|
91
100
|
export * from './lib/models/accordion-info.model';
|
|
92
101
|
export * from './lib/models/inactive-tenant.model';
|
|
93
102
|
export * from './lib/models/table-column-menu-info.model';
|
|
103
|
+
export * from './lib/models/view-files-format.model';
|
|
94
104
|
export * from './lib/services/datepicker.service';
|
|
95
105
|
export * from './lib/services/form-utility.service';
|
|
96
106
|
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": {
|
|
@@ -602,5 +612,22 @@
|
|
|
602
612
|
"editor": "Rich text editor.",
|
|
603
613
|
"colorPicker": "Color picker."
|
|
604
614
|
}
|
|
615
|
+
},
|
|
616
|
+
"fileDownload": {
|
|
617
|
+
"buttons": [
|
|
618
|
+
{
|
|
619
|
+
"id": 1,
|
|
620
|
+
"ariaLabel": "File delete icon.",
|
|
621
|
+
"iconURL": "assets/images/sprites/sprites.svg#icon-file-delete",
|
|
622
|
+
"toolTip": "",
|
|
623
|
+
"disabled": false
|
|
624
|
+
}
|
|
625
|
+
],
|
|
626
|
+
"preSignedDuration":"5",
|
|
627
|
+
"message": {
|
|
628
|
+
"errors": {
|
|
629
|
+
"errorReadingFile": "File is damaged or unreadable."
|
|
630
|
+
}
|
|
631
|
+
}
|
|
605
632
|
}
|
|
606
633
|
}
|