@cleavelandprice/ngx-lib 3.11.4 → 3.13.0

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 (76) hide show
  1. package/README.md +5 -5
  2. package/active-directory/gui/components/user-chooser/user-chooser.component.d.ts +20 -2
  3. package/active-directory/gui/components/user-form-field/user-form-field.component.d.ts +5 -4
  4. package/authentication/token/gui/components/login/login.component.d.ts +3 -3
  5. package/authentication/token/gui/components/login-form/login-form.component.d.ts +1 -2
  6. package/authentication/token/gui/services/authentication.service.d.ts +2 -4
  7. package/authentication/token/services/authentication.service.d.ts +3 -4
  8. package/dialog/components/base/base.component.d.ts +6 -5
  9. package/esm2022/active-directory/gui/components/user-chooser/user-chooser.component.mjs +60 -68
  10. package/esm2022/active-directory/gui/components/user-form-field/user-form-field.component.mjs +22 -27
  11. package/esm2022/active-directory/gui/gui.module.mjs +1 -1
  12. package/esm2022/authentication/token/gui/components/login/login.component.mjs +10 -11
  13. package/esm2022/authentication/token/gui/components/login-form/login-form.component.mjs +11 -12
  14. package/esm2022/authentication/token/gui/services/authentication.service.mjs +5 -7
  15. package/esm2022/authentication/token/services/authentication.service.mjs +9 -8
  16. package/esm2022/dialog/components/base/base.component.mjs +26 -26
  17. package/esm2022/dialog/components/choice/choice.component.mjs +3 -3
  18. package/esm2022/dialog/components/confirmation/confirmation.component.mjs +3 -3
  19. package/esm2022/dialog/components/input/input.component.mjs +3 -3
  20. package/esm2022/dialog/components/message/message.component.mjs +3 -3
  21. package/esm2022/dialog/dialog.module.mjs +1 -1
  22. package/esm2022/lib/services/app-path-config.service.mjs +13 -10
  23. package/esm2022/msgraph/msgraph.module.mjs +1 -1
  24. package/esm2022/quill/components/editor/editor.component.mjs +41 -48
  25. package/esm2022/quill/components/raw/raw.component.mjs +3 -3
  26. package/esm2022/quill/mention/components/editor/editor.component.mjs +30 -40
  27. package/esm2022/sharepoint/components/user-photo/user-photo.component.mjs +36 -0
  28. package/esm2022/sharepoint/pipes/user-photo-url.pipe.mjs +38 -0
  29. package/esm2022/sharepoint/public_api.mjs +3 -3
  30. package/esm2022/sharepoint/sharepoint.module.mjs +11 -11
  31. package/esm2022/table/components/table/table.component.mjs +97 -5
  32. package/esm2022/table/model/table-column.mjs +2 -0
  33. package/esm2022/table/public_api.mjs +3 -1
  34. package/esm2022/table/table.module.mjs +67 -0
  35. package/esm2022/upload/components/upload-dialog/upload-dialog.component.mjs +3 -3
  36. package/esm2022/url-utilities/pipes/safe-resource-url.pipe.mjs +1 -1
  37. package/esm2022/url-utilities/pipes/safe-url.pipe.mjs +1 -1
  38. package/esm2022/url-utilities/pipes/uri-scheme.pipe.mjs +1 -1
  39. package/esm2022/url-utilities/url-utilities.module.mjs +1 -1
  40. package/fesm2022/cleavelandprice-ngx-lib-active-directory-gui.mjs +79 -91
  41. package/fesm2022/cleavelandprice-ngx-lib-active-directory-gui.mjs.map +1 -1
  42. package/fesm2022/cleavelandprice-ngx-lib-authentication-token-gui.mjs +24 -28
  43. package/fesm2022/cleavelandprice-ngx-lib-authentication-token-gui.mjs.map +1 -1
  44. package/fesm2022/cleavelandprice-ngx-lib-authentication-token.mjs +8 -7
  45. package/fesm2022/cleavelandprice-ngx-lib-authentication-token.mjs.map +1 -1
  46. package/fesm2022/cleavelandprice-ngx-lib-dialog.mjs +33 -33
  47. package/fesm2022/cleavelandprice-ngx-lib-dialog.mjs.map +1 -1
  48. package/fesm2022/cleavelandprice-ngx-lib-msgraph.mjs.map +1 -1
  49. package/fesm2022/cleavelandprice-ngx-lib-quill-mention.mjs +30 -40
  50. package/fesm2022/cleavelandprice-ngx-lib-quill-mention.mjs.map +1 -1
  51. package/fesm2022/cleavelandprice-ngx-lib-quill.mjs +44 -50
  52. package/fesm2022/cleavelandprice-ngx-lib-quill.mjs.map +1 -1
  53. package/fesm2022/cleavelandprice-ngx-lib-sharepoint.mjs +34 -35
  54. package/fesm2022/cleavelandprice-ngx-lib-sharepoint.mjs.map +1 -1
  55. package/fesm2022/cleavelandprice-ngx-lib-table.mjs +157 -4
  56. package/fesm2022/cleavelandprice-ngx-lib-table.mjs.map +1 -1
  57. package/fesm2022/cleavelandprice-ngx-lib-upload.mjs +2 -2
  58. package/fesm2022/cleavelandprice-ngx-lib-upload.mjs.map +1 -1
  59. package/fesm2022/cleavelandprice-ngx-lib-url-utilities.mjs.map +1 -1
  60. package/fesm2022/cleavelandprice-ngx-lib.mjs +12 -9
  61. package/fesm2022/cleavelandprice-ngx-lib.mjs.map +1 -1
  62. package/lib/services/app-path-config.service.d.ts +1 -2
  63. package/package.json +12 -12
  64. package/quill/components/editor/editor.component.d.ts +2 -7
  65. package/quill/mention/components/editor/editor.component.d.ts +13 -10
  66. package/sharepoint/components/user-photo/user-photo.component.d.ts +15 -0
  67. package/sharepoint/pipes/{employee-photo-url.pipe.d.ts → user-photo-url.pipe.d.ts} +3 -3
  68. package/sharepoint/public_api.d.ts +2 -2
  69. package/sharepoint/sharepoint.module.d.ts +3 -3
  70. package/table/components/table/table.component.d.ts +32 -1
  71. package/table/model/table-column.d.ts +36 -0
  72. package/table/public_api.d.ts +2 -0
  73. package/table/table.module.d.ts +18 -0
  74. package/esm2022/sharepoint/components/employee-photo/employee-photo.component.mjs +0 -37
  75. package/esm2022/sharepoint/pipes/employee-photo-url.pipe.mjs +0 -38
  76. package/sharepoint/components/employee-photo/employee-photo.component.d.ts +0 -15
