cat-documents-ng 0.1.15 → 0.1.20
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/fesm2022/cat-documents-ng.mjs +169 -84
- package/fesm2022/cat-documents-ng.mjs.map +1 -1
- package/lib/document/components/document-container/document-container.component.d.ts +7 -4
- package/lib/document/components/document-viewer/document-viewer.component.d.ts +9 -1
- package/lib/document/components/linked-document/linked-document.component.d.ts +38 -0
- package/lib/document/document.module.d.ts +19 -18
- package/lib/document/state/document.query.d.ts +7 -1
- package/lib/document/state/document.state.d.ts +1 -0
- package/lib/document/state/document.store.d.ts +2 -0
- package/package.json +1 -1
|
@@ -358,67 +358,6 @@ class ERRORS {
|
|
|
358
358
|
static ERROR_DOCUMENT_TYPES = "Error fetching document types:";
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
-
/**
|
|
362
|
-
* Class that holds the URLs used throughout the application.
|
|
363
|
-
* These URLs are typically used for making API requests and accessing various resources.
|
|
364
|
-
* @class URLS
|
|
365
|
-
* @typedef {URLS}
|
|
366
|
-
*/
|
|
367
|
-
class URLS {
|
|
368
|
-
/**
|
|
369
|
-
* The URL to fetch the application configuration file.
|
|
370
|
-
* This JSON file typically contains settings and options for the application.
|
|
371
|
-
* @static
|
|
372
|
-
* @type {string}
|
|
373
|
-
*/
|
|
374
|
-
static CONFIGFILEURL = "assets/config/api.config.json";
|
|
375
|
-
/**
|
|
376
|
-
* The URL endpoint for document uploads.
|
|
377
|
-
* Used to send documents to the server for storage or processing.
|
|
378
|
-
* @static
|
|
379
|
-
* @type {string}
|
|
380
|
-
*/
|
|
381
|
-
static DOCUMENT_UPLOAD = "Documents";
|
|
382
|
-
/**
|
|
383
|
-
* The query parameter to pass a context ID in API requests.
|
|
384
|
-
* Used to specify the context for certain API calls, such as filtering or scoping the request.
|
|
385
|
-
* @static
|
|
386
|
-
* @type {string}
|
|
387
|
-
*/
|
|
388
|
-
static CONTEXT = "?contextId=";
|
|
389
|
-
/**
|
|
390
|
-
* The query parameter to pass a document ID in API requests.
|
|
391
|
-
* @static
|
|
392
|
-
* @type {string}
|
|
393
|
-
*/
|
|
394
|
-
static DOCUMENT_TYPES = "documentTypes";
|
|
395
|
-
/**
|
|
396
|
-
* The query parameter to pass a context ID in API requests.
|
|
397
|
-
* @static
|
|
398
|
-
* @type {string}
|
|
399
|
-
*/
|
|
400
|
-
static FOLDERS = "/folders?contextId=";
|
|
401
|
-
/**
|
|
402
|
-
* The query parameter to pass a document ID in API requests.
|
|
403
|
-
* @static
|
|
404
|
-
* @type {string}
|
|
405
|
-
*/
|
|
406
|
-
static ALERT_BY_DOCUMENT_ID = "alerts?documentId=";
|
|
407
|
-
/**
|
|
408
|
-
* The query parameter to pass a document ID in API requests.
|
|
409
|
-
* @static
|
|
410
|
-
* @type {string}
|
|
411
|
-
*/
|
|
412
|
-
static PARENT_DOCUMENT_TYPE_ID = "parentDocumentType?parentDocumentTypeId=";
|
|
413
|
-
/**
|
|
414
|
-
* The query parameter to pass a context ID in API requests.
|
|
415
|
-
* Used to specify the context for certain API calls, such as filtering or scoping the request.
|
|
416
|
-
* @static
|
|
417
|
-
* @type {string}
|
|
418
|
-
*/
|
|
419
|
-
static CONTEXT_ID = "&contextId=";
|
|
420
|
-
}
|
|
421
|
-
|
|
422
361
|
/**
|
|
423
362
|
* Creates the initial state for the `DocumentState` store.
|
|
424
363
|
* This function provides default values for all properties in the `DocumentState` interface,
|
|
@@ -436,7 +375,8 @@ function createInitialState() {
|
|
|
436
375
|
parentDocumentTypeId: null,
|
|
437
376
|
documentAlert: { _id: '' },
|
|
438
377
|
folders: [],
|
|
439
|
-
messages: []
|
|
378
|
+
messages: [],
|
|
379
|
+
documentList: []
|
|
440
380
|
};
|
|
441
381
|
}
|
|
442
382
|
|
|
@@ -472,6 +412,9 @@ let DocumentStore = class DocumentStore extends EntityStore {
|
|
|
472
412
|
setMessage(message) {
|
|
473
413
|
this.update({ messages: message });
|
|
474
414
|
}
|
|
415
|
+
setDocumentList(documents) {
|
|
416
|
+
this.update({ documents: documents });
|
|
417
|
+
}
|
|
475
418
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
476
419
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentStore, providedIn: 'root' });
|
|
477
420
|
};
|
|
@@ -483,6 +426,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
483
426
|
args: [{ providedIn: 'root' }]
|
|
484
427
|
}], ctorParameters: () => [] });
|
|
485
428
|
|
|
429
|
+
/**
|
|
430
|
+
* Class that holds the URLs used throughout the application.
|
|
431
|
+
* These URLs are typically used for making API requests and accessing various resources.
|
|
432
|
+
* @class URLS
|
|
433
|
+
* @typedef {URLS}
|
|
434
|
+
*/
|
|
435
|
+
class URLS {
|
|
436
|
+
/**
|
|
437
|
+
* The URL to fetch the application configuration file.
|
|
438
|
+
* This JSON file typically contains settings and options for the application.
|
|
439
|
+
* @static
|
|
440
|
+
* @type {string}
|
|
441
|
+
*/
|
|
442
|
+
static CONFIGFILEURL = "assets/config/api.config.json";
|
|
443
|
+
/**
|
|
444
|
+
* The URL endpoint for document uploads.
|
|
445
|
+
* Used to send documents to the server for storage or processing.
|
|
446
|
+
* @static
|
|
447
|
+
* @type {string}
|
|
448
|
+
*/
|
|
449
|
+
static DOCUMENT_UPLOAD = "Documents";
|
|
450
|
+
/**
|
|
451
|
+
* The query parameter to pass a context ID in API requests.
|
|
452
|
+
* Used to specify the context for certain API calls, such as filtering or scoping the request.
|
|
453
|
+
* @static
|
|
454
|
+
* @type {string}
|
|
455
|
+
*/
|
|
456
|
+
static CONTEXT = "?contextId=";
|
|
457
|
+
/**
|
|
458
|
+
* The query parameter to pass a document ID in API requests.
|
|
459
|
+
* @static
|
|
460
|
+
* @type {string}
|
|
461
|
+
*/
|
|
462
|
+
static DOCUMENT_TYPES = "documentTypes";
|
|
463
|
+
/**
|
|
464
|
+
* The query parameter to pass a context ID in API requests.
|
|
465
|
+
* @static
|
|
466
|
+
* @type {string}
|
|
467
|
+
*/
|
|
468
|
+
static FOLDERS = "/folders?contextId=";
|
|
469
|
+
/**
|
|
470
|
+
* The query parameter to pass a document ID in API requests.
|
|
471
|
+
* @static
|
|
472
|
+
* @type {string}
|
|
473
|
+
*/
|
|
474
|
+
static ALERT_BY_DOCUMENT_ID = "alerts?documentId=";
|
|
475
|
+
/**
|
|
476
|
+
* The query parameter to pass a document ID in API requests.
|
|
477
|
+
* @static
|
|
478
|
+
* @type {string}
|
|
479
|
+
*/
|
|
480
|
+
static PARENT_DOCUMENT_TYPE_ID = "parentDocumentType?parentDocumentTypeId=";
|
|
481
|
+
/**
|
|
482
|
+
* The query parameter to pass a context ID in API requests.
|
|
483
|
+
* Used to specify the context for certain API calls, such as filtering or scoping the request.
|
|
484
|
+
* @static
|
|
485
|
+
* @type {string}
|
|
486
|
+
*/
|
|
487
|
+
static CONTEXT_ID = "&contextId=";
|
|
488
|
+
}
|
|
489
|
+
|
|
486
490
|
/**
|
|
487
491
|
* Service that handles loading and providing configuration settings for the application.
|
|
488
492
|
* It fetches configuration data from a remote server and exposes various configuration options.
|
|
@@ -638,7 +642,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
638
642
|
* This class extends Akita's `QueryEntity` to provide additional functionality for querying document data.
|
|
639
643
|
* @class DocumentQuery
|
|
640
644
|
* @typedef {DocumentQuery}
|
|
641
|
-
* @
|
|
645
|
+
* @augments {QueryEntity<DocumentState>}
|
|
642
646
|
*/
|
|
643
647
|
class DocumentQuery extends QueryEntity {
|
|
644
648
|
store;
|
|
@@ -667,6 +671,13 @@ class DocumentQuery extends QueryEntity {
|
|
|
667
671
|
selectMessages() {
|
|
668
672
|
return this.select((state) => state.messages);
|
|
669
673
|
}
|
|
674
|
+
/**
|
|
675
|
+
* Selects the set documents.
|
|
676
|
+
* @returns {Observable<DocumentModel[]>} Observable that emits the documets.
|
|
677
|
+
*/
|
|
678
|
+
selectDocumets() {
|
|
679
|
+
return this.select((state) => state.documentList);
|
|
680
|
+
}
|
|
670
681
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentQuery, deps: [{ token: DocumentStore }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
671
682
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentQuery, providedIn: 'root' });
|
|
672
683
|
}
|
|
@@ -1266,6 +1277,55 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
1266
1277
|
}]
|
|
1267
1278
|
}] });
|
|
1268
1279
|
|
|
1280
|
+
/**
|
|
1281
|
+
* Description placeholder
|
|
1282
|
+
* @class LinkedDocumentComponent
|
|
1283
|
+
* @typedef {LinkedDocumentComponent}
|
|
1284
|
+
* @implements {OnChanges}
|
|
1285
|
+
*/
|
|
1286
|
+
class LinkedDocumentComponent {
|
|
1287
|
+
/**
|
|
1288
|
+
* Selected document for view.
|
|
1289
|
+
* @type {?DocumentModel}
|
|
1290
|
+
*/
|
|
1291
|
+
selectedDocument;
|
|
1292
|
+
/**
|
|
1293
|
+
* Whole document list.
|
|
1294
|
+
* @type {?DocumentModel[]}
|
|
1295
|
+
*/
|
|
1296
|
+
documentList;
|
|
1297
|
+
/**
|
|
1298
|
+
* Changed selected document.
|
|
1299
|
+
* @type {*}
|
|
1300
|
+
*/
|
|
1301
|
+
selectedDocumentChange = new EventEmitter();
|
|
1302
|
+
/**
|
|
1303
|
+
* Filtered documents.
|
|
1304
|
+
* @type {DocumentModel[]}
|
|
1305
|
+
*/
|
|
1306
|
+
filteredDocuments = [];
|
|
1307
|
+
/**
|
|
1308
|
+
* Handle the click on the document.
|
|
1309
|
+
* @param {DocumentModel} document - Clicked document.
|
|
1310
|
+
*/
|
|
1311
|
+
handleDocumentClick(document) {
|
|
1312
|
+
this.selectedDocument = document;
|
|
1313
|
+
this.selectedDocumentChange.emit(this.selectedDocument);
|
|
1314
|
+
}
|
|
1315
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: LinkedDocumentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1316
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: LinkedDocumentComponent, isStandalone: false, selector: "app-linked-document", inputs: { selectedDocument: "selectedDocument", documentList: "documentList" }, outputs: { selectedDocumentChange: "selectedDocumentChange" }, ngImport: i0, template: "<div class=\"summary-card mb-4 pb-1\">\r\n <div class=\"card p-0 mb-0\"\r\n style=\"border-bottom: 1px solid;border-color: rgba(68, 72, 109, 0.2); border-bottom-right-radius: 0px;border-bottom-left-radius: 0px; background-color: #F9fafb;\">\r\n <div class=\"p-0\">\r\n <h4 class=\"m-0 pt-3 pl-3 mb-3\" style=\"font-size: 21px; font-weight: bold; \">Linked Documents</h4>\r\n </div>\r\n </div>\r\n <div class=\"card mb-0\" style=\"border-top-right-radius: 0px;border-top-left-radius: 0px;\">\r\n @for(document of documentList; track document){\r\n <div class=\"linkedDocument documentName m-2\">\r\n <div class=\"documentName\" [class.selected]=\"document._id === selectedDocument?._id\"\r\n (click)=\"handleDocumentClick(document)\">\r\n <span class=\"pi pi-link\"></span>\r\n {{document.fileName}}\r\n </div>\r\n </div>\r\n }\r\n\r\n </div>\r\n \r\n \r\n </div>\r\n ", styles: [".documentName{font-family:inherit;text-decoration:underline;cursor:pointer;width:max-content}.selected{color:var(--primary-color)}\n"] });
|
|
1317
|
+
}
|
|
1318
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: LinkedDocumentComponent, decorators: [{
|
|
1319
|
+
type: Component,
|
|
1320
|
+
args: [{ selector: 'app-linked-document', standalone: false, template: "<div class=\"summary-card mb-4 pb-1\">\r\n <div class=\"card p-0 mb-0\"\r\n style=\"border-bottom: 1px solid;border-color: rgba(68, 72, 109, 0.2); border-bottom-right-radius: 0px;border-bottom-left-radius: 0px; background-color: #F9fafb;\">\r\n <div class=\"p-0\">\r\n <h4 class=\"m-0 pt-3 pl-3 mb-3\" style=\"font-size: 21px; font-weight: bold; \">Linked Documents</h4>\r\n </div>\r\n </div>\r\n <div class=\"card mb-0\" style=\"border-top-right-radius: 0px;border-top-left-radius: 0px;\">\r\n @for(document of documentList; track document){\r\n <div class=\"linkedDocument documentName m-2\">\r\n <div class=\"documentName\" [class.selected]=\"document._id === selectedDocument?._id\"\r\n (click)=\"handleDocumentClick(document)\">\r\n <span class=\"pi pi-link\"></span>\r\n {{document.fileName}}\r\n </div>\r\n </div>\r\n }\r\n\r\n </div>\r\n \r\n \r\n </div>\r\n ", styles: [".documentName{font-family:inherit;text-decoration:underline;cursor:pointer;width:max-content}.selected{color:var(--primary-color)}\n"] }]
|
|
1321
|
+
}], propDecorators: { selectedDocument: [{
|
|
1322
|
+
type: Input
|
|
1323
|
+
}], documentList: [{
|
|
1324
|
+
type: Input
|
|
1325
|
+
}], selectedDocumentChange: [{
|
|
1326
|
+
type: Output
|
|
1327
|
+
}] } });
|
|
1328
|
+
|
|
1269
1329
|
/**
|
|
1270
1330
|
* Component for viewing and managing document details.
|
|
1271
1331
|
* @class DocumentViewerComponent
|
|
@@ -1279,6 +1339,11 @@ class DocumentViewerComponent {
|
|
|
1279
1339
|
* @type {*}
|
|
1280
1340
|
*/
|
|
1281
1341
|
selectedDocument; // <-- Made optional to prevent undefined issues
|
|
1342
|
+
/**
|
|
1343
|
+
* Get the selected document by user.
|
|
1344
|
+
* @type {*}
|
|
1345
|
+
*/
|
|
1346
|
+
documentList; // <-- Made optional to prevent undefined issues
|
|
1282
1347
|
/**
|
|
1283
1348
|
* Indicates whether a checkbox is selected.
|
|
1284
1349
|
* @type {boolean}
|
|
@@ -1307,6 +1372,8 @@ class DocumentViewerComponent {
|
|
|
1307
1372
|
subscription = new Subscription();
|
|
1308
1373
|
/**
|
|
1309
1374
|
* Initializes a new instance of the DocumentViewerComponent.
|
|
1375
|
+
* @param {DocumentHttpService} documentHttpService - Handle the http service.
|
|
1376
|
+
* @param {DocumentService} documentService - Handle the states.
|
|
1310
1377
|
*/
|
|
1311
1378
|
constructor(documentHttpService, documentService) {
|
|
1312
1379
|
this.documentHttpService = documentHttpService;
|
|
@@ -1322,6 +1389,10 @@ class DocumentViewerComponent {
|
|
|
1322
1389
|
this.alertData = DocumentAlertList.find((res) => res.status === this.selectedDocument?.status);
|
|
1323
1390
|
}
|
|
1324
1391
|
}
|
|
1392
|
+
handleSelectedDocument(document) {
|
|
1393
|
+
this.selectedDocument = document;
|
|
1394
|
+
this.documentService.set(this.selectedDocument);
|
|
1395
|
+
}
|
|
1325
1396
|
/**
|
|
1326
1397
|
* Determines if the given content type is an image.
|
|
1327
1398
|
* @param {string | undefined} contentType - The MIME type of the content.
|
|
@@ -1334,13 +1405,15 @@ class DocumentViewerComponent {
|
|
|
1334
1405
|
this.subscription.unsubscribe();
|
|
1335
1406
|
}
|
|
1336
1407
|
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 });
|
|
1337
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: DocumentViewerComponent, isStandalone: false, selector: "document-viewer", inputs: { selectedDocument: "selectedDocument" }, 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 }\r\n </div>\r\n }\r\n\r\n <div class=\"left-part col-12 md:col-3 pt-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
|
|
1408
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: DocumentViewerComponent, isStandalone: false, selector: "document-viewer", inputs: { selectedDocument: "selectedDocument", documentList: "documentList" }, 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 pt-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></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,.document-viewer .p-dialog-content{background-color:#fff;border-radius:0}.uploadedImages{width:95%;height:100%;object-fit:contain}\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 });
|
|
1338
1409
|
}
|
|
1339
1410
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentViewerComponent, decorators: [{
|
|
1340
1411
|
type: Component,
|
|
1341
|
-
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 }\r\n </div>\r\n }\r\n\r\n <div class=\"left-part col-12 md:col-3 pt-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
|
|
1412
|
+
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 pt-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></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,.document-viewer .p-dialog-content{background-color:#fff;border-radius:0}.uploadedImages{width:95%;height:100%;object-fit:contain}\n"] }]
|
|
1342
1413
|
}], ctorParameters: () => [{ type: DocumentHttpService }, { type: DocumentService }], propDecorators: { selectedDocument: [{
|
|
1343
1414
|
type: Input
|
|
1415
|
+
}], documentList: [{
|
|
1416
|
+
type: Input
|
|
1344
1417
|
}] } });
|
|
1345
1418
|
|
|
1346
1419
|
/**
|
|
@@ -1692,11 +1765,11 @@ class DocumentListComponent {
|
|
|
1692
1765
|
this.isSidebarVisible = isVisible;
|
|
1693
1766
|
}
|
|
1694
1767
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentListComponent, deps: [{ token: DocumentUploadService }, { token: DocumentHttpService }, { token: DocumentQuery }, { token: DocumentStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
1695
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: DocumentListComponent, isStandalone: false, selector: "lib-document-list", inputs: { contextId: "contextId", isUploadButtonVisible: "isUploadButtonVisible", documentList: "documentList" }, outputs: { onRefresh: "onRefresh" }, ngImport: i0, template: "\r\n<div class=\"document-viewer\">\r\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\" (onHide)=\"handleCloseModal()\"\r\n class=\"w-full h-full document-dailog-wrapper\"\r\n [draggable]=\"false\" [closable]=\"true\">\r\n\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"w-full flex align-items-center justify-content-between\">\r\n <input \r\n type=\"text\" \r\n class=\"w-full border-none bg-white h-3rem file-input-wrapper\"\r\n pInputText \r\n [(ngModel)]=\"fileName\" />\r\n <button \r\n pButton \r\n pRipple \r\n class=\"mx-3 w-6rem save-btn-wrapper\"\r\n label=\"Save\"\r\n (click)=\"handleSaveClick()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n
|
|
1768
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: DocumentListComponent, isStandalone: false, selector: "lib-document-list", inputs: { contextId: "contextId", isUploadButtonVisible: "isUploadButtonVisible", documentList: "documentList" }, outputs: { onRefresh: "onRefresh" }, ngImport: i0, template: "\r\n<div class=\"document-viewer\">\r\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\" (onHide)=\"handleCloseModal()\"\r\n class=\"w-full h-full document-dailog-wrapper\"\r\n [draggable]=\"false\" [closable]=\"true\">\r\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\">\r\n\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"w-full flex align-items-center justify-content-between\">\r\n <input \r\n type=\"text\" \r\n class=\"w-full border-none bg-white h-3rem file-input-wrapper\"\r\n pInputText \r\n [(ngModel)]=\"fileName\" />\r\n <button \r\n pButton \r\n pRipple \r\n class=\"mx-3 w-6rem save-btn-wrapper\"\r\n label=\"Save\"\r\n (click)=\"handleSaveClick()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n\r\n <ng-content></ng-content>\r\n </document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"col-12 p-0\">\r\n <div class=\"card p-0 mb-0 document-list-wrapper\">\r\n <p-accordion>\r\n <p-accordionTab [selected]=\"true\" class=\"line-height-2 m-0\">\r\n <ng-template pTemplate=\"header\" let-active=\"active\">\r\n <div class=\"flex align-items-center justify-content-between w-full\">\r\n <span class=\"flex align-items-center gap-2 document-title-wrapper\">\r\n Documents\r\n </span>\r\n @if(isUploadButtonVisible){\r\n <button pButton pRipple class=\"p-button-raised col-3\" [permission]=\"PERMISSION.DOCUMENT_POST\" type=\"button\" label=\"Upload File\"\r\n style=\"border-radius: 10px;\" (click)=\"handleFileUploadClick($event)\"></button>\r\n }\r\n </div>\r\n </ng-template>\r\n @for(document of documentList; track document){\r\n <lib-document-list-item [document]=\"document\"\r\n (documentClick)=\"handleClickForDocument($event)\"></lib-document-list-item>\r\n }\r\n </p-accordionTab>\r\n </p-accordion>\r\n </div>\r\n</div>\r\n<div class=\"grid m-0\">\r\n <div class=\"col-12 p-0\">\r\n <p-sidebar [(visible)]=\"isSidebarVisible\" position=\"right\" [styleClass]=\"'right-sidebar'\" class=\"relative\">\r\n <ng-template pTemplate=\"header\">\r\n <p-messages [(value)]=\"messages\" [enableService]=\"false\" />\r\n </ng-template>\r\n <ng-template pTemplate=\"content\">\r\n <div class=\"side-bar-con\">\r\n <lib-document-upload [contextId]=\"contextId\"></lib-document-upload>\r\n <div class=\"p-fluid\">\r\n <div class=\"field\">\r\n <label for=\"city\">Select Folder</label>\r\n <p-dropdown id=\"city\" optionLabel=\"label\" optionValue=\"value\" [options]=\"options\"\r\n placeholder=\"Select a Folder\" [(ngModel)]=\"selectedOption\"></p-dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"footer\" class=\"bg-gray-100 p-0\">\r\n <div class=\"bg-gray-100 p-4\">\r\n <p-button label=\"Save\" class=\"p-button-rounded p-button-success save-btn\" (click)=\"handleUploadDocument()\"\r\n [disabled]=\"!selectedOption\">\r\n </p-button>\r\n </div>\r\n </ng-template>\r\n </p-sidebar>\r\n </div>\r\n</div>", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right,.right-sidebar{width:35%}.document-title-wrapper{font-size:20px;font-weight:700;color:var(--text-color)}.document-input-field{display:flex;flex-direction:column}.document-input-field input{width:100%;height:46px;padding:10px 15px;gap:10px;border-radius:10px;outline:none;border:1px solid rgba(76,98,146,.1019607843);font-size:15px}label{color:#0f1729;font-weight:600}.document-list-dropDown .p-element{padding:10px 0 10px 15px}.document-list-dropDown .p-dropdown{border-radius:10px!important}.side-bar-con{display:flex;flex-direction:column}.save-btn-con{width:100%;border-top:1px solid rgba(76,98,146,.2);background:#4c629214;padding:13px 40px}.save-btn-wrapper{padding:10px 4px}.save-btn .p-button{height:45px!important;width:140px;border-radius:10px}.p-sidebar-footer{padding:0}.file-input-wrapper.p-inputtext:enabled:focus{box-shadow:0 0 0 .2rem #a6d5fa!important}\n"], dependencies: [{ kind: "component", type: i5$1.Accordion, selector: "p-accordion", inputs: ["multiple", "style", "styleClass", "expandIcon", "collapseIcon", "activeIndex", "selectOnFocus", "headerAriaLevel"], outputs: ["onClose", "onOpen", "activeIndexChange"] }, { kind: "component", type: i5$1.AccordionTab, selector: "p-accordionTab", inputs: ["id", "header", "headerStyle", "tabStyle", "contentStyle", "tabStyleClass", "headerStyleClass", "contentStyleClass", "disabled", "cache", "transitionOptions", "iconPos", "selected", "headerAriaLevel"], outputs: ["selectedChange"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i7.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i7.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i8$1.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: i9.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "directive", type: i10.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i10.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i10.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i11.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "component", type: i12.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"] }, { kind: "directive", type: i13.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: DocumentListItemComponent, selector: "lib-document-list-item", inputs: ["document"], outputs: ["documentClick"] }, { kind: "component", type: DocumentUploadComponent, selector: "lib-document-upload", inputs: ["contextId"] }, { kind: "component", type: DocumentViewerComponent, selector: "document-viewer", inputs: ["selectedDocument", "documentList"] }, { kind: "directive", type: HasPermissionDirective, selector: "[permission]", inputs: ["permission"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1696
1769
|
}
|
|
1697
1770
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentListComponent, decorators: [{
|
|
1698
1771
|
type: Component,
|
|
1699
|
-
args: [{ selector: 'lib-document-list', standalone: false, encapsulation: ViewEncapsulation.None, template: "\r\n<div class=\"document-viewer\">\r\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\" (onHide)=\"handleCloseModal()\"\r\n class=\"w-full h-full document-dailog-wrapper\"\r\n [draggable]=\"false\" [closable]=\"true\">\r\n\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"w-full flex align-items-center justify-content-between\">\r\n <input \r\n type=\"text\" \r\n class=\"w-full border-none bg-white h-3rem file-input-wrapper\"\r\n pInputText \r\n [(ngModel)]=\"fileName\" />\r\n <button \r\n pButton \r\n pRipple \r\n class=\"mx-3 w-6rem save-btn-wrapper\"\r\n label=\"Save\"\r\n (click)=\"handleSaveClick()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n
|
|
1772
|
+
args: [{ selector: 'lib-document-list', standalone: false, encapsulation: ViewEncapsulation.None, template: "\r\n<div class=\"document-viewer\">\r\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\" (onHide)=\"handleCloseModal()\"\r\n class=\"w-full h-full document-dailog-wrapper\"\r\n [draggable]=\"false\" [closable]=\"true\">\r\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\">\r\n\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"w-full flex align-items-center justify-content-between\">\r\n <input \r\n type=\"text\" \r\n class=\"w-full border-none bg-white h-3rem file-input-wrapper\"\r\n pInputText \r\n [(ngModel)]=\"fileName\" />\r\n <button \r\n pButton \r\n pRipple \r\n class=\"mx-3 w-6rem save-btn-wrapper\"\r\n label=\"Save\"\r\n (click)=\"handleSaveClick()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n\r\n <ng-content></ng-content>\r\n </document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"col-12 p-0\">\r\n <div class=\"card p-0 mb-0 document-list-wrapper\">\r\n <p-accordion>\r\n <p-accordionTab [selected]=\"true\" class=\"line-height-2 m-0\">\r\n <ng-template pTemplate=\"header\" let-active=\"active\">\r\n <div class=\"flex align-items-center justify-content-between w-full\">\r\n <span class=\"flex align-items-center gap-2 document-title-wrapper\">\r\n Documents\r\n </span>\r\n @if(isUploadButtonVisible){\r\n <button pButton pRipple class=\"p-button-raised col-3\" [permission]=\"PERMISSION.DOCUMENT_POST\" type=\"button\" label=\"Upload File\"\r\n style=\"border-radius: 10px;\" (click)=\"handleFileUploadClick($event)\"></button>\r\n }\r\n </div>\r\n </ng-template>\r\n @for(document of documentList; track document){\r\n <lib-document-list-item [document]=\"document\"\r\n (documentClick)=\"handleClickForDocument($event)\"></lib-document-list-item>\r\n }\r\n </p-accordionTab>\r\n </p-accordion>\r\n </div>\r\n</div>\r\n<div class=\"grid m-0\">\r\n <div class=\"col-12 p-0\">\r\n <p-sidebar [(visible)]=\"isSidebarVisible\" position=\"right\" [styleClass]=\"'right-sidebar'\" class=\"relative\">\r\n <ng-template pTemplate=\"header\">\r\n <p-messages [(value)]=\"messages\" [enableService]=\"false\" />\r\n </ng-template>\r\n <ng-template pTemplate=\"content\">\r\n <div class=\"side-bar-con\">\r\n <lib-document-upload [contextId]=\"contextId\"></lib-document-upload>\r\n <div class=\"p-fluid\">\r\n <div class=\"field\">\r\n <label for=\"city\">Select Folder</label>\r\n <p-dropdown id=\"city\" optionLabel=\"label\" optionValue=\"value\" [options]=\"options\"\r\n placeholder=\"Select a Folder\" [(ngModel)]=\"selectedOption\"></p-dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"footer\" class=\"bg-gray-100 p-0\">\r\n <div class=\"bg-gray-100 p-4\">\r\n <p-button label=\"Save\" class=\"p-button-rounded p-button-success save-btn\" (click)=\"handleUploadDocument()\"\r\n [disabled]=\"!selectedOption\">\r\n </p-button>\r\n </div>\r\n </ng-template>\r\n </p-sidebar>\r\n </div>\r\n</div>", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right,.right-sidebar{width:35%}.document-title-wrapper{font-size:20px;font-weight:700;color:var(--text-color)}.document-input-field{display:flex;flex-direction:column}.document-input-field input{width:100%;height:46px;padding:10px 15px;gap:10px;border-radius:10px;outline:none;border:1px solid rgba(76,98,146,.1019607843);font-size:15px}label{color:#0f1729;font-weight:600}.document-list-dropDown .p-element{padding:10px 0 10px 15px}.document-list-dropDown .p-dropdown{border-radius:10px!important}.side-bar-con{display:flex;flex-direction:column}.save-btn-con{width:100%;border-top:1px solid rgba(76,98,146,.2);background:#4c629214;padding:13px 40px}.save-btn-wrapper{padding:10px 4px}.save-btn .p-button{height:45px!important;width:140px;border-radius:10px}.p-sidebar-footer{padding:0}.file-input-wrapper.p-inputtext:enabled:focus{box-shadow:0 0 0 .2rem #a6d5fa!important}\n"] }]
|
|
1700
1773
|
}], ctorParameters: () => [{ type: DocumentUploadService }, { type: DocumentHttpService }, { type: DocumentQuery }, { type: DocumentStore }], propDecorators: { onRefresh: [{
|
|
1701
1774
|
type: Output
|
|
1702
1775
|
}], contextId: [{
|
|
@@ -1713,16 +1786,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
1713
1786
|
* @typedef {DocumentContainerComponent}
|
|
1714
1787
|
*/
|
|
1715
1788
|
class DocumentContainerComponent {
|
|
1789
|
+
documentStore;
|
|
1716
1790
|
documentService;
|
|
1717
1791
|
documentQuery;
|
|
1718
1792
|
documentHttpService;
|
|
1719
1793
|
/**
|
|
1720
1794
|
* Creates an instance of DocumentContainerComponent.
|
|
1795
|
+
* @param {DocumentStore} documentStore - Query Store service to manage store document-related state.
|
|
1721
1796
|
* @param {DocumentService} documentService - Service to manage document-related operations.
|
|
1722
1797
|
* @param {DocumentQuery} documentQuery - Query service to manage document-related state.
|
|
1723
1798
|
* @param {DocumentHttpService} documentHttpService - Service to make HTTP requests related to documents.
|
|
1724
1799
|
*/
|
|
1725
|
-
constructor(documentService, documentQuery, documentHttpService) {
|
|
1800
|
+
constructor(documentStore, documentService, documentQuery, documentHttpService) {
|
|
1801
|
+
this.documentStore = documentStore;
|
|
1726
1802
|
this.documentService = documentService;
|
|
1727
1803
|
this.documentQuery = documentQuery;
|
|
1728
1804
|
this.documentHttpService = documentHttpService;
|
|
@@ -1783,9 +1859,9 @@ class DocumentContainerComponent {
|
|
|
1783
1859
|
* @returns {void}
|
|
1784
1860
|
*/
|
|
1785
1861
|
/**
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1862
|
+
* Fetches the folder data from the API.
|
|
1863
|
+
* @returns {void}
|
|
1864
|
+
*/
|
|
1789
1865
|
fetchFolder() {
|
|
1790
1866
|
const folderSubscription = this.documentHttpService.getFoldersData(this.contextId).subscribe({
|
|
1791
1867
|
/**
|
|
@@ -1830,6 +1906,7 @@ class DocumentContainerComponent {
|
|
|
1830
1906
|
next: (documentList) => {
|
|
1831
1907
|
if (documentList) {
|
|
1832
1908
|
this.documentList = documentList;
|
|
1909
|
+
this.documentStore.setDocumentList(documentList);
|
|
1833
1910
|
}
|
|
1834
1911
|
else {
|
|
1835
1912
|
console.error(ERRORS.ERROR_FETCHING_DOCUMENTS);
|
|
@@ -1851,13 +1928,13 @@ class DocumentContainerComponent {
|
|
|
1851
1928
|
ngOnDestroy() {
|
|
1852
1929
|
this.subscription.unsubscribe();
|
|
1853
1930
|
}
|
|
1854
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentContainerComponent, deps: [{ token: DocumentService$1 }, { token: DocumentQuery }, { token: DocumentHttpService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1931
|
+
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 });
|
|
1855
1932
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: DocumentContainerComponent, isStandalone: false, selector: "lib-document-container", inputs: { contextId: "contextId", showFolderList: "showFolderList", isUploadButtonVisible: "isUploadButtonVisible" }, 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 [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", "documentList"], outputs: ["onRefresh"] }] });
|
|
1856
1933
|
}
|
|
1857
1934
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentContainerComponent, decorators: [{
|
|
1858
1935
|
type: Component,
|
|
1859
1936
|
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 [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"] }]
|
|
1860
|
-
}], ctorParameters: () => [{ type: DocumentService$1 }, { type: DocumentQuery }, { type: DocumentHttpService }], propDecorators: { contextId: [{
|
|
1937
|
+
}], ctorParameters: () => [{ type: DocumentStore }, { type: DocumentService$1 }, { type: DocumentQuery }, { type: DocumentHttpService }], propDecorators: { contextId: [{
|
|
1861
1938
|
type: Input
|
|
1862
1939
|
}], showFolderList: [{
|
|
1863
1940
|
type: Input
|
|
@@ -1981,9 +2058,13 @@ class DocumentModule {
|
|
|
1981
2058
|
*/
|
|
1982
2059
|
DocumentDirective,
|
|
1983
2060
|
/**
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
HasPermissionDirective
|
|
2061
|
+
* A directive to give permission.
|
|
2062
|
+
*/
|
|
2063
|
+
HasPermissionDirective,
|
|
2064
|
+
/**
|
|
2065
|
+
* A component which have linked documents.
|
|
2066
|
+
*/
|
|
2067
|
+
LinkedDocumentComponent], imports: [
|
|
1987
2068
|
/**
|
|
1988
2069
|
* Angular's CommonModule is imported to access common directives like `ngIf` and `ngFor`.
|
|
1989
2070
|
*/
|
|
@@ -2053,8 +2134,8 @@ class DocumentModule {
|
|
|
2053
2134
|
*/
|
|
2054
2135
|
InputTextModule], exports: [
|
|
2055
2136
|
/**
|
|
2056
|
-
|
|
2057
|
-
|
|
2137
|
+
* A directive to give permission.
|
|
2138
|
+
*/
|
|
2058
2139
|
HasPermissionDirective,
|
|
2059
2140
|
/**
|
|
2060
2141
|
* Exports the `DocumentContainerComponent` to be used in other modules.
|
|
@@ -2103,7 +2184,7 @@ class DocumentModule {
|
|
|
2103
2184
|
}),
|
|
2104
2185
|
deps: [AppConfigService],
|
|
2105
2186
|
multi: true,
|
|
2106
|
-
}
|
|
2187
|
+
},
|
|
2107
2188
|
], imports: [
|
|
2108
2189
|
/**
|
|
2109
2190
|
* Angular's CommonModule is imported to access common directives like `ngIf` and `ngFor`.
|
|
@@ -2216,9 +2297,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
2216
2297
|
*/
|
|
2217
2298
|
DocumentDirective,
|
|
2218
2299
|
/**
|
|
2219
|
-
|
|
2220
|
-
|
|
2300
|
+
* A directive to give permission.
|
|
2301
|
+
*/
|
|
2221
2302
|
HasPermissionDirective,
|
|
2303
|
+
/**
|
|
2304
|
+
* A component which have linked documents.
|
|
2305
|
+
*/
|
|
2306
|
+
LinkedDocumentComponent,
|
|
2222
2307
|
],
|
|
2223
2308
|
imports: [
|
|
2224
2309
|
/**
|
|
@@ -2292,8 +2377,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
2292
2377
|
],
|
|
2293
2378
|
exports: [
|
|
2294
2379
|
/**
|
|
2295
|
-
|
|
2296
|
-
|
|
2380
|
+
* A directive to give permission.
|
|
2381
|
+
*/
|
|
2297
2382
|
HasPermissionDirective,
|
|
2298
2383
|
/**
|
|
2299
2384
|
* Exports the `DocumentContainerComponent` to be used in other modules.
|
|
@@ -2343,7 +2428,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
2343
2428
|
}),
|
|
2344
2429
|
deps: [AppConfigService],
|
|
2345
2430
|
multi: true,
|
|
2346
|
-
}
|
|
2431
|
+
},
|
|
2347
2432
|
]
|
|
2348
2433
|
}]
|
|
2349
2434
|
}] });
|