@cleavelandprice/ngx-lib 3.14.3 → 3.14.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.
Files changed (43) hide show
  1. package/README.md +5 -5
  2. package/esm2022/active-directory/gui/components/user-chooser/user-chooser.component.mjs +3 -3
  3. package/esm2022/active-directory/gui/components/user-form-field/user-form-field.component.mjs +3 -3
  4. package/esm2022/active-directory/gui/gui.module.mjs +1 -1
  5. package/esm2022/authentication/token/gui/components/login/login.component.mjs +3 -3
  6. package/esm2022/authentication/token/gui/components/login-form/login-form.component.mjs +3 -3
  7. package/esm2022/dialog/components/base/base.component.mjs +3 -3
  8. package/esm2022/dialog/components/choice/choice.component.mjs +3 -3
  9. package/esm2022/dialog/components/confirmation/confirmation.component.mjs +3 -3
  10. package/esm2022/dialog/components/input/input.component.mjs +3 -3
  11. package/esm2022/dialog/components/message/message.component.mjs +3 -3
  12. package/esm2022/dialog/dialog.module.mjs +1 -1
  13. package/esm2022/msgraph/msgraph.module.mjs +1 -1
  14. package/esm2022/quill/components/editor/editor.component.mjs +3 -3
  15. package/esm2022/quill/components/raw/raw.component.mjs +3 -3
  16. package/esm2022/quill/mention/components/editor/editor.component.mjs +3 -3
  17. package/esm2022/sharepoint/pipes/user-photo-url.pipe.mjs +1 -1
  18. package/esm2022/table/components/table/table.component.mjs +3 -3
  19. package/esm2022/table/model/table-column.mjs +1 -1
  20. package/esm2022/upload/components/upload-dialog/upload-dialog.component.mjs +3 -3
  21. package/esm2022/url-utilities/pipes/safe-resource-url.pipe.mjs +1 -1
  22. package/esm2022/url-utilities/pipes/safe-url.pipe.mjs +1 -1
  23. package/esm2022/url-utilities/pipes/uri-scheme.pipe.mjs +1 -1
  24. package/esm2022/url-utilities/url-utilities.module.mjs +1 -1
  25. package/fesm2022/cleavelandprice-ngx-lib-active-directory-gui.mjs +4 -4
  26. package/fesm2022/cleavelandprice-ngx-lib-active-directory-gui.mjs.map +1 -1
  27. package/fesm2022/cleavelandprice-ngx-lib-authentication-token-gui.mjs +4 -4
  28. package/fesm2022/cleavelandprice-ngx-lib-authentication-token-gui.mjs.map +1 -1
  29. package/fesm2022/cleavelandprice-ngx-lib-dialog.mjs +10 -10
  30. package/fesm2022/cleavelandprice-ngx-lib-dialog.mjs.map +1 -1
  31. package/fesm2022/cleavelandprice-ngx-lib-msgraph.mjs.map +1 -1
  32. package/fesm2022/cleavelandprice-ngx-lib-quill-mention.mjs +2 -2
  33. package/fesm2022/cleavelandprice-ngx-lib-quill-mention.mjs.map +1 -1
  34. package/fesm2022/cleavelandprice-ngx-lib-quill.mjs +4 -4
  35. package/fesm2022/cleavelandprice-ngx-lib-quill.mjs.map +1 -1
  36. package/fesm2022/cleavelandprice-ngx-lib-sharepoint.mjs.map +1 -1
  37. package/fesm2022/cleavelandprice-ngx-lib-table.mjs +2 -2
  38. package/fesm2022/cleavelandprice-ngx-lib-table.mjs.map +1 -1
  39. package/fesm2022/cleavelandprice-ngx-lib-upload.mjs +2 -2
  40. package/fesm2022/cleavelandprice-ngx-lib-upload.mjs.map +1 -1
  41. package/fesm2022/cleavelandprice-ngx-lib-url-utilities.mjs.map +1 -1
  42. package/package.json +13 -13
  43. package/table/model/table-column.d.ts +1 -0
@@ -180,11 +180,11 @@ class UploadDialogComponent {
180
180
  });
181
181
  }