@@ -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,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,CAAC;AAsFlF,KAAA;;AAlFQ,IAAA,MAAM,CAAC,KAAgB,EAAA;;QAE5B,MAAM,MAAM,GAAoD,EAAE,CAAC;AAEnE,QAAA,KAAK,CAAC,OAAO,CAAC,IAAI,IAAG;;AAEnB,YAAA,MAAM,QAAQ,GAAa,IAAI,QAAQ,EAAE,CAAC;YAC1C,QAAQ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AAA,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":["NgxL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ACtB,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,\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AA,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,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,CAAA,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,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;;;;"}
@@ -28,28 +28,31 @@ class AppPathConfigService {
28
28
  //#region Services
29
29
  this.config = inject(ServiceConfig, { optional: true }) ?? new ServiceConfig();
30
30
  this.http = inject(HttpClient);
31
- this.url = `${this.config.apiUrl}/apppathconfigs`;
31
+ //#endregion
32
+ this.#url = `${this.config.apiUrl}/apppathconfigs`;
32
33
  }
34
+ //#endregion
35
+ #url;
33
36
  getAll() {
34
- return this.http.get(this.url);
37
+ return this.http.get(this.#url);
35
38
  }
36
39
  getById(id) {
37
- return this.http.get(`${this.url}/${id}`);
40
+ return this.http.get(`${this.#url}/${id}`);
38
41
  }
39
42
  getByAppId(id) {
40
- return this.http.get(`${this.url}/appid/${id}`);
43
+ return this.http.get(`${this.#url}/appid/${id}`);
41
44
  }
42
45
  getByApp(name) {
43
- return this.http.get(`${this.url}/app/${name}`);
46
+ return this.http.get(`${this.#url}/app/${name}`);
44
47
  }
45
48
  getByAppTypeId(id) {
46
- return this.http.get(`${this.url}/apptypeid/${id}`);
49
+ return this.http.get(`${this.#url}/apptypeid/${id}`);
47
50
  }
48
51
  getByAppType(name) {
49
- return this.http.get(`${this.url}/apptype/${name}`);
52
+ return this.http.get(`${this.#url}/apptype/${name}`);
50
53
  }
51
54
  getByAppFunction(name) {
52
- return this.http.get(`${this.url}/function/${name}`);
55
+ return this.http.get(`${this.#url}/function/${name}`);
53
56
  }
54
57
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AppPathConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
55
58
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AppPathConfigService, providedIn: 'root' }); }
@@ -59,7 +62,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
59
62
  args: [{
60
63
  providedIn: 'root'
61
64
  }]
62
- }], ctorParameters: () => [] });
65
+ }] });
63
66
 
