@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
|
@@ -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: {
|
|
@@ -256,6 +258,12 @@ export declare class FileUploadService implements OnDestroy {
|
|
|
256
258
|
};
|
|
257
259
|
iconUrl: {
|
|
258
260
|
fileUploadIcon: string;
|
|
261
|
+
/**
|
|
262
|
+
* Deletes file by given fileId
|
|
263
|
+
* @param {string} fileId
|
|
264
|
+
* @return {*} {Observable<DeleteFileResponse>}
|
|
265
|
+
* @memberof FileUploadService
|
|
266
|
+
*/
|
|
259
267
|
fileRemoveIcon: string;
|
|
260
268
|
deleteIcon: string;
|
|
261
269
|
};
|
|
@@ -299,6 +307,24 @@ export declare class FileUploadService implements OnDestroy {
|
|
|
299
307
|
colorPicker: string;
|
|
300
308
|
};
|
|
301
309
|
};
|
|
310
|
+
fileDownload: {
|
|
311
|
+
buttons: {
|
|
312
|
+
id: number;
|
|
313
|
+
ariaLabel: string;
|
|
314
|
+
iconURL: string;
|
|
315
|
+
toolTip: string;
|
|
316
|
+
disabled: boolean;
|
|
317
|
+
}[];
|
|
318
|
+
preSignedDuration: string;
|
|
319
|
+
message: {
|
|
320
|
+
errors: {
|
|
321
|
+
errorReadingFile: string;
|
|
322
|
+
"5038": string;
|
|
323
|
+
"6027": string;
|
|
324
|
+
"6028": string;
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
};
|
|
302
328
|
};
|
|
303
329
|
apiBaseUrl: string;
|
|
304
330
|
fileByteArray: Uint8Array | undefined;
|
|
@@ -389,7 +415,7 @@ export declare class FileUploadService implements OnDestroy {
|
|
|
389
415
|
* @return {Observable<string>}
|
|
390
416
|
* @memberof FileUploadService
|
|
391
417
|
*/
|
|
392
|
-
getFileDownloadPresignedUrls(file: File | FileList | string, isPublicAPI?: boolean, domainUrl?: string): Observable<string>;
|
|
418
|
+
getFileDownloadPresignedUrls(file: File | FileList | string | DownloadFile, isPublicAPI?: boolean, domainUrl?: string, downloadUri?: string): Observable<string | GetFileDownloadPresignedUrlByAttachmentIdResponse>;
|
|
393
419
|
/**
|
|
394
420
|
* Downloads file to AWS S3 using a presigned URL.
|
|
395
421
|
* @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';
|
|
@@ -57,6 +58,7 @@ export * from './lib/models/dynamic-properties.model';
|
|
|
57
58
|
export * from './lib/models/event-emit-type.model';
|
|
58
59
|
export * from './lib/models/field-config.model';
|
|
59
60
|
export * from './lib/models/file-attachment.model';
|
|
61
|
+
export * from './lib/models/file-download-config.model';
|
|
60
62
|
export * from './lib/models/footer-config.model';
|
|
61
63
|
export * from './lib/models/form-control-types.model';
|
|
62
64
|
export * from './lib/models/form-field.model';
|
|
@@ -612,5 +612,25 @@
|
|
|
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
|
+
"5038": "Presigned duration is either null/empty.",
|
|
631
|
+
"6027": "Attachment id is either null/empty.",
|
|
632
|
+
"6028": "Agenda item attachment id does not exist."
|
|
633
|
+
}
|
|
634
|
+
}
|
|
615
635
|
}
|
|
616
636
|
}
|