cat-documents-ng 0.1.32 → 0.1.33
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.
- package/Shared/constant/PERMISSIONS.d.ts +0 -1
- package/fesm2022/cat-documents-ng.mjs +152 -12
- package/fesm2022/cat-documents-ng.mjs.map +1 -1
- package/lib/document/components/document-container/document-container.component.d.ts +8 -2
- package/lib/document/components/document-list/document-list.component.d.ts +1 -0
- package/lib/document/components/document-renderer/document-renderer.component.d.ts +17 -0
- package/lib/document/document.module.d.ts +19 -18
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -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
|
*/
|
|
@@ -1526,11 +1525,11 @@ class DocumentViewerComponent {
|
|
|
1526
1525
|
this.subscription.unsubscribe();
|
|
1527
1526
|
}
|
|
1528
1527
|
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
|
|
1528
|
+
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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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
1529
|
}
|
|
1531
1530
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentViewerComponent, decorators: [{
|
|
1532
1531
|
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
|
|
1532
|
+
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"] }]
|
|
1534
1533
|
}], ctorParameters: () => [{ type: DocumentHttpService }, { type: DocumentService }], propDecorators: { selectedDocument: [{
|
|
1535
1534
|
type: Input
|
|
1536
1535
|
}], documentList: [{
|
|
@@ -1729,6 +1728,7 @@ class DocumentListComponent {
|
|
|
1729
1728
|
* @param {DocumentHttpService} documentHttpService - The service responsible for fetching documents from the server.
|
|
1730
1729
|
* @param {DocumentQuery} documentQuery - The service responsible for geting stored documents.
|
|
1731
1730
|
* @param {DocumentStore} documentStore - The service responsible for storing documents.
|
|
1731
|
+
* @param {SessionService} sessionService - Service for managing user session and authentication.
|
|
1732
1732
|
*/
|
|
1733
1733
|
constructor(documentUploadService, documentHttpService, documentQuery, documentStore, sessionService) {
|
|
1734
1734
|
this.documentUploadService = documentUploadService;
|
|
@@ -1972,13 +1972,13 @@ class DocumentContainerComponent {
|
|
|
1972
1972
|
/**
|
|
1973
1973
|
* Emits the document selected by the user.
|
|
1974
1974
|
* @type {EventEmitter<DocumentModel>}
|
|
1975
|
-
|
|
1975
|
+
*/
|
|
1976
1976
|
selectedDocument = new EventEmitter();
|
|
1977
1977
|
/**
|
|
1978
1978
|
* Subject used to clean up subscriptions when the component is destroyed.
|
|
1979
1979
|
* Helps prevent memory leaks in observables.
|
|
1980
1980
|
* @type {Subject<void>}
|
|
1981
|
-
|
|
1981
|
+
*/
|
|
1982
1982
|
destroy$ = new Subject();
|
|
1983
1983
|
/**
|
|
1984
1984
|
* The list of documents.
|
|
@@ -2008,21 +2008,27 @@ class DocumentContainerComponent {
|
|
|
2008
2008
|
if (folderBlockId) {
|
|
2009
2009
|
const validFolders = this.folderList.filter(folder => (folder.documentCount ?? 0) > 0);
|
|
2010
2010
|
const idToFetch = folderBlockId ?? validFolders[0]?._id;
|
|
2011
|
-
if (idToFetch)
|
|
2011
|
+
if (idToFetch)
|
|
2012
2012
|
this.fetchDocuments(idToFetch);
|
|
2013
|
-
}
|
|
2014
2013
|
else {
|
|
2015
2014
|
console.warn('No folders with documents available.');
|
|
2016
2015
|
}
|
|
2017
2016
|
}
|
|
2018
2017
|
});
|
|
2019
2018
|
this.subscription.add(folderSubscription);
|
|
2019
|
+
this.getSelectedDocumentData();
|
|
2020
|
+
}
|
|
2021
|
+
/**
|
|
2022
|
+
* Subscribes to the selected document from the document query store.
|
|
2023
|
+
* Emits the selected document using the `selectedDocument` EventEmitter if it exists.
|
|
2024
|
+
* Automatically unsubscribes when the component is destroyed.
|
|
2025
|
+
*/
|
|
2026
|
+
getSelectedDocumentData() {
|
|
2020
2027
|
this.documentQuery.getSelectedDocument()
|
|
2021
2028
|
.pipe(takeUntil(this.destroy$))
|
|
2022
2029
|
.subscribe((res) => {
|
|
2023
|
-
if (res)
|
|
2030
|
+
if (res)
|
|
2024
2031
|
this.selectedDocument.emit(res);
|
|
2025
|
-
}
|
|
2026
2032
|
});
|
|
2027
2033
|
}
|
|
2028
2034
|
/**
|
|
@@ -2188,6 +2194,136 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
2188
2194
|
}]
|
|
2189
2195
|
}], ctorParameters: () => [{ type: DocumentService }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }] });
|
|
2190
2196
|
|
|
2197
|
+
class DocumentRendererComponent {
|
|
2198
|
+
selectedDocumentType = SHARED.EMPTY;
|
|
2199
|
+
documentType = [
|
|
2200
|
+
{
|
|
2201
|
+
"_id": "67e53f7fda90f2dcef43461e",
|
|
2202
|
+
"name": "Business Bank Statements",
|
|
2203
|
+
"__v": 0,
|
|
2204
|
+
"label": "Business Bank Statements",
|
|
2205
|
+
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cf7",
|
|
2206
|
+
"source": null
|
|
2207
|
+
},
|
|
2208
|
+
{
|
|
2209
|
+
"_id": "67e92b904fefd4fc91fe3d26",
|
|
2210
|
+
"name": "Bank Statements",
|
|
2211
|
+
"__v": 0,
|
|
2212
|
+
"label": "Bank Statements",
|
|
2213
|
+
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cf7",
|
|
2214
|
+
"source": null
|
|
2215
|
+
},
|
|
2216
|
+
{
|
|
2217
|
+
"_id": "67e92b904fefd4fc91fe3d27",
|
|
2218
|
+
"name": "Budget Planner",
|
|
2219
|
+
"__v": 0,
|
|
2220
|
+
"label": "Budget Planner",
|
|
2221
|
+
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cf7",
|
|
2222
|
+
"source": null
|
|
2223
|
+
},
|
|
2224
|
+
{
|
|
2225
|
+
"_id": "67e92b904fefd4fc91fe3d28",
|
|
2226
|
+
"name": "Credit Card Statements",
|
|
2227
|
+
"__v": 0,
|
|
2228
|
+
"label": "Credit Card Statements",
|
|
2229
|
+
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cf7",
|
|
2230
|
+
"source": null
|
|
2231
|
+
},
|
|
2232
|
+
{
|
|
2233
|
+
"_id": "67e53f7cda90f2dcef43461c",
|
|
2234
|
+
"name": "Payslips",
|
|
2235
|
+
"__v": 0,
|
|
2236
|
+
"label": "Payslips",
|
|
2237
|
+
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
|
|
2238
|
+
"source": null
|
|
2239
|
+
},
|
|
2240
|
+
{
|
|
2241
|
+
"_id": "67e92b914fefd4fc91fe3d32",
|
|
2242
|
+
"name": "Accountants certificate",
|
|
2243
|
+
"__v": 0,
|
|
2244
|
+
"label": "Accountants certificate",
|
|
2245
|
+
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
|
|
2246
|
+
"source": null
|
|
2247
|
+
},
|
|
2248
|
+
{
|
|
2249
|
+
"_id": "67e92b914fefd4fc91fe3d33",
|
|
2250
|
+
"name": "Company Accounts",
|
|
2251
|
+
"__v": 0,
|
|
2252
|
+
"label": "Company Accounts",
|
|
2253
|
+
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
|
|
2254
|
+
"source": null
|
|
2255
|
+
},
|
|
2256
|
+
{
|
|
2257
|
+
"_id": "67e92b914fefd4fc91fe3d34",
|
|
2258
|
+
"name": "Employer Reference",
|
|
2259
|
+
"__v": 0,
|
|
2260
|
+
"label": "EmployerReference",
|
|
2261
|
+
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
|
|
2262
|
+
"source": null
|
|
2263
|
+
},
|
|
2264
|
+
{
|
|
2265
|
+
"_id": "67e92b914fefd4fc91fe3d35",
|
|
2266
|
+
"name": "Employers reference request form",
|
|
2267
|
+
"__v": 0,
|
|
2268
|
+
"label": "Employers reference request form",
|
|
2269
|
+
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
|
|
2270
|
+
"source": null
|
|
2271
|
+
},
|
|
2272
|
+
{
|
|
2273
|
+
"_id": "67e92b914fefd4fc91fe3d36",
|
|
2274
|
+
"name": "Evidence of Historical Contract Work",
|
|
2275
|
+
"__v": 0,
|
|
2276
|
+
"label": "Evidence of Historical Contract Work",
|
|
2277
|
+
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
|
|
2278
|
+
"source": null
|
|
2279
|
+
},
|
|
2280
|
+
{
|
|
2281
|
+
"_id": "67e92b914fefd4fc91fe3d37",
|
|
2282
|
+
"name": "P60",
|
|
2283
|
+
"__v": 0,
|
|
2284
|
+
"label": "P60",
|
|
2285
|
+
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
|
|
2286
|
+
"source": null
|
|
2287
|
+
},
|
|
2288
|
+
{
|
|
2289
|
+
"_id": "67e92b914fefd4fc91fe3d38",
|
|
2290
|
+
"name": "Pension Evidence",
|
|
2291
|
+
"__v": 0,
|
|
2292
|
+
"label": "Pension Evidence",
|
|
2293
|
+
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
|
|
2294
|
+
"source": null
|
|
2295
|
+
},
|
|
2296
|
+
{
|
|
2297
|
+
"_id": "67e92b914fefd4fc91fe3d39",
|
|
2298
|
+
"name": "SA302s",
|
|
2299
|
+
"__v": 0,
|
|
2300
|
+
"label": "SA302s",
|
|
2301
|
+
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
|
|
2302
|
+
"source": null
|
|
2303
|
+
},
|
|
2304
|
+
{
|
|
2305
|
+
"_id": "67e92b914fefd4fc91fe3d3a",
|
|
2306
|
+
"name": "Signed Copy of Contract",
|
|
2307
|
+
"__v": 0,
|
|
2308
|
+
"label": "Signed Copy of Contract",
|
|
2309
|
+
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
|
|
2310
|
+
"source": null
|
|
2311
|
+
}
|
|
2312
|
+
];
|
|
2313
|
+
ngOnInit() {
|
|
2314
|
+
console.log(this.documentType);
|
|
2315
|
+
}
|
|
2316
|
+
handleFileUploadClick(event) {
|
|
2317
|
+
console.log('File upload clicked', event);
|
|
2318
|
+
}
|
|
2319
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2320
|
+
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"] }] });
|
|
2321
|
+
}
|
|
2322
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentRendererComponent, decorators: [{
|
|
2323
|
+
type: Component,
|
|
2324
|
+
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"] }]
|
|
2325
|
+
}] });
|
|
2326
|
+
|
|
2191
2327
|
/**
|
|
2192
2328
|
* @module DocumentModule
|
|
2193
2329
|
*
|
|
@@ -2242,7 +2378,8 @@ class DocumentModule {
|
|
|
2242
2378
|
/**
|
|
2243
2379
|
* A component which have linked documents.
|
|
2244
2380
|
*/
|
|
2245
|
-
LinkedDocumentComponent
|
|
2381
|
+
LinkedDocumentComponent,
|
|
2382
|
+
DocumentRendererComponent], imports: [
|
|
2246
2383
|
/**
|
|
2247
2384
|
* Angular's CommonModule is imported to access common directives like `ngIf` and `ngFor`.
|
|
2248
2385
|
*/
|
|
@@ -2331,7 +2468,8 @@ class DocumentModule {
|
|
|
2331
2468
|
/**
|
|
2332
2469
|
* A directive to show the document.
|
|
2333
2470
|
*/
|
|
2334
|
-
DocumentDirective
|
|
2471
|
+
DocumentDirective,
|
|
2472
|
+
DocumentRendererComponent] });
|
|
2335
2473
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentModule, providers: [
|
|
2336
2474
|
/**
|
|
2337
2475
|
* Provide the messageservice to be used in other components.
|
|
@@ -2482,6 +2620,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
2482
2620
|
* A component which have linked documents.
|
|
2483
2621
|
*/
|
|
2484
2622
|
LinkedDocumentComponent,
|
|
2623
|
+
DocumentRendererComponent
|
|
2485
2624
|
],
|
|
2486
2625
|
imports: [
|
|
2487
2626
|
/**
|
|
@@ -2575,6 +2714,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
2575
2714
|
* A directive to show the document.
|
|
2576
2715
|
*/
|
|
2577
2716
|
DocumentDirective,
|
|
2717
|
+
DocumentRendererComponent
|
|
2578
2718
|
],
|
|
2579
2719
|
providers: [
|
|
2580
2720
|
/**
|
|
@@ -2619,5 +2759,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
2619
2759
|
* Generated bundle index. Do not edit.
|
|
2620
2760
|
*/
|
|
2621
2761
|
|
|
2622
|
-
export { DocumentContainerComponent, DocumentDirective, DocumentListComponent, DocumentModule, DocumentViewerComponent, HasPermissionDirective };
|
|
2762
|
+
export { DocumentContainerComponent, DocumentDirective, DocumentListComponent, DocumentModule, DocumentRendererComponent, DocumentViewerComponent, HasPermissionDirective };
|
|
2623
2763
|
//# sourceMappingURL=cat-documents-ng.mjs.map
|