cat-documents-ng 1.0.34 → 1.0.36
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 +7 -0
- package/Shared/constant/URLS.d.ts +7 -0
- package/Shared/services/app-config.service.d.ts +6 -0
- package/fesm2022/cat-documents-ng.mjs +68 -5
- package/fesm2022/cat-documents-ng.mjs.map +1 -1
- package/lib/document/components/document-history/document-history.component.d.ts +17 -2
- package/lib/document/services/document-http.service.d.ts +6 -0
- package/package.json +1 -1
|
@@ -198,6 +198,13 @@ export declare class SHARED {
|
|
|
198
198
|
* @type {string}
|
|
199
199
|
*/
|
|
200
200
|
static DOCUMENT: string;
|
|
201
|
+
/**
|
|
202
|
+
* Config `name` for documents AI chat (Configs API). When `data.enabled` is true, the AI control and sidebar show.
|
|
203
|
+
* Matches the host app pattern used for `document` tab and `mortgageChatbot` visibility.
|
|
204
|
+
* @static
|
|
205
|
+
* @type {string}
|
|
206
|
+
*/
|
|
207
|
+
static DOCUMENT_CHATBOT: string;
|
|
201
208
|
/**
|
|
202
209
|
* Represent none.
|
|
203
210
|
* @static
|
|
@@ -12,6 +12,13 @@ export declare class URLS {
|
|
|
12
12
|
* @type {string}
|
|
13
13
|
*/
|
|
14
14
|
static CONFIGFILEURL: string;
|
|
15
|
+
/**
|
|
16
|
+
* QW Configs collection path (same as host `getApiConfig` / `RecordService`).
|
|
17
|
+
* Full URL: `{catQwUrl}{CONFIGS}`.
|
|
18
|
+
* @static
|
|
19
|
+
* @type {string}
|
|
20
|
+
*/
|
|
21
|
+
static CONFIGS: string;
|
|
15
22
|
/**
|
|
16
23
|
* The URL endpoint for document uploads.
|
|
17
24
|
* Used to send documents to the server for storage or processing.
|
|
@@ -34,6 +34,12 @@ export declare class AppConfigService {
|
|
|
34
34
|
* @type {*}
|
|
35
35
|
*/
|
|
36
36
|
get apiBaseUrl(): any;
|
|
37
|
+
/**
|
|
38
|
+
* QW API base URL (typically ends with `/api/`), used for Configs and other QW endpoints.
|
|
39
|
+
* @readonly
|
|
40
|
+
* @type {string | undefined}
|
|
41
|
+
*/
|
|
42
|
+
get catQwUrl(): string | undefined;
|
|
37
43
|
/**
|
|
38
44
|
* Returns the local server API URL from the loaded configuration.
|
|
39
45
|
* @readonly
|
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Injectable, EventEmitter, Output, ViewChild, Input, ViewEncapsulation, Component, ChangeDetectionStrategy, HostListener, Directive, NgModule, APP_INITIALIZER, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
3
3
|
import * as i6 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { firstValueFrom,
|
|
5
|
+
import { firstValueFrom, of, catchError, throwError, EMPTY, tap, combineLatest, Subject, Observable, takeUntil, Subscription, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1, BehaviorSubject } from 'rxjs';
|
|
6
6
|
import * as i2 from '@angular/common/http';
|
|
7
7
|
import { HttpParams, HttpClientModule, HttpHeaders } from '@angular/common/http';
|
|
8
8
|
import { __decorate } from 'tslib';
|
|
@@ -261,6 +261,13 @@ class SHARED {
|
|
|
261
261
|
* @type {string}
|
|
262
262
|
*/
|
|
263
263
|
static DOCUMENT = 'document';
|
|
264
|
+
/**
|
|
265
|
+
* Config `name` for documents AI chat (Configs API). When `data.enabled` is true, the AI control and sidebar show.
|
|
266
|
+
* Matches the host app pattern used for `document` tab and `mortgageChatbot` visibility.
|
|
267
|
+
* @static
|
|
268
|
+
* @type {string}
|
|
269
|
+
*/
|
|
270
|
+
static DOCUMENT_CHATBOT = 'docIntelligence';
|
|
264
271
|
/**
|
|
265
272
|
* Represent none.
|
|
266
273
|
* @static
|
|
@@ -1000,6 +1007,13 @@ class URLS {
|
|
|
1000
1007
|
* @type {string}
|
|
1001
1008
|
*/
|
|
1002
1009
|
static CONFIGFILEURL = "assets/config/api.config.json";
|
|
1010
|
+
/**
|
|
1011
|
+
* QW Configs collection path (same as host `getApiConfig` / `RecordService`).
|
|
1012
|
+
* Full URL: `{catQwUrl}{CONFIGS}`.
|
|
1013
|
+
* @static
|
|
1014
|
+
* @type {string}
|
|
1015
|
+
*/
|
|
1016
|
+
static CONFIGS = 'Configs';
|
|
1003
1017
|
/**
|
|
1004
1018
|
* The URL endpoint for document uploads.
|
|
1005
1019
|
* Used to send documents to the server for storage or processing.
|
|
@@ -1363,6 +1377,14 @@ class AppConfigService {
|
|
|
1363
1377
|
get apiBaseUrl() {
|
|
1364
1378
|
return this.appConfig?.documentApiUrl;
|
|
1365
1379
|
}
|
|
1380
|
+
/**
|
|
1381
|
+
* QW API base URL (typically ends with `/api/`), used for Configs and other QW endpoints.
|
|
1382
|
+
* @readonly
|
|
1383
|
+
* @type {string | undefined}
|
|
1384
|
+
*/
|
|
1385
|
+
get catQwUrl() {
|
|
1386
|
+
return this.appConfig?.catQwUrl;
|
|
1387
|
+
}
|
|
1366
1388
|
/**
|
|
1367
1389
|
* Returns the local server API URL from the loaded configuration.
|
|
1368
1390
|
* @readonly
|
|
@@ -1426,6 +1448,19 @@ class DocumentHttpService {
|
|
|
1426
1448
|
get apiUrl() {
|
|
1427
1449
|
return this.appConfigService.apiBaseUrl;
|
|
1428
1450
|
}
|
|
1451
|
+
/**
|
|
1452
|
+
* Fetches application Configs from QW (`catQwUrl` + `Configs`), same shape as host `getApiConfig`.
|
|
1453
|
+
* Used for feature flags such as `SHARED.DOCUMENT_CHATBOT` with `data.enabled`.
|
|
1454
|
+
* @returns {Observable<any[]>} Config rows or empty array if URL missing or request fails.
|
|
1455
|
+
*/
|
|
1456
|
+
getAppConfigs() {
|
|
1457
|
+
const qw = this.appConfigService.catQwUrl;
|
|
1458
|
+
if (!qw) {
|
|
1459
|
+
return of([]);
|
|
1460
|
+
}
|
|
1461
|
+
const base = qw.endsWith('/') ? qw : `${qw}/`;
|
|
1462
|
+
return this.http.get(`${base}${URLS.CONFIGS}`).pipe(catchError(() => of([])));
|
|
1463
|
+
}
|
|
1429
1464
|
/**
|
|
1430
1465
|
* Returns base URL for document intelligence APIs.
|
|
1431
1466
|
* @returns {string} Base URL for AI endpoints.
|
|
@@ -7085,6 +7120,7 @@ class DocumentHistoryComponent {
|
|
|
7085
7120
|
* Set false to hide document intelligence UI (default off until enabled).
|
|
7086
7121
|
*/
|
|
7087
7122
|
isDocumentIntelligence = true;
|
|
7123
|
+
isDocumentAiFeatureEnabled = false;
|
|
7088
7124
|
/**
|
|
7089
7125
|
* Event emitted when delete task is requested
|
|
7090
7126
|
*/
|
|
@@ -7109,6 +7145,14 @@ class DocumentHistoryComponent {
|
|
|
7109
7145
|
* Whether the actions dropdown menu is visible
|
|
7110
7146
|
*/
|
|
7111
7147
|
showActionsMenu = false;
|
|
7148
|
+
destroy$ = new Subject();
|
|
7149
|
+
/**
|
|
7150
|
+
* Combines local input control and remote feature flag control.
|
|
7151
|
+
* @returns {boolean} True when AI menu/sidebar should be visible.
|
|
7152
|
+
*/
|
|
7153
|
+
get showDocumentAiUi() {
|
|
7154
|
+
return Boolean(this.isDocumentIntelligence && this.isDocumentAiFeatureEnabled);
|
|
7155
|
+
}
|
|
7112
7156
|
constructor(documentHistoryService, documentViewerService, documentActionsService, confirmationService, documentHttpService, documentHistoryAiService) {
|
|
7113
7157
|
this.documentHistoryService = documentHistoryService;
|
|
7114
7158
|
this.documentViewerService = documentViewerService;
|
|
@@ -7117,6 +7161,18 @@ class DocumentHistoryComponent {
|
|
|
7117
7161
|
this.documentHttpService = documentHttpService;
|
|
7118
7162
|
this.documentHistoryAiService = documentHistoryAiService;
|
|
7119
7163
|
}
|
|
7164
|
+
/**
|
|
7165
|
+
* Reads Configs and enables AI only when `docIntelligence.data.enabled` is true.
|
|
7166
|
+
*/
|
|
7167
|
+
ngOnInit() {
|
|
7168
|
+
this.documentHttpService
|
|
7169
|
+
.getAppConfigs()
|
|
7170
|
+
.pipe(takeUntil(this.destroy$))
|
|
7171
|
+
.subscribe((configs) => {
|
|
7172
|
+
const docIntelligenceConfig = configs?.find((item) => item?.name === SHARED.DOCUMENT_CHATBOT);
|
|
7173
|
+
this.isDocumentAiFeatureEnabled = Boolean(docIntelligenceConfig?.data?.enabled);
|
|
7174
|
+
});
|
|
7175
|
+
}
|
|
7120
7176
|
/**
|
|
7121
7177
|
* Handles changes to input properties
|
|
7122
7178
|
* @param {SimpleChanges} changes - Changed input values.
|
|
@@ -7248,7 +7304,7 @@ class DocumentHistoryComponent {
|
|
|
7248
7304
|
* @param {'Query'} section - AI section (Query only).
|
|
7249
7305
|
*/
|
|
7250
7306
|
openAiPanel(section) {
|
|
7251
|
-
if (!this.
|
|
7307
|
+
if (!this.showDocumentAiUi)
|
|
7252
7308
|
return;
|
|
7253
7309
|
this.documentHistoryAiService.openAiPanel(section, this.selectedDocument);
|
|
7254
7310
|
}
|
|
@@ -7422,19 +7478,26 @@ class DocumentHistoryComponent {
|
|
|
7422
7478
|
this.closeActionsMenu();
|
|
7423
7479
|
}
|
|
7424
7480
|
}
|
|
7425
|
-
if (this.
|
|
7481
|
+
if (this.showDocumentAiUi && this.documentHistoryAiService.state.showAiMenu) {
|
|
7426
7482
|
const aiMenu = target.closest('.ai-menu');
|
|
7427
7483
|
if (!aiMenu) {
|
|
7428
7484
|
this.documentHistoryAiService.closeAiMenu();
|
|
7429
7485
|
}
|
|
7430
7486
|
}
|
|
7431
7487
|
}
|
|
7488
|
+
/**
|
|
7489
|
+
* Cleans up subscriptions.
|
|
7490
|
+
*/
|
|
7491
|
+
ngOnDestroy() {
|
|
7492
|
+
this.destroy$.next();
|
|
7493
|
+
this.destroy$.complete();
|
|
7494
|
+
}
|
|
7432
7495
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryComponent, deps: [{ token: DocumentHistoryService }, { token: DocumentViewerService }, { token: DocumentActionsService }, { token: i3.ConfirmationService }, { token: DocumentHttpService }, { token: DocumentHistoryAiService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7433
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentHistoryComponent, isStandalone: false, selector: "document-history", inputs: { historyData: "historyData", showHistory: "showHistory", contextId: "contextId", selectedDocument: "selectedDocument", isDocumentIntelligence: "isDocumentIntelligence" }, outputs: { deleteTaskRequested: "deleteTaskRequested", documentSelected: "documentSelected" }, host: { listeners: { "document:click": "onDocumentClickOutside($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-review-container\" *ngIf=\"showHistory && historyData.length > 0\">\n <!-- Header Section -->\n <div class=\"review-header\">\n <div class=\"review-title-section\">\n <h2 class=\"review-title\">Document Review</h2>\n <div class=\"ai-menu\" *ngIf=\"isDocumentIntelligence\">\n <button class=\"ai-btn\" (click)=\"documentHistoryAiService.toggleAiMenu()\" [class.active]=\"documentHistoryAiService.state.showAiMenu\">\n <i class=\"pi pi-sparkles\"></i>\n <span>AI</span>\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"documentHistoryAiService.state.showAiMenu\"></i>\n </button>\n <div class=\"ai-dropdown\" *ngIf=\"documentHistoryAiService.state.showAiMenu\" (click)=\"$event.stopPropagation()\">\n <button type=\"button\" class=\"ai-dropdown-item\" (click)=\"openAiPanel('Query')\">Query</button>\n </div>\n </div>\n </div>\n <!-- <div class=\"actions-menu\" *ngIf=\"selectedDocument?.isUploaded || selectedDocument?.status == 'Approved'\"> -->\n <!-- <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.isUploaded || selectedDocument?.status == 'Approved') && !selectedDocument?.isSystemDocument\"> -->\n <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.status !== 'Approved') && (!selectedDocument?.isSystemDocument)\">\n <button class=\"actions-btn\" (click)=\"toggleActionsMenu()\" [class.active]=\"showActionsMenu\">\n Actions\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\n </button>\n\n <!-- Actions Dropdown Menu -->\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\" (click)=\"$event.stopPropagation()\">\n <div class=\"dropdown-item\" *ngIf=\"selectedDocument?.status == 'Approved' || selectedDocument?.isUploaded || selectedDocument?.status == 'Uploaded'\">\n <ng-content [select]=\"'action-launcher'\"></ng-content>\n </div>\n <div *ngIf=\"selectedDocument?.status == 'Uploaded' || selectedDocument?.status === 'Rejected' || selectedDocument?.status === 'Reviewing' || selectedDocument?.status === 'Pending'\" [permission]=\"'documents-deleteDocumentByDocumentId'\" class=\"dropdown-item\" (click)=\"onDeleteTask()\">\n <span>Delete Document</span>\n </div>\n </div>\n\n </div>\n </div>\n\n <!-- Document Actions Component - Below Header -->\n <div class=\"document-actions-section\">\n <ng-content select=\"[actions-component]\"></ng-content>\n </div>\n\n\n <!-- Alerts Section -->\n <!-- <div class=\"alerts-section\">\n <div class=\"alert-card\">\n <div class=\"alert-header\">\n <i class=\"pi pi-exclamation-triangle alert-icon\"></i>\n <span class=\"alert-text\">Alerts</span>\n <div class=\"alert-badge\">\n <span class=\"alert-count\">{{ getAlertCount() }}</span>\n <i class=\"pi pi-chevron-right\"></i>\n </div>\n </div>\n </div>\n </div> -->\n\n <!-- Timeline Section -->\n <div class=\"timeline-section\">\n <h3 class=\"timeline-title\">Timeline</h3>\n <div class=\"timeline-container\">\n <div class=\"timeline-item\" *ngFor=\"let section of processedHistoryData\">\n <ng-container *ngFor=\"let item of section.list; let i = index\">\n <div class=\"timeline-event mb-2\" *ngIf=\"!item.shouldHide\">\n <div class=\"event-card\" [ngClass]=\"item.eventCardClass\">\n <!-- Event Header -->\n <div class=\"event-header\">\n <div class=\"event-info\">\n <i [class]=\"item.eventIcon\"></i>\n <span class=\"event-label\">{{ item.label }}</span>\n </div>\n <div class=\"event-timestamp\">{{ item.dateTime }}</div>\n </div>\n <!-- User Information -->\n <div class=\"event-user mb-2\">\n <span class=\"user-name\">{{ item.userName }}</span>\n <span class=\"user-role\">({{ item.userRole }})</span>\n </div>\n <!-- Event Description -->\n <div class=\"event-description\" *ngIf=\"item.requestDescription\">\n <ul class=\"event-description-list\" *ngIf=\"item.label.toLowerCase().includes('requested')\">\n <li class=\"event-description-item\">{{ item.requestDescription }}</li>\n </ul>\n <p *ngIf=\"!item.label.toLowerCase().includes('requested')\">{{ item.requestDescription }}</p>\n </div>\n\n <!-- Document Upload Cards -->\n <div class=\"document-uploads\" *ngIf=\"item.documentList && item.documentList.length > 0\">\n <div class=\"uploaded-documents\">\n <div class=\"document-card\" *ngFor=\"let doc of item.documentList\" (click)=\"onDocumentClick(doc)\">\n <div class=\"document-icon\">\n <i class=\"pi pi-file\"></i>\n </div>\n <span class=\"document-name\">{{ doc.docName }}</span>\n </div>\n </div>\n </div>\n\n\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n\n <!-- <ng-content [select]=\"'actions-component'\"></ng-content> -->\n</div>\n\n<p-sidebar *ngIf=\"isDocumentIntelligence\" [(visible)]=\"documentHistoryAiService.state.showAiSidebar\" position=\"right\"\n [style]=\"{ width: '420px' }\" styleClass=\"ai-chat-sidebar\" [dismissible]=\"true\" [showCloseIcon]=\"false\"\n [showHeader]=\"false\" [appendTo]=\"'body'\">\n\n <div class=\"ai-sidebar-content\">\n <document-ai-chat [selectedDocument]=\"selectedDocument\"></document-ai-chat>\n </div>\n</p-sidebar>", styles: [".document-review-container{border-radius:8px;max-height:100%;overflow-y:auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.document-review-container .review-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:1rem;border-bottom:1px solid #e5e7eb}.document-review-container .review-header .review-title-section{display:flex;align-items:center;gap:.75rem}.document-review-container .review-header .review-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin:0}.document-review-container .review-header .ai-menu{position:relative}.document-review-container .review-header .ai-menu .ai-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 .85rem;color:#374151;font-size:.875rem;height:40px;line-height:1;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .ai-menu .ai-btn:hover{background:#f9fafb}.document-review-container .review-header .ai-menu .ai-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .ai-menu .ai-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .ai-menu .ai-btn i.rotated{transform:rotate(180deg)}.document-review-container .review-header .ai-menu .ai-dropdown{position:absolute;top:100%;left:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:160px;margin-top:.25rem;padding:.25rem 0}.document-review-container .review-header .ai-menu .ai-dropdown .ai-dropdown-item{width:100%;text-align:left;border:none;background:transparent;padding:.625rem .875rem;cursor:pointer;color:#374151;font-size:.875rem}.document-review-container .review-header .ai-menu .ai-dropdown .ai-dropdown-item:hover{background:#f9fafb}.document-review-container .review-header .actions-menu{position:relative}.document-review-container .review-header .actions-menu .actions-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 1rem;height:40px;line-height:1;color:#374151;font-size:.875rem;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .actions-menu .actions-btn:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .actions-menu .actions-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu .actions-btn i.rotated{transform:rotate(180deg)}.document-review-container .review-header .actions-menu .actions-dropdown{position:absolute;top:100%;right:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:180px;margin-top:.25rem}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item{padding:.75rem 1rem;cursor:pointer;color:#374151;font-size:.875rem;border-bottom:1px solid #f3f4f6;transition:background-color .2s}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:last-child{border-bottom:none;border-radius:0 0 8px 8px}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:first-child{border-radius:8px 8px 0 0}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item span{display:block}.document-review-container ::ng-deep document-actions{margin-bottom:1.5rem}.document-review-container ::ng-deep document-actions .actions-card{margin:0;width:100%}.document-review-container .document-actions-section{padding:1rem 0}.document-review-container .alerts-section{margin-bottom:2rem}.document-review-container .alerts-section .alert-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1rem}.document-review-container .alerts-section .alert-card .alert-header{display:flex;align-items:center;gap:.75rem}.document-review-container .alerts-section .alert-card .alert-header .alert-icon{color:#ef4444;font-size:1.25rem}.document-review-container .alerts-section .alert-card .alert-header .alert-text{font-weight:500;color:#1f2937;font-size:1rem}.document-review-container .alerts-section .alert-card .alert-header .alert-badge{margin-left:auto;display:flex;align-items:center;gap:.5rem;background:#ef4444;color:#fff;border-radius:50%;width:24px;height:24px;justify-content:center;position:relative}.document-review-container .alerts-section .alert-card .alert-header .alert-badge .alert-count{font-size:.75rem;font-weight:600}.document-review-container .alerts-section .alert-card .alert-header .alert-badge i{position:absolute;right:-8px;font-size:.75rem;color:#ef4444;background:#fff;border-radius:50%;width:16px;height:16px;display:flex;align-items:center;justify-content:center}.document-review-container .timeline-section .timeline-title{font-size:1.25rem;font-weight:600;color:#1f2937;margin:0 0 1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item{margin-bottom:1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1.25rem;position:relative}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info{display:flex;align-items:center;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon{width:25px;height:25px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon i{font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-requested{background:#3b82f6}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-accepted{background:#10b981}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-rejected{background:#ef4444}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-default{background:#6b7280}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-label{font-weight:600;color:#1f2937;font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{color:#6b7280;font-size:.875rem;font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description p{color:#374151;line-height:1.5;margin:0;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents{display:flex;flex-direction:column;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:.5rem;display:flex;align-items:center;gap:.75rem;cursor:pointer;transition:all .2s ease}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:hover{background:#e2e8f0;border-color:#3b82f6;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:active{transform:translateY(0);box-shadow:0 1px 2px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-icon{color:#3b82f6;font-size:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-name{color:#1f2937;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user{font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-name{color:rgb(75,85,99,var(--tw-text-opacity, 1));font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-role{color:#6b7280;margin-left:.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-requested{background:#dbeafe;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-accepted{background:#dcfce7;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-rejected{background:#fee2e2;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-default{border-left:4px solid #6b7280}@media (max-width: 768px){.document-review-container{padding:1rem}.document-review-container .review-header{flex-direction:column;gap:1rem;align-items:flex-start}.document-review-container .review-header .actions-menu{align-self:flex-end}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{flex-direction:column;align-items:flex-start;gap:.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{align-self:flex-end}}.ai-sidebar-title{margin:0;font-size:1.1rem;font-weight:600;color:#111827}.ai-sidebar-content{flex:1;display:flex;flex-direction:column;height:100%;padding:0}::ng-deep .ai-chat-sidebar .p-sidebar-header{display:none!important;padding:0!important}::ng-deep .ai-chat-sidebar .p-sidebar-content{padding:0!important;display:flex;flex-direction:column}.ai-sidebar-text{margin:0;color:#4b5563;font-size:.95rem;line-height:1.5;white-space:pre-wrap}.ai-markdown p{margin:0 0 .5rem}.ai-markdown :last-child{margin-bottom:0}.ai-markdown strong{color:#111827;font-weight:700}.ai-markdown .ai-markdown-list{margin:0 0 .5rem 1.1rem;padding:0}.ai-markdown li{margin-bottom:.35rem}.ai-sidebar-error{margin:0;color:#dc2626;font-size:.9rem}.query-chat-messages{max-height:calc(100vh - 260px);overflow-y:auto;padding:.25rem .1rem .5rem;margin-bottom:.75rem}.query-chat-empty{color:#6b7280;font-size:.9rem;text-align:center;padding:.75rem .5rem}.query-chat-message{display:flex;margin-bottom:.6rem}.query-chat-message.user{justify-content:flex-end}.query-chat-message.assistant{justify-content:flex-start}.query-chat-bubble{max-width:85%;padding:.6rem .75rem;border-radius:12px;font-size:.9rem;line-height:1.45;border:1px solid #e5e7eb;background:#f9fafb;color:#1f2937}.query-chat-message.user .query-chat-bubble{background:#dbeafe;border-color:#bfdbfe}.query-chat-input-wrap{display:flex;flex-direction:column;gap:.5rem}.query-chat-input{width:100%;border:1px solid #d1d5db;border-radius:8px;padding:.6rem .7rem;font-size:.9rem;resize:vertical;min-height:70px}.query-chat-input:focus{outline:none;border-color:#60a5fa;box-shadow:0 0 0 2px #60a5fa33}.query-send-btn{align-self:flex-end;border:1px solid #2563eb;background:#2563eb;color:#fff;border-radius:8px;padding:.45rem .9rem;font-size:.85rem;cursor:pointer}.query-send-btn:hover:not(:disabled){background:#1d4ed8}.query-send-btn:disabled{cursor:not-allowed;opacity:.6}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "directive", type: HasPermissionDirective, selector: "[permission]", inputs: ["permission"] }, { kind: "component", type: DocumentAiChatComponent, selector: "document-ai-chat", inputs: ["selectedDocument"] }] });
|
|
7496
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentHistoryComponent, isStandalone: false, selector: "document-history", inputs: { historyData: "historyData", showHistory: "showHistory", contextId: "contextId", selectedDocument: "selectedDocument", isDocumentIntelligence: "isDocumentIntelligence" }, outputs: { deleteTaskRequested: "deleteTaskRequested", documentSelected: "documentSelected" }, host: { listeners: { "document:click": "onDocumentClickOutside($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-review-container\" *ngIf=\"showHistory && historyData.length > 0\">\n <!-- Header Section -->\n <div class=\"review-header\">\n <div class=\"review-title-section\">\n <h2 class=\"review-title\">Document Review</h2>\n <div class=\"ai-menu\" *ngIf=\"showDocumentAiUi\">\n <button class=\"ai-btn\" (click)=\"documentHistoryAiService.toggleAiMenu()\" [class.active]=\"documentHistoryAiService.state.showAiMenu\">\n <i class=\"pi pi-sparkles\"></i>\n <span>AI</span>\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"documentHistoryAiService.state.showAiMenu\"></i>\n </button>\n <div class=\"ai-dropdown\" *ngIf=\"documentHistoryAiService.state.showAiMenu\" (click)=\"$event.stopPropagation()\">\n <button type=\"button\" class=\"ai-dropdown-item\" (click)=\"openAiPanel('Query')\">Query</button>\n </div>\n </div>\n </div>\n <!-- <div class=\"actions-menu\" *ngIf=\"selectedDocument?.isUploaded || selectedDocument?.status == 'Approved'\"> -->\n <!-- <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.isUploaded || selectedDocument?.status == 'Approved') && !selectedDocument?.isSystemDocument\"> -->\n <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.status !== 'Approved') && (!selectedDocument?.isSystemDocument)\">\n <button class=\"actions-btn\" (click)=\"toggleActionsMenu()\" [class.active]=\"showActionsMenu\">\n Actions\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\n </button>\n\n <!-- Actions Dropdown Menu -->\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\" (click)=\"$event.stopPropagation()\">\n <div class=\"dropdown-item\" *ngIf=\"selectedDocument?.status == 'Approved' || selectedDocument?.isUploaded || selectedDocument?.status == 'Uploaded'\">\n <ng-content [select]=\"'action-launcher'\"></ng-content>\n </div>\n <div *ngIf=\"selectedDocument?.status == 'Uploaded' || selectedDocument?.status === 'Rejected' || selectedDocument?.status === 'Reviewing' || selectedDocument?.status === 'Pending'\" [permission]=\"'documents-deleteDocumentByDocumentId'\" class=\"dropdown-item\" (click)=\"onDeleteTask()\">\n <span>Delete Document</span>\n </div>\n </div>\n\n </div>\n </div>\n\n <!-- Document Actions Component - Below Header -->\n <div class=\"document-actions-section\">\n <ng-content select=\"[actions-component]\"></ng-content>\n </div>\n\n\n <!-- Alerts Section -->\n <!-- <div class=\"alerts-section\">\n <div class=\"alert-card\">\n <div class=\"alert-header\">\n <i class=\"pi pi-exclamation-triangle alert-icon\"></i>\n <span class=\"alert-text\">Alerts</span>\n <div class=\"alert-badge\">\n <span class=\"alert-count\">{{ getAlertCount() }}</span>\n <i class=\"pi pi-chevron-right\"></i>\n </div>\n </div>\n </div>\n </div> -->\n\n <!-- Timeline Section -->\n <div class=\"timeline-section\">\n <h3 class=\"timeline-title\">Timeline</h3>\n <div class=\"timeline-container\">\n <div class=\"timeline-item\" *ngFor=\"let section of processedHistoryData\">\n <ng-container *ngFor=\"let item of section.list; let i = index\">\n <div class=\"timeline-event mb-2\" *ngIf=\"!item.shouldHide\">\n <div class=\"event-card\" [ngClass]=\"item.eventCardClass\">\n <!-- Event Header -->\n <div class=\"event-header\">\n <div class=\"event-info\">\n <i [class]=\"item.eventIcon\"></i>\n <span class=\"event-label\">{{ item.label }}</span>\n </div>\n <div class=\"event-timestamp\">{{ item.dateTime }}</div>\n </div>\n <!-- User Information -->\n <div class=\"event-user mb-2\">\n <span class=\"user-name\">{{ item.userName }}</span>\n <span class=\"user-role\">({{ item.userRole }})</span>\n </div>\n <!-- Event Description -->\n <div class=\"event-description\" *ngIf=\"item.requestDescription\">\n <ul class=\"event-description-list\" *ngIf=\"item.label.toLowerCase().includes('requested')\">\n <li class=\"event-description-item\">{{ item.requestDescription }}</li>\n </ul>\n <p *ngIf=\"!item.label.toLowerCase().includes('requested')\">{{ item.requestDescription }}</p>\n </div>\n\n <!-- Document Upload Cards -->\n <div class=\"document-uploads\" *ngIf=\"item.documentList && item.documentList.length > 0\">\n <div class=\"uploaded-documents\">\n <div class=\"document-card\" *ngFor=\"let doc of item.documentList\" (click)=\"onDocumentClick(doc)\">\n <div class=\"document-icon\">\n <i class=\"pi pi-file\"></i>\n </div>\n <span class=\"document-name\">{{ doc.docName }}</span>\n </div>\n </div>\n </div>\n\n\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n\n <!-- <ng-content [select]=\"'actions-component'\"></ng-content> -->\n</div>\n\n<p-sidebar *ngIf=\"showDocumentAiUi\" [(visible)]=\"documentHistoryAiService.state.showAiSidebar\" position=\"right\"\n [style]=\"{ width: '420px' }\" styleClass=\"ai-chat-sidebar\" [dismissible]=\"true\" [showCloseIcon]=\"false\"\n [showHeader]=\"false\" [appendTo]=\"'body'\">\n\n <div class=\"ai-sidebar-content\">\n <document-ai-chat [selectedDocument]=\"selectedDocument\"></document-ai-chat>\n </div>\n</p-sidebar>", styles: [".document-review-container{border-radius:8px;max-height:100%;overflow-y:auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.document-review-container .review-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:1rem;border-bottom:1px solid #e5e7eb}.document-review-container .review-header .review-title-section{display:flex;align-items:center;gap:.75rem}.document-review-container .review-header .review-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin:0}.document-review-container .review-header .ai-menu{position:relative}.document-review-container .review-header .ai-menu .ai-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 .85rem;color:#374151;font-size:.875rem;height:40px;line-height:1;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .ai-menu .ai-btn:hover{background:#f9fafb}.document-review-container .review-header .ai-menu .ai-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .ai-menu .ai-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .ai-menu .ai-btn i.rotated{transform:rotate(180deg)}.document-review-container .review-header .ai-menu .ai-dropdown{position:absolute;top:100%;left:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:160px;margin-top:.25rem;padding:.25rem 0}.document-review-container .review-header .ai-menu .ai-dropdown .ai-dropdown-item{width:100%;text-align:left;border:none;background:transparent;padding:.625rem .875rem;cursor:pointer;color:#374151;font-size:.875rem}.document-review-container .review-header .ai-menu .ai-dropdown .ai-dropdown-item:hover{background:#f9fafb}.document-review-container .review-header .actions-menu{position:relative}.document-review-container .review-header .actions-menu .actions-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 1rem;height:40px;line-height:1;color:#374151;font-size:.875rem;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .actions-menu .actions-btn:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .actions-menu .actions-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu .actions-btn i.rotated{transform:rotate(180deg)}.document-review-container .review-header .actions-menu .actions-dropdown{position:absolute;top:100%;right:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:180px;margin-top:.25rem}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item{padding:.75rem 1rem;cursor:pointer;color:#374151;font-size:.875rem;border-bottom:1px solid #f3f4f6;transition:background-color .2s}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:last-child{border-bottom:none;border-radius:0 0 8px 8px}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:first-child{border-radius:8px 8px 0 0}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item span{display:block}.document-review-container ::ng-deep document-actions{margin-bottom:1.5rem}.document-review-container ::ng-deep document-actions .actions-card{margin:0;width:100%}.document-review-container .document-actions-section{padding:1rem 0}.document-review-container .alerts-section{margin-bottom:2rem}.document-review-container .alerts-section .alert-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1rem}.document-review-container .alerts-section .alert-card .alert-header{display:flex;align-items:center;gap:.75rem}.document-review-container .alerts-section .alert-card .alert-header .alert-icon{color:#ef4444;font-size:1.25rem}.document-review-container .alerts-section .alert-card .alert-header .alert-text{font-weight:500;color:#1f2937;font-size:1rem}.document-review-container .alerts-section .alert-card .alert-header .alert-badge{margin-left:auto;display:flex;align-items:center;gap:.5rem;background:#ef4444;color:#fff;border-radius:50%;width:24px;height:24px;justify-content:center;position:relative}.document-review-container .alerts-section .alert-card .alert-header .alert-badge .alert-count{font-size:.75rem;font-weight:600}.document-review-container .alerts-section .alert-card .alert-header .alert-badge i{position:absolute;right:-8px;font-size:.75rem;color:#ef4444;background:#fff;border-radius:50%;width:16px;height:16px;display:flex;align-items:center;justify-content:center}.document-review-container .timeline-section .timeline-title{font-size:1.25rem;font-weight:600;color:#1f2937;margin:0 0 1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item{margin-bottom:1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1.25rem;position:relative}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info{display:flex;align-items:center;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon{width:25px;height:25px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon i{font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-requested{background:#3b82f6}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-accepted{background:#10b981}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-rejected{background:#ef4444}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-default{background:#6b7280}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-label{font-weight:600;color:#1f2937;font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{color:#6b7280;font-size:.875rem;font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description p{color:#374151;line-height:1.5;margin:0;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents{display:flex;flex-direction:column;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:.5rem;display:flex;align-items:center;gap:.75rem;cursor:pointer;transition:all .2s ease}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:hover{background:#e2e8f0;border-color:#3b82f6;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:active{transform:translateY(0);box-shadow:0 1px 2px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-icon{color:#3b82f6;font-size:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-name{color:#1f2937;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user{font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-name{color:rgb(75,85,99,var(--tw-text-opacity, 1));font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-role{color:#6b7280;margin-left:.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-requested{background:#dbeafe;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-accepted{background:#dcfce7;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-rejected{background:#fee2e2;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-default{border-left:4px solid #6b7280}@media (max-width: 768px){.document-review-container{padding:1rem}.document-review-container .review-header{flex-direction:column;gap:1rem;align-items:flex-start}.document-review-container .review-header .actions-menu{align-self:flex-end}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{flex-direction:column;align-items:flex-start;gap:.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{align-self:flex-end}}.ai-sidebar-title{margin:0;font-size:1.1rem;font-weight:600;color:#111827}.ai-sidebar-content{flex:1;display:flex;flex-direction:column;height:100%;padding:0}::ng-deep .ai-chat-sidebar .p-sidebar-header{display:none!important;padding:0!important}::ng-deep .ai-chat-sidebar .p-sidebar-content{padding:0!important;display:flex;flex-direction:column}.ai-sidebar-text{margin:0;color:#4b5563;font-size:.95rem;line-height:1.5;white-space:pre-wrap}.ai-markdown p{margin:0 0 .5rem}.ai-markdown :last-child{margin-bottom:0}.ai-markdown strong{color:#111827;font-weight:700}.ai-markdown .ai-markdown-list{margin:0 0 .5rem 1.1rem;padding:0}.ai-markdown li{margin-bottom:.35rem}.ai-sidebar-error{margin:0;color:#dc2626;font-size:.9rem}.query-chat-messages{max-height:calc(100vh - 260px);overflow-y:auto;padding:.25rem .1rem .5rem;margin-bottom:.75rem}.query-chat-empty{color:#6b7280;font-size:.9rem;text-align:center;padding:.75rem .5rem}.query-chat-message{display:flex;margin-bottom:.6rem}.query-chat-message.user{justify-content:flex-end}.query-chat-message.assistant{justify-content:flex-start}.query-chat-bubble{max-width:85%;padding:.6rem .75rem;border-radius:12px;font-size:.9rem;line-height:1.45;border:1px solid #e5e7eb;background:#f9fafb;color:#1f2937}.query-chat-message.user .query-chat-bubble{background:#dbeafe;border-color:#bfdbfe}.query-chat-input-wrap{display:flex;flex-direction:column;gap:.5rem}.query-chat-input{width:100%;border:1px solid #d1d5db;border-radius:8px;padding:.6rem .7rem;font-size:.9rem;resize:vertical;min-height:70px}.query-chat-input:focus{outline:none;border-color:#60a5fa;box-shadow:0 0 0 2px #60a5fa33}.query-send-btn{align-self:flex-end;border:1px solid #2563eb;background:#2563eb;color:#fff;border-radius:8px;padding:.45rem .9rem;font-size:.85rem;cursor:pointer}.query-send-btn:hover:not(:disabled){background:#1d4ed8}.query-send-btn:disabled{cursor:not-allowed;opacity:.6}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "directive", type: HasPermissionDirective, selector: "[permission]", inputs: ["permission"] }, { kind: "component", type: DocumentAiChatComponent, selector: "document-ai-chat", inputs: ["selectedDocument"] }] });
|
|
7434
7497
|
}
|
|
7435
7498
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryComponent, decorators: [{
|
|
7436
7499
|
type: Component,
|
|
7437
|
-
args: [{ selector: 'document-history', standalone: false, template: "<div class=\"document-review-container\" *ngIf=\"showHistory && historyData.length > 0\">\n <!-- Header Section -->\n <div class=\"review-header\">\n <div class=\"review-title-section\">\n <h2 class=\"review-title\">Document Review</h2>\n <div class=\"ai-menu\" *ngIf=\"isDocumentIntelligence\">\n <button class=\"ai-btn\" (click)=\"documentHistoryAiService.toggleAiMenu()\" [class.active]=\"documentHistoryAiService.state.showAiMenu\">\n <i class=\"pi pi-sparkles\"></i>\n <span>AI</span>\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"documentHistoryAiService.state.showAiMenu\"></i>\n </button>\n <div class=\"ai-dropdown\" *ngIf=\"documentHistoryAiService.state.showAiMenu\" (click)=\"$event.stopPropagation()\">\n <button type=\"button\" class=\"ai-dropdown-item\" (click)=\"openAiPanel('Query')\">Query</button>\n </div>\n </div>\n </div>\n <!-- <div class=\"actions-menu\" *ngIf=\"selectedDocument?.isUploaded || selectedDocument?.status == 'Approved'\"> -->\n <!-- <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.isUploaded || selectedDocument?.status == 'Approved') && !selectedDocument?.isSystemDocument\"> -->\n <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.status !== 'Approved') && (!selectedDocument?.isSystemDocument)\">\n <button class=\"actions-btn\" (click)=\"toggleActionsMenu()\" [class.active]=\"showActionsMenu\">\n Actions\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\n </button>\n\n <!-- Actions Dropdown Menu -->\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\" (click)=\"$event.stopPropagation()\">\n <div class=\"dropdown-item\" *ngIf=\"selectedDocument?.status == 'Approved' || selectedDocument?.isUploaded || selectedDocument?.status == 'Uploaded'\">\n <ng-content [select]=\"'action-launcher'\"></ng-content>\n </div>\n <div *ngIf=\"selectedDocument?.status == 'Uploaded' || selectedDocument?.status === 'Rejected' || selectedDocument?.status === 'Reviewing' || selectedDocument?.status === 'Pending'\" [permission]=\"'documents-deleteDocumentByDocumentId'\" class=\"dropdown-item\" (click)=\"onDeleteTask()\">\n <span>Delete Document</span>\n </div>\n </div>\n\n </div>\n </div>\n\n <!-- Document Actions Component - Below Header -->\n <div class=\"document-actions-section\">\n <ng-content select=\"[actions-component]\"></ng-content>\n </div>\n\n\n <!-- Alerts Section -->\n <!-- <div class=\"alerts-section\">\n <div class=\"alert-card\">\n <div class=\"alert-header\">\n <i class=\"pi pi-exclamation-triangle alert-icon\"></i>\n <span class=\"alert-text\">Alerts</span>\n <div class=\"alert-badge\">\n <span class=\"alert-count\">{{ getAlertCount() }}</span>\n <i class=\"pi pi-chevron-right\"></i>\n </div>\n </div>\n </div>\n </div> -->\n\n <!-- Timeline Section -->\n <div class=\"timeline-section\">\n <h3 class=\"timeline-title\">Timeline</h3>\n <div class=\"timeline-container\">\n <div class=\"timeline-item\" *ngFor=\"let section of processedHistoryData\">\n <ng-container *ngFor=\"let item of section.list; let i = index\">\n <div class=\"timeline-event mb-2\" *ngIf=\"!item.shouldHide\">\n <div class=\"event-card\" [ngClass]=\"item.eventCardClass\">\n <!-- Event Header -->\n <div class=\"event-header\">\n <div class=\"event-info\">\n <i [class]=\"item.eventIcon\"></i>\n <span class=\"event-label\">{{ item.label }}</span>\n </div>\n <div class=\"event-timestamp\">{{ item.dateTime }}</div>\n </div>\n <!-- User Information -->\n <div class=\"event-user mb-2\">\n <span class=\"user-name\">{{ item.userName }}</span>\n <span class=\"user-role\">({{ item.userRole }})</span>\n </div>\n <!-- Event Description -->\n <div class=\"event-description\" *ngIf=\"item.requestDescription\">\n <ul class=\"event-description-list\" *ngIf=\"item.label.toLowerCase().includes('requested')\">\n <li class=\"event-description-item\">{{ item.requestDescription }}</li>\n </ul>\n <p *ngIf=\"!item.label.toLowerCase().includes('requested')\">{{ item.requestDescription }}</p>\n </div>\n\n <!-- Document Upload Cards -->\n <div class=\"document-uploads\" *ngIf=\"item.documentList && item.documentList.length > 0\">\n <div class=\"uploaded-documents\">\n <div class=\"document-card\" *ngFor=\"let doc of item.documentList\" (click)=\"onDocumentClick(doc)\">\n <div class=\"document-icon\">\n <i class=\"pi pi-file\"></i>\n </div>\n <span class=\"document-name\">{{ doc.docName }}</span>\n </div>\n </div>\n </div>\n\n\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n\n <!-- <ng-content [select]=\"'actions-component'\"></ng-content> -->\n</div>\n\n<p-sidebar *ngIf=\"isDocumentIntelligence\" [(visible)]=\"documentHistoryAiService.state.showAiSidebar\" position=\"right\"\n [style]=\"{ width: '420px' }\" styleClass=\"ai-chat-sidebar\" [dismissible]=\"true\" [showCloseIcon]=\"false\"\n [showHeader]=\"false\" [appendTo]=\"'body'\">\n\n <div class=\"ai-sidebar-content\">\n <document-ai-chat [selectedDocument]=\"selectedDocument\"></document-ai-chat>\n </div>\n</p-sidebar>", styles: [".document-review-container{border-radius:8px;max-height:100%;overflow-y:auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.document-review-container .review-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:1rem;border-bottom:1px solid #e5e7eb}.document-review-container .review-header .review-title-section{display:flex;align-items:center;gap:.75rem}.document-review-container .review-header .review-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin:0}.document-review-container .review-header .ai-menu{position:relative}.document-review-container .review-header .ai-menu .ai-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 .85rem;color:#374151;font-size:.875rem;height:40px;line-height:1;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .ai-menu .ai-btn:hover{background:#f9fafb}.document-review-container .review-header .ai-menu .ai-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .ai-menu .ai-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .ai-menu .ai-btn i.rotated{transform:rotate(180deg)}.document-review-container .review-header .ai-menu .ai-dropdown{position:absolute;top:100%;left:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:160px;margin-top:.25rem;padding:.25rem 0}.document-review-container .review-header .ai-menu .ai-dropdown .ai-dropdown-item{width:100%;text-align:left;border:none;background:transparent;padding:.625rem .875rem;cursor:pointer;color:#374151;font-size:.875rem}.document-review-container .review-header .ai-menu .ai-dropdown .ai-dropdown-item:hover{background:#f9fafb}.document-review-container .review-header .actions-menu{position:relative}.document-review-container .review-header .actions-menu .actions-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 1rem;height:40px;line-height:1;color:#374151;font-size:.875rem;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .actions-menu .actions-btn:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .actions-menu .actions-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu .actions-btn i.rotated{transform:rotate(180deg)}.document-review-container .review-header .actions-menu .actions-dropdown{position:absolute;top:100%;right:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:180px;margin-top:.25rem}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item{padding:.75rem 1rem;cursor:pointer;color:#374151;font-size:.875rem;border-bottom:1px solid #f3f4f6;transition:background-color .2s}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:last-child{border-bottom:none;border-radius:0 0 8px 8px}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:first-child{border-radius:8px 8px 0 0}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item span{display:block}.document-review-container ::ng-deep document-actions{margin-bottom:1.5rem}.document-review-container ::ng-deep document-actions .actions-card{margin:0;width:100%}.document-review-container .document-actions-section{padding:1rem 0}.document-review-container .alerts-section{margin-bottom:2rem}.document-review-container .alerts-section .alert-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1rem}.document-review-container .alerts-section .alert-card .alert-header{display:flex;align-items:center;gap:.75rem}.document-review-container .alerts-section .alert-card .alert-header .alert-icon{color:#ef4444;font-size:1.25rem}.document-review-container .alerts-section .alert-card .alert-header .alert-text{font-weight:500;color:#1f2937;font-size:1rem}.document-review-container .alerts-section .alert-card .alert-header .alert-badge{margin-left:auto;display:flex;align-items:center;gap:.5rem;background:#ef4444;color:#fff;border-radius:50%;width:24px;height:24px;justify-content:center;position:relative}.document-review-container .alerts-section .alert-card .alert-header .alert-badge .alert-count{font-size:.75rem;font-weight:600}.document-review-container .alerts-section .alert-card .alert-header .alert-badge i{position:absolute;right:-8px;font-size:.75rem;color:#ef4444;background:#fff;border-radius:50%;width:16px;height:16px;display:flex;align-items:center;justify-content:center}.document-review-container .timeline-section .timeline-title{font-size:1.25rem;font-weight:600;color:#1f2937;margin:0 0 1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item{margin-bottom:1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1.25rem;position:relative}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info{display:flex;align-items:center;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon{width:25px;height:25px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon i{font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-requested{background:#3b82f6}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-accepted{background:#10b981}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-rejected{background:#ef4444}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-default{background:#6b7280}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-label{font-weight:600;color:#1f2937;font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{color:#6b7280;font-size:.875rem;font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description p{color:#374151;line-height:1.5;margin:0;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents{display:flex;flex-direction:column;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:.5rem;display:flex;align-items:center;gap:.75rem;cursor:pointer;transition:all .2s ease}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:hover{background:#e2e8f0;border-color:#3b82f6;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:active{transform:translateY(0);box-shadow:0 1px 2px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-icon{color:#3b82f6;font-size:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-name{color:#1f2937;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user{font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-name{color:rgb(75,85,99,var(--tw-text-opacity, 1));font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-role{color:#6b7280;margin-left:.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-requested{background:#dbeafe;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-accepted{background:#dcfce7;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-rejected{background:#fee2e2;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-default{border-left:4px solid #6b7280}@media (max-width: 768px){.document-review-container{padding:1rem}.document-review-container .review-header{flex-direction:column;gap:1rem;align-items:flex-start}.document-review-container .review-header .actions-menu{align-self:flex-end}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{flex-direction:column;align-items:flex-start;gap:.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{align-self:flex-end}}.ai-sidebar-title{margin:0;font-size:1.1rem;font-weight:600;color:#111827}.ai-sidebar-content{flex:1;display:flex;flex-direction:column;height:100%;padding:0}::ng-deep .ai-chat-sidebar .p-sidebar-header{display:none!important;padding:0!important}::ng-deep .ai-chat-sidebar .p-sidebar-content{padding:0!important;display:flex;flex-direction:column}.ai-sidebar-text{margin:0;color:#4b5563;font-size:.95rem;line-height:1.5;white-space:pre-wrap}.ai-markdown p{margin:0 0 .5rem}.ai-markdown :last-child{margin-bottom:0}.ai-markdown strong{color:#111827;font-weight:700}.ai-markdown .ai-markdown-list{margin:0 0 .5rem 1.1rem;padding:0}.ai-markdown li{margin-bottom:.35rem}.ai-sidebar-error{margin:0;color:#dc2626;font-size:.9rem}.query-chat-messages{max-height:calc(100vh - 260px);overflow-y:auto;padding:.25rem .1rem .5rem;margin-bottom:.75rem}.query-chat-empty{color:#6b7280;font-size:.9rem;text-align:center;padding:.75rem .5rem}.query-chat-message{display:flex;margin-bottom:.6rem}.query-chat-message.user{justify-content:flex-end}.query-chat-message.assistant{justify-content:flex-start}.query-chat-bubble{max-width:85%;padding:.6rem .75rem;border-radius:12px;font-size:.9rem;line-height:1.45;border:1px solid #e5e7eb;background:#f9fafb;color:#1f2937}.query-chat-message.user .query-chat-bubble{background:#dbeafe;border-color:#bfdbfe}.query-chat-input-wrap{display:flex;flex-direction:column;gap:.5rem}.query-chat-input{width:100%;border:1px solid #d1d5db;border-radius:8px;padding:.6rem .7rem;font-size:.9rem;resize:vertical;min-height:70px}.query-chat-input:focus{outline:none;border-color:#60a5fa;box-shadow:0 0 0 2px #60a5fa33}.query-send-btn{align-self:flex-end;border:1px solid #2563eb;background:#2563eb;color:#fff;border-radius:8px;padding:.45rem .9rem;font-size:.85rem;cursor:pointer}.query-send-btn:hover:not(:disabled){background:#1d4ed8}.query-send-btn:disabled{cursor:not-allowed;opacity:.6}\n"] }]
|
|
7500
|
+
args: [{ selector: 'document-history', standalone: false, template: "<div class=\"document-review-container\" *ngIf=\"showHistory && historyData.length > 0\">\n <!-- Header Section -->\n <div class=\"review-header\">\n <div class=\"review-title-section\">\n <h2 class=\"review-title\">Document Review</h2>\n <div class=\"ai-menu\" *ngIf=\"showDocumentAiUi\">\n <button class=\"ai-btn\" (click)=\"documentHistoryAiService.toggleAiMenu()\" [class.active]=\"documentHistoryAiService.state.showAiMenu\">\n <i class=\"pi pi-sparkles\"></i>\n <span>AI</span>\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"documentHistoryAiService.state.showAiMenu\"></i>\n </button>\n <div class=\"ai-dropdown\" *ngIf=\"documentHistoryAiService.state.showAiMenu\" (click)=\"$event.stopPropagation()\">\n <button type=\"button\" class=\"ai-dropdown-item\" (click)=\"openAiPanel('Query')\">Query</button>\n </div>\n </div>\n </div>\n <!-- <div class=\"actions-menu\" *ngIf=\"selectedDocument?.isUploaded || selectedDocument?.status == 'Approved'\"> -->\n <!-- <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.isUploaded || selectedDocument?.status == 'Approved') && !selectedDocument?.isSystemDocument\"> -->\n <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.status !== 'Approved') && (!selectedDocument?.isSystemDocument)\">\n <button class=\"actions-btn\" (click)=\"toggleActionsMenu()\" [class.active]=\"showActionsMenu\">\n Actions\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\n </button>\n\n <!-- Actions Dropdown Menu -->\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\" (click)=\"$event.stopPropagation()\">\n <div class=\"dropdown-item\" *ngIf=\"selectedDocument?.status == 'Approved' || selectedDocument?.isUploaded || selectedDocument?.status == 'Uploaded'\">\n <ng-content [select]=\"'action-launcher'\"></ng-content>\n </div>\n <div *ngIf=\"selectedDocument?.status == 'Uploaded' || selectedDocument?.status === 'Rejected' || selectedDocument?.status === 'Reviewing' || selectedDocument?.status === 'Pending'\" [permission]=\"'documents-deleteDocumentByDocumentId'\" class=\"dropdown-item\" (click)=\"onDeleteTask()\">\n <span>Delete Document</span>\n </div>\n </div>\n\n </div>\n </div>\n\n <!-- Document Actions Component - Below Header -->\n <div class=\"document-actions-section\">\n <ng-content select=\"[actions-component]\"></ng-content>\n </div>\n\n\n <!-- Alerts Section -->\n <!-- <div class=\"alerts-section\">\n <div class=\"alert-card\">\n <div class=\"alert-header\">\n <i class=\"pi pi-exclamation-triangle alert-icon\"></i>\n <span class=\"alert-text\">Alerts</span>\n <div class=\"alert-badge\">\n <span class=\"alert-count\">{{ getAlertCount() }}</span>\n <i class=\"pi pi-chevron-right\"></i>\n </div>\n </div>\n </div>\n </div> -->\n\n <!-- Timeline Section -->\n <div class=\"timeline-section\">\n <h3 class=\"timeline-title\">Timeline</h3>\n <div class=\"timeline-container\">\n <div class=\"timeline-item\" *ngFor=\"let section of processedHistoryData\">\n <ng-container *ngFor=\"let item of section.list; let i = index\">\n <div class=\"timeline-event mb-2\" *ngIf=\"!item.shouldHide\">\n <div class=\"event-card\" [ngClass]=\"item.eventCardClass\">\n <!-- Event Header -->\n <div class=\"event-header\">\n <div class=\"event-info\">\n <i [class]=\"item.eventIcon\"></i>\n <span class=\"event-label\">{{ item.label }}</span>\n </div>\n <div class=\"event-timestamp\">{{ item.dateTime }}</div>\n </div>\n <!-- User Information -->\n <div class=\"event-user mb-2\">\n <span class=\"user-name\">{{ item.userName }}</span>\n <span class=\"user-role\">({{ item.userRole }})</span>\n </div>\n <!-- Event Description -->\n <div class=\"event-description\" *ngIf=\"item.requestDescription\">\n <ul class=\"event-description-list\" *ngIf=\"item.label.toLowerCase().includes('requested')\">\n <li class=\"event-description-item\">{{ item.requestDescription }}</li>\n </ul>\n <p *ngIf=\"!item.label.toLowerCase().includes('requested')\">{{ item.requestDescription }}</p>\n </div>\n\n <!-- Document Upload Cards -->\n <div class=\"document-uploads\" *ngIf=\"item.documentList && item.documentList.length > 0\">\n <div class=\"uploaded-documents\">\n <div class=\"document-card\" *ngFor=\"let doc of item.documentList\" (click)=\"onDocumentClick(doc)\">\n <div class=\"document-icon\">\n <i class=\"pi pi-file\"></i>\n </div>\n <span class=\"document-name\">{{ doc.docName }}</span>\n </div>\n </div>\n </div>\n\n\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n\n <!-- <ng-content [select]=\"'actions-component'\"></ng-content> -->\n</div>\n\n<p-sidebar *ngIf=\"showDocumentAiUi\" [(visible)]=\"documentHistoryAiService.state.showAiSidebar\" position=\"right\"\n [style]=\"{ width: '420px' }\" styleClass=\"ai-chat-sidebar\" [dismissible]=\"true\" [showCloseIcon]=\"false\"\n [showHeader]=\"false\" [appendTo]=\"'body'\">\n\n <div class=\"ai-sidebar-content\">\n <document-ai-chat [selectedDocument]=\"selectedDocument\"></document-ai-chat>\n </div>\n</p-sidebar>", styles: [".document-review-container{border-radius:8px;max-height:100%;overflow-y:auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.document-review-container .review-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:1rem;border-bottom:1px solid #e5e7eb}.document-review-container .review-header .review-title-section{display:flex;align-items:center;gap:.75rem}.document-review-container .review-header .review-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin:0}.document-review-container .review-header .ai-menu{position:relative}.document-review-container .review-header .ai-menu .ai-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 .85rem;color:#374151;font-size:.875rem;height:40px;line-height:1;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .ai-menu .ai-btn:hover{background:#f9fafb}.document-review-container .review-header .ai-menu .ai-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .ai-menu .ai-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .ai-menu .ai-btn i.rotated{transform:rotate(180deg)}.document-review-container .review-header .ai-menu .ai-dropdown{position:absolute;top:100%;left:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:160px;margin-top:.25rem;padding:.25rem 0}.document-review-container .review-header .ai-menu .ai-dropdown .ai-dropdown-item{width:100%;text-align:left;border:none;background:transparent;padding:.625rem .875rem;cursor:pointer;color:#374151;font-size:.875rem}.document-review-container .review-header .ai-menu .ai-dropdown .ai-dropdown-item:hover{background:#f9fafb}.document-review-container .review-header .actions-menu{position:relative}.document-review-container .review-header .actions-menu .actions-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 1rem;height:40px;line-height:1;color:#374151;font-size:.875rem;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .actions-menu .actions-btn:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .actions-menu .actions-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu .actions-btn i.rotated{transform:rotate(180deg)}.document-review-container .review-header .actions-menu .actions-dropdown{position:absolute;top:100%;right:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:180px;margin-top:.25rem}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item{padding:.75rem 1rem;cursor:pointer;color:#374151;font-size:.875rem;border-bottom:1px solid #f3f4f6;transition:background-color .2s}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:last-child{border-bottom:none;border-radius:0 0 8px 8px}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:first-child{border-radius:8px 8px 0 0}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item span{display:block}.document-review-container ::ng-deep document-actions{margin-bottom:1.5rem}.document-review-container ::ng-deep document-actions .actions-card{margin:0;width:100%}.document-review-container .document-actions-section{padding:1rem 0}.document-review-container .alerts-section{margin-bottom:2rem}.document-review-container .alerts-section .alert-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1rem}.document-review-container .alerts-section .alert-card .alert-header{display:flex;align-items:center;gap:.75rem}.document-review-container .alerts-section .alert-card .alert-header .alert-icon{color:#ef4444;font-size:1.25rem}.document-review-container .alerts-section .alert-card .alert-header .alert-text{font-weight:500;color:#1f2937;font-size:1rem}.document-review-container .alerts-section .alert-card .alert-header .alert-badge{margin-left:auto;display:flex;align-items:center;gap:.5rem;background:#ef4444;color:#fff;border-radius:50%;width:24px;height:24px;justify-content:center;position:relative}.document-review-container .alerts-section .alert-card .alert-header .alert-badge .alert-count{font-size:.75rem;font-weight:600}.document-review-container .alerts-section .alert-card .alert-header .alert-badge i{position:absolute;right:-8px;font-size:.75rem;color:#ef4444;background:#fff;border-radius:50%;width:16px;height:16px;display:flex;align-items:center;justify-content:center}.document-review-container .timeline-section .timeline-title{font-size:1.25rem;font-weight:600;color:#1f2937;margin:0 0 1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item{margin-bottom:1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1.25rem;position:relative}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info{display:flex;align-items:center;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon{width:25px;height:25px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon i{font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-requested{background:#3b82f6}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-accepted{background:#10b981}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-rejected{background:#ef4444}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-default{background:#6b7280}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-label{font-weight:600;color:#1f2937;font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{color:#6b7280;font-size:.875rem;font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description p{color:#374151;line-height:1.5;margin:0;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents{display:flex;flex-direction:column;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:.5rem;display:flex;align-items:center;gap:.75rem;cursor:pointer;transition:all .2s ease}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:hover{background:#e2e8f0;border-color:#3b82f6;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:active{transform:translateY(0);box-shadow:0 1px 2px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-icon{color:#3b82f6;font-size:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-name{color:#1f2937;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user{font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-name{color:rgb(75,85,99,var(--tw-text-opacity, 1));font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-role{color:#6b7280;margin-left:.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-requested{background:#dbeafe;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-accepted{background:#dcfce7;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-rejected{background:#fee2e2;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-default{border-left:4px solid #6b7280}@media (max-width: 768px){.document-review-container{padding:1rem}.document-review-container .review-header{flex-direction:column;gap:1rem;align-items:flex-start}.document-review-container .review-header .actions-menu{align-self:flex-end}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{flex-direction:column;align-items:flex-start;gap:.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{align-self:flex-end}}.ai-sidebar-title{margin:0;font-size:1.1rem;font-weight:600;color:#111827}.ai-sidebar-content{flex:1;display:flex;flex-direction:column;height:100%;padding:0}::ng-deep .ai-chat-sidebar .p-sidebar-header{display:none!important;padding:0!important}::ng-deep .ai-chat-sidebar .p-sidebar-content{padding:0!important;display:flex;flex-direction:column}.ai-sidebar-text{margin:0;color:#4b5563;font-size:.95rem;line-height:1.5;white-space:pre-wrap}.ai-markdown p{margin:0 0 .5rem}.ai-markdown :last-child{margin-bottom:0}.ai-markdown strong{color:#111827;font-weight:700}.ai-markdown .ai-markdown-list{margin:0 0 .5rem 1.1rem;padding:0}.ai-markdown li{margin-bottom:.35rem}.ai-sidebar-error{margin:0;color:#dc2626;font-size:.9rem}.query-chat-messages{max-height:calc(100vh - 260px);overflow-y:auto;padding:.25rem .1rem .5rem;margin-bottom:.75rem}.query-chat-empty{color:#6b7280;font-size:.9rem;text-align:center;padding:.75rem .5rem}.query-chat-message{display:flex;margin-bottom:.6rem}.query-chat-message.user{justify-content:flex-end}.query-chat-message.assistant{justify-content:flex-start}.query-chat-bubble{max-width:85%;padding:.6rem .75rem;border-radius:12px;font-size:.9rem;line-height:1.45;border:1px solid #e5e7eb;background:#f9fafb;color:#1f2937}.query-chat-message.user .query-chat-bubble{background:#dbeafe;border-color:#bfdbfe}.query-chat-input-wrap{display:flex;flex-direction:column;gap:.5rem}.query-chat-input{width:100%;border:1px solid #d1d5db;border-radius:8px;padding:.6rem .7rem;font-size:.9rem;resize:vertical;min-height:70px}.query-chat-input:focus{outline:none;border-color:#60a5fa;box-shadow:0 0 0 2px #60a5fa33}.query-send-btn{align-self:flex-end;border:1px solid #2563eb;background:#2563eb;color:#fff;border-radius:8px;padding:.45rem .9rem;font-size:.85rem;cursor:pointer}.query-send-btn:hover:not(:disabled){background:#1d4ed8}.query-send-btn:disabled{cursor:not-allowed;opacity:.6}\n"] }]
|
|
7438
7501
|
}], ctorParameters: () => [{ type: DocumentHistoryService }, { type: DocumentViewerService }, { type: DocumentActionsService }, { type: i3.ConfirmationService }, { type: DocumentHttpService }, { type: DocumentHistoryAiService }], propDecorators: { historyData: [{
|
|
7439
7502
|
type: Input
|
|
7440
7503
|
}], showHistory: [{
|