cat-documents-ng 1.0.46 → 1.0.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, EventEmitter, Output, ViewChild, Input, ViewEncapsulation, Component, ChangeDetectionStrategy, HostListener, Directive, NgModule, APP_INITIALIZER, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
3
- import * as i6 from '@angular/common';
2
+ import { Injectable, EventEmitter, Output, ViewChild, Input, ViewEncapsulation, Component, HostListener, Directive, ChangeDetectionStrategy, NgModule, APP_INITIALIZER, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
3
+ import * as i2$1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import { firstValueFrom, of, catchError, throwError, EMPTY, tap, 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 { HttpHeaders, HttpParams, HttpClientModule } from '@angular/common/http';
7
+ import { HttpParams, HttpClientModule, HttpHeaders } 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, map, catchError as catchError$1 } from 'rxjs/operators';
@@ -23,38 +23,38 @@ import * as i12 from 'primeng/checkbox';
23
23
  import { CheckboxModule } from 'primeng/checkbox';
24
24
  import * as i13 from 'primeng/radiobutton';
25
25
  import { RadioButtonModule } from 'primeng/radiobutton';
26
- import * as i9$1 from '@angular/forms';
26
+ import * as i7 from '@angular/forms';
27
27
  import { FormsModule } from '@angular/forms';
28
28
  import * as i15 from 'primeng/dropdown';
29
29
  import { DropdownModule } from 'primeng/dropdown';
30
30
  import * as i1 from '@angular/router';
31
- import * as i8 from 'primeng/inputtextarea';
31
+ import * as i6 from 'primeng/inputtextarea';
32
32
  import { InputTextareaModule } from 'primeng/inputtextarea';
33
33
  import * as i4 from 'primeng/sidebar';
34
34
  import { SidebarModule } from 'primeng/sidebar';
35
35
  import * as i5 from 'primeng/messages';
36
36
  import { MessagesModule } from 'primeng/messages';
37
- import * as i9$3 from 'primeng/badge';
37
+ import * as i9$2 from 'primeng/badge';
38
38
  import { BadgeModule } from 'primeng/badge';
39
- import * as i8$2 from 'primeng/dialog';
39
+ import * as i8$1 from 'primeng/dialog';
40
40
  import { DialogModule } from 'primeng/dialog';
41
41
  import * as i6$1 from 'primeng/inputtext';
42
42
  import { InputTextModule } from 'primeng/inputtext';
43
- import * as i2$1 from 'primeng/table';
43
+ import * as i2$2 from 'primeng/table';
44
44
  import { TableModule } from 'primeng/table';
45
45
  import * as XLSX from 'xlsx';
46
46
  import * as i5$1 from '@angular/platform-browser';
47
- import * as i8$1 from 'ng2-pdf-viewer';
47
+ import * as i8 from 'ng2-pdf-viewer';
48
48
  import { PdfViewerModule } from 'ng2-pdf-viewer';
49
- import * as i9$2 from 'ngx-doc-viewer';
49
+ import * as i9$1 from 'ngx-doc-viewer';
50
50
  import { NgxDocViewerModule } from 'ngx-doc-viewer';
51
- import * as i8$3 from 'primeng/menu';
52
- import { MenuModule } from 'primeng/menu';
53
- import * as i9$4 from 'primeng/card';
54
- import { CardModule } from 'primeng/card';
55
51
  import { AccordionModule } from 'primeng/accordion';
56
52
  import { ListboxModule } from 'primeng/listbox';
57
53
  import { TimelineModule } from 'primeng/timeline';
54
+ import * as i8$2 from 'primeng/menu';
55
+ import { MenuModule } from 'primeng/menu';
56
+ import * as i9$3 from 'primeng/card';
57
+ import { CardModule } from 'primeng/card';
58
58
  import { PanelMenuModule } from 'primeng/panelmenu';
59
59
  import { RippleModule } from 'primeng/ripple';
60
60
  import { ToastModule } from 'primeng/toast';
@@ -1492,8 +1492,7 @@ class DocumentHttpService {
1492
1492
  getFoldersData(contextId) {
1493
1493
  if (!contextId)
1494
1494
  return EMPTY;
1495
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1496
- return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}${URLS.FOLDERS}${contextId}`, { headers }).pipe(tap((folders) => {
1495
+ return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}${URLS.FOLDERS}${contextId}`).pipe(tap((folders) => {
1497
1496
  this.documentStore.setFolders(folders);
1498
1497
  }), catchError((error) => {
1499
1498
  return throwError(() => new Error(error));
@@ -1506,8 +1505,7 @@ class DocumentHttpService {
1506
1505
  * @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
1507
1506
  */
1508
1507
  getDocumentCatagories(contextId) {
1509
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1510
- return this.http.get(`${this.apiUrl}${URLS.DOCUMENTS_CATAGORIES}/${contextId}`, { headers })
1508
+ return this.http.get(`${this.apiUrl}${URLS.DOCUMENTS_CATAGORIES}/${contextId}`)
1511
1509
  .pipe(tap((response) => {
1512
1510
  if (response && response.categories) {
1513
1511
  this.documentStore.setDocumentCategories(response.categories);
@@ -1535,10 +1533,9 @@ class DocumentHttpService {
1535
1533
  * Fetches a document by its path name and transforms the response for dropdown options.
1536
1534
  * @param {string} documentId - The document ID to fetch the document.
1537
1535
  * @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
1538
- */
1536
+ */
1539
1537
  getAlertsByDocumentID(documentId) {
1540
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1541
- return this.http.get(`${this.apiUrl}${URLS.ALERT_BY_DOCUMENT_ID}${documentId}`, { headers }).pipe(tap((documentAlert) => {
1538
+ return this.http.get(`${this.apiUrl}${URLS.ALERT_BY_DOCUMENT_ID}${documentId}`).pipe(tap((documentAlert) => {
1542
1539
  this.documentStore.setDocumentAlert(documentAlert);
1543
1540
  }), catchError((error) => {
1544
1541
  return throwError(() => new Error(error));
@@ -1549,10 +1546,9 @@ class DocumentHttpService {
1549
1546
  * @param {string} folderId - The folder ID to fetch the document.
1550
1547
  * @param {string} contextId - The context ID to fetch the document.
1551
1548
  * @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
1552
- */
1549
+ */
1553
1550
  getDocumentByFolderID(folderId, contextId) {
1554
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1555
- return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${URLS.PARENT_DOCUMENT_TYPE_ID}${folderId}${URLS.CONTEXT_ID}${contextId}`, { headers }).pipe(tap((records) => {
1551
+ return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${URLS.PARENT_DOCUMENT_TYPE_ID}${folderId}${URLS.CONTEXT_ID}${contextId}`).pipe(tap((records) => {
1556
1552
  this.documentStore.set(records);
1557
1553
  }), catchError((error) => {
1558
1554
  return throwError(() => new Error(error));
@@ -1567,8 +1563,7 @@ class DocumentHttpService {
1567
1563
  * @returns {Observable<DocumentModel>} An observable that emits the updated DocumentModel.
1568
1564
  */
1569
1565
  updateDocumentName(documentId, payload) {
1570
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1571
- return this.http.put(`${this.apiUrl}${URLS.ALIAS_NAME}${documentId}`, payload, { headers }).pipe(catchError((error) => {
1566
+ return this.http.put(`${this.apiUrl}${URLS.ALIAS_NAME}${documentId}`, payload).pipe(catchError((error) => {
1572
1567
  return throwError(() => new Error(error));
1573
1568
  }));
1574
1569
  }
@@ -1580,8 +1575,7 @@ class DocumentHttpService {
1580
1575
  getUserListByContextId(contextId) {
1581
1576
  if (!contextId)
1582
1577
  return EMPTY;
1583
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1584
- return this.http.get(`${this.apiUrl}${URLS.USERLIST}${contextId}`, { headers }).pipe(tap((userList) => {
1578
+ return this.http.get(`${this.apiUrl}${URLS.USERLIST}${contextId}`).pipe(tap((userList) => {
1585
1579
  this.documentStore.setUserList(userList);
1586
1580
  }), catchError((error) => {
1587
1581
  return throwError(() => new Error(error));
@@ -1597,7 +1591,6 @@ class DocumentHttpService {
1597
1591
  getStatusDocumentCount(applicationId, contextId = null, categoryId = null) {
1598
1592
  if (!applicationId)
1599
1593
  return EMPTY;
1600
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1601
1594
  let url = `${this.apiUrl}${URLS.STATUS_DOCUMENT_COUNT}${applicationId}`;
1602
1595
  let params = new HttpParams();
1603
1596
  const contextParam = contextId || null;
@@ -1607,7 +1600,7 @@ class DocumentHttpService {
1607
1600
  if (categoryId) {
1608
1601
  params = params.set(SHARED.CATEGORY, categoryId);
1609
1602
  }
1610
- return this.http.get(url, { params, headers }).pipe(tap((statusData) => {
1603
+ return this.http.get(url, { params }).pipe(tap((statusData) => {
1611
1604
  this.documentStore.setStatusData(statusData);
1612
1605
  }), catchError((error) => {
1613
1606
  return throwError(() => new Error(error));
@@ -1625,7 +1618,6 @@ class DocumentHttpService {
1625
1618
  * @returns {Observable<any>} An observable that emits the filtered document data.
1626
1619
  */
1627
1620
  getDocumentsBySelection(contextId, menuItem, userId, status, searchKey = null) {
1628
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1629
1621
  let params = new HttpParams();
1630
1622
  if (userId) {
1631
1623
  params = params.set(SHARED.CONTEXT_ID, userId);
@@ -1636,7 +1628,7 @@ class DocumentHttpService {
1636
1628
  if (searchKey) {
1637
1629
  params = params.set(SHARED.SEARCH_KEY, searchKey);
1638
1630
  }
1639
- return this.http.get(`${this.apiUrl}${URLS.GETALL}/${contextId}`, { params, headers }).pipe(tap((response) => {
1631
+ return this.http.get(`${this.apiUrl}${URLS.GETALL}/${contextId}`, { params }).pipe(tap((response) => {
1640
1632
  if (response.documents) {
1641
1633
  this.documentStore.setDocumentList(response.documents);
1642
1634
  }
@@ -1648,8 +1640,7 @@ class DocumentHttpService {
1648
1640
  if (!documentId) {
1649
1641
  return of([]);
1650
1642
  }
1651
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1652
- return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_HISTORY}${documentId}`, { headers }).pipe(catchError((error) => {
1643
+ return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_HISTORY}${documentId}`).pipe(catchError((error) => {
1653
1644
  return throwError(() => new Error(error));
1654
1645
  }));
1655
1646
  }
@@ -1661,8 +1652,7 @@ class DocumentHttpService {
1661
1652
  getCategoriesBySource(source) {
1662
1653
  if (!source)
1663
1654
  return EMPTY;
1664
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1665
- return this.http.get(`${this.apiUrl}${URLS.GET_CATEGORIES_BY_SOURCE}${source}`, { headers }).pipe(catchError((error) => {
1655
+ return this.http.get(`${this.apiUrl}${URLS.GET_CATEGORIES_BY_SOURCE}${source}`).pipe(catchError((error) => {
1666
1656
  return throwError(() => new Error(error));
1667
1657
  }));
1668
1658
  }
@@ -1674,8 +1664,7 @@ class DocumentHttpService {
1674
1664
  getBrokerDocumentCatagoriesBySource(source) {
1675
1665
  if (!source)
1676
1666
  return EMPTY;
1677
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1678
- return this.http.get(`${this.apiUrl}${URLS.BROKER_DOCUMENT_CATAGORIES}${source}`, { headers }).pipe(catchError((error) => {
1667
+ return this.http.get(`${this.apiUrl}${URLS.BROKER_DOCUMENT_CATAGORIES}${source}`).pipe(catchError((error) => {
1679
1668
  return throwError(() => new Error(error));
1680
1669
  }));
1681
1670
  }
@@ -1687,8 +1676,7 @@ class DocumentHttpService {
1687
1676
  getBrokerDocumentTypesByCategoryId(categoryId) {
1688
1677
  if (!categoryId)
1689
1678
  return EMPTY;
1690
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1691
- return this.http.get(`${this.apiUrl}${URLS.BROKER_DOCUMENT_TYPES}${categoryId}`, { headers }).pipe(catchError((error) => {
1679
+ return this.http.get(`${this.apiUrl}${URLS.BROKER_DOCUMENT_TYPES}${categoryId}`).pipe(catchError((error) => {
1692
1680
  return throwError(() => new Error(error));
1693
1681
  }));
1694
1682
  }
@@ -1700,8 +1688,7 @@ class DocumentHttpService {
1700
1688
  getDocumentTypesByCategory(categoryId) {
1701
1689
  if (!categoryId)
1702
1690
  return EMPTY;
1703
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1704
- return this.http.get(`${this.apiUrl}${URLS.GET_DOCUMENT_TYPES_BY_CATEGORY}${categoryId}`, { headers }).pipe(catchError((error) => {
1691
+ return this.http.get(`${this.apiUrl}${URLS.GET_DOCUMENT_TYPES_BY_CATEGORY}${categoryId}`).pipe(catchError((error) => {
1705
1692
  return throwError(() => new Error(error));
1706
1693
  }));
1707
1694
  }
@@ -1711,8 +1698,7 @@ class DocumentHttpService {
1711
1698
  * @returns {Observable<any>} Observable that emits the upload response.
1712
1699
  */
1713
1700
  uploadFile(formData) {
1714
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1715
- return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, formData, { headers }).pipe(catchError((error) => {
1701
+ return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, formData).pipe(catchError((error) => {
1716
1702
  return throwError(() => new Error(error));
1717
1703
  }));
1718
1704
  }
@@ -1722,8 +1708,7 @@ class DocumentHttpService {
1722
1708
  * @returns {Observable<any>} Observable that emits the save response.
1723
1709
  */
1724
1710
  saveDocumentUpload(payload) {
1725
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1726
- return this.http.post(`${this.apiUrl}${URLS.SAVE_DOCUMENT_UPLOAD}`, payload, { headers }).pipe(catchError((error) => {
1711
+ return this.http.post(`${this.apiUrl}${URLS.SAVE_DOCUMENT_UPLOAD}`, payload).pipe(catchError((error) => {
1727
1712
  return throwError(() => new Error(error));
1728
1713
  }));
1729
1714
  }
@@ -1738,8 +1723,7 @@ class DocumentHttpService {
1738
1723
  const payload = {
1739
1724
  statusUpdateDescription: statusUpdateDescription
1740
1725
  };
1741
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1742
- return this.http.put(`${this.apiUrl}${URLS.UPDATE_DOCUMENT_STATUS}${documentId}/${status}`, payload, { headers }).pipe(tap((response) => {
1726
+ return this.http.put(`${this.apiUrl}${URLS.UPDATE_DOCUMENT_STATUS}${documentId}/${status}`, payload).pipe(tap((response) => {
1743
1727
  if (response && response.status) {
1744
1728
  const normalizedStatus = this.normalizeStatus(response.status);
1745
1729
  response.normalizedStatus = normalizedStatus;
@@ -1772,8 +1756,7 @@ class DocumentHttpService {
1772
1756
  * @returns {Observable<any>} Observable that emits the delete response
1773
1757
  */
1774
1758
  deleteDocument(documentId, contextId) {
1775
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1776
- return this.http.delete(`${this.apiUrl}${URLS.DELETE_DOCUMENT}${documentId}`, { headers }).pipe(tap(() => {
1759
+ return this.http.delete(`${this.apiUrl}${URLS.DELETE_DOCUMENT}${documentId}`).pipe(tap(() => {
1777
1760
  this.getDocumentCatagories(contextId).subscribe();
1778
1761
  this.getUserListByContextId(contextId).subscribe();
1779
1762
  this.getStatusDocumentCount(contextId).subscribe();
@@ -1789,10 +1772,8 @@ class DocumentHttpService {
1789
1772
  * @returns {Observable<ArrayBuffer>} Observable that emits the file data as ArrayBuffer
1790
1773
  */
1791
1774
  downloadExcelFile(documentUrl) {
1792
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1793
1775
  return this.http.get(documentUrl, {
1794
- responseType: 'arraybuffer',
1795
- headers: headers
1776
+ responseType: 'arraybuffer'
1796
1777
  }).pipe(catchError((error) => {
1797
1778
  return throwError(() => new Error(error));
1798
1779
  }));
@@ -1804,10 +1785,8 @@ class DocumentHttpService {
1804
1785
  * @returns {Observable<string>} Observable that emits the file data as string
1805
1786
  */
1806
1787
  downloadCsvFile(documentUrl) {
1807
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1808
1788
  return this.http.get(documentUrl, {
1809
- responseType: 'text',
1810
- headers: headers
1789
+ responseType: 'text'
1811
1790
  }).pipe(catchError((error) => {
1812
1791
  return throwError(() => new Error(error));
1813
1792
  }));
@@ -1820,10 +1799,8 @@ class DocumentHttpService {
1820
1799
  downloadEmailFile(documentUrl) {
1821
1800
  const isAzureBlobStorage = documentUrl.includes('.blob.core.windows.net');
1822
1801
  if (isAzureBlobStorage) {
1823
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1824
1802
  return this.http.get(documentUrl, {
1825
- responseType: 'text',
1826
- headers: headers
1803
+ responseType: 'text'
1827
1804
  }).pipe(catchError((error) => {
1828
1805
  return throwError(() => new Error('Failed to download email file. Please check if the file URL is valid and accessible.'));
1829
1806
  }));
@@ -1835,8 +1812,7 @@ class DocumentHttpService {
1835
1812
  }
1836
1813
  }
1837
1814
  documentRequest(payload) {
1838
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1839
- return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_REQUEST}`, payload, { headers }).pipe(catchError((error) => {
1815
+ return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_REQUEST}`, payload).pipe(catchError((error) => {
1840
1816
  return throwError(() => new Error(error));
1841
1817
  }));
1842
1818
  }
@@ -1848,8 +1824,7 @@ class DocumentHttpService {
1848
1824
  getValuationReportByContextId(contextId) {
1849
1825
  if (!contextId)
1850
1826
  return EMPTY;
1851
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1852
- return this.http.get(`${this.apiUrl}${URLS.VALUATION_REPORT}${contextId}`, { headers }).pipe(catchError((error) => {
1827
+ return this.http.get(`${this.apiUrl}${URLS.VALUATION_REPORT}${contextId}`).pipe(catchError((error) => {
1853
1828
  // Return empty object if no data found or error occurs
1854
1829
  return of(null);
1855
1830
  }));
@@ -1862,11 +1837,9 @@ class DocumentHttpService {
1862
1837
  convertEmailToPdf(documentUrl) {
1863
1838
  if (!documentUrl)
1864
1839
  return EMPTY;
1865
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
1866
1840
  const payload = { documentUrl: documentUrl };
1867
1841
  return this.http.post(`${this.apiUrl}${URLS.CONVERT_TO_PDF}`, payload, {
1868
- responseType: 'blob',
1869
- headers: headers
1842
+ responseType: 'blob'
1870
1843
  }).pipe(catchError((error) => {
1871
1844
  return throwError(() => new Error(error?.message || 'Failed to convert email to PDF'));
1872
1845
  }));
@@ -2791,8 +2764,7 @@ class DocumentService {
2791
2764
  * @returns {Observable<any>} Observable that emits the newly created document.
2792
2765
  */
2793
2766
  create(entity) {
2794
- let headers = new HttpHeaders().set('Authorization', 'Bearer 3dfc8b40-5d0a-4129-ae9c-93dc34aff3ae');
2795
- return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, entity, { headers }).pipe(tap((newEntity) => this.documentStore.add(newEntity)));
2767
+ return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, entity).pipe(tap((newEntity) => this.documentStore.add(newEntity)));
2796
2768
  }
2797
2769
  /**
2798
2770
  * Fetches all documents from the backend.
@@ -4052,7 +4024,7 @@ class DocumentUploadComponent {
4052
4024
  this.dataService.destroy();
4053
4025
  }
4054
4026
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentUploadComponent, deps: [{ token: DocumentUploadService }, { token: DocumentService }, { token: i3.PrimeNGConfig }, { token: FileFormatService }, { token: i3.MessageService }, { token: i0.ChangeDetectorRef }, { token: DocumentUploadBusinessService }, { token: DocumentUploadFormService }, { token: DocumentUploadDataService }], target: i0.ɵɵFactoryTarget.Component });
4055
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentUploadComponent, isStandalone: false, selector: "lib-document-upload", inputs: { contextId: "contextId", isDocumentSaveBtnClicked: "isDocumentSaveBtnClicked", isDocumentSidebarClosed: "isDocumentSidebarClosed", isFormHide: "isFormHide", isMultiAttachmentHidden: "isMultiAttachmentHidden" }, outputs: { onFormValidationChange: "onFormValidationChange", onUploadSuccess: "onUploadSuccess", onFilesUploaded: "onFilesUploaded", hasUnsavedChangesChange: "hasUnsavedChangesChange", onFileRemoved: "onFileRemoved" }, viewQueries: [{ propertyName: "fileUploader", first: true, predicate: ["fileUploader"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"document-upload-container\">\r\n <!-- Assignment Section -->\r\n <div class=\"assignment-section\" *ngIf=\"!isFormHide\">\r\n <h4>Assign to Applicant(s) or Application <span class=\"text-red-500\">*</span> </h4>\r\n <div class=\"radio-group\">\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Applicant\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'applicant'\"\r\n ></p-radioButton>\r\n <label [for]=\"'applicant'\" class=\"radio-label\">Applicant(s) </label>\r\n </div>\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Application\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'application'\"\r\n ></p-radioButton>\r\n <label [for]=\"'application'\" class=\"radio-label\">Application</label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Applicant Selection (only shown when Applicant is selected) -->\r\n <div class=\"applicant-section\" *ngIf=\"!isFormHide && selectedAssignmentType === 'Applicant'\">\r\n <h4>Select Applicant(s) <span class=\"text-red-500\">*</span></h4>\r\n <div class=\"grid\">\r\n <div \r\n *ngFor=\"let applicant of filteredApplicantList\" \r\n class=\"applicant-item col-12 md:col-6\"\r\n >\r\n <p-checkbox \r\n [value]=\"applicant._id\"\r\n [(ngModel)]=\"selectedApplicants\"\r\n [inputId]=\"'applicant-' + applicant._id\"\r\n (onChange)=\"onApplicantSelectionChange()\"\r\n ></p-checkbox>\r\n <label [for]=\"'applicant-' + applicant._id\" class=\"applicant-label\">\r\n {{ applicant.name }}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Category Selection -->\r\n <div class=\"category-section\" *ngIf=\"!isFormHide\">\r\n <h4>Category <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"categoryOptions\"\r\n [(ngModel)]=\"selectedCategory\"\r\n placeholder=\"Select Category type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onCategoryChange()\"\r\n [disabled]=\"!categoryOptions.length\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- Document Type Selection -->\r\n <div class=\"document-type-section\" *ngIf=\"!isFormHide\">\r\n <h4>Document Type <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"documentTypeOptions\"\r\n [(ngModel)]=\"selectedDocumentType\"\r\n placeholder=\"Select Document type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onDocumentTypeChange()\"\r\n [disabled]=\"!documentTypeOptions.length || !selectedCategory\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- File Upload Section -->\r\n <div class=\"file-upload-section\">\r\n <h4>Upload Documents <span class=\"text-red-500\" *ngIf=\"!isFormHide\">*</span></h4>\r\n <div class=\"grid\">\r\n <div class=\"col-12 md:col-12\">\r\n <p-fileUpload \r\n #fileUploader \r\n [multiple]=\"true\" \r\n auto=\"true\" \r\n [accept]=\"getFileUploadAcceptString()\" \r\n maxFileSize=\"27262976\"\r\n (onSelect)=\"onSelectedFiles($event)\"\r\n >\r\n <ng-template pTemplate=\"header\" let-chooseCallback=\"chooseCallback\" let-clearCallback=\"clearCallback\">\r\n <div class=\"docHeader p-2 flex flex-wrap justify-content-between align-items-center flex-1 gap-2\">\r\n <div class=\"flex gap-2\">\r\n <p-button \r\n *ngIf=\"!isMultiAttachmentHidden\"\r\n (onClick)=\"choose($event, chooseCallback)\" \r\n icon=\"pi pi-images\" \r\n [rounded]=\"true\"\r\n [outlined]=\"true\" \r\n />\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"content\" let-removeFileCallback=\"removeFileCallback\"\r\n let-removeUploadedFileCallback=\"removeUploadedFileCallback\">\r\n <div class=\"col-12 md:col-12 p-0\">\r\n <div class=\"col-12 md:col-12 p-0\" *ngIf=\"uploadedFiles.length > 0\">\r\n <div *ngFor=\"let uploadedFile of uploadedFiles; let i = index\"\r\n class=\"m-0 flex flex-column align-items-center gap-1 mt-3\">\r\n <div class=\"col-12 md:col-12 p-0 flex documentInfo\">\r\n <div class=\"documentImage\">\r\n <img src=\"../../../../assets/images/document.png\" [alt]=\"uploadedFile.file.name\" width=\"45\" height=\"50\"\r\n class=\"object-contain\" />\r\n </div>\r\n <div class=\"flex w-full flex-column mt-2 ml-2\">\r\n <div class=\"flex justify-content-between\">\r\n <div style=\"font-weight: bold;font-size: 14px\">\r\n {{ uploadedFile.file.name }}\r\n </div>\r\n <i class=\"pi pi-times cursor-pointer\" (click)=\"handleDocumentRemove(uploadedFile.file,i)\"></i>\r\n </div>\r\n <div class=\"flex justify-content-between mt-1\">\r\n <div style=\"color: #676B89; font-size: 12px; color: green;\" class=\"pi pi-verified\"> \r\n {{ uploadedFile.formattedSize }}\r\n </div>\r\n <div class=\"white-space-nowrap\" style=\"color: #0F8BFD; font-family: 14px;\"> \r\n {{ uploadedFile.progress }} % \r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-12 p-0\">\r\n <p-progressBar \r\n [value]=\"uploadedFile.progress ?? 0\" \r\n [showValue]=\"false\" \r\n styleClass=\"h-1/2rem md:ml-auto relative\"\r\n [ngClass]=\"{ 'exceeded-progress-bar': (uploadedFile.progress ?? 0) > 100 }\"\r\n >\r\n </p-progressBar>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"empty\" let-chooseCallback=\"chooseCallback\">\r\n <div *ngIf=\"!uploadedFiles.length\" class=\"flex align-items-center justify-content-center flex-column\"\r\n (click)=\"triggerFileUpload()\">\r\n <i class=\"pi pi-cloud-upload border-2 border-circle p-5 text-8xl text-400 border-400\"></i>\r\n <p class=\"mt-4 mb-0\">Drag and drop files here to upload.</p>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"file\"> </ng-template>\r\n </p-fileUpload>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.flex-col{flex-direction:column}.text-muted-color{color:#6c757d}.p-fileupload-buttonbar{padding:0}.p-fileupload-content{background-color:#0f8bfd1a}.p-fileupload .p-fileupload-content{padding:1rem}.docHeader .p-button-icon{padding:.5rem}.document-upload-container{padding:1rem;max-height:90vh}.assignment-section,.applicant-section,.category-section,.document-type-section,.file-upload-section{margin-bottom:1.5rem}.assignment-section h4,.applicant-section h4,.category-section h4,.document-type-section h4,.file-upload-section h4{margin:0 0 .75rem;font-size:1rem;font-weight:600;color:#212529}.radio-group{display:flex;gap:.75rem}.radio-item{display:flex;align-items:center;gap:.5rem;cursor:pointer;transition:all .2s ease}.radio-item:has(.p-radiobutton-box.p-highlight) .radio-label{color:#0f8bfd;font-weight:600}.radio-label{font-size:.9rem;color:#495057;cursor:pointer;-webkit-user-select:none;user-select:none;transition:color .2s ease}::ng-deep .p-dropdown{width:100%}::ng-deep .p-dropdown .p-dropdown-label{font-size:.9rem;color:#495057}::ng-deep .p-dropdown .p-dropdown-trigger{color:#6c757d}::ng-deep .p-dropdown:not(.p-disabled):hover{border-color:#0f8bfd}::ng-deep .p-dropdown:not(.p-disabled).p-focus{border-color:#0f8bfd;box-shadow:0 0 0 2px #0f8bfd33}::ng-deep .p-radiobutton .p-radiobutton-box{border-color:#ced4da;border-radius:4px;width:18px;height:18px}::ng-deep .p-radiobutton .p-radiobutton-box:hover{border-color:#0f8bfd}::ng-deep .p-radiobutton .p-radiobutton-box.p-highlight{border-color:#0f8bfd;background-color:transparent}::ng-deep .p-radiobutton .p-radiobutton-icon{background-color:#0f8bfd;width:8px;height:8px;border-radius:2px}.applicant-section .grid{margin:0;padding:0}.applicant-section .applicant-item{display:flex;align-items:center;gap:.75rem;border-radius:.5rem;background-color:#fff;transition:all .2s ease;cursor:pointer;margin-bottom:.75rem}.applicant-section .applicant-item:has(.p-radiobutton-box.p-highlight) .applicant-label{color:#0f8bfd;font-weight:600}.applicant-section .applicant-label{font-size:.95rem;color:#495057;cursor:pointer;-webkit-user-select:none;user-select:none;flex:1;font-weight:500;margin:0;transition:color .2s ease}@media (max-width: 768px){.applicant-section .applicant-item{margin-bottom:.5rem;padding:.75rem;min-height:50px}.applicant-section .applicant-label{font-size:.9rem}.document-upload-container{padding:.75rem}.assignment-section,.applicant-section,.category-section,.document-type-section,.file-upload-section{margin-bottom:1rem}}.category-section .p-dropdown,.document-type-section .p-dropdown{width:100%!important;min-width:100%!important}.category-section .p-dropdown-panel,.document-type-section .p-dropdown-panel{width:100%!important}:host ::ng-deep .p-dropdown{width:100%!important}:host ::ng-deep .p-dropdown-panel{width:100%!important}.applicant-list{display:none}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i9.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: i10.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "component", type: i11.ProgressBar, selector: "p-progressBar", inputs: ["value", "showValue", "styleClass", "style", "unit", "mode", "color"] }, { kind: "component", type: i12.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "component", type: i13.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "variant", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i9$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i15.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"] }], encapsulation: i0.ViewEncapsulation.None });
4027
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentUploadComponent, isStandalone: false, selector: "lib-document-upload", inputs: { contextId: "contextId", isDocumentSaveBtnClicked: "isDocumentSaveBtnClicked", isDocumentSidebarClosed: "isDocumentSidebarClosed", isFormHide: "isFormHide", isMultiAttachmentHidden: "isMultiAttachmentHidden" }, outputs: { onFormValidationChange: "onFormValidationChange", onUploadSuccess: "onUploadSuccess", onFilesUploaded: "onFilesUploaded", hasUnsavedChangesChange: "hasUnsavedChangesChange", onFileRemoved: "onFileRemoved" }, viewQueries: [{ propertyName: "fileUploader", first: true, predicate: ["fileUploader"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"document-upload-container\">\r\n <!-- Assignment Section -->\r\n <div class=\"assignment-section\" *ngIf=\"!isFormHide\">\r\n <h4>Assign to Applicant(s) or Application <span class=\"text-red-500\">*</span> </h4>\r\n <div class=\"radio-group\">\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Applicant\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'applicant'\"\r\n ></p-radioButton>\r\n <label [for]=\"'applicant'\" class=\"radio-label\">Applicant(s) </label>\r\n </div>\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Application\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'application'\"\r\n ></p-radioButton>\r\n <label [for]=\"'application'\" class=\"radio-label\">Application</label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Applicant Selection (only shown when Applicant is selected) -->\r\n <div class=\"applicant-section\" *ngIf=\"!isFormHide && selectedAssignmentType === 'Applicant'\">\r\n <h4>Select Applicant(s) <span class=\"text-red-500\">*</span></h4>\r\n <div class=\"grid\">\r\n <div \r\n *ngFor=\"let applicant of filteredApplicantList\" \r\n class=\"applicant-item col-12 md:col-6\"\r\n >\r\n <p-checkbox \r\n [value]=\"applicant._id\"\r\n [(ngModel)]=\"selectedApplicants\"\r\n [inputId]=\"'applicant-' + applicant._id\"\r\n (onChange)=\"onApplicantSelectionChange()\"\r\n ></p-checkbox>\r\n <label [for]=\"'applicant-' + applicant._id\" class=\"applicant-label\">\r\n {{ applicant.name }}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Category Selection -->\r\n <div class=\"category-section\" *ngIf=\"!isFormHide\">\r\n <h4>Category <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"categoryOptions\"\r\n [(ngModel)]=\"selectedCategory\"\r\n placeholder=\"Select Category type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onCategoryChange()\"\r\n [disabled]=\"!categoryOptions.length\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- Document Type Selection -->\r\n <div class=\"document-type-section\" *ngIf=\"!isFormHide\">\r\n <h4>Document Type <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"documentTypeOptions\"\r\n [(ngModel)]=\"selectedDocumentType\"\r\n placeholder=\"Select Document type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onDocumentTypeChange()\"\r\n [disabled]=\"!documentTypeOptions.length || !selectedCategory\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- File Upload Section -->\r\n <div class=\"file-upload-section\">\r\n <h4>Upload Documents <span class=\"text-red-500\" *ngIf=\"!isFormHide\">*</span></h4>\r\n <div class=\"grid\">\r\n <div class=\"col-12 md:col-12\">\r\n <p-fileUpload \r\n #fileUploader \r\n [multiple]=\"true\" \r\n auto=\"true\" \r\n [accept]=\"getFileUploadAcceptString()\" \r\n maxFileSize=\"27262976\"\r\n (onSelect)=\"onSelectedFiles($event)\"\r\n >\r\n <ng-template pTemplate=\"header\" let-chooseCallback=\"chooseCallback\" let-clearCallback=\"clearCallback\">\r\n <div class=\"docHeader p-2 flex flex-wrap justify-content-between align-items-center flex-1 gap-2\">\r\n <div class=\"flex gap-2\">\r\n <p-button \r\n *ngIf=\"!isMultiAttachmentHidden\"\r\n (onClick)=\"choose($event, chooseCallback)\" \r\n icon=\"pi pi-images\" \r\n [rounded]=\"true\"\r\n [outlined]=\"true\" \r\n />\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"content\" let-removeFileCallback=\"removeFileCallback\"\r\n let-removeUploadedFileCallback=\"removeUploadedFileCallback\">\r\n <div class=\"col-12 md:col-12 p-0\">\r\n <div class=\"col-12 md:col-12 p-0\" *ngIf=\"uploadedFiles.length > 0\">\r\n <div *ngFor=\"let uploadedFile of uploadedFiles; let i = index\"\r\n class=\"m-0 flex flex-column align-items-center gap-1 mt-3\">\r\n <div class=\"col-12 md:col-12 p-0 flex documentInfo\">\r\n <div class=\"documentImage\">\r\n <img src=\"../../../../assets/images/document.png\" [alt]=\"uploadedFile.file.name\" width=\"45\" height=\"50\"\r\n class=\"object-contain\" />\r\n </div>\r\n <div class=\"flex w-full flex-column mt-2 ml-2\">\r\n <div class=\"flex justify-content-between\">\r\n <div style=\"font-weight: bold;font-size: 14px\">\r\n {{ uploadedFile.file.name }}\r\n </div>\r\n <i class=\"pi pi-times cursor-pointer\" (click)=\"handleDocumentRemove(uploadedFile.file,i)\"></i>\r\n </div>\r\n <div class=\"flex justify-content-between mt-1\">\r\n <div style=\"color: #676B89; font-size: 12px; color: green;\" class=\"pi pi-verified\"> \r\n {{ uploadedFile.formattedSize }}\r\n </div>\r\n <div class=\"white-space-nowrap\" style=\"color: #0F8BFD; font-family: 14px;\"> \r\n {{ uploadedFile.progress }} % \r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-12 p-0\">\r\n <p-progressBar \r\n [value]=\"uploadedFile.progress ?? 0\" \r\n [showValue]=\"false\" \r\n styleClass=\"h-1/2rem md:ml-auto relative\"\r\n [ngClass]=\"{ 'exceeded-progress-bar': (uploadedFile.progress ?? 0) > 100 }\"\r\n >\r\n </p-progressBar>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"empty\" let-chooseCallback=\"chooseCallback\">\r\n <div *ngIf=\"!uploadedFiles.length\" class=\"flex align-items-center justify-content-center flex-column\"\r\n (click)=\"triggerFileUpload()\">\r\n <i class=\"pi pi-cloud-upload border-2 border-circle p-5 text-8xl text-400 border-400\"></i>\r\n <p class=\"mt-4 mb-0\">Drag and drop files here to upload.</p>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"file\"> </ng-template>\r\n </p-fileUpload>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.flex-col{flex-direction:column}.text-muted-color{color:#6c757d}.p-fileupload-buttonbar{padding:0}.p-fileupload-content{background-color:#0f8bfd1a}.p-fileupload .p-fileupload-content{padding:1rem}.docHeader .p-button-icon{padding:.5rem}.document-upload-container{padding:1rem;max-height:90vh}.assignment-section,.applicant-section,.category-section,.document-type-section,.file-upload-section{margin-bottom:1.5rem}.assignment-section h4,.applicant-section h4,.category-section h4,.document-type-section h4,.file-upload-section h4{margin:0 0 .75rem;font-size:1rem;font-weight:600;color:#212529}.radio-group{display:flex;gap:.75rem}.radio-item{display:flex;align-items:center;gap:.5rem;cursor:pointer;transition:all .2s ease}.radio-item:has(.p-radiobutton-box.p-highlight) .radio-label{color:#0f8bfd;font-weight:600}.radio-label{font-size:.9rem;color:#495057;cursor:pointer;-webkit-user-select:none;user-select:none;transition:color .2s ease}::ng-deep .p-dropdown{width:100%}::ng-deep .p-dropdown .p-dropdown-label{font-size:.9rem;color:#495057}::ng-deep .p-dropdown .p-dropdown-trigger{color:#6c757d}::ng-deep .p-dropdown:not(.p-disabled):hover{border-color:#0f8bfd}::ng-deep .p-dropdown:not(.p-disabled).p-focus{border-color:#0f8bfd;box-shadow:0 0 0 2px #0f8bfd33}::ng-deep .p-radiobutton .p-radiobutton-box{border-color:#ced4da;border-radius:4px;width:18px;height:18px}::ng-deep .p-radiobutton .p-radiobutton-box:hover{border-color:#0f8bfd}::ng-deep .p-radiobutton .p-radiobutton-box.p-highlight{border-color:#0f8bfd;background-color:transparent}::ng-deep .p-radiobutton .p-radiobutton-icon{background-color:#0f8bfd;width:8px;height:8px;border-radius:2px}.applicant-section .grid{margin:0;padding:0}.applicant-section .applicant-item{display:flex;align-items:center;gap:.75rem;border-radius:.5rem;background-color:#fff;transition:all .2s ease;cursor:pointer;margin-bottom:.75rem}.applicant-section .applicant-item:has(.p-radiobutton-box.p-highlight) .applicant-label{color:#0f8bfd;font-weight:600}.applicant-section .applicant-label{font-size:.95rem;color:#495057;cursor:pointer;-webkit-user-select:none;user-select:none;flex:1;font-weight:500;margin:0;transition:color .2s ease}@media (max-width: 768px){.applicant-section .applicant-item{margin-bottom:.5rem;padding:.75rem;min-height:50px}.applicant-section .applicant-label{font-size:.9rem}.document-upload-container{padding:.75rem}.assignment-section,.applicant-section,.category-section,.document-type-section,.file-upload-section{margin-bottom:1rem}}.category-section .p-dropdown,.document-type-section .p-dropdown{width:100%!important;min-width:100%!important}.category-section .p-dropdown-panel,.document-type-section .p-dropdown-panel{width:100%!important}:host ::ng-deep .p-dropdown{width:100%!important}:host ::ng-deep .p-dropdown-panel{width:100%!important}.applicant-list{display:none}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i9.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: i10.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "component", type: i11.ProgressBar, selector: "p-progressBar", inputs: ["value", "showValue", "styleClass", "style", "unit", "mode", "color"] }, { kind: "component", type: i12.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "component", type: i13.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "variant", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i15.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"] }], encapsulation: i0.ViewEncapsulation.None });
4056
4028
  }
4057
4029
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentUploadComponent, decorators: [{
4058
4030
  type: Component,
@@ -4124,7 +4096,22 @@ class SessionService {
4124
4096
  */
4125
4097
  getUserPermissions() {
4126
4098
  const sessionData = localStorage.getItem(SHARED.SESSIONKEY);
4127
- return sessionData ? JSON.parse(sessionData).permissions : null;
4099
+ if (!sessionData)
4100
+ return null;
4101
+ const parsed = JSON.parse(sessionData);
4102
+ // Example: { traits: ["Applicants-get", ...] }
4103
+ return parsed?.traits ?? null;
4104
+ }
4105
+ /**
4106
+ * Retrieves the user's traits from the stored session data (preferred).
4107
+ * @returns {string[] | null} Trait strings, or null if not found.
4108
+ */
4109
+ getUserTraits() {
4110
+ const sessionData = localStorage.getItem(SHARED.SESSIONKEY);
4111
+ if (!sessionData)
4112
+ return null;
4113
+ const parsed = JSON.parse(sessionData);
4114
+ return Array.isArray(parsed?.traits) ? parsed.traits : null;
4128
4115
  }
4129
4116
  /**
4130
4117
  * Retrieves the session ID from the stored session data.
@@ -4270,13 +4257,13 @@ class RequestDocumentComponent {
4270
4257
  const requestedDocumentForId = this.selectedAssignmentType === SHARED.APPLICANT
4271
4258
  ? this.selectedApplicant
4272
4259
  : this.contextId;
4273
- const requesterId = this.sessionService.getUserSession()?.accountId;
4260
+ const requesterId = this.sessionService.getUserSession()?.userId;
4274
4261
  const requestPayload = {
4275
4262
  applicationId: this.contextId,
4276
- requestedDocumentForId: requestedDocumentForId,
4277
- requestedDocumentType: this.selectedDocumentType,
4263
+ // requestedDocumentForId: requestedDocumentForId,
4264
+ // requestedDocumentType: this.selectedDocumentType,
4278
4265
  requesterId: requesterId,
4279
- selectedAssignmentType: this.selectedAssignmentType,
4266
+ // selectedAssignmentType: this.selectedAssignmentType,
4280
4267
  description: this.description.trim()
4281
4268
  };
4282
4269
  this.isSaving = true;
@@ -4342,12 +4329,17 @@ class RequestDocumentComponent {
4342
4329
  this.filteredApplicantList = this.dataService.handleApplicantsLoaded(this.applicantList, this.selectedAssignmentType);
4343
4330
  }
4344
4331
  validateForm() {
4345
- const baseValid = Boolean(this.selectedAssignmentType &&
4346
- this.selectedCategory &&
4347
- this.selectedDocumentType &&
4348
- this.description && this.description.trim());
4349
- const needsApplicant = this.selectedAssignmentType === SHARED.APPLICANT;
4350
- const hasRequiredFields = needsApplicant ? (baseValid && !!this.selectedApplicant) : baseValid;
4332
+ // Original validation commented out - only description is required
4333
+ // const baseValid = Boolean(
4334
+ // this.selectedAssignmentType &&
4335
+ // this.selectedCategory &&
4336
+ // this.selectedDocumentType &&
4337
+ // this.description && this.description.trim()
4338
+ // );
4339
+ // const needsApplicant = this.selectedAssignmentType === SHARED.APPLICANT;
4340
+ // const hasRequiredFields = needsApplicant ? (baseValid && !!this.selectedApplicant) : baseValid;
4341
+ // Only description is required
4342
+ const hasRequiredFields = Boolean(this.description && this.description.trim());
4351
4343
  const previousState = this.isFormValid;
4352
4344
  this.isFormValid = hasRequiredFields;
4353
4345
  if (previousState !== this.isFormValid) {
@@ -4360,11 +4352,16 @@ class RequestDocumentComponent {
4360
4352
  }
4361
4353
  /** Emits unsaved changes state based on any field being non-empty */
4362
4354
  emitUnsavedChanges() {
4363
- const hasChanges = Boolean((this.selectedAssignmentType && this.selectedAssignmentType !== SHARED.EMPTY) ||
4364
- (this.selectedApplicant && this.selectedApplicant !== SHARED.EMPTY) ||
4365
- (this.selectedCategory && this.selectedCategory !== SHARED.EMPTY) ||
4366
- (this.selectedDocumentType && this.selectedDocumentType !== SHARED.EMPTY) ||
4367
- (this.description && this.description.trim() !== SHARED.EMPTY));
4355
+ // Original validation commented out - only description matters for unsaved changes
4356
+ // const hasChanges = Boolean(
4357
+ // (this.selectedAssignmentType && this.selectedAssignmentType !== SHARED.EMPTY) ||
4358
+ // (this.selectedApplicant && this.selectedApplicant !== SHARED.EMPTY) ||
4359
+ // (this.selectedCategory && this.selectedCategory !== SHARED.EMPTY) ||
4360
+ // (this.selectedDocumentType && this.selectedDocumentType !== SHARED.EMPTY) ||
4361
+ // (this.description && this.description.trim() !== SHARED.EMPTY)
4362
+ // );
4363
+ // Only description matters for unsaved changes
4364
+ const hasChanges = Boolean(this.description && this.description.trim() !== SHARED.EMPTY);
4368
4365
  this.hasUnsavedChangesChange.emit(hasChanges);
4369
4366
  }
4370
4367
  handleError(_title, _error, resetLoading) {
@@ -4375,11 +4372,11 @@ class RequestDocumentComponent {
4375
4372
  this.destroy$.complete();
4376
4373
  }
4377
4374
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: RequestDocumentComponent, deps: [{ token: DocumentUploadService }, { token: DocumentUploadFormService }, { token: DocumentUploadDataService }, { token: i0.ChangeDetectorRef }, { token: DocumentHttpService }, { token: SessionService }], target: i0.ɵɵFactoryTarget.Component });
4378
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: RequestDocumentComponent, isStandalone: false, selector: "lib-request-document", inputs: { contextId: "contextId", isRequestSaveBtnClicked: "isRequestSaveBtnClicked", isRequestSidebarClosed: "isRequestSidebarClosed" }, outputs: { onFormValidationChange: "onFormValidationChange", onRequestSuccess: "onRequestSuccess", onRequestError: "onRequestError", hasUnsavedChangesChange: "hasUnsavedChangesChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-upload-container\">\r\n <!-- Assignment Section (same structure as upload, without files) -->\r\n <div class=\"assignment-section\">\r\n <h4>Assign to Applicant(s) or Application <span class=\"text-red-500\">*</span> </h4>\r\n <div class=\"radio-group\">\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Applicant\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'req-applicant'\"\r\n ></p-radioButton>\r\n <label [for]=\"'req-applicant'\" class=\"radio-label\">Applicant(s)</label>\r\n </div>\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Application\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'req-application'\"\r\n ></p-radioButton>\r\n <label [for]=\"'req-application'\" class=\"radio-label\">Application</label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Applicant Selection (only when Applicant is selected) -->\r\n <div class=\"applicant-section\" *ngIf=\"selectedAssignmentType === 'Applicant'\">\r\n <h4>Select Applicant(s) <span class=\"text-red-500\">*</span></h4>\r\n <div class=\"grid\">\r\n <div \r\n *ngFor=\"let applicant of filteredApplicantList\" \r\n class=\"applicant-item col-12 md:col-6\"\r\n >\r\n <p-radioButton \r\n name=\"reqSelectedApplicant\"\r\n [value]=\"applicant._id\"\r\n [(ngModel)]=\"selectedApplicant\"\r\n [inputId]=\"'req-applicant-' + applicant._id\"\r\n (onClick)=\"onApplicantSelectionChange()\"\r\n ></p-radioButton>\r\n <label [for]=\"'req-applicant-' + applicant._id\" class=\"applicant-label\">\r\n {{ applicant.name }}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Category Selection -->\r\n <div class=\"category-section\">\r\n <h4>Category <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"categoryOptions\"\r\n [(ngModel)]=\"selectedCategory\"\r\n placeholder=\"Select Category type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onCategoryChange()\"\r\n [disabled]=\"!categoryOptions.length\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- Document Type Selection -->\r\n <div class=\"document-type-section\">\r\n <h4>Document Type <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"documentTypeOptions\"\r\n [(ngModel)]=\"selectedDocumentType\"\r\n placeholder=\"Select Document type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onDocumentTypeChange()\"\r\n [disabled]=\"!documentTypeOptions.length || !selectedCategory\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- Description Field -->\r\n <div class=\"description-section\">\r\n <h6>Description <span class=\"text-red-500\">*</span></h6>\r\n <textarea pInputTextarea [(ngModel)]=\"description\" (ngModelChange)=\"onDescriptionChange()\" rows=\"4\" placeholder=\"Add description\" class=\"w-full\"></textarea>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i13.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "variant", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i8.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant"], outputs: ["onResize"] }, { kind: "directive", type: i9$1.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: i9$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i15.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"] }] });
4375
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: RequestDocumentComponent, isStandalone: false, selector: "lib-request-document", inputs: { contextId: "contextId", isRequestSaveBtnClicked: "isRequestSaveBtnClicked", isRequestSidebarClosed: "isRequestSidebarClosed" }, outputs: { onFormValidationChange: "onFormValidationChange", onRequestSuccess: "onRequestSuccess", onRequestError: "onRequestError", hasUnsavedChangesChange: "hasUnsavedChangesChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"request-document-container\">\r\n <!-- Assignment Section (same structure as upload, without files) -->\r\n <!-- <div class=\"assignment-section\">\r\n <h4>Assign to Applicant(s) or Application <span class=\"text-red-500\">*</span> </h4>\r\n <div class=\"radio-group\">\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Applicant\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'req-applicant'\"\r\n ></p-radioButton>\r\n <label [for]=\"'req-applicant'\" class=\"radio-label\">Applicant(s)</label>\r\n </div>\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Application\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'req-application'\"\r\n ></p-radioButton>\r\n <label [for]=\"'req-application'\" class=\"radio-label\">Application</label>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <!-- Applicant Selection (only when Applicant is selected) -->\r\n <!-- <div class=\"applicant-section\" *ngIf=\"selectedAssignmentType === 'Applicant'\">\r\n <h4>Select Applicant(s) <span class=\"text-red-500\">*</span></h4>\r\n <div class=\"grid\">\r\n <div \r\n *ngFor=\"let applicant of filteredApplicantList\" \r\n class=\"applicant-item col-12 md:col-6\"\r\n >\r\n <p-radioButton \r\n name=\"reqSelectedApplicant\"\r\n [value]=\"applicant._id\"\r\n [(ngModel)]=\"selectedApplicant\"\r\n [inputId]=\"'req-applicant-' + applicant._id\"\r\n (onClick)=\"onApplicantSelectionChange()\"\r\n ></p-radioButton>\r\n <label [for]=\"'req-applicant-' + applicant._id\" class=\"applicant-label\">\r\n {{ applicant.name }}\r\n </label>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <!-- Category Selection -->\r\n <!-- <div class=\"category-section\">\r\n <h4>Category <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"categoryOptions\"\r\n [(ngModel)]=\"selectedCategory\"\r\n placeholder=\"Select Category type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onCategoryChange()\"\r\n [disabled]=\"!categoryOptions.length\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div> -->\r\n\r\n <!-- Document Type Selection -->\r\n <!-- <div class=\"document-type-section\">\r\n <h4>Document Type <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"documentTypeOptions\"\r\n [(ngModel)]=\"selectedDocumentType\"\r\n placeholder=\"Select Document type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onDocumentTypeChange()\"\r\n [disabled]=\"!documentTypeOptions.length || !selectedCategory\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div> -->\r\n\r\n <!-- Description Field -->\r\n <div class=\"description-section\">\r\n <h6>Description <span class=\"text-red-500\">*</span></h6>\r\n <textarea pInputTextarea [(ngModel)]=\"description\" (ngModelChange)=\"onDescriptionChange()\" rows=\"4\" placeholder=\"Add description\" class=\"w-full\"></textarea>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i6.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant"], outputs: ["onResize"] }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
4379
4376
  }
4380
4377
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: RequestDocumentComponent, decorators: [{
4381
4378
  type: Component,
4382
- args: [{ selector: 'lib-request-document', standalone: false, template: "<div class=\"document-upload-container\">\r\n <!-- Assignment Section (same structure as upload, without files) -->\r\n <div class=\"assignment-section\">\r\n <h4>Assign to Applicant(s) or Application <span class=\"text-red-500\">*</span> </h4>\r\n <div class=\"radio-group\">\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Applicant\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'req-applicant'\"\r\n ></p-radioButton>\r\n <label [for]=\"'req-applicant'\" class=\"radio-label\">Applicant(s)</label>\r\n </div>\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Application\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'req-application'\"\r\n ></p-radioButton>\r\n <label [for]=\"'req-application'\" class=\"radio-label\">Application</label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Applicant Selection (only when Applicant is selected) -->\r\n <div class=\"applicant-section\" *ngIf=\"selectedAssignmentType === 'Applicant'\">\r\n <h4>Select Applicant(s) <span class=\"text-red-500\">*</span></h4>\r\n <div class=\"grid\">\r\n <div \r\n *ngFor=\"let applicant of filteredApplicantList\" \r\n class=\"applicant-item col-12 md:col-6\"\r\n >\r\n <p-radioButton \r\n name=\"reqSelectedApplicant\"\r\n [value]=\"applicant._id\"\r\n [(ngModel)]=\"selectedApplicant\"\r\n [inputId]=\"'req-applicant-' + applicant._id\"\r\n (onClick)=\"onApplicantSelectionChange()\"\r\n ></p-radioButton>\r\n <label [for]=\"'req-applicant-' + applicant._id\" class=\"applicant-label\">\r\n {{ applicant.name }}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Category Selection -->\r\n <div class=\"category-section\">\r\n <h4>Category <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"categoryOptions\"\r\n [(ngModel)]=\"selectedCategory\"\r\n placeholder=\"Select Category type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onCategoryChange()\"\r\n [disabled]=\"!categoryOptions.length\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- Document Type Selection -->\r\n <div class=\"document-type-section\">\r\n <h4>Document Type <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"documentTypeOptions\"\r\n [(ngModel)]=\"selectedDocumentType\"\r\n placeholder=\"Select Document type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onDocumentTypeChange()\"\r\n [disabled]=\"!documentTypeOptions.length || !selectedCategory\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- Description Field -->\r\n <div class=\"description-section\">\r\n <h6>Description <span class=\"text-red-500\">*</span></h6>\r\n <textarea pInputTextarea [(ngModel)]=\"description\" (ngModelChange)=\"onDescriptionChange()\" rows=\"4\" placeholder=\"Add description\" class=\"w-full\"></textarea>\r\n </div>\r\n</div>\r\n" }]
4379
+ args: [{ selector: 'lib-request-document', standalone: false, template: "<div class=\"request-document-container\">\r\n <!-- Assignment Section (same structure as upload, without files) -->\r\n <!-- <div class=\"assignment-section\">\r\n <h4>Assign to Applicant(s) or Application <span class=\"text-red-500\">*</span> </h4>\r\n <div class=\"radio-group\">\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Applicant\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'req-applicant'\"\r\n ></p-radioButton>\r\n <label [for]=\"'req-applicant'\" class=\"radio-label\">Applicant(s)</label>\r\n </div>\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Application\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'req-application'\"\r\n ></p-radioButton>\r\n <label [for]=\"'req-application'\" class=\"radio-label\">Application</label>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <!-- Applicant Selection (only when Applicant is selected) -->\r\n <!-- <div class=\"applicant-section\" *ngIf=\"selectedAssignmentType === 'Applicant'\">\r\n <h4>Select Applicant(s) <span class=\"text-red-500\">*</span></h4>\r\n <div class=\"grid\">\r\n <div \r\n *ngFor=\"let applicant of filteredApplicantList\" \r\n class=\"applicant-item col-12 md:col-6\"\r\n >\r\n <p-radioButton \r\n name=\"reqSelectedApplicant\"\r\n [value]=\"applicant._id\"\r\n [(ngModel)]=\"selectedApplicant\"\r\n [inputId]=\"'req-applicant-' + applicant._id\"\r\n (onClick)=\"onApplicantSelectionChange()\"\r\n ></p-radioButton>\r\n <label [for]=\"'req-applicant-' + applicant._id\" class=\"applicant-label\">\r\n {{ applicant.name }}\r\n </label>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <!-- Category Selection -->\r\n <!-- <div class=\"category-section\">\r\n <h4>Category <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"categoryOptions\"\r\n [(ngModel)]=\"selectedCategory\"\r\n placeholder=\"Select Category type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onCategoryChange()\"\r\n [disabled]=\"!categoryOptions.length\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div> -->\r\n\r\n <!-- Document Type Selection -->\r\n <!-- <div class=\"document-type-section\">\r\n <h4>Document Type <span class=\"text-red-500\">*</span></h4>\r\n <p-dropdown\r\n [options]=\"documentTypeOptions\"\r\n [(ngModel)]=\"selectedDocumentType\"\r\n placeholder=\"Select Document type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onDocumentTypeChange()\"\r\n [disabled]=\"!documentTypeOptions.length || !selectedCategory\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div> -->\r\n\r\n <!-- Description Field -->\r\n <div class=\"description-section\">\r\n <h6>Description <span class=\"text-red-500\">*</span></h6>\r\n <textarea pInputTextarea [(ngModel)]=\"description\" (ngModelChange)=\"onDescriptionChange()\" rows=\"4\" placeholder=\"Add description\" class=\"w-full\"></textarea>\r\n </div>\r\n</div>\r\n" }]
4383
4380
  }], ctorParameters: () => [{ type: DocumentUploadService }, { type: DocumentUploadFormService }, { type: DocumentUploadDataService }, { type: i0.ChangeDetectorRef }, { type: DocumentHttpService }, { type: SessionService }], propDecorators: { contextId: [{
4384
4381
  type: Input
4385
4382
  }], isRequestSaveBtnClicked: [{
@@ -4396,351 +4393,96 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
4396
4393
  type: Output
4397
4394
  }] } });
4398
4395
 
4399
- class UserListService {
4400
- documentStore;
4401
- documentQuery;
4402
- constructor(documentStore, documentQuery) {
4403
- this.documentStore = documentStore;
4404
- this.documentQuery = documentQuery;
4405
- }
4406
- getInitials(name) {
4407
- if (!name || name.trim() === SHARED.EMPTY) {
4408
- return SHARED.EMPTY;
4409
- }
4410
- const words = name.trim().split(SHARED.EMPTY_SPACE).filter(word => word.length > SHARED.INITIAL_COUNT);
4411
- if (words.length === 1) {
4412
- return words[0].substring(0, 2).toUpperCase();
4413
- }
4414
- else if (words.length >= 2) {
4415
- const firstWord = words[0];
4416
- const lastWord = words[words.length - 1];
4417
- return (firstWord.charAt(0) + lastWord.charAt(0)).toUpperCase();
4418
- }
4419
- return SHARED.EMPTY;
4420
- }
4421
- getColorByIndex(index) {
4422
- const colors = SHARED.COLORS;
4423
- return colors[index % colors.length];
4424
- }
4425
- getColorValue(colorName) {
4426
- const colorMap = SHARED.COLOR_MAP;
4427
- return colorMap[colorName] || SHARED.DEFAULT_COLOR;
4428
- }
4429
- processUserData(userList) {
4430
- return userList.map((user, index) => ({
4431
- ...user,
4432
- initials: this.getInitials(user.name),
4433
- color: this.getColorByIndex(index)
4434
- }));
4435
- }
4436
- /**
4437
- * Filters user list based on selected menu item category
4438
- * @param userList - The complete user list
4439
- * @param categories - The document categories
4440
- * @returns Filtered user list
4441
- */
4442
- filterUsersByCategory(userList, categories) {
4443
- return userList;
4444
- }
4445
- selectUser(userId, userData) {
4446
- const user = userData.find(u => u._id === userId);
4447
- if (user) {
4448
- this.documentStore.setSelectedUserId(userId);
4449
- return { selectedUser: user.name, name: user.name };
4450
- }
4451
- return { selectedUser: undefined, name: undefined };
4452
- }
4453
- unselectUser() {
4454
- this.documentStore.setSelectedUserId(null);
4396
+ class StatusCalculatorService {
4397
+ calculateTotalCount(statusData) {
4398
+ return statusData?.reduce((total, status) => total + (status.count ?? 0), 0) || 0;
4455
4399
  }
4456
- isUserSelected(userId, userData, selectedUser) {
4457
- return selectedUser === userData.find(u => u._id === userId)?.name;
4400
+ calculateStatusDataWithPercentages(statusData, selectedStatus) {
4401
+ if (!statusData)
4402
+ return [];
4403
+ const totalCount = this.calculateTotalCount(statusData);
4404
+ return statusData.map((status) => {
4405
+ // Normalize icon for reviewing status to use eye icon consistently
4406
+ let normalizedIcon = status.icon;
4407
+ if (status.status?.toLowerCase() === SHARED.REVIEWING_STATUS) {
4408
+ normalizedIcon = SHARED.ICON_EYE;
4409
+ }
4410
+ return {
4411
+ ...status,
4412
+ icon: normalizedIcon,
4413
+ percentage: totalCount > 0 ? (status.count ?? 0) / totalCount * 100 : 0,
4414
+ isSelected: selectedStatus === status.status,
4415
+ statusClass: status.status ? SHARED.STATUS_WITH_DASH + status.status.toLowerCase() : SHARED.EMPTY,
4416
+ iconClass: SHARED.ICON_WITH_DASH + (status?.status?.toLowerCase() || SHARED.EMPTY)
4417
+ };
4418
+ });
4458
4419
  }
4459
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListService, deps: [{ token: DocumentStore }, { token: DocumentQuery }], target: i0.ɵɵFactoryTarget.Injectable });
4460
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListService, providedIn: 'root' });
4420
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StatusCalculatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4421
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StatusCalculatorService, providedIn: 'root' });
4461
4422
  }
4462
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListService, decorators: [{
4423
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StatusCalculatorService, decorators: [{
4463
4424
  type: Injectable,
4464
4425
  args: [{
4465
4426
  providedIn: 'root'
4466
4427
  }]
4467
- }], ctorParameters: () => [{ type: DocumentStore }, { type: DocumentQuery }] });
4428
+ }] });
4468
4429
 
4469
- class UserListComponent {
4470
- documentService;
4471
- documentStore;
4430
+ class DocumentStatusComponent {
4472
4431
  documentQuery;
4473
- userListService;
4474
- cdr;
4475
- userList = SHARED.EMPTY_ARRAY;
4476
- categories = SHARED.EMPTY_ARRAY;
4477
- userSelected = new EventEmitter();
4478
- userData = SHARED.EMPTY_ARRAY;
4479
- filteredUserData = SHARED.EMPTY_ARRAY;
4480
- selectedUser;
4481
- shouldShowContainer = true;
4482
- userListSubscription = new Subscription();
4483
- categoriesSubscription = new Subscription();
4484
- constructor(documentService, documentStore, documentQuery, userListService, cdr) {
4485
- this.documentService = documentService;
4486
- this.documentStore = documentStore;
4432
+ documentService;
4433
+ statusCalculatorService;
4434
+ contextId = SHARED.EMPTY;
4435
+ statusData;
4436
+ selectedStatus = null;
4437
+ statusDataWithPercentages = [];
4438
+ subscription = new Subscription();
4439
+ constructor(documentQuery, documentService, statusCalculatorService) {
4487
4440
  this.documentQuery = documentQuery;
4488
- this.userListService = userListService;
4489
- this.cdr = cdr;
4441
+ this.documentService = documentService;
4442
+ this.statusCalculatorService = statusCalculatorService;
4490
4443
  }
4491
4444
  ngOnChanges(changes) {
4492
- if (changes[SHARED.USER_LIST] && !changes[SHARED.USER_LIST].firstChange) {
4493
- this.initializeUserData();
4494
- }
4495
- if (changes[SHARED.CATEGORIES] && !changes[SHARED.CATEGORIES].firstChange) {
4496
- this.updateFilteredUserData();
4497
- }
4498
- }
4499
- initializeUserData() {
4500
- if (this.userList && this.userList.length > 0) {
4501
- this.userData = this.userListService.processUserData(this.userList);
4502
- this.updateFilteredUserData();
4503
- }
4504
- }
4505
- updateFilteredUserData() {
4506
- if (this.userData.length > 0 && this.categories.length > 0) {
4507
- this.filteredUserData = this.userListService.filterUsersByCategory(this.userData, this.categories);
4508
- this.shouldShowContainer = true;
4509
- if (this.selectedUser) {
4510
- const selectedUserInFiltered = this.filteredUserData.find(user => user.name === this.selectedUser);
4511
- if (!selectedUserInFiltered) {
4512
- this.selectedUser = undefined;
4513
- this.documentStore.setSelectedUserId(null);
4514
- this.userSelected.emit(SHARED.EMPTY);
4515
- }
4516
- }
4517
- }
4518
- else {
4519
- this.filteredUserData = this.userData;
4520
- this.shouldShowContainer = true;
4445
+ if (changes['contextId'] && !changes['contextId'].firstChange) {
4446
+ // When contextId changes, refetch status data for the new context
4447
+ this.refetchStatusData();
4521
4448
  }
4522
4449
  }
4523
4450
  ngOnInit() {
4524
- this.initializeUserData();
4525
- this.userListSubscription.add(this.documentQuery.selectUserList().subscribe(userList => {
4526
- if (userList && userList.length > 0) {
4527
- this.userList = userList;
4528
- this.initializeUserData();
4529
- this.cdr.markForCheck();
4530
- }
4531
- }));
4532
- this.categoriesSubscription.add(this.documentQuery.selectDocumentCategories().subscribe(categories => {
4533
- if (categories && categories.length > 0) {
4534
- this.categories = categories;
4535
- this.updateFilteredUserData();
4536
- this.cdr.markForCheck();
4537
- }
4451
+ this.subscription.add(this.documentQuery.selectSelectedStatus().subscribe(status => {
4452
+ this.selectedStatus = status;
4453
+ this.updateCalculatedStatusData();
4538
4454
  }));
4539
- this.userListSubscription.add(this.documentQuery.selectDocumentListResponse().subscribe(() => {
4540
- const currentUserList = this.documentQuery.getUserList();
4541
- if (currentUserList && currentUserList.length > 0) {
4542
- this.userList = currentUserList;
4543
- this.initializeUserData();
4544
- this.cdr.markForCheck();
4455
+ this.subscription.add(this.documentQuery.selectStatusData().subscribe(statusData => {
4456
+ if (statusData && statusData.length > 0) {
4457
+ this.statusData = statusData;
4458
+ this.updateCalculatedStatusData();
4545
4459
  }
4546
4460
  }));
4547
- this.documentQuery.selectSelectedUserId().subscribe(userId => {
4548
- if (userId) {
4549
- const user = this.userData.find(u => u._id === userId);
4550
- this.selectedUser = user ? user.name : undefined;
4551
- }
4552
- else {
4553
- this.selectedUser = undefined;
4554
- }
4555
- this.cdr.markForCheck();
4556
- });
4557
- this.documentQuery.selectShowUserList().subscribe(show => {
4558
- if (!show && this.selectedUser) {
4559
- this.selectedUser = undefined;
4560
- this.userSelected.emit(SHARED.EMPTY);
4561
- }
4562
- });
4563
- }
4564
- onUserSelect(username, id) {
4565
- if (this.selectedUser === username) {
4566
- this.selectedUser = undefined;
4567
- this.userListService.unselectUser();
4568
- this.userSelected.emit(SHARED.EMPTY);
4569
- }
4570
- else {
4571
- this.selectedUser = username;
4572
- this.documentStore.setSelectedUserId(id);
4573
- this.userSelected.emit(username);
4461
+ if (this.contextId && this.contextId !== SHARED.EMPTY) {
4462
+ this.refetchStatusData();
4574
4463
  }
4575
4464
  }
4576
- getAvatarColor(color) {
4577
- if (!color) {
4578
- return SHARED.DEFAULT_COLOR;
4465
+ refetchStatusData() {
4466
+ if (this.contextId && this.contextId !== SHARED.EMPTY) {
4467
+ const currentState = this.documentQuery.getSelectionState();
4468
+ const statusContextId = currentState.userId || null;
4469
+ const categoryId = currentState.menuItem || null;
4470
+ // Use the document service to refresh status data for the new context
4471
+ this.documentService.refreshStatusData(this.contextId, statusContextId, categoryId);
4579
4472
  }
4580
- return SHARED.COLOR_MAP[color] || SHARED.DEFAULT_COLOR;
4473
+ }
4474
+ selectStatus(status) {
4475
+ const newStatus = this.selectedStatus === status ? null : status;
4476
+ this.documentService.setSelectedStatus(newStatus);
4477
+ }
4478
+ updateCalculatedStatusData() {
4479
+ this.statusDataWithPercentages = this.statusCalculatorService.calculateStatusDataWithPercentages(this.statusData, this.selectedStatus);
4581
4480
  }
4582
4481
  ngOnDestroy() {
4583
- this.userListSubscription.unsubscribe();
4584
- this.categoriesSubscription.unsubscribe();
4585
- }
4586
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListComponent, deps: [{ token: DocumentHelperService }, { token: DocumentStore }, { token: DocumentQuery }, { token: UserListService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
4587
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UserListComponent, isStandalone: false, selector: "lib-user-list", inputs: { userList: "userList", categories: "categories" }, outputs: { userSelected: "userSelected" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"user-list-container\" [@slideInFromTop]>\r\n <div class=\"user-cards\">\r\n <div \r\n *ngFor=\"let user of filteredUserData\" \r\n class=\"user-card\"\r\n [class.selected]=\"selectedUser === user.name\"\r\n [style.border-color]=\"selectedUser === user.name ? getAvatarColor(user.color) : 'transparent'\"\r\n (click)=\"onUserSelect(user.name, user._id)\"\r\n >\r\n @if(user.name === \"Application Docs\"){\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\"><i class=\"pi pi-user\"></i></span>\r\n </div>\r\n }@else {\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\">{{ user.initials }}</span>\r\n </div>\r\n }\r\n <div class=\"user-info\">\r\n <div class=\"username\">{{ user.name }}</div>\r\n <div class=\"document-counts\">\r\n <span style=\"color : #16A34A;\"> {{ user.approved }} approved </span><span>/ {{ user.pending }} outstanding</span>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n <!-- Show message when filtered list is empty -->\r\n <div *ngIf=\"filteredUserData.length === 0 && shouldShowContainer\" class=\"no-users-message\" [@slideInFromTop]>\r\n <p>No users available for this category.</p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".user-list-container{padding:1rem 1rem .5rem}.user-cards{display:flex;flex-wrap:wrap;transition:all .3s ease-in-out}.user-card{display:flex;align-items:center;gap:.75rem;padding:1rem;border:2px solid transparent;border-radius:8px;cursor:pointer;transition:all .2s ease;background:#fff;min-width:140px;max-width:300px;height:70px;position:relative;flex-shrink:0}.user-card:hover{box-shadow:0 4px 8px #00000026}.user-card.selected{background-color:#f8fafc;box-shadow:0 4px 8px #00000026;border-width:2px}.user-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;color:#fff;font-size:14px;flex-shrink:0;font-weight:400}.avatar-orange{background-color:#fef3c7;color:#b45309}.avatar-blue{background-color:#dbeafe;color:#1d4ed8}.avatar-green{background-color:#22c55e1a;color:#36aa86}.avatar-grey{background-color:#ebeced;color:#5b6676}.avatar-purple{background-color:#3b82f61a;color:#3b82f6}.user-info{flex:1;min-width:0;overflow:hidden}.username{font-weight:600;color:#1f2937;margin-bottom:.25rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2}.document-counts{font-size:.875rem;color:#6b7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.35;padding-bottom:2px}.selection-indicator{position:absolute;top:8px;right:8px;width:20px;height:20px;background-color:#10b981;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px;flex-shrink:0}.no-users-message{display:flex;justify-content:center;align-items:center;padding:2rem;background:#f8fafc;border-radius:8px;border:2px dashed #d1d5db;margin:1rem 0}.no-users-message p{color:#6b7280;font-size:.875rem;font-weight:500;margin:0;text-align:center}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [
4588
- trigger('slideInFromTop', [
4589
- state('void', style({
4590
- opacity: 0,
4591
- transform: 'translateY(-10px)'
4592
- })),
4593
- state('*', style({
4594
- opacity: 1,
4595
- transform: 'translateY(0)'
4596
- })),
4597
- transition('void => *', [
4598
- animate('300ms ease-out')
4599
- ])
4600
- ]),
4601
- trigger('fadeIn', [
4602
- state('void', style({
4603
- opacity: 0,
4604
- transform: 'scale(0.8)'
4605
- })),
4606
- state('*', style({
4607
- opacity: 1,
4608
- transform: 'scale(1)'
4609
- })),
4610
- transition('void => *', [
4611
- animate('200ms ease-in-out')
4612
- ])
4613
- ])
4614
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4615
- }
4616
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListComponent, decorators: [{
4617
- type: Component,
4618
- args: [{ selector: 'lib-user-list', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, animations: [
4619
- trigger('slideInFromTop', [
4620
- state('void', style({
4621
- opacity: 0,
4622
- transform: 'translateY(-10px)'
4623
- })),
4624
- state('*', style({
4625
- opacity: 1,
4626
- transform: 'translateY(0)'
4627
- })),
4628
- transition('void => *', [
4629
- animate('300ms ease-out')
4630
- ])
4631
- ]),
4632
- trigger('fadeIn', [
4633
- state('void', style({
4634
- opacity: 0,
4635
- transform: 'scale(0.8)'
4636
- })),
4637
- state('*', style({
4638
- opacity: 1,
4639
- transform: 'scale(1)'
4640
- })),
4641
- transition('void => *', [
4642
- animate('200ms ease-in-out')
4643
- ])
4644
- ])
4645
- ], template: "<div class=\"user-list-container\" [@slideInFromTop]>\r\n <div class=\"user-cards\">\r\n <div \r\n *ngFor=\"let user of filteredUserData\" \r\n class=\"user-card\"\r\n [class.selected]=\"selectedUser === user.name\"\r\n [style.border-color]=\"selectedUser === user.name ? getAvatarColor(user.color) : 'transparent'\"\r\n (click)=\"onUserSelect(user.name, user._id)\"\r\n >\r\n @if(user.name === \"Application Docs\"){\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\"><i class=\"pi pi-user\"></i></span>\r\n </div>\r\n }@else {\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\">{{ user.initials }}</span>\r\n </div>\r\n }\r\n <div class=\"user-info\">\r\n <div class=\"username\">{{ user.name }}</div>\r\n <div class=\"document-counts\">\r\n <span style=\"color : #16A34A;\"> {{ user.approved }} approved </span><span>/ {{ user.pending }} outstanding</span>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n <!-- Show message when filtered list is empty -->\r\n <div *ngIf=\"filteredUserData.length === 0 && shouldShowContainer\" class=\"no-users-message\" [@slideInFromTop]>\r\n <p>No users available for this category.</p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".user-list-container{padding:1rem 1rem .5rem}.user-cards{display:flex;flex-wrap:wrap;transition:all .3s ease-in-out}.user-card{display:flex;align-items:center;gap:.75rem;padding:1rem;border:2px solid transparent;border-radius:8px;cursor:pointer;transition:all .2s ease;background:#fff;min-width:140px;max-width:300px;height:70px;position:relative;flex-shrink:0}.user-card:hover{box-shadow:0 4px 8px #00000026}.user-card.selected{background-color:#f8fafc;box-shadow:0 4px 8px #00000026;border-width:2px}.user-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;color:#fff;font-size:14px;flex-shrink:0;font-weight:400}.avatar-orange{background-color:#fef3c7;color:#b45309}.avatar-blue{background-color:#dbeafe;color:#1d4ed8}.avatar-green{background-color:#22c55e1a;color:#36aa86}.avatar-grey{background-color:#ebeced;color:#5b6676}.avatar-purple{background-color:#3b82f61a;color:#3b82f6}.user-info{flex:1;min-width:0;overflow:hidden}.username{font-weight:600;color:#1f2937;margin-bottom:.25rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2}.document-counts{font-size:.875rem;color:#6b7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.35;padding-bottom:2px}.selection-indicator{position:absolute;top:8px;right:8px;width:20px;height:20px;background-color:#10b981;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px;flex-shrink:0}.no-users-message{display:flex;justify-content:center;align-items:center;padding:2rem;background:#f8fafc;border-radius:8px;border:2px dashed #d1d5db;margin:1rem 0}.no-users-message p{color:#6b7280;font-size:.875rem;font-weight:500;margin:0;text-align:center}\n"] }]
4646
- }], ctorParameters: () => [{ type: DocumentHelperService }, { type: DocumentStore }, { type: DocumentQuery }, { type: UserListService }, { type: i0.ChangeDetectorRef }], propDecorators: { userList: [{
4647
- type: Input
4648
- }], categories: [{
4649
- type: Input
4650
- }], userSelected: [{
4651
- type: Output
4652
- }] } });
4653
-
4654
- class StatusCalculatorService {
4655
- calculateTotalCount(statusData) {
4656
- return statusData?.reduce((total, status) => total + (status.count ?? 0), 0) || 0;
4657
- }
4658
- calculateStatusDataWithPercentages(statusData, selectedStatus) {
4659
- if (!statusData)
4660
- return [];
4661
- const totalCount = this.calculateTotalCount(statusData);
4662
- return statusData.map((status) => {
4663
- // Normalize icon for reviewing status to use eye icon consistently
4664
- let normalizedIcon = status.icon;
4665
- if (status.status?.toLowerCase() === SHARED.REVIEWING_STATUS) {
4666
- normalizedIcon = SHARED.ICON_EYE;
4667
- }
4668
- return {
4669
- ...status,
4670
- icon: normalizedIcon,
4671
- percentage: totalCount > 0 ? (status.count ?? 0) / totalCount * 100 : 0,
4672
- isSelected: selectedStatus === status.status,
4673
- statusClass: status.status ? SHARED.STATUS_WITH_DASH + status.status.toLowerCase() : SHARED.EMPTY,
4674
- iconClass: SHARED.ICON_WITH_DASH + (status?.status?.toLowerCase() || SHARED.EMPTY)
4675
- };
4676
- });
4677
- }
4678
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StatusCalculatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4679
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StatusCalculatorService, providedIn: 'root' });
4680
- }
4681
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StatusCalculatorService, decorators: [{
4682
- type: Injectable,
4683
- args: [{
4684
- providedIn: 'root'
4685
- }]
4686
- }] });
4687
-
4688
- class DocumentStatusComponent {
4689
- documentQuery;
4690
- documentService;
4691
- statusCalculatorService;
4692
- contextId = SHARED.EMPTY;
4693
- statusData;
4694
- selectedStatus = null;
4695
- statusDataWithPercentages = [];
4696
- subscription = new Subscription();
4697
- constructor(documentQuery, documentService, statusCalculatorService) {
4698
- this.documentQuery = documentQuery;
4699
- this.documentService = documentService;
4700
- this.statusCalculatorService = statusCalculatorService;
4701
- }
4702
- ngOnChanges(changes) {
4703
- if (changes['contextId'] && !changes['contextId'].firstChange) {
4704
- // When contextId changes, refetch status data for the new context
4705
- this.refetchStatusData();
4706
- }
4707
- }
4708
- ngOnInit() {
4709
- this.subscription.add(this.documentQuery.selectSelectedStatus().subscribe(status => {
4710
- this.selectedStatus = status;
4711
- this.updateCalculatedStatusData();
4712
- }));
4713
- this.subscription.add(this.documentQuery.selectStatusData().subscribe(statusData => {
4714
- if (statusData && statusData.length > 0) {
4715
- this.statusData = statusData;
4716
- this.updateCalculatedStatusData();
4717
- }
4718
- }));
4719
- if (this.contextId && this.contextId !== SHARED.EMPTY) {
4720
- this.refetchStatusData();
4721
- }
4722
- }
4723
- refetchStatusData() {
4724
- if (this.contextId && this.contextId !== SHARED.EMPTY) {
4725
- const currentState = this.documentQuery.getSelectionState();
4726
- const statusContextId = currentState.userId || null;
4727
- const categoryId = currentState.menuItem || null;
4728
- // Use the document service to refresh status data for the new context
4729
- this.documentService.refreshStatusData(this.contextId, statusContextId, categoryId);
4730
- }
4731
- }
4732
- selectStatus(status) {
4733
- const newStatus = this.selectedStatus === status ? null : status;
4734
- this.documentService.setSelectedStatus(newStatus);
4735
- }
4736
- updateCalculatedStatusData() {
4737
- this.statusDataWithPercentages = this.statusCalculatorService.calculateStatusDataWithPercentages(this.statusData, this.selectedStatus);
4738
- }
4739
- ngOnDestroy() {
4740
- this.subscription.unsubscribe();
4482
+ this.subscription.unsubscribe();
4741
4483
  }
4742
4484
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentStatusComponent, deps: [{ token: DocumentQuery }, { token: DocumentHelperService }, { token: StatusCalculatorService }], target: i0.ɵɵFactoryTarget.Component });
4743
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentStatusComponent, isStandalone: false, selector: "lib-document-status", inputs: { contextId: "contextId", statusData: "statusData" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"status-summary-container\">\r\n <div class=\"status-cards\">\r\n \r\n <div \r\n *ngFor=\"let status of statusDataWithPercentages\" \r\n class=\"status-card {{ status.statusClass }}\"\r\n [class.selected]=\"status.isSelected\"\r\n (click)=\"selectStatus(status.status || '')\"\r\n >\r\n <div class=\"status-icon {{ status.iconClass }}\">\r\n <i [class]=\"status.icon\"></i>\r\n </div>\r\n <div class=\"status-info\">\r\n <div class=\"status-count\">{{ status.count }}</div>\r\n <div class=\"status-name\">{{ status.status }}</div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n \r\n <div class=\"progress-bar-container\">\r\n <div class=\"progress-bar\">\r\n <div \r\n *ngFor=\"let status of statusDataWithPercentages\" \r\n class=\"progress-segment\"\r\n [style.width.%]=\"status.percentage\"\r\n [style.background-color]=\"status.color\"\r\n ></div>\r\n </div>\r\n </div>\r\n</div>", styles: [".status-summary-container{padding:1rem;padding-top:0}.status-cards{display:flex;flex-wrap:wrap;gap:1rem;margin-bottom:1.5rem}.status-card{display:flex;align-items:center;gap:.75rem;padding:.7rem;border-radius:8px;background:#fff;box-shadow:0 2px 4px #0000001a;min-width:150px;flex:1;cursor:pointer;transition:all .2s ease;border:2px solid transparent}.status-card:hover{transform:translateY(-2px);box-shadow:0 4px 8px #00000026}.status-card.selected{border-width:3px!important;border-style:solid!important;box-shadow:0 4px 12px #0003}.status-card.selected.status-approved,.status-card.selected.status-uploaded{border-color:#10b981!important;background:#ecfdf5!important}.status-card.selected.status-pending{border-color:#6b7280!important;background:#f8fafc!important}.status-card.selected.status-reviewing{border-color:#f59e0b!important;background:#fffbeb!important}.status-card.selected.status-rejected{border-color:#ef4444!important;background:#fff1f2!important}.status-card.selected.status-alert{border-color:#dc2626!important;background:#ef4444!important}.status-card.status-approved{background:#ecfdf5}.status-card.status-approved .status-name{color:#065f46}.status-card.status-approved .status-count{color:#047857}.status-card.status-uploaded{background:#ecfdf5}.status-card.status-uploaded .status-name{color:#065f46}.status-card.status-uploaded .status-count{color:#047857}.status-card.status-pending{background:#f8fafc}.status-card.status-pending .status-name{color:#475569}.status-card.status-pending .status-count{color:#334155}.status-card.status-reviewing{background:#fffbeb}.status-card.status-reviewing .status-name{color:#92400e}.status-card.status-reviewing .status-count{color:#a16207}.status-card.status-rejected{background:#fff1f2}.status-card.status-rejected .status-name{color:#be123c}.status-card.status-rejected .status-count{color:#e11d48}.status-card.status-alert{background:#ef4444}.status-card.status-alert .status-name,.status-card.status-alert .status-count{color:#fff}.status-icon{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:18px;color:#fff}.icon-approved,.icon-uploaded{background-color:#10b981}.icon-pending{background-color:#6b7280}.icon-reviewing{background-color:#f59e0b}.icon-rejected{background-color:#ef4444}.icon-alert{background-color:#dc2626}.status-info{flex:1}.status-name{font-weight:600;color:#1f2937;margin-bottom:.25rem}.status-count{font-size:1.2rem;font-weight:700;color:#374151}.progress-bar-container{margin-top:1rem}.progress-bar{height:8px;background-color:#e5e7eb;border-radius:4px;overflow:hidden;display:flex}.progress-segment{height:100%;transition:width .3s ease}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
4485
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentStatusComponent, isStandalone: false, selector: "lib-document-status", inputs: { contextId: "contextId", statusData: "statusData" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"status-summary-container\">\r\n <div class=\"status-cards\">\r\n \r\n <div \r\n *ngFor=\"let status of statusDataWithPercentages\" \r\n class=\"status-card {{ status.statusClass }}\"\r\n [class.selected]=\"status.isSelected\"\r\n (click)=\"selectStatus(status.status || '')\"\r\n >\r\n <div class=\"status-icon {{ status.iconClass }}\">\r\n <i [class]=\"status.icon\"></i>\r\n </div>\r\n <div class=\"status-info\">\r\n <div class=\"status-count\">{{ status.count }}</div>\r\n <div class=\"status-name\">{{ status.status }}</div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n \r\n <div class=\"progress-bar-container\">\r\n <div class=\"progress-bar\">\r\n <div \r\n *ngFor=\"let status of statusDataWithPercentages\" \r\n class=\"progress-segment\"\r\n [style.width.%]=\"status.percentage\"\r\n [style.background-color]=\"status.color\"\r\n ></div>\r\n </div>\r\n </div>\r\n</div>", styles: [".status-summary-container{padding:1rem;padding-top:0}.status-cards{display:flex;flex-wrap:wrap;gap:1rem;margin-bottom:1.5rem}.status-card{display:flex;align-items:center;gap:.75rem;padding:.7rem;border-radius:8px;background:#fff;box-shadow:0 2px 4px #0000001a;min-width:150px;flex:1;cursor:pointer;transition:all .2s ease;border:2px solid transparent}.status-card:hover{transform:translateY(-2px);box-shadow:0 4px 8px #00000026}.status-card.selected{border-width:3px!important;border-style:solid!important;box-shadow:0 4px 12px #0003}.status-card.selected.status-approved,.status-card.selected.status-uploaded{border-color:#10b981!important;background:#ecfdf5!important}.status-card.selected.status-pending{border-color:#6b7280!important;background:#f8fafc!important}.status-card.selected.status-reviewing{border-color:#f59e0b!important;background:#fffbeb!important}.status-card.selected.status-rejected{border-color:#ef4444!important;background:#fff1f2!important}.status-card.selected.status-alert{border-color:#dc2626!important;background:#ef4444!important}.status-card.status-approved{background:#ecfdf5}.status-card.status-approved .status-name{color:#065f46}.status-card.status-approved .status-count{color:#047857}.status-card.status-uploaded{background:#ecfdf5}.status-card.status-uploaded .status-name{color:#065f46}.status-card.status-uploaded .status-count{color:#047857}.status-card.status-pending{background:#f8fafc}.status-card.status-pending .status-name{color:#475569}.status-card.status-pending .status-count{color:#334155}.status-card.status-reviewing{background:#fffbeb}.status-card.status-reviewing .status-name{color:#92400e}.status-card.status-reviewing .status-count{color:#a16207}.status-card.status-rejected{background:#fff1f2}.status-card.status-rejected .status-name{color:#be123c}.status-card.status-rejected .status-count{color:#e11d48}.status-card.status-alert{background:#ef4444}.status-card.status-alert .status-name,.status-card.status-alert .status-count{color:#fff}.status-icon{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:18px;color:#fff}.icon-approved,.icon-uploaded{background-color:#10b981}.icon-pending{background-color:#6b7280}.icon-reviewing{background-color:#f59e0b}.icon-rejected{background-color:#ef4444}.icon-alert{background-color:#dc2626}.status-info{flex:1}.status-name{font-weight:600;color:#1f2937;margin-bottom:.25rem}.status-count{font-size:1.2rem;font-weight:700;color:#374151}.progress-bar-container{margin-top:1rem}.progress-bar{height:8px;background-color:#e5e7eb;border-radius:4px;overflow:hidden;display:flex}.progress-segment{height:100%;transition:width .3s ease}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
4744
4486
  }
4745
4487
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentStatusComponent, decorators: [{
4746
4488
  type: Component,
@@ -4876,11 +4618,11 @@ class DocumentSearchComponent {
4876
4618
  }
4877
4619
  };
4878
4620
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentSearchComponent, deps: [{ token: DocumentHelperService }, { token: DocumentQuery }], target: i0.ɵɵFactoryTarget.Component });
4879
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentSearchComponent, isStandalone: false, selector: "document-search", inputs: { contextId: "contextId" }, outputs: { onActionClick: "onActionClick", onRequestClick: "onRequestClick" }, ngImport: i0, template: "<div class=\"search-container\">\r\n <div class=\"search-header\">\r\n <h2 class=\"ml-3 document-heading\">Documents</h2> \r\n </div>\r\n <div class=\"search-input-wrapper\">\r\n <input \r\n type=\"text\" \r\n [(ngModel)]=\"searchTerm\"\r\n (ngModelChange)=\"onSearchInputChange($event)\"\r\n class=\"search-input\"\r\n placeholder=\"Search by document name, category, type, status or applicant name...\"\r\n [attr.aria-label]=\"'Search documents'\"\r\n />\r\n <button \r\n *ngIf=\"searchTerm\"\r\n type=\"button\"\r\n class=\"clear-button\"\r\n (click)=\"onClearSearch()\"\r\n [attr.aria-label]=\"'Clear search'\"\r\n >\r\n <i class=\"pi pi-times\"></i>\r\n </button>\r\n </div>\r\n\r\n <button \r\n *ngIf=\"shouldShowClearAll\"\r\n type=\"button\"\r\n class=\"clear-all-filters-link\"\r\n (click)=\"onClearAllFilters()\"\r\n [attr.aria-label]=\"'Clear all'\"\r\n >\r\n Clear All\r\n <i class=\"pi pi-times\"></i>\r\n </button>\r\n\r\n <div class=\"filters-section\">\r\n <div class=\"actions-menu\">\r\n <button \r\n type=\"button\"\r\n class=\"actions-btn\" \r\n (click)=\"toggleActionsMenu()\" \r\n [class.active]=\"showActionsMenu\"\r\n [attr.aria-label]=\"'Open actions menu'\"\r\n [attr.aria-expanded]=\"showActionsMenu\"\r\n >\r\n Actions\r\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\r\n </button>\r\n\r\n <!-- Actions Dropdown Menu -->\r\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\">\r\n <div class=\"dropdown-item\" (click)=\"handleUploadDocument()\">\r\n <i class=\"pi pi-upload\"></i>\r\n <span>Upload Document</span>\r\n </div>\r\n <div class=\"dropdown-item\" (click)=\"handleRequestDocument()\">\r\n <i class=\"pi pi-file\"></i>\r\n <span>Request Document</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div> ", styles: [".search-container{display:flex;align-items:center;gap:1rem;width:100%;justify-content:flex-start;padding:10px}.search-input-wrapper{position:relative;flex:1;display:flex;align-items:center;max-width:50%;min-width:300px}.clear-all-filters-link{background:none;border:none;color:#0f8bfd;cursor:pointer;padding:8px 12px;border-radius:4px;font-size:16px;font-weight:500;text-decoration:none!important;transition:background-color .2s ease,color .2s ease;white-space:nowrap;flex-shrink:0;display:flex;justify-content:center;align-items:center;gap:4px}.filters-section{display:flex;align-items:center;gap:1rem;flex-shrink:0;margin-left:auto}.filters-section .actions-menu{position:relative}.filters-section .actions-menu .actions-btn{background:#0f8bfd;border:none;border-radius:8px;padding:8px 10px;color:#fff;font-size:12px;font-weight:700;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s ease;white-space:nowrap}.filters-section .actions-menu .actions-btn:hover{background:#0d7ae6;transform:translateY(-1px)}.filters-section .actions-menu .actions-btn:active{transform:translateY(0)}.filters-section .actions-menu .actions-btn.active{background:#0d7ae6}.filters-section .actions-menu .actions-btn:focus{outline:none;box-shadow:0 0 0 3px #0f8bfd4d}.filters-section .actions-menu .actions-btn i{font-size:.75rem;transition:transform .2s}.filters-section .actions-menu .actions-btn i.rotated{transform:rotate(180deg)}.filters-section .actions-menu .actions-dropdown{position:absolute;top:calc(100% + .5rem);right:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:200px;overflow:hidden}.filters-section .actions-menu .actions-dropdown .dropdown-item{padding:.75rem 1rem;cursor:pointer;color:#374151;font-size:.875rem;transition:background-color .2s;display:flex;align-items:center;gap:.75rem}.filters-section .actions-menu .actions-dropdown .dropdown-item i{font-size:1rem;color:#6b7280}.filters-section .actions-menu .actions-dropdown .dropdown-item:hover{background-color:#f3f4f6}.filters-section .actions-menu .actions-dropdown .dropdown-item:not(:last-child){border-bottom:1px solid #f3f4f6}.filters-section .actions-menu .actions-dropdown .dropdown-item:active{background-color:#e5e7eb}.search-icon{position:absolute;left:12px;color:#6c757d;z-index:1}.search-input{width:100%;padding:10px 12px;border:1px solid #dee2e6;border-radius:8px;font-size:14px;outline:none;transition:border-color .2s ease,box-shadow .2s ease}.search-input:focus{border-color:#0f8bfd;box-shadow:0 0 0 3px #0f8bfd1a}.search-input::placeholder{color:#6c757d}.clear-button{position:absolute;right:12px;background:none;border:none;color:#6c757d;cursor:pointer;padding:4px;border-radius:4px;transition:background-color .2s ease,color .2s ease}.clear-button:hover{background-color:#f8f9fa;color:#495057}@media (max-width: 768px){.search-container{flex-direction:column;gap:.75rem}.search-input-wrapper{max-width:100%}.filters-section{width:100%;justify-content:center;gap:.5rem}.filters-section .actions-menu .actions-btn{width:auto;justify-content:center}.filters-section .actions-menu .actions-dropdown{left:50%;transform:translate(-50%);right:auto}}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9$1.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: i9$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
4621
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentSearchComponent, isStandalone: false, selector: "document-search", inputs: { contextId: "contextId" }, outputs: { onActionClick: "onActionClick", onRequestClick: "onRequestClick" }, ngImport: i0, template: "<div class=\"search-container\">\r\n <div class=\"search-header\">\r\n <h2 class=\"ml-3 document-heading\">Documents</h2> \r\n </div>\r\n <div class=\"search-input-wrapper\">\r\n <input \r\n type=\"text\" \r\n [(ngModel)]=\"searchTerm\"\r\n (ngModelChange)=\"onSearchInputChange($event)\"\r\n class=\"search-input\"\r\n placeholder=\"Search by document name, category, type, status or applicant name...\"\r\n [attr.aria-label]=\"'Search documents'\"\r\n />\r\n <button \r\n *ngIf=\"searchTerm\"\r\n type=\"button\"\r\n class=\"clear-button\"\r\n (click)=\"onClearSearch()\"\r\n [attr.aria-label]=\"'Clear search'\"\r\n >\r\n <i class=\"pi pi-times\"></i>\r\n </button>\r\n </div>\r\n\r\n <button \r\n *ngIf=\"shouldShowClearAll\"\r\n type=\"button\"\r\n class=\"clear-all-filters-link\"\r\n (click)=\"onClearAllFilters()\"\r\n [attr.aria-label]=\"'Clear all'\"\r\n >\r\n Clear All\r\n <i class=\"pi pi-times\"></i>\r\n </button>\r\n\r\n <div class=\"filters-section\">\r\n <div class=\"actions-menu\">\r\n <button \r\n type=\"button\"\r\n class=\"actions-btn\" \r\n (click)=\"toggleActionsMenu()\" \r\n [class.active]=\"showActionsMenu\"\r\n [attr.aria-label]=\"'Open actions menu'\"\r\n [attr.aria-expanded]=\"showActionsMenu\"\r\n >\r\n Actions\r\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\r\n </button>\r\n\r\n <!-- Actions Dropdown Menu -->\r\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\">\r\n <!-- <div class=\"dropdown-item\" (click)=\"handleUploadDocument()\">\r\n <i class=\"pi pi-upload\"></i>\r\n <span>Upload Document</span>\r\n </div> -->\r\n <div class=\"dropdown-item\" (click)=\"handleRequestDocument()\">\r\n <i class=\"pi pi-file\"></i>\r\n <span>Request Document</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div> ", styles: [".search-container{display:flex;align-items:center;gap:1rem;width:100%;justify-content:flex-start;padding:10px}.search-input-wrapper{position:relative;flex:1;display:flex;align-items:center;max-width:50%;min-width:300px}.clear-all-filters-link{background:none;border:none;color:#0f8bfd;cursor:pointer;padding:8px 12px;border-radius:4px;font-size:16px;font-weight:500;text-decoration:none!important;transition:background-color .2s ease,color .2s ease;white-space:nowrap;flex-shrink:0;display:flex;justify-content:center;align-items:center;gap:4px}.filters-section{display:flex;align-items:center;gap:1rem;flex-shrink:0;margin-left:auto}.filters-section .actions-menu{position:relative}.filters-section .actions-menu .actions-btn{background:#0f8bfd;border:none;border-radius:8px;padding:8px 10px;color:#fff;font-size:12px;font-weight:700;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s ease;white-space:nowrap}.filters-section .actions-menu .actions-btn:hover{background:#0d7ae6;transform:translateY(-1px)}.filters-section .actions-menu .actions-btn:active{transform:translateY(0)}.filters-section .actions-menu .actions-btn.active{background:#0d7ae6}.filters-section .actions-menu .actions-btn:focus{outline:none;box-shadow:0 0 0 3px #0f8bfd4d}.filters-section .actions-menu .actions-btn i{font-size:.75rem;transition:transform .2s}.filters-section .actions-menu .actions-btn i.rotated{transform:rotate(180deg)}.filters-section .actions-menu .actions-dropdown{position:absolute;top:calc(100% + .5rem);right:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:200px;overflow:hidden}.filters-section .actions-menu .actions-dropdown .dropdown-item{padding:.75rem 1rem;cursor:pointer;color:#374151;font-size:.875rem;transition:background-color .2s;display:flex;align-items:center;gap:.75rem}.filters-section .actions-menu .actions-dropdown .dropdown-item i{font-size:1rem;color:#6b7280}.filters-section .actions-menu .actions-dropdown .dropdown-item:hover{background-color:#f3f4f6}.filters-section .actions-menu .actions-dropdown .dropdown-item:not(:last-child){border-bottom:1px solid #f3f4f6}.filters-section .actions-menu .actions-dropdown .dropdown-item:active{background-color:#e5e7eb}.search-icon{position:absolute;left:12px;color:#6c757d;z-index:1}.search-input{width:100%;padding:10px 12px;border:1px solid #dee2e6;border-radius:8px;font-size:14px;outline:none;transition:border-color .2s ease,box-shadow .2s ease}.search-input:focus{border-color:#0f8bfd;box-shadow:0 0 0 3px #0f8bfd1a}.search-input::placeholder{color:#6c757d}.clear-button{position:absolute;right:12px;background:none;border:none;color:#6c757d;cursor:pointer;padding:4px;border-radius:4px;transition:background-color .2s ease,color .2s ease}.clear-button:hover{background-color:#f8f9fa;color:#495057}@media (max-width: 768px){.search-container{flex-direction:column;gap:.75rem}.search-input-wrapper{max-width:100%}.filters-section{width:100%;justify-content:center;gap:.5rem}.filters-section .actions-menu .actions-btn{width:auto;justify-content:center}.filters-section .actions-menu .actions-dropdown{left:50%;transform:translate(-50%);right:auto}}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
4880
4622
  }
4881
4623
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentSearchComponent, decorators: [{
4882
4624
  type: Component,
4883
- args: [{ selector: 'document-search', standalone: false, template: "<div class=\"search-container\">\r\n <div class=\"search-header\">\r\n <h2 class=\"ml-3 document-heading\">Documents</h2> \r\n </div>\r\n <div class=\"search-input-wrapper\">\r\n <input \r\n type=\"text\" \r\n [(ngModel)]=\"searchTerm\"\r\n (ngModelChange)=\"onSearchInputChange($event)\"\r\n class=\"search-input\"\r\n placeholder=\"Search by document name, category, type, status or applicant name...\"\r\n [attr.aria-label]=\"'Search documents'\"\r\n />\r\n <button \r\n *ngIf=\"searchTerm\"\r\n type=\"button\"\r\n class=\"clear-button\"\r\n (click)=\"onClearSearch()\"\r\n [attr.aria-label]=\"'Clear search'\"\r\n >\r\n <i class=\"pi pi-times\"></i>\r\n </button>\r\n </div>\r\n\r\n <button \r\n *ngIf=\"shouldShowClearAll\"\r\n type=\"button\"\r\n class=\"clear-all-filters-link\"\r\n (click)=\"onClearAllFilters()\"\r\n [attr.aria-label]=\"'Clear all'\"\r\n >\r\n Clear All\r\n <i class=\"pi pi-times\"></i>\r\n </button>\r\n\r\n <div class=\"filters-section\">\r\n <div class=\"actions-menu\">\r\n <button \r\n type=\"button\"\r\n class=\"actions-btn\" \r\n (click)=\"toggleActionsMenu()\" \r\n [class.active]=\"showActionsMenu\"\r\n [attr.aria-label]=\"'Open actions menu'\"\r\n [attr.aria-expanded]=\"showActionsMenu\"\r\n >\r\n Actions\r\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\r\n </button>\r\n\r\n <!-- Actions Dropdown Menu -->\r\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\">\r\n <div class=\"dropdown-item\" (click)=\"handleUploadDocument()\">\r\n <i class=\"pi pi-upload\"></i>\r\n <span>Upload Document</span>\r\n </div>\r\n <div class=\"dropdown-item\" (click)=\"handleRequestDocument()\">\r\n <i class=\"pi pi-file\"></i>\r\n <span>Request Document</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div> ", styles: [".search-container{display:flex;align-items:center;gap:1rem;width:100%;justify-content:flex-start;padding:10px}.search-input-wrapper{position:relative;flex:1;display:flex;align-items:center;max-width:50%;min-width:300px}.clear-all-filters-link{background:none;border:none;color:#0f8bfd;cursor:pointer;padding:8px 12px;border-radius:4px;font-size:16px;font-weight:500;text-decoration:none!important;transition:background-color .2s ease,color .2s ease;white-space:nowrap;flex-shrink:0;display:flex;justify-content:center;align-items:center;gap:4px}.filters-section{display:flex;align-items:center;gap:1rem;flex-shrink:0;margin-left:auto}.filters-section .actions-menu{position:relative}.filters-section .actions-menu .actions-btn{background:#0f8bfd;border:none;border-radius:8px;padding:8px 10px;color:#fff;font-size:12px;font-weight:700;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s ease;white-space:nowrap}.filters-section .actions-menu .actions-btn:hover{background:#0d7ae6;transform:translateY(-1px)}.filters-section .actions-menu .actions-btn:active{transform:translateY(0)}.filters-section .actions-menu .actions-btn.active{background:#0d7ae6}.filters-section .actions-menu .actions-btn:focus{outline:none;box-shadow:0 0 0 3px #0f8bfd4d}.filters-section .actions-menu .actions-btn i{font-size:.75rem;transition:transform .2s}.filters-section .actions-menu .actions-btn i.rotated{transform:rotate(180deg)}.filters-section .actions-menu .actions-dropdown{position:absolute;top:calc(100% + .5rem);right:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:200px;overflow:hidden}.filters-section .actions-menu .actions-dropdown .dropdown-item{padding:.75rem 1rem;cursor:pointer;color:#374151;font-size:.875rem;transition:background-color .2s;display:flex;align-items:center;gap:.75rem}.filters-section .actions-menu .actions-dropdown .dropdown-item i{font-size:1rem;color:#6b7280}.filters-section .actions-menu .actions-dropdown .dropdown-item:hover{background-color:#f3f4f6}.filters-section .actions-menu .actions-dropdown .dropdown-item:not(:last-child){border-bottom:1px solid #f3f4f6}.filters-section .actions-menu .actions-dropdown .dropdown-item:active{background-color:#e5e7eb}.search-icon{position:absolute;left:12px;color:#6c757d;z-index:1}.search-input{width:100%;padding:10px 12px;border:1px solid #dee2e6;border-radius:8px;font-size:14px;outline:none;transition:border-color .2s ease,box-shadow .2s ease}.search-input:focus{border-color:#0f8bfd;box-shadow:0 0 0 3px #0f8bfd1a}.search-input::placeholder{color:#6c757d}.clear-button{position:absolute;right:12px;background:none;border:none;color:#6c757d;cursor:pointer;padding:4px;border-radius:4px;transition:background-color .2s ease,color .2s ease}.clear-button:hover{background-color:#f8f9fa;color:#495057}@media (max-width: 768px){.search-container{flex-direction:column;gap:.75rem}.search-input-wrapper{max-width:100%}.filters-section{width:100%;justify-content:center;gap:.5rem}.filters-section .actions-menu .actions-btn{width:auto;justify-content:center}.filters-section .actions-menu .actions-dropdown{left:50%;transform:translate(-50%);right:auto}}\n"] }]
4625
+ args: [{ selector: 'document-search', standalone: false, template: "<div class=\"search-container\">\r\n <div class=\"search-header\">\r\n <h2 class=\"ml-3 document-heading\">Documents</h2> \r\n </div>\r\n <div class=\"search-input-wrapper\">\r\n <input \r\n type=\"text\" \r\n [(ngModel)]=\"searchTerm\"\r\n (ngModelChange)=\"onSearchInputChange($event)\"\r\n class=\"search-input\"\r\n placeholder=\"Search by document name, category, type, status or applicant name...\"\r\n [attr.aria-label]=\"'Search documents'\"\r\n />\r\n <button \r\n *ngIf=\"searchTerm\"\r\n type=\"button\"\r\n class=\"clear-button\"\r\n (click)=\"onClearSearch()\"\r\n [attr.aria-label]=\"'Clear search'\"\r\n >\r\n <i class=\"pi pi-times\"></i>\r\n </button>\r\n </div>\r\n\r\n <button \r\n *ngIf=\"shouldShowClearAll\"\r\n type=\"button\"\r\n class=\"clear-all-filters-link\"\r\n (click)=\"onClearAllFilters()\"\r\n [attr.aria-label]=\"'Clear all'\"\r\n >\r\n Clear All\r\n <i class=\"pi pi-times\"></i>\r\n </button>\r\n\r\n <div class=\"filters-section\">\r\n <div class=\"actions-menu\">\r\n <button \r\n type=\"button\"\r\n class=\"actions-btn\" \r\n (click)=\"toggleActionsMenu()\" \r\n [class.active]=\"showActionsMenu\"\r\n [attr.aria-label]=\"'Open actions menu'\"\r\n [attr.aria-expanded]=\"showActionsMenu\"\r\n >\r\n Actions\r\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\r\n </button>\r\n\r\n <!-- Actions Dropdown Menu -->\r\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\">\r\n <!-- <div class=\"dropdown-item\" (click)=\"handleUploadDocument()\">\r\n <i class=\"pi pi-upload\"></i>\r\n <span>Upload Document</span>\r\n </div> -->\r\n <div class=\"dropdown-item\" (click)=\"handleRequestDocument()\">\r\n <i class=\"pi pi-file\"></i>\r\n <span>Request Document</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div> ", styles: [".search-container{display:flex;align-items:center;gap:1rem;width:100%;justify-content:flex-start;padding:10px}.search-input-wrapper{position:relative;flex:1;display:flex;align-items:center;max-width:50%;min-width:300px}.clear-all-filters-link{background:none;border:none;color:#0f8bfd;cursor:pointer;padding:8px 12px;border-radius:4px;font-size:16px;font-weight:500;text-decoration:none!important;transition:background-color .2s ease,color .2s ease;white-space:nowrap;flex-shrink:0;display:flex;justify-content:center;align-items:center;gap:4px}.filters-section{display:flex;align-items:center;gap:1rem;flex-shrink:0;margin-left:auto}.filters-section .actions-menu{position:relative}.filters-section .actions-menu .actions-btn{background:#0f8bfd;border:none;border-radius:8px;padding:8px 10px;color:#fff;font-size:12px;font-weight:700;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s ease;white-space:nowrap}.filters-section .actions-menu .actions-btn:hover{background:#0d7ae6;transform:translateY(-1px)}.filters-section .actions-menu .actions-btn:active{transform:translateY(0)}.filters-section .actions-menu .actions-btn.active{background:#0d7ae6}.filters-section .actions-menu .actions-btn:focus{outline:none;box-shadow:0 0 0 3px #0f8bfd4d}.filters-section .actions-menu .actions-btn i{font-size:.75rem;transition:transform .2s}.filters-section .actions-menu .actions-btn i.rotated{transform:rotate(180deg)}.filters-section .actions-menu .actions-dropdown{position:absolute;top:calc(100% + .5rem);right:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:200px;overflow:hidden}.filters-section .actions-menu .actions-dropdown .dropdown-item{padding:.75rem 1rem;cursor:pointer;color:#374151;font-size:.875rem;transition:background-color .2s;display:flex;align-items:center;gap:.75rem}.filters-section .actions-menu .actions-dropdown .dropdown-item i{font-size:1rem;color:#6b7280}.filters-section .actions-menu .actions-dropdown .dropdown-item:hover{background-color:#f3f4f6}.filters-section .actions-menu .actions-dropdown .dropdown-item:not(:last-child){border-bottom:1px solid #f3f4f6}.filters-section .actions-menu .actions-dropdown .dropdown-item:active{background-color:#e5e7eb}.search-icon{position:absolute;left:12px;color:#6c757d;z-index:1}.search-input{width:100%;padding:10px 12px;border:1px solid #dee2e6;border-radius:8px;font-size:14px;outline:none;transition:border-color .2s ease,box-shadow .2s ease}.search-input:focus{border-color:#0f8bfd;box-shadow:0 0 0 3px #0f8bfd1a}.search-input::placeholder{color:#6c757d}.clear-button{position:absolute;right:12px;background:none;border:none;color:#6c757d;cursor:pointer;padding:4px;border-radius:4px;transition:background-color .2s ease,color .2s ease}.clear-button:hover{background-color:#f8f9fa;color:#495057}@media (max-width: 768px){.search-container{flex-direction:column;gap:.75rem}.search-input-wrapper{max-width:100%}.filters-section{width:100%;justify-content:center;gap:.5rem}.filters-section .actions-menu .actions-btn{width:auto;justify-content:center}.filters-section .actions-menu .actions-dropdown{left:50%;transform:translate(-50%);right:auto}}\n"] }]
4884
4626
  }], ctorParameters: () => [{ type: DocumentHelperService }, { type: DocumentQuery }], propDecorators: { contextId: [{
4885
4627
  type: Input
4886
4628
  }], onActionClick: [{
@@ -5163,7 +4905,7 @@ class SidebarComponent {
5163
4905
  this.destroy$.complete();
5164
4906
  }
5165
4907
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SidebarComponent, deps: [{ token: i3.ConfirmationService }], target: i0.ɵɵFactoryTarget.Component });
5166
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SidebarComponent, isStandalone: false, selector: "lib-sidebar", inputs: { visible: "visible", position: "position", width: "width", title: "title", showCloseButton: "showCloseButton", modal: "modal", dismissible: "dismissible", styleClass: "styleClass", appendTo: "appendTo", blockScroll: "blockScroll", closeIcon: "closeIcon", showSaveButton: "showSaveButton", saveButtonText: "saveButtonText", saveButtonDisabled: "saveButtonDisabled", successMessage: "successMessage", errorMessage: "errorMessage", hasUnsavedChanges: "hasUnsavedChanges" }, outputs: { visibleChange: "visibleChange", onShow: "onShow", onHide: "onHide", onSave: "onSave", onClose: "onClose" }, host: { listeners: { "document:keydown.escape": "handleEscapeKey($event)" } }, ngImport: i0, template: "<!-- PrimeNG Sidebar with proper backdrop handling -->\r\n<div *ngIf=\"visible\" class=\"backdrop-shadow\" (click)=\"handleClose()\"></div>\r\n\r\n<p-sidebar \r\n [(visible)]=\"visible\"\r\n [position]=\"position\"\r\n [style]=\"{width: width}\"\r\n [dismissible]=\"true\"\r\n [showCloseIcon]=\"false\"\r\n [appendTo]=\"'body'\"\r\n [blockScroll]=\"blockScroll\"\r\n (visibleChange)=\"onVisibleChange($event)\"\r\n (onShow)=\"onShow.emit()\"\r\n (onHide)=\"onSidebarHide()\"\r\n>\r\n <ng-template pTemplate=\"header\" *ngIf=\"title || showCloseButton || showSaveButton\">\r\n <div class=\"sidebar-header\">\r\n <h3 *ngIf=\"title\" class=\"sidebar-title\">{{ title }}</h3>\r\n <div class=\"header-content\">\r\n <ng-content select=\"[header]\"></ng-content>\r\n \r\n <p-messages \r\n *ngIf=\"showSuccessMessage\"\r\n severity=\"success\"\r\n [closable]=\"false\"\r\n [style]=\"{'margin-bottom': '0.5rem'}\"\r\n class=\"ml-3\"\r\n >\r\n <ng-template pTemplate=\"message\">\r\n <span>{{ successMessage }}</span>\r\n </ng-template>\r\n </p-messages>\r\n \r\n <p-messages \r\n *ngIf=\"showErrorMessage\"\r\n severity=\"error\"\r\n [closable]=\"false\"\r\n [style]=\"{'margin-bottom': '0.5rem'}\"\r\n class=\"ml-3\"\r\n >\r\n <ng-template pTemplate=\"message\">\r\n <span>{{ errorMessage }}</span>\r\n </ng-template>\r\n </p-messages>\r\n\r\n <div class=\"header-actions mr-3\">\r\n <button \r\n *ngIf=\"showSaveButton\"\r\n pButton \r\n type=\"button\" \r\n [label]=\"saveButtonText\"\r\n [disabled]=\"saveButtonDisabled\"\r\n class=\"p-button-primary\"\r\n (click)=\"onSave.emit()\"\r\n ></button>\r\n\r\n <button \r\n *ngIf=\"showCloseButton\"\r\n pButton \r\n type=\"button\" \r\n icon=\"pi pi-times\"\r\n class=\"p-button-text p-button-rounded\"\r\n (click)=\"handleClose()\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"content\">\r\n <div class=\"sidebar-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </ng-template>\r\n</p-sidebar>\r\n", styles: [":host{display:block}.backdrop-shadow{position:fixed;top:0;left:0;width:100%;height:100%;background:#00000080;z-index:1000}.sidebar-header{display:flex;justify-content:flex-end;align-items:center;padding:0;width:100%;gap:1rem}.sidebar-header ::ng-deep .p-messages .p-message-success{margin-left:2rem;font-size:15px}.sidebar-header ::ng-deep .p-messages .p-message-wrapper{padding:1rem}.sidebar-title{margin:0;font-size:1.25rem;font-weight:600;color:#212529;flex:0 1 auto;white-space:nowrap;min-width:0}.header-content{display:flex;align-items:center;gap:1rem;justify-content:space-between;width:100%}.header-actions{display:flex;align-items:center;gap:.5rem;margin-left:auto;margin-right:0}.close-button{background:none;border:none;color:#6c757d;cursor:pointer;padding:.5rem;border-radius:.375rem;transition:all .2s ease;display:flex;align-items:center;justify-content:center;min-width:2rem;min-height:2rem;margin-right:.5rem}.close-button:hover{background-color:#e9ecef;color:#495057}.close-button:focus{outline:none;box-shadow:0 0 0 3px #0f8bfd4d}.close-button i{font-size:1rem}.sidebar-content{height:100%;overflow-y:auto;padding:0}.header-actions .p-button-text.p-button-rounded{width:2rem;height:2rem;border-radius:50%}.header-actions .p-button-text.p-button-rounded:hover{background-color:#0000001a}::ng-deep .p-sidebar .p-sidebar-header{border-bottom:1px solid #e9ecef;margin-bottom:1rem;background-color:#f8f9fa}::ng-deep .p-sidebar .p-sidebar-content{padding:0 1.5rem 1.5rem;height:calc(100% - 80px);overflow-y:auto}::ng-deep .p-sidebar.p-sidebar-right .p-sidebar-content{padding-left:1.5rem;padding-right:1.5rem}::ng-deep .p-sidebar.p-sidebar-left .p-sidebar-content{padding-left:1.5rem;padding-right:1.5rem}@media (max-width: 768px){::ng-deep .p-sidebar{width:100%!important;max-width:100%!important}::ng-deep .p-sidebar .p-sidebar-header{padding:1rem 1rem 0}::ng-deep .p-sidebar .p-sidebar-content{padding:0 1rem 1rem}}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i9.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i4.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: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }] });
4908
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SidebarComponent, isStandalone: false, selector: "lib-sidebar", inputs: { visible: "visible", position: "position", width: "width", title: "title", showCloseButton: "showCloseButton", modal: "modal", dismissible: "dismissible", styleClass: "styleClass", appendTo: "appendTo", blockScroll: "blockScroll", closeIcon: "closeIcon", showSaveButton: "showSaveButton", saveButtonText: "saveButtonText", saveButtonDisabled: "saveButtonDisabled", successMessage: "successMessage", errorMessage: "errorMessage", hasUnsavedChanges: "hasUnsavedChanges" }, outputs: { visibleChange: "visibleChange", onShow: "onShow", onHide: "onHide", onSave: "onSave", onClose: "onClose" }, host: { listeners: { "document:keydown.escape": "handleEscapeKey($event)" } }, ngImport: i0, template: "<!-- PrimeNG Sidebar with proper backdrop handling -->\r\n<div *ngIf=\"visible\" class=\"backdrop-shadow\" (click)=\"handleClose()\"></div>\r\n\r\n<p-sidebar \r\n [(visible)]=\"visible\"\r\n [position]=\"position\"\r\n [style]=\"{width: width}\"\r\n [dismissible]=\"true\"\r\n [showCloseIcon]=\"false\"\r\n [appendTo]=\"'body'\"\r\n [blockScroll]=\"blockScroll\"\r\n (visibleChange)=\"onVisibleChange($event)\"\r\n (onShow)=\"onShow.emit()\"\r\n (onHide)=\"onSidebarHide()\"\r\n>\r\n <ng-template pTemplate=\"header\" *ngIf=\"title || showCloseButton || showSaveButton\">\r\n <div class=\"sidebar-header\">\r\n <h3 *ngIf=\"title\" class=\"sidebar-title\">{{ title }}</h3>\r\n <div class=\"header-content\">\r\n <ng-content select=\"[header]\"></ng-content>\r\n \r\n <p-messages \r\n *ngIf=\"showSuccessMessage\"\r\n severity=\"success\"\r\n [closable]=\"false\"\r\n [style]=\"{'margin-bottom': '0.5rem'}\"\r\n class=\"ml-3\"\r\n >\r\n <ng-template pTemplate=\"message\">\r\n <span>{{ successMessage }}</span>\r\n </ng-template>\r\n </p-messages>\r\n \r\n <p-messages \r\n *ngIf=\"showErrorMessage\"\r\n severity=\"error\"\r\n [closable]=\"false\"\r\n [style]=\"{'margin-bottom': '0.5rem'}\"\r\n class=\"ml-3\"\r\n >\r\n <ng-template pTemplate=\"message\">\r\n <span>{{ errorMessage }}</span>\r\n </ng-template>\r\n </p-messages>\r\n\r\n <div class=\"header-actions mr-3\">\r\n <button \r\n *ngIf=\"showSaveButton\"\r\n pButton \r\n type=\"button\" \r\n [label]=\"saveButtonText\"\r\n [disabled]=\"saveButtonDisabled\"\r\n class=\"p-button-primary\"\r\n (click)=\"onSave.emit()\"\r\n ></button>\r\n\r\n <button \r\n *ngIf=\"showCloseButton\"\r\n pButton \r\n type=\"button\" \r\n icon=\"pi pi-times\"\r\n class=\"p-button-text p-button-rounded\"\r\n (click)=\"handleClose()\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"content\">\r\n <div class=\"sidebar-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </ng-template>\r\n</p-sidebar>\r\n", styles: [":host{display:block}.backdrop-shadow{position:fixed;top:0;left:0;width:100%;height:100%;background:#00000080;z-index:1000}.sidebar-header{display:flex;justify-content:flex-end;align-items:center;padding:0;width:100%;gap:1rem}.sidebar-header ::ng-deep .p-messages .p-message-success{margin-left:2rem;font-size:15px}.sidebar-header ::ng-deep .p-messages .p-message-wrapper{padding:1rem}.sidebar-title{margin:0;font-size:1.25rem;font-weight:600;color:#212529;flex:0 1 auto;white-space:nowrap;min-width:0}.header-content{display:flex;align-items:center;gap:1rem;justify-content:space-between;width:100%}.header-actions{display:flex;align-items:center;gap:.5rem;margin-left:auto;margin-right:0}.close-button{background:none;border:none;color:#6c757d;cursor:pointer;padding:.5rem;border-radius:.375rem;transition:all .2s ease;display:flex;align-items:center;justify-content:center;min-width:2rem;min-height:2rem;margin-right:.5rem}.close-button:hover{background-color:#e9ecef;color:#495057}.close-button:focus{outline:none;box-shadow:0 0 0 3px #0f8bfd4d}.close-button i{font-size:1rem}.sidebar-content{height:100%;overflow-y:auto;padding:0}.header-actions .p-button-text.p-button-rounded{width:2rem;height:2rem;border-radius:50%}.header-actions .p-button-text.p-button-rounded:hover{background-color:#0000001a}::ng-deep .p-sidebar .p-sidebar-header{border-bottom:1px solid #e9ecef;margin-bottom:1rem;background-color:#f8f9fa}::ng-deep .p-sidebar .p-sidebar-content{padding:0 1.5rem 1.5rem;height:calc(100% - 80px);overflow-y:auto}::ng-deep .p-sidebar.p-sidebar-right .p-sidebar-content{padding-left:1.5rem;padding-right:1.5rem}::ng-deep .p-sidebar.p-sidebar-left .p-sidebar-content{padding-left:1.5rem;padding-right:1.5rem}@media (max-width: 768px){::ng-deep .p-sidebar{width:100%!important;max-width:100%!important}::ng-deep .p-sidebar .p-sidebar-header{padding:1rem 1rem 0}::ng-deep .p-sidebar .p-sidebar-content{padding:0 1rem 1rem}}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i9.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i4.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: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }] });
5167
4909
  }
5168
4910
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SidebarComponent, decorators: [{
5169
4911
  type: Component,
@@ -5467,7 +5209,7 @@ class FolderContainerComponent {
5467
5209
  }
5468
5210
  }
5469
5211
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FolderContainerComponent, deps: [{ token: DocumentQuery }, { token: DocumentHelperService }], target: i0.ɵɵFactoryTarget.Component });
5470
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FolderContainerComponent, isStandalone: false, selector: "lib-folder-container", inputs: { documentList: "documentList", folderList: "folderList", contextId: "contextId", userList: "userList", statusData: "statusData", categories: "categories" }, viewQueries: [{ propertyName: "documentUploadComponent", first: true, predicate: DocumentUploadComponent, descendants: true }, { propertyName: "uploadSidebarComponent", first: true, predicate: ["uploadSidebar"], descendants: true }, { propertyName: "requestSidebarComponent", first: true, predicate: ["requestSidebar"], descendants: true }, { propertyName: "requestDocumentComponent", first: true, predicate: RequestDocumentComponent, descendants: true }], ngImport: i0, template: "\r\n<document-search [contextId]=\"contextId\" (onActionClick)=\"openDocumentUploadSidebar()\" (onRequestClick)=\"openRequestDocumentSidebar()\"></document-search>\r\n<div class=\"user-list-wrapper\" [@slideInOut]=\"userListAnimationState\">\r\n <lib-user-list [userList]=\"userList\" [categories]=\"categories\"></lib-user-list>\r\n</div>\r\n<lib-document-status [contextId]=\"contextId\" [statusData]=\"statusData\"></lib-document-status>\r\n\r\n<!-- Document Upload Sidebar -->\r\n<lib-sidebar\r\n #uploadSidebar\r\n [(visible)]=\"isDocumentUploadSidebarOpen\"\r\n position=\"right\"\r\n width=\"600px\"\r\n title=\"Upload Documents\"\r\n [showCloseButton]=\"true\"\r\n [showSaveButton]=\"true\"\r\n [saveButtonText]=\"'Save'\"\r\n [saveButtonDisabled]=\"isSaveButtonDisabled\"\r\n [successMessage]=\"'Document Saved Successfully'\"\r\n [hasUnsavedChanges]=\"hasUnsavedChanges\"\r\n (onHide)=\"onDocumentUploadSidebarHide()\"\r\n (onSave)=\"onDocumentUploadSave()\"\r\n (onClose)=\"onDocumentUploadSidebarCloseWithUnsavedChanges()\"\r\n>\r\n <lib-document-upload \r\n [contextId]=\"contextId\" \r\n (onFormValidationChange)=\"onFormValidationChange()\" \r\n (onUploadSuccess)=\"onDocumentUploadSuccess()\"\r\n (onUploadError)=\"onDocumentUploadError($event)\"\r\n ></lib-document-upload>\r\n</lib-sidebar>\r\n\r\n<lib-sidebar\r\n #requestSidebar\r\n [(visible)]=\"isRequestDocumentSidebarOpen\"\r\n position=\"right\"\r\n width=\"600px\"\r\n title=\"Request Document\"\r\n [showCloseButton]=\"true\"\r\n [showSaveButton]=\"true\"\r\n [saveButtonText]=\"'Save'\"\r\n [successMessage]=\"'Document Requested'\"\r\n [saveButtonDisabled]=\"isRequestSaveButtonDisabled\"\r\n [hasUnsavedChanges]=\"requestHasUnsavedChanges\"\r\n (onHide)=\"onRequestDocumentSidebarHide()\"\r\n (onSave)=\"onRequestDocumentSave()\"\r\n (onClose)=\"onRequestDocumentSidebarCloseWithUnsavedChanges()\"\r\n>\r\n <lib-request-document\r\n [contextId]=\"contextId\"\r\n (onFormValidationChange)=\"onRequestFormValidationChange()\"\r\n (onRequestSuccess)=\"onRequestDocumentSuccess()\"\r\n (onRequestError)=\"onRequestDocumentError($event)\"\r\n (hasUnsavedChangesChange)=\"onRequestUnsavedChange($event)\"\r\n ></lib-request-document>\r\n</lib-sidebar>", styles: [".user-list-wrapper{overflow:hidden;margin-bottom:1rem}.user-list-wrapper ::ng-deep *{transition:opacity .2s ease-in-out}.user-list-wrapper.ng-animating{pointer-events:none}::ng-deep lib-user-list{display:block;width:100%}\n"], dependencies: [{ kind: "component", type: DocumentUploadComponent, selector: "lib-document-upload", inputs: ["contextId", "isDocumentSaveBtnClicked", "isDocumentSidebarClosed", "isFormHide", "isMultiAttachmentHidden"], outputs: ["onFormValidationChange", "onUploadSuccess", "onFilesUploaded", "hasUnsavedChangesChange", "onFileRemoved"] }, { kind: "component", type: UserListComponent, selector: "lib-user-list", inputs: ["userList", "categories"], outputs: ["userSelected"] }, { kind: "component", type: DocumentStatusComponent, selector: "lib-document-status", inputs: ["contextId", "statusData"] }, { kind: "component", type: DocumentSearchComponent, selector: "document-search", inputs: ["contextId"], outputs: ["onActionClick", "onRequestClick"] }, { kind: "component", type: SidebarComponent, selector: "lib-sidebar", inputs: ["visible", "position", "width", "title", "showCloseButton", "modal", "dismissible", "styleClass", "appendTo", "blockScroll", "closeIcon", "showSaveButton", "saveButtonText", "saveButtonDisabled", "successMessage", "errorMessage", "hasUnsavedChanges"], outputs: ["visibleChange", "onShow", "onHide", "onSave", "onClose"] }, { kind: "component", type: RequestDocumentComponent, selector: "lib-request-document", inputs: ["contextId", "isRequestSaveBtnClicked", "isRequestSidebarClosed"], outputs: ["onFormValidationChange", "onRequestSuccess", "onRequestError", "hasUnsavedChangesChange"] }], animations: [
5212
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FolderContainerComponent, isStandalone: false, selector: "lib-folder-container", inputs: { documentList: "documentList", folderList: "folderList", contextId: "contextId", userList: "userList", statusData: "statusData", categories: "categories" }, viewQueries: [{ propertyName: "documentUploadComponent", first: true, predicate: DocumentUploadComponent, descendants: true }, { propertyName: "uploadSidebarComponent", first: true, predicate: ["uploadSidebar"], descendants: true }, { propertyName: "requestSidebarComponent", first: true, predicate: ["requestSidebar"], descendants: true }, { propertyName: "requestDocumentComponent", first: true, predicate: RequestDocumentComponent, descendants: true }], ngImport: i0, template: "\r\n<document-search [contextId]=\"contextId\" (onActionClick)=\"openDocumentUploadSidebar()\" (onRequestClick)=\"openRequestDocumentSidebar()\"></document-search>\r\n<div class=\"user-list-wrapper\" [@slideInOut]=\"userListAnimationState\">\r\n <!-- <lib-user-list [userList]=\"userList\" [categories]=\"categories\"></lib-user-list> -->\r\n</div>\r\n<lib-document-status [contextId]=\"contextId\" [statusData]=\"statusData\"></lib-document-status>\r\n\r\n<!-- Document Upload Sidebar -->\r\n<lib-sidebar\r\n #uploadSidebar\r\n [(visible)]=\"isDocumentUploadSidebarOpen\"\r\n position=\"right\"\r\n width=\"600px\"\r\n title=\"Upload Documents\"\r\n [showCloseButton]=\"true\"\r\n [showSaveButton]=\"true\"\r\n [saveButtonText]=\"'Save'\"\r\n [saveButtonDisabled]=\"isSaveButtonDisabled\"\r\n [successMessage]=\"'Document Saved Successfully'\"\r\n [hasUnsavedChanges]=\"hasUnsavedChanges\"\r\n (onHide)=\"onDocumentUploadSidebarHide()\"\r\n (onSave)=\"onDocumentUploadSave()\"\r\n (onClose)=\"onDocumentUploadSidebarCloseWithUnsavedChanges()\"\r\n>\r\n <lib-document-upload \r\n [contextId]=\"contextId\" \r\n (onFormValidationChange)=\"onFormValidationChange()\" \r\n (onUploadSuccess)=\"onDocumentUploadSuccess()\"\r\n (onUploadError)=\"onDocumentUploadError($event)\"\r\n ></lib-document-upload>\r\n</lib-sidebar>\r\n\r\n<lib-sidebar\r\n #requestSidebar\r\n [(visible)]=\"isRequestDocumentSidebarOpen\"\r\n position=\"right\"\r\n width=\"600px\"\r\n title=\"Request Document\"\r\n [showCloseButton]=\"true\"\r\n [showSaveButton]=\"true\"\r\n [saveButtonText]=\"'Save'\"\r\n [successMessage]=\"'Document Requested'\"\r\n [saveButtonDisabled]=\"isRequestSaveButtonDisabled\"\r\n [hasUnsavedChanges]=\"requestHasUnsavedChanges\"\r\n (onHide)=\"onRequestDocumentSidebarHide()\"\r\n (onSave)=\"onRequestDocumentSave()\"\r\n (onClose)=\"onRequestDocumentSidebarCloseWithUnsavedChanges()\"\r\n>\r\n <lib-request-document\r\n [contextId]=\"contextId\"\r\n (onFormValidationChange)=\"onRequestFormValidationChange()\"\r\n (onRequestSuccess)=\"onRequestDocumentSuccess()\"\r\n (onRequestError)=\"onRequestDocumentError($event)\"\r\n (hasUnsavedChangesChange)=\"onRequestUnsavedChange($event)\"\r\n ></lib-request-document>\r\n</lib-sidebar>", styles: [".user-list-wrapper{overflow:hidden;margin-bottom:1rem}.user-list-wrapper ::ng-deep *{transition:opacity .2s ease-in-out}.user-list-wrapper.ng-animating{pointer-events:none}::ng-deep lib-user-list{display:block;width:100%}\n"], dependencies: [{ kind: "component", type: DocumentUploadComponent, selector: "lib-document-upload", inputs: ["contextId", "isDocumentSaveBtnClicked", "isDocumentSidebarClosed", "isFormHide", "isMultiAttachmentHidden"], outputs: ["onFormValidationChange", "onUploadSuccess", "onFilesUploaded", "hasUnsavedChangesChange", "onFileRemoved"] }, { kind: "component", type: DocumentStatusComponent, selector: "lib-document-status", inputs: ["contextId", "statusData"] }, { kind: "component", type: DocumentSearchComponent, selector: "document-search", inputs: ["contextId"], outputs: ["onActionClick", "onRequestClick"] }, { kind: "component", type: SidebarComponent, selector: "lib-sidebar", inputs: ["visible", "position", "width", "title", "showCloseButton", "modal", "dismissible", "styleClass", "appendTo", "blockScroll", "closeIcon", "showSaveButton", "saveButtonText", "saveButtonDisabled", "successMessage", "errorMessage", "hasUnsavedChanges"], outputs: ["visibleChange", "onShow", "onHide", "onSave", "onClose"] }, { kind: "component", type: RequestDocumentComponent, selector: "lib-request-document", inputs: ["contextId", "isRequestSaveBtnClicked", "isRequestSidebarClosed"], outputs: ["onFormValidationChange", "onRequestSuccess", "onRequestError", "hasUnsavedChangesChange"] }], animations: [
5471
5213
  trigger('slideInOut', [
5472
5214
  state('visible', style({
5473
5215
  height: '*',
@@ -5521,7 +5263,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
5521
5263
  animate('300ms cubic-bezier(0.0, 0.0, 0.2, 1)')
5522
5264
  ])
5523
5265
  ])
5524
- ], template: "\r\n<document-search [contextId]=\"contextId\" (onActionClick)=\"openDocumentUploadSidebar()\" (onRequestClick)=\"openRequestDocumentSidebar()\"></document-search>\r\n<div class=\"user-list-wrapper\" [@slideInOut]=\"userListAnimationState\">\r\n <lib-user-list [userList]=\"userList\" [categories]=\"categories\"></lib-user-list>\r\n</div>\r\n<lib-document-status [contextId]=\"contextId\" [statusData]=\"statusData\"></lib-document-status>\r\n\r\n<!-- Document Upload Sidebar -->\r\n<lib-sidebar\r\n #uploadSidebar\r\n [(visible)]=\"isDocumentUploadSidebarOpen\"\r\n position=\"right\"\r\n width=\"600px\"\r\n title=\"Upload Documents\"\r\n [showCloseButton]=\"true\"\r\n [showSaveButton]=\"true\"\r\n [saveButtonText]=\"'Save'\"\r\n [saveButtonDisabled]=\"isSaveButtonDisabled\"\r\n [successMessage]=\"'Document Saved Successfully'\"\r\n [hasUnsavedChanges]=\"hasUnsavedChanges\"\r\n (onHide)=\"onDocumentUploadSidebarHide()\"\r\n (onSave)=\"onDocumentUploadSave()\"\r\n (onClose)=\"onDocumentUploadSidebarCloseWithUnsavedChanges()\"\r\n>\r\n <lib-document-upload \r\n [contextId]=\"contextId\" \r\n (onFormValidationChange)=\"onFormValidationChange()\" \r\n (onUploadSuccess)=\"onDocumentUploadSuccess()\"\r\n (onUploadError)=\"onDocumentUploadError($event)\"\r\n ></lib-document-upload>\r\n</lib-sidebar>\r\n\r\n<lib-sidebar\r\n #requestSidebar\r\n [(visible)]=\"isRequestDocumentSidebarOpen\"\r\n position=\"right\"\r\n width=\"600px\"\r\n title=\"Request Document\"\r\n [showCloseButton]=\"true\"\r\n [showSaveButton]=\"true\"\r\n [saveButtonText]=\"'Save'\"\r\n [successMessage]=\"'Document Requested'\"\r\n [saveButtonDisabled]=\"isRequestSaveButtonDisabled\"\r\n [hasUnsavedChanges]=\"requestHasUnsavedChanges\"\r\n (onHide)=\"onRequestDocumentSidebarHide()\"\r\n (onSave)=\"onRequestDocumentSave()\"\r\n (onClose)=\"onRequestDocumentSidebarCloseWithUnsavedChanges()\"\r\n>\r\n <lib-request-document\r\n [contextId]=\"contextId\"\r\n (onFormValidationChange)=\"onRequestFormValidationChange()\"\r\n (onRequestSuccess)=\"onRequestDocumentSuccess()\"\r\n (onRequestError)=\"onRequestDocumentError($event)\"\r\n (hasUnsavedChangesChange)=\"onRequestUnsavedChange($event)\"\r\n ></lib-request-document>\r\n</lib-sidebar>", styles: [".user-list-wrapper{overflow:hidden;margin-bottom:1rem}.user-list-wrapper ::ng-deep *{transition:opacity .2s ease-in-out}.user-list-wrapper.ng-animating{pointer-events:none}::ng-deep lib-user-list{display:block;width:100%}\n"] }]
5266
+ ], template: "\r\n<document-search [contextId]=\"contextId\" (onActionClick)=\"openDocumentUploadSidebar()\" (onRequestClick)=\"openRequestDocumentSidebar()\"></document-search>\r\n<div class=\"user-list-wrapper\" [@slideInOut]=\"userListAnimationState\">\r\n <!-- <lib-user-list [userList]=\"userList\" [categories]=\"categories\"></lib-user-list> -->\r\n</div>\r\n<lib-document-status [contextId]=\"contextId\" [statusData]=\"statusData\"></lib-document-status>\r\n\r\n<!-- Document Upload Sidebar -->\r\n<lib-sidebar\r\n #uploadSidebar\r\n [(visible)]=\"isDocumentUploadSidebarOpen\"\r\n position=\"right\"\r\n width=\"600px\"\r\n title=\"Upload Documents\"\r\n [showCloseButton]=\"true\"\r\n [showSaveButton]=\"true\"\r\n [saveButtonText]=\"'Save'\"\r\n [saveButtonDisabled]=\"isSaveButtonDisabled\"\r\n [successMessage]=\"'Document Saved Successfully'\"\r\n [hasUnsavedChanges]=\"hasUnsavedChanges\"\r\n (onHide)=\"onDocumentUploadSidebarHide()\"\r\n (onSave)=\"onDocumentUploadSave()\"\r\n (onClose)=\"onDocumentUploadSidebarCloseWithUnsavedChanges()\"\r\n>\r\n <lib-document-upload \r\n [contextId]=\"contextId\" \r\n (onFormValidationChange)=\"onFormValidationChange()\" \r\n (onUploadSuccess)=\"onDocumentUploadSuccess()\"\r\n (onUploadError)=\"onDocumentUploadError($event)\"\r\n ></lib-document-upload>\r\n</lib-sidebar>\r\n\r\n<lib-sidebar\r\n #requestSidebar\r\n [(visible)]=\"isRequestDocumentSidebarOpen\"\r\n position=\"right\"\r\n width=\"600px\"\r\n title=\"Request Document\"\r\n [showCloseButton]=\"true\"\r\n [showSaveButton]=\"true\"\r\n [saveButtonText]=\"'Save'\"\r\n [successMessage]=\"'Document Requested'\"\r\n [saveButtonDisabled]=\"isRequestSaveButtonDisabled\"\r\n [hasUnsavedChanges]=\"requestHasUnsavedChanges\"\r\n (onHide)=\"onRequestDocumentSidebarHide()\"\r\n (onSave)=\"onRequestDocumentSave()\"\r\n (onClose)=\"onRequestDocumentSidebarCloseWithUnsavedChanges()\"\r\n>\r\n <lib-request-document\r\n [contextId]=\"contextId\"\r\n (onFormValidationChange)=\"onRequestFormValidationChange()\"\r\n (onRequestSuccess)=\"onRequestDocumentSuccess()\"\r\n (onRequestError)=\"onRequestDocumentError($event)\"\r\n (hasUnsavedChangesChange)=\"onRequestUnsavedChange($event)\"\r\n ></lib-request-document>\r\n</lib-sidebar>", styles: [".user-list-wrapper{overflow:hidden;margin-bottom:1rem}.user-list-wrapper ::ng-deep *{transition:opacity .2s ease-in-out}.user-list-wrapper.ng-animating{pointer-events:none}::ng-deep lib-user-list{display:block;width:100%}\n"] }]
5525
5267
  }], ctorParameters: () => [{ type: DocumentQuery }, { type: DocumentHelperService }], propDecorators: { documentList: [{
5526
5268
  type: Input
5527
5269
  }], folderList: [{
@@ -6044,7 +5786,7 @@ class TablePrimaryComponent {
6044
5786
  return displayName;
6045
5787
  }
6046
5788
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TablePrimaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6047
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TablePrimaryComponent, isStandalone: false, selector: "lib-table-primary", inputs: { tableData: "tableData", showHeader: "showHeader", tableStyle: "tableStyle" }, outputs: { rowClick: "rowClick", rowCtrlClick: "rowCtrlClick" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"table-primary\">\r\n <p-table [value]=\"processedData\" [tableStyle]=\"tableStyle\">\r\n <ng-template pTemplate=\"header\" *ngIf=\"showHeader\">\r\n <tr>\r\n <ng-container *ngFor=\"let col of visibleColumns\">\r\n <th [style.width]=\"col.width\">\r\n {{ col.header }}\r\n </th>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData>\r\n <tr (click)=\"onRowClick($event, rowData)\" class=\"clickable-row\">\r\n <ng-container *ngFor=\"let col of visibleColumns\">\r\n <td [style.width]=\"col.width\">\r\n <!-- Document Cell -->\r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_DOCUMENT\" class=\"document-cell\">\r\n <div class=\"document-info\">\r\n <div class=\"document-icon\">\r\n <i [class]=\"SHARED.ICON_FILE_PDF\" *ngIf=\"rowData._isPdfFile\"></i>\r\n <i [class]=\"SHARED.ICON_IMAGE\" *ngIf=\"rowData._isImageFile\"></i>\r\n <i [class]=\"SHARED.ICON_FILE_EXCEL\" *ngIf=\"rowData._isExcelFile\"></i>\r\n <i [class]=\"SHARED.ICON_FILE\" *ngIf=\"rowData._isOtherFile\"></i>\r\n </div>\r\n <div class=\"document-details\">\r\n <div class=\"document-name\" [innerHTML]=\"formatDocumentDisplayName(rowData)\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Status Cell -->\r\n \r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_STATUS\" class=\"status-cell\">\r\n <span class=\"status-pill\" [ngClass]=\"rowData._statusClass\">\r\n <i [class]=\"rowData._statusIcon\"></i>\r\n {{ rowData[col.field] }}\r\n </span>\r\n </div>\r\n\r\n <!-- Actions Cell -->\r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_ACTIONS\" class=\"actions-cell\">\r\n <!-- Actions content can be added here if needed -->\r\n </div>\r\n\r\n <!-- Default Text Cell -->\r\n <div *ngIf=\"!col.type || col.type === SHARED.CELL_TYPE_TEXT\" class=\"text-cell\">\r\n {{ rowData[col.field] }}\r\n </div>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n \r\n <!-- No Records Template -->\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td [attr.colspan]=\"getVisibleColumnCount()\" class=\"no-records-cell\">\r\n <div class=\"no-records-content\">\r\n <i class=\"pi pi-inbox\" style=\"font-size: 2rem; color: #6c757d;\"></i>\r\n <p class=\"no-records-text\">No records found</p>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>", styles: [".document-cell .document-info{display:flex;align-items:center;gap:.75rem;text-align:left}.document-cell .document-info .document-icon{width:40px;height:40px;background-color:#e3f2fd;border-radius:6px;display:flex;align-items:center;justify-content:center;color:#1976d2;font-size:1.25rem;flex-shrink:0}.document-cell .document-info .document-details{flex:1;min-width:0}.document-cell .document-info .document-details .document-name{font-weight:400;color:#334155;line-height:18px;font-size:14px;text-align:left;word-break:break-word}.document-cell .document-info .document-details .document-name br{margin-bottom:.125rem}.document-cell .document-info .document-details .document-name .alias-name{font-weight:500;color:#1e40af;font-size:13px;line-height:16px}.document-cell .document-info .document-details .document-name .document-info{font-weight:400;color:#334155;font-size:14px;line-height:18px}.status-cell .status-pill{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;padding:.375rem .75rem;border-radius:20px;font-size:.75rem;font-weight:500;white-space:nowrap;min-width:80px}.status-cell .status-pill i{font-size:.875rem}.status-cell .status-pill.status-pending{background-color:#f3f4f6;color:#6b7280}.status-cell .status-pill.status-approved{background-color:#d1fae5;color:#065f46}.status-cell .status-pill.status-alert{background-color:#fee2e2;color:#dc2626}.status-cell .status-pill.status-uploaded{background-color:#d1fae5;color:#065f46}.status-cell .status-pill.status-reviewing{background-color:#fef3c7;color:#d97706}.status-cell .status-pill.status-rejected{background-color:#fee2e2;color:#dc2626}.actions-cell{text-align:left}.actions-cell .p-button{width:2rem;height:2rem;border-radius:50%;background-color:transparent;border:none;color:#6c757d}.actions-cell .p-button:hover{background-color:#f8f9fa;color:#495057}.text-cell{font-weight:500;color:#475569;font-size:14px;line-height:20px;text-align:left}.clickable-row{cursor:pointer;transition:background-color .2s ease}.clickable-row:hover{background-color:#f8f9fa!important}.clickable-row:active{background-color:#e9ecef!important}::ng-deep .p-datatable .p-datatable-wrapper{border:1px solid #E2E8F0;border-radius:10px}::ng-deep .p-datatable .p-datatable-thead>tr>th{background-color:#f8f9fa;border:none;border-bottom:1px solid #dee2e6;padding:1rem 1.5rem;font-weight:600;color:#64748b;font-size:.875rem;text-transform:capitalize;letter-spacing:.5px;text-align:left;border-radius:8px 8px 0 0}::ng-deep .p-datatable .p-datatable-thead>tr>th:first-child{border-top-left-radius:8px}::ng-deep .p-datatable .p-datatable-thead>tr>th:last-child{border-top-right-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr{border-bottom:1px solid #f1f3f4}::ng-deep .p-datatable .p-datatable-tbody>tr:hover{background-color:#f8f9fa}::ng-deep .p-datatable .p-datatable-tbody>tr:last-child>td:first-child{border-bottom-left-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr:last-child>td:last-child{border-bottom-right-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr>td{border:none;padding:1rem 1.5rem;vertical-align:middle;text-align:left}.no-records-cell{text-align:center;padding:3rem 1.5rem!important;border:none}.no-records-cell .no-records-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem}.no-records-cell .no-records-content .no-records-text{margin:0;color:#6c757d;font-size:1rem;font-weight:500}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }] });
5789
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TablePrimaryComponent, isStandalone: false, selector: "lib-table-primary", inputs: { tableData: "tableData", showHeader: "showHeader", tableStyle: "tableStyle" }, outputs: { rowClick: "rowClick", rowCtrlClick: "rowCtrlClick" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"table-primary\">\r\n <p-table [value]=\"processedData\" [tableStyle]=\"tableStyle\">\r\n <ng-template pTemplate=\"header\" *ngIf=\"showHeader\">\r\n <tr>\r\n <ng-container *ngFor=\"let col of visibleColumns\">\r\n <th [style.width]=\"col.width\">\r\n {{ col.header }}\r\n </th>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData>\r\n <tr (click)=\"onRowClick($event, rowData)\" class=\"clickable-row\">\r\n <ng-container *ngFor=\"let col of visibleColumns\">\r\n <td [style.width]=\"col.width\">\r\n <!-- Document Cell -->\r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_DOCUMENT\" class=\"document-cell\">\r\n <div class=\"document-info\">\r\n <div class=\"document-icon\">\r\n <i [class]=\"SHARED.ICON_FILE_PDF\" *ngIf=\"rowData._isPdfFile\"></i>\r\n <i [class]=\"SHARED.ICON_IMAGE\" *ngIf=\"rowData._isImageFile\"></i>\r\n <i [class]=\"SHARED.ICON_FILE_EXCEL\" *ngIf=\"rowData._isExcelFile\"></i>\r\n <i [class]=\"SHARED.ICON_FILE\" *ngIf=\"rowData._isOtherFile\"></i>\r\n </div>\r\n <div class=\"document-details\">\r\n <div class=\"document-name\" [innerHTML]=\"formatDocumentDisplayName(rowData)\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Status Cell -->\r\n \r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_STATUS\" class=\"status-cell\">\r\n <span class=\"status-pill\" [ngClass]=\"rowData._statusClass\">\r\n <i [class]=\"rowData._statusIcon\"></i>\r\n {{ rowData[col.field] }}\r\n </span>\r\n </div>\r\n\r\n <!-- Actions Cell -->\r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_ACTIONS\" class=\"actions-cell\">\r\n <!-- Actions content can be added here if needed -->\r\n </div>\r\n\r\n <!-- Default Text Cell -->\r\n <div *ngIf=\"!col.type || col.type === SHARED.CELL_TYPE_TEXT\" class=\"text-cell\">\r\n {{ rowData[col.field] }}\r\n </div>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n \r\n <!-- No Records Template -->\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td [attr.colspan]=\"getVisibleColumnCount()\" class=\"no-records-cell\">\r\n <div class=\"no-records-content\">\r\n <i class=\"pi pi-inbox\" style=\"font-size: 2rem; color: #6c757d;\"></i>\r\n <p class=\"no-records-text\">No records found</p>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>", styles: [".document-cell .document-info{display:flex;align-items:center;gap:.75rem;text-align:left}.document-cell .document-info .document-icon{width:40px;height:40px;background-color:#e3f2fd;border-radius:6px;display:flex;align-items:center;justify-content:center;color:#1976d2;font-size:1.25rem;flex-shrink:0}.document-cell .document-info .document-details{flex:1;min-width:0}.document-cell .document-info .document-details .document-name{font-weight:400;color:#334155;line-height:18px;font-size:14px;text-align:left;word-break:break-word}.document-cell .document-info .document-details .document-name br{margin-bottom:.125rem}.document-cell .document-info .document-details .document-name .alias-name{font-weight:500;color:#1e40af;font-size:13px;line-height:16px}.document-cell .document-info .document-details .document-name .document-info{font-weight:400;color:#334155;font-size:14px;line-height:18px}.status-cell .status-pill{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;padding:.375rem .75rem;border-radius:20px;font-size:.75rem;font-weight:500;white-space:nowrap;min-width:80px}.status-cell .status-pill i{font-size:.875rem}.status-cell .status-pill.status-pending{background-color:#f3f4f6;color:#6b7280}.status-cell .status-pill.status-approved{background-color:#d1fae5;color:#065f46}.status-cell .status-pill.status-alert{background-color:#fee2e2;color:#dc2626}.status-cell .status-pill.status-uploaded{background-color:#d1fae5;color:#065f46}.status-cell .status-pill.status-reviewing{background-color:#fef3c7;color:#d97706}.status-cell .status-pill.status-rejected{background-color:#fee2e2;color:#dc2626}.actions-cell{text-align:left}.actions-cell .p-button{width:2rem;height:2rem;border-radius:50%;background-color:transparent;border:none;color:#6c757d}.actions-cell .p-button:hover{background-color:#f8f9fa;color:#495057}.text-cell{font-weight:500;color:#475569;font-size:14px;line-height:20px;text-align:left}.clickable-row{cursor:pointer;transition:background-color .2s ease}.clickable-row:hover{background-color:#f8f9fa!important}.clickable-row:active{background-color:#e9ecef!important}::ng-deep .p-datatable .p-datatable-wrapper{border:1px solid #E2E8F0;border-radius:10px}::ng-deep .p-datatable .p-datatable-thead>tr>th{background-color:#f8f9fa;border:none;border-bottom:1px solid #dee2e6;padding:1rem 1.5rem;font-weight:600;color:#64748b;font-size:.875rem;text-transform:capitalize;letter-spacing:.5px;text-align:left;border-radius:8px 8px 0 0}::ng-deep .p-datatable .p-datatable-thead>tr>th:first-child{border-top-left-radius:8px}::ng-deep .p-datatable .p-datatable-thead>tr>th:last-child{border-top-right-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr{border-bottom:1px solid #f1f3f4}::ng-deep .p-datatable .p-datatable-tbody>tr:hover{background-color:#f8f9fa}::ng-deep .p-datatable .p-datatable-tbody>tr:last-child>td:first-child{border-bottom-left-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr:last-child>td:last-child{border-bottom-right-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr>td{border:none;padding:1rem 1.5rem;vertical-align:middle;text-align:left}.no-records-cell{text-align:center;padding:3rem 1.5rem!important;border:none}.no-records-cell .no-records-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem}.no-records-cell .no-records-content .no-records-text{margin:0;color:#6c757d;font-size:1rem;font-weight:500}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$2.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: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }] });
6048
5790
  }
6049
5791
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TablePrimaryComponent, decorators: [{
6050
5792
  type: Component,
@@ -6091,18 +5833,10 @@ class DocumentViewerService {
6091
5833
  * @param document The selected document
6092
5834
  */
6093
5835
  updateSelectedDocument(document, skipLoadDocumentHistory = false) {
6094
- const prevSelectedId = this.documentQuery.getSelectedDocument()?._id;
6095
- const nextSelectedId = document?._id;
6096
- const didDocumentChange = Boolean(nextSelectedId && prevSelectedId !== nextSelectedId);
6097
5836
  this.documentService.set(document);
6098
5837
  const alertData = this.getAlertData(document);
6099
5838
  const documentStatus = this.calculateDocumentStatus(document);
6100
5839
  const documentIsUploaded = this.calculateIsDocumentUploaded(document);
6101
- // Prevent stale history from previous document while new history is loading.
6102
- // Only reset when the selected document actually changes.
6103
- if (!skipLoadDocumentHistory && didDocumentChange) {
6104
- this.documentStore.updateDocumentViewerState(undefined, [], false);
6105
- }
6106
5840
  this.documentStore.updateDocumentViewerState(document, undefined, undefined, undefined, documentStatus, documentIsUploaded, alertData);
6107
5841
  if (!skipLoadDocumentHistory && document?._id)
6108
5842
  this.loadDocumentHistory(document._id);
@@ -6119,7 +5853,7 @@ class DocumentViewerService {
6119
5853
  this.documentStore.updateDocumentViewerState(undefined, history, true);
6120
5854
  },
6121
5855
  error: (error) => {
6122
- this.documentStore.updateDocumentViewerState(undefined, [], false);
5856
+ this.documentStore.updateDocumentViewerState(undefined, undefined, false);
6123
5857
  }
6124
5858
  });
6125
5859
  }
@@ -7068,8 +6802,18 @@ class HasPermissionDirective {
7068
6802
  this.renderer.removeStyle(this.el.nativeElement, 'display');
7069
6803
  return;
7070
6804
  }
7071
- const userPermissionsObjects = this.sessionService.getUserPermissions();
7072
- const userPermissionNames = userPermissionsObjects?.map((perm) => perm.name) || [];
6805
+ const sessionPermsOrTraits = this.sessionService.getUserPermissions();
6806
+ const traitListFromSession = this.sessionService.getUserTraits?.() || null;
6807
+ // Support both legacy formats:
6808
+ // - permissions: [{ name: "documents-deleteDocumentByDocumentId" }, ...]
6809
+ // - traits: ["documents-deleteDocumentByDocumentId", ...]
6810
+ const userPermissionNames = Array.isArray(traitListFromSession)
6811
+ ? traitListFromSession
6812
+ : Array.isArray(sessionPermsOrTraits)
6813
+ ? sessionPermsOrTraits
6814
+ .map((perm) => (typeof perm === 'string' ? perm : perm?.name))
6815
+ .filter((x) => typeof x === 'string' && x.length > 0)
6816
+ : [];
7073
6817
  const requiredPermissions = Array.isArray(this.permission)
7074
6818
  ? this.permission
7075
6819
  : [this.permission];
@@ -7116,7 +6860,7 @@ class DocumentAiChatComponent {
7116
6860
  this.documentHistoryAiService.sendQuery(this.selectedDocument);
7117
6861
  }
7118
6862
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentAiChatComponent, deps: [{ token: DocumentHistoryAiService }], target: i0.ɵɵFactoryTarget.Component });
7119
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentAiChatComponent, isStandalone: false, selector: "document-ai-chat", inputs: { selectedDocument: "selectedDocument" }, ngImport: i0, template: "<div class=\"chat-panel document-ai-chat-panel\">\r\n <div class=\"chat-header\">\r\n <div class=\"chat-header-content\">\r\n <div class=\"chat-header-brand\">\r\n <span class=\"chat-header-icon\"><i class=\"ri-sparkling-2-fill\"></i></span>\r\n <div class=\"chat-header-text\">\r\n <h2 class=\"chat-title\">Catura Document AI</h2>\r\n </div>\r\n </div>\r\n </div>\r\n <span class=\"chat-header-menu\" style=\"cursor: pointer;\" (click)=\"documentHistoryAiService.state.showAiSidebar = false\">\r\n <i class=\"ri-close-line\" style=\"font-size: 1.4rem;\"></i>\r\n </span>\r\n </div>\r\n\r\n <div class=\"chat-messages\">\r\n <div class=\"chat-welcome\" *ngIf=\"documentHistoryAiService.state.queryMessages.length === 0 && !documentHistoryAiService.state.queryLoading\">\r\n <div class=\"welcome-illustration\">\r\n <i class=\"ri-bubble-chart-line\"></i>\r\n </div>\r\n <h3 class=\"welcome-title\">Catura Document AI</h3>\r\n <p class=\"welcome-subtitle\">\r\n We're here to help. Ask your questions below.\r\n Your conversation is private and secure.\r\n </p>\r\n <div class=\"suggested-prompts\">\r\n <button\r\n type=\"button\"\r\n class=\"prompt-chip\"\r\n (click)=\"handleSummaryPrompt()\"\r\n >\r\n <i class=\"ri-sparkling-2-line\"></i>\r\n <span>Summarise this document</span>\r\n </button>\r\n <button\r\n type=\"button\"\r\n class=\"prompt-chip\"\r\n (click)=\"handleInsightsPrompt()\"\r\n >\r\n <i class=\"ri-sparkling-2-line\"></i>\r\n <span>Provide Insights about this document</span>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"documentHistoryAiService.state.queryMessages.length > 0\">\r\n <div\r\n class=\"message\"\r\n *ngFor=\"let msg of documentHistoryAiService.state.queryMessages\"\r\n [ngClass]=\"{ 'message-user': msg.role === 'user', 'message-assistant': msg.role === 'assistant' }\"\r\n >\r\n <span class=\"message-avatar\">\r\n <i [ngClass]=\"msg.role === 'user' ? 'ri-user-3-fill' : 'ri-robot-2-line'\"></i>\r\n </span>\r\n <div class=\"message-bubble\">\r\n <ng-container *ngIf=\"msg.role === 'user'\">\r\n {{ msg.content }}\r\n </ng-container>\r\n <ng-container *ngIf=\"msg.role === 'assistant'\">\r\n <div class=\"message-content ai-markdown\" [innerHTML]=\"msg.htmlContent\"></div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"message message-assistant\" *ngIf=\"documentHistoryAiService.state.queryLoading\">\r\n <span class=\"message-avatar\">\r\n <i class=\"ri-robot-2-line\"></i>\r\n </span>\r\n <div class=\"message-bubble\">\r\n <span class=\"loading-dots\">\r\n <span></span><span></span><span></span>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"chat-input-area\">\r\n <div class=\"chat-input-wrapper\">\r\n <textarea\r\n class=\"chat-input\"\r\n [(ngModel)]=\"documentHistoryAiService.state.queryText\"\r\n [placeholder]=\"'Start Message...'\"\r\n [disabled]=\"documentHistoryAiService.state.queryLoading\"\r\n rows=\"1\"\r\n (keydown)=\"handleEnter($event)\"\r\n ></textarea>\r\n </div>\r\n <button\r\n type=\"button\"\r\n class=\"p-button p-button-primary send-btn\"\r\n (click)=\"handleSend()\"\r\n [disabled]=\"\r\n documentHistoryAiService.state.queryLoading ||\r\n !documentHistoryAiService.state.queryText?.trim()\r\n \"\r\n aria-label=\"Send\"\r\n >\r\n <i class=\"ri-send-plane-fill\"></i>\r\n </button>\r\n </div>\r\n</div>\r\n\r\n", styles: [":host{display:flex;flex-direction:column;flex:1;width:100%;height:100%;min-height:0}.document-ai-chat-panel{flex:1;width:100%;max-width:100%;min-height:0;max-height:none;background:#fff;display:flex;flex-direction:column;overflow:hidden}.chat-header{padding:.75rem 1rem;background:#fff;border-bottom:1px solid #e5e7eb;display:flex;align-items:center;justify-content:space-between;gap:.75rem}.chat-header-content,.chat-header-brand{display:flex;align-items:center;gap:.6rem}.chat-header-icon{width:28px;height:28px;border-radius:999px;background:#e6f3ff;display:flex;align-items:center;justify-content:center}.chat-header-icon i{font-size:1.1rem;color:#0f8bfd}.chat-header-text{display:flex;flex-direction:column}.chat-title{font-weight:600;font-size:.9rem;color:#1f2937;margin:0}.chat-header-menu{color:#676b89;font-size:1.1rem}.chat-messages{flex:1;overflow-y:auto;padding:1.5rem 1.25rem 1rem;display:flex;flex-direction:column;gap:.75rem;background:#fff}.chat-welcome{display:flex;flex-direction:column;align-items:center;text-align:center;padding:0 0 1.5rem}.welcome-illustration{width:56px;height:56px;border-radius:999px;background:linear-gradient(135deg,#e6f3ff,#0f8bfd14);display:flex;align-items:center;justify-content:center;margin-bottom:1rem}.welcome-illustration i{font-size:1.75rem;color:#0f8bfd}.welcome-title{font-size:.95rem;font-weight:600;color:#1f2937;margin:0 0 .25rem}.welcome-subtitle{font-size:.8rem;color:#676b89;margin:0 0 1.25rem}.suggested-prompts{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:260px}.prompt-chip{display:flex;align-items:center;justify-content:center;gap:.5rem;padding:.6rem 1.2rem;border-radius:999px;border:1px solid #bfdbfe;background:#eff6ff;color:#026fd4;font-size:.8rem;font-weight:500;cursor:pointer;transition:all .2s ease}.prompt-chip i{font-size:1rem}.prompt-chip:hover{background:#dbeafe;border-color:#0f8bfd}.message{display:flex;align-items:flex-end;gap:.4rem;margin-bottom:1.5rem}.message:last-child{margin-bottom:0}.message.message-user{flex-direction:row-reverse}.message.message-assistant{flex-direction:row}.message-avatar{width:28px;height:28px;border-radius:999px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:.95rem}.message-user .message-avatar{background:linear-gradient(135deg,#0f8bfd,#026fd4);color:#fff}.message-assistant .message-avatar{background:#e6f3ff;color:#0f8bfd}.message-bubble{max-width:82%;padding:.6rem .9rem;border-radius:14px;font-size:.85rem;line-height:1.5;white-space:pre-wrap;word-break:break-word}.message-user .message-bubble{background:linear-gradient(135deg,#0f8bfd,#026fd4);color:#fff;border-bottom-right-radius:6px}.message-assistant .message-bubble{background:#f3f4f6;color:#1f2937;border-bottom-left-radius:6px;border:1px solid #e5e7eb}.loading-dots{display:inline-flex;gap:5px;align-items:center}.loading-dots span{width:6px;height:6px;border-radius:50%;background:#026fd4;opacity:.6;animation:loading-bounce 1.2s ease-in-out infinite both}.loading-dots span:nth-child(1){animation-delay:-.24s}.loading-dots span:nth-child(2){animation-delay:-.12s}@keyframes loading-bounce{0%,80%,to{transform:scale(.7);opacity:.5}40%{transform:scale(1);opacity:1}}.chat-input-area{padding:.75rem 1rem 1rem;background:#fff;border-top:1px solid #e5e7eb;display:flex;gap:.5rem;align-items:center}.chat-input-wrapper{flex:1;display:flex;align-items:center;min-height:40px;background:#f9fafb;border:1px solid #e5e7eb;border-radius:999px;padding:.25rem .85rem}.chat-input{flex:1;border:none;background:transparent;font-size:.85rem;line-height:1.5;outline:none}.chat-input::placeholder{color:#676b89}.send-btn{width:36px;height:36px;border-radius:999px;display:flex;align-items:center;justify-content:center;background:#0f8bfd;border:none;color:#fff}.send-btn i{font-size:1rem}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9$1.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: i9$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
6863
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentAiChatComponent, isStandalone: false, selector: "document-ai-chat", inputs: { selectedDocument: "selectedDocument" }, ngImport: i0, template: "<div class=\"chat-panel document-ai-chat-panel\">\r\n <div class=\"chat-header\">\r\n <div class=\"chat-header-content\">\r\n <div class=\"chat-header-brand\">\r\n <span class=\"chat-header-icon\"><i class=\"ri-sparkling-2-fill\"></i></span>\r\n <div class=\"chat-header-text\">\r\n <h2 class=\"chat-title\">Catura Document AI</h2>\r\n </div>\r\n </div>\r\n </div>\r\n <span class=\"chat-header-menu\" style=\"cursor: pointer;\" (click)=\"documentHistoryAiService.state.showAiSidebar = false\">\r\n <i class=\"ri-close-line\" style=\"font-size: 1.4rem;\"></i>\r\n </span>\r\n </div>\r\n\r\n <div class=\"chat-messages\">\r\n <div class=\"chat-welcome\" *ngIf=\"documentHistoryAiService.state.queryMessages.length === 0 && !documentHistoryAiService.state.queryLoading\">\r\n <div class=\"welcome-illustration\">\r\n <i class=\"ri-bubble-chart-line\"></i>\r\n </div>\r\n <h3 class=\"welcome-title\">Catura Document AI</h3>\r\n <p class=\"welcome-subtitle\">\r\n We're here to help. Ask your questions below.\r\n Your conversation is private and secure.\r\n </p>\r\n <div class=\"suggested-prompts\">\r\n <button\r\n type=\"button\"\r\n class=\"prompt-chip\"\r\n (click)=\"handleSummaryPrompt()\"\r\n >\r\n <i class=\"ri-sparkling-2-line\"></i>\r\n <span>Summarise this document</span>\r\n </button>\r\n <button\r\n type=\"button\"\r\n class=\"prompt-chip\"\r\n (click)=\"handleInsightsPrompt()\"\r\n >\r\n <i class=\"ri-sparkling-2-line\"></i>\r\n <span>Provide Insights about this document</span>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"documentHistoryAiService.state.queryMessages.length > 0\">\r\n <div\r\n class=\"message\"\r\n *ngFor=\"let msg of documentHistoryAiService.state.queryMessages\"\r\n [ngClass]=\"{ 'message-user': msg.role === 'user', 'message-assistant': msg.role === 'assistant' }\"\r\n >\r\n <span class=\"message-avatar\">\r\n <i [ngClass]=\"msg.role === 'user' ? 'ri-user-3-fill' : 'ri-robot-2-line'\"></i>\r\n </span>\r\n <div class=\"message-bubble\">\r\n <ng-container *ngIf=\"msg.role === 'user'\">\r\n {{ msg.content }}\r\n </ng-container>\r\n <ng-container *ngIf=\"msg.role === 'assistant'\">\r\n <div class=\"message-content ai-markdown\" [innerHTML]=\"msg.htmlContent\"></div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"message message-assistant\" *ngIf=\"documentHistoryAiService.state.queryLoading\">\r\n <span class=\"message-avatar\">\r\n <i class=\"ri-robot-2-line\"></i>\r\n </span>\r\n <div class=\"message-bubble\">\r\n <span class=\"loading-dots\">\r\n <span></span><span></span><span></span>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"chat-input-area\">\r\n <div class=\"chat-input-wrapper\">\r\n <textarea\r\n class=\"chat-input\"\r\n [(ngModel)]=\"documentHistoryAiService.state.queryText\"\r\n [placeholder]=\"'Start Message...'\"\r\n [disabled]=\"documentHistoryAiService.state.queryLoading\"\r\n rows=\"1\"\r\n (keydown)=\"handleEnter($event)\"\r\n ></textarea>\r\n </div>\r\n <button\r\n type=\"button\"\r\n class=\"p-button p-button-primary send-btn\"\r\n (click)=\"handleSend()\"\r\n [disabled]=\"\r\n documentHistoryAiService.state.queryLoading ||\r\n !documentHistoryAiService.state.queryText?.trim()\r\n \"\r\n aria-label=\"Send\"\r\n >\r\n <i class=\"ri-send-plane-fill\"></i>\r\n </button>\r\n </div>\r\n</div>\r\n\r\n", styles: [":host{display:flex;flex-direction:column;flex:1;width:100%;height:100%;min-height:0}.document-ai-chat-panel{flex:1;width:100%;max-width:100%;min-height:0;max-height:none;background:#fff;display:flex;flex-direction:column;overflow:hidden}.chat-header{padding:.75rem 1rem;background:#fff;border-bottom:1px solid #e5e7eb;display:flex;align-items:center;justify-content:space-between;gap:.75rem}.chat-header-content,.chat-header-brand{display:flex;align-items:center;gap:.6rem}.chat-header-icon{width:28px;height:28px;border-radius:999px;background:#e6f3ff;display:flex;align-items:center;justify-content:center}.chat-header-icon i{font-size:1.1rem;color:#0f8bfd}.chat-header-text{display:flex;flex-direction:column}.chat-title{font-weight:600;font-size:.9rem;color:#1f2937;margin:0}.chat-header-menu{color:#676b89;font-size:1.1rem}.chat-messages{flex:1;overflow-y:auto;padding:1.5rem 1.25rem 1rem;display:flex;flex-direction:column;gap:.75rem;background:#fff}.chat-welcome{display:flex;flex-direction:column;align-items:center;text-align:center;padding:0 0 1.5rem}.welcome-illustration{width:56px;height:56px;border-radius:999px;background:linear-gradient(135deg,#e6f3ff,#0f8bfd14);display:flex;align-items:center;justify-content:center;margin-bottom:1rem}.welcome-illustration i{font-size:1.75rem;color:#0f8bfd}.welcome-title{font-size:.95rem;font-weight:600;color:#1f2937;margin:0 0 .25rem}.welcome-subtitle{font-size:.8rem;color:#676b89;margin:0 0 1.25rem}.suggested-prompts{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:260px}.prompt-chip{display:flex;align-items:center;justify-content:center;gap:.5rem;padding:.6rem 1.2rem;border-radius:999px;border:1px solid #bfdbfe;background:#eff6ff;color:#026fd4;font-size:.8rem;font-weight:500;cursor:pointer;transition:all .2s ease}.prompt-chip i{font-size:1rem}.prompt-chip:hover{background:#dbeafe;border-color:#0f8bfd}.message{display:flex;align-items:flex-end;gap:.4rem;margin-bottom:1.5rem}.message:last-child{margin-bottom:0}.message.message-user{flex-direction:row-reverse}.message.message-assistant{flex-direction:row}.message-avatar{width:28px;height:28px;border-radius:999px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:.95rem}.message-user .message-avatar{background:linear-gradient(135deg,#0f8bfd,#026fd4);color:#fff}.message-assistant .message-avatar{background:#e6f3ff;color:#0f8bfd}.message-bubble{max-width:82%;padding:.6rem .9rem;border-radius:14px;font-size:.85rem;line-height:1.5;white-space:pre-wrap;word-break:break-word}.message-user .message-bubble{background:linear-gradient(135deg,#0f8bfd,#026fd4);color:#fff;border-bottom-right-radius:6px}.message-assistant .message-bubble{background:#f3f4f6;color:#1f2937;border-bottom-left-radius:6px;border:1px solid #e5e7eb}.loading-dots{display:inline-flex;gap:5px;align-items:center}.loading-dots span{width:6px;height:6px;border-radius:50%;background:#026fd4;opacity:.6;animation:loading-bounce 1.2s ease-in-out infinite both}.loading-dots span:nth-child(1){animation-delay:-.24s}.loading-dots span:nth-child(2){animation-delay:-.12s}@keyframes loading-bounce{0%,80%,to{transform:scale(.7);opacity:.5}40%{transform:scale(1);opacity:1}}.chat-input-area{padding:.75rem 1rem 1rem;background:#fff;border-top:1px solid #e5e7eb;display:flex;gap:.5rem;align-items:center}.chat-input-wrapper{flex:1;display:flex;align-items:center;min-height:40px;background:#f9fafb;border:1px solid #e5e7eb;border-radius:999px;padding:.25rem .85rem}.chat-input{flex:1;border:none;background:transparent;font-size:.85rem;line-height:1.5;outline:none}.chat-input::placeholder{color:#676b89}.send-btn{width:36px;height:36px;border-radius:999px;display:flex;align-items:center;justify-content:center;background:#0f8bfd;border:none;color:#fff}.send-btn i{font-size:1rem}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
7120
6864
  }
7121
6865
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentAiChatComponent, decorators: [{
7122
6866
  type: Component,
@@ -7519,16 +7263,15 @@ class DocumentHistoryComponent {
7519
7263
  * Cleans up subscriptions.
7520
7264
  */
7521
7265
  ngOnDestroy() {
7522
- this._processedHistoryData = [];
7523
7266
  this.destroy$.next();
7524
7267
  this.destroy$.complete();
7525
7268
  }
7526
7269
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryComponent, deps: [{ token: DocumentHistoryService }, { token: DocumentViewerService }, { token: DocumentActionsService }, { token: i3.ConfirmationService }, { token: DocumentHttpService }, { token: DocumentHistoryAiService }], target: i0.ɵɵFactoryTarget.Component });
7527
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentHistoryComponent, isStandalone: false, selector: "document-history", inputs: { historyData: "historyData", showHistory: "showHistory", contextId: "contextId", selectedDocument: "selectedDocument", isDocumentIntelligence: "isDocumentIntelligence" }, outputs: { deleteTaskRequested: "deleteTaskRequested", documentSelected: "documentSelected" }, host: { listeners: { "document:click": "onDocumentClickOutside($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-review-container\">\r\n <!-- Header Section -->\r\n <div class=\"review-header\">\r\n <div class=\"review-title-section\">\r\n <h2 class=\"review-title\">Document Review</h2>\r\n <div class=\"ai-menu\" *ngIf=\"showDocumentAiUi\">\r\n <button class=\"ai-btn\" type=\"button\" (click)=\"openAiPanel('Query')\" [class.active]=\"documentHistoryAiService.state.showAiSidebar\">\r\n <i class=\"pi pi-sparkles\"></i>\r\n <span>AI</span>\r\n </button>\r\n </div>\r\n </div>\r\n <!-- <div class=\"actions-menu\" *ngIf=\"selectedDocument?.isUploaded || selectedDocument?.status == 'Approved'\"> -->\r\n <!-- <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.isUploaded || selectedDocument?.status == 'Approved') && !selectedDocument?.isSystemDocument\"> -->\r\n <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.status !== 'Approved') && (!selectedDocument?.isSystemDocument)\">\r\n <button class=\"actions-btn\" (click)=\"toggleActionsMenu()\" [class.active]=\"showActionsMenu\">\r\n Actions\r\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\r\n </button>\r\n\r\n <!-- Actions Dropdown Menu -->\r\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\" (click)=\"$event.stopPropagation()\">\r\n <div class=\"dropdown-item\" *ngIf=\"selectedDocument?.status == 'Approved' || selectedDocument?.isUploaded || selectedDocument?.status == 'Uploaded'\">\r\n <ng-content [select]=\"'action-launcher'\"></ng-content>\r\n </div>\r\n <div *ngIf=\"selectedDocument?.status == 'Uploaded' || selectedDocument?.status === 'Rejected' || selectedDocument?.status === 'Reviewing' || selectedDocument?.status === 'Pending'\" [permission]=\"'documents-deleteDocumentByDocumentId'\" class=\"dropdown-item\" (click)=\"onDeleteTask()\">\r\n <span>Delete Document</span>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Document Actions Component - Below Header -->\r\n <div class=\"document-actions-section\">\r\n <ng-content select=\"[actions-component]\"></ng-content>\r\n </div>\r\n\r\n\r\n <!-- Alerts Section -->\r\n <!-- <div class=\"alerts-section\">\r\n <div class=\"alert-card\">\r\n <div class=\"alert-header\">\r\n <i class=\"pi pi-exclamation-triangle alert-icon\"></i>\r\n <span class=\"alert-text\">Alerts</span>\r\n <div class=\"alert-badge\">\r\n <span class=\"alert-count\">{{ getAlertCount() }}</span>\r\n <i class=\"pi pi-chevron-right\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <!-- Timeline Section -->\r\n <div class=\"timeline-section\" *ngIf=\"showHistory && historyData.length > 0\">\r\n <h3 class=\"timeline-title\">Timeline</h3>\r\n <div class=\"timeline-container\">\r\n <div class=\"timeline-item\" *ngFor=\"let section of processedHistoryData\">\r\n <ng-container *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-event mb-2\" *ngIf=\"!item.shouldHide\">\r\n <div class=\"event-card\" [ngClass]=\"item.eventCardClass\">\r\n <!-- Event Header -->\r\n <div class=\"event-header\">\r\n <div class=\"event-info\">\r\n <i [class]=\"item.eventIcon\"></i>\r\n <span class=\"event-label\">{{ item.label }}</span>\r\n </div>\r\n <div class=\"event-timestamp\">{{ item.dateTime }}</div>\r\n </div>\r\n <!-- User Information -->\r\n <div class=\"event-user mb-2\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n <!-- Event Description -->\r\n <div class=\"event-description\" *ngIf=\"item.requestDescription\">\r\n <ul class=\"event-description-list\" *ngIf=\"item.label.toLowerCase().includes('requested')\">\r\n <li class=\"event-description-item\">{{ item.requestDescription }}</li>\r\n </ul>\r\n <p *ngIf=\"!item.label.toLowerCase().includes('requested')\">{{ item.requestDescription }}</p>\r\n </div>\r\n\r\n <!-- Document Upload Cards -->\r\n <div class=\"document-uploads\" *ngIf=\"item.documentList && item.documentList.length > 0\">\r\n <div class=\"uploaded-documents\">\r\n <div class=\"document-card\" *ngFor=\"let doc of item.documentList\" (click)=\"onDocumentClick(doc)\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <span class=\"document-name\">{{ doc.docName }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- <ng-content [select]=\"'actions-component'\"></ng-content> -->\r\n</div>\r\n\r\n<p-sidebar *ngIf=\"showDocumentAiUi\" [(visible)]=\"documentHistoryAiService.state.showAiSidebar\" position=\"right\"\r\n [style]=\"{ width: '420px' }\" styleClass=\"ai-chat-sidebar\" [dismissible]=\"true\" [showCloseIcon]=\"false\"\r\n [showHeader]=\"false\" [appendTo]=\"'body'\">\r\n\r\n <div class=\"ai-sidebar-content\">\r\n <document-ai-chat [selectedDocument]=\"selectedDocument\"></document-ai-chat>\r\n </div>\r\n</p-sidebar>", styles: [".document-review-container{border-radius:8px;max-height:100%;overflow-y:auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.document-review-container .review-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:1rem;border-bottom:1px solid #e5e7eb}.document-review-container .review-header .review-title-section{display:flex;align-items:center;gap:.75rem}.document-review-container .review-header .review-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin:0}.document-review-container .review-header .ai-menu{position:relative}.document-review-container .review-header .ai-menu .ai-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 .85rem;color:#374151;font-size:.875rem;height:40px;line-height:1;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .ai-menu .ai-btn:hover{background:#f9fafb}.document-review-container .review-header .ai-menu .ai-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .ai-menu .ai-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu{position:relative}.document-review-container .review-header .actions-menu .actions-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 1rem;height:40px;line-height:1;color:#374151;font-size:.875rem;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .actions-menu .actions-btn:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .actions-menu .actions-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu .actions-btn i.rotated{transform:rotate(180deg)}.document-review-container .review-header .actions-menu .actions-dropdown{position:absolute;top:100%;right:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:180px;margin-top:.25rem}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item{padding:.75rem 1rem;cursor:pointer;color:#374151;font-size:.875rem;border-bottom:1px solid #f3f4f6;transition:background-color .2s}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:last-child{border-bottom:none;border-radius:0 0 8px 8px}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:first-child{border-radius:8px 8px 0 0}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item span{display:block}.document-review-container ::ng-deep document-actions{margin-bottom:1.5rem}.document-review-container ::ng-deep document-actions .actions-card{margin:0;width:100%}.document-review-container .document-actions-section{padding:1rem 0}.document-review-container .alerts-section{margin-bottom:2rem}.document-review-container .alerts-section .alert-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1rem}.document-review-container .alerts-section .alert-card .alert-header{display:flex;align-items:center;gap:.75rem}.document-review-container .alerts-section .alert-card .alert-header .alert-icon{color:#ef4444;font-size:1.25rem}.document-review-container .alerts-section .alert-card .alert-header .alert-text{font-weight:500;color:#1f2937;font-size:1rem}.document-review-container .alerts-section .alert-card .alert-header .alert-badge{margin-left:auto;display:flex;align-items:center;gap:.5rem;background:#ef4444;color:#fff;border-radius:50%;width:24px;height:24px;justify-content:center;position:relative}.document-review-container .alerts-section .alert-card .alert-header .alert-badge .alert-count{font-size:.75rem;font-weight:600}.document-review-container .alerts-section .alert-card .alert-header .alert-badge i{position:absolute;right:-8px;font-size:.75rem;color:#ef4444;background:#fff;border-radius:50%;width:16px;height:16px;display:flex;align-items:center;justify-content:center}.document-review-container .timeline-section .timeline-title{font-size:1.25rem;font-weight:600;color:#1f2937;margin:0 0 1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item{margin-bottom:1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1.25rem;position:relative}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info{display:flex;align-items:center;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon{width:25px;height:25px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon i{font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-requested{background:#3b82f6}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-accepted{background:#10b981}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-rejected{background:#ef4444}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-default{background:#6b7280}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-label{font-weight:600;color:#1f2937;font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{color:#6b7280;font-size:.875rem;font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description p{color:#374151;line-height:1.5;margin:0;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents{display:flex;flex-direction:column;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:.5rem;display:flex;align-items:center;gap:.75rem;cursor:pointer;transition:all .2s ease}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:hover{background:#e2e8f0;border-color:#3b82f6;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:active{transform:translateY(0);box-shadow:0 1px 2px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-icon{color:#3b82f6;font-size:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-name{color:#1f2937;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user{font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-name{color:rgb(75,85,99,var(--tw-text-opacity, 1));font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-role{color:#6b7280;margin-left:.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-requested{background:#dbeafe;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-accepted{background:#dcfce7;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-rejected{background:#fee2e2;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-default{border-left:4px solid #6b7280}@media (max-width: 768px){.document-review-container{padding:1rem}.document-review-container .review-header{flex-direction:column;gap:1rem;align-items:flex-start}.document-review-container .review-header .actions-menu{align-self:flex-end}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{flex-direction:column;align-items:flex-start;gap:.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{align-self:flex-end}}.ai-sidebar-title{margin:0;font-size:1.1rem;font-weight:600;color:#111827}.ai-sidebar-content{flex:1;display:flex;flex-direction:column;height:100%;padding:0}::ng-deep .ai-chat-sidebar .p-sidebar-header{display:none!important;padding:0!important}::ng-deep .ai-chat-sidebar .p-sidebar-content{padding:0!important;display:flex;flex-direction:column}.ai-sidebar-text{margin:0;color:#4b5563;font-size:.95rem;line-height:1.5;white-space:pre-wrap}.ai-markdown p{margin:0 0 .5rem}.ai-markdown :last-child{margin-bottom:0}.ai-markdown strong{color:#111827;font-weight:700}.ai-markdown .ai-markdown-list{margin:0 0 .5rem 1.1rem;padding:0}.ai-markdown li{margin-bottom:.35rem}.ai-sidebar-error{margin:0;color:#dc2626;font-size:.9rem}.query-chat-messages{max-height:calc(100vh - 260px);overflow-y:auto;padding:.25rem .1rem .5rem;margin-bottom:.75rem}.query-chat-empty{color:#6b7280;font-size:.9rem;text-align:center;padding:.75rem .5rem}.query-chat-message{display:flex;margin-bottom:.6rem}.query-chat-message.user{justify-content:flex-end}.query-chat-message.assistant{justify-content:flex-start}.query-chat-bubble{max-width:85%;padding:.6rem .75rem;border-radius:12px;font-size:.9rem;line-height:1.45;border:1px solid #e5e7eb;background:#f9fafb;color:#1f2937}.query-chat-message.user .query-chat-bubble{background:#dbeafe;border-color:#bfdbfe}.query-chat-input-wrap{display:flex;flex-direction:column;gap:.5rem}.query-chat-input{width:100%;border:1px solid #d1d5db;border-radius:8px;padding:.6rem .7rem;font-size:.9rem;resize:vertical;min-height:70px}.query-chat-input:focus{outline:none;border-color:#60a5fa;box-shadow:0 0 0 2px #60a5fa33}.query-send-btn{align-self:flex-end;border:1px solid #2563eb;background:#2563eb;color:#fff;border-radius:8px;padding:.45rem .9rem;font-size:.85rem;cursor:pointer}.query-send-btn:hover:not(:disabled){background:#1d4ed8}.query-send-btn:disabled{cursor:not-allowed;opacity:.6}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.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: "directive", type: HasPermissionDirective, selector: "[permission]", inputs: ["permission"] }, { kind: "component", type: DocumentAiChatComponent, selector: "document-ai-chat", inputs: ["selectedDocument"] }] });
7270
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentHistoryComponent, isStandalone: false, selector: "document-history", inputs: { historyData: "historyData", showHistory: "showHistory", contextId: "contextId", selectedDocument: "selectedDocument", isDocumentIntelligence: "isDocumentIntelligence" }, outputs: { deleteTaskRequested: "deleteTaskRequested", documentSelected: "documentSelected" }, host: { listeners: { "document:click": "onDocumentClickOutside($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-review-container\">\r\n <!-- Header Section -->\r\n <div class=\"review-header\">\r\n <div class=\"review-title-section\">\r\n <h2 class=\"review-title\">Document Review</h2>\r\n <!-- <div class=\"ai-menu\" *ngIf=\"showDocumentAiUi\">\r\n <button class=\"ai-btn\" type=\"button\" (click)=\"openAiPanel('Query')\" [class.active]=\"documentHistoryAiService.state.showAiSidebar\">\r\n <i class=\"pi pi-sparkles\"></i>\r\n <span>AI</span>\r\n </button>\r\n </div> -->\r\n </div>\r\n <!-- <div class=\"actions-menu\" *ngIf=\"selectedDocument?.isUploaded || selectedDocument?.status == 'Approved'\"> -->\r\n <!-- <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.isUploaded || selectedDocument?.status == 'Approved') && !selectedDocument?.isSystemDocument\"> -->\r\n <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.status !== 'Approved') && (!selectedDocument?.isSystemDocument)\">\r\n <button class=\"actions-btn\" (click)=\"toggleActionsMenu()\" [class.active]=\"showActionsMenu\">\r\n Actions\r\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\r\n </button>\r\n\r\n <!-- Actions Dropdown Menu -->\r\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\" (click)=\"$event.stopPropagation()\">\r\n <!-- <div class=\"dropdown-item\" *ngIf=\"selectedDocument?.status == 'Approved' || selectedDocument?.isUploaded || selectedDocument?.status == 'Uploaded'\">\r\n <ng-content [select]=\"'action-launcher'\"></ng-content>\r\n </div> -->\r\n <div *ngIf=\"selectedDocument?.status == 'Uploaded' || selectedDocument?.status === 'Rejected' || selectedDocument?.status === 'Reviewing' || selectedDocument?.status === 'Pending'\" [permission]=\"'documents-deleteDocumentByDocumentId'\" class=\"dropdown-item\" (click)=\"onDeleteTask()\">\r\n <span>Delete Document</span>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Document Actions Component - Below Header -->\r\n <div class=\"document-actions-section\">\r\n <ng-content select=\"[actions-component]\"></ng-content>\r\n </div>\r\n\r\n\r\n <!-- Alerts Section -->\r\n <!-- <div class=\"alerts-section\">\r\n <div class=\"alert-card\">\r\n <div class=\"alert-header\">\r\n <i class=\"pi pi-exclamation-triangle alert-icon\"></i>\r\n <span class=\"alert-text\">Alerts</span>\r\n <div class=\"alert-badge\">\r\n <span class=\"alert-count\">{{ getAlertCount() }}</span>\r\n <i class=\"pi pi-chevron-right\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <!-- Timeline Section -->\r\n <div class=\"timeline-section\" *ngIf=\"showHistory && historyData.length > 0\">\r\n <h3 class=\"timeline-title\">Timeline</h3>\r\n <div class=\"timeline-container\">\r\n <div class=\"timeline-item\" *ngFor=\"let section of processedHistoryData\">\r\n <ng-container *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-event mb-2\" *ngIf=\"!item.shouldHide\">\r\n <div class=\"event-card\" [ngClass]=\"item.eventCardClass\">\r\n <!-- Event Header -->\r\n <div class=\"event-header\">\r\n <div class=\"event-info\">\r\n <i [class]=\"item.eventIcon\"></i>\r\n <span class=\"event-label\">{{ item.label }}</span>\r\n </div>\r\n <div class=\"event-timestamp\">{{ item.dateTime }}</div>\r\n </div>\r\n <!-- User Information -->\r\n <div class=\"event-user mb-2\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n <!-- Event Description -->\r\n <div class=\"event-description\" *ngIf=\"item.requestDescription\">\r\n <ul class=\"event-description-list\" *ngIf=\"item.label.toLowerCase().includes('requested')\">\r\n <li class=\"event-description-item\">{{ item.requestDescription }}</li>\r\n </ul>\r\n <p *ngIf=\"!item.label.toLowerCase().includes('requested')\">{{ item.requestDescription }}</p>\r\n </div>\r\n\r\n <!-- Document Upload Cards -->\r\n <!-- Commented out child document list panel functionality -->\r\n <!-- <div class=\"document-uploads\" *ngIf=\"item.documentList && item.documentList.length > 0\">\r\n <div class=\"uploaded-documents\">\r\n <div class=\"document-card\" *ngFor=\"let doc of item.documentList\" (click)=\"onDocumentClick(doc)\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <span class=\"document-name\">{{ doc.docName }}</span>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- <ng-content [select]=\"'actions-component'\"></ng-content> -->\r\n</div>\r\n\r\n<p-sidebar *ngIf=\"showDocumentAiUi\" [(visible)]=\"documentHistoryAiService.state.showAiSidebar\" position=\"right\"\r\n [style]=\"{ width: '420px' }\" styleClass=\"ai-chat-sidebar\" [dismissible]=\"true\" [showCloseIcon]=\"false\"\r\n [showHeader]=\"false\" [appendTo]=\"'body'\">\r\n\r\n <div class=\"ai-sidebar-content\">\r\n <document-ai-chat [selectedDocument]=\"selectedDocument\"></document-ai-chat>\r\n </div>\r\n</p-sidebar>", styles: [".document-review-container{border-radius:8px;max-height:100%;overflow-y:auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.document-review-container .review-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:1rem;border-bottom:1px solid #e5e7eb}.document-review-container .review-header .review-title-section{display:flex;align-items:center;gap:.75rem}.document-review-container .review-header .review-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin:0}.document-review-container .review-header .ai-menu{position:relative}.document-review-container .review-header .ai-menu .ai-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 .85rem;color:#374151;font-size:.875rem;height:40px;line-height:1;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .ai-menu .ai-btn:hover{background:#f9fafb}.document-review-container .review-header .ai-menu .ai-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .ai-menu .ai-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu{position:relative}.document-review-container .review-header .actions-menu .actions-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 1rem;height:40px;line-height:1;color:#374151;font-size:.875rem;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .actions-menu .actions-btn:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .actions-menu .actions-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu .actions-btn i.rotated{transform:rotate(180deg)}.document-review-container .review-header .actions-menu .actions-dropdown{position:absolute;top:100%;right:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:180px;margin-top:.25rem}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item{padding:.75rem 1rem;cursor:pointer;color:#374151;font-size:.875rem;border-bottom:1px solid #f3f4f6;transition:background-color .2s}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:last-child{border-bottom:none;border-radius:0 0 8px 8px}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:first-child{border-radius:8px 8px 0 0}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item span{display:block}.document-review-container ::ng-deep document-actions{margin-bottom:1.5rem}.document-review-container ::ng-deep document-actions .actions-card{margin:0;width:100%}.document-review-container .document-actions-section{padding:1rem 0}.document-review-container .alerts-section{margin-bottom:2rem}.document-review-container .alerts-section .alert-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1rem}.document-review-container .alerts-section .alert-card .alert-header{display:flex;align-items:center;gap:.75rem}.document-review-container .alerts-section .alert-card .alert-header .alert-icon{color:#ef4444;font-size:1.25rem}.document-review-container .alerts-section .alert-card .alert-header .alert-text{font-weight:500;color:#1f2937;font-size:1rem}.document-review-container .alerts-section .alert-card .alert-header .alert-badge{margin-left:auto;display:flex;align-items:center;gap:.5rem;background:#ef4444;color:#fff;border-radius:50%;width:24px;height:24px;justify-content:center;position:relative}.document-review-container .alerts-section .alert-card .alert-header .alert-badge .alert-count{font-size:.75rem;font-weight:600}.document-review-container .alerts-section .alert-card .alert-header .alert-badge i{position:absolute;right:-8px;font-size:.75rem;color:#ef4444;background:#fff;border-radius:50%;width:16px;height:16px;display:flex;align-items:center;justify-content:center}.document-review-container .timeline-section .timeline-title{font-size:1.25rem;font-weight:600;color:#1f2937;margin:0 0 1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item{margin-bottom:1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1.25rem;position:relative}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info{display:flex;align-items:center;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon{width:25px;height:25px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon i{font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-requested{background:#3b82f6}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-accepted{background:#10b981}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-rejected{background:#ef4444}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-default{background:#6b7280}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-label{font-weight:600;color:#1f2937;font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{color:#6b7280;font-size:.875rem;font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description p{color:#374151;line-height:1.5;margin:0;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents{display:flex;flex-direction:column;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:.5rem;display:flex;align-items:center;gap:.75rem;cursor:pointer;transition:all .2s ease}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:hover{background:#e2e8f0;border-color:#3b82f6;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:active{transform:translateY(0);box-shadow:0 1px 2px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-icon{color:#3b82f6;font-size:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-name{color:#1f2937;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user{font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-name{color:rgb(75,85,99,var(--tw-text-opacity, 1));font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-role{color:#6b7280;margin-left:.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-requested{background:#dbeafe;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-accepted{background:#dcfce7;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-rejected{background:#fee2e2;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-default{border-left:4px solid #6b7280}@media (max-width: 768px){.document-review-container{padding:1rem}.document-review-container .review-header{flex-direction:column;gap:1rem;align-items:flex-start}.document-review-container .review-header .actions-menu{align-self:flex-end}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{flex-direction:column;align-items:flex-start;gap:.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{align-self:flex-end}}.ai-sidebar-title{margin:0;font-size:1.1rem;font-weight:600;color:#111827}.ai-sidebar-content{flex:1;display:flex;flex-direction:column;height:100%;padding:0}::ng-deep .ai-chat-sidebar .p-sidebar-header{display:none!important;padding:0!important}::ng-deep .ai-chat-sidebar .p-sidebar-content{padding:0!important;display:flex;flex-direction:column}.ai-sidebar-text{margin:0;color:#4b5563;font-size:.95rem;line-height:1.5;white-space:pre-wrap}.ai-markdown p{margin:0 0 .5rem}.ai-markdown :last-child{margin-bottom:0}.ai-markdown strong{color:#111827;font-weight:700}.ai-markdown .ai-markdown-list{margin:0 0 .5rem 1.1rem;padding:0}.ai-markdown li{margin-bottom:.35rem}.ai-sidebar-error{margin:0;color:#dc2626;font-size:.9rem}.query-chat-messages{max-height:calc(100vh - 260px);overflow-y:auto;padding:.25rem .1rem .5rem;margin-bottom:.75rem}.query-chat-empty{color:#6b7280;font-size:.9rem;text-align:center;padding:.75rem .5rem}.query-chat-message{display:flex;margin-bottom:.6rem}.query-chat-message.user{justify-content:flex-end}.query-chat-message.assistant{justify-content:flex-start}.query-chat-bubble{max-width:85%;padding:.6rem .75rem;border-radius:12px;font-size:.9rem;line-height:1.45;border:1px solid #e5e7eb;background:#f9fafb;color:#1f2937}.query-chat-message.user .query-chat-bubble{background:#dbeafe;border-color:#bfdbfe}.query-chat-input-wrap{display:flex;flex-direction:column;gap:.5rem}.query-chat-input{width:100%;border:1px solid #d1d5db;border-radius:8px;padding:.6rem .7rem;font-size:.9rem;resize:vertical;min-height:70px}.query-chat-input:focus{outline:none;border-color:#60a5fa;box-shadow:0 0 0 2px #60a5fa33}.query-send-btn{align-self:flex-end;border:1px solid #2563eb;background:#2563eb;color:#fff;border-radius:8px;padding:.45rem .9rem;font-size:.85rem;cursor:pointer}.query-send-btn:hover:not(:disabled){background:#1d4ed8}.query-send-btn:disabled{cursor:not-allowed;opacity:.6}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.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: "directive", type: HasPermissionDirective, selector: "[permission]", inputs: ["permission"] }, { kind: "component", type: DocumentAiChatComponent, selector: "document-ai-chat", inputs: ["selectedDocument"] }] });
7528
7271
  }
7529
7272
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryComponent, decorators: [{
7530
7273
  type: Component,
7531
- args: [{ selector: 'document-history', standalone: false, template: "<div class=\"document-review-container\">\r\n <!-- Header Section -->\r\n <div class=\"review-header\">\r\n <div class=\"review-title-section\">\r\n <h2 class=\"review-title\">Document Review</h2>\r\n <div class=\"ai-menu\" *ngIf=\"showDocumentAiUi\">\r\n <button class=\"ai-btn\" type=\"button\" (click)=\"openAiPanel('Query')\" [class.active]=\"documentHistoryAiService.state.showAiSidebar\">\r\n <i class=\"pi pi-sparkles\"></i>\r\n <span>AI</span>\r\n </button>\r\n </div>\r\n </div>\r\n <!-- <div class=\"actions-menu\" *ngIf=\"selectedDocument?.isUploaded || selectedDocument?.status == 'Approved'\"> -->\r\n <!-- <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.isUploaded || selectedDocument?.status == 'Approved') && !selectedDocument?.isSystemDocument\"> -->\r\n <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.status !== 'Approved') && (!selectedDocument?.isSystemDocument)\">\r\n <button class=\"actions-btn\" (click)=\"toggleActionsMenu()\" [class.active]=\"showActionsMenu\">\r\n Actions\r\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\r\n </button>\r\n\r\n <!-- Actions Dropdown Menu -->\r\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\" (click)=\"$event.stopPropagation()\">\r\n <div class=\"dropdown-item\" *ngIf=\"selectedDocument?.status == 'Approved' || selectedDocument?.isUploaded || selectedDocument?.status == 'Uploaded'\">\r\n <ng-content [select]=\"'action-launcher'\"></ng-content>\r\n </div>\r\n <div *ngIf=\"selectedDocument?.status == 'Uploaded' || selectedDocument?.status === 'Rejected' || selectedDocument?.status === 'Reviewing' || selectedDocument?.status === 'Pending'\" [permission]=\"'documents-deleteDocumentByDocumentId'\" class=\"dropdown-item\" (click)=\"onDeleteTask()\">\r\n <span>Delete Document</span>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Document Actions Component - Below Header -->\r\n <div class=\"document-actions-section\">\r\n <ng-content select=\"[actions-component]\"></ng-content>\r\n </div>\r\n\r\n\r\n <!-- Alerts Section -->\r\n <!-- <div class=\"alerts-section\">\r\n <div class=\"alert-card\">\r\n <div class=\"alert-header\">\r\n <i class=\"pi pi-exclamation-triangle alert-icon\"></i>\r\n <span class=\"alert-text\">Alerts</span>\r\n <div class=\"alert-badge\">\r\n <span class=\"alert-count\">{{ getAlertCount() }}</span>\r\n <i class=\"pi pi-chevron-right\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <!-- Timeline Section -->\r\n <div class=\"timeline-section\" *ngIf=\"showHistory && historyData.length > 0\">\r\n <h3 class=\"timeline-title\">Timeline</h3>\r\n <div class=\"timeline-container\">\r\n <div class=\"timeline-item\" *ngFor=\"let section of processedHistoryData\">\r\n <ng-container *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-event mb-2\" *ngIf=\"!item.shouldHide\">\r\n <div class=\"event-card\" [ngClass]=\"item.eventCardClass\">\r\n <!-- Event Header -->\r\n <div class=\"event-header\">\r\n <div class=\"event-info\">\r\n <i [class]=\"item.eventIcon\"></i>\r\n <span class=\"event-label\">{{ item.label }}</span>\r\n </div>\r\n <div class=\"event-timestamp\">{{ item.dateTime }}</div>\r\n </div>\r\n <!-- User Information -->\r\n <div class=\"event-user mb-2\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n <!-- Event Description -->\r\n <div class=\"event-description\" *ngIf=\"item.requestDescription\">\r\n <ul class=\"event-description-list\" *ngIf=\"item.label.toLowerCase().includes('requested')\">\r\n <li class=\"event-description-item\">{{ item.requestDescription }}</li>\r\n </ul>\r\n <p *ngIf=\"!item.label.toLowerCase().includes('requested')\">{{ item.requestDescription }}</p>\r\n </div>\r\n\r\n <!-- Document Upload Cards -->\r\n <div class=\"document-uploads\" *ngIf=\"item.documentList && item.documentList.length > 0\">\r\n <div class=\"uploaded-documents\">\r\n <div class=\"document-card\" *ngFor=\"let doc of item.documentList\" (click)=\"onDocumentClick(doc)\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <span class=\"document-name\">{{ doc.docName }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- <ng-content [select]=\"'actions-component'\"></ng-content> -->\r\n</div>\r\n\r\n<p-sidebar *ngIf=\"showDocumentAiUi\" [(visible)]=\"documentHistoryAiService.state.showAiSidebar\" position=\"right\"\r\n [style]=\"{ width: '420px' }\" styleClass=\"ai-chat-sidebar\" [dismissible]=\"true\" [showCloseIcon]=\"false\"\r\n [showHeader]=\"false\" [appendTo]=\"'body'\">\r\n\r\n <div class=\"ai-sidebar-content\">\r\n <document-ai-chat [selectedDocument]=\"selectedDocument\"></document-ai-chat>\r\n </div>\r\n</p-sidebar>", styles: [".document-review-container{border-radius:8px;max-height:100%;overflow-y:auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.document-review-container .review-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:1rem;border-bottom:1px solid #e5e7eb}.document-review-container .review-header .review-title-section{display:flex;align-items:center;gap:.75rem}.document-review-container .review-header .review-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin:0}.document-review-container .review-header .ai-menu{position:relative}.document-review-container .review-header .ai-menu .ai-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 .85rem;color:#374151;font-size:.875rem;height:40px;line-height:1;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .ai-menu .ai-btn:hover{background:#f9fafb}.document-review-container .review-header .ai-menu .ai-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .ai-menu .ai-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu{position:relative}.document-review-container .review-header .actions-menu .actions-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 1rem;height:40px;line-height:1;color:#374151;font-size:.875rem;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .actions-menu .actions-btn:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .actions-menu .actions-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu .actions-btn i.rotated{transform:rotate(180deg)}.document-review-container .review-header .actions-menu .actions-dropdown{position:absolute;top:100%;right:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:180px;margin-top:.25rem}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item{padding:.75rem 1rem;cursor:pointer;color:#374151;font-size:.875rem;border-bottom:1px solid #f3f4f6;transition:background-color .2s}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:last-child{border-bottom:none;border-radius:0 0 8px 8px}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:first-child{border-radius:8px 8px 0 0}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item span{display:block}.document-review-container ::ng-deep document-actions{margin-bottom:1.5rem}.document-review-container ::ng-deep document-actions .actions-card{margin:0;width:100%}.document-review-container .document-actions-section{padding:1rem 0}.document-review-container .alerts-section{margin-bottom:2rem}.document-review-container .alerts-section .alert-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1rem}.document-review-container .alerts-section .alert-card .alert-header{display:flex;align-items:center;gap:.75rem}.document-review-container .alerts-section .alert-card .alert-header .alert-icon{color:#ef4444;font-size:1.25rem}.document-review-container .alerts-section .alert-card .alert-header .alert-text{font-weight:500;color:#1f2937;font-size:1rem}.document-review-container .alerts-section .alert-card .alert-header .alert-badge{margin-left:auto;display:flex;align-items:center;gap:.5rem;background:#ef4444;color:#fff;border-radius:50%;width:24px;height:24px;justify-content:center;position:relative}.document-review-container .alerts-section .alert-card .alert-header .alert-badge .alert-count{font-size:.75rem;font-weight:600}.document-review-container .alerts-section .alert-card .alert-header .alert-badge i{position:absolute;right:-8px;font-size:.75rem;color:#ef4444;background:#fff;border-radius:50%;width:16px;height:16px;display:flex;align-items:center;justify-content:center}.document-review-container .timeline-section .timeline-title{font-size:1.25rem;font-weight:600;color:#1f2937;margin:0 0 1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item{margin-bottom:1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1.25rem;position:relative}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info{display:flex;align-items:center;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon{width:25px;height:25px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon i{font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-requested{background:#3b82f6}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-accepted{background:#10b981}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-rejected{background:#ef4444}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-default{background:#6b7280}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-label{font-weight:600;color:#1f2937;font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{color:#6b7280;font-size:.875rem;font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description p{color:#374151;line-height:1.5;margin:0;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents{display:flex;flex-direction:column;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:.5rem;display:flex;align-items:center;gap:.75rem;cursor:pointer;transition:all .2s ease}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:hover{background:#e2e8f0;border-color:#3b82f6;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:active{transform:translateY(0);box-shadow:0 1px 2px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-icon{color:#3b82f6;font-size:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-name{color:#1f2937;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user{font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-name{color:rgb(75,85,99,var(--tw-text-opacity, 1));font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-role{color:#6b7280;margin-left:.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-requested{background:#dbeafe;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-accepted{background:#dcfce7;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-rejected{background:#fee2e2;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-default{border-left:4px solid #6b7280}@media (max-width: 768px){.document-review-container{padding:1rem}.document-review-container .review-header{flex-direction:column;gap:1rem;align-items:flex-start}.document-review-container .review-header .actions-menu{align-self:flex-end}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{flex-direction:column;align-items:flex-start;gap:.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{align-self:flex-end}}.ai-sidebar-title{margin:0;font-size:1.1rem;font-weight:600;color:#111827}.ai-sidebar-content{flex:1;display:flex;flex-direction:column;height:100%;padding:0}::ng-deep .ai-chat-sidebar .p-sidebar-header{display:none!important;padding:0!important}::ng-deep .ai-chat-sidebar .p-sidebar-content{padding:0!important;display:flex;flex-direction:column}.ai-sidebar-text{margin:0;color:#4b5563;font-size:.95rem;line-height:1.5;white-space:pre-wrap}.ai-markdown p{margin:0 0 .5rem}.ai-markdown :last-child{margin-bottom:0}.ai-markdown strong{color:#111827;font-weight:700}.ai-markdown .ai-markdown-list{margin:0 0 .5rem 1.1rem;padding:0}.ai-markdown li{margin-bottom:.35rem}.ai-sidebar-error{margin:0;color:#dc2626;font-size:.9rem}.query-chat-messages{max-height:calc(100vh - 260px);overflow-y:auto;padding:.25rem .1rem .5rem;margin-bottom:.75rem}.query-chat-empty{color:#6b7280;font-size:.9rem;text-align:center;padding:.75rem .5rem}.query-chat-message{display:flex;margin-bottom:.6rem}.query-chat-message.user{justify-content:flex-end}.query-chat-message.assistant{justify-content:flex-start}.query-chat-bubble{max-width:85%;padding:.6rem .75rem;border-radius:12px;font-size:.9rem;line-height:1.45;border:1px solid #e5e7eb;background:#f9fafb;color:#1f2937}.query-chat-message.user .query-chat-bubble{background:#dbeafe;border-color:#bfdbfe}.query-chat-input-wrap{display:flex;flex-direction:column;gap:.5rem}.query-chat-input{width:100%;border:1px solid #d1d5db;border-radius:8px;padding:.6rem .7rem;font-size:.9rem;resize:vertical;min-height:70px}.query-chat-input:focus{outline:none;border-color:#60a5fa;box-shadow:0 0 0 2px #60a5fa33}.query-send-btn{align-self:flex-end;border:1px solid #2563eb;background:#2563eb;color:#fff;border-radius:8px;padding:.45rem .9rem;font-size:.85rem;cursor:pointer}.query-send-btn:hover:not(:disabled){background:#1d4ed8}.query-send-btn:disabled{cursor:not-allowed;opacity:.6}\n"] }]
7274
+ args: [{ selector: 'document-history', standalone: false, template: "<div class=\"document-review-container\">\r\n <!-- Header Section -->\r\n <div class=\"review-header\">\r\n <div class=\"review-title-section\">\r\n <h2 class=\"review-title\">Document Review</h2>\r\n <!-- <div class=\"ai-menu\" *ngIf=\"showDocumentAiUi\">\r\n <button class=\"ai-btn\" type=\"button\" (click)=\"openAiPanel('Query')\" [class.active]=\"documentHistoryAiService.state.showAiSidebar\">\r\n <i class=\"pi pi-sparkles\"></i>\r\n <span>AI</span>\r\n </button>\r\n </div> -->\r\n </div>\r\n <!-- <div class=\"actions-menu\" *ngIf=\"selectedDocument?.isUploaded || selectedDocument?.status == 'Approved'\"> -->\r\n <!-- <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.isUploaded || selectedDocument?.status == 'Approved') && !selectedDocument?.isSystemDocument\"> -->\r\n <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.status !== 'Approved') && (!selectedDocument?.isSystemDocument)\">\r\n <button class=\"actions-btn\" (click)=\"toggleActionsMenu()\" [class.active]=\"showActionsMenu\">\r\n Actions\r\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\r\n </button>\r\n\r\n <!-- Actions Dropdown Menu -->\r\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\" (click)=\"$event.stopPropagation()\">\r\n <!-- <div class=\"dropdown-item\" *ngIf=\"selectedDocument?.status == 'Approved' || selectedDocument?.isUploaded || selectedDocument?.status == 'Uploaded'\">\r\n <ng-content [select]=\"'action-launcher'\"></ng-content>\r\n </div> -->\r\n <div *ngIf=\"selectedDocument?.status == 'Uploaded' || selectedDocument?.status === 'Rejected' || selectedDocument?.status === 'Reviewing' || selectedDocument?.status === 'Pending'\" [permission]=\"'documents-deleteDocumentByDocumentId'\" class=\"dropdown-item\" (click)=\"onDeleteTask()\">\r\n <span>Delete Document</span>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Document Actions Component - Below Header -->\r\n <div class=\"document-actions-section\">\r\n <ng-content select=\"[actions-component]\"></ng-content>\r\n </div>\r\n\r\n\r\n <!-- Alerts Section -->\r\n <!-- <div class=\"alerts-section\">\r\n <div class=\"alert-card\">\r\n <div class=\"alert-header\">\r\n <i class=\"pi pi-exclamation-triangle alert-icon\"></i>\r\n <span class=\"alert-text\">Alerts</span>\r\n <div class=\"alert-badge\">\r\n <span class=\"alert-count\">{{ getAlertCount() }}</span>\r\n <i class=\"pi pi-chevron-right\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <!-- Timeline Section -->\r\n <div class=\"timeline-section\" *ngIf=\"showHistory && historyData.length > 0\">\r\n <h3 class=\"timeline-title\">Timeline</h3>\r\n <div class=\"timeline-container\">\r\n <div class=\"timeline-item\" *ngFor=\"let section of processedHistoryData\">\r\n <ng-container *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-event mb-2\" *ngIf=\"!item.shouldHide\">\r\n <div class=\"event-card\" [ngClass]=\"item.eventCardClass\">\r\n <!-- Event Header -->\r\n <div class=\"event-header\">\r\n <div class=\"event-info\">\r\n <i [class]=\"item.eventIcon\"></i>\r\n <span class=\"event-label\">{{ item.label }}</span>\r\n </div>\r\n <div class=\"event-timestamp\">{{ item.dateTime }}</div>\r\n </div>\r\n <!-- User Information -->\r\n <div class=\"event-user mb-2\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n <!-- Event Description -->\r\n <div class=\"event-description\" *ngIf=\"item.requestDescription\">\r\n <ul class=\"event-description-list\" *ngIf=\"item.label.toLowerCase().includes('requested')\">\r\n <li class=\"event-description-item\">{{ item.requestDescription }}</li>\r\n </ul>\r\n <p *ngIf=\"!item.label.toLowerCase().includes('requested')\">{{ item.requestDescription }}</p>\r\n </div>\r\n\r\n <!-- Document Upload Cards -->\r\n <!-- Commented out child document list panel functionality -->\r\n <!-- <div class=\"document-uploads\" *ngIf=\"item.documentList && item.documentList.length > 0\">\r\n <div class=\"uploaded-documents\">\r\n <div class=\"document-card\" *ngFor=\"let doc of item.documentList\" (click)=\"onDocumentClick(doc)\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <span class=\"document-name\">{{ doc.docName }}</span>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- <ng-content [select]=\"'actions-component'\"></ng-content> -->\r\n</div>\r\n\r\n<p-sidebar *ngIf=\"showDocumentAiUi\" [(visible)]=\"documentHistoryAiService.state.showAiSidebar\" position=\"right\"\r\n [style]=\"{ width: '420px' }\" styleClass=\"ai-chat-sidebar\" [dismissible]=\"true\" [showCloseIcon]=\"false\"\r\n [showHeader]=\"false\" [appendTo]=\"'body'\">\r\n\r\n <div class=\"ai-sidebar-content\">\r\n <document-ai-chat [selectedDocument]=\"selectedDocument\"></document-ai-chat>\r\n </div>\r\n</p-sidebar>", styles: [".document-review-container{border-radius:8px;max-height:100%;overflow-y:auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.document-review-container .review-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:1rem;border-bottom:1px solid #e5e7eb}.document-review-container .review-header .review-title-section{display:flex;align-items:center;gap:.75rem}.document-review-container .review-header .review-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin:0}.document-review-container .review-header .ai-menu{position:relative}.document-review-container .review-header .ai-menu .ai-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 .85rem;color:#374151;font-size:.875rem;height:40px;line-height:1;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .ai-menu .ai-btn:hover{background:#f9fafb}.document-review-container .review-header .ai-menu .ai-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .ai-menu .ai-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu{position:relative}.document-review-container .review-header .actions-menu .actions-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 1rem;height:40px;line-height:1;color:#374151;font-size:.875rem;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .actions-menu .actions-btn:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .actions-menu .actions-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu .actions-btn i.rotated{transform:rotate(180deg)}.document-review-container .review-header .actions-menu .actions-dropdown{position:absolute;top:100%;right:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:180px;margin-top:.25rem}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item{padding:.75rem 1rem;cursor:pointer;color:#374151;font-size:.875rem;border-bottom:1px solid #f3f4f6;transition:background-color .2s}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:last-child{border-bottom:none;border-radius:0 0 8px 8px}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:first-child{border-radius:8px 8px 0 0}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item span{display:block}.document-review-container ::ng-deep document-actions{margin-bottom:1.5rem}.document-review-container ::ng-deep document-actions .actions-card{margin:0;width:100%}.document-review-container .document-actions-section{padding:1rem 0}.document-review-container .alerts-section{margin-bottom:2rem}.document-review-container .alerts-section .alert-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1rem}.document-review-container .alerts-section .alert-card .alert-header{display:flex;align-items:center;gap:.75rem}.document-review-container .alerts-section .alert-card .alert-header .alert-icon{color:#ef4444;font-size:1.25rem}.document-review-container .alerts-section .alert-card .alert-header .alert-text{font-weight:500;color:#1f2937;font-size:1rem}.document-review-container .alerts-section .alert-card .alert-header .alert-badge{margin-left:auto;display:flex;align-items:center;gap:.5rem;background:#ef4444;color:#fff;border-radius:50%;width:24px;height:24px;justify-content:center;position:relative}.document-review-container .alerts-section .alert-card .alert-header .alert-badge .alert-count{font-size:.75rem;font-weight:600}.document-review-container .alerts-section .alert-card .alert-header .alert-badge i{position:absolute;right:-8px;font-size:.75rem;color:#ef4444;background:#fff;border-radius:50%;width:16px;height:16px;display:flex;align-items:center;justify-content:center}.document-review-container .timeline-section .timeline-title{font-size:1.25rem;font-weight:600;color:#1f2937;margin:0 0 1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item{margin-bottom:1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1.25rem;position:relative}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info{display:flex;align-items:center;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon{width:25px;height:25px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon i{font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-requested{background:#3b82f6}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-accepted{background:#10b981}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-rejected{background:#ef4444}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-default{background:#6b7280}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-label{font-weight:600;color:#1f2937;font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{color:#6b7280;font-size:.875rem;font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description p{color:#374151;line-height:1.5;margin:0;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents{display:flex;flex-direction:column;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:.5rem;display:flex;align-items:center;gap:.75rem;cursor:pointer;transition:all .2s ease}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:hover{background:#e2e8f0;border-color:#3b82f6;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:active{transform:translateY(0);box-shadow:0 1px 2px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-icon{color:#3b82f6;font-size:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-name{color:#1f2937;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user{font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-name{color:rgb(75,85,99,var(--tw-text-opacity, 1));font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-role{color:#6b7280;margin-left:.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-requested{background:#dbeafe;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-accepted{background:#dcfce7;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-rejected{background:#fee2e2;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-default{border-left:4px solid #6b7280}@media (max-width: 768px){.document-review-container{padding:1rem}.document-review-container .review-header{flex-direction:column;gap:1rem;align-items:flex-start}.document-review-container .review-header .actions-menu{align-self:flex-end}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{flex-direction:column;align-items:flex-start;gap:.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{align-self:flex-end}}.ai-sidebar-title{margin:0;font-size:1.1rem;font-weight:600;color:#111827}.ai-sidebar-content{flex:1;display:flex;flex-direction:column;height:100%;padding:0}::ng-deep .ai-chat-sidebar .p-sidebar-header{display:none!important;padding:0!important}::ng-deep .ai-chat-sidebar .p-sidebar-content{padding:0!important;display:flex;flex-direction:column}.ai-sidebar-text{margin:0;color:#4b5563;font-size:.95rem;line-height:1.5;white-space:pre-wrap}.ai-markdown p{margin:0 0 .5rem}.ai-markdown :last-child{margin-bottom:0}.ai-markdown strong{color:#111827;font-weight:700}.ai-markdown .ai-markdown-list{margin:0 0 .5rem 1.1rem;padding:0}.ai-markdown li{margin-bottom:.35rem}.ai-sidebar-error{margin:0;color:#dc2626;font-size:.9rem}.query-chat-messages{max-height:calc(100vh - 260px);overflow-y:auto;padding:.25rem .1rem .5rem;margin-bottom:.75rem}.query-chat-empty{color:#6b7280;font-size:.9rem;text-align:center;padding:.75rem .5rem}.query-chat-message{display:flex;margin-bottom:.6rem}.query-chat-message.user{justify-content:flex-end}.query-chat-message.assistant{justify-content:flex-start}.query-chat-bubble{max-width:85%;padding:.6rem .75rem;border-radius:12px;font-size:.9rem;line-height:1.45;border:1px solid #e5e7eb;background:#f9fafb;color:#1f2937}.query-chat-message.user .query-chat-bubble{background:#dbeafe;border-color:#bfdbfe}.query-chat-input-wrap{display:flex;flex-direction:column;gap:.5rem}.query-chat-input{width:100%;border:1px solid #d1d5db;border-radius:8px;padding:.6rem .7rem;font-size:.9rem;resize:vertical;min-height:70px}.query-chat-input:focus{outline:none;border-color:#60a5fa;box-shadow:0 0 0 2px #60a5fa33}.query-send-btn{align-self:flex-end;border:1px solid #2563eb;background:#2563eb;color:#fff;border-radius:8px;padding:.45rem .9rem;font-size:.85rem;cursor:pointer}.query-send-btn:hover:not(:disabled){background:#1d4ed8}.query-send-btn:disabled{cursor:not-allowed;opacity:.6}\n"] }]
7532
7275
  }], ctorParameters: () => [{ type: DocumentHistoryService }, { type: DocumentViewerService }, { type: DocumentActionsService }, { type: i3.ConfirmationService }, { type: DocumentHttpService }, { type: DocumentHistoryAiService }], propDecorators: { historyData: [{
7533
7276
  type: Input
7534
7277
  }], showHistory: [{
@@ -8454,7 +8197,7 @@ class DocumentZoomControlsComponent {
8454
8197
  }
8455
8198
  }
8456
8199
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentZoomControlsComponent, deps: [{ token: DocumentZoomService }, { token: DocumentHttpService }], target: i0.ɵɵFactoryTarget.Component });
8457
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentZoomControlsComponent, isStandalone: false, selector: "document-zoom-controls", inputs: { selectedDocument: "selectedDocument", contextId: "contextId", isFormHide: "isFormHide" }, outputs: { documentNameUpdated: "documentNameUpdated" }, ngImport: i0, template: "<div class=\"control-container\">\r\n <div class=\"inline-flex align-items-center justify-content-center gap-2\">\r\n <!-- Document name display with hover edit icon -->\r\n <div *ngIf=\"!isEditingDocumentName\" class=\"document-name-display\" \r\n [class.clickable-doc-name]=\"selectedDocument?.isAliasEditable\" \r\n [class.non-clickable-doc-name]=\"!selectedDocument?.isAliasEditable\"\r\n (click)=\"selectedDocument?.isAliasEditable ? onDocumentNameClick() : null\"\r\n [title]=\"selectedDocument?.isAliasEditable ? 'Click to edit document name' : 'Document name is not editable'\">\r\n <div class=\"alias-name\">\r\n {{ selectedDocument?.aliasName || selectedDocument?.docName }}\r\n <i *ngIf=\"selectedDocument?.isAliasEditable && !isFormHide\" class=\"pi pi-pencil edit-icon-small\"></i> \r\n </div>\r\n <!-- Subline: show `ownerName documentTypeName` (falls back to just type if no owner) -->\r\n <div class=\"document-name\">\r\n <ng-container [ngTemplateOutlet]=\"ownerTypeDisplay\"></ng-container>\r\n </div>\r\n </div>\r\n <div *ngIf=\"isEditingDocumentName\" class=\"document-edit-container\">\r\n <input #fileInput type=\"text\" class=\"h-3rem file-input-wrapper document-name-input\" pInputText\r\n [(ngModel)]=\"documentName\" (input)=\"onDocumentNameChange($event)\" (keydown.escape)=\"cancelDocumentNameEdit()\"\r\n (keydown.enter)=\"handleSaveClick()\" (blur)=\"handleSaveClick()\" />\r\n <div class=\"document-name-subline\">\r\n <ng-container [ngTemplateOutlet]=\"ownerTypeDisplay\"></ng-container>\r\n </div>\r\n </div>\r\n <div *ngIf=\"fileNameError\" class=\"error-message-wrapper\">\r\n {{ fileNameError }}\r\n </div>\r\n </div>\r\n <div class=\"zoom-controls\">\r\n <p-button type=\"button\" icon=\"pi pi-minus\" [rounded]=\"true\" severity=\"secondary\" [outlined]=\"true\" (click)=\"zoomOut()\" [disabled]=\"isZoomOutDisabled\" title=\"Zoom Out\">\r\n </p-button>\r\n <p-button type=\"button\" icon=\"pi pi-plus\" [rounded]=\"true\" severity=\"secondary\" [outlined]=\"true\" (click)=\"zoomIn()\" [disabled]=\"isZoomInDisabled\" title=\"Zoom In\">\r\n </p-button>\r\n \r\n </div>\r\n\r\n</div>\r\n\r\n<!-- Shared template for displaying Owner + Type -->\r\n<ng-template #ownerTypeDisplay>\r\n <ng-container *ngIf=\"((selectedDocument?.ownerName || '').trim()).length > 0; else onlyTypeTpl\">\r\n {{ selectedDocument?.ownerName }}<ng-container *ngIf=\"selectedDocument?.documentTypeName\"> {{ selectedDocument?.documentTypeName }}</ng-container>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #onlyTypeTpl>\r\n {{ selectedDocument?.documentTypeName }}\r\n\r\n", styles: ["@charset \"UTF-8\";.control-container{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:0;width:100%}.document-name-display{display:flex;flex-direction:column;gap:.25rem;cursor:pointer;padding:.75rem;border-radius:.5rem;transition:all .2s ease;border:1px solid transparent;margin-right:auto}.document-name-display:hover{background-color:transparent;border-color:transparent;transform:none;box-shadow:none}.document-name-display.non-clickable-doc-name{cursor:default}.document-name-display .alias-name{font-weight:600;color:#1e293b;font-size:1.125rem;display:flex;align-items:center;gap:.5rem;line-height:1.4}.document-name-display .alias-name .edit-icon-small{font-size:.75rem;color:#64748b;opacity:.7;transition:all .2s ease;padding:.25rem;border-radius:.25rem}.document-name-display.clickable-doc-name .alias-name:hover{color:#1d4ed8}.document-name-display .document-name{font-size:.875rem;color:#64748b;font-weight:400;line-height:1.3;word-break:break-all}.document-name-display.clickable-doc-name:hover .edit-icon-small{opacity:1;color:#475569}.document-edit-container{display:flex;flex-direction:column;gap:.375rem;padding:0;background:transparent;border-radius:0;border:none}.document-edit-container .document-name-input{border:none!important;border-bottom:2px solid #3b82f6!important;border-radius:0!important;padding:.25rem 0!important;font-size:1.125rem!important;font-weight:600!important;color:#1e293b!important;background:transparent!important;transition:border-color .2s ease;width:auto;min-width:12rem;max-width:100%;box-shadow:none!important;outline:none!important}.document-edit-container .document-name-input:focus{outline:none!important;border-bottom-color:#1d4ed8!important;box-shadow:none!important}.document-edit-container .document-name-input::placeholder{color:#94a3b8;font-weight:400}.document-edit-container .document-name-subline{font-size:.875rem;color:#94a3b8;padding-left:0;line-height:1.3}:host ::ng-deep .document-name-input.p-inputtext,:host ::ng-deep .document-name-input.p-inputtext:enabled:focus,:host ::ng-deep .document-name-input.p-inputtext:focus{border:none!important;border-bottom:2px solid #3b82f6!important;border-radius:0!important;box-shadow:none!important;outline:none!important;background:transparent!important}:host ::ng-deep .document-name-input.p-inputtext:hover,:host ::ng-deep .document-name-input.p-inputtext:enabled:hover{border:none!important;border-bottom:2px solid #1d4ed8!important;border-radius:0!important;box-shadow:none!important;outline:none!important;background:transparent!important}.error-message-wrapper{color:#dc2626;font-size:.875rem;font-weight:500;padding:.5rem .75rem;background-color:#fef2f2;border:1px solid #fecaca;border-radius:.5rem;margin-top:.25rem;display:flex;align-items:center;gap:.5rem}.error-message-wrapper:before{content:\"\\26a0\";font-size:1rem}.zoom-controls{display:flex;align-items:center;gap:.75rem;transition:all .2s ease;margin-left:auto;padding-right:10px}.zoom-controls .zoom-button{width:44px;height:44px;border-radius:.5rem;border:none;background:#fff;color:#475569;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease;font-size:1.25rem;font-weight:600;box-shadow:0 1px 3px #0000001a}.zoom-controls .zoom-button:hover:not(:disabled){background:#3b82f6;color:#fff;transform:translateY(-2px);box-shadow:0 6px 16px #3b82f666}.zoom-controls .zoom-button:active:not(:disabled){transform:translateY(0);box-shadow:0 2px 6px #3b82f64d}.zoom-controls .zoom-button:disabled{opacity:.4;cursor:not-allowed;background:#f1f5f9;color:#94a3b8;transform:none}.zoom-controls .zoom-button i{font-size:1rem;transition:transform .2s ease}.zoom-controls .zoom-button:hover:not(:disabled) i{transform:scale(1.1)}.zoom-controls .zoom-level{min-width:4.5rem;text-align:center;font-weight:700;color:#1e293b;font-size:1rem;background:#fff;padding:.75rem 1rem;border-radius:.5rem;border:1px solid #e2e8f0;box-shadow:0 1px 2px #0000000d;transition:all .2s ease;-webkit-user-select:none;user-select:none}.zoom-controls .zoom-level:hover{background:#f8fafc;border-color:#cbd5e1;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.zoom-controls .reset-button{padding:.75rem 1.25rem;border:1px solid #cbd5e1;background:#fff;color:#64748b;border-radius:.5rem;font-size:.875rem;font-weight:500;cursor:pointer;transition:all .2s ease;box-shadow:0 1px 2px #0000000d;white-space:nowrap}.zoom-controls .reset-button:hover{background:#f8fafc;border-color:#94a3b8;color:#475569;transform:translateY(-1px);box-shadow:0 3px 6px #0000001a}.zoom-controls .reset-button:active{transform:translateY(0)}@media (max-width: 768px){.control-container{gap:.75rem;flex-direction:column;align-items:stretch;justify-content:flex-start}.document-name-display{margin-right:0;margin-bottom:.5rem}.zoom-controls{margin-left:0;align-self:flex-end}.zoom-controls{padding:.75rem;gap:.5rem;flex-wrap:wrap;justify-content:center}.zoom-controls .zoom-button{width:40px;height:40px}.zoom-controls .zoom-level{min-width:4rem;padding:.5rem .75rem}.zoom-controls .reset-button{padding:.5rem 1rem;font-size:.8rem}.document-name-display{padding:.5rem}.document-name-display .alias-name{font-size:1rem}}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i9.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: "directive", type: i9$1.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: i9$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i6$1.InputText, selector: "[pInputText]", inputs: ["variant"] }] });
8200
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentZoomControlsComponent, isStandalone: false, selector: "document-zoom-controls", inputs: { selectedDocument: "selectedDocument", contextId: "contextId", isFormHide: "isFormHide" }, outputs: { documentNameUpdated: "documentNameUpdated" }, ngImport: i0, template: "<div class=\"control-container\">\r\n <div class=\"inline-flex align-items-center justify-content-center gap-2\">\r\n <!-- Document name display with hover edit icon -->\r\n <div *ngIf=\"!isEditingDocumentName\" class=\"document-name-display\" \r\n [class.clickable-doc-name]=\"selectedDocument?.isAliasEditable\" \r\n [class.non-clickable-doc-name]=\"!selectedDocument?.isAliasEditable\"\r\n (click)=\"selectedDocument?.isAliasEditable ? onDocumentNameClick() : null\"\r\n [title]=\"selectedDocument?.isAliasEditable ? 'Click to edit document name' : 'Document name is not editable'\">\r\n <div class=\"alias-name\">\r\n {{ selectedDocument?.aliasName || selectedDocument?.docName }}\r\n <i *ngIf=\"selectedDocument?.isAliasEditable && !isFormHide\" class=\"pi pi-pencil edit-icon-small\"></i> \r\n </div>\r\n <!-- Subline: show `ownerName documentTypeName` (falls back to just type if no owner) -->\r\n <div class=\"document-name\">\r\n <ng-container [ngTemplateOutlet]=\"ownerTypeDisplay\"></ng-container>\r\n </div>\r\n </div>\r\n <div *ngIf=\"isEditingDocumentName\" class=\"document-edit-container\">\r\n <input #fileInput type=\"text\" class=\"h-3rem file-input-wrapper document-name-input\" pInputText\r\n [(ngModel)]=\"documentName\" (input)=\"onDocumentNameChange($event)\" (keydown.escape)=\"cancelDocumentNameEdit()\"\r\n (keydown.enter)=\"handleSaveClick()\" (blur)=\"handleSaveClick()\" />\r\n <div class=\"document-name-subline\">\r\n <ng-container [ngTemplateOutlet]=\"ownerTypeDisplay\"></ng-container>\r\n </div>\r\n </div>\r\n <div *ngIf=\"fileNameError\" class=\"error-message-wrapper\">\r\n {{ fileNameError }}\r\n </div>\r\n </div>\r\n <div class=\"zoom-controls\">\r\n <p-button type=\"button\" icon=\"pi pi-minus\" [rounded]=\"true\" severity=\"secondary\" [outlined]=\"true\" (click)=\"zoomOut()\" [disabled]=\"isZoomOutDisabled\" title=\"Zoom Out\">\r\n </p-button>\r\n <p-button type=\"button\" icon=\"pi pi-plus\" [rounded]=\"true\" severity=\"secondary\" [outlined]=\"true\" (click)=\"zoomIn()\" [disabled]=\"isZoomInDisabled\" title=\"Zoom In\">\r\n </p-button>\r\n \r\n </div>\r\n\r\n</div>\r\n\r\n<!-- Shared template for displaying Owner + Type -->\r\n<ng-template #ownerTypeDisplay>\r\n <ng-container *ngIf=\"((selectedDocument?.ownerName || '').trim()).length > 0; else onlyTypeTpl\">\r\n {{ selectedDocument?.ownerName }}<ng-container *ngIf=\"selectedDocument?.documentTypeName\"> {{ selectedDocument?.documentTypeName }}</ng-container>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #onlyTypeTpl>\r\n {{ selectedDocument?.documentTypeName }}\r\n\r\n", styles: ["@charset \"UTF-8\";.control-container{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:0;width:100%}.document-name-display{display:flex;flex-direction:column;gap:.25rem;cursor:pointer;padding:.75rem;border-radius:.5rem;transition:all .2s ease;border:1px solid transparent;margin-right:auto}.document-name-display:hover{background-color:transparent;border-color:transparent;transform:none;box-shadow:none}.document-name-display.non-clickable-doc-name{cursor:default}.document-name-display .alias-name{font-weight:600;color:#1e293b;font-size:1.125rem;display:flex;align-items:center;gap:.5rem;line-height:1.4}.document-name-display .alias-name .edit-icon-small{font-size:.75rem;color:#64748b;opacity:.7;transition:all .2s ease;padding:.25rem;border-radius:.25rem}.document-name-display.clickable-doc-name .alias-name:hover{color:#1d4ed8}.document-name-display .document-name{font-size:.875rem;color:#64748b;font-weight:400;line-height:1.3;word-break:break-all}.document-name-display.clickable-doc-name:hover .edit-icon-small{opacity:1;color:#475569}.document-edit-container{display:flex;flex-direction:column;gap:.375rem;padding:0;background:transparent;border-radius:0;border:none}.document-edit-container .document-name-input{border:none!important;border-bottom:2px solid #3b82f6!important;border-radius:0!important;padding:.25rem 0!important;font-size:1.125rem!important;font-weight:600!important;color:#1e293b!important;background:transparent!important;transition:border-color .2s ease;width:auto;min-width:12rem;max-width:100%;box-shadow:none!important;outline:none!important}.document-edit-container .document-name-input:focus{outline:none!important;border-bottom-color:#1d4ed8!important;box-shadow:none!important}.document-edit-container .document-name-input::placeholder{color:#94a3b8;font-weight:400}.document-edit-container .document-name-subline{font-size:.875rem;color:#94a3b8;padding-left:0;line-height:1.3}:host ::ng-deep .document-name-input.p-inputtext,:host ::ng-deep .document-name-input.p-inputtext:enabled:focus,:host ::ng-deep .document-name-input.p-inputtext:focus{border:none!important;border-bottom:2px solid #3b82f6!important;border-radius:0!important;box-shadow:none!important;outline:none!important;background:transparent!important}:host ::ng-deep .document-name-input.p-inputtext:hover,:host ::ng-deep .document-name-input.p-inputtext:enabled:hover{border:none!important;border-bottom:2px solid #1d4ed8!important;border-radius:0!important;box-shadow:none!important;outline:none!important;background:transparent!important}.error-message-wrapper{color:#dc2626;font-size:.875rem;font-weight:500;padding:.5rem .75rem;background-color:#fef2f2;border:1px solid #fecaca;border-radius:.5rem;margin-top:.25rem;display:flex;align-items:center;gap:.5rem}.error-message-wrapper:before{content:\"\\26a0\";font-size:1rem}.zoom-controls{display:flex;align-items:center;gap:.75rem;transition:all .2s ease;margin-left:auto;padding-right:10px}.zoom-controls .zoom-button{width:44px;height:44px;border-radius:.5rem;border:none;background:#fff;color:#475569;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease;font-size:1.25rem;font-weight:600;box-shadow:0 1px 3px #0000001a}.zoom-controls .zoom-button:hover:not(:disabled){background:#3b82f6;color:#fff;transform:translateY(-2px);box-shadow:0 6px 16px #3b82f666}.zoom-controls .zoom-button:active:not(:disabled){transform:translateY(0);box-shadow:0 2px 6px #3b82f64d}.zoom-controls .zoom-button:disabled{opacity:.4;cursor:not-allowed;background:#f1f5f9;color:#94a3b8;transform:none}.zoom-controls .zoom-button i{font-size:1rem;transition:transform .2s ease}.zoom-controls .zoom-button:hover:not(:disabled) i{transform:scale(1.1)}.zoom-controls .zoom-level{min-width:4.5rem;text-align:center;font-weight:700;color:#1e293b;font-size:1rem;background:#fff;padding:.75rem 1rem;border-radius:.5rem;border:1px solid #e2e8f0;box-shadow:0 1px 2px #0000000d;transition:all .2s ease;-webkit-user-select:none;user-select:none}.zoom-controls .zoom-level:hover{background:#f8fafc;border-color:#cbd5e1;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.zoom-controls .reset-button{padding:.75rem 1.25rem;border:1px solid #cbd5e1;background:#fff;color:#64748b;border-radius:.5rem;font-size:.875rem;font-weight:500;cursor:pointer;transition:all .2s ease;box-shadow:0 1px 2px #0000000d;white-space:nowrap}.zoom-controls .reset-button:hover{background:#f8fafc;border-color:#94a3b8;color:#475569;transform:translateY(-1px);box-shadow:0 3px 6px #0000001a}.zoom-controls .reset-button:active{transform:translateY(0)}@media (max-width: 768px){.control-container{gap:.75rem;flex-direction:column;align-items:stretch;justify-content:flex-start}.document-name-display{margin-right:0;margin-bottom:.5rem}.zoom-controls{margin-left:0;align-self:flex-end}.zoom-controls{padding:.75rem;gap:.5rem;flex-wrap:wrap;justify-content:center}.zoom-controls .zoom-button{width:40px;height:40px}.zoom-controls .zoom-level{min-width:4rem;padding:.5rem .75rem}.zoom-controls .reset-button{padding:.5rem 1rem;font-size:.8rem}.document-name-display{padding:.5rem}.document-name-display .alias-name{font-size:1rem}}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i9.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: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i6$1.InputText, selector: "[pInputText]", inputs: ["variant"] }] });
8458
8201
  }
8459
8202
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentZoomControlsComponent, decorators: [{
8460
8203
  type: Component,
@@ -9102,11 +8845,11 @@ class DocumentContentViewerComponent {
9102
8845
  }
9103
8846
  }
9104
8847
  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 }, { token: i5$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
9105
- 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 [selectedDocument]=\"selectedDocument\" [contextId]=\"contextId\" [isFormHide]=\"isFormHide\">\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 [src]=\"documentUrl\" [rotation]=\"0\" [original-size]=\"false\" [show-all]=\"true\" [fit-to-page]=\"false\"\r\n [zoom]=\"currentZoom / 100\" [zoom-scale]=\"'page-width'\" [stick-to-page]=\"false\" [render-text]=\"true\"\r\n [external-link-target]=\"'blank'\" [autoresize]=\"true\" [show-borders]=\"false\"\r\n style=\"width: 100%; height: 100%\"></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 [src]=\"documentUrl\" [alt]=\"documentName || 'Document Image'\" class=\"document-image\"\r\n [style.transform]=\"'scale(' + (currentZoom / 100) + ')'\" [style.transform-origin]=\"'center center'\" />\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 type=\"button\" class=\"p-button p-button-primary p-button-sm\" (click)=\"downloadDocument()\">\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\" [class.zoomed]=\"currentZoom !== 100\" (wheel)=\"onWheel($event)\">\r\n <ngx-doc-viewer [url]=\"documentUrl\" viewer=\"office\" style=\"width:100%;height:97%;\"></ngx-doc-viewer>\r\n <!-- Invisible overlay to capture wheel events over document content -->\r\n <div class=\"wheel-capture-overlay\" (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\" [class.zoomed]=\"currentZoom !== 100\" (wheel)=\"onWheel($event)\">\r\n <ngx-doc-viewer [url]=\"documentUrl\" viewer=\"office\" style=\"width:100%;height:97%;\"></ngx-doc-viewer>\r\n <div class=\"wheel-capture-overlay\" (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 type=\"button\" class=\"p-button p-button-primary p-button-sm\" (click)=\"downloadDocument()\">\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\" [style.transform-origin]=\"'center center'\" (wheel)=\"onWheel($event)\">\r\n <p-table [value]=\"safeCsvStyledData\" [tableStyle]=\"{'min-width': '100%'}\" [scrollable]=\"true\"\r\n scrollHeight=\"67vh\" class=\"csv-table\">\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=\"email-container\">\r\n @if(isLoadingEmail){\r\n <div class=\"loading-container text-center m-1/2\">\r\n <i class=\"pi pi-spin pi-spinner\" style=\"font-size: 2rem;\"></i>\r\n <p>Opening email...</p>\r\n </div>\r\n }\r\n @else if(isEmailAsPdf && emailPdfUrl){\r\n <!-- Render PDF when email is converted -->\r\n <pdf-viewer [src]=\"emailPdfUrl\" [rotation]=\"0\" [original-size]=\"false\" [show-all]=\"true\" [fit-to-page]=\"false\"\r\n [zoom]=\"currentZoom/100\" [zoom-scale]=\"'page-width'\" [stick-to-page]=\"false\" [render-text]=\"true\"\r\n [external-link-target]=\"'blank'\" [autoresize]=\"true\" [show-borders]=\"false\"\r\n style=\"width: 100%; height: 82vh;\"></pdf-viewer>\r\n }\r\n @else if(emailError){\r\n <div class=\"error-container\">\r\n <div class=\"error-content\">\r\n <i class=\"pi pi-exclamation-circle\" style=\"font-size: 2rem; color: #ef4444;\"></i>\r\n <h4>Unable to Preview Email</h4>\r\n <p>{{ emailError }}</p>\r\n <div class=\"error-actions\">\r\n <button type=\"button\" class=\"p-button p-button-primary p-button-sm\" (click)=\"downloadDocument()\">\r\n <i class=\"pi pi-download\"></i>\r\n Download\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n }\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\" [class.zoomed]=\"currentZoom !== 100\" (wheel)=\"onWheel($event)\">\r\n <ngx-doc-viewer [url]=\"documentUrl\" viewer=\"office\" style=\"width:100%;height:800px;\"></ngx-doc-viewer>\r\n <!-- Invisible overlay to capture wheel events over document content -->\r\n <div class=\"wheel-capture-overlay\" (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\r\n view.</p>\r\n </div>\r\n <div class=\"document-actions\">\r\n <button type=\"button\" class=\"p-button p-button-primary p-button-sm\" (click)=\"downloadDocument()\">\r\n <i class=\"pi pi-download\"></i>\r\n Download\r\n </button>\r\n <button type=\"button\" class=\"p-button p-button-outlined p-button-sm\" (click)=\"openInNewTab()\">\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>", 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 .email-container{width:100%;height:100%;border-radius:8px;overflow:hidden}.document-content-viewer-container .email-container ::ng-deep .ng2-pdf-viewer-container{height:82%!important;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 .pdf-container ::ng-deep .ng2-pdf-viewer-container::-webkit-scrollbar{width:12px;height:12px}.document-content-viewer-container .pdf-container ::ng-deep .ng2-pdf-viewer-container::-webkit-scrollbar-track{background:#f1f1f1;border-radius:6px}.document-content-viewer-container .pdf-container ::ng-deep .ng2-pdf-viewer-container::-webkit-scrollbar-thumb{background:#888;border-radius:6px}.document-content-viewer-container .pdf-container ::ng-deep .ng2-pdf-viewer-container::-webkit-scrollbar-thumb:hover{background:#555}.document-content-viewer-container .pdf-container ::ng-deep .ng2-pdf-viewer-container{scrollbar-width:thin;scrollbar-color:#888 #f1f1f1}.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}.csv-container .email-container{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;border-radius:8px;overflow:auto}.csv-container .email-container .loading-container{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2rem;text-align:center;color:#6b7280}.csv-container .email-container .loading-container i{margin-bottom:1rem}.csv-container .email-container .loading-container p{margin:0;color:#9ca3af;font-size:.875rem}.csv-container .email-container .error-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.csv-container .email-container .error-container .error-content{text-align:center;max-width:400px}.csv-container .email-container .error-container .error-content i{margin-bottom:1rem}.csv-container .email-container .error-container .error-content h4{margin:0 0 .5rem;color:#111827;font-size:1.25rem}.csv-container .email-container .error-container .error-content p{margin:0 0 1.5rem;color:#6b7280;font-size:.875rem}.csv-container .email-container .error-container .error-content .error-actions{display:flex;justify-content:center;gap:.5rem}.csv-container .email-container .no-email-data{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2rem;text-align:center;color:#6b7280}.csv-container .email-container .no-email-data i{margin-bottom:1rem}.csv-container .email-container .no-email-data p{margin:0;color:#9ca3af;font-size:.875rem}.csv-container .email-container .email-viewer{display:flex;flex-direction:column;height:100%;overflow:hidden}.csv-container .email-container .email-viewer .email-header{position:relative;padding:1.5rem;border-bottom:2px solid #e5e7eb;background:linear-gradient(to bottom,#fff,#f9fafb)}.csv-container .email-container .email-viewer .email-header .email-actions{position:absolute;top:1rem;right:1rem;display:flex;gap:.5rem}.csv-container .email-container .email-viewer .email-header .email-subject{margin:0 0 1rem;padding-right:100px;color:#111827;font-size:1.5rem;font-weight:600;line-height:1.4;word-break:break-word}.csv-container .email-container .email-viewer .email-header .email-metadata{display:flex;flex-direction:column;gap:.5rem}.csv-container .email-container .email-viewer .email-header .email-metadata .email-field{display:flex;gap:.75rem;font-size:.875rem;line-height:1.5}.csv-container .email-container .email-viewer .email-header .email-metadata .email-field .field-label{min-width:80px;color:#6b7280;font-weight:600}.csv-container .email-container .email-viewer .email-header .email-metadata .email-field .field-value{color:#374151;word-break:break-word;flex:1}.csv-container .email-container .email-viewer .email-header .email-metadata .email-field .field-value i{margin-right:.25rem;color:#6b7280}.csv-container .email-container .email-viewer .email-body-container{flex:1;overflow:auto;padding:1.5rem;background:#fff}.csv-container .email-container .email-viewer .email-body-container .email-body{max-width:100%;min-height:200px}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep p{margin:0 0 1rem;line-height:1.6}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep a{color:#3b82f6;text-decoration:none}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep a:hover{text-decoration:underline}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep img{max-width:100%;height:auto;border-radius:4px}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep table{border-collapse:collapse;width:100%;margin:1rem 0}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep table td,.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep table th{padding:.5rem;border:1px solid #e5e7eb}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep table th{background-color:#f9fafb;font-weight:600}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep blockquote{margin:1rem 0;padding-left:1rem;border-left:3px solid #e5e7eb;color:#6b7280}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep ul,.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep ol{margin:0 0 1rem;padding-left:1.5rem}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep li{margin:.25rem 0}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-text pre{margin:0;padding:1rem;background:#f9fafb;border:1px solid #e5e7eb;border-radius:6px;font-family:Courier New,Courier,monospace;font-size:.875rem;line-height:1.6;color:#374151;white-space:pre-wrap;word-break:break-word;overflow-x:auto}.csv-container .email-container .email-viewer .email-attachments{padding:1rem 1.5rem;border-top:1px solid #e5e7eb;background:#f9fafb}.csv-container .email-container .email-viewer .email-attachments h4{margin:0 0 .75rem;color:#374151;font-size:.875rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em}.csv-container .email-container .email-viewer .email-attachments .attachment-list{display:flex;flex-direction:column;gap:.5rem}.csv-container .email-container .email-viewer .email-attachments .attachment-list .attachment-item{display:flex;align-items:center;gap:.5rem;padding:.625rem .875rem;background:#fff;border:1px solid #e5e7eb;border-radius:6px;font-size:.875rem;color:#374151;transition:all .2s ease}.csv-container .email-container .email-viewer .email-attachments .attachment-list .attachment-item i{color:#6b7280;font-size:1rem}.csv-container .email-container .email-viewer .email-attachments .attachment-list .attachment-item span{word-break:break-word}.csv-container .email-container .email-viewer .email-attachments .attachment-list .attachment-item:hover{background:#f3f4f6;border-color:#d1d5db}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i8$1.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: i9$2.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 });
8848
+ 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 <!-- Preview must not require contentType: APIs often omit MIME while still returning documentUrl + filename extension. -->\r\n @if(documentUrl){\r\n <!-- Zoom Controls -->\r\n <div class=\"zoom-controls-wrapper\">\r\n <document-zoom-controls [selectedDocument]=\"selectedDocument\" [contextId]=\"contextId\" [isFormHide]=\"isFormHide\">\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 [src]=\"documentUrl\" [rotation]=\"0\" [original-size]=\"false\" [show-all]=\"true\" [fit-to-page]=\"false\"\r\n [zoom]=\"currentZoom / 100\" [zoom-scale]=\"'page-width'\" [stick-to-page]=\"false\" [render-text]=\"true\"\r\n [external-link-target]=\"'blank'\" [autoresize]=\"true\" [show-borders]=\"false\"\r\n style=\"width: 100%; height: 100%\"></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 [src]=\"documentUrl\" [alt]=\"documentName || 'Document Image'\" class=\"document-image\"\r\n [style.transform]=\"'scale(' + (currentZoom / 100) + ')'\" [style.transform-origin]=\"'center center'\" />\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 type=\"button\" class=\"p-button p-button-primary p-button-sm\" (click)=\"downloadDocument()\">\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\" [class.zoomed]=\"currentZoom !== 100\" (wheel)=\"onWheel($event)\">\r\n <ngx-doc-viewer [url]=\"documentUrl\" viewer=\"office\" style=\"width:100%;height:97%;\"></ngx-doc-viewer>\r\n <!-- Invisible overlay to capture wheel events over document content -->\r\n <div class=\"wheel-capture-overlay\" (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\" [class.zoomed]=\"currentZoom !== 100\" (wheel)=\"onWheel($event)\">\r\n <ngx-doc-viewer [url]=\"documentUrl\" viewer=\"office\" style=\"width:100%;height:97%;\"></ngx-doc-viewer>\r\n <div class=\"wheel-capture-overlay\" (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 type=\"button\" class=\"p-button p-button-primary p-button-sm\" (click)=\"downloadDocument()\">\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\" [style.transform-origin]=\"'center center'\" (wheel)=\"onWheel($event)\">\r\n <p-table [value]=\"safeCsvStyledData\" [tableStyle]=\"{'min-width': '100%'}\" [scrollable]=\"true\"\r\n scrollHeight=\"67vh\" class=\"csv-table\">\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=\"email-container\">\r\n @if(isLoadingEmail){\r\n <div class=\"loading-container text-center m-1/2\">\r\n <i class=\"pi pi-spin pi-spinner\" style=\"font-size: 2rem;\"></i>\r\n <p>Opening email...</p>\r\n </div>\r\n }\r\n @else if(isEmailAsPdf && emailPdfUrl){\r\n <!-- Render PDF when email is converted -->\r\n <pdf-viewer [src]=\"emailPdfUrl\" [rotation]=\"0\" [original-size]=\"false\" [show-all]=\"true\" [fit-to-page]=\"false\"\r\n [zoom]=\"currentZoom/100\" [zoom-scale]=\"'page-width'\" [stick-to-page]=\"false\" [render-text]=\"true\"\r\n [external-link-target]=\"'blank'\" [autoresize]=\"true\" [show-borders]=\"false\"\r\n style=\"width: 100%; height: 82vh;\"></pdf-viewer>\r\n }\r\n @else if(emailError){\r\n <div class=\"error-container\">\r\n <div class=\"error-content\">\r\n <i class=\"pi pi-exclamation-circle\" style=\"font-size: 2rem; color: #ef4444;\"></i>\r\n <h4>Unable to Preview Email</h4>\r\n <p>{{ emailError }}</p>\r\n <div class=\"error-actions\">\r\n <button type=\"button\" class=\"p-button p-button-primary p-button-sm\" (click)=\"downloadDocument()\">\r\n <i class=\"pi pi-download\"></i>\r\n Download\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n }\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\" [class.zoomed]=\"currentZoom !== 100\" (wheel)=\"onWheel($event)\">\r\n <ngx-doc-viewer [url]=\"documentUrl\" viewer=\"office\" style=\"width:100%;height:800px;\"></ngx-doc-viewer>\r\n <!-- Invisible overlay to capture wheel events over document content -->\r\n <div class=\"wheel-capture-overlay\" (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 || 'unknown' }}) is not supported for preview. Please download to\r\n view.</p>\r\n </div>\r\n <div class=\"document-actions\">\r\n <button type=\"button\" class=\"p-button p-button-primary p-button-sm\" (click)=\"downloadDocument()\">\r\n <i class=\"pi pi-download\"></i>\r\n Download\r\n </button>\r\n <button type=\"button\" class=\"p-button p-button-outlined p-button-sm\" (click)=\"openInNewTab()\">\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>", 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 .email-container{width:100%;height:100%;border-radius:8px;overflow:hidden}.document-content-viewer-container .email-container ::ng-deep .ng2-pdf-viewer-container{height:82%!important;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 .pdf-container ::ng-deep .ng2-pdf-viewer-container::-webkit-scrollbar{width:12px;height:12px}.document-content-viewer-container .pdf-container ::ng-deep .ng2-pdf-viewer-container::-webkit-scrollbar-track{background:#f1f1f1;border-radius:6px}.document-content-viewer-container .pdf-container ::ng-deep .ng2-pdf-viewer-container::-webkit-scrollbar-thumb{background:#888;border-radius:6px}.document-content-viewer-container .pdf-container ::ng-deep .ng2-pdf-viewer-container::-webkit-scrollbar-thumb:hover{background:#555}.document-content-viewer-container .pdf-container ::ng-deep .ng2-pdf-viewer-container{scrollbar-width:thin;scrollbar-color:#888 #f1f1f1}.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}.csv-container .email-container{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;border-radius:8px;overflow:auto}.csv-container .email-container .loading-container{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2rem;text-align:center;color:#6b7280}.csv-container .email-container .loading-container i{margin-bottom:1rem}.csv-container .email-container .loading-container p{margin:0;color:#9ca3af;font-size:.875rem}.csv-container .email-container .error-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.csv-container .email-container .error-container .error-content{text-align:center;max-width:400px}.csv-container .email-container .error-container .error-content i{margin-bottom:1rem}.csv-container .email-container .error-container .error-content h4{margin:0 0 .5rem;color:#111827;font-size:1.25rem}.csv-container .email-container .error-container .error-content p{margin:0 0 1.5rem;color:#6b7280;font-size:.875rem}.csv-container .email-container .error-container .error-content .error-actions{display:flex;justify-content:center;gap:.5rem}.csv-container .email-container .no-email-data{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2rem;text-align:center;color:#6b7280}.csv-container .email-container .no-email-data i{margin-bottom:1rem}.csv-container .email-container .no-email-data p{margin:0;color:#9ca3af;font-size:.875rem}.csv-container .email-container .email-viewer{display:flex;flex-direction:column;height:100%;overflow:hidden}.csv-container .email-container .email-viewer .email-header{position:relative;padding:1.5rem;border-bottom:2px solid #e5e7eb;background:linear-gradient(to bottom,#fff,#f9fafb)}.csv-container .email-container .email-viewer .email-header .email-actions{position:absolute;top:1rem;right:1rem;display:flex;gap:.5rem}.csv-container .email-container .email-viewer .email-header .email-subject{margin:0 0 1rem;padding-right:100px;color:#111827;font-size:1.5rem;font-weight:600;line-height:1.4;word-break:break-word}.csv-container .email-container .email-viewer .email-header .email-metadata{display:flex;flex-direction:column;gap:.5rem}.csv-container .email-container .email-viewer .email-header .email-metadata .email-field{display:flex;gap:.75rem;font-size:.875rem;line-height:1.5}.csv-container .email-container .email-viewer .email-header .email-metadata .email-field .field-label{min-width:80px;color:#6b7280;font-weight:600}.csv-container .email-container .email-viewer .email-header .email-metadata .email-field .field-value{color:#374151;word-break:break-word;flex:1}.csv-container .email-container .email-viewer .email-header .email-metadata .email-field .field-value i{margin-right:.25rem;color:#6b7280}.csv-container .email-container .email-viewer .email-body-container{flex:1;overflow:auto;padding:1.5rem;background:#fff}.csv-container .email-container .email-viewer .email-body-container .email-body{max-width:100%;min-height:200px}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep p{margin:0 0 1rem;line-height:1.6}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep a{color:#3b82f6;text-decoration:none}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep a:hover{text-decoration:underline}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep img{max-width:100%;height:auto;border-radius:4px}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep table{border-collapse:collapse;width:100%;margin:1rem 0}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep table td,.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep table th{padding:.5rem;border:1px solid #e5e7eb}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep table th{background-color:#f9fafb;font-weight:600}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep blockquote{margin:1rem 0;padding-left:1rem;border-left:3px solid #e5e7eb;color:#6b7280}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep ul,.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep ol{margin:0 0 1rem;padding-left:1.5rem}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep li{margin:.25rem 0}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-text pre{margin:0;padding:1rem;background:#f9fafb;border:1px solid #e5e7eb;border-radius:6px;font-family:Courier New,Courier,monospace;font-size:.875rem;line-height:1.6;color:#374151;white-space:pre-wrap;word-break:break-word;overflow-x:auto}.csv-container .email-container .email-viewer .email-attachments{padding:1rem 1.5rem;border-top:1px solid #e5e7eb;background:#f9fafb}.csv-container .email-container .email-viewer .email-attachments h4{margin:0 0 .75rem;color:#374151;font-size:.875rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em}.csv-container .email-container .email-viewer .email-attachments .attachment-list{display:flex;flex-direction:column;gap:.5rem}.csv-container .email-container .email-viewer .email-attachments .attachment-list .attachment-item{display:flex;align-items:center;gap:.5rem;padding:.625rem .875rem;background:#fff;border:1px solid #e5e7eb;border-radius:6px;font-size:.875rem;color:#374151;transition:all .2s ease}.csv-container .email-container .email-viewer .email-attachments .attachment-list .attachment-item i{color:#6b7280;font-size:1rem}.csv-container .email-container .email-viewer .email-attachments .attachment-list .attachment-item span{word-break:break-word}.csv-container .email-container .email-viewer .email-attachments .attachment-list .attachment-item:hover{background:#f3f4f6;border-color:#d1d5db}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i8.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: i9$1.NgxDocViewerComponent, selector: "ngx-doc-viewer", inputs: ["url", "queryParams", "viewerUrl", "googleCheckInterval", "googleMaxChecks", "disableContent", "googleCheckContentLoaded", "viewer", "overrideLocalhost"], outputs: ["loaded"] }, { kind: "component", type: i2$2.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 });
9106
8849
  }
9107
8850
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContentViewerComponent, decorators: [{
9108
8851
  type: Component,
9109
- args: [{ selector: 'document-content-viewer', standalone: false, encapsulation: ViewEncapsulation.None, 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 [selectedDocument]=\"selectedDocument\" [contextId]=\"contextId\" [isFormHide]=\"isFormHide\">\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 [src]=\"documentUrl\" [rotation]=\"0\" [original-size]=\"false\" [show-all]=\"true\" [fit-to-page]=\"false\"\r\n [zoom]=\"currentZoom / 100\" [zoom-scale]=\"'page-width'\" [stick-to-page]=\"false\" [render-text]=\"true\"\r\n [external-link-target]=\"'blank'\" [autoresize]=\"true\" [show-borders]=\"false\"\r\n style=\"width: 100%; height: 100%\"></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 [src]=\"documentUrl\" [alt]=\"documentName || 'Document Image'\" class=\"document-image\"\r\n [style.transform]=\"'scale(' + (currentZoom / 100) + ')'\" [style.transform-origin]=\"'center center'\" />\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 type=\"button\" class=\"p-button p-button-primary p-button-sm\" (click)=\"downloadDocument()\">\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\" [class.zoomed]=\"currentZoom !== 100\" (wheel)=\"onWheel($event)\">\r\n <ngx-doc-viewer [url]=\"documentUrl\" viewer=\"office\" style=\"width:100%;height:97%;\"></ngx-doc-viewer>\r\n <!-- Invisible overlay to capture wheel events over document content -->\r\n <div class=\"wheel-capture-overlay\" (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\" [class.zoomed]=\"currentZoom !== 100\" (wheel)=\"onWheel($event)\">\r\n <ngx-doc-viewer [url]=\"documentUrl\" viewer=\"office\" style=\"width:100%;height:97%;\"></ngx-doc-viewer>\r\n <div class=\"wheel-capture-overlay\" (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 type=\"button\" class=\"p-button p-button-primary p-button-sm\" (click)=\"downloadDocument()\">\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\" [style.transform-origin]=\"'center center'\" (wheel)=\"onWheel($event)\">\r\n <p-table [value]=\"safeCsvStyledData\" [tableStyle]=\"{'min-width': '100%'}\" [scrollable]=\"true\"\r\n scrollHeight=\"67vh\" class=\"csv-table\">\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=\"email-container\">\r\n @if(isLoadingEmail){\r\n <div class=\"loading-container text-center m-1/2\">\r\n <i class=\"pi pi-spin pi-spinner\" style=\"font-size: 2rem;\"></i>\r\n <p>Opening email...</p>\r\n </div>\r\n }\r\n @else if(isEmailAsPdf && emailPdfUrl){\r\n <!-- Render PDF when email is converted -->\r\n <pdf-viewer [src]=\"emailPdfUrl\" [rotation]=\"0\" [original-size]=\"false\" [show-all]=\"true\" [fit-to-page]=\"false\"\r\n [zoom]=\"currentZoom/100\" [zoom-scale]=\"'page-width'\" [stick-to-page]=\"false\" [render-text]=\"true\"\r\n [external-link-target]=\"'blank'\" [autoresize]=\"true\" [show-borders]=\"false\"\r\n style=\"width: 100%; height: 82vh;\"></pdf-viewer>\r\n }\r\n @else if(emailError){\r\n <div class=\"error-container\">\r\n <div class=\"error-content\">\r\n <i class=\"pi pi-exclamation-circle\" style=\"font-size: 2rem; color: #ef4444;\"></i>\r\n <h4>Unable to Preview Email</h4>\r\n <p>{{ emailError }}</p>\r\n <div class=\"error-actions\">\r\n <button type=\"button\" class=\"p-button p-button-primary p-button-sm\" (click)=\"downloadDocument()\">\r\n <i class=\"pi pi-download\"></i>\r\n Download\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n }\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\" [class.zoomed]=\"currentZoom !== 100\" (wheel)=\"onWheel($event)\">\r\n <ngx-doc-viewer [url]=\"documentUrl\" viewer=\"office\" style=\"width:100%;height:800px;\"></ngx-doc-viewer>\r\n <!-- Invisible overlay to capture wheel events over document content -->\r\n <div class=\"wheel-capture-overlay\" (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\r\n view.</p>\r\n </div>\r\n <div class=\"document-actions\">\r\n <button type=\"button\" class=\"p-button p-button-primary p-button-sm\" (click)=\"downloadDocument()\">\r\n <i class=\"pi pi-download\"></i>\r\n Download\r\n </button>\r\n <button type=\"button\" class=\"p-button p-button-outlined p-button-sm\" (click)=\"openInNewTab()\">\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>", 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 .email-container{width:100%;height:100%;border-radius:8px;overflow:hidden}.document-content-viewer-container .email-container ::ng-deep .ng2-pdf-viewer-container{height:82%!important;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 .pdf-container ::ng-deep .ng2-pdf-viewer-container::-webkit-scrollbar{width:12px;height:12px}.document-content-viewer-container .pdf-container ::ng-deep .ng2-pdf-viewer-container::-webkit-scrollbar-track{background:#f1f1f1;border-radius:6px}.document-content-viewer-container .pdf-container ::ng-deep .ng2-pdf-viewer-container::-webkit-scrollbar-thumb{background:#888;border-radius:6px}.document-content-viewer-container .pdf-container ::ng-deep .ng2-pdf-viewer-container::-webkit-scrollbar-thumb:hover{background:#555}.document-content-viewer-container .pdf-container ::ng-deep .ng2-pdf-viewer-container{scrollbar-width:thin;scrollbar-color:#888 #f1f1f1}.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}.csv-container .email-container{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;border-radius:8px;overflow:auto}.csv-container .email-container .loading-container{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2rem;text-align:center;color:#6b7280}.csv-container .email-container .loading-container i{margin-bottom:1rem}.csv-container .email-container .loading-container p{margin:0;color:#9ca3af;font-size:.875rem}.csv-container .email-container .error-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.csv-container .email-container .error-container .error-content{text-align:center;max-width:400px}.csv-container .email-container .error-container .error-content i{margin-bottom:1rem}.csv-container .email-container .error-container .error-content h4{margin:0 0 .5rem;color:#111827;font-size:1.25rem}.csv-container .email-container .error-container .error-content p{margin:0 0 1.5rem;color:#6b7280;font-size:.875rem}.csv-container .email-container .error-container .error-content .error-actions{display:flex;justify-content:center;gap:.5rem}.csv-container .email-container .no-email-data{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2rem;text-align:center;color:#6b7280}.csv-container .email-container .no-email-data i{margin-bottom:1rem}.csv-container .email-container .no-email-data p{margin:0;color:#9ca3af;font-size:.875rem}.csv-container .email-container .email-viewer{display:flex;flex-direction:column;height:100%;overflow:hidden}.csv-container .email-container .email-viewer .email-header{position:relative;padding:1.5rem;border-bottom:2px solid #e5e7eb;background:linear-gradient(to bottom,#fff,#f9fafb)}.csv-container .email-container .email-viewer .email-header .email-actions{position:absolute;top:1rem;right:1rem;display:flex;gap:.5rem}.csv-container .email-container .email-viewer .email-header .email-subject{margin:0 0 1rem;padding-right:100px;color:#111827;font-size:1.5rem;font-weight:600;line-height:1.4;word-break:break-word}.csv-container .email-container .email-viewer .email-header .email-metadata{display:flex;flex-direction:column;gap:.5rem}.csv-container .email-container .email-viewer .email-header .email-metadata .email-field{display:flex;gap:.75rem;font-size:.875rem;line-height:1.5}.csv-container .email-container .email-viewer .email-header .email-metadata .email-field .field-label{min-width:80px;color:#6b7280;font-weight:600}.csv-container .email-container .email-viewer .email-header .email-metadata .email-field .field-value{color:#374151;word-break:break-word;flex:1}.csv-container .email-container .email-viewer .email-header .email-metadata .email-field .field-value i{margin-right:.25rem;color:#6b7280}.csv-container .email-container .email-viewer .email-body-container{flex:1;overflow:auto;padding:1.5rem;background:#fff}.csv-container .email-container .email-viewer .email-body-container .email-body{max-width:100%;min-height:200px}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep p{margin:0 0 1rem;line-height:1.6}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep a{color:#3b82f6;text-decoration:none}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep a:hover{text-decoration:underline}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep img{max-width:100%;height:auto;border-radius:4px}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep table{border-collapse:collapse;width:100%;margin:1rem 0}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep table td,.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep table th{padding:.5rem;border:1px solid #e5e7eb}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep table th{background-color:#f9fafb;font-weight:600}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep blockquote{margin:1rem 0;padding-left:1rem;border-left:3px solid #e5e7eb;color:#6b7280}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep ul,.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep ol{margin:0 0 1rem;padding-left:1.5rem}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep li{margin:.25rem 0}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-text pre{margin:0;padding:1rem;background:#f9fafb;border:1px solid #e5e7eb;border-radius:6px;font-family:Courier New,Courier,monospace;font-size:.875rem;line-height:1.6;color:#374151;white-space:pre-wrap;word-break:break-word;overflow-x:auto}.csv-container .email-container .email-viewer .email-attachments{padding:1rem 1.5rem;border-top:1px solid #e5e7eb;background:#f9fafb}.csv-container .email-container .email-viewer .email-attachments h4{margin:0 0 .75rem;color:#374151;font-size:.875rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em}.csv-container .email-container .email-viewer .email-attachments .attachment-list{display:flex;flex-direction:column;gap:.5rem}.csv-container .email-container .email-viewer .email-attachments .attachment-list .attachment-item{display:flex;align-items:center;gap:.5rem;padding:.625rem .875rem;background:#fff;border:1px solid #e5e7eb;border-radius:6px;font-size:.875rem;color:#374151;transition:all .2s ease}.csv-container .email-container .email-viewer .email-attachments .attachment-list .attachment-item i{color:#6b7280;font-size:1rem}.csv-container .email-container .email-viewer .email-attachments .attachment-list .attachment-item span{word-break:break-word}.csv-container .email-container .email-viewer .email-attachments .attachment-list .attachment-item:hover{background:#f3f4f6;border-color:#d1d5db}\n"] }]
8852
+ args: [{ selector: 'document-content-viewer', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-content-viewer-container\">\r\n <!-- Preview must not require contentType: APIs often omit MIME while still returning documentUrl + filename extension. -->\r\n @if(documentUrl){\r\n <!-- Zoom Controls -->\r\n <div class=\"zoom-controls-wrapper\">\r\n <document-zoom-controls [selectedDocument]=\"selectedDocument\" [contextId]=\"contextId\" [isFormHide]=\"isFormHide\">\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 [src]=\"documentUrl\" [rotation]=\"0\" [original-size]=\"false\" [show-all]=\"true\" [fit-to-page]=\"false\"\r\n [zoom]=\"currentZoom / 100\" [zoom-scale]=\"'page-width'\" [stick-to-page]=\"false\" [render-text]=\"true\"\r\n [external-link-target]=\"'blank'\" [autoresize]=\"true\" [show-borders]=\"false\"\r\n style=\"width: 100%; height: 100%\"></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 [src]=\"documentUrl\" [alt]=\"documentName || 'Document Image'\" class=\"document-image\"\r\n [style.transform]=\"'scale(' + (currentZoom / 100) + ')'\" [style.transform-origin]=\"'center center'\" />\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 type=\"button\" class=\"p-button p-button-primary p-button-sm\" (click)=\"downloadDocument()\">\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\" [class.zoomed]=\"currentZoom !== 100\" (wheel)=\"onWheel($event)\">\r\n <ngx-doc-viewer [url]=\"documentUrl\" viewer=\"office\" style=\"width:100%;height:97%;\"></ngx-doc-viewer>\r\n <!-- Invisible overlay to capture wheel events over document content -->\r\n <div class=\"wheel-capture-overlay\" (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\" [class.zoomed]=\"currentZoom !== 100\" (wheel)=\"onWheel($event)\">\r\n <ngx-doc-viewer [url]=\"documentUrl\" viewer=\"office\" style=\"width:100%;height:97%;\"></ngx-doc-viewer>\r\n <div class=\"wheel-capture-overlay\" (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 type=\"button\" class=\"p-button p-button-primary p-button-sm\" (click)=\"downloadDocument()\">\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\" [style.transform-origin]=\"'center center'\" (wheel)=\"onWheel($event)\">\r\n <p-table [value]=\"safeCsvStyledData\" [tableStyle]=\"{'min-width': '100%'}\" [scrollable]=\"true\"\r\n scrollHeight=\"67vh\" class=\"csv-table\">\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=\"email-container\">\r\n @if(isLoadingEmail){\r\n <div class=\"loading-container text-center m-1/2\">\r\n <i class=\"pi pi-spin pi-spinner\" style=\"font-size: 2rem;\"></i>\r\n <p>Opening email...</p>\r\n </div>\r\n }\r\n @else if(isEmailAsPdf && emailPdfUrl){\r\n <!-- Render PDF when email is converted -->\r\n <pdf-viewer [src]=\"emailPdfUrl\" [rotation]=\"0\" [original-size]=\"false\" [show-all]=\"true\" [fit-to-page]=\"false\"\r\n [zoom]=\"currentZoom/100\" [zoom-scale]=\"'page-width'\" [stick-to-page]=\"false\" [render-text]=\"true\"\r\n [external-link-target]=\"'blank'\" [autoresize]=\"true\" [show-borders]=\"false\"\r\n style=\"width: 100%; height: 82vh;\"></pdf-viewer>\r\n }\r\n @else if(emailError){\r\n <div class=\"error-container\">\r\n <div class=\"error-content\">\r\n <i class=\"pi pi-exclamation-circle\" style=\"font-size: 2rem; color: #ef4444;\"></i>\r\n <h4>Unable to Preview Email</h4>\r\n <p>{{ emailError }}</p>\r\n <div class=\"error-actions\">\r\n <button type=\"button\" class=\"p-button p-button-primary p-button-sm\" (click)=\"downloadDocument()\">\r\n <i class=\"pi pi-download\"></i>\r\n Download\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n }\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\" [class.zoomed]=\"currentZoom !== 100\" (wheel)=\"onWheel($event)\">\r\n <ngx-doc-viewer [url]=\"documentUrl\" viewer=\"office\" style=\"width:100%;height:800px;\"></ngx-doc-viewer>\r\n <!-- Invisible overlay to capture wheel events over document content -->\r\n <div class=\"wheel-capture-overlay\" (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 || 'unknown' }}) is not supported for preview. Please download to\r\n view.</p>\r\n </div>\r\n <div class=\"document-actions\">\r\n <button type=\"button\" class=\"p-button p-button-primary p-button-sm\" (click)=\"downloadDocument()\">\r\n <i class=\"pi pi-download\"></i>\r\n Download\r\n </button>\r\n <button type=\"button\" class=\"p-button p-button-outlined p-button-sm\" (click)=\"openInNewTab()\">\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>", 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 .email-container{width:100%;height:100%;border-radius:8px;overflow:hidden}.document-content-viewer-container .email-container ::ng-deep .ng2-pdf-viewer-container{height:82%!important;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 .pdf-container ::ng-deep .ng2-pdf-viewer-container::-webkit-scrollbar{width:12px;height:12px}.document-content-viewer-container .pdf-container ::ng-deep .ng2-pdf-viewer-container::-webkit-scrollbar-track{background:#f1f1f1;border-radius:6px}.document-content-viewer-container .pdf-container ::ng-deep .ng2-pdf-viewer-container::-webkit-scrollbar-thumb{background:#888;border-radius:6px}.document-content-viewer-container .pdf-container ::ng-deep .ng2-pdf-viewer-container::-webkit-scrollbar-thumb:hover{background:#555}.document-content-viewer-container .pdf-container ::ng-deep .ng2-pdf-viewer-container{scrollbar-width:thin;scrollbar-color:#888 #f1f1f1}.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}.csv-container .email-container{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;border-radius:8px;overflow:auto}.csv-container .email-container .loading-container{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2rem;text-align:center;color:#6b7280}.csv-container .email-container .loading-container i{margin-bottom:1rem}.csv-container .email-container .loading-container p{margin:0;color:#9ca3af;font-size:.875rem}.csv-container .email-container .error-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.csv-container .email-container .error-container .error-content{text-align:center;max-width:400px}.csv-container .email-container .error-container .error-content i{margin-bottom:1rem}.csv-container .email-container .error-container .error-content h4{margin:0 0 .5rem;color:#111827;font-size:1.25rem}.csv-container .email-container .error-container .error-content p{margin:0 0 1.5rem;color:#6b7280;font-size:.875rem}.csv-container .email-container .error-container .error-content .error-actions{display:flex;justify-content:center;gap:.5rem}.csv-container .email-container .no-email-data{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2rem;text-align:center;color:#6b7280}.csv-container .email-container .no-email-data i{margin-bottom:1rem}.csv-container .email-container .no-email-data p{margin:0;color:#9ca3af;font-size:.875rem}.csv-container .email-container .email-viewer{display:flex;flex-direction:column;height:100%;overflow:hidden}.csv-container .email-container .email-viewer .email-header{position:relative;padding:1.5rem;border-bottom:2px solid #e5e7eb;background:linear-gradient(to bottom,#fff,#f9fafb)}.csv-container .email-container .email-viewer .email-header .email-actions{position:absolute;top:1rem;right:1rem;display:flex;gap:.5rem}.csv-container .email-container .email-viewer .email-header .email-subject{margin:0 0 1rem;padding-right:100px;color:#111827;font-size:1.5rem;font-weight:600;line-height:1.4;word-break:break-word}.csv-container .email-container .email-viewer .email-header .email-metadata{display:flex;flex-direction:column;gap:.5rem}.csv-container .email-container .email-viewer .email-header .email-metadata .email-field{display:flex;gap:.75rem;font-size:.875rem;line-height:1.5}.csv-container .email-container .email-viewer .email-header .email-metadata .email-field .field-label{min-width:80px;color:#6b7280;font-weight:600}.csv-container .email-container .email-viewer .email-header .email-metadata .email-field .field-value{color:#374151;word-break:break-word;flex:1}.csv-container .email-container .email-viewer .email-header .email-metadata .email-field .field-value i{margin-right:.25rem;color:#6b7280}.csv-container .email-container .email-viewer .email-body-container{flex:1;overflow:auto;padding:1.5rem;background:#fff}.csv-container .email-container .email-viewer .email-body-container .email-body{max-width:100%;min-height:200px}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep p{margin:0 0 1rem;line-height:1.6}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep a{color:#3b82f6;text-decoration:none}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep a:hover{text-decoration:underline}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep img{max-width:100%;height:auto;border-radius:4px}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep table{border-collapse:collapse;width:100%;margin:1rem 0}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep table td,.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep table th{padding:.5rem;border:1px solid #e5e7eb}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep table th{background-color:#f9fafb;font-weight:600}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep blockquote{margin:1rem 0;padding-left:1rem;border-left:3px solid #e5e7eb;color:#6b7280}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep ul,.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep ol{margin:0 0 1rem;padding-left:1.5rem}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-html ::ng-deep li{margin:.25rem 0}.csv-container .email-container .email-viewer .email-body-container .email-body.email-body-text pre{margin:0;padding:1rem;background:#f9fafb;border:1px solid #e5e7eb;border-radius:6px;font-family:Courier New,Courier,monospace;font-size:.875rem;line-height:1.6;color:#374151;white-space:pre-wrap;word-break:break-word;overflow-x:auto}.csv-container .email-container .email-viewer .email-attachments{padding:1rem 1.5rem;border-top:1px solid #e5e7eb;background:#f9fafb}.csv-container .email-container .email-viewer .email-attachments h4{margin:0 0 .75rem;color:#374151;font-size:.875rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em}.csv-container .email-container .email-viewer .email-attachments .attachment-list{display:flex;flex-direction:column;gap:.5rem}.csv-container .email-container .email-viewer .email-attachments .attachment-list .attachment-item{display:flex;align-items:center;gap:.5rem;padding:.625rem .875rem;background:#fff;border:1px solid #e5e7eb;border-radius:6px;font-size:.875rem;color:#374151;transition:all .2s ease}.csv-container .email-container .email-viewer .email-attachments .attachment-list .attachment-item i{color:#6b7280;font-size:1rem}.csv-container .email-container .email-viewer .email-attachments .attachment-list .attachment-item span{word-break:break-word}.csv-container .email-container .email-viewer .email-attachments .attachment-list .attachment-item:hover{background:#f3f4f6;border-color:#d1d5db}\n"] }]
9110
8853
  }], ctorParameters: () => [{ type: ExcelParserService }, { type: CsvParserService }, { type: DocumentHttpService }, { type: DocumentZoomService }, { type: i5$1.DomSanitizer }], propDecorators: { documentUrl: [{
9111
8854
  type: Input
9112
8855
  }], contentType: [{
@@ -9254,7 +8997,7 @@ class DocumentActionsComponent {
9254
8997
  this.rejectNote = SHARED.EMPTY;
9255
8998
  }
9256
8999
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentActionsComponent, deps: [{ token: DocumentActionsService }, { token: SessionService }], target: i0.ɵɵFactoryTarget.Component });
9257
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentActionsComponent, isStandalone: false, selector: "document-actions", inputs: { document: "document", documentId: "documentId", currentStatus: "currentStatus", isLoading: "isLoading", isUploaded: "isUploaded", statusId: "statusId" }, outputs: { actionPerformed: "actionPerformed" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-actions-container\" *ngIf=\"document?.status !=='Pending' && !document?.isUploaded && document?.status === 'Reviewing'\">\r\n <div class=\"actions-card\" [ngClass]=\"cardClass\">\r\n <div class=\"actions-buttons\">\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn reject-btn\" [ngClass]=\"rejectButtonClass\"\r\n (click)=\"onRejectClick()\" [disabled]=\"areButtonsDisabled || isRejecting\">\r\n <i class=\"pi pi-times\" *ngIf=\"isDocumentRejected\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isRejecting\"></i>\r\n <span>{{ isDocumentRejected ? SHARED.BUTTON_LABEL_REJECTED :\r\n SHARED.BUTTON_LABEL_REJECT }}</span>\r\n </button>\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn accept-btn\" [ngClass]=\"acceptButtonClass\"\r\n (click)=\"onAcceptClick()\" [disabled]=\"areButtonsDisabled || isAccepting\">\r\n <i class=\"pi pi-check\" *ngIf=\"isDocumentApproved\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isAccepting\"></i>\r\n <span>{{ isDocumentApproved ? SHARED.BUTTON_LABEL_ACCEPTED : SHARED.BUTTON_LABEL_ACCEPT\r\n }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n\r\n<p-dialog [(visible)]=\"showAcceptDialog\" [header]=\"SHARED.ACCEPT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"acceptNote\" class=\"note-label\">{{ SHARED.ACCEPT_NOTE_LABEL }}</label>\r\n <textarea id=\"acceptNote\" pInputTextarea [(ngModel)]=\"acceptNote\" [placeholder]=\"SHARED.ACCEPT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.ACCEPT_BUTTON_LABEL\" class=\"p-button-success\" (click)=\"onAcceptConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n\r\n<p-dialog [(visible)]=\"showRejectDialog\" [header]=\"SHARED.REJECT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"rejectNote\" class=\"note-label\">{{ SHARED.REJECT_NOTE_LABEL }}</label>\r\n <textarea id=\"rejectNote\" pInputTextarea [(ngModel)]=\"rejectNote\" [placeholder]=\"SHARED.REJECT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.REJECT_BUTTON_LABEL\" class=\"p-button-danger\" [disabled]=\"isRejectNoteEmpty\"\r\n (click)=\"onRejectConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>", styles: [".document-actions-container{margin:0}.actions-card{border-radius:8px;padding:.75rem;box-shadow:0 2px 4px #0000001a;transition:all .3s ease;width:92%;margin-left:3%}.actions-card.pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-card.accepted-card{background-color:#e8f5e9;border:1px solid #66bb6a}.actions-card.rejected-card{background-color:#feeaea;border:1px solid #e57373}.actions-card[class*=status-].status-approved-card{background-color:#e8f5e9;border:1px solid #66bb6a}.actions-card[class*=status-].status-rejected-card{background-color:#feeaea;border:1px solid #e57373}.actions-card[class*=status-].status-pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-buttons{display:flex;gap:.5rem;align-items:center}.action-btn{padding:.5rem 1rem;border-radius:6px;border:1px solid;font-weight:500;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;gap:.5rem;min-width:48%;justify-content:center}.action-btn:disabled{opacity:.6;cursor:not-allowed}.action-btn i{font-size:.875rem}.reject-btn.default-reject{background-color:#fff;border-color:#ef4444;color:#ef4444}.reject-btn.default-reject:hover:not(:disabled){background-color:#fef2f2;border-color:#dc2626}.reject-btn.secondary-reject{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.reject-btn.secondary-reject:hover:not(:disabled){background-color:#edf2f7}.reject-btn.primary-reject{background-color:#feeaea;border-color:#e57373;color:#e57373}.reject-btn.primary-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn[class*=status-].status-approved-reject{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.reject-btn[class*=status-].status-approved-reject:hover:not(:disabled){background-color:#edf2f7}.reject-btn[class*=status-].status-rejected-reject{background-color:#feeaea;border-color:#e57373;color:#e57373}.reject-btn[class*=status-].status-rejected-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn[class*=status-].status-pending-reject{background-color:#fff;border-color:#ef4444;color:#ef4444}.reject-btn[class*=status-].status-pending-reject:hover:not(:disabled){background-color:#fef2f2;border-color:#dc2626}.accept-btn.default-accept{background-color:#3b82f6;border-color:#3b82f6;color:#fff}.accept-btn.default-accept:hover:not(:disabled){background-color:#2563eb;border-color:#2563eb}.accept-btn.secondary-accept{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.accept-btn.secondary-accept:hover:not(:disabled){background-color:#edf2f7}.accept-btn.primary-accept{background-color:#4caf50;border-color:#4caf50;color:#fff}.accept-btn.primary-accept:hover:not(:disabled){background-color:#45a049;border-color:#45a049}.accept-btn[class*=status-].status-approved-accept{background-color:#4caf50;border-color:#4caf50;color:#fff}.accept-btn[class*=status-].status-approved-accept:hover:not(:disabled){background-color:#45a049;border-color:#45a049}.accept-btn[class*=status-].status-rejected-accept{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.accept-btn[class*=status-].status-rejected-accept:hover:not(:disabled){background-color:#edf2f7}.accept-btn[class*=status-].status-pending-accept{background-color:#3b82f6;border-color:#3b82f6;color:#fff}.accept-btn[class*=status-].status-pending-accept:hover:not(:disabled){background-color:#2563eb;border-color:#2563eb}:host ::ng-deep .confirmation-dialog .p-dialog{border-radius:8px;box-shadow:0 4px 12px #00000026;border:none;overflow:hidden}:host ::ng-deep .confirmation-dialog .p-dialog-header{padding:1.25rem 1.5rem;background-color:#fff;border-bottom:none;border-top-right-radius:10px;border-top-left-radius:10px}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-header-icon{display:none}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-title{font-size:1.125rem;font-weight:600;color:#2d3748;margin:0}:host ::ng-deep .confirmation-dialog .p-dialog-content{padding:1.5rem;background-color:#fff}:host ::ng-deep .confirmation-dialog .p-dialog-footer{padding:1rem 1.5rem;background-color:#f7fafc;border-top:1px solid #e2e8f0;display:flex;gap:.75rem;justify-content:flex-end;border-bottom-right-radius:10px;border-bottom-left-radius:10px}.dialog-content .note-label{display:block;margin-bottom:.75rem;font-weight:500;font-size:.875rem;color:#2d3748}.dialog-content .note-textarea{width:100%;min-height:100px;padding:.75rem;border:1px solid #e2e8f0;border-radius:6px;font-family:inherit;font-size:.875rem;line-height:1.5;resize:vertical;background-color:#fff;color:#2d3748}.dialog-content .note-textarea::placeholder{color:#a0aec0}.dialog-content .note-textarea:focus{outline:none;border-color:#3182ce;box-shadow:0 0 0 3px #3182ce1a}.dialog-footer{display:flex;gap:.75rem;justify-content:flex-end}.dialog-footer button{min-width:80px;padding:.5rem 1rem;border-radius:6px;font-weight:500;font-size:.875rem;border:1px solid;cursor:pointer;transition:all .2s ease}.dialog-footer button.p-button-secondary{background-color:#f7fafc;border-color:#e2e8f0;color:#4a5568}.dialog-footer button.p-button-secondary:hover{background-color:#edf2f7;border-color:#cbd5e0}.dialog-footer button.p-button-success{background-color:#38a169;border-color:#38a169;color:#fff}.dialog-footer button.p-button-success:hover{background-color:#2f855a;border-color:#2f855a}.dialog-footer button.p-button-danger{background-color:#e53e3e;border-color:#e53e3e;color:#fff}.dialog-footer button.p-button-danger:hover{background-color:#c53030;border-color:#c53030}.no-actions-message{display:flex;align-items:center;justify-content:center;padding:.5rem;min-height:40px}.no-actions-message .no-actions-text{color:#6b7280;font-size:.875rem;font-style:italic;text-align:center}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i9.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i8.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant"], outputs: ["onResize"] }, { kind: "directive", type: i9$1.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: i9$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8$2.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"] }] });
9000
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentActionsComponent, isStandalone: false, selector: "document-actions", inputs: { document: "document", documentId: "documentId", currentStatus: "currentStatus", isLoading: "isLoading", isUploaded: "isUploaded", statusId: "statusId" }, outputs: { actionPerformed: "actionPerformed" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-actions-container\" *ngIf=\"document?.status !=='Pending' && !document?.isUploaded && document?.status === 'Reviewing'\">\r\n <div class=\"actions-card\" [ngClass]=\"cardClass\">\r\n <div class=\"actions-buttons\">\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn reject-btn\" [ngClass]=\"rejectButtonClass\"\r\n (click)=\"onRejectClick()\" [disabled]=\"areButtonsDisabled || isRejecting\">\r\n <i class=\"pi pi-times\" *ngIf=\"isDocumentRejected\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isRejecting\"></i>\r\n <span>{{ isDocumentRejected ? SHARED.BUTTON_LABEL_REJECTED :\r\n SHARED.BUTTON_LABEL_REJECT }}</span>\r\n </button>\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn accept-btn\" [ngClass]=\"acceptButtonClass\"\r\n (click)=\"onAcceptClick()\" [disabled]=\"areButtonsDisabled || isAccepting\">\r\n <i class=\"pi pi-check\" *ngIf=\"isDocumentApproved\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isAccepting\"></i>\r\n <span>{{ isDocumentApproved ? SHARED.BUTTON_LABEL_ACCEPTED : SHARED.BUTTON_LABEL_ACCEPT\r\n }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n\r\n<p-dialog [(visible)]=\"showAcceptDialog\" [header]=\"SHARED.ACCEPT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"acceptNote\" class=\"note-label\">{{ SHARED.ACCEPT_NOTE_LABEL }}</label>\r\n <textarea id=\"acceptNote\" pInputTextarea [(ngModel)]=\"acceptNote\" [placeholder]=\"SHARED.ACCEPT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.ACCEPT_BUTTON_LABEL\" class=\"p-button-success\" (click)=\"onAcceptConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n\r\n<p-dialog [(visible)]=\"showRejectDialog\" [header]=\"SHARED.REJECT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"rejectNote\" class=\"note-label\">{{ SHARED.REJECT_NOTE_LABEL }}</label>\r\n <textarea id=\"rejectNote\" pInputTextarea [(ngModel)]=\"rejectNote\" [placeholder]=\"SHARED.REJECT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.REJECT_BUTTON_LABEL\" class=\"p-button-danger\" [disabled]=\"isRejectNoteEmpty\"\r\n (click)=\"onRejectConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>", styles: [".document-actions-container{margin:0}.actions-card{border-radius:8px;padding:.75rem;box-shadow:0 2px 4px #0000001a;transition:all .3s ease;width:92%;margin-left:3%}.actions-card.pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-card.accepted-card{background-color:#e8f5e9;border:1px solid #66bb6a}.actions-card.rejected-card{background-color:#feeaea;border:1px solid #e57373}.actions-card[class*=status-].status-approved-card{background-color:#e8f5e9;border:1px solid #66bb6a}.actions-card[class*=status-].status-rejected-card{background-color:#feeaea;border:1px solid #e57373}.actions-card[class*=status-].status-pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-buttons{display:flex;gap:.5rem;align-items:center}.action-btn{padding:.5rem 1rem;border-radius:6px;border:1px solid;font-weight:500;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;gap:.5rem;min-width:48%;justify-content:center}.action-btn:disabled{opacity:.6;cursor:not-allowed}.action-btn i{font-size:.875rem}.reject-btn.default-reject{background-color:#fff;border-color:#ef4444;color:#ef4444}.reject-btn.default-reject:hover:not(:disabled){background-color:#fef2f2;border-color:#dc2626}.reject-btn.secondary-reject{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.reject-btn.secondary-reject:hover:not(:disabled){background-color:#edf2f7}.reject-btn.primary-reject{background-color:#feeaea;border-color:#e57373;color:#e57373}.reject-btn.primary-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn[class*=status-].status-approved-reject{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.reject-btn[class*=status-].status-approved-reject:hover:not(:disabled){background-color:#edf2f7}.reject-btn[class*=status-].status-rejected-reject{background-color:#feeaea;border-color:#e57373;color:#e57373}.reject-btn[class*=status-].status-rejected-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn[class*=status-].status-pending-reject{background-color:#fff;border-color:#ef4444;color:#ef4444}.reject-btn[class*=status-].status-pending-reject:hover:not(:disabled){background-color:#fef2f2;border-color:#dc2626}.accept-btn.default-accept{background-color:#3b82f6;border-color:#3b82f6;color:#fff}.accept-btn.default-accept:hover:not(:disabled){background-color:#2563eb;border-color:#2563eb}.accept-btn.secondary-accept{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.accept-btn.secondary-accept:hover:not(:disabled){background-color:#edf2f7}.accept-btn.primary-accept{background-color:#4caf50;border-color:#4caf50;color:#fff}.accept-btn.primary-accept:hover:not(:disabled){background-color:#45a049;border-color:#45a049}.accept-btn[class*=status-].status-approved-accept{background-color:#4caf50;border-color:#4caf50;color:#fff}.accept-btn[class*=status-].status-approved-accept:hover:not(:disabled){background-color:#45a049;border-color:#45a049}.accept-btn[class*=status-].status-rejected-accept{background-color:#f5f5f5;border-color:transparent;color:#4a4a4a}.accept-btn[class*=status-].status-rejected-accept:hover:not(:disabled){background-color:#edf2f7}.accept-btn[class*=status-].status-pending-accept{background-color:#3b82f6;border-color:#3b82f6;color:#fff}.accept-btn[class*=status-].status-pending-accept:hover:not(:disabled){background-color:#2563eb;border-color:#2563eb}:host ::ng-deep .confirmation-dialog .p-dialog{border-radius:8px;box-shadow:0 4px 12px #00000026;border:none;overflow:hidden}:host ::ng-deep .confirmation-dialog .p-dialog-header{padding:1.25rem 1.5rem;background-color:#fff;border-bottom:none;border-top-right-radius:10px;border-top-left-radius:10px}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-header-icon{display:none}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-title{font-size:1.125rem;font-weight:600;color:#2d3748;margin:0}:host ::ng-deep .confirmation-dialog .p-dialog-content{padding:1.5rem;background-color:#fff}:host ::ng-deep .confirmation-dialog .p-dialog-footer{padding:1rem 1.5rem;background-color:#f7fafc;border-top:1px solid #e2e8f0;display:flex;gap:.75rem;justify-content:flex-end;border-bottom-right-radius:10px;border-bottom-left-radius:10px}.dialog-content .note-label{display:block;margin-bottom:.75rem;font-weight:500;font-size:.875rem;color:#2d3748}.dialog-content .note-textarea{width:100%;min-height:100px;padding:.75rem;border:1px solid #e2e8f0;border-radius:6px;font-family:inherit;font-size:.875rem;line-height:1.5;resize:vertical;background-color:#fff;color:#2d3748}.dialog-content .note-textarea::placeholder{color:#a0aec0}.dialog-content .note-textarea:focus{outline:none;border-color:#3182ce;box-shadow:0 0 0 3px #3182ce1a}.dialog-footer{display:flex;gap:.75rem;justify-content:flex-end}.dialog-footer button{min-width:80px;padding:.5rem 1rem;border-radius:6px;font-weight:500;font-size:.875rem;border:1px solid;cursor:pointer;transition:all .2s ease}.dialog-footer button.p-button-secondary{background-color:#f7fafc;border-color:#e2e8f0;color:#4a5568}.dialog-footer button.p-button-secondary:hover{background-color:#edf2f7;border-color:#cbd5e0}.dialog-footer button.p-button-success{background-color:#38a169;border-color:#38a169;color:#fff}.dialog-footer button.p-button-success:hover{background-color:#2f855a;border-color:#2f855a}.dialog-footer button.p-button-danger{background-color:#e53e3e;border-color:#e53e3e;color:#fff}.dialog-footer button.p-button-danger:hover{background-color:#c53030;border-color:#c53030}.no-actions-message{display:flex;align-items:center;justify-content:center;padding:.5rem;min-height:40px}.no-actions-message .no-actions-text{color:#6b7280;font-size:.875rem;font-style:italic;text-align:center}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i9.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i6.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant"], outputs: ["onResize"] }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8$1.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"] }] });
9258
9001
  }
9259
9002
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentActionsComponent, decorators: [{
9260
9003
  type: Component,
@@ -9482,7 +9225,7 @@ class DocumentViewerComponent {
9482
9225
  this.documentStore.clearDocumentViewerState();
9483
9226
  }
9484
9227
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentViewerComponent, deps: [{ token: DocumentHttpService }, { token: DocumentHelperService }, { token: i3.MessageService }, { token: DocumentViewerService }, { token: DocumentStore }], target: i0.ɵɵFactoryTarget.Component });
9485
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentViewerComponent, isStandalone: false, selector: "document-viewer", inputs: { selectedDocument: "selectedDocument", documentList: "documentList", contextId: "contextId", isFormHide: "isFormHide" }, outputs: { documentStatusUpdated: "documentStatusUpdated", deleteError: "deleteError", deleteSuccess: "deleteSuccess", viewerDestroyed: "viewerDestroyed" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-viewer-container grid p-formgrid\">\r\n <div class=\"main-content col-12 md:col-12\">\r\n @if(messages.length > 0) {\r\n <p-messages [(value)]=\"messages\" [enableService]=\"false\"></p-messages>\r\n }\r\n \r\n <div class=\"content-grid col-12 md:col-12\">\r\n @if(selectedDocument){\r\n <div class=\"document-preview p-0 col-12 md:col-9\">\r\n <document-content-viewer\r\n [documentUrl]=\"selectedDocument?.documentUrl\"\r\n [contentType]=\"selectedDocument?.contentType\"\r\n [documentName]=\"selectedDocument?.docName\"\r\n [selectedDocument]=\"selectedDocument\"\r\n [contextId]=\"contextId\"\r\n [isFormHide]=\"isFormHide\"\r\n (documentNameUpdated)=\"onDocumentNameUpdated()\"\r\n ></document-content-viewer>\r\n </div>\r\n }\r\n\r\n <div class=\"sidebar col-12 md:col-3 pt-0\">\r\n <div class=\"sidebar card\">\r\n <document-history \r\n [historyData]=\"currentState.documentHistory\" \r\n [showHistory]=\"currentState.showDocumentHistory\"\r\n [contextId]=\"contextId\"\r\n [selectedDocument]=\"selectedDocument\"\r\n (deleteTaskRequested)=\"onDeleteTaskRequested()\"\r\n (documentSelected)=\"onDocumentSelected($event)\">\r\n \r\n <!-- Document Actions Component inside the history component -->\r\n <div actions-component *ngIf=\"selectedDocument?.status !=='Pending' && !selectedDocument?.isUploaded && selectedDocument?.status === 'Reviewing'\">\r\n <document-actions\r\n [document]=\"selectedDocument\"\r\n [documentId]=\"selectedDocument?._id\"\r\n [currentStatus]=\"currentState.documentStatus\"\r\n [isLoading]=\"currentState.isActionLoading\"\r\n [isUploaded]=\"currentState.documentIsUploaded\"\r\n [statusId]=\"selectedDocument?.statusId\"\r\n (actionPerformed)=\"handleDocumentAction($event)\">\r\n </document-actions>\r\n </div>\r\n <ng-content [select]=\"'action-launcher'\"></ng-content>\r\n </document-history>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:block;height:100%;width:100%;overflow:hidden;position:relative}.document-viewer-container{height:100%;width:100%;position:relative;z-index:1;overflow:hidden;display:flex;flex-direction:column}.document-viewer-container .main-content{height:100%;display:flex;flex-direction:column;overflow:hidden;min-height:0}.document-viewer-container .main-content .p-messages{margin-bottom:.5rem;flex-shrink:0}.document-viewer-container .main-content .content-grid{display:grid;grid-template-columns:1fr 400px;gap:1rem;height:0;min-height:0;overflow:hidden;flex:1}.document-viewer-container .main-content .content-grid .document-preview{background:transparent;height:100%;width:100%;min-width:0;overflow:auto;border-radius:10px;scrollbar-width:none;-ms-overflow-style:none}.document-viewer-container .main-content .content-grid .document-preview::-webkit-scrollbar{display:none}.document-viewer-container .main-content .content-grid .sidebar{display:flex;flex-direction:column;gap:.75rem;height:100%;overflow-y:auto;min-width:0;width:100%;scrollbar-width:none;-ms-overflow-style:none}.document-viewer-container .main-content .content-grid .sidebar::-webkit-scrollbar{display:none}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-actions-container{margin:0}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-history-container{padding:.75rem;max-height:none;scrollbar-width:none;-ms-overflow-style:none}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-history-container::-webkit-scrollbar{display:none}::ng-deep .p-dialog-content{overflow:hidden!important;height:100%!important}::ng-deep .p-dialog{overflow:hidden!important}@media (max-width: 1200px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr 380px;gap:.75rem}}@media (max-width: 768px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr;gap:.5rem}.document-viewer-container .main-content .content-grid .sidebar{order:-1}}.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{position:relative;z-index:1}.document-viewer .p-dialog{width:100%;height:100%;max-height:100%!important;box-shadow:none!important;z-index:9999!important}.document-viewer .p-dialog-header-close-icon{height:20px;width:20px}.document-viewer .p-dialog-header{background-color:#fff;border-radius:0;padding:.5rem}.document-viewer .p-dialog-content{background-color:#fff;border-radius:0;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "component", type: DocumentHistoryComponent, selector: "document-history", inputs: ["historyData", "showHistory", "contextId", "selectedDocument", "isDocumentIntelligence"], outputs: ["deleteTaskRequested", "documentSelected"] }, { kind: "component", type: DocumentContentViewerComponent, selector: "document-content-viewer", inputs: ["documentUrl", "contentType", "documentName", "selectedDocument", "contextId", "isFormHide"] }, { kind: "component", type: DocumentActionsComponent, selector: "document-actions", inputs: ["document", "documentId", "currentStatus", "isLoading", "isUploaded", "statusId"], outputs: ["actionPerformed"] }], encapsulation: i0.ViewEncapsulation.None });
9228
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentViewerComponent, isStandalone: false, selector: "document-viewer", inputs: { selectedDocument: "selectedDocument", documentList: "documentList", contextId: "contextId", isFormHide: "isFormHide" }, outputs: { documentStatusUpdated: "documentStatusUpdated", deleteError: "deleteError", deleteSuccess: "deleteSuccess", viewerDestroyed: "viewerDestroyed" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-viewer-container grid p-formgrid\">\r\n <div class=\"main-content col-12 md:col-12\">\r\n @if(messages.length > 0) {\r\n <p-messages [(value)]=\"messages\" [enableService]=\"false\"></p-messages>\r\n }\r\n \r\n <div class=\"content-grid col-12 md:col-12\">\r\n @if(selectedDocument){\r\n <div class=\"document-preview p-0 col-12 md:col-9\">\r\n <document-content-viewer\r\n [documentUrl]=\"selectedDocument?.documentUrl\"\r\n [contentType]=\"selectedDocument?.contentType\"\r\n [documentName]=\"selectedDocument?.docName\"\r\n [selectedDocument]=\"selectedDocument\"\r\n [contextId]=\"contextId\"\r\n [isFormHide]=\"isFormHide\"\r\n (documentNameUpdated)=\"onDocumentNameUpdated()\"\r\n ></document-content-viewer>\r\n </div>\r\n }\r\n\r\n <div class=\"sidebar col-12 md:col-3 pt-0\">\r\n <div class=\"sidebar card\">\r\n <document-history \r\n [historyData]=\"currentState.documentHistory\" \r\n [showHistory]=\"currentState.showDocumentHistory\"\r\n [contextId]=\"contextId\"\r\n [selectedDocument]=\"selectedDocument\"\r\n (deleteTaskRequested)=\"onDeleteTaskRequested()\"\r\n (documentSelected)=\"onDocumentSelected($event)\">\r\n \r\n <!-- Document Actions Component inside the history component -->\r\n <div actions-component *ngIf=\"selectedDocument?.status !=='Pending' && !selectedDocument?.isUploaded && selectedDocument?.status === 'Reviewing'\">\r\n <document-actions\r\n [document]=\"selectedDocument\"\r\n [documentId]=\"selectedDocument?._id\"\r\n [currentStatus]=\"currentState.documentStatus\"\r\n [isLoading]=\"currentState.isActionLoading\"\r\n [isUploaded]=\"currentState.documentIsUploaded\"\r\n [statusId]=\"selectedDocument?.statusId\"\r\n (actionPerformed)=\"handleDocumentAction($event)\">\r\n </document-actions>\r\n </div>\r\n <ng-content [select]=\"'action-launcher'\"></ng-content>\r\n </document-history>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:block;height:100%;width:100%;overflow:hidden;position:relative}.document-viewer-container{height:100%;width:100%;position:relative;z-index:1;overflow:hidden;display:flex;flex-direction:column}.document-viewer-container .main-content{height:100%;display:flex;flex-direction:column;overflow:hidden;min-height:0}.document-viewer-container .main-content .p-messages{margin-bottom:.5rem;flex-shrink:0}.document-viewer-container .main-content .content-grid{display:grid;grid-template-columns:1fr 400px;gap:1rem;height:0;min-height:0;overflow:hidden;flex:1}.document-viewer-container .main-content .content-grid .document-preview{background:transparent;height:100%;width:100%;min-width:0;overflow:auto;border-radius:10px;scrollbar-width:none;-ms-overflow-style:none}.document-viewer-container .main-content .content-grid .document-preview::-webkit-scrollbar{display:none}.document-viewer-container .main-content .content-grid .sidebar{display:flex;flex-direction:column;gap:.75rem;height:100%;overflow-y:auto;min-width:0;width:100%;scrollbar-width:none;-ms-overflow-style:none}.document-viewer-container .main-content .content-grid .sidebar::-webkit-scrollbar{display:none}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-actions-container{margin:0}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-history-container{padding:.75rem;max-height:none;scrollbar-width:none;-ms-overflow-style:none}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-history-container::-webkit-scrollbar{display:none}::ng-deep .p-dialog-content{overflow:hidden!important;height:100%!important}::ng-deep .p-dialog{overflow:hidden!important}@media (max-width: 1200px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr 380px;gap:.75rem}}@media (max-width: 768px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr;gap:.5rem}.document-viewer-container .main-content .content-grid .sidebar{order:-1}}.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{position:relative;z-index:1}.document-viewer .p-dialog{width:100%;height:100%;max-height:100%!important;box-shadow:none!important;z-index:9999!important}.document-viewer .p-dialog-header-close-icon{height:20px;width:20px}.document-viewer .p-dialog-header{background-color:#fff;border-radius:0;padding:.5rem}.document-viewer .p-dialog-content{background-color:#fff;border-radius:0;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "component", type: DocumentHistoryComponent, selector: "document-history", inputs: ["historyData", "showHistory", "contextId", "selectedDocument", "isDocumentIntelligence"], outputs: ["deleteTaskRequested", "documentSelected"] }, { kind: "component", type: DocumentContentViewerComponent, selector: "document-content-viewer", inputs: ["documentUrl", "contentType", "documentName", "selectedDocument", "contextId", "isFormHide"] }, { kind: "component", type: DocumentActionsComponent, selector: "document-actions", inputs: ["document", "documentId", "currentStatus", "isLoading", "isUploaded", "statusId"], outputs: ["actionPerformed"] }], encapsulation: i0.ViewEncapsulation.None });
9486
9229
  }
9487
9230
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentViewerComponent, decorators: [{
9488
9231
  type: Component,
@@ -10057,11 +9800,11 @@ class DocumentListComponent {
10057
9800
  }
10058
9801
  }
10059
9802
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListComponent, deps: [{ token: DocumentListService }, { token: DocumentHttpService }, { token: DocumentMenuService }, { token: DocumentStore }, { token: DocumentScrollService }], target: i0.ɵɵFactoryTarget.Component });
10060
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentListComponent, isStandalone: false, selector: "lib-document-list", inputs: { contextId: "contextId", documentListResponse: "documentListResponse", selectedMenuItemId: "selectedMenuItemId", navigationInfo: "navigationInfo", documentList: "documentList" }, outputs: { handleSelectedDocumentInNewTab: "handleSelectedDocumentInNewTab", handleSelectedDocument: "handleSelectedDocument" }, viewQueries: [{ propertyName: "documentCategoriesContainer", first: true, predicate: ["documentCategoriesContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"document-viewer\">\r\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\"\r\n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\" (onHide)=\"handleCloseModal()\">\r\n <p-messages [(value)]=\"deleteMessage\" [enableService]=\"false\" [closable]=\"false\" />\r\n \r\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\" [contextId]=\"contextId\" \r\n (documentStatusUpdated)=\"handleDocumentStatusUpdate($event)\"\r\n (viewerDestroyed)=\"handleViewerDestroyed()\"\r\n (deleteError)=\"handleDeleteError($event)\"\r\n (deleteSuccess)=\"handleDeleteSuccess()\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"w-full flex align-items-center justify-content-between\">\r\n <input type=\"text\" class=\"w-full border-none bg-white h-3rem file-input-wrapper\" pInputText\r\n [(ngModel)]=\"fileName\" />\r\n\r\n </div>\r\n </ng-template>\r\n <ng-content></ng-content>\r\n </document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"document-categories-container\" #documentCategoriesContainer>\r\n <div class=\"category\" *ngFor=\"let category of documentCategories; let i = index\"\r\n [id]=\"categoryIds[i]\">\r\n <div class=\"category-header\" *ngIf=\"documentCategories[i]?.list?.length\">\r\n <div class=\"category-title\">\r\n <h3>{{ formattedCategoryLabels[i] }}</h3>\r\n <p class=\"category-description\">{{ category.categoryDescription }}</p>\r\n </div>\r\n <div class=\"completion-status\">\r\n <p-badge \r\n [severity]=\"categorySeverities[i]\" \r\n [value]=\"(((categoryCompletionCounts && categoryCompletionCounts[i]) || 0) + ' Complete')\"\r\n class=\"completion-badge\">\r\n </p-badge>\r\n </div>\r\n </div>\r\n\r\n <div class=\"table-container\">\r\n <lib-table-primary [tableData]=\"categoryTables[i]\" [tableStyle]=\"{ 'min-width': '100%' }\"\r\n (rowClick)=\"handleTableRowClick($event)\" (deleteAction)=\"handleDeleteAction($event)\" (rowCtrlClick)=\"handleTableRowCtrlClick($event)\" >\r\n </lib-table-primary>\r\n </div>\r\n </div>\r\n</div>", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right{width:35%}.error-message-wrapper{color:#dc3545}.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}.clickable-doc-name{cursor:pointer;transition:all .2s ease;padding:4px 8px;border-radius:4px}.clickable-doc-name:hover{background-color:#4c62921a;color:var(--primary-color, #4C6292)}.clickable-doc-name:active{background-color:#4c629233;transform:scale(.98)}.clickable-doc-name .edit-icon{font-size:.8em;margin-left:8px;opacity:.6;transition:opacity .2s ease}.clickable-doc-name:hover .edit-icon{opacity:1}.document-name-display{display:flex;flex-direction:column;align-items:flex-start;gap:4px;cursor:pointer;transition:all .2s ease;padding:4px 8px;border-radius:4px;width:100%}.document-name-display:hover{background-color:#4c62921a}.document-name-display:hover .alias-name{color:var(--primary-color, #4C6292)}.document-name-display:active{background-color:#4c629233;transform:scale(.98)}.document-name-display .alias-name{font-size:1.5rem;font-weight:700;color:var(--text-color, #2c3e50);line-height:1.2;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;max-width:none;transition:color .2s ease;display:flex;align-items:center;justify-content:flex-start;gap:8px}.document-name-display .alias-name .edit-icon-small{font-size:.7em;opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s ease;margin-left:6px}.document-name-display:hover .edit-icon-small{opacity:1;visibility:visible}.document-name-display .document-name{font-size:.875rem;color:var(--text-color-secondary, #6c757d);font-weight:400;line-height:1.2;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;max-width:none;opacity:.8}.file-input-wrapper{transition:all .2s ease;min-width:300px!important;width:auto!important;max-width:80vw!important}.file-input-wrapper:focus{border-color:var(--primary-color, #4C6292)!important;box-shadow:0 0 0 .2rem #4c629240!important;outline:none!important}.document-name-input{min-width:400px!important;width:auto!important;max-width:70vw!important;padding:8px 12px!important;font-size:1.1rem!important;font-weight:500!important;border:2px solid var(--primary-color, #4C6292)!important;border-radius:6px!important;background-color:#fff!important}.document-name-input:focus{outline:none!important;border-color:var(--primary-color, #4C6292)!important;box-shadow:0 0 0 .2rem #4c629240!important}.document-edit-container{display:flex;flex-direction:column;align-items:flex-start;gap:6px;width:100%;max-width:70vw}.document-name-subline{font-size:.85rem;color:var(--text-color-secondary, #6c757d);line-height:1.2;padding-left:4px;opacity:.8}.document-viewer{position:relative;z-index:1}.document-viewer ::ng-deep .p-dialog{z-index:9999!important}.document-viewer ::ng-deep .p-dialog-mask{z-index:9998!important}.document-viewer ::ng-deep .p-dialog{width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;margin:0!important;top:0!important;left:0!important;transform:none!important}.document-viewer ::ng-deep .p-dialog-content{height:calc(100vh - 60px)!important;max-height:none!important}.document-categories-container{padding:1rem;min-height:auto}.document-categories-container .category{background:#fff;border-radius:8px;margin-bottom:2rem;overflow:hidden;transition:all .3s ease}.document-categories-container .category .category-header{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding-top:.6rem;padding-bottom:1rem}.document-categories-container .category .category-header .category-title{flex:1;min-width:0}.document-categories-container .category .category-header .category-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-categories-container .category .category-header .category-title .category-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-categories-container .category .category-header .completion-status{display:flex;align-items:center;justify-content:center;min-width:fit-content}.document-categories-container .category .category-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-categories-container .category .category-header .completion-status .completion-badge{display:flex;align-items:center;justify-content:center}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge{font-size:.75rem;font-weight:500;padding:.375rem .75rem;border-radius:6px;display:flex;align-items:center;justify-content:center;min-width:fit-content;white-space:nowrap}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-success{background-color:#d1fae5;color:#065f46;font-family:inherit;font-size:12px;padding:15px;font-weight:400}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-info{background-color:#e5e7eb;color:#000;font-family:inherit;font-size:12px;font-weight:400;padding:15px;font-style:inherit}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;padding:15px;font-size:12px;font-weight:400;font-style:inherit}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-danger{background-color:#fee2e2;color:#dc2626;font-family:inherit;font-size:12px;padding:15px;font-weight:400;font-style:inherit}.document-categories-container .category .table-container{padding:0}@keyframes highlightPulse{0%{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}50%{transform:scale(1.03);box-shadow:0 6px 25px #3b82f680}to{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}}.document-sections-container{padding:1rem;background-color:#f8f9fa;min-height:100vh}.document-sections-container .section{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden}.document-sections-container .section .section-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef}.document-sections-container .section .section-header .section-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-sections-container .section .section-header .section-title .section-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-sections-container .section .section-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge{font-size:.75rem;font-weight:500;padding:.375rem .75rem;border-radius:6px}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-success{background-color:#10b981;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-info{background-color:#3b82f6;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-warning{background-color:#f59e0b;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-danger{background-color:#ef4444;color:#fff}.document-sections-container .section .table-container{padding:0}@media (max-width: 768px){.document-categories-container,.document-sections-container{padding:.5rem}.document-categories-container .category .category-header,.document-categories-container .category .section-header,.document-categories-container .section .category-header,.document-categories-container .section .section-header,.document-sections-container .category .category-header,.document-sections-container .category .section-header,.document-sections-container .section .category-header,.document-sections-container .section .section-header{flex-direction:column;gap:1rem;align-items:stretch}.document-categories-container .category .category-header .completion-status,.document-categories-container .category .section-header .completion-status,.document-categories-container .section .category-header .completion-status,.document-categories-container .section .section-header .completion-status,.document-sections-container .category .category-header .completion-status,.document-sections-container .category .section-header .completion-status,.document-sections-container .section .category-header .completion-status,.document-sections-container .section .section-header .completion-status{align-self:center;width:100%;justify-content:center}}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "component", type: i9$3.Badge, selector: "p-badge", inputs: ["styleClass", "style", "badgeSize", "severity", "value", "badgeDisabled", "size"] }, { kind: "directive", type: i9$1.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: i9$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8$2.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: "directive", type: i6$1.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: TablePrimaryComponent, selector: "lib-table-primary", inputs: ["tableData", "showHeader", "tableStyle"], outputs: ["rowClick", "rowCtrlClick"] }, { kind: "component", type: DocumentViewerComponent, selector: "document-viewer", inputs: ["selectedDocument", "documentList", "contextId", "isFormHide"], outputs: ["documentStatusUpdated", "deleteError", "deleteSuccess", "viewerDestroyed"] }], encapsulation: i0.ViewEncapsulation.None });
9803
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentListComponent, isStandalone: false, selector: "lib-document-list", inputs: { contextId: "contextId", documentListResponse: "documentListResponse", selectedMenuItemId: "selectedMenuItemId", navigationInfo: "navigationInfo", documentList: "documentList" }, outputs: { handleSelectedDocumentInNewTab: "handleSelectedDocumentInNewTab", handleSelectedDocument: "handleSelectedDocument" }, viewQueries: [{ propertyName: "documentCategoriesContainer", first: true, predicate: ["documentCategoriesContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"document-viewer\">\r\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\" appendTo=\"body\" [style]=\"{ width: '100vw', height: '100vh', minHeight: '100vh' }\"\r\n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\" (onHide)=\"handleCloseModal()\">\r\n <p-messages [(value)]=\"deleteMessage\" [enableService]=\"false\" [closable]=\"false\" />\r\n \r\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\" [contextId]=\"contextId\" \r\n (documentStatusUpdated)=\"handleDocumentStatusUpdate($event)\"\r\n (viewerDestroyed)=\"handleViewerDestroyed()\"\r\n (deleteError)=\"handleDeleteError($event)\"\r\n (deleteSuccess)=\"handleDeleteSuccess()\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"w-full flex align-items-center justify-content-between\">\r\n <input type=\"text\" class=\"w-full border-none bg-white h-3rem file-input-wrapper\" pInputText\r\n [(ngModel)]=\"fileName\" />\r\n\r\n </div>\r\n </ng-template>\r\n <ng-content></ng-content>\r\n </document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"document-categories-container\" #documentCategoriesContainer>\r\n <div class=\"category\" *ngFor=\"let category of documentCategories; let i = index\"\r\n [id]=\"categoryIds[i]\">\r\n <div class=\"category-header\" *ngIf=\"documentCategories[i]?.list?.length\">\r\n <div class=\"category-title\">\r\n <h3>{{ formattedCategoryLabels[i] }}</h3>\r\n <p class=\"category-description\">{{ category.categoryDescription }}</p>\r\n </div>\r\n <div class=\"completion-status\">\r\n <p-badge \r\n [severity]=\"categorySeverities[i]\" \r\n [value]=\"(((categoryCompletionCounts && categoryCompletionCounts[i]) || 0) + ' Complete')\"\r\n class=\"completion-badge\">\r\n </p-badge>\r\n </div>\r\n </div>\r\n\r\n <div class=\"table-container\">\r\n <lib-table-primary [tableData]=\"categoryTables[i]\" [tableStyle]=\"{ 'min-width': '100%' }\"\r\n (rowClick)=\"handleTableRowClick($event)\" (deleteAction)=\"handleDeleteAction($event)\" (rowCtrlClick)=\"handleTableRowCtrlClick($event)\" >\r\n </lib-table-primary>\r\n </div>\r\n </div>\r\n</div>", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right{width:35%}.error-message-wrapper{color:#dc3545}.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}.clickable-doc-name{cursor:pointer;transition:all .2s ease;padding:4px 8px;border-radius:4px}.clickable-doc-name:hover{background-color:#4c62921a;color:var(--primary-color, #4C6292)}.clickable-doc-name:active{background-color:#4c629233;transform:scale(.98)}.clickable-doc-name .edit-icon{font-size:.8em;margin-left:8px;opacity:.6;transition:opacity .2s ease}.clickable-doc-name:hover .edit-icon{opacity:1}.document-name-display{display:flex;flex-direction:column;align-items:flex-start;gap:4px;cursor:pointer;transition:all .2s ease;padding:4px 8px;border-radius:4px;width:100%}.document-name-display:hover{background-color:#4c62921a}.document-name-display:hover .alias-name{color:var(--primary-color, #4C6292)}.document-name-display:active{background-color:#4c629233;transform:scale(.98)}.document-name-display .alias-name{font-size:1.5rem;font-weight:700;color:var(--text-color, #2c3e50);line-height:1.2;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;max-width:none;transition:color .2s ease;display:flex;align-items:center;justify-content:flex-start;gap:8px}.document-name-display .alias-name .edit-icon-small{font-size:.7em;opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s ease;margin-left:6px}.document-name-display:hover .edit-icon-small{opacity:1;visibility:visible}.document-name-display .document-name{font-size:.875rem;color:var(--text-color-secondary, #6c757d);font-weight:400;line-height:1.2;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;max-width:none;opacity:.8}.file-input-wrapper{transition:all .2s ease;min-width:300px!important;width:auto!important;max-width:80vw!important}.file-input-wrapper:focus{border-color:var(--primary-color, #4C6292)!important;box-shadow:0 0 0 .2rem #4c629240!important;outline:none!important}.document-name-input{min-width:400px!important;width:auto!important;max-width:70vw!important;padding:8px 12px!important;font-size:1.1rem!important;font-weight:500!important;border:2px solid var(--primary-color, #4C6292)!important;border-radius:6px!important;background-color:#fff!important}.document-name-input:focus{outline:none!important;border-color:var(--primary-color, #4C6292)!important;box-shadow:0 0 0 .2rem #4c629240!important}.document-edit-container{display:flex;flex-direction:column;align-items:flex-start;gap:6px;width:100%;max-width:70vw}.document-name-subline{font-size:.85rem;color:var(--text-color-secondary, #6c757d);line-height:1.2;padding-left:4px;opacity:.8}.document-viewer{position:relative;z-index:1}.document-viewer ::ng-deep .p-dialog{z-index:9999!important}.document-viewer ::ng-deep .p-dialog-mask{z-index:9998!important}.document-viewer ::ng-deep .p-dialog{width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;margin:0!important;top:0!important;left:0!important;transform:none!important}.document-viewer ::ng-deep .p-dialog-content{height:calc(100vh - 60px)!important;max-height:none!important}.document-categories-container{padding:1rem;min-height:auto}.document-categories-container .category{background:#fff;border-radius:8px;margin-bottom:2rem;overflow:hidden;transition:all .3s ease}.document-categories-container .category .category-header{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding-top:.6rem;padding-bottom:1rem}.document-categories-container .category .category-header .category-title{flex:1;min-width:0}.document-categories-container .category .category-header .category-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-categories-container .category .category-header .category-title .category-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-categories-container .category .category-header .completion-status{display:flex;align-items:center;justify-content:center;min-width:fit-content}.document-categories-container .category .category-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-categories-container .category .category-header .completion-status .completion-badge{display:flex;align-items:center;justify-content:center}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge{font-size:.75rem;font-weight:500;padding:.375rem .75rem;border-radius:6px;display:flex;align-items:center;justify-content:center;min-width:fit-content;white-space:nowrap}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-success{background-color:#d1fae5;color:#065f46;font-family:inherit;font-size:12px;padding:15px;font-weight:400}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-info{background-color:#e5e7eb;color:#000;font-family:inherit;font-size:12px;font-weight:400;padding:15px;font-style:inherit}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;padding:15px;font-size:12px;font-weight:400;font-style:inherit}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-danger{background-color:#fee2e2;color:#dc2626;font-family:inherit;font-size:12px;padding:15px;font-weight:400;font-style:inherit}.document-categories-container .category .table-container{padding:0}@keyframes highlightPulse{0%{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}50%{transform:scale(1.03);box-shadow:0 6px 25px #3b82f680}to{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}}.document-sections-container{padding:1rem;background-color:#f8f9fa;min-height:100vh}.document-sections-container .section{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden}.document-sections-container .section .section-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef}.document-sections-container .section .section-header .section-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-sections-container .section .section-header .section-title .section-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-sections-container .section .section-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge{font-size:.75rem;font-weight:500;padding:.375rem .75rem;border-radius:6px}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-success{background-color:#10b981;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-info{background-color:#3b82f6;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-warning{background-color:#f59e0b;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-danger{background-color:#ef4444;color:#fff}.document-sections-container .section .table-container{padding:0}@media (max-width: 768px){.document-categories-container,.document-sections-container{padding:.5rem}.document-categories-container .category .category-header,.document-categories-container .category .section-header,.document-categories-container .section .category-header,.document-categories-container .section .section-header,.document-sections-container .category .category-header,.document-sections-container .category .section-header,.document-sections-container .section .category-header,.document-sections-container .section .section-header{flex-direction:column;gap:1rem;align-items:stretch}.document-categories-container .category .category-header .completion-status,.document-categories-container .category .section-header .completion-status,.document-categories-container .section .category-header .completion-status,.document-categories-container .section .section-header .completion-status,.document-sections-container .category .category-header .completion-status,.document-sections-container .category .section-header .completion-status,.document-sections-container .section .category-header .completion-status,.document-sections-container .section .section-header .completion-status{align-self:center;width:100%;justify-content:center}}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "component", type: i9$2.Badge, selector: "p-badge", inputs: ["styleClass", "style", "badgeSize", "severity", "value", "badgeDisabled", "size"] }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8$1.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: "directive", type: i6$1.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: TablePrimaryComponent, selector: "lib-table-primary", inputs: ["tableData", "showHeader", "tableStyle"], outputs: ["rowClick", "rowCtrlClick"] }, { kind: "component", type: DocumentViewerComponent, selector: "document-viewer", inputs: ["selectedDocument", "documentList", "contextId", "isFormHide"], outputs: ["documentStatusUpdated", "deleteError", "deleteSuccess", "viewerDestroyed"] }], encapsulation: i0.ViewEncapsulation.None });
10061
9804
  }
10062
9805
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListComponent, decorators: [{
10063
9806
  type: Component,
10064
- args: [{ selector: 'lib-document-list', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-viewer\">\r\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\"\r\n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\" (onHide)=\"handleCloseModal()\">\r\n <p-messages [(value)]=\"deleteMessage\" [enableService]=\"false\" [closable]=\"false\" />\r\n \r\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\" [contextId]=\"contextId\" \r\n (documentStatusUpdated)=\"handleDocumentStatusUpdate($event)\"\r\n (viewerDestroyed)=\"handleViewerDestroyed()\"\r\n (deleteError)=\"handleDeleteError($event)\"\r\n (deleteSuccess)=\"handleDeleteSuccess()\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"w-full flex align-items-center justify-content-between\">\r\n <input type=\"text\" class=\"w-full border-none bg-white h-3rem file-input-wrapper\" pInputText\r\n [(ngModel)]=\"fileName\" />\r\n\r\n </div>\r\n </ng-template>\r\n <ng-content></ng-content>\r\n </document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"document-categories-container\" #documentCategoriesContainer>\r\n <div class=\"category\" *ngFor=\"let category of documentCategories; let i = index\"\r\n [id]=\"categoryIds[i]\">\r\n <div class=\"category-header\" *ngIf=\"documentCategories[i]?.list?.length\">\r\n <div class=\"category-title\">\r\n <h3>{{ formattedCategoryLabels[i] }}</h3>\r\n <p class=\"category-description\">{{ category.categoryDescription }}</p>\r\n </div>\r\n <div class=\"completion-status\">\r\n <p-badge \r\n [severity]=\"categorySeverities[i]\" \r\n [value]=\"(((categoryCompletionCounts && categoryCompletionCounts[i]) || 0) + ' Complete')\"\r\n class=\"completion-badge\">\r\n </p-badge>\r\n </div>\r\n </div>\r\n\r\n <div class=\"table-container\">\r\n <lib-table-primary [tableData]=\"categoryTables[i]\" [tableStyle]=\"{ 'min-width': '100%' }\"\r\n (rowClick)=\"handleTableRowClick($event)\" (deleteAction)=\"handleDeleteAction($event)\" (rowCtrlClick)=\"handleTableRowCtrlClick($event)\" >\r\n </lib-table-primary>\r\n </div>\r\n </div>\r\n</div>", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right{width:35%}.error-message-wrapper{color:#dc3545}.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}.clickable-doc-name{cursor:pointer;transition:all .2s ease;padding:4px 8px;border-radius:4px}.clickable-doc-name:hover{background-color:#4c62921a;color:var(--primary-color, #4C6292)}.clickable-doc-name:active{background-color:#4c629233;transform:scale(.98)}.clickable-doc-name .edit-icon{font-size:.8em;margin-left:8px;opacity:.6;transition:opacity .2s ease}.clickable-doc-name:hover .edit-icon{opacity:1}.document-name-display{display:flex;flex-direction:column;align-items:flex-start;gap:4px;cursor:pointer;transition:all .2s ease;padding:4px 8px;border-radius:4px;width:100%}.document-name-display:hover{background-color:#4c62921a}.document-name-display:hover .alias-name{color:var(--primary-color, #4C6292)}.document-name-display:active{background-color:#4c629233;transform:scale(.98)}.document-name-display .alias-name{font-size:1.5rem;font-weight:700;color:var(--text-color, #2c3e50);line-height:1.2;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;max-width:none;transition:color .2s ease;display:flex;align-items:center;justify-content:flex-start;gap:8px}.document-name-display .alias-name .edit-icon-small{font-size:.7em;opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s ease;margin-left:6px}.document-name-display:hover .edit-icon-small{opacity:1;visibility:visible}.document-name-display .document-name{font-size:.875rem;color:var(--text-color-secondary, #6c757d);font-weight:400;line-height:1.2;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;max-width:none;opacity:.8}.file-input-wrapper{transition:all .2s ease;min-width:300px!important;width:auto!important;max-width:80vw!important}.file-input-wrapper:focus{border-color:var(--primary-color, #4C6292)!important;box-shadow:0 0 0 .2rem #4c629240!important;outline:none!important}.document-name-input{min-width:400px!important;width:auto!important;max-width:70vw!important;padding:8px 12px!important;font-size:1.1rem!important;font-weight:500!important;border:2px solid var(--primary-color, #4C6292)!important;border-radius:6px!important;background-color:#fff!important}.document-name-input:focus{outline:none!important;border-color:var(--primary-color, #4C6292)!important;box-shadow:0 0 0 .2rem #4c629240!important}.document-edit-container{display:flex;flex-direction:column;align-items:flex-start;gap:6px;width:100%;max-width:70vw}.document-name-subline{font-size:.85rem;color:var(--text-color-secondary, #6c757d);line-height:1.2;padding-left:4px;opacity:.8}.document-viewer{position:relative;z-index:1}.document-viewer ::ng-deep .p-dialog{z-index:9999!important}.document-viewer ::ng-deep .p-dialog-mask{z-index:9998!important}.document-viewer ::ng-deep .p-dialog{width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;margin:0!important;top:0!important;left:0!important;transform:none!important}.document-viewer ::ng-deep .p-dialog-content{height:calc(100vh - 60px)!important;max-height:none!important}.document-categories-container{padding:1rem;min-height:auto}.document-categories-container .category{background:#fff;border-radius:8px;margin-bottom:2rem;overflow:hidden;transition:all .3s ease}.document-categories-container .category .category-header{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding-top:.6rem;padding-bottom:1rem}.document-categories-container .category .category-header .category-title{flex:1;min-width:0}.document-categories-container .category .category-header .category-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-categories-container .category .category-header .category-title .category-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-categories-container .category .category-header .completion-status{display:flex;align-items:center;justify-content:center;min-width:fit-content}.document-categories-container .category .category-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-categories-container .category .category-header .completion-status .completion-badge{display:flex;align-items:center;justify-content:center}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge{font-size:.75rem;font-weight:500;padding:.375rem .75rem;border-radius:6px;display:flex;align-items:center;justify-content:center;min-width:fit-content;white-space:nowrap}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-success{background-color:#d1fae5;color:#065f46;font-family:inherit;font-size:12px;padding:15px;font-weight:400}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-info{background-color:#e5e7eb;color:#000;font-family:inherit;font-size:12px;font-weight:400;padding:15px;font-style:inherit}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;padding:15px;font-size:12px;font-weight:400;font-style:inherit}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-danger{background-color:#fee2e2;color:#dc2626;font-family:inherit;font-size:12px;padding:15px;font-weight:400;font-style:inherit}.document-categories-container .category .table-container{padding:0}@keyframes highlightPulse{0%{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}50%{transform:scale(1.03);box-shadow:0 6px 25px #3b82f680}to{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}}.document-sections-container{padding:1rem;background-color:#f8f9fa;min-height:100vh}.document-sections-container .section{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden}.document-sections-container .section .section-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef}.document-sections-container .section .section-header .section-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-sections-container .section .section-header .section-title .section-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-sections-container .section .section-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge{font-size:.75rem;font-weight:500;padding:.375rem .75rem;border-radius:6px}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-success{background-color:#10b981;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-info{background-color:#3b82f6;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-warning{background-color:#f59e0b;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-danger{background-color:#ef4444;color:#fff}.document-sections-container .section .table-container{padding:0}@media (max-width: 768px){.document-categories-container,.document-sections-container{padding:.5rem}.document-categories-container .category .category-header,.document-categories-container .category .section-header,.document-categories-container .section .category-header,.document-categories-container .section .section-header,.document-sections-container .category .category-header,.document-sections-container .category .section-header,.document-sections-container .section .category-header,.document-sections-container .section .section-header{flex-direction:column;gap:1rem;align-items:stretch}.document-categories-container .category .category-header .completion-status,.document-categories-container .category .section-header .completion-status,.document-categories-container .section .category-header .completion-status,.document-categories-container .section .section-header .completion-status,.document-sections-container .category .category-header .completion-status,.document-sections-container .category .section-header .completion-status,.document-sections-container .section .category-header .completion-status,.document-sections-container .section .section-header .completion-status{align-self:center;width:100%;justify-content:center}}\n"] }]
9807
+ args: [{ selector: 'lib-document-list', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-viewer\">\r\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\" appendTo=\"body\" [style]=\"{ width: '100vw', height: '100vh', minHeight: '100vh' }\"\r\n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\" (onHide)=\"handleCloseModal()\">\r\n <p-messages [(value)]=\"deleteMessage\" [enableService]=\"false\" [closable]=\"false\" />\r\n \r\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\" [contextId]=\"contextId\" \r\n (documentStatusUpdated)=\"handleDocumentStatusUpdate($event)\"\r\n (viewerDestroyed)=\"handleViewerDestroyed()\"\r\n (deleteError)=\"handleDeleteError($event)\"\r\n (deleteSuccess)=\"handleDeleteSuccess()\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"w-full flex align-items-center justify-content-between\">\r\n <input type=\"text\" class=\"w-full border-none bg-white h-3rem file-input-wrapper\" pInputText\r\n [(ngModel)]=\"fileName\" />\r\n\r\n </div>\r\n </ng-template>\r\n <ng-content></ng-content>\r\n </document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"document-categories-container\" #documentCategoriesContainer>\r\n <div class=\"category\" *ngFor=\"let category of documentCategories; let i = index\"\r\n [id]=\"categoryIds[i]\">\r\n <div class=\"category-header\" *ngIf=\"documentCategories[i]?.list?.length\">\r\n <div class=\"category-title\">\r\n <h3>{{ formattedCategoryLabels[i] }}</h3>\r\n <p class=\"category-description\">{{ category.categoryDescription }}</p>\r\n </div>\r\n <div class=\"completion-status\">\r\n <p-badge \r\n [severity]=\"categorySeverities[i]\" \r\n [value]=\"(((categoryCompletionCounts && categoryCompletionCounts[i]) || 0) + ' Complete')\"\r\n class=\"completion-badge\">\r\n </p-badge>\r\n </div>\r\n </div>\r\n\r\n <div class=\"table-container\">\r\n <lib-table-primary [tableData]=\"categoryTables[i]\" [tableStyle]=\"{ 'min-width': '100%' }\"\r\n (rowClick)=\"handleTableRowClick($event)\" (deleteAction)=\"handleDeleteAction($event)\" (rowCtrlClick)=\"handleTableRowCtrlClick($event)\" >\r\n </lib-table-primary>\r\n </div>\r\n </div>\r\n</div>", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right{width:35%}.error-message-wrapper{color:#dc3545}.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}.clickable-doc-name{cursor:pointer;transition:all .2s ease;padding:4px 8px;border-radius:4px}.clickable-doc-name:hover{background-color:#4c62921a;color:var(--primary-color, #4C6292)}.clickable-doc-name:active{background-color:#4c629233;transform:scale(.98)}.clickable-doc-name .edit-icon{font-size:.8em;margin-left:8px;opacity:.6;transition:opacity .2s ease}.clickable-doc-name:hover .edit-icon{opacity:1}.document-name-display{display:flex;flex-direction:column;align-items:flex-start;gap:4px;cursor:pointer;transition:all .2s ease;padding:4px 8px;border-radius:4px;width:100%}.document-name-display:hover{background-color:#4c62921a}.document-name-display:hover .alias-name{color:var(--primary-color, #4C6292)}.document-name-display:active{background-color:#4c629233;transform:scale(.98)}.document-name-display .alias-name{font-size:1.5rem;font-weight:700;color:var(--text-color, #2c3e50);line-height:1.2;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;max-width:none;transition:color .2s ease;display:flex;align-items:center;justify-content:flex-start;gap:8px}.document-name-display .alias-name .edit-icon-small{font-size:.7em;opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s ease;margin-left:6px}.document-name-display:hover .edit-icon-small{opacity:1;visibility:visible}.document-name-display .document-name{font-size:.875rem;color:var(--text-color-secondary, #6c757d);font-weight:400;line-height:1.2;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;max-width:none;opacity:.8}.file-input-wrapper{transition:all .2s ease;min-width:300px!important;width:auto!important;max-width:80vw!important}.file-input-wrapper:focus{border-color:var(--primary-color, #4C6292)!important;box-shadow:0 0 0 .2rem #4c629240!important;outline:none!important}.document-name-input{min-width:400px!important;width:auto!important;max-width:70vw!important;padding:8px 12px!important;font-size:1.1rem!important;font-weight:500!important;border:2px solid var(--primary-color, #4C6292)!important;border-radius:6px!important;background-color:#fff!important}.document-name-input:focus{outline:none!important;border-color:var(--primary-color, #4C6292)!important;box-shadow:0 0 0 .2rem #4c629240!important}.document-edit-container{display:flex;flex-direction:column;align-items:flex-start;gap:6px;width:100%;max-width:70vw}.document-name-subline{font-size:.85rem;color:var(--text-color-secondary, #6c757d);line-height:1.2;padding-left:4px;opacity:.8}.document-viewer{position:relative;z-index:1}.document-viewer ::ng-deep .p-dialog{z-index:9999!important}.document-viewer ::ng-deep .p-dialog-mask{z-index:9998!important}.document-viewer ::ng-deep .p-dialog{width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;margin:0!important;top:0!important;left:0!important;transform:none!important}.document-viewer ::ng-deep .p-dialog-content{height:calc(100vh - 60px)!important;max-height:none!important}.document-categories-container{padding:1rem;min-height:auto}.document-categories-container .category{background:#fff;border-radius:8px;margin-bottom:2rem;overflow:hidden;transition:all .3s ease}.document-categories-container .category .category-header{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding-top:.6rem;padding-bottom:1rem}.document-categories-container .category .category-header .category-title{flex:1;min-width:0}.document-categories-container .category .category-header .category-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-categories-container .category .category-header .category-title .category-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-categories-container .category .category-header .completion-status{display:flex;align-items:center;justify-content:center;min-width:fit-content}.document-categories-container .category .category-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-categories-container .category .category-header .completion-status .completion-badge{display:flex;align-items:center;justify-content:center}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge{font-size:.75rem;font-weight:500;padding:.375rem .75rem;border-radius:6px;display:flex;align-items:center;justify-content:center;min-width:fit-content;white-space:nowrap}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-success{background-color:#d1fae5;color:#065f46;font-family:inherit;font-size:12px;padding:15px;font-weight:400}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-info{background-color:#e5e7eb;color:#000;font-family:inherit;font-size:12px;font-weight:400;padding:15px;font-style:inherit}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;padding:15px;font-size:12px;font-weight:400;font-style:inherit}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-danger{background-color:#fee2e2;color:#dc2626;font-family:inherit;font-size:12px;padding:15px;font-weight:400;font-style:inherit}.document-categories-container .category .table-container{padding:0}@keyframes highlightPulse{0%{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}50%{transform:scale(1.03);box-shadow:0 6px 25px #3b82f680}to{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}}.document-sections-container{padding:1rem;background-color:#f8f9fa;min-height:100vh}.document-sections-container .section{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden}.document-sections-container .section .section-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef}.document-sections-container .section .section-header .section-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-sections-container .section .section-header .section-title .section-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-sections-container .section .section-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge{font-size:.75rem;font-weight:500;padding:.375rem .75rem;border-radius:6px}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-success{background-color:#10b981;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-info{background-color:#3b82f6;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-warning{background-color:#f59e0b;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-danger{background-color:#ef4444;color:#fff}.document-sections-container .section .table-container{padding:0}@media (max-width: 768px){.document-categories-container,.document-sections-container{padding:.5rem}.document-categories-container .category .category-header,.document-categories-container .category .section-header,.document-categories-container .section .category-header,.document-categories-container .section .section-header,.document-sections-container .category .category-header,.document-sections-container .category .section-header,.document-sections-container .section .category-header,.document-sections-container .section .section-header{flex-direction:column;gap:1rem;align-items:stretch}.document-categories-container .category .category-header .completion-status,.document-categories-container .category .section-header .completion-status,.document-categories-container .section .category-header .completion-status,.document-categories-container .section .section-header .completion-status,.document-sections-container .category .category-header .completion-status,.document-sections-container .category .section-header .completion-status,.document-sections-container .section .category-header .completion-status,.document-sections-container .section .section-header .completion-status{align-self:center;width:100%;justify-content:center}}\n"] }]
10065
9808
  }], ctorParameters: () => [{ type: DocumentListService }, { type: DocumentHttpService }, { type: DocumentMenuService }, { type: DocumentStore }, { type: DocumentScrollService }], propDecorators: { contextId: [{
10066
9809
  type: Input
10067
9810
  }], documentListResponse: [{
@@ -10081,798 +9824,1053 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
10081
9824
  type: Output
10082
9825
  }] } });
10083
9826
 
10084
- class DocumentsMenuComponent {
10085
- documentStore;
9827
+ /**
9828
+ *This component is responsible for managing and displaying a list of documents.
9829
+ * @class DocumentContainerComponent
9830
+ * @typedef {DocumentContainerComponent}
9831
+ */
9832
+ class DocumentContainerComponent {
9833
+ documentHttpService;
9834
+ documentHelperService;
10086
9835
  documentQuery;
9836
+ documentStore;
10087
9837
  documentMenuService;
10088
- documentHelperService;
10089
- catagories = SHARED.EMPTY_ARRAY;
10090
- applicationNumber = SHARED.EMPTY;
10091
- contextId = SHARED.EMPTY;
10092
- menuItemSelected = new EventEmitter();
10093
- selectedMenuItem = null;
9838
+ /**
9839
+ * The document list response data
9840
+ * @type {DocumentListResponse[] | null}
9841
+ */
9842
+ documentListResponse = null;
9843
+ /**
9844
+ * Status data for the current selection
9845
+ * @type {StatusDataModel[]}
9846
+ */
9847
+ statusData = [];
9848
+ /**
9849
+ * The currently selected menu item ID for scrolling
9850
+ */
10094
9851
  selectedMenuItemId = null;
10095
- // Store the categories from the store
10096
- storeCategories = SHARED.EMPTY_ARRAY;
10097
- // Cache for categories to avoid repeated processing
10098
- _cachedCategories = SHARED.EMPTY_ARRAY;
10099
- // Subscriptions to track for cleanup
10100
- selectedMenuItemSubscription;
10101
- documentCategoriesSubscription;
10102
- documentListResponseSubscription;
10103
- constructor(documentStore, documentQuery, documentMenuService, documentHelperService) {
10104
- this.documentStore = documentStore;
9852
+ onOpenInNewTab;
9853
+ /**
9854
+ * Additional navigation information for better scrolling
9855
+ */
9856
+ navigationInfo = null;
9857
+ /**
9858
+ * Reference to the content scroll container
9859
+ */
9860
+ contentScrollContainer;
9861
+ selectedDocument = new EventEmitter();
9862
+ selectedDocumentInNewTab = new EventEmitter();
9863
+ /**
9864
+ * Subscription to track selected menu item changes
9865
+ */
9866
+ selectedMenuItemSubscription = new Subscription();
9867
+ /**
9868
+ * Creates an instance of DocumentContainerComponent.
9869
+ * @param {DocumentHttpService} documentHttpService - Service for HTTP operations
9870
+ * @param {DocumentHelperService} documentHelperService - Service for document operations
9871
+ * @param {DocumentQuery} documentQuery - Query service for document state
9872
+ * @param {DocumentStore} documentStore - Store service for document state
9873
+ * @param {DocumentMenuService} documentMenuService - Service for menu operations
9874
+ */
9875
+ constructor(documentHttpService, documentHelperService, documentQuery, documentStore, documentMenuService) {
9876
+ this.documentHttpService = documentHttpService;
9877
+ this.documentHelperService = documentHelperService;
10105
9878
  this.documentQuery = documentQuery;
9879
+ this.documentStore = documentStore;
10106
9880
  this.documentMenuService = documentMenuService;
10107
- this.documentHelperService = documentHelperService;
10108
9881
  }
10109
9882
  /**
10110
- * Initialize the component
10111
- * @returns {void}
10112
- * @memberof DocumentsMenuComponent
9883
+ * Get contextId in input.
9884
+ * @type {string}
10113
9885
  */
10114
- ngOnInit() {
10115
- this.selectedMenuItemSubscription = this.documentQuery.selectSelectedMenuItem().subscribe(menuItemId => {
10116
- this.selectedMenuItemId = menuItemId;
10117
- this.selectedMenuItem = this.findMenuItemLabelById(menuItemId);
10118
- });
10119
- // Subscribe to document categories from the store
10120
- this.documentCategoriesSubscription = this.documentQuery.selectDocumentCategories().subscribe(categories => {
10121
- if (categories && categories.length > 0) {
10122
- this.storeCategories = categories;
10123
- this.updateCachedCategories();
10124
- this.updateMenuItemsData();
10125
- }
10126
- });
10127
- // Subscribe to document list response to update menu item selectability
10128
- this.setupDocumentListResponseSubscription();
10129
- }
9886
+ contextId = SHARED.EMPTY;
10130
9887
  /**
10131
- * Handle changes to input properties
10132
- * @param {SimpleChanges} changes - The changes to the input properties
10133
- * @returns {void}
10134
- * @memberof DocumentsMenuComponent
9888
+ * The list of folders.
9889
+ * @type {Array}
9890
+ */
9891
+ applicationNumber = SHARED.EMPTY;
9892
+ catagories = SHARED.EMPTY_ARRAY;
9893
+ userList = SHARED.EMPTY_ARRAY;
9894
+ /**
9895
+ * Holds the subscription to manage observable cleanup.
9896
+ * @type {Subscription}
9897
+ */
9898
+ subscription = new Subscription();
9899
+ /**
9900
+ * Handles changes to input properties
10135
9901
  */
10136
9902
  ngOnChanges(changes) {
10137
- if (changes[SHARED.CATAGORIES] && this.catagories) {
10138
- this.updateCachedCategories();
10139
- this.updateMenuItemsData();
10140
- }
10141
9903
  if (changes[SHARED.CONTEXT_ID] && !changes[SHARED.CONTEXT_ID].firstChange) {
10142
9904
  this.handleContextIdChange();
10143
9905
  }
10144
9906
  }
10145
9907
  /**
10146
- * Gets the categories to use for the menu
10147
- * Priority: Store categories > Input categories
10148
- * Categories maintain their original order as provided by the API
9908
+ * Initializes the component
10149
9909
  */
10150
- get categories() {
10151
- return this._cachedCategories;
9910
+ ngOnInit() {
9911
+ this.clearAllState();
9912
+ if (this.contextId && this.contextId !== SHARED.EMPTY) {
9913
+ this.initializeData();
9914
+ }
9915
+ this.setupSelectedMenuItemSubscription();
10152
9916
  }
10153
9917
  /**
10154
- * Updates the cached categories when data changes
10155
- * Maintains the original order as provided by the API
9918
+ * Sets up subscription to track selected menu item changes
10156
9919
  */
10157
- updateCachedCategories() {
10158
- const nextCategories = this.storeCategories.length > 0 ? this.storeCategories : this.catagories;
10159
- if (!this._cachedCategories || this._cachedCategories.length === 0) {
10160
- this._cachedCategories = nextCategories;
10161
- return;
10162
- }
10163
- const previousById = new Map();
10164
- this._cachedCategories.forEach(category => {
10165
- category.items?.forEach(item => {
10166
- if (item.isSelectable !== undefined) {
10167
- previousById.set(item._id, item.isSelectable);
10168
- }
10169
- });
10170
- });
10171
- this._cachedCategories = nextCategories.map(category => ({
10172
- ...category,
10173
- items: category.items?.map(item => ({
10174
- ...item,
10175
- isSelectable: previousById.has(item._id) ? previousById.get(item._id) : item.isSelectable
10176
- }))
9920
+ setupSelectedMenuItemSubscription() {
9921
+ this.selectedMenuItemSubscription.add(this.documentQuery.selectSelectedMenuItem().subscribe(menuItemId => {
9922
+ this.selectedMenuItemId = menuItemId;
10177
9923
  }));
10178
9924
  }
10179
9925
  /**
10180
- * Finds the label of a menu item by its _id
10181
- * @param id The _id to search for
10182
- * @returns The label of the menu item or null if not found
9926
+ * Handles menu item selection events from the documents menu
9927
+ * @param event - The menu item selection event
10183
9928
  */
10184
- findMenuItemLabelById(id) {
10185
- if (!id)
10186
- return null;
10187
- for (const category of this.categories) {
10188
- if (category.items) {
10189
- const item = category.items.find(item => item._id === id);
10190
- if (item) {
10191
- return item.label;
10192
- }
10193
- }
9929
+ onMenuItemSelected(event) {
9930
+ if (event && event.navigationInfo) {
9931
+ this.navigationInfo = event.navigationInfo;
9932
+ // Don't set selectedMenuItemId here - let the store subscription handle it
9933
+ }
9934
+ else {
9935
+ this.navigationInfo = null;
9936
+ // Don't set selectedMenuItemId here - let the store subscription handle it
9937
+ this.resetContentScrollToTop();
10194
9938
  }
10195
- return null;
10196
9939
  }
10197
9940
  /**
10198
- * Finds the category for a menu item by its _id
10199
- * @param id The _id to search for
10200
- * @returns The category or null if not found
9941
+ * Resets the content scroll container to the top
10201
9942
  */
10202
- findMenuItemCategoryById(id) {
10203
- if (!id)
10204
- return null;
10205
- for (const category of this.categories) {
10206
- if (category.items) {
10207
- const item = category.items.find(item => item._id === id);
10208
- if (item) {
10209
- return category;
10210
- }
10211
- }
9943
+ resetContentScrollToTop() {
9944
+ if (this.contentScrollContainer) {
9945
+ this.contentScrollContainer.nativeElement.scrollTo({
9946
+ top: 0,
9947
+ behavior: 'smooth'
9948
+ });
10212
9949
  }
10213
- return null;
10214
9950
  }
10215
9951
  /**
10216
- * Update menu use catagories
9952
+ * Initialize all data with proper sequencing to avoid duplicate API calls
10217
9953
  */
10218
- updateMenuItemsData() {
10219
- this.updateCachedCategories();
10220
- this._cachedCategories.forEach(category => {
10221
- if (category.items) {
10222
- category.items.forEach(item => {
10223
- const menuData = {
10224
- totalDocuments: this.documentMenuService.getTotalDocuments(item),
10225
- approvedDocuments: this.documentMenuService.getApprovedDocuments(item),
10226
- badgeValue: this.documentMenuService.getBadgeValue(item),
10227
- badgeSeverity: this.documentMenuService.getBadgeSeverity(item),
10228
- shouldShowBadge: this.documentMenuService.shouldShowBadge(item)
10229
- };
10230
- item.menuData = menuData;
10231
- // Initialize isSelectable as true (default state)
10232
- if (item.isSelectable === undefined) {
10233
- item.isSelectable = true;
10234
- }
10235
- });
10236
- }
10237
- });
9954
+ initializeData() {
9955
+ this.fetchDocumentCatagories();
9956
+ this.fetchUserListWithFilters();
9957
+ this.setupStatusDataSubscriptions();
9958
+ this.setupFilteredDocumentSubscription();
9959
+ this.documentHelperService.initializeSelectionWatcherWithInitialLoad(this.contextId);
10238
9960
  }
10239
9961
  /**
10240
- * Sets up subscription to document list response to update menu item selectability
9962
+ * Clears all state (store and component) comprehensively
10241
9963
  */
10242
- setupDocumentListResponseSubscription() {
10243
- this.documentListResponseSubscription = this.documentQuery.selectDocumentListResponse().subscribe(documentListResponse => {
10244
- this.updateMenuItemsSelectability(documentListResponse);
10245
- });
9964
+ clearAllState() {
9965
+ this.documentStore.clearSelectionState();
9966
+ // Don't clear document viewer state - let the viewer handle its own cleanup
9967
+ this.documentStore.setDocumentListResponse(null);
9968
+ this.documentStore.setDocumentList([]);
9969
+ this.documentStore.setDocumentCategories([]);
9970
+ this.documentStore.setUserList([]);
9971
+ this.documentStore.setStatusData([]);
9972
+ this.documentStore.setCurrentDocument(null);
9973
+ this.documentStore.setFolders([]);
9974
+ this.documentStore.setDocumentAlert(null);
9975
+ this.catagories = SHARED.EMPTY_ARRAY;
9976
+ this.userList = SHARED.EMPTY_ARRAY;
9977
+ this.statusData = [];
9978
+ this.documentListResponse = null;
9979
+ this.applicationNumber = SHARED.EMPTY;
9980
+ this.selectedMenuItemId = null;
9981
+ this.navigationInfo = null;
10246
9982
  }
10247
9983
  /**
10248
- * Updates menu items with selectability status based on filtered document list
10249
- * @param documentListResponse - The filtered document list response
9984
+ * Handles contextId change by clearing all state and refetching data
10250
9985
  */
10251
- updateMenuItemsSelectability(documentListResponse) {
10252
- if (this._cachedCategories && this._cachedCategories.length > 0) {
10253
- // Only update if we have a valid response (not null/undefined)
10254
- // If response is null, keep previous selectability to avoid flicker/reset during refresh
10255
- if (documentListResponse !== null && documentListResponse !== undefined) {
10256
- this._cachedCategories = this.documentMenuService.updateMenuItemsWithSelectabilityStatus(this._cachedCategories, documentListResponse);
10257
- }
10258
- else {
10259
- // Do nothing; preserve existing isSelectable values
10260
- }
9986
+ handleContextIdChange() {
9987
+ if (this.contextId && this.contextId !== SHARED.EMPTY) {
9988
+ this.subscription.unsubscribe();
9989
+ this.subscription = new Subscription();
9990
+ this.documentHelperService.cleanupSelectionWatcher();
9991
+ this.clearAllState();
9992
+ this.initializeData();
10261
9993
  }
10262
9994
  }
10263
9995
  /**
10264
- * Handle the menu item click for navigation
10265
- * @param {*} event - Event
10266
- * @param {DocumentCategoryItem} item - catagory item
9996
+ * Sets up subscriptions to monitor menu item and user selection changes
9997
+ * to trigger status data fetching and user list refreshing
10267
9998
  */
10268
- onMenuItemClick(event, item) {
10269
- // Prevent selection if the menu item is not selectable
10270
- if (item.isSelectable === false) {
10271
- event.preventDefault();
10272
- event.stopPropagation();
10273
- return;
10274
- }
10275
- if (this.selectedMenuItemId === item._id) {
10276
- this.selectedMenuItem = null;
10277
- this.selectedMenuItemId = null;
10278
- this.documentStore.setSelectedMenuItem(null);
10279
- this.menuItemSelected.emit({
10280
- item: item,
10281
- category: this.findMenuItemCategoryById(item._id),
10282
- navigationInfo: undefined
10283
- });
10284
- }
10285
- else {
10286
- this.selectedMenuItem = item.label;
10287
- this.selectedMenuItemId = item._id;
10288
- this.documentStore.setSelectedMenuItem(item._id);
10289
- const category = this.findMenuItemCategoryById(item._id);
10290
- if (category) {
10291
- this.menuItemSelected.emit({
10292
- item: item,
10293
- category: category,
10294
- navigationInfo: {
10295
- menuItemId: item._id,
10296
- menuItemLabel: item.label,
10297
- categoryLabel: category.label,
10298
- categoryIndex: this.categories.findIndex(cat => cat === category)
10299
- }
10300
- });
9999
+ setupStatusDataSubscriptions() {
10000
+ this.subscription.add(this.documentQuery.selectSelectedUserId().subscribe(userId => {
10001
+ this.fetchStatusData();
10002
+ if (this.catagories.length > 0) {
10003
+ this.fetchUserListWithFilters();
10004
+ }
10005
+ }));
10006
+ this.subscription.add(this.documentQuery.selectSelectedStatus().subscribe(status => {
10007
+ this.fetchStatusData();
10008
+ if (this.catagories.length > 0) {
10009
+ this.fetchUserListWithFilters();
10301
10010
  }
10011
+ }));
10012
+ this.fetchStatusData();
10013
+ }
10014
+ onDocumentSelectedInNewTab(event) {
10015
+ // Call callback first if provided (preserves user gesture chain)
10016
+ if (this.onOpenInNewTab && typeof this.onOpenInNewTab === 'function') {
10017
+ this.onOpenInNewTab(event);
10302
10018
  }
10019
+ this.selectedDocumentInNewTab.emit(event);
10303
10020
  }
10304
10021
  /**
10305
- * Get the selected menu item
10306
- * @returns {string | null} - The selected menu item
10022
+ * Fetches status data based on current selections
10307
10023
  */
10308
- getSelectedMenuItem() {
10309
- return this.selectedMenuItem;
10024
+ fetchStatusData() {
10025
+ if (!this.contextId) {
10026
+ console.warn(ERRORS.CONTEXT_ID_REQUIRED);
10027
+ return;
10028
+ }
10029
+ const currentState = this.documentQuery.getSelectionState();
10030
+ const contextId = currentState.userId || null;
10031
+ this.documentHttpService.getStatusDocumentCount(this.contextId, contextId, null).subscribe({
10032
+ next: (statusData) => {
10033
+ this.statusData = statusData;
10034
+ this.documentStore.setStatusData(statusData);
10035
+ },
10036
+ error: (error) => {
10037
+ console.error(ERRORS.ERROR_FETCHING_STATUS_DATA, error);
10038
+ }
10039
+ });
10310
10040
  }
10311
10041
  /**
10312
- * Handles contextId changes by clearing current selection
10042
+ * Fetches userlist data with current filters applied
10313
10043
  */
10314
- handleContextIdChange() {
10315
- if (this.contextId && this.contextId !== SHARED.EMPTY) {
10316
- this.selectedMenuItem = null;
10317
- this.selectedMenuItemId = null;
10318
- this.documentStore.setSelectedMenuItem(null);
10044
+ fetchUserListWithFilters() {
10045
+ if (!this.contextId) {
10046
+ console.warn(ERRORS.CONTEXT_ID_REQUIRED);
10047
+ return;
10319
10048
  }
10049
+ const currentState = this.documentQuery.getSelectionState();
10050
+ // If the API supports filtering by menu item or status, we can add those parameters
10051
+ this.documentHttpService.getUserListByContextId(this.contextId).subscribe({
10052
+ next: (res) => {
10053
+ this.userList = res;
10054
+ this.documentStore.setUserList(res);
10055
+ },
10056
+ error: (err) => {
10057
+ console.error(ERRORS.ERROR_FETCHING_USER_LIST, err);
10058
+ }
10059
+ });
10320
10060
  }
10321
10061
  /**
10322
- * Get the selected menu item id
10323
- * @returns {string | null} - The selected menu item id
10062
+ * Fetches document catagory data.
10324
10063
  */
10325
- getSelectedMenuItemId() {
10326
- return this.selectedMenuItemId;
10064
+ fetchDocumentCatagories() {
10065
+ const categoriesSubscription = this.documentHttpService.getDocumentCatagories(this.contextId).subscribe({
10066
+ next: (categories) => {
10067
+ if (categories) {
10068
+ this.catagories = categories.categories;
10069
+ this.applicationNumber = categories.applicationNumber;
10070
+ this.documentStore.setDocumentCategories(categories.categories);
10071
+ }
10072
+ },
10073
+ error: (err) => {
10074
+ console.error(ERRORS.ERROR_FETCHING_DOCUMENT_CATEGORIES, err);
10075
+ }
10076
+ });
10077
+ this.subscription.add(categoriesSubscription);
10327
10078
  }
10328
10079
  /**
10329
- * Clean up subscriptions when component is destroyed
10330
- * Prevents memory leaks and ensures proper cleanup
10080
+ * Refetches all data when contextId changes
10081
+ */
10082
+ refetchAllDataForNewContext() {
10083
+ if (this.contextId && this.contextId !== SHARED.EMPTY) {
10084
+ this.documentStore.clearSelectionState();
10085
+ this.documentStore.clearDocumentViewerState();
10086
+ this.fetchDocumentCatagories();
10087
+ this.fetchUserListWithFilters();
10088
+ this.fetchStatusData();
10089
+ this.documentHelperService.initializeSelectionWatcherWithInitialLoad(this.contextId);
10090
+ }
10091
+ }
10092
+ /**
10093
+ * Sets up subscription to listen for filtered document responses
10094
+ */
10095
+ setupFilteredDocumentSubscription() {
10096
+ this.subscription.add(this.documentQuery.selectDocumentListResponse().subscribe({
10097
+ next: (response) => {
10098
+ this.documentListResponse = response;
10099
+ },
10100
+ error: (error) => {
10101
+ console.error(ERRORS.ERROR_RECEIVING_DOCUMENT_LIST, error);
10102
+ }
10103
+ }));
10104
+ }
10105
+ onDocumentSelected(document) {
10106
+ console.log('Document selected:', document);
10107
+ this.selectedDocument.emit(document);
10108
+ }
10109
+ /**
10110
+ * Unsubscribe subscription on destroy of component and clean up state.
10331
10111
  */
10332
10112
  ngOnDestroy() {
10113
+ if (this.subscription) {
10114
+ this.subscription.unsubscribe();
10115
+ }
10333
10116
  if (this.selectedMenuItemSubscription) {
10334
10117
  this.selectedMenuItemSubscription.unsubscribe();
10335
10118
  }
10336
- if (this.documentCategoriesSubscription) {
10337
- this.documentCategoriesSubscription.unsubscribe();
10338
- }
10339
- if (this.documentListResponseSubscription) {
10340
- this.documentListResponseSubscription.unsubscribe();
10341
- }
10119
+ this.documentHelperService.cleanupSelectionWatcher();
10120
+ this.clearAllState();
10342
10121
  }
10343
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentsMenuComponent, deps: [{ token: DocumentStore }, { token: DocumentQuery }, { token: DocumentMenuService }, { token: DocumentHelperService }], target: i0.ɵɵFactoryTarget.Component });
10344
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentsMenuComponent, isStandalone: false, selector: "lib-documents-menu", inputs: { catagories: "catagories", applicationNumber: "applicationNumber", contextId: "contextId" }, outputs: { menuItemSelected: "menuItemSelected" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-sidebar-container\">\r\n <!-- Menu items are now used for navigation to specific sections, not for filtering documents -->\r\n <p-card class=\"widget-menu-wrapper h-full\">\r\n @if(applicationNumber){\r\n <div class=\"flex align-items-center justify-content-between widget-menu-header-wrapper\">\r\n <p class=\"mb-0 application-title-wrapper\">ID - {{applicationNumber}}</p>\r\n </div>\r\n }\r\n\r\n <div class=\"widget-menu-container\" >\r\n <div class=\"widget-menu-wrapper h-ful l custom-scroll\">\r\n <p-menu [model]=\"categories\" styleClass=\"w-full md:w-15rem\">\r\n <ng-template pTemplate=\"submenuheader\" let-item>\r\n <span [style]=\"{\r\n color : '#9EA0B3'\r\n }\">{{ item.label }} Documents</span>\r\n </ng-template>\r\n <ng-template pTemplate=\"item\" let-item>\r\n <a pRipple \r\n class=\"flex align-items-center p-menuitem-link\"\r\n [class.selected-menu-item]=\"selectedMenuItemId === item._id\"\r\n [class.disabled-menu-item]=\"item.isSelectable === false\"\r\n [class.pointer-events-none]=\"item.isSelectable === false\"\r\n [style.opacity]=\"item.isSelectable === false ? '0.5' : '1'\"\r\n [style.cursor]=\"item.isSelectable === false ? 'not-allowed' : 'pointer'\"\r\n (click)=\"onMenuItemClick($event, item)\">\r\n <span [class]=\"item.icon\" class=\"text-xl\"></span>\r\n <span class=\"ml-2\">{{ item.label }}</span>\r\n <p-badge *ngIf=\"item.menuData?.shouldShowBadge\" \r\n class=\"ml-auto\" \r\n [severity]=\"item.menuData?.badgeSeverity\" \r\n [value]=\"item.menuData?.badgeValue\" />\r\n </a>\r\n </ng-template>\r\n </p-menu>\r\n </div>\r\n </div>\r\n </p-card>\r\n</div>\r\n\r\n ", styles: [".expand-icon-wrapper{border:1px solid var(--primary-color);height:24px;width:24px;border-radius:50%;background:var(--blue-bg-light)}::ng-deep .p-badge.p-badge-success{background-color:#dcfce7;color:#16a34a;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-danger{background-color:#fee2e2;color:#dc2626;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-info{background-color:#e5e7eb;color:#000;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-menu .p-menuitem>.p-menuitem-content .p-menuitem-link{color:#1f2937}@media screen and (min-width: 768px){::ng-deep .md\\:w-15rem{width:100%!important}}::ng-deep .p-menu{border:none}::ng-deep .custom-scroll{scrollbar-gutter:inherit}::ng-deep .selected-menu-item{background-color:#0066ff1a!important;color:var(--primary-color)!important;border:1px solid rgba(68,72,109,.1)!important;border-radius:10px!important}::ng-deep .selected-menu-item .text-xl{color:var(--primary-color)!important}::ng-deep .disabled-menu-item{opacity:.5!important;cursor:not-allowed!important;pointer-events:none!important}::ng-deep .disabled-menu-item .text-xl{color:#9ea0b3!important}::ng-deep .disabled-menu-item .ml-2{color:#9ea0b3!important}::ng-deep .disabled-menu-item .p-badge{opacity:.5!important}::ng-deep .p-menuitem-link:not(.selected-menu-item){background-color:#fff!important;border:none!important;border-radius:0!important}::ng-deep .p-menuitem-link:not(.selected-menu-item) .text-xl{color:var(--text-color)!important}::ng-deep .p-panelmenu .p-panelmenu-content{border:none!important}.application-title-wrapper{color:#9ea0b3;font-weight:500}.widget-menu-wrapper{margin-top:8px}.widget-menu-header-wrapper{padding:4px 4px 4px 16px}.widget-menu-container{overflow-y:auto;overflow-x:hidden}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}::ng-deep .document-sidebar-container .p-card{height:100%;box-shadow:none}::ng-deep .document-sidebar-container .p-card .p-card-content{height:100%;padding:0!important}::ng-deep .document-sidebar-container .p-card .p-card-body{height:100%;width:100%;padding:12px 8px;border-radius:10px;border:1px solid #e5e7eb}::ng-deep .document-sidebar-container .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content{border:none;color:var(--text-color);font-weight:400!important;background-color:var(--surface-0)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action{color:var(--text-color);font-weight:400!important;position:relative;padding:12px}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{position:absolute;right:0;top:16px;margin-right:7px;transform:rotate(90deg)!important;transition:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .company-action-wrapper:not(.p-disabled).p-highlight .p-panelmenu-header-content{margin:12px 0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content{background-color:transparent!important;border-radius:10px;padding:12px;border-bottom:0!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{transform:rotate(180deg)!important;transition:none!important;top:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link{background-color:#fff!important;color:var(--text-color);padding:12px 6px!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);box-shadow:none!important;background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem.p-focus>.p-menuitem-content{background-color:#fff!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem:not(.p-focus)>.p-menuitem-content .p-menuitem-link{background-color:#fff!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item){background-color:#fff!important;border:none!important;border-radius:0!important;color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item) .p-menuitem-icon{color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item) .p-menuitem-text{color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:1px solid rgba(68,72,109,.1)!important;border-top:0!important;border-bottom-left-radius:10px;border-bottom-right-radius:10px}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator{border-top:1px solid rgba(68,72,109,.1)!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}.no-documents-message{padding:12px 16px;text-align:center}.no-documents-message .text-muted{color:#9ea0b3;font-size:14px;font-style:italic}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i9$3.Badge, selector: "p-badge", inputs: ["styleClass", "style", "badgeSize", "severity", "value", "badgeDisabled", "size"] }, { kind: "component", type: i8$3.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "component", type: i9$4.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }] });
10122
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContainerComponent, deps: [{ token: DocumentHttpService }, { token: DocumentHelperService }, { token: DocumentQuery }, { token: DocumentStore }, { token: DocumentMenuService }], target: i0.ɵɵFactoryTarget.Component });
10123
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentContainerComponent, isStandalone: false, selector: "lib-document-container", inputs: { onOpenInNewTab: "onOpenInNewTab", contextId: "contextId" }, outputs: { selectedDocument: "selectedDocument", selectedDocumentInNewTab: "selectedDocumentInNewTab" }, viewQueries: [{ propertyName: "contentScrollContainer", first: true, predicate: ["contentScrollContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"grid m-0 h-full\">\r\n <!-- <div class=\"menu-panel col-12 md:col-2\">\r\n <lib-documents-menu \r\n [catagories]=\"catagories\" \r\n [applicationNumber]=\"applicationNumber\" \r\n [contextId]=\"contextId\"\r\n (menuItemSelected)=\"onMenuItemSelected($event)\">\r\n </lib-documents-menu>\r\n </div> -->\r\n \r\n <div class=\"col-12 md:col-12 p-0 h-full\" #contentScrollContainer>\r\n <div class=\"content-card\">\r\n <lib-folder-container [contextId]=\"contextId\" [userList]=\"userList\" [statusData]=\"statusData\" [categories]=\"catagories\"></lib-folder-container>\r\n </div>\r\n <div class=\"document-list-container\">\r\n <lib-document-list \r\n [contextId]=\"contextId\" \r\n [documentListResponse]=\"documentListResponse\"\r\n [selectedMenuItemId]=\"selectedMenuItemId\"\r\n [navigationInfo]=\"navigationInfo\"\r\n (handleSelectedDocumentInNewTab)=\"onDocumentSelectedInNewTab($event)\"\r\n (handleSelectedDocument)=\"onDocumentSelected($event)\"\r\n >\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n <p-confirmDialog \r\n [style]=\"{width: '25vw'}\" \r\n acceptLabel=\"Yes\"\r\n rejectLabel=\"No\"\r\n appendTo=\"body\"\r\n acceptIcon=\"pi pi-check\"\r\n rejectIcon=\"pi pi-times\">\r\n </p-confirmDialog>\r\n</div>\r\n", styles: [".document-container-layout{display:grid;grid-template-columns:1fr;height:98vh;overflow:auto;position:relative}@media (min-width: 768px){.document-container-layout{grid-template-columns:16.6667% 1fr}}.menu-panel{background-color:#fff;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.menu-panel{position:fixed;left:0;top:0;bottom:0;width:16.6667%}}.menu-panel::-webkit-scrollbar{display:none}.content-panel{display:flex;flex-direction:column;height:98vh;overflow-y:auto;overflow-x:hidden;padding:0;position:relative;z-index:10;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.content-panel{margin-left:16.6667%}}.content-panel::-webkit-scrollbar{display:none}@media (max-width: 1024px){.menu-panel{width:240px}.content-panel{margin-left:240px}}@media (max-width: 768px){.document-container-layout{grid-template-columns:1fr}.menu-panel{position:relative;width:100%;height:200px;border-right:none;border-bottom:1px solid #e5e7eb;z-index:auto}.content-panel{margin-left:0;flex:1}}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}*{scrollbar-width:thin}body,html{height:100%}::ng-deep .p-card{overflow:visible!important}::ng-deep .p-card-body{overflow:visible!important}::ng-deep .p-dialog{z-index:9999!important}::ng-deep .p-dialog-mask{z-index:9998!important}::ng-deep .content-panel .p-card{overflow:visible!important}\n"], dependencies: [{ kind: "component", type: i6$2.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }, { kind: "component", type: FolderContainerComponent, selector: "lib-folder-container", inputs: ["documentList", "folderList", "contextId", "userList", "statusData", "categories"] }, { kind: "component", type: DocumentListComponent, selector: "lib-document-list", inputs: ["contextId", "documentListResponse", "selectedMenuItemId", "navigationInfo", "documentList"], outputs: ["handleSelectedDocumentInNewTab", "handleSelectedDocument"] }] });
10345
10124
  }
10346
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentsMenuComponent, decorators: [{
10125
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContainerComponent, decorators: [{
10347
10126
  type: Component,
10348
- args: [{ selector: 'lib-documents-menu', standalone: false, template: "<div class=\"document-sidebar-container\">\r\n <!-- Menu items are now used for navigation to specific sections, not for filtering documents -->\r\n <p-card class=\"widget-menu-wrapper h-full\">\r\n @if(applicationNumber){\r\n <div class=\"flex align-items-center justify-content-between widget-menu-header-wrapper\">\r\n <p class=\"mb-0 application-title-wrapper\">ID - {{applicationNumber}}</p>\r\n </div>\r\n }\r\n\r\n <div class=\"widget-menu-container\" >\r\n <div class=\"widget-menu-wrapper h-ful l custom-scroll\">\r\n <p-menu [model]=\"categories\" styleClass=\"w-full md:w-15rem\">\r\n <ng-template pTemplate=\"submenuheader\" let-item>\r\n <span [style]=\"{\r\n color : '#9EA0B3'\r\n }\">{{ item.label }} Documents</span>\r\n </ng-template>\r\n <ng-template pTemplate=\"item\" let-item>\r\n <a pRipple \r\n class=\"flex align-items-center p-menuitem-link\"\r\n [class.selected-menu-item]=\"selectedMenuItemId === item._id\"\r\n [class.disabled-menu-item]=\"item.isSelectable === false\"\r\n [class.pointer-events-none]=\"item.isSelectable === false\"\r\n [style.opacity]=\"item.isSelectable === false ? '0.5' : '1'\"\r\n [style.cursor]=\"item.isSelectable === false ? 'not-allowed' : 'pointer'\"\r\n (click)=\"onMenuItemClick($event, item)\">\r\n <span [class]=\"item.icon\" class=\"text-xl\"></span>\r\n <span class=\"ml-2\">{{ item.label }}</span>\r\n <p-badge *ngIf=\"item.menuData?.shouldShowBadge\" \r\n class=\"ml-auto\" \r\n [severity]=\"item.menuData?.badgeSeverity\" \r\n [value]=\"item.menuData?.badgeValue\" />\r\n </a>\r\n </ng-template>\r\n </p-menu>\r\n </div>\r\n </div>\r\n </p-card>\r\n</div>\r\n\r\n ", styles: [".expand-icon-wrapper{border:1px solid var(--primary-color);height:24px;width:24px;border-radius:50%;background:var(--blue-bg-light)}::ng-deep .p-badge.p-badge-success{background-color:#dcfce7;color:#16a34a;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-danger{background-color:#fee2e2;color:#dc2626;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-info{background-color:#e5e7eb;color:#000;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-menu .p-menuitem>.p-menuitem-content .p-menuitem-link{color:#1f2937}@media screen and (min-width: 768px){::ng-deep .md\\:w-15rem{width:100%!important}}::ng-deep .p-menu{border:none}::ng-deep .custom-scroll{scrollbar-gutter:inherit}::ng-deep .selected-menu-item{background-color:#0066ff1a!important;color:var(--primary-color)!important;border:1px solid rgba(68,72,109,.1)!important;border-radius:10px!important}::ng-deep .selected-menu-item .text-xl{color:var(--primary-color)!important}::ng-deep .disabled-menu-item{opacity:.5!important;cursor:not-allowed!important;pointer-events:none!important}::ng-deep .disabled-menu-item .text-xl{color:#9ea0b3!important}::ng-deep .disabled-menu-item .ml-2{color:#9ea0b3!important}::ng-deep .disabled-menu-item .p-badge{opacity:.5!important}::ng-deep .p-menuitem-link:not(.selected-menu-item){background-color:#fff!important;border:none!important;border-radius:0!important}::ng-deep .p-menuitem-link:not(.selected-menu-item) .text-xl{color:var(--text-color)!important}::ng-deep .p-panelmenu .p-panelmenu-content{border:none!important}.application-title-wrapper{color:#9ea0b3;font-weight:500}.widget-menu-wrapper{margin-top:8px}.widget-menu-header-wrapper{padding:4px 4px 4px 16px}.widget-menu-container{overflow-y:auto;overflow-x:hidden}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}::ng-deep .document-sidebar-container .p-card{height:100%;box-shadow:none}::ng-deep .document-sidebar-container .p-card .p-card-content{height:100%;padding:0!important}::ng-deep .document-sidebar-container .p-card .p-card-body{height:100%;width:100%;padding:12px 8px;border-radius:10px;border:1px solid #e5e7eb}::ng-deep .document-sidebar-container .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content{border:none;color:var(--text-color);font-weight:400!important;background-color:var(--surface-0)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action{color:var(--text-color);font-weight:400!important;position:relative;padding:12px}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{position:absolute;right:0;top:16px;margin-right:7px;transform:rotate(90deg)!important;transition:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .company-action-wrapper:not(.p-disabled).p-highlight .p-panelmenu-header-content{margin:12px 0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content{background-color:transparent!important;border-radius:10px;padding:12px;border-bottom:0!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{transform:rotate(180deg)!important;transition:none!important;top:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link{background-color:#fff!important;color:var(--text-color);padding:12px 6px!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);box-shadow:none!important;background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem.p-focus>.p-menuitem-content{background-color:#fff!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem:not(.p-focus)>.p-menuitem-content .p-menuitem-link{background-color:#fff!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item){background-color:#fff!important;border:none!important;border-radius:0!important;color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item) .p-menuitem-icon{color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item) .p-menuitem-text{color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:1px solid rgba(68,72,109,.1)!important;border-top:0!important;border-bottom-left-radius:10px;border-bottom-right-radius:10px}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator{border-top:1px solid rgba(68,72,109,.1)!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}.no-documents-message{padding:12px 16px;text-align:center}.no-documents-message .text-muted{color:#9ea0b3;font-size:14px;font-style:italic}\n"] }]
10349
- }], ctorParameters: () => [{ type: DocumentStore }, { type: DocumentQuery }, { type: DocumentMenuService }, { type: DocumentHelperService }], propDecorators: { catagories: [{
10350
- type: Input
10351
- }], applicationNumber: [{
10127
+ args: [{ selector: 'lib-document-container', standalone: false, template: "<div class=\"grid m-0 h-full\">\r\n <!-- <div class=\"menu-panel col-12 md:col-2\">\r\n <lib-documents-menu \r\n [catagories]=\"catagories\" \r\n [applicationNumber]=\"applicationNumber\" \r\n [contextId]=\"contextId\"\r\n (menuItemSelected)=\"onMenuItemSelected($event)\">\r\n </lib-documents-menu>\r\n </div> -->\r\n \r\n <div class=\"col-12 md:col-12 p-0 h-full\" #contentScrollContainer>\r\n <div class=\"content-card\">\r\n <lib-folder-container [contextId]=\"contextId\" [userList]=\"userList\" [statusData]=\"statusData\" [categories]=\"catagories\"></lib-folder-container>\r\n </div>\r\n <div class=\"document-list-container\">\r\n <lib-document-list \r\n [contextId]=\"contextId\" \r\n [documentListResponse]=\"documentListResponse\"\r\n [selectedMenuItemId]=\"selectedMenuItemId\"\r\n [navigationInfo]=\"navigationInfo\"\r\n (handleSelectedDocumentInNewTab)=\"onDocumentSelectedInNewTab($event)\"\r\n (handleSelectedDocument)=\"onDocumentSelected($event)\"\r\n >\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n <p-confirmDialog \r\n [style]=\"{width: '25vw'}\" \r\n acceptLabel=\"Yes\"\r\n rejectLabel=\"No\"\r\n appendTo=\"body\"\r\n acceptIcon=\"pi pi-check\"\r\n rejectIcon=\"pi pi-times\">\r\n </p-confirmDialog>\r\n</div>\r\n", styles: [".document-container-layout{display:grid;grid-template-columns:1fr;height:98vh;overflow:auto;position:relative}@media (min-width: 768px){.document-container-layout{grid-template-columns:16.6667% 1fr}}.menu-panel{background-color:#fff;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.menu-panel{position:fixed;left:0;top:0;bottom:0;width:16.6667%}}.menu-panel::-webkit-scrollbar{display:none}.content-panel{display:flex;flex-direction:column;height:98vh;overflow-y:auto;overflow-x:hidden;padding:0;position:relative;z-index:10;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.content-panel{margin-left:16.6667%}}.content-panel::-webkit-scrollbar{display:none}@media (max-width: 1024px){.menu-panel{width:240px}.content-panel{margin-left:240px}}@media (max-width: 768px){.document-container-layout{grid-template-columns:1fr}.menu-panel{position:relative;width:100%;height:200px;border-right:none;border-bottom:1px solid #e5e7eb;z-index:auto}.content-panel{margin-left:0;flex:1}}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}*{scrollbar-width:thin}body,html{height:100%}::ng-deep .p-card{overflow:visible!important}::ng-deep .p-card-body{overflow:visible!important}::ng-deep .p-dialog{z-index:9999!important}::ng-deep .p-dialog-mask{z-index:9998!important}::ng-deep .content-panel .p-card{overflow:visible!important}\n"] }]
10128
+ }], ctorParameters: () => [{ type: DocumentHttpService }, { type: DocumentHelperService }, { type: DocumentQuery }, { type: DocumentStore }, { type: DocumentMenuService }], propDecorators: { onOpenInNewTab: [{
10352
10129
  type: Input
10130
+ }], contentScrollContainer: [{
10131
+ type: ViewChild,
10132
+ args: ['contentScrollContainer', { static: false }]
10133
+ }], selectedDocument: [{
10134
+ type: Output
10135
+ }], selectedDocumentInNewTab: [{
10136
+ type: Output
10353
10137
  }], contextId: [{
10354
10138
  type: Input
10355
- }], menuItemSelected: [{
10356
- type: Output
10357
10139
  }] } });
10358
10140
 
10359
10141
  /**
10360
- *This component is responsible for managing and displaying a list of documents.
10361
- * @class DocumentContainerComponent
10362
- * @typedef {DocumentContainerComponent}
10142
+ * The `FolderBlockComponent` is responsible for displaying a block of folders and
10143
+ * providing filtering functionality based on folder IDs.
10144
+ *
10145
+ * It uses data from the `DocumentStore` and constants from the `SHARED` configuration
10146
+ * to display missing and pending file counts.
10363
10147
  */
10364
- class DocumentContainerComponent {
10365
- documentHttpService;
10366
- documentHelperService;
10367
- documentQuery;
10148
+ class FolderBlockComponent {
10368
10149
  documentStore;
10369
- documentMenuService;
10370
- /**
10371
- * The document list response data
10372
- * @type {DocumentListResponse[] | null}
10373
- */
10374
- documentListResponse = null;
10375
- /**
10376
- * Status data for the current selection
10377
- * @type {StatusDataModel[]}
10378
- */
10379
- statusData = [];
10380
- /**
10381
- * The currently selected menu item ID for scrolling
10382
- */
10383
- selectedMenuItemId = null;
10384
- onOpenInNewTab;
10385
- /**
10386
- * Additional navigation information for better scrolling
10387
- */
10388
- navigationInfo = null;
10389
- /**
10390
- * Reference to the content scroll container
10391
- */
10392
- contentScrollContainer;
10393
- selectedDocument = new EventEmitter();
10394
- selectedDocumentInNewTab = new EventEmitter();
10395
10150
  /**
10396
- * Subscription to track selected menu item changes
10151
+ * Array of folder blocks data to display.
10152
+ * Each folder is represented as a `FolderBlockModel`.
10397
10153
  */
10398
- selectedMenuItemSubscription = new Subscription();
10154
+ folderList = SHARED.EMPTY_ARRAY;
10155
+ /** Number of missing files, sourced from the `SHARED` constants. */
10156
+ missingFileCount = SHARED.MISSINGCOUNT;
10157
+ /** Number of pending files, sourced from the `SHARED` constants. */
10158
+ pendingFileCount = SHARED.PENDINGCOUNT;
10399
10159
  /**
10400
- * Creates an instance of DocumentContainerComponent.
10401
- * @param {DocumentHttpService} documentHttpService - Service for HTTP operations
10402
- * @param {DocumentHelperService} documentHelperService - Service for document operations
10403
- * @param {DocumentQuery} documentQuery - Query service for document state
10404
- * @param {DocumentStore} documentStore - Store service for document state
10405
- * @param {DocumentMenuService} documentMenuService - Service for menu operations
10160
+ * Injects the `DocumentStore` service to manage and access document-related state.
10161
+ * @param {DocumentStore} documentStore - The state management store for documents.
10406
10162
  */
10407
- constructor(documentHttpService, documentHelperService, documentQuery, documentStore, documentMenuService) {
10408
- this.documentHttpService = documentHttpService;
10409
- this.documentHelperService = documentHelperService;
10410
- this.documentQuery = documentQuery;
10163
+ constructor(documentStore) {
10411
10164
  this.documentStore = documentStore;
10412
- this.documentMenuService = documentMenuService;
10413
10165
  }
10414
10166
  /**
10415
- * Get contextId in input.
10416
- * @type {string}
10167
+ * Handles the click event for filtering based on the provided folder ID.
10168
+ * This method validates the folder ID and returns it for further processing.
10169
+ * If the folder ID is not provided, an empty string is returned.
10170
+ * @param {string} folderBlockId - The unique identifier of the folder to filter by.
10171
+ * @returns {string} The validated folder ID, or an empty string if the input is invalid.
10417
10172
  */
10418
- contextId = SHARED.EMPTY;
10173
+ handleClickForFilter(folderBlockId) {
10174
+ if (!folderBlockId) {
10175
+ return SHARED.EMPTY;
10176
+ }
10177
+ this.documentStore.setParentDocumentTypeId(folderBlockId);
10178
+ return folderBlockId;
10179
+ }
10180
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FolderBlockComponent, deps: [{ token: DocumentStore }], target: i0.ɵɵFactoryTarget.Component });
10181
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FolderBlockComponent, isStandalone: false, selector: "lib-folder-block", inputs: { folderList: "folderList" }, ngImport: i0, template: "<div class=\"card p-0 folder-info\">\r\n <div class=\"text-900 text-xl font-semibold ml-2 mb-1\">Folders</div>\r\n <div class=\"grid m-0\">\r\n <div *ngFor=\"let folder of folderList\" class=\"col-12 md:col-6 xl:col-4 container-wrapper\">\r\n <div\r\n class=\"p-3 border-1 h-full surface-border flex flex-column justify-content-between hover:surface-100 cursor-pointer border-round\"\r\n (click)=\"handleClickForFilter(folder._id)\"\r\n >\r\n <div class=\"icon\">\r\n <img src=\"../../../../assets/images/FolderImg.png\" alt=\"\" />\r\n </div>\r\n <div class=\"flex flex-column\">\r\n <span class=\"text-600 mt-2\"> {{ folder.documentCount }} Files </span>\r\n <span class=\"text-900 text-lg mt-2 mb-2 font-semibold font-medium\">\r\n {{ folder.folderName }}\r\n </span>\r\n </div>\r\n <hr />\r\n <div class=\"flex justify-content-between\">\r\n <div class=\"flex flex-column\">\r\n <span>Missing</span>\r\n <span\r\n [ngClass]=\"{\r\n 'text-pink-500': missingFileCount > 0,\r\n 'text-green-500': missingFileCount === 0\r\n }\"\r\n >\r\n {{ missingFileCount }}\r\n </span>\r\n </div>\r\n <div class=\"flex flex-column\">\r\n <span>Pending</span>\r\n <span\r\n [ngClass]=\"{\r\n 'text-yellow-500': pendingFileCount > 0,\r\n 'text-green-500': pendingFileCount === 0\r\n }\"\r\n >\r\n {{ pendingFileCount }}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".container-wrapper:nth-child(3n+1){padding-left:0}.container-wrapper:nth-child(3n){padding-right:0}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
10182
+ }
10183
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FolderBlockComponent, decorators: [{
10184
+ type: Component,
10185
+ args: [{ selector: 'lib-folder-block', standalone: false, template: "<div class=\"card p-0 folder-info\">\r\n <div class=\"text-900 text-xl font-semibold ml-2 mb-1\">Folders</div>\r\n <div class=\"grid m-0\">\r\n <div *ngFor=\"let folder of folderList\" class=\"col-12 md:col-6 xl:col-4 container-wrapper\">\r\n <div\r\n class=\"p-3 border-1 h-full surface-border flex flex-column justify-content-between hover:surface-100 cursor-pointer border-round\"\r\n (click)=\"handleClickForFilter(folder._id)\"\r\n >\r\n <div class=\"icon\">\r\n <img src=\"../../../../assets/images/FolderImg.png\" alt=\"\" />\r\n </div>\r\n <div class=\"flex flex-column\">\r\n <span class=\"text-600 mt-2\"> {{ folder.documentCount }} Files </span>\r\n <span class=\"text-900 text-lg mt-2 mb-2 font-semibold font-medium\">\r\n {{ folder.folderName }}\r\n </span>\r\n </div>\r\n <hr />\r\n <div class=\"flex justify-content-between\">\r\n <div class=\"flex flex-column\">\r\n <span>Missing</span>\r\n <span\r\n [ngClass]=\"{\r\n 'text-pink-500': missingFileCount > 0,\r\n 'text-green-500': missingFileCount === 0\r\n }\"\r\n >\r\n {{ missingFileCount }}\r\n </span>\r\n </div>\r\n <div class=\"flex flex-column\">\r\n <span>Pending</span>\r\n <span\r\n [ngClass]=\"{\r\n 'text-yellow-500': pendingFileCount > 0,\r\n 'text-green-500': pendingFileCount === 0\r\n }\"\r\n >\r\n {{ pendingFileCount }}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".container-wrapper:nth-child(3n+1){padding-left:0}.container-wrapper:nth-child(3n){padding-right:0}\n"] }]
10186
+ }], ctorParameters: () => [{ type: DocumentStore }], propDecorators: { folderList: [{
10187
+ type: Input
10188
+ }] } });
10189
+
10190
+ /**
10191
+ * DocumentListItemComponent
10192
+ *
10193
+ * This component displays individual document items within a list.
10194
+ * It accepts a list of documents as input and handles interactions with documents.
10195
+ */
10196
+ class DocumentListItemComponent {
10419
10197
  /**
10420
- * The list of folders.
10421
- * @type {Array}
10198
+ * Emit the selected document.
10199
+ * @type {EventEmitter<DocumentModel>}
10422
10200
  */
10423
- applicationNumber = SHARED.EMPTY;
10424
- catagories = SHARED.EMPTY_ARRAY;
10425
- userList = SHARED.EMPTY_ARRAY;
10201
+ documentClick = new EventEmitter();
10426
10202
  /**
10427
- * Holds the subscription to manage observable cleanup.
10428
- * @type {Subscription}
10203
+ * The document to display.
10204
+ * @type {DocumentModel[]}
10429
10205
  */
10430
- subscription = new Subscription();
10206
+ document;
10431
10207
  /**
10432
- * Handles changes to input properties
10208
+ * Handles interactions with a document.
10209
+ * @param {DocumentModel} document - The document to be opened or interacted with.
10433
10210
  */
10434
- ngOnChanges(changes) {
10435
- if (changes[SHARED.CONTEXT_ID] && !changes[SHARED.CONTEXT_ID].firstChange) {
10436
- this.handleContextIdChange();
10211
+ handleOpenDocument(document) {
10212
+ if (!document) {
10213
+ console.error('Error: Document is null or undefined:', document);
10214
+ return;
10437
10215
  }
10216
+ this.documentClick.emit(document);
10438
10217
  }
10218
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10219
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentListItemComponent, isStandalone: false, selector: "lib-document-list-item", inputs: { document: "document" }, outputs: { documentClick: "documentClick" }, ngImport: i0, template: "<div class=\"grid m-0\">\r\n <div\r\n class=\"col-12 flex align-items-center justify-content-between md:col-12 xl:col-12\"\r\n >\r\n <div\r\n class=\"col-5 flex cursor-pointer align-items-center pl-0\"\r\n (click)=\"handleOpenDocument(document)\"\r\n >\r\n <img src=\"../../../../assets/images/Frame.png\" alt=\"\" />\r\n <span class=\"ml-4 file-name-wrapper document-text-wrapper\">{{ document.fileName }}</span>\r\n </div>\r\n <div class=\"col-4 flex align-items-center justify-content-center\">\r\n <span\r\n [class]=\"'product-badge status-' + document.status?.toLowerCase()\"\r\n class=\"flex align-items-center justify-content-center pl-2 pr-2 pt-1 pb-1\"\r\n >\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'pending'\">\r\n <i class=\"pi pi-clock pr-1\" style=\"font-size: 12px;\"></i>\r\n Pending\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'verified'\">\r\n <i class=\"pi pi-check-circle pr-1\" style=\"font-size: 12px;\"></i>\r\n Verified\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'alert'\">\r\n <i class=\"pi pi-bell pr-1\" style=\"font-size: 12px;\"></i>\r\n Alert\r\n </ng-container>\r\n </span>\r\n </div>\r\n <div class=\"document-type file-name-wrapper document-text-wrapper\">\r\n {{document.documentTypeName}}\r\n </div>\r\n </div>\r\n </div>\r\n ", styles: [".product-badge.status-pending{background:#e9b127;color:#fff;border-radius:4px}.product-badge.status-verified{background:#4caf50;color:#fff;border-radius:4px}.product-badge.status-alert{background:#f57c00;color:#fff;border-radius:4px}.product-badge{text-transform:none;font-weight:500;font-size:12px}.file-name-wrapper{font-size:15px;font-weight:500}.document-text-wrapper{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
10220
+ }
10221
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListItemComponent, decorators: [{
10222
+ type: Component,
10223
+ args: [{ selector: 'lib-document-list-item', standalone: false, template: "<div class=\"grid m-0\">\r\n <div\r\n class=\"col-12 flex align-items-center justify-content-between md:col-12 xl:col-12\"\r\n >\r\n <div\r\n class=\"col-5 flex cursor-pointer align-items-center pl-0\"\r\n (click)=\"handleOpenDocument(document)\"\r\n >\r\n <img src=\"../../../../assets/images/Frame.png\" alt=\"\" />\r\n <span class=\"ml-4 file-name-wrapper document-text-wrapper\">{{ document.fileName }}</span>\r\n </div>\r\n <div class=\"col-4 flex align-items-center justify-content-center\">\r\n <span\r\n [class]=\"'product-badge status-' + document.status?.toLowerCase()\"\r\n class=\"flex align-items-center justify-content-center pl-2 pr-2 pt-1 pb-1\"\r\n >\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'pending'\">\r\n <i class=\"pi pi-clock pr-1\" style=\"font-size: 12px;\"></i>\r\n Pending\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'verified'\">\r\n <i class=\"pi pi-check-circle pr-1\" style=\"font-size: 12px;\"></i>\r\n Verified\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'alert'\">\r\n <i class=\"pi pi-bell pr-1\" style=\"font-size: 12px;\"></i>\r\n Alert\r\n </ng-container>\r\n </span>\r\n </div>\r\n <div class=\"document-type file-name-wrapper document-text-wrapper\">\r\n {{document.documentTypeName}}\r\n </div>\r\n </div>\r\n </div>\r\n ", styles: [".product-badge.status-pending{background:#e9b127;color:#fff;border-radius:4px}.product-badge.status-verified{background:#4caf50;color:#fff;border-radius:4px}.product-badge.status-alert{background:#f57c00;color:#fff;border-radius:4px}.product-badge{text-transform:none;font-weight:500;font-size:12px}.file-name-wrapper{font-size:15px;font-weight:500}.document-text-wrapper{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}\n"] }]
10224
+ }], propDecorators: { documentClick: [{
10225
+ type: Output
10226
+ }], document: [{
10227
+ type: Input
10228
+ }] } });
10229
+
10230
+ /**
10231
+ * GlobalErrorHandler is a custom error handler that implements the ErrorHandler interface.
10232
+ * It is used to handle both HTTP errors and other types of errors globally in the application.
10233
+ * @class
10234
+ * @implements {ErrorHandler}
10235
+ * @decorator {Injectable}
10236
+ */
10237
+ class GlobalErrorHandler {
10238
+ injector;
10439
10239
  /**
10440
- * Initializes the component
10240
+ * Creates an instance of GlobalErrorHandler.
10241
+ * @constructor
10242
+ * @param {Injector} injector - The Angular injector used to get instances of services.
10441
10243
  */
10442
- ngOnInit() {
10443
- this.clearAllState();
10444
- if (this.contextId && this.contextId !== SHARED.EMPTY) {
10445
- this.initializeData();
10446
- }
10447
- this.setupSelectedMenuItemSubscription();
10244
+ constructor(injector) {
10245
+ this.injector = injector;
10448
10246
  }
10449
10247
  /**
10450
- * Sets up subscription to track selected menu item changes
10248
+ * Handles errors globally in the application.
10249
+ *
10250
+ * @param {any} error - The error object that needs to be handled.
10251
+ * @returns {void}
10451
10252
  */
10452
- setupSelectedMenuItemSubscription() {
10453
- this.selectedMenuItemSubscription.add(this.documentQuery.selectSelectedMenuItem().subscribe(menuItemId => {
10454
- this.selectedMenuItemId = menuItemId;
10455
- }));
10253
+ handleError(error) {
10254
+ console.error('GlobalErrorHandler:', error);
10456
10255
  }
10256
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GlobalErrorHandler, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
10257
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GlobalErrorHandler });
10258
+ }
10259
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GlobalErrorHandler, decorators: [{
10260
+ type: Injectable
10261
+ }], ctorParameters: () => [{ type: i0.Injector }] });
10262
+
10263
+ /**
10264
+ * Directive to display the document data
10265
+ */
10266
+ class DocumentDirective {
10267
+ documentService;
10268
+ templateRef;
10269
+ vcr;
10457
10270
  /**
10458
- * Handles menu item selection events from the documents menu
10459
- * @param event - The menu item selection event
10460
- */
10461
- onMenuItemSelected(event) {
10462
- if (event && event.navigationInfo) {
10463
- this.navigationInfo = event.navigationInfo;
10464
- // Don't set selectedMenuItemId here - let the store subscription handle it
10465
- }
10466
- else {
10467
- this.navigationInfo = null;
10468
- // Don't set selectedMenuItemId here - let the store subscription handle it
10469
- this.resetContentScrollToTop();
10470
- }
10271
+ * Creates an instance of DocumentDirective.
10272
+ * @param documentService Service to get the document data.
10273
+ * @param templateRef Reference to the template.
10274
+ * @param vcr View container reference to manage the view.
10275
+ */
10276
+ constructor(documentService, templateRef, vcr) {
10277
+ this.documentService = documentService;
10278
+ this.templateRef = templateRef;
10279
+ this.vcr = vcr;
10280
+ this.documentService.get().subscribe((document) => {
10281
+ this.vcr.clear();
10282
+ if (document) {
10283
+ this.vcr.createEmbeddedView(this.templateRef, { $implicit: document });
10284
+ }
10285
+ });
10471
10286
  }
10287
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentDirective, deps: [{ token: DocumentHelperService }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
10288
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.14", type: DocumentDirective, isStandalone: false, selector: "[doc]", ngImport: i0 });
10289
+ }
10290
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentDirective, decorators: [{
10291
+ type: Directive,
10292
+ args: [{
10293
+ selector: '[doc]',
10294
+ standalone: false
10295
+ }]
10296
+ }], ctorParameters: () => [{ type: DocumentHelperService }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }] });
10297
+
10298
+ /**
10299
+ * Description placeholder
10300
+ * @class LinkedDocumentComponent
10301
+ * @typedef {LinkedDocumentComponent}
10302
+ * @implements {OnChanges}
10303
+ */
10304
+ class LinkedDocumentComponent {
10472
10305
  /**
10473
- * Resets the content scroll container to the top
10306
+ * Selected document for view.
10307
+ * @type {?DocumentModel}
10474
10308
  */
10475
- resetContentScrollToTop() {
10476
- if (this.contentScrollContainer) {
10477
- this.contentScrollContainer.nativeElement.scrollTo({
10478
- top: 0,
10479
- behavior: 'smooth'
10480
- });
10481
- }
10482
- }
10309
+ selectedDocument;
10483
10310
  /**
10484
- * Initialize all data with proper sequencing to avoid duplicate API calls
10311
+ * Whole document list.
10312
+ * @type {?DocumentModel[]}
10485
10313
  */
10486
- initializeData() {
10487
- this.fetchDocumentCatagories();
10488
- this.fetchUserListWithFilters();
10489
- this.setupStatusDataSubscriptions();
10490
- this.setupFilteredDocumentSubscription();
10491
- this.documentHelperService.initializeSelectionWatcherWithInitialLoad(this.contextId);
10492
- }
10314
+ documentList;
10493
10315
  /**
10494
- * Clears all state (store and component) comprehensively
10316
+ * Changed selected document.
10317
+ * @type {*}
10495
10318
  */
10496
- clearAllState() {
10497
- this.documentStore.clearSelectionState();
10498
- // Don't clear document viewer state - let the viewer handle its own cleanup
10499
- this.documentStore.setDocumentListResponse(null);
10500
- this.documentStore.setDocumentList([]);
10501
- this.documentStore.setDocumentCategories([]);
10502
- this.documentStore.setUserList([]);
10503
- this.documentStore.setStatusData([]);
10504
- this.documentStore.setCurrentDocument(null);
10505
- this.documentStore.setFolders([]);
10506
- this.documentStore.setDocumentAlert(null);
10507
- this.catagories = SHARED.EMPTY_ARRAY;
10508
- this.userList = SHARED.EMPTY_ARRAY;
10509
- this.statusData = [];
10510
- this.documentListResponse = null;
10511
- this.applicationNumber = SHARED.EMPTY;
10512
- this.selectedMenuItemId = null;
10513
- this.navigationInfo = null;
10514
- }
10319
+ selectedDocumentChange = new EventEmitter();
10515
10320
  /**
10516
- * Handles contextId change by clearing all state and refetching data
10321
+ * Filtered documents.
10322
+ * @type {DocumentModel[]}
10517
10323
  */
10518
- handleContextIdChange() {
10519
- if (this.contextId && this.contextId !== SHARED.EMPTY) {
10520
- this.subscription.unsubscribe();
10521
- this.subscription = new Subscription();
10522
- this.documentHelperService.cleanupSelectionWatcher();
10523
- this.clearAllState();
10524
- this.initializeData();
10525
- }
10526
- }
10324
+ filteredDocuments = [];
10527
10325
  /**
10528
- * Sets up subscriptions to monitor menu item and user selection changes
10529
- * to trigger status data fetching and user list refreshing
10326
+ * Handle the click on the document.
10327
+ * @param {DocumentModel} document - Clicked document.
10530
10328
  */
10531
- setupStatusDataSubscriptions() {
10532
- this.subscription.add(this.documentQuery.selectSelectedUserId().subscribe(userId => {
10533
- this.fetchStatusData();
10534
- if (this.catagories.length > 0) {
10535
- this.fetchUserListWithFilters();
10536
- }
10537
- }));
10538
- this.subscription.add(this.documentQuery.selectSelectedStatus().subscribe(status => {
10539
- this.fetchStatusData();
10540
- if (this.catagories.length > 0) {
10541
- this.fetchUserListWithFilters();
10542
- }
10543
- }));
10544
- this.fetchStatusData();
10329
+ handleDocumentClick(document) {
10330
+ this.selectedDocument = document;
10331
+ this.selectedDocumentChange.emit(this.selectedDocument);
10545
10332
  }
10546
- onDocumentSelectedInNewTab(event) {
10547
- // Call callback first if provided (preserves user gesture chain)
10548
- if (this.onOpenInNewTab && typeof this.onOpenInNewTab === 'function') {
10549
- this.onOpenInNewTab(event);
10550
- }
10551
- this.selectedDocumentInNewTab.emit(event);
10333
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LinkedDocumentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10334
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", 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"] });
10335
+ }
10336
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LinkedDocumentComponent, decorators: [{
10337
+ type: Component,
10338
+ 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"] }]
10339
+ }], propDecorators: { selectedDocument: [{
10340
+ type: Input
10341
+ }], documentList: [{
10342
+ type: Input
10343
+ }], selectedDocumentChange: [{
10344
+ type: Output
10345
+ }] } });
10346
+
10347
+ class DocumentsMenuComponent {
10348
+ documentStore;
10349
+ documentQuery;
10350
+ documentMenuService;
10351
+ documentHelperService;
10352
+ catagories = SHARED.EMPTY_ARRAY;
10353
+ applicationNumber = SHARED.EMPTY;
10354
+ contextId = SHARED.EMPTY;
10355
+ menuItemSelected = new EventEmitter();
10356
+ selectedMenuItem = null;
10357
+ selectedMenuItemId = null;
10358
+ // Store the categories from the store
10359
+ storeCategories = SHARED.EMPTY_ARRAY;
10360
+ // Cache for categories to avoid repeated processing
10361
+ _cachedCategories = SHARED.EMPTY_ARRAY;
10362
+ // Subscriptions to track for cleanup
10363
+ selectedMenuItemSubscription;
10364
+ documentCategoriesSubscription;
10365
+ documentListResponseSubscription;
10366
+ constructor(documentStore, documentQuery, documentMenuService, documentHelperService) {
10367
+ this.documentStore = documentStore;
10368
+ this.documentQuery = documentQuery;
10369
+ this.documentMenuService = documentMenuService;
10370
+ this.documentHelperService = documentHelperService;
10552
10371
  }
10553
10372
  /**
10554
- * Fetches status data based on current selections
10373
+ * Initialize the component
10374
+ * @returns {void}
10375
+ * @memberof DocumentsMenuComponent
10555
10376
  */
10556
- fetchStatusData() {
10557
- if (!this.contextId) {
10558
- console.warn(ERRORS.CONTEXT_ID_REQUIRED);
10559
- return;
10560
- }
10561
- const currentState = this.documentQuery.getSelectionState();
10562
- const contextId = currentState.userId || null;
10563
- this.documentHttpService.getStatusDocumentCount(this.contextId, contextId, null).subscribe({
10564
- next: (statusData) => {
10565
- this.statusData = statusData;
10566
- this.documentStore.setStatusData(statusData);
10567
- },
10568
- error: (error) => {
10569
- console.error(ERRORS.ERROR_FETCHING_STATUS_DATA, error);
10377
+ ngOnInit() {
10378
+ this.selectedMenuItemSubscription = this.documentQuery.selectSelectedMenuItem().subscribe(menuItemId => {
10379
+ this.selectedMenuItemId = menuItemId;
10380
+ this.selectedMenuItem = this.findMenuItemLabelById(menuItemId);
10381
+ });
10382
+ // Subscribe to document categories from the store
10383
+ this.documentCategoriesSubscription = this.documentQuery.selectDocumentCategories().subscribe(categories => {
10384
+ if (categories && categories.length > 0) {
10385
+ this.storeCategories = categories;
10386
+ this.updateCachedCategories();
10387
+ this.updateMenuItemsData();
10570
10388
  }
10571
10389
  });
10390
+ // Subscribe to document list response to update menu item selectability
10391
+ this.setupDocumentListResponseSubscription();
10572
10392
  }
10573
10393
  /**
10574
- * Fetches userlist data with current filters applied
10394
+ * Handle changes to input properties
10395
+ * @param {SimpleChanges} changes - The changes to the input properties
10396
+ * @returns {void}
10397
+ * @memberof DocumentsMenuComponent
10575
10398
  */
10576
- fetchUserListWithFilters() {
10577
- if (!this.contextId) {
10578
- console.warn(ERRORS.CONTEXT_ID_REQUIRED);
10579
- return;
10399
+ ngOnChanges(changes) {
10400
+ if (changes[SHARED.CATAGORIES] && this.catagories) {
10401
+ this.updateCachedCategories();
10402
+ this.updateMenuItemsData();
10403
+ }
10404
+ if (changes[SHARED.CONTEXT_ID] && !changes[SHARED.CONTEXT_ID].firstChange) {
10405
+ this.handleContextIdChange();
10580
10406
  }
10581
- const currentState = this.documentQuery.getSelectionState();
10582
- // If the API supports filtering by menu item or status, we can add those parameters
10583
- this.documentHttpService.getUserListByContextId(this.contextId).subscribe({
10584
- next: (res) => {
10585
- this.userList = res;
10586
- this.documentStore.setUserList(res);
10587
- },
10588
- error: (err) => {
10589
- console.error(ERRORS.ERROR_FETCHING_USER_LIST, err);
10590
- }
10591
- });
10592
10407
  }
10593
10408
  /**
10594
- * Fetches document catagory data.
10409
+ * Gets the categories to use for the menu
10410
+ * Priority: Store categories > Input categories
10411
+ * Categories maintain their original order as provided by the API
10595
10412
  */
10596
- fetchDocumentCatagories() {
10597
- const categoriesSubscription = this.documentHttpService.getDocumentCatagories(this.contextId).subscribe({
10598
- next: (categories) => {
10599
- if (categories) {
10600
- this.catagories = categories.categories;
10601
- this.applicationNumber = categories.applicationNumber;
10602
- this.documentStore.setDocumentCategories(categories.categories);
10603
- }
10604
- },
10605
- error: (err) => {
10606
- console.error(ERRORS.ERROR_FETCHING_DOCUMENT_CATEGORIES, err);
10607
- }
10608
- });
10609
- this.subscription.add(categoriesSubscription);
10413
+ get categories() {
10414
+ return this._cachedCategories;
10610
10415
  }
10611
10416
  /**
10612
- * Refetches all data when contextId changes
10417
+ * Updates the cached categories when data changes
10418
+ * Maintains the original order as provided by the API
10613
10419
  */
10614
- refetchAllDataForNewContext() {
10615
- if (this.contextId && this.contextId !== SHARED.EMPTY) {
10616
- this.documentStore.clearSelectionState();
10617
- this.documentStore.clearDocumentViewerState();
10618
- this.fetchDocumentCatagories();
10619
- this.fetchUserListWithFilters();
10620
- this.fetchStatusData();
10621
- this.documentHelperService.initializeSelectionWatcherWithInitialLoad(this.contextId);
10622
- }
10623
- }
10420
+ updateCachedCategories() {
10421
+ const nextCategories = this.storeCategories.length > 0 ? this.storeCategories : this.catagories;
10422
+ if (!this._cachedCategories || this._cachedCategories.length === 0) {
10423
+ this._cachedCategories = nextCategories;
10424
+ return;
10425
+ }
10426
+ const previousById = new Map();
10427
+ this._cachedCategories.forEach(category => {
10428
+ category.items?.forEach(item => {
10429
+ if (item.isSelectable !== undefined) {
10430
+ previousById.set(item._id, item.isSelectable);
10431
+ }
10432
+ });
10433
+ });
10434
+ this._cachedCategories = nextCategories.map(category => ({
10435
+ ...category,
10436
+ items: category.items?.map(item => ({
10437
+ ...item,
10438
+ isSelectable: previousById.has(item._id) ? previousById.get(item._id) : item.isSelectable
10439
+ }))
10440
+ }));
10441
+ }
10624
10442
  /**
10625
- * Sets up subscription to listen for filtered document responses
10443
+ * Finds the label of a menu item by its _id
10444
+ * @param id The _id to search for
10445
+ * @returns The label of the menu item or null if not found
10626
10446
  */
10627
- setupFilteredDocumentSubscription() {
10628
- this.subscription.add(this.documentQuery.selectDocumentListResponse().subscribe({
10629
- next: (response) => {
10630
- this.documentListResponse = response;
10631
- },
10632
- error: (error) => {
10633
- console.error(ERRORS.ERROR_RECEIVING_DOCUMENT_LIST, error);
10447
+ findMenuItemLabelById(id) {
10448
+ if (!id)
10449
+ return null;
10450
+ for (const category of this.categories) {
10451
+ if (category.items) {
10452
+ const item = category.items.find(item => item._id === id);
10453
+ if (item) {
10454
+ return item.label;
10455
+ }
10634
10456
  }
10635
- }));
10636
- }
10637
- onDocumentSelected(document) {
10638
- console.log('Document selected:', document);
10639
- this.selectedDocument.emit(document);
10457
+ }
10458
+ return null;
10640
10459
  }
10641
10460
  /**
10642
- * Unsubscribe subscription on destroy of component and clean up state.
10461
+ * Finds the category for a menu item by its _id
10462
+ * @param id The _id to search for
10463
+ * @returns The category or null if not found
10643
10464
  */
10644
- ngOnDestroy() {
10645
- if (this.subscription) {
10646
- this.subscription.unsubscribe();
10647
- }
10648
- if (this.selectedMenuItemSubscription) {
10649
- this.selectedMenuItemSubscription.unsubscribe();
10465
+ findMenuItemCategoryById(id) {
10466
+ if (!id)
10467
+ return null;
10468
+ for (const category of this.categories) {
10469
+ if (category.items) {
10470
+ const item = category.items.find(item => item._id === id);
10471
+ if (item) {
10472
+ return category;
10473
+ }
10474
+ }
10650
10475
  }
10651
- this.documentHelperService.cleanupSelectionWatcher();
10652
- this.clearAllState();
10476
+ return null;
10653
10477
  }
10654
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContainerComponent, deps: [{ token: DocumentHttpService }, { token: DocumentHelperService }, { token: DocumentQuery }, { token: DocumentStore }, { token: DocumentMenuService }], target: i0.ɵɵFactoryTarget.Component });
10655
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentContainerComponent, isStandalone: false, selector: "lib-document-container", inputs: { onOpenInNewTab: "onOpenInNewTab", contextId: "contextId" }, outputs: { selectedDocument: "selectedDocument", selectedDocumentInNewTab: "selectedDocumentInNewTab" }, viewQueries: [{ propertyName: "contentScrollContainer", first: true, predicate: ["contentScrollContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"grid m-0 flex document-container-layout\">\r\n <div class=\"menu-panel col-12 md:col-2\">\r\n <lib-documents-menu \r\n [catagories]=\"catagories\" \r\n [applicationNumber]=\"applicationNumber\" \r\n [contextId]=\"contextId\"\r\n (menuItemSelected)=\"onMenuItemSelected($event)\">\r\n </lib-documents-menu>\r\n </div>\r\n \r\n <div class=\"content-panel col-12 md:col-10\" #contentScrollContainer>\r\n <div class=\"content-card\">\r\n <lib-folder-container [contextId]=\"contextId\" [userList]=\"userList\" [statusData]=\"statusData\" [categories]=\"catagories\"></lib-folder-container>\r\n </div>\r\n <div class=\"document-list-container\">\r\n <lib-document-list \r\n [contextId]=\"contextId\" \r\n [documentListResponse]=\"documentListResponse\"\r\n [selectedMenuItemId]=\"selectedMenuItemId\"\r\n [navigationInfo]=\"navigationInfo\"\r\n (handleSelectedDocumentInNewTab)=\"onDocumentSelectedInNewTab($event)\"\r\n (handleSelectedDocument)=\"onDocumentSelected($event)\"\r\n >\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n <p-confirmDialog \r\n [style]=\"{width: '25vw'}\" \r\n acceptLabel=\"Yes\"\r\n rejectLabel=\"No\"\r\n appendTo=\"body\"\r\n acceptIcon=\"pi pi-check\"\r\n rejectIcon=\"pi pi-times\">\r\n </p-confirmDialog>\r\n</div>\r\n", styles: [".document-container-layout{display:grid;grid-template-columns:1fr;height:98vh;overflow:auto;position:relative}@media (min-width: 768px){.document-container-layout{grid-template-columns:16.6667% 1fr}}.menu-panel{background-color:#fff;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.menu-panel{position:fixed;left:0;top:0;bottom:0;width:16.6667%}}.menu-panel::-webkit-scrollbar{display:none}.content-panel{display:flex;flex-direction:column;height:98vh;overflow-y:auto;overflow-x:hidden;padding:0;position:relative;z-index:10;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.content-panel{margin-left:16.6667%}}.content-panel::-webkit-scrollbar{display:none}@media (max-width: 1024px){.menu-panel{width:240px}.content-panel{margin-left:240px}}@media (max-width: 768px){.document-container-layout{grid-template-columns:1fr}.menu-panel{position:relative;width:100%;height:200px;border-right:none;border-bottom:1px solid #e5e7eb;z-index:auto}.content-panel{margin-left:0;flex:1}}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}*{scrollbar-width:thin}body,html{height:100%}::ng-deep .p-card{overflow:visible!important}::ng-deep .p-card-body{overflow:visible!important}::ng-deep .p-dialog{z-index:9999!important}::ng-deep .p-dialog-mask{z-index:9998!important}::ng-deep .content-panel .p-card{overflow:visible!important}\n"], dependencies: [{ kind: "component", type: i6$2.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }, { kind: "component", type: FolderContainerComponent, selector: "lib-folder-container", inputs: ["documentList", "folderList", "contextId", "userList", "statusData", "categories"] }, { kind: "component", type: DocumentListComponent, selector: "lib-document-list", inputs: ["contextId", "documentListResponse", "selectedMenuItemId", "navigationInfo", "documentList"], outputs: ["handleSelectedDocumentInNewTab", "handleSelectedDocument"] }, { kind: "component", type: DocumentsMenuComponent, selector: "lib-documents-menu", inputs: ["catagories", "applicationNumber", "contextId"], outputs: ["menuItemSelected"] }] });
10656
- }
10657
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContainerComponent, decorators: [{
10658
- type: Component,
10659
- args: [{ selector: 'lib-document-container', standalone: false, template: "<div class=\"grid m-0 flex document-container-layout\">\r\n <div class=\"menu-panel col-12 md:col-2\">\r\n <lib-documents-menu \r\n [catagories]=\"catagories\" \r\n [applicationNumber]=\"applicationNumber\" \r\n [contextId]=\"contextId\"\r\n (menuItemSelected)=\"onMenuItemSelected($event)\">\r\n </lib-documents-menu>\r\n </div>\r\n \r\n <div class=\"content-panel col-12 md:col-10\" #contentScrollContainer>\r\n <div class=\"content-card\">\r\n <lib-folder-container [contextId]=\"contextId\" [userList]=\"userList\" [statusData]=\"statusData\" [categories]=\"catagories\"></lib-folder-container>\r\n </div>\r\n <div class=\"document-list-container\">\r\n <lib-document-list \r\n [contextId]=\"contextId\" \r\n [documentListResponse]=\"documentListResponse\"\r\n [selectedMenuItemId]=\"selectedMenuItemId\"\r\n [navigationInfo]=\"navigationInfo\"\r\n (handleSelectedDocumentInNewTab)=\"onDocumentSelectedInNewTab($event)\"\r\n (handleSelectedDocument)=\"onDocumentSelected($event)\"\r\n >\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n <p-confirmDialog \r\n [style]=\"{width: '25vw'}\" \r\n acceptLabel=\"Yes\"\r\n rejectLabel=\"No\"\r\n appendTo=\"body\"\r\n acceptIcon=\"pi pi-check\"\r\n rejectIcon=\"pi pi-times\">\r\n </p-confirmDialog>\r\n</div>\r\n", styles: [".document-container-layout{display:grid;grid-template-columns:1fr;height:98vh;overflow:auto;position:relative}@media (min-width: 768px){.document-container-layout{grid-template-columns:16.6667% 1fr}}.menu-panel{background-color:#fff;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.menu-panel{position:fixed;left:0;top:0;bottom:0;width:16.6667%}}.menu-panel::-webkit-scrollbar{display:none}.content-panel{display:flex;flex-direction:column;height:98vh;overflow-y:auto;overflow-x:hidden;padding:0;position:relative;z-index:10;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.content-panel{margin-left:16.6667%}}.content-panel::-webkit-scrollbar{display:none}@media (max-width: 1024px){.menu-panel{width:240px}.content-panel{margin-left:240px}}@media (max-width: 768px){.document-container-layout{grid-template-columns:1fr}.menu-panel{position:relative;width:100%;height:200px;border-right:none;border-bottom:1px solid #e5e7eb;z-index:auto}.content-panel{margin-left:0;flex:1}}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}*{scrollbar-width:thin}body,html{height:100%}::ng-deep .p-card{overflow:visible!important}::ng-deep .p-card-body{overflow:visible!important}::ng-deep .p-dialog{z-index:9999!important}::ng-deep .p-dialog-mask{z-index:9998!important}::ng-deep .content-panel .p-card{overflow:visible!important}\n"] }]
10660
- }], ctorParameters: () => [{ type: DocumentHttpService }, { type: DocumentHelperService }, { type: DocumentQuery }, { type: DocumentStore }, { type: DocumentMenuService }], propDecorators: { onOpenInNewTab: [{
10661
- type: Input
10662
- }], contentScrollContainer: [{
10663
- type: ViewChild,
10664
- args: ['contentScrollContainer', { static: false }]
10665
- }], selectedDocument: [{
10666
- type: Output
10667
- }], selectedDocumentInNewTab: [{
10668
- type: Output
10669
- }], contextId: [{
10670
- type: Input
10671
- }] } });
10672
-
10673
- /**
10674
- * The `FolderBlockComponent` is responsible for displaying a block of folders and
10675
- * providing filtering functionality based on folder IDs.
10676
- *
10677
- * It uses data from the `DocumentStore` and constants from the `SHARED` configuration
10678
- * to display missing and pending file counts.
10679
- */
10680
- class FolderBlockComponent {
10681
- documentStore;
10682
10478
  /**
10683
- * Array of folder blocks data to display.
10684
- * Each folder is represented as a `FolderBlockModel`.
10479
+ * Update menu use catagories
10685
10480
  */
10686
- folderList = SHARED.EMPTY_ARRAY;
10687
- /** Number of missing files, sourced from the `SHARED` constants. */
10688
- missingFileCount = SHARED.MISSINGCOUNT;
10689
- /** Number of pending files, sourced from the `SHARED` constants. */
10690
- pendingFileCount = SHARED.PENDINGCOUNT;
10481
+ updateMenuItemsData() {
10482
+ this.updateCachedCategories();
10483
+ this._cachedCategories.forEach(category => {
10484
+ if (category.items) {
10485
+ category.items.forEach(item => {
10486
+ const menuData = {
10487
+ totalDocuments: this.documentMenuService.getTotalDocuments(item),
10488
+ approvedDocuments: this.documentMenuService.getApprovedDocuments(item),
10489
+ badgeValue: this.documentMenuService.getBadgeValue(item),
10490
+ badgeSeverity: this.documentMenuService.getBadgeSeverity(item),
10491
+ shouldShowBadge: this.documentMenuService.shouldShowBadge(item)
10492
+ };
10493
+ item.menuData = menuData;
10494
+ // Initialize isSelectable as true (default state)
10495
+ if (item.isSelectable === undefined) {
10496
+ item.isSelectable = true;
10497
+ }
10498
+ });
10499
+ }
10500
+ });
10501
+ }
10691
10502
  /**
10692
- * Injects the `DocumentStore` service to manage and access document-related state.
10693
- * @param {DocumentStore} documentStore - The state management store for documents.
10503
+ * Sets up subscription to document list response to update menu item selectability
10694
10504
  */
10695
- constructor(documentStore) {
10696
- this.documentStore = documentStore;
10505
+ setupDocumentListResponseSubscription() {
10506
+ this.documentListResponseSubscription = this.documentQuery.selectDocumentListResponse().subscribe(documentListResponse => {
10507
+ this.updateMenuItemsSelectability(documentListResponse);
10508
+ });
10697
10509
  }
10698
10510
  /**
10699
- * Handles the click event for filtering based on the provided folder ID.
10700
- * This method validates the folder ID and returns it for further processing.
10701
- * If the folder ID is not provided, an empty string is returned.
10702
- * @param {string} folderBlockId - The unique identifier of the folder to filter by.
10703
- * @returns {string} The validated folder ID, or an empty string if the input is invalid.
10511
+ * Updates menu items with selectability status based on filtered document list
10512
+ * @param documentListResponse - The filtered document list response
10704
10513
  */
10705
- handleClickForFilter(folderBlockId) {
10706
- if (!folderBlockId) {
10707
- return SHARED.EMPTY;
10514
+ updateMenuItemsSelectability(documentListResponse) {
10515
+ if (this._cachedCategories && this._cachedCategories.length > 0) {
10516
+ // Only update if we have a valid response (not null/undefined)
10517
+ // If response is null, keep previous selectability to avoid flicker/reset during refresh
10518
+ if (documentListResponse !== null && documentListResponse !== undefined) {
10519
+ this._cachedCategories = this.documentMenuService.updateMenuItemsWithSelectabilityStatus(this._cachedCategories, documentListResponse);
10520
+ }
10521
+ else {
10522
+ // Do nothing; preserve existing isSelectable values
10523
+ }
10708
10524
  }
10709
- this.documentStore.setParentDocumentTypeId(folderBlockId);
10710
- return folderBlockId;
10711
10525
  }
10712
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FolderBlockComponent, deps: [{ token: DocumentStore }], target: i0.ɵɵFactoryTarget.Component });
10713
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FolderBlockComponent, isStandalone: false, selector: "lib-folder-block", inputs: { folderList: "folderList" }, ngImport: i0, template: "<div class=\"card p-0 folder-info\">\r\n <div class=\"text-900 text-xl font-semibold ml-2 mb-1\">Folders</div>\r\n <div class=\"grid m-0\">\r\n <div *ngFor=\"let folder of folderList\" class=\"col-12 md:col-6 xl:col-4 container-wrapper\">\r\n <div\r\n class=\"p-3 border-1 h-full surface-border flex flex-column justify-content-between hover:surface-100 cursor-pointer border-round\"\r\n (click)=\"handleClickForFilter(folder._id)\"\r\n >\r\n <div class=\"icon\">\r\n <img src=\"../../../../assets/images/FolderImg.png\" alt=\"\" />\r\n </div>\r\n <div class=\"flex flex-column\">\r\n <span class=\"text-600 mt-2\"> {{ folder.documentCount }} Files </span>\r\n <span class=\"text-900 text-lg mt-2 mb-2 font-semibold font-medium\">\r\n {{ folder.folderName }}\r\n </span>\r\n </div>\r\n <hr />\r\n <div class=\"flex justify-content-between\">\r\n <div class=\"flex flex-column\">\r\n <span>Missing</span>\r\n <span\r\n [ngClass]=\"{\r\n 'text-pink-500': missingFileCount > 0,\r\n 'text-green-500': missingFileCount === 0\r\n }\"\r\n >\r\n {{ missingFileCount }}\r\n </span>\r\n </div>\r\n <div class=\"flex flex-column\">\r\n <span>Pending</span>\r\n <span\r\n [ngClass]=\"{\r\n 'text-yellow-500': pendingFileCount > 0,\r\n 'text-green-500': pendingFileCount === 0\r\n }\"\r\n >\r\n {{ pendingFileCount }}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".container-wrapper:nth-child(3n+1){padding-left:0}.container-wrapper:nth-child(3n){padding-right:0}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
10714
- }
10715
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FolderBlockComponent, decorators: [{
10716
- type: Component,
10717
- args: [{ selector: 'lib-folder-block', standalone: false, template: "<div class=\"card p-0 folder-info\">\r\n <div class=\"text-900 text-xl font-semibold ml-2 mb-1\">Folders</div>\r\n <div class=\"grid m-0\">\r\n <div *ngFor=\"let folder of folderList\" class=\"col-12 md:col-6 xl:col-4 container-wrapper\">\r\n <div\r\n class=\"p-3 border-1 h-full surface-border flex flex-column justify-content-between hover:surface-100 cursor-pointer border-round\"\r\n (click)=\"handleClickForFilter(folder._id)\"\r\n >\r\n <div class=\"icon\">\r\n <img src=\"../../../../assets/images/FolderImg.png\" alt=\"\" />\r\n </div>\r\n <div class=\"flex flex-column\">\r\n <span class=\"text-600 mt-2\"> {{ folder.documentCount }} Files </span>\r\n <span class=\"text-900 text-lg mt-2 mb-2 font-semibold font-medium\">\r\n {{ folder.folderName }}\r\n </span>\r\n </div>\r\n <hr />\r\n <div class=\"flex justify-content-between\">\r\n <div class=\"flex flex-column\">\r\n <span>Missing</span>\r\n <span\r\n [ngClass]=\"{\r\n 'text-pink-500': missingFileCount > 0,\r\n 'text-green-500': missingFileCount === 0\r\n }\"\r\n >\r\n {{ missingFileCount }}\r\n </span>\r\n </div>\r\n <div class=\"flex flex-column\">\r\n <span>Pending</span>\r\n <span\r\n [ngClass]=\"{\r\n 'text-yellow-500': pendingFileCount > 0,\r\n 'text-green-500': pendingFileCount === 0\r\n }\"\r\n >\r\n {{ pendingFileCount }}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".container-wrapper:nth-child(3n+1){padding-left:0}.container-wrapper:nth-child(3n){padding-right:0}\n"] }]
10718
- }], ctorParameters: () => [{ type: DocumentStore }], propDecorators: { folderList: [{
10719
- type: Input
10720
- }] } });
10721
-
10722
- /**
10723
- * DocumentListItemComponent
10724
- *
10725
- * This component displays individual document items within a list.
10726
- * It accepts a list of documents as input and handles interactions with documents.
10727
- */
10728
- class DocumentListItemComponent {
10729
- /**
10730
- * Emit the selected document.
10731
- * @type {EventEmitter<DocumentModel>}
10732
- */
10733
- documentClick = new EventEmitter();
10734
- /**
10735
- * The document to display.
10736
- * @type {DocumentModel[]}
10737
- */
10738
- document;
10739
10526
  /**
10740
- * Handles interactions with a document.
10741
- * @param {DocumentModel} document - The document to be opened or interacted with.
10527
+ * Handle the menu item click for navigation
10528
+ * @param {*} event - Event
10529
+ * @param {DocumentCategoryItem} item - catagory item
10742
10530
  */
10743
- handleOpenDocument(document) {
10744
- if (!document) {
10745
- console.error('Error: Document is null or undefined:', document);
10531
+ onMenuItemClick(event, item) {
10532
+ // Prevent selection if the menu item is not selectable
10533
+ if (item.isSelectable === false) {
10534
+ event.preventDefault();
10535
+ event.stopPropagation();
10746
10536
  return;
10747
10537
  }
10748
- this.documentClick.emit(document);
10538
+ if (this.selectedMenuItemId === item._id) {
10539
+ this.selectedMenuItem = null;
10540
+ this.selectedMenuItemId = null;
10541
+ this.documentStore.setSelectedMenuItem(null);
10542
+ this.menuItemSelected.emit({
10543
+ item: item,
10544
+ category: this.findMenuItemCategoryById(item._id),
10545
+ navigationInfo: undefined
10546
+ });
10547
+ }
10548
+ else {
10549
+ this.selectedMenuItem = item.label;
10550
+ this.selectedMenuItemId = item._id;
10551
+ this.documentStore.setSelectedMenuItem(item._id);
10552
+ const category = this.findMenuItemCategoryById(item._id);
10553
+ if (category) {
10554
+ this.menuItemSelected.emit({
10555
+ item: item,
10556
+ category: category,
10557
+ navigationInfo: {
10558
+ menuItemId: item._id,
10559
+ menuItemLabel: item.label,
10560
+ categoryLabel: category.label,
10561
+ categoryIndex: this.categories.findIndex(cat => cat === category)
10562
+ }
10563
+ });
10564
+ }
10565
+ }
10749
10566
  }
10750
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10751
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentListItemComponent, isStandalone: false, selector: "lib-document-list-item", inputs: { document: "document" }, outputs: { documentClick: "documentClick" }, ngImport: i0, template: "<div class=\"grid m-0\">\r\n <div\r\n class=\"col-12 flex align-items-center justify-content-between md:col-12 xl:col-12\"\r\n >\r\n <div\r\n class=\"col-5 flex cursor-pointer align-items-center pl-0\"\r\n (click)=\"handleOpenDocument(document)\"\r\n >\r\n <img src=\"../../../../assets/images/Frame.png\" alt=\"\" />\r\n <span class=\"ml-4 file-name-wrapper document-text-wrapper\">{{ document.fileName }}</span>\r\n </div>\r\n <div class=\"col-4 flex align-items-center justify-content-center\">\r\n <span\r\n [class]=\"'product-badge status-' + document.status?.toLowerCase()\"\r\n class=\"flex align-items-center justify-content-center pl-2 pr-2 pt-1 pb-1\"\r\n >\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'pending'\">\r\n <i class=\"pi pi-clock pr-1\" style=\"font-size: 12px;\"></i>\r\n Pending\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'verified'\">\r\n <i class=\"pi pi-check-circle pr-1\" style=\"font-size: 12px;\"></i>\r\n Verified\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'alert'\">\r\n <i class=\"pi pi-bell pr-1\" style=\"font-size: 12px;\"></i>\r\n Alert\r\n </ng-container>\r\n </span>\r\n </div>\r\n <div class=\"document-type file-name-wrapper document-text-wrapper\">\r\n {{document.documentTypeName}}\r\n </div>\r\n </div>\r\n </div>\r\n ", styles: [".product-badge.status-pending{background:#e9b127;color:#fff;border-radius:4px}.product-badge.status-verified{background:#4caf50;color:#fff;border-radius:4px}.product-badge.status-alert{background:#f57c00;color:#fff;border-radius:4px}.product-badge{text-transform:none;font-weight:500;font-size:12px}.file-name-wrapper{font-size:15px;font-weight:500}.document-text-wrapper{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
10752
- }
10753
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListItemComponent, decorators: [{
10754
- type: Component,
10755
- args: [{ selector: 'lib-document-list-item', standalone: false, template: "<div class=\"grid m-0\">\r\n <div\r\n class=\"col-12 flex align-items-center justify-content-between md:col-12 xl:col-12\"\r\n >\r\n <div\r\n class=\"col-5 flex cursor-pointer align-items-center pl-0\"\r\n (click)=\"handleOpenDocument(document)\"\r\n >\r\n <img src=\"../../../../assets/images/Frame.png\" alt=\"\" />\r\n <span class=\"ml-4 file-name-wrapper document-text-wrapper\">{{ document.fileName }}</span>\r\n </div>\r\n <div class=\"col-4 flex align-items-center justify-content-center\">\r\n <span\r\n [class]=\"'product-badge status-' + document.status?.toLowerCase()\"\r\n class=\"flex align-items-center justify-content-center pl-2 pr-2 pt-1 pb-1\"\r\n >\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'pending'\">\r\n <i class=\"pi pi-clock pr-1\" style=\"font-size: 12px;\"></i>\r\n Pending\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'verified'\">\r\n <i class=\"pi pi-check-circle pr-1\" style=\"font-size: 12px;\"></i>\r\n Verified\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'alert'\">\r\n <i class=\"pi pi-bell pr-1\" style=\"font-size: 12px;\"></i>\r\n Alert\r\n </ng-container>\r\n </span>\r\n </div>\r\n <div class=\"document-type file-name-wrapper document-text-wrapper\">\r\n {{document.documentTypeName}}\r\n </div>\r\n </div>\r\n </div>\r\n ", styles: [".product-badge.status-pending{background:#e9b127;color:#fff;border-radius:4px}.product-badge.status-verified{background:#4caf50;color:#fff;border-radius:4px}.product-badge.status-alert{background:#f57c00;color:#fff;border-radius:4px}.product-badge{text-transform:none;font-weight:500;font-size:12px}.file-name-wrapper{font-size:15px;font-weight:500}.document-text-wrapper{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}\n"] }]
10756
- }], propDecorators: { documentClick: [{
10757
- type: Output
10758
- }], document: [{
10759
- type: Input
10760
- }] } });
10761
-
10762
- /**
10763
- * GlobalErrorHandler is a custom error handler that implements the ErrorHandler interface.
10764
- * It is used to handle both HTTP errors and other types of errors globally in the application.
10765
- * @class
10766
- * @implements {ErrorHandler}
10767
- * @decorator {Injectable}
10768
- */
10769
- class GlobalErrorHandler {
10770
- injector;
10771
10567
  /**
10772
- * Creates an instance of GlobalErrorHandler.
10773
- * @constructor
10774
- * @param {Injector} injector - The Angular injector used to get instances of services.
10568
+ * Get the selected menu item
10569
+ * @returns {string | null} - The selected menu item
10775
10570
  */
10776
- constructor(injector) {
10777
- this.injector = injector;
10571
+ getSelectedMenuItem() {
10572
+ return this.selectedMenuItem;
10778
10573
  }
10779
10574
  /**
10780
- * Handles errors globally in the application.
10781
- *
10782
- * @param {any} error - The error object that needs to be handled.
10783
- * @returns {void}
10575
+ * Handles contextId changes by clearing current selection
10784
10576
  */
10785
- handleError(error) {
10786
- console.error('GlobalErrorHandler:', error);
10577
+ handleContextIdChange() {
10578
+ if (this.contextId && this.contextId !== SHARED.EMPTY) {
10579
+ this.selectedMenuItem = null;
10580
+ this.selectedMenuItemId = null;
10581
+ this.documentStore.setSelectedMenuItem(null);
10582
+ }
10787
10583
  }
10788
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GlobalErrorHandler, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
10789
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GlobalErrorHandler });
10584
+ /**
10585
+ * Get the selected menu item id
10586
+ * @returns {string | null} - The selected menu item id
10587
+ */
10588
+ getSelectedMenuItemId() {
10589
+ return this.selectedMenuItemId;
10590
+ }
10591
+ /**
10592
+ * Clean up subscriptions when component is destroyed
10593
+ * Prevents memory leaks and ensures proper cleanup
10594
+ */
10595
+ ngOnDestroy() {
10596
+ if (this.selectedMenuItemSubscription) {
10597
+ this.selectedMenuItemSubscription.unsubscribe();
10598
+ }
10599
+ if (this.documentCategoriesSubscription) {
10600
+ this.documentCategoriesSubscription.unsubscribe();
10601
+ }
10602
+ if (this.documentListResponseSubscription) {
10603
+ this.documentListResponseSubscription.unsubscribe();
10604
+ }
10605
+ }
10606
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentsMenuComponent, deps: [{ token: DocumentStore }, { token: DocumentQuery }, { token: DocumentMenuService }, { token: DocumentHelperService }], target: i0.ɵɵFactoryTarget.Component });
10607
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentsMenuComponent, isStandalone: false, selector: "lib-documents-menu", inputs: { catagories: "catagories", applicationNumber: "applicationNumber", contextId: "contextId" }, outputs: { menuItemSelected: "menuItemSelected" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-sidebar-container\">\r\n <!-- Menu items are now used for navigation to specific sections, not for filtering documents -->\r\n <p-card class=\"widget-menu-wrapper h-full\">\r\n @if(applicationNumber){\r\n <div class=\"flex align-items-center justify-content-between widget-menu-header-wrapper\">\r\n <p class=\"mb-0 application-title-wrapper\">ID - {{applicationNumber}}</p>\r\n <div class=\"expand-icon-wrapper\">\r\n <i class=\"ri-arrow-left-s-line text-primary flex align-items-center justify-content-center w-full h-full\"></i>\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class=\"widget-menu-container\" >\r\n <div class=\"widget-menu-wrapper h-ful l custom-scroll\">\r\n <p-menu [model]=\"categories\" styleClass=\"w-full md:w-15rem\">\r\n <ng-template pTemplate=\"submenuheader\" let-item>\r\n <span [style]=\"{\r\n color : '#9EA0B3'\r\n }\">{{ item.label }} Documents</span>\r\n </ng-template>\r\n <ng-template pTemplate=\"item\" let-item>\r\n <a pRipple \r\n class=\"flex align-items-center p-menuitem-link\"\r\n [class.selected-menu-item]=\"selectedMenuItemId === item._id\"\r\n [class.disabled-menu-item]=\"item.isSelectable === false\"\r\n [class.pointer-events-none]=\"item.isSelectable === false\"\r\n [style.opacity]=\"item.isSelectable === false ? '0.5' : '1'\"\r\n [style.cursor]=\"item.isSelectable === false ? 'not-allowed' : 'pointer'\"\r\n (click)=\"onMenuItemClick($event, item)\">\r\n <span [class]=\"item.icon\" class=\"text-xl\"></span>\r\n <span class=\"ml-2\">{{ item.label }}</span>\r\n <p-badge *ngIf=\"item.menuData?.shouldShowBadge\" \r\n class=\"ml-auto\" \r\n [severity]=\"item.menuData?.badgeSeverity\" \r\n [value]=\"item.menuData?.badgeValue\" />\r\n </a>\r\n </ng-template>\r\n </p-menu>\r\n </div>\r\n </div>\r\n </p-card>\r\n</div>\r\n\r\n ", styles: [".expand-icon-wrapper{border:1px solid var(--primary-color);height:24px;width:24px;border-radius:50%;background:var(--blue-bg-light)}::ng-deep .p-badge.p-badge-success{background-color:#dcfce7;color:#16a34a;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-danger{background-color:#fee2e2;color:#dc2626;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-info{background-color:#e5e7eb;color:#000;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-menu .p-menuitem>.p-menuitem-content .p-menuitem-link{color:#1f2937}@media screen and (min-width: 768px){::ng-deep .md\\:w-15rem{width:100%!important}}::ng-deep .p-menu{border:none}::ng-deep .custom-scroll{scrollbar-gutter:inherit}::ng-deep .selected-menu-item{background-color:#0066ff1a!important;color:var(--primary-color)!important;border:1px solid rgba(68,72,109,.1)!important;border-radius:10px!important}::ng-deep .selected-menu-item .text-xl{color:var(--primary-color)!important}::ng-deep .disabled-menu-item{opacity:.5!important;cursor:not-allowed!important;pointer-events:none!important}::ng-deep .disabled-menu-item .text-xl{color:#9ea0b3!important}::ng-deep .disabled-menu-item .ml-2{color:#9ea0b3!important}::ng-deep .disabled-menu-item .p-badge{opacity:.5!important}::ng-deep .p-menuitem-link:not(.selected-menu-item){background-color:#fff!important;border:none!important;border-radius:0!important}::ng-deep .p-menuitem-link:not(.selected-menu-item) .text-xl{color:var(--text-color)!important}::ng-deep .p-panelmenu .p-panelmenu-content{border:none!important}.application-title-wrapper{color:#9ea0b3;font-weight:500}.widget-menu-wrapper{margin-top:8px}.widget-menu-header-wrapper{padding:4px 4px 4px 16px}.widget-menu-container{overflow-y:auto;overflow-x:hidden}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}::ng-deep .document-sidebar-container .p-card{height:100%;box-shadow:none}::ng-deep .document-sidebar-container .p-card .p-card-content{height:100%;padding:0!important}::ng-deep .document-sidebar-container .p-card .p-card-body{height:100%;width:100%;padding:12px 8px;border-radius:10px;border:1px solid #e5e7eb}::ng-deep .document-sidebar-container .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content{border:none;color:var(--text-color);font-weight:400!important;background-color:var(--surface-0)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action{color:var(--text-color);font-weight:400!important;position:relative;padding:12px}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{position:absolute;right:0;top:16px;margin-right:7px;transform:rotate(90deg)!important;transition:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .company-action-wrapper:not(.p-disabled).p-highlight .p-panelmenu-header-content{margin:12px 0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content{background-color:transparent!important;border-radius:10px;padding:12px;border-bottom:0!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{transform:rotate(180deg)!important;transition:none!important;top:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link{background-color:#fff!important;color:var(--text-color);padding:12px 6px!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);box-shadow:none!important;background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem.p-focus>.p-menuitem-content{background-color:#fff!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem:not(.p-focus)>.p-menuitem-content .p-menuitem-link{background-color:#fff!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item){background-color:#fff!important;border:none!important;border-radius:0!important;color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item) .p-menuitem-icon{color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item) .p-menuitem-text{color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:1px solid rgba(68,72,109,.1)!important;border-top:0!important;border-bottom-left-radius:10px;border-bottom-right-radius:10px}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator{border-top:1px solid rgba(68,72,109,.1)!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}.no-documents-message{padding:12px 16px;text-align:center}.no-documents-message .text-muted{color:#9ea0b3;font-size:14px;font-style:italic}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i9$2.Badge, selector: "p-badge", inputs: ["styleClass", "style", "badgeSize", "severity", "value", "badgeDisabled", "size"] }, { kind: "component", type: i8$2.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "component", type: i9$3.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }] });
10790
10608
  }
10791
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GlobalErrorHandler, decorators: [{
10792
- type: Injectable
10793
- }], ctorParameters: () => [{ type: i0.Injector }] });
10609
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentsMenuComponent, decorators: [{
10610
+ type: Component,
10611
+ args: [{ selector: 'lib-documents-menu', standalone: false, template: "<div class=\"document-sidebar-container\">\r\n <!-- Menu items are now used for navigation to specific sections, not for filtering documents -->\r\n <p-card class=\"widget-menu-wrapper h-full\">\r\n @if(applicationNumber){\r\n <div class=\"flex align-items-center justify-content-between widget-menu-header-wrapper\">\r\n <p class=\"mb-0 application-title-wrapper\">ID - {{applicationNumber}}</p>\r\n <div class=\"expand-icon-wrapper\">\r\n <i class=\"ri-arrow-left-s-line text-primary flex align-items-center justify-content-center w-full h-full\"></i>\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class=\"widget-menu-container\" >\r\n <div class=\"widget-menu-wrapper h-ful l custom-scroll\">\r\n <p-menu [model]=\"categories\" styleClass=\"w-full md:w-15rem\">\r\n <ng-template pTemplate=\"submenuheader\" let-item>\r\n <span [style]=\"{\r\n color : '#9EA0B3'\r\n }\">{{ item.label }} Documents</span>\r\n </ng-template>\r\n <ng-template pTemplate=\"item\" let-item>\r\n <a pRipple \r\n class=\"flex align-items-center p-menuitem-link\"\r\n [class.selected-menu-item]=\"selectedMenuItemId === item._id\"\r\n [class.disabled-menu-item]=\"item.isSelectable === false\"\r\n [class.pointer-events-none]=\"item.isSelectable === false\"\r\n [style.opacity]=\"item.isSelectable === false ? '0.5' : '1'\"\r\n [style.cursor]=\"item.isSelectable === false ? 'not-allowed' : 'pointer'\"\r\n (click)=\"onMenuItemClick($event, item)\">\r\n <span [class]=\"item.icon\" class=\"text-xl\"></span>\r\n <span class=\"ml-2\">{{ item.label }}</span>\r\n <p-badge *ngIf=\"item.menuData?.shouldShowBadge\" \r\n class=\"ml-auto\" \r\n [severity]=\"item.menuData?.badgeSeverity\" \r\n [value]=\"item.menuData?.badgeValue\" />\r\n </a>\r\n </ng-template>\r\n </p-menu>\r\n </div>\r\n </div>\r\n </p-card>\r\n</div>\r\n\r\n ", styles: [".expand-icon-wrapper{border:1px solid var(--primary-color);height:24px;width:24px;border-radius:50%;background:var(--blue-bg-light)}::ng-deep .p-badge.p-badge-success{background-color:#dcfce7;color:#16a34a;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-danger{background-color:#fee2e2;color:#dc2626;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-info{background-color:#e5e7eb;color:#000;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-menu .p-menuitem>.p-menuitem-content .p-menuitem-link{color:#1f2937}@media screen and (min-width: 768px){::ng-deep .md\\:w-15rem{width:100%!important}}::ng-deep .p-menu{border:none}::ng-deep .custom-scroll{scrollbar-gutter:inherit}::ng-deep .selected-menu-item{background-color:#0066ff1a!important;color:var(--primary-color)!important;border:1px solid rgba(68,72,109,.1)!important;border-radius:10px!important}::ng-deep .selected-menu-item .text-xl{color:var(--primary-color)!important}::ng-deep .disabled-menu-item{opacity:.5!important;cursor:not-allowed!important;pointer-events:none!important}::ng-deep .disabled-menu-item .text-xl{color:#9ea0b3!important}::ng-deep .disabled-menu-item .ml-2{color:#9ea0b3!important}::ng-deep .disabled-menu-item .p-badge{opacity:.5!important}::ng-deep .p-menuitem-link:not(.selected-menu-item){background-color:#fff!important;border:none!important;border-radius:0!important}::ng-deep .p-menuitem-link:not(.selected-menu-item) .text-xl{color:var(--text-color)!important}::ng-deep .p-panelmenu .p-panelmenu-content{border:none!important}.application-title-wrapper{color:#9ea0b3;font-weight:500}.widget-menu-wrapper{margin-top:8px}.widget-menu-header-wrapper{padding:4px 4px 4px 16px}.widget-menu-container{overflow-y:auto;overflow-x:hidden}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}::ng-deep .document-sidebar-container .p-card{height:100%;box-shadow:none}::ng-deep .document-sidebar-container .p-card .p-card-content{height:100%;padding:0!important}::ng-deep .document-sidebar-container .p-card .p-card-body{height:100%;width:100%;padding:12px 8px;border-radius:10px;border:1px solid #e5e7eb}::ng-deep .document-sidebar-container .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content{border:none;color:var(--text-color);font-weight:400!important;background-color:var(--surface-0)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action{color:var(--text-color);font-weight:400!important;position:relative;padding:12px}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{position:absolute;right:0;top:16px;margin-right:7px;transform:rotate(90deg)!important;transition:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .company-action-wrapper:not(.p-disabled).p-highlight .p-panelmenu-header-content{margin:12px 0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content{background-color:transparent!important;border-radius:10px;padding:12px;border-bottom:0!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{transform:rotate(180deg)!important;transition:none!important;top:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link{background-color:#fff!important;color:var(--text-color);padding:12px 6px!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);box-shadow:none!important;background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem.p-focus>.p-menuitem-content{background-color:#fff!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem:not(.p-focus)>.p-menuitem-content .p-menuitem-link{background-color:#fff!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item){background-color:#fff!important;border:none!important;border-radius:0!important;color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item) .p-menuitem-icon{color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link:not(.selected-menu-item) .p-menuitem-text{color:var(--text-color)!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:1px solid rgba(68,72,109,.1)!important;border-top:0!important;border-bottom-left-radius:10px;border-bottom-right-radius:10px}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator{border-top:1px solid rgba(68,72,109,.1)!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}.no-documents-message{padding:12px 16px;text-align:center}.no-documents-message .text-muted{color:#9ea0b3;font-size:14px;font-style:italic}\n"] }]
10612
+ }], ctorParameters: () => [{ type: DocumentStore }, { type: DocumentQuery }, { type: DocumentMenuService }, { type: DocumentHelperService }], propDecorators: { catagories: [{
10613
+ type: Input
10614
+ }], applicationNumber: [{
10615
+ type: Input
10616
+ }], contextId: [{
10617
+ type: Input
10618
+ }], menuItemSelected: [{
10619
+ type: Output
10620
+ }] } });
10794
10621
 
10795
- /**
10796
- * Directive to display the document data
10797
- */
10798
- class DocumentDirective {
10799
- documentService;
10800
- templateRef;
10801
- vcr;
10622
+ class UserListService {
10623
+ documentStore;
10624
+ documentQuery;
10625
+ constructor(documentStore, documentQuery) {
10626
+ this.documentStore = documentStore;
10627
+ this.documentQuery = documentQuery;
10628
+ }
10629
+ getInitials(name) {
10630
+ if (!name || name.trim() === SHARED.EMPTY) {
10631
+ return SHARED.EMPTY;
10632
+ }
10633
+ const words = name.trim().split(SHARED.EMPTY_SPACE).filter(word => word.length > SHARED.INITIAL_COUNT);
10634
+ if (words.length === 1) {
10635
+ return words[0].substring(0, 2).toUpperCase();
10636
+ }
10637
+ else if (words.length >= 2) {
10638
+ const firstWord = words[0];
10639
+ const lastWord = words[words.length - 1];
10640
+ return (firstWord.charAt(0) + lastWord.charAt(0)).toUpperCase();
10641
+ }
10642
+ return SHARED.EMPTY;
10643
+ }
10644
+ getColorByIndex(index) {
10645
+ const colors = SHARED.COLORS;
10646
+ return colors[index % colors.length];
10647
+ }
10648
+ getColorValue(colorName) {
10649
+ const colorMap = SHARED.COLOR_MAP;
10650
+ return colorMap[colorName] || SHARED.DEFAULT_COLOR;
10651
+ }
10652
+ processUserData(userList) {
10653
+ return userList.map((user, index) => ({
10654
+ ...user,
10655
+ initials: this.getInitials(user.name),
10656
+ color: this.getColorByIndex(index)
10657
+ }));
10658
+ }
10802
10659
  /**
10803
- * Creates an instance of DocumentDirective.
10804
- * @param documentService Service to get the document data.
10805
- * @param templateRef Reference to the template.
10806
- * @param vcr View container reference to manage the view.
10660
+ * Filters user list based on selected menu item category
10661
+ * @param userList - The complete user list
10662
+ * @param categories - The document categories
10663
+ * @returns Filtered user list
10807
10664
  */
10808
- constructor(documentService, templateRef, vcr) {
10809
- this.documentService = documentService;
10810
- this.templateRef = templateRef;
10811
- this.vcr = vcr;
10812
- this.documentService.get().subscribe((document) => {
10813
- this.vcr.clear();
10814
- if (document) {
10815
- this.vcr.createEmbeddedView(this.templateRef, { $implicit: document });
10816
- }
10817
- });
10665
+ filterUsersByCategory(userList, categories) {
10666
+ return userList;
10818
10667
  }
10819
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentDirective, deps: [{ token: DocumentHelperService }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
10820
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.14", type: DocumentDirective, isStandalone: false, selector: "[doc]", ngImport: i0 });
10668
+ selectUser(userId, userData) {
10669
+ const user = userData.find(u => u._id === userId);
10670
+ if (user) {
10671
+ this.documentStore.setSelectedUserId(userId);
10672
+ return { selectedUser: user.name, name: user.name };
10673
+ }
10674
+ return { selectedUser: undefined, name: undefined };
10675
+ }
10676
+ unselectUser() {
10677
+ this.documentStore.setSelectedUserId(null);
10678
+ }
10679
+ isUserSelected(userId, userData, selectedUser) {
10680
+ return selectedUser === userData.find(u => u._id === userId)?.name;
10681
+ }
10682
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListService, deps: [{ token: DocumentStore }, { token: DocumentQuery }], target: i0.ɵɵFactoryTarget.Injectable });
10683
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListService, providedIn: 'root' });
10821
10684
  }
10822
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentDirective, decorators: [{
10823
- type: Directive,
10685
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListService, decorators: [{
10686
+ type: Injectable,
10824
10687
  args: [{
10825
- selector: '[doc]',
10826
- standalone: false
10688
+ providedIn: 'root'
10827
10689
  }]
10828
- }], ctorParameters: () => [{ type: DocumentHelperService }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }] });
10690
+ }], ctorParameters: () => [{ type: DocumentStore }, { type: DocumentQuery }] });
10829
10691
 
10830
- /**
10831
- * Description placeholder
10832
- * @class LinkedDocumentComponent
10833
- * @typedef {LinkedDocumentComponent}
10834
- * @implements {OnChanges}
10835
- */
10836
- class LinkedDocumentComponent {
10837
- /**
10838
- * Selected document for view.
10839
- * @type {?DocumentModel}
10840
- */
10841
- selectedDocument;
10842
- /**
10843
- * Whole document list.
10844
- * @type {?DocumentModel[]}
10845
- */
10846
- documentList;
10847
- /**
10848
- * Changed selected document.
10849
- * @type {*}
10850
- */
10851
- selectedDocumentChange = new EventEmitter();
10852
- /**
10853
- * Filtered documents.
10854
- * @type {DocumentModel[]}
10855
- */
10856
- filteredDocuments = [];
10857
- /**
10858
- * Handle the click on the document.
10859
- * @param {DocumentModel} document - Clicked document.
10860
- */
10861
- handleDocumentClick(document) {
10862
- this.selectedDocument = document;
10863
- this.selectedDocumentChange.emit(this.selectedDocument);
10692
+ class UserListComponent {
10693
+ documentService;
10694
+ documentStore;
10695
+ documentQuery;
10696
+ userListService;
10697
+ cdr;
10698
+ userList = SHARED.EMPTY_ARRAY;
10699
+ categories = SHARED.EMPTY_ARRAY;
10700
+ userSelected = new EventEmitter();
10701
+ userData = SHARED.EMPTY_ARRAY;
10702
+ filteredUserData = SHARED.EMPTY_ARRAY;
10703
+ selectedUser;
10704
+ shouldShowContainer = true;
10705
+ userListSubscription = new Subscription();
10706
+ categoriesSubscription = new Subscription();
10707
+ constructor(documentService, documentStore, documentQuery, userListService, cdr) {
10708
+ this.documentService = documentService;
10709
+ this.documentStore = documentStore;
10710
+ this.documentQuery = documentQuery;
10711
+ this.userListService = userListService;
10712
+ this.cdr = cdr;
10864
10713
  }
10865
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LinkedDocumentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10866
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", 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"] });
10714
+ ngOnChanges(changes) {
10715
+ if (changes[SHARED.USER_LIST] && !changes[SHARED.USER_LIST].firstChange) {
10716
+ this.initializeUserData();
10717
+ }
10718
+ if (changes[SHARED.CATEGORIES] && !changes[SHARED.CATEGORIES].firstChange) {
10719
+ this.updateFilteredUserData();
10720
+ }
10721
+ }
10722
+ initializeUserData() {
10723
+ if (this.userList && this.userList.length > 0) {
10724
+ this.userData = this.userListService.processUserData(this.userList);
10725
+ this.updateFilteredUserData();
10726
+ }
10727
+ }
10728
+ updateFilteredUserData() {
10729
+ if (this.userData.length > 0 && this.categories.length > 0) {
10730
+ this.filteredUserData = this.userListService.filterUsersByCategory(this.userData, this.categories);
10731
+ this.shouldShowContainer = true;
10732
+ if (this.selectedUser) {
10733
+ const selectedUserInFiltered = this.filteredUserData.find(user => user.name === this.selectedUser);
10734
+ if (!selectedUserInFiltered) {
10735
+ this.selectedUser = undefined;
10736
+ this.documentStore.setSelectedUserId(null);
10737
+ this.userSelected.emit(SHARED.EMPTY);
10738
+ }
10739
+ }
10740
+ }
10741
+ else {
10742
+ this.filteredUserData = this.userData;
10743
+ this.shouldShowContainer = true;
10744
+ }
10745
+ }
10746
+ ngOnInit() {
10747
+ this.initializeUserData();
10748
+ this.userListSubscription.add(this.documentQuery.selectUserList().subscribe(userList => {
10749
+ if (userList && userList.length > 0) {
10750
+ this.userList = userList;
10751
+ this.initializeUserData();
10752
+ this.cdr.markForCheck();
10753
+ }
10754
+ }));
10755
+ this.categoriesSubscription.add(this.documentQuery.selectDocumentCategories().subscribe(categories => {
10756
+ if (categories && categories.length > 0) {
10757
+ this.categories = categories;
10758
+ this.updateFilteredUserData();
10759
+ this.cdr.markForCheck();
10760
+ }
10761
+ }));
10762
+ this.userListSubscription.add(this.documentQuery.selectDocumentListResponse().subscribe(() => {
10763
+ const currentUserList = this.documentQuery.getUserList();
10764
+ if (currentUserList && currentUserList.length > 0) {
10765
+ this.userList = currentUserList;
10766
+ this.initializeUserData();
10767
+ this.cdr.markForCheck();
10768
+ }
10769
+ }));
10770
+ this.documentQuery.selectSelectedUserId().subscribe(userId => {
10771
+ if (userId) {
10772
+ const user = this.userData.find(u => u._id === userId);
10773
+ this.selectedUser = user ? user.name : undefined;
10774
+ }
10775
+ else {
10776
+ this.selectedUser = undefined;
10777
+ }
10778
+ this.cdr.markForCheck();
10779
+ });
10780
+ this.documentQuery.selectShowUserList().subscribe(show => {
10781
+ if (!show && this.selectedUser) {
10782
+ this.selectedUser = undefined;
10783
+ this.userSelected.emit(SHARED.EMPTY);
10784
+ }
10785
+ });
10786
+ }
10787
+ onUserSelect(username, id) {
10788
+ if (this.selectedUser === username) {
10789
+ this.selectedUser = undefined;
10790
+ this.userListService.unselectUser();
10791
+ this.userSelected.emit(SHARED.EMPTY);
10792
+ }
10793
+ else {
10794
+ this.selectedUser = username;
10795
+ this.documentStore.setSelectedUserId(id);
10796
+ this.userSelected.emit(username);
10797
+ }
10798
+ }
10799
+ getAvatarColor(color) {
10800
+ if (!color) {
10801
+ return SHARED.DEFAULT_COLOR;
10802
+ }
10803
+ return SHARED.COLOR_MAP[color] || SHARED.DEFAULT_COLOR;
10804
+ }
10805
+ ngOnDestroy() {
10806
+ this.userListSubscription.unsubscribe();
10807
+ this.categoriesSubscription.unsubscribe();
10808
+ }
10809
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListComponent, deps: [{ token: DocumentHelperService }, { token: DocumentStore }, { token: DocumentQuery }, { token: UserListService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
10810
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UserListComponent, isStandalone: false, selector: "lib-user-list", inputs: { userList: "userList", categories: "categories" }, outputs: { userSelected: "userSelected" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"user-list-container\" [@slideInFromTop]>\r\n <div class=\"user-cards\">\r\n <div \r\n *ngFor=\"let user of filteredUserData\" \r\n class=\"user-card\"\r\n [class.selected]=\"selectedUser === user.name\"\r\n [style.border-color]=\"selectedUser === user.name ? getAvatarColor(user.color) : 'transparent'\"\r\n (click)=\"onUserSelect(user.name, user._id)\"\r\n >\r\n @if(user.name === \"Application Docs\"){\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\"><i class=\"pi pi-user\"></i></span>\r\n </div>\r\n }@else {\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\">{{ user.initials }}</span>\r\n </div>\r\n }\r\n <div class=\"user-info\">\r\n <div class=\"username\">{{ user.name }}</div>\r\n <div class=\"document-counts\">\r\n <span style=\"color : #16A34A;\"> {{ user.approved }} approved </span><span>/ {{ user.pending }} outstanding</span>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n <!-- Show message when filtered list is empty -->\r\n <div *ngIf=\"filteredUserData.length === 0 && shouldShowContainer\" class=\"no-users-message\" [@slideInFromTop]>\r\n <p>No users available for this category.</p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".user-list-container{padding:1rem 1rem .5rem}.user-cards{display:flex;flex-wrap:wrap;transition:all .3s ease-in-out}.user-card{display:flex;align-items:center;gap:.75rem;padding:1rem;border:2px solid transparent;border-radius:8px;cursor:pointer;transition:all .2s ease;background:#fff;min-width:140px;max-width:300px;height:70px;position:relative;flex-shrink:0}.user-card:hover{box-shadow:0 4px 8px #00000026}.user-card.selected{background-color:#f8fafc;box-shadow:0 4px 8px #00000026;border-width:2px}.user-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;color:#fff;font-size:14px;flex-shrink:0;font-weight:400}.avatar-orange{background-color:#fef3c7;color:#b45309}.avatar-blue{background-color:#dbeafe;color:#1d4ed8}.avatar-green{background-color:#22c55e1a;color:#36aa86}.avatar-grey{background-color:#ebeced;color:#5b6676}.avatar-purple{background-color:#3b82f61a;color:#3b82f6}.user-info{flex:1;min-width:0;overflow:hidden}.username{font-weight:600;color:#1f2937;margin-bottom:.25rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2}.document-counts{font-size:.875rem;color:#6b7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.35;padding-bottom:2px}.selection-indicator{position:absolute;top:8px;right:8px;width:20px;height:20px;background-color:#10b981;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px;flex-shrink:0}.no-users-message{display:flex;justify-content:center;align-items:center;padding:2rem;background:#f8fafc;border-radius:8px;border:2px dashed #d1d5db;margin:1rem 0}.no-users-message p{color:#6b7280;font-size:.875rem;font-weight:500;margin:0;text-align:center}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [
10811
+ trigger('slideInFromTop', [
10812
+ state('void', style({
10813
+ opacity: 0,
10814
+ transform: 'translateY(-10px)'
10815
+ })),
10816
+ state('*', style({
10817
+ opacity: 1,
10818
+ transform: 'translateY(0)'
10819
+ })),
10820
+ transition('void => *', [
10821
+ animate('300ms ease-out')
10822
+ ])
10823
+ ]),
10824
+ trigger('fadeIn', [
10825
+ state('void', style({
10826
+ opacity: 0,
10827
+ transform: 'scale(0.8)'
10828
+ })),
10829
+ state('*', style({
10830
+ opacity: 1,
10831
+ transform: 'scale(1)'
10832
+ })),
10833
+ transition('void => *', [
10834
+ animate('200ms ease-in-out')
10835
+ ])
10836
+ ])
10837
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
10867
10838
  }
10868
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LinkedDocumentComponent, decorators: [{
10839
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListComponent, decorators: [{
10869
10840
  type: Component,
10870
- 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"] }]
10871
- }], propDecorators: { selectedDocument: [{
10841
+ args: [{ selector: 'lib-user-list', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, animations: [
10842
+ trigger('slideInFromTop', [
10843
+ state('void', style({
10844
+ opacity: 0,
10845
+ transform: 'translateY(-10px)'
10846
+ })),
10847
+ state('*', style({
10848
+ opacity: 1,
10849
+ transform: 'translateY(0)'
10850
+ })),
10851
+ transition('void => *', [
10852
+ animate('300ms ease-out')
10853
+ ])
10854
+ ]),
10855
+ trigger('fadeIn', [
10856
+ state('void', style({
10857
+ opacity: 0,
10858
+ transform: 'scale(0.8)'
10859
+ })),
10860
+ state('*', style({
10861
+ opacity: 1,
10862
+ transform: 'scale(1)'
10863
+ })),
10864
+ transition('void => *', [
10865
+ animate('200ms ease-in-out')
10866
+ ])
10867
+ ])
10868
+ ], template: "<div class=\"user-list-container\" [@slideInFromTop]>\r\n <div class=\"user-cards\">\r\n <div \r\n *ngFor=\"let user of filteredUserData\" \r\n class=\"user-card\"\r\n [class.selected]=\"selectedUser === user.name\"\r\n [style.border-color]=\"selectedUser === user.name ? getAvatarColor(user.color) : 'transparent'\"\r\n (click)=\"onUserSelect(user.name, user._id)\"\r\n >\r\n @if(user.name === \"Application Docs\"){\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\"><i class=\"pi pi-user\"></i></span>\r\n </div>\r\n }@else {\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\">{{ user.initials }}</span>\r\n </div>\r\n }\r\n <div class=\"user-info\">\r\n <div class=\"username\">{{ user.name }}</div>\r\n <div class=\"document-counts\">\r\n <span style=\"color : #16A34A;\"> {{ user.approved }} approved </span><span>/ {{ user.pending }} outstanding</span>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n <!-- Show message when filtered list is empty -->\r\n <div *ngIf=\"filteredUserData.length === 0 && shouldShowContainer\" class=\"no-users-message\" [@slideInFromTop]>\r\n <p>No users available for this category.</p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".user-list-container{padding:1rem 1rem .5rem}.user-cards{display:flex;flex-wrap:wrap;transition:all .3s ease-in-out}.user-card{display:flex;align-items:center;gap:.75rem;padding:1rem;border:2px solid transparent;border-radius:8px;cursor:pointer;transition:all .2s ease;background:#fff;min-width:140px;max-width:300px;height:70px;position:relative;flex-shrink:0}.user-card:hover{box-shadow:0 4px 8px #00000026}.user-card.selected{background-color:#f8fafc;box-shadow:0 4px 8px #00000026;border-width:2px}.user-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;color:#fff;font-size:14px;flex-shrink:0;font-weight:400}.avatar-orange{background-color:#fef3c7;color:#b45309}.avatar-blue{background-color:#dbeafe;color:#1d4ed8}.avatar-green{background-color:#22c55e1a;color:#36aa86}.avatar-grey{background-color:#ebeced;color:#5b6676}.avatar-purple{background-color:#3b82f61a;color:#3b82f6}.user-info{flex:1;min-width:0;overflow:hidden}.username{font-weight:600;color:#1f2937;margin-bottom:.25rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2}.document-counts{font-size:.875rem;color:#6b7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.35;padding-bottom:2px}.selection-indicator{position:absolute;top:8px;right:8px;width:20px;height:20px;background-color:#10b981;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px;flex-shrink:0}.no-users-message{display:flex;justify-content:center;align-items:center;padding:2rem;background:#f8fafc;border-radius:8px;border:2px dashed #d1d5db;margin:1rem 0}.no-users-message p{color:#6b7280;font-size:.875rem;font-weight:500;margin:0;text-align:center}\n"] }]
10869
+ }], ctorParameters: () => [{ type: DocumentHelperService }, { type: DocumentStore }, { type: DocumentQuery }, { type: UserListService }, { type: i0.ChangeDetectorRef }], propDecorators: { userList: [{
10872
10870
  type: Input
10873
- }], documentList: [{
10871
+ }], categories: [{
10874
10872
  type: Input
10875
- }], selectedDocumentChange: [{
10873
+ }], userSelected: [{
10876
10874
  type: Output
10877
10875
  }] } });
10878
10876