@ieeesa-npm/presentation 0.27.3 → 0.27.4

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.
@@ -1,4 +1,4 @@
1
- import { EventEmitter, OnDestroy } from '@angular/core';
1
+ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
2
  import { FormUtilityService } from '../../services/form-utility.service';
3
3
  import { FileUploadService } from '../../services/file-upload.service';
4
4
  import { FileDownloadConfig } from '../../models/file-download-config.model';
@@ -6,10 +6,10 @@ import { DownloadFile } from '../../models/download-file.model';
6
6
  import { Subject } from 'rxjs';
7
7
  import { SharedService } from '@ieeesa-npm/shared';
8
8
  import * as i0 from "@angular/core";
9
- export declare class FileDownloadComponent implements OnDestroy {
9
+ export declare class FileDownloadComponent implements OnInit, OnDestroy {
10
10
  formUtilityService: FormUtilityService;
11
11
  sharedService: SharedService;
12
- fileUploadService: FileUploadService;
12
+ private fileUploadService;
13
13
  constants: {
14
14
  ariaLabel: {
15
15
  clear: string;
@@ -322,7 +322,13 @@ export declare class FileDownloadComponent implements OnDestroy {
322
322
  toolTip: string;
323
323
  disabled: boolean;
324
324
  };
325
+ apiBaseUrl: string;
325
326
  constructor(formUtilityService: FormUtilityService, sharedService: SharedService, fileUploadService: FileUploadService);
327
+ /**
328
+ * Sets API base URL to file upload service
329
+ * @memberof FileDownloadComponent
330
+ */
331
+ ngOnInit(): void;
326
332
  /**
327
333
  * Gets the download AWS pre-signed URL from API on button click or emit the downloadSelectedFile if isNotDownloadFileInternally flg is true.
328
334
  * @param {File } file
@@ -341,6 +347,12 @@ export declare class FileDownloadComponent implements OnDestroy {
341
347
  * @memberof FileDownloadedComponent
342
348
  */
343
349
  onDeleteFile(file: File | DownloadFile, index: number): void;
350
+ /**
351
+ * Deletes file by given agendaAttachmentId
352
+ * @param {string} agendaAttachmentId
353
+ * @memberof UploadAttachmentsComponent
354
+ */
355
+ deleteFile(agendaAttachmentId: string, index: number): void;
344
356
  /**
345
357
  * Returns unique identifier for the file list.
346
358
  * @param {number} index
@@ -361,5 +373,5 @@ export declare class FileDownloadComponent implements OnDestroy {
361
373
  */
362
374
  downloadFileFromPresignedUrl(fileDownloadPresignedUrl: string, fileName: string): void;
363
375
  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>;
376
+ 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; }; "apiBaseUrl": { "alias": "apiBaseUrl"; "required": false; }; }, { "downloadSelectedFile": "downloadSelectedFile"; "deleteSelectedFile": "deleteSelectedFile"; }, never, never, true, never>;
365
377
  }
@@ -233,6 +233,10 @@ export declare class FileUploadComponent implements OnInit {
233
233
  allowedFileSize1: string;
234
234
  allowedFileSize2: string;
235
235
  allowedFileFormat: string;
236
+ /**
237
+ * Triggers on browse element clicked
238
+ * @memberof FileUploadComponent
239
+ */
236
240
  browseFiles: string;
237
241
  uploadProgress: string;
238
242
  upload: string;
@@ -321,6 +325,10 @@ export declare class FileUploadComponent implements OnInit {
321
325
  allowedFileSize1: string;
322
326
  allowedFileSize2: string;
323
327
  allowedFileFormat: string;
328
+ /**
329
+ * Triggers on browse element clicked
330
+ * @memberof FileUploadComponent
331
+ */
324
332
  browseFiles: string;
325
333
  uploadProgress: string;
326
334
  upload: string;
@@ -380,7 +388,7 @@ export declare class FileUploadComponent implements OnInit {
380
388
  isUploadButtonNeeded: boolean;
381
389
  maxUploadFileSize: number;
382
390
  private uploadedSizeValue;
383
- fileUploadErrorPosition: string;
391
+ alignFileUploadErrorMessageTo: AlignType;
384
392
  maxFilesUploadLimit: number;
385
393
  maxFilesUploadLimitErrorMessage: string;
386
394
  private _fileUploadStatus;
@@ -393,6 +401,7 @@ export declare class FileUploadComponent implements OnInit {
393
401
  get fileDownloadConfig(): FileDownloadConfig;
394
402
  uploadSelectedFiles: EventEmitter<File | FileList>;
395
403
  downloadSelectedFile: EventEmitter<File | DownloadFile>;
404
+ apiBaseUrl: string;
396
405
  constructor(formUtilityService: FormUtilityService, fileUploadService: FileUploadService);
397
406
  /**
398
407
  * Initializes component properties and retrieves configuration.
@@ -413,9 +422,10 @@ export declare class FileUploadComponent implements OnInit {
413
422
  /**
414
423
  * Validates the selected file(s) format and size.
415
424
  * @param {(File | FileList)} file
425
+ * @return {boolean}
416
426
  * @memberof FileUploadComponent
417
427
  */
418
- validateFile(file: File | FileList): void;
428
+ validateFile(file: File | FileList): boolean;
419
429
  /**
420
430
  * Initiates the file upload process for independent file upload component.
421
431
  * @memberof FileUploadComponent
@@ -479,5 +489,5 @@ export declare class FileUploadComponent implements OnInit {
479
489
  */
480
490
  getFilesToDownload(): DownloadFile[];
481
491
  static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, 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>;
492
+ 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; }; "alignFileUploadErrorMessageTo": { "alias": "alignFileUploadErrorMessageTo"; "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>;
483
493
  }
@@ -1,5 +1,6 @@
1
1
  export declare enum AlignType {
2
2
  LEFT = "Left",
3
3
  MIDDLE = "Middle",
4
- RIGHT = "Right"
4
+ RIGHT = "Right",
5
+ BOTTOM = "Bottom"
5
6
  }
@@ -1,4 +1,4 @@
1
1
  export interface DownloadFile {
2
- attachmentId?: string;
2
+ attachmentId: string;
3
3
  fileName: string;
4
4
  }
@@ -90,7 +90,7 @@ export interface FieldConfig {
90
90
  viewFilesFormat?: ViewFilesFormat;
91
91
  isUploadButtonNeeded?: boolean;
92
92
  actionButtonAlign?: AlignType;
93
- fileUploadErrorPosition?: string;
93
+ alignFileUploadErrorMessageTo?: AlignType;
94
94
  maxFilesUploadLimit?: number;
95
95
  maxFilesUploadLimitErrorMessage?: string;
96
96
  }
@@ -7,13 +7,15 @@ export interface FileAttachment {
7
7
  export interface FileAttachmentPayload {
8
8
  payload: FileAttachment[];
9
9
  }
10
+ export interface AgendaItemAttachment {
11
+ fileName: string;
12
+ agendaItemAttachmentId: string;
13
+ }
10
14
  export interface FileAttachmentResponse {
11
15
  status: boolean;
12
16
  message: string;
13
17
  body: {
14
- id: string | null;
15
- name: string | null;
16
- message: string;
17
18
  totalRecords: number;
19
+ agendaItemAttachmentList: AgendaItemAttachment[];
18
20
  };
19
21
  }
@@ -3,6 +3,7 @@ export interface FileDownloadConfig {
3
3
  isDeleteNeeded?: boolean;
4
4
  isAlignedVertical?: boolean;
5
5
  downloadUri?: string;
6
+ deleteUri?: string;
6
7
  isNotDownloadFileInternally?: boolean;
7
8
  isNotDeleteFileInternally?: boolean;
8
9
  }
@@ -200,13 +200,6 @@ export declare class FileUploadService implements OnDestroy {
200
200
  defaultWelcomeBgColor: string;
201
201
  timePicker: {
202
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
- */
210
203
  timePickerIcon: string;
211
204
  };
212
205
  colorPicker: {
@@ -258,12 +251,6 @@ export declare class FileUploadService implements OnDestroy {
258
251
  };
259
252
  iconUrl: {
260
253
  fileUploadIcon: string;
261
- /**
262
- * Deletes file by given fileId
263
- * @param {string} fileId
264
- * @return {*} {Observable<DeleteFileResponse>}
265
- * @memberof FileUploadService
266
- */
267
254
  fileRemoveIcon: string;
268
255
  deleteIcon: string;
269
256
  };
@@ -340,6 +327,12 @@ export declare class FileUploadService implements OnDestroy {
340
327
  * @memberof FileUploadService
341
328
  */
342
329
  setApiBaseUrl(apiBaseUrl: string): void;
330
+ /**
331
+ * Gets API base URL for API requests.
332
+ * @return {*} {string}
333
+ * @memberof FileUploadService
334
+ */
335
+ getApiBaseUrl(): string;
343
336
  /**
344
337
  * Retrieves presigned URL for uploading files to Amazon S3 bucket.
345
338
  * @param {(File | FileList)} file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ieeesa-npm/presentation",
3
- "version": "0.27.3",
3
+ "version": "0.27.4",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.1.0",
6
6
  "@angular/core": "^16.1.0",