cat-documents-ng 0.3.19 → 0.3.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Shared/constant/SHARED.d.ts +3 -0
- package/fesm2022/cat-documents-ng.mjs +1022 -73
- package/fesm2022/cat-documents-ng.mjs.map +1 -1
- package/lib/document/components/document-content-viewer/document-content-viewer.component.d.ts +184 -0
- package/lib/document/components/document-viewer/document-viewer.component.d.ts +0 -21
- package/lib/document/document.module.d.ts +38 -36
- package/lib/document/services/document-content-type.service.d.ts +85 -0
- package/lib/document/services/document-http.service.d.ts +8 -0
- package/lib/document/services/excel-parser.service.d.ts +169 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
- package/README.md +0 -322
|
@@ -8,7 +8,7 @@ import { HttpHeaders, HttpParams, HttpClientModule } from '@angular/common/http'
|
|
|
8
8
|
import { __decorate } from 'tslib';
|
|
9
9
|
import { EntityStore, StoreConfig, QueryEntity } from '@datorama/akita';
|
|
10
10
|
import { debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';
|
|
11
|
-
import * as i6$
|
|
11
|
+
import * as i6$1 from 'primeng/confirmdialog';
|
|
12
12
|
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
13
13
|
import { trigger, state, transition, style, animate } from '@angular/animations';
|
|
14
14
|
import * as i3 from 'primeng/api';
|
|
@@ -37,10 +37,13 @@ import * as i12$1 from 'primeng/inputtext';
|
|
|
37
37
|
import { InputTextModule } from 'primeng/inputtext';
|
|
38
38
|
import * as i2$2 from 'primeng/table';
|
|
39
39
|
import { TableModule } from 'primeng/table';
|
|
40
|
-
import * as i6$1 from 'ng2-pdf-viewer';
|
|
41
|
-
import { PdfViewerModule } from 'ng2-pdf-viewer';
|
|
42
40
|
import * as i3$2 from 'primeng/accordion';
|
|
43
41
|
import { AccordionModule } from 'primeng/accordion';
|
|
42
|
+
import * as XLSX from 'xlsx';
|
|
43
|
+
import * as i3$3 from 'ng2-pdf-viewer';
|
|
44
|
+
import { PdfViewerModule } from 'ng2-pdf-viewer';
|
|
45
|
+
import * as i4$1 from 'ngx-doc-viewer';
|
|
46
|
+
import { NgxDocViewerModule } from 'ngx-doc-viewer';
|
|
44
47
|
import * as i1 from '@angular/router';
|
|
45
48
|
import * as i6 from 'primeng/inputtextarea';
|
|
46
49
|
import { InputTextareaModule } from 'primeng/inputtextarea';
|
|
@@ -309,6 +312,8 @@ class SHARED {
|
|
|
309
312
|
static REJECT_ICON = 'pi pi-check';
|
|
310
313
|
static ACCEPT_BUTTON_STYLE_CLASS = 'p-button-danger';
|
|
311
314
|
static REJECT_BUTTON_STYLE_CLASS = 'p-button-secondary';
|
|
315
|
+
static NO_DATA_FOUND = 'No data found';
|
|
316
|
+
static BORDERS = ['top', 'bottom', 'left', 'right'];
|
|
312
317
|
static FILE_TYPES = [
|
|
313
318
|
'xlsx', 'xls', 'doc', 'docx', 'pdf', 'jpg', 'jpeg',
|
|
314
319
|
'odt', 'csv', 'png', 'msg', 'eml'
|
|
@@ -317,6 +322,7 @@ class SHARED {
|
|
|
317
322
|
static TEAM_LEADER = 'TeamLeader';
|
|
318
323
|
static UNDERWRITER_USER = 'Underwriter User';
|
|
319
324
|
static INITIAL_REQUEST = 'Initial Request';
|
|
325
|
+
static ERROR_PARSING_SHEET_DATA = 'Error parsing sheet data';
|
|
320
326
|
static REFRESH_TRIGGER = 'refreshTrigger';
|
|
321
327
|
static Menu = [
|
|
322
328
|
{
|
|
@@ -1296,6 +1302,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1296
1302
|
|
|
1297
1303
|
/**
|
|
1298
1304
|
* Service for making HTTP requests related to documents.
|
|
1305
|
+
* Authentication is handled automatically by the HTTP interceptor in the main project.
|
|
1299
1306
|
* @class DocumentHttpService
|
|
1300
1307
|
* @typedef {DocumentHttpService}
|
|
1301
1308
|
*/
|
|
@@ -1344,8 +1351,8 @@ class DocumentHttpService {
|
|
|
1344
1351
|
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
1345
1352
|
*/
|
|
1346
1353
|
getDocumentCatagories(contextId) {
|
|
1347
|
-
let
|
|
1348
|
-
return this.http.get(`${this.apiUrl}${URLS.DOCUMENTS_CATAGORIES}/${contextId}`, { headers }).pipe(tap((response) => {
|
|
1354
|
+
let header = new HttpHeaders({ Authorization: `Bearer 4292a93f-c1ed-430f-b13b-7b3683bc4a33` });
|
|
1355
|
+
return this.http.get(`${this.apiUrl}${URLS.DOCUMENTS_CATAGORIES}/${contextId}`, { headers: header }).pipe(tap((response) => {
|
|
1349
1356
|
// Store only the categories array, not the entire response
|
|
1350
1357
|
if (response && response.categories) {
|
|
1351
1358
|
this.documentStore.setDocumentCategories(response.categories);
|
|
@@ -1388,7 +1395,8 @@ class DocumentHttpService {
|
|
|
1388
1395
|
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
1389
1396
|
*/
|
|
1390
1397
|
getDocumentByFolderID(folderId, contextId) {
|
|
1391
|
-
|
|
1398
|
+
let header = new HttpHeaders({ Authorization: `Bearer 4292a93f-c1ed-430f-b13b-7b3683bc4a33` });
|
|
1399
|
+
return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${URLS.PARENT_DOCUMENT_TYPE_ID}${folderId}${URLS.CONTEXT_ID}${contextId}`, { headers: header }).pipe(tap((records) => {
|
|
1392
1400
|
this.documentStore.set(records);
|
|
1393
1401
|
}), catchError((error) => {
|
|
1394
1402
|
return throwError(() => new Error(error));
|
|
@@ -1403,8 +1411,8 @@ class DocumentHttpService {
|
|
|
1403
1411
|
* @returns {Observable<DocumentModel>} An observable that emits the updated DocumentModel.
|
|
1404
1412
|
*/
|
|
1405
1413
|
updateDocumentName(documentId, payload) {
|
|
1406
|
-
let
|
|
1407
|
-
return this.http.put(`${this.apiUrl}${URLS.ALIAS_NAME}${documentId}`, payload, { headers }).pipe(catchError((error) => {
|
|
1414
|
+
let header = new HttpHeaders({ Authorization: `Bearer 4292a93f-c1ed-430f-b13b-7b3683bc4a33` });
|
|
1415
|
+
return this.http.put(`${this.apiUrl}${URLS.ALIAS_NAME}${documentId}`, payload, { headers: header }).pipe(catchError((error) => {
|
|
1408
1416
|
return throwError(() => new Error(error));
|
|
1409
1417
|
}));
|
|
1410
1418
|
}
|
|
@@ -1414,10 +1422,10 @@ class DocumentHttpService {
|
|
|
1414
1422
|
* @returns {Observable<UserListModel[]>} Observable that emits the user list data.
|
|
1415
1423
|
*/
|
|
1416
1424
|
getUserListByContextId(contextId) {
|
|
1417
|
-
let headers = new HttpHeaders().set('Authorization', `Bearer 3cfa4bbb-f612-4098-aef2-d01842d1dac8`);
|
|
1418
1425
|
if (!contextId)
|
|
1419
1426
|
return EMPTY;
|
|
1420
|
-
|
|
1427
|
+
let header = new HttpHeaders({ Authorization: `Bearer 4292a93f-c1ed-430f-b13b-7b3683bc4a33` });
|
|
1428
|
+
return this.http.get(`${this.apiUrl}${URLS.USERLIST}${contextId}`, { headers: header }).pipe(tap((userList) => {
|
|
1421
1429
|
this.documentStore.setUserList(userList);
|
|
1422
1430
|
}), catchError((error) => {
|
|
1423
1431
|
return throwError(() => new Error(error));
|
|
@@ -1433,7 +1441,6 @@ class DocumentHttpService {
|
|
|
1433
1441
|
getStatusDocumentCount(applicationId, contextId = null, categoryId = null) {
|
|
1434
1442
|
if (!applicationId)
|
|
1435
1443
|
return EMPTY;
|
|
1436
|
-
let headers = new HttpHeaders().set('Authorization', `Bearer 3cfa4bbb-f612-4098-aef2-d01842d1dac8`);
|
|
1437
1444
|
let url = `${this.apiUrl}${URLS.STATUS_DOCUMENT_COUNT}${applicationId}`;
|
|
1438
1445
|
let params = new HttpParams();
|
|
1439
1446
|
const contextParam = contextId || null;
|
|
@@ -1443,7 +1450,8 @@ class DocumentHttpService {
|
|
|
1443
1450
|
if (categoryId) {
|
|
1444
1451
|
params = params.set(SHARED.CATEGORY, categoryId);
|
|
1445
1452
|
}
|
|
1446
|
-
|
|
1453
|
+
let header = new HttpHeaders({ Authorization: `Bearer 4292a93f-c1ed-430f-b13b-7b3683bc4a33` });
|
|
1454
|
+
return this.http.get(url, { params, headers: header }).pipe(tap((statusData) => {
|
|
1447
1455
|
this.documentStore.setStatusData(statusData);
|
|
1448
1456
|
}), catchError((error) => {
|
|
1449
1457
|
return throwError(() => new Error(error));
|
|
@@ -1462,7 +1470,6 @@ class DocumentHttpService {
|
|
|
1462
1470
|
*/
|
|
1463
1471
|
getDocumentsBySelection(contextId, menuItem, userId, status, searchKey = null) {
|
|
1464
1472
|
let params = new HttpParams();
|
|
1465
|
-
let headers = new HttpHeaders().set('Authorization', `Bearer 3cfa4bbb-f612-4098-aef2-d01842d1dac8`);
|
|
1466
1473
|
if (userId) {
|
|
1467
1474
|
params = params.set(SHARED.CONTEXT_ID, userId);
|
|
1468
1475
|
}
|
|
@@ -1472,7 +1479,8 @@ class DocumentHttpService {
|
|
|
1472
1479
|
if (searchKey) {
|
|
1473
1480
|
params = params.set(SHARED.SEARCH_KEY, searchKey);
|
|
1474
1481
|
}
|
|
1475
|
-
|
|
1482
|
+
let header = new HttpHeaders({ Authorization: `Bearer 4292a93f-c1ed-430f-b13b-7b3683bc4a33` });
|
|
1483
|
+
return this.http.get(`${this.apiUrl}${URLS.GETALL}/${contextId}`, { params, headers: header }).pipe(tap((response) => {
|
|
1476
1484
|
if (response.documents) {
|
|
1477
1485
|
this.documentStore.setDocumentList(response.documents);
|
|
1478
1486
|
}
|
|
@@ -1484,8 +1492,8 @@ class DocumentHttpService {
|
|
|
1484
1492
|
if (!documentId) {
|
|
1485
1493
|
return of([]);
|
|
1486
1494
|
}
|
|
1487
|
-
let
|
|
1488
|
-
return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_HISTORY}${documentId}`, { headers }).pipe(catchError((error) => {
|
|
1495
|
+
let header = new HttpHeaders({ Authorization: `Bearer 4292a93f-c1ed-430f-b13b-7b3683bc4a33` });
|
|
1496
|
+
return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_HISTORY}${documentId}`, { headers: header }).pipe(catchError((error) => {
|
|
1489
1497
|
return throwError(() => new Error(error));
|
|
1490
1498
|
}));
|
|
1491
1499
|
}
|
|
@@ -1497,8 +1505,8 @@ class DocumentHttpService {
|
|
|
1497
1505
|
getCategoriesBySource(source) {
|
|
1498
1506
|
if (!source)
|
|
1499
1507
|
return EMPTY;
|
|
1500
|
-
let
|
|
1501
|
-
return this.http.get(`${this.apiUrl}${URLS.GET_CATEGORIES_BY_SOURCE}${source}`, { headers }).pipe(catchError((error) => {
|
|
1508
|
+
let header = new HttpHeaders({ Authorization: `Bearer 4292a93f-c1ed-430f-b13b-7b3683bc4a33` });
|
|
1509
|
+
return this.http.get(`${this.apiUrl}${URLS.GET_CATEGORIES_BY_SOURCE}${source}`, { headers: header }).pipe(catchError((error) => {
|
|
1502
1510
|
return throwError(() => new Error(error));
|
|
1503
1511
|
}));
|
|
1504
1512
|
}
|
|
@@ -1510,8 +1518,8 @@ class DocumentHttpService {
|
|
|
1510
1518
|
getDocumentTypesByCategory(categoryId) {
|
|
1511
1519
|
if (!categoryId)
|
|
1512
1520
|
return EMPTY;
|
|
1513
|
-
let
|
|
1514
|
-
return this.http.get(`${this.apiUrl}${URLS.GET_DOCUMENT_TYPES_BY_CATEGORY}${categoryId}`, { headers }).pipe(catchError((error) => {
|
|
1521
|
+
let header = new HttpHeaders({ Authorization: `Bearer 4292a93f-c1ed-430f-b13b-7b3683bc4a33` });
|
|
1522
|
+
return this.http.get(`${this.apiUrl}${URLS.GET_DOCUMENT_TYPES_BY_CATEGORY}${categoryId}`, { headers: header }).pipe(catchError((error) => {
|
|
1515
1523
|
return throwError(() => new Error(error));
|
|
1516
1524
|
}));
|
|
1517
1525
|
}
|
|
@@ -1521,8 +1529,8 @@ class DocumentHttpService {
|
|
|
1521
1529
|
* @returns {Observable<any>} Observable that emits the upload response.
|
|
1522
1530
|
*/
|
|
1523
1531
|
uploadFile(formData) {
|
|
1524
|
-
let
|
|
1525
|
-
return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, formData, { headers }).pipe(catchError((error) => {
|
|
1532
|
+
let header = new HttpHeaders({ Authorization: `Bearer 4292a93f-c1ed-430f-b13b-7b3683bc4a33` });
|
|
1533
|
+
return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, formData, { headers: header }).pipe(catchError((error) => {
|
|
1526
1534
|
return throwError(() => new Error(error));
|
|
1527
1535
|
}));
|
|
1528
1536
|
}
|
|
@@ -1532,8 +1540,8 @@ class DocumentHttpService {
|
|
|
1532
1540
|
* @returns {Observable<any>} Observable that emits the save response.
|
|
1533
1541
|
*/
|
|
1534
1542
|
saveDocumentUpload(payload) {
|
|
1535
|
-
let
|
|
1536
|
-
return this.http.post(`${this.apiUrl}${URLS.SAVE_DOCUMENT_UPLOAD}`, payload, { headers }).pipe(catchError((error) => {
|
|
1543
|
+
let header = new HttpHeaders({ Authorization: `Bearer 4292a93f-c1ed-430f-b13b-7b3683bc4a33` });
|
|
1544
|
+
return this.http.post(`${this.apiUrl}${URLS.SAVE_DOCUMENT_UPLOAD}`, payload, { headers: header }).pipe(catchError((error) => {
|
|
1537
1545
|
return throwError(() => new Error(error));
|
|
1538
1546
|
}));
|
|
1539
1547
|
}
|
|
@@ -1548,8 +1556,8 @@ class DocumentHttpService {
|
|
|
1548
1556
|
const payload = {
|
|
1549
1557
|
statusUpdateDescription: statusUpdateDescription
|
|
1550
1558
|
};
|
|
1551
|
-
let
|
|
1552
|
-
return this.http.put(`${this.apiUrl}${URLS.UPDATE_DOCUMENT_STATUS}${documentId}/${status}`, payload, { headers }).pipe(tap((response) => {
|
|
1559
|
+
let header = new HttpHeaders({ Authorization: `Bearer 4292a93f-c1ed-430f-b13b-7b3683bc4a33` });
|
|
1560
|
+
return this.http.put(`${this.apiUrl}${URLS.UPDATE_DOCUMENT_STATUS}${documentId}/${status}`, payload, { headers: header }).pipe(tap((response) => {
|
|
1553
1561
|
if (response && response.status) {
|
|
1554
1562
|
const normalizedStatus = this.normalizeStatus(response.status);
|
|
1555
1563
|
response.normalizedStatus = normalizedStatus;
|
|
@@ -1582,8 +1590,8 @@ class DocumentHttpService {
|
|
|
1582
1590
|
* @returns {Observable<any>} Observable that emits the delete response
|
|
1583
1591
|
*/
|
|
1584
1592
|
deleteDocument(documentId, contextId) {
|
|
1585
|
-
let
|
|
1586
|
-
return this.http.delete(`${this.apiUrl}${URLS.DELETE_DOCUMENT}${documentId}`, { headers }).pipe(tap(() => {
|
|
1593
|
+
let header = new HttpHeaders({ Authorization: `Bearer 4292a93f-c1ed-430f-b13b-7b3683bc4a33` });
|
|
1594
|
+
return this.http.delete(`${this.apiUrl}${URLS.DELETE_DOCUMENT}${documentId}`, { headers: header }).pipe(tap(() => {
|
|
1587
1595
|
this.getDocumentCatagories(contextId).subscribe();
|
|
1588
1596
|
this.getUserListByContextId(contextId).subscribe();
|
|
1589
1597
|
this.getStatusDocumentCount(contextId).subscribe();
|
|
@@ -1592,6 +1600,19 @@ class DocumentHttpService {
|
|
|
1592
1600
|
return throwError(() => new Error(error));
|
|
1593
1601
|
}));
|
|
1594
1602
|
}
|
|
1603
|
+
/**
|
|
1604
|
+
* Downloads an Excel file with proper authentication headers
|
|
1605
|
+
* Authentication is handled automatically by the HTTP interceptor
|
|
1606
|
+
* @param {string} documentUrl - The URL of the Excel file to download
|
|
1607
|
+
* @returns {Observable<ArrayBuffer>} Observable that emits the file data as ArrayBuffer
|
|
1608
|
+
*/
|
|
1609
|
+
downloadExcelFile(documentUrl) {
|
|
1610
|
+
return this.http.get(documentUrl, {
|
|
1611
|
+
responseType: 'arraybuffer'
|
|
1612
|
+
}).pipe(catchError((error) => {
|
|
1613
|
+
return throwError(() => new Error(error));
|
|
1614
|
+
}));
|
|
1615
|
+
}
|
|
1595
1616
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHttpService, deps: [{ token: DocumentStore }, { token: i2.HttpClient }, { token: AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1596
1617
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHttpService, providedIn: 'root' });
|
|
1597
1618
|
}
|
|
@@ -2382,8 +2403,7 @@ class DocumentService {
|
|
|
2382
2403
|
* @returns {Observable<any>} Observable that emits the newly created document.
|
|
2383
2404
|
*/
|
|
2384
2405
|
create(entity) {
|
|
2385
|
-
|
|
2386
|
-
return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, entity, { headers }).pipe(tap((newEntity) => this.documentStore.add(newEntity)));
|
|
2406
|
+
return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, entity).pipe(tap((newEntity) => this.documentStore.add(newEntity)));
|
|
2387
2407
|
}
|
|
2388
2408
|
/**
|
|
2389
2409
|
* Fetches all documents from the backend.
|
|
@@ -3812,11 +3832,11 @@ class SidebarComponent {
|
|
|
3812
3832
|
this.destroy$.complete();
|
|
3813
3833
|
}
|
|
3814
3834
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SidebarComponent, deps: [{ token: i3.ConfirmationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3815
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SidebarComponent, isStandalone: false, selector: "lib-sidebar", inputs: { visible: "visible", position: "position", width: "width", title: "title", showCloseButton: "showCloseButton", modal: "modal", dismissible: "dismissible", styleClass: "styleClass", appendTo: "appendTo", blockScroll: "blockScroll", closeIcon: "closeIcon", showSaveButton: "showSaveButton", saveButtonText: "saveButtonText", saveButtonDisabled: "saveButtonDisabled", successMessage: "successMessage", errorMessage: "errorMessage", hasUnsavedChanges: "hasUnsavedChanges" }, outputs: { visibleChange: "visibleChange", onShow: "onShow", onHide: "onHide", onSave: "onSave", onClose: "onClose" }, host: { listeners: { "document:keydown.escape": "handleEscapeKey($event)" } }, ngImport: i0, template: "<!-- PrimeNG Sidebar with proper backdrop handling -->\n<div *ngIf=\"visible\" class=\"backdrop-shadow\" (click)=\"handleClose()\"></div>\n\n<p-sidebar \n [(visible)]=\"visible\"\n [position]=\"position\"\n [style]=\"{width: width}\"\n [dismissible]=\"true\"\n [showCloseIcon]=\"false\"\n [appendTo]=\"'body'\"\n [blockScroll]=\"blockScroll\"\n (visibleChange)=\"onVisibleChange($event)\"\n (onShow)=\"onShow.emit()\"\n (onHide)=\"onSidebarHide()\"\n>\n <ng-template pTemplate=\"header\" *ngIf=\"title || showCloseButton || showSaveButton\">\n <div class=\"sidebar-header\">\n <h3 *ngIf=\"title\" class=\"sidebar-title\">{{ title }}</h3>\n <div class=\"header-content\">\n <ng-content select=\"[header]\"></ng-content>\n \n <p-messages \n *ngIf=\"showSuccessMessage\"\n severity=\"success\"\n [closable]=\"false\"\n [style]=\"{'margin-bottom': '0.5rem'}\"\n class=\"ml-3\"\n >\n <ng-template pTemplate=\"message\">\n <span>{{ successMessage }}</span>\n </ng-template>\n </p-messages>\n \n <p-messages \n *ngIf=\"showErrorMessage\"\n severity=\"error\"\n [closable]=\"false\"\n [style]=\"{'margin-bottom': '0.5rem'}\"\n class=\"ml-3\"\n >\n <ng-template pTemplate=\"message\">\n <span>{{ errorMessage }}</span>\n </ng-template>\n </p-messages>\n\n <div class=\"header-actions mr-3\">\n <button \n *ngIf=\"showSaveButton\"\n pButton \n type=\"button\" \n [label]=\"saveButtonText\"\n [disabled]=\"saveButtonDisabled\"\n class=\"p-button-primary\"\n (click)=\"onSave.emit()\"\n ></button>\n\n <button \n *ngIf=\"showCloseButton\"\n pButton \n type=\"button\" \n icon=\"pi pi-times\"\n class=\"p-button-text p-button-rounded\"\n (click)=\"handleClose()\"\n ></button>\n </div>\n </div>\n </div>\n </ng-template>\n\n <ng-template pTemplate=\"content\">\n <div class=\"sidebar-content\">\n <ng-content></ng-content>\n </div>\n </ng-template>\n</p-sidebar>\n", styles: [":host{display:block}.backdrop-shadow{position:fixed;top:0;left:0;width:100%;height:100%;background:#00000080;z-index:1000}.sidebar-header{display:flex;justify-content:flex-end;align-items:center;padding:0;width:100%;gap:1rem}.sidebar-header ::ng-deep .p-messages .p-message-success{margin-left:2rem;font-size:15px}.sidebar-header ::ng-deep .p-messages .p-message-wrapper{padding:1rem}.sidebar-title{margin:0;font-size:1.25rem;font-weight:600;color:#212529;flex:0 1 auto;white-space:nowrap;min-width:0}.header-content{display:flex;align-items:center;gap:1rem;justify-content:space-between;width:100%}.header-actions{display:flex;align-items:center;gap:.5rem;margin-left:auto;margin-right:0}.close-button{background:none;border:none;color:#6c757d;cursor:pointer;padding:.5rem;border-radius:.375rem;transition:all .2s ease;display:flex;align-items:center;justify-content:center;min-width:2rem;min-height:2rem;margin-right:.5rem}.close-button:hover{background-color:#e9ecef;color:#495057}.close-button:focus{outline:none;box-shadow:0 0 0 3px #0f8bfd4d}.close-button i{font-size:1rem}.sidebar-content{height:100%;overflow-y:auto;padding:0}.header-actions .p-button-text.p-button-rounded{width:2rem;height:2rem;border-radius:50%}.header-actions .p-button-text.p-button-rounded:hover{background-color:#0000001a}::ng-deep .p-sidebar .p-sidebar-header{border-bottom:1px solid #e9ecef;margin-bottom:1rem;background-color:#f8f9fa}::ng-deep .p-sidebar .p-sidebar-content{padding:0 1.5rem 1.5rem;height:calc(100% - 80px);overflow-y:auto}::ng-deep .p-sidebar.p-sidebar-right .p-sidebar-content{padding-left:1.5rem;padding-right:1.5rem}::ng-deep .p-sidebar.p-sidebar-left .p-sidebar-content{padding-left:1.5rem;padding-right:1.5rem}@media (max-width: 768px){::ng-deep .p-sidebar{width:100%!important;max-width:100%!important}::ng-deep .p-sidebar .p-sidebar-header{padding:1rem 1rem 0}::ng-deep .p-sidebar .p-sidebar-content{padding:0 1rem 1rem}}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i9.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i4.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }] });
|
|
3835
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SidebarComponent, isStandalone: false, selector: "lib-sidebar", inputs: { visible: "visible", position: "position", width: "width", title: "title", showCloseButton: "showCloseButton", modal: "modal", dismissible: "dismissible", styleClass: "styleClass", appendTo: "appendTo", blockScroll: "blockScroll", closeIcon: "closeIcon", showSaveButton: "showSaveButton", saveButtonText: "saveButtonText", saveButtonDisabled: "saveButtonDisabled", successMessage: "successMessage", errorMessage: "errorMessage", hasUnsavedChanges: "hasUnsavedChanges" }, outputs: { visibleChange: "visibleChange", onShow: "onShow", onHide: "onHide", onSave: "onSave", onClose: "onClose" }, host: { listeners: { "document:keydown.escape": "handleEscapeKey($event)" } }, ngImport: i0, template: "<!-- PrimeNG Sidebar with proper backdrop handling -->\r\n<div *ngIf=\"visible\" class=\"backdrop-shadow\" (click)=\"handleClose()\"></div>\r\n\r\n<p-sidebar \r\n [(visible)]=\"visible\"\r\n [position]=\"position\"\r\n [style]=\"{width: width}\"\r\n [dismissible]=\"true\"\r\n [showCloseIcon]=\"false\"\r\n [appendTo]=\"'body'\"\r\n [blockScroll]=\"blockScroll\"\r\n (visibleChange)=\"onVisibleChange($event)\"\r\n (onShow)=\"onShow.emit()\"\r\n (onHide)=\"onSidebarHide()\"\r\n>\r\n <ng-template pTemplate=\"header\" *ngIf=\"title || showCloseButton || showSaveButton\">\r\n <div class=\"sidebar-header\">\r\n <h3 *ngIf=\"title\" class=\"sidebar-title\">{{ title }}</h3>\r\n <div class=\"header-content\">\r\n <ng-content select=\"[header]\"></ng-content>\r\n \r\n <p-messages \r\n *ngIf=\"showSuccessMessage\"\r\n severity=\"success\"\r\n [closable]=\"false\"\r\n [style]=\"{'margin-bottom': '0.5rem'}\"\r\n class=\"ml-3\"\r\n >\r\n <ng-template pTemplate=\"message\">\r\n <span>{{ successMessage }}</span>\r\n </ng-template>\r\n </p-messages>\r\n \r\n <p-messages \r\n *ngIf=\"showErrorMessage\"\r\n severity=\"error\"\r\n [closable]=\"false\"\r\n [style]=\"{'margin-bottom': '0.5rem'}\"\r\n class=\"ml-3\"\r\n >\r\n <ng-template pTemplate=\"message\">\r\n <span>{{ errorMessage }}</span>\r\n </ng-template>\r\n </p-messages>\r\n\r\n <div class=\"header-actions mr-3\">\r\n <button \r\n *ngIf=\"showSaveButton\"\r\n pButton \r\n type=\"button\" \r\n [label]=\"saveButtonText\"\r\n [disabled]=\"saveButtonDisabled\"\r\n class=\"p-button-primary\"\r\n (click)=\"onSave.emit()\"\r\n ></button>\r\n\r\n <button \r\n *ngIf=\"showCloseButton\"\r\n pButton \r\n type=\"button\" \r\n icon=\"pi pi-times\"\r\n class=\"p-button-text p-button-rounded\"\r\n (click)=\"handleClose()\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"content\">\r\n <div class=\"sidebar-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </ng-template>\r\n</p-sidebar>\r\n", styles: [":host{display:block}.backdrop-shadow{position:fixed;top:0;left:0;width:100%;height:100%;background:#00000080;z-index:1000}.sidebar-header{display:flex;justify-content:flex-end;align-items:center;padding:0;width:100%;gap:1rem}.sidebar-header ::ng-deep .p-messages .p-message-success{margin-left:2rem;font-size:15px}.sidebar-header ::ng-deep .p-messages .p-message-wrapper{padding:1rem}.sidebar-title{margin:0;font-size:1.25rem;font-weight:600;color:#212529;flex:0 1 auto;white-space:nowrap;min-width:0}.header-content{display:flex;align-items:center;gap:1rem;justify-content:space-between;width:100%}.header-actions{display:flex;align-items:center;gap:.5rem;margin-left:auto;margin-right:0}.close-button{background:none;border:none;color:#6c757d;cursor:pointer;padding:.5rem;border-radius:.375rem;transition:all .2s ease;display:flex;align-items:center;justify-content:center;min-width:2rem;min-height:2rem;margin-right:.5rem}.close-button:hover{background-color:#e9ecef;color:#495057}.close-button:focus{outline:none;box-shadow:0 0 0 3px #0f8bfd4d}.close-button i{font-size:1rem}.sidebar-content{height:100%;overflow-y:auto;padding:0}.header-actions .p-button-text.p-button-rounded{width:2rem;height:2rem;border-radius:50%}.header-actions .p-button-text.p-button-rounded:hover{background-color:#0000001a}::ng-deep .p-sidebar .p-sidebar-header{border-bottom:1px solid #e9ecef;margin-bottom:1rem;background-color:#f8f9fa}::ng-deep .p-sidebar .p-sidebar-content{padding:0 1.5rem 1.5rem;height:calc(100% - 80px);overflow-y:auto}::ng-deep .p-sidebar.p-sidebar-right .p-sidebar-content{padding-left:1.5rem;padding-right:1.5rem}::ng-deep .p-sidebar.p-sidebar-left .p-sidebar-content{padding-left:1.5rem;padding-right:1.5rem}@media (max-width: 768px){::ng-deep .p-sidebar{width:100%!important;max-width:100%!important}::ng-deep .p-sidebar .p-sidebar-header{padding:1rem 1rem 0}::ng-deep .p-sidebar .p-sidebar-content{padding:0 1rem 1rem}}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i9.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i4.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }] });
|
|
3816
3836
|
}
|
|
3817
3837
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SidebarComponent, decorators: [{
|
|
3818
3838
|
type: Component,
|
|
3819
|
-
args: [{ selector: 'lib-sidebar', standalone: false, template: "<!-- PrimeNG Sidebar with proper backdrop handling -->\n<div *ngIf=\"visible\" class=\"backdrop-shadow\" (click)=\"handleClose()\"></div>\n\n<p-sidebar \n [(visible)]=\"visible\"\n [position]=\"position\"\n [style]=\"{width: width}\"\n [dismissible]=\"true\"\n [showCloseIcon]=\"false\"\n [appendTo]=\"'body'\"\n [blockScroll]=\"blockScroll\"\n (visibleChange)=\"onVisibleChange($event)\"\n (onShow)=\"onShow.emit()\"\n (onHide)=\"onSidebarHide()\"\n>\n <ng-template pTemplate=\"header\" *ngIf=\"title || showCloseButton || showSaveButton\">\n <div class=\"sidebar-header\">\n <h3 *ngIf=\"title\" class=\"sidebar-title\">{{ title }}</h3>\n <div class=\"header-content\">\n <ng-content select=\"[header]\"></ng-content>\n \n <p-messages \n *ngIf=\"showSuccessMessage\"\n severity=\"success\"\n [closable]=\"false\"\n [style]=\"{'margin-bottom': '0.5rem'}\"\n class=\"ml-3\"\n >\n <ng-template pTemplate=\"message\">\n <span>{{ successMessage }}</span>\n </ng-template>\n </p-messages>\n \n <p-messages \n *ngIf=\"showErrorMessage\"\n severity=\"error\"\n [closable]=\"false\"\n [style]=\"{'margin-bottom': '0.5rem'}\"\n class=\"ml-3\"\n >\n <ng-template pTemplate=\"message\">\n <span>{{ errorMessage }}</span>\n </ng-template>\n </p-messages>\n\n <div class=\"header-actions mr-3\">\n <button \n *ngIf=\"showSaveButton\"\n pButton \n type=\"button\" \n [label]=\"saveButtonText\"\n [disabled]=\"saveButtonDisabled\"\n class=\"p-button-primary\"\n (click)=\"onSave.emit()\"\n ></button>\n\n <button \n *ngIf=\"showCloseButton\"\n pButton \n type=\"button\" \n icon=\"pi pi-times\"\n class=\"p-button-text p-button-rounded\"\n (click)=\"handleClose()\"\n ></button>\n </div>\n </div>\n </div>\n </ng-template>\n\n <ng-template pTemplate=\"content\">\n <div class=\"sidebar-content\">\n <ng-content></ng-content>\n </div>\n </ng-template>\n</p-sidebar>\n", styles: [":host{display:block}.backdrop-shadow{position:fixed;top:0;left:0;width:100%;height:100%;background:#00000080;z-index:1000}.sidebar-header{display:flex;justify-content:flex-end;align-items:center;padding:0;width:100%;gap:1rem}.sidebar-header ::ng-deep .p-messages .p-message-success{margin-left:2rem;font-size:15px}.sidebar-header ::ng-deep .p-messages .p-message-wrapper{padding:1rem}.sidebar-title{margin:0;font-size:1.25rem;font-weight:600;color:#212529;flex:0 1 auto;white-space:nowrap;min-width:0}.header-content{display:flex;align-items:center;gap:1rem;justify-content:space-between;width:100%}.header-actions{display:flex;align-items:center;gap:.5rem;margin-left:auto;margin-right:0}.close-button{background:none;border:none;color:#6c757d;cursor:pointer;padding:.5rem;border-radius:.375rem;transition:all .2s ease;display:flex;align-items:center;justify-content:center;min-width:2rem;min-height:2rem;margin-right:.5rem}.close-button:hover{background-color:#e9ecef;color:#495057}.close-button:focus{outline:none;box-shadow:0 0 0 3px #0f8bfd4d}.close-button i{font-size:1rem}.sidebar-content{height:100%;overflow-y:auto;padding:0}.header-actions .p-button-text.p-button-rounded{width:2rem;height:2rem;border-radius:50%}.header-actions .p-button-text.p-button-rounded:hover{background-color:#0000001a}::ng-deep .p-sidebar .p-sidebar-header{border-bottom:1px solid #e9ecef;margin-bottom:1rem;background-color:#f8f9fa}::ng-deep .p-sidebar .p-sidebar-content{padding:0 1.5rem 1.5rem;height:calc(100% - 80px);overflow-y:auto}::ng-deep .p-sidebar.p-sidebar-right .p-sidebar-content{padding-left:1.5rem;padding-right:1.5rem}::ng-deep .p-sidebar.p-sidebar-left .p-sidebar-content{padding-left:1.5rem;padding-right:1.5rem}@media (max-width: 768px){::ng-deep .p-sidebar{width:100%!important;max-width:100%!important}::ng-deep .p-sidebar .p-sidebar-header{padding:1rem 1rem 0}::ng-deep .p-sidebar .p-sidebar-content{padding:0 1rem 1rem}}\n"] }]
|
|
3839
|
+
args: [{ selector: 'lib-sidebar', standalone: false, template: "<!-- PrimeNG Sidebar with proper backdrop handling -->\r\n<div *ngIf=\"visible\" class=\"backdrop-shadow\" (click)=\"handleClose()\"></div>\r\n\r\n<p-sidebar \r\n [(visible)]=\"visible\"\r\n [position]=\"position\"\r\n [style]=\"{width: width}\"\r\n [dismissible]=\"true\"\r\n [showCloseIcon]=\"false\"\r\n [appendTo]=\"'body'\"\r\n [blockScroll]=\"blockScroll\"\r\n (visibleChange)=\"onVisibleChange($event)\"\r\n (onShow)=\"onShow.emit()\"\r\n (onHide)=\"onSidebarHide()\"\r\n>\r\n <ng-template pTemplate=\"header\" *ngIf=\"title || showCloseButton || showSaveButton\">\r\n <div class=\"sidebar-header\">\r\n <h3 *ngIf=\"title\" class=\"sidebar-title\">{{ title }}</h3>\r\n <div class=\"header-content\">\r\n <ng-content select=\"[header]\"></ng-content>\r\n \r\n <p-messages \r\n *ngIf=\"showSuccessMessage\"\r\n severity=\"success\"\r\n [closable]=\"false\"\r\n [style]=\"{'margin-bottom': '0.5rem'}\"\r\n class=\"ml-3\"\r\n >\r\n <ng-template pTemplate=\"message\">\r\n <span>{{ successMessage }}</span>\r\n </ng-template>\r\n </p-messages>\r\n \r\n <p-messages \r\n *ngIf=\"showErrorMessage\"\r\n severity=\"error\"\r\n [closable]=\"false\"\r\n [style]=\"{'margin-bottom': '0.5rem'}\"\r\n class=\"ml-3\"\r\n >\r\n <ng-template pTemplate=\"message\">\r\n <span>{{ errorMessage }}</span>\r\n </ng-template>\r\n </p-messages>\r\n\r\n <div class=\"header-actions mr-3\">\r\n <button \r\n *ngIf=\"showSaveButton\"\r\n pButton \r\n type=\"button\" \r\n [label]=\"saveButtonText\"\r\n [disabled]=\"saveButtonDisabled\"\r\n class=\"p-button-primary\"\r\n (click)=\"onSave.emit()\"\r\n ></button>\r\n\r\n <button \r\n *ngIf=\"showCloseButton\"\r\n pButton \r\n type=\"button\" \r\n icon=\"pi pi-times\"\r\n class=\"p-button-text p-button-rounded\"\r\n (click)=\"handleClose()\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"content\">\r\n <div class=\"sidebar-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </ng-template>\r\n</p-sidebar>\r\n", styles: [":host{display:block}.backdrop-shadow{position:fixed;top:0;left:0;width:100%;height:100%;background:#00000080;z-index:1000}.sidebar-header{display:flex;justify-content:flex-end;align-items:center;padding:0;width:100%;gap:1rem}.sidebar-header ::ng-deep .p-messages .p-message-success{margin-left:2rem;font-size:15px}.sidebar-header ::ng-deep .p-messages .p-message-wrapper{padding:1rem}.sidebar-title{margin:0;font-size:1.25rem;font-weight:600;color:#212529;flex:0 1 auto;white-space:nowrap;min-width:0}.header-content{display:flex;align-items:center;gap:1rem;justify-content:space-between;width:100%}.header-actions{display:flex;align-items:center;gap:.5rem;margin-left:auto;margin-right:0}.close-button{background:none;border:none;color:#6c757d;cursor:pointer;padding:.5rem;border-radius:.375rem;transition:all .2s ease;display:flex;align-items:center;justify-content:center;min-width:2rem;min-height:2rem;margin-right:.5rem}.close-button:hover{background-color:#e9ecef;color:#495057}.close-button:focus{outline:none;box-shadow:0 0 0 3px #0f8bfd4d}.close-button i{font-size:1rem}.sidebar-content{height:100%;overflow-y:auto;padding:0}.header-actions .p-button-text.p-button-rounded{width:2rem;height:2rem;border-radius:50%}.header-actions .p-button-text.p-button-rounded:hover{background-color:#0000001a}::ng-deep .p-sidebar .p-sidebar-header{border-bottom:1px solid #e9ecef;margin-bottom:1rem;background-color:#f8f9fa}::ng-deep .p-sidebar .p-sidebar-content{padding:0 1.5rem 1.5rem;height:calc(100% - 80px);overflow-y:auto}::ng-deep .p-sidebar.p-sidebar-right .p-sidebar-content{padding-left:1.5rem;padding-right:1.5rem}::ng-deep .p-sidebar.p-sidebar-left .p-sidebar-content{padding-left:1.5rem;padding-right:1.5rem}@media (max-width: 768px){::ng-deep .p-sidebar{width:100%!important;max-width:100%!important}::ng-deep .p-sidebar .p-sidebar-header{padding:1rem 1rem 0}::ng-deep .p-sidebar .p-sidebar-content{padding:0 1rem 1rem}}\n"] }]
|
|
3820
3840
|
}], ctorParameters: () => [{ type: i3.ConfirmationService }], propDecorators: { visible: [{
|
|
3821
3841
|
type: Input
|
|
3822
3842
|
}], position: [{
|
|
@@ -5591,17 +5611,758 @@ class DocumentHistoryComponent {
|
|
|
5591
5611
|
this.documentHistoryService.downloadDocument(documentUrl, docName);
|
|
5592
5612
|
}
|
|
5593
5613
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryComponent, deps: [{ token: DocumentHistoryService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5594
|
-
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}.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}.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}.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}.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}.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}.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}.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}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info .user-role{color:#6b7280}.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: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$2.Accordion, selector: "p-accordion", inputs: ["multiple", "style", "styleClass", "expandIcon", "collapseIcon", "activeIndex", "selectOnFocus", "headerAriaLevel"], outputs: ["onClose", "onOpen", "activeIndexChange"] }, { kind: "component", type: i3$2.AccordionTab, selector: "p-accordionTab", inputs: ["id", "header", "headerStyle", "tabStyle", "contentStyle", "tabStyleClass", "headerStyleClass", "contentStyleClass", "disabled", "cache", "transitionOptions", "iconPos", "selected", "headerAriaLevel"], outputs: ["selectedChange"] }] });
|
|
5614
|
+
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: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$2.Accordion, selector: "p-accordion", inputs: ["multiple", "style", "styleClass", "expandIcon", "collapseIcon", "activeIndex", "selectOnFocus", "headerAriaLevel"], outputs: ["onClose", "onOpen", "activeIndexChange"] }, { kind: "component", type: i3$2.AccordionTab, selector: "p-accordionTab", inputs: ["id", "header", "headerStyle", "tabStyle", "contentStyle", "tabStyleClass", "headerStyleClass", "contentStyleClass", "disabled", "cache", "transitionOptions", "iconPos", "selected", "headerAriaLevel"], outputs: ["selectedChange"] }] });
|
|
5595
5615
|
}
|
|
5596
5616
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryComponent, decorators: [{
|
|
5597
5617
|
type: Component,
|
|
5598
|
-
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}.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}.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}.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}.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}.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}.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}.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}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info .user-role{color:#6b7280}.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"] }]
|
|
5618
|
+
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"] }]
|
|
5599
5619
|
}], ctorParameters: () => [{ type: DocumentHistoryService }], propDecorators: { historyData: [{
|
|
5600
5620
|
type: Input
|
|
5601
5621
|
}], showHistory: [{
|
|
5602
5622
|
type: Input
|
|
5603
5623
|
}] } });
|
|
5604
5624
|
|
|
5625
|
+
/**
|
|
5626
|
+
* Service for parsing Excel files and extracting styling information
|
|
5627
|
+
*/
|
|
5628
|
+
class ExcelParserService {
|
|
5629
|
+
workbookColors = {};
|
|
5630
|
+
/**
|
|
5631
|
+
* Parses Excel data from ArrayBuffer
|
|
5632
|
+
*/
|
|
5633
|
+
parseExcelData(data) {
|
|
5634
|
+
try {
|
|
5635
|
+
const workbook = this.createWorkbook(data);
|
|
5636
|
+
// Extract color palette from workbook
|
|
5637
|
+
this.extractWorkbookColors(workbook);
|
|
5638
|
+
const sheets = this.getSheetNames(workbook);
|
|
5639
|
+
const currentSheet = this.getFirstSheet(sheets);
|
|
5640
|
+
const styledData = this.parseSheetData(workbook, currentSheet);
|
|
5641
|
+
const tableData = this.convertToLegacyFormat(styledData);
|
|
5642
|
+
const hasStyling = this.hasWorkbookStyling(workbook);
|
|
5643
|
+
return {
|
|
5644
|
+
sheets,
|
|
5645
|
+
currentSheet,
|
|
5646
|
+
styledData,
|
|
5647
|
+
tableData,
|
|
5648
|
+
hasStyling,
|
|
5649
|
+
workbook
|
|
5650
|
+
};
|
|
5651
|
+
}
|
|
5652
|
+
catch (error) {
|
|
5653
|
+
console.error('Error parsing Excel data:', error);
|
|
5654
|
+
return null;
|
|
5655
|
+
}
|
|
5656
|
+
}
|
|
5657
|
+
/**
|
|
5658
|
+
* Creates workbook from ArrayBuffer
|
|
5659
|
+
*/
|
|
5660
|
+
createWorkbook(data) {
|
|
5661
|
+
return XLSX.read(data, {
|
|
5662
|
+
type: 'array',
|
|
5663
|
+
cellStyles: true,
|
|
5664
|
+
cellDates: true,
|
|
5665
|
+
cellNF: false,
|
|
5666
|
+
cellHTML: false
|
|
5667
|
+
});
|
|
5668
|
+
}
|
|
5669
|
+
/**
|
|
5670
|
+
* Gets sheet names from workbook
|
|
5671
|
+
*/
|
|
5672
|
+
getSheetNames(workbook) {
|
|
5673
|
+
return workbook.SheetNames;
|
|
5674
|
+
}
|
|
5675
|
+
/**
|
|
5676
|
+
* Gets the first sheet name
|
|
5677
|
+
*/
|
|
5678
|
+
getFirstSheet(sheets) {
|
|
5679
|
+
return sheets[0] || 'Sheet1';
|
|
5680
|
+
}
|
|
5681
|
+
/**
|
|
5682
|
+
* Parses sheet data with styling
|
|
5683
|
+
*/
|
|
5684
|
+
parseSheetData(workbook, sheetName) {
|
|
5685
|
+
try {
|
|
5686
|
+
const worksheet = this.getWorksheet(workbook, sheetName);
|
|
5687
|
+
if (!worksheet) {
|
|
5688
|
+
return this.createNoDataRow();
|
|
5689
|
+
}
|
|
5690
|
+
const range = this.getWorksheetRange(worksheet);
|
|
5691
|
+
return this.processWorksheetRows(worksheet, range);
|
|
5692
|
+
}
|
|
5693
|
+
catch (error) {
|
|
5694
|
+
console.error('Error parsing sheet data:', error);
|
|
5695
|
+
return this.createErrorRow();
|
|
5696
|
+
}
|
|
5697
|
+
}
|
|
5698
|
+
/**
|
|
5699
|
+
* Gets worksheet from workbook
|
|
5700
|
+
*/
|
|
5701
|
+
getWorksheet(workbook, sheetName) {
|
|
5702
|
+
return workbook.Sheets[sheetName] || null;
|
|
5703
|
+
}
|
|
5704
|
+
/**
|
|
5705
|
+
* Gets worksheet range
|
|
5706
|
+
*/
|
|
5707
|
+
getWorksheetRange(worksheet) {
|
|
5708
|
+
return XLSX.utils.decode_range(worksheet['!ref'] || 'A1');
|
|
5709
|
+
}
|
|
5710
|
+
/**
|
|
5711
|
+
* Processes worksheet rows
|
|
5712
|
+
*/
|
|
5713
|
+
processWorksheetRows(worksheet, range) {
|
|
5714
|
+
const styledData = [];
|
|
5715
|
+
for (let row = range.s.r; row <= range.e.r; row++) {
|
|
5716
|
+
const rowData = this.processRow(worksheet, range, row);
|
|
5717
|
+
if (this.hasRowContent(rowData)) {
|
|
5718
|
+
styledData.push(rowData);
|
|
5719
|
+
}
|
|
5720
|
+
}
|
|
5721
|
+
return styledData;
|
|
5722
|
+
}
|
|
5723
|
+
/**
|
|
5724
|
+
* Processes a single row
|
|
5725
|
+
*/
|
|
5726
|
+
processRow(worksheet, range, rowIndex) {
|
|
5727
|
+
const rowData = { cells: [] };
|
|
5728
|
+
for (let col = range.s.c; col <= range.e.c; col++) {
|
|
5729
|
+
const cell = this.getCell(worksheet, rowIndex, col);
|
|
5730
|
+
const cellData = this.createCellData(cell);
|
|
5731
|
+
rowData.cells.push(cellData);
|
|
5732
|
+
}
|
|
5733
|
+
return rowData;
|
|
5734
|
+
}
|
|
5735
|
+
/**
|
|
5736
|
+
* Gets cell from worksheet
|
|
5737
|
+
*/
|
|
5738
|
+
getCell(worksheet, row, col) {
|
|
5739
|
+
const cellAddress = XLSX.utils.encode_cell({ r: row, c: col });
|
|
5740
|
+
return worksheet[cellAddress] || null;
|
|
5741
|
+
}
|
|
5742
|
+
/**
|
|
5743
|
+
* Creates cell data with styling
|
|
5744
|
+
*/
|
|
5745
|
+
createCellData(cell) {
|
|
5746
|
+
if (!cell) {
|
|
5747
|
+
return { value: SHARED.EMPTY };
|
|
5748
|
+
}
|
|
5749
|
+
return {
|
|
5750
|
+
value: cell.v || SHARED.EMPTY,
|
|
5751
|
+
style: this.extractCellStyle(cell)
|
|
5752
|
+
};
|
|
5753
|
+
}
|
|
5754
|
+
/**
|
|
5755
|
+
* Checks if row has content
|
|
5756
|
+
*/
|
|
5757
|
+
hasRowContent(rowData) {
|
|
5758
|
+
return rowData.cells.some(cell => cell.value !== SHARED.EMPTY);
|
|
5759
|
+
}
|
|
5760
|
+
/**
|
|
5761
|
+
* Creates no data row
|
|
5762
|
+
*/
|
|
5763
|
+
createNoDataRow() {
|
|
5764
|
+
return [{ cells: [{ value: SHARED.NO_DATA_FOUND }] }];
|
|
5765
|
+
}
|
|
5766
|
+
/**
|
|
5767
|
+
* Creates error row
|
|
5768
|
+
*/
|
|
5769
|
+
createErrorRow() {
|
|
5770
|
+
return [{ cells: [{ value: SHARED.ERROR_PARSING_SHEET_DATA }] }];
|
|
5771
|
+
}
|
|
5772
|
+
/**
|
|
5773
|
+
* Extracts styling from cell
|
|
5774
|
+
*/
|
|
5775
|
+
extractCellStyle(cell) {
|
|
5776
|
+
if (!cell.s)
|
|
5777
|
+
return undefined;
|
|
5778
|
+
const style = {};
|
|
5779
|
+
this.extractBackgroundColor(cell.s, style);
|
|
5780
|
+
this.extractFontColor(cell.s, style);
|
|
5781
|
+
this.extractFontFormatting(cell.s, style);
|
|
5782
|
+
this.extractBorders(cell.s, style);
|
|
5783
|
+
return Object.keys(style).length > 0 ? style : undefined;
|
|
5784
|
+
}
|
|
5785
|
+
/**
|
|
5786
|
+
* Extracts background color
|
|
5787
|
+
*/
|
|
5788
|
+
extractBackgroundColor(cellStyle, style) {
|
|
5789
|
+
if (cellStyle.fgColor) {
|
|
5790
|
+
console.log('Found fgColor:', cellStyle.fgColor);
|
|
5791
|
+
style.backgroundColor = this.getColorValue(cellStyle.fgColor);
|
|
5792
|
+
if (style.backgroundColor) {
|
|
5793
|
+
console.log('Extracted background color from fgColor:', style.backgroundColor);
|
|
5794
|
+
}
|
|
5795
|
+
}
|
|
5796
|
+
if (!style.backgroundColor && cellStyle.bgColor) {
|
|
5797
|
+
console.log('Found bgColor:', cellStyle.bgColor);
|
|
5798
|
+
style.backgroundColor = this.getColorValue(cellStyle.bgColor);
|
|
5799
|
+
if (style.backgroundColor) {
|
|
5800
|
+
console.log('Extracted background color from bgColor:', style.backgroundColor);
|
|
5801
|
+
}
|
|
5802
|
+
}
|
|
5803
|
+
}
|
|
5804
|
+
/**
|
|
5805
|
+
* Extracts font color
|
|
5806
|
+
*/
|
|
5807
|
+
extractFontColor(cellStyle, style) {
|
|
5808
|
+
if (cellStyle.font?.color) {
|
|
5809
|
+
console.log('Found font color:', cellStyle.font.color);
|
|
5810
|
+
style.fontColor = this.getColorValue(cellStyle.font.color);
|
|
5811
|
+
if (style.fontColor) {
|
|
5812
|
+
console.log('Extracted font color:', style.fontColor);
|
|
5813
|
+
}
|
|
5814
|
+
}
|
|
5815
|
+
}
|
|
5816
|
+
/**
|
|
5817
|
+
* Extracts font formatting
|
|
5818
|
+
*/
|
|
5819
|
+
extractFontFormatting(cellStyle, style) {
|
|
5820
|
+
if (cellStyle.font?.bold) {
|
|
5821
|
+
style.bold = true;
|
|
5822
|
+
}
|
|
5823
|
+
if (cellStyle.font?.italic) {
|
|
5824
|
+
style.italic = true;
|
|
5825
|
+
}
|
|
5826
|
+
}
|
|
5827
|
+
/**
|
|
5828
|
+
* Extracts borders
|
|
5829
|
+
*/
|
|
5830
|
+
extractBorders(cellStyle, style) {
|
|
5831
|
+
if (!cellStyle.border)
|
|
5832
|
+
return;
|
|
5833
|
+
style.border = {};
|
|
5834
|
+
const borders = ['top', 'bottom', 'left', 'right'];
|
|
5835
|
+
borders.forEach(side => {
|
|
5836
|
+
const border = cellStyle.border[side];
|
|
5837
|
+
if (border?.color) {
|
|
5838
|
+
style.border[side] = this.getColorValue(border.color);
|
|
5839
|
+
}
|
|
5840
|
+
});
|
|
5841
|
+
}
|
|
5842
|
+
/**
|
|
5843
|
+
* Gets color value from color object
|
|
5844
|
+
*/
|
|
5845
|
+
getColorValue(colorObj) {
|
|
5846
|
+
if (colorObj.rgb) {
|
|
5847
|
+
const result = this.rgbToHex(colorObj.rgb);
|
|
5848
|
+
return result;
|
|
5849
|
+
}
|
|
5850
|
+
if (colorObj.theme !== undefined) {
|
|
5851
|
+
const result = this.extractThemeColor(colorObj.theme);
|
|
5852
|
+
return result;
|
|
5853
|
+
}
|
|
5854
|
+
if (colorObj.indexed !== undefined) {
|
|
5855
|
+
const result = this.extractIndexedColor(colorObj.indexed);
|
|
5856
|
+
return result;
|
|
5857
|
+
}
|
|
5858
|
+
return undefined;
|
|
5859
|
+
}
|
|
5860
|
+
/**
|
|
5861
|
+
* Converts RGB to hex
|
|
5862
|
+
*/
|
|
5863
|
+
rgbToHex(rgb) {
|
|
5864
|
+
if (!rgb)
|
|
5865
|
+
return SHARED.EMPTY;
|
|
5866
|
+
if (rgb.length === 8) {
|
|
5867
|
+
// Excel RGB format: AARRGGBB (Alpha, Red, Green, Blue)
|
|
5868
|
+
const red = parseInt(rgb.substring(2, 4), 16);
|
|
5869
|
+
const green = parseInt(rgb.substring(4, 6), 16);
|
|
5870
|
+
const blue = parseInt(rgb.substring(6, 8), 16);
|
|
5871
|
+
return `#${red.toString(16).padStart(2, '0')}${green.toString(16).padStart(2, '0')}${blue.toString(16).padStart(2, '0')}`;
|
|
5872
|
+
}
|
|
5873
|
+
else if (rgb.length === 6) {
|
|
5874
|
+
// Standard hex format: RRGGBB
|
|
5875
|
+
return `#${rgb}`;
|
|
5876
|
+
}
|
|
5877
|
+
return SHARED.EMPTY;
|
|
5878
|
+
}
|
|
5879
|
+
/**
|
|
5880
|
+
* Extracts theme color dynamically from Excel
|
|
5881
|
+
*/
|
|
5882
|
+
extractThemeColor(theme) {
|
|
5883
|
+
const baseThemeColors = {
|
|
5884
|
+
0: '#000000', // Black
|
|
5885
|
+
1: '#FFFFFF', // White
|
|
5886
|
+
2: '#FF0000', // Red
|
|
5887
|
+
3: '#00FF00', // Green
|
|
5888
|
+
4: '#0000FF', // Blue
|
|
5889
|
+
5: '#FFFF00', // Yellow
|
|
5890
|
+
6: '#FF00FF', // Magenta
|
|
5891
|
+
7: '#00FFFF', // Cyan
|
|
5892
|
+
};
|
|
5893
|
+
return baseThemeColors[theme] || this.generateThemeColor(theme);
|
|
5894
|
+
}
|
|
5895
|
+
/**
|
|
5896
|
+
* Generates a theme color based on index (fallback)
|
|
5897
|
+
*/
|
|
5898
|
+
generateThemeColor(theme) {
|
|
5899
|
+
// Generate a color based on the theme index
|
|
5900
|
+
// This is a fallback when we don't have the actual theme colors
|
|
5901
|
+
const hue = (theme * 137.508) % 360; // Golden angle approximation
|
|
5902
|
+
return `hsl(${hue}, 70%, 50%)`;
|
|
5903
|
+
}
|
|
5904
|
+
/**
|
|
5905
|
+
* Extracts indexed color dynamically from Excel
|
|
5906
|
+
*/
|
|
5907
|
+
extractIndexedColor(indexed) {
|
|
5908
|
+
// Instead of hardcoded colors, we'll try to extract the actual color
|
|
5909
|
+
// from the Excel file's color palette
|
|
5910
|
+
if (this.workbookColors && this.workbookColors[indexed]) {
|
|
5911
|
+
return this.rgbToHex(this.workbookColors[indexed]);
|
|
5912
|
+
}
|
|
5913
|
+
// Fallback to a generated color if we don't have the palette
|
|
5914
|
+
return this.generateIndexedColor(indexed);
|
|
5915
|
+
}
|
|
5916
|
+
/**
|
|
5917
|
+
* Generates an indexed color based on index (fallback)
|
|
5918
|
+
*/
|
|
5919
|
+
generateIndexedColor(indexed) {
|
|
5920
|
+
// Generate a color based on the indexed number
|
|
5921
|
+
// This ensures we always have a unique color for each index
|
|
5922
|
+
const hue = (indexed * 25) % 360;
|
|
5923
|
+
const saturation = 60 + (indexed % 20);
|
|
5924
|
+
const lightness = 40 + (indexed % 30);
|
|
5925
|
+
return `hsl(${hue}, ${saturation}%, ${lightness}%)`;
|
|
5926
|
+
}
|
|
5927
|
+
/**
|
|
5928
|
+
* Extracts color palette from Excel workbook
|
|
5929
|
+
*/
|
|
5930
|
+
extractWorkbookColors(workbook) {
|
|
5931
|
+
this.workbookColors = {};
|
|
5932
|
+
// Try to extract colors from the workbook's color palette
|
|
5933
|
+
const workbookProps = workbook.Workbook;
|
|
5934
|
+
if (workbookProps && workbookProps.Colors) {
|
|
5935
|
+
const colors = workbookProps.Colors;
|
|
5936
|
+
if (colors.IndexedColors) {
|
|
5937
|
+
colors.IndexedColors.forEach((color, index) => {
|
|
5938
|
+
if (color.rgb) {
|
|
5939
|
+
this.workbookColors[index] = color.rgb;
|
|
5940
|
+
}
|
|
5941
|
+
});
|
|
5942
|
+
}
|
|
5943
|
+
}
|
|
5944
|
+
// Also try to extract from theme
|
|
5945
|
+
if (workbookProps && workbookProps.Theme) {
|
|
5946
|
+
const theme = workbookProps.Theme;
|
|
5947
|
+
if (theme.ThemeElements && theme.ThemeElements.ClrScheme) {
|
|
5948
|
+
const clrScheme = theme.ThemeElements.ClrScheme;
|
|
5949
|
+
// Extract theme colors if available
|
|
5950
|
+
Object.keys(clrScheme).forEach((key, index) => {
|
|
5951
|
+
const color = clrScheme[key];
|
|
5952
|
+
if (color && color.SrgbClr) {
|
|
5953
|
+
this.workbookColors[index] = color.SrgbClr.val;
|
|
5954
|
+
}
|
|
5955
|
+
});
|
|
5956
|
+
}
|
|
5957
|
+
}
|
|
5958
|
+
console.log('Extracted workbook colors:', this.workbookColors);
|
|
5959
|
+
}
|
|
5960
|
+
/**
|
|
5961
|
+
* Checks if workbook has styling
|
|
5962
|
+
*/
|
|
5963
|
+
hasWorkbookStyling(workbook) {
|
|
5964
|
+
for (const sheetName of workbook.SheetNames) {
|
|
5965
|
+
const worksheet = workbook.Sheets[sheetName];
|
|
5966
|
+
if (worksheet && this.hasWorksheetStyling(worksheet)) {
|
|
5967
|
+
return true;
|
|
5968
|
+
}
|
|
5969
|
+
}
|
|
5970
|
+
return false;
|
|
5971
|
+
}
|
|
5972
|
+
/**
|
|
5973
|
+
* Checks if worksheet has styling
|
|
5974
|
+
*/
|
|
5975
|
+
hasWorksheetStyling(worksheet) {
|
|
5976
|
+
for (const cellAddress in worksheet) {
|
|
5977
|
+
if (cellAddress.startsWith('!'))
|
|
5978
|
+
continue;
|
|
5979
|
+
const cell = worksheet[cellAddress];
|
|
5980
|
+
if (cell?.s) {
|
|
5981
|
+
return true;
|
|
5982
|
+
}
|
|
5983
|
+
}
|
|
5984
|
+
return false;
|
|
5985
|
+
}
|
|
5986
|
+
/**
|
|
5987
|
+
* Converts styled data to legacy format
|
|
5988
|
+
*/
|
|
5989
|
+
convertToLegacyFormat(styledData) {
|
|
5990
|
+
return styledData.map(row => row.cells.map(cell => cell.value));
|
|
5991
|
+
}
|
|
5992
|
+
/**
|
|
5993
|
+
* Ensures data consistency
|
|
5994
|
+
*/
|
|
5995
|
+
ensureDataConsistency(styledData) {
|
|
5996
|
+
if (styledData.length === 0) {
|
|
5997
|
+
return [{ cells: [{ value: 'No data found' }] }];
|
|
5998
|
+
}
|
|
5999
|
+
const maxColumns = Math.max(...styledData.map(row => row.cells.length));
|
|
6000
|
+
const minColumns = Math.max(maxColumns, 3);
|
|
6001
|
+
return styledData.map(row => {
|
|
6002
|
+
const normalizedRow = { cells: [...row.cells] };
|
|
6003
|
+
while (normalizedRow.cells.length < minColumns) {
|
|
6004
|
+
normalizedRow.cells.push({ value: SHARED.EMPTY });
|
|
6005
|
+
}
|
|
6006
|
+
return normalizedRow;
|
|
6007
|
+
});
|
|
6008
|
+
}
|
|
6009
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ExcelParserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6010
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ExcelParserService, providedIn: 'root' });
|
|
6011
|
+
}
|
|
6012
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ExcelParserService, decorators: [{
|
|
6013
|
+
type: Injectable,
|
|
6014
|
+
args: [{
|
|
6015
|
+
providedIn: 'root'
|
|
6016
|
+
}]
|
|
6017
|
+
}] });
|
|
6018
|
+
|
|
6019
|
+
/**
|
|
6020
|
+
* Component for viewing different types of document content.
|
|
6021
|
+
* Supports PDF, images, and other document formats.
|
|
6022
|
+
* @class DocumentContentViewerComponent
|
|
6023
|
+
* @typedef {DocumentContentViewerComponent}
|
|
6024
|
+
*/
|
|
6025
|
+
class DocumentContentViewerComponent {
|
|
6026
|
+
excelParserService;
|
|
6027
|
+
documentHttpService;
|
|
6028
|
+
/**
|
|
6029
|
+
* The document URL to display
|
|
6030
|
+
* @type {string}
|
|
6031
|
+
*/
|
|
6032
|
+
documentUrl;
|
|
6033
|
+
/**
|
|
6034
|
+
* The content type of the document
|
|
6035
|
+
* @type {string}
|
|
6036
|
+
*/
|
|
6037
|
+
contentType;
|
|
6038
|
+
/**
|
|
6039
|
+
* The document name for display purposes
|
|
6040
|
+
* @type {string}
|
|
6041
|
+
*/
|
|
6042
|
+
documentName;
|
|
6043
|
+
/**
|
|
6044
|
+
* Excel data for display
|
|
6045
|
+
* @type {any}
|
|
6046
|
+
*/
|
|
6047
|
+
excelData = null;
|
|
6048
|
+
/**
|
|
6049
|
+
* Parsed Excel data as table rows
|
|
6050
|
+
* @type {any[][]}
|
|
6051
|
+
*/
|
|
6052
|
+
excelTableData = [];
|
|
6053
|
+
/**
|
|
6054
|
+
* Enhanced Excel data with styling information
|
|
6055
|
+
* @type {ExcelRowData[]}
|
|
6056
|
+
*/
|
|
6057
|
+
excelStyledData = [];
|
|
6058
|
+
/**
|
|
6059
|
+
* Excel sheet names
|
|
6060
|
+
* @type {string[]}
|
|
6061
|
+
*/
|
|
6062
|
+
excelSheets = [];
|
|
6063
|
+
/**
|
|
6064
|
+
* Current active sheet
|
|
6065
|
+
* @type {string}
|
|
6066
|
+
*/
|
|
6067
|
+
currentSheet = '';
|
|
6068
|
+
/**
|
|
6069
|
+
* Loading state for Excel files
|
|
6070
|
+
* @type {boolean}
|
|
6071
|
+
*/
|
|
6072
|
+
isLoadingExcel = false;
|
|
6073
|
+
/**
|
|
6074
|
+
* Error state for Excel files
|
|
6075
|
+
* @type {string | null}
|
|
6076
|
+
*/
|
|
6077
|
+
excelError = null;
|
|
6078
|
+
/**
|
|
6079
|
+
* Loading state specifically for Word documents
|
|
6080
|
+
* @type {boolean}
|
|
6081
|
+
*/
|
|
6082
|
+
isLoadingWordDocument = false;
|
|
6083
|
+
/**
|
|
6084
|
+
* Configuration for the document viewer
|
|
6085
|
+
* @type {any}
|
|
6086
|
+
*/
|
|
6087
|
+
docViewerConfig = {
|
|
6088
|
+
defaultZoom: 100,
|
|
6089
|
+
zoomStep: 25,
|
|
6090
|
+
minZoom: 25,
|
|
6091
|
+
maxZoom: 400
|
|
6092
|
+
};
|
|
6093
|
+
/**
|
|
6094
|
+
* Constructor
|
|
6095
|
+
* @param {ExcelParserService} excelParserService - Service for parsing Excel files
|
|
6096
|
+
* @param {DocumentHttpService} documentHttpService - Service for making HTTP requests with authentication
|
|
6097
|
+
*/
|
|
6098
|
+
constructor(excelParserService, documentHttpService) {
|
|
6099
|
+
this.excelParserService = excelParserService;
|
|
6100
|
+
this.documentHttpService = documentHttpService;
|
|
6101
|
+
}
|
|
6102
|
+
/**
|
|
6103
|
+
* Computed property to determine if the document is an image
|
|
6104
|
+
* @type {boolean}
|
|
6105
|
+
*/
|
|
6106
|
+
get isImage() {
|
|
6107
|
+
return this.contentType ? SUPPORTED_IMAGE_TYPES.includes(this.contentType) : false;
|
|
6108
|
+
}
|
|
6109
|
+
/**
|
|
6110
|
+
* Computed property to determine if the document is a PDF
|
|
6111
|
+
* @type {boolean}
|
|
6112
|
+
*/
|
|
6113
|
+
get isPdf() {
|
|
6114
|
+
return this.contentType === 'application/pdf';
|
|
6115
|
+
}
|
|
6116
|
+
/**
|
|
6117
|
+
* Computed property to determine if the document is an Excel file
|
|
6118
|
+
* @type {boolean}
|
|
6119
|
+
*/
|
|
6120
|
+
get isExcel() {
|
|
6121
|
+
return this.contentType === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' ||
|
|
6122
|
+
this.contentType === 'application/vnd.ms-excel';
|
|
6123
|
+
}
|
|
6124
|
+
/**
|
|
6125
|
+
* Computed property to determine if the document is a Word file
|
|
6126
|
+
* @type {boolean}
|
|
6127
|
+
*/
|
|
6128
|
+
get isWord() {
|
|
6129
|
+
return this.contentType === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' ||
|
|
6130
|
+
this.contentType === 'application/msword';
|
|
6131
|
+
}
|
|
6132
|
+
/**
|
|
6133
|
+
* Computed property to determine if the document is a CSV file
|
|
6134
|
+
* @type {boolean}
|
|
6135
|
+
*/
|
|
6136
|
+
get isCsv() {
|
|
6137
|
+
return this.contentType === 'text/csv';
|
|
6138
|
+
}
|
|
6139
|
+
/**
|
|
6140
|
+
* Computed property to determine if the document is an email file
|
|
6141
|
+
* @type {boolean}
|
|
6142
|
+
*/
|
|
6143
|
+
get isEmail() {
|
|
6144
|
+
return this.contentType === 'message/rfc822' ||
|
|
6145
|
+
this.contentType === 'application/vnd.ms-outlook';
|
|
6146
|
+
}
|
|
6147
|
+
/**
|
|
6148
|
+
* Computed property to determine if the document is an OpenDocument file
|
|
6149
|
+
* @type {boolean}
|
|
6150
|
+
*/
|
|
6151
|
+
get isOpenDocument() {
|
|
6152
|
+
return this.contentType === 'application/vnd.oasis.opendocument.text';
|
|
6153
|
+
}
|
|
6154
|
+
/**
|
|
6155
|
+
* Computed property to determine if the document has an unsupported content type
|
|
6156
|
+
* @type {boolean}
|
|
6157
|
+
*/
|
|
6158
|
+
get isUnsupported() {
|
|
6159
|
+
return !this.isImage && !this.isPdf && !this.isExcel && !this.isWord &&
|
|
6160
|
+
!this.isCsv && !this.isEmail && !this.isOpenDocument;
|
|
6161
|
+
}
|
|
6162
|
+
/**
|
|
6163
|
+
* Computed property to get the appropriate icon for the document type
|
|
6164
|
+
* @type {string}
|
|
6165
|
+
*/
|
|
6166
|
+
get documentIcon() {
|
|
6167
|
+
if (this.isPdf)
|
|
6168
|
+
return 'pi pi-file-pdf';
|
|
6169
|
+
if (this.isImage)
|
|
6170
|
+
return 'pi pi-image';
|
|
6171
|
+
if (this.isExcel)
|
|
6172
|
+
return 'pi pi-file-excel';
|
|
6173
|
+
if (this.isWord)
|
|
6174
|
+
return 'pi pi-file-word';
|
|
6175
|
+
if (this.isCsv)
|
|
6176
|
+
return 'pi pi-file';
|
|
6177
|
+
if (this.isEmail)
|
|
6178
|
+
return 'pi pi-envelope';
|
|
6179
|
+
if (this.isOpenDocument)
|
|
6180
|
+
return 'pi pi-file';
|
|
6181
|
+
return 'pi pi-file';
|
|
6182
|
+
}
|
|
6183
|
+
/**
|
|
6184
|
+
* Computed property to get the display text for the document type
|
|
6185
|
+
* @type {string}
|
|
6186
|
+
*/
|
|
6187
|
+
get documentTypeText() {
|
|
6188
|
+
if (this.isPdf)
|
|
6189
|
+
return 'PDF Document';
|
|
6190
|
+
if (this.isImage)
|
|
6191
|
+
return 'Image';
|
|
6192
|
+
if (this.isExcel)
|
|
6193
|
+
return 'Excel Spreadsheet';
|
|
6194
|
+
if (this.isWord)
|
|
6195
|
+
return 'Word Document';
|
|
6196
|
+
if (this.isCsv)
|
|
6197
|
+
return 'CSV File';
|
|
6198
|
+
if (this.isEmail)
|
|
6199
|
+
return 'Email Message';
|
|
6200
|
+
if (this.isOpenDocument)
|
|
6201
|
+
return 'OpenDocument';
|
|
6202
|
+
return 'Document';
|
|
6203
|
+
}
|
|
6204
|
+
/**
|
|
6205
|
+
* Safely gets the styled Excel data for display
|
|
6206
|
+
* @type {ExcelRowData[]}
|
|
6207
|
+
*/
|
|
6208
|
+
get safeExcelStyledData() {
|
|
6209
|
+
if (!this.excelStyledData || this.excelStyledData.length === 0) {
|
|
6210
|
+
return [{ cells: [{ value: 'No data available' }] }];
|
|
6211
|
+
}
|
|
6212
|
+
return this.excelStyledData;
|
|
6213
|
+
}
|
|
6214
|
+
/**
|
|
6215
|
+
* Handles changes to input properties
|
|
6216
|
+
* @param {SimpleChanges} changes - The changes object
|
|
6217
|
+
*/
|
|
6218
|
+
ngOnChanges(changes) {
|
|
6219
|
+
if (changes['documentUrl'] || changes['contentType']) {
|
|
6220
|
+
if (this.isWord && this.documentUrl) {
|
|
6221
|
+
this.isLoadingWordDocument = true;
|
|
6222
|
+
}
|
|
6223
|
+
this.loadExcelData();
|
|
6224
|
+
}
|
|
6225
|
+
}
|
|
6226
|
+
/**
|
|
6227
|
+
* Initializes the component
|
|
6228
|
+
*/
|
|
6229
|
+
ngOnInit() {
|
|
6230
|
+
this.loadExcelData();
|
|
6231
|
+
}
|
|
6232
|
+
/**
|
|
6233
|
+
* Downloads the document
|
|
6234
|
+
*/
|
|
6235
|
+
downloadDocument() {
|
|
6236
|
+
if (this.documentUrl) {
|
|
6237
|
+
const link = document.createElement('a');
|
|
6238
|
+
link.href = this.documentUrl;
|
|
6239
|
+
link.download = this.documentName || 'document';
|
|
6240
|
+
link.target = '_blank';
|
|
6241
|
+
document.body.appendChild(link);
|
|
6242
|
+
link.click();
|
|
6243
|
+
document.body.removeChild(link);
|
|
6244
|
+
}
|
|
6245
|
+
}
|
|
6246
|
+
/**
|
|
6247
|
+
* Opens the document in a new tab
|
|
6248
|
+
*/
|
|
6249
|
+
openInNewTab() {
|
|
6250
|
+
if (this.documentUrl) {
|
|
6251
|
+
window.open(this.documentUrl, '_blank');
|
|
6252
|
+
}
|
|
6253
|
+
}
|
|
6254
|
+
/**
|
|
6255
|
+
* Loads Excel data for display
|
|
6256
|
+
*/
|
|
6257
|
+
loadExcelData() {
|
|
6258
|
+
if (this.isExcel && this.documentUrl) {
|
|
6259
|
+
this.isLoadingExcel = true;
|
|
6260
|
+
this.excelError = null;
|
|
6261
|
+
this.documentHttpService.downloadExcelFile(this.documentUrl)
|
|
6262
|
+
.subscribe({
|
|
6263
|
+
next: (data) => {
|
|
6264
|
+
try {
|
|
6265
|
+
this.parseExcelData(data);
|
|
6266
|
+
}
|
|
6267
|
+
catch (error) {
|
|
6268
|
+
this.excelError = 'Unable to parse Excel file';
|
|
6269
|
+
}
|
|
6270
|
+
this.isLoadingExcel = false;
|
|
6271
|
+
},
|
|
6272
|
+
error: (error) => {
|
|
6273
|
+
console.log(error);
|
|
6274
|
+
this.isLoadingExcel = false;
|
|
6275
|
+
}
|
|
6276
|
+
});
|
|
6277
|
+
}
|
|
6278
|
+
else {
|
|
6279
|
+
this.resetExcelData();
|
|
6280
|
+
}
|
|
6281
|
+
}
|
|
6282
|
+
/**
|
|
6283
|
+
* Parses Excel data using the service
|
|
6284
|
+
* @param {ArrayBuffer} data - Excel file data
|
|
6285
|
+
*/
|
|
6286
|
+
parseExcelData(data) {
|
|
6287
|
+
const parsedData = this.excelParserService.parseExcelData(data);
|
|
6288
|
+
if (parsedData) {
|
|
6289
|
+
this.excelSheets = parsedData.sheets;
|
|
6290
|
+
this.currentSheet = parsedData.currentSheet;
|
|
6291
|
+
this.excelStyledData = parsedData.styledData;
|
|
6292
|
+
this.excelTableData = parsedData.tableData;
|
|
6293
|
+
this.excelStyledData = this.excelParserService.ensureDataConsistency(this.excelStyledData);
|
|
6294
|
+
this.excelTableData = this.excelParserService.convertToLegacyFormat(this.excelStyledData);
|
|
6295
|
+
this.excelData = {
|
|
6296
|
+
type: 'excel',
|
|
6297
|
+
sheets: this.excelSheets,
|
|
6298
|
+
currentSheet: this.currentSheet,
|
|
6299
|
+
tableData: this.excelTableData,
|
|
6300
|
+
styledData: this.excelStyledData,
|
|
6301
|
+
workbook: parsedData.workbook,
|
|
6302
|
+
hasStyling: parsedData.hasStyling
|
|
6303
|
+
};
|
|
6304
|
+
}
|
|
6305
|
+
else {
|
|
6306
|
+
this.excelError = 'Unable to parse Excel file structure';
|
|
6307
|
+
}
|
|
6308
|
+
}
|
|
6309
|
+
/**
|
|
6310
|
+
* Changes the active Excel sheet
|
|
6311
|
+
* @param {string} sheetName - Name of the sheet to activate
|
|
6312
|
+
*/
|
|
6313
|
+
changeSheet(sheetName) {
|
|
6314
|
+
this.currentSheet = sheetName;
|
|
6315
|
+
if (this.excelData?.workbook) {
|
|
6316
|
+
this.excelStyledData = this.excelParserService.parseSheetData(this.excelData.workbook, sheetName);
|
|
6317
|
+
this.excelStyledData = this.excelParserService.ensureDataConsistency(this.excelStyledData);
|
|
6318
|
+
this.excelTableData = this.excelParserService.convertToLegacyFormat(this.excelStyledData);
|
|
6319
|
+
}
|
|
6320
|
+
}
|
|
6321
|
+
/**
|
|
6322
|
+
* Resets Excel data to initial state
|
|
6323
|
+
*/
|
|
6324
|
+
resetExcelData() {
|
|
6325
|
+
this.excelData = null;
|
|
6326
|
+
this.excelTableData = [];
|
|
6327
|
+
this.excelStyledData = [];
|
|
6328
|
+
this.excelSheets = [];
|
|
6329
|
+
this.currentSheet = '';
|
|
6330
|
+
this.isLoadingExcel = false;
|
|
6331
|
+
this.excelError = null;
|
|
6332
|
+
}
|
|
6333
|
+
/**
|
|
6334
|
+
* Handles the beforeLoad event from ngx-doc-viewer
|
|
6335
|
+
*/
|
|
6336
|
+
onWordDocumentBeforeLoad() {
|
|
6337
|
+
this.isLoadingWordDocument = true;
|
|
6338
|
+
}
|
|
6339
|
+
/**
|
|
6340
|
+
* Handles the load event from ngx-doc-viewer
|
|
6341
|
+
*/
|
|
6342
|
+
onWordDocumentLoad() {
|
|
6343
|
+
this.isLoadingWordDocument = false;
|
|
6344
|
+
}
|
|
6345
|
+
/**
|
|
6346
|
+
* Handles the error event from ngx-doc-viewer
|
|
6347
|
+
*/
|
|
6348
|
+
onWordDocumentError(error) {
|
|
6349
|
+
this.isLoadingWordDocument = false;
|
|
6350
|
+
console.error('Word document loading error:', error);
|
|
6351
|
+
}
|
|
6352
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContentViewerComponent, deps: [{ token: ExcelParserService }, { token: DocumentHttpService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6353
|
+
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" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-content-viewer-container\">\n @if(documentUrl && contentType){\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]=\"0.7\"\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 />\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=\"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=\"width:100%;height:85vh;\"\n ></ngx-doc-viewer>\n </div>\n </div>\n }\n\n <!-- CSV Files -->\n @else if(isCsv){\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 || 'CSV File' }}</p>\n <p class=\"document-note\">CSV 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 <!-- 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=\"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 || 'OpenDocument' }}</p>\n <p class=\"document-note\">OpenDocument 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 <!-- 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 Selected</h4>\n <p>Please select 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 .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}.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}.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%}\n"], dependencies: [{ kind: "component", type: i3$3.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: i4$1.NgxDocViewerComponent, selector: "ngx-doc-viewer", inputs: ["url", "queryParams", "viewerUrl", "googleCheckInterval", "googleMaxChecks", "disableContent", "googleCheckContentLoaded", "viewer", "overrideLocalhost"], outputs: ["loaded"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
6354
|
+
}
|
|
6355
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContentViewerComponent, decorators: [{
|
|
6356
|
+
type: Component,
|
|
6357
|
+
args: [{ selector: 'document-content-viewer', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-content-viewer-container\">\n @if(documentUrl && contentType){\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]=\"0.7\"\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 />\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=\"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=\"width:100%;height:85vh;\"\n ></ngx-doc-viewer>\n </div>\n </div>\n }\n\n <!-- CSV Files -->\n @else if(isCsv){\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 || 'CSV File' }}</p>\n <p class=\"document-note\">CSV 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 <!-- 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=\"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 || 'OpenDocument' }}</p>\n <p class=\"document-note\">OpenDocument 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 <!-- 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 Selected</h4>\n <p>Please select 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 .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}.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}.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%}\n"] }]
|
|
6358
|
+
}], ctorParameters: () => [{ type: ExcelParserService }, { type: DocumentHttpService }], propDecorators: { documentUrl: [{
|
|
6359
|
+
type: Input
|
|
6360
|
+
}], contentType: [{
|
|
6361
|
+
type: Input
|
|
6362
|
+
}], documentName: [{
|
|
6363
|
+
type: Input
|
|
6364
|
+
}] } });
|
|
6365
|
+
|
|
5605
6366
|
class DocumentActionsService {
|
|
5606
6367
|
/**
|
|
5607
6368
|
* Calculates the card class based on status
|
|
@@ -6048,27 +6809,6 @@ class DocumentViewerComponent {
|
|
|
6048
6809
|
documentIsUploaded: false,
|
|
6049
6810
|
alertData: null
|
|
6050
6811
|
};
|
|
6051
|
-
/**
|
|
6052
|
-
* Computed property to determine if the selected document is an image
|
|
6053
|
-
* @type {boolean}
|
|
6054
|
-
*/
|
|
6055
|
-
get isSelectedDocumentImage() {
|
|
6056
|
-
return this.documentViewerService.isImage(this.selectedDocument?.contentType);
|
|
6057
|
-
}
|
|
6058
|
-
/**
|
|
6059
|
-
* Computed property to determine if the selected document is a PDF
|
|
6060
|
-
* @type {boolean}
|
|
6061
|
-
*/
|
|
6062
|
-
get isSelectedDocumentPdf() {
|
|
6063
|
-
return this.selectedDocument?.contentType === 'application/pdf';
|
|
6064
|
-
}
|
|
6065
|
-
/**
|
|
6066
|
-
* Computed property to determine if the selected document has an unsupported content type
|
|
6067
|
-
* @type {boolean}
|
|
6068
|
-
*/
|
|
6069
|
-
get isSelectedDocumentUnsupported() {
|
|
6070
|
-
return !this.isSelectedDocumentImage && !this.isSelectedDocumentPdf;
|
|
6071
|
-
}
|
|
6072
6812
|
/**
|
|
6073
6813
|
* Holds the subscription to manage observable cleanup.
|
|
6074
6814
|
* @private
|
|
@@ -6108,14 +6848,6 @@ class DocumentViewerComponent {
|
|
|
6108
6848
|
this.selectedDocument = document;
|
|
6109
6849
|
this.documentViewerService.updateSelectedDocument(document);
|
|
6110
6850
|
}
|
|
6111
|
-
/**
|
|
6112
|
-
* Determines if the given content type is an image.
|
|
6113
|
-
* @param {string | undefined} contentType - The MIME type of the content.
|
|
6114
|
-
* @returns {boolean} `true` if the content type is an image; otherwise, `false`.
|
|
6115
|
-
*/
|
|
6116
|
-
isImage(contentType) {
|
|
6117
|
-
return this.documentViewerService.isImage(contentType);
|
|
6118
|
-
}
|
|
6119
6851
|
/**
|
|
6120
6852
|
* Handles document actions from the actions component
|
|
6121
6853
|
* @param {DocumentAction} action - The action performed
|
|
@@ -6128,11 +6860,11 @@ class DocumentViewerComponent {
|
|
|
6128
6860
|
this.subscription.unsubscribe();
|
|
6129
6861
|
}
|
|
6130
6862
|
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 }], target: i0.ɵɵFactoryTarget.Component });
|
|
6131
|
-
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" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-viewer-container\">\n <div class=\"main-content\">\n <p-messages [(value)]=\"messages\" [enableService]=\"false\"></p-messages>\n \n <div class=\"content-grid\">\n @if(selectedDocument){\n <div class=\"document-preview
|
|
6863
|
+
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" }, 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 <p-messages [(value)]=\"messages\" [enableService]=\"false\"></p-messages>\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 ></document-content-viewer>\r\n </div>\r\n }\r\n\r\n <div class=\"sidebar col-12 md:col-3 pt-0\">\r\n \r\n <!-- <div class=\"alerts mb-4 pb-1\">\r\n <button\r\n type=\"button\"\r\n *ngIf=\"\r\n (alertData?.status !== 'Pending' && !!alertData?.status) ||\r\n alertData?.isAlert === false\r\n \"\r\n class=\"bg-green-500 border-none border-round-md flex align-items-center mb-3 p-2 px-3\"\r\n >\r\n <i\r\n class=\"pi pi-verified mr-2 cursor-pointer\"\r\n [ngStyle]=\"{\r\n color:\r\n alertData?.status === 'Pending' &&\r\n alertData?.isAlert !== false\r\n ? '#FFFFFF'\r\n : '#8A8EA6'\r\n }\"\r\n style=\"font-size: 20px\"\r\n ></i>\r\n <span class=\"font-semibold text-white\">Verified</span>\r\n </button>\r\n <div\r\n class=\"card mb-0\"\r\n [ngClass]=\"\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? 'alert-card'\r\n : 'success-alert'\r\n \"\r\n >\r\n <div class=\"flex align-items-center mb-2 pb-1\" *ngIf=\"alertData?.status !== 'Verified'\">\r\n <h4 class=\"mr-3 mt-0 mb-0 text-color font-bold\" style=\"font-size: 21px; font-weight: bold; border-color: rgba(68, 72, 109, 0.2) ;\" >Alerts</h4>\r\n <i\r\n class=\"pi pi-exclamation-triangle\"\r\n style=\"font-size: 20px\"\r\n [ngStyle]=\"{\r\n color:\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? '#FB392D'\r\n : '#8A8EA6'\r\n }\"\r\n ></i>\r\n </div>\r\n <p class=\"text-color mb-0\">{{ alertData?.alertMessage }}</p>\r\n </div>\r\n </div>\r\n -->\r\n \r\n <div class=\"sidebar\">\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 \r\n <document-history \r\n [historyData]=\"currentState.documentHistory\" \r\n [showHistory]=\"currentState.showDocumentHistory\">\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.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"] }, { kind: "component", type: DocumentContentViewerComponent, selector: "document-content-viewer", inputs: ["documentUrl", "contentType", "documentName"] }, { kind: "component", type: DocumentActionsComponent, selector: "document-actions", inputs: ["document", "documentId", "currentStatus", "isLoading", "isUploaded", "statusId"], outputs: ["actionPerformed"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
6132
6864
|
}
|
|
6133
6865
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentViewerComponent, decorators: [{
|
|
6134
6866
|
type: Component,
|
|
6135
|
-
args: [{ selector: 'document-viewer', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-viewer-container\">\n <div class=\"main-content\">\n <p-messages [(value)]=\"messages\" [enableService]=\"false\"></p-messages>\n \n <div class=\"content-grid\">\n @if(selectedDocument){\n <div class=\"document-preview
|
|
6867
|
+
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 <p-messages [(value)]=\"messages\" [enableService]=\"false\"></p-messages>\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 ></document-content-viewer>\r\n </div>\r\n }\r\n\r\n <div class=\"sidebar col-12 md:col-3 pt-0\">\r\n \r\n <!-- <div class=\"alerts mb-4 pb-1\">\r\n <button\r\n type=\"button\"\r\n *ngIf=\"\r\n (alertData?.status !== 'Pending' && !!alertData?.status) ||\r\n alertData?.isAlert === false\r\n \"\r\n class=\"bg-green-500 border-none border-round-md flex align-items-center mb-3 p-2 px-3\"\r\n >\r\n <i\r\n class=\"pi pi-verified mr-2 cursor-pointer\"\r\n [ngStyle]=\"{\r\n color:\r\n alertData?.status === 'Pending' &&\r\n alertData?.isAlert !== false\r\n ? '#FFFFFF'\r\n : '#8A8EA6'\r\n }\"\r\n style=\"font-size: 20px\"\r\n ></i>\r\n <span class=\"font-semibold text-white\">Verified</span>\r\n </button>\r\n <div\r\n class=\"card mb-0\"\r\n [ngClass]=\"\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? 'alert-card'\r\n : 'success-alert'\r\n \"\r\n >\r\n <div class=\"flex align-items-center mb-2 pb-1\" *ngIf=\"alertData?.status !== 'Verified'\">\r\n <h4 class=\"mr-3 mt-0 mb-0 text-color font-bold\" style=\"font-size: 21px; font-weight: bold; border-color: rgba(68, 72, 109, 0.2) ;\" >Alerts</h4>\r\n <i\r\n class=\"pi pi-exclamation-triangle\"\r\n style=\"font-size: 20px\"\r\n [ngStyle]=\"{\r\n color:\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? '#FB392D'\r\n : '#8A8EA6'\r\n }\"\r\n ></i>\r\n </div>\r\n <p class=\"text-color mb-0\">{{ alertData?.alertMessage }}</p>\r\n </div>\r\n </div>\r\n -->\r\n \r\n <div class=\"sidebar\">\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 \r\n <document-history \r\n [historyData]=\"currentState.documentHistory\" \r\n [showHistory]=\"currentState.showDocumentHistory\">\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"] }]
|
|
6136
6868
|
}], ctorParameters: () => [{ type: DocumentHttpService }, { type: DocumentHelperService }, { type: i3.MessageService }, { type: DocumentViewerService }], propDecorators: { selectedDocument: [{
|
|
6137
6869
|
type: Input
|
|
6138
6870
|
}], documentList: [{
|
|
@@ -6678,11 +7410,11 @@ class DocumentListComponent {
|
|
|
6678
7410
|
}
|
|
6679
7411
|
}
|
|
6680
7412
|
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 });
|
|
6681
|
-
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\">\n <p-dialog [header]=\"selectedDocument?.aliasName ?? selectedDocument?.docName\" [(visible)]=\"isdialogVisible\" [modal]=\"true\"\n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\" (onHide)=\"handleCloseModal()\">\n <p-messages [(value)]=\"deleteMessage\" [enableService]=\"false\" [closable]=\"false\" />\n <ng-template pTemplate=\"header\">\n <div class=\"inline-flex align-items-center justify-content-center gap-2\">\n <!-- Show alias name and document name when available -->\n <div *ngIf=\"!isEditingDocumentName && aliasName\" \n class=\"document-name-display clickable-doc-name\"\n (click)=\"onDocumentNameClick()\"\n title=\"Click to edit document name\">\n <div class=\"alias-name\">\n {{ selectedDocument?.aliasName }}\n <i class=\"pi pi-pencil edit-icon-small\"></i>\n </div>\n <div class=\"document-name\">{{ selectedDocument?.docName }}</div>\n </div>\n <span \n *ngIf=\"!isEditingDocumentName && !aliasName\" \n class=\"font-bold white-space-nowrap clickable-doc-name\"\n (click)=\"onDocumentNameClick()\"\n title=\"Click to edit document name\">\n {{selectedDocument?.docName}}\n <i class=\"pi pi-pencil edit-icon\"></i>\n </span>\n <input \n *ngIf=\"isEditingDocumentName\"\n #fileInput \n type=\"text\" \n class=\"h-3rem file-input-wrapper document-name-input\" \n pInputText \n [(ngModel)]=\"documentName\"\n (input)=\"onDocumentNameChange($event)\" \n (blur)=\"handleSaveClick()\"\n (keydown.escape)=\"cancelDocumentNameEdit()\"\n (keydown.enter)=\"handleSaveClick()\" />\n <div *ngIf=\"fileNameError\" class=\"error-message-wrapper\">\n {{ fileNameError }}\n </div>\n </div>\n </ng-template>\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\" [contextId]=\"contextId\"\n (documentStatusUpdated)=\"refreshDocumentList($event.actionType === 'delete')\">\n <ng-template pTemplate=\"header\">\n <div class=\"w-full flex align-items-center justify-content-between\">\n <input type=\"text\" class=\"w-full border-none bg-white h-3rem file-input-wrapper\" pInputText\n [(ngModel)]=\"fileName\" />\n\n </div>\n </ng-template>\n @if(selectedDocument?.status === 'Approved'){\n <ng-content></ng-content>\n }\n </document-viewer>\n </p-dialog>\n</div>\n\n<div class=\"document-categories-container\" #documentCategoriesContainer>\n <div class=\"category\" *ngFor=\"let category of documentCategories; let i = index\"\n [id]=\"'section-' + category.label.toLowerCase().replace(' ', '-')\">\n <div class=\"category-header\">\n <div class=\"category-title\">\n <h3>{{ formattedCategoryLabels[i] }}</h3>\n <p class=\"category-description\">{{ category.categoryDescription }}</p>\n </div>\n <div class=\"completion-status\">\n <p-badge \n [severity]=\"categorySeverities[i]\" \n [value]=\"categoryCompletionCounts[i] + ' Complete'\"\n class=\"completion-badge\">\n </p-badge>\n </div>\n </div>\n\n <div class=\"table-container\">\n <lib-table-primary [tableData]=\"categoryTables[i]\" [tableStyle]=\"{ 'min-width': '100%' }\"\n (rowClick)=\"handleTableRowClick($event)\" (deleteAction)=\"handleDeleteAction($event)\">\n </lib-table-primary>\n </div>\n </div>\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:.6em;opacity:.5;transition:opacity .2s ease}.document-name-display:hover .edit-icon-small{opacity:1}.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}.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-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;background-color:#f8f9fa;min-height:auto}.document-categories-container .category{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden;transition:all .3s ease}.document-categories-container .category .category-header{display:flex;justify-content:space-between;align-items:center;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef;gap:1rem}.document-categories-container .category .category-header .category-title{flex:1;min-width:0}.document-categories-container .category .category-header .category-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-categories-container .category .category-header .category-title .category-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-categories-container .category .category-header .completion-status{display:flex;align-items:center;justify-content:center;min-width:fit-content}.document-categories-container .category .category-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-categories-container .category .category-header .completion-status .completion-badge{display:flex;align-items:center;justify-content:center}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge{font-size:.75rem;font-weight:500;padding:.375rem .75rem;border-radius:6px;display:flex;align-items:center;justify-content:center;min-width:fit-content;white-space:nowrap}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-success{background-color:#d1fae5;color:#065f46;font-family:inherit;font-size:12px;padding:15px;font-weight:400}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-info{background-color:#e5e7eb;color:#000;font-family:inherit;font-size:12px;font-weight:400;padding:15px;font-style:inherit}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;padding:15px;font-size:12px;font-weight:400;font-style:inherit}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-danger{background-color:#fee2e2;color:#dc2626;font-family:inherit;font-size:12px;padding:15px;font-weight:400;font-style:inherit}.document-categories-container .category .table-container{padding:0}@keyframes highlightPulse{0%{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}50%{transform:scale(1.03);box-shadow:0 6px 25px #3b82f680}to{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}}.document-sections-container{padding:1rem;background-color:#f8f9fa;min-height:100vh}.document-sections-container .section{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden}.document-sections-container .section .section-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef}.document-sections-container .section .section-header .section-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-sections-container .section .section-header .section-title .section-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-sections-container .section .section-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge{font-size:.75rem;font-weight:500;padding:.375rem .75rem;border-radius:6px}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-success{background-color:#10b981;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-info{background-color:#3b82f6;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-warning{background-color:#f59e0b;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-danger{background-color:#ef4444;color:#fff}.document-sections-container .section .table-container{padding:0}@media (max-width: 768px){.document-categories-container,.document-sections-container{padding:.5rem}.document-categories-container .category .category-header,.document-categories-container .category .section-header,.document-categories-container .section .category-header,.document-categories-container .section .section-header,.document-sections-container .category .category-header,.document-sections-container .category .section-header,.document-sections-container .section .category-header,.document-sections-container .section .section-header{flex-direction:column;gap:1rem;align-items:stretch}.document-categories-container .category .category-header .completion-status,.document-categories-container .category .section-header .completion-status,.document-categories-container .section .category-header .completion-status,.document-categories-container .section .section-header .completion-status,.document-sections-container .category .category-header .completion-status,.document-sections-container .category .section-header .completion-status,.document-sections-container .section .category-header .completion-status,.document-sections-container .section .section-header .completion-status{align-self:center;width:100%;justify-content:center}}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "component", type: i9$2.Badge, selector: "p-badge", inputs: ["styleClass", "style", "badgeSize", "severity", "value", "badgeDisabled", "size"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.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: i12$1.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"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
7413
|
+
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 [header]=\"selectedDocument?.aliasName ?? selectedDocument?.docName\" [(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 <ng-template pTemplate=\"header\">\r\n <div class=\"inline-flex align-items-center justify-content-center gap-2\">\r\n <!-- Show alias name and document name when available -->\r\n <div *ngIf=\"!isEditingDocumentName && aliasName\" \r\n class=\"document-name-display clickable-doc-name\"\r\n (click)=\"onDocumentNameClick()\"\r\n title=\"Click to edit document name\">\r\n <div class=\"alias-name\">\r\n {{ selectedDocument?.aliasName }}\r\n <i class=\"pi pi-pencil edit-icon-small\"></i>\r\n </div>\r\n <div class=\"document-name\">{{ selectedDocument?.docName }}</div>\r\n </div>\r\n <span \r\n *ngIf=\"!isEditingDocumentName && !aliasName\" \r\n class=\"font-bold white-space-nowrap clickable-doc-name\"\r\n (click)=\"onDocumentNameClick()\"\r\n title=\"Click to edit document name\">\r\n {{selectedDocument?.docName}}\r\n <i class=\"pi pi-pencil edit-icon\"></i>\r\n </span>\r\n <input \r\n *ngIf=\"isEditingDocumentName\"\r\n #fileInput \r\n type=\"text\" \r\n class=\"h-3rem file-input-wrapper document-name-input\" \r\n pInputText \r\n [(ngModel)]=\"documentName\"\r\n (input)=\"onDocumentNameChange($event)\" \r\n (blur)=\"handleSaveClick()\"\r\n (keydown.escape)=\"cancelDocumentNameEdit()\"\r\n (keydown.enter)=\"handleSaveClick()\" />\r\n <div *ngIf=\"fileNameError\" class=\"error-message-wrapper\">\r\n {{ fileNameError }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\" [contextId]=\"contextId\"\r\n (documentStatusUpdated)=\"refreshDocumentList($event.actionType === 'delete')\">\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]=\"'section-' + category.label.toLowerCase().replace(' ', '-')\">\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:.6em;opacity:.5;transition:opacity .2s ease}.document-name-display:hover .edit-icon-small{opacity:1}.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}.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-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;background-color:#f8f9fa;min-height:auto}.document-categories-container .category{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden;transition:all .3s ease}.document-categories-container .category .category-header{display:flex;justify-content:space-between;align-items:center;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef;gap:1rem}.document-categories-container .category .category-header .category-title{flex:1;min-width:0}.document-categories-container .category .category-header .category-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-categories-container .category .category-header .category-title .category-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-categories-container .category .category-header .completion-status{display:flex;align-items:center;justify-content:center;min-width:fit-content}.document-categories-container .category .category-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-categories-container .category .category-header .completion-status .completion-badge{display:flex;align-items:center;justify-content:center}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge{font-size:.75rem;font-weight:500;padding:.375rem .75rem;border-radius:6px;display:flex;align-items:center;justify-content:center;min-width:fit-content;white-space:nowrap}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-success{background-color:#d1fae5;color:#065f46;font-family:inherit;font-size:12px;padding:15px;font-weight:400}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-info{background-color:#e5e7eb;color:#000;font-family:inherit;font-size:12px;font-weight:400;padding:15px;font-style:inherit}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;padding:15px;font-size:12px;font-weight:400;font-style:inherit}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-danger{background-color:#fee2e2;color:#dc2626;font-family:inherit;font-size:12px;padding:15px;font-weight:400;font-style:inherit}.document-categories-container .category .table-container{padding:0}@keyframes highlightPulse{0%{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}50%{transform:scale(1.03);box-shadow:0 6px 25px #3b82f680}to{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}}.document-sections-container{padding:1rem;background-color:#f8f9fa;min-height:100vh}.document-sections-container .section{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden}.document-sections-container .section .section-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef}.document-sections-container .section .section-header .section-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-sections-container .section .section-header .section-title .section-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-sections-container .section .section-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge{font-size:.75rem;font-weight:500;padding:.375rem .75rem;border-radius:6px}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-success{background-color:#10b981;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-info{background-color:#3b82f6;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-warning{background-color:#f59e0b;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-danger{background-color:#ef4444;color:#fff}.document-sections-container .section .table-container{padding:0}@media (max-width: 768px){.document-categories-container,.document-sections-container{padding:.5rem}.document-categories-container .category .category-header,.document-categories-container .category .section-header,.document-categories-container .section .category-header,.document-categories-container .section .section-header,.document-sections-container .category .category-header,.document-sections-container .category .section-header,.document-sections-container .section .category-header,.document-sections-container .section .section-header{flex-direction:column;gap:1rem;align-items:stretch}.document-categories-container .category .category-header .completion-status,.document-categories-container .category .section-header .completion-status,.document-categories-container .section .category-header .completion-status,.document-categories-container .section .section-header .completion-status,.document-sections-container .category .category-header .completion-status,.document-sections-container .category .section-header .completion-status,.document-sections-container .section .category-header .completion-status,.document-sections-container .section .section-header .completion-status{align-self:center;width:100%;justify-content:center}}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "component", type: i9$2.Badge, selector: "p-badge", inputs: ["styleClass", "style", "badgeSize", "severity", "value", "badgeDisabled", "size"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.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: i12$1.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"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
6682
7414
|
}
|
|
6683
7415
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListComponent, decorators: [{
|
|
6684
7416
|
type: Component,
|
|
6685
|
-
args: [{ selector: 'lib-document-list', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-viewer\">\n <p-dialog [header]=\"selectedDocument?.aliasName ?? selectedDocument?.docName\" [(visible)]=\"isdialogVisible\" [modal]=\"true\"\n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\" (onHide)=\"handleCloseModal()\">\n <p-messages [(value)]=\"deleteMessage\" [enableService]=\"false\" [closable]=\"false\" />\n <ng-template pTemplate=\"header\">\n <div class=\"inline-flex align-items-center justify-content-center gap-2\">\n <!-- Show alias name and document name when available -->\n <div *ngIf=\"!isEditingDocumentName && aliasName\" \n class=\"document-name-display clickable-doc-name\"\n (click)=\"onDocumentNameClick()\"\n title=\"Click to edit document name\">\n <div class=\"alias-name\">\n {{ selectedDocument?.aliasName }}\n <i class=\"pi pi-pencil edit-icon-small\"></i>\n </div>\n <div class=\"document-name\">{{ selectedDocument?.docName }}</div>\n </div>\n <span \n *ngIf=\"!isEditingDocumentName && !aliasName\" \n class=\"font-bold white-space-nowrap clickable-doc-name\"\n (click)=\"onDocumentNameClick()\"\n title=\"Click to edit document name\">\n {{selectedDocument?.docName}}\n <i class=\"pi pi-pencil edit-icon\"></i>\n </span>\n <input \n *ngIf=\"isEditingDocumentName\"\n #fileInput \n type=\"text\" \n class=\"h-3rem file-input-wrapper document-name-input\" \n pInputText \n [(ngModel)]=\"documentName\"\n (input)=\"onDocumentNameChange($event)\" \n (blur)=\"handleSaveClick()\"\n (keydown.escape)=\"cancelDocumentNameEdit()\"\n (keydown.enter)=\"handleSaveClick()\" />\n <div *ngIf=\"fileNameError\" class=\"error-message-wrapper\">\n {{ fileNameError }}\n </div>\n </div>\n </ng-template>\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\" [contextId]=\"contextId\"\n (documentStatusUpdated)=\"refreshDocumentList($event.actionType === 'delete')\">\n <ng-template pTemplate=\"header\">\n <div class=\"w-full flex align-items-center justify-content-between\">\n <input type=\"text\" class=\"w-full border-none bg-white h-3rem file-input-wrapper\" pInputText\n [(ngModel)]=\"fileName\" />\n\n </div>\n </ng-template>\n @if(selectedDocument?.status === 'Approved'){\n <ng-content></ng-content>\n }\n </document-viewer>\n </p-dialog>\n</div>\n\n<div class=\"document-categories-container\" #documentCategoriesContainer>\n <div class=\"category\" *ngFor=\"let category of documentCategories; let i = index\"\n [id]=\"'section-' + category.label.toLowerCase().replace(' ', '-')\">\n <div class=\"category-header\">\n <div class=\"category-title\">\n <h3>{{ formattedCategoryLabels[i] }}</h3>\n <p class=\"category-description\">{{ category.categoryDescription }}</p>\n </div>\n <div class=\"completion-status\">\n <p-badge \n [severity]=\"categorySeverities[i]\" \n [value]=\"categoryCompletionCounts[i] + ' Complete'\"\n class=\"completion-badge\">\n </p-badge>\n </div>\n </div>\n\n <div class=\"table-container\">\n <lib-table-primary [tableData]=\"categoryTables[i]\" [tableStyle]=\"{ 'min-width': '100%' }\"\n (rowClick)=\"handleTableRowClick($event)\" (deleteAction)=\"handleDeleteAction($event)\">\n </lib-table-primary>\n </div>\n </div>\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:.6em;opacity:.5;transition:opacity .2s ease}.document-name-display:hover .edit-icon-small{opacity:1}.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}.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-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;background-color:#f8f9fa;min-height:auto}.document-categories-container .category{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden;transition:all .3s ease}.document-categories-container .category .category-header{display:flex;justify-content:space-between;align-items:center;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef;gap: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"] }]
|
|
7417
|
+
args: [{ selector: 'lib-document-list', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-viewer\">\r\n <p-dialog [header]=\"selectedDocument?.aliasName ?? selectedDocument?.docName\" [(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 <ng-template pTemplate=\"header\">\r\n <div class=\"inline-flex align-items-center justify-content-center gap-2\">\r\n <!-- Show alias name and document name when available -->\r\n <div *ngIf=\"!isEditingDocumentName && aliasName\" \r\n class=\"document-name-display clickable-doc-name\"\r\n (click)=\"onDocumentNameClick()\"\r\n title=\"Click to edit document name\">\r\n <div class=\"alias-name\">\r\n {{ selectedDocument?.aliasName }}\r\n <i class=\"pi pi-pencil edit-icon-small\"></i>\r\n </div>\r\n <div class=\"document-name\">{{ selectedDocument?.docName }}</div>\r\n </div>\r\n <span \r\n *ngIf=\"!isEditingDocumentName && !aliasName\" \r\n class=\"font-bold white-space-nowrap clickable-doc-name\"\r\n (click)=\"onDocumentNameClick()\"\r\n title=\"Click to edit document name\">\r\n {{selectedDocument?.docName}}\r\n <i class=\"pi pi-pencil edit-icon\"></i>\r\n </span>\r\n <input \r\n *ngIf=\"isEditingDocumentName\"\r\n #fileInput \r\n type=\"text\" \r\n class=\"h-3rem file-input-wrapper document-name-input\" \r\n pInputText \r\n [(ngModel)]=\"documentName\"\r\n (input)=\"onDocumentNameChange($event)\" \r\n (blur)=\"handleSaveClick()\"\r\n (keydown.escape)=\"cancelDocumentNameEdit()\"\r\n (keydown.enter)=\"handleSaveClick()\" />\r\n <div *ngIf=\"fileNameError\" class=\"error-message-wrapper\">\r\n {{ fileNameError }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\" [contextId]=\"contextId\"\r\n (documentStatusUpdated)=\"refreshDocumentList($event.actionType === 'delete')\">\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]=\"'section-' + category.label.toLowerCase().replace(' ', '-')\">\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:.6em;opacity:.5;transition:opacity .2s ease}.document-name-display:hover .edit-icon-small{opacity:1}.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}.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-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;background-color:#f8f9fa;min-height:auto}.document-categories-container .category{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden;transition:all .3s ease}.document-categories-container .category .category-header{display:flex;justify-content:space-between;align-items:center;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef;gap: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"] }]
|
|
6686
7418
|
}], ctorParameters: () => [{ type: DocumentListService }, { type: DocumentHttpService }, { type: DocumentMenuService }, { type: DocumentStore }, { type: DocumentScrollService }], propDecorators: { contextId: [{
|
|
6687
7419
|
type: Input
|
|
6688
7420
|
}], documentListResponse: [{
|
|
@@ -7208,11 +7940,11 @@ class DocumentContainerComponent {
|
|
|
7208
7940
|
this.clearAllState();
|
|
7209
7941
|
}
|
|
7210
7942
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContainerComponent, deps: [{ token: DocumentHttpService }, { token: DocumentHelperService }, { token: DocumentQuery }, { token: DocumentStore }, { token: DocumentMenuService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7211
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentContainerComponent, isStandalone: false, selector: "lib-document-container", inputs: { refreshTrigger: "refreshTrigger", contextId: "contextId" }, outputs: { selectedDocument: "selectedDocument" }, viewQueries: [{ propertyName: "contentScrollContainer", first: true, predicate: ["contentScrollContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"grid m-0 flex document-container-layout\">\n <!-- Fixed Left Menu -->\n <div class=\"menu-panel col-12 md:col-2\">\n <lib-documents-menu \n [catagories]=\"catagories\" \n [applicationNumber]=\"applicationNumber\" \n [contextId]=\"contextId\"\n (menuItemSelected)=\"onMenuItemSelected($event)\">\n </lib-documents-menu>\n </div>\n \n <!-- Scrollable Right Content -->\n <div class=\"content-panel col-12 md:col-10\" #contentScrollContainer>\n <div class=\"card content-card\">\n <lib-folder-container [contextId]=\"contextId\" [userList]=\"userList\" [statusData]=\"statusData\" [categories]=\"catagories\"></lib-folder-container>\n </div>\n <div>\n <lib-document-list \n [contextId]=\"contextId\" \n [documentListResponse]=\"documentListResponse\"\n [selectedMenuItemId]=\"selectedMenuItemId\"\n [navigationInfo]=\"navigationInfo\"\n\n (handleSelectedDocument)=\"onDocumentSelected($event)\"\n >\n <ng-content></ng-content>\n </lib-document-list>\n </div>\n </div>\n <p-confirmDialog \n [style]=\"{width: '25vw'}\" \n acceptLabel=\"Yes\"\n rejectLabel=\"No\"\n appendTo=\"body\"\n acceptIcon=\"pi pi-check\"\n rejectIcon=\"pi pi-times\">\n </p-confirmDialog>\n</div>\n", styles: [".document-container-layout{display:grid;grid-template-columns:1fr;height:98vh;overflow:auto;position:relative}@media (min-width: 768px){.document-container-layout{grid-template-columns:16.6667% 1fr}}.menu-panel{background-color:#fff;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.menu-panel{position:fixed;left:0;top:0;bottom:0;width:16.6667%}}.menu-panel::-webkit-scrollbar{display:none}.content-panel{display:flex;flex-direction:column;height:98vh;overflow-y:auto;overflow-x:hidden;padding:0;position:relative;z-index:10;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.content-panel{margin-left:16.6667%}}.content-panel::-webkit-scrollbar{display:none}@media (max-width: 1024px){.menu-panel{width:240px}.content-panel{margin-left:240px}}@media (max-width: 768px){.document-container-layout{grid-template-columns:1fr}.menu-panel{position:relative;width:100%;height:200px;border-right:none;border-bottom:1px solid #e5e7eb;z-index:auto}.content-panel{margin-left:0;flex:1}}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}*{scrollbar-width:thin}body,html{height:100%}::ng-deep .p-card{overflow:visible!important}::ng-deep .p-card-body{overflow:visible!important}::ng-deep .p-dialog{z-index:9999!important}::ng-deep .p-dialog-mask{z-index:9998!important}::ng-deep .content-panel .p-card{overflow:visible!important}\n"], dependencies: [{ kind: "component", type: i6$
|
|
7943
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentContainerComponent, isStandalone: false, selector: "lib-document-container", inputs: { refreshTrigger: "refreshTrigger", contextId: "contextId" }, outputs: { selectedDocument: "selectedDocument" }, viewQueries: [{ propertyName: "contentScrollContainer", first: true, predicate: ["contentScrollContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"grid m-0 flex document-container-layout\">\r\n <!-- Fixed Left Menu -->\r\n <div class=\"menu-panel col-12 md:col-2\">\r\n <lib-documents-menu \r\n [catagories]=\"catagories\" \r\n [applicationNumber]=\"applicationNumber\" \r\n [contextId]=\"contextId\"\r\n (menuItemSelected)=\"onMenuItemSelected($event)\">\r\n </lib-documents-menu>\r\n </div>\r\n \r\n <!-- Scrollable Right Content -->\r\n <div class=\"content-panel col-12 md:col-10\" #contentScrollContainer>\r\n <div class=\"card content-card\">\r\n <lib-folder-container [contextId]=\"contextId\" [userList]=\"userList\" [statusData]=\"statusData\" [categories]=\"catagories\"></lib-folder-container>\r\n </div>\r\n <div>\r\n <lib-document-list \r\n [contextId]=\"contextId\" \r\n [documentListResponse]=\"documentListResponse\"\r\n [selectedMenuItemId]=\"selectedMenuItemId\"\r\n [navigationInfo]=\"navigationInfo\"\r\n\r\n (handleSelectedDocument)=\"onDocumentSelected($event)\"\r\n >\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n <p-confirmDialog \r\n [style]=\"{width: '25vw'}\" \r\n acceptLabel=\"Yes\"\r\n rejectLabel=\"No\"\r\n appendTo=\"body\"\r\n acceptIcon=\"pi pi-check\"\r\n rejectIcon=\"pi pi-times\">\r\n </p-confirmDialog>\r\n</div>\r\n", styles: [".document-container-layout{display:grid;grid-template-columns:1fr;height:98vh;overflow:auto;position:relative}@media (min-width: 768px){.document-container-layout{grid-template-columns:16.6667% 1fr}}.menu-panel{background-color:#fff;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.menu-panel{position:fixed;left:0;top:0;bottom:0;width:16.6667%}}.menu-panel::-webkit-scrollbar{display:none}.content-panel{display:flex;flex-direction:column;height:98vh;overflow-y:auto;overflow-x:hidden;padding:0;position:relative;z-index:10;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.content-panel{margin-left:16.6667%}}.content-panel::-webkit-scrollbar{display:none}@media (max-width: 1024px){.menu-panel{width:240px}.content-panel{margin-left:240px}}@media (max-width: 768px){.document-container-layout{grid-template-columns:1fr}.menu-panel{position:relative;width:100%;height:200px;border-right:none;border-bottom:1px solid #e5e7eb;z-index:auto}.content-panel{margin-left:0;flex:1}}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}*{scrollbar-width:thin}body,html{height:100%}::ng-deep .p-card{overflow:visible!important}::ng-deep .p-card-body{overflow:visible!important}::ng-deep .p-dialog{z-index:9999!important}::ng-deep .p-dialog-mask{z-index:9998!important}::ng-deep .content-panel .p-card{overflow:visible!important}\n"], dependencies: [{ kind: "component", type: i6$1.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }, { kind: "component", type: FolderContainerComponent, selector: "lib-folder-container", inputs: ["documentList", "folderList", "contextId", "userList", "statusData", "categories"] }, { kind: "component", type: DocumentListComponent, selector: "lib-document-list", inputs: ["contextId", "documentListResponse", "selectedMenuItemId", "navigationInfo", "documentList"], outputs: ["handleSelectedDocument"] }, { kind: "component", type: DocumentsMenuComponent, selector: "lib-documents-menu", inputs: ["catagories", "applicationNumber", "contextId"], outputs: ["menuItemSelected"] }] });
|
|
7212
7944
|
}
|
|
7213
7945
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContainerComponent, decorators: [{
|
|
7214
7946
|
type: Component,
|
|
7215
|
-
args: [{ selector: 'lib-document-container', standalone: false, template: "<div class=\"grid m-0 flex document-container-layout\">\n <!-- Fixed Left Menu -->\n <div class=\"menu-panel col-12 md:col-2\">\n <lib-documents-menu \n [catagories]=\"catagories\" \n [applicationNumber]=\"applicationNumber\" \n [contextId]=\"contextId\"\n (menuItemSelected)=\"onMenuItemSelected($event)\">\n </lib-documents-menu>\n </div>\n \n <!-- Scrollable Right Content -->\n <div class=\"content-panel col-12 md:col-10\" #contentScrollContainer>\n <div class=\"card content-card\">\n <lib-folder-container [contextId]=\"contextId\" [userList]=\"userList\" [statusData]=\"statusData\" [categories]=\"catagories\"></lib-folder-container>\n </div>\n <div>\n <lib-document-list \n [contextId]=\"contextId\" \n [documentListResponse]=\"documentListResponse\"\n [selectedMenuItemId]=\"selectedMenuItemId\"\n [navigationInfo]=\"navigationInfo\"\n\n (handleSelectedDocument)=\"onDocumentSelected($event)\"\n >\n <ng-content></ng-content>\n </lib-document-list>\n </div>\n </div>\n <p-confirmDialog \n [style]=\"{width: '25vw'}\" \n acceptLabel=\"Yes\"\n rejectLabel=\"No\"\n appendTo=\"body\"\n acceptIcon=\"pi pi-check\"\n rejectIcon=\"pi pi-times\">\n </p-confirmDialog>\n</div>\n", styles: [".document-container-layout{display:grid;grid-template-columns:1fr;height:98vh;overflow:auto;position:relative}@media (min-width: 768px){.document-container-layout{grid-template-columns:16.6667% 1fr}}.menu-panel{background-color:#fff;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.menu-panel{position:fixed;left:0;top:0;bottom:0;width:16.6667%}}.menu-panel::-webkit-scrollbar{display:none}.content-panel{display:flex;flex-direction:column;height:98vh;overflow-y:auto;overflow-x:hidden;padding:0;position:relative;z-index:10;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.content-panel{margin-left:16.6667%}}.content-panel::-webkit-scrollbar{display:none}@media (max-width: 1024px){.menu-panel{width:240px}.content-panel{margin-left:240px}}@media (max-width: 768px){.document-container-layout{grid-template-columns:1fr}.menu-panel{position:relative;width:100%;height:200px;border-right:none;border-bottom:1px solid #e5e7eb;z-index:auto}.content-panel{margin-left:0;flex:1}}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}*{scrollbar-width:thin}body,html{height:100%}::ng-deep .p-card{overflow:visible!important}::ng-deep .p-card-body{overflow:visible!important}::ng-deep .p-dialog{z-index:9999!important}::ng-deep .p-dialog-mask{z-index:9998!important}::ng-deep .content-panel .p-card{overflow:visible!important}\n"] }]
|
|
7947
|
+
args: [{ selector: 'lib-document-container', standalone: false, template: "<div class=\"grid m-0 flex document-container-layout\">\r\n <!-- Fixed Left Menu -->\r\n <div class=\"menu-panel col-12 md:col-2\">\r\n <lib-documents-menu \r\n [catagories]=\"catagories\" \r\n [applicationNumber]=\"applicationNumber\" \r\n [contextId]=\"contextId\"\r\n (menuItemSelected)=\"onMenuItemSelected($event)\">\r\n </lib-documents-menu>\r\n </div>\r\n \r\n <!-- Scrollable Right Content -->\r\n <div class=\"content-panel col-12 md:col-10\" #contentScrollContainer>\r\n <div class=\"card content-card\">\r\n <lib-folder-container [contextId]=\"contextId\" [userList]=\"userList\" [statusData]=\"statusData\" [categories]=\"catagories\"></lib-folder-container>\r\n </div>\r\n <div>\r\n <lib-document-list \r\n [contextId]=\"contextId\" \r\n [documentListResponse]=\"documentListResponse\"\r\n [selectedMenuItemId]=\"selectedMenuItemId\"\r\n [navigationInfo]=\"navigationInfo\"\r\n\r\n (handleSelectedDocument)=\"onDocumentSelected($event)\"\r\n >\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n <p-confirmDialog \r\n [style]=\"{width: '25vw'}\" \r\n acceptLabel=\"Yes\"\r\n rejectLabel=\"No\"\r\n appendTo=\"body\"\r\n acceptIcon=\"pi pi-check\"\r\n rejectIcon=\"pi pi-times\">\r\n </p-confirmDialog>\r\n</div>\r\n", styles: [".document-container-layout{display:grid;grid-template-columns:1fr;height:98vh;overflow:auto;position:relative}@media (min-width: 768px){.document-container-layout{grid-template-columns:16.6667% 1fr}}.menu-panel{background-color:#fff;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.menu-panel{position:fixed;left:0;top:0;bottom:0;width:16.6667%}}.menu-panel::-webkit-scrollbar{display:none}.content-panel{display:flex;flex-direction:column;height:98vh;overflow-y:auto;overflow-x:hidden;padding:0;position:relative;z-index:10;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.content-panel{margin-left:16.6667%}}.content-panel::-webkit-scrollbar{display:none}@media (max-width: 1024px){.menu-panel{width:240px}.content-panel{margin-left:240px}}@media (max-width: 768px){.document-container-layout{grid-template-columns:1fr}.menu-panel{position:relative;width:100%;height:200px;border-right:none;border-bottom:1px solid #e5e7eb;z-index:auto}.content-panel{margin-left:0;flex:1}}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}*{scrollbar-width:thin}body,html{height:100%}::ng-deep .p-card{overflow:visible!important}::ng-deep .p-card-body{overflow:visible!important}::ng-deep .p-dialog{z-index:9999!important}::ng-deep .p-dialog-mask{z-index:9998!important}::ng-deep .content-panel .p-card{overflow:visible!important}\n"] }]
|
|
7216
7948
|
}], ctorParameters: () => [{ type: DocumentHttpService }, { type: DocumentHelperService }, { type: DocumentQuery }, { type: DocumentStore }, { type: DocumentMenuService }], propDecorators: { refreshTrigger: [{
|
|
7217
7949
|
type: Input
|
|
7218
7950
|
}], contentScrollContainer: [{
|
|
@@ -7459,6 +8191,187 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
7459
8191
|
}]
|
|
7460
8192
|
}] });
|
|
7461
8193
|
|
|
8194
|
+
/**
|
|
8195
|
+
* Service for handling document content types and their mappings.
|
|
8196
|
+
* Supports the content types: "xlsx","xls","doc","docx","pdf","jpg","jpeg","odt","csv","png","msg","eml"
|
|
8197
|
+
* @class DocumentContentTypeService
|
|
8198
|
+
* @typedef {DocumentContentTypeService}
|
|
8199
|
+
*/
|
|
8200
|
+
class DocumentContentTypeService {
|
|
8201
|
+
/**
|
|
8202
|
+
* Mapping of file extensions to MIME types
|
|
8203
|
+
* @type {Record<string, string>}
|
|
8204
|
+
*/
|
|
8205
|
+
extensionToMimeType = {
|
|
8206
|
+
'xlsx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
8207
|
+
'xls': 'application/vnd.ms-excel',
|
|
8208
|
+
'doc': 'application/msword',
|
|
8209
|
+
'docx': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
8210
|
+
'pdf': 'application/pdf',
|
|
8211
|
+
'jpg': 'image/jpeg',
|
|
8212
|
+
'jpeg': 'image/jpeg',
|
|
8213
|
+
'odt': 'application/vnd.oasis.opendocument.text',
|
|
8214
|
+
'csv': 'text/csv',
|
|
8215
|
+
'png': 'image/png',
|
|
8216
|
+
'msg': 'application/vnd.ms-outlook',
|
|
8217
|
+
'eml': 'message/rfc822'
|
|
8218
|
+
};
|
|
8219
|
+
/**
|
|
8220
|
+
* Mapping of MIME types to file extensions
|
|
8221
|
+
* @type {Record<string, string>}
|
|
8222
|
+
*/
|
|
8223
|
+
mimeTypeToExtension = {
|
|
8224
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': 'xlsx',
|
|
8225
|
+
'application/vnd.ms-excel': 'xls',
|
|
8226
|
+
'application/msword': 'doc',
|
|
8227
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': 'docx',
|
|
8228
|
+
'application/pdf': 'pdf',
|
|
8229
|
+
'image/jpeg': 'jpg',
|
|
8230
|
+
'image/jpg': 'jpg',
|
|
8231
|
+
'application/vnd.oasis.opendocument.text': 'odt',
|
|
8232
|
+
'text/csv': 'csv',
|
|
8233
|
+
'image/png': 'png',
|
|
8234
|
+
'application/vnd.ms-outlook': 'msg',
|
|
8235
|
+
'message/rfc822': 'eml'
|
|
8236
|
+
};
|
|
8237
|
+
/**
|
|
8238
|
+
* List of all supported file extensions
|
|
8239
|
+
* @type {string[]}
|
|
8240
|
+
*/
|
|
8241
|
+
supportedExtensions = [
|
|
8242
|
+
'xlsx', 'xls', 'doc', 'docx', 'pdf', 'jpg', 'jpeg', 'odt', 'csv', 'png', 'msg', 'eml'
|
|
8243
|
+
];
|
|
8244
|
+
/**
|
|
8245
|
+
* List of all supported MIME types
|
|
8246
|
+
* @type {string[]}
|
|
8247
|
+
*/
|
|
8248
|
+
supportedMimeTypes = [
|
|
8249
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
8250
|
+
'application/vnd.ms-excel',
|
|
8251
|
+
'application/msword',
|
|
8252
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
8253
|
+
'application/pdf',
|
|
8254
|
+
'image/jpeg',
|
|
8255
|
+
'image/jpg',
|
|
8256
|
+
'application/vnd.oasis.opendocument.text',
|
|
8257
|
+
'text/csv',
|
|
8258
|
+
'image/png',
|
|
8259
|
+
'application/vnd.ms-outlook',
|
|
8260
|
+
'message/rfc822'
|
|
8261
|
+
];
|
|
8262
|
+
/**
|
|
8263
|
+
* Gets the MIME type for a given file extension
|
|
8264
|
+
* @param {string} extension - The file extension (with or without dot)
|
|
8265
|
+
* @returns {string | undefined} The MIME type or undefined if not supported
|
|
8266
|
+
*/
|
|
8267
|
+
getMimeType(extension) {
|
|
8268
|
+
const cleanExtension = extension.replace('.', '').toLowerCase();
|
|
8269
|
+
return this.extensionToMimeType[cleanExtension];
|
|
8270
|
+
}
|
|
8271
|
+
/**
|
|
8272
|
+
* Gets the file extension for a given MIME type
|
|
8273
|
+
* @param {string} mimeType - The MIME type
|
|
8274
|
+
* @returns {string | undefined} The file extension or undefined if not supported
|
|
8275
|
+
*/
|
|
8276
|
+
getExtension(mimeType) {
|
|
8277
|
+
return this.mimeTypeToExtension[mimeType];
|
|
8278
|
+
}
|
|
8279
|
+
/**
|
|
8280
|
+
* Checks if a file extension is supported
|
|
8281
|
+
* @param {string} extension - The file extension (with or without dot)
|
|
8282
|
+
* @returns {boolean} True if the extension is supported
|
|
8283
|
+
*/
|
|
8284
|
+
isExtensionSupported(extension) {
|
|
8285
|
+
const cleanExtension = extension.replace('.', '').toLowerCase();
|
|
8286
|
+
return this.supportedExtensions.includes(cleanExtension);
|
|
8287
|
+
}
|
|
8288
|
+
/**
|
|
8289
|
+
* Checks if a MIME type is supported
|
|
8290
|
+
* @param {string} mimeType - The MIME type
|
|
8291
|
+
* @returns {boolean} True if the MIME type is supported
|
|
8292
|
+
*/
|
|
8293
|
+
isMimeTypeSupported(mimeType) {
|
|
8294
|
+
return this.supportedMimeTypes.includes(mimeType);
|
|
8295
|
+
}
|
|
8296
|
+
/**
|
|
8297
|
+
* Gets the file extension from a filename
|
|
8298
|
+
* @param {string} filename - The filename
|
|
8299
|
+
* @returns {string | undefined} The file extension or undefined if no extension found
|
|
8300
|
+
*/
|
|
8301
|
+
getExtensionFromFilename(filename) {
|
|
8302
|
+
if (!filename || !filename.includes('.')) {
|
|
8303
|
+
return undefined;
|
|
8304
|
+
}
|
|
8305
|
+
const parts = filename.split('.');
|
|
8306
|
+
return parts[parts.length - 1].toLowerCase();
|
|
8307
|
+
}
|
|
8308
|
+
/**
|
|
8309
|
+
* Gets the MIME type from a filename
|
|
8310
|
+
* @param {string} filename - The filename
|
|
8311
|
+
* @returns {string | undefined} The MIME type or undefined if not supported
|
|
8312
|
+
*/
|
|
8313
|
+
getMimeTypeFromFilename(filename) {
|
|
8314
|
+
const extension = this.getExtensionFromFilename(filename);
|
|
8315
|
+
return extension ? this.getMimeType(extension) : undefined;
|
|
8316
|
+
}
|
|
8317
|
+
/**
|
|
8318
|
+
* Validates if a file can be uploaded based on its extension
|
|
8319
|
+
* @param {string} filename - The filename to validate
|
|
8320
|
+
* @returns {boolean} True if the file can be uploaded
|
|
8321
|
+
*/
|
|
8322
|
+
canUploadFile(filename) {
|
|
8323
|
+
const extension = this.getExtensionFromFilename(filename);
|
|
8324
|
+
return extension ? this.isExtensionSupported(extension) : false;
|
|
8325
|
+
}
|
|
8326
|
+
/**
|
|
8327
|
+
* Gets a human-readable description for a content type
|
|
8328
|
+
* @param {string} contentType - The content type (MIME type or extension)
|
|
8329
|
+
* @returns {string} Human-readable description
|
|
8330
|
+
*/
|
|
8331
|
+
getContentTypeDescription(contentType) {
|
|
8332
|
+
// Check if it's a MIME type first
|
|
8333
|
+
if (this.isMimeTypeSupported(contentType)) {
|
|
8334
|
+
const extension = this.getExtension(contentType);
|
|
8335
|
+
return this.getExtensionDescription(extension || 'unknown');
|
|
8336
|
+
}
|
|
8337
|
+
// Check if it's an extension
|
|
8338
|
+
if (this.isExtensionSupported(contentType)) {
|
|
8339
|
+
return this.getExtensionDescription(contentType);
|
|
8340
|
+
}
|
|
8341
|
+
return 'Unknown Document Type';
|
|
8342
|
+
}
|
|
8343
|
+
/**
|
|
8344
|
+
* Gets a human-readable description for a file extension
|
|
8345
|
+
* @param {string} extension - The file extension
|
|
8346
|
+
* @returns {string} Human-readable description
|
|
8347
|
+
*/
|
|
8348
|
+
getExtensionDescription(extension) {
|
|
8349
|
+
const descriptions = {
|
|
8350
|
+
'xlsx': 'Excel Spreadsheet (XLSX)',
|
|
8351
|
+
'xls': 'Excel Spreadsheet (XLS)',
|
|
8352
|
+
'doc': 'Word Document (DOC)',
|
|
8353
|
+
'docx': 'Word Document (DOCX)',
|
|
8354
|
+
'pdf': 'PDF Document',
|
|
8355
|
+
'jpg': 'JPEG Image',
|
|
8356
|
+
'jpeg': 'JPEG Image',
|
|
8357
|
+
'odt': 'OpenDocument Text',
|
|
8358
|
+
'csv': 'CSV File',
|
|
8359
|
+
'png': 'PNG Image',
|
|
8360
|
+
'msg': 'Outlook Message',
|
|
8361
|
+
'eml': 'Email Message'
|
|
8362
|
+
};
|
|
8363
|
+
return descriptions[extension] || 'Unknown File Type';
|
|
8364
|
+
}
|
|
8365
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContentTypeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8366
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContentTypeService, providedIn: 'root' });
|
|
8367
|
+
}
|
|
8368
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContentTypeService, decorators: [{
|
|
8369
|
+
type: Injectable,
|
|
8370
|
+
args: [{
|
|
8371
|
+
providedIn: 'root'
|
|
8372
|
+
}]
|
|
8373
|
+
}] });
|
|
8374
|
+
|
|
7462
8375
|
/**
|
|
7463
8376
|
* @module DocumentModule
|
|
7464
8377
|
*
|
|
@@ -7506,6 +8419,10 @@ class DocumentModule {
|
|
|
7506
8419
|
* A component representing document history timeline.
|
|
7507
8420
|
*/
|
|
7508
8421
|
DocumentHistoryComponent,
|
|
8422
|
+
/**
|
|
8423
|
+
* A reusable component for viewing different types of document content.
|
|
8424
|
+
*/
|
|
8425
|
+
DocumentContentViewerComponent,
|
|
7509
8426
|
/**
|
|
7510
8427
|
* A directive to show the document.
|
|
7511
8428
|
*/
|
|
@@ -7532,7 +8449,7 @@ class DocumentModule {
|
|
|
7532
8449
|
*/
|
|
7533
8450
|
AccordionModule,
|
|
7534
8451
|
/**
|
|
7535
|
-
*
|
|
8452
|
+
* HttpClientModule for the http calls
|
|
7536
8453
|
*/
|
|
7537
8454
|
HttpClientModule,
|
|
7538
8455
|
/**
|
|
@@ -7583,6 +8500,10 @@ class DocumentModule {
|
|
|
7583
8500
|
* PdfViewerModule to handle and make visible the pdf.
|
|
7584
8501
|
*/
|
|
7585
8502
|
PdfViewerModule,
|
|
8503
|
+
/**
|
|
8504
|
+
* NgxDocViewerModule to handle and make visible Office documents.
|
|
8505
|
+
*/
|
|
8506
|
+
NgxDocViewerModule,
|
|
7586
8507
|
/**
|
|
7587
8508
|
* PrimeNG DialogModule is used for showing dialog.
|
|
7588
8509
|
*/
|
|
@@ -7613,6 +8534,10 @@ class DocumentModule {
|
|
|
7613
8534
|
* Exports the `DocumentViewerComponent` to be used in other modules.
|
|
7614
8535
|
*/
|
|
7615
8536
|
DocumentViewerComponent,
|
|
8537
|
+
/**
|
|
8538
|
+
* Exports the `DocumentContentViewerComponent` to be used in other modules.
|
|
8539
|
+
*/
|
|
8540
|
+
DocumentContentViewerComponent,
|
|
7616
8541
|
/**
|
|
7617
8542
|
* Exports the `DocumentActionsComponent` to be used in other modules.
|
|
7618
8543
|
*/
|
|
@@ -7643,6 +8568,10 @@ class DocumentModule {
|
|
|
7643
8568
|
* Provide the DocumentActionsService to be used in other components.
|
|
7644
8569
|
*/
|
|
7645
8570
|
DocumentActionsService,
|
|
8571
|
+
/**
|
|
8572
|
+
* Provide the DocumentContentTypeService to be used in other components.
|
|
8573
|
+
*/
|
|
8574
|
+
DocumentContentTypeService,
|
|
7646
8575
|
/**
|
|
7647
8576
|
* Provide the ConfirmationService to be used in other components.
|
|
7648
8577
|
*/
|
|
@@ -7683,7 +8612,7 @@ class DocumentModule {
|
|
|
7683
8612
|
*/
|
|
7684
8613
|
AccordionModule,
|
|
7685
8614
|
/**
|
|
7686
|
-
*
|
|
8615
|
+
* HttpClientModule for the http calls
|
|
7687
8616
|
*/
|
|
7688
8617
|
HttpClientModule,
|
|
7689
8618
|
/**
|
|
@@ -7734,6 +8663,10 @@ class DocumentModule {
|
|
|
7734
8663
|
* PdfViewerModule to handle and make visible the pdf.
|
|
7735
8664
|
*/
|
|
7736
8665
|
PdfViewerModule,
|
|
8666
|
+
/**
|
|
8667
|
+
* NgxDocViewerModule to handle and make visible Office documents.
|
|
8668
|
+
*/
|
|
8669
|
+
NgxDocViewerModule,
|
|
7737
8670
|
/**
|
|
7738
8671
|
* PrimeNG DialogModule is used for showing dialog.
|
|
7739
8672
|
*/
|
|
@@ -7798,6 +8731,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
7798
8731
|
* A component representing document history timeline.
|
|
7799
8732
|
*/
|
|
7800
8733
|
DocumentHistoryComponent,
|
|
8734
|
+
/**
|
|
8735
|
+
* A reusable component for viewing different types of document content.
|
|
8736
|
+
*/
|
|
8737
|
+
DocumentContentViewerComponent,
|
|
7801
8738
|
/**
|
|
7802
8739
|
* A directive to show the document.
|
|
7803
8740
|
*/
|
|
@@ -7826,7 +8763,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
7826
8763
|
*/
|
|
7827
8764
|
AccordionModule,
|
|
7828
8765
|
/**
|
|
7829
|
-
*
|
|
8766
|
+
* HttpClientModule for the http calls
|
|
7830
8767
|
*/
|
|
7831
8768
|
HttpClientModule,
|
|
7832
8769
|
/**
|
|
@@ -7877,6 +8814,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
7877
8814
|
* PdfViewerModule to handle and make visible the pdf.
|
|
7878
8815
|
*/
|
|
7879
8816
|
PdfViewerModule,
|
|
8817
|
+
/**
|
|
8818
|
+
* NgxDocViewerModule to handle and make visible Office documents.
|
|
8819
|
+
*/
|
|
8820
|
+
NgxDocViewerModule,
|
|
7880
8821
|
/**
|
|
7881
8822
|
* PrimeNG DialogModule is used for showing dialog.
|
|
7882
8823
|
*/
|
|
@@ -7909,6 +8850,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
7909
8850
|
* Exports the `DocumentViewerComponent` to be used in other modules.
|
|
7910
8851
|
*/
|
|
7911
8852
|
DocumentViewerComponent,
|
|
8853
|
+
/**
|
|
8854
|
+
* Exports the `DocumentContentViewerComponent` to be used in other modules.
|
|
8855
|
+
*/
|
|
8856
|
+
DocumentContentViewerComponent,
|
|
7912
8857
|
/**
|
|
7913
8858
|
* Exports the `DocumentActionsComponent` to be used in other modules.
|
|
7914
8859
|
*/
|
|
@@ -7940,6 +8885,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
7940
8885
|
* Provide the DocumentActionsService to be used in other components.
|
|
7941
8886
|
*/
|
|
7942
8887
|
DocumentActionsService,
|
|
8888
|
+
/**
|
|
8889
|
+
* Provide the DocumentContentTypeService to be used in other components.
|
|
8890
|
+
*/
|
|
8891
|
+
DocumentContentTypeService,
|
|
7943
8892
|
/**
|
|
7944
8893
|
* Provide the ConfirmationService to be used in other components.
|
|
7945
8894
|
*/
|
|
@@ -7982,5 +8931,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
7982
8931
|
* Generated bundle index. Do not edit.
|
|
7983
8932
|
*/
|
|
7984
8933
|
|
|
7985
|
-
export { COUNTRIES, ConfirmationDialogComponent, DOCUMENTTYPES, DUMMYDOCUMENTLIST, DUMMYSUMMARY, DUMMY_DOCUMENT_SECTIONS, DocumentActionsComponent, DocumentAlertList, DocumentContainerComponent, DocumentDirective, DocumentHistoryComponent, DocumentListComponent, DocumentModule, DocumentSearchComponent, DocumentTableBuilderService, DocumentViewerComponent, HasPermissionDirective, SAMPLE_STATUS_DATA, SHARED, SUPPORTED_IMAGE_TYPES, SharedModule, SidebarComponent, TablePrimaryComponent, USERLIST };
|
|
8934
|
+
export { COUNTRIES, ConfirmationDialogComponent, DOCUMENTTYPES, DUMMYDOCUMENTLIST, DUMMYSUMMARY, DUMMY_DOCUMENT_SECTIONS, DocumentActionsComponent, DocumentAlertList, DocumentContainerComponent, DocumentContentTypeService, DocumentContentViewerComponent, DocumentDirective, DocumentHistoryComponent, DocumentListComponent, DocumentModule, DocumentSearchComponent, DocumentTableBuilderService, DocumentViewerComponent, HasPermissionDirective, SAMPLE_STATUS_DATA, SHARED, SUPPORTED_IMAGE_TYPES, SharedModule, SidebarComponent, TablePrimaryComponent, USERLIST };
|
|
7986
8935
|
//# sourceMappingURL=cat-documents-ng.mjs.map
|