cat-documents-ng 0.3.40 → 0.3.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/cat-documents-ng.mjs +581 -249
- package/fesm2022/cat-documents-ng.mjs.map +1 -1
- package/lib/document/components/document-actions/document-actions.component.d.ts +1 -5
- package/lib/document/components/document-content-viewer/document-content-viewer.component.d.ts +8 -0
- package/lib/document/components/document-history/document-history.component.d.ts +113 -25
- package/lib/document/components/document-viewer/document-viewer.component.d.ts +13 -0
- package/lib/document/models/document-history.model.d.ts +23 -2
- package/lib/document/services/document-zoom.service.d.ts +30 -0
- package/package.json +1 -1
|
@@ -29,7 +29,7 @@ import * as i4$1 from 'primeng/sidebar';
|
|
|
29
29
|
import { SidebarModule } from 'primeng/sidebar';
|
|
30
30
|
import * as i5$1 from 'primeng/messages';
|
|
31
31
|
import { MessagesModule } from 'primeng/messages';
|
|
32
|
-
import * as i9$
|
|
32
|
+
import * as i9$1 from 'primeng/badge';
|
|
33
33
|
import { BadgeModule } from 'primeng/badge';
|
|
34
34
|
import * as i8$1 from 'primeng/dialog';
|
|
35
35
|
import { DialogModule } from 'primeng/dialog';
|
|
@@ -37,8 +37,6 @@ import * as i6 from 'primeng/inputtext';
|
|
|
37
37
|
import { InputTextModule } from 'primeng/inputtext';
|
|
38
38
|
import * as i2$1 from 'primeng/table';
|
|
39
39
|
import { TableModule } from 'primeng/table';
|
|
40
|
-
import * as i3$1 from 'primeng/accordion';
|
|
41
|
-
import { AccordionModule } from 'primeng/accordion';
|
|
42
40
|
import * as XLSX from 'xlsx';
|
|
43
41
|
import * as i7 from 'ng2-pdf-viewer';
|
|
44
42
|
import { PdfViewerModule } from 'ng2-pdf-viewer';
|
|
@@ -47,18 +45,18 @@ import { NgxDocViewerModule } from 'ngx-doc-viewer';
|
|
|
47
45
|
import * as i1 from '@angular/router';
|
|
48
46
|
import * as i6$1 from 'primeng/inputtextarea';
|
|
49
47
|
import { InputTextareaModule } from 'primeng/inputtextarea';
|
|
50
|
-
import * as i9$1 from 'primeng/tooltip';
|
|
51
|
-
import { TooltipModule } from 'primeng/tooltip';
|
|
52
48
|
import * as i8$2 from 'primeng/menu';
|
|
53
49
|
import { MenuModule } from 'primeng/menu';
|
|
54
|
-
import * as i9$
|
|
50
|
+
import * as i9$2 from 'primeng/card';
|
|
55
51
|
import { CardModule } from 'primeng/card';
|
|
52
|
+
import { AccordionModule } from 'primeng/accordion';
|
|
56
53
|
import { ListboxModule } from 'primeng/listbox';
|
|
57
54
|
import { TimelineModule } from 'primeng/timeline';
|
|
58
55
|
import { CheckboxModule } from 'primeng/checkbox';
|
|
59
56
|
import { PanelMenuModule } from 'primeng/panelmenu';
|
|
60
57
|
import { RippleModule } from 'primeng/ripple';
|
|
61
58
|
import { ToastModule } from 'primeng/toast';
|
|
59
|
+
import { TooltipModule } from 'primeng/tooltip';
|
|
62
60
|
import { MessageModule } from 'primeng/message';
|
|
63
61
|
|
|
64
62
|
/**
|
|
@@ -1366,7 +1364,7 @@ class DocumentHttpService {
|
|
|
1366
1364
|
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
1367
1365
|
*/
|
|
1368
1366
|
getDocumentCatagories(contextId) {
|
|
1369
|
-
let headers = new HttpHeaders({ 'Authorization': `Bearer
|
|
1367
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer cf04573e-b46b-44ef-af37-c1a08da579af` });
|
|
1370
1368
|
return this.http.get(`${this.apiUrl}${URLS.DOCUMENTS_CATAGORIES}/${contextId}`, { headers })
|
|
1371
1369
|
.pipe(tap((response) => {
|
|
1372
1370
|
if (response && response.categories) {
|
|
@@ -1410,7 +1408,7 @@ class DocumentHttpService {
|
|
|
1410
1408
|
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
1411
1409
|
*/
|
|
1412
1410
|
getDocumentByFolderID(folderId, contextId) {
|
|
1413
|
-
let headers = new HttpHeaders({ 'Authorization': `Bearer
|
|
1411
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer cf04573e-b46b-44ef-af37-c1a08da579af` });
|
|
1414
1412
|
return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${URLS.PARENT_DOCUMENT_TYPE_ID}${folderId}${URLS.CONTEXT_ID}${contextId}`, { headers }).pipe(tap((records) => {
|
|
1415
1413
|
this.documentStore.set(records);
|
|
1416
1414
|
}), catchError((error) => {
|
|
@@ -1426,7 +1424,7 @@ class DocumentHttpService {
|
|
|
1426
1424
|
* @returns {Observable<DocumentModel>} An observable that emits the updated DocumentModel.
|
|
1427
1425
|
*/
|
|
1428
1426
|
updateDocumentName(documentId, payload) {
|
|
1429
|
-
let headers = new HttpHeaders({ 'Authorization': `Bearer
|
|
1427
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer cf04573e-b46b-44ef-af37-c1a08da579af` });
|
|
1430
1428
|
return this.http.put(`${this.apiUrl}${URLS.ALIAS_NAME}${documentId}`, payload, { headers }).pipe(catchError((error) => {
|
|
1431
1429
|
return throwError(() => new Error(error));
|
|
1432
1430
|
}));
|
|
@@ -1439,7 +1437,7 @@ class DocumentHttpService {
|
|
|
1439
1437
|
getUserListByContextId(contextId) {
|
|
1440
1438
|
if (!contextId)
|
|
1441
1439
|
return EMPTY;
|
|
1442
|
-
let headers = new HttpHeaders({ 'Authorization': `Bearer
|
|
1440
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer cf04573e-b46b-44ef-af37-c1a08da579af` });
|
|
1443
1441
|
return this.http.get(`${this.apiUrl}${URLS.USERLIST}${contextId}`, { headers }).pipe(tap((userList) => {
|
|
1444
1442
|
this.documentStore.setUserList(userList);
|
|
1445
1443
|
}), catchError((error) => {
|
|
@@ -1465,7 +1463,7 @@ class DocumentHttpService {
|
|
|
1465
1463
|
if (categoryId) {
|
|
1466
1464
|
params = params.set(SHARED.CATEGORY, categoryId);
|
|
1467
1465
|
}
|
|
1468
|
-
let headers = new HttpHeaders({ 'Authorization': `Bearer
|
|
1466
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer cf04573e-b46b-44ef-af37-c1a08da579af` });
|
|
1469
1467
|
return this.http.get(url, { params, headers }).pipe(tap((statusData) => {
|
|
1470
1468
|
this.documentStore.setStatusData(statusData);
|
|
1471
1469
|
}), catchError((error) => {
|
|
@@ -1494,7 +1492,7 @@ class DocumentHttpService {
|
|
|
1494
1492
|
if (searchKey) {
|
|
1495
1493
|
params = params.set(SHARED.SEARCH_KEY, searchKey);
|
|
1496
1494
|
}
|
|
1497
|
-
let headers = new HttpHeaders({ 'Authorization': `Bearer
|
|
1495
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer cf04573e-b46b-44ef-af37-c1a08da579af` });
|
|
1498
1496
|
return this.http.get(`${this.apiUrl}${URLS.GETALL}/${contextId}`, { params, headers }).pipe(tap((response) => {
|
|
1499
1497
|
if (response.documents) {
|
|
1500
1498
|
this.documentStore.setDocumentList(response.documents);
|
|
@@ -1507,7 +1505,7 @@ class DocumentHttpService {
|
|
|
1507
1505
|
if (!documentId) {
|
|
1508
1506
|
return of([]);
|
|
1509
1507
|
}
|
|
1510
|
-
let headers = new HttpHeaders({ 'Authorization': `Bearer
|
|
1508
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer cf04573e-b46b-44ef-af37-c1a08da579af` });
|
|
1511
1509
|
return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_HISTORY}${documentId}`, { headers }).pipe(catchError((error) => {
|
|
1512
1510
|
return throwError(() => new Error(error));
|
|
1513
1511
|
}));
|
|
@@ -1520,7 +1518,7 @@ class DocumentHttpService {
|
|
|
1520
1518
|
getCategoriesBySource(source) {
|
|
1521
1519
|
if (!source)
|
|
1522
1520
|
return EMPTY;
|
|
1523
|
-
let headers = new HttpHeaders({ 'Authorization': `Bearer
|
|
1521
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer cf04573e-b46b-44ef-af37-c1a08da579af` });
|
|
1524
1522
|
return this.http.get(`${this.apiUrl}${URLS.GET_CATEGORIES_BY_SOURCE}${source}`, { headers }).pipe(catchError((error) => {
|
|
1525
1523
|
return throwError(() => new Error(error));
|
|
1526
1524
|
}));
|
|
@@ -1533,7 +1531,7 @@ class DocumentHttpService {
|
|
|
1533
1531
|
getDocumentTypesByCategory(categoryId) {
|
|
1534
1532
|
if (!categoryId)
|
|
1535
1533
|
return EMPTY;
|
|
1536
|
-
let headers = new HttpHeaders({ 'Authorization': `Bearer
|
|
1534
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer cf04573e-b46b-44ef-af37-c1a08da579af` });
|
|
1537
1535
|
return this.http.get(`${this.apiUrl}${URLS.GET_DOCUMENT_TYPES_BY_CATEGORY}${categoryId}`, { headers }).pipe(catchError((error) => {
|
|
1538
1536
|
return throwError(() => new Error(error));
|
|
1539
1537
|
}));
|
|
@@ -1544,7 +1542,7 @@ class DocumentHttpService {
|
|
|
1544
1542
|
* @returns {Observable<any>} Observable that emits the upload response.
|
|
1545
1543
|
*/
|
|
1546
1544
|
uploadFile(formData) {
|
|
1547
|
-
let headers = new HttpHeaders({ 'Authorization': `Bearer
|
|
1545
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer cf04573e-b46b-44ef-af37-c1a08da579af` });
|
|
1548
1546
|
return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, formData, { headers }).pipe(catchError((error) => {
|
|
1549
1547
|
return throwError(() => new Error(error));
|
|
1550
1548
|
}));
|
|
@@ -1555,7 +1553,7 @@ class DocumentHttpService {
|
|
|
1555
1553
|
* @returns {Observable<any>} Observable that emits the save response.
|
|
1556
1554
|
*/
|
|
1557
1555
|
saveDocumentUpload(payload) {
|
|
1558
|
-
let headers = new HttpHeaders({ 'Authorization': `Bearer
|
|
1556
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer cf04573e-b46b-44ef-af37-c1a08da579af` });
|
|
1559
1557
|
return this.http.post(`${this.apiUrl}${URLS.SAVE_DOCUMENT_UPLOAD}`, payload, { headers }).pipe(catchError((error) => {
|
|
1560
1558
|
return throwError(() => new Error(error));
|
|
1561
1559
|
}));
|
|
@@ -1571,7 +1569,7 @@ class DocumentHttpService {
|
|
|
1571
1569
|
const payload = {
|
|
1572
1570
|
statusUpdateDescription: statusUpdateDescription
|
|
1573
1571
|
};
|
|
1574
|
-
let headers = new HttpHeaders({ 'Authorization': `Bearer
|
|
1572
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer cf04573e-b46b-44ef-af37-c1a08da579af` });
|
|
1575
1573
|
return this.http.put(`${this.apiUrl}${URLS.UPDATE_DOCUMENT_STATUS}${documentId}/${status}`, payload, { headers }).pipe(tap((response) => {
|
|
1576
1574
|
if (response && response.status) {
|
|
1577
1575
|
const normalizedStatus = this.normalizeStatus(response.status);
|
|
@@ -1605,7 +1603,7 @@ class DocumentHttpService {
|
|
|
1605
1603
|
* @returns {Observable<any>} Observable that emits the delete response
|
|
1606
1604
|
*/
|
|
1607
1605
|
deleteDocument(documentId, contextId) {
|
|
1608
|
-
let headers = new HttpHeaders({ 'Authorization': `Bearer
|
|
1606
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer cf04573e-b46b-44ef-af37-c1a08da579af` });
|
|
1609
1607
|
return this.http.delete(`${this.apiUrl}${URLS.DELETE_DOCUMENT}${documentId}`, { headers }).pipe(tap(() => {
|
|
1610
1608
|
this.getDocumentCatagories(contextId).subscribe();
|
|
1611
1609
|
this.getUserListByContextId(contextId).subscribe();
|
|
@@ -2431,7 +2429,7 @@ class DocumentService {
|
|
|
2431
2429
|
* @returns {Observable<any>} Observable that emits the newly created document.
|
|
2432
2430
|
*/
|
|
2433
2431
|
create(entity) {
|
|
2434
|
-
let headers = new HttpHeaders({ 'Authorization': `Bearer
|
|
2432
|
+
let headers = new HttpHeaders({ 'Authorization': `Bearer cf04573e-b46b-44ef-af37-c1a08da579af` });
|
|
2435
2433
|
return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, entity, { headers }).pipe(tap((newEntity) => this.documentStore.add(newEntity)));
|
|
2436
2434
|
}
|
|
2437
2435
|
/**
|
|
@@ -5598,11 +5596,131 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
5598
5596
|
}]
|
|
5599
5597
|
}], ctorParameters: () => [{ type: DocumentHistoryStyleService }, { type: i2.HttpClient }] });
|
|
5600
5598
|
|
|
5599
|
+
class DocumentActionsService {
|
|
5600
|
+
/**
|
|
5601
|
+
* Calculates the card class based on status
|
|
5602
|
+
* @param currentStatus - The current status of the document
|
|
5603
|
+
* @param statusId - The status ID from API
|
|
5604
|
+
* @returns {string} The CSS class for the card
|
|
5605
|
+
*/
|
|
5606
|
+
calculateCardClass(currentStatus, statusId) {
|
|
5607
|
+
// Use statusId if available, otherwise fall back to currentStatus
|
|
5608
|
+
if (statusId) {
|
|
5609
|
+
return `status-${statusId}-card`;
|
|
5610
|
+
}
|
|
5611
|
+
if (!currentStatus) {
|
|
5612
|
+
return SHARED.CARD_PENDING;
|
|
5613
|
+
}
|
|
5614
|
+
const status = currentStatus.toLowerCase();
|
|
5615
|
+
if (status === SHARED.STATUS_ACCEPTED.toLowerCase() || status === SHARED.STATUS_APPROVED.toLowerCase()) {
|
|
5616
|
+
return SHARED.CARD_ACCEPTED;
|
|
5617
|
+
}
|
|
5618
|
+
else if (status === SHARED.STATUS_REJECTED_LOWERCASE.toLowerCase() || status === SHARED.STATUS_REJECTED.toLowerCase()) {
|
|
5619
|
+
return SHARED.CARD_REJECTED;
|
|
5620
|
+
}
|
|
5621
|
+
else {
|
|
5622
|
+
return SHARED.CARD_PENDING;
|
|
5623
|
+
}
|
|
5624
|
+
}
|
|
5625
|
+
/**
|
|
5626
|
+
* Calculates the reject button class based on status
|
|
5627
|
+
* @param currentStatus - The current status of the document
|
|
5628
|
+
* @param statusId - The status ID from API
|
|
5629
|
+
* @returns {string} The CSS class for the reject button
|
|
5630
|
+
*/
|
|
5631
|
+
calculateRejectButtonClass(currentStatus, statusId) {
|
|
5632
|
+
// Use statusId if available, otherwise fall back to currentStatus
|
|
5633
|
+
if (statusId) {
|
|
5634
|
+
return `status-${statusId}-reject`;
|
|
5635
|
+
}
|
|
5636
|
+
if (!currentStatus) {
|
|
5637
|
+
return SHARED.BUTTON_DEFAULT_REJECT;
|
|
5638
|
+
}
|
|
5639
|
+
const status = currentStatus.toLowerCase();
|
|
5640
|
+
if (status === SHARED.STATUS_ACCEPTED.toLowerCase() || status === SHARED.STATUS_APPROVED.toLowerCase()) {
|
|
5641
|
+
return SHARED.BUTTON_SECONDARY_REJECT;
|
|
5642
|
+
}
|
|
5643
|
+
else if (status === SHARED.STATUS_REJECTED_LOWERCASE.toLowerCase() || status === SHARED.STATUS_REJECTED.toLowerCase()) {
|
|
5644
|
+
return SHARED.BUTTON_PRIMARY_REJECT;
|
|
5645
|
+
}
|
|
5646
|
+
else {
|
|
5647
|
+
return SHARED.BUTTON_DEFAULT_REJECT;
|
|
5648
|
+
}
|
|
5649
|
+
}
|
|
5650
|
+
/**
|
|
5651
|
+
* Calculates the accept button class based on status
|
|
5652
|
+
* @param currentStatus - The current status of the document
|
|
5653
|
+
* @param statusId - The status ID from API
|
|
5654
|
+
* @returns {string} The CSS class for the accept button
|
|
5655
|
+
*/
|
|
5656
|
+
calculateAcceptButtonClass(currentStatus, statusId) {
|
|
5657
|
+
// Use statusId if available, otherwise fall back to currentStatus
|
|
5658
|
+
if (statusId) {
|
|
5659
|
+
return `status-${statusId}-accept`;
|
|
5660
|
+
}
|
|
5661
|
+
if (!currentStatus) {
|
|
5662
|
+
return SHARED.BUTTON_DEFAULT_ACCEPT;
|
|
5663
|
+
}
|
|
5664
|
+
const status = currentStatus.toLowerCase();
|
|
5665
|
+
if (status === SHARED.STATUS_ACCEPTED.toLowerCase() || status === SHARED.STATUS_APPROVED.toLowerCase()) {
|
|
5666
|
+
return SHARED.BUTTON_PRIMARY_ACCEPT;
|
|
5667
|
+
}
|
|
5668
|
+
else if (status === SHARED.STATUS_REJECTED_LOWERCASE.toLowerCase() || status === SHARED.STATUS_REJECTED.toLowerCase()) {
|
|
5669
|
+
return SHARED.BUTTON_SECONDARY_ACCEPT;
|
|
5670
|
+
}
|
|
5671
|
+
else {
|
|
5672
|
+
return SHARED.BUTTON_DEFAULT_ACCEPT;
|
|
5673
|
+
}
|
|
5674
|
+
}
|
|
5675
|
+
/**
|
|
5676
|
+
* Creates an accept action
|
|
5677
|
+
* @param note - The acceptance note
|
|
5678
|
+
* @returns {DocumentAction} The accept action
|
|
5679
|
+
*/
|
|
5680
|
+
createAcceptAction(note) {
|
|
5681
|
+
return {
|
|
5682
|
+
type: SHARED.ACCEPT_ACTION,
|
|
5683
|
+
note: note
|
|
5684
|
+
};
|
|
5685
|
+
}
|
|
5686
|
+
/**
|
|
5687
|
+
* Creates a reject action
|
|
5688
|
+
* @param note - The rejection note
|
|
5689
|
+
* @returns {DocumentAction} The reject action
|
|
5690
|
+
*/
|
|
5691
|
+
createRejectAction(note) {
|
|
5692
|
+
return {
|
|
5693
|
+
type: SHARED.REJECT_ACTION,
|
|
5694
|
+
note: note
|
|
5695
|
+
};
|
|
5696
|
+
}
|
|
5697
|
+
/**
|
|
5698
|
+
* Creates a delete action
|
|
5699
|
+
* @returns {DocumentAction} The delete action
|
|
5700
|
+
*/
|
|
5701
|
+
createDeleteAction() {
|
|
5702
|
+
return {
|
|
5703
|
+
type: SHARED.DELETE_ACTION
|
|
5704
|
+
};
|
|
5705
|
+
}
|
|
5706
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentActionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5707
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentActionsService, providedIn: 'root' });
|
|
5708
|
+
}
|
|
5709
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentActionsService, decorators: [{
|
|
5710
|
+
type: Injectable,
|
|
5711
|
+
args: [{
|
|
5712
|
+
providedIn: 'root'
|
|
5713
|
+
}]
|
|
5714
|
+
}] });
|
|
5715
|
+
|
|
5601
5716
|
/**
|
|
5602
5717
|
* Component for displaying document history in a timeline format.
|
|
5603
5718
|
*/
|
|
5604
5719
|
class DocumentHistoryComponent {
|
|
5605
5720
|
documentHistoryService;
|
|
5721
|
+
documentViewerService;
|
|
5722
|
+
documentActionsService;
|
|
5723
|
+
confirmationService;
|
|
5606
5724
|
/**
|
|
5607
5725
|
* Input data for document history sections
|
|
5608
5726
|
*/
|
|
@@ -5611,6 +5729,30 @@ class DocumentHistoryComponent {
|
|
|
5611
5729
|
* Whether to show the history component
|
|
5612
5730
|
*/
|
|
5613
5731
|
showHistory = false;
|
|
5732
|
+
/**
|
|
5733
|
+
* The context ID for API calls
|
|
5734
|
+
*/
|
|
5735
|
+
contextId;
|
|
5736
|
+
/**
|
|
5737
|
+
* The selected document for actions
|
|
5738
|
+
*/
|
|
5739
|
+
selectedDocument;
|
|
5740
|
+
/**
|
|
5741
|
+
* Event emitted when change document type is requested
|
|
5742
|
+
*/
|
|
5743
|
+
changeDocumentTypeRequested = new EventEmitter();
|
|
5744
|
+
/**
|
|
5745
|
+
* Event emitted when delete task is requested
|
|
5746
|
+
*/
|
|
5747
|
+
deleteTaskRequested = new EventEmitter();
|
|
5748
|
+
/**
|
|
5749
|
+
* Event emitted when a document from history is selected
|
|
5750
|
+
*/
|
|
5751
|
+
documentSelected = new EventEmitter();
|
|
5752
|
+
/**
|
|
5753
|
+
* Reference to the document actions component
|
|
5754
|
+
*/
|
|
5755
|
+
documentActionsComponent;
|
|
5614
5756
|
/**
|
|
5615
5757
|
* Active accordion index for controlling expand/collapse
|
|
5616
5758
|
*/
|
|
@@ -5619,8 +5761,27 @@ class DocumentHistoryComponent {
|
|
|
5619
5761
|
* Whether the accordion is expanded
|
|
5620
5762
|
*/
|
|
5621
5763
|
isAccordionExpanded = true;
|
|
5622
|
-
|
|
5764
|
+
/**
|
|
5765
|
+
* Whether the actions dropdown menu is visible
|
|
5766
|
+
*/
|
|
5767
|
+
showActionsMenu = false;
|
|
5768
|
+
/**
|
|
5769
|
+
* Whether to show the change document type content
|
|
5770
|
+
*/
|
|
5771
|
+
showChangeDocumentType = false;
|
|
5772
|
+
constructor(documentHistoryService, documentViewerService, documentActionsService, confirmationService) {
|
|
5623
5773
|
this.documentHistoryService = documentHistoryService;
|
|
5774
|
+
this.documentViewerService = documentViewerService;
|
|
5775
|
+
this.documentActionsService = documentActionsService;
|
|
5776
|
+
this.confirmationService = confirmationService;
|
|
5777
|
+
}
|
|
5778
|
+
/**
|
|
5779
|
+
* Handles changes to input properties
|
|
5780
|
+
*/
|
|
5781
|
+
ngOnChanges(changes) {
|
|
5782
|
+
if (changes['historyData'] && this.historyData) {
|
|
5783
|
+
this.processHistoryData();
|
|
5784
|
+
}
|
|
5624
5785
|
}
|
|
5625
5786
|
/**
|
|
5626
5787
|
* Handle accordion open event
|
|
@@ -5651,7 +5812,7 @@ class DocumentHistoryComponent {
|
|
|
5651
5812
|
* Process history data to add computed properties
|
|
5652
5813
|
*/
|
|
5653
5814
|
get processedHistoryData() {
|
|
5654
|
-
return this.
|
|
5815
|
+
return this._processedHistoryData;
|
|
5655
5816
|
}
|
|
5656
5817
|
/**
|
|
5657
5818
|
* Downloads a document when clicked
|
|
@@ -5661,16 +5822,187 @@ class DocumentHistoryComponent {
|
|
|
5661
5822
|
downloadDocument(documentUrl, docName) {
|
|
5662
5823
|
this.documentHistoryService.downloadDocument(documentUrl, docName);
|
|
5663
5824
|
}
|
|
5664
|
-
|
|
5665
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentHistoryComponent, isStandalone: false, selector: "document-history", inputs: { historyData: "historyData", showHistory: "showHistory" }, ngImport: i0, template: "<div class=\"document-history-container\" *ngIf=\"showHistory && historyData.length > 0\">\r\n <div class=\"history-sections\">\r\n <div class=\"history-section\" *ngFor=\"let section of processedHistoryData\">\r\n <div *ngIf=\"section.header === 'Initial Request' && section.hasValidContent\" \r\n class=\"initial-request-section\"\r\n [ngClass]=\"section.accordionClass\">\r\n <p-accordion [activeIndex]=\"activeAccordionIndex\" \r\n (onOpen)=\"onAccordionOpen()\" \r\n (onClose)=\"onAccordionClose()\">\r\n <p-accordionTab [header]=\"section.header\">\r\n <div class=\"history-timeline\" *ngIf=\"section.hasValidContent\">\r\n <div class=\"timeline-item\" *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-card\" [ngClass]=\"item.actionBgColor\">\r\n <div class=\"card-header\">\r\n <div class=\"action-info\">\r\n <div class=\"action-icon\" [ngClass]=\"item.actionIconBgColor\">\r\n <i [class]=\"item.actionIcon\"></i>\r\n </div>\r\n <span class=\"action-label\" [ngClass]=\"item.actionColor\">\r\n {{ item.label }}\r\n </span>\r\n </div>\r\n <div class=\"timestamp\">\r\n {{ item.dateTime }}\r\n </div>\r\n </div>\r\n \r\n <!-- Description -->\r\n <div class=\"card-description\" *ngIf=\"item.requestDescription\">\r\n <p class=\"description-text\">{{ item.requestDescription ?? 'No Request' }}</p>\r\n </div>\r\n \r\n <!-- Document details if URL exists -->\r\n <div class=\"document-details\" *ngIf=\"item.documentUrl\">\r\n <div class=\"document-card\">\r\n <div class=\"document-info\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <div class=\"document-text\">\r\n <div class=\"document-title\">Document</div>\r\n <div class=\"document-filename clickable\" \r\n (click)=\"downloadDocument(item.documentUrl!, item.docName)\"\r\n title=\"Click to download\">\r\n {{ item.docName || 'Document' }}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"document-actions\">\r\n <button class=\"action-btn download-btn\" \r\n title=\"Download\"\r\n (click)=\"downloadDocument(item.documentUrl!, item.docName)\">\r\n <i class=\"pi pi-download\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n <!-- User information -->\r\n <div class=\"user-info\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- Show message if no valid content -->\r\n <div class=\"no-content-message\" *ngIf=\"!section.hasValidContent\">\r\n <p>No initial request details available.</p>\r\n </div>\r\n </p-accordionTab>\r\n </p-accordion>\r\n </div>\r\n \r\n <!-- Document History as regular timeline -->\r\n <div *ngIf=\"section.header !== 'Initial Request'\" class=\"document-history-section\">\r\n <div class=\"section-header\" *ngIf=\"section.header\">\r\n <h4 class=\"section-title\">{{ section.header }}</h4>\r\n </div>\r\n \r\n <div class=\"history-timeline\">\r\n <div class=\"timeline-item\" *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-card\" [ngClass]=\"item.actionBgColor\">\r\n <!-- Header with icon and timestamp -->\r\n <div class=\"card-header\">\r\n <div class=\"action-info\">\r\n <div class=\"action-icon\" [ngClass]=\"item.actionIconBgColor\">\r\n <i [class]=\"item.actionIcon\"></i>\r\n </div>\r\n <span class=\"action-label\" [ngClass]=\"item.actionColor\">\r\n {{ item.label }}\r\n </span>\r\n </div>\r\n <div class=\"timestamp\">\r\n {{ item.dateTime }}\r\n </div>\r\n </div>\r\n \r\n <!-- Description -->\r\n <div class=\"card-description\" *ngIf=\"item.requestDescription\">\r\n <p class=\"description-text\">{{ item.requestDescription }}</p>\r\n </div>\r\n \r\n <!-- Document details if URL exists -->\r\n <div class=\"document-details\" *ngIf=\"item.documentUrl\">\r\n <div class=\"document-card\">\r\n <div class=\"document-info\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <div class=\"document-text\">\r\n <div class=\"document-title\">Document</div>\r\n <div class=\"document-filename clickable\" \r\n (click)=\"downloadDocument(item.documentUrl!, item.docName)\"\r\n title=\"Click to download\">\r\n {{ item.docName || 'Document' }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n <!-- User information -->\r\n <div class=\"user-info\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>", styles: [".document-history-container{padding:.75rem;background:#fff;border-radius:8px;box-shadow:0 2px 4px #0000001a;max-height:none;overflow-y:auto;min-width:0}.document-history-container .history-header{margin-bottom:1rem}.document-history-container .history-header .history-title{font-size:1.25rem;font-weight:600;color:#374151;margin:0}.document-history-container .history-sections .history-section{margin-bottom:1.5rem}.document-history-container .history-sections .history-section .initial-request-section{margin-bottom:1rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{background:#fff;border-top:1px solid;border-top-left-radius:8px;border-top-right-radius:8px;border-bottom:none;padding:.75rem 1rem;font-weight:600;color:#1f2937;font-size:1rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link:focus{box-shadow:none}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link .p-accordion-header-icon{color:#6b7280;font-size:.875rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header.p-highlight .p-accordion-header-link{background:#fff}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content{background:#fff;border:1px solid;border-top:none;border-radius:0 0 8px 8px;padding:1rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item{margin-bottom:0}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:.75rem;border-right:3px solid}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon{background:#7d879b;color:#fff;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon i{font-size:14px}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-label{color:#1f2937;font-weight:600;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .timestamp{color:#6b7280;font-size:.75rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-description .description-text{color:#374151;line-height:1.5;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .user-info .user-name{color:#1f2937;font-weight:500;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .user-info .user-role{color:#6b7280;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section.document-requested ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#d1d5db}.document-history-container .history-sections .history-section .initial-request-section.document-requested ::ng-deep .p-accordion .p-accordion-content{border-color:#d1d5db}.document-history-container .history-sections .history-section .initial-request-section.document-uploaded ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#86efac}.document-history-container .history-sections .history-section .initial-request-section.document-uploaded ::ng-deep .p-accordion .p-accordion-content{border-color:#86efac}.document-history-container .history-sections .history-section .initial-request-section.document-rejected ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#fca5a5}.document-history-container .history-sections .history-section .initial-request-section.document-rejected ::ng-deep .p-accordion .p-accordion-content{border-color:#fca5a5}.document-history-container .history-sections .history-section .initial-request-section.document-accepted ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#86efac}.document-history-container .history-sections .history-section .initial-request-section.document-accepted ::ng-deep .p-accordion .p-accordion-content{border-color:#86efac}.document-history-container .history-sections .history-section .document-history-section .section-header{margin-bottom:.75rem}.document-history-container .history-sections .history-section .document-history-section .section-header .section-title{font-size:1.25rem;font-weight:500;color:#374151;margin:0}.document-history-container .history-sections .history-section .history-timeline .timeline-item{margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card{border-radius:8px;border:1px solid;padding:1rem;position:relative;border-right:3px solid}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-green-50{background-color:#f0fdf4;border-color:#bbf7d0;border-right-color:#10b981}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-red-50{background-color:#fef2f2;border-color:#fecaca;border-right-color:#ef4444}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-blue-50{background-color:#eff6ff;border-color:#bfdbfe;border-right-color:#3b82f6}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-gray-50{background-color:#f8fafc;border-color:#e2e8f0;border-right-color:#6b7280}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info{display:flex;align-items:center;gap:.5rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon i{font-size:14px}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-label{font-weight:600;font-size:.875rem;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .timestamp{font-size:.75rem;color:#6b7280}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-description{margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-description .description-text{margin:0;color:#374151;font-size:.875rem;line-height:1.4;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details{margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card{background:#fff;border-radius:6px;padding:.75rem;display:flex;justify-content:space-between;align-items:center;border:1px solid #e5e7eb}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info{display:flex;align-items:center;gap:.5rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-icon{color:#3b82f6;font-size:1.25rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-title{font-weight:500;color:#374151;font-size:.875rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename{color:#3b82f6;font-size:.75rem;word-break:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename.clickable{cursor:pointer;text-decoration:underline}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename.clickable:hover{color:#2563eb;text-decoration:none}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions{display:flex;gap:.25rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn{width:24px;height:24px;border:none;border-radius:4px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.edit-btn{background:#3b82f6;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.edit-btn:hover{background:#2563eb}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.delete-btn{background:#ef4444;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.delete-btn:hover{background:#dc2626}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.download-btn{background:#10b981;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.download-btn:hover{background:#059669}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info{text-align:right;font-size:.75rem;color:#374151}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info .user-name{font-weight:500;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info .user-role{color:#6b7280;word-wrap:break-word;overflow-wrap:break-word}.text-green-600{color:#059669}.text-red-600{color:#dc2626}.text-blue-600{color:#2563eb}.text-gray-600{color:#4b5563}.bg-green-50{background-color:#f0fdf4}.bg-red-50{background-color:#fef2f2}.bg-blue-50{background-color:#eff6ff}.bg-gray-50{background-color:#f8fafc}.border-green-200{border-color:#bbf7d0}.border-red-200{border-color:#fecaca}.border-blue-200{border-color:#bfdbfe}.border-gray-200{border-color:#e2e8f0}.icon-bg-green{background-color:#10b981}.icon-bg-red{background-color:#ef4444}.icon-bg-blue{background-color:#3b82f6}.icon-bg-gray{background-color:#6b7280}.no-content-message{text-align:center;padding:2rem;color:#6b7280;font-style:italic}.no-content-message p{margin:0;font-size:.875rem}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.Accordion, selector: "p-accordion", inputs: ["multiple", "style", "styleClass", "expandIcon", "collapseIcon", "activeIndex", "selectOnFocus", "headerAriaLevel"], outputs: ["onClose", "onOpen", "activeIndexChange"] }, { kind: "component", type: i3$1.AccordionTab, selector: "p-accordionTab", inputs: ["id", "header", "headerStyle", "tabStyle", "contentStyle", "tabStyleClass", "headerStyleClass", "contentStyleClass", "disabled", "cache", "transitionOptions", "iconPos", "selected", "headerAriaLevel"], outputs: ["selectedChange"] }] });
|
|
5825
|
+
/**
|
|
5826
|
+
* Get alert count for the alerts section
|
|
5827
|
+
*/
|
|
5828
|
+
getAlertCount() {
|
|
5829
|
+
// This could be enhanced to get actual alert count from a service
|
|
5830
|
+
return 3; // Placeholder value matching the image
|
|
5831
|
+
}
|
|
5832
|
+
/**
|
|
5833
|
+
* Get CSS class for event card based on action type
|
|
5834
|
+
*/
|
|
5835
|
+
getEventCardClass(label) {
|
|
5836
|
+
const lowerLabel = label.toLowerCase();
|
|
5837
|
+
if (lowerLabel.includes('requested')) {
|
|
5838
|
+
return 'event-requested';
|
|
5839
|
+
}
|
|
5840
|
+
else if (lowerLabel.includes('accepted') || lowerLabel.includes('upload')) {
|
|
5841
|
+
return 'event-accepted';
|
|
5842
|
+
}
|
|
5843
|
+
else if (lowerLabel.includes('rejected')) {
|
|
5844
|
+
return 'event-rejected';
|
|
5845
|
+
}
|
|
5846
|
+
return 'event-default';
|
|
5847
|
+
}
|
|
5848
|
+
/**
|
|
5849
|
+
* Get CSS class for event icon based on action type
|
|
5850
|
+
*/
|
|
5851
|
+
getEventIconClass(label) {
|
|
5852
|
+
const lowerLabel = label.toLowerCase();
|
|
5853
|
+
console.log('label', label);
|
|
5854
|
+
if (lowerLabel.includes('requested')) {
|
|
5855
|
+
return 'icon-requested';
|
|
5856
|
+
}
|
|
5857
|
+
else if (lowerLabel.includes('accepted') || lowerLabel.includes('uploaded')) {
|
|
5858
|
+
return 'icon-accepted';
|
|
5859
|
+
}
|
|
5860
|
+
else if (lowerLabel.includes('rejected')) {
|
|
5861
|
+
return 'icon-rejected';
|
|
5862
|
+
}
|
|
5863
|
+
return 'icon-default';
|
|
5864
|
+
}
|
|
5865
|
+
/**
|
|
5866
|
+
* Get the appropriate icon for the event
|
|
5867
|
+
* @param label - The event label
|
|
5868
|
+
* @returns {string} The icon class
|
|
5869
|
+
*/
|
|
5870
|
+
getEventIcon(label) {
|
|
5871
|
+
const lowerLabel = label.toLowerCase();
|
|
5872
|
+
if (lowerLabel.includes('uploaded')) {
|
|
5873
|
+
return 'pi pi-check-circle';
|
|
5874
|
+
}
|
|
5875
|
+
else if (lowerLabel.includes('requested')) {
|
|
5876
|
+
return 'pi pi-folder-plus';
|
|
5877
|
+
}
|
|
5878
|
+
else if (lowerLabel.includes('accepted') || lowerLabel.includes('approved')) {
|
|
5879
|
+
return 'pi pi-check-circle';
|
|
5880
|
+
}
|
|
5881
|
+
else if (lowerLabel.includes('rejected')) {
|
|
5882
|
+
return 'pi pi-times';
|
|
5883
|
+
}
|
|
5884
|
+
return 'pi pi-file';
|
|
5885
|
+
}
|
|
5886
|
+
/**
|
|
5887
|
+
* Toggle the actions dropdown menu
|
|
5888
|
+
*/
|
|
5889
|
+
toggleActionsMenu() {
|
|
5890
|
+
this.showActionsMenu = !this.showActionsMenu;
|
|
5891
|
+
}
|
|
5892
|
+
/**
|
|
5893
|
+
* Close the actions dropdown menu
|
|
5894
|
+
*/
|
|
5895
|
+
closeActionsMenu() {
|
|
5896
|
+
this.showActionsMenu = false;
|
|
5897
|
+
}
|
|
5898
|
+
/**
|
|
5899
|
+
* Handle change document type action
|
|
5900
|
+
*/
|
|
5901
|
+
onChangeDocumentType() {
|
|
5902
|
+
this.closeActionsMenu();
|
|
5903
|
+
this.showChangeDocumentType = true;
|
|
5904
|
+
this.changeDocumentTypeRequested.emit();
|
|
5905
|
+
}
|
|
5906
|
+
/**
|
|
5907
|
+
* Close the change document type form
|
|
5908
|
+
*/
|
|
5909
|
+
closeChangeDocumentType() {
|
|
5910
|
+
this.showChangeDocumentType = false;
|
|
5911
|
+
}
|
|
5912
|
+
/**
|
|
5913
|
+
* Handle delete task action
|
|
5914
|
+
*/
|
|
5915
|
+
onDeleteTask() {
|
|
5916
|
+
this.closeActionsMenu();
|
|
5917
|
+
if (this.selectedDocument && this.contextId) {
|
|
5918
|
+
const documentName = this.selectedDocument?.docName || 'this document';
|
|
5919
|
+
ConfirmationDialogComponent.confirmDelete(this.confirmationService, documentName, () => {
|
|
5920
|
+
const deleteAction = this.documentActionsService.createDeleteAction();
|
|
5921
|
+
this.documentViewerService.handleDocumentAction(deleteAction, this.contextId);
|
|
5922
|
+
this.deleteTaskRequested.emit();
|
|
5923
|
+
}, () => { });
|
|
5924
|
+
}
|
|
5925
|
+
}
|
|
5926
|
+
/**
|
|
5927
|
+
* Set reference to document actions component
|
|
5928
|
+
*/
|
|
5929
|
+
setDocumentActionsComponent(component) {
|
|
5930
|
+
this.documentActionsComponent = component;
|
|
5931
|
+
}
|
|
5932
|
+
/**
|
|
5933
|
+
* Handles document selection from history
|
|
5934
|
+
* @param document - The selected document from history
|
|
5935
|
+
*/
|
|
5936
|
+
onDocumentClick(document) {
|
|
5937
|
+
if (document && document.documentUrl && document.docName) {
|
|
5938
|
+
this.documentSelected.emit(document);
|
|
5939
|
+
}
|
|
5940
|
+
}
|
|
5941
|
+
/**
|
|
5942
|
+
* Processed history data with document lists
|
|
5943
|
+
*/
|
|
5944
|
+
_processedHistoryData = [];
|
|
5945
|
+
/**
|
|
5946
|
+
* Processes history data to include document lists for each item
|
|
5947
|
+
*/
|
|
5948
|
+
processHistoryData() {
|
|
5949
|
+
this._processedHistoryData = this.historyData.map(section => ({
|
|
5950
|
+
...section,
|
|
5951
|
+
list: section.list.map(item => ({
|
|
5952
|
+
...item,
|
|
5953
|
+
documentList: this.getValidDocuments(item),
|
|
5954
|
+
eventCardClass: this.getEventCardClass(item.label),
|
|
5955
|
+
eventIconClass: this.getEventIconClass(item.label),
|
|
5956
|
+
eventIcon: this.getEventIcon(item.label)
|
|
5957
|
+
}))
|
|
5958
|
+
}));
|
|
5959
|
+
}
|
|
5960
|
+
/**
|
|
5961
|
+
* Gets the list of valid documents for a history item
|
|
5962
|
+
* @param item - The history item
|
|
5963
|
+
* @returns Array of valid documents
|
|
5964
|
+
*/
|
|
5965
|
+
getValidDocuments(item) {
|
|
5966
|
+
if (item.documents && Array.isArray(item.documents)) {
|
|
5967
|
+
return item.documents.filter((doc) => doc && doc.docName && doc.documentUrl && doc.contentType);
|
|
5968
|
+
}
|
|
5969
|
+
return [];
|
|
5970
|
+
}
|
|
5971
|
+
/**
|
|
5972
|
+
* Listen for clicks outside the dropdown to close it
|
|
5973
|
+
*/
|
|
5974
|
+
onDocumentClickOutside(event) {
|
|
5975
|
+
if (this.showActionsMenu) {
|
|
5976
|
+
const target = event.target;
|
|
5977
|
+
const actionsMenu = target.closest('.actions-menu');
|
|
5978
|
+
if (!actionsMenu) {
|
|
5979
|
+
this.closeActionsMenu();
|
|
5980
|
+
}
|
|
5981
|
+
}
|
|
5982
|
+
}
|
|
5983
|
+
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 }], target: i0.ɵɵFactoryTarget.Component });
|
|
5984
|
+
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" }, outputs: { changeDocumentTypeRequested: "changeDocumentTypeRequested", deleteTaskRequested: "deleteTaskRequested", documentSelected: "documentSelected" }, host: { listeners: { "document:click": "onDocumentClickOutside($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-review-container\" *ngIf=\"showHistory && historyData.length > 0\">\n <!-- Header Section -->\n <div class=\"review-header\">\n <h2 class=\"review-title\">Document Preview</h2>\n <div class=\"actions-menu\">\n <button class=\"actions-btn\" (click)=\"toggleActionsMenu()\" [class.active]=\"showActionsMenu\">\n Actions\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\n </button>\n\n <!-- Actions Dropdown Menu -->\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\" (click)=\"$event.stopPropagation()\">\n <div class=\"dropdown-item\" (click)=\"onChangeDocumentType()\">\n <span>Change document type</span>\n </div>\n <div class=\"dropdown-item\" (click)=\"onDeleteTask()\">\n <span>Delete task</span>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Document Actions Section (Accept/Reject buttons) -->\n <ng-content select=\"document-actions\"></ng-content>\n\n <!-- Alerts Section -->\n <!-- <div class=\"alerts-section\">\n <div class=\"alert-card\">\n <div class=\"alert-header\">\n <i class=\"pi pi-exclamation-triangle alert-icon\"></i>\n <span class=\"alert-text\">Alerts</span>\n <div class=\"alert-badge\">\n <span class=\"alert-count\">{{ getAlertCount() }}</span>\n <i class=\"pi pi-chevron-right\"></i>\n </div>\n </div>\n </div>\n </div> -->\n\n <!-- Timeline Section -->\n <div class=\"timeline-section\">\n <h3 class=\"timeline-title\">Timeline</h3>\n <div class=\"timeline-container\">\n <div class=\"timeline-item\" *ngFor=\"let section of processedHistoryData\">\n <div class=\"timeline-event mb-2\" *ngFor=\"let item of section.list; let i = index\">\n <div class=\"event-card\" [ngClass]=\"item.eventCardClass\">\n <!-- Event Header -->\n <div class=\"event-header\">\n <div class=\"event-info\">\n <div class=\"event-icon\" [ngClass]=\"item.eventIconClass\">\n <i [class]=\"item.eventIcon\"></i>\n </div>\n <span class=\"event-label\">{{ item.label }}</span>\n </div>\n <div class=\"event-timestamp\">{{ item.dateTime }}</div>\n </div>\n <!-- User Information -->\n <div class=\"event-user mb-2\">\n <span class=\"user-name\">{{ item.userName }}</span>\n <span class=\"user-role\">({{ item.userRole }})</span>\n </div>\n <!-- Event Description -->\n <div class=\"event-description\" *ngIf=\"item.requestDescription\">\n <!-- Show as list item only for requested documents -->\n <ul class=\"event-description-list\" *ngIf=\"item.label.toLowerCase().includes('requested')\">\n <li class=\"event-description-item\">{{ item.requestDescription }}</li>\n </ul>\n <!-- Show as paragraph for other document types -->\n <p *ngIf=\"!item.label.toLowerCase().includes('requested')\">{{ item.requestDescription }}</p>\n </div>\n\n <!-- Document Upload Cards -->\n <div class=\"document-uploads\" *ngIf=\"item.documentList && item.documentList.length > 0\">\n <div class=\"uploaded-documents\">\n <div class=\"document-card\" *ngFor=\"let doc of item.documentList\" (click)=\"onDocumentClick(doc)\">\n <div class=\"document-icon\">\n <i class=\"pi pi-file\"></i>\n </div>\n <span class=\"document-name\">{{ doc.docName }}</span>\n </div>\n </div>\n </div>\n\n\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Content for Change Document Type functionality -->\n <ng-content *ngIf=\"showChangeDocumentType\"></ng-content>\n</div>", styles: [".document-review-container{background:#fff;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;margin-bottom:1.5rem;padding-bottom:1rem;border-bottom:1px solid #e5e7eb}.document-review-container .review-header .review-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin:0}.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:.5rem 1rem;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 .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{border-left:4px solid #3b82f6;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{border-left:4px solid #10b981;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{border-left:4px solid #ef4444;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}}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
5666
5985
|
}
|
|
5667
5986
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryComponent, decorators: [{
|
|
5668
5987
|
type: Component,
|
|
5669
|
-
args: [{ selector: 'document-history', standalone: false, template: "<div class=\"document-history-container\" *ngIf=\"showHistory && historyData.length > 0\">\r\n <div class=\"history-sections\">\r\n <div class=\"history-section\" *ngFor=\"let section of processedHistoryData\">\r\n <div *ngIf=\"section.header === 'Initial Request' && section.hasValidContent\" \r\n class=\"initial-request-section\"\r\n [ngClass]=\"section.accordionClass\">\r\n <p-accordion [activeIndex]=\"activeAccordionIndex\" \r\n (onOpen)=\"onAccordionOpen()\" \r\n (onClose)=\"onAccordionClose()\">\r\n <p-accordionTab [header]=\"section.header\">\r\n <div class=\"history-timeline\" *ngIf=\"section.hasValidContent\">\r\n <div class=\"timeline-item\" *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-card\" [ngClass]=\"item.actionBgColor\">\r\n <div class=\"card-header\">\r\n <div class=\"action-info\">\r\n <div class=\"action-icon\" [ngClass]=\"item.actionIconBgColor\">\r\n <i [class]=\"item.actionIcon\"></i>\r\n </div>\r\n <span class=\"action-label\" [ngClass]=\"item.actionColor\">\r\n {{ item.label }}\r\n </span>\r\n </div>\r\n <div class=\"timestamp\">\r\n {{ item.dateTime }}\r\n </div>\r\n </div>\r\n \r\n <!-- Description -->\r\n <div class=\"card-description\" *ngIf=\"item.requestDescription\">\r\n <p class=\"description-text\">{{ item.requestDescription ?? 'No Request' }}</p>\r\n </div>\r\n \r\n <!-- Document details if URL exists -->\r\n <div class=\"document-details\" *ngIf=\"item.documentUrl\">\r\n <div class=\"document-card\">\r\n <div class=\"document-info\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <div class=\"document-text\">\r\n <div class=\"document-title\">Document</div>\r\n <div class=\"document-filename clickable\" \r\n (click)=\"downloadDocument(item.documentUrl!, item.docName)\"\r\n title=\"Click to download\">\r\n {{ item.docName || 'Document' }}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"document-actions\">\r\n <button class=\"action-btn download-btn\" \r\n title=\"Download\"\r\n (click)=\"downloadDocument(item.documentUrl!, item.docName)\">\r\n <i class=\"pi pi-download\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n <!-- User information -->\r\n <div class=\"user-info\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- Show message if no valid content -->\r\n <div class=\"no-content-message\" *ngIf=\"!section.hasValidContent\">\r\n <p>No initial request details available.</p>\r\n </div>\r\n </p-accordionTab>\r\n </p-accordion>\r\n </div>\r\n \r\n <!-- Document History as regular timeline -->\r\n <div *ngIf=\"section.header !== 'Initial Request'\" class=\"document-history-section\">\r\n <div class=\"section-header\" *ngIf=\"section.header\">\r\n <h4 class=\"section-title\">{{ section.header }}</h4>\r\n </div>\r\n \r\n <div class=\"history-timeline\">\r\n <div class=\"timeline-item\" *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-card\" [ngClass]=\"item.actionBgColor\">\r\n <!-- Header with icon and timestamp -->\r\n <div class=\"card-header\">\r\n <div class=\"action-info\">\r\n <div class=\"action-icon\" [ngClass]=\"item.actionIconBgColor\">\r\n <i [class]=\"item.actionIcon\"></i>\r\n </div>\r\n <span class=\"action-label\" [ngClass]=\"item.actionColor\">\r\n {{ item.label }}\r\n </span>\r\n </div>\r\n <div class=\"timestamp\">\r\n {{ item.dateTime }}\r\n </div>\r\n </div>\r\n \r\n <!-- Description -->\r\n <div class=\"card-description\" *ngIf=\"item.requestDescription\">\r\n <p class=\"description-text\">{{ item.requestDescription }}</p>\r\n </div>\r\n \r\n <!-- Document details if URL exists -->\r\n <div class=\"document-details\" *ngIf=\"item.documentUrl\">\r\n <div class=\"document-card\">\r\n <div class=\"document-info\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <div class=\"document-text\">\r\n <div class=\"document-title\">Document</div>\r\n <div class=\"document-filename clickable\" \r\n (click)=\"downloadDocument(item.documentUrl!, item.docName)\"\r\n title=\"Click to download\">\r\n {{ item.docName || 'Document' }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n <!-- User information -->\r\n <div class=\"user-info\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>", styles: [".document-history-container{padding:.75rem;background:#fff;border-radius:8px;box-shadow:0 2px 4px #0000001a;max-height:none;overflow-y:auto;min-width:0}.document-history-container .history-header{margin-bottom:1rem}.document-history-container .history-header .history-title{font-size:1.25rem;font-weight:600;color:#374151;margin:0}.document-history-container .history-sections .history-section{margin-bottom:1.5rem}.document-history-container .history-sections .history-section .initial-request-section{margin-bottom:1rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{background:#fff;border-top:1px solid;border-top-left-radius:8px;border-top-right-radius:8px;border-bottom:none;padding:.75rem 1rem;font-weight:600;color:#1f2937;font-size:1rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link:focus{box-shadow:none}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link .p-accordion-header-icon{color:#6b7280;font-size:.875rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header.p-highlight .p-accordion-header-link{background:#fff}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content{background:#fff;border:1px solid;border-top:none;border-radius:0 0 8px 8px;padding:1rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item{margin-bottom:0}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:.75rem;border-right:3px solid}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon{background:#7d879b;color:#fff;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon i{font-size:14px}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-label{color:#1f2937;font-weight:600;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .timestamp{color:#6b7280;font-size:.75rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-description .description-text{color:#374151;line-height:1.5;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .user-info .user-name{color:#1f2937;font-weight:500;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .user-info .user-role{color:#6b7280;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section.document-requested ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#d1d5db}.document-history-container .history-sections .history-section .initial-request-section.document-requested ::ng-deep .p-accordion .p-accordion-content{border-color:#d1d5db}.document-history-container .history-sections .history-section .initial-request-section.document-uploaded ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#86efac}.document-history-container .history-sections .history-section .initial-request-section.document-uploaded ::ng-deep .p-accordion .p-accordion-content{border-color:#86efac}.document-history-container .history-sections .history-section .initial-request-section.document-rejected ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#fca5a5}.document-history-container .history-sections .history-section .initial-request-section.document-rejected ::ng-deep .p-accordion .p-accordion-content{border-color:#fca5a5}.document-history-container .history-sections .history-section .initial-request-section.document-accepted ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#86efac}.document-history-container .history-sections .history-section .initial-request-section.document-accepted ::ng-deep .p-accordion .p-accordion-content{border-color:#86efac}.document-history-container .history-sections .history-section .document-history-section .section-header{margin-bottom:.75rem}.document-history-container .history-sections .history-section .document-history-section .section-header .section-title{font-size:1.25rem;font-weight:500;color:#374151;margin:0}.document-history-container .history-sections .history-section .history-timeline .timeline-item{margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card{border-radius:8px;border:1px solid;padding:1rem;position:relative;border-right:3px solid}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-green-50{background-color:#f0fdf4;border-color:#bbf7d0;border-right-color:#10b981}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-red-50{background-color:#fef2f2;border-color:#fecaca;border-right-color:#ef4444}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-blue-50{background-color:#eff6ff;border-color:#bfdbfe;border-right-color:#3b82f6}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-gray-50{background-color:#f8fafc;border-color:#e2e8f0;border-right-color:#6b7280}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info{display:flex;align-items:center;gap:.5rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon i{font-size:14px}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-label{font-weight:600;font-size:.875rem;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .timestamp{font-size:.75rem;color:#6b7280}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-description{margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-description .description-text{margin:0;color:#374151;font-size:.875rem;line-height:1.4;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details{margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card{background:#fff;border-radius:6px;padding:.75rem;display:flex;justify-content:space-between;align-items:center;border:1px solid #e5e7eb}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info{display:flex;align-items:center;gap:.5rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-icon{color:#3b82f6;font-size:1.25rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-title{font-weight:500;color:#374151;font-size:.875rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename{color:#3b82f6;font-size:.75rem;word-break:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename.clickable{cursor:pointer;text-decoration:underline}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename.clickable:hover{color:#2563eb;text-decoration:none}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions{display:flex;gap:.25rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn{width:24px;height:24px;border:none;border-radius:4px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.edit-btn{background:#3b82f6;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.edit-btn:hover{background:#2563eb}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.delete-btn{background:#ef4444;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.delete-btn:hover{background:#dc2626}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.download-btn{background:#10b981;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.download-btn:hover{background:#059669}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info{text-align:right;font-size:.75rem;color:#374151}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info .user-name{font-weight:500;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info .user-role{color:#6b7280;word-wrap:break-word;overflow-wrap:break-word}.text-green-600{color:#059669}.text-red-600{color:#dc2626}.text-blue-600{color:#2563eb}.text-gray-600{color:#4b5563}.bg-green-50{background-color:#f0fdf4}.bg-red-50{background-color:#fef2f2}.bg-blue-50{background-color:#eff6ff}.bg-gray-50{background-color:#f8fafc}.border-green-200{border-color:#bbf7d0}.border-red-200{border-color:#fecaca}.border-blue-200{border-color:#bfdbfe}.border-gray-200{border-color:#e2e8f0}.icon-bg-green{background-color:#10b981}.icon-bg-red{background-color:#ef4444}.icon-bg-blue{background-color:#3b82f6}.icon-bg-gray{background-color:#6b7280}.no-content-message{text-align:center;padding:2rem;color:#6b7280;font-style:italic}.no-content-message p{margin:0;font-size:.875rem}\n"] }]
|
|
5670
|
-
}], ctorParameters: () => [{ type: DocumentHistoryService }], propDecorators: { historyData: [{
|
|
5988
|
+
args: [{ selector: 'document-history', standalone: false, template: "<div class=\"document-review-container\" *ngIf=\"showHistory && historyData.length > 0\">\n <!-- Header Section -->\n <div class=\"review-header\">\n <h2 class=\"review-title\">Document Preview</h2>\n <div class=\"actions-menu\">\n <button class=\"actions-btn\" (click)=\"toggleActionsMenu()\" [class.active]=\"showActionsMenu\">\n Actions\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\n </button>\n\n <!-- Actions Dropdown Menu -->\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\" (click)=\"$event.stopPropagation()\">\n <div class=\"dropdown-item\" (click)=\"onChangeDocumentType()\">\n <span>Change document type</span>\n </div>\n <div class=\"dropdown-item\" (click)=\"onDeleteTask()\">\n <span>Delete task</span>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Document Actions Section (Accept/Reject buttons) -->\n <ng-content select=\"document-actions\"></ng-content>\n\n <!-- Alerts Section -->\n <!-- <div class=\"alerts-section\">\n <div class=\"alert-card\">\n <div class=\"alert-header\">\n <i class=\"pi pi-exclamation-triangle alert-icon\"></i>\n <span class=\"alert-text\">Alerts</span>\n <div class=\"alert-badge\">\n <span class=\"alert-count\">{{ getAlertCount() }}</span>\n <i class=\"pi pi-chevron-right\"></i>\n </div>\n </div>\n </div>\n </div> -->\n\n <!-- Timeline Section -->\n <div class=\"timeline-section\">\n <h3 class=\"timeline-title\">Timeline</h3>\n <div class=\"timeline-container\">\n <div class=\"timeline-item\" *ngFor=\"let section of processedHistoryData\">\n <div class=\"timeline-event mb-2\" *ngFor=\"let item of section.list; let i = index\">\n <div class=\"event-card\" [ngClass]=\"item.eventCardClass\">\n <!-- Event Header -->\n <div class=\"event-header\">\n <div class=\"event-info\">\n <div class=\"event-icon\" [ngClass]=\"item.eventIconClass\">\n <i [class]=\"item.eventIcon\"></i>\n </div>\n <span class=\"event-label\">{{ item.label }}</span>\n </div>\n <div class=\"event-timestamp\">{{ item.dateTime }}</div>\n </div>\n <!-- User Information -->\n <div class=\"event-user mb-2\">\n <span class=\"user-name\">{{ item.userName }}</span>\n <span class=\"user-role\">({{ item.userRole }})</span>\n </div>\n <!-- Event Description -->\n <div class=\"event-description\" *ngIf=\"item.requestDescription\">\n <!-- Show as list item only for requested documents -->\n <ul class=\"event-description-list\" *ngIf=\"item.label.toLowerCase().includes('requested')\">\n <li class=\"event-description-item\">{{ item.requestDescription }}</li>\n </ul>\n <!-- Show as paragraph for other document types -->\n <p *ngIf=\"!item.label.toLowerCase().includes('requested')\">{{ item.requestDescription }}</p>\n </div>\n\n <!-- Document Upload Cards -->\n <div class=\"document-uploads\" *ngIf=\"item.documentList && item.documentList.length > 0\">\n <div class=\"uploaded-documents\">\n <div class=\"document-card\" *ngFor=\"let doc of item.documentList\" (click)=\"onDocumentClick(doc)\">\n <div class=\"document-icon\">\n <i class=\"pi pi-file\"></i>\n </div>\n <span class=\"document-name\">{{ doc.docName }}</span>\n </div>\n </div>\n </div>\n\n\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Content for Change Document Type functionality -->\n <ng-content *ngIf=\"showChangeDocumentType\"></ng-content>\n</div>", styles: [".document-review-container{background:#fff;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;margin-bottom:1.5rem;padding-bottom:1rem;border-bottom:1px solid #e5e7eb}.document-review-container .review-header .review-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin:0}.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:.5rem 1rem;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 .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{border-left:4px solid #3b82f6;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{border-left:4px solid #10b981;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{border-left:4px solid #ef4444;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}}\n"] }]
|
|
5989
|
+
}], ctorParameters: () => [{ type: DocumentHistoryService }, { type: DocumentViewerService }, { type: DocumentActionsService }, { type: i3.ConfirmationService }], propDecorators: { historyData: [{
|
|
5671
5990
|
type: Input
|
|
5672
5991
|
}], showHistory: [{
|
|
5673
5992
|
type: Input
|
|
5993
|
+
}], contextId: [{
|
|
5994
|
+
type: Input
|
|
5995
|
+
}], selectedDocument: [{
|
|
5996
|
+
type: Input
|
|
5997
|
+
}], changeDocumentTypeRequested: [{
|
|
5998
|
+
type: Output
|
|
5999
|
+
}], deleteTaskRequested: [{
|
|
6000
|
+
type: Output
|
|
6001
|
+
}], documentSelected: [{
|
|
6002
|
+
type: Output
|
|
6003
|
+
}], onDocumentClickOutside: [{
|
|
6004
|
+
type: HostListener,
|
|
6005
|
+
args: ['document:click', ['$event']]
|
|
5674
6006
|
}] } });
|
|
5675
6007
|
|
|
5676
6008
|
/**
|
|
@@ -6384,10 +6716,66 @@ class DocumentZoomService {
|
|
|
6384
6716
|
*/
|
|
6385
6717
|
handleWheelZoom(event, zoomFactor = 0.1) {
|
|
6386
6718
|
event.preventDefault();
|
|
6719
|
+
// Only use deltaY for zoom (vertical wheel movement)
|
|
6387
6720
|
const delta = event.deltaY > 0 ? -1 : 1;
|
|
6388
|
-
const
|
|
6721
|
+
const zoomStep = this.config.zoomStep * zoomFactor;
|
|
6722
|
+
const newZoom = this.currentZoom + (delta * zoomStep);
|
|
6389
6723
|
this.setZoom(newZoom);
|
|
6390
6724
|
}
|
|
6725
|
+
/**
|
|
6726
|
+
* Applies zoom transform to an iframe element
|
|
6727
|
+
* @param iframe - The iframe element to apply zoom to
|
|
6728
|
+
* @param zoomLevel - The zoom level to apply (defaults to current zoom)
|
|
6729
|
+
*/
|
|
6730
|
+
applyIframeZoom(iframe, zoomLevel) {
|
|
6731
|
+
const zoom = zoomLevel ?? this.currentZoom;
|
|
6732
|
+
const zoomScale = zoom / 100;
|
|
6733
|
+
if (zoom === 100) {
|
|
6734
|
+
iframe.style.transform = 'none';
|
|
6735
|
+
iframe.style.width = '100%';
|
|
6736
|
+
iframe.style.height = '100%';
|
|
6737
|
+
}
|
|
6738
|
+
else {
|
|
6739
|
+
iframe.style.transform = `scale(${zoomScale})`;
|
|
6740
|
+
iframe.style.transformOrigin = 'top left';
|
|
6741
|
+
iframe.style.width = `${100 / zoomScale}%`;
|
|
6742
|
+
iframe.style.height = `${100 / zoomScale}%`;
|
|
6743
|
+
}
|
|
6744
|
+
}
|
|
6745
|
+
/**
|
|
6746
|
+
* Applies zoom transform to multiple iframe elements
|
|
6747
|
+
* @param iframes - Array of iframe elements to apply zoom to
|
|
6748
|
+
* @param zoomLevel - The zoom level to apply (defaults to current zoom)
|
|
6749
|
+
*/
|
|
6750
|
+
applyIframeZoomToMultiple(iframes, zoomLevel) {
|
|
6751
|
+
iframes.forEach(iframe => this.applyIframeZoom(iframe, zoomLevel));
|
|
6752
|
+
}
|
|
6753
|
+
/**
|
|
6754
|
+
* Applies zoom transform to iframes within a container element
|
|
6755
|
+
* @param container - The container element to search for iframes
|
|
6756
|
+
* @param zoomLevel - The zoom level to apply (defaults to current zoom)
|
|
6757
|
+
*/
|
|
6758
|
+
applyIframeZoomToContainer(container, zoomLevel) {
|
|
6759
|
+
const iframes = container.querySelectorAll('iframe');
|
|
6760
|
+
this.applyIframeZoomToMultiple(Array.from(iframes), zoomLevel);
|
|
6761
|
+
}
|
|
6762
|
+
/**
|
|
6763
|
+
* Applies zoom transform to iframes within multiple container elements
|
|
6764
|
+
* @param containers - Array of container elements to search for iframes
|
|
6765
|
+
* @param zoomLevel - The zoom level to apply (defaults to current zoom)
|
|
6766
|
+
*/
|
|
6767
|
+
applyIframeZoomToContainers(containers, zoomLevel) {
|
|
6768
|
+
containers.forEach(container => this.applyIframeZoomToContainer(container, zoomLevel));
|
|
6769
|
+
}
|
|
6770
|
+
/**
|
|
6771
|
+
* Applies zoom transform to iframes by CSS selector
|
|
6772
|
+
* @param selector - CSS selector to find iframe containers
|
|
6773
|
+
* @param zoomLevel - The zoom level to apply (defaults to current zoom)
|
|
6774
|
+
*/
|
|
6775
|
+
applyIframeZoomBySelector(selector, zoomLevel) {
|
|
6776
|
+
const containers = document.querySelectorAll(selector);
|
|
6777
|
+
this.applyIframeZoomToContainers(Array.from(containers), zoomLevel);
|
|
6778
|
+
}
|
|
6391
6779
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentZoomService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6392
6780
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentZoomService, providedIn: 'root' });
|
|
6393
6781
|
}
|
|
@@ -6816,14 +7204,53 @@ class DocumentContentViewerComponent {
|
|
|
6816
7204
|
initializeZoom() {
|
|
6817
7205
|
this.zoomService.zoomLevel$.subscribe(zoom => {
|
|
6818
7206
|
this.currentZoom = zoom;
|
|
7207
|
+
this.applyZoomTransform();
|
|
6819
7208
|
});
|
|
6820
7209
|
}
|
|
6821
7210
|
/**
|
|
6822
7211
|
* Handles mouse wheel events for zooming
|
|
6823
7212
|
*/
|
|
6824
7213
|
onWheel(event) {
|
|
6825
|
-
|
|
6826
|
-
|
|
7214
|
+
this.handleWheelZoom(event);
|
|
7215
|
+
}
|
|
7216
|
+
/**
|
|
7217
|
+
* Handles wheel zoom for document viewers
|
|
7218
|
+
*/
|
|
7219
|
+
handleWheelZoom(event) {
|
|
7220
|
+
const target = event.target;
|
|
7221
|
+
const isOverDocumentViewer = target.closest('.doc-viewer-wrapper') ||
|
|
7222
|
+
target.closest('.csv-table-container') ||
|
|
7223
|
+
target.closest('.docx-container') ||
|
|
7224
|
+
target.closest('.pdf-container') ||
|
|
7225
|
+
target.closest('.image-container') ||
|
|
7226
|
+
target.closest('.wheel-capture-overlay') ||
|
|
7227
|
+
target.closest('.document-content-viewer-container');
|
|
7228
|
+
if (isOverDocumentViewer) {
|
|
7229
|
+
if (Math.abs(event.deltaY) > Math.abs(event.deltaX)) {
|
|
7230
|
+
if (event.ctrlKey || event.metaKey) {
|
|
7231
|
+
event.preventDefault();
|
|
7232
|
+
event.stopPropagation();
|
|
7233
|
+
this.zoomService.handleWheelZoom(event);
|
|
7234
|
+
}
|
|
7235
|
+
}
|
|
7236
|
+
else if (Math.abs(event.deltaX) > Math.abs(event.deltaY)) {
|
|
7237
|
+
return;
|
|
7238
|
+
}
|
|
7239
|
+
}
|
|
7240
|
+
}
|
|
7241
|
+
/**
|
|
7242
|
+
* Applies zoom transform to the document viewer
|
|
7243
|
+
*/
|
|
7244
|
+
applyZoomTransform() {
|
|
7245
|
+
// Apply zoom to Excel iframes
|
|
7246
|
+
this.zoomService.applyIframeZoomBySelector('.excel-zoom-wrapper ngx-doc-viewer');
|
|
7247
|
+
// Apply zoom to Word/OpenDocument iframes
|
|
7248
|
+
this.zoomService.applyIframeZoomBySelector('.doc-viewer-wrapper');
|
|
7249
|
+
// Apply zoom to CSV table container (non-iframe content)
|
|
7250
|
+
const csvContainer = document.querySelector('.csv-table-container');
|
|
7251
|
+
if (csvContainer) {
|
|
7252
|
+
const zoomScale = this.currentZoom / 100;
|
|
7253
|
+
csvContainer.style.transform = `scale(${zoomScale})`;
|
|
6827
7254
|
}
|
|
6828
7255
|
}
|
|
6829
7256
|
/**
|
|
@@ -7031,11 +7458,11 @@ class DocumentContentViewerComponent {
|
|
|
7031
7458
|
// This will be handled by the parent component that uses this component
|
|
7032
7459
|
}
|
|
7033
7460
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContentViewerComponent, deps: [{ token: ExcelParserService }, { token: CsvParserService }, { token: DocumentHttpService }, { token: DocumentZoomService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7034
|
-
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" }, host: { listeners: { "wheel": "onWheel($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-content-viewer-container\">\n @if(documentUrl && contentType){\n <!-- Zoom Controls -->\n <div class=\"zoom-controls-wrapper\">\n <document-zoom-controls \n [selectedDocument]=\"selectedDocument\" \n [contextId]=\"contextId\"\n (documentNameUpdated)=\"onDocumentNameUpdated()\">\n </document-zoom-controls>\n </div>\n \n <!-- PDF Viewer -->\n @if(isPdf){\n <div class=\"pdf-container\">\n <pdf-viewer\n [src]=\"documentUrl\"\n [rotation]=\"0\"\n [original-size]=\"false\"\n [show-all]=\"true\"\n [fit-to-page]=\"false\"\n [zoom]=\"currentZoom / 100\"\n [zoom-scale]=\"'page-width'\"\n [stick-to-page]=\"false\"\n [render-text]=\"true\"\n [external-link-target]=\"'blank'\"\n [autoresize]=\"true\"\n [show-borders]=\"false\"\n style=\"width: 100%; height: 100%\"\n ></pdf-viewer>\n </div>\n }\n\n <!-- Image Viewer -->\n @else if(isImage){\n <div class=\"image-container\">\n <img\n [src]=\"documentUrl\"\n [alt]=\"documentName || 'Document Image'\"\n class=\"document-image\"\n [style.transform]=\"'scale(' + (currentZoom / 100) + ')'\"\n [style.transform-origin]=\"'center center'\"\n />\n </div>\n }\n\n <!-- Excel Files -->\n @else if(isExcel){\n <div class=\"excel-container\">\n @if(isLoadingExcel){\n <div class=\"loading-container\">\n <div class=\"loading-content\">\n <i class=\"pi pi-spin pi-spinner\" style=\"font-size: 2rem; color: #3b82f6;\"></i>\n <p>Loading Excel file...</p>\n </div>\n </div>\n }@else if(excelError){\n <div class=\"error-container\">\n <div class=\"error-content\">\n <i class=\"pi pi-exclamation-triangle\" style=\"font-size: 3rem; color: #ef4444;\"></i>\n <h4>Error Loading Excel File</h4>\n <p>{{ excelError }}</p>\n <div class=\"error-actions\">\n <button \n type=\"button\" \n class=\"p-button p-button-primary p-button-sm\"\n (click)=\"downloadDocument()\"\n >\n <i class=\"pi pi-download\"></i>\n Download Instead\n </button>\n </div>\n </div>\n </div>\n }\n @else if(excelData){\n <div class=\"docx-container\">\n <div class=\"docx-content\">\n <ngx-doc-viewer\n [url]=\"documentUrl\"\n viewer=\"office\"\n [style.transform]=\"'scale(' + (currentZoom / 100) + ')'\"\n [style.transform-origin]=\"'top left'\"\n style=\"width:100%;height:85vh;\"\n ></ngx-doc-viewer>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Word Files -->\n @else if(isWord){\n <div class=\"docx-container\">\n <div class=\"docx-content\">\n <ngx-doc-viewer\n [url]=\"documentUrl\"\n viewer=\"office\"\n [style.transform]=\"'scale(' + (currentZoom / 100) + ')'\"\n [style.transform-origin]=\"'top left'\"\n style=\"width:80%;height:100%;\"\n ></ngx-doc-viewer>\n </div>\n </div>\n }\n\n <!-- CSV Files -->\n @else if(isCsv){\n <div class=\"csv-container\">\n @if(isLoadingCsv){\n <div class=\"loading-container\">\n <div class=\"loading-content\">\n <i class=\"pi pi-spin pi-spinner\" style=\"font-size: 2rem; color: #3b82f6;\"></i>\n <p>Loading CSV file...</p>\n </div>\n </div>\n }@else if(csvError){\n <div class=\"error-container\">\n <div class=\"error-content\">\n <i class=\"pi pi-exclamation-triangle\" style=\"font-size: 3rem; color: #ef4444;\"></i>\n <h4>Error Loading CSV File</h4>\n <p>{{ csvError }}</p>\n <div class=\"error-actions\">\n <button \n type=\"button\" \n class=\"p-button p-button-primary p-button-sm\"\n (click)=\"downloadDocument()\"\n >\n <i class=\"pi pi-download\"></i>\n Download Instead\n </button>\n </div>\n </div>\n </div>\n }\n @else if(csvData){\n <div class=\"csv-content\">\n <div class=\"csv-header\">\n <div class=\"csv-info\">\n <p>{{ documentName || 'CSV File' }}</p>\n <span class=\"csv-stats\">\n {{ csvData.totalRows }} rows \u00D7 {{ csvData.totalColumns }} columns\n </span>\n </div>\n </div>\n \n <div class=\"csv-table-container\">\n <p-table \n [value]=\"safeCsvStyledData\" \n [tableStyle]=\"{'min-width': '100%'}\"\n [scrollable]=\"true\"\n scrollHeight=\"67vh\"\n class=\"csv-table\"\n [style.transform]=\"'scale(' + (currentZoom / 100) + ')'\"\n [style.transform-origin]=\"'top left'\"\n >\n <ng-template pTemplate=\"body\" let-row>\n <tr>\n <ng-container *ngFor=\"let cell of row.cells; trackBy: trackByCell\">\n <td [ngClass]=\"{'csv-header-cell': cell.isHeader}\">\n {{ cell.value }}\n </td>\n </ng-container>\n </tr>\n </ng-template>\n </p-table>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Email Files -->\n @else if(isEmail){\n <div class=\"office-document-container\">\n <div class=\"document-preview\">\n <div class=\"document-icon\">\n <i [class]=\"documentIcon\"></i>\n </div>\n <div class=\"document-info\">\n <h4>{{ documentTypeText }}</h4>\n <p>{{ documentName || 'Email Message' }}</p>\n <p class=\"document-note\">Email files cannot be previewed directly. Please download to view.</p>\n </div>\n <div class=\"document-actions\">\n <button \n type=\"button\" \n class=\"p-button p-button-primary p-button-sm\"\n (click)=\"downloadDocument()\"\n >\n <i class=\"pi pi-download\"></i>\n Download\n </button>\n <button \n type=\"button\" \n class=\"p-button p-button-outlined p-button-sm\"\n (click)=\"openInNewTab()\"\n >\n <i class=\"pi pi-external-link\"></i>\n Open\n </button>\n </div>\n </div>\n </div>\n }\n\n <!-- OpenDocument Files -->\n @else if(isOpenDocument){\n <div class=\"docx-container\">\n <div class=\"zoom-container\">\n <ngx-doc-viewer\n [url]=\"documentUrl\"\n viewer=\"office\"\n [style.transform]=\"'scale(' + (currentZoom / 100) + ')'\"\n [style.transform-origin]=\"'top left'\"\n style=\"width:100%;height:85vh;\"\n ></ngx-doc-viewer>\n </div>\n </div>\n }\n\n <!-- Unsupported Files -->\n @else if(isUnsupported){\n <div class=\"unsupported-document-container\">\n <div class=\"document-preview\">\n <div class=\"document-icon\">\n <i [class]=\"documentIcon\"></i>\n </div>\n <div class=\"document-info\">\n <h4>Unsupported Document Type</h4>\n <p>{{ documentName || 'Document' }}</p>\n <p class=\"document-note\">This document type ({{ contentType }}) is not supported for preview. Please download to view.</p>\n </div>\n <div class=\"document-actions\">\n <button \n type=\"button\" \n class=\"p-button p-button-primary p-button-sm\"\n (click)=\"downloadDocument()\"\n >\n <i class=\"pi pi-download\"></i>\n Download\n </button>\n <button \n type=\"button\" \n class=\"p-button p-button-outlined p-button-sm\"\n (click)=\"openInNewTab()\"\n >\n <i class=\"pi pi-external-link\"></i>\n Open\n </button>\n </div>\n </div>\n </div>\n }\n }\n @else {\n <div class=\"no-document-container\">\n <div class=\"no-document-content\">\n <i class=\"pi pi-file-o\" style=\"font-size: 3rem; color: #6b7280;\"></i>\n <h4>No Document Uploaded</h4>\n <p>Please Upload a document to view its content.</p>\n </div>\n </div>\n }\n</div>\n\n", styles: [".document-content-viewer-container{height:100%;width:100%;display:flex;flex-direction:column;background:#f8f9fa;border-radius:8px;overflow:hidden}.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}.document-content-viewer-container .docx-container,.document-content-viewer-container .zoom-container{overflow:auto}.document-content-viewer-container .docx-container .docx-content,.document-content-viewer-container .zoom-container .docx-content{min-width:100%;min-height:100%}.document-content-viewer-container .pdf-container{width:100%;height:100%;border-radius:8px;overflow:hidden}.document-content-viewer-container .pdf-container ::ng-deep .ng2-pdf-viewer-container{height:100%;overflow:auto}.document-content-viewer-container .image-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:1rem;overflow:auto}.document-content-viewer-container .image-container .document-image{max-width:100%;max-height:100%;object-fit:contain;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a;transition:transform .2s ease-in-out}.document-content-viewer-container .excel-container{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;border-radius:8px;overflow:hidden}.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;border-radius:8px;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}.docx-container .docx-content{height:100%;min-height:inherit;position:relative}ngx-doc-viewer{display:block;width:100%;height:100%}.csv-container{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;border-radius:8px;overflow:hidden}.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;scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-wrapper{height:100%;scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-wrapper::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-body{scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-body::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-header{scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-header::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-footer{scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-footer::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-scrollbar-wrapper{scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-scrollbar-wrapper::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-table{border-collapse:collapse}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-thead>tr>th{background-color:#f8f9fa;border:1px solid #e5e7eb;padding:.75rem;font-weight:600;color:#374151;text-align:left;position:sticky;top:0;z-index:1;word-wrap:break-word;white-space:normal}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-thead>tr>th.csv-header-cell{background-color:#f1f5f9;font-weight:700;color:#1e293b}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-tbody>tr>td{border:1px solid #e5e7eb;padding:.75rem;color:#374151;vertical-align:top;word-wrap:break-word;white-space:normal}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-tbody>tr>td.csv-header-cell{background-color:#f1f5f9;font-weight:600;color:#1e293b}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-tbody>tr:nth-child(2n){background-color:#f9fafb}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-tbody>tr:hover{background-color:#f3f4f6}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i7.PdfViewerComponent, selector: "pdf-viewer", inputs: ["src", "c-maps-url", "page", "render-text", "render-text-mode", "original-size", "show-all", "stick-to-page", "zoom", "zoom-scale", "rotation", "external-link-target", "autoresize", "fit-to-page", "show-borders"], outputs: ["after-load-complete", "page-rendered", "pages-initialized", "text-layer-rendered", "error", "on-progress", "pageChange"] }, { kind: "component", type: i8.NgxDocViewerComponent, selector: "ngx-doc-viewer", inputs: ["url", "queryParams", "viewerUrl", "googleCheckInterval", "googleMaxChecks", "disableContent", "googleCheckContentLoaded", "viewer", "overrideLocalhost"], outputs: ["loaded"] }, { kind: "component", type: i2$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "component", type: DocumentZoomControlsComponent, selector: "document-zoom-controls", inputs: ["selectedDocument", "contextId"], outputs: ["documentNameUpdated"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
7461
|
+
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" }, host: { listeners: { "wheel": "onWheel($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-content-viewer-container\">\n @if(documentUrl && contentType){\n <!-- Zoom Controls -->\n <div class=\"zoom-controls-wrapper\">\n <document-zoom-controls \n [selectedDocument]=\"selectedDocument\" \n [contextId]=\"contextId\"\n (documentNameUpdated)=\"onDocumentNameUpdated()\">\n </document-zoom-controls>\n </div>\n \n <!-- PDF Viewer -->\n @if(isPdf){\n <div class=\"pdf-container\">\n <pdf-viewer\n [src]=\"documentUrl\"\n [rotation]=\"0\"\n [original-size]=\"false\"\n [show-all]=\"true\"\n [fit-to-page]=\"false\"\n [zoom]=\"currentZoom / 100\"\n [zoom-scale]=\"'page-width'\"\n [stick-to-page]=\"false\"\n [render-text]=\"true\"\n [external-link-target]=\"'blank'\"\n [autoresize]=\"true\"\n [show-borders]=\"false\"\n style=\"width: 100%; height: 100%\"\n ></pdf-viewer>\n </div>\n }\n\n <!-- Image Viewer -->\n @else if(isImage){\n <div class=\"image-container\">\n <img\n [src]=\"documentUrl\"\n [alt]=\"documentName || 'Document Image'\"\n class=\"document-image\"\n [style.transform]=\"'scale(' + (currentZoom / 100) + ')'\"\n [style.transform-origin]=\"'center center'\"\n />\n </div>\n }\n\n <!-- Excel Files -->\n @else if(isExcel){\n <div class=\"excel-container\">\n @if(isLoadingExcel){\n <div class=\"loading-container\">\n <div class=\"loading-content\">\n <i class=\"pi pi-spin pi-spinner\" style=\"font-size: 2rem; color: #3b82f6;\"></i>\n <p>Loading Excel file...</p>\n </div>\n </div>\n }@else if(excelError){\n <div class=\"error-container\">\n <div class=\"error-content\">\n <i class=\"pi pi-exclamation-triangle\" style=\"font-size: 3rem; color: #ef4444;\"></i>\n <h4>Error Loading Excel File</h4>\n <p>{{ excelError }}</p>\n <div class=\"error-actions\">\n <button \n type=\"button\" \n class=\"p-button p-button-primary p-button-sm\"\n (click)=\"downloadDocument()\"\n >\n <i class=\"pi pi-download\"></i>\n Download Instead\n </button>\n </div>\n </div>\n </div>\n }\n @else if(excelData){\n <div class=\"excel-container\">\n <div class=\"excel-zoom-wrapper\" \n [class.zoomed]=\"currentZoom !== 100\"\n (wheel)=\"onWheel($event)\">\n <ngx-doc-viewer\n [url]=\"documentUrl\"\n viewer=\"office\"\n style=\"width:100%;height:97%;\"\n ></ngx-doc-viewer>\n <!-- Invisible overlay to capture wheel events over document content -->\n <div class=\"wheel-capture-overlay\" \n (wheel)=\"onWheel($event)\"></div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Word Files -->\n @else if(isWord){\n <div class=\"docx-container\">\n <div class=\"doc-viewer-wrapper\" \n [class.zoomed]=\"currentZoom !== 100\"\n (wheel)=\"onWheel($event)\">\n <ngx-doc-viewer\n [url]=\"documentUrl\"\n viewer=\"office\"\n style=\"width:100%;height:97%;\"\n ></ngx-doc-viewer>\n <div class=\"wheel-capture-overlay\" \n (wheel)=\"onWheel($event)\"></div>\n </div>\n </div>\n }\n\n <!-- CSV Files -->\n @else if(isCsv){\n <div class=\"csv-container\">\n @if(isLoadingCsv){\n <div class=\"loading-container\">\n <div class=\"loading-content\">\n <i class=\"pi pi-spin pi-spinner\" style=\"font-size: 2rem; color: #3b82f6;\"></i>\n <p>Loading CSV file...</p>\n </div>\n </div>\n }@else if(csvError){\n <div class=\"error-container\">\n <div class=\"error-content\">\n <i class=\"pi pi-exclamation-triangle\" style=\"font-size: 3rem; color: #ef4444;\"></i>\n <h4>Error Loading CSV File</h4>\n <p>{{ csvError }}</p>\n <div class=\"error-actions\">\n <button \n type=\"button\" \n class=\"p-button p-button-primary p-button-sm\"\n (click)=\"downloadDocument()\"\n >\n <i class=\"pi pi-download\"></i>\n Download Instead\n </button>\n </div>\n </div>\n </div>\n }\n @else if(csvData){\n <div class=\"csv-content\">\n <div class=\"csv-header\">\n <div class=\"csv-info\">\n <p>{{ documentName || 'CSV File' }}</p>\n <span class=\"csv-stats\">\n {{ csvData.totalRows }} rows \u00D7 {{ csvData.totalColumns }} columns\n </span>\n </div>\n </div>\n \n <div class=\"csv-table-container\" \n [style.transform-origin]=\"'center center'\"\n (wheel)=\"onWheel($event)\">\n <p-table \n [value]=\"safeCsvStyledData\" \n [tableStyle]=\"{'min-width': '100%'}\"\n [scrollable]=\"true\"\n scrollHeight=\"67vh\"\n class=\"csv-table\"\n >\n <ng-template pTemplate=\"body\" let-row>\n <tr>\n <ng-container *ngFor=\"let cell of row.cells; trackBy: trackByCell\">\n <td [ngClass]=\"{'csv-header-cell': cell.isHeader}\">\n {{ cell.value }}\n </td>\n </ng-container>\n </tr>\n </ng-template>\n </p-table>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Email Files -->\n @else if(isEmail){\n <div class=\"office-document-container\">\n <div class=\"document-preview\">\n <div class=\"document-icon\">\n <i [class]=\"documentIcon\"></i>\n </div>\n <div class=\"document-info\">\n <h4>{{ documentTypeText }}</h4>\n <p>{{ documentName || 'Email Message' }}</p>\n <p class=\"document-note\">Email files cannot be previewed directly. Please download to view.</p>\n </div>\n <div class=\"document-actions\">\n <button \n type=\"button\" \n class=\"p-button p-button-primary p-button-sm\"\n (click)=\"downloadDocument()\"\n >\n <i class=\"pi pi-download\"></i>\n Download\n </button>\n <button \n type=\"button\" \n class=\"p-button p-button-outlined p-button-sm\"\n (click)=\"openInNewTab()\"\n >\n <i class=\"pi pi-external-link\"></i>\n Open\n </button>\n </div>\n </div>\n </div>\n }\n\n <!-- OpenDocument Files -->\n @else if(isOpenDocument){\n <div class=\"docx-container\">\n <div class=\"doc-viewer-wrapper\" \n [class.zoomed]=\"currentZoom !== 100\"\n (wheel)=\"onWheel($event)\">\n <ngx-doc-viewer\n [url]=\"documentUrl\"\n viewer=\"office\"\n style=\"width:100%;height:800px;\"\n ></ngx-doc-viewer>\n <!-- Invisible overlay to capture wheel events over document content -->\n <div class=\"wheel-capture-overlay\" \n (wheel)=\"onWheel($event)\"></div>\n </div>\n </div>\n }\n\n <!-- Unsupported Files -->\n @else if(isUnsupported){\n <div class=\"unsupported-document-container\">\n <div class=\"document-preview\">\n <div class=\"document-icon\">\n <i [class]=\"documentIcon\"></i>\n </div>\n <div class=\"document-info\">\n <h4>Unsupported Document Type</h4>\n <p>{{ documentName || 'Document' }}</p>\n <p class=\"document-note\">This document type ({{ contentType }}) is not supported for preview. Please download to view.</p>\n </div>\n <div class=\"document-actions\">\n <button \n type=\"button\" \n class=\"p-button p-button-primary p-button-sm\"\n (click)=\"downloadDocument()\"\n >\n <i class=\"pi pi-download\"></i>\n Download\n </button>\n <button \n type=\"button\" \n class=\"p-button p-button-outlined p-button-sm\"\n (click)=\"openInNewTab()\"\n >\n <i class=\"pi pi-external-link\"></i>\n Open\n </button>\n </div>\n </div>\n </div>\n }\n }\n @else {\n <div class=\"no-document-container\">\n <div class=\"no-document-content\">\n <i class=\"pi pi-file-o\" style=\"font-size: 3rem; color: #6b7280;\"></i>\n <h4>No Document Uploaded</h4>\n <p>Please Upload a document to view its content.</p>\n </div>\n </div>\n }\n</div>\n\n", styles: [".document-content-viewer-container{height:100%;width:100%;display:flex;flex-direction:column;background:#f8f9fa;border-radius:8px;overflow:auto}.document-content-viewer-container .zoom-controls-wrapper{position:sticky;top:0;z-index:10;background:#f8f9faf2;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-bottom:1px solid #e5e7eb;justify-content:space-between;align-items:center}.document-content-viewer-container .docx-container{overflow:auto}.document-content-viewer-container .pdf-container{width:100%;height:100%;border-radius:8px;overflow:hidden}.document-content-viewer-container .pdf-container ::ng-deep .ng2-pdf-viewer-container{height:100%;overflow:auto}.document-content-viewer-container .image-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:1rem;overflow:auto}.document-content-viewer-container .image-container .document-image{max-width:100%;max-height:100%;object-fit:contain;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a;transition:transform .2s ease-in-out}.document-content-viewer-container .excel-container{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;border-radius:8px;overflow:auto}.document-content-viewer-container .excel-container .loading-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.document-content-viewer-container .excel-container .loading-container .loading-content{text-align:center;color:#6b7280}.document-content-viewer-container .excel-container .loading-container .loading-content i{margin-bottom:1rem;display:block}.document-content-viewer-container .excel-container .loading-container .loading-content p{margin:0;color:#9ca3af;font-size:.875rem}.document-content-viewer-container .excel-container .error-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.document-content-viewer-container .excel-container .error-container .error-content{text-align:center;color:#6b7280;max-width:400px}.document-content-viewer-container .excel-container .error-container .error-content i{margin-bottom:1rem;display:block}.document-content-viewer-container .excel-container .error-container .error-content h4{margin:0 0 .5rem;color:#dc2626;font-size:1.25rem;font-weight:600}.document-content-viewer-container .excel-container .error-container .error-content p{margin:0 0 1.5rem;color:#6b7280;font-size:.875rem}.document-content-viewer-container .excel-container .error-container .error-content .error-actions{display:flex;justify-content:center}.document-content-viewer-container .excel-container .excel-viewer{width:100%;height:100%;display:flex;flex-direction:column}.document-content-viewer-container .excel-container .excel-viewer .excel-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.5rem;background:#f8fafc;border-bottom:1px solid #e2e8f0}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-info{display:flex;align-items:center;gap:1rem}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-info i{font-size:2rem;color:#10b981}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-info .excel-details h4{margin:0 0 .25rem;color:#1f2937;font-size:1.125rem;font-weight:600}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-info .excel-details p{margin:0;color:#6b7280;font-size:.875rem}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-actions{display:flex;gap:.5rem}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-actions .p-button.p-button-sm{padding:.375rem .75rem;font-size:.75rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content{flex:1;display:flex;flex-direction:column;padding:1rem;background:#fafafa;overflow:hidden}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation{display:flex;align-items:center;gap:.5rem;margin-bottom:1rem;padding:.5rem;background:#fff;border-radius:6px;border:1px solid #e5e7eb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-label{font-size:.875rem;font-weight:500;color:#6b7280;margin-right:.5rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-tab{padding:.375rem .75rem;border:1px solid #d1d5db;background:#fff;border-radius:4px;font-size:.75rem;color:#6b7280;cursor:pointer;transition:all .2s}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-tab:hover{background:#f3f4f6;border-color:#9ca3af}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-tab.active{background:#10b981;color:#fff;border-color:#10b981}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container{flex:1;overflow:auto;background:#fff;border-radius:6px;border:1px solid #e5e7eb;margin-bottom:1rem;min-width:100%;position:relative;min-height:300px;overflow-x:auto;overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container::-webkit-scrollbar{display:none}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table{width:100%;min-width:max-content;border-collapse:collapse;font-size:.875rem;table-layout:auto;border:2px solid #e5e7eb;word-wrap:break-word;white-space:nowrap}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table th,.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td{padding:.5rem .75rem;text-align:left;border-bottom:1px solid #f3f4f6;border-right:1px solid #f3f4f6;min-width:80px;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:normal;position:relative;box-sizing:border-box;vertical-align:top}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td:empty:after{content:\"\";display:block;min-height:1.5rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table th:last-child,.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td:last-child{border-right:1px solid #e5e7eb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table th:first-child,.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td:first-child{border-left:1px solid #e5e7eb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table .empty-cell{background-color:#fafafa;color:#9ca3af;font-style:italic;border:1px solid #e5e7eb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table tr{border:1px solid #e5e7eb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table th{background:#f8fafc;font-weight:600;color:#374151;position:sticky;top:0;z-index:10;border-bottom:2px solid #e5e7eb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td{color:#6b7280;background:#fff}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td:first-child{font-weight:500;color:#374151}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table tr:hover td{background:#f9fafb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table tbody tr:last-child td{border-bottom:none}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-info-bar{display:flex;align-items:center;gap:1.5rem;padding:.75rem;background:#fff;border-radius:6px;border:1px solid #e5e7eb;font-size:.75rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-info-bar .info-item{display:flex;align-items:center;gap:.5rem;color:#6b7280}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-info-bar .info-item i{color:#10b981;font-size:.875rem}.document-content-viewer-container .office-document-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.document-content-viewer-container .office-document-container .document-preview{background:#fff;border-radius:12px;padding:2rem;text-align:center;box-shadow:0 10px 15px -3px #0000001a;max-width:400px;width:100%}.document-content-viewer-container .office-document-container .document-preview .document-icon{margin-bottom:1.5rem}.document-content-viewer-container .office-document-container .document-preview .document-icon i{font-size:4rem;color:#3b82f6}.document-content-viewer-container .office-document-container .document-preview .document-info{margin-bottom:2rem}.document-content-viewer-container .office-document-container .document-preview .document-info h4{margin:0 0 .5rem;color:#1f2937;font-size:1.25rem;font-weight:600}.document-content-viewer-container .office-document-container .document-preview .document-info p{margin:.25rem 0;color:#6b7280;font-size:.875rem}.document-content-viewer-container .office-document-container .document-preview .document-info p.document-note{color:#9ca3af;font-style:italic;margin-top:.75rem}.document-content-viewer-container .office-document-container .document-preview .document-actions{display:flex;gap:.75rem;justify-content:center;flex-wrap:wrap}.document-content-viewer-container .office-document-container .document-preview .document-actions .p-button{min-width:120px}.document-content-viewer-container .office-document-container .document-preview .document-actions .p-button.p-button-sm{padding:.5rem 1rem;font-size:.875rem}.document-content-viewer-container .unsupported-document-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.document-content-viewer-container .unsupported-document-container .document-preview{background:#fff;border-radius:12px;padding:2rem;text-align:center;box-shadow:0 10px 15px -3px #0000001a;max-width:400px;width:100%;border:2px solid #fbbf24}.document-content-viewer-container .unsupported-document-container .document-preview .document-icon{margin-bottom:1.5rem}.document-content-viewer-container .unsupported-document-container .document-preview .document-icon i{font-size:4rem;color:#f59e0b}.document-content-viewer-container .unsupported-document-container .document-preview .document-info{margin-bottom:2rem}.document-content-viewer-container .unsupported-document-container .document-preview .document-info h4{margin:0 0 .5rem;color:#92400e;font-size:1.25rem;font-weight:600}.document-content-viewer-container .unsupported-document-container .document-preview .document-info p{margin:.25rem 0;color:#6b7280;font-size:.875rem}.document-content-viewer-container .unsupported-document-container .document-preview .document-info p.document-note{color:#d97706;font-style:italic;margin-top:.75rem;background:#fef3c7;padding:.5rem;border-radius:6px;border:1px solid #fde68a}.document-content-viewer-container .unsupported-document-container .document-preview .document-actions{display:flex;gap:.75rem;justify-content:center;flex-wrap:wrap}.document-content-viewer-container .unsupported-document-container .document-preview .document-actions .p-button{min-width:120px}.document-content-viewer-container .unsupported-document-container .document-preview .document-actions .p-button.p-button-sm{padding:.5rem 1rem;font-size:.875rem}.document-content-viewer-container .no-document-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.document-content-viewer-container .no-document-container .no-document-content{text-align:center;color:#6b7280}.document-content-viewer-container .no-document-container .no-document-content i{margin-bottom:1rem;display:block}.document-content-viewer-container .no-document-container .no-document-content h4{margin:0 0 .5rem;color:#374151;font-size:1.25rem;font-weight:600}.document-content-viewer-container .no-document-container .no-document-content p{margin:0;color:#9ca3af;font-size:.875rem}@media (max-width: 768px){.document-content-viewer-container .office-document-container,.document-content-viewer-container .unsupported-document-container{padding:1rem}.document-content-viewer-container .office-document-container .document-preview,.document-content-viewer-container .unsupported-document-container .document-preview{padding:1.5rem;max-width:100%}.document-content-viewer-container .office-document-container .document-preview .document-icon i,.document-content-viewer-container .unsupported-document-container .document-preview .document-icon i{font-size:3rem}.document-content-viewer-container .office-document-container .document-preview .document-actions,.document-content-viewer-container .unsupported-document-container .document-preview .document-actions{flex-direction:column;align-items:center}.document-content-viewer-container .office-document-container .document-preview .document-actions .p-button,.document-content-viewer-container .unsupported-document-container .document-preview .document-actions .p-button{width:100%;max-width:200px}.document-content-viewer-container .image-container{padding:.5rem}.document-content-viewer-container .excel-container .excel-viewer .excel-header{flex-direction:column;gap:1rem;padding:1rem}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-info{justify-content:center}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-actions{justify-content:center;width:100%}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-actions .p-button{flex:1;max-width:150px}.document-content-viewer-container .excel-container .excel-viewer .excel-content{padding:.5rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation{flex-wrap:wrap;gap:.25rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-tab{font-size:.7rem;padding:.25rem .5rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table{font-size:.75rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table th,.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td{padding:.25rem .5rem;min-width:80px;max-width:150px}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-info-bar{flex-wrap:wrap;gap:1rem;font-size:.7rem}}@media (prefers-color-scheme: dark){.document-content-viewer-container{background:#1f2937}.document-content-viewer-container .office-document-container .document-preview,.document-content-viewer-container .unsupported-document-container .document-preview{background:#374151;color:#f9fafb}.document-content-viewer-container .office-document-container .document-preview .document-info h4,.document-content-viewer-container .unsupported-document-container .document-preview .document-info h4{color:#f9fafb}.document-content-viewer-container .office-document-container .document-preview .document-info p,.document-content-viewer-container .unsupported-document-container .document-preview .document-info p{color:#d1d5db}.document-content-viewer-container .office-document-container .document-preview .document-info p.document-note,.document-content-viewer-container .unsupported-document-container .document-preview .document-info p.document-note{color:#9ca3af;background:#4b5563;border-color:#6b7280}.document-content-viewer-container .excel-container{background:#374151}.document-content-viewer-container .excel-container .excel-viewer .excel-header{background:#4b5563;border-color:#6b7280}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-info .excel-details h4{color:#f9fafb}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-info .excel-details p{color:#d1d5db}.document-content-viewer-container .excel-container .excel-viewer .excel-content{background:#374151}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation{background:#4b5563;border-color:#6b7280}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-tab{background:#4b5563;border-color:#6b7280;color:#d1d5db}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-tab:hover{background:#6b7280;border-color:#9ca3af}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-tab.active{background:#10b981;color:#fff;border-color:#10b981}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container{background:#4b5563;border-color:#6b7280}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table th{background:#6b7280;color:#f9fafb;border-color:#9ca3af}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td{background:#4b5563;color:#d1d5db;border-color:#6b7280}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td:first-child{color:#f9fafb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table tr:hover td{background:#6b7280}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-info-bar{background:#4b5563;border-color:#6b7280;color:#d1d5db}.document-content-viewer-container .no-document-container .no-document-content{color:#9ca3af}.document-content-viewer-container .no-document-container .no-document-content h4{color:#f9fafb}.document-content-viewer-container .no-document-container .no-document-content p{color:#d1d5db}}.excel-table{border-collapse:collapse;width:100%;font-size:.875rem}.excel-table th,.excel-table td{padding:.5rem;border:1px solid #e2e8f0;text-align:left;vertical-align:top;min-width:80px}.excel-table th[style*=background-color]:not([style*=color]),.excel-table td[style*=background-color]:not([style*=color]){color:#1f2937}.excel-table th[style*=\"font-weight: bold\"],.excel-table td[style*=\"font-weight: bold\"]{font-weight:600}.excel-table th[style*=\"font-style: italic\"],.excel-table td[style*=\"font-style: italic\"]{font-style:italic}.excel-table th{background-color:#f8fafc;font-weight:600;color:#475569;position:sticky;top:0;z-index:10}.excel-table td{background-color:#fff}.excel-table td.empty-cell{background-color:#f8fafc;color:#9ca3af}.excel-table tbody tr:hover td{background-color:#f1f5f9}.excel-table tbody tr:hover td[style*=background-color]{opacity:.8}.debug-info{margin-top:1rem;padding:1rem;background-color:#fef3c7;border:1px solid #f59e0b;border-radius:8px}.debug-info summary{cursor:pointer;font-weight:600;color:#d97706;margin-bottom:.5rem}.debug-info summary:hover{color:#b45309}.debug-info .debug-content{margin-top:.5rem}.debug-info .debug-content p{margin:.5rem 0;color:#92400e}.debug-info .debug-content ul{margin:.5rem 0;padding-left:1.5rem;color:#92400e}.debug-info .debug-content li{margin:.25rem 0}.debug-info .debug-content button{margin-top:.5rem}.docx-container{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;border-radius:8px;overflow:hidden}.docx-container .loading-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.docx-container .loading-container .loading-content{text-align:center;color:#6b7280}.docx-container .loading-container .loading-content i{margin-bottom:1rem;display:block}.docx-container .loading-container .loading-content p{margin:0;color:#9ca3af;font-size:.875rem}.docx-container .error-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.docx-container .error-container .error-content{text-align:center;color:#6b7280;max-width:400px}.docx-container .error-container .error-content i{margin-bottom:1rem;display:block}.docx-container .error-container .error-content h4{margin:0 0 .5rem;color:#dc2626;font-size:1.25rem;font-weight:600}.docx-container .error-container .error-content p{margin:0 0 1rem;color:#9ca3af;font-size:.875rem}.docx-container .error-container .error-content .error-actions{margin-top:1rem}.docx-container .docx-viewer{width:100%;height:100%;display:flex;flex-direction:column;background:#fff}.docx-container .docx-viewer .docx-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.5rem;border-bottom:1px solid #e5e7eb;background-color:#f9fafb}.docx-container .docx-viewer .docx-header .docx-info{display:flex;align-items:center;gap:1rem}.docx-container .docx-viewer .docx-header .docx-info i{font-size:2rem;color:#2563eb}.docx-container .docx-viewer .docx-header .docx-info .docx-details h4{margin:0 0 .25rem;font-size:1.125rem;font-weight:600;color:#111827}.docx-container .docx-viewer .docx-header .docx-info .docx-details p{margin:0 0 .125rem;font-size:.875rem;color:#6b7280}.docx-container .docx-viewer .docx-header .docx-info .docx-details .document-title{font-weight:500;color:#374151;font-size:.875rem}.docx-container .docx-viewer .docx-header .docx-info .docx-details .document-author{font-style:italic;color:#6b7280;font-size:.75rem}.docx-container .docx-viewer .docx-header .docx-actions{display:flex;gap:.5rem}.docx-container .docx-viewer .docx-content{flex:1;overflow:auto;padding:1.5rem}.docx-container .docx-viewer .docx-content .docx-stats{display:flex;flex-wrap:wrap;gap:1rem;margin-bottom:1.5rem;padding:1rem;background-color:#f8fafc;border-radius:8px;border:1px solid #e2e8f0}.docx-container .docx-viewer .docx-content .docx-stats .stat-item{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;background-color:#fff;border-radius:6px;border:1px solid #e2e8f0;font-size:.75rem;color:#475569;font-weight:500}.docx-container .docx-viewer .docx-content .docx-stats .stat-item i{color:#64748b}.docx-container .docx-viewer .docx-content .docx-content-body{line-height:1.6;color:#1f2937}.docx-container .docx-viewer .docx-content .docx-content-body .docx-paragraph{margin:0 0 1rem;text-align:justify}.docx-container .docx-viewer .docx-content .docx-content-body .docx-heading{margin:1.5rem 0 1rem;font-weight:600;color:#111827;line-height:1.3}.docx-container .docx-viewer .docx-content .docx-content-body .docx-heading.docx-h1{font-size:1.875rem;border-bottom:2px solid #e5e7eb;padding-bottom:.5rem}.docx-container .docx-viewer .docx-content .docx-content-body .docx-heading.docx-h2{font-size:1.5rem;border-bottom:1px solid #e5e7eb;padding-bottom:.25rem}.docx-container .docx-viewer .docx-content .docx-content-body .docx-heading.docx-h3{font-size:1.25rem}.docx-container .docx-viewer .docx-content .docx-content-body .docx-heading.docx-h4,.docx-container .docx-viewer .docx-content .docx-content-body .docx-heading.docx-h5,.docx-container .docx-viewer .docx-content .docx-content-body .docx-heading.docx-h6{font-size:1.125rem}.docx-container .docx-viewer .docx-content .docx-content-body .docx-table{width:100%;margin:1rem 0;border-collapse:collapse;border:1px solid #e5e7eb;background-color:#fff}.docx-container .docx-viewer .docx-content .docx-content-body .docx-table .docx-header{background-color:#f8fafc;font-weight:600;color:#374151}.docx-container .docx-viewer .docx-content .docx-content-body .docx-table .docx-cell,.docx-container .docx-viewer .docx-content .docx-content-body .docx-table .docx-header{padding:.75rem;border:1px solid #e5e7eb;text-align:left;vertical-align:top}.docx-container .docx-viewer .docx-content .docx-content-body .docx-table .docx-row:hover{background-color:#f9fafb}.docx-container .docx-viewer .docx-content .docx-content-body .docx-list{margin:1rem 0;padding-left:1.5rem}.docx-container .docx-viewer .docx-content .docx-content-body .docx-list.docx-ul{list-style-type:disc}.docx-container .docx-viewer .docx-content .docx-content-body .docx-list.docx-ol{list-style-type:decimal}.docx-container .docx-viewer .docx-content .docx-content-body .docx-list .docx-list-item{margin:.5rem 0;line-height:1.5}.docx-container .docx-viewer .docx-content .docx-content-body .docx-image{max-width:100%;height:auto;border-radius:6px;box-shadow:0 2px 4px #0000001a;margin:1rem 0}.docx-container .docx-viewer .docx-content .docx-content-body blockquote{margin:1rem 0;padding:1rem 1.5rem;border-left:4px solid #3b82f6;background-color:#f8fafc;font-style:italic;color:#374151}.docx-container .docx-viewer .docx-content .docx-content-body pre,.docx-container .docx-viewer .docx-content .docx-content-body code{background-color:#f1f5f9;border:1px solid #e2e8f0;border-radius:4px;padding:.5rem;font-family:Courier New,monospace;font-size:.875rem;color:#1e293b;overflow-x:auto}.docx-container .docx-viewer .docx-content .docx-content-body pre{padding:1rem;margin:1rem 0}.docx-container .docx-viewer .docx-content .docx-content-body a{color:#2563eb;text-decoration:none}.docx-container .docx-viewer .docx-content .docx-content-body a:hover{text-decoration:underline}.docx-container .docx-viewer .docx-content .docx-content-body em,.docx-container .docx-viewer .docx-content .docx-content-body i{font-style:italic}.docx-container .docx-viewer .docx-content .docx-content-body strong,.docx-container .docx-viewer .docx-content .docx-content-body b{font-weight:600}.docx-container .docx-viewer .docx-content .docx-content-body hr{border:none;border-top:1px solid #e5e7eb;margin:2rem 0}.word-loading-container{display:flex;align-items:center;justify-content:center;min-height:400px;width:100%;background-color:#f9fafb;border-radius:8px}.word-loading-container .loading-content{text-align:center}.word-loading-container .loading-content i{margin-bottom:1rem;display:block;font-size:2rem;color:#3b82f6}.word-loading-container .loading-content p{margin:0;color:#6b7280;font-size:1rem;font-weight:500}.docx-container{min-height:400px;overflow:auto}.doc-viewer-wrapper{transition:transform .2s ease-in-out;overflow:auto;position:relative;transform-origin:center center;height:100%;scroll-behavior:smooth}.doc-viewer-wrapper .wheel-capture-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:transparent;z-index:5;pointer-events:auto}.doc-viewer-wrapper .wheel-capture-overlay:active{pointer-events:none}.doc-viewer-wrapper ngx-doc-viewer ::ng-deep iframe{transition:transform .2s ease-in-out;transform-origin:top left;border:none;min-width:100%;min-height:100%}.excel-zoom-wrapper{overflow:auto;position:relative;height:100%;width:100%;scroll-behavior:smooth}.excel-zoom-wrapper .wheel-capture-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:transparent;z-index:5;pointer-events:auto}.excel-zoom-wrapper .wheel-capture-overlay:active{pointer-events:none}.excel-zoom-wrapper:not(.zoomed){display:flex;align-items:center;justify-content:center}.excel-zoom-wrapper.zoomed{overflow:auto;display:block}.excel-zoom-wrapper ngx-doc-viewer{transition:transform .2s ease-in-out;transform-origin:center center;display:block;width:100%;height:100%}.excel-zoom-wrapper ngx-doc-viewer ::ng-deep iframe{transition:transform .2s ease-in-out;transform-origin:top left;border:none;min-width:100%;min-height:100%}ngx-doc-viewer{display:block;width:100%;height:100%}ngx-doc-viewer ::ng-deep iframe{transition:transform .2s ease-in-out;transform-origin:center center}.csv-container{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;border-radius:8px;overflow:auto}.csv-container *{scrollbar-width:none;-ms-overflow-style:none}.csv-container *::-webkit-scrollbar{display:none}.csv-container .loading-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.csv-container .loading-container .loading-content{text-align:center;color:#6b7280}.csv-container .loading-container .loading-content i{margin-bottom:1rem;display:block}.csv-container .loading-container .loading-content p{margin:0;color:#9ca3af;font-size:.875rem}.csv-container .error-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.csv-container .error-container .error-content{text-align:center;color:#6b7280;max-width:400px}.csv-container .error-container .error-content i{margin-bottom:1rem;display:block}.csv-container .error-container .error-content h4{margin:0 0 .5rem;color:#dc2626;font-size:1.25rem;font-weight:600}.csv-container .error-container .error-content p{margin:0 0 1rem;color:#6b7280;font-size:.875rem}.csv-container .error-container .error-content .error-actions{margin-top:1rem}.csv-container .csv-content{width:100%;height:98%;display:flex;flex-direction:column;padding:1rem}.csv-container .csv-content .csv-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:1rem;padding-bottom:1rem;border-bottom:1px solid #e5e7eb}.csv-container .csv-content .csv-header .csv-info h4{margin:0 0 .5rem;color:#111827;font-size:1.25rem;font-weight:600}.csv-container .csv-content .csv-header .csv-info p{margin:0 0 .25rem;color:#6b7280;font-size:.875rem}.csv-container .csv-content .csv-header .csv-info .csv-stats{display:inline-block;background-color:#f3f4f6;color:#6b7280;font-size:.75rem;padding:.25rem .5rem;border-radius:4px;font-weight:500}.csv-container .csv-content .csv-header .csv-actions{display:flex;gap:.5rem}.csv-container .csv-content .csv-table-container{flex:1;overflow:auto;border-radius:6px;min-width:0;min-height:0;transition:transform .2s ease-in-out;scroll-behavior:smooth;transform-origin:center center;scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-wrapper{height:100%;scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-wrapper::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-body{scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-body::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-header{scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-header::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-footer{scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-footer::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-scrollbar-wrapper{scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-scrollbar-wrapper::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-table{border-collapse:collapse}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-thead>tr>th{background-color:#f8f9fa;border:1px solid #e5e7eb;padding:.75rem;font-weight:600;color:#374151;text-align:left;position:sticky;top:0;z-index:1;word-wrap:break-word;white-space:normal}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-thead>tr>th.csv-header-cell{background-color:#f1f5f9;font-weight:700;color:#1e293b}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-tbody>tr>td{border:1px solid #e5e7eb;padding:.75rem;color:#374151;vertical-align:top;word-wrap:break-word;white-space:normal}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-tbody>tr>td.csv-header-cell{background-color:#f1f5f9;font-weight:600;color:#1e293b}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-tbody>tr:nth-child(2n){background-color:#f9fafb}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-tbody>tr:hover{background-color:#f3f4f6}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i7.PdfViewerComponent, selector: "pdf-viewer", inputs: ["src", "c-maps-url", "page", "render-text", "render-text-mode", "original-size", "show-all", "stick-to-page", "zoom", "zoom-scale", "rotation", "external-link-target", "autoresize", "fit-to-page", "show-borders"], outputs: ["after-load-complete", "page-rendered", "pages-initialized", "text-layer-rendered", "error", "on-progress", "pageChange"] }, { kind: "component", type: i8.NgxDocViewerComponent, selector: "ngx-doc-viewer", inputs: ["url", "queryParams", "viewerUrl", "googleCheckInterval", "googleMaxChecks", "disableContent", "googleCheckContentLoaded", "viewer", "overrideLocalhost"], outputs: ["loaded"] }, { kind: "component", type: i2$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "component", type: DocumentZoomControlsComponent, selector: "document-zoom-controls", inputs: ["selectedDocument", "contextId"], outputs: ["documentNameUpdated"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
7035
7462
|
}
|
|
7036
7463
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContentViewerComponent, decorators: [{
|
|
7037
7464
|
type: Component,
|
|
7038
|
-
args: [{ selector: 'document-content-viewer', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-content-viewer-container\">\n @if(documentUrl && contentType){\n <!-- Zoom Controls -->\n <div class=\"zoom-controls-wrapper\">\n <document-zoom-controls \n [selectedDocument]=\"selectedDocument\" \n [contextId]=\"contextId\"\n (documentNameUpdated)=\"onDocumentNameUpdated()\">\n </document-zoom-controls>\n </div>\n \n <!-- PDF Viewer -->\n @if(isPdf){\n <div class=\"pdf-container\">\n <pdf-viewer\n [src]=\"documentUrl\"\n [rotation]=\"0\"\n [original-size]=\"false\"\n [show-all]=\"true\"\n [fit-to-page]=\"false\"\n [zoom]=\"currentZoom / 100\"\n [zoom-scale]=\"'page-width'\"\n [stick-to-page]=\"false\"\n [render-text]=\"true\"\n [external-link-target]=\"'blank'\"\n [autoresize]=\"true\"\n [show-borders]=\"false\"\n style=\"width: 100%; height: 100%\"\n ></pdf-viewer>\n </div>\n }\n\n <!-- Image Viewer -->\n @else if(isImage){\n <div class=\"image-container\">\n <img\n [src]=\"documentUrl\"\n [alt]=\"documentName || 'Document Image'\"\n class=\"document-image\"\n [style.transform]=\"'scale(' + (currentZoom / 100) + ')'\"\n [style.transform-origin]=\"'center center'\"\n />\n </div>\n }\n\n <!-- Excel Files -->\n @else if(isExcel){\n <div class=\"excel-container\">\n @if(isLoadingExcel){\n <div class=\"loading-container\">\n <div class=\"loading-content\">\n <i class=\"pi pi-spin pi-spinner\" style=\"font-size: 2rem; color: #3b82f6;\"></i>\n <p>Loading Excel file...</p>\n </div>\n </div>\n }@else if(excelError){\n <div class=\"error-container\">\n <div class=\"error-content\">\n <i class=\"pi pi-exclamation-triangle\" style=\"font-size: 3rem; color: #ef4444;\"></i>\n <h4>Error Loading Excel File</h4>\n <p>{{ excelError }}</p>\n <div class=\"error-actions\">\n <button \n type=\"button\" \n class=\"p-button p-button-primary p-button-sm\"\n (click)=\"downloadDocument()\"\n >\n <i class=\"pi pi-download\"></i>\n Download Instead\n </button>\n </div>\n </div>\n </div>\n }\n @else if(excelData){\n <div class=\"docx-container\">\n <div class=\"docx-content\">\n <ngx-doc-viewer\n [url]=\"documentUrl\"\n viewer=\"office\"\n [style.transform]=\"'scale(' + (currentZoom / 100) + ')'\"\n [style.transform-origin]=\"'top left'\"\n style=\"width:100%;height:85vh;\"\n ></ngx-doc-viewer>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Word Files -->\n @else if(isWord){\n <div class=\"docx-container\">\n <div class=\"docx-content\">\n <ngx-doc-viewer\n [url]=\"documentUrl\"\n viewer=\"office\"\n [style.transform]=\"'scale(' + (currentZoom / 100) + ')'\"\n [style.transform-origin]=\"'top left'\"\n style=\"width:80%;height:100%;\"\n ></ngx-doc-viewer>\n </div>\n </div>\n }\n\n <!-- CSV Files -->\n @else if(isCsv){\n <div class=\"csv-container\">\n @if(isLoadingCsv){\n <div class=\"loading-container\">\n <div class=\"loading-content\">\n <i class=\"pi pi-spin pi-spinner\" style=\"font-size: 2rem; color: #3b82f6;\"></i>\n <p>Loading CSV file...</p>\n </div>\n </div>\n }@else if(csvError){\n <div class=\"error-container\">\n <div class=\"error-content\">\n <i class=\"pi pi-exclamation-triangle\" style=\"font-size: 3rem; color: #ef4444;\"></i>\n <h4>Error Loading CSV File</h4>\n <p>{{ csvError }}</p>\n <div class=\"error-actions\">\n <button \n type=\"button\" \n class=\"p-button p-button-primary p-button-sm\"\n (click)=\"downloadDocument()\"\n >\n <i class=\"pi pi-download\"></i>\n Download Instead\n </button>\n </div>\n </div>\n </div>\n }\n @else if(csvData){\n <div class=\"csv-content\">\n <div class=\"csv-header\">\n <div class=\"csv-info\">\n <p>{{ documentName || 'CSV File' }}</p>\n <span class=\"csv-stats\">\n {{ csvData.totalRows }} rows \u00D7 {{ csvData.totalColumns }} columns\n </span>\n </div>\n </div>\n \n <div class=\"csv-table-container\">\n <p-table \n [value]=\"safeCsvStyledData\" \n [tableStyle]=\"{'min-width': '100%'}\"\n [scrollable]=\"true\"\n scrollHeight=\"67vh\"\n class=\"csv-table\"\n [style.transform]=\"'scale(' + (currentZoom / 100) + ')'\"\n [style.transform-origin]=\"'top left'\"\n >\n <ng-template pTemplate=\"body\" let-row>\n <tr>\n <ng-container *ngFor=\"let cell of row.cells; trackBy: trackByCell\">\n <td [ngClass]=\"{'csv-header-cell': cell.isHeader}\">\n {{ cell.value }}\n </td>\n </ng-container>\n </tr>\n </ng-template>\n </p-table>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Email Files -->\n @else if(isEmail){\n <div class=\"office-document-container\">\n <div class=\"document-preview\">\n <div class=\"document-icon\">\n <i [class]=\"documentIcon\"></i>\n </div>\n <div class=\"document-info\">\n <h4>{{ documentTypeText }}</h4>\n <p>{{ documentName || 'Email Message' }}</p>\n <p class=\"document-note\">Email files cannot be previewed directly. Please download to view.</p>\n </div>\n <div class=\"document-actions\">\n <button \n type=\"button\" \n class=\"p-button p-button-primary p-button-sm\"\n (click)=\"downloadDocument()\"\n >\n <i class=\"pi pi-download\"></i>\n Download\n </button>\n <button \n type=\"button\" \n class=\"p-button p-button-outlined p-button-sm\"\n (click)=\"openInNewTab()\"\n >\n <i class=\"pi pi-external-link\"></i>\n Open\n </button>\n </div>\n </div>\n </div>\n }\n\n <!-- OpenDocument Files -->\n @else if(isOpenDocument){\n <div class=\"docx-container\">\n <div class=\"zoom-container\">\n <ngx-doc-viewer\n [url]=\"documentUrl\"\n viewer=\"office\"\n [style.transform]=\"'scale(' + (currentZoom / 100) + ')'\"\n [style.transform-origin]=\"'top left'\"\n style=\"width:100%;height:85vh;\"\n ></ngx-doc-viewer>\n </div>\n </div>\n }\n\n <!-- Unsupported Files -->\n @else if(isUnsupported){\n <div class=\"unsupported-document-container\">\n <div class=\"document-preview\">\n <div class=\"document-icon\">\n <i [class]=\"documentIcon\"></i>\n </div>\n <div class=\"document-info\">\n <h4>Unsupported Document Type</h4>\n <p>{{ documentName || 'Document' }}</p>\n <p class=\"document-note\">This document type ({{ contentType }}) is not supported for preview. Please download to view.</p>\n </div>\n <div class=\"document-actions\">\n <button \n type=\"button\" \n class=\"p-button p-button-primary p-button-sm\"\n (click)=\"downloadDocument()\"\n >\n <i class=\"pi pi-download\"></i>\n Download\n </button>\n <button \n type=\"button\" \n class=\"p-button p-button-outlined p-button-sm\"\n (click)=\"openInNewTab()\"\n >\n <i class=\"pi pi-external-link\"></i>\n Open\n </button>\n </div>\n </div>\n </div>\n }\n }\n @else {\n <div class=\"no-document-container\">\n <div class=\"no-document-content\">\n <i class=\"pi pi-file-o\" style=\"font-size: 3rem; color: #6b7280;\"></i>\n <h4>No Document Uploaded</h4>\n <p>Please Upload a document to view its content.</p>\n </div>\n </div>\n }\n</div>\n\n", styles: [".document-content-viewer-container{height:100%;width:100%;display:flex;flex-direction:column;background:#f8f9fa;border-radius:8px;overflow:hidden}.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}.document-content-viewer-container .docx-container,.document-content-viewer-container .zoom-container{overflow:auto}.document-content-viewer-container .docx-container .docx-content,.document-content-viewer-container .zoom-container .docx-content{min-width:100%;min-height:100%}.document-content-viewer-container .pdf-container{width:100%;height:100%;border-radius:8px;overflow:hidden}.document-content-viewer-container .pdf-container ::ng-deep .ng2-pdf-viewer-container{height:100%;overflow:auto}.document-content-viewer-container .image-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:1rem;overflow:auto}.document-content-viewer-container .image-container .document-image{max-width:100%;max-height:100%;object-fit:contain;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a;transition:transform .2s ease-in-out}.document-content-viewer-container .excel-container{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;border-radius:8px;overflow:hidden}.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;border-radius:8px;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}.docx-container .docx-content{height:100%;min-height:inherit;position:relative}ngx-doc-viewer{display:block;width:100%;height:100%}.csv-container{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;border-radius:8px;overflow:hidden}.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;scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-wrapper{height:100%;scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-wrapper::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-body{scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-body::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-header{scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-header::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-footer{scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-footer::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-scrollbar-wrapper{scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-scrollbar-wrapper::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-table{border-collapse:collapse}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-thead>tr>th{background-color:#f8f9fa;border:1px solid #e5e7eb;padding:.75rem;font-weight:600;color:#374151;text-align:left;position:sticky;top:0;z-index:1;word-wrap:break-word;white-space:normal}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-thead>tr>th.csv-header-cell{background-color:#f1f5f9;font-weight:700;color:#1e293b}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-tbody>tr>td{border:1px solid #e5e7eb;padding:.75rem;color:#374151;vertical-align:top;word-wrap:break-word;white-space:normal}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-tbody>tr>td.csv-header-cell{background-color:#f1f5f9;font-weight:600;color:#1e293b}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-tbody>tr:nth-child(2n){background-color:#f9fafb}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-tbody>tr:hover{background-color:#f3f4f6}\n"] }]
|
|
7465
|
+
args: [{ selector: 'document-content-viewer', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-content-viewer-container\">\n @if(documentUrl && contentType){\n <!-- Zoom Controls -->\n <div class=\"zoom-controls-wrapper\">\n <document-zoom-controls \n [selectedDocument]=\"selectedDocument\" \n [contextId]=\"contextId\"\n (documentNameUpdated)=\"onDocumentNameUpdated()\">\n </document-zoom-controls>\n </div>\n \n <!-- PDF Viewer -->\n @if(isPdf){\n <div class=\"pdf-container\">\n <pdf-viewer\n [src]=\"documentUrl\"\n [rotation]=\"0\"\n [original-size]=\"false\"\n [show-all]=\"true\"\n [fit-to-page]=\"false\"\n [zoom]=\"currentZoom / 100\"\n [zoom-scale]=\"'page-width'\"\n [stick-to-page]=\"false\"\n [render-text]=\"true\"\n [external-link-target]=\"'blank'\"\n [autoresize]=\"true\"\n [show-borders]=\"false\"\n style=\"width: 100%; height: 100%\"\n ></pdf-viewer>\n </div>\n }\n\n <!-- Image Viewer -->\n @else if(isImage){\n <div class=\"image-container\">\n <img\n [src]=\"documentUrl\"\n [alt]=\"documentName || 'Document Image'\"\n class=\"document-image\"\n [style.transform]=\"'scale(' + (currentZoom / 100) + ')'\"\n [style.transform-origin]=\"'center center'\"\n />\n </div>\n }\n\n <!-- Excel Files -->\n @else if(isExcel){\n <div class=\"excel-container\">\n @if(isLoadingExcel){\n <div class=\"loading-container\">\n <div class=\"loading-content\">\n <i class=\"pi pi-spin pi-spinner\" style=\"font-size: 2rem; color: #3b82f6;\"></i>\n <p>Loading Excel file...</p>\n </div>\n </div>\n }@else if(excelError){\n <div class=\"error-container\">\n <div class=\"error-content\">\n <i class=\"pi pi-exclamation-triangle\" style=\"font-size: 3rem; color: #ef4444;\"></i>\n <h4>Error Loading Excel File</h4>\n <p>{{ excelError }}</p>\n <div class=\"error-actions\">\n <button \n type=\"button\" \n class=\"p-button p-button-primary p-button-sm\"\n (click)=\"downloadDocument()\"\n >\n <i class=\"pi pi-download\"></i>\n Download Instead\n </button>\n </div>\n </div>\n </div>\n }\n @else if(excelData){\n <div class=\"excel-container\">\n <div class=\"excel-zoom-wrapper\" \n [class.zoomed]=\"currentZoom !== 100\"\n (wheel)=\"onWheel($event)\">\n <ngx-doc-viewer\n [url]=\"documentUrl\"\n viewer=\"office\"\n style=\"width:100%;height:97%;\"\n ></ngx-doc-viewer>\n <!-- Invisible overlay to capture wheel events over document content -->\n <div class=\"wheel-capture-overlay\" \n (wheel)=\"onWheel($event)\"></div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Word Files -->\n @else if(isWord){\n <div class=\"docx-container\">\n <div class=\"doc-viewer-wrapper\" \n [class.zoomed]=\"currentZoom !== 100\"\n (wheel)=\"onWheel($event)\">\n <ngx-doc-viewer\n [url]=\"documentUrl\"\n viewer=\"office\"\n style=\"width:100%;height:97%;\"\n ></ngx-doc-viewer>\n <div class=\"wheel-capture-overlay\" \n (wheel)=\"onWheel($event)\"></div>\n </div>\n </div>\n }\n\n <!-- CSV Files -->\n @else if(isCsv){\n <div class=\"csv-container\">\n @if(isLoadingCsv){\n <div class=\"loading-container\">\n <div class=\"loading-content\">\n <i class=\"pi pi-spin pi-spinner\" style=\"font-size: 2rem; color: #3b82f6;\"></i>\n <p>Loading CSV file...</p>\n </div>\n </div>\n }@else if(csvError){\n <div class=\"error-container\">\n <div class=\"error-content\">\n <i class=\"pi pi-exclamation-triangle\" style=\"font-size: 3rem; color: #ef4444;\"></i>\n <h4>Error Loading CSV File</h4>\n <p>{{ csvError }}</p>\n <div class=\"error-actions\">\n <button \n type=\"button\" \n class=\"p-button p-button-primary p-button-sm\"\n (click)=\"downloadDocument()\"\n >\n <i class=\"pi pi-download\"></i>\n Download Instead\n </button>\n </div>\n </div>\n </div>\n }\n @else if(csvData){\n <div class=\"csv-content\">\n <div class=\"csv-header\">\n <div class=\"csv-info\">\n <p>{{ documentName || 'CSV File' }}</p>\n <span class=\"csv-stats\">\n {{ csvData.totalRows }} rows \u00D7 {{ csvData.totalColumns }} columns\n </span>\n </div>\n </div>\n \n <div class=\"csv-table-container\" \n [style.transform-origin]=\"'center center'\"\n (wheel)=\"onWheel($event)\">\n <p-table \n [value]=\"safeCsvStyledData\" \n [tableStyle]=\"{'min-width': '100%'}\"\n [scrollable]=\"true\"\n scrollHeight=\"67vh\"\n class=\"csv-table\"\n >\n <ng-template pTemplate=\"body\" let-row>\n <tr>\n <ng-container *ngFor=\"let cell of row.cells; trackBy: trackByCell\">\n <td [ngClass]=\"{'csv-header-cell': cell.isHeader}\">\n {{ cell.value }}\n </td>\n </ng-container>\n </tr>\n </ng-template>\n </p-table>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Email Files -->\n @else if(isEmail){\n <div class=\"office-document-container\">\n <div class=\"document-preview\">\n <div class=\"document-icon\">\n <i [class]=\"documentIcon\"></i>\n </div>\n <div class=\"document-info\">\n <h4>{{ documentTypeText }}</h4>\n <p>{{ documentName || 'Email Message' }}</p>\n <p class=\"document-note\">Email files cannot be previewed directly. Please download to view.</p>\n </div>\n <div class=\"document-actions\">\n <button \n type=\"button\" \n class=\"p-button p-button-primary p-button-sm\"\n (click)=\"downloadDocument()\"\n >\n <i class=\"pi pi-download\"></i>\n Download\n </button>\n <button \n type=\"button\" \n class=\"p-button p-button-outlined p-button-sm\"\n (click)=\"openInNewTab()\"\n >\n <i class=\"pi pi-external-link\"></i>\n Open\n </button>\n </div>\n </div>\n </div>\n }\n\n <!-- OpenDocument Files -->\n @else if(isOpenDocument){\n <div class=\"docx-container\">\n <div class=\"doc-viewer-wrapper\" \n [class.zoomed]=\"currentZoom !== 100\"\n (wheel)=\"onWheel($event)\">\n <ngx-doc-viewer\n [url]=\"documentUrl\"\n viewer=\"office\"\n style=\"width:100%;height:800px;\"\n ></ngx-doc-viewer>\n <!-- Invisible overlay to capture wheel events over document content -->\n <div class=\"wheel-capture-overlay\" \n (wheel)=\"onWheel($event)\"></div>\n </div>\n </div>\n }\n\n <!-- Unsupported Files -->\n @else if(isUnsupported){\n <div class=\"unsupported-document-container\">\n <div class=\"document-preview\">\n <div class=\"document-icon\">\n <i [class]=\"documentIcon\"></i>\n </div>\n <div class=\"document-info\">\n <h4>Unsupported Document Type</h4>\n <p>{{ documentName || 'Document' }}</p>\n <p class=\"document-note\">This document type ({{ contentType }}) is not supported for preview. Please download to view.</p>\n </div>\n <div class=\"document-actions\">\n <button \n type=\"button\" \n class=\"p-button p-button-primary p-button-sm\"\n (click)=\"downloadDocument()\"\n >\n <i class=\"pi pi-download\"></i>\n Download\n </button>\n <button \n type=\"button\" \n class=\"p-button p-button-outlined p-button-sm\"\n (click)=\"openInNewTab()\"\n >\n <i class=\"pi pi-external-link\"></i>\n Open\n </button>\n </div>\n </div>\n </div>\n }\n }\n @else {\n <div class=\"no-document-container\">\n <div class=\"no-document-content\">\n <i class=\"pi pi-file-o\" style=\"font-size: 3rem; color: #6b7280;\"></i>\n <h4>No Document Uploaded</h4>\n <p>Please Upload a document to view its content.</p>\n </div>\n </div>\n }\n</div>\n\n", styles: [".document-content-viewer-container{height:100%;width:100%;display:flex;flex-direction:column;background:#f8f9fa;border-radius:8px;overflow:auto}.document-content-viewer-container .zoom-controls-wrapper{position:sticky;top:0;z-index:10;background:#f8f9faf2;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-bottom:1px solid #e5e7eb;justify-content:space-between;align-items:center}.document-content-viewer-container .docx-container{overflow:auto}.document-content-viewer-container .pdf-container{width:100%;height:100%;border-radius:8px;overflow:hidden}.document-content-viewer-container .pdf-container ::ng-deep .ng2-pdf-viewer-container{height:100%;overflow:auto}.document-content-viewer-container .image-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:1rem;overflow:auto}.document-content-viewer-container .image-container .document-image{max-width:100%;max-height:100%;object-fit:contain;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a;transition:transform .2s ease-in-out}.document-content-viewer-container .excel-container{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;border-radius:8px;overflow:auto}.document-content-viewer-container .excel-container .loading-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.document-content-viewer-container .excel-container .loading-container .loading-content{text-align:center;color:#6b7280}.document-content-viewer-container .excel-container .loading-container .loading-content i{margin-bottom:1rem;display:block}.document-content-viewer-container .excel-container .loading-container .loading-content p{margin:0;color:#9ca3af;font-size:.875rem}.document-content-viewer-container .excel-container .error-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.document-content-viewer-container .excel-container .error-container .error-content{text-align:center;color:#6b7280;max-width:400px}.document-content-viewer-container .excel-container .error-container .error-content i{margin-bottom:1rem;display:block}.document-content-viewer-container .excel-container .error-container .error-content h4{margin:0 0 .5rem;color:#dc2626;font-size:1.25rem;font-weight:600}.document-content-viewer-container .excel-container .error-container .error-content p{margin:0 0 1.5rem;color:#6b7280;font-size:.875rem}.document-content-viewer-container .excel-container .error-container .error-content .error-actions{display:flex;justify-content:center}.document-content-viewer-container .excel-container .excel-viewer{width:100%;height:100%;display:flex;flex-direction:column}.document-content-viewer-container .excel-container .excel-viewer .excel-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.5rem;background:#f8fafc;border-bottom:1px solid #e2e8f0}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-info{display:flex;align-items:center;gap:1rem}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-info i{font-size:2rem;color:#10b981}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-info .excel-details h4{margin:0 0 .25rem;color:#1f2937;font-size:1.125rem;font-weight:600}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-info .excel-details p{margin:0;color:#6b7280;font-size:.875rem}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-actions{display:flex;gap:.5rem}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-actions .p-button.p-button-sm{padding:.375rem .75rem;font-size:.75rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content{flex:1;display:flex;flex-direction:column;padding:1rem;background:#fafafa;overflow:hidden}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation{display:flex;align-items:center;gap:.5rem;margin-bottom:1rem;padding:.5rem;background:#fff;border-radius:6px;border:1px solid #e5e7eb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-label{font-size:.875rem;font-weight:500;color:#6b7280;margin-right:.5rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-tab{padding:.375rem .75rem;border:1px solid #d1d5db;background:#fff;border-radius:4px;font-size:.75rem;color:#6b7280;cursor:pointer;transition:all .2s}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-tab:hover{background:#f3f4f6;border-color:#9ca3af}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-tab.active{background:#10b981;color:#fff;border-color:#10b981}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container{flex:1;overflow:auto;background:#fff;border-radius:6px;border:1px solid #e5e7eb;margin-bottom:1rem;min-width:100%;position:relative;min-height:300px;overflow-x:auto;overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container::-webkit-scrollbar{display:none}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table{width:100%;min-width:max-content;border-collapse:collapse;font-size:.875rem;table-layout:auto;border:2px solid #e5e7eb;word-wrap:break-word;white-space:nowrap}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table th,.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td{padding:.5rem .75rem;text-align:left;border-bottom:1px solid #f3f4f6;border-right:1px solid #f3f4f6;min-width:80px;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:normal;position:relative;box-sizing:border-box;vertical-align:top}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td:empty:after{content:\"\";display:block;min-height:1.5rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table th:last-child,.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td:last-child{border-right:1px solid #e5e7eb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table th:first-child,.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td:first-child{border-left:1px solid #e5e7eb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table .empty-cell{background-color:#fafafa;color:#9ca3af;font-style:italic;border:1px solid #e5e7eb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table tr{border:1px solid #e5e7eb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table th{background:#f8fafc;font-weight:600;color:#374151;position:sticky;top:0;z-index:10;border-bottom:2px solid #e5e7eb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td{color:#6b7280;background:#fff}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td:first-child{font-weight:500;color:#374151}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table tr:hover td{background:#f9fafb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table tbody tr:last-child td{border-bottom:none}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-info-bar{display:flex;align-items:center;gap:1.5rem;padding:.75rem;background:#fff;border-radius:6px;border:1px solid #e5e7eb;font-size:.75rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-info-bar .info-item{display:flex;align-items:center;gap:.5rem;color:#6b7280}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-info-bar .info-item i{color:#10b981;font-size:.875rem}.document-content-viewer-container .office-document-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.document-content-viewer-container .office-document-container .document-preview{background:#fff;border-radius:12px;padding:2rem;text-align:center;box-shadow:0 10px 15px -3px #0000001a;max-width:400px;width:100%}.document-content-viewer-container .office-document-container .document-preview .document-icon{margin-bottom:1.5rem}.document-content-viewer-container .office-document-container .document-preview .document-icon i{font-size:4rem;color:#3b82f6}.document-content-viewer-container .office-document-container .document-preview .document-info{margin-bottom:2rem}.document-content-viewer-container .office-document-container .document-preview .document-info h4{margin:0 0 .5rem;color:#1f2937;font-size:1.25rem;font-weight:600}.document-content-viewer-container .office-document-container .document-preview .document-info p{margin:.25rem 0;color:#6b7280;font-size:.875rem}.document-content-viewer-container .office-document-container .document-preview .document-info p.document-note{color:#9ca3af;font-style:italic;margin-top:.75rem}.document-content-viewer-container .office-document-container .document-preview .document-actions{display:flex;gap:.75rem;justify-content:center;flex-wrap:wrap}.document-content-viewer-container .office-document-container .document-preview .document-actions .p-button{min-width:120px}.document-content-viewer-container .office-document-container .document-preview .document-actions .p-button.p-button-sm{padding:.5rem 1rem;font-size:.875rem}.document-content-viewer-container .unsupported-document-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.document-content-viewer-container .unsupported-document-container .document-preview{background:#fff;border-radius:12px;padding:2rem;text-align:center;box-shadow:0 10px 15px -3px #0000001a;max-width:400px;width:100%;border:2px solid #fbbf24}.document-content-viewer-container .unsupported-document-container .document-preview .document-icon{margin-bottom:1.5rem}.document-content-viewer-container .unsupported-document-container .document-preview .document-icon i{font-size:4rem;color:#f59e0b}.document-content-viewer-container .unsupported-document-container .document-preview .document-info{margin-bottom:2rem}.document-content-viewer-container .unsupported-document-container .document-preview .document-info h4{margin:0 0 .5rem;color:#92400e;font-size:1.25rem;font-weight:600}.document-content-viewer-container .unsupported-document-container .document-preview .document-info p{margin:.25rem 0;color:#6b7280;font-size:.875rem}.document-content-viewer-container .unsupported-document-container .document-preview .document-info p.document-note{color:#d97706;font-style:italic;margin-top:.75rem;background:#fef3c7;padding:.5rem;border-radius:6px;border:1px solid #fde68a}.document-content-viewer-container .unsupported-document-container .document-preview .document-actions{display:flex;gap:.75rem;justify-content:center;flex-wrap:wrap}.document-content-viewer-container .unsupported-document-container .document-preview .document-actions .p-button{min-width:120px}.document-content-viewer-container .unsupported-document-container .document-preview .document-actions .p-button.p-button-sm{padding:.5rem 1rem;font-size:.875rem}.document-content-viewer-container .no-document-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.document-content-viewer-container .no-document-container .no-document-content{text-align:center;color:#6b7280}.document-content-viewer-container .no-document-container .no-document-content i{margin-bottom:1rem;display:block}.document-content-viewer-container .no-document-container .no-document-content h4{margin:0 0 .5rem;color:#374151;font-size:1.25rem;font-weight:600}.document-content-viewer-container .no-document-container .no-document-content p{margin:0;color:#9ca3af;font-size:.875rem}@media (max-width: 768px){.document-content-viewer-container .office-document-container,.document-content-viewer-container .unsupported-document-container{padding:1rem}.document-content-viewer-container .office-document-container .document-preview,.document-content-viewer-container .unsupported-document-container .document-preview{padding:1.5rem;max-width:100%}.document-content-viewer-container .office-document-container .document-preview .document-icon i,.document-content-viewer-container .unsupported-document-container .document-preview .document-icon i{font-size:3rem}.document-content-viewer-container .office-document-container .document-preview .document-actions,.document-content-viewer-container .unsupported-document-container .document-preview .document-actions{flex-direction:column;align-items:center}.document-content-viewer-container .office-document-container .document-preview .document-actions .p-button,.document-content-viewer-container .unsupported-document-container .document-preview .document-actions .p-button{width:100%;max-width:200px}.document-content-viewer-container .image-container{padding:.5rem}.document-content-viewer-container .excel-container .excel-viewer .excel-header{flex-direction:column;gap:1rem;padding:1rem}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-info{justify-content:center}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-actions{justify-content:center;width:100%}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-actions .p-button{flex:1;max-width:150px}.document-content-viewer-container .excel-container .excel-viewer .excel-content{padding:.5rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation{flex-wrap:wrap;gap:.25rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-tab{font-size:.7rem;padding:.25rem .5rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table{font-size:.75rem}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table th,.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td{padding:.25rem .5rem;min-width:80px;max-width:150px}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-info-bar{flex-wrap:wrap;gap:1rem;font-size:.7rem}}@media (prefers-color-scheme: dark){.document-content-viewer-container{background:#1f2937}.document-content-viewer-container .office-document-container .document-preview,.document-content-viewer-container .unsupported-document-container .document-preview{background:#374151;color:#f9fafb}.document-content-viewer-container .office-document-container .document-preview .document-info h4,.document-content-viewer-container .unsupported-document-container .document-preview .document-info h4{color:#f9fafb}.document-content-viewer-container .office-document-container .document-preview .document-info p,.document-content-viewer-container .unsupported-document-container .document-preview .document-info p{color:#d1d5db}.document-content-viewer-container .office-document-container .document-preview .document-info p.document-note,.document-content-viewer-container .unsupported-document-container .document-preview .document-info p.document-note{color:#9ca3af;background:#4b5563;border-color:#6b7280}.document-content-viewer-container .excel-container{background:#374151}.document-content-viewer-container .excel-container .excel-viewer .excel-header{background:#4b5563;border-color:#6b7280}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-info .excel-details h4{color:#f9fafb}.document-content-viewer-container .excel-container .excel-viewer .excel-header .excel-info .excel-details p{color:#d1d5db}.document-content-viewer-container .excel-container .excel-viewer .excel-content{background:#374151}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation{background:#4b5563;border-color:#6b7280}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-tab{background:#4b5563;border-color:#6b7280;color:#d1d5db}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-tab:hover{background:#6b7280;border-color:#9ca3af}.document-content-viewer-container .excel-container .excel-viewer .excel-content .sheet-navigation .sheet-tab.active{background:#10b981;color:#fff;border-color:#10b981}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container{background:#4b5563;border-color:#6b7280}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table th{background:#6b7280;color:#f9fafb;border-color:#9ca3af}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td{background:#4b5563;color:#d1d5db;border-color:#6b7280}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table td:first-child{color:#f9fafb}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-table-container .excel-table tr:hover td{background:#6b7280}.document-content-viewer-container .excel-container .excel-viewer .excel-content .excel-info-bar{background:#4b5563;border-color:#6b7280;color:#d1d5db}.document-content-viewer-container .no-document-container .no-document-content{color:#9ca3af}.document-content-viewer-container .no-document-container .no-document-content h4{color:#f9fafb}.document-content-viewer-container .no-document-container .no-document-content p{color:#d1d5db}}.excel-table{border-collapse:collapse;width:100%;font-size:.875rem}.excel-table th,.excel-table td{padding:.5rem;border:1px solid #e2e8f0;text-align:left;vertical-align:top;min-width:80px}.excel-table th[style*=background-color]:not([style*=color]),.excel-table td[style*=background-color]:not([style*=color]){color:#1f2937}.excel-table th[style*=\"font-weight: bold\"],.excel-table td[style*=\"font-weight: bold\"]{font-weight:600}.excel-table th[style*=\"font-style: italic\"],.excel-table td[style*=\"font-style: italic\"]{font-style:italic}.excel-table th{background-color:#f8fafc;font-weight:600;color:#475569;position:sticky;top:0;z-index:10}.excel-table td{background-color:#fff}.excel-table td.empty-cell{background-color:#f8fafc;color:#9ca3af}.excel-table tbody tr:hover td{background-color:#f1f5f9}.excel-table tbody tr:hover td[style*=background-color]{opacity:.8}.debug-info{margin-top:1rem;padding:1rem;background-color:#fef3c7;border:1px solid #f59e0b;border-radius:8px}.debug-info summary{cursor:pointer;font-weight:600;color:#d97706;margin-bottom:.5rem}.debug-info summary:hover{color:#b45309}.debug-info .debug-content{margin-top:.5rem}.debug-info .debug-content p{margin:.5rem 0;color:#92400e}.debug-info .debug-content ul{margin:.5rem 0;padding-left:1.5rem;color:#92400e}.debug-info .debug-content li{margin:.25rem 0}.debug-info .debug-content button{margin-top:.5rem}.docx-container{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;border-radius:8px;overflow:hidden}.docx-container .loading-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.docx-container .loading-container .loading-content{text-align:center;color:#6b7280}.docx-container .loading-container .loading-content i{margin-bottom:1rem;display:block}.docx-container .loading-container .loading-content p{margin:0;color:#9ca3af;font-size:.875rem}.docx-container .error-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.docx-container .error-container .error-content{text-align:center;color:#6b7280;max-width:400px}.docx-container .error-container .error-content i{margin-bottom:1rem;display:block}.docx-container .error-container .error-content h4{margin:0 0 .5rem;color:#dc2626;font-size:1.25rem;font-weight:600}.docx-container .error-container .error-content p{margin:0 0 1rem;color:#9ca3af;font-size:.875rem}.docx-container .error-container .error-content .error-actions{margin-top:1rem}.docx-container .docx-viewer{width:100%;height:100%;display:flex;flex-direction:column;background:#fff}.docx-container .docx-viewer .docx-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.5rem;border-bottom:1px solid #e5e7eb;background-color:#f9fafb}.docx-container .docx-viewer .docx-header .docx-info{display:flex;align-items:center;gap:1rem}.docx-container .docx-viewer .docx-header .docx-info i{font-size:2rem;color:#2563eb}.docx-container .docx-viewer .docx-header .docx-info .docx-details h4{margin:0 0 .25rem;font-size:1.125rem;font-weight:600;color:#111827}.docx-container .docx-viewer .docx-header .docx-info .docx-details p{margin:0 0 .125rem;font-size:.875rem;color:#6b7280}.docx-container .docx-viewer .docx-header .docx-info .docx-details .document-title{font-weight:500;color:#374151;font-size:.875rem}.docx-container .docx-viewer .docx-header .docx-info .docx-details .document-author{font-style:italic;color:#6b7280;font-size:.75rem}.docx-container .docx-viewer .docx-header .docx-actions{display:flex;gap:.5rem}.docx-container .docx-viewer .docx-content{flex:1;overflow:auto;padding:1.5rem}.docx-container .docx-viewer .docx-content .docx-stats{display:flex;flex-wrap:wrap;gap:1rem;margin-bottom:1.5rem;padding:1rem;background-color:#f8fafc;border-radius:8px;border:1px solid #e2e8f0}.docx-container .docx-viewer .docx-content .docx-stats .stat-item{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;background-color:#fff;border-radius:6px;border:1px solid #e2e8f0;font-size:.75rem;color:#475569;font-weight:500}.docx-container .docx-viewer .docx-content .docx-stats .stat-item i{color:#64748b}.docx-container .docx-viewer .docx-content .docx-content-body{line-height:1.6;color:#1f2937}.docx-container .docx-viewer .docx-content .docx-content-body .docx-paragraph{margin:0 0 1rem;text-align:justify}.docx-container .docx-viewer .docx-content .docx-content-body .docx-heading{margin:1.5rem 0 1rem;font-weight:600;color:#111827;line-height:1.3}.docx-container .docx-viewer .docx-content .docx-content-body .docx-heading.docx-h1{font-size:1.875rem;border-bottom:2px solid #e5e7eb;padding-bottom:.5rem}.docx-container .docx-viewer .docx-content .docx-content-body .docx-heading.docx-h2{font-size:1.5rem;border-bottom:1px solid #e5e7eb;padding-bottom:.25rem}.docx-container .docx-viewer .docx-content .docx-content-body .docx-heading.docx-h3{font-size:1.25rem}.docx-container .docx-viewer .docx-content .docx-content-body .docx-heading.docx-h4,.docx-container .docx-viewer .docx-content .docx-content-body .docx-heading.docx-h5,.docx-container .docx-viewer .docx-content .docx-content-body .docx-heading.docx-h6{font-size:1.125rem}.docx-container .docx-viewer .docx-content .docx-content-body .docx-table{width:100%;margin:1rem 0;border-collapse:collapse;border:1px solid #e5e7eb;background-color:#fff}.docx-container .docx-viewer .docx-content .docx-content-body .docx-table .docx-header{background-color:#f8fafc;font-weight:600;color:#374151}.docx-container .docx-viewer .docx-content .docx-content-body .docx-table .docx-cell,.docx-container .docx-viewer .docx-content .docx-content-body .docx-table .docx-header{padding:.75rem;border:1px solid #e5e7eb;text-align:left;vertical-align:top}.docx-container .docx-viewer .docx-content .docx-content-body .docx-table .docx-row:hover{background-color:#f9fafb}.docx-container .docx-viewer .docx-content .docx-content-body .docx-list{margin:1rem 0;padding-left:1.5rem}.docx-container .docx-viewer .docx-content .docx-content-body .docx-list.docx-ul{list-style-type:disc}.docx-container .docx-viewer .docx-content .docx-content-body .docx-list.docx-ol{list-style-type:decimal}.docx-container .docx-viewer .docx-content .docx-content-body .docx-list .docx-list-item{margin:.5rem 0;line-height:1.5}.docx-container .docx-viewer .docx-content .docx-content-body .docx-image{max-width:100%;height:auto;border-radius:6px;box-shadow:0 2px 4px #0000001a;margin:1rem 0}.docx-container .docx-viewer .docx-content .docx-content-body blockquote{margin:1rem 0;padding:1rem 1.5rem;border-left:4px solid #3b82f6;background-color:#f8fafc;font-style:italic;color:#374151}.docx-container .docx-viewer .docx-content .docx-content-body pre,.docx-container .docx-viewer .docx-content .docx-content-body code{background-color:#f1f5f9;border:1px solid #e2e8f0;border-radius:4px;padding:.5rem;font-family:Courier New,monospace;font-size:.875rem;color:#1e293b;overflow-x:auto}.docx-container .docx-viewer .docx-content .docx-content-body pre{padding:1rem;margin:1rem 0}.docx-container .docx-viewer .docx-content .docx-content-body a{color:#2563eb;text-decoration:none}.docx-container .docx-viewer .docx-content .docx-content-body a:hover{text-decoration:underline}.docx-container .docx-viewer .docx-content .docx-content-body em,.docx-container .docx-viewer .docx-content .docx-content-body i{font-style:italic}.docx-container .docx-viewer .docx-content .docx-content-body strong,.docx-container .docx-viewer .docx-content .docx-content-body b{font-weight:600}.docx-container .docx-viewer .docx-content .docx-content-body hr{border:none;border-top:1px solid #e5e7eb;margin:2rem 0}.word-loading-container{display:flex;align-items:center;justify-content:center;min-height:400px;width:100%;background-color:#f9fafb;border-radius:8px}.word-loading-container .loading-content{text-align:center}.word-loading-container .loading-content i{margin-bottom:1rem;display:block;font-size:2rem;color:#3b82f6}.word-loading-container .loading-content p{margin:0;color:#6b7280;font-size:1rem;font-weight:500}.docx-container{min-height:400px;overflow:auto}.doc-viewer-wrapper{transition:transform .2s ease-in-out;overflow:auto;position:relative;transform-origin:center center;height:100%;scroll-behavior:smooth}.doc-viewer-wrapper .wheel-capture-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:transparent;z-index:5;pointer-events:auto}.doc-viewer-wrapper .wheel-capture-overlay:active{pointer-events:none}.doc-viewer-wrapper ngx-doc-viewer ::ng-deep iframe{transition:transform .2s ease-in-out;transform-origin:top left;border:none;min-width:100%;min-height:100%}.excel-zoom-wrapper{overflow:auto;position:relative;height:100%;width:100%;scroll-behavior:smooth}.excel-zoom-wrapper .wheel-capture-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:transparent;z-index:5;pointer-events:auto}.excel-zoom-wrapper .wheel-capture-overlay:active{pointer-events:none}.excel-zoom-wrapper:not(.zoomed){display:flex;align-items:center;justify-content:center}.excel-zoom-wrapper.zoomed{overflow:auto;display:block}.excel-zoom-wrapper ngx-doc-viewer{transition:transform .2s ease-in-out;transform-origin:center center;display:block;width:100%;height:100%}.excel-zoom-wrapper ngx-doc-viewer ::ng-deep iframe{transition:transform .2s ease-in-out;transform-origin:top left;border:none;min-width:100%;min-height:100%}ngx-doc-viewer{display:block;width:100%;height:100%}ngx-doc-viewer ::ng-deep iframe{transition:transform .2s ease-in-out;transform-origin:center center}.csv-container{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;border-radius:8px;overflow:auto}.csv-container *{scrollbar-width:none;-ms-overflow-style:none}.csv-container *::-webkit-scrollbar{display:none}.csv-container .loading-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.csv-container .loading-container .loading-content{text-align:center;color:#6b7280}.csv-container .loading-container .loading-content i{margin-bottom:1rem;display:block}.csv-container .loading-container .loading-content p{margin:0;color:#9ca3af;font-size:.875rem}.csv-container .error-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:2rem}.csv-container .error-container .error-content{text-align:center;color:#6b7280;max-width:400px}.csv-container .error-container .error-content i{margin-bottom:1rem;display:block}.csv-container .error-container .error-content h4{margin:0 0 .5rem;color:#dc2626;font-size:1.25rem;font-weight:600}.csv-container .error-container .error-content p{margin:0 0 1rem;color:#6b7280;font-size:.875rem}.csv-container .error-container .error-content .error-actions{margin-top:1rem}.csv-container .csv-content{width:100%;height:98%;display:flex;flex-direction:column;padding:1rem}.csv-container .csv-content .csv-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:1rem;padding-bottom:1rem;border-bottom:1px solid #e5e7eb}.csv-container .csv-content .csv-header .csv-info h4{margin:0 0 .5rem;color:#111827;font-size:1.25rem;font-weight:600}.csv-container .csv-content .csv-header .csv-info p{margin:0 0 .25rem;color:#6b7280;font-size:.875rem}.csv-container .csv-content .csv-header .csv-info .csv-stats{display:inline-block;background-color:#f3f4f6;color:#6b7280;font-size:.75rem;padding:.25rem .5rem;border-radius:4px;font-weight:500}.csv-container .csv-content .csv-header .csv-actions{display:flex;gap:.5rem}.csv-container .csv-content .csv-table-container{flex:1;overflow:auto;border-radius:6px;min-width:0;min-height:0;transition:transform .2s ease-in-out;scroll-behavior:smooth;transform-origin:center center;scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-wrapper{height:100%;scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-wrapper::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-body{scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-body::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-header{scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-header::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-footer{scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-scrollable-footer::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-scrollbar-wrapper{scrollbar-width:none;-ms-overflow-style:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-scrollbar-wrapper::-webkit-scrollbar{display:none}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-table{border-collapse:collapse}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-thead>tr>th{background-color:#f8f9fa;border:1px solid #e5e7eb;padding:.75rem;font-weight:600;color:#374151;text-align:left;position:sticky;top:0;z-index:1;word-wrap:break-word;white-space:normal}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-thead>tr>th.csv-header-cell{background-color:#f1f5f9;font-weight:700;color:#1e293b}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-tbody>tr>td{border:1px solid #e5e7eb;padding:.75rem;color:#374151;vertical-align:top;word-wrap:break-word;white-space:normal}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-tbody>tr>td.csv-header-cell{background-color:#f1f5f9;font-weight:600;color:#1e293b}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-tbody>tr:nth-child(2n){background-color:#f9fafb}.csv-container .csv-content .csv-table-container .csv-table ::ng-deep .p-datatable-tbody>tr:hover{background-color:#f3f4f6}\n"] }]
|
|
7039
7466
|
}], ctorParameters: () => [{ type: ExcelParserService }, { type: CsvParserService }, { type: DocumentHttpService }, { type: DocumentZoomService }], propDecorators: { documentUrl: [{
|
|
7040
7467
|
type: Input
|
|
7041
7468
|
}], contentType: [{
|
|
@@ -7051,130 +7478,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
7051
7478
|
args: ['wheel', ['$event']]
|
|
7052
7479
|
}] } });
|
|
7053
7480
|
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
calculateCardClass(currentStatus, statusId) {
|
|
7062
|
-
// Use statusId if available, otherwise fall back to currentStatus
|
|
7063
|
-
if (statusId) {
|
|
7064
|
-
return `status-${statusId}-card`;
|
|
7065
|
-
}
|
|
7066
|
-
if (!currentStatus) {
|
|
7067
|
-
return SHARED.CARD_PENDING;
|
|
7068
|
-
}
|
|
7069
|
-
const status = currentStatus.toLowerCase();
|
|
7070
|
-
if (status === SHARED.STATUS_ACCEPTED.toLowerCase() || status === SHARED.STATUS_APPROVED.toLowerCase()) {
|
|
7071
|
-
return SHARED.CARD_ACCEPTED;
|
|
7072
|
-
}
|
|
7073
|
-
else if (status === SHARED.STATUS_REJECTED_LOWERCASE.toLowerCase() || status === SHARED.STATUS_REJECTED.toLowerCase()) {
|
|
7074
|
-
return SHARED.CARD_REJECTED;
|
|
7075
|
-
}
|
|
7076
|
-
else {
|
|
7077
|
-
return SHARED.CARD_PENDING;
|
|
7078
|
-
}
|
|
7079
|
-
}
|
|
7080
|
-
/**
|
|
7081
|
-
* Calculates the reject button class based on status
|
|
7082
|
-
* @param currentStatus - The current status of the document
|
|
7083
|
-
* @param statusId - The status ID from API
|
|
7084
|
-
* @returns {string} The CSS class for the reject button
|
|
7085
|
-
*/
|
|
7086
|
-
calculateRejectButtonClass(currentStatus, statusId) {
|
|
7087
|
-
// Use statusId if available, otherwise fall back to currentStatus
|
|
7088
|
-
if (statusId) {
|
|
7089
|
-
return `status-${statusId}-reject`;
|
|
7090
|
-
}
|
|
7091
|
-
if (!currentStatus) {
|
|
7092
|
-
return SHARED.BUTTON_DEFAULT_REJECT;
|
|
7093
|
-
}
|
|
7094
|
-
const status = currentStatus.toLowerCase();
|
|
7095
|
-
if (status === SHARED.STATUS_ACCEPTED.toLowerCase() || status === SHARED.STATUS_APPROVED.toLowerCase()) {
|
|
7096
|
-
return SHARED.BUTTON_SECONDARY_REJECT;
|
|
7097
|
-
}
|
|
7098
|
-
else if (status === SHARED.STATUS_REJECTED_LOWERCASE.toLowerCase() || status === SHARED.STATUS_REJECTED.toLowerCase()) {
|
|
7099
|
-
return SHARED.BUTTON_PRIMARY_REJECT;
|
|
7100
|
-
}
|
|
7101
|
-
else {
|
|
7102
|
-
return SHARED.BUTTON_DEFAULT_REJECT;
|
|
7103
|
-
}
|
|
7104
|
-
}
|
|
7105
|
-
/**
|
|
7106
|
-
* Calculates the accept button class based on status
|
|
7107
|
-
* @param currentStatus - The current status of the document
|
|
7108
|
-
* @param statusId - The status ID from API
|
|
7109
|
-
* @returns {string} The CSS class for the accept button
|
|
7110
|
-
*/
|
|
7111
|
-
calculateAcceptButtonClass(currentStatus, statusId) {
|
|
7112
|
-
// Use statusId if available, otherwise fall back to currentStatus
|
|
7113
|
-
if (statusId) {
|
|
7114
|
-
return `status-${statusId}-accept`;
|
|
7115
|
-
}
|
|
7116
|
-
if (!currentStatus) {
|
|
7117
|
-
return SHARED.BUTTON_DEFAULT_ACCEPT;
|
|
7118
|
-
}
|
|
7119
|
-
const status = currentStatus.toLowerCase();
|
|
7120
|
-
if (status === SHARED.STATUS_ACCEPTED.toLowerCase() || status === SHARED.STATUS_APPROVED.toLowerCase()) {
|
|
7121
|
-
return SHARED.BUTTON_PRIMARY_ACCEPT;
|
|
7122
|
-
}
|
|
7123
|
-
else if (status === SHARED.STATUS_REJECTED_LOWERCASE.toLowerCase() || status === SHARED.STATUS_REJECTED.toLowerCase()) {
|
|
7124
|
-
return SHARED.BUTTON_SECONDARY_ACCEPT;
|
|
7125
|
-
}
|
|
7126
|
-
else {
|
|
7127
|
-
return SHARED.BUTTON_DEFAULT_ACCEPT;
|
|
7128
|
-
}
|
|
7129
|
-
}
|
|
7130
|
-
/**
|
|
7131
|
-
* Creates an accept action
|
|
7132
|
-
* @param note - The acceptance note
|
|
7133
|
-
* @returns {DocumentAction} The accept action
|
|
7134
|
-
*/
|
|
7135
|
-
createAcceptAction(note) {
|
|
7136
|
-
return {
|
|
7137
|
-
type: SHARED.ACCEPT_ACTION,
|
|
7138
|
-
note: note
|
|
7139
|
-
};
|
|
7140
|
-
}
|
|
7141
|
-
/**
|
|
7142
|
-
* Creates a reject action
|
|
7143
|
-
* @param note - The rejection note
|
|
7144
|
-
* @returns {DocumentAction} The reject action
|
|
7145
|
-
*/
|
|
7146
|
-
createRejectAction(note) {
|
|
7147
|
-
return {
|
|
7148
|
-
type: SHARED.REJECT_ACTION,
|
|
7149
|
-
note: note
|
|
7150
|
-
};
|
|
7151
|
-
}
|
|
7152
|
-
/**
|
|
7153
|
-
* Creates a delete action
|
|
7154
|
-
* @returns {DocumentAction} The delete action
|
|
7155
|
-
*/
|
|
7156
|
-
createDeleteAction() {
|
|
7157
|
-
return {
|
|
7158
|
-
type: SHARED.DELETE_ACTION
|
|
7159
|
-
};
|
|
7160
|
-
}
|
|
7161
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentActionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7162
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentActionsService, providedIn: 'root' });
|
|
7163
|
-
}
|
|
7164
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentActionsService, decorators: [{
|
|
7165
|
-
type: Injectable,
|
|
7166
|
-
args: [{
|
|
7167
|
-
providedIn: 'root'
|
|
7168
|
-
}]
|
|
7169
|
-
}] });
|
|
7170
|
-
|
|
7171
|
-
/**
|
|
7172
|
-
* Service for managing user session details.
|
|
7173
|
-
* @class SessionService
|
|
7174
|
-
* @typedef {SessionService}
|
|
7175
|
-
*/
|
|
7176
|
-
class SessionService {
|
|
7177
|
-
router;
|
|
7481
|
+
/**
|
|
7482
|
+
* Service for managing user session details.
|
|
7483
|
+
* @class SessionService
|
|
7484
|
+
* @typedef {SessionService}
|
|
7485
|
+
*/
|
|
7486
|
+
class SessionService {
|
|
7487
|
+
router;
|
|
7178
7488
|
/**
|
|
7179
7489
|
* Creates an instance of SessionService.
|
|
7180
7490
|
* @param {Router} router - Angular Router for navigation.
|
|
@@ -7242,81 +7552,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
7242
7552
|
}]
|
|
7243
7553
|
}], ctorParameters: () => [{ type: i1.Router }] });
|
|
7244
7554
|
|
|
7245
|
-
/**
|
|
7246
|
-
* Directive to conditionally show or hide elements based on user permissions.
|
|
7247
|
-
* @class HasPermissionDirective
|
|
7248
|
-
* @typedef {HasPermissionDirective}
|
|
7249
|
-
*/
|
|
7250
|
-
class HasPermissionDirective {
|
|
7251
|
-
el;
|
|
7252
|
-
renderer;
|
|
7253
|
-
sessionService;
|
|
7254
|
-
/**
|
|
7255
|
-
* The required permission(s) to display the element.
|
|
7256
|
-
* Accepts a single string or an array of strings.
|
|
7257
|
-
* @type {string | string[]}
|
|
7258
|
-
*/
|
|
7259
|
-
permission;
|
|
7260
|
-
/**
|
|
7261
|
-
* Creates an instance of HasPermissionDirective.
|
|
7262
|
-
* @param {ElementRef} el - Reference to the host element.
|
|
7263
|
-
* @param {Renderer2} renderer - Angular Renderer for DOM manipulation.
|
|
7264
|
-
* @param {SessionService} sessionService - Service to retrieve user permissions.
|
|
7265
|
-
*/
|
|
7266
|
-
constructor(el, renderer, sessionService) {
|
|
7267
|
-
this.el = el;
|
|
7268
|
-
this.renderer = renderer;
|
|
7269
|
-
this.sessionService = sessionService;
|
|
7270
|
-
}
|
|
7271
|
-
/**
|
|
7272
|
-
* Lifecycle hook that is called when input properties change.
|
|
7273
|
-
* @param {SimpleChanges} changes - The changes in input properties.
|
|
7274
|
-
*/
|
|
7275
|
-
ngOnChanges(changes) {
|
|
7276
|
-
if (changes['permission']) {
|
|
7277
|
-
this.checkPermission();
|
|
7278
|
-
}
|
|
7279
|
-
}
|
|
7280
|
-
/**
|
|
7281
|
-
* Checks if the user has the required permission(s).
|
|
7282
|
-
* Hides the element if the permission is not found.
|
|
7283
|
-
*/
|
|
7284
|
-
checkPermission() {
|
|
7285
|
-
// If no permission is required (empty string, null, or undefined), show the element
|
|
7286
|
-
if (!this.permission || this.permission === '' || (Array.isArray(this.permission) && this.permission.length === 0)) {
|
|
7287
|
-
this.renderer.removeStyle(this.el.nativeElement, 'display');
|
|
7288
|
-
return;
|
|
7289
|
-
}
|
|
7290
|
-
const userPermissionsObjects = this.sessionService.getUserPermissions();
|
|
7291
|
-
const userPermissionNames = userPermissionsObjects?.map((perm) => perm.name) || [];
|
|
7292
|
-
const requiredPermissions = Array.isArray(this.permission)
|
|
7293
|
-
? this.permission
|
|
7294
|
-
: [this.permission];
|
|
7295
|
-
const hasPermission = requiredPermissions.some(permission => userPermissionNames.includes(permission));
|
|
7296
|
-
if (!hasPermission) {
|
|
7297
|
-
this.renderer.setStyle(this.el.nativeElement, 'display', 'none');
|
|
7298
|
-
}
|
|
7299
|
-
else {
|
|
7300
|
-
this.renderer.removeStyle(this.el.nativeElement, 'display');
|
|
7301
|
-
}
|
|
7302
|
-
}
|
|
7303
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: HasPermissionDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SessionService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
7304
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.14", type: HasPermissionDirective, isStandalone: false, selector: "[permission]", inputs: { permission: "permission" }, usesOnChanges: true, ngImport: i0 });
|
|
7305
|
-
}
|
|
7306
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: HasPermissionDirective, decorators: [{
|
|
7307
|
-
type: Directive,
|
|
7308
|
-
args: [{
|
|
7309
|
-
selector: '[permission]',
|
|
7310
|
-
standalone: false
|
|
7311
|
-
}]
|
|
7312
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: SessionService }], propDecorators: { permission: [{
|
|
7313
|
-
type: Input
|
|
7314
|
-
}] } });
|
|
7315
|
-
|
|
7316
7555
|
class DocumentActionsComponent {
|
|
7317
7556
|
documentActionsService;
|
|
7318
7557
|
sessionService;
|
|
7319
|
-
confirmationService;
|
|
7320
7558
|
SHARED = SHARED;
|
|
7321
7559
|
document;
|
|
7322
7560
|
documentId;
|
|
@@ -7340,12 +7578,10 @@ class DocumentActionsComponent {
|
|
|
7340
7578
|
isRejectNoteEmpty = true;
|
|
7341
7579
|
// Action visibility computed properties
|
|
7342
7580
|
showApproveRejectActions = false;
|
|
7343
|
-
showDeleteAction = false;
|
|
7344
7581
|
showNoActions = false;
|
|
7345
|
-
constructor(documentActionsService, sessionService
|
|
7582
|
+
constructor(documentActionsService, sessionService) {
|
|
7346
7583
|
this.documentActionsService = documentActionsService;
|
|
7347
7584
|
this.sessionService = sessionService;
|
|
7348
|
-
this.confirmationService = confirmationService;
|
|
7349
7585
|
}
|
|
7350
7586
|
get rejectNote() {
|
|
7351
7587
|
return this._rejectNote;
|
|
@@ -7427,12 +7663,6 @@ class DocumentActionsComponent {
|
|
|
7427
7663
|
onRejectClick() {
|
|
7428
7664
|
this.showRejectDialog = true;
|
|
7429
7665
|
}
|
|
7430
|
-
onDeleteClick() {
|
|
7431
|
-
const documentName = this.document?.docName || 'this document';
|
|
7432
|
-
ConfirmationDialogComponent.confirmDelete(this.confirmationService, documentName, () => {
|
|
7433
|
-
this.actionPerformed.emit(this.documentActionsService.createDeleteAction());
|
|
7434
|
-
}, () => { });
|
|
7435
|
-
}
|
|
7436
7666
|
onAcceptConfirm() {
|
|
7437
7667
|
this.isAccepting = true;
|
|
7438
7668
|
this.actionPerformed.emit(this.documentActionsService.createAcceptAction(this.acceptNote));
|
|
@@ -7451,13 +7681,13 @@ class DocumentActionsComponent {
|
|
|
7451
7681
|
this.acceptNote = SHARED.EMPTY;
|
|
7452
7682
|
this.rejectNote = SHARED.EMPTY;
|
|
7453
7683
|
}
|
|
7454
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentActionsComponent, deps: [{ token: DocumentActionsService }, { token: SessionService }
|
|
7455
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.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@if(document?.isUploaded){\r\n<div class=\"actions-card\">\r\n <div class=\"actions-buttons\">\r\n <button class=\"action-btn delete-btn\" (click)=\"onDeleteClick()\" [disabled]=\"isLoading\"\r\n [permission]=\"'documents-deleteDocumentByDocumentId'\" pTooltip=\"Delete Document\" tooltipPosition=\"top\">\r\n <i class=\"pi pi-trash\"></i>\r\n </button>\r\n </div>\r\n</div>\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-card:has(.delete-btn){width:auto;margin-left:0;background-color:#fff;border:1px solid #e2e8f0;padding:.5rem}.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:80px;justify-content:center}.action-btn:disabled{opacity:.6;cursor:not-allowed}.action-btn i{font-size:.875rem}.reject-btn.default-reject{background-color:#feeaea;border-color:#e57373;color:#4a4a4a}.reject-btn.default-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.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:#feeaea;border-color:#e57373;color:#4a4a4a}.reject-btn[class*=status-].status-pending-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.accept-btn.default-accept{background-color:#e8f5e9;border-color:#66bb6a;color:#4a4a4a}.accept-btn.default-accept:hover:not(:disabled){background-color:#c6f6d5;border-color:#68d391}.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:#e8f5e9;border-color:#66bb6a;color:#4a4a4a}.accept-btn[class*=status-].status-pending-accept:hover:not(:disabled){background-color:#c6f6d5;border-color:#68d391}.delete-btn{background-color:#f5f5f5;border-color:#e57373;color:#e57373;padding:.5rem;min-width:auto;width:40px;height:40px;border-radius:6px}.delete-btn:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181;color:#c53030}.delete-btn i{font-size:1rem}: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: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.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$1.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant"], outputs: ["onResize"] }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.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: i9$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: HasPermissionDirective, selector: "[permission]", inputs: ["permission"] }] });
|
|
7684
|
+
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 });
|
|
7685
|
+
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: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.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$1.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant"], outputs: ["onResize"] }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.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"] }] });
|
|
7456
7686
|
}
|
|
7457
7687
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentActionsComponent, decorators: [{
|
|
7458
7688
|
type: Component,
|
|
7459
|
-
args: [{ selector: 'document-actions', standalone: false, 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
|
|
7460
|
-
}], ctorParameters: () => [{ type: DocumentActionsService }, { type: SessionService }
|
|
7689
|
+
args: [{ selector: 'document-actions', standalone: false, 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"] }]
|
|
7690
|
+
}], ctorParameters: () => [{ type: DocumentActionsService }, { type: SessionService }], propDecorators: { document: [{
|
|
7461
7691
|
type: Input
|
|
7462
7692
|
}], documentId: [{
|
|
7463
7693
|
type: Input
|
|
@@ -7591,26 +7821,55 @@ class DocumentViewerComponent {
|
|
|
7591
7821
|
}
|
|
7592
7822
|
ngOnDestroy() {
|
|
7593
7823
|
this.subscription.unsubscribe();
|
|
7594
|
-
// Refresh document data when viewer is destroyed (modal closed)
|
|
7595
7824
|
if (this.contextId) {
|
|
7596
7825
|
this.refreshDocumentData();
|
|
7597
7826
|
}
|
|
7598
|
-
// Emit event to notify parent that viewer is destroyed
|
|
7599
7827
|
this.viewerDestroyed.emit();
|
|
7600
7828
|
}
|
|
7601
7829
|
/**
|
|
7602
7830
|
* Handles document name update event from content viewer
|
|
7603
7831
|
*/
|
|
7604
7832
|
onDocumentNameUpdated() {
|
|
7605
|
-
// Emit event to parent component to refresh document list
|
|
7606
7833
|
this.documentStatusUpdated.emit({ actionType: 'nameUpdate' });
|
|
7607
7834
|
}
|
|
7835
|
+
/**
|
|
7836
|
+
* Handles change document type request from history component
|
|
7837
|
+
*/
|
|
7838
|
+
onChangeDocumentTypeRequested() {
|
|
7839
|
+
}
|
|
7840
|
+
/**
|
|
7841
|
+
* Handles delete task request from history component
|
|
7842
|
+
*/
|
|
7843
|
+
onDeleteTaskRequested() {
|
|
7844
|
+
this.documentStatusUpdated.emit({ actionType: 'delete' });
|
|
7845
|
+
}
|
|
7846
|
+
/**
|
|
7847
|
+
* Handles document selection from history component
|
|
7848
|
+
* @param document - The selected document from history
|
|
7849
|
+
*/
|
|
7850
|
+
onDocumentSelected(document) {
|
|
7851
|
+
if (document && document.documentUrl && document.docName) {
|
|
7852
|
+
// Create a temporary document object for the viewer
|
|
7853
|
+
const tempDocument = {
|
|
7854
|
+
_id: 'temp-' + Date.now(), // Temporary ID
|
|
7855
|
+
docName: document.docName,
|
|
7856
|
+
fileName: document.docName,
|
|
7857
|
+
documentUrl: document.documentUrl,
|
|
7858
|
+
contentType: document.contentType,
|
|
7859
|
+
status: 'Reviewing', // Default status
|
|
7860
|
+
isUploaded: true,
|
|
7861
|
+
fileSize: '0', // Default file size
|
|
7862
|
+
uploadedOn: new Date().toISOString(), // Current date
|
|
7863
|
+
ownerName: 'History Document' // Default owner
|
|
7864
|
+
};
|
|
7865
|
+
// Update the selected document to show in the viewer
|
|
7866
|
+
this.selectedDocument = tempDocument;
|
|
7867
|
+
}
|
|
7868
|
+
}
|
|
7608
7869
|
/**
|
|
7609
7870
|
* Refreshes document data when the viewer is closed
|
|
7610
7871
|
*/
|
|
7611
7872
|
refreshDocumentData() {
|
|
7612
|
-
// Clear only the necessary state, preserve document history
|
|
7613
|
-
// This will trigger the parent components to re-fetch data when needed
|
|
7614
7873
|
this.documentStore.clearSelectionState();
|
|
7615
7874
|
this.documentStore.setDocumentListResponse(null);
|
|
7616
7875
|
this.documentStore.setDocumentList([]);
|
|
@@ -7620,13 +7879,15 @@ class DocumentViewerComponent {
|
|
|
7620
7879
|
this.documentStore.setCurrentDocument(null);
|
|
7621
7880
|
this.documentStore.setFolders([]);
|
|
7622
7881
|
this.documentStore.setDocumentAlert(null);
|
|
7882
|
+
// Clear document viewer state including history data
|
|
7883
|
+
this.documentStore.clearDocumentViewerState();
|
|
7623
7884
|
}
|
|
7624
7885
|
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 });
|
|
7625
|
-
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" }, outputs: { documentStatusUpdated: "documentStatusUpdated", 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 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 (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
|
|
7886
|
+
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" }, outputs: { documentStatusUpdated: "documentStatusUpdated", 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 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 (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\">\r\n <document-history \r\n [historyData]=\"currentState.documentHistory\" \r\n [showHistory]=\"currentState.showDocumentHistory\"\r\n [contextId]=\"contextId\"\r\n [selectedDocument]=\"selectedDocument\"\r\n (changeDocumentTypeRequested)=\"onChangeDocumentTypeRequested()\"\r\n (deleteTaskRequested)=\"onDeleteTaskRequested()\"\r\n (documentSelected)=\"onDocumentSelected($event)\">\r\n \r\n <!-- Document Actions Component inside the history component -->\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 </document-history>\r\n \r\n <ng-content></ng-content>\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;border-radius:8px;height:100%;width:100%;min-width:0;overflow:auto;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: "component", type: i5$1.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"], outputs: ["changeDocumentTypeRequested", "deleteTaskRequested", "documentSelected"] }, { kind: "component", type: DocumentContentViewerComponent, selector: "document-content-viewer", inputs: ["documentUrl", "contentType", "documentName", "selectedDocument", "contextId"] }, { kind: "component", type: DocumentActionsComponent, selector: "document-actions", inputs: ["document", "documentId", "currentStatus", "isLoading", "isUploaded", "statusId"], outputs: ["actionPerformed"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
7626
7887
|
}
|
|
7627
7888
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentViewerComponent, decorators: [{
|
|
7628
7889
|
type: Component,
|
|
7629
|
-
args: [{ selector: 'document-viewer', standalone: false, encapsulation: ViewEncapsulation.None, 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 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 (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
|
|
7890
|
+
args: [{ selector: 'document-viewer', standalone: false, encapsulation: ViewEncapsulation.None, 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 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 (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\">\r\n <document-history \r\n [historyData]=\"currentState.documentHistory\" \r\n [showHistory]=\"currentState.showDocumentHistory\"\r\n [contextId]=\"contextId\"\r\n [selectedDocument]=\"selectedDocument\"\r\n (changeDocumentTypeRequested)=\"onChangeDocumentTypeRequested()\"\r\n (deleteTaskRequested)=\"onDeleteTaskRequested()\"\r\n (documentSelected)=\"onDocumentSelected($event)\">\r\n \r\n <!-- Document Actions Component inside the history component -->\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 </document-history>\r\n \r\n <ng-content></ng-content>\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;border-radius:8px;height:100%;width:100%;min-width:0;overflow:auto;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"] }]
|
|
7630
7891
|
}], ctorParameters: () => [{ type: DocumentHttpService }, { type: DocumentHelperService }, { type: i3.MessageService }, { type: DocumentViewerService }, { type: DocumentStore }], propDecorators: { selectedDocument: [{
|
|
7631
7892
|
type: Input
|
|
7632
7893
|
}], documentList: [{
|
|
@@ -8120,7 +8381,7 @@ class DocumentListComponent {
|
|
|
8120
8381
|
}
|
|
8121
8382
|
}
|
|
8122
8383
|
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 });
|
|
8123
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.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: { 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 <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 @if(selectedDocument?.status === 'Approved'){\r\n <ng-content></ng-content>\r\n }\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\">\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[i] + ' 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)\">\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: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5$1.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: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.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.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: TablePrimaryComponent, selector: "lib-table-primary", inputs: ["tableData", "showHeader", "tableStyle"], outputs: ["rowClick"] }, { kind: "component", type: DocumentViewerComponent, selector: "document-viewer", inputs: ["selectedDocument", "documentList", "contextId"], outputs: ["documentStatusUpdated", "viewerDestroyed"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
8384
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.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: { 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 <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 @if(selectedDocument?.status === 'Approved'){\r\n <ng-content></ng-content>\r\n }\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\">\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[i] + ' 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)\">\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: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5$1.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "component", type: i9$1.Badge, selector: "p-badge", inputs: ["styleClass", "style", "badgeSize", "severity", "value", "badgeDisabled", "size"] }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.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.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: TablePrimaryComponent, selector: "lib-table-primary", inputs: ["tableData", "showHeader", "tableStyle"], outputs: ["rowClick"] }, { kind: "component", type: DocumentViewerComponent, selector: "document-viewer", inputs: ["selectedDocument", "documentList", "contextId"], outputs: ["documentStatusUpdated", "viewerDestroyed"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
8124
8385
|
}
|
|
8125
8386
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListComponent, decorators: [{
|
|
8126
8387
|
type: Component,
|
|
@@ -8343,7 +8604,7 @@ class DocumentsMenuComponent {
|
|
|
8343
8604
|
}
|
|
8344
8605
|
}
|
|
8345
8606
|
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 });
|
|
8346
|
-
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 h-full\">\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 (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 .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: i5.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"] }] });
|
|
8607
|
+
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 h-full\">\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 (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 .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: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i9$1.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$2.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }] });
|
|
8347
8608
|
}
|
|
8348
8609
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentsMenuComponent, decorators: [{
|
|
8349
8610
|
type: Component,
|
|
@@ -8865,6 +9126,77 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
8865
9126
|
type: Output
|
|
8866
9127
|
}] } });
|
|
8867
9128
|
|
|
9129
|
+
/**
|
|
9130
|
+
* Directive to conditionally show or hide elements based on user permissions.
|
|
9131
|
+
* @class HasPermissionDirective
|
|
9132
|
+
* @typedef {HasPermissionDirective}
|
|
9133
|
+
*/
|
|
9134
|
+
class HasPermissionDirective {
|
|
9135
|
+
el;
|
|
9136
|
+
renderer;
|
|
9137
|
+
sessionService;
|
|
9138
|
+
/**
|
|
9139
|
+
* The required permission(s) to display the element.
|
|
9140
|
+
* Accepts a single string or an array of strings.
|
|
9141
|
+
* @type {string | string[]}
|
|
9142
|
+
*/
|
|
9143
|
+
permission;
|
|
9144
|
+
/**
|
|
9145
|
+
* Creates an instance of HasPermissionDirective.
|
|
9146
|
+
* @param {ElementRef} el - Reference to the host element.
|
|
9147
|
+
* @param {Renderer2} renderer - Angular Renderer for DOM manipulation.
|
|
9148
|
+
* @param {SessionService} sessionService - Service to retrieve user permissions.
|
|
9149
|
+
*/
|
|
9150
|
+
constructor(el, renderer, sessionService) {
|
|
9151
|
+
this.el = el;
|
|
9152
|
+
this.renderer = renderer;
|
|
9153
|
+
this.sessionService = sessionService;
|
|
9154
|
+
}
|
|
9155
|
+
/**
|
|
9156
|
+
* Lifecycle hook that is called when input properties change.
|
|
9157
|
+
* @param {SimpleChanges} changes - The changes in input properties.
|
|
9158
|
+
*/
|
|
9159
|
+
ngOnChanges(changes) {
|
|
9160
|
+
if (changes['permission']) {
|
|
9161
|
+
this.checkPermission();
|
|
9162
|
+
}
|
|
9163
|
+
}
|
|
9164
|
+
/**
|
|
9165
|
+
* Checks if the user has the required permission(s).
|
|
9166
|
+
* Hides the element if the permission is not found.
|
|
9167
|
+
*/
|
|
9168
|
+
checkPermission() {
|
|
9169
|
+
// If no permission is required (empty string, null, or undefined), show the element
|
|
9170
|
+
if (!this.permission || this.permission === '' || (Array.isArray(this.permission) && this.permission.length === 0)) {
|
|
9171
|
+
this.renderer.removeStyle(this.el.nativeElement, 'display');
|
|
9172
|
+
return;
|
|
9173
|
+
}
|
|
9174
|
+
const userPermissionsObjects = this.sessionService.getUserPermissions();
|
|
9175
|
+
const userPermissionNames = userPermissionsObjects?.map((perm) => perm.name) || [];
|
|
9176
|
+
const requiredPermissions = Array.isArray(this.permission)
|
|
9177
|
+
? this.permission
|
|
9178
|
+
: [this.permission];
|
|
9179
|
+
const hasPermission = requiredPermissions.some(permission => userPermissionNames.includes(permission));
|
|
9180
|
+
if (!hasPermission) {
|
|
9181
|
+
this.renderer.setStyle(this.el.nativeElement, 'display', 'none');
|
|
9182
|
+
}
|
|
9183
|
+
else {
|
|
9184
|
+
this.renderer.removeStyle(this.el.nativeElement, 'display');
|
|
9185
|
+
}
|
|
9186
|
+
}
|
|
9187
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: HasPermissionDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SessionService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
9188
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.14", type: HasPermissionDirective, isStandalone: false, selector: "[permission]", inputs: { permission: "permission" }, usesOnChanges: true, ngImport: i0 });
|
|
9189
|
+
}
|
|
9190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: HasPermissionDirective, decorators: [{
|
|
9191
|
+
type: Directive,
|
|
9192
|
+
args: [{
|
|
9193
|
+
selector: '[permission]',
|
|
9194
|
+
standalone: false
|
|
9195
|
+
}]
|
|
9196
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: SessionService }], propDecorators: { permission: [{
|
|
9197
|
+
type: Input
|
|
9198
|
+
}] } });
|
|
9199
|
+
|
|
8868
9200
|
class SharedModule {
|
|
8869
9201
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
8870
9202
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: SharedModule, declarations: [TablePrimaryComponent, HasPermissionDirective, ConfirmationDialogComponent], imports: [CommonModule,
|