cat-documents-ng 1.0.32 → 1.0.34
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 +2 -0
- package/fesm2022/cat-documents-ng.mjs +74 -5
- package/fesm2022/cat-documents-ng.mjs.map +1 -1
- package/lib/document/components/document-ai-chat/document-ai-chat.component.d.ts +16 -0
- package/lib/document/document.module.d.ts +30 -29
- package/lib/document/services/document-history-ai.service.d.ts +10 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -455,6 +455,8 @@ export declare class SHARED {
|
|
|
455
455
|
static ERROR_PARSING_EMAIL_FILE: string;
|
|
456
456
|
static ERROR_LOADING_EMAIL_FILE: string;
|
|
457
457
|
static SMOOTH_SCROLL: ScrollBehavior;
|
|
458
|
+
static SUMMARY_PROMPT: string;
|
|
459
|
+
static INSIGHTS_PROMPT: string;
|
|
458
460
|
}
|
|
459
461
|
/**
|
|
460
462
|
* `DUMMYDOCUMENTLIST` is a mock list of document objects used for testing and development purposes.
|
|
@@ -641,6 +641,8 @@ class SHARED {
|
|
|
641
641
|
static ERROR_PARSING_EMAIL_FILE = 'Error parsing email file';
|
|
642
642
|
static ERROR_LOADING_EMAIL_FILE = 'Error loading email file';
|
|
643
643
|
static SMOOTH_SCROLL = 'smooth';
|
|
644
|
+
static SUMMARY_PROMPT = 'Give me a clear, bullet-point summary of the key information in this document.';
|
|
645
|
+
static INSIGHTS_PROMPT = 'What are the key insights and takeaways from this document? Provide a concise summary of the main points and any important details.';
|
|
644
646
|
}
|
|
645
647
|
/**
|
|
646
648
|
* `DUMMYDOCUMENTLIST` is a mock list of document objects used for testing and development purposes.
|
|
@@ -6683,6 +6685,38 @@ class DocumentHistoryAiService {
|
|
|
6683
6685
|
error: this.handleQuestionRequestError.bind(this)
|
|
6684
6686
|
});
|
|
6685
6687
|
}
|
|
6688
|
+
/**
|
|
6689
|
+
* Sends a fixed "Document Summary" prompt for the current document.
|
|
6690
|
+
* @param {any} selectedDocument - Selected document object.
|
|
6691
|
+
*/
|
|
6692
|
+
sendSummaryPrompt(selectedDocument) {
|
|
6693
|
+
const prompt = SHARED.SUMMARY_PROMPT;
|
|
6694
|
+
if (this.state.queryLoading) {
|
|
6695
|
+
return;
|
|
6696
|
+
}
|
|
6697
|
+
this.state.aiError = '';
|
|
6698
|
+
this.pushUserQuestion(prompt);
|
|
6699
|
+
this.askQuestionForDocument(selectedDocument, prompt).subscribe({
|
|
6700
|
+
next: this.handleQuestionResult.bind(this),
|
|
6701
|
+
error: this.handleQuestionRequestError.bind(this)
|
|
6702
|
+
});
|
|
6703
|
+
}
|
|
6704
|
+
/**
|
|
6705
|
+
* Sends a fixed "Document Insights" prompt for the current document.
|
|
6706
|
+
* @param {any} selectedDocument - Selected document object.
|
|
6707
|
+
*/
|
|
6708
|
+
sendInsightsPrompt(selectedDocument) {
|
|
6709
|
+
const prompt = SHARED.INSIGHTS_PROMPT;
|
|
6710
|
+
if (this.state.queryLoading) {
|
|
6711
|
+
return;
|
|
6712
|
+
}
|
|
6713
|
+
this.state.aiError = '';
|
|
6714
|
+
this.pushUserQuestion(prompt);
|
|
6715
|
+
this.askQuestionForDocument(selectedDocument, prompt).subscribe({
|
|
6716
|
+
next: this.handleQuestionResult.bind(this),
|
|
6717
|
+
error: this.handleQuestionRequestError.bind(this)
|
|
6718
|
+
});
|
|
6719
|
+
}
|
|
6686
6720
|
/**
|
|
6687
6721
|
* Handles Enter key for query submission.
|
|
6688
6722
|
* @param {KeyboardEvent} event - Keyboard event from query textarea.
|
|
@@ -6989,6 +7023,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
6989
7023
|
type: Input
|
|
6990
7024
|
}] } });
|
|
6991
7025
|
|
|
7026
|
+
class DocumentAiChatComponent {
|
|
7027
|
+
documentHistoryAiService;
|
|
7028
|
+
/**
|
|
7029
|
+
* The selected document for context in AI queries.
|
|
7030
|
+
*/
|
|
7031
|
+
selectedDocument;
|
|
7032
|
+
constructor(documentHistoryAiService) {
|
|
7033
|
+
this.documentHistoryAiService = documentHistoryAiService;
|
|
7034
|
+
}
|
|
7035
|
+
handleSummaryPrompt() {
|
|
7036
|
+
this.documentHistoryAiService.sendSummaryPrompt(this.selectedDocument);
|
|
7037
|
+
}
|
|
7038
|
+
handleInsightsPrompt() {
|
|
7039
|
+
this.documentHistoryAiService.sendInsightsPrompt(this.selectedDocument);
|
|
7040
|
+
}
|
|
7041
|
+
handleEnter(event) {
|
|
7042
|
+
this.documentHistoryAiService.onQueryEnter(event, this.selectedDocument);
|
|
7043
|
+
}
|
|
7044
|
+
handleSend() {
|
|
7045
|
+
this.documentHistoryAiService.sendQuery(this.selectedDocument);
|
|
7046
|
+
}
|
|
7047
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentAiChatComponent, deps: [{ token: DocumentHistoryAiService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7048
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentAiChatComponent, isStandalone: false, selector: "document-ai-chat", inputs: { selectedDocument: "selectedDocument" }, ngImport: i0, template: "<div class=\"chat-panel document-ai-chat-panel\">\n <div class=\"chat-header\">\n <div class=\"chat-header-content\">\n <div class=\"chat-header-brand\">\n <span class=\"chat-header-icon\"><i class=\"ri-sparkling-2-fill\"></i></span>\n <div class=\"chat-header-text\">\n <h2 class=\"chat-title\">Catura Document AI</h2>\n </div>\n </div>\n </div>\n <span class=\"chat-header-menu\" style=\"cursor: pointer;\" (click)=\"documentHistoryAiService.state.showAiSidebar = false\">\n <i class=\"ri-close-line\" style=\"font-size: 1.4rem;\"></i>\n </span>\n </div>\n\n <div class=\"chat-messages\">\n <div class=\"chat-welcome\" *ngIf=\"documentHistoryAiService.state.queryMessages.length === 0 && !documentHistoryAiService.state.queryLoading\">\n <div class=\"welcome-illustration\">\n <i class=\"ri-bubble-chart-line\"></i>\n </div>\n <h3 class=\"welcome-title\">Catura Document AI</h3>\n <p class=\"welcome-subtitle\">\n We're here to help. Ask your questions below.\n Your conversation is private and secure.\n </p>\n <div class=\"suggested-prompts\">\n <button\n type=\"button\"\n class=\"prompt-chip\"\n (click)=\"handleSummaryPrompt()\"\n >\n <i class=\"ri-sparkling-2-line\"></i>\n <span>Summarise this document</span>\n </button>\n <button\n type=\"button\"\n class=\"prompt-chip\"\n (click)=\"handleInsightsPrompt()\"\n >\n <i class=\"ri-sparkling-2-line\"></i>\n <span>Provide Insights about this document</span>\n </button>\n </div>\n </div>\n\n <div *ngIf=\"documentHistoryAiService.state.queryMessages.length > 0\">\n <div\n class=\"message\"\n *ngFor=\"let msg of documentHistoryAiService.state.queryMessages\"\n [ngClass]=\"{ 'message-user': msg.role === 'user', 'message-assistant': msg.role === 'assistant' }\"\n >\n <span class=\"message-avatar\">\n <i [ngClass]=\"msg.role === 'user' ? 'ri-user-3-fill' : 'ri-robot-2-line'\"></i>\n </span>\n <div class=\"message-bubble\">\n <ng-container *ngIf=\"msg.role === 'user'\">\n {{ msg.content }}\n </ng-container>\n <ng-container *ngIf=\"msg.role === 'assistant'\">\n <div class=\"message-content ai-markdown\" [innerHTML]=\"msg.htmlContent\"></div>\n </ng-container>\n </div>\n </div>\n </div>\n\n <div class=\"message message-assistant\" *ngIf=\"documentHistoryAiService.state.queryLoading\">\n <span class=\"message-avatar\">\n <i class=\"ri-robot-2-line\"></i>\n </span>\n <div class=\"message-bubble\">\n <span class=\"loading-dots\">\n <span></span><span></span><span></span>\n </span>\n </div>\n </div>\n </div>\n\n <div class=\"chat-input-area\">\n <div class=\"chat-input-wrapper\">\n <textarea\n class=\"chat-input\"\n [(ngModel)]=\"documentHistoryAiService.state.queryText\"\n [placeholder]=\"'Start Message...'\"\n [disabled]=\"documentHistoryAiService.state.queryLoading\"\n rows=\"1\"\n (keydown)=\"handleEnter($event)\"\n ></textarea>\n </div>\n <button\n type=\"button\"\n class=\"p-button p-button-primary send-btn\"\n (click)=\"handleSend()\"\n [disabled]=\"\n documentHistoryAiService.state.queryLoading ||\n !documentHistoryAiService.state.queryText?.trim()\n \"\n aria-label=\"Send\"\n >\n <i class=\"ri-send-plane-fill\"></i>\n </button>\n </div>\n</div>\n\n", styles: [":host{display:flex;flex-direction:column;flex:1;width:100%;height:100%;min-height:0}.document-ai-chat-panel{flex:1;width:100%;max-width:100%;min-height:0;max-height:none;background:#fff;display:flex;flex-direction:column;overflow:hidden}.chat-header{padding:.75rem 1rem;background:#fff;border-bottom:1px solid #e5e7eb;display:flex;align-items:center;justify-content:space-between;gap:.75rem}.chat-header-content,.chat-header-brand{display:flex;align-items:center;gap:.6rem}.chat-header-icon{width:28px;height:28px;border-radius:999px;background:#e6f3ff;display:flex;align-items:center;justify-content:center}.chat-header-icon i{font-size:1.1rem;color:#0f8bfd}.chat-header-text{display:flex;flex-direction:column}.chat-title{font-weight:600;font-size:.9rem;color:#1f2937;margin:0}.chat-header-menu{color:#676b89;font-size:1.1rem}.chat-messages{flex:1;overflow-y:auto;padding:1.5rem 1.25rem 1rem;display:flex;flex-direction:column;gap:.75rem;background:#fff}.chat-welcome{display:flex;flex-direction:column;align-items:center;text-align:center;padding:0 0 1.5rem}.welcome-illustration{width:56px;height:56px;border-radius:999px;background:linear-gradient(135deg,#e6f3ff,#0f8bfd14);display:flex;align-items:center;justify-content:center;margin-bottom:1rem}.welcome-illustration i{font-size:1.75rem;color:#0f8bfd}.welcome-title{font-size:.95rem;font-weight:600;color:#1f2937;margin:0 0 .25rem}.welcome-subtitle{font-size:.8rem;color:#676b89;margin:0 0 1.25rem}.suggested-prompts{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:260px}.prompt-chip{display:flex;align-items:center;justify-content:center;gap:.5rem;padding:.6rem 1.2rem;border-radius:999px;border:1px solid #bfdbfe;background:#eff6ff;color:#026fd4;font-size:.8rem;font-weight:500;cursor:pointer;transition:all .2s ease}.prompt-chip i{font-size:1rem}.prompt-chip:hover{background:#dbeafe;border-color:#0f8bfd}.message{display:flex;align-items:flex-end;gap:.4rem;margin-bottom:1.5rem}.message:last-child{margin-bottom:0}.message.message-user{flex-direction:row-reverse}.message.message-assistant{flex-direction:row}.message-avatar{width:28px;height:28px;border-radius:999px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:.95rem}.message-user .message-avatar{background:linear-gradient(135deg,#0f8bfd,#026fd4);color:#fff}.message-assistant .message-avatar{background:#e6f3ff;color:#0f8bfd}.message-bubble{max-width:82%;padding:.6rem .9rem;border-radius:14px;font-size:.85rem;line-height:1.5;white-space:pre-wrap;word-break:break-word}.message-user .message-bubble{background:linear-gradient(135deg,#0f8bfd,#026fd4);color:#fff;border-bottom-right-radius:6px}.message-assistant .message-bubble{background:#f3f4f6;color:#1f2937;border-bottom-left-radius:6px;border:1px solid #e5e7eb}.loading-dots{display:inline-flex;gap:5px;align-items:center}.loading-dots span{width:6px;height:6px;border-radius:50%;background:#026fd4;opacity:.6;animation:loading-bounce 1.2s ease-in-out infinite both}.loading-dots span:nth-child(1){animation-delay:-.24s}.loading-dots span:nth-child(2){animation-delay:-.12s}@keyframes loading-bounce{0%,80%,to{transform:scale(.7);opacity:.5}40%{transform:scale(1);opacity:1}}.chat-input-area{padding:.75rem 1rem 1rem;background:#fff;border-top:1px solid #e5e7eb;display:flex;gap:.5rem;align-items:center}.chat-input-wrapper{flex:1;display:flex;align-items:center;min-height:40px;background:#f9fafb;border:1px solid #e5e7eb;border-radius:999px;padding:.25rem .85rem}.chat-input{flex:1;border:none;background:transparent;font-size:.85rem;line-height:1.5;outline:none}.chat-input::placeholder{color:#676b89}.send-btn{width:36px;height:36px;border-radius:999px;display:flex;align-items:center;justify-content:center;background:#0f8bfd;border:none;color:#fff}.send-btn i{font-size:1rem}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i9$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
7049
|
+
}
|
|
7050
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentAiChatComponent, decorators: [{
|
|
7051
|
+
type: Component,
|
|
7052
|
+
args: [{ selector: 'document-ai-chat', standalone: false, template: "<div class=\"chat-panel document-ai-chat-panel\">\n <div class=\"chat-header\">\n <div class=\"chat-header-content\">\n <div class=\"chat-header-brand\">\n <span class=\"chat-header-icon\"><i class=\"ri-sparkling-2-fill\"></i></span>\n <div class=\"chat-header-text\">\n <h2 class=\"chat-title\">Catura Document AI</h2>\n </div>\n </div>\n </div>\n <span class=\"chat-header-menu\" style=\"cursor: pointer;\" (click)=\"documentHistoryAiService.state.showAiSidebar = false\">\n <i class=\"ri-close-line\" style=\"font-size: 1.4rem;\"></i>\n </span>\n </div>\n\n <div class=\"chat-messages\">\n <div class=\"chat-welcome\" *ngIf=\"documentHistoryAiService.state.queryMessages.length === 0 && !documentHistoryAiService.state.queryLoading\">\n <div class=\"welcome-illustration\">\n <i class=\"ri-bubble-chart-line\"></i>\n </div>\n <h3 class=\"welcome-title\">Catura Document AI</h3>\n <p class=\"welcome-subtitle\">\n We're here to help. Ask your questions below.\n Your conversation is private and secure.\n </p>\n <div class=\"suggested-prompts\">\n <button\n type=\"button\"\n class=\"prompt-chip\"\n (click)=\"handleSummaryPrompt()\"\n >\n <i class=\"ri-sparkling-2-line\"></i>\n <span>Summarise this document</span>\n </button>\n <button\n type=\"button\"\n class=\"prompt-chip\"\n (click)=\"handleInsightsPrompt()\"\n >\n <i class=\"ri-sparkling-2-line\"></i>\n <span>Provide Insights about this document</span>\n </button>\n </div>\n </div>\n\n <div *ngIf=\"documentHistoryAiService.state.queryMessages.length > 0\">\n <div\n class=\"message\"\n *ngFor=\"let msg of documentHistoryAiService.state.queryMessages\"\n [ngClass]=\"{ 'message-user': msg.role === 'user', 'message-assistant': msg.role === 'assistant' }\"\n >\n <span class=\"message-avatar\">\n <i [ngClass]=\"msg.role === 'user' ? 'ri-user-3-fill' : 'ri-robot-2-line'\"></i>\n </span>\n <div class=\"message-bubble\">\n <ng-container *ngIf=\"msg.role === 'user'\">\n {{ msg.content }}\n </ng-container>\n <ng-container *ngIf=\"msg.role === 'assistant'\">\n <div class=\"message-content ai-markdown\" [innerHTML]=\"msg.htmlContent\"></div>\n </ng-container>\n </div>\n </div>\n </div>\n\n <div class=\"message message-assistant\" *ngIf=\"documentHistoryAiService.state.queryLoading\">\n <span class=\"message-avatar\">\n <i class=\"ri-robot-2-line\"></i>\n </span>\n <div class=\"message-bubble\">\n <span class=\"loading-dots\">\n <span></span><span></span><span></span>\n </span>\n </div>\n </div>\n </div>\n\n <div class=\"chat-input-area\">\n <div class=\"chat-input-wrapper\">\n <textarea\n class=\"chat-input\"\n [(ngModel)]=\"documentHistoryAiService.state.queryText\"\n [placeholder]=\"'Start Message...'\"\n [disabled]=\"documentHistoryAiService.state.queryLoading\"\n rows=\"1\"\n (keydown)=\"handleEnter($event)\"\n ></textarea>\n </div>\n <button\n type=\"button\"\n class=\"p-button p-button-primary send-btn\"\n (click)=\"handleSend()\"\n [disabled]=\"\n documentHistoryAiService.state.queryLoading ||\n !documentHistoryAiService.state.queryText?.trim()\n \"\n aria-label=\"Send\"\n >\n <i class=\"ri-send-plane-fill\"></i>\n </button>\n </div>\n</div>\n\n", styles: [":host{display:flex;flex-direction:column;flex:1;width:100%;height:100%;min-height:0}.document-ai-chat-panel{flex:1;width:100%;max-width:100%;min-height:0;max-height:none;background:#fff;display:flex;flex-direction:column;overflow:hidden}.chat-header{padding:.75rem 1rem;background:#fff;border-bottom:1px solid #e5e7eb;display:flex;align-items:center;justify-content:space-between;gap:.75rem}.chat-header-content,.chat-header-brand{display:flex;align-items:center;gap:.6rem}.chat-header-icon{width:28px;height:28px;border-radius:999px;background:#e6f3ff;display:flex;align-items:center;justify-content:center}.chat-header-icon i{font-size:1.1rem;color:#0f8bfd}.chat-header-text{display:flex;flex-direction:column}.chat-title{font-weight:600;font-size:.9rem;color:#1f2937;margin:0}.chat-header-menu{color:#676b89;font-size:1.1rem}.chat-messages{flex:1;overflow-y:auto;padding:1.5rem 1.25rem 1rem;display:flex;flex-direction:column;gap:.75rem;background:#fff}.chat-welcome{display:flex;flex-direction:column;align-items:center;text-align:center;padding:0 0 1.5rem}.welcome-illustration{width:56px;height:56px;border-radius:999px;background:linear-gradient(135deg,#e6f3ff,#0f8bfd14);display:flex;align-items:center;justify-content:center;margin-bottom:1rem}.welcome-illustration i{font-size:1.75rem;color:#0f8bfd}.welcome-title{font-size:.95rem;font-weight:600;color:#1f2937;margin:0 0 .25rem}.welcome-subtitle{font-size:.8rem;color:#676b89;margin:0 0 1.25rem}.suggested-prompts{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:260px}.prompt-chip{display:flex;align-items:center;justify-content:center;gap:.5rem;padding:.6rem 1.2rem;border-radius:999px;border:1px solid #bfdbfe;background:#eff6ff;color:#026fd4;font-size:.8rem;font-weight:500;cursor:pointer;transition:all .2s ease}.prompt-chip i{font-size:1rem}.prompt-chip:hover{background:#dbeafe;border-color:#0f8bfd}.message{display:flex;align-items:flex-end;gap:.4rem;margin-bottom:1.5rem}.message:last-child{margin-bottom:0}.message.message-user{flex-direction:row-reverse}.message.message-assistant{flex-direction:row}.message-avatar{width:28px;height:28px;border-radius:999px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:.95rem}.message-user .message-avatar{background:linear-gradient(135deg,#0f8bfd,#026fd4);color:#fff}.message-assistant .message-avatar{background:#e6f3ff;color:#0f8bfd}.message-bubble{max-width:82%;padding:.6rem .9rem;border-radius:14px;font-size:.85rem;line-height:1.5;white-space:pre-wrap;word-break:break-word}.message-user .message-bubble{background:linear-gradient(135deg,#0f8bfd,#026fd4);color:#fff;border-bottom-right-radius:6px}.message-assistant .message-bubble{background:#f3f4f6;color:#1f2937;border-bottom-left-radius:6px;border:1px solid #e5e7eb}.loading-dots{display:inline-flex;gap:5px;align-items:center}.loading-dots span{width:6px;height:6px;border-radius:50%;background:#026fd4;opacity:.6;animation:loading-bounce 1.2s ease-in-out infinite both}.loading-dots span:nth-child(1){animation-delay:-.24s}.loading-dots span:nth-child(2){animation-delay:-.12s}@keyframes loading-bounce{0%,80%,to{transform:scale(.7);opacity:.5}40%{transform:scale(1);opacity:1}}.chat-input-area{padding:.75rem 1rem 1rem;background:#fff;border-top:1px solid #e5e7eb;display:flex;gap:.5rem;align-items:center}.chat-input-wrapper{flex:1;display:flex;align-items:center;min-height:40px;background:#f9fafb;border:1px solid #e5e7eb;border-radius:999px;padding:.25rem .85rem}.chat-input{flex:1;border:none;background:transparent;font-size:.85rem;line-height:1.5;outline:none}.chat-input::placeholder{color:#676b89}.send-btn{width:36px;height:36px;border-radius:999px;display:flex;align-items:center;justify-content:center;background:#0f8bfd;border:none;color:#fff}.send-btn i{font-size:1rem}\n"] }]
|
|
7053
|
+
}], ctorParameters: () => [{ type: DocumentHistoryAiService }], propDecorators: { selectedDocument: [{
|
|
7054
|
+
type: Input
|
|
7055
|
+
}] } });
|
|
7056
|
+
|
|
6992
7057
|
/**
|
|
6993
7058
|
* Component for displaying document history in a timeline format.
|
|
6994
7059
|
*/
|
|
@@ -7365,11 +7430,11 @@ class DocumentHistoryComponent {
|
|
|
7365
7430
|
}
|
|
7366
7431
|
}
|
|
7367
7432
|
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 });
|
|
7368
|
-
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\n *ngIf=\"isDocumentIntelligence\"\n [(visible)]=\"documentHistoryAiService.state.showAiSidebar\"\n position=\"right\"\n [style]=\"{ width: '420px' }\"\n [dismissible]=\"true\"\n [showCloseIcon]=\"true\"\n [appendTo]=\"'body'\"\n>\n <ng-template pTemplate=\"header\">\n <h3 class=\"ai-sidebar-title\">{{ documentHistoryAiService.state.aiSidebarHeader }}</h3>\n </ng-template>\n\n <div class=\"ai-sidebar-content\">\n <ng-container *ngIf=\"documentHistoryAiService.state.aiSidebarHeader === 'Query'\">\n <p class=\"ai-sidebar-error\" *ngIf=\"documentHistoryAiService.state.aiError\">{{ documentHistoryAiService.state.aiError }}</p>\n\n <div class=\"query-chat-messages\">\n <div class=\"query-chat-empty\" *ngIf=\"documentHistoryAiService.state.queryMessages.length === 0 && !documentHistoryAiService.state.queryLoading\">\n Ask anything about this document.\n </div>\n\n <div *ngFor=\"let message of documentHistoryAiService.state.queryMessages\" class=\"query-chat-message\" [ngClass]=\"message.role\">\n <div class=\"query-chat-bubble\">\n <span *ngIf=\"message.role === 'user'\">{{ message.content }}</span>\n <div *ngIf=\"message.role === 'assistant'\" class=\"ai-markdown\" [innerHTML]=\"message.htmlContent\"></div>\n </div>\n </div>\n\n <div class=\"query-chat-message assistant\" *ngIf=\"documentHistoryAiService.state.queryLoading\">\n <div class=\"query-chat-bubble\">Thinking...</div>\n </div>\n </div>\n\n <div class=\"query-chat-input-wrap\">\n <textarea\n [(ngModel)]=\"documentHistoryAiService.state.queryText\"\n (keydown)=\"onQueryEnter($event)\"\n class=\"query-chat-input\"\n rows=\"3\"\n placeholder=\"Type your question\"\n ></textarea>\n <button type=\"button\" class=\"query-send-btn\" [disabled]=\"documentHistoryAiService.state.queryLoading || !documentHistoryAiService.state.queryText.trim()\" (click)=\"sendQuery()\">\n Send\n </button>\n </div>\n </ng-container>\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{padding:1rem .5rem}.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: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { 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: i9$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i9$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: HasPermissionDirective, selector: "[permission]", inputs: ["permission"] }] });
|
|
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"] }] });
|
|
7369
7434
|
}
|
|
7370
7435
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryComponent, decorators: [{
|
|
7371
7436
|
type: Component,
|
|
7372
|
-
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\n *ngIf=\"isDocumentIntelligence\"\n [(visible)]=\"documentHistoryAiService.state.showAiSidebar\"\n position=\"right\"\n [style]=\"{ width: '420px' }\"\n [dismissible]=\"true\"\n [showCloseIcon]=\"true\"\n [appendTo]=\"'body'\"\n>\n <ng-template pTemplate=\"header\">\n <h3 class=\"ai-sidebar-title\">{{ documentHistoryAiService.state.aiSidebarHeader }}</h3>\n </ng-template>\n\n <div class=\"ai-sidebar-content\">\n <ng-container *ngIf=\"documentHistoryAiService.state.aiSidebarHeader === 'Query'\">\n <p class=\"ai-sidebar-error\" *ngIf=\"documentHistoryAiService.state.aiError\">{{ documentHistoryAiService.state.aiError }}</p>\n\n <div class=\"query-chat-messages\">\n <div class=\"query-chat-empty\" *ngIf=\"documentHistoryAiService.state.queryMessages.length === 0 && !documentHistoryAiService.state.queryLoading\">\n Ask anything about this document.\n </div>\n\n <div *ngFor=\"let message of documentHistoryAiService.state.queryMessages\" class=\"query-chat-message\" [ngClass]=\"message.role\">\n <div class=\"query-chat-bubble\">\n <span *ngIf=\"message.role === 'user'\">{{ message.content }}</span>\n <div *ngIf=\"message.role === 'assistant'\" class=\"ai-markdown\" [innerHTML]=\"message.htmlContent\"></div>\n </div>\n </div>\n\n <div class=\"query-chat-message assistant\" *ngIf=\"documentHistoryAiService.state.queryLoading\">\n <div class=\"query-chat-bubble\">Thinking...</div>\n </div>\n </div>\n\n <div class=\"query-chat-input-wrap\">\n <textarea\n [(ngModel)]=\"documentHistoryAiService.state.queryText\"\n (keydown)=\"onQueryEnter($event)\"\n class=\"query-chat-input\"\n rows=\"3\"\n placeholder=\"Type your question\"\n ></textarea>\n <button type=\"button\" class=\"query-send-btn\" [disabled]=\"documentHistoryAiService.state.queryLoading || !documentHistoryAiService.state.queryText.trim()\" (click)=\"sendQuery()\">\n Send\n </button>\n </div>\n </ng-container>\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{padding:1rem .5rem}.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"] }]
|
|
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"] }]
|
|
7373
7438
|
}], ctorParameters: () => [{ type: DocumentHistoryService }, { type: DocumentViewerService }, { type: DocumentActionsService }, { type: i3.ConfirmationService }, { type: DocumentHttpService }, { type: DocumentHistoryAiService }], propDecorators: { historyData: [{
|
|
7374
7439
|
type: Input
|
|
7375
7440
|
}], showHistory: [{
|
|
@@ -11002,7 +11067,8 @@ class DocumentModule {
|
|
|
11002
11067
|
/**
|
|
11003
11068
|
* A component to request a document (without upload), with description.
|
|
11004
11069
|
*/
|
|
11005
|
-
RequestDocumentComponent
|
|
11070
|
+
RequestDocumentComponent,
|
|
11071
|
+
DocumentAiChatComponent], imports: [
|
|
11006
11072
|
/**
|
|
11007
11073
|
* Angular's CommonModule is imported to access common directives like `ngIf` and `ngFor`.
|
|
11008
11074
|
*/
|
|
@@ -11131,7 +11197,8 @@ class DocumentModule {
|
|
|
11131
11197
|
* A sidebar component for content projection.
|
|
11132
11198
|
*/
|
|
11133
11199
|
SidebarComponent,
|
|
11134
|
-
RequestDocumentComponent
|
|
11200
|
+
RequestDocumentComponent,
|
|
11201
|
+
DocumentAiChatComponent] });
|
|
11135
11202
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentModule, providers: [
|
|
11136
11203
|
/**
|
|
11137
11204
|
* Provide the messageservice to be used in other components.
|
|
@@ -11333,6 +11400,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
11333
11400
|
* A component to request a document (without upload), with description.
|
|
11334
11401
|
*/
|
|
11335
11402
|
RequestDocumentComponent,
|
|
11403
|
+
DocumentAiChatComponent,
|
|
11336
11404
|
],
|
|
11337
11405
|
imports: [
|
|
11338
11406
|
/**
|
|
@@ -11466,6 +11534,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
11466
11534
|
*/
|
|
11467
11535
|
SidebarComponent,
|
|
11468
11536
|
RequestDocumentComponent,
|
|
11537
|
+
DocumentAiChatComponent,
|
|
11469
11538
|
],
|
|
11470
11539
|
providers: [
|
|
11471
11540
|
/**
|
|
@@ -11897,5 +11966,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
11897
11966
|
* Generated bundle index. Do not edit.
|
|
11898
11967
|
*/
|
|
11899
11968
|
|
|
11900
|
-
export { COUNTRIES, ConfirmationDialogComponent, CsvParserService, DOCUMENTTYPES, DUMMYDOCUMENTLIST, DUMMYSUMMARY, DUMMY_DOCUMENT_SECTIONS, DocumentActionsComponent, DocumentAlertList, DocumentContainerComponent, DocumentContentTypeService, DocumentContentViewerComponent, DocumentDirective, DocumentHistoryComponent, DocumentListComponent, DocumentModule, DocumentSearchComponent, DocumentTableBuilderService, DocumentUploadComponent, DocumentViewerComponent, DocumentZoomControlsComponent, DocumentZoomService, EmlParserService, ExcelParserService, HasPermissionDirective, OPEN_DOCUMENT_EXTENSIONS, RequestDocumentComponent, SAMPLE_STATUS_DATA, SHARED, SUPPORTED_IMAGE_TYPES, SharedModule, SidebarComponent, TablePrimaryComponent, USERLIST };
|
|
11969
|
+
export { COUNTRIES, ConfirmationDialogComponent, CsvParserService, DOCUMENTTYPES, DUMMYDOCUMENTLIST, DUMMYSUMMARY, DUMMY_DOCUMENT_SECTIONS, DocumentActionsComponent, DocumentAiChatComponent, DocumentAlertList, DocumentContainerComponent, DocumentContentTypeService, DocumentContentViewerComponent, DocumentDirective, DocumentHistoryComponent, DocumentListComponent, DocumentModule, DocumentSearchComponent, DocumentTableBuilderService, DocumentUploadComponent, DocumentViewerComponent, DocumentZoomControlsComponent, DocumentZoomService, EmlParserService, ExcelParserService, HasPermissionDirective, OPEN_DOCUMENT_EXTENSIONS, RequestDocumentComponent, SAMPLE_STATUS_DATA, SHARED, SUPPORTED_IMAGE_TYPES, SharedModule, SidebarComponent, TablePrimaryComponent, USERLIST };
|
|
11901
11970
|
//# sourceMappingURL=cat-documents-ng.mjs.map
|