182
182
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: UploadDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
183
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.0", type: UploadDialogComponent, selector: "ng-component", viewQueries: [{ propertyName: "file", first: true, predicate: ["file"], descendants: true, static: true }], ngImport: i0, template: "<input type=\"file\" #file style=\"display: none\" (change)=\"onFilesAdded()\" multiple />\n\n<div mat-dialog-title id=\"title\">\n <div>{{ uploadService.config.uploadDialogTitle }}</div>\n <button [disabled]=\"uploading || uploadSuccessful\" mat-raised-button color=\"primary\" class=\"add-files-btn\" (click)=\"addFiles()\">\n {{ uploadService.config.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>{{ uploadService.config.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", styles: ["#title{display:flex;justify-content:space-between}#actions{display:flex;justify-content:flex-end}#conflict{font-size:.8em;color:red;margin-top:.5em}\n"], dependencies: [{ kind: "component", type: i1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i2.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i3.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i3.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "component", type: i4.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }] }); }
183
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.0", type: UploadDialogComponent, selector: "ng-component", viewQueries: [{ propertyName: "file", first: true, predicate: ["file"], descendants: true, static: true }], ngImport: i0, template: "<input type=\"file\" #file style=\"display: none\" (change)=\"onFilesAdded()\" multiple />\r\n\r\n<div mat-dialog-title id=\"title\">\r\n <div>{{ uploadService.config.uploadDialogTitle }}</div>\r\n <button [disabled]=\"uploading || uploadSuccessful\" mat-raised-button color=\"primary\" class=\"add-files-btn\" (click)=\"addFiles()\">\r\n {{ uploadService.config.uploadDialogAddFilesButtonText }}\r\n </button>\r\n</div>\r\n\r\n@if (existingFileConflict) {\r\n <div id=\"conflict\">\r\n {{ existingFileConflict }} already exists on the server and cannot be overwritten\r\n </div>\r\n}\r\n\r\n<mat-dialog-content>\r\n <mat-list>\r\n @for (file of files; track file) {\r\n <mat-list-item>\r\n <h4 mat-line>{{file.name}}</h4>\r\n @if (progress) {\r\n <mat-progress-bar mode=\"determinate\" [value]=\"progress[file.name].progress | async\"/>\r\n }\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions id=\"actions\">\r\n @if (showCancelButton) {\r\n <button mat-button mat-dialog-close>{{ uploadService.config.uploadDialogCancelButtonText }}</button>\r\n }\r\n @if (files.size > 0) {\r\n <button mat-raised-button color=\"primary\" [disabled]=\"!canBeClosed\" (click)=\"closeDialog()\">{{ primaryButtonText }}</button>\r\n }\r\n</mat-dialog-actions>\r\n", styles: ["#title{display:flex;justify-content:space-between}#actions{display:flex;justify-content:flex-end}#conflict{font-size:.8em;color:red;margin-top:.5em}\n"], dependencies: [{ kind: "component", type: i1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i2.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i3.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i3.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "component", type: i4.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }] }); }
184
184
  }
185
185
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: UploadDialogComponent, decorators: [{
186
186
  type: Component,
187
- args: [{ template: "<input type=\"file\" #file style=\"display: none\" (change)=\"onFilesAdded()\" multiple />\n\n<div mat-dialog-title id=\"title\">\n <div>{{ uploadService.config.uploadDialogTitle }}</div>\n <button [disabled]=\"uploading || uploadSuccessful\" mat-raised-button color=\"primary\" class=\"add-files-btn\" (click)=\"addFiles()\">\n {{ uploadService.config.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>{{ uploadService.config.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", styles: ["#title{display:flex;justify-content:space-between}#actions{display:flex;justify-content:flex-end}#conflict{font-size:.8em;color:red;margin-top:.5em}\n"] }]
187
+ args: [{ template: "<input type=\"file\" #file style=\"display: none\" (change)=\"onFilesAdded()\" multiple />\r\n\r\n<div mat-dialog-title id=\"title\">\r\n <div>{{ uploadService.config.uploadDialogTitle }}</div>\r\n <button [disabled]=\"uploading || uploadSuccessful\" mat-raised-button color=\"primary\" class=\"add-files-btn\" (click)=\"addFiles()\">\r\n {{ uploadService.config.uploadDialogAddFilesButtonText }}\r\n </button>\r\n</div>\r\n\r\n@if (existingFileConflict) {\r\n <div id=\"conflict\">\r\n {{ existingFileConflict }} already exists on the server and cannot be overwritten\r\n </div>\r\n}\r\n\r\n<mat-dialog-content>\r\n <mat-list>\r\n @for (file of files; track file) {\r\n <mat-list-item>\r\n <h4 mat-line>{{file.name}}</h4>\r\n @if (progress) {\r\n <mat-progress-bar mode=\"determinate\" [value]=\"progress[file.name].progress | async\"/>\r\n }\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions id=\"actions\">\r\n @if (showCancelButton) {\r\n <button mat-button mat-dialog-close>{{ uploadService.config.uploadDialogCancelButtonText }}</button>\r\n }\r\n @if (files.size > 0) {\r\n <button mat-raised-button color=\"primary\" [disabled]=\"!canBeClosed\" (click)=\"closeDialog()\">{{ primaryButtonText }}</button>\r\n }\r\n</mat-dialog-actions>\r\n", styles: ["#title{display:flex;justify-content:space-between}#actions{display:flex;justify-content:flex-end}#conflict{font-size:.8em;color:red;margin-top:.5em}\n"] }]
188
188
  }], propDecorators: { file: [{
189
189
  type: ViewChild,
190
190
  args: ['file', { static: true }]
@@ -1 +1 @@
1
- {"version":3,"file":"cleavelandprice-ngx-lib-upload.mjs","sources":["../../../../projects/cleavelandprice/ngx-lib/upload/src/model/service-config.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":["import { ServiceConfig as NgxLibServiceConfig } from '@cleavelandprice/ngx-lib';\r\n\r\nexport class ServiceConfig extends NgxLibServiceConfig {\r\n databaseEndpoint = '/upload/database';\r\n uploadDialogTitle = 'Upload Files';\r\n uploadPath?: string;\r\n comment?: string;\r\n dbAppId?: string;\r\n externalReferenceId?: string;\r\n \r\n // UI configuration\r\n uploadButtonText = 'Upload';\r\n uploadDialogCancelButtonText = 'Cancel';\r\n uploadDialogFinishButtonText = 'Finish';\r\n uploadDialogUploadButtonText = 'Upload';\r\n uploadDialogAddFilesButtonText = 'Add Files';\r\n\r\n // See the comment in the library's main service-config.ts file for an explanation\r\n constructor(useSsl_or_customApiUrl: boolean | string = false) {\r\n super(useSsl_or_customApiUrl);\r\n }\r\n}","import { HttpClient, HttpEventType, HttpHeaders, HttpRequest, HttpResponse } from '@angular/common/http';\r\nimport { inject, Injectable } from '@angular/core';\r\nimport { Observable, Subject } from 'rxjs';\r\n\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 { ServiceConfig } from '../model/service-config';\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 {\r\n //#region Services\r\n private http = inject(HttpClient);\r\n public config = inject(ServiceConfig, { optional: true }) ?? new ServiceConfig();\r\n //#endregion\r\n\r\n\r\n public upload(files: Set<File>): any { // {[key: string]: Observable<number>} {\r\n // this will be the our resulting map\r\n const status: {[key: string]: {progress: Observable<number>}} = {};\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.config.uploadPath) {\r\n headers = headers.set('Destination', this.config.uploadPath);\r\n }\r\n if (this.config.dbAppId) {\r\n headers = headers.set('DbAppId', this.config.dbAppId);\r\n }\r\n if (this.config.externalReferenceId) {\r\n headers = headers.set('ExternalReferenceId', this.config.externalReferenceId);\r\n }\r\n if (this.config.comment) {\r\n headers = headers.set('Comment', this.config.comment);\r\n }\r\n\r\n const req = new HttpRequest('POST', `${this.config.apiUrl}${this.config.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 public exists(fileName: string): Observable<boolean> {\r\n const query = `${this.config.apiUrl}${this.config.databaseEndpoint}`.toLowerCase().indexOf('filesystem') === -1 ?\r\n { name: fileName, dbAppId: this.config.dbAppId } :\r\n { name: fileName, destination: this.config.uploadPath };\r\n\r\n return this.http.post<boolean>(`${this.config.apiUrl}${this.config.databaseEndpoint}/exists`, query);\r\n }\r\n\r\n public download(request: FileUploadRequest): Observable<Blob> {\r\n return this.http.post(`${this.config.apiUrl}${this.config.databaseEndpoint}/stream`, request, { responseType: 'blob' });\r\n }\r\n\r\n public getUploadInfo(request: FileUploadRequest):\r\n Observable<DatabaseFileInfo | DatabaseFileInfo[] | FilesystemFileInfo | FilesystemFileInfo[]> {\r\n return this.http.post<DatabaseFileInfo | DatabaseFileInfo[] | FilesystemFileInfo | FilesystemFileInfo[]>\r\n (`${this.config.apiUrl}${this.config.databaseEndpoint}/info`, request);\r\n }\r\n}\r\n","import { Component, ElementRef, inject, OnInit, ViewChild } from '@angular/core';\r\nimport { MatDialogRef } from '@angular/material/dialog';\r\nimport { forkJoin } from 'rxjs';\r\n\r\nimport { UploadService } from './../../services/upload.service';\r\n\r\n@Component({\r\n templateUrl: './upload-dialog.component.html',\r\n styleUrls: ['./upload-dialog.component.css']\r\n})\r\nexport class UploadDialogComponent implements OnInit {\r\n //#region Services\r\n public dialogRef = inject(MatDialogRef<UploadDialogComponent>);\r\n public uploadService = inject(UploadService);\r\n //#endregion\r\n\r\n @ViewChild('file', { static: true }) file!: ElementRef;\r\n public files: Set<File> = new Set();\r\n existingFileConflict?: string;\r\n\r\n // State\r\n progress: any;\r\n canBeClosed = true;\r\n primaryButtonText?: string;\r\n showCancelButton = true;\r\n uploading = false;\r\n uploadSuccessful = false;\r\n\r\n ngOnInit() {\r\n this.primaryButtonText = this.uploadService.config.uploadDialogUploadButtonText;\r\n }\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.uploadService.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.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.uploadService.upload(this.files);\r\n\r\n // convert the progress map into an array\r\n const allProgressObservables: any[] = [];\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.uploadService.config.uploadDialogFinishButtonText;\r\n\r\n // The dialog should not be closed while uploading\r\n this.canBeClosed = false;\r\n this.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).subscribe(end => {\r\n // ... the dialog can be closed again...\r\n this.canBeClosed = true;\r\n this.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 }\r\n}\r\n","<input type=\"file\" #file style=\"display: none\" (change)=\"onFilesAdded()\" multiple />\n\n<div mat-dialog-title id=\"title\">\n <div>{{ uploadService.config.uploadDialogTitle }}</div>\n <button [disabled]=\"uploading || uploadSuccessful\" mat-raised-button color=\"primary\" class=\"add-files-btn\" (click)=\"addFiles()\">\n {{ uploadService.config.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>{{ uploadService.config.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, EventEmitter, inject, OnInit, Output } from '@angular/core';\r\nimport { MatDialog } from '@angular/material/dialog';\r\n\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 template: '<button mat-raised-button (click)=\"openUploadDialog()\">{{ uploadButtonText }}</button>'\r\n})\r\nexport class UploadComponent implements OnInit {\r\n //#region Services\r\n public dialog = inject(MatDialog);\r\n public uploadService = inject(UploadService);\r\n //#endregion\r\n\r\n @Output() dialogClosed = new EventEmitter();\r\n uploadButtonText!: string;\r\n\r\n ngOnInit(): void {\r\n this.uploadButtonText = this.uploadService.config.uploadButtonText ?\r\n this.uploadService.config.uploadButtonText :\r\n 'Upload';\r\n }\r\n\r\n public openUploadDialog() {\r\n this.dialog.open(UploadDialogComponent, { width: '50%' })\r\n .afterClosed().subscribe(() => this.dialogClosed.emit());\r\n }\r\n}\r\n","import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\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 { ServiceConfig } from './model/service-config';\r\n\r\nimport { UploadService } from './services/upload.service';\r\n\r\nimport { UploadComponent } from './components/upload/upload.component';\r\nimport { UploadDialogComponent } from './components/upload-dialog/upload-dialog.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n UploadComponent,\r\n UploadDialogComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n MatButtonModule,\r\n MatDialogModule,\r\n MatListModule,\r\n MatProgressBarModule\r\n ],\r\n exports: [\r\n UploadComponent,\r\n UploadDialogComponent\r\n ]\r\n})\r\nexport class UploadModule {\r\n static forRoot(uploadConfig: ServiceConfig): ModuleWithProviders<UploadModule> {\r\n return {\r\n ngModule: UploadModule,\r\n providers: [\r\n UploadService,\r\n { provide: ServiceConfig, useValue: uploadConfig }\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}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["NgxLibServiceConfig"],"mappings":";;;;;;;;;;;;;;;;AAEM,MAAO,aAAc,SAAQA,eAAmB,CAAA;;AAgBlD,IAAA,WAAA,CAAY,yBAA2C,KAAK,EAAA;QACxD,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAhBlC,IAAgB,CAAA,gBAAA,GAAG,kBAAkB,CAAC;QACtC,IAAiB,CAAA,iBAAA,GAAG,cAAc,CAAC;;QAOnC,IAAgB,CAAA,gBAAA,GAAG,QAAQ,CAAC;QAC5B,IAA4B,CAAA,4BAAA,GAAG,QAAQ,CAAC;QACxC,IAA4B,CAAA,4BAAA,GAAG,QAAQ,CAAC;QACxC,IAA4B,CAAA,4BAAA,GAAG,QAAQ,CAAC;QACxC,IAA8B,CAAA,8BAAA,GAAG,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,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAZ,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,iBAfrB,eAAe;AACf,YAAA,qBAAqB,aAGrB,YAAY;YACZ,eAAe;YACf,eAAe;YACf,aAAa;AACb,YAAA,oBAAoB,aAGpB,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,YAXrB,YAAY;YACZ,eAAe;YACf,eAAe;YACf,aAAa;YACb,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAOX,YAAY,EAAA,UAAA,EAAA,CAAA;kBAjBxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,eAAe;wBACf,qBAAqB;AACtB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,eAAe;wBACf,eAAe;wBACf,aAAa;wBACb,oBAAoB;AACrB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,eAAe;wBACf,qBAAqB;AACtB,qBAAA;AACF,iBAAA,CAAA;;0BAYgB,QAAQ;;0BAAI,QAAQ;;;AC3CrC;;AAEG;;;;"}
1
+ {"version":3,"file":"cleavelandprice-ngx-lib-upload.mjs","sources":["../../../../projects/cleavelandprice/ngx-lib/upload/src/model/service-config.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":["import { ServiceConfig as NgxLibServiceConfig } from '@cleavelandprice/ngx-lib';\r\n\r\nexport class ServiceConfig extends NgxLibServiceConfig {\r\n databaseEndpoint = '/upload/database';\r\n uploadDialogTitle = 'Upload Files';\r\n uploadPath?: string;\r\n comment?: string;\r\n dbAppId?: string;\r\n externalReferenceId?: string;\r\n \r\n // UI configuration\r\n uploadButtonText = 'Upload';\r\n uploadDialogCancelButtonText = 'Cancel';\r\n uploadDialogFinishButtonText = 'Finish';\r\n uploadDialogUploadButtonText = 'Upload';\r\n uploadDialogAddFilesButtonText = 'Add Files';\r\n\r\n // See the comment in the library's main service-config.ts file for an explanation\r\n constructor(useSsl_or_customApiUrl: boolean | string = false) {\r\n super(useSsl_or_customApiUrl);\r\n }\r\n}","import { HttpClient, HttpEventType, HttpHeaders, HttpRequest, HttpResponse } from '@angular/common/http';\r\nimport { inject, Injectable } from '@angular/core';\r\nimport { Observable, Subject } from 'rxjs';\r\n\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 { ServiceConfig } from '../model/service-config';\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 {\r\n //#region Services\r\n private http = inject(HttpClient);\r\n public config = inject(ServiceConfig, { optional: true }) ?? new ServiceConfig();\r\n //#endregion\r\n\r\n\r\n public upload(files: Set<File>): any { // {[key: string]: Observable<number>} {\r\n // this will be the our resulting map\r\n const status: {[key: string]: {progress: Observable<number>}} = {};\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.config.uploadPath) {\r\n headers = headers.set('Destination', this.config.uploadPath);\r\n }\r\n if (this.config.dbAppId) {\r\n headers = headers.set('DbAppId', this.config.dbAppId);\r\n }\r\n if (this.config.externalReferenceId) {\r\n headers = headers.set('ExternalReferenceId', this.config.externalReferenceId);\r\n }\r\n if (this.config.comment) {\r\n headers = headers.set('Comment', this.config.comment);\r\n }\r\n\r\n const req = new HttpRequest('POST', `${this.config.apiUrl}${this.config.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 public exists(fileName: string): Observable<boolean> {\r\n const query = `${this.config.apiUrl}${this.config.databaseEndpoint}`.toLowerCase().indexOf('filesystem') === -1 ?\r\n { name: fileName, dbAppId: this.config.dbAppId } :\r\n { name: fileName, destination: this.config.uploadPath };\r\n\r\n return this.http.post<boolean>(`${this.config.apiUrl}${this.config.databaseEndpoint}/exists`, query);\r\n }\r\n\r\n public download(request: FileUploadRequest): Observable<Blob> {\r\n return this.http.post(`${this.config.apiUrl}${this.config.databaseEndpoint}/stream`, request, { responseType: 'blob' });\r\n }\r\n\r\n public getUploadInfo(request: FileUploadRequest):\r\n Observable<DatabaseFileInfo | DatabaseFileInfo[] | FilesystemFileInfo | FilesystemFileInfo[]> {\r\n return this.http.post<DatabaseFileInfo | DatabaseFileInfo[] | FilesystemFileInfo | FilesystemFileInfo[]>\r\n (`${this.config.apiUrl}${this.config.databaseEndpoint}/info`, request);\r\n }\r\n}\r\n","import { Component, ElementRef, inject, OnInit, ViewChild } from '@angular/core';\r\nimport { MatDialogRef } from '@angular/material/dialog';\r\nimport { forkJoin } from 'rxjs';\r\n\r\nimport { UploadService } from './../../services/upload.service';\r\n\r\n@Component({\r\n templateUrl: './upload-dialog.component.html',\r\n styleUrls: ['./upload-dialog.component.css']\r\n})\r\nexport class UploadDialogComponent implements OnInit {\r\n //#region Services\r\n public dialogRef = inject(MatDialogRef<UploadDialogComponent>);\r\n public uploadService = inject(UploadService);\r\n //#endregion\r\n\r\n @ViewChild('file', { static: true }) file!: ElementRef;\r\n public files: Set<File> = new Set();\r\n existingFileConflict?: string;\r\n\r\n // State\r\n progress: any;\r\n canBeClosed = true;\r\n primaryButtonText?: string;\r\n showCancelButton = true;\r\n uploading = false;\r\n uploadSuccessful = false;\r\n\r\n ngOnInit() {\r\n this.primaryButtonText = this.uploadService.config.uploadDialogUploadButtonText;\r\n }\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.uploadService.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.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.uploadService.upload(this.files);\r\n\r\n // convert the progress map into an array\r\n const allProgressObservables: any[] = [];\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.uploadService.config.uploadDialogFinishButtonText;\r\n\r\n // The dialog should not be closed while uploading\r\n this.canBeClosed = false;\r\n this.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).subscribe(end => {\r\n // ... the dialog can be closed again...\r\n this.canBeClosed = true;\r\n this.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 }\r\n}\r\n","<input type=\"file\" #file style=\"display: none\" (change)=\"onFilesAdded()\" multiple />\r\n\r\n<div mat-dialog-title id=\"title\">\r\n <div>{{ uploadService.config.uploadDialogTitle }}</div>\r\n <button [disabled]=\"uploading || uploadSuccessful\" mat-raised-button color=\"primary\" class=\"add-files-btn\" (click)=\"addFiles()\">\r\n {{ uploadService.config.uploadDialogAddFilesButtonText }}\r\n </button>\r\n</div>\r\n\r\n@if (existingFileConflict) {\r\n <div id=\"conflict\">\r\n {{ existingFileConflict }} already exists on the server and cannot be overwritten\r\n </div>\r\n}\r\n\r\n<mat-dialog-content>\r\n <mat-list>\r\n @for (file of files; track file) {\r\n <mat-list-item>\r\n <h4 mat-line>{{file.name}}</h4>\r\n @if (progress) {\r\n <mat-progress-bar mode=\"determinate\" [value]=\"progress[file.name].progress | async\"/>\r\n }\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions id=\"actions\">\r\n @if (showCancelButton) {\r\n <button mat-button mat-dialog-close>{{ uploadService.config.uploadDialogCancelButtonText }}</button>\r\n }\r\n @if (files.size > 0) {\r\n <button mat-raised-button color=\"primary\" [disabled]=\"!canBeClosed\" (click)=\"closeDialog()\">{{ primaryButtonText }}</button>\r\n }\r\n</mat-dialog-actions>\r\n","import { Component, EventEmitter, inject, OnInit, Output } from '@angular/core';\r\nimport { MatDialog } from '@angular/material/dialog';\r\n\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 template: '<button mat-raised-button (click)=\"openUploadDialog()\">{{ uploadButtonText }}</button>'\r\n})\r\nexport class UploadComponent implements OnInit {\r\n //#region Services\r\n public dialog = inject(MatDialog);\r\n public uploadService = inject(UploadService);\r\n //#endregion\r\n\r\n @Output() dialogClosed = new EventEmitter();\r\n uploadButtonText!: string;\r\n\r\n ngOnInit(): void {\r\n this.uploadButtonText = this.uploadService.config.uploadButtonText ?\r\n this.uploadService.config.uploadButtonText :\r\n 'Upload';\r\n }\r\n\r\n public openUploadDialog() {\r\n this.dialog.open(UploadDialogComponent, { width: '50%' })\r\n .afterClosed().subscribe(() => this.dialogClosed.emit());\r\n }\r\n}\r\n","import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\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 { ServiceConfig } from './model/service-config';\r\n\r\nimport { UploadService } from './services/upload.service';\r\n\r\nimport { UploadComponent } from './components/upload/upload.component';\r\nimport { UploadDialogComponent } from './components/upload-dialog/upload-dialog.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n UploadComponent,\r\n UploadDialogComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n MatButtonModule,\r\n MatDialogModule,\r\n MatListModule,\r\n MatProgressBarModule\r\n ],\r\n exports: [\r\n UploadComponent,\r\n UploadDialogComponent\r\n ]\r\n})\r\nexport class UploadModule {\r\n static forRoot(uploadConfig: ServiceConfig): ModuleWithProviders<UploadModule> {\r\n return {\r\n ngModule: UploadModule,\r\n providers: [\r\n UploadService,\r\n { provide: ServiceConfig, useValue: uploadConfig }\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}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["NgxLibServiceConfig"],"mappings":";;;;;;;;;;;;;;;;AAEM,MAAO,aAAc,SAAQA,eAAmB,CAAA;;AAgBlD,IAAA,WAAA,CAAY,yBAA2C,KAAK,EAAA;QACxD,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAhBlC,IAAgB,CAAA,gBAAA,GAAG,kBAAkB,CAAC;QACtC,IAAiB,CAAA,iBAAA,GAAG,cAAc,CAAC;;QAOnC,IAAgB,CAAA,gBAAA,GAAG,QAAQ,CAAC;QAC5B,IAA4B,CAAA,4BAAA,GAAG,QAAQ,CAAC;QACxC,IAA4B,CAAA,4BAAA,GAAG,QAAQ,CAAC;QACxC,IAA4B,CAAA,4BAAA,GAAG,QAAQ,CAAC;QACxC,IAA8B,CAAA,8BAAA,GAAG,WAAW,CAAC;KAK5C;AACJ;;ACZD;MAKa,aAAa,CAAA;AAH1B,IAAA,WAAA,GAAA;;AAKU,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAC3B,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,IAAI,aAAa,EAAE,CAA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f,eAAe;YACf,aAAa;AACb,YAAA,oBAAoB,aAGpB,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,YAXrB,YAAY;YACZ,eAAe;YACf,eAAe;YACf,aAAa;YACb,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAOX,YAAY,EAAA,UAAA,EAAA,CAAA;kBAjBxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,eAAe;wBACf,qBAAqB;AACtB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,eAAe;wBACf,eAAe;wBACf,aAAa;wBACb,oBAAoB;AACrB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,eAAe;wBACf,qBAAqB;AACtB,qBAAA;AACF,iBAAA,CAAA;;0BAYgB,QAAQ;;0BAAI,QAAQ;;;AC3CrC;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"cleavelandprice-ngx-lib-url-utilities.mjs","sources":["../../../../projects/cleavelandprice/ngx-lib/url-utilities/src/pipes/safe-resource-url.pipe.ts","../../../../projects/cleavelandprice/ngx-lib/url-utilities/src/pipes/safe-url.pipe.ts","../../../../projects/cleavelandprice/ngx-lib/url-utilities/src/pipes/uri-scheme.pipe.ts","../../../../projects/cleavelandprice/ngx-lib/url-utilities/src/url-utilities.module.ts","../../../../projects/cleavelandprice/ngx-lib/url-utilities/src/cleavelandprice-ngx-lib-url-utilities.ts"],"sourcesContent":["import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeUrl } from '@angular/platform-browser';\n\n@Pipe({\n name: 'safeResourceUrl'\n})\nexport class SafeResourceUrlPipe implements PipeTransform {\n private domSanitizer = inject(DomSanitizer);\n\n transform(value: string): SafeUrl {\n return this.domSanitizer.bypassSecurityTrustResourceUrl(value);\n }\n}\n","import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeUrl } from '@angular/platform-browser';\n\n@Pipe({\n name: 'safeUrl'\n})\nexport class SafeUrlPipe implements PipeTransform {\n private domSanitizer = inject(DomSanitizer);\n\n transform(value: string): SafeUrl {\n return this.domSanitizer.bypassSecurityTrustUrl(value);\n }\n}","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'uriScheme',\n pure: false\n})\nexport class UriSchemePipe implements PipeTransform {\n // https://docs.microsoft.com/en-us/office/client-developer/office-uri-schemes\n\n transform(value: string, ignoreLocalStorage = false): string {\n if (!localStorage.getItem('useUriScheme') && !ignoreLocalStorage) { return value; }\n\n const urlSplit = value.split('.');\n const extension = urlSplit[urlSplit.length - 1];\n\n if (!extension) { return value; }\n\n const command = this.command(extension);\n const app = this.app(extension);\n\n return `ms-${app}:${command}|u|${value}`;\n }\n\n private app(extension: string): string {\n switch (extension.toLowerCase()) {\n // documents\n case 'doc': case 'docx':\n case 'docm': case 'docb':\n case 'dot': case 'dotx': case 'dotm': // templates\n return 'word';\n case 'xls': case 'xlsx':\n case 'xlm': case 'xlsm': case 'xlsb': case 'xlw':\n case 'xlt': case 'xltx': case 'xltm': // templates\n return 'excel';\n case 'ppt': case 'pptx':\n case 'pps': case 'ppsx': case 'pptm': case 'ppsm':\n case 'sldx': case 'sldm':\n case 'pot': case 'potx': case 'potm': // templates\n return 'powerpoint';\n case 'vsd': case 'vsdx':\n case 'vst': case 'vstx': // templates\n return 'visio';\n case 'mdb': case 'accdb': case 'accde': case 'accdr':\n case 'accdt': // templates\n return 'access';\n case 'mpp': case 'mppx':\n case 'mpt': // templates\n return 'project';\n case 'pub':\n return 'publisher';\n case 'xsn':\n return 'infopath';\n default:\n return '';\n }\n }\n\n private command(extension: string): string {\n switch (extension.toLowerCase()) {\n case 'dot': case 'dotx': case 'dotm':\n case 'xlt': case 'xltx': case 'xltm':\n case 'pot': case 'potx': case 'potm':\n case 'vst': case 'vstx':\n case 'accdt':\n case 'mpt':\n return 'nft'; // new from template\n default:\n const openMode = 'v'; // for view, or 'e' or edit\n return `of${openMode}`; // default: open file as view/edit\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { SafeResourceUrlPipe } from './pipes/safe-resource-url.pipe';\nimport { SafeUrlPipe } from './pipes/safe-url.pipe';\nimport { UriSchemePipe } from './pipes/uri-scheme.pipe';\n\n@NgModule({\n declarations: [\n SafeResourceUrlPipe,\n SafeUrlPipe,\n UriSchemePipe\n ],\n imports: [\n CommonModule\n ],\n exports: [\n SafeResourceUrlPipe,\n SafeUrlPipe,\n UriSchemePipe\n ]\n})\nexport class UrlUtilitiesModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;MAMa,mBAAmB,CAAA;AAHhC,IAAA,WAAA,GAAA;AAIU,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AAK7C,KAAA;AAHC,IAAA,SAAS,CAAC,KAAa,EAAA;QACrB,OAAO,IAAI,CAAC,YAAY,CAAC,8BAA8B,CAAC,KAAK,CAAC,CAAC;KAChE;8GALU,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;4GAAnB,mBAAmB,EAAA,IAAA,EAAA,iBAAA,EAAA,CAAA,CAAA,EAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,iBAAiB;AACxB,iBAAA,CAAA;;;MCCY,WAAW,CAAA;AAHxB,IAAA,WAAA,GAAA;AAIU,QAAA,IAAA,CAA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AA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAlB,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,kBAAkB,iBAb3B,mBAAmB;YACnB,WAAW;YACX,aAAa,CAAA,EAAA,OAAA,EAAA,CAGb,YAAY,CAAA,EAAA,OAAA,EAAA,CAGZ,mBAAmB;YACnB,WAAW;YACX,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;AAGJ,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,kBAAkB,YAR3B,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAQH,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAf9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,mBAAmB;wBACnB,WAAW;wBACX,aAAa;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,mBAAmB;wBACnB,WAAW;wBACX,aAAa;AACd,qBAAA;AACF,iBAAA,CAAA;;;ACrBD;;AAEG;;;;"}
1
+ {"version":3,"file":"cleavelandprice-ngx-lib-url-utilities.mjs","sources":["../../../../projects/cleavelandprice/ngx-lib/url-utilities/src/pipes/safe-resource-url.pipe.ts","../../../../projects/cleavelandprice/ngx-lib/url-utilities/src/pipes/safe-url.pipe.ts","../../../../projects/cleavelandprice/ngx-lib/url-utilities/src/pipes/uri-scheme.pipe.ts","../../../../projects/cleavelandprice/ngx-lib/url-utilities/src/url-utilities.module.ts","../../../../projects/cleavelandprice/ngx-lib/url-utilities/src/cleavelandprice-ngx-lib-url-utilities.ts"],"sourcesContent":["import { inject, Pipe, PipeTransform } from '@angular/core';\r\nimport { DomSanitizer, SafeUrl } from '@angular/platform-browser';\r\n\r\n@Pipe({\r\n name: 'safeResourceUrl'\r\n})\r\nexport class SafeResourceUrlPipe implements PipeTransform {\r\n private domSanitizer = inject(DomSanitizer);\r\n\r\n transform(value: string): SafeUrl {\r\n return this.domSanitizer.bypassSecurityTrustResourceUrl(value);\r\n }\r\n}\r\n","import { inject, Pipe, PipeTransform } from '@angular/core';\r\nimport { DomSanitizer, SafeUrl } from '@angular/platform-browser';\r\n\r\n@Pipe({\r\n name: 'safeUrl'\r\n})\r\nexport class SafeUrlPipe implements PipeTransform {\r\n private domSanitizer = inject(DomSanitizer);\r\n\r\n transform(value: string): SafeUrl {\r\n return this.domSanitizer.bypassSecurityTrustUrl(value);\r\n }\r\n}","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'uriScheme',\r\n pure: false\r\n})\r\nexport class UriSchemePipe implements PipeTransform {\r\n // https://docs.microsoft.com/en-us/office/client-developer/office-uri-schemes\r\n\r\n transform(value: string, ignoreLocalStorage = false): string {\r\n if (!localStorage.getItem('useUriScheme') && !ignoreLocalStorage) { return value; }\r\n\r\n const urlSplit = value.split('.');\r\n const extension = urlSplit[urlSplit.length - 1];\r\n\r\n if (!extension) { return value; }\r\n\r\n const command = this.command(extension);\r\n const app = this.app(extension);\r\n\r\n return `ms-${app}:${command}|u|${value}`;\r\n }\r\n\r\n private app(extension: string): string {\r\n switch (extension.toLowerCase()) {\r\n // documents\r\n case 'doc': case 'docx':\r\n case 'docm': case 'docb':\r\n case 'dot': case 'dotx': case 'dotm': // templates\r\n return 'word';\r\n case 'xls': case 'xlsx':\r\n case 'xlm': case 'xlsm': case 'xlsb': case 'xlw':\r\n case 'xlt': case 'xltx': case 'xltm': // templates\r\n return 'excel';\r\n case 'ppt': case 'pptx':\r\n case 'pps': case 'ppsx': case 'pptm': case 'ppsm':\r\n case 'sldx': case 'sldm':\r\n case 'pot': case 'potx': case 'potm': // templates\r\n return 'powerpoint';\r\n case 'vsd': case 'vsdx':\r\n case 'vst': case 'vstx': // templates\r\n return 'visio';\r\n case 'mdb': case 'accdb': case 'accde': case 'accdr':\r\n case 'accdt': // templates\r\n return 'access';\r\n case 'mpp': case 'mppx':\r\n case 'mpt': // templates\r\n return 'project';\r\n case 'pub':\r\n return 'publisher';\r\n case 'xsn':\r\n return 'infopath';\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n private command(extension: string): string {\r\n switch (extension.toLowerCase()) {\r\n case 'dot': case 'dotx': case 'dotm':\r\n case 'xlt': case 'xltx': case 'xltm':\r\n case 'pot': case 'potx': case 'potm':\r\n case 'vst': case 'vstx':\r\n case 'accdt':\r\n case 'mpt':\r\n return 'nft'; // new from template\r\n default:\r\n const openMode = 'v'; // for view, or 'e' or edit\r\n return `of${openMode}`; // default: open file as view/edit\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { SafeResourceUrlPipe } from './pipes/safe-resource-url.pipe';\r\nimport { SafeUrlPipe } from './pipes/safe-url.pipe';\r\nimport { UriSchemePipe } from './pipes/uri-scheme.pipe';\r\n\r\n@NgModule({\r\n declarations: [\r\n SafeResourceUrlPipe,\r\n SafeUrlPipe,\r\n UriSchemePipe\r\n ],\r\n imports: [\r\n CommonModule\r\n ],\r\n exports: [\r\n SafeResourceUrlPipe,\r\n SafeUrlPipe,\r\n UriSchemePipe\r\n ]\r\n})\r\nexport class UrlUtilitiesModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;MAMa,mBAAmB,CAAA;AAHhC,IAAA,WAAA,GAAA;AAIU,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AAK7C,KAAA;AAHC,IA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B;wBACnB,WAAW;wBACX,aAAa;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,mBAAmB;wBACnB,WAAW;wBACX,aAAa;AACd,qBAAA;AACF,iBAAA,CAAA;;;ACrBD;;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": "3.14.3",
4
+ "version": "3.14.4",
5
5
  "description": "Angular library providing foundational functionality to Cleaveland-Price applications",
6
6
  "peerDependencies": {
7
7
  "@angular/common": "^17.3.0",
@@ -46,18 +46,18 @@
46
46
  "esm": "./esm2022/authentication/cleavelandprice-ngx-lib-authentication.mjs",
47
47
  "default": "./fesm2022/cleavelandprice-ngx-lib-authentication.mjs"
48
48
  },
49
- "./msgraph": {
50
- "types": "./msgraph/index.d.ts",
51
- "esm2022": "./esm2022/msgraph/cleavelandprice-ngx-lib-msgraph.mjs",
52
- "esm": "./esm2022/msgraph/cleavelandprice-ngx-lib-msgraph.mjs",
53
- "default": "./fesm2022/cleavelandprice-ngx-lib-msgraph.mjs"
54
- },
55
49
  "./dialog": {
56
50
  "types": "./dialog/index.d.ts",
57
51
  "esm2022": "./esm2022/dialog/cleavelandprice-ngx-lib-dialog.mjs",
58
52
  "esm": "./esm2022/dialog/cleavelandprice-ngx-lib-dialog.mjs",
59
53
  "default": "./fesm2022/cleavelandprice-ngx-lib-dialog.mjs"
60
54
  },
55
+ "./msgraph": {
56
+ "types": "./msgraph/index.d.ts",
57
+ "esm2022": "./esm2022/msgraph/cleavelandprice-ngx-lib-msgraph.mjs",
58
+ "esm": "./esm2022/msgraph/cleavelandprice-ngx-lib-msgraph.mjs",
59
+ "default": "./fesm2022/cleavelandprice-ngx-lib-msgraph.mjs"
60
+ },
61
61
  "./quill": {
62
62
  "types": "./quill/index.d.ts",
63
63
  "esm2022": "./esm2022/quill/cleavelandprice-ngx-lib-quill.mjs",
@@ -94,18 +94,18 @@
94
94
  "esm": "./esm2022/active-directory/gui/cleavelandprice-ngx-lib-active-directory-gui.mjs",
95
95
  "default": "./fesm2022/cleavelandprice-ngx-lib-active-directory-gui.mjs"
96
96
  },
97
- "./authentication/token": {
98
- "types": "./authentication/token/index.d.ts",
99
- "esm2022": "./esm2022/authentication/token/cleavelandprice-ngx-lib-authentication-token.mjs",
100
- "esm": "./esm2022/authentication/token/cleavelandprice-ngx-lib-authentication-token.mjs",
101
- "default": "./fesm2022/cleavelandprice-ngx-lib-authentication-token.mjs"
102
- },
103
97
  "./authentication/object": {
104
98
  "types": "./authentication/object/index.d.ts",
105
99
  "esm2022": "./esm2022/authentication/object/cleavelandprice-ngx-lib-authentication-object.mjs",
106
100
  "esm": "./esm2022/authentication/object/cleavelandprice-ngx-lib-authentication-object.mjs",
107
101
  "default": "./fesm2022/cleavelandprice-ngx-lib-authentication-object.mjs"
108
102
  },
103
+ "./authentication/token": {
104
+ "types": "./authentication/token/index.d.ts",
105
+ "esm2022": "./esm2022/authentication/token/cleavelandprice-ngx-lib-authentication-token.mjs",
106
+ "esm": "./esm2022/authentication/token/cleavelandprice-ngx-lib-authentication-token.mjs",
107
+ "default": "./fesm2022/cleavelandprice-ngx-lib-authentication-token.mjs"
108
+ },
109
109
  "./quill/mention": {
110
110
  "types": "./quill/mention/index.d.ts",
111
111
  "esm2022": "./esm2022/quill/mention/cleavelandprice-ngx-lib-quill-mention.mjs",
@@ -1,6 +1,7 @@
1
1
  export interface TableColumn {
2
2
  field: string;
3
3
  fieldColumnTitle: string;
4
+ columnWidth?: string;
4
5
  isDate?: boolean;
5
6
  isPercent?: boolean;
6
7
  isNumber?: {