@cleavelandprice/ngx-lib 4.1.17 → 4.1.18

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.
@@ -2,4 +2,4 @@
2
2
  ;
3
3
  ;
4
4
  export {};
5
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXNnLWZpbGUtY29udGVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NsZWF2ZWxhbmRwcmljZS9uZ3gtbGliL3VwbG9hZC9zcmMvbW9kZWwvbXNnLWZpbGUtY29udGVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJQyxDQUFDO0FBSUQsQ0FBQztBQWFELENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbnRlcmZhY2UgTXNnRmlsZUNvbnRhY3Qge1xyXG4gICAgZGlzcGxheU5hbWU6IHN0cmluZztcclxuICAgIGVtYWlsOiBzdHJpbmc7XHJcbiAgICByYXc6IHN0cmluZztcclxufTtcclxuXHJcbmV4cG9ydCBpbnRlcmZhY2UgTXNnRmlsZVJlY2lwaWVudCBleHRlbmRzIE1zZ0ZpbGVDb250YWN0IHtcclxuICAgIHR5cGU6IHN0cmluZztcclxufTtcclxuXHJcbmV4cG9ydCBpbnRlcmZhY2UgTXNnRmlsZUNvbnRlbnQge1xyXG4gICAgYXR0YWNobWVudHM6IHN0cmluZ1tdO1xyXG4gICAgYm9keUhUTUw6IHN0cmluZztcclxuICAgIGJvZHlUZXh0OiBzdHJpbmc7XHJcbiAgICBjcmVhdGlvblRpbWU6IHN0cmluZztcclxuICAgIGlkOiBzdHJpbmc7XHJcbiAgICBpbXBvcnRhbmNlOiBzdHJpbmc7XHJcbiAgICByZWNpcGllbnRzOiBNc2dGaWxlUmVjaXBpZW50W11cclxuICAgIHNlbmRlcjogTXNnRmlsZUNvbnRhY3Q7XHJcbiAgICBzZW50T246IHN0cmluZztcclxuICAgIHN1YmplY3Q6IHN0cmluZztcclxufTsiXX0=
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXNnLWZpbGUtY29udGVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NsZWF2ZWxhbmRwcmljZS9uZ3gtbGliL3VwbG9hZC9zcmMvbW9kZWwvbXNnLWZpbGUtY29udGVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJQyxDQUFDO0FBSUQsQ0FBQztBQWFELENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbnRlcmZhY2UgTXNnRmlsZUNvbnRhY3Qge1xyXG4gICAgZGlzcGxheU5hbWU6IHN0cmluZztcclxuICAgIGVtYWlsOiBzdHJpbmc7XHJcbiAgICByYXc6IHN0cmluZztcclxufTtcclxuXHJcbmV4cG9ydCBpbnRlcmZhY2UgTXNnRmlsZVJlY2lwaWVudCBleHRlbmRzIE1zZ0ZpbGVDb250YWN0IHtcclxuICAgIHR5cGU6IHN0cmluZztcclxufTtcclxuXHJcbmV4cG9ydCBpbnRlcmZhY2UgTXNnRmlsZUNvbnRlbnQge1xyXG4gICAgYXR0YWNobWVudHM6IHN0cmluZ1tdO1xyXG4gICAgYm9keUh0bWw6IHN0cmluZztcclxuICAgIGJvZHlUZXh0OiBzdHJpbmc7XHJcbiAgICBjcmVhdGlvblRpbWU6IHN0cmluZztcclxuICAgIGlkOiBzdHJpbmc7XHJcbiAgICBpbXBvcnRhbmNlOiBzdHJpbmc7XHJcbiAgICByZWNpcGllbnRzOiBNc2dGaWxlUmVjaXBpZW50W11cclxuICAgIHNlbmRlcjogTXNnRmlsZUNvbnRhY3Q7XHJcbiAgICBzZW50T246IHN0cmluZztcclxuICAgIHN1YmplY3Q6IHN0cmluZztcclxufTsiXX0=
@@ -1 +1 @@
1
- {"version":3,"file":"cleavelandprice-ngx-lib-upload.mjs","sources":["../../../../projects/cleavelandprice/ngx-lib/upload/src/model/msg-file-content.ts","../../../../projects/cleavelandprice/ngx-lib/upload/src/model/upload-service-options.ts","../../../../projects/cleavelandprice/ngx-lib/upload/src/model/upload-service-options-token.ts","../../../../projects/cleavelandprice/ngx-lib/upload/src/services/upload.service.ts","../../../../projects/cleavelandprice/ngx-lib/upload/src/components/upload-dialog/upload-dialog.component.ts","../../../../projects/cleavelandprice/ngx-lib/upload/src/components/upload-dialog/upload-dialog.component.html","../../../../projects/cleavelandprice/ngx-lib/upload/src/components/upload/upload.component.ts","../../../../projects/cleavelandprice/ngx-lib/upload/src/upload.module.ts","../../../../projects/cleavelandprice/ngx-lib/upload/src/cleavelandprice-ngx-lib-upload.ts"],"sourcesContent":["interface MsgFileContact {\r\n displayName: string;\r\n email: string;\r\n raw: string;\r\n};\r\n\r\nexport interface MsgFileRecipient extends MsgFileContact {\r\n type: string;\r\n};\r\n\r\nexport interface MsgFileContent {\r\n attachments: string[];\r\n bodyHTML: string;\r\n bodyText: string;\r\n creationTime: string;\r\n id: string;\r\n importance: string;\r\n recipients: MsgFileRecipient[]\r\n sender: MsgFileContact;\r\n sentOn: string;\r\n subject: string;\r\n};","import { NgxLibServiceOptions } from \"@cleavelandprice/ngx-lib\";\r\n\r\nexport interface UploadServiceOptions extends NgxLibServiceOptions {\r\n databaseEndpoint?: string;\r\n uploadPath?: string;\r\n comment?: string;\r\n dbAppId?: string;\r\n externalReferenceId?: string;\r\n // UI configuration\r\n uploadDialogTitle?: string;\r\n uploadButtonText?: string;\r\n uploadDialogCancelButtonText?: string;\r\n uploadDialogFinishButtonText?: string;\r\n uploadDialogUploadButtonText?: string;\r\n uploadDialogAddFilesButtonText?: string;\r\n};","import { InjectionToken } from \"@angular/core\";\r\nimport { UploadServiceOptions } from \"./upload-service-options\";\r\n\r\nexport const UploadServiceOptionsToken = new InjectionToken<UploadServiceOptions>('');","import { HttpClient, HttpEventType, HttpHeaders, HttpRequest, HttpResponse } from '@angular/common/http';\r\nimport { Inject, Injectable, Optional, inject } from '@angular/core';\r\nimport { Observable, Subject } from 'rxjs';\r\n\r\nimport { NgxLibServiceBase } from '@cleavelandprice/ngx-lib';\r\nimport { DatabaseFileInfo } from '../model/database-file-info';\r\nimport { FileUploadRequest } from '../model/file-upload-request';\r\nimport { FilesystemFileInfo } from '../model/filesystem-file-info';\r\nimport { MsgFileContent } from '../model/msg-file-content';\r\nimport { UploadServiceOptions } from '../model/upload-service-options';\r\nimport { UploadServiceOptionsToken } from '../model/upload-service-options-token';\r\nimport { UploadStatus } from '../model/upload-status';\r\n\r\n// https://malcoded.com/posts/angular-file-upload-component-with-express\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class UploadService extends NgxLibServiceBase {\r\n #http = inject(HttpClient);\r\n\r\n constructor(@Optional() @Inject(UploadServiceOptionsToken) public options: UploadServiceOptions) {\r\n super(options);\r\n \r\n this.options = {\r\n ...options,\r\n databaseEndpoint: options?.databaseEndpoint ?? '/upload/database',\r\n uploadDialogTitle: options?.uploadDialogTitle ?? 'Upload Files',\r\n uploadButtonText: options?.uploadButtonText ?? 'Upload',\r\n uploadDialogCancelButtonText: options?.uploadDialogCancelButtonText ?? 'Cancel',\r\n uploadDialogFinishButtonText: options?.uploadDialogFinishButtonText ?? 'Finish',\r\n uploadDialogUploadButtonText: options?.uploadButtonText ?? 'Upload',\r\n uploadDialogAddFilesButtonText: options?.uploadDialogAddFilesButtonText ?? 'Add Files'\r\n };\r\n }\r\n\r\n upload(files: Set<File>): UploadStatus { // {[key: string]: Observable<number>} {\r\n // this will be the our resulting map\r\n const status: UploadStatus = {};\r\n\r\n files.forEach(file => {\r\n // create a new multipart-form for every file\r\n const formData: FormData = new FormData();\r\n formData.append('file', file, file.name);\r\n\r\n // create a http-post request and pass the form\r\n // tell it to report the upload progress\r\n\r\n // A 'Destination' header is used to optionally configure the file upload destination (filesystem)\r\n // A 'DbAppId' header is used to configure the unique identifier of database uploads\r\n \r\n let headers = new HttpHeaders();\r\n if (this.options.uploadPath) {\r\n headers = headers.set('Destination', this.options.uploadPath);\r\n }\r\n if (this.options.dbAppId) {\r\n headers = headers.set('DbAppId', this.options.dbAppId);\r\n }\r\n if (this.options.externalReferenceId) {\r\n headers = headers.set('ExternalReferenceId', this.options.externalReferenceId);\r\n }\r\n if (this.options.comment) {\r\n headers = headers.set('Comment', this.options.comment);\r\n }\r\n\r\n const req = new HttpRequest('POST', `${this.apiUrl}${this.options.databaseEndpoint}`, formData, {\r\n reportProgress: true,\r\n responseType: 'blob',\r\n headers\r\n });\r\n\r\n // create a new progress-subject for every file\r\n const progress = new Subject<number>();\r\n\r\n // send the http-request and subscribe for progress-updates\r\n this.#http.request(req).subscribe(event => {\r\n if (event.type === HttpEventType.UploadProgress) {\r\n\r\n // calculate the progress percentage\r\n const percentDone = Math.round(100 * event.loaded / (event.total ?? 1));\r\n\r\n // pass the percentage into the progress-stream\r\n progress.next(percentDone);\r\n } else if (event instanceof HttpResponse) {\r\n\r\n // Close the progress-stream if we get an answer form the API\r\n // The upload is complete\r\n progress.complete();\r\n }\r\n });\r\n\r\n // Save every progress-observable in a map of all observables\r\n status[file.name] = {\r\n progress: progress.asObservable()\r\n };\r\n });\r\n\r\n // return the map of progress.observables\r\n return status;\r\n }\r\n\r\n exists(fileName: string): Observable<boolean> {\r\n const query = `${this.apiUrl}${this.options.databaseEndpoint}`.toLowerCase().includes('filesystem') ?\r\n { name: fileName, destination: this.options.uploadPath } :\r\n { name: fileName, dbAppId: this.options.dbAppId };\r\n\r\n return this.#http.post<boolean>(`${this.apiUrl}${this.options.databaseEndpoint}/exists`, query);\r\n }\r\n\r\n download(request: FileUploadRequest): Observable<Blob> {\r\n return this.#http.post(`${this.apiUrl}${this.options.databaseEndpoint}/stream`, request, { responseType: 'blob' });\r\n }\r\n\r\n getMsgContent(request: FileUploadRequest): Observable<MsgFileContent> {\r\n return this.#http.post<MsgFileContent>(`${this.apiUrl}${this.options.databaseEndpoint}/msg`, request);\r\n }\r\n\r\n getUploadInfo(request: FileUploadRequest):\r\n Observable<DatabaseFileInfo | DatabaseFileInfo[] | FilesystemFileInfo | FilesystemFileInfo[]> {\r\n return this.#http.post<DatabaseFileInfo | DatabaseFileInfo[] | FilesystemFileInfo | FilesystemFileInfo[]>\r\n (`${this.apiUrl}${this.options.databaseEndpoint}/info`, request);\r\n }\r\n}","import { AsyncPipe } from '@angular/common';\r\nimport { Component, ElementRef, inject, viewChild } from '@angular/core';\r\nimport { MatButton } from '@angular/material/button';\r\nimport { MatDialogActions, MatDialogClose, MatDialogContent, MatDialogRef } from '@angular/material/dialog';\r\nimport { MatList, MatListItem } from '@angular/material/list';\r\nimport { MatProgressBar } from '@angular/material/progress-bar';\r\nimport { Observable, forkJoin } from 'rxjs';\r\nimport { UploadStatus } from '../../model/upload-status';\r\nimport { UploadService } from './../../services/upload.service';\r\n\r\n@Component({\r\n templateUrl: './upload-dialog.component.html',\r\n standalone: true,\r\n imports: [\r\n AsyncPipe,\r\n MatButton,\r\n MatDialogActions,\r\n MatDialogClose,\r\n MatDialogContent,\r\n MatList,\r\n MatListItem,\r\n MatProgressBar\r\n ],\r\n styleUrl: './upload-dialog.component.scss'\r\n})\r\nexport class UploadDialogComponent {\r\n services = {\r\n dialogRef: inject(MatDialogRef<UploadDialogComponent>),\r\n upload: inject(UploadService)\r\n };\r\n\r\n file = viewChild.required<ElementRef>('file');\r\n\r\n files: Set<File> = new Set();\r\n existingFileConflict?: string;\r\n\r\n // State\r\n progress?: UploadStatus;\r\n canBeClosed = true;\r\n primaryButtonText = this.services.upload.options.uploadDialogUploadButtonText;\r\n showCancelButton = true;\r\n uploading = false;\r\n uploadSuccessful = false;\r\n\r\n addFiles() {\r\n this.file().nativeElement.click();\r\n }\r\n\r\n onFilesAdded() {\r\n const files: { [key: string]: File } = this.file().nativeElement.files;\r\n for (const key in files) {\r\n if (!isNaN(parseInt(key))) {\r\n // See if the file already exists\r\n this.services.upload.exists(files[key].name)\r\n .subscribe(exists => {\r\n if (exists) {\r\n this.existingFileConflict = files[key].name;\r\n }\r\n\r\n if (!exists) {\r\n this.files.add(files[key]);\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n closeDialog() {\r\n // if everything was uploaded already, just close the dialog\r\n if (this.uploadSuccessful) {\r\n return this.services.dialogRef.close();\r\n }\r\n\r\n // set the component state to \"uploading\"\r\n this.uploading = true;\r\n\r\n // start the upload and save the progress map\r\n this.progress = this.services.upload.upload(this.files);\r\n\r\n // convert the progress map into an array\r\n const allProgressObservables$: Observable<number>[] = [];\r\n\r\n for (let key in this.progress) {\r\n allProgressObservables$.push(this.progress[key].progress);\r\n }\r\n\r\n // Adjust the state variables\r\n\r\n // The OK-button should have the text \"Finish\" now\r\n this.primaryButtonText = this.services.upload.options.uploadDialogFinishButtonText;\r\n\r\n // The dialog should not be closed while uploading\r\n this.canBeClosed = false;\r\n this.services.dialogRef.disableClose = true;\r\n\r\n // Hide the cancel-button\r\n this.showCancelButton = false;\r\n\r\n // When all progress-observables are completed...\r\n forkJoin(allProgressObservables$)\r\n .subscribe({\r\n complete: () => {\r\n // ... the dialog can be closed again...\r\n this.canBeClosed = true;\r\n this.services.dialogRef.disableClose = false;\r\n \r\n // ... the upload was successful...\r\n this.uploadSuccessful = true;\r\n \r\n // ... and the component is no longer uploading\r\n this.uploading = false;\r\n\r\n console.log('Upload complete', this.files);\r\n\r\n this.services.dialogRef.close();\r\n }\r\n });\r\n }\r\n}\r\n","<input type=\"file\" #file style=\"display: none\" (change)=\"onFilesAdded()\" multiple />\n\n<div mat-dialog-title id=\"title\">\n <div>{{ services.upload.options.uploadDialogTitle }}</div>\n <button [disabled]=\"uploading || uploadSuccessful\" mat-raised-button color=\"primary\" class=\"add-files-btn\" (click)=\"addFiles()\">\n {{ services.upload.options.uploadDialogAddFilesButtonText }}\n </button>\n</div>\n\n@if (existingFileConflict) {\n <div id=\"conflict\">\n {{ existingFileConflict }} already exists on the server and cannot be overwritten\n </div>\n}\n\n<mat-dialog-content>\n <mat-list>\n @for (file of files; track file) {\n <mat-list-item>\n <h4 mat-line>{{file.name}}</h4>\n @if (progress) {\n <mat-progress-bar mode=\"determinate\" [value]=\"progress[file.name].progress | async\"/>\n }\n </mat-list-item>\n }\n </mat-list>\n</mat-dialog-content>\n\n<mat-dialog-actions id=\"actions\">\n @if (showCancelButton) {\n <button mat-button mat-dialog-close>{{ services.upload.options.uploadDialogCancelButtonText }}</button>\n }\n @if (files.size > 0) {\n <button mat-raised-button color=\"primary\" [disabled]=\"!canBeClosed\" (click)=\"closeDialog()\">{{ primaryButtonText }}</button>\n }\n</mat-dialog-actions>\n","import { Component, inject, output } from '@angular/core';\r\nimport { MatDialog } from '@angular/material/dialog';\r\n\r\nimport { MatButton } from '@angular/material/button';\r\nimport { UploadService } from './../../services/upload.service';\r\nimport { UploadDialogComponent } from './../upload-dialog/upload-dialog.component';\r\n\r\n@Component({\r\n selector: 'cp-upload',\r\n standalone: true,\r\n imports: [\r\n MatButton\r\n ],\r\n template: '<button mat-raised-button (click)=\"openUploadDialog()\">{{ uploadService.options.uploadButtonText }}</button>'\r\n})\r\nexport class UploadComponent {\r\n #dialogService = inject(MatDialog);\r\n uploadService = inject(UploadService);\r\n\r\n dialogClosed = output();\r\n\r\n openUploadDialog() {\r\n this.#dialogService.open(UploadDialogComponent, { width: '50%' })\r\n .afterClosed().subscribe(() => this.dialogClosed.emit());\r\n }\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';\r\n\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatDialogModule } from '@angular/material/dialog';\r\nimport { MatListModule } from '@angular/material/list';\r\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\r\n\r\nimport { UploadDialogComponent } from './components/upload-dialog/upload-dialog.component';\r\nimport { UploadComponent } from './components/upload/upload.component';\r\nimport { UploadServiceOptions } from './model/upload-service-options';\r\nimport { UploadServiceOptionsToken } from './model/upload-service-options-token';\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n CommonModule,\r\n MatButtonModule,\r\n MatDialogModule,\r\n MatListModule,\r\n MatProgressBarModule,\r\n\r\n UploadComponent,\r\n UploadDialogComponent\r\n ],\r\n exports: [\r\n UploadComponent,\r\n UploadDialogComponent\r\n ]\r\n})\r\nexport class UploadModule {\r\n static forRoot(options: UploadServiceOptions): ModuleWithProviders<UploadModule> {\r\n return {\r\n ngModule: UploadModule,\r\n providers: [\r\n {\r\n provide: UploadServiceOptionsToken,\r\n useValue: options\r\n }\r\n ]\r\n }\r\n }\r\n\r\n constructor(@Optional() @SkipSelf() parentModule: UploadModule) {\r\n if (parentModule) {\r\n throw new Error(\r\n 'UploadModule is already loaded. Import it in the AppModule only');\r\n }\r\n }\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './upload.api';\n"],"names":[],"mappings":";;;;;;;;;;;AAIC,CAAC;AAID,CAAC;AAaD;;ACNA;;MCZY,yBAAyB,GAAG,IAAI,cAAc,CAAuB,EAAE;;ACUpF;AAKM,MAAO,aAAc,SAAQ,iBAAiB,CAAA;AAClD,IAAA,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAE3B,IAAA,WAAA,CAAkE,OAA6B,EAAA;QAC7F,KAAK,CAAC,OAAO,CAAC,CAAC;QADiD,IAAO,CAAA,OAAA,GAAP,OAAO,CAAsB;QAG7F,IAAI,CAAC,OAAO,GAAG;AACb,YAAA,GAAG,OAAO;AACV,YAAA,gBAAgB,EAAE,OAAO,EAAE,gBAAgB,IAAI,kBAAkB;AACjE,YAAA,iBAAiB,EAAE,OAAO,EAAE,iBAAiB,IAAI,cAAc;AAC/D,YAAA,gBAAgB,EAAE,OAAO,EAAE,gBAAgB,IAAI,QAAQ;AACvD,YAAA,4BAA4B,EAAE,OAAO,EAAE,4BAA4B,IAAI,QAAQ;AAC/E,YAAA,4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IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,YAdrB,YAAY;YACZ,eAAe;YACf,eAAe;YACf,aAAa;YACb,oBAAoB;YAEpB,eAAe;AACf,YAAA,qBAAqB,aAGrB,eAAe;YACf,qBAAqB,CAAA,EAAA,CAAA,CAAA,EAAA;AAGZ,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,YAdrB,YAAY;YACZ,eAAe;YACf,eAAe;YACf,aAAa;YACb,oBAAoB;YAEpB,eAAe;YACf,qBAAqB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAOZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAjBxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,eAAe;wBACf,eAAe;wBACf,aAAa;wBACb,oBAAoB;wBAEpB,eAAe;wBACf,qBAAqB;AACtB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,eAAe;wBACf,qBAAqB;AACtB,qBAAA;AACF,iBAAA,CAAA;;0BAcc,QAAQ;;0BAAI,QAAQ;;;AC3CnC;;AAEG;;;;"}
1
+ {"version":3,"file":"cleavelandprice-ngx-lib-upload.mjs","sources":["../../../../projects/cleavelandprice/ngx-lib/upload/src/model/msg-file-content.ts","../../../../projects/cleavelandprice/ngx-lib/upload/src/model/upload-service-options.ts","../../../../projects/cleavelandprice/ngx-lib/upload/src/model/upload-service-options-token.ts","../../../../projects/cleavelandprice/ngx-lib/upload/src/services/upload.service.ts","../../../../projects/cleavelandprice/ngx-lib/upload/src/components/upload-dialog/upload-dialog.component.ts","../../../../projects/cleavelandprice/ngx-lib/upload/src/components/upload-dialog/upload-dialog.component.html","../../../../projects/cleavelandprice/ngx-lib/upload/src/components/upload/upload.component.ts","../../../../projects/cleavelandprice/ngx-lib/upload/src/upload.module.ts","../../../../projects/cleavelandprice/ngx-lib/upload/src/cleavelandprice-ngx-lib-upload.ts"],"sourcesContent":["interface MsgFileContact {\r\n displayName: string;\r\n email: string;\r\n raw: string;\r\n};\r\n\r\nexport interface MsgFileRecipient extends MsgFileContact {\r\n type: string;\r\n};\r\n\r\nexport interface MsgFileContent {\r\n attachments: string[];\r\n bodyHtml: string;\r\n bodyText: string;\r\n creationTime: string;\r\n id: string;\r\n importance: string;\r\n recipients: MsgFileRecipient[]\r\n sender: MsgFileContact;\r\n sentOn: string;\r\n subject: string;\r\n};","import { NgxLibServiceOptions } from \"@cleavelandprice/ngx-lib\";\r\n\r\nexport interface UploadServiceOptions extends NgxLibServiceOptions {\r\n databaseEndpoint?: string;\r\n uploadPath?: string;\r\n comment?: string;\r\n dbAppId?: string;\r\n externalReferenceId?: string;\r\n // UI configuration\r\n uploadDialogTitle?: string;\r\n uploadButtonText?: string;\r\n uploadDialogCancelButtonText?: string;\r\n uploadDialogFinishButtonText?: string;\r\n uploadDialogUploadButtonText?: string;\r\n uploadDialogAddFilesButtonText?: string;\r\n};","import { InjectionToken } from \"@angular/core\";\r\nimport { UploadServiceOptions } from \"./upload-service-options\";\r\n\r\nexport const UploadServiceOptionsToken = new InjectionToken<UploadServiceOptions>('');","import { HttpClient, HttpEventType, HttpHeaders, HttpRequest, HttpResponse } from '@angular/common/http';\r\nimport { Inject, Injectable, Optional, inject } from '@angular/core';\r\nimport { Observable, Subject } from 'rxjs';\r\n\r\nimport { NgxLibServiceBase } from '@cleavelandprice/ngx-lib';\r\nimport { DatabaseFileInfo } from '../model/database-file-info';\r\nimport { FileUploadRequest } from '../model/file-upload-request';\r\nimport { FilesystemFileInfo } from '../model/filesystem-file-info';\r\nimport { MsgFileContent } from '../model/msg-file-content';\r\nimport { UploadServiceOptions } from '../model/upload-service-options';\r\nimport { UploadServiceOptionsToken } from '../model/upload-service-options-token';\r\nimport { UploadStatus } from '../model/upload-status';\r\n\r\n// https://malcoded.com/posts/angular-file-upload-component-with-express\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class UploadService extends NgxLibServiceBase {\r\n #http = inject(HttpClient);\r\n\r\n constructor(@Optional() @Inject(UploadServiceOptionsToken) public options: UploadServiceOptions) {\r\n super(options);\r\n \r\n this.options = {\r\n ...options,\r\n databaseEndpoint: options?.databaseEndpoint ?? '/upload/database',\r\n uploadDialogTitle: options?.uploadDialogTitle ?? 'Upload Files',\r\n uploadButtonText: options?.uploadButtonText ?? 'Upload',\r\n uploadDialogCancelButtonText: options?.uploadDialogCancelButtonText ?? 'Cancel',\r\n uploadDialogFinishButtonText: options?.uploadDialogFinishButtonText ?? 'Finish',\r\n uploadDialogUploadButtonText: options?.uploadButtonText ?? 'Upload',\r\n uploadDialogAddFilesButtonText: options?.uploadDialogAddFilesButtonText ?? 'Add Files'\r\n };\r\n }\r\n\r\n upload(files: Set<File>): UploadStatus { // {[key: string]: Observable<number>} {\r\n // this will be the our resulting map\r\n const status: UploadStatus = {};\r\n\r\n files.forEach(file => {\r\n // create a new multipart-form for every file\r\n const formData: FormData = new FormData();\r\n formData.append('file', file, file.name);\r\n\r\n // create a http-post request and pass the form\r\n // tell it to report the upload progress\r\n\r\n // A 'Destination' header is used to optionally configure the file upload destination (filesystem)\r\n // A 'DbAppId' header is used to configure the unique identifier of database uploads\r\n \r\n let headers = new HttpHeaders();\r\n if (this.options.uploadPath) {\r\n headers = headers.set('Destination', this.options.uploadPath);\r\n }\r\n if (this.options.dbAppId) {\r\n headers = headers.set('DbAppId', this.options.dbAppId);\r\n }\r\n if (this.options.externalReferenceId) {\r\n headers = headers.set('ExternalReferenceId', this.options.externalReferenceId);\r\n }\r\n if (this.options.comment) {\r\n headers = headers.set('Comment', this.options.comment);\r\n }\r\n\r\n const req = new HttpRequest('POST', `${this.apiUrl}${this.options.databaseEndpoint}`, formData, {\r\n reportProgress: true,\r\n responseType: 'blob',\r\n headers\r\n });\r\n\r\n // create a new progress-subject for every file\r\n const progress = new Subject<number>();\r\n\r\n // send the http-request and subscribe for progress-updates\r\n this.#http.request(req).subscribe(event => {\r\n if (event.type === HttpEventType.UploadProgress) {\r\n\r\n // calculate the progress percentage\r\n const percentDone = Math.round(100 * event.loaded / (event.total ?? 1));\r\n\r\n // pass the percentage into the progress-stream\r\n progress.next(percentDone);\r\n } else if (event instanceof HttpResponse) {\r\n\r\n // Close the progress-stream if we get an answer form the API\r\n // The upload is complete\r\n progress.complete();\r\n }\r\n });\r\n\r\n // Save every progress-observable in a map of all observables\r\n status[file.name] = {\r\n progress: progress.asObservable()\r\n };\r\n });\r\n\r\n // return the map of progress.observables\r\n return status;\r\n }\r\n\r\n exists(fileName: string): Observable<boolean> {\r\n const query = `${this.apiUrl}${this.options.databaseEndpoint}`.toLowerCase().includes('filesystem') ?\r\n { name: fileName, destination: this.options.uploadPath } :\r\n { name: fileName, dbAppId: this.options.dbAppId };\r\n\r\n return this.#http.post<boolean>(`${this.apiUrl}${this.options.databaseEndpoint}/exists`, query);\r\n }\r\n\r\n download(request: FileUploadRequest): Observable<Blob> {\r\n return this.#http.post(`${this.apiUrl}${this.options.databaseEndpoint}/stream`, request, { responseType: 'blob' });\r\n }\r\n\r\n getMsgContent(request: FileUploadRequest): Observable<MsgFileContent> {\r\n return this.#http.post<MsgFileContent>(`${this.apiUrl}${this.options.databaseEndpoint}/msg`, request);\r\n }\r\n\r\n getUploadInfo(request: FileUploadRequest):\r\n Observable<DatabaseFileInfo | DatabaseFileInfo[] | FilesystemFileInfo | FilesystemFileInfo[]> {\r\n return this.#http.post<DatabaseFileInfo | DatabaseFileInfo[] | FilesystemFileInfo | FilesystemFileInfo[]>\r\n (`${this.apiUrl}${this.options.databaseEndpoint}/info`, request);\r\n }\r\n}","import { AsyncPipe } from '@angular/common';\r\nimport { Component, ElementRef, inject, viewChild } from '@angular/core';\r\nimport { MatButton } from '@angular/material/button';\r\nimport { MatDialogActions, MatDialogClose, MatDialogContent, MatDialogRef } from '@angular/material/dialog';\r\nimport { MatList, MatListItem } from '@angular/material/list';\r\nimport { MatProgressBar } from '@angular/material/progress-bar';\r\nimport { Observable, forkJoin } from 'rxjs';\r\nimport { UploadStatus } from '../../model/upload-status';\r\nimport { UploadService } from './../../services/upload.service';\r\n\r\n@Component({\r\n templateUrl: './upload-dialog.component.html',\r\n standalone: true,\r\n imports: [\r\n AsyncPipe,\r\n MatButton,\r\n MatDialogActions,\r\n MatDialogClose,\r\n MatDialogContent,\r\n MatList,\r\n MatListItem,\r\n MatProgressBar\r\n ],\r\n styleUrl: './upload-dialog.component.scss'\r\n})\r\nexport class UploadDialogComponent {\r\n services = {\r\n dialogRef: inject(MatDialogRef<UploadDialogComponent>),\r\n upload: inject(UploadService)\r\n };\r\n\r\n file = viewChild.required<ElementRef>('file');\r\n\r\n files: Set<File> = new Set();\r\n existingFileConflict?: string;\r\n\r\n // State\r\n progress?: UploadStatus;\r\n canBeClosed = true;\r\n primaryButtonText = this.services.upload.options.uploadDialogUploadButtonText;\r\n showCancelButton = true;\r\n uploading = false;\r\n uploadSuccessful = false;\r\n\r\n addFiles() {\r\n this.file().nativeElement.click();\r\n }\r\n\r\n onFilesAdded() {\r\n const files: { [key: string]: File } = this.file().nativeElement.files;\r\n for (const key in files) {\r\n if (!isNaN(parseInt(key))) {\r\n // See if the file already exists\r\n this.services.upload.exists(files[key].name)\r\n .subscribe(exists => {\r\n if (exists) {\r\n this.existingFileConflict = files[key].name;\r\n }\r\n\r\n if (!exists) {\r\n this.files.add(files[key]);\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n closeDialog() {\r\n // if everything was uploaded already, just close the dialog\r\n if (this.uploadSuccessful) {\r\n return this.services.dialogRef.close();\r\n }\r\n\r\n // set the component state to \"uploading\"\r\n this.uploading = true;\r\n\r\n // start the upload and save the progress map\r\n this.progress = this.services.upload.upload(this.files);\r\n\r\n // convert the progress map into an array\r\n const allProgressObservables$: Observable<number>[] = [];\r\n\r\n for (let key in this.progress) {\r\n allProgressObservables$.push(this.progress[key].progress);\r\n }\r\n\r\n // Adjust the state variables\r\n\r\n // The OK-button should have the text \"Finish\" now\r\n this.primaryButtonText = this.services.upload.options.uploadDialogFinishButtonText;\r\n\r\n // The dialog should not be closed while uploading\r\n this.canBeClosed = false;\r\n this.services.dialogRef.disableClose = true;\r\n\r\n // Hide the cancel-button\r\n this.showCancelButton = false;\r\n\r\n // When all progress-observables are completed...\r\n forkJoin(allProgressObservables$)\r\n .subscribe({\r\n complete: () => {\r\n // ... the dialog can be closed again...\r\n this.canBeClosed = true;\r\n this.services.dialogRef.disableClose = false;\r\n \r\n // ... the upload was successful...\r\n this.uploadSuccessful = true;\r\n \r\n // ... and the component is no longer uploading\r\n this.uploading = false;\r\n\r\n console.log('Upload complete', this.files);\r\n\r\n this.services.dialogRef.close();\r\n }\r\n });\r\n }\r\n}\r\n","<input type=\"file\" #file style=\"display: none\" (change)=\"onFilesAdded()\" multiple />\n\n<div mat-dialog-title id=\"title\">\n <div>{{ services.upload.options.uploadDialogTitle }}</div>\n <button [disabled]=\"uploading || uploadSuccessful\" mat-raised-button color=\"primary\" class=\"add-files-btn\" (click)=\"addFiles()\">\n {{ services.upload.options.uploadDialogAddFilesButtonText }}\n </button>\n</div>\n\n@if (existingFileConflict) {\n <div id=\"conflict\">\n {{ existingFileConflict }} already exists on the server and cannot be overwritten\n </div>\n}\n\n<mat-dialog-content>\n <mat-list>\n @for (file of files; track file) {\n <mat-list-item>\n <h4 mat-line>{{file.name}}</h4>\n @if (progress) {\n <mat-progress-bar mode=\"determinate\" [value]=\"progress[file.name].progress | async\"/>\n }\n </mat-list-item>\n }\n </mat-list>\n</mat-dialog-content>\n\n<mat-dialog-actions id=\"actions\">\n @if (showCancelButton) {\n <button mat-button mat-dialog-close>{{ services.upload.options.uploadDialogCancelButtonText }}</button>\n }\n @if (files.size > 0) {\n <button mat-raised-button color=\"primary\" [disabled]=\"!canBeClosed\" (click)=\"closeDialog()\">{{ primaryButtonText }}</button>\n }\n</mat-dialog-actions>\n","import { Component, inject, output } from '@angular/core';\r\nimport { MatDialog } from '@angular/material/dialog';\r\n\r\nimport { MatButton } from '@angular/material/button';\r\nimport { UploadService } from './../../services/upload.service';\r\nimport { UploadDialogComponent } from './../upload-dialog/upload-dialog.component';\r\n\r\n@Component({\r\n selector: 'cp-upload',\r\n standalone: true,\r\n imports: [\r\n MatButton\r\n ],\r\n template: '<button mat-raised-button (click)=\"openUploadDialog()\">{{ uploadService.options.uploadButtonText }}</button>'\r\n})\r\nexport class UploadComponent {\r\n #dialogService = inject(MatDialog);\r\n uploadService = inject(UploadService);\r\n\r\n dialogClosed = output();\r\n\r\n openUploadDialog() {\r\n this.#dialogService.open(UploadDialogComponent, { width: '50%' })\r\n .afterClosed().subscribe(() => this.dialogClosed.emit());\r\n }\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';\r\n\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatDialogModule } from '@angular/material/dialog';\r\nimport { MatListModule } from '@angular/material/list';\r\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\r\n\r\nimport { UploadDialogComponent } from './components/upload-dialog/upload-dialog.component';\r\nimport { UploadComponent } from './components/upload/upload.component';\r\nimport { UploadServiceOptions } from './model/upload-service-options';\r\nimport { UploadServiceOptionsToken } from './model/upload-service-options-token';\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n CommonModule,\r\n MatButtonModule,\r\n MatDialogModule,\r\n MatListModule,\r\n MatProgressBarModule,\r\n\r\n UploadComponent,\r\n UploadDialogComponent\r\n ],\r\n exports: [\r\n UploadComponent,\r\n UploadDialogComponent\r\n ]\r\n})\r\nexport class UploadModule {\r\n static forRoot(options: UploadServiceOptions): ModuleWithProviders<UploadModule> {\r\n return {\r\n ngModule: UploadModule,\r\n providers: [\r\n {\r\n provide: UploadServiceOptionsToken,\r\n useValue: options\r\n }\r\n ]\r\n }\r\n }\r\n\r\n constructor(@Optional() @SkipSelf() parentModule: UploadModule) {\r\n if (parentModule) {\r\n throw new Error(\r\n 'UploadModule is already loaded. Import it in the AppModule only');\r\n }\r\n }\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './upload.api';\n"],"names":[],"mappings":";;;;;;;;;;;AAIC,CAAC;AAID,CAAC;AAaD;;ACNA;;MCZY,yBAAyB,GAAG,IAAI,cAAc,CAAuB,EAAE;;ACUpF;AAKM,MAAO,aAAc,SAAQ,iBAAiB,CAAA;AAClD,IAAA,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAE3B,IAAA,WAAA,CAAkE,OAA6B,EAAA;QAC7F,KAAK,CAAC,OAAO,CAAC,CAAC;QADiD,IAAO,CAAA,OAAA,GAAP,OAAO,CAAsB;QAG7F,IAAI,CAAC,OAAO,GAAG;AACb,YAAA,GAAG,OAAO;AACV,YAAA,gBAAgB,EAAE,OAAO,EAAE,gBAAgB,IAAI,kBAAkB;AACjE,YAAA,iBAAiB,EAAE,OAAO,EAAE,iBAAiB,IAAI,cAAc;AAC/D,YAAA,gBAAgB,EAAE,OAAO,EAAE,gBAAgB,IAAI,QAAQ;AACvD,YAAA,4BAA4B,EAAE,OAAO,EAAE,4BAA4B,IAAI,QAAQ;AAC/E,YAAA,4BAA4B,EAAE,OAAO,EAAE,4BAA4B,IAAI,QAAQ;AAC/E,YAAA,4BAA4B,EAAE,OAAO,EAAE,gBAAgB,IAAI,QAAQ;AACnE,YAAA,8BAA8B,EAAE,OAAO,EAAE,8BAA8B,IAAI,WAAW;SACvF,CAAC;KACH;AAED,IAAA,MAAM,CAAC,KAAgB,EAAA;;QAErB,MAAM,MAAM,GAAiB,EAAE,CAAC;AAEhC,QAAA,KAAK,CAAC,OAAO,C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AAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,YAdrB,YAAY;YACZ,eAAe;YACf,eAAe;YACf,aAAa;YACb,oBAAoB;YAEpB,eAAe;YACf,qBAAqB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAOZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAjBxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,eAAe;wBACf,eAAe;wBACf,aAAa;wBACb,oBAAoB;wBAEpB,eAAe;wBACf,qBAAqB;AACtB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,eAAe;wBACf,qBAAqB;AACtB,qBAAA;AACF,iBAAA,CAAA;;0BAcc,QAAQ;;0BAAI,QAAQ;;;AC3CnC;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "comment": "NGX-LIB primary entry point package.json",
3
3
  "name": "@cleavelandprice/ngx-lib",
4
- "version": "4.1.17",
4
+ "version": "4.1.18",
5
5
  "description": "Angular library providing foundational functionality to Cleaveland-Price applications",
6
6
  "peerDependencies": {
7
7
  "@angular/common": "^17.3.5",
@@ -41,11 +41,11 @@
41
41
  "esm": "./esm2022/active-directory/cleavelandprice-ngx-lib-active-directory.mjs",
42
42
  "default": "./fesm2022/cleavelandprice-ngx-lib-active-directory.mjs"
43
43
  },
44
- "./authentication": {
45
- "types": "./authentication/index.d.ts",
46
- "esm2022": "./esm2022/authentication/cleavelandprice-ngx-lib-authentication.mjs",
47
- "esm": "./esm2022/authentication/cleavelandprice-ngx-lib-authentication.mjs",
48
- "default": "./fesm2022/cleavelandprice-ngx-lib-authentication.mjs"
44
+ "./dialog": {
45
+ "types": "./dialog/index.d.ts",
46
+ "esm2022": "./esm2022/dialog/cleavelandprice-ngx-lib-dialog.mjs",
47
+ "esm": "./esm2022/dialog/cleavelandprice-ngx-lib-dialog.mjs",
48
+ "default": "./fesm2022/cleavelandprice-ngx-lib-dialog.mjs"
49
49
  },
50
50
  "./msgraph": {
51
51
  "types": "./msgraph/index.d.ts",
@@ -53,11 +53,11 @@
53
53
  "esm": "./esm2022/msgraph/cleavelandprice-ngx-lib-msgraph.mjs",
54
54
  "default": "./fesm2022/cleavelandprice-ngx-lib-msgraph.mjs"
55
55
  },
56
- "./dialog": {
57
- "types": "./dialog/index.d.ts",
58
- "esm2022": "./esm2022/dialog/cleavelandprice-ngx-lib-dialog.mjs",
59
- "esm": "./esm2022/dialog/cleavelandprice-ngx-lib-dialog.mjs",
60
- "default": "./fesm2022/cleavelandprice-ngx-lib-dialog.mjs"
56
+ "./authentication": {
57
+ "types": "./authentication/index.d.ts",
58
+ "esm2022": "./esm2022/authentication/cleavelandprice-ngx-lib-authentication.mjs",
59
+ "esm": "./esm2022/authentication/cleavelandprice-ngx-lib-authentication.mjs",
60
+ "default": "./fesm2022/cleavelandprice-ngx-lib-authentication.mjs"
61
61
  },
62
62
  "./quill": {
63
63
  "types": "./quill/index.d.ts",
@@ -77,36 +77,36 @@
77
77
  "esm": "./esm2022/table/cleavelandprice-ngx-lib-table.mjs",
78
78
  "default": "./fesm2022/cleavelandprice-ngx-lib-table.mjs"
79
79
  },
80
- "./url-utilities": {
81
- "types": "./url-utilities/index.d.ts",
82
- "esm2022": "./esm2022/url-utilities/cleavelandprice-ngx-lib-url-utilities.mjs",
83
- "esm": "./esm2022/url-utilities/cleavelandprice-ngx-lib-url-utilities.mjs",
84
- "default": "./fesm2022/cleavelandprice-ngx-lib-url-utilities.mjs"
85
- },
86
80
  "./upload": {
87
81
  "types": "./upload/index.d.ts",
88
82
  "esm2022": "./esm2022/upload/cleavelandprice-ngx-lib-upload.mjs",
89
83
  "esm": "./esm2022/upload/cleavelandprice-ngx-lib-upload.mjs",
90
84
  "default": "./fesm2022/cleavelandprice-ngx-lib-upload.mjs"
91
85
  },
86
+ "./url-utilities": {
87
+ "types": "./url-utilities/index.d.ts",
88
+ "esm2022": "./esm2022/url-utilities/cleavelandprice-ngx-lib-url-utilities.mjs",
89
+ "esm": "./esm2022/url-utilities/cleavelandprice-ngx-lib-url-utilities.mjs",
90
+ "default": "./fesm2022/cleavelandprice-ngx-lib-url-utilities.mjs"
91
+ },
92
92
  "./active-directory/material": {
93
93
  "types": "./active-directory/material/index.d.ts",
94
94
  "esm2022": "./esm2022/active-directory/material/cleavelandprice-ngx-lib-active-directory-material.mjs",
95
95
  "esm": "./esm2022/active-directory/material/cleavelandprice-ngx-lib-active-directory-material.mjs",
96
96
  "default": "./fesm2022/cleavelandprice-ngx-lib-active-directory-material.mjs"
97
97
  },
98
- "./authentication/object": {
99
- "types": "./authentication/object/index.d.ts",
100
- "esm2022": "./esm2022/authentication/object/cleavelandprice-ngx-lib-authentication-object.mjs",
101
- "esm": "./esm2022/authentication/object/cleavelandprice-ngx-lib-authentication-object.mjs",
102
- "default": "./fesm2022/cleavelandprice-ngx-lib-authentication-object.mjs"
103
- },
104
98
  "./authentication/material": {
105
99
  "types": "./authentication/material/index.d.ts",
106
100
  "esm2022": "./esm2022/authentication/material/cleavelandprice-ngx-lib-authentication-material.mjs",
107
101
  "esm": "./esm2022/authentication/material/cleavelandprice-ngx-lib-authentication-material.mjs",
108
102
  "default": "./fesm2022/cleavelandprice-ngx-lib-authentication-material.mjs"
109
103
  },
104
+ "./authentication/object": {
105
+ "types": "./authentication/object/index.d.ts",
106
+ "esm2022": "./esm2022/authentication/object/cleavelandprice-ngx-lib-authentication-object.mjs",
107
+ "esm": "./esm2022/authentication/object/cleavelandprice-ngx-lib-authentication-object.mjs",
108
+ "default": "./fesm2022/cleavelandprice-ngx-lib-authentication-object.mjs"
109
+ },
110
110
  "./authentication/token": {
111
111
  "types": "./authentication/token/index.d.ts",
112
112
  "esm2022": "./esm2022/authentication/token/cleavelandprice-ngx-lib-authentication-token.mjs",
@@ -8,7 +8,7 @@ export interface MsgFileRecipient extends MsgFileContact {
8
8
  }
9
9
  export interface MsgFileContent {
10
10
  attachments: string[];
11
- bodyHTML: string;
11
+ bodyHtml: string;
12
12
  bodyText: string;
13
13
  creationTime: string;
14
14
  id: string;