@ieeesa-npm/presentation 0.26.8 → 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 +17 -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 +26 -4
- package/esm2022/lib/components/list/list.component.mjs +24 -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 +11 -2
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/ieeesa-npm-presentation.mjs +240 -32
- package/fesm2022/ieeesa-npm-presentation.mjs.map +1 -1
- package/lib/components/chips/chips.component.d.ts +15 -0
- package/lib/components/dynamic-form/dynamic-form.component.d.ts +6 -2
- package/lib/components/file-download/file-download.component.d.ts +362 -0
- package/lib/components/file-upload/file-upload.component.d.ts +33 -9
- package/lib/components/list/list.component.d.ts +12 -1
- package/lib/directives/dynamic-form-field/dynamic-form-field.directive.d.ts +6 -2
- package/lib/directives/file-upload/file-upload.directive.d.ts +1 -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 +26 -9
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/src/lib/assets/constants.json +17 -0
|
@@ -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,11 +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
6
|
import { FileUploadPayload } from '../models/file-upload-payload-model';
|
|
7
7
|
import { FileUploadBodyResponse, FileUploadResponse } from '../models/file-upload-response.model';
|
|
8
8
|
import { DeleteFileResponse } from '../models/delete-file.model';
|
|
9
|
+
import { DownloadFile } from '../models/download-file.model';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
/**
|
|
11
12
|
* This service interacts with the server to obtain pre-signed URLs for file upload and uploads files to Amazon S3.
|
|
@@ -190,13 +191,7 @@ export declare class FileUploadService implements OnDestroy {
|
|
|
190
191
|
label: {
|
|
191
192
|
initial: string;
|
|
192
193
|
};
|
|
193
|
-
};
|
|
194
|
-
* Return distinct message for sent, upload progress, & response events.
|
|
195
|
-
* @param {HttpEvent<any>} event
|
|
196
|
-
* @param {(File | FileList)} file
|
|
197
|
-
* @return {*}
|
|
198
|
-
* @memberof FileUploadService
|
|
199
|
-
*/
|
|
194
|
+
};
|
|
200
195
|
loader: {
|
|
201
196
|
ariaLabel: {
|
|
202
197
|
spinner: string;
|
|
@@ -205,6 +200,13 @@ export declare class FileUploadService implements OnDestroy {
|
|
|
205
200
|
defaultWelcomeBgColor: string;
|
|
206
201
|
timePicker: {
|
|
207
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
|
+
*/
|
|
208
210
|
timePickerIcon: string;
|
|
209
211
|
};
|
|
210
212
|
colorPicker: {
|
|
@@ -299,6 +301,21 @@ export declare class FileUploadService implements OnDestroy {
|
|
|
299
301
|
colorPicker: string;
|
|
300
302
|
};
|
|
301
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
|
+
};
|
|
302
319
|
};
|
|
303
320
|
apiBaseUrl: string;
|
|
304
321
|
fileByteArray: Uint8Array | undefined;
|
|
@@ -389,7 +406,7 @@ export declare class FileUploadService implements OnDestroy {
|
|
|
389
406
|
* @return {Observable<string>}
|
|
390
407
|
* @memberof FileUploadService
|
|
391
408
|
*/
|
|
392
|
-
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>;
|
|
393
410
|
/**
|
|
394
411
|
* Downloads file to AWS S3 using a presigned URL.
|
|
395
412
|
* @return {Observable<any>}
|
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';
|
|
@@ -612,5 +612,22 @@
|
|
|
612
612
|
"editor": "Rich text editor.",
|
|
613
613
|
"colorPicker": "Color picker."
|
|
614
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
|
+
}
|
|
615
632
|
}
|
|
616
633
|
}
|