cat-documents-ng 0.1.32 → 0.1.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,5 @@
1
1
  /**
2
2
  * Storing all permission properties.
3
- * @export
4
3
  * @class PERMISSIONS
5
4
  * @typedef {PERMISSIONS}
6
5
  */
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { Injectable, Component, Input, EventEmitter, Output, ViewEncapsulation, ViewChild, Directive, APP_INITIALIZER, NgModule } from '@angular/core';
3
3
  import * as i5 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
- import { firstValueFrom, tap, EMPTY, catchError, throwError, BehaviorSubject, Subscription, Subject, takeUntil } from 'rxjs';
5
+ import { firstValueFrom, tap, EMPTY, catchError, throwError, BehaviorSubject, Subject, Subscription, takeUntil } from 'rxjs';
6
6
  import { __decorate } from 'tslib';
7
7
  import { EntityStore, StoreConfig, QueryEntity } from '@datorama/akita';
8
8
  import * as i2 from '@angular/common/http';
@@ -912,7 +912,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
912
912
 
913
913
  /**
914
914
  * Storing all permission properties.
915
- * @export
916
915
  * @class PERMISSIONS
917
916
  * @typedef {PERMISSIONS}
918
917
  */
@@ -1479,6 +1478,7 @@ class DocumentViewerComponent {
1479
1478
  * @type {any}
1480
1479
  */
1481
1480
  alertData;
1481
+ destroy$ = new Subject();
1482
1482
  /**
1483
1483
  * Emits the updated document after changes like upload, rename, or replace.
1484
1484
  * @type {EventEmitter<DocumentModel>}
@@ -1504,11 +1504,22 @@ class DocumentViewerComponent {
1504
1504
  * @returns {void}
1505
1505
  */
1506
1506
  ngOnChanges() {
1507
+ this.getDocumentAlertList();
1507
1508
  if (this.selectedDocument) {
1508
1509
  this.documentService.set(this.selectedDocument);
1509
1510
  this.alertData = DocumentAlertList.find((res) => res.status === this.selectedDocument?.status);
1510
1511
  }
1511
1512
  }
1513
+ getDocumentAlertList() {
1514
+ const documentId = this.selectedDocument?._id;
1515
+ if (documentId) {
1516
+ this.documentHttpService.getAlertsByDocumentID(documentId)
1517
+ .pipe(takeUntil(this.destroy$))
1518
+ .subscribe((res) => {
1519
+ this.alertData = res;
1520
+ });
1521
+ }
1522
+ }
1512
1523
  handleSelectedDocument(document) {
1513
1524
  this.selectedDocument = document;
1514
1525
  this.updatedDocument.emit({ ...document });
@@ -1526,11 +1537,11 @@ class DocumentViewerComponent {
1526
1537
  this.subscription.unsubscribe();
1527
1538
  }
1528
1539
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentViewerComponent, deps: [{ token: DocumentHttpService }, { token: DocumentService }], target: i0.ɵɵFactoryTarget.Component });
1529
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: DocumentViewerComponent, isStandalone: false, selector: "document-viewer", inputs: { selectedDocument: "selectedDocument", documentList: "documentList" }, outputs: { updatedDocument: "updatedDocument" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"grid\">\r\n <div class=\"col-12\">\r\n <div class=\"p-fluid p-formgrid grid m-0\">\r\n <div class=\"col-12 md:col-12 md:flex justify-content-evenly\">\r\n @if(selectedDocument){\r\n <div id=\"outerContainer col-12 md:col-7\">\r\n <div\r\n *ngIf=\"isImage(selectedDocument?.contentType)\"\r\n class=\"img-container\"\r\n >\r\n <img\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n class=\"uploadedImages\"\r\n alt=\"Document Image\"\r\n />\r\n </div>\r\n @if(selectedDocument?.contentType && selectedDocument?.contentType === \"application/pdf\"){\r\n <div class=\"pdf-container\">\r\n <pdf-viewer\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n [rotation]=\"0\"\r\n [original-size]=\"false\"\r\n [show-all]=\"true\"\r\n [fit-to-page]=\"false\"\r\n [zoom]=\"1\"\r\n [zoom-scale]=\"'page-width'\"\r\n [stick-to-page]=\"false\"\r\n [render-text]=\"true\"\r\n [external-link-target]=\"'blank'\"\r\n [autoresize]=\"true\"\r\n [show-borders]=\"false\"\r\n style=\"width: 50vw; height: 75vh\"\r\n ></pdf-viewer>\r\n </div>\r\n }@else{\r\n <div class=\"incorrect-docType\">\r\n ContentType is incorrect.\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"left-part col-12 md:col-3 p-0\">\r\n <div class=\"alerts mb-4 pb-1\">\r\n <button\r\n type=\"button\"\r\n *ngIf=\"\r\n (alertData?.status !== 'Pending' && !!alertData?.status) ||\r\n alertData?.isAlert === false\r\n \"\r\n class=\"bg-green-500 border-none border-round-md flex align-items-center mb-3 p-2 px-3\"\r\n >\r\n <i\r\n class=\"pi pi-verified mr-2 cursor-pointer\"\r\n [ngStyle]=\"{\r\n color:\r\n alertData?.status === 'Pending' &&\r\n alertData?.isAlert !== false\r\n ? '#FFFFFF'\r\n : '#8A8EA6'\r\n }\"\r\n style=\"font-size: 20px\"\r\n ></i>\r\n <span class=\"font-semibold text-white\">Verified</span>\r\n </button>\r\n <div\r\n class=\"card mb-0\"\r\n [ngClass]=\"\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? 'alert-card'\r\n : 'success-alert'\r\n \"\r\n >\r\n <div class=\"flex align-items-center mb-2 pb-1\" *ngIf=\"alertData?.status !== 'Verified'\">\r\n <h4 class=\"mr-3 mt-0 mb-0 text-color font-bold\" style=\"font-size: 21px; font-weight: bold; border-color: rgba(68, 72, 109, 0.2) ;\" >Alerts</h4>\r\n <i\r\n class=\"pi pi-exclamation-triangle\"\r\n style=\"font-size: 20px\"\r\n [ngStyle]=\"{\r\n color:\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? '#FB392D'\r\n : '#8A8EA6'\r\n }\"\r\n ></i>\r\n </div>\r\n <p class=\"text-color mb-0\">{{ alertData?.alertMessage }}</p>\r\n </div>\r\n </div>\r\n <ng-content select=\"[action-launcher]\"></ng-content>\r\n <ng-content></ng-content>\r\n <app-linked-document (selectedDocumentChange)=\"handleSelectedDocument($event)\" [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\"></app-linked-document>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".alert-card{background-color:#fb392d1a}.success-alert{border-radius:10px;border:1px solid rgba(251,57,45,.1);background:linear-gradient(0deg,#dedede 0% 100%),#fff}.p-timeline-event-opposite{display:none}.decription{color:#676b89}.textAreaControl textarea{width:100%;resize:vertical;max-width:100%}.document-btn-wrapper .p-button-outlined{color:#f57c00}.document-viewer .p-dialog{width:100%;height:100%;max-height:100%!important;box-shadow:none!important}.document-viewer .p-dialog-header-close-icon{height:20px;width:20px}.document-viewer .p-dialog-header{background-color:#fff;border-radius:0;border-bottom:.771px solid rgba(68,72,109,.1);align-items:start!important}.document-viewer .p-dialog-content{background-color:#fff;border-radius:0}.uploadedImages{width:95%;height:100%;object-fit:contain;border-radius:10px;padding:22px;background:#f7f8fa;border:1px solid #F0F0F0}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i4.PdfViewerComponent, selector: "pdf-viewer", inputs: ["src", "c-maps-url", "page", "render-text", "render-text-mode", "original-size", "show-all", "stick-to-page", "zoom", "zoom-scale", "rotation", "external-link-target", "autoresize", "fit-to-page", "show-borders"], outputs: ["after-load-complete", "page-rendered", "pages-initialized", "text-layer-rendered", "error", "on-progress", "pageChange"] }, { kind: "component", type: LinkedDocumentComponent, selector: "app-linked-document", inputs: ["selectedDocument", "documentList"], outputs: ["selectedDocumentChange"] }], encapsulation: i0.ViewEncapsulation.None });
1540
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: DocumentViewerComponent, isStandalone: false, selector: "document-viewer", inputs: { selectedDocument: "selectedDocument", documentList: "documentList" }, outputs: { updatedDocument: "updatedDocument" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"grid\">\r\n <div class=\"col-12\">\r\n <div class=\"p-fluid p-formgrid grid m-0\">\r\n <div class=\"col-12 md:col-12 md:flex justify-content-evenly\">\r\n @if(selectedDocument){\r\n <div id=\"outerContainer col-12 md:col-7\">\r\n <div\r\n *ngIf=\"isImage(selectedDocument?.contentType)\"\r\n class=\"img-container\"\r\n >\r\n <img\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n class=\"uploadedImages\"\r\n alt=\"Document Image\"\r\n />\r\n </div>\r\n @if(selectedDocument?.contentType && selectedDocument?.contentType === \"application/pdf\"){\r\n <div class=\"pdf-container\">\r\n <pdf-viewer\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n [rotation]=\"0\"\r\n [original-size]=\"false\"\r\n [show-all]=\"true\"\r\n [fit-to-page]=\"false\"\r\n [zoom]=\"1\"\r\n [zoom-scale]=\"'page-width'\"\r\n [stick-to-page]=\"false\"\r\n [render-text]=\"true\"\r\n [external-link-target]=\"'blank'\"\r\n [autoresize]=\"true\"\r\n [show-borders]=\"false\"\r\n style=\"width: 50vw; height: 75vh\"\r\n ></pdf-viewer>\r\n </div>\r\n }@else{\r\n <div class=\"incorrect-docType\">\r\n ContentType is incorrect.\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"left-part col-12 md:col-3 p-0\">\r\n <div class=\"alerts mb-4 pb-1\">\r\n <button\r\n type=\"button\"\r\n *ngIf=\"\r\n (alertData?.alertStatus !== 'Pending' && !!alertData?.alertStatus) ||\r\n alertData?.isAlert === false\r\n \"\r\n class=\"bg-green-500 border-none border-round-md flex align-items-center mb-3 p-2 px-3\"\r\n >\r\n <i\r\n class=\"pi pi-verified mr-2 cursor-pointer\"\r\n [ngStyle]=\"{\r\n color:\r\n alertData?.alertStatus === 'Pending' &&\r\n alertData?.isAlert !== false\r\n ? '#FFFFFF'\r\n : '#8A8EA6'\r\n }\"\r\n style=\"font-size: 20px\"\r\n ></i>\r\n <span class=\"font-semibold text-white\">Verified</span>\r\n </button>\r\n <div\r\n class=\"card mb-0\"\r\n [ngClass]=\"\r\n (alertData?.alertStatus === 'Pending' || !alertData?.alertStatus) &&\r\n alertData?.isAlert !== false\r\n ? 'alert-card'\r\n : 'success-alert'\r\n \"\r\n >\r\n <div class=\"flex align-items-center mb-2 pb-1\" *ngIf=\"alertData?.alertStatus !== 'Verified'\">\r\n <h4 class=\"mr-3 mt-0 mb-0 text-color font-bold\" style=\"font-size: 21px; font-weight: bold; border-color: rgba(68, 72, 109, 0.2) ;\" >Alerts</h4>\r\n <i\r\n class=\"pi pi-exclamation-triangle\"\r\n style=\"font-size: 20px\"\r\n [ngStyle]=\"{\r\n color:\r\n (alertData?.alertStatus === 'Pending' || !alertData?.alertStatus) &&\r\n alertData?.isAlert !== false\r\n ? '#FB392D'\r\n : '#8A8EA6'\r\n }\"\r\n ></i>\r\n </div>\r\n <p class=\"text-color mb-0\">{{ alertData?.alertMessage }}</p>\r\n </div>\r\n </div>\r\n <ng-content select=\"[action-launcher]\"></ng-content>\r\n <ng-content></ng-content>\r\n <app-linked-document (selectedDocumentChange)=\"handleSelectedDocument($event)\" [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\"></app-linked-document>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".alert-card{background-color:#fb392d1a}.success-alert{border-radius:10px;border:1px solid rgba(251,57,45,.1);background:linear-gradient(0deg,#dedede 0% 100%),#fff}.p-timeline-event-opposite{display:none}.decription{color:#676b89}.textAreaControl textarea{width:100%;resize:vertical;max-width:100%}.document-btn-wrapper .p-button-outlined{color:#f57c00}.document-viewer .p-dialog{width:100%;height:100%;max-height:100%!important;box-shadow:none!important}.document-viewer .p-dialog-header-close-icon{height:20px;width:20px}.document-viewer .p-dialog-header{background-color:#fff;border-radius:0;border-bottom:.771px solid rgba(68,72,109,.1);align-items:start!important}.document-viewer .p-dialog-content{background-color:#fff;border-radius:0}.uploadedImages{width:95%;height:100%;object-fit:contain;border-radius:10px;padding:22px;background:#f7f8fa;border:1px solid #F0F0F0}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i4.PdfViewerComponent, selector: "pdf-viewer", inputs: ["src", "c-maps-url", "page", "render-text", "render-text-mode", "original-size", "show-all", "stick-to-page", "zoom", "zoom-scale", "rotation", "external-link-target", "autoresize", "fit-to-page", "show-borders"], outputs: ["after-load-complete", "page-rendered", "pages-initialized", "text-layer-rendered", "error", "on-progress", "pageChange"] }, { kind: "component", type: LinkedDocumentComponent, selector: "app-linked-document", inputs: ["selectedDocument", "documentList"], outputs: ["selectedDocumentChange"] }], encapsulation: i0.ViewEncapsulation.None });
1530
1541
  }
1531
1542
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentViewerComponent, decorators: [{
1532
1543
  type: Component,
1533
- args: [{ selector: 'document-viewer', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"grid\">\r\n <div class=\"col-12\">\r\n <div class=\"p-fluid p-formgrid grid m-0\">\r\n <div class=\"col-12 md:col-12 md:flex justify-content-evenly\">\r\n @if(selectedDocument){\r\n <div id=\"outerContainer col-12 md:col-7\">\r\n <div\r\n *ngIf=\"isImage(selectedDocument?.contentType)\"\r\n class=\"img-container\"\r\n >\r\n <img\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n class=\"uploadedImages\"\r\n alt=\"Document Image\"\r\n />\r\n </div>\r\n @if(selectedDocument?.contentType && selectedDocument?.contentType === \"application/pdf\"){\r\n <div class=\"pdf-container\">\r\n <pdf-viewer\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n [rotation]=\"0\"\r\n [original-size]=\"false\"\r\n [show-all]=\"true\"\r\n [fit-to-page]=\"false\"\r\n [zoom]=\"1\"\r\n [zoom-scale]=\"'page-width'\"\r\n [stick-to-page]=\"false\"\r\n [render-text]=\"true\"\r\n [external-link-target]=\"'blank'\"\r\n [autoresize]=\"true\"\r\n [show-borders]=\"false\"\r\n style=\"width: 50vw; height: 75vh\"\r\n ></pdf-viewer>\r\n </div>\r\n }@else{\r\n <div class=\"incorrect-docType\">\r\n ContentType is incorrect.\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"left-part col-12 md:col-3 p-0\">\r\n <div class=\"alerts mb-4 pb-1\">\r\n <button\r\n type=\"button\"\r\n *ngIf=\"\r\n (alertData?.status !== 'Pending' && !!alertData?.status) ||\r\n alertData?.isAlert === false\r\n \"\r\n class=\"bg-green-500 border-none border-round-md flex align-items-center mb-3 p-2 px-3\"\r\n >\r\n <i\r\n class=\"pi pi-verified mr-2 cursor-pointer\"\r\n [ngStyle]=\"{\r\n color:\r\n alertData?.status === 'Pending' &&\r\n alertData?.isAlert !== false\r\n ? '#FFFFFF'\r\n : '#8A8EA6'\r\n }\"\r\n style=\"font-size: 20px\"\r\n ></i>\r\n <span class=\"font-semibold text-white\">Verified</span>\r\n </button>\r\n <div\r\n class=\"card mb-0\"\r\n [ngClass]=\"\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? 'alert-card'\r\n : 'success-alert'\r\n \"\r\n >\r\n <div class=\"flex align-items-center mb-2 pb-1\" *ngIf=\"alertData?.status !== 'Verified'\">\r\n <h4 class=\"mr-3 mt-0 mb-0 text-color font-bold\" style=\"font-size: 21px; font-weight: bold; border-color: rgba(68, 72, 109, 0.2) ;\" >Alerts</h4>\r\n <i\r\n class=\"pi pi-exclamation-triangle\"\r\n style=\"font-size: 20px\"\r\n [ngStyle]=\"{\r\n color:\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? '#FB392D'\r\n : '#8A8EA6'\r\n }\"\r\n ></i>\r\n </div>\r\n <p class=\"text-color mb-0\">{{ alertData?.alertMessage }}</p>\r\n </div>\r\n </div>\r\n <ng-content select=\"[action-launcher]\"></ng-content>\r\n <ng-content></ng-content>\r\n <app-linked-document (selectedDocumentChange)=\"handleSelectedDocument($event)\" [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\"></app-linked-document>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".alert-card{background-color:#fb392d1a}.success-alert{border-radius:10px;border:1px solid rgba(251,57,45,.1);background:linear-gradient(0deg,#dedede 0% 100%),#fff}.p-timeline-event-opposite{display:none}.decription{color:#676b89}.textAreaControl textarea{width:100%;resize:vertical;max-width:100%}.document-btn-wrapper .p-button-outlined{color:#f57c00}.document-viewer .p-dialog{width:100%;height:100%;max-height:100%!important;box-shadow:none!important}.document-viewer .p-dialog-header-close-icon{height:20px;width:20px}.document-viewer .p-dialog-header{background-color:#fff;border-radius:0;border-bottom:.771px solid rgba(68,72,109,.1);align-items:start!important}.document-viewer .p-dialog-content{background-color:#fff;border-radius:0}.uploadedImages{width:95%;height:100%;object-fit:contain;border-radius:10px;padding:22px;background:#f7f8fa;border:1px solid #F0F0F0}\n"] }]
1544
+ args: [{ selector: 'document-viewer', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"grid\">\r\n <div class=\"col-12\">\r\n <div class=\"p-fluid p-formgrid grid m-0\">\r\n <div class=\"col-12 md:col-12 md:flex justify-content-evenly\">\r\n @if(selectedDocument){\r\n <div id=\"outerContainer col-12 md:col-7\">\r\n <div\r\n *ngIf=\"isImage(selectedDocument?.contentType)\"\r\n class=\"img-container\"\r\n >\r\n <img\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n class=\"uploadedImages\"\r\n alt=\"Document Image\"\r\n />\r\n </div>\r\n @if(selectedDocument?.contentType && selectedDocument?.contentType === \"application/pdf\"){\r\n <div class=\"pdf-container\">\r\n <pdf-viewer\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n [rotation]=\"0\"\r\n [original-size]=\"false\"\r\n [show-all]=\"true\"\r\n [fit-to-page]=\"false\"\r\n [zoom]=\"1\"\r\n [zoom-scale]=\"'page-width'\"\r\n [stick-to-page]=\"false\"\r\n [render-text]=\"true\"\r\n [external-link-target]=\"'blank'\"\r\n [autoresize]=\"true\"\r\n [show-borders]=\"false\"\r\n style=\"width: 50vw; height: 75vh\"\r\n ></pdf-viewer>\r\n </div>\r\n }@else{\r\n <div class=\"incorrect-docType\">\r\n ContentType is incorrect.\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"left-part col-12 md:col-3 p-0\">\r\n <div class=\"alerts mb-4 pb-1\">\r\n <button\r\n type=\"button\"\r\n *ngIf=\"\r\n (alertData?.alertStatus !== 'Pending' && !!alertData?.alertStatus) ||\r\n alertData?.isAlert === false\r\n \"\r\n class=\"bg-green-500 border-none border-round-md flex align-items-center mb-3 p-2 px-3\"\r\n >\r\n <i\r\n class=\"pi pi-verified mr-2 cursor-pointer\"\r\n [ngStyle]=\"{\r\n color:\r\n alertData?.alertStatus === 'Pending' &&\r\n alertData?.isAlert !== false\r\n ? '#FFFFFF'\r\n : '#8A8EA6'\r\n }\"\r\n style=\"font-size: 20px\"\r\n ></i>\r\n <span class=\"font-semibold text-white\">Verified</span>\r\n </button>\r\n <div\r\n class=\"card mb-0\"\r\n [ngClass]=\"\r\n (alertData?.alertStatus === 'Pending' || !alertData?.alertStatus) &&\r\n alertData?.isAlert !== false\r\n ? 'alert-card'\r\n : 'success-alert'\r\n \"\r\n >\r\n <div class=\"flex align-items-center mb-2 pb-1\" *ngIf=\"alertData?.alertStatus !== 'Verified'\">\r\n <h4 class=\"mr-3 mt-0 mb-0 text-color font-bold\" style=\"font-size: 21px; font-weight: bold; border-color: rgba(68, 72, 109, 0.2) ;\" >Alerts</h4>\r\n <i\r\n class=\"pi pi-exclamation-triangle\"\r\n style=\"font-size: 20px\"\r\n [ngStyle]=\"{\r\n color:\r\n (alertData?.alertStatus === 'Pending' || !alertData?.alertStatus) &&\r\n alertData?.isAlert !== false\r\n ? '#FB392D'\r\n : '#8A8EA6'\r\n }\"\r\n ></i>\r\n </div>\r\n <p class=\"text-color mb-0\">{{ alertData?.alertMessage }}</p>\r\n </div>\r\n </div>\r\n <ng-content select=\"[action-launcher]\"></ng-content>\r\n <ng-content></ng-content>\r\n <app-linked-document (selectedDocumentChange)=\"handleSelectedDocument($event)\" [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\"></app-linked-document>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".alert-card{background-color:#fb392d1a}.success-alert{border-radius:10px;border:1px solid rgba(251,57,45,.1);background:linear-gradient(0deg,#dedede 0% 100%),#fff}.p-timeline-event-opposite{display:none}.decription{color:#676b89}.textAreaControl textarea{width:100%;resize:vertical;max-width:100%}.document-btn-wrapper .p-button-outlined{color:#f57c00}.document-viewer .p-dialog{width:100%;height:100%;max-height:100%!important;box-shadow:none!important}.document-viewer .p-dialog-header-close-icon{height:20px;width:20px}.document-viewer .p-dialog-header{background-color:#fff;border-radius:0;border-bottom:.771px solid rgba(68,72,109,.1);align-items:start!important}.document-viewer .p-dialog-content{background-color:#fff;border-radius:0}.uploadedImages{width:95%;height:100%;object-fit:contain;border-radius:10px;padding:22px;background:#f7f8fa;border:1px solid #F0F0F0}\n"] }]
1534
1545
  }], ctorParameters: () => [{ type: DocumentHttpService }, { type: DocumentService }], propDecorators: { selectedDocument: [{
1535
1546
  type: Input
1536
1547
  }], documentList: [{
@@ -1729,6 +1740,7 @@ class DocumentListComponent {
1729
1740
  * @param {DocumentHttpService} documentHttpService - The service responsible for fetching documents from the server.
1730
1741
  * @param {DocumentQuery} documentQuery - The service responsible for geting stored documents.
1731
1742
  * @param {DocumentStore} documentStore - The service responsible for storing documents.
1743
+ * @param {SessionService} sessionService - Service for managing user session and authentication.
1732
1744
  */
1733
1745
  constructor(documentUploadService, documentHttpService, documentQuery, documentStore, sessionService) {
1734
1746
  this.documentUploadService = documentUploadService;
@@ -1972,13 +1984,13 @@ class DocumentContainerComponent {
1972
1984
  /**
1973
1985
  * Emits the document selected by the user.
1974
1986
  * @type {EventEmitter<DocumentModel>}
1975
- */
1987
+ */
1976
1988
  selectedDocument = new EventEmitter();
1977
1989
  /**
1978
1990
  * Subject used to clean up subscriptions when the component is destroyed.
1979
1991
  * Helps prevent memory leaks in observables.
1980
1992
  * @type {Subject<void>}
1981
- */
1993
+ */
1982
1994
  destroy$ = new Subject();
1983
1995
  /**
1984
1996
  * The list of documents.
@@ -2005,24 +2017,31 @@ class DocumentContainerComponent {
2005
2017
  const folderSubscription = this.documentQuery
2006
2018
  .selectParentDocumentTypeId()
2007
2019
  .subscribe((folderBlockId) => {
2008
- if (folderBlockId) {
2009
- const validFolders = this.folderList.filter(folder => (folder.documentCount ?? 0) > 0);
2010
- const idToFetch = folderBlockId ?? validFolders[0]?._id;
2011
- if (idToFetch) {
2012
- this.fetchDocuments(idToFetch);
2013
- }
2014
- else {
2015
- console.warn('No folders with documents available.');
2016
- }
2020
+ // if(folderBlockId){
2021
+ const validFolders = this.folderList.filter(folder => (folder.documentCount ?? 0) > 0);
2022
+ const idToFetch = '6838801a50006081f24a6a81';
2023
+ console.log(idToFetch);
2024
+ if (idToFetch)
2025
+ this.fetchDocuments(idToFetch);
2026
+ else {
2027
+ console.warn('No folders with documents available.');
2017
2028
  }
2029
+ // }
2018
2030
  });
2019
2031
  this.subscription.add(folderSubscription);
2032
+ this.getSelectedDocumentData();
2033
+ }
2034
+ /**
2035
+ * Subscribes to the selected document from the document query store.
2036
+ * Emits the selected document using the `selectedDocument` EventEmitter if it exists.
2037
+ * Automatically unsubscribes when the component is destroyed.
2038
+ */
2039
+ getSelectedDocumentData() {
2020
2040
  this.documentQuery.getSelectedDocument()
2021
2041
  .pipe(takeUntil(this.destroy$))
2022
2042
  .subscribe((res) => {
2023
- if (res) {
2043
+ if (res)
2024
2044
  this.selectedDocument.emit(res);
2025
- }
2026
2045
  });
2027
2046
  }
2028
2047
  /**
@@ -2040,10 +2059,11 @@ class DocumentContainerComponent {
2040
2059
  * @param {FolderBlockModel[]} folder - The list of folders returned by the API.
2041
2060
  */
2042
2061
  next: (folder) => {
2062
+ console.log(folder);
2043
2063
  if (folder && folder.length > 0) {
2044
2064
  this.folderList = folder.filter(f => (f.documentCount ?? 0) > 0);
2045
2065
  if (this.folderList.length > 0) {
2046
- this.fetchDocuments(this.folderList[0]._id);
2066
+ this.fetchDocuments('683881067186866fd445511a');
2047
2067
  }
2048
2068
  else {
2049
2069
  console.warn('No folders with documents found.');
@@ -2069,7 +2089,7 @@ class DocumentContainerComponent {
2069
2089
  * @returns {void}
2070
2090
  */
2071
2091
  fetchDocuments(folderBlockId) {
2072
- const documentSubscription = this.documentHttpService.getDocumentByFolderID(folderBlockId, this.contextId).subscribe({
2092
+ const documentSubscription = this.documentHttpService.getDocumentByFolderID(folderBlockId, '683337180983d051198bde3f').subscribe({
2073
2093
  /**
2074
2094
  * Handles the successful API response.
2075
2095
  * @param {DocumentModel[]} documentList - The list of documents returned by the API.
@@ -2103,11 +2123,11 @@ class DocumentContainerComponent {
2103
2123
  this.subscription.unsubscribe();
2104
2124
  }
2105
2125
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentContainerComponent, deps: [{ token: DocumentStore }, { token: DocumentService$1 }, { token: DocumentQuery }, { token: DocumentHttpService }], target: i0.ɵɵFactoryTarget.Component });
2106
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: DocumentContainerComponent, isStandalone: false, selector: "lib-document-container", inputs: { contextId: "contextId", isCollapsed: "isCollapsed", showFolderList: "showFolderList", isUploadButtonVisible: "isUploadButtonVisible" }, outputs: { selectedDocument: "selectedDocument" }, ngImport: i0, template: "<div class=\"grid m-0 h-full\">\r\n <div class=\"col-12 md:col-12 lg:col-12 p-0 h-full\" [ngClass]=\"showFolderList ? 'custom-scroll' : ''\">\r\n @if(showFolderList){\r\n <div>\r\n <lib-folder-container [documentList]=\"documentList\" [folderList]=\"folderList\" [contextId]=\"contextId\"></lib-folder-container>\r\n </div>\r\n }\r\n <div [ngClass]=\"showFolderList ? 'mt-3' : ''\">\r\n <lib-document-list [isCollapsed]=\"isCollapsed\" [documentList]=\"documentList\" [contextId]=\"contextId\" [isUploadButtonVisible]=\"isUploadButtonVisible\" (onRefresh)=\"fetchFolder()\">\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n</div>", styles: [".custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: FolderContainerComponent, selector: "lib-folder-container", inputs: ["documentList", "folderList", "contextId"] }, { kind: "component", type: DocumentListComponent, selector: "lib-document-list", inputs: ["contextId", "isUploadButtonVisible", "isCollapsed", "documentList"], outputs: ["onRefresh"] }] });
2126
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DocumentContainerComponent, isStandalone: false, selector: "lib-document-container", inputs: { contextId: "contextId", isCollapsed: "isCollapsed", showFolderList: "showFolderList", isUploadButtonVisible: "isUploadButtonVisible" }, outputs: { selectedDocument: "selectedDocument" }, ngImport: i0, template: "<div class=\"grid m-0 h-full\">\r\n <div class=\"col-12 md:col-12 lg:col-12 p-0 h-full\" [ngClass]=\"showFolderList ? 'custom-scroll' : ''\">\r\n <!-- @if(showFolderList){ -->\r\n <div>\r\n <lib-folder-container [documentList]=\"documentList\" [folderList]=\"folderList\" [contextId]=\"'683337180983d051198bde3f'\"></lib-folder-container>\r\n </div>\r\n <!-- } -->\r\n <div [ngClass]=\"showFolderList ? 'mt-3' : ''\">\r\n <lib-document-list [isCollapsed]=\"isCollapsed\" [documentList]=\"documentList\" [contextId]=\"'683337180983d051198bde3f'\" [isUploadButtonVisible]=\"isUploadButtonVisible\" (onRefresh)=\"fetchFolder()\">\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n</div>", styles: [".custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: FolderContainerComponent, selector: "lib-folder-container", inputs: ["documentList", "folderList", "contextId"] }, { kind: "component", type: DocumentListComponent, selector: "lib-document-list", inputs: ["contextId", "isUploadButtonVisible", "isCollapsed", "documentList"], outputs: ["onRefresh"] }] });
2107
2127
  }
2108
2128
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentContainerComponent, decorators: [{
2109
2129
  type: Component,
2110
- args: [{ selector: 'lib-document-container', standalone: false, template: "<div class=\"grid m-0 h-full\">\r\n <div class=\"col-12 md:col-12 lg:col-12 p-0 h-full\" [ngClass]=\"showFolderList ? 'custom-scroll' : ''\">\r\n @if(showFolderList){\r\n <div>\r\n <lib-folder-container [documentList]=\"documentList\" [folderList]=\"folderList\" [contextId]=\"contextId\"></lib-folder-container>\r\n </div>\r\n }\r\n <div [ngClass]=\"showFolderList ? 'mt-3' : ''\">\r\n <lib-document-list [isCollapsed]=\"isCollapsed\" [documentList]=\"documentList\" [contextId]=\"contextId\" [isUploadButtonVisible]=\"isUploadButtonVisible\" (onRefresh)=\"fetchFolder()\">\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n</div>", styles: [".custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}\n"] }]
2130
+ args: [{ selector: 'lib-document-container', standalone: false, template: "<div class=\"grid m-0 h-full\">\r\n <div class=\"col-12 md:col-12 lg:col-12 p-0 h-full\" [ngClass]=\"showFolderList ? 'custom-scroll' : ''\">\r\n <!-- @if(showFolderList){ -->\r\n <div>\r\n <lib-folder-container [documentList]=\"documentList\" [folderList]=\"folderList\" [contextId]=\"'683337180983d051198bde3f'\"></lib-folder-container>\r\n </div>\r\n <!-- } -->\r\n <div [ngClass]=\"showFolderList ? 'mt-3' : ''\">\r\n <lib-document-list [isCollapsed]=\"isCollapsed\" [documentList]=\"documentList\" [contextId]=\"'683337180983d051198bde3f'\" [isUploadButtonVisible]=\"isUploadButtonVisible\" (onRefresh)=\"fetchFolder()\">\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n</div>", styles: [".custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}\n"] }]
2111
2131
  }], ctorParameters: () => [{ type: DocumentStore }, { type: DocumentService$1 }, { type: DocumentQuery }, { type: DocumentHttpService }], propDecorators: { contextId: [{
2112
2132
  type: Input
2113
2133
  }], isCollapsed: [{
@@ -2188,6 +2208,136 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
2188
2208
  }]
2189
2209
  }], ctorParameters: () => [{ type: DocumentService }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }] });
2190
2210
 
2211
+ class DocumentRendererComponent {
2212
+ selectedDocumentType = SHARED.EMPTY;
2213
+ documentType = [
2214
+ {
2215
+ "_id": "67e53f7fda90f2dcef43461e",
2216
+ "name": "Business Bank Statements",
2217
+ "__v": 0,
2218
+ "label": "Business Bank Statements",
2219
+ "parentDocumentTypeId": "67e92a524fefd4fc91fe3cf7",
2220
+ "source": null
2221
+ },
2222
+ {
2223
+ "_id": "67e92b904fefd4fc91fe3d26",
2224
+ "name": "Bank Statements",
2225
+ "__v": 0,
2226
+ "label": "Bank Statements",
2227
+ "parentDocumentTypeId": "67e92a524fefd4fc91fe3cf7",
2228
+ "source": null
2229
+ },
2230
+ {
2231
+ "_id": "67e92b904fefd4fc91fe3d27",
2232
+ "name": "Budget Planner",
2233
+ "__v": 0,
2234
+ "label": "Budget Planner",
2235
+ "parentDocumentTypeId": "67e92a524fefd4fc91fe3cf7",
2236
+ "source": null
2237
+ },
2238
+ {
2239
+ "_id": "67e92b904fefd4fc91fe3d28",
2240
+ "name": "Credit Card Statements",
2241
+ "__v": 0,
2242
+ "label": "Credit Card Statements",
2243
+ "parentDocumentTypeId": "67e92a524fefd4fc91fe3cf7",
2244
+ "source": null
2245
+ },
2246
+ {
2247
+ "_id": "67e53f7cda90f2dcef43461c",
2248
+ "name": "Payslips",
2249
+ "__v": 0,
2250
+ "label": "Payslips",
2251
+ "parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
2252
+ "source": null
2253
+ },
2254
+ {
2255
+ "_id": "67e92b914fefd4fc91fe3d32",
2256
+ "name": "Accountants certificate",
2257
+ "__v": 0,
2258
+ "label": "Accountants certificate",
2259
+ "parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
2260
+ "source": null
2261
+ },
2262
+ {
2263
+ "_id": "67e92b914fefd4fc91fe3d33",
2264
+ "name": "Company Accounts",
2265
+ "__v": 0,
2266
+ "label": "Company Accounts",
2267
+ "parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
2268
+ "source": null
2269
+ },
2270
+ {
2271
+ "_id": "67e92b914fefd4fc91fe3d34",
2272
+ "name": "Employer Reference",
2273
+ "__v": 0,
2274
+ "label": "EmployerReference",
2275
+ "parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
2276
+ "source": null
2277
+ },
2278
+ {
2279
+ "_id": "67e92b914fefd4fc91fe3d35",
2280
+ "name": "Employers reference request form",
2281
+ "__v": 0,
2282
+ "label": "Employers reference request form",
2283
+ "parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
2284
+ "source": null
2285
+ },
2286
+ {
2287
+ "_id": "67e92b914fefd4fc91fe3d36",
2288
+ "name": "Evidence of Historical Contract Work",
2289
+ "__v": 0,
2290
+ "label": "Evidence of Historical Contract Work",
2291
+ "parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
2292
+ "source": null
2293
+ },
2294
+ {
2295
+ "_id": "67e92b914fefd4fc91fe3d37",
2296
+ "name": "P60",
2297
+ "__v": 0,
2298
+ "label": "P60",
2299
+ "parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
2300
+ "source": null
2301
+ },
2302
+ {
2303
+ "_id": "67e92b914fefd4fc91fe3d38",
2304
+ "name": "Pension Evidence",
2305
+ "__v": 0,
2306
+ "label": "Pension Evidence",
2307
+ "parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
2308
+ "source": null
2309
+ },
2310
+ {
2311
+ "_id": "67e92b914fefd4fc91fe3d39",
2312
+ "name": "SA302s",
2313
+ "__v": 0,
2314
+ "label": "SA302s",
2315
+ "parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
2316
+ "source": null
2317
+ },
2318
+ {
2319
+ "_id": "67e92b914fefd4fc91fe3d3a",
2320
+ "name": "Signed Copy of Contract",
2321
+ "__v": 0,
2322
+ "label": "Signed Copy of Contract",
2323
+ "parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
2324
+ "source": null
2325
+ }
2326
+ ];
2327
+ ngOnInit() {
2328
+ console.log(this.documentType);
2329
+ }
2330
+ handleFileUploadClick(event) {
2331
+ console.log('File upload clicked', event);
2332
+ }
2333
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2334
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DocumentRendererComponent, isStandalone: false, selector: "app-document-renderer", ngImport: i0, template: "<div class=\"document-renderer-container\">\r\n <div class=\"card p-0 mb-0 document-renderer-wrapper\">\r\n <div class=\"document-header-wrapper flex align-items-center justify-content-between\">\r\n <h4 class=\"m-0 title-wrapper\">Related Documents</h4>\r\n <button pButton pRipple icon=\"pi pi-upload\" class=\"p-button-raised\" type=\"button\" label=\"Upload New Document\"\r\n (click)=\"handleFileUploadClick($event)\"></button>\r\n </div> \r\n\r\n <div class=\"document-list-wrapper\">\r\n <p class=\"m-0\">The following documents have been supplied to support your income declaration.</p>\r\n <div class=\"document-type-wrapper\">\r\n <div class=\"flex align-items-center justify-content-end\">\r\n <p-dropdown \r\n [options]=\"documentType\" \r\n [(ngModel)]=\"selectedDocumentType\" \r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n placeholder=\"Select Type\" />\r\n </div>\r\n <div class=\"grid m-0 mt-3\">\r\n <div class=\"col-12 md:col-3\">\r\n <div class=\"flex align-items-center\">\r\n <i class=\"pi pi-book type-icon-wrapper\"></i>\r\n <div class=\"ml-3 document-content-wrapper\">\r\n <h4 class=\"m-0\">Latest Payslips</h4>\r\n <p class=\"mt-2\">Uploaded on 28 Mar 2025</p>\r\n <div class=\"flex align-items-center\">\r\n <button pButton pRipple icon=\"pi pi-eye\" class=\"p-button-raised action-btn-wrapper\" type=\"button\" label=\"View\"\r\n ></button>\r\n <button pButton pRipple icon=\"pi pi-download\" class=\"p-button-raised ml-2 action-btn-wrapper\" type=\"button\" label=\"Download\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-3\">\r\n <div class=\"flex align-items-center\">\r\n <i class=\"pi pi-book type-icon-wrapper\"></i>\r\n <div class=\"document-content-wrapper ml-3\">\r\n <h4 class=\"m-0\">Latest Payslips</h4>\r\n <p class=\"mt-2\">Uploaded on 28 Mar 2025</p>\r\n <div class=\"flex align-items-center\">\r\n <button pButton pRipple icon=\"pi pi-eye\" class=\"p-button-raised action-btn-wrapper\" type=\"button\" label=\"View\"\r\n ></button>\r\n <button pButton pRipple icon=\"pi pi-download\" class=\"p-button-raised ml-2 action-btn-wrapper\" type=\"button\" label=\"Download\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-3\">\r\n <div class=\"flex align-items-center\">\r\n <i class=\"pi pi-book type-icon-wrapper\"></i> \r\n <div class=\"document-content-wrapper ml-3\">\r\n <h4 class=\"m-0\">Latest Payslips</h4>\r\n <p class=\"mt-2\">Uploaded on 28 Mar 2025</p>\r\n <div class=\"flex align-items-center\">\r\n <button pButton pRipple icon=\"pi pi-eye\" class=\"p-button-raised action-btn-wrapper\" type=\"button\" label=\"View\"\r\n ></button>\r\n <button pButton pRipple icon=\"pi pi-download\" class=\"p-button-raised ml-2 action-btn-wrapper\" type=\"button\" label=\"Download\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"document-footer-wrapper\">\r\n <div class=\"flex align-items-center mt-3\">\r\n <i class=\"pi pi-info-circle\"></i>\r\n <p class=\"m-0 ml-3\">All documents are securely stored and will only be used for verification purposes. Documents must be less than 3 months old.</p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>", styles: [".title-wrapper{font-size:20px;font-weight:600;color:var(--text-color)}.document-renderer-container{padding:16px}.type-icon-wrapper{background-color:#dbeafe;border-radius:50%;padding:12px}.action-btn-wrapper.p-button{background-color:transparent;color:var(--primary-color);border:none;box-shadow:none}\n"], dependencies: [{ kind: "directive", type: i9.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i12.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i12.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i14.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "autoShowPanelOnPrintableCharacterKeyDown", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }] });
2335
+ }
2336
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentRendererComponent, decorators: [{
2337
+ type: Component,
2338
+ args: [{ selector: 'app-document-renderer', standalone: false, template: "<div class=\"document-renderer-container\">\r\n <div class=\"card p-0 mb-0 document-renderer-wrapper\">\r\n <div class=\"document-header-wrapper flex align-items-center justify-content-between\">\r\n <h4 class=\"m-0 title-wrapper\">Related Documents</h4>\r\n <button pButton pRipple icon=\"pi pi-upload\" class=\"p-button-raised\" type=\"button\" label=\"Upload New Document\"\r\n (click)=\"handleFileUploadClick($event)\"></button>\r\n </div> \r\n\r\n <div class=\"document-list-wrapper\">\r\n <p class=\"m-0\">The following documents have been supplied to support your income declaration.</p>\r\n <div class=\"document-type-wrapper\">\r\n <div class=\"flex align-items-center justify-content-end\">\r\n <p-dropdown \r\n [options]=\"documentType\" \r\n [(ngModel)]=\"selectedDocumentType\" \r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n placeholder=\"Select Type\" />\r\n </div>\r\n <div class=\"grid m-0 mt-3\">\r\n <div class=\"col-12 md:col-3\">\r\n <div class=\"flex align-items-center\">\r\n <i class=\"pi pi-book type-icon-wrapper\"></i>\r\n <div class=\"ml-3 document-content-wrapper\">\r\n <h4 class=\"m-0\">Latest Payslips</h4>\r\n <p class=\"mt-2\">Uploaded on 28 Mar 2025</p>\r\n <div class=\"flex align-items-center\">\r\n <button pButton pRipple icon=\"pi pi-eye\" class=\"p-button-raised action-btn-wrapper\" type=\"button\" label=\"View\"\r\n ></button>\r\n <button pButton pRipple icon=\"pi pi-download\" class=\"p-button-raised ml-2 action-btn-wrapper\" type=\"button\" label=\"Download\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-3\">\r\n <div class=\"flex align-items-center\">\r\n <i class=\"pi pi-book type-icon-wrapper\"></i>\r\n <div class=\"document-content-wrapper ml-3\">\r\n <h4 class=\"m-0\">Latest Payslips</h4>\r\n <p class=\"mt-2\">Uploaded on 28 Mar 2025</p>\r\n <div class=\"flex align-items-center\">\r\n <button pButton pRipple icon=\"pi pi-eye\" class=\"p-button-raised action-btn-wrapper\" type=\"button\" label=\"View\"\r\n ></button>\r\n <button pButton pRipple icon=\"pi pi-download\" class=\"p-button-raised ml-2 action-btn-wrapper\" type=\"button\" label=\"Download\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-3\">\r\n <div class=\"flex align-items-center\">\r\n <i class=\"pi pi-book type-icon-wrapper\"></i> \r\n <div class=\"document-content-wrapper ml-3\">\r\n <h4 class=\"m-0\">Latest Payslips</h4>\r\n <p class=\"mt-2\">Uploaded on 28 Mar 2025</p>\r\n <div class=\"flex align-items-center\">\r\n <button pButton pRipple icon=\"pi pi-eye\" class=\"p-button-raised action-btn-wrapper\" type=\"button\" label=\"View\"\r\n ></button>\r\n <button pButton pRipple icon=\"pi pi-download\" class=\"p-button-raised ml-2 action-btn-wrapper\" type=\"button\" label=\"Download\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"document-footer-wrapper\">\r\n <div class=\"flex align-items-center mt-3\">\r\n <i class=\"pi pi-info-circle\"></i>\r\n <p class=\"m-0 ml-3\">All documents are securely stored and will only be used for verification purposes. Documents must be less than 3 months old.</p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>", styles: [".title-wrapper{font-size:20px;font-weight:600;color:var(--text-color)}.document-renderer-container{padding:16px}.type-icon-wrapper{background-color:#dbeafe;border-radius:50%;padding:12px}.action-btn-wrapper.p-button{background-color:transparent;color:var(--primary-color);border:none;box-shadow:none}\n"] }]
2339
+ }] });
2340
+
2191
2341
  /**
2192
2342
  * @module DocumentModule
2193
2343
  *
@@ -2242,7 +2392,8 @@ class DocumentModule {
2242
2392
  /**
2243
2393
  * A component which have linked documents.
2244
2394
  */
2245
- LinkedDocumentComponent], imports: [
2395
+ LinkedDocumentComponent,
2396
+ DocumentRendererComponent], imports: [
2246
2397
  /**
2247
2398
  * Angular's CommonModule is imported to access common directives like `ngIf` and `ngFor`.
2248
2399
  */
@@ -2331,7 +2482,8 @@ class DocumentModule {
2331
2482
  /**
2332
2483
  * A directive to show the document.
2333
2484
  */
2334
- DocumentDirective] });
2485
+ DocumentDirective,
2486
+ DocumentRendererComponent] });
2335
2487
  static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentModule, providers: [
2336
2488
  /**
2337
2489
  * Provide the messageservice to be used in other components.
@@ -2482,6 +2634,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
2482
2634
  * A component which have linked documents.
2483
2635
  */
2484
2636
  LinkedDocumentComponent,
2637
+ DocumentRendererComponent
2485
2638
  ],
2486
2639
  imports: [
2487
2640
  /**
@@ -2575,6 +2728,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
2575
2728
  * A directive to show the document.
2576
2729
  */
2577
2730
  DocumentDirective,
2731
+ DocumentRendererComponent
2578
2732
  ],
2579
2733
  providers: [
2580
2734
  /**
@@ -2619,5 +2773,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
2619
2773
  * Generated bundle index. Do not edit.
2620
2774
  */
2621
2775
 
2622
- export { DocumentContainerComponent, DocumentDirective, DocumentListComponent, DocumentModule, DocumentViewerComponent, HasPermissionDirective };
2776
+ export { DocumentContainerComponent, DocumentDirective, DocumentListComponent, DocumentModule, DocumentRendererComponent, DocumentViewerComponent, HasPermissionDirective };
2623
2777
  //# sourceMappingURL=cat-documents-ng.mjs.map