cat-documents-ng 0.3.79 → 0.3.80
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/SHARED.d.ts +6 -0
- package/fesm2022/cat-documents-ng.mjs +58 -56
- package/fesm2022/cat-documents-ng.mjs.map +1 -1
- package/lib/document/components/document-content-viewer/document-content-viewer.component.d.ts +2 -5
- package/lib/document/state/document.service.d.ts +1 -2
- package/package.json +1 -1
|
@@ -222,6 +222,9 @@ export declare class SHARED {
|
|
|
222
222
|
static UPDATE_DOCUMENT_NAME: string;
|
|
223
223
|
static WIDTH: string;
|
|
224
224
|
static BASEZINDEX: number;
|
|
225
|
+
static DOCX: string;
|
|
226
|
+
static DOC: string;
|
|
227
|
+
static CSV: string;
|
|
225
228
|
static CLOSE_ICON: string;
|
|
226
229
|
static SAVE: string;
|
|
227
230
|
static UPLOAD_PROGRESS_100: number;
|
|
@@ -316,6 +319,7 @@ export declare class SHARED {
|
|
|
316
319
|
static PENDING: string;
|
|
317
320
|
static DOT: string;
|
|
318
321
|
static PDF: string;
|
|
322
|
+
static PDF2: string;
|
|
319
323
|
static PENDING_STATUS: string;
|
|
320
324
|
static EVENT_REQUESTED: string;
|
|
321
325
|
static EVENT_ACCEPTED: string;
|
|
@@ -332,6 +336,7 @@ export declare class SHARED {
|
|
|
332
336
|
static JPG: string;
|
|
333
337
|
static PNG: string;
|
|
334
338
|
static XLSX: string;
|
|
339
|
+
static XLS: string;
|
|
335
340
|
static APPROVED_STATUS: string;
|
|
336
341
|
static ALERT_STATUS: string;
|
|
337
342
|
static UPLOADED_STATUS: string;
|
|
@@ -512,6 +517,7 @@ export declare const DocumentAlertList: {
|
|
|
512
517
|
isAlert: boolean;
|
|
513
518
|
alertMessage: string;
|
|
514
519
|
}[];
|
|
520
|
+
export declare const OPEN_DOCUMENT_EXTENSIONS: string[];
|
|
515
521
|
/**
|
|
516
522
|
* Dummy data for document sections with detailed document lists.
|
|
517
523
|
* Based on the document management interface structure.
|
|
@@ -4,7 +4,7 @@ import * as i5 from '@angular/common';
|
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { firstValueFrom, EMPTY, tap, catchError, throwError, of, combineLatest, Subject, Observable, takeUntil, Subscription, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1, BehaviorSubject } from 'rxjs';
|
|
6
6
|
import * as i2 from '@angular/common/http';
|
|
7
|
-
import {
|
|
7
|
+
import { HttpParams, HttpClientModule } from '@angular/common/http';
|
|
8
8
|
import { __decorate } from 'tslib';
|
|
9
9
|
import { EntityStore, StoreConfig, QueryEntity } from '@datorama/akita';
|
|
10
10
|
import { debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';
|
|
@@ -283,6 +283,9 @@ class SHARED {
|
|
|
283
283
|
static UPDATE_DOCUMENT_NAME = 'Document name updated for ID:';
|
|
284
284
|
static WIDTH = '500px';
|
|
285
285
|
static BASEZINDEX = 1000;
|
|
286
|
+
static DOCX = 'docx';
|
|
287
|
+
static DOC = 'doc';
|
|
288
|
+
static CSV = 'csv';
|
|
286
289
|
static CLOSE_ICON = 'pi pi-times';
|
|
287
290
|
static SAVE = 'Save';
|
|
288
291
|
static UPLOAD_PROGRESS_100 = 100;
|
|
@@ -461,6 +464,7 @@ class SHARED {
|
|
|
461
464
|
static PENDING = 'Pending';
|
|
462
465
|
static DOT = '.';
|
|
463
466
|
static PDF = 'PDF';
|
|
467
|
+
static PDF2 = 'pdf';
|
|
464
468
|
static PENDING_STATUS = 'pending';
|
|
465
469
|
static EVENT_REQUESTED = 'event-requested';
|
|
466
470
|
static EVENT_ACCEPTED = 'event-accepted';
|
|
@@ -477,7 +481,8 @@ class SHARED {
|
|
|
477
481
|
// File extension constants
|
|
478
482
|
static JPG = 'JPG';
|
|
479
483
|
static PNG = 'PNG';
|
|
480
|
-
static XLSX = '
|
|
484
|
+
static XLSX = 'xlsx';
|
|
485
|
+
static XLS = 'xls';
|
|
481
486
|
// Status constants
|
|
482
487
|
static APPROVED_STATUS = 'approved';
|
|
483
488
|
static ALERT_STATUS = 'alert';
|
|
@@ -758,14 +763,14 @@ const COUNTRIES = [
|
|
|
758
763
|
* @type {{}}
|
|
759
764
|
*/
|
|
760
765
|
const SUPPORTED_IMAGE_TYPES = [
|
|
761
|
-
'
|
|
762
|
-
'
|
|
763
|
-
'
|
|
764
|
-
'
|
|
765
|
-
'
|
|
766
|
-
'
|
|
767
|
-
'
|
|
768
|
-
'
|
|
766
|
+
'PNG',
|
|
767
|
+
'png',
|
|
768
|
+
'jpeg',
|
|
769
|
+
'jpg',
|
|
770
|
+
'gif',
|
|
771
|
+
'bmp',
|
|
772
|
+
'tiff',
|
|
773
|
+
'webp',
|
|
769
774
|
];
|
|
770
775
|
/**
|
|
771
776
|
* @constant {Array<{label: string, value: string, files: string[]}>} DOCUMENTTYPES
|
|
@@ -793,6 +798,7 @@ const DocumentAlertList = [
|
|
|
793
798
|
{ status: 'Pending', isAlert: true, alertMessage: 'The name on the payslip does not match either the driver name or the policyholder name.' },
|
|
794
799
|
{ status: 'Verified', isAlert: false, alertMessage: 'Document is verified successfully.' },
|
|
795
800
|
];
|
|
801
|
+
const OPEN_DOCUMENT_EXTENSIONS = ['odt', 'ods', 'odp'];
|
|
796
802
|
/**
|
|
797
803
|
* Dummy data for document sections with detailed document lists.
|
|
798
804
|
* Based on the document management interface structure.
|
|
@@ -1414,8 +1420,7 @@ class DocumentHttpService {
|
|
|
1414
1420
|
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
1415
1421
|
*/
|
|
1416
1422
|
getDocumentCatagories(contextId) {
|
|
1417
|
-
|
|
1418
|
-
return this.http.get(`${this.apiUrl}${URLS.DOCUMENTS_CATAGORIES}/${contextId}`, { headers })
|
|
1423
|
+
return this.http.get(`${this.apiUrl}${URLS.DOCUMENTS_CATAGORIES}/${contextId}`)
|
|
1419
1424
|
.pipe(tap((response) => {
|
|
1420
1425
|
if (response && response.categories) {
|
|
1421
1426
|
this.documentStore.setDocumentCategories(response.categories);
|
|
@@ -1473,8 +1478,7 @@ class DocumentHttpService {
|
|
|
1473
1478
|
* @returns {Observable<DocumentModel>} An observable that emits the updated DocumentModel.
|
|
1474
1479
|
*/
|
|
1475
1480
|
updateDocumentName(documentId, payload) {
|
|
1476
|
-
|
|
1477
|
-
return this.http.put(`${this.apiUrl}${URLS.ALIAS_NAME}${documentId}`, payload, { headers: headers }).pipe(catchError((error) => {
|
|
1481
|
+
return this.http.put(`${this.apiUrl}${URLS.ALIAS_NAME}${documentId}`, payload).pipe(catchError((error) => {
|
|
1478
1482
|
return throwError(() => new Error(error));
|
|
1479
1483
|
}));
|
|
1480
1484
|
}
|
|
@@ -1486,8 +1490,7 @@ class DocumentHttpService {
|
|
|
1486
1490
|
getUserListByContextId(contextId) {
|
|
1487
1491
|
if (!contextId)
|
|
1488
1492
|
return EMPTY;
|
|
1489
|
-
|
|
1490
|
-
return this.http.get(`${this.apiUrl}${URLS.USERLIST}${contextId}`, { headers: headers }).pipe(tap((userList) => {
|
|
1493
|
+
return this.http.get(`${this.apiUrl}${URLS.USERLIST}${contextId}`).pipe(tap((userList) => {
|
|
1491
1494
|
this.documentStore.setUserList(userList);
|
|
1492
1495
|
}), catchError((error) => {
|
|
1493
1496
|
return throwError(() => new Error(error));
|
|
@@ -1512,8 +1515,7 @@ class DocumentHttpService {
|
|
|
1512
1515
|
if (categoryId) {
|
|
1513
1516
|
params = params.set(SHARED.CATEGORY, categoryId);
|
|
1514
1517
|
}
|
|
1515
|
-
|
|
1516
|
-
return this.http.get(url, { params, headers }).pipe(tap((statusData) => {
|
|
1518
|
+
return this.http.get(url, { params }).pipe(tap((statusData) => {
|
|
1517
1519
|
this.documentStore.setStatusData(statusData);
|
|
1518
1520
|
}), catchError((error) => {
|
|
1519
1521
|
return throwError(() => new Error(error));
|
|
@@ -1541,8 +1543,7 @@ class DocumentHttpService {
|
|
|
1541
1543
|
if (searchKey) {
|
|
1542
1544
|
params = params.set(SHARED.SEARCH_KEY, searchKey);
|
|
1543
1545
|
}
|
|
1544
|
-
|
|
1545
|
-
return this.http.get(`${this.apiUrl}${URLS.GETALL}/${contextId}`, { params, headers }).pipe(tap((response) => {
|
|
1546
|
+
return this.http.get(`${this.apiUrl}${URLS.GETALL}/${contextId}`, { params }).pipe(tap((response) => {
|
|
1546
1547
|
if (response.documents) {
|
|
1547
1548
|
this.documentStore.setDocumentList(response.documents);
|
|
1548
1549
|
}
|
|
@@ -1554,8 +1555,7 @@ class DocumentHttpService {
|
|
|
1554
1555
|
if (!documentId) {
|
|
1555
1556
|
return of([]);
|
|
1556
1557
|
}
|
|
1557
|
-
|
|
1558
|
-
return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_HISTORY}${documentId}`, { headers }).pipe(catchError((error) => {
|
|
1558
|
+
return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_HISTORY}${documentId}`).pipe(catchError((error) => {
|
|
1559
1559
|
return throwError(() => new Error(error));
|
|
1560
1560
|
}));
|
|
1561
1561
|
}
|
|
@@ -1567,8 +1567,7 @@ class DocumentHttpService {
|
|
|
1567
1567
|
getCategoriesBySource(source) {
|
|
1568
1568
|
if (!source)
|
|
1569
1569
|
return EMPTY;
|
|
1570
|
-
|
|
1571
|
-
return this.http.get(`${this.apiUrl}${URLS.GET_CATEGORIES_BY_SOURCE}${source}`, { headers }).pipe(catchError((error) => {
|
|
1570
|
+
return this.http.get(`${this.apiUrl}${URLS.GET_CATEGORIES_BY_SOURCE}${source}`).pipe(catchError((error) => {
|
|
1572
1571
|
return throwError(() => new Error(error));
|
|
1573
1572
|
}));
|
|
1574
1573
|
}
|
|
@@ -1580,8 +1579,7 @@ class DocumentHttpService {
|
|
|
1580
1579
|
getDocumentTypesByCategory(categoryId) {
|
|
1581
1580
|
if (!categoryId)
|
|
1582
1581
|
return EMPTY;
|
|
1583
|
-
|
|
1584
|
-
return this.http.get(`${this.apiUrl}${URLS.GET_DOCUMENT_TYPES_BY_CATEGORY}${categoryId}`, { headers }).pipe(catchError((error) => {
|
|
1582
|
+
return this.http.get(`${this.apiUrl}${URLS.GET_DOCUMENT_TYPES_BY_CATEGORY}${categoryId}`).pipe(catchError((error) => {
|
|
1585
1583
|
return throwError(() => new Error(error));
|
|
1586
1584
|
}));
|
|
1587
1585
|
}
|
|
@@ -1591,8 +1589,7 @@ class DocumentHttpService {
|
|
|
1591
1589
|
* @returns {Observable<any>} Observable that emits the upload response.
|
|
1592
1590
|
*/
|
|
1593
1591
|
uploadFile(formData) {
|
|
1594
|
-
|
|
1595
|
-
return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, formData, { headers }).pipe(catchError((error) => {
|
|
1592
|
+
return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, formData).pipe(catchError((error) => {
|
|
1596
1593
|
return throwError(() => new Error(error));
|
|
1597
1594
|
}));
|
|
1598
1595
|
}
|
|
@@ -1602,8 +1599,7 @@ class DocumentHttpService {
|
|
|
1602
1599
|
* @returns {Observable<any>} Observable that emits the save response.
|
|
1603
1600
|
*/
|
|
1604
1601
|
saveDocumentUpload(payload) {
|
|
1605
|
-
|
|
1606
|
-
return this.http.post(`${this.apiUrl}${URLS.SAVE_DOCUMENT_UPLOAD}`, payload, { headers }).pipe(catchError((error) => {
|
|
1602
|
+
return this.http.post(`${this.apiUrl}${URLS.SAVE_DOCUMENT_UPLOAD}`, payload).pipe(catchError((error) => {
|
|
1607
1603
|
return throwError(() => new Error(error));
|
|
1608
1604
|
}));
|
|
1609
1605
|
}
|
|
@@ -1618,8 +1614,7 @@ class DocumentHttpService {
|
|
|
1618
1614
|
const payload = {
|
|
1619
1615
|
statusUpdateDescription: statusUpdateDescription
|
|
1620
1616
|
};
|
|
1621
|
-
|
|
1622
|
-
return this.http.put(`${this.apiUrl}${URLS.UPDATE_DOCUMENT_STATUS}${documentId}/${status}`, payload, { headers }).pipe(tap((response) => {
|
|
1617
|
+
return this.http.put(`${this.apiUrl}${URLS.UPDATE_DOCUMENT_STATUS}${documentId}/${status}`, payload).pipe(tap((response) => {
|
|
1623
1618
|
if (response && response.status) {
|
|
1624
1619
|
const normalizedStatus = this.normalizeStatus(response.status);
|
|
1625
1620
|
response.normalizedStatus = normalizedStatus;
|
|
@@ -1652,8 +1647,7 @@ class DocumentHttpService {
|
|
|
1652
1647
|
* @returns {Observable<any>} Observable that emits the delete response
|
|
1653
1648
|
*/
|
|
1654
1649
|
deleteDocument(documentId, contextId) {
|
|
1655
|
-
|
|
1656
|
-
return this.http.delete(`${this.apiUrl}${URLS.DELETE_DOCUMENT}${documentId}`, { headers }).pipe(tap(() => {
|
|
1650
|
+
return this.http.delete(`${this.apiUrl}${URLS.DELETE_DOCUMENT}${documentId}`).pipe(tap(() => {
|
|
1657
1651
|
this.getDocumentCatagories(contextId).subscribe();
|
|
1658
1652
|
this.getUserListByContextId(contextId).subscribe();
|
|
1659
1653
|
this.getStatusDocumentCount(contextId).subscribe();
|
|
@@ -2608,13 +2602,11 @@ class DocumentService {
|
|
|
2608
2602
|
* @returns {Observable<any>} Observable that emits the newly created document.
|
|
2609
2603
|
*/
|
|
2610
2604
|
create(entity) {
|
|
2611
|
-
|
|
2612
|
-
return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, entity, { headers }).pipe(tap((newEntity) => this.documentStore.add(newEntity)));
|
|
2605
|
+
return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, entity).pipe(tap((newEntity) => this.documentStore.add(newEntity)));
|
|
2613
2606
|
}
|
|
2614
2607
|
/**
|
|
2615
2608
|
* Fetches all documents from the backend.
|
|
2616
|
-
* @returns {Observable<DocumentModel
|
|
2617
|
-
* []>} Observable that emits an array of documents.
|
|
2609
|
+
* @returns {Observable<DocumentModel[]>} Observable that emits an array of documents.
|
|
2618
2610
|
*/
|
|
2619
2611
|
getAll() {
|
|
2620
2612
|
return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}`).pipe(tap((entities) => this.documentStore.set(entities)));
|
|
@@ -5289,6 +5281,7 @@ class TablePrimaryComponent {
|
|
|
5289
5281
|
formatDocumentDisplayName(rowData) {
|
|
5290
5282
|
let displayName = '';
|
|
5291
5283
|
if (rowData.aliasName && rowData.aliasName.trim() !== '') {
|
|
5284
|
+
// With aliasName: aliasName on top, docName - fileName below
|
|
5292
5285
|
displayName += `<span class="alias-name">${rowData.aliasName}</span><br>`;
|
|
5293
5286
|
if (rowData.docName && rowData.fileName) {
|
|
5294
5287
|
displayName += `<span class="document-info">${rowData.docName} - ${rowData.fileName}</span>`;
|
|
@@ -5298,6 +5291,7 @@ class TablePrimaryComponent {
|
|
|
5298
5291
|
}
|
|
5299
5292
|
}
|
|
5300
5293
|
else {
|
|
5294
|
+
// Without aliasName: docName on top, fileName below
|
|
5301
5295
|
if (rowData.docName) {
|
|
5302
5296
|
displayName += `<span class="document-info">${rowData.docName}</span>`;
|
|
5303
5297
|
}
|
|
@@ -7414,43 +7408,37 @@ class DocumentContentViewerComponent {
|
|
|
7414
7408
|
this.documentHttpService = documentHttpService;
|
|
7415
7409
|
this.zoomService = zoomService;
|
|
7416
7410
|
}
|
|
7417
|
-
/**
|
|
7418
|
-
* Computed property to determine if the document is an image
|
|
7419
|
-
* @type {boolean}
|
|
7420
|
-
*/
|
|
7421
|
-
get isImage() {
|
|
7422
|
-
return this.contentType ? SUPPORTED_IMAGE_TYPES.includes(this.contentType) : false;
|
|
7423
|
-
}
|
|
7424
7411
|
/**
|
|
7425
7412
|
* Computed property to determine if the document is a PDF
|
|
7426
7413
|
* @type {boolean}
|
|
7427
7414
|
*/
|
|
7428
7415
|
get isPdf() {
|
|
7429
|
-
|
|
7416
|
+
const ext = this.getFileExtension(this.documentName);
|
|
7417
|
+
return ext === SHARED.PDF || ext === SHARED.PDF2;
|
|
7430
7418
|
}
|
|
7431
7419
|
/**
|
|
7432
7420
|
* Computed property to determine if the document is an Excel file
|
|
7433
7421
|
* @type {boolean}
|
|
7434
7422
|
*/
|
|
7435
7423
|
get isExcel() {
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
this.contentType === SHARED.OCTET_STREAM;
|
|
7424
|
+
const ext = this.getFileExtension(this.documentName);
|
|
7425
|
+
return ext === SHARED.XLSX || ext === SHARED.XLS;
|
|
7439
7426
|
}
|
|
7440
7427
|
/**
|
|
7441
7428
|
* Computed property to determine if the document is a Word file
|
|
7442
7429
|
* @type {boolean}
|
|
7443
7430
|
*/
|
|
7444
7431
|
get isWord() {
|
|
7445
|
-
|
|
7446
|
-
|
|
7432
|
+
const ext = this.getFileExtension(this.documentName);
|
|
7433
|
+
return ext === SHARED.DOCX || ext === SHARED.DOC;
|
|
7447
7434
|
}
|
|
7448
7435
|
/**
|
|
7449
7436
|
* Computed property to determine if the document is a CSV file
|
|
7450
7437
|
* @type {boolean}
|
|
7451
7438
|
*/
|
|
7452
7439
|
get isCsv() {
|
|
7453
|
-
|
|
7440
|
+
const ext = this.getFileExtension(this.documentName);
|
|
7441
|
+
return ext === SHARED.CSV;
|
|
7454
7442
|
}
|
|
7455
7443
|
/**
|
|
7456
7444
|
* Computed property to determine if the document is an email file
|
|
@@ -7465,7 +7453,8 @@ class DocumentContentViewerComponent {
|
|
|
7465
7453
|
* @type {boolean}
|
|
7466
7454
|
*/
|
|
7467
7455
|
get isOpenDocument() {
|
|
7468
|
-
|
|
7456
|
+
const ext = this.getFileExtension(this.documentName);
|
|
7457
|
+
return OPEN_DOCUMENT_EXTENSIONS.includes(ext);
|
|
7469
7458
|
}
|
|
7470
7459
|
/**
|
|
7471
7460
|
* Computed property to determine if the document has an unsupported content type
|
|
@@ -7822,6 +7811,18 @@ class DocumentContentViewerComponent {
|
|
|
7822
7811
|
this.csvStyledData.length > 0 &&
|
|
7823
7812
|
this.csvStyledData.every(row => row && row.cells && Array.isArray(row.cells));
|
|
7824
7813
|
}
|
|
7814
|
+
getFileExtension(urlOrName) {
|
|
7815
|
+
if (!urlOrName)
|
|
7816
|
+
return SHARED.EMPTY;
|
|
7817
|
+
const lastDot = urlOrName.lastIndexOf(SHARED.DOT);
|
|
7818
|
+
if (lastDot === -1)
|
|
7819
|
+
return SHARED.EMPTY;
|
|
7820
|
+
return urlOrName.substring(lastDot + 1).toLowerCase();
|
|
7821
|
+
}
|
|
7822
|
+
get isImage() {
|
|
7823
|
+
const ext = this.getFileExtension(this.documentName);
|
|
7824
|
+
return SUPPORTED_IMAGE_TYPES.includes(ext);
|
|
7825
|
+
}
|
|
7825
7826
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContentViewerComponent, deps: [{ token: ExcelParserService }, { token: CsvParserService }, { token: DocumentHttpService }, { token: DocumentZoomService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7826
7827
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentContentViewerComponent, isStandalone: false, selector: "document-content-viewer", inputs: { documentUrl: "documentUrl", contentType: "contentType", documentName: "documentName", selectedDocument: "selectedDocument", contextId: "contextId", isFormHide: "isFormHide" }, host: { listeners: { "wheel": "onWheel($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-content-viewer-container\">\r\n @if(documentUrl && contentType){\r\n <!-- Zoom Controls -->\r\n <div class=\"zoom-controls-wrapper\">\r\n <document-zoom-controls \r\n [selectedDocument]=\"selectedDocument\" \r\n [contextId]=\"contextId\"\r\n [isFormHide]=\"isFormHide\"\r\n >\r\n </document-zoom-controls>\r\n </div>\r\n \r\n <!-- PDF Viewer -->\r\n @if(isPdf){\r\n <div class=\"pdf-container\">\r\n <pdf-viewer\r\n [src]=\"documentUrl\"\r\n [rotation]=\"0\"\r\n [original-size]=\"false\"\r\n [show-all]=\"true\"\r\n [fit-to-page]=\"false\"\r\n [zoom]=\"currentZoom / 100\"\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: 100%; height: 100%\"\r\n ></pdf-viewer>\r\n </div>\r\n }\r\n\r\n <!-- Image Viewer -->\r\n @else if(isImage){\r\n <div class=\"image-container\">\r\n <img\r\n [src]=\"documentUrl\"\r\n [alt]=\"documentName || 'Document Image'\"\r\n class=\"document-image\"\r\n [style.transform]=\"'scale(' + (currentZoom / 100) + ')'\"\r\n [style.transform-origin]=\"'center center'\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Excel Files -->\r\n @else if(isExcel){\r\n <div class=\"excel-container\">\r\n @if(isLoadingExcel){\r\n <div class=\"loading-container\">\r\n <div class=\"loading-content\">\r\n <i class=\"pi pi-spin pi-spinner\" style=\"font-size: 2rem; color: #3b82f6;\"></i>\r\n <p>Loading Excel file...</p>\r\n </div>\r\n </div>\r\n }@else if(excelError){\r\n <div class=\"error-container\">\r\n <div class=\"error-content\">\r\n <i class=\"pi pi-exclamation-triangle\" style=\"font-size: 3rem; color: #ef4444;\"></i>\r\n <h4>Error Loading Excel File</h4>\r\n <p>{{ excelError }}</p>\r\n <div class=\"error-actions\">\r\n <button \r\n type=\"button\" \r\n class=\"p-button p-button-primary p-button-sm\"\r\n (click)=\"downloadDocument()\"\r\n >\r\n <i class=\"pi pi-download\"></i>\r\n Download Instead\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n @else if(excelData){\r\n <div class=\"excel-container\">\r\n <div class=\"excel-zoom-wrapper\" \r\n [class.zoomed]=\"currentZoom !== 100\"\r\n (wheel)=\"onWheel($event)\">\r\n <ngx-doc-viewer\r\n [url]=\"documentUrl\"\r\n viewer=\"office\"\r\n style=\"width:100%;height:97%;\"\r\n ></ngx-doc-viewer>\r\n <!-- Invisible overlay to capture wheel events over document content -->\r\n <div class=\"wheel-capture-overlay\" \r\n (wheel)=\"onWheel($event)\"></div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Word Files -->\r\n @else if(isWord){\r\n <div class=\"docx-container\">\r\n <div class=\"doc-viewer-wrapper\" \r\n [class.zoomed]=\"currentZoom !== 100\"\r\n (wheel)=\"onWheel($event)\">\r\n <ngx-doc-viewer\r\n [url]=\"documentUrl\"\r\n viewer=\"office\"\r\n style=\"width:100%;height:97%;\"\r\n ></ngx-doc-viewer>\r\n <div class=\"wheel-capture-overlay\" \r\n (wheel)=\"onWheel($event)\"></div>\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- CSV Files -->\r\n @else if(isCsv){\r\n <div class=\"csv-container\">\r\n @if(isLoadingCsv){\r\n <div class=\"loading-container\">\r\n <div class=\"loading-content\">\r\n <i class=\"pi pi-spin pi-spinner\" style=\"font-size: 2rem; color: #3b82f6;\"></i>\r\n <p>Loading CSV file...</p>\r\n </div>\r\n </div>\r\n }@else if(csvError){\r\n <div class=\"error-container\">\r\n <div class=\"error-content\">\r\n <i class=\"pi pi-exclamation-triangle\" style=\"font-size: 3rem; color: #ef4444;\"></i>\r\n <h4>Error Loading CSV File</h4>\r\n <p>{{ csvError }}</p>\r\n <div class=\"error-actions\">\r\n <button \r\n type=\"button\" \r\n class=\"p-button p-button-primary p-button-sm\"\r\n (click)=\"downloadDocument()\"\r\n >\r\n <i class=\"pi pi-download\"></i>\r\n Download Instead\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n @else if(csvData){\r\n <div class=\"csv-content\">\r\n <div class=\"csv-header\">\r\n <div class=\"csv-info\">\r\n <p>{{ documentName || 'CSV File' }}</p>\r\n <span class=\"csv-stats\">\r\n {{ csvData.totalRows }} rows \u00D7 {{ csvData.totalColumns }} columns\r\n </span>\r\n </div>\r\n </div>\r\n \r\n <div class=\"csv-table-container\" \r\n [style.transform-origin]=\"'center center'\"\r\n (wheel)=\"onWheel($event)\">\r\n <p-table \r\n [value]=\"safeCsvStyledData\" \r\n [tableStyle]=\"{'min-width': '100%'}\"\r\n [scrollable]=\"true\"\r\n scrollHeight=\"67vh\"\r\n class=\"csv-table\"\r\n >\r\n <ng-template pTemplate=\"body\" let-row>\r\n <tr>\r\n <ng-container *ngFor=\"let cell of row.cells; trackBy: trackByCell\">\r\n <td [ngClass]=\"{'csv-header-cell': cell.isHeader}\">\r\n {{ cell.value }}\r\n </td>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Email Files -->\r\n @else if(isEmail){\r\n <div class=\"office-document-container\">\r\n <div class=\"document-preview\">\r\n <div class=\"document-icon\">\r\n <i [class]=\"documentIcon\"></i>\r\n </div>\r\n <div class=\"document-info\">\r\n <h4>{{ documentTypeText }}</h4>\r\n <p>{{ documentName || 'Email Message' }}</p>\r\n <p class=\"document-note\">Email files cannot be previewed directly. Please download to view.</p>\r\n </div>\r\n <div class=\"document-actions\">\r\n <button \r\n type=\"button\" \r\n class=\"p-button p-button-primary p-button-sm\"\r\n (click)=\"downloadDocument()\"\r\n >\r\n <i class=\"pi pi-download\"></i>\r\n Download\r\n </button>\r\n <button \r\n type=\"button\" \r\n class=\"p-button p-button-outlined p-button-sm\"\r\n (click)=\"openInNewTab()\"\r\n >\r\n <i class=\"pi pi-external-link\"></i>\r\n Open\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- OpenDocument Files -->\r\n @else if(isOpenDocument){\r\n <div class=\"docx-container\">\r\n <div class=\"doc-viewer-wrapper\" \r\n [class.zoomed]=\"currentZoom !== 100\"\r\n (wheel)=\"onWheel($event)\">\r\n <ngx-doc-viewer\r\n [url]=\"documentUrl\"\r\n viewer=\"office\"\r\n style=\"width:100%;height:800px;\"\r\n ></ngx-doc-viewer>\r\n <!-- Invisible overlay to capture wheel events over document content -->\r\n <div class=\"wheel-capture-overlay\" \r\n (wheel)=\"onWheel($event)\"></div>\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- Unsupported Files -->\r\n @else if(isUnsupported){\r\n <div class=\"unsupported-document-container\">\r\n <div class=\"document-preview\">\r\n <div class=\"document-icon\">\r\n <i [class]=\"documentIcon\"></i>\r\n </div>\r\n <div class=\"document-info\">\r\n <h4>Unsupported Document Type</h4>\r\n <p>{{ documentName || 'Document' }}</p>\r\n <p class=\"document-note\">This document type ({{ contentType }}) is not supported for preview. Please download to view.</p>\r\n </div>\r\n <div class=\"document-actions\">\r\n <button \r\n type=\"button\" \r\n class=\"p-button p-button-primary p-button-sm\"\r\n (click)=\"downloadDocument()\"\r\n >\r\n <i class=\"pi pi-download\"></i>\r\n Download\r\n </button>\r\n <button \r\n type=\"button\" \r\n class=\"p-button p-button-outlined p-button-sm\"\r\n (click)=\"openInNewTab()\"\r\n >\r\n <i class=\"pi pi-external-link\"></i>\r\n Open\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n }\r\n @else {\r\n <div class=\"no-document-container\">\r\n <div class=\"no-document-content\">\r\n <i class=\"pi pi-file-o\" style=\"font-size: 3rem; color: #6b7280;\"></i>\r\n <h4>No Document Uploaded</h4>\r\n <p>Please Upload a document to view its content.</p>\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n\r\n", styles: [".document-content-viewer-container{height:100%;width:100%;display:flex;flex-direction:column;background:#f8f9fa;border-radius:8px;overflow:auto}.document-content-viewer-container .zoom-controls-wrapper{position:sticky;top:0;z-index:10;background:#f8f9faf2;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-bottom:1px solid #e5e7eb;justify-content:space-between;align-items:center;border-radius:10px}.document-content-viewer-container .docx-container{overflow:auto}.document-content-viewer-container .pdf-container{width:100%;height:100%;border-radius:8px;overflow:hidden}.document-content-viewer-container .pdf-container ::ng-deep .ng2-pdf-viewer-container{height:100%;overflow:auto}.document-content-viewer-container .image-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:1rem;overflow:auto}.document-content-viewer-container .image-container .document-image{max-width:100%;max-height:100%;object-fit:contain;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a;transition:transform .2s ease-in-out}.document-content-viewer-container .excel-container{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;border-radius:8px;overflow:auto}.document-content-viewer-container .excel-container .loading-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.document-content-viewer-container .excel-container .loading-container .loading-content{text-align:center;color:#6b7280}.document-content-viewer-container .excel-container .loading-container .loading-content i{margin-bottom:1rem;display:block}.document-content-viewer-container .excel-container .loading-container .loading-content p{margin:0;color:#9ca3af;font-size:.875rem}.document-content-viewer-container .excel-container .error-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.document-content-viewer-container .excel-container .error-container .error-content{text-align:center;color:#6b7280;max-width:400px}.document-content-viewer-container .excel-container .error-container .error-content i{margin-bottom:1rem;display:block}.document-content-viewer-container .excel-container .error-container .error-content h4{margin:0 0 .5rem;color:#dc2626;font-size:1.25rem;font-weight:600}.document-content-viewer-container .excel-container .error-container .error-content p{margin:0 0 1.5rem;color:#6b7280;font-size:.875rem}.document-content-viewer-container .excel-container .error-container .error-content .error-actions{display:flex;justify-content:center}.document-content-viewer-container .excel-container .excel-viewer{width:100%;height:100%;display:flex;flex-direction:column}.document-content-viewer-container .excel-container .excel-viewer .excel-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.5rem;background:#f8fafc;border-bottom:1px solid #e2e8f0}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-info{display:flex;align-items:center;gap:1rem}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-info i{font-size:2rem;color:#10b981}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-info .excel-details h4{margin:0 0 .25rem;color:#1f2937;font-size:1.125rem;font-weight:600}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-info .excel-details p{margin:0;color:#6b7280;font-size:.875rem}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-actions{display:flex;gap:.5rem}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-actions .p-button.p-button-sm{padding:.375rem .75rem;font-size:.75rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content{flex:1;display:flex;flex-direction:column;padding:1rem;background:#fafafa;overflow:hidden}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation{display:flex;align-items:center;gap:.5rem;margin-bottom:1rem;padding:.5rem;background:#fff;border-radius:6px;border:1px solid #e5e7eb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-label{font-size:.875rem;font-weight:500;color:#6b7280;margin-right:.5rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-tab{padding:.375rem .75rem;border:1px solid #d1d5db;background:#fff;border-radius:4px;font-size:.75rem;color:#6b7280;cursor:pointer;transition:all .2s}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-tab:hover{background:#f3f4f6;border-color:#9ca3af}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-tab.active{background:#10b981;color:#fff;border-color:#10b981}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container{flex:1;overflow:auto;background:#fff;border-radius:6px;border:1px solid #e5e7eb;margin-bottom:1rem;min-width:100%;position:relative;min-height:300px;overflow-x:auto;overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container::-webkit-scrollbar{display:none}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table{width:100%;min-width:max-content;border-collapse:collapse;font-size:.875rem;table-layout:auto;border:2px solid #e5e7eb;word-wrap:break-word;white-space:nowrap}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table th,.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td{padding:.5rem .75rem;text-align:left;border-bottom:1px solid #f3f4f6;border-right:1px solid #f3f4f6;min-width:80px;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:normal;position:relative;box-sizing:border-box;vertical-align:top}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td:empty:after{content:\"\";display:block;min-height:1.5rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table th:last-child,.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td:last-child{border-right:1px solid #e5e7eb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table th:first-child,.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td:first-child{border-left:1px solid #e5e7eb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table .empty-cell{background-color:#fafafa;color:#9ca3af;font-style:italic;border:1px solid #e5e7eb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table tr{border:1px solid #e5e7eb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table th{background:#f8fafc;font-weight:600;color:#374151;position:sticky;top:0;z-index:10;border-bottom:2px solid #e5e7eb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td{color:#6b7280;background:#fff}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td:first-child{font-weight:500;color:#374151}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table tr:hover td{background:#f9fafb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table tbody tr:last-child td{border-bottom:none}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-info-bar{display:flex;align-items:center;gap:1.5rem;padding:.75rem;background:#fff;border-radius:6px;border:1px solid #e5e7eb;font-size:.75rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-info-bar .info-item{display:flex;align-items:center;gap:.5rem;color:#6b7280}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-info-bar .info-item i{color:#10b981;font-size:.875rem}.document-content-viewer-container .office-document-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.document-content-viewer-container .office-document-container .document-preview{background:#fff;border-radius:12px;padding:2rem;text-align:center;box-shadow:0 10px 15px -3px #0000001a;max-width:400px;width:100%}.document-content-viewer-container .office-document-container .document-preview .document-icon{margin-bottom:1.5rem}.document-content-viewer-container .office-document-container .document-preview .document-icon i{font-size:4rem;color:#3b82f6}.document-content-viewer-container .office-document-container .document-preview .document-info{margin-bottom:2rem}.document-content-viewer-container .office-document-container .document-preview .document-info h4{margin:0 0 .5rem;color:#1f2937;font-size:1.25rem;font-weight:600}.document-content-viewer-container .office-document-container .document-preview .document-info p{margin:.25rem 0;color:#6b7280;font-size:.875rem}.document-content-viewer-container .office-document-container .document-preview .document-info p.document-note{color:#9ca3af;font-style:italic;margin-top:.75rem}.document-content-viewer-container .office-document-container .document-preview .document-actions{display:flex;gap:.75rem;justify-content:center;flex-wrap:wrap}.document-content-viewer-container .office-document-container .document-preview .document-actions .p-button{min-width:120px}.document-content-viewer-container .office-document-container .document-preview .document-actions .p-button.p-button-sm{padding:.5rem 1rem;font-size:.875rem}.document-content-viewer-container .unsupported-document-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.document-content-viewer-container .unsupported-document-container .document-preview{background:#fff;border-radius:12px;padding:2rem;text-align:center;box-shadow:0 10px 15px -3px #0000001a;max-width:400px;width:100%;border:2px solid #fbbf24}.document-content-viewer-container .unsupported-document-container .document-preview .document-icon{margin-bottom:1.5rem}.document-content-viewer-container .unsupported-document-container .document-preview .document-icon i{font-size:4rem;color:#f59e0b}.document-content-viewer-container .unsupported-document-container .document-preview .document-info{margin-bottom:2rem}.document-content-viewer-container .unsupported-document-container .document-preview .document-info h4{margin:0 0 .5rem;color:#92400e;font-size:1.25rem;font-weight:600}.document-content-viewer-container .unsupported-document-container .document-preview .document-info p{margin:.25rem 0;color:#6b7280;font-size:.875rem}.document-content-viewer-container .unsupported-document-container .document-preview .document-info p.document-note{color:#d97706;font-style:italic;margin-top:.75rem;background:#fef3c7;padding:.5rem;border-radius:6px;border:1px solid #fde68a}.document-content-viewer-container .unsupported-document-container .document-preview .document-actions{display:flex;gap:.75rem;justify-content:center;flex-wrap:wrap}.document-content-viewer-container .unsupported-document-container .document-preview .document-actions .p-button{min-width:120px}.document-content-viewer-container .unsupported-document-container .document-preview .document-actions .p-button.p-button-sm{padding:.5rem 1rem;font-size:.875rem}.document-content-viewer-container .no-document-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.document-content-viewer-container .no-document-container .no-document-content{text-align:center;color:#6b7280}.document-content-viewer-container .no-document-container .no-document-content i{margin-bottom:1rem;display:block}.document-content-viewer-container .no-document-container .no-document-content h4{margin:0 0 .5rem;color:#374151;font-size:1.25rem;font-weight:600}.document-content-viewer-container .no-document-container .no-document-content p{margin:0;color:#9ca3af;font-size:.875rem}@media (max-width: 768px){.document-content-viewer-container .office-document-container,.document-content-viewer-container .unsupported-document-container{padding:1rem}.document-content-viewer-container .office-document-container .document-preview,.document-content-viewer-container .unsupported-document-container .document-preview{padding:1.5rem;max-width:100%}.document-content-viewer-container .office-document-container .document-preview .document-icon i,.document-content-viewer-container .unsupported-document-container .document-preview .document-icon i{font-size:3rem}.document-content-viewer-container .office-document-container .document-preview .document-actions,.document-content-viewer-container .unsupported-document-container .document-preview .document-actions{flex-direction:column;align-items:center}.document-content-viewer-container .office-document-container .document-preview .document-actions .p-button,.document-content-viewer-container .unsupported-document-container .document-preview .document-actions .p-button{width:100%;max-width:200px}.document-content-viewer-container .image-container{padding:.5rem}.document-content-viewer-container .excel-container .excel-viewer .excel-header{flex-direction:column;gap:1rem;padding:1rem}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-info{justify-content:center}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-actions{justify-content:center;width:100%}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-actions .p-button{flex:1;max-width:150px}.document-content-viewer-container .excel-container .excel-viewer .excel-content{padding:.5rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation{flex-wrap:wrap;gap:.25rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-tab{font-size:.7rem;padding:.25rem .5rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table{font-size:.75rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table th,.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td{padding:.25rem .5rem;min-width:80px;max-width:150px}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-info-bar{flex-wrap:wrap;gap:1rem;font-size:.7rem}}@media (prefers-color-scheme: dark){.document-content-viewer-container{background:#1f2937}.document-content-viewer-container .office-document-container .document-preview,.document-content-viewer-container .unsupported-document-container .document-preview{background:#374151;color:#f9fafb}.document-content-viewer-container .office-document-container .document-preview .document-info h4,.document-content-viewer-container .unsupported-document-container .document-preview .document-info h4{color:#f9fafb}.document-content-viewer-container .office-document-container .document-preview .document-info p,.document-content-viewer-container .unsupported-document-container .document-preview .document-info p{color:#d1d5db}.document-content-viewer-container .office-document-container .document-preview .document-info p.document-note,.document-content-viewer-container .unsupported-document-container .document-preview .document-info p.document-note{color:#9ca3af;background:#4b5563;border-color:#6b7280}.document-content-viewer-container .excel-container{background:#374151}.document-content-viewer-container .excel-container .excel-viewer .excel-header{background:#4b5563;border-color:#6b7280}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-info .excel-details h4{color:#f9fafb}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-info .excel-details p{color:#d1d5db}.document-content-viewer-container .excel-container .excel-viewer .excel-content{background:#374151}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation{background:#4b5563;border-color:#6b7280}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-tab{background:#4b5563;border-color:#6b7280;color:#d1d5db}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-tab:hover{background:#6b7280;border-color:#9ca3af}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-tab.active{background:#10b981;color:#fff;border-color:#10b981}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container{background:#4b5563;border-color:#6b7280}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table th{background:#6b7280;color:#f9fafb;border-color:#9ca3af}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td{background:#4b5563;color:#d1d5db;border-color:#6b7280}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td:first-child{color:#f9fafb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table tr:hover td{background:#6b7280}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-info-bar{background:#4b5563;border-color:#6b7280;color:#d1d5db}.document-content-viewer-container .no-document-container .no-document-content{color:#9ca3af}.document-content-viewer-container .no-document-container .no-document-content h4{color:#f9fafb}.document-content-viewer-container .no-document-container .no-document-content p{color:#d1d5db}}.excel-table{border-collapse:collapse;width:100%;font-size:.875rem}.excel-table th,.excel-table td{padding:.5rem;border:1px solid #e2e8f0;text-align:left;vertical-align:top;min-width:80px}.excel-table th[style*=background-color]:not([style*=color]),.excel-table td[style*=background-color]:not([style*=color]){color:#1f2937}.excel-table th[style*=\"font-weight: bold\"],.excel-table td[style*=\"font-weight: bold\"]{font-weight:600}.excel-table th[style*=\"font-style: italic\"],.excel-table td[style*=\"font-style: italic\"]{font-style:italic}.excel-table th{background-color:#f8fafc;font-weight:600;color:#475569;position:sticky;top:0;z-index:10}.excel-table td{background-color:#fff}.excel-table td.empty-cell{background-color:#f8fafc;color:#9ca3af}.excel-table tbody tr:hover td{background-color:#f1f5f9}.excel-table tbody tr:hover td[style*=background-color]{opacity:.8}.debug-info{margin-top:1rem;padding:1rem;background-color:#fef3c7;border:1px solid #f59e0b;border-radius:8px}.debug-info summary{cursor:pointer;font-weight:600;color:#d97706;margin-bottom:.5rem}.debug-info summary:hover{color:#b45309}.debug-info .debug-content{margin-top:.5rem}.debug-info .debug-content p{margin:.5rem 0;color:#92400e}.debug-info .debug-content ul{margin:.5rem 0;padding-left:1.5rem;color:#92400e}.debug-info .debug-content li{margin:.25rem 0}.debug-info .debug-content button{margin-top:.5rem}.docx-container{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;overflow:hidden}.docx-container .loading-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.docx-container .loading-container .loading-content{text-align:center;color:#6b7280}.docx-container .loading-container .loading-content i{margin-bottom:1rem;display:block}.docx-container .loading-container .loading-content p{margin:0;color:#9ca3af;font-size:.875rem}.docx-container .error-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.docx-container .error-container .error-content{text-align:center;color:#6b7280;max-width:400px}.docx-container .error-container .error-content i{margin-bottom:1rem;display:block}.docx-container .error-container .error-content h4{margin:0 0 .5rem;color:#dc2626;font-size:1.25rem;font-weight:600}.docx-container .error-container .error-content p{margin:0 0 1rem;color:#9ca3af;font-size:.875rem}.docx-container .error-container .error-content .error-actions{margin-top:1rem}.docx-container .docx-viewer{width:100%;height:100%;display:flex;flex-direction:column;background:#fff}.docx-container .docx-viewer .docx-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.5rem;border-bottom:1px solid #e5e7eb;background-color:#f9fafb}.docx-container .docx-viewer .docx-header .docx-info{display:flex;align-items:center;gap:1rem}.docx-container .docx-viewer .docx-header .docx-info i{font-size:2rem;color:#2563eb}.docx-container .docx-viewer .docx-header .docx-info .docx-details h4{margin:0 0 .25rem;font-size:1.125rem;font-weight:600;color:#111827}.docx-container .docx-viewer .docx-header .docx-info .docx-details p{margin:0 0 .125rem;font-size:.875rem;color:#6b7280}.docx-container .docx-viewer .docx-header .docx-info .docx-details .document-title{font-weight:500;color:#374151;font-size:.875rem}.docx-container .docx-viewer .docx-header .docx-info .docx-details .document-author{font-style:italic;color:#6b7280;font-size:.75rem}.docx-container .docx-viewer .docx-header .docx-actions{display:flex;gap:.5rem}.docx-container .docx-viewer .docx-content{flex:1;overflow:auto;padding:1.5rem}.docx-container .docx-viewer .docx-content .docx-stats{display:flex;flex-wrap:wrap;gap:1rem;margin-bottom:1.5rem;padding:1rem;background-color:#f8fafc;border-radius:8px;border:1px solid #e2e8f0}.docx-container .docx-viewer .docx-content .docx-stats .stat-item{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;background-color:#fff;border-radius:6px;border:1px solid #e2e8f0;font-size:.75rem;color:#475569;font-weight:500}.docx-container .docx-viewer .docx-content .docx-stats .stat-item i{color:#64748b}.docx-container .docx-viewer .docx-content .docx-content-body{line-height:1.6;color:#1f2937}.docx-container .docx-viewer .docx-content .docx-content-body .docx-paragraph{margin:0 0 1rem;text-align:justify}.docx-container .docx-viewer .docx-content .docx-content-body .docx-heading{margin:1.5rem 0 1rem;font-weight:600;color:#111827;line-height:1.3}.docx-container .docx-viewer .docx-content .docx-content-body .docx-heading.docx-h1{font-size:1.875rem;border-bottom:2px solid #e5e7eb;padding-bottom:.5rem}.docx-container .docx-viewer .docx-content .docx-content-body .docx-heading.docx-h2{font-size:1.5rem;border-bottom:1px solid #e5e7eb;padding-bottom:.25rem}.docx-container .docx-viewer .docx-content .docx-content-body .docx-heading.docx-h3{font-size:1.25rem}.docx-container .docx-viewer .docx-content .docx-content-body .docx-heading.docx-h4,.docx-container .docx-viewer .docx-content .docx-content-body .docx-heading.docx-h5,.docx-container .docx-viewer .docx-content .docx-content-body .docx-heading.docx-h6{font-size:1.125rem}.docx-container .docx-viewer .docx-content .docx-content-body .docx-table{width:100%;margin:1rem 0;border-collapse:collapse;border:1px solid #e5e7eb;background-color:#fff}.docx-container .docx-viewer .docx-content .docx-content-body .docx-table .docx-header{background-color:#f8fafc;font-weight:600;color:#374151}.docx-container .docx-viewer .docx-content .docx-content-body .docx-table .docx-cell,.docx-container .docx-viewer .docx-content .docx-content-body .docx-table .docx-header{padding:.75rem;border:1px solid #e5e7eb;text-align:left;vertical-align:top}.docx-container .docx-viewer .docx-content .docx-content-body .docx-table .docx-row:hover{background-color:#f9fafb}.docx-container .docx-viewer .docx-content .docx-content-body .docx-list{margin:1rem 0;padding-left:1.5rem}.docx-container .docx-viewer .docx-content .docx-content-body .docx-list.docx-ul{list-style-type:disc}.docx-container .docx-viewer .docx-content .docx-content-body .docx-list.docx-ol{list-style-type:decimal}.docx-container .docx-viewer .docx-content .docx-content-body .docx-list .docx-list-item{margin:.5rem 0;line-height:1.5}.docx-container .docx-viewer .docx-content .docx-content-body .docx-image{max-width:100%;height:auto;border-radius:6px;box-shadow:0 2px 4px #0000001a;margin:1rem 0}.docx-container .docx-viewer .docx-content .docx-content-body blockquote{margin:1rem 0;padding:1rem 1.5rem;border-left:4px solid #3b82f6;background-color:#f8fafc;font-style:italic;color:#374151}.docx-container .docx-viewer .docx-content .docx-content-body pre,.docx-container .docx-viewer .docx-content .docx-content-body code{background-color:#f1f5f9;border:1px solid #e2e8f0;border-radius:4px;padding:.5rem;font-family:Courier New,monospace;font-size:.875rem;color:#1e293b;overflow-x:auto}.docx-container .docx-viewer .docx-content .docx-content-body pre{padding:1rem;margin:1rem 0}.docx-container .docx-viewer .docx-content .docx-content-body a{color:#2563eb;text-decoration:none}.docx-container .docx-viewer .docx-content .docx-content-body a:hover{text-decoration:underline}.docx-container .docx-viewer .docx-content .docx-content-body em,.docx-container .docx-viewer .docx-content .docx-content-body i{font-style:italic}.docx-container .docx-viewer .docx-content .docx-content-body strong,.docx-container .docx-viewer .docx-content .docx-content-body b{font-weight:600}.docx-container .docx-viewer .docx-content .docx-content-body hr{border:none;border-top:1px solid #e5e7eb;margin:2rem 0}.word-loading-container{display:flex;align-items:center;justify-content:center;min-height:400px;width:100%;background-color:#f9fafb;border-radius:8px}.word-loading-container .loading-content{text-align:center}.word-loading-container .loading-content i{margin-bottom:1rem;display:block;font-size:2rem;color:#3b82f6}.word-loading-container .loading-content p{margin:0;color:#6b7280;font-size:1rem;font-weight:500}.docx-container{min-height:400px;overflow:auto}.doc-viewer-wrapper{transition:transform .2s ease-in-out;overflow:auto;position:relative;transform-origin:center center;height:100%;scroll-behavior:smooth}.doc-viewer-wrapper .wheel-capture-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:transparent;z-index:5;pointer-events:auto}.doc-viewer-wrapper .wheel-capture-overlay:active{pointer-events:none}.doc-viewer-wrapper ngx-doc-viewer ::ng-deep iframe{transition:transform .2s ease-in-out;transform-origin:top left;border:none;min-width:100%;min-height:100%}.excel-zoom-wrapper{overflow:auto;position:relative;height:100%;width:100%;scroll-behavior:smooth}.excel-zoom-wrapper .wheel-capture-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:transparent;z-index:5;pointer-events:auto}.excel-zoom-wrapper .wheel-capture-overlay:active{pointer-events:none}.excel-zoom-wrapper:not(.zoomed){display:flex;align-items:center;justify-content:center}.excel-zoom-wrapper.zoomed{overflow:auto;display:block}.excel-zoom-wrapper ngx-doc-viewer{transition:transform .2s ease-in-out;transform-origin:center center;display:block;width:100%;height:100%}.excel-zoom-wrapper ngx-doc-viewer ::ng-deep iframe{transition:transform .2s ease-in-out;transform-origin:top left;border:none;min-width:100%;min-height:100%}ngx-doc-viewer{display:block;width:100%;height:100%}ngx-doc-viewer ::ng-deep iframe{transition:transform .2s ease-in-out;transform-origin:center center}.csv-container{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;border-radius:8px;overflow:auto}.csv-container *{scrollbar-width:none;-ms-overflow-style:none}.csv-container *::-webkit-scrollbar{display:none}.csv-container .loading-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.csv-container .loading-container .loading-content{text-align:center;color:#6b7280}.csv-container .loading-container .loading-content i{margin-bottom:1rem;display:block}.csv-container .loading-container .loading-content p{margin:0;color:#9ca3af;font-size:.875rem}.csv-container .error-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.csv-container .error-container .error-content{text-align:center;color:#6b7280;max-width:400px}.csv-container .error-container .error-content i{margin-bottom:1rem;display:block}.csv-container .error-container .error-content h4{margin:0 0 .5rem;color:#dc2626;font-size:1.25rem;font-weight:600}.csv-container .error-container .error-content p{margin:0 0 1rem;color:#6b7280;font-size:.875rem}.csv-container .error-container .error-content .error-actions{margin-top:1rem}.csv-container .csv-content{width:100%;height:98%;display:flex;flex-direction:column;padding:1rem}.csv-container .csv-content .csv-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:1rem;padding-bottom:1rem;border-bottom:1px solid #e5e7eb}.csv-container .csv-content .csv-header .csv-info h4{margin:0 0 .5rem;color:#111827;font-size:1.25rem;font-weight:600}.csv-container .csv-content .csv-header .csv-info p{margin:0 0 .25rem;color:#6b7280;font-size:.875rem}.csv-container .csv-content .csv-header .csv-info .csv-stats{display:inline-block;background-color:#f3f4f6;color:#6b7280;font-size:.75rem;padding:.25rem .5rem;border-radius:4px;font-weight:500}.csv-container .csv-content .csv-header .csv-actions{display:flex;gap:.5rem}.csv-container .csv-content .csv-table-container{flex:1;overflow:auto;border-radius:6px;min-width:0;min-height:0;transition:transform .2s ease-in-out;scroll-behavior:smooth;transform-origin:center center;scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-wrapper{height:100%;scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-wrapper::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-body{scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-body::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-header{scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-header::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-footer{scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-footer::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-scrollbar-wrapper{scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-scrollbar-wrapper::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-table{border-collapse:collapse}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-thead>tr>th{background-color:#f8f9fa;border:1px solid #e5e7eb;padding:.75rem;font-weight:600;color:#374151;text-align:left;position:sticky;top:0;z-index:1;word-wrap:break-word;white-space:normal}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-thead>tr>th.csv-header-cell{background-color:#f1f5f9;font-weight:700;color:#1e293b}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-tbody>tr>td{border:1px solid #e5e7eb;padding:.75rem;color:#374151;vertical-align:top;word-wrap:break-word;white-space:normal}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-tbody>tr>td.csv-header-cell{background-color:#f1f5f9;font-weight:600;color:#1e293b}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-tbody>tr:nth-child(2n){background-color:#f9fafb}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-tbody>tr:hover{background-color:#f3f4f6}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i7.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: i8.NgxDocViewerComponent, selector: "ngx-doc-viewer", inputs: ["url", "queryParams", "viewerUrl", "googleCheckInterval", "googleMaxChecks", "disableContent", "googleCheckContentLoaded", "viewer", "overrideLocalhost"], outputs: ["loaded"] }, { kind: "component", type: i2$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "component", type: DocumentZoomControlsComponent, selector: "document-zoom-controls", inputs: ["selectedDocument", "contextId", "isFormHide"], outputs: ["documentNameUpdated"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
7827
7828
|
}
|
|
@@ -8172,8 +8173,9 @@ class DocumentViewerComponent {
|
|
|
8172
8173
|
fileName: document.docName,
|
|
8173
8174
|
documentUrl: document.documentUrl,
|
|
8174
8175
|
contentType: document.contentType,
|
|
8175
|
-
status:
|
|
8176
|
-
|
|
8176
|
+
status: this.selectedDocument?.status || '',
|
|
8177
|
+
documentTypeName: document.documentTypeName,
|
|
8178
|
+
isUploaded: this.selectedDocument?.isUploaded || false,
|
|
8177
8179
|
isAliasEditable: document.isAliasEditable,
|
|
8178
8180
|
parentDocumentId: document.parentDocumentId,
|
|
8179
8181
|
aliasName: document.aliasName,
|
|
@@ -10365,5 +10367,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
10365
10367
|
* Generated bundle index. Do not edit.
|
|
10366
10368
|
*/
|
|
10367
10369
|
|
|
10368
|
-
export { COUNTRIES, ConfirmationDialogComponent, DOCUMENTTYPES, DUMMYDOCUMENTLIST, DUMMYSUMMARY, DUMMY_DOCUMENT_SECTIONS, DocumentActionsComponent, DocumentAlertList, DocumentContainerComponent, DocumentContentTypeService, DocumentContentViewerComponent, DocumentDirective, DocumentHistoryComponent, DocumentListComponent, DocumentModule, DocumentSearchComponent, DocumentTableBuilderService, DocumentUploadComponent, DocumentViewerComponent, DocumentZoomControlsComponent, DocumentZoomService, HasPermissionDirective, SAMPLE_STATUS_DATA, SHARED, SUPPORTED_IMAGE_TYPES, SharedModule, SidebarComponent, TablePrimaryComponent, USERLIST };
|
|
10370
|
+
export { COUNTRIES, ConfirmationDialogComponent, DOCUMENTTYPES, DUMMYDOCUMENTLIST, DUMMYSUMMARY, DUMMY_DOCUMENT_SECTIONS, DocumentActionsComponent, DocumentAlertList, DocumentContainerComponent, DocumentContentTypeService, DocumentContentViewerComponent, DocumentDirective, DocumentHistoryComponent, DocumentListComponent, DocumentModule, DocumentSearchComponent, DocumentTableBuilderService, DocumentUploadComponent, DocumentViewerComponent, DocumentZoomControlsComponent, DocumentZoomService, HasPermissionDirective, OPEN_DOCUMENT_EXTENSIONS, SAMPLE_STATUS_DATA, SHARED, SUPPORTED_IMAGE_TYPES, SharedModule, SidebarComponent, TablePrimaryComponent, USERLIST };
|
|
10369
10371
|
//# sourceMappingURL=cat-documents-ng.mjs.map
|