64
67
  class NgxLibModule {
65
68
  static forRoot(config) {
@@ -1 +1 @@
1
- {"version":3,"file":"cleavelandprice-ngx-lib.mjs","sources":["../../../../projects/cleavelandprice/ngx-lib/src/lib/model/service-config.ts","../../../../projects/cleavelandprice/ngx-lib/src/lib/services/app-path-config.service.ts","../../../../projects/cleavelandprice/ngx-lib/src/lib/ngx-lib.module.ts","../../../../projects/cleavelandprice/ngx-lib/src/public_api.ts","../../../../projects/cleavelandprice/ngx-lib/src/cleavelandprice-ngx-lib.ts"],"sourcesContent":["export class ServiceConfig {\r\n useSsl = false;\r\n customApiUrl?: string;\r\n\r\n get apiUrl(): string {\r\n return this.customApiUrl ? this.customApiUrl :\r\n this.useSsl ?\r\n 'https://utilityapi.cleavelandprice.com' :\r\n 'http://utilityapi';\r\n }\r\n\r\n /* Since TypeScript's implementation of overloads sucks, I'm doing something weird here.\r\n useSsl_or_customApiUrl will usually be a boolean value that determines whether or not SSL is used with the normal utilityapi URL options.\r\n But if you want to completely disregard the utilityapi URL and use your own, you would pass the URL via this parameter. */\r\n constructor(useSsl_or_customApiUrl: boolean | string = false) {\r\n if (typeof useSsl_or_customApiUrl === 'boolean') {\r\n this.useSsl = useSsl_or_customApiUrl;\r\n } else if (typeof useSsl_or_customApiUrl === 'string') {\r\n this.customApiUrl = useSsl_or_customApiUrl;\r\n }\r\n }\r\n}","import { HttpClient } from '@angular/common/http';\r\nimport { inject, Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\n\r\nimport { AppPathConfig } from '../model/app-path-config';\r\nimport { ServiceConfig } from '../model/service-config';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AppPathConfigService {\r\n //#region Services\r\n private config = inject(ServiceConfig, { optional: true }) ?? new ServiceConfig();\r\n private http = inject(HttpClient);\r\n //#endregion\r\n\r\n url!: string;\r\n\r\n constructor() {\r\n this.url = `${this.config.apiUrl}/apppathconfigs`\r\n }\r\n\r\n getAll(): Observable<AppPathConfig[]> {\r\n return this.http.get<AppPathConfig[]>(this.url);\r\n }\r\n\r\n getById(id: number): Observable<AppPathConfig> {\r\n return this.http.get<AppPathConfig>(`${this.url}/${id}`);\r\n }\r\n\r\n getByAppId(id: number): Observable<AppPathConfig[]> {\r\n return this.http.get<AppPathConfig[]>(`${this.url}/appid/${id}`);\r\n }\r\n\r\n getByApp(name: string): Observable<AppPathConfig[]> {\r\n return this.http.get<AppPathConfig[]>(`${this.url}/app/${name}`);\r\n }\r\n\r\n getByAppTypeId(id: number): Observable<AppPathConfig[]> {\r\n return this.http.get<AppPathConfig[]>(`${this.url}/apptypeid/${id}`);\r\n }\r\n\r\n getByAppType(name: string): Observable<AppPathConfig[]> {\r\n return this.http.get<AppPathConfig[]>(`${this.url}/apptype/${name}`);\r\n }\r\n\r\n getByAppFunction(name: string): Observable<AppPathConfig[]> {\r\n return this.http.get<AppPathConfig[]>(`${this.url}/function/${name}`);\r\n }\r\n}\r\n","import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';\r\n\r\nimport { AppPathConfigService } from './services/app-path-config.service';\r\n\r\nimport { ServiceConfig } from './model/service-config';\r\n\r\n@NgModule({\r\n declarations: [\r\n ],\r\n imports: [\r\n ],\r\n exports: [\r\n ]\r\n})\r\nexport class NgxLibModule {\r\n static forRoot(config: ServiceConfig): ModuleWithProviders<NgxLibModule> {\r\n return {\r\n ngModule: NgxLibModule,\r\n providers: [\r\n AppPathConfigService,\r\n { provide: ServiceConfig, useValue: config }\r\n ]\r\n };\r\n }\r\n\r\n constructor(@Optional() @SkipSelf() parentModule: NgxLibModule) {\r\n if (parentModule) {\r\n throw new Error(\r\n 'NgxLibModule is already loaded. Import it in the AppModule only');\r\n }\r\n }\r\n}","/*\r\n * Public API Surface of ngx-lib\r\n */\r\n\r\nexport * from './lib/model/app';\r\nexport * from './lib/model/app-path-config';\r\nexport * from './lib/model/app-type';\r\nexport * from './lib/model/service-config';\r\n\r\nexport * from './lib/services/app-path-config.service';\r\n\r\nexport * from './lib/ngx-lib.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;MAAa,aAAa,CAAA;AAItB,IAAA,IAAI,MAAM,GAAA;QACN,OAAO,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY;YACxC,IAAI,CAAC,MAAM;AACP,gBAAA,wCAAwC;AACxC,gBAAA,mBAAmB,CAAC;KAC/B;AAED;;AAE8H;AAC9H,IAAA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EAAE;AAC7C,aAAA;SACF,CAAC;KACH;AAED,IAAA,WAAA,CAAoC,YAA0B,EAAA;QAC5D,IAAI,YAAY,EAAE;AAChB,YAAA,MAAM,IAAI,KAAK,CACb,iEAAiE,CAAC,CAAC;SACtE;KACF;8GAhBU,YAAY,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAZ,YAAY,EAAA,CAAA,CAAA,EAAA;+GAAZ,YAAY,EAAA,CAAA,CAAA,EAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBARxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EACb;AACD,oBAAA,OAAO,EAAE,EACR;AACD,oBAAA,OAAO,EAAE,EACR;AACF,iBAAA,CAAA;;0BAYc,QAAQ;;0BAAI,QAAQ;;;ACzBnC;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"cleavelandprice-ngx-lib.mjs","sources":["../../../../projects/cleavelandprice/ngx-lib/src/lib/model/service-config.ts","../../../../projects/cleavelandprice/ngx-lib/src/lib/services/app-path-config.service.ts","../../../../projects/cleavelandprice/ngx-lib/src/lib/ngx-lib.module.ts","../../../../projects/cleavelandprice/ngx-lib/src/public_api.ts","../../../../projects/cleavelandprice/ngx-lib/src/cleavelandprice-ngx-lib.ts"],"sourcesContent":["export class ServiceConfig {\r\n useSsl = false;\r\n customApiUrl?: string;\r\n\r\n get apiUrl(): string {\r\n return this.customApiUrl ? this.customApiUrl :\r\n this.useSsl ?\r\n 'https://utilityapi.cleavelandprice.com' :\r\n 'http://utilityapi';\r\n }\r\n\r\n /* Since TypeScript's implementation of overloads sucks, I'm doing something weird here.\r\n useSsl_or_customApiUrl will usually be a boolean value that determines whether or not SSL is used with the normal utilityapi URL options.\r\n But if you want to completely disregard the utilityapi URL and use your own, you would pass the URL via this parameter. */\r\n constructor(useSsl_or_customApiUrl: boolean | string = false) {\r\n if (typeof useSsl_or_customApiUrl === 'boolean') {\r\n this.useSsl = useSsl_or_customApiUrl;\r\n } else if (typeof useSsl_or_customApiUrl === 'string') {\r\n this.customApiUrl = useSsl_or_customApiUrl;\r\n }\r\n }\r\n}","import { HttpClient } from '@angular/common/http';\r\nimport { inject, Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\n\r\nimport { AppPathConfig } from '../model/app-path-config';\r\nimport { ServiceConfig } from '../model/service-config';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AppPathConfigService {\r\n //#region Services\r\n private config = inject(ServiceConfig, { optional: true }) ?? new ServiceConfig();\r\n private http = inject(HttpClient);\r\n //#endregion\r\n\r\n #url = `${this.config.apiUrl}/apppathconfigs`;\r\n\r\n getAll(): Observable<AppPathConfig[]> {\r\n return this.http.get<AppPathConfig[]>(this.#url);\r\n }\r\n\r\n getById(id: number): Observable<AppPathConfig> {\r\n return this.http.get<AppPathConfig>(`${this.#url}/${id}`);\r\n }\r\n\r\n getByAppId(id: number): Observable<AppPathConfig[]> {\r\n return this.http.get<AppPathConfig[]>(`${this.#url}/appid/${id}`);\r\n }\r\n\r\n getByApp(name: string): Observable<AppPathConfig[]> {\r\n return this.http.get<AppPathConfig[]>(`${this.#url}/app/${name}`);\r\n }\r\n\r\n getByAppTypeId(id: number): Observable<AppPathConfig[]> {\r\n return this.http.get<AppPathConfig[]>(`${this.#url}/apptypeid/${id}`);\r\n }\r\n\r\n getByAppType(name: string): Observable<AppPathConfig[]> {\r\n return this.http.get<AppPathConfig[]>(`${this.#url}/apptype/${name}`);\r\n }\r\n\r\n getByAppFunction(name: string): Observable<AppPathConfig[]> {\r\n return this.http.get<AppPathConfig[]>(`${this.#url}/function/${name}`);\r\n }\r\n}\r\n","import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';\r\n\r\nimport { AppPathConfigService } from './services/app-path-config.service';\r\n\r\nimport { ServiceConfig } from './model/service-config';\r\n\r\n@NgModule({\r\n declarations: [\r\n ],\r\n imports: [\r\n ],\r\n exports: [\r\n ]\r\n})\r\nexport class NgxLibModule {\r\n static forRoot(config: ServiceConfig): ModuleWithProviders<NgxLibModule> {\r\n return {\r\n ngModule: NgxLibModule,\r\n providers: [\r\n AppPathConfigService,\r\n { provide: ServiceConfig, useValue: config }\r\n ]\r\n };\r\n }\r\n\r\n constructor(@Optional() @SkipSelf() parentModule: NgxLibModule) {\r\n if (parentModule) {\r\n throw new Error(\r\n 'NgxLibModule is already loaded. Import it in the AppModule only');\r\n }\r\n }\r\n}","/*\r\n * Public API Surface of ngx-lib\r\n */\r\n\r\nexport * from './lib/model/app';\r\nexport * from './lib/model/app-path-config';\r\nexport * from './lib/model/app-type';\r\nexport * from './lib/model/service-config';\r\n\r\nexport * from './lib/services/app-path-config.service';\r\n\r\nexport * from './lib/ngx-lib.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;MAAa,aAAa,CAAA;AAItB,IAAA,IAAI,MAAM,GAAA;QACN,OAAO,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY;YACxC,IAAI,CAAC,MAAM;AACP,gBAAA,wCAAwC;AACxC,gBAAA,mBAAmB,CAAC;KAC/B;AAED;;AAE8H;AAC9H,IAAA,WAAA,CAAY,yBAA2C,KAAK,EAAA;QAb5D,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC;AAcX,QAAA,IAAI,OAAO,sBAAsB,KAAK,SAAS,EAAE;AAC7C,YAAA,IAAI,CAAC,MAAM,GAAG,sBAAsB,CAAC;SACxC;AAAM,aAAA,IAAI,OAAO,sBAAsB,KAAK,QAAQ,EAAE;AACnD,YAAA,IAAI,CAAC,YAAY,GAAG,sBAAsB,CAAC;SAC9C;KACJ;AACJ;;MCXY,oBAAoB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AAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAZ,YAAY,EAAA,CAAA,CAAA,EAAA;+GAAZ,YAAY,EAAA,CAAA,CAAA,EAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBARxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EACb;AACD,oBAAA,OAAO,EAAE,EACR;AACD,oBAAA,OAAO,EAAE,EACR;AACF,iBAAA,CAAA;;0BAYc,QAAQ;;0BAAI,QAAQ;;;ACzBnC;;AAEG;;ACFH;;AAEG;;;;"}
@@ -2,10 +2,9 @@ import { Observable } from 'rxjs';
2
2
  import { AppPathConfig } from '../model/app-path-config';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class AppPathConfigService {
5
+ #private;
5
6
  private config;
6
7
  private http;
7
- url: string;
8
- constructor();
9
8
  getAll(): Observable<AppPathConfig[]>;
10
9
  getById(id: number): Observable<AppPathConfig>;
11
10
  getByAppId(id: number): Observable<AppPathConfig[]>;
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.11.4",
4
+ "version": "3.13.0",
5
5
  "description": "Angular 15+ library providing foundational functionality to Cleaveland-Price applications",
6
6
  "peerDependencies": {
7
7
  "@angular/common": "^17.1.2",
@@ -58,23 +58,17 @@
58
58
  "esm": "./esm2022/msgraph/cleavelandprice-ngx-lib-msgraph.mjs",
59
59
  "default": "./fesm2022/cleavelandprice-ngx-lib-msgraph.mjs"
60
60
  },
61
- "./quill": {
62
- "types": "./quill/index.d.ts",
63
- "esm2022": "./esm2022/quill/cleavelandprice-ngx-lib-quill.mjs",
64
- "esm": "./esm2022/quill/cleavelandprice-ngx-lib-quill.mjs",
65
- "default": "./fesm2022/cleavelandprice-ngx-lib-quill.mjs"
66
- },
67
61
  "./sharepoint": {
68
62
  "types": "./sharepoint/index.d.ts",
69
63
  "esm2022": "./esm2022/sharepoint/cleavelandprice-ngx-lib-sharepoint.mjs",
70
64
  "esm": "./esm2022/sharepoint/cleavelandprice-ngx-lib-sharepoint.mjs",
71
65
  "default": "./fesm2022/cleavelandprice-ngx-lib-sharepoint.mjs"
72
66
  },
73
- "./table": {
74
- "types": "./table/index.d.ts",
75
- "esm2022": "./esm2022/table/cleavelandprice-ngx-lib-table.mjs",
76
- "esm": "./esm2022/table/cleavelandprice-ngx-lib-table.mjs",
77
- "default": "./fesm2022/cleavelandprice-ngx-lib-table.mjs"
67
+ "./quill": {
68
+ "types": "./quill/index.d.ts",
69
+ "esm2022": "./esm2022/quill/cleavelandprice-ngx-lib-quill.mjs",
70
+ "esm": "./esm2022/quill/cleavelandprice-ngx-lib-quill.mjs",
71
+ "default": "./fesm2022/cleavelandprice-ngx-lib-quill.mjs"
78
72
  },
79
73
  "./upload": {
80
74
  "types": "./upload/index.d.ts",
@@ -88,6 +82,12 @@
88
82
  "esm": "./esm2022/url-utilities/cleavelandprice-ngx-lib-url-utilities.mjs",
89
83
  "default": "./fesm2022/cleavelandprice-ngx-lib-url-utilities.mjs"
90
84
  },
85
+ "./table": {
86
+ "types": "./table/index.d.ts",
87
+ "esm2022": "./esm2022/table/cleavelandprice-ngx-lib-table.mjs",
88
+ "esm": "./esm2022/table/cleavelandprice-ngx-lib-table.mjs",
89
+ "default": "./fesm2022/cleavelandprice-ngx-lib-table.mjs"
90
+ },
91
91
  "./active-directory/gui": {
92
92
  "types": "./active-directory/gui/index.d.ts",
93
93
  "esm2022": "./esm2022/active-directory/gui/cleavelandprice-ngx-lib-active-directory-gui.mjs",
@@ -1,14 +1,10 @@
1
1
  import { EventEmitter, OnInit } from '@angular/core';
2
2
  import { ControlValueAccessor } from "@angular/forms";
3
- import { MatDialog, MatDialogRef } from '@angular/material/dialog';
4
3
  import { Blur, ContentChange, EditorChangeContent, EditorChangeSelection, Focus, QuillEditorComponent, SelectionChange } from 'ngx-quill';
5
4
  import { Config } from '../../model/config';
6
- import { DialogData } from '../../model/dialog-data';
7
5
  import * as i0 from "@angular/core";
8
6
  export declare class EditorComponent implements OnInit, ControlValueAccessor {
9
- private data;
10
- private dialogRef;
11
- private dialog;
7
+ #private;
12
8
  editor?: QuillEditorComponent;
13
9
  value: any;
14
10
  onChange: (_: any) => void;
@@ -37,7 +33,6 @@ export declare class EditorComponent implements OnInit, ControlValueAccessor {
37
33
  onEditorCreated: EventEmitter<any>;
38
34
  onFocus: EventEmitter<Focus>;
39
35
  onSelectionChanged: EventEmitter<SelectionChange>;
40
- constructor(data: DialogData, dialogRef: MatDialogRef<EditorComponent>, dialog: MatDialog);
41
36
  ngOnInit(): void;
42
37
  initialize(): void;
43
38
  toggleFullscreen(): void;
@@ -48,6 +43,6 @@ export declare class EditorComponent implements OnInit, ControlValueAccessor {
48
43
  writeValue(value: any): void;
49
44
  registerOnChange(fn: any): void;
50
45
  registerOnTouched(fn: any): void;
51
- static ɵfac: i0.ɵɵFactoryDeclaration<EditorComponent, [{ optional: true; }, { optional: true; }, null]>;
46
+ static ɵfac: i0.ɵɵFactoryDeclaration<EditorComponent, never>;
52
47
  static ɵcmp: i0.ɵɵComponentDeclaration<EditorComponent, "cpquill-editor", never, { "config": { "alias": "config"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "format": { "alias": "format"; "required": false; }; "height": { "alias": "height"; "required": false; }; "width": { "alias": "width"; "required": false; }; "fullscreenHeight": { "alias": "fullscreenHeight"; "required": false; }; "fullscreenWidth": { "alias": "fullscreenWidth"; "required": false; }; "fullscreenMode": { "alias": "fullscreenMode"; "required": false; }; "enableTooltips": { "alias": "enableTooltips"; "required": false; }; "fullscreen": { "alias": "fullscreen"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "applyReadonlyStyle": { "alias": "applyReadonlyStyle"; "required": false; }; "showToolbar": { "alias": "showToolbar"; "required": false; }; "showBorder": { "alias": "showBorder"; "required": false; }; "imageResizeModule": { "alias": "imageResizeModule"; "required": false; }; "imageDropModule": { "alias": "imageDropModule"; "required": false; }; "syntaxModule": { "alias": "syntaxModule"; "required": false; }; }, { "fullscreenChanged": "fullscreenChanged"; "onBlur": "onBlur"; "onContentChanged": "onContentChanged"; "onEditorChanged": "onEditorChanged"; "onEditorCreated": "onEditorCreated"; "onFocus": "onFocus"; "onSelectionChanged": "onSelectionChanged"; }, never, never, false, never>;
53
48
  }
@@ -1,20 +1,23 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { ControlValueAccessor } from "@angular/forms";
3
- import { MatDialog, MatDialogRef } from '@angular/material/dialog';
4
- import { ActiveDirectoryService, User } from '@cleavelandprice/ngx-lib/active-directory';
3
+ import { User } from '@cleavelandprice/ngx-lib/active-directory';
5
4
  import 'quill-mention';
6
5
  import { EditorComponent as EditorComponentBase } from '@cleavelandprice/ngx-lib/quill';
7
- import { DialogData } from '../../model/dialog-data';
8
6
  import * as i0 from "@angular/core";
9
7
  export declare class EditorComponent extends EditorComponentBase implements OnInit, ControlValueAccessor {
10
- private dlgRef;
11
- private dlg;
12
- private activeDirectoryService;
13
- users?: User[];
14
- constructor(data: DialogData, dlgRef: MatDialogRef<EditorComponent>, dlg: MatDialog, activeDirectoryService: ActiveDirectoryService);
8
+ #private;
9
+ users: {
10
+ (): import("@angular/core").InputSignal<User[] | undefined, User[] | undefined>;
11
+ (initialValue: User[], opts?: import("@angular/core").InputOptionsWithoutTransform<User[]> | undefined): import("@angular/core").InputSignal<User[], User[]>;
12
+ required: {
13
+ <ReadT>(opts?: import("@angular/core").InputOptionsWithoutTransform<ReadT> | undefined): import("@angular/core").InputSignal<ReadT, ReadT>;
14
+ <ReadT_1, WriteT>(opts: import("@angular/core").InputOptionsWithTransform<ReadT_1, WriteT>): import("@angular/core").InputSignal<ReadT_1, WriteT>;
15
+ };
16
+ };
17
+ _users: User[];
15
18
  ngOnInit(): void;
16
19
  toggleFullscreen(): void;
17
20
  get modules(): {};
18
- static ɵfac: i0.ɵɵFactoryDeclaration<EditorComponent, [{ optional: true; }, { optional: true; }, null, null]>;
19
- static ɵcmp: i0.ɵɵComponentDeclaration<EditorComponent, "cpquill-editor-with-mention", never, { "users": { "alias": "users"; "required": false; }; }, {}, never, never, false, never>;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<EditorComponent, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<EditorComponent, "cpquill-editor-with-mention", never, {}, {}, never, never, false, never>;
20
23
  }
@@ -0,0 +1,15 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { CleavelandPriceUser } from '@cleavelandprice/ngx-lib/active-directory';
3
+ import { PhotoItem } from '../../model/photo-item';
4
+ import * as i0 from "@angular/core";
5
+ export declare class UserPhotoComponent implements OnInit {
6
+ private activeDirectoryService;
7
+ user: import("@angular/core").InputSignal<string | CleavelandPriceUser, string | CleavelandPriceUser>;
8
+ protected _user: CleavelandPriceUser;
9
+ userPhotos: import("@angular/core").InputSignal<PhotoItem[] | undefined, PhotoItem[] | undefined>;
10
+ size: import("@angular/core").InputSignal<string, string>;
11
+ notRound: import("@angular/core").InputSignal<boolean, boolean>;
12
+ ngOnInit(): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserPhotoComponent, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<UserPhotoComponent, "user-photo", never, { "user": { "alias": "user"; "required": true; "isSignal": true; }; "userPhotos": { "alias": "userPhotos"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "notRound": { "alias": "notRound"; "required": false; "isSignal": true; }; }, {}, never, never, false, never>;
15
+ }
@@ -2,9 +2,9 @@ import { PipeTransform } from '@angular/core';
2
2
  import { CleavelandPriceUser } from '@cleavelandprice/ngx-lib/active-directory';
3
3
  import { PhotoItem } from '../model/photo-item';
4
4
  import * as i0 from "@angular/core";
5
- export declare class EmployeePhotoUrlPipe implements PipeTransform {
5
+ export declare class UserPhotoUrlPipe implements PipeTransform {
6
6
  private sharePointService;
7
7
  transform(user: CleavelandPriceUser, userPhotos?: PhotoItem[]): any;
8
- static ɵfac: i0.ɵɵFactoryDeclaration<EmployeePhotoUrlPipe, never>;
9
- static ɵpipe: i0.ɵɵPipeDeclaration<EmployeePhotoUrlPipe, "employeePhotoUrl", false>;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserPhotoUrlPipe, never>;
9
+ static ɵpipe: i0.ɵɵPipeDeclaration<UserPhotoUrlPipe, "userPhotoUrl", false>;
10
10
  }
@@ -10,7 +10,7 @@ export * from './model/service-config';
10
10
  export * from './model/uri-request';
11
11
  export * from './model/user';
12
12
  export * from './model/user-request';
13
- export * from './pipes/employee-photo-url.pipe';
14
- export * from './components/employee-photo/employee-photo.component';
13
+ export * from './pipes/user-photo-url.pipe';
14
+ export * from './components/user-photo/user-photo.component';
15
15
  export * from './services/sharepoint.service';
16
16
  export * from './sharepoint.module';
@@ -1,13 +1,13 @@
1
1
  import { ModuleWithProviders } from '@angular/core';
2
2
  import { ServiceConfig } from './model/service-config';
3
3
  import * as i0 from "@angular/core";
4
- import * as i1 from "./pipes/employee-photo-url.pipe";
5
- import * as i2 from "./components/employee-photo/employee-photo.component";
4
+ import * as i1 from "./pipes/user-photo-url.pipe";
5
+ import * as i2 from "./components/user-photo/user-photo.component";
6
6
  import * as i3 from "@angular/common";
7
7
  export declare class SharePointModule {
8
8
  static forRoot(config: ServiceConfig): ModuleWithProviders<SharePointModule>;
9
9
  constructor(parentModule: SharePointModule);
10
10
  static ɵfac: i0.ɵɵFactoryDeclaration<SharePointModule, [{ optional: true; skipSelf: true; }]>;
11
- static ɵmod: i0.ɵɵNgModuleDeclaration<SharePointModule, [typeof i1.EmployeePhotoUrlPipe, typeof i2.EmployeePhotoComponent], [typeof i3.CommonModule], [typeof i1.EmployeePhotoUrlPipe, typeof i2.EmployeePhotoComponent]>;
11
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SharePointModule, [typeof i1.UserPhotoUrlPipe, typeof i2.UserPhotoComponent], [typeof i3.CommonModule], [typeof i1.UserPhotoUrlPipe, typeof i2.UserPhotoComponent]>;
12
12
  static ɵinj: i0.ɵɵInjectorDeclaration<SharePointModule>;
13
13
  }
@@ -1,5 +1,36 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { MatTableDataSource } from '@angular/material/table';
3
+ import { MatPaginator } from '@angular/material/paginator';
4
+ import { MatSort } from '@angular/material/sort';
5
+ import { TableColumn } from '../../model/table-column';
1
6
  import * as i0 from "@angular/core";
2
7
  export declare class TableComponent {
8
+ title: string;
9
+ tableData: any[];
10
+ columns: TableColumn[];
11
+ showPaginator: boolean;
12
+ showSearch: boolean;
13
+ maxTableHeight: string;
14
+ shrinkTableRowHeight: boolean;
15
+ paginatorSticky: boolean;
16
+ isMobile: boolean;
17
+ buttonClicked: EventEmitter<{
18
+ rowData: any;
19
+ field: string;
20
+ }>;
21
+ dataSource: MatTableDataSource<any, MatPaginator>;
22
+ pageSizeOptions: number[];
23
+ get columnNames(): string[];
24
+ private paginator;
25
+ private sort;
26
+ set matSort(ms: MatSort);
27
+ set matPaginator(mp: MatPaginator);
28
+ constructor();
29
+ ngOnInit(): void;
30
+ searchFilterChange(event: Event): void;
31
+ buttonClick(rowData: any, field: string): void;
32
+ getNestedFieldValue(rowData: any, nestedFieldName: string | undefined): any;
33
+ private setTablePageSizeOptions;
3
34
  static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "lib-table", never, {}, {}, never, never, false, never>;
35
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "lib-table", never, { "title": { "alias": "title"; "required": false; }; "tableData": { "alias": "tableData"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "showPaginator": { "alias": "showPaginator"; "required": false; }; "showSearch": { "alias": "showSearch"; "required": false; }; "maxTableHeight": { "alias": "maxTableHeight"; "required": false; }; "shrinkTableRowHeight": { "alias": "shrinkTableRowHeight"; "required": false; }; "paginatorSticky": { "alias": "paginatorSticky"; "required": false; }; }, { "buttonClicked": "buttonClicked"; }, never, never, false, never>;
5
36
  }
@@ -0,0 +1,36 @@
1
+ export interface TableColumn {
2
+ field: string;
3
+ fieldColumnTitle: string;
4
+ isDate?: boolean;
5
+ isPercent?: boolean;
6
+ isNumber?: {
7
+ needsRounded: boolean;
8
+ percentage?: boolean;
9
+ };
10
+ isCheckbox?: {
11
+ isDisabled: boolean;
12
+ };
13
+ isButton?: {
14
+ isDisabled: boolean;
15
+ text?: string;
16
+ isIcon?: {
17
+ iconName: string;
18
+ toolTip: string;
19
+ };
20
+ isCheckbox?: {
21
+ toolTip: string;
22
+ multipleSelect: boolean;
23
+ };
24
+ extraPadding?: boolean;
25
+ };
26
+ isEditable?: {
27
+ type: string;
28
+ disable?: boolean;
29
+ isNumber?: boolean;
30
+ };
31
+ hideOnMobile?: boolean;
32
+ nestedField?: string;
33
+ isHyperlink?: {
34
+ linkField: string;
35
+ };
36
+ }
@@ -1 +1,3 @@
1
+ export * from './model/table-column';
1
2
  export * from './components/table/table.component';
3
+ export * from './table.module';
@@ -0,0 +1,18 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./components/table/table.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/forms";
5
+ import * as i4 from "@angular/material/button";
6
+ import * as i5 from "@angular/material/checkbox";
7
+ import * as i6 from "@angular/material/form-field";
8
+ import * as i7 from "@angular/material/input";
9
+ import * as i8 from "@angular/material/table";
10
+ import * as i9 from "@angular/material/sort";
11
+ import * as i10 from "@angular/material/paginator";
12
+ import * as i11 from "@angular/material/tooltip";
13
+ import * as i12 from "@angular/material/icon";
14
+ export declare class TableModule {
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableModule, never>;
16
+ static ɵmod: i0.ɵɵNgModuleDeclaration<TableModule, [typeof i1.TableComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.MatButtonModule, typeof i5.MatCheckboxModule, typeof i6.MatFormFieldModule, typeof i7.MatInputModule, typeof i8.MatTableModule, typeof i9.MatSortModule, typeof i10.MatPaginatorModule, typeof i11.MatTooltipModule, typeof i12.MatIconModule], [typeof i1.TableComponent]>;
17
+ static ɵinj: i0.ɵɵInjectorDeclaration<TableModule>;
18
+ }
@@ -1,37 +0,0 @@
1
- import { Component, inject, Input } from '@angular/core';
2
- import { ActiveDirectoryService } from '@cleavelandprice/ngx-lib/active-directory';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "@angular/common";
5
- import * as i2 from "../../pipes/employee-photo-url.pipe";
6
- export class EmployeePhotoComponent {
7
- constructor() {
8
- this.activeDirectoryService = inject(ActiveDirectoryService);
9
- this.size = "2em";
10
- this.notRound = false;
11
- }
12
- ngOnInit() {
13
- if (this.accountName && !this.employee) {
14
- // Developer passed in an account name instead of a user object
15
- // We need to do the work of getting the user object ourselves
16
- this.activeDirectoryService.getUser(this.accountName)
17
- .subscribe(user => this.employee = user);
18
- }
19
- }
20
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: EmployeePhotoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
21
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: EmployeePhotoComponent, selector: "employee-photo", inputs: { employee: "employee", accountName: "accountName", employeePhotos: "employeePhotos", size: "size", notRound: "notRound" }, ngImport: i0, template: "@if (employee) {\n @if ((employee | employeePhotoUrl:employeePhotos | async)) {\n <img\n [src]=\"employee | employeePhotoUrl:employeePhotos | async\"\n [style.width]=\"size\"\n [style.height]=\"size\"\n [style.border-radius]=\"notRound ? 'default' : '100%'\">\n }\n}", styles: [""], dependencies: [{ kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.EmployeePhotoUrlPipe, name: "employeePhotoUrl" }] }); }
22
- }
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: EmployeePhotoComponent, decorators: [{
24
- type: Component,
25
- args: [{ selector: 'employee-photo', template: "@if (employee) {\n @if ((employee | employeePhotoUrl:employeePhotos | async)) {\n <img\n [src]=\"employee | employeePhotoUrl:employeePhotos | async\"\n [style.width]=\"size\"\n [style.height]=\"size\"\n [style.border-radius]=\"notRound ? 'default' : '100%'\">\n }\n}" }]
26
- }], propDecorators: { employee: [{
27
- type: Input
28
- }], accountName: [{
29
- type: Input
30
- }], employeePhotos: [{
31
- type: Input
32
- }], size: [{
33
- type: Input
34
- }], notRound: [{
35
- type: Input
36
- }] } });
37
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1wbG95ZWUtcGhvdG8uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY2xlYXZlbGFuZHByaWNlL25neC1saWIvc2hhcmVwb2ludC9zcmMvY29tcG9uZW50cy9lbXBsb3llZS1waG90by9lbXBsb3llZS1waG90by5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jbGVhdmVsYW5kcHJpY2Uvbmd4LWxpYi9zaGFyZXBvaW50L3NyYy9jb21wb25lbnRzL2VtcGxveWVlLXBob3RvL2VtcGxveWVlLXBob3RvLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxFQUFFLEtBQUssRUFBVSxNQUFNLGVBQWUsQ0FBQztBQUNqRSxPQUFPLEVBQUUsc0JBQXNCLEVBQXVCLE1BQU0sMkNBQTJDLENBQUM7Ozs7QUFReEcsTUFBTSxPQUFPLHNCQUFzQjtJQUxuQztRQU1VLDJCQUFzQixHQUFHLE1BQU0sQ0FBQyxzQkFBc0IsQ0F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