cat-documents-ng 1.0.47 → 1.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, EventEmitter, Output, ViewChild, Input, ViewEncapsulation, Component,
|
|
2
|
+
import { Injectable, EventEmitter, Output, ViewChild, Input, ViewEncapsulation, Component, HostListener, Directive, ChangeDetectionStrategy, NgModule, APP_INITIALIZER, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
3
3
|
import * as i2$1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { firstValueFrom, of, catchError, throwError, EMPTY, tap, combineLatest, Subject, Observable, takeUntil, Subscription, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1, BehaviorSubject } from 'rxjs';
|
|
@@ -4393,261 +4393,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
4393
4393
|
type: Output
|
|
4394
4394
|
}] } });
|
|
4395
4395
|
|
|
4396
|
-
class UserListService {
|
|
4397
|
-
documentStore;
|
|
4398
|
-
documentQuery;
|
|
4399
|
-
constructor(documentStore, documentQuery) {
|
|
4400
|
-
this.documentStore = documentStore;
|
|
4401
|
-
this.documentQuery = documentQuery;
|
|
4402
|
-
}
|
|
4403
|
-
getInitials(name) {
|
|
4404
|
-
if (!name || name.trim() === SHARED.EMPTY) {
|
|
4405
|
-
return SHARED.EMPTY;
|
|
4406
|
-
}
|
|
4407
|
-
const words = name.trim().split(SHARED.EMPTY_SPACE).filter(word => word.length > SHARED.INITIAL_COUNT);
|
|
4408
|
-
if (words.length === 1) {
|
|
4409
|
-
return words[0].substring(0, 2).toUpperCase();
|
|
4410
|
-
}
|
|
4411
|
-
else if (words.length >= 2) {
|
|
4412
|
-
const firstWord = words[0];
|
|
4413
|
-
const lastWord = words[words.length - 1];
|
|
4414
|
-
return (firstWord.charAt(0) + lastWord.charAt(0)).toUpperCase();
|
|
4415
|
-
}
|
|
4416
|
-
return SHARED.EMPTY;
|
|
4417
|
-
}
|
|
4418
|
-
getColorByIndex(index) {
|
|
4419
|
-
const colors = SHARED.COLORS;
|
|
4420
|
-
return colors[index % colors.length];
|
|
4421
|
-
}
|
|
4422
|
-
getColorValue(colorName) {
|
|
4423
|
-
const colorMap = SHARED.COLOR_MAP;
|
|
4424
|
-
return colorMap[colorName] || SHARED.DEFAULT_COLOR;
|
|
4425
|
-
}
|
|
4426
|
-
processUserData(userList) {
|
|
4427
|
-
return userList.map((user, index) => ({
|
|
4428
|
-
...user,
|
|
4429
|
-
initials: this.getInitials(user.name),
|
|
4430
|
-
color: this.getColorByIndex(index)
|
|
4431
|
-
}));
|
|
4432
|
-
}
|
|
4433
|
-
/**
|
|
4434
|
-
* Filters user list based on selected menu item category
|
|
4435
|
-
* @param userList - The complete user list
|
|
4436
|
-
* @param categories - The document categories
|
|
4437
|
-
* @returns Filtered user list
|
|
4438
|
-
*/
|
|
4439
|
-
filterUsersByCategory(userList, categories) {
|
|
4440
|
-
return userList;
|
|
4441
|
-
}
|
|
4442
|
-
selectUser(userId, userData) {
|
|
4443
|
-
const user = userData.find(u => u._id === userId);
|
|
4444
|
-
if (user) {
|
|
4445
|
-
this.documentStore.setSelectedUserId(userId);
|
|
4446
|
-
return { selectedUser: user.name, name: user.name };
|
|
4447
|
-
}
|
|
4448
|
-
return { selectedUser: undefined, name: undefined };
|
|
4449
|
-
}
|
|
4450
|
-
unselectUser() {
|
|
4451
|
-
this.documentStore.setSelectedUserId(null);
|
|
4452
|
-
}
|
|
4453
|
-
isUserSelected(userId, userData, selectedUser) {
|
|
4454
|
-
return selectedUser === userData.find(u => u._id === userId)?.name;
|
|
4455
|
-
}
|
|
4456
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListService, deps: [{ token: DocumentStore }, { token: DocumentQuery }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4457
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListService, providedIn: 'root' });
|
|
4458
|
-
}
|
|
4459
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListService, decorators: [{
|
|
4460
|
-
type: Injectable,
|
|
4461
|
-
args: [{
|
|
4462
|
-
providedIn: 'root'
|
|
4463
|
-
}]
|
|
4464
|
-
}], ctorParameters: () => [{ type: DocumentStore }, { type: DocumentQuery }] });
|
|
4465
|
-
|
|
4466
|
-
class UserListComponent {
|
|
4467
|
-
documentService;
|
|
4468
|
-
documentStore;
|
|
4469
|
-
documentQuery;
|
|
4470
|
-
userListService;
|
|
4471
|
-
cdr;
|
|
4472
|
-
userList = SHARED.EMPTY_ARRAY;
|
|
4473
|
-
categories = SHARED.EMPTY_ARRAY;
|
|
4474
|
-
userSelected = new EventEmitter();
|
|
4475
|
-
userData = SHARED.EMPTY_ARRAY;
|
|
4476
|
-
filteredUserData = SHARED.EMPTY_ARRAY;
|
|
4477
|
-
selectedUser;
|
|
4478
|
-
shouldShowContainer = true;
|
|
4479
|
-
userListSubscription = new Subscription();
|
|
4480
|
-
categoriesSubscription = new Subscription();
|
|
4481
|
-
constructor(documentService, documentStore, documentQuery, userListService, cdr) {
|
|
4482
|
-
this.documentService = documentService;
|
|
4483
|
-
this.documentStore = documentStore;
|
|
4484
|
-
this.documentQuery = documentQuery;
|
|
4485
|
-
this.userListService = userListService;
|
|
4486
|
-
this.cdr = cdr;
|
|
4487
|
-
}
|
|
4488
|
-
ngOnChanges(changes) {
|
|
4489
|
-
if (changes[SHARED.USER_LIST] && !changes[SHARED.USER_LIST].firstChange) {
|
|
4490
|
-
this.initializeUserData();
|
|
4491
|
-
}
|
|
4492
|
-
if (changes[SHARED.CATEGORIES] && !changes[SHARED.CATEGORIES].firstChange) {
|
|
4493
|
-
this.updateFilteredUserData();
|
|
4494
|
-
}
|
|
4495
|
-
}
|
|
4496
|
-
initializeUserData() {
|
|
4497
|
-
if (this.userList && this.userList.length > 0) {
|
|
4498
|
-
this.userData = this.userListService.processUserData(this.userList);
|
|
4499
|
-
this.updateFilteredUserData();
|
|
4500
|
-
}
|
|
4501
|
-
}
|
|
4502
|
-
updateFilteredUserData() {
|
|
4503
|
-
if (this.userData.length > 0 && this.categories.length > 0) {
|
|
4504
|
-
this.filteredUserData = this.userListService.filterUsersByCategory(this.userData, this.categories);
|
|
4505
|
-
this.shouldShowContainer = true;
|
|
4506
|
-
if (this.selectedUser) {
|
|
4507
|
-
const selectedUserInFiltered = this.filteredUserData.find(user => user.name === this.selectedUser);
|
|
4508
|
-
if (!selectedUserInFiltered) {
|
|
4509
|
-
this.selectedUser = undefined;
|
|
4510
|
-
this.documentStore.setSelectedUserId(null);
|
|
4511
|
-
this.userSelected.emit(SHARED.EMPTY);
|
|
4512
|
-
}
|
|
4513
|
-
}
|
|
4514
|
-
}
|
|
4515
|
-
else {
|
|
4516
|
-
this.filteredUserData = this.userData;
|
|
4517
|
-
this.shouldShowContainer = true;
|
|
4518
|
-
}
|
|
4519
|
-
}
|
|
4520
|
-
ngOnInit() {
|
|
4521
|
-
this.initializeUserData();
|
|
4522
|
-
this.userListSubscription.add(this.documentQuery.selectUserList().subscribe(userList => {
|
|
4523
|
-
if (userList && userList.length > 0) {
|
|
4524
|
-
this.userList = userList;
|
|
4525
|
-
this.initializeUserData();
|
|
4526
|
-
this.cdr.markForCheck();
|
|
4527
|
-
}
|
|
4528
|
-
}));
|
|
4529
|
-
this.categoriesSubscription.add(this.documentQuery.selectDocumentCategories().subscribe(categories => {
|
|
4530
|
-
if (categories && categories.length > 0) {
|
|
4531
|
-
this.categories = categories;
|
|
4532
|
-
this.updateFilteredUserData();
|
|
4533
|
-
this.cdr.markForCheck();
|
|
4534
|
-
}
|
|
4535
|
-
}));
|
|
4536
|
-
this.userListSubscription.add(this.documentQuery.selectDocumentListResponse().subscribe(() => {
|
|
4537
|
-
const currentUserList = this.documentQuery.getUserList();
|
|
4538
|
-
if (currentUserList && currentUserList.length > 0) {
|
|
4539
|
-
this.userList = currentUserList;
|
|
4540
|
-
this.initializeUserData();
|
|
4541
|
-
this.cdr.markForCheck();
|
|
4542
|
-
}
|
|
4543
|
-
}));
|
|
4544
|
-
this.documentQuery.selectSelectedUserId().subscribe(userId => {
|
|
4545
|
-
if (userId) {
|
|
4546
|
-
const user = this.userData.find(u => u._id === userId);
|
|
4547
|
-
this.selectedUser = user ? user.name : undefined;
|
|
4548
|
-
}
|
|
4549
|
-
else {
|
|
4550
|
-
this.selectedUser = undefined;
|
|
4551
|
-
}
|
|
4552
|
-
this.cdr.markForCheck();
|
|
4553
|
-
});
|
|
4554
|
-
this.documentQuery.selectShowUserList().subscribe(show => {
|
|
4555
|
-
if (!show && this.selectedUser) {
|
|
4556
|
-
this.selectedUser = undefined;
|
|
4557
|
-
this.userSelected.emit(SHARED.EMPTY);
|
|
4558
|
-
}
|
|
4559
|
-
});
|
|
4560
|
-
}
|
|
4561
|
-
onUserSelect(username, id) {
|
|
4562
|
-
if (this.selectedUser === username) {
|
|
4563
|
-
this.selectedUser = undefined;
|
|
4564
|
-
this.userListService.unselectUser();
|
|
4565
|
-
this.userSelected.emit(SHARED.EMPTY);
|
|
4566
|
-
}
|
|
4567
|
-
else {
|
|
4568
|
-
this.selectedUser = username;
|
|
4569
|
-
this.documentStore.setSelectedUserId(id);
|
|
4570
|
-
this.userSelected.emit(username);
|
|
4571
|
-
}
|
|
4572
|
-
}
|
|
4573
|
-
getAvatarColor(color) {
|
|
4574
|
-
if (!color) {
|
|
4575
|
-
return SHARED.DEFAULT_COLOR;
|
|
4576
|
-
}
|
|
4577
|
-
return SHARED.COLOR_MAP[color] || SHARED.DEFAULT_COLOR;
|
|
4578
|
-
}
|
|
4579
|
-
ngOnDestroy() {
|
|
4580
|
-
this.userListSubscription.unsubscribe();
|
|
4581
|
-
this.categoriesSubscription.unsubscribe();
|
|
4582
|
-
}
|
|
4583
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListComponent, deps: [{ token: DocumentHelperService }, { token: DocumentStore }, { token: DocumentQuery }, { token: UserListService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4584
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UserListComponent, isStandalone: false, selector: "lib-user-list", inputs: { userList: "userList", categories: "categories" }, outputs: { userSelected: "userSelected" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"user-list-container\" [@slideInFromTop]>\r\n <div class=\"user-cards\">\r\n <div \r\n *ngFor=\"let user of filteredUserData\" \r\n class=\"user-card\"\r\n [class.selected]=\"selectedUser === user.name\"\r\n [style.border-color]=\"selectedUser === user.name ? getAvatarColor(user.color) : 'transparent'\"\r\n (click)=\"onUserSelect(user.name, user._id)\"\r\n >\r\n @if(user.name === \"Application Docs\"){\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\"><i class=\"pi pi-user\"></i></span>\r\n </div>\r\n }@else {\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\">{{ user.initials }}</span>\r\n </div>\r\n }\r\n <div class=\"user-info\">\r\n <div class=\"username\">{{ user.name }}</div>\r\n <div class=\"document-counts\">\r\n <span style=\"color : #16A34A;\"> {{ user.approved }} approved </span><span>/ {{ user.pending }} outstanding</span>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n <!-- Show message when filtered list is empty -->\r\n <div *ngIf=\"filteredUserData.length === 0 && shouldShowContainer\" class=\"no-users-message\" [@slideInFromTop]>\r\n <p>No users available for this category.</p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".user-list-container{padding:1rem 1rem .5rem}.user-cards{display:flex;flex-wrap:wrap;transition:all .3s ease-in-out}.user-card{display:flex;align-items:center;gap:.75rem;padding:1rem;border:2px solid transparent;border-radius:8px;cursor:pointer;transition:all .2s ease;background:#fff;min-width:140px;max-width:300px;height:70px;position:relative;flex-shrink:0}.user-card:hover{box-shadow:0 4px 8px #00000026}.user-card.selected{background-color:#f8fafc;box-shadow:0 4px 8px #00000026;border-width:2px}.user-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;color:#fff;font-size:14px;flex-shrink:0;font-weight:400}.avatar-orange{background-color:#fef3c7;color:#b45309}.avatar-blue{background-color:#dbeafe;color:#1d4ed8}.avatar-green{background-color:#22c55e1a;color:#36aa86}.avatar-grey{background-color:#ebeced;color:#5b6676}.avatar-purple{background-color:#3b82f61a;color:#3b82f6}.user-info{flex:1;min-width:0;overflow:hidden}.username{font-weight:600;color:#1f2937;margin-bottom:.25rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2}.document-counts{font-size:.875rem;color:#6b7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.35;padding-bottom:2px}.selection-indicator{position:absolute;top:8px;right:8px;width:20px;height:20px;background-color:#10b981;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px;flex-shrink:0}.no-users-message{display:flex;justify-content:center;align-items:center;padding:2rem;background:#f8fafc;border-radius:8px;border:2px dashed #d1d5db;margin:1rem 0}.no-users-message p{color:#6b7280;font-size:.875rem;font-weight:500;margin:0;text-align:center}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [
|
|
4585
|
-
trigger('slideInFromTop', [
|
|
4586
|
-
state('void', style({
|
|
4587
|
-
opacity: 0,
|
|
4588
|
-
transform: 'translateY(-10px)'
|
|
4589
|
-
})),
|
|
4590
|
-
state('*', style({
|
|
4591
|
-
opacity: 1,
|
|
4592
|
-
transform: 'translateY(0)'
|
|
4593
|
-
})),
|
|
4594
|
-
transition('void => *', [
|
|
4595
|
-
animate('300ms ease-out')
|
|
4596
|
-
])
|
|
4597
|
-
]),
|
|
4598
|
-
trigger('fadeIn', [
|
|
4599
|
-
state('void', style({
|
|
4600
|
-
opacity: 0,
|
|
4601
|
-
transform: 'scale(0.8)'
|
|
4602
|
-
})),
|
|
4603
|
-
state('*', style({
|
|
4604
|
-
opacity: 1,
|
|
4605
|
-
transform: 'scale(1)'
|
|
4606
|
-
})),
|
|
4607
|
-
transition('void => *', [
|
|
4608
|
-
animate('200ms ease-in-out')
|
|
4609
|
-
])
|
|
4610
|
-
])
|
|
4611
|
-
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4612
|
-
}
|
|
4613
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListComponent, decorators: [{
|
|
4614
|
-
type: Component,
|
|
4615
|
-
args: [{ selector: 'lib-user-list', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, animations: [
|
|
4616
|
-
trigger('slideInFromTop', [
|
|
4617
|
-
state('void', style({
|
|
4618
|
-
opacity: 0,
|
|
4619
|
-
transform: 'translateY(-10px)'
|
|
4620
|
-
})),
|
|
4621
|
-
state('*', style({
|
|
4622
|
-
opacity: 1,
|
|
4623
|
-
transform: 'translateY(0)'
|
|
4624
|
-
})),
|
|
4625
|
-
transition('void => *', [
|
|
4626
|
-
animate('300ms ease-out')
|
|
4627
|
-
])
|
|
4628
|
-
]),
|
|
4629
|
-
trigger('fadeIn', [
|
|
4630
|
-
state('void', style({
|
|
4631
|
-
opacity: 0,
|
|
4632
|
-
transform: 'scale(0.8)'
|
|
4633
|
-
})),
|
|
4634
|
-
state('*', style({
|
|
4635
|
-
opacity: 1,
|
|
4636
|
-
transform: 'scale(1)'
|
|
4637
|
-
})),
|
|
4638
|
-
transition('void => *', [
|
|
4639
|
-
animate('200ms ease-in-out')
|
|
4640
|
-
])
|
|
4641
|
-
])
|
|
4642
|
-
], template: "<div class=\"user-list-container\" [@slideInFromTop]>\r\n <div class=\"user-cards\">\r\n <div \r\n *ngFor=\"let user of filteredUserData\" \r\n class=\"user-card\"\r\n [class.selected]=\"selectedUser === user.name\"\r\n [style.border-color]=\"selectedUser === user.name ? getAvatarColor(user.color) : 'transparent'\"\r\n (click)=\"onUserSelect(user.name, user._id)\"\r\n >\r\n @if(user.name === \"Application Docs\"){\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\"><i class=\"pi pi-user\"></i></span>\r\n </div>\r\n }@else {\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\">{{ user.initials }}</span>\r\n </div>\r\n }\r\n <div class=\"user-info\">\r\n <div class=\"username\">{{ user.name }}</div>\r\n <div class=\"document-counts\">\r\n <span style=\"color : #16A34A;\"> {{ user.approved }} approved </span><span>/ {{ user.pending }} outstanding</span>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n <!-- Show message when filtered list is empty -->\r\n <div *ngIf=\"filteredUserData.length === 0 && shouldShowContainer\" class=\"no-users-message\" [@slideInFromTop]>\r\n <p>No users available for this category.</p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".user-list-container{padding:1rem 1rem .5rem}.user-cards{display:flex;flex-wrap:wrap;transition:all .3s ease-in-out}.user-card{display:flex;align-items:center;gap:.75rem;padding:1rem;border:2px solid transparent;border-radius:8px;cursor:pointer;transition:all .2s ease;background:#fff;min-width:140px;max-width:300px;height:70px;position:relative;flex-shrink:0}.user-card:hover{box-shadow:0 4px 8px #00000026}.user-card.selected{background-color:#f8fafc;box-shadow:0 4px 8px #00000026;border-width:2px}.user-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;color:#fff;font-size:14px;flex-shrink:0;font-weight:400}.avatar-orange{background-color:#fef3c7;color:#b45309}.avatar-blue{background-color:#dbeafe;color:#1d4ed8}.avatar-green{background-color:#22c55e1a;color:#36aa86}.avatar-grey{background-color:#ebeced;color:#5b6676}.avatar-purple{background-color:#3b82f61a;color:#3b82f6}.user-info{flex:1;min-width:0;overflow:hidden}.username{font-weight:600;color:#1f2937;margin-bottom:.25rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2}.document-counts{font-size:.875rem;color:#6b7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.35;padding-bottom:2px}.selection-indicator{position:absolute;top:8px;right:8px;width:20px;height:20px;background-color:#10b981;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px;flex-shrink:0}.no-users-message{display:flex;justify-content:center;align-items:center;padding:2rem;background:#f8fafc;border-radius:8px;border:2px dashed #d1d5db;margin:1rem 0}.no-users-message p{color:#6b7280;font-size:.875rem;font-weight:500;margin:0;text-align:center}\n"] }]
|
|
4643
|
-
}], ctorParameters: () => [{ type: DocumentHelperService }, { type: DocumentStore }, { type: DocumentQuery }, { type: UserListService }, { type: i0.ChangeDetectorRef }], propDecorators: { userList: [{
|
|
4644
|
-
type: Input
|
|
4645
|
-
}], categories: [{
|
|
4646
|
-
type: Input
|
|
4647
|
-
}], userSelected: [{
|
|
4648
|
-
type: Output
|
|
4649
|
-
}] } });
|
|
4650
|
-
|
|
4651
4396
|
class StatusCalculatorService {
|
|
4652
4397
|
calculateTotalCount(statusData) {
|
|
4653
4398
|
return statusData?.reduce((total, status) => total + (status.count ?? 0), 0) || 0;
|
|
@@ -5464,7 +5209,7 @@ class FolderContainerComponent {
|
|
|
5464
5209
|
}
|
|
5465
5210
|
}
|
|
5466
5211
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FolderContainerComponent, deps: [{ token: DocumentQuery }, { token: DocumentHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5467
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FolderContainerComponent, isStandalone: false, selector: "lib-folder-container", inputs: { documentList: "documentList", folderList: "folderList", contextId: "contextId", userList: "userList", statusData: "statusData", categories: "categories" }, viewQueries: [{ propertyName: "documentUploadComponent", first: true, predicate: DocumentUploadComponent, descendants: true }, { propertyName: "uploadSidebarComponent", first: true, predicate: ["uploadSidebar"], descendants: true }, { propertyName: "requestSidebarComponent", first: true, predicate: ["requestSidebar"], descendants: true }, { propertyName: "requestDocumentComponent", first: true, predicate: RequestDocumentComponent, descendants: true }], ngImport: i0, template: "\r\n<document-search [contextId]=\"contextId\" (onActionClick)=\"openDocumentUploadSidebar()\" (onRequestClick)=\"openRequestDocumentSidebar()\"></document-search>\r\n<div class=\"user-list-wrapper\" [@slideInOut]=\"userListAnimationState\">\r\n <lib-user-list [userList]=\"userList\" [categories]=\"categories\"></lib-user-list
|
|
5212
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FolderContainerComponent, isStandalone: false, selector: "lib-folder-container", inputs: { documentList: "documentList", folderList: "folderList", contextId: "contextId", userList: "userList", statusData: "statusData", categories: "categories" }, viewQueries: [{ propertyName: "documentUploadComponent", first: true, predicate: DocumentUploadComponent, descendants: true }, { propertyName: "uploadSidebarComponent", first: true, predicate: ["uploadSidebar"], descendants: true }, { propertyName: "requestSidebarComponent", first: true, predicate: ["requestSidebar"], descendants: true }, { propertyName: "requestDocumentComponent", first: true, predicate: RequestDocumentComponent, descendants: true }], ngImport: i0, template: "\r\n<document-search [contextId]=\"contextId\" (onActionClick)=\"openDocumentUploadSidebar()\" (onRequestClick)=\"openRequestDocumentSidebar()\"></document-search>\r\n<div class=\"user-list-wrapper\" [@slideInOut]=\"userListAnimationState\">\r\n <!-- <lib-user-list [userList]=\"userList\" [categories]=\"categories\"></lib-user-list> -->\r\n</div>\r\n<lib-document-status [contextId]=\"contextId\" [statusData]=\"statusData\"></lib-document-status>\r\n\r\n<!-- Document Upload Sidebar -->\r\n<lib-sidebar\r\n #uploadSidebar\r\n [(visible)]=\"isDocumentUploadSidebarOpen\"\r\n position=\"right\"\r\n width=\"600px\"\r\n title=\"Upload Documents\"\r\n [showCloseButton]=\"true\"\r\n [showSaveButton]=\"true\"\r\n [saveButtonText]=\"'Save'\"\r\n [saveButtonDisabled]=\"isSaveButtonDisabled\"\r\n [successMessage]=\"'Document Saved Successfully'\"\r\n [hasUnsavedChanges]=\"hasUnsavedChanges\"\r\n (onHide)=\"onDocumentUploadSidebarHide()\"\r\n (onSave)=\"onDocumentUploadSave()\"\r\n (onClose)=\"onDocumentUploadSidebarCloseWithUnsavedChanges()\"\r\n>\r\n <lib-document-upload \r\n [contextId]=\"contextId\" \r\n (onFormValidationChange)=\"onFormValidationChange()\" \r\n (onUploadSuccess)=\"onDocumentUploadSuccess()\"\r\n (onUploadError)=\"onDocumentUploadError($event)\"\r\n ></lib-document-upload>\r\n</lib-sidebar>\r\n\r\n<lib-sidebar\r\n #requestSidebar\r\n [(visible)]=\"isRequestDocumentSidebarOpen\"\r\n position=\"right\"\r\n width=\"600px\"\r\n title=\"Request Document\"\r\n [showCloseButton]=\"true\"\r\n [showSaveButton]=\"true\"\r\n [saveButtonText]=\"'Save'\"\r\n [successMessage]=\"'Document Requested'\"\r\n [saveButtonDisabled]=\"isRequestSaveButtonDisabled\"\r\n [hasUnsavedChanges]=\"requestHasUnsavedChanges\"\r\n (onHide)=\"onRequestDocumentSidebarHide()\"\r\n (onSave)=\"onRequestDocumentSave()\"\r\n (onClose)=\"onRequestDocumentSidebarCloseWithUnsavedChanges()\"\r\n>\r\n <lib-request-document\r\n [contextId]=\"contextId\"\r\n (onFormValidationChange)=\"onRequestFormValidationChange()\"\r\n (onRequestSuccess)=\"onRequestDocumentSuccess()\"\r\n (onRequestError)=\"onRequestDocumentError($event)\"\r\n (hasUnsavedChangesChange)=\"onRequestUnsavedChange($event)\"\r\n ></lib-request-document>\r\n</lib-sidebar>", styles: [".user-list-wrapper{overflow:hidden;margin-bottom:1rem}.user-list-wrapper ::ng-deep *{transition:opacity .2s ease-in-out}.user-list-wrapper.ng-animating{pointer-events:none}::ng-deep lib-user-list{display:block;width:100%}\n"], dependencies: [{ kind: "component", type: DocumentUploadComponent, selector: "lib-document-upload", inputs: ["contextId", "isDocumentSaveBtnClicked", "isDocumentSidebarClosed", "isFormHide", "isMultiAttachmentHidden"], outputs: ["onFormValidationChange", "onUploadSuccess", "onFilesUploaded", "hasUnsavedChangesChange", "onFileRemoved"] }, { kind: "component", type: DocumentStatusComponent, selector: "lib-document-status", inputs: ["contextId", "statusData"] }, { kind: "component", type: DocumentSearchComponent, selector: "document-search", inputs: ["contextId"], outputs: ["onActionClick", "onRequestClick"] }, { kind: "component", type: SidebarComponent, selector: "lib-sidebar", inputs: ["visible", "position", "width", "title", "showCloseButton", "modal", "dismissible", "styleClass", "appendTo", "blockScroll", "closeIcon", "showSaveButton", "saveButtonText", "saveButtonDisabled", "successMessage", "errorMessage", "hasUnsavedChanges"], outputs: ["visibleChange", "onShow", "onHide", "onSave", "onClose"] }, { kind: "component", type: RequestDocumentComponent, selector: "lib-request-document", inputs: ["contextId", "isRequestSaveBtnClicked", "isRequestSidebarClosed"], outputs: ["onFormValidationChange", "onRequestSuccess", "onRequestError", "hasUnsavedChangesChange"] }], animations: [
|
|
5468
5213
|
trigger('slideInOut', [
|
|
5469
5214
|
state('visible', style({
|
|
5470
5215
|
height: '*',
|
|
@@ -5518,7 +5263,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
5518
5263
|
animate('300ms cubic-bezier(0.0, 0.0, 0.2, 1)')
|
|
5519
5264
|
])
|
|
5520
5265
|
])
|
|
5521
|
-
], template: "\r\n<document-search [contextId]=\"contextId\" (onActionClick)=\"openDocumentUploadSidebar()\" (onRequestClick)=\"openRequestDocumentSidebar()\"></document-search>\r\n<div class=\"user-list-wrapper\" [@slideInOut]=\"userListAnimationState\">\r\n <lib-user-list [userList]=\"userList\" [categories]=\"categories\"></lib-user-list
|
|
5266
|
+
], template: "\r\n<document-search [contextId]=\"contextId\" (onActionClick)=\"openDocumentUploadSidebar()\" (onRequestClick)=\"openRequestDocumentSidebar()\"></document-search>\r\n<div class=\"user-list-wrapper\" [@slideInOut]=\"userListAnimationState\">\r\n <!-- <lib-user-list [userList]=\"userList\" [categories]=\"categories\"></lib-user-list> -->\r\n</div>\r\n<lib-document-status [contextId]=\"contextId\" [statusData]=\"statusData\"></lib-document-status>\r\n\r\n<!-- Document Upload Sidebar -->\r\n<lib-sidebar\r\n #uploadSidebar\r\n [(visible)]=\"isDocumentUploadSidebarOpen\"\r\n position=\"right\"\r\n width=\"600px\"\r\n title=\"Upload Documents\"\r\n [showCloseButton]=\"true\"\r\n [showSaveButton]=\"true\"\r\n [saveButtonText]=\"'Save'\"\r\n [saveButtonDisabled]=\"isSaveButtonDisabled\"\r\n [successMessage]=\"'Document Saved Successfully'\"\r\n [hasUnsavedChanges]=\"hasUnsavedChanges\"\r\n (onHide)=\"onDocumentUploadSidebarHide()\"\r\n (onSave)=\"onDocumentUploadSave()\"\r\n (onClose)=\"onDocumentUploadSidebarCloseWithUnsavedChanges()\"\r\n>\r\n <lib-document-upload \r\n [contextId]=\"contextId\" \r\n (onFormValidationChange)=\"onFormValidationChange()\" \r\n (onUploadSuccess)=\"onDocumentUploadSuccess()\"\r\n (onUploadError)=\"onDocumentUploadError($event)\"\r\n ></lib-document-upload>\r\n</lib-sidebar>\r\n\r\n<lib-sidebar\r\n #requestSidebar\r\n [(visible)]=\"isRequestDocumentSidebarOpen\"\r\n position=\"right\"\r\n width=\"600px\"\r\n title=\"Request Document\"\r\n [showCloseButton]=\"true\"\r\n [showSaveButton]=\"true\"\r\n [saveButtonText]=\"'Save'\"\r\n [successMessage]=\"'Document Requested'\"\r\n [saveButtonDisabled]=\"isRequestSaveButtonDisabled\"\r\n [hasUnsavedChanges]=\"requestHasUnsavedChanges\"\r\n (onHide)=\"onRequestDocumentSidebarHide()\"\r\n (onSave)=\"onRequestDocumentSave()\"\r\n (onClose)=\"onRequestDocumentSidebarCloseWithUnsavedChanges()\"\r\n>\r\n <lib-request-document\r\n [contextId]=\"contextId\"\r\n (onFormValidationChange)=\"onRequestFormValidationChange()\"\r\n (onRequestSuccess)=\"onRequestDocumentSuccess()\"\r\n (onRequestError)=\"onRequestDocumentError($event)\"\r\n (hasUnsavedChangesChange)=\"onRequestUnsavedChange($event)\"\r\n ></lib-request-document>\r\n</lib-sidebar>", styles: [".user-list-wrapper{overflow:hidden;margin-bottom:1rem}.user-list-wrapper ::ng-deep *{transition:opacity .2s ease-in-out}.user-list-wrapper.ng-animating{pointer-events:none}::ng-deep lib-user-list{display:block;width:100%}\n"] }]
|
|
5522
5267
|
}], ctorParameters: () => [{ type: DocumentQuery }, { type: DocumentHelperService }], propDecorators: { documentList: [{
|
|
5523
5268
|
type: Input
|
|
5524
5269
|
}], folderList: [{
|
|
@@ -7522,11 +7267,11 @@ class DocumentHistoryComponent {
|
|
|
7522
7267
|
this.destroy$.complete();
|
|
7523
7268
|
}
|
|
7524
7269
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryComponent, deps: [{ token: DocumentHistoryService }, { token: DocumentViewerService }, { token: DocumentActionsService }, { token: i3.ConfirmationService }, { token: DocumentHttpService }, { token: DocumentHistoryAiService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7525
|
-
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\">\r\n <!-- Header Section -->\r\n <div class=\"review-header\">\r\n <div class=\"review-title-section\">\r\n <h2 class=\"review-title\">Document Review</h2>\r\n <!-- <div class=\"ai-menu\" *ngIf=\"showDocumentAiUi\">\r\n <button class=\"ai-btn\" type=\"button\" (click)=\"openAiPanel('Query')\" [class.active]=\"documentHistoryAiService.state.showAiSidebar\">\r\n <i class=\"pi pi-sparkles\"></i>\r\n <span>AI</span>\r\n </button>\r\n </div> -->\r\n </div>\r\n <!-- <div class=\"actions-menu\" *ngIf=\"selectedDocument?.isUploaded || selectedDocument?.status == 'Approved'\"> -->\r\n <!-- <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.isUploaded || selectedDocument?.status == 'Approved') && !selectedDocument?.isSystemDocument\"> -->\r\n <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.status !== 'Approved') && (!selectedDocument?.isSystemDocument)\">\r\n <button class=\"actions-btn\" (click)=\"toggleActionsMenu()\" [class.active]=\"showActionsMenu\">\r\n Actions\r\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\r\n </button>\r\n\r\n <!-- Actions Dropdown Menu -->\r\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\" (click)=\"$event.stopPropagation()\">\r\n <div class=\"dropdown-item\" *ngIf=\"selectedDocument?.status == 'Approved' || selectedDocument?.isUploaded || selectedDocument?.status == 'Uploaded'\">\r\n <ng-content [select]=\"'action-launcher'\"></ng-content>\r\n </div>\r\n <div *ngIf=\"selectedDocument?.status == 'Uploaded' || selectedDocument?.status === 'Rejected' || selectedDocument?.status === 'Reviewing' || selectedDocument?.status === 'Pending'\" [permission]=\"'documents-deleteDocumentByDocumentId'\" class=\"dropdown-item\" (click)=\"onDeleteTask()\">\r\n <span>Delete Document</span>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Document Actions Component - Below Header -->\r\n <div class=\"document-actions-section\">\r\n <ng-content select=\"[actions-component]\"></ng-content>\r\n </div>\r\n\r\n\r\n <!-- Alerts Section -->\r\n <!-- <div class=\"alerts-section\">\r\n <div class=\"alert-card\">\r\n <div class=\"alert-header\">\r\n <i class=\"pi pi-exclamation-triangle alert-icon\"></i>\r\n <span class=\"alert-text\">Alerts</span>\r\n <div class=\"alert-badge\">\r\n <span class=\"alert-count\">{{ getAlertCount() }}</span>\r\n <i class=\"pi pi-chevron-right\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <!-- Timeline Section -->\r\n <div class=\"timeline-section\">\r\n <h3 class=\"timeline-title\">Timeline</h3>\r\n <div class=\"timeline-container\">\r\n <div class=\"timeline-item\" *ngFor=\"let section of processedHistoryData\">\r\n <ng-container *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-event mb-2\" *ngIf=\"!item.shouldHide\">\r\n <div class=\"event-card\" [ngClass]=\"item.eventCardClass\">\r\n <!-- Event Header -->\r\n <div class=\"event-header\">\r\n <div class=\"event-info\">\r\n <i [class]=\"item.eventIcon\"></i>\r\n <span class=\"event-label\">{{ item.label }}</span>\r\n </div>\r\n <div class=\"event-timestamp\">{{ item.dateTime }}</div>\r\n </div>\r\n <!-- User Information -->\r\n <div class=\"event-user mb-2\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n <!-- Event Description -->\r\n <div class=\"event-description\" *ngIf=\"item.requestDescription\">\r\n <ul class=\"event-description-list\" *ngIf=\"item.label.toLowerCase().includes('requested')\">\r\n <li class=\"event-description-item\">{{ item.requestDescription }}</li>\r\n </ul>\r\n <p *ngIf=\"!item.label.toLowerCase().includes('requested')\">{{ item.requestDescription }}</p>\r\n </div>\r\n\r\n <!-- Document Upload Cards -->\r\n <!-- Commented out child document list panel functionality -->\r\n <!-- <div class=\"document-uploads\" *ngIf=\"item.documentList && item.documentList.length > 0\">\r\n <div class=\"uploaded-documents\">\r\n <div class=\"document-card\" *ngFor=\"let doc of item.documentList\" (click)=\"onDocumentClick(doc)\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <span class=\"document-name\">{{ doc.docName }}</span>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- <ng-content [select]=\"'actions-component'\"></ng-content> -->\r\n</div>\r\n\r\n<p-sidebar *ngIf=\"showDocumentAiUi\" [(visible)]=\"documentHistoryAiService.state.showAiSidebar\" position=\"right\"\r\n [style]=\"{ width: '420px' }\" styleClass=\"ai-chat-sidebar\" [dismissible]=\"true\" [showCloseIcon]=\"false\"\r\n [showHeader]=\"false\" [appendTo]=\"'body'\">\r\n\r\n <div class=\"ai-sidebar-content\">\r\n <document-ai-chat [selectedDocument]=\"selectedDocument\"></document-ai-chat>\r\n </div>\r\n</p-sidebar>", styles: [".document-review-container{border-radius:8px;max-height:100%;overflow-y:auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.document-review-container .review-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:1rem;border-bottom:1px solid #e5e7eb}.document-review-container .review-header .review-title-section{display:flex;align-items:center;gap:.75rem}.document-review-container .review-header .review-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin:0}.document-review-container .review-header .ai-menu{position:relative}.document-review-container .review-header .ai-menu .ai-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 .85rem;color:#374151;font-size:.875rem;height:40px;line-height:1;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .ai-menu .ai-btn:hover{background:#f9fafb}.document-review-container .review-header .ai-menu .ai-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .ai-menu .ai-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu{position:relative}.document-review-container .review-header .actions-menu .actions-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 1rem;height:40px;line-height:1;color:#374151;font-size:.875rem;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .actions-menu .actions-btn:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .actions-menu .actions-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu .actions-btn i.rotated{transform:rotate(180deg)}.document-review-container .review-header .actions-menu .actions-dropdown{position:absolute;top:100%;right:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:180px;margin-top:.25rem}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item{padding:.75rem 1rem;cursor:pointer;color:#374151;font-size:.875rem;border-bottom:1px solid #f3f4f6;transition:background-color .2s}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:last-child{border-bottom:none;border-radius:0 0 8px 8px}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:first-child{border-radius:8px 8px 0 0}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item span{display:block}.document-review-container ::ng-deep document-actions{margin-bottom:1.5rem}.document-review-container ::ng-deep document-actions .actions-card{margin:0;width:100%}.document-review-container .document-actions-section{padding:1rem 0}.document-review-container .alerts-section{margin-bottom:2rem}.document-review-container .alerts-section .alert-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1rem}.document-review-container .alerts-section .alert-card .alert-header{display:flex;align-items:center;gap:.75rem}.document-review-container .alerts-section .alert-card .alert-header .alert-icon{color:#ef4444;font-size:1.25rem}.document-review-container .alerts-section .alert-card .alert-header .alert-text{font-weight:500;color:#1f2937;font-size:1rem}.document-review-container .alerts-section .alert-card .alert-header .alert-badge{margin-left:auto;display:flex;align-items:center;gap:.5rem;background:#ef4444;color:#fff;border-radius:50%;width:24px;height:24px;justify-content:center;position:relative}.document-review-container .alerts-section .alert-card .alert-header .alert-badge .alert-count{font-size:.75rem;font-weight:600}.document-review-container .alerts-section .alert-card .alert-header .alert-badge i{position:absolute;right:-8px;font-size:.75rem;color:#ef4444;background:#fff;border-radius:50%;width:16px;height:16px;display:flex;align-items:center;justify-content:center}.document-review-container .timeline-section .timeline-title{font-size:1.25rem;font-weight:600;color:#1f2937;margin:0 0 1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item{margin-bottom:1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1.25rem;position:relative}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info{display:flex;align-items:center;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon{width:25px;height:25px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon i{font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-requested{background:#3b82f6}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-accepted{background:#10b981}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-rejected{background:#ef4444}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-default{background:#6b7280}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-label{font-weight:600;color:#1f2937;font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{color:#6b7280;font-size:.875rem;font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description p{color:#374151;line-height:1.5;margin:0;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents{display:flex;flex-direction:column;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:.5rem;display:flex;align-items:center;gap:.75rem;cursor:pointer;transition:all .2s ease}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:hover{background:#e2e8f0;border-color:#3b82f6;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:active{transform:translateY(0);box-shadow:0 1px 2px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-icon{color:#3b82f6;font-size:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-name{color:#1f2937;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user{font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-name{color:rgb(75,85,99,var(--tw-text-opacity, 1));font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-role{color:#6b7280;margin-left:.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-requested{background:#dbeafe;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-accepted{background:#dcfce7;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-rejected{background:#fee2e2;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-default{border-left:4px solid #6b7280}@media (max-width: 768px){.document-review-container{padding:1rem}.document-review-container .review-header{flex-direction:column;gap:1rem;align-items:flex-start}.document-review-container .review-header .actions-menu{align-self:flex-end}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{flex-direction:column;align-items:flex-start;gap:.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{align-self:flex-end}}.ai-sidebar-title{margin:0;font-size:1.1rem;font-weight:600;color:#111827}.ai-sidebar-content{flex:1;display:flex;flex-direction:column;height:100%;padding:0}::ng-deep .ai-chat-sidebar .p-sidebar-header{display:none!important;padding:0!important}::ng-deep .ai-chat-sidebar .p-sidebar-content{padding:0!important;display:flex;flex-direction:column}.ai-sidebar-text{margin:0;color:#4b5563;font-size:.95rem;line-height:1.5;white-space:pre-wrap}.ai-markdown p{margin:0 0 .5rem}.ai-markdown :last-child{margin-bottom:0}.ai-markdown strong{color:#111827;font-weight:700}.ai-markdown .ai-markdown-list{margin:0 0 .5rem 1.1rem;padding:0}.ai-markdown li{margin-bottom:.35rem}.ai-sidebar-error{margin:0;color:#dc2626;font-size:.9rem}.query-chat-messages{max-height:calc(100vh - 260px);overflow-y:auto;padding:.25rem .1rem .5rem;margin-bottom:.75rem}.query-chat-empty{color:#6b7280;font-size:.9rem;text-align:center;padding:.75rem .5rem}.query-chat-message{display:flex;margin-bottom:.6rem}.query-chat-message.user{justify-content:flex-end}.query-chat-message.assistant{justify-content:flex-start}.query-chat-bubble{max-width:85%;padding:.6rem .75rem;border-radius:12px;font-size:.9rem;line-height:1.45;border:1px solid #e5e7eb;background:#f9fafb;color:#1f2937}.query-chat-message.user .query-chat-bubble{background:#dbeafe;border-color:#bfdbfe}.query-chat-input-wrap{display:flex;flex-direction:column;gap:.5rem}.query-chat-input{width:100%;border:1px solid #d1d5db;border-radius:8px;padding:.6rem .7rem;font-size:.9rem;resize:vertical;min-height:70px}.query-chat-input:focus{outline:none;border-color:#60a5fa;box-shadow:0 0 0 2px #60a5fa33}.query-send-btn{align-self:flex-end;border:1px solid #2563eb;background:#2563eb;color:#fff;border-radius:8px;padding:.45rem .9rem;font-size:.85rem;cursor:pointer}.query-send-btn:hover:not(:disabled){background:#1d4ed8}.query-send-btn:disabled{cursor:not-allowed;opacity:.6}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "directive", type: HasPermissionDirective, selector: "[permission]", inputs: ["permission"] }, { kind: "component", type: DocumentAiChatComponent, selector: "document-ai-chat", inputs: ["selectedDocument"] }] });
|
|
7270
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentHistoryComponent, isStandalone: false, selector: "document-history", inputs: { historyData: "historyData", showHistory: "showHistory", contextId: "contextId", selectedDocument: "selectedDocument", isDocumentIntelligence: "isDocumentIntelligence" }, outputs: { deleteTaskRequested: "deleteTaskRequested", documentSelected: "documentSelected" }, host: { listeners: { "document:click": "onDocumentClickOutside($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-review-container\">\r\n <!-- Header Section -->\r\n <div class=\"review-header\">\r\n <div class=\"review-title-section\">\r\n <h2 class=\"review-title\">Document Review</h2>\r\n <!-- <div class=\"ai-menu\" *ngIf=\"showDocumentAiUi\">\r\n <button class=\"ai-btn\" type=\"button\" (click)=\"openAiPanel('Query')\" [class.active]=\"documentHistoryAiService.state.showAiSidebar\">\r\n <i class=\"pi pi-sparkles\"></i>\r\n <span>AI</span>\r\n </button>\r\n </div> -->\r\n </div>\r\n <!-- <div class=\"actions-menu\" *ngIf=\"selectedDocument?.isUploaded || selectedDocument?.status == 'Approved'\"> -->\r\n <!-- <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.isUploaded || selectedDocument?.status == 'Approved') && !selectedDocument?.isSystemDocument\"> -->\r\n <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.status !== 'Approved') && (!selectedDocument?.isSystemDocument)\">\r\n <button class=\"actions-btn\" (click)=\"toggleActionsMenu()\" [class.active]=\"showActionsMenu\">\r\n Actions\r\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\r\n </button>\r\n\r\n <!-- Actions Dropdown Menu -->\r\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\" (click)=\"$event.stopPropagation()\">\r\n <!-- <div class=\"dropdown-item\" *ngIf=\"selectedDocument?.status == 'Approved' || selectedDocument?.isUploaded || selectedDocument?.status == 'Uploaded'\">\r\n <ng-content [select]=\"'action-launcher'\"></ng-content>\r\n </div> -->\r\n <div *ngIf=\"selectedDocument?.status == 'Uploaded' || selectedDocument?.status === 'Rejected' || selectedDocument?.status === 'Reviewing' || selectedDocument?.status === 'Pending'\" [permission]=\"'documents-deleteDocumentByDocumentId'\" class=\"dropdown-item\" (click)=\"onDeleteTask()\">\r\n <span>Delete Document</span>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Document Actions Component - Below Header -->\r\n <div class=\"document-actions-section\">\r\n <ng-content select=\"[actions-component]\"></ng-content>\r\n </div>\r\n\r\n\r\n <!-- Alerts Section -->\r\n <!-- <div class=\"alerts-section\">\r\n <div class=\"alert-card\">\r\n <div class=\"alert-header\">\r\n <i class=\"pi pi-exclamation-triangle alert-icon\"></i>\r\n <span class=\"alert-text\">Alerts</span>\r\n <div class=\"alert-badge\">\r\n <span class=\"alert-count\">{{ getAlertCount() }}</span>\r\n <i class=\"pi pi-chevron-right\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <!-- Timeline Section -->\r\n <div class=\"timeline-section\" *ngIf=\"showHistory && historyData.length > 0\">\r\n <h3 class=\"timeline-title\">Timeline</h3>\r\n <div class=\"timeline-container\">\r\n <div class=\"timeline-item\" *ngFor=\"let section of processedHistoryData\">\r\n <ng-container *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-event mb-2\" *ngIf=\"!item.shouldHide\">\r\n <div class=\"event-card\" [ngClass]=\"item.eventCardClass\">\r\n <!-- Event Header -->\r\n <div class=\"event-header\">\r\n <div class=\"event-info\">\r\n <i [class]=\"item.eventIcon\"></i>\r\n <span class=\"event-label\">{{ item.label }}</span>\r\n </div>\r\n <div class=\"event-timestamp\">{{ item.dateTime }}</div>\r\n </div>\r\n <!-- User Information -->\r\n <div class=\"event-user mb-2\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n <!-- Event Description -->\r\n <div class=\"event-description\" *ngIf=\"item.requestDescription\">\r\n <ul class=\"event-description-list\" *ngIf=\"item.label.toLowerCase().includes('requested')\">\r\n <li class=\"event-description-item\">{{ item.requestDescription }}</li>\r\n </ul>\r\n <p *ngIf=\"!item.label.toLowerCase().includes('requested')\">{{ item.requestDescription }}</p>\r\n </div>\r\n\r\n <!-- Document Upload Cards -->\r\n <!-- Commented out child document list panel functionality -->\r\n <!-- <div class=\"document-uploads\" *ngIf=\"item.documentList && item.documentList.length > 0\">\r\n <div class=\"uploaded-documents\">\r\n <div class=\"document-card\" *ngFor=\"let doc of item.documentList\" (click)=\"onDocumentClick(doc)\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <span class=\"document-name\">{{ doc.docName }}</span>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- <ng-content [select]=\"'actions-component'\"></ng-content> -->\r\n</div>\r\n\r\n<p-sidebar *ngIf=\"showDocumentAiUi\" [(visible)]=\"documentHistoryAiService.state.showAiSidebar\" position=\"right\"\r\n [style]=\"{ width: '420px' }\" styleClass=\"ai-chat-sidebar\" [dismissible]=\"true\" [showCloseIcon]=\"false\"\r\n [showHeader]=\"false\" [appendTo]=\"'body'\">\r\n\r\n <div class=\"ai-sidebar-content\">\r\n <document-ai-chat [selectedDocument]=\"selectedDocument\"></document-ai-chat>\r\n </div>\r\n</p-sidebar>", styles: [".document-review-container{border-radius:8px;max-height:100%;overflow-y:auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.document-review-container .review-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:1rem;border-bottom:1px solid #e5e7eb}.document-review-container .review-header .review-title-section{display:flex;align-items:center;gap:.75rem}.document-review-container .review-header .review-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin:0}.document-review-container .review-header .ai-menu{position:relative}.document-review-container .review-header .ai-menu .ai-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 .85rem;color:#374151;font-size:.875rem;height:40px;line-height:1;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .ai-menu .ai-btn:hover{background:#f9fafb}.document-review-container .review-header .ai-menu .ai-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .ai-menu .ai-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu{position:relative}.document-review-container .review-header .actions-menu .actions-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 1rem;height:40px;line-height:1;color:#374151;font-size:.875rem;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .actions-menu .actions-btn:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .actions-menu .actions-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu .actions-btn i.rotated{transform:rotate(180deg)}.document-review-container .review-header .actions-menu .actions-dropdown{position:absolute;top:100%;right:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:180px;margin-top:.25rem}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item{padding:.75rem 1rem;cursor:pointer;color:#374151;font-size:.875rem;border-bottom:1px solid #f3f4f6;transition:background-color .2s}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:last-child{border-bottom:none;border-radius:0 0 8px 8px}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:first-child{border-radius:8px 8px 0 0}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item span{display:block}.document-review-container ::ng-deep document-actions{margin-bottom:1.5rem}.document-review-container ::ng-deep document-actions .actions-card{margin:0;width:100%}.document-review-container .document-actions-section{padding:1rem 0}.document-review-container .alerts-section{margin-bottom:2rem}.document-review-container .alerts-section .alert-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1rem}.document-review-container .alerts-section .alert-card .alert-header{display:flex;align-items:center;gap:.75rem}.document-review-container .alerts-section .alert-card .alert-header .alert-icon{color:#ef4444;font-size:1.25rem}.document-review-container .alerts-section .alert-card .alert-header .alert-text{font-weight:500;color:#1f2937;font-size:1rem}.document-review-container .alerts-section .alert-card .alert-header .alert-badge{margin-left:auto;display:flex;align-items:center;gap:.5rem;background:#ef4444;color:#fff;border-radius:50%;width:24px;height:24px;justify-content:center;position:relative}.document-review-container .alerts-section .alert-card .alert-header .alert-badge .alert-count{font-size:.75rem;font-weight:600}.document-review-container .alerts-section .alert-card .alert-header .alert-badge i{position:absolute;right:-8px;font-size:.75rem;color:#ef4444;background:#fff;border-radius:50%;width:16px;height:16px;display:flex;align-items:center;justify-content:center}.document-review-container .timeline-section .timeline-title{font-size:1.25rem;font-weight:600;color:#1f2937;margin:0 0 1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item{margin-bottom:1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1.25rem;position:relative}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info{display:flex;align-items:center;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon{width:25px;height:25px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon i{font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-requested{background:#3b82f6}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-accepted{background:#10b981}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-rejected{background:#ef4444}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-default{background:#6b7280}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-label{font-weight:600;color:#1f2937;font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{color:#6b7280;font-size:.875rem;font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description p{color:#374151;line-height:1.5;margin:0;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents{display:flex;flex-direction:column;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:.5rem;display:flex;align-items:center;gap:.75rem;cursor:pointer;transition:all .2s ease}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:hover{background:#e2e8f0;border-color:#3b82f6;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:active{transform:translateY(0);box-shadow:0 1px 2px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-icon{color:#3b82f6;font-size:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-name{color:#1f2937;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user{font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-name{color:rgb(75,85,99,var(--tw-text-opacity, 1));font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-role{color:#6b7280;margin-left:.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-requested{background:#dbeafe;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-accepted{background:#dcfce7;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-rejected{background:#fee2e2;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-default{border-left:4px solid #6b7280}@media (max-width: 768px){.document-review-container{padding:1rem}.document-review-container .review-header{flex-direction:column;gap:1rem;align-items:flex-start}.document-review-container .review-header .actions-menu{align-self:flex-end}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{flex-direction:column;align-items:flex-start;gap:.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{align-self:flex-end}}.ai-sidebar-title{margin:0;font-size:1.1rem;font-weight:600;color:#111827}.ai-sidebar-content{flex:1;display:flex;flex-direction:column;height:100%;padding:0}::ng-deep .ai-chat-sidebar .p-sidebar-header{display:none!important;padding:0!important}::ng-deep .ai-chat-sidebar .p-sidebar-content{padding:0!important;display:flex;flex-direction:column}.ai-sidebar-text{margin:0;color:#4b5563;font-size:.95rem;line-height:1.5;white-space:pre-wrap}.ai-markdown p{margin:0 0 .5rem}.ai-markdown :last-child{margin-bottom:0}.ai-markdown strong{color:#111827;font-weight:700}.ai-markdown .ai-markdown-list{margin:0 0 .5rem 1.1rem;padding:0}.ai-markdown li{margin-bottom:.35rem}.ai-sidebar-error{margin:0;color:#dc2626;font-size:.9rem}.query-chat-messages{max-height:calc(100vh - 260px);overflow-y:auto;padding:.25rem .1rem .5rem;margin-bottom:.75rem}.query-chat-empty{color:#6b7280;font-size:.9rem;text-align:center;padding:.75rem .5rem}.query-chat-message{display:flex;margin-bottom:.6rem}.query-chat-message.user{justify-content:flex-end}.query-chat-message.assistant{justify-content:flex-start}.query-chat-bubble{max-width:85%;padding:.6rem .75rem;border-radius:12px;font-size:.9rem;line-height:1.45;border:1px solid #e5e7eb;background:#f9fafb;color:#1f2937}.query-chat-message.user .query-chat-bubble{background:#dbeafe;border-color:#bfdbfe}.query-chat-input-wrap{display:flex;flex-direction:column;gap:.5rem}.query-chat-input{width:100%;border:1px solid #d1d5db;border-radius:8px;padding:.6rem .7rem;font-size:.9rem;resize:vertical;min-height:70px}.query-chat-input:focus{outline:none;border-color:#60a5fa;box-shadow:0 0 0 2px #60a5fa33}.query-send-btn{align-self:flex-end;border:1px solid #2563eb;background:#2563eb;color:#fff;border-radius:8px;padding:.45rem .9rem;font-size:.85rem;cursor:pointer}.query-send-btn:hover:not(:disabled){background:#1d4ed8}.query-send-btn:disabled{cursor:not-allowed;opacity:.6}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "directive", type: HasPermissionDirective, selector: "[permission]", inputs: ["permission"] }, { kind: "component", type: DocumentAiChatComponent, selector: "document-ai-chat", inputs: ["selectedDocument"] }] });
|
|
7526
7271
|
}
|
|
7527
7272
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryComponent, decorators: [{
|
|
7528
7273
|
type: Component,
|
|
7529
|
-
args: [{ selector: 'document-history', standalone: false, template: "<div class=\"document-review-container\" *ngIf=\"showHistory && historyData.length > 0\">\r\n <!-- Header Section -->\r\n <div class=\"review-header\">\r\n <div class=\"review-title-section\">\r\n <h2 class=\"review-title\">Document Review</h2>\r\n <!-- <div class=\"ai-menu\" *ngIf=\"showDocumentAiUi\">\r\n <button class=\"ai-btn\" type=\"button\" (click)=\"openAiPanel('Query')\" [class.active]=\"documentHistoryAiService.state.showAiSidebar\">\r\n <i class=\"pi pi-sparkles\"></i>\r\n <span>AI</span>\r\n </button>\r\n </div> -->\r\n </div>\r\n <!-- <div class=\"actions-menu\" *ngIf=\"selectedDocument?.isUploaded || selectedDocument?.status == 'Approved'\"> -->\r\n <!-- <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.isUploaded || selectedDocument?.status == 'Approved') && !selectedDocument?.isSystemDocument\"> -->\r\n <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.status !== 'Approved') && (!selectedDocument?.isSystemDocument)\">\r\n <button class=\"actions-btn\" (click)=\"toggleActionsMenu()\" [class.active]=\"showActionsMenu\">\r\n Actions\r\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\r\n </button>\r\n\r\n <!-- Actions Dropdown Menu -->\r\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\" (click)=\"$event.stopPropagation()\">\r\n <div class=\"dropdown-item\" *ngIf=\"selectedDocument?.status == 'Approved' || selectedDocument?.isUploaded || selectedDocument?.status == 'Uploaded'\">\r\n <ng-content [select]=\"'action-launcher'\"></ng-content>\r\n </div>\r\n <div *ngIf=\"selectedDocument?.status == 'Uploaded' || selectedDocument?.status === 'Rejected' || selectedDocument?.status === 'Reviewing' || selectedDocument?.status === 'Pending'\" [permission]=\"'documents-deleteDocumentByDocumentId'\" class=\"dropdown-item\" (click)=\"onDeleteTask()\">\r\n <span>Delete Document</span>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Document Actions Component - Below Header -->\r\n <div class=\"document-actions-section\">\r\n <ng-content select=\"[actions-component]\"></ng-content>\r\n </div>\r\n\r\n\r\n <!-- Alerts Section -->\r\n <!-- <div class=\"alerts-section\">\r\n <div class=\"alert-card\">\r\n <div class=\"alert-header\">\r\n <i class=\"pi pi-exclamation-triangle alert-icon\"></i>\r\n <span class=\"alert-text\">Alerts</span>\r\n <div class=\"alert-badge\">\r\n <span class=\"alert-count\">{{ getAlertCount() }}</span>\r\n <i class=\"pi pi-chevron-right\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <!-- Timeline Section -->\r\n <div class=\"timeline-section\">\r\n <h3 class=\"timeline-title\">Timeline</h3>\r\n <div class=\"timeline-container\">\r\n <div class=\"timeline-item\" *ngFor=\"let section of processedHistoryData\">\r\n <ng-container *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-event mb-2\" *ngIf=\"!item.shouldHide\">\r\n <div class=\"event-card\" [ngClass]=\"item.eventCardClass\">\r\n <!-- Event Header -->\r\n <div class=\"event-header\">\r\n <div class=\"event-info\">\r\n <i [class]=\"item.eventIcon\"></i>\r\n <span class=\"event-label\">{{ item.label }}</span>\r\n </div>\r\n <div class=\"event-timestamp\">{{ item.dateTime }}</div>\r\n </div>\r\n <!-- User Information -->\r\n <div class=\"event-user mb-2\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n <!-- Event Description -->\r\n <div class=\"event-description\" *ngIf=\"item.requestDescription\">\r\n <ul class=\"event-description-list\" *ngIf=\"item.label.toLowerCase().includes('requested')\">\r\n <li class=\"event-description-item\">{{ item.requestDescription }}</li>\r\n </ul>\r\n <p *ngIf=\"!item.label.toLowerCase().includes('requested')\">{{ item.requestDescription }}</p>\r\n </div>\r\n\r\n <!-- Document Upload Cards -->\r\n <!-- Commented out child document list panel functionality -->\r\n <!-- <div class=\"document-uploads\" *ngIf=\"item.documentList && item.documentList.length > 0\">\r\n <div class=\"uploaded-documents\">\r\n <div class=\"document-card\" *ngFor=\"let doc of item.documentList\" (click)=\"onDocumentClick(doc)\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <span class=\"document-name\">{{ doc.docName }}</span>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- <ng-content [select]=\"'actions-component'\"></ng-content> -->\r\n</div>\r\n\r\n<p-sidebar *ngIf=\"showDocumentAiUi\" [(visible)]=\"documentHistoryAiService.state.showAiSidebar\" position=\"right\"\r\n [style]=\"{ width: '420px' }\" styleClass=\"ai-chat-sidebar\" [dismissible]=\"true\" [showCloseIcon]=\"false\"\r\n [showHeader]=\"false\" [appendTo]=\"'body'\">\r\n\r\n <div class=\"ai-sidebar-content\">\r\n <document-ai-chat [selectedDocument]=\"selectedDocument\"></document-ai-chat>\r\n </div>\r\n</p-sidebar>", styles: [".document-review-container{border-radius:8px;max-height:100%;overflow-y:auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.document-review-container .review-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:1rem;border-bottom:1px solid #e5e7eb}.document-review-container .review-header .review-title-section{display:flex;align-items:center;gap:.75rem}.document-review-container .review-header .review-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin:0}.document-review-container .review-header .ai-menu{position:relative}.document-review-container .review-header .ai-menu .ai-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 .85rem;color:#374151;font-size:.875rem;height:40px;line-height:1;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .ai-menu .ai-btn:hover{background:#f9fafb}.document-review-container .review-header .ai-menu .ai-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .ai-menu .ai-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu{position:relative}.document-review-container .review-header .actions-menu .actions-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 1rem;height:40px;line-height:1;color:#374151;font-size:.875rem;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .actions-menu .actions-btn:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .actions-menu .actions-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu .actions-btn i.rotated{transform:rotate(180deg)}.document-review-container .review-header .actions-menu .actions-dropdown{position:absolute;top:100%;right:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:180px;margin-top:.25rem}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item{padding:.75rem 1rem;cursor:pointer;color:#374151;font-size:.875rem;border-bottom:1px solid #f3f4f6;transition:background-color .2s}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:last-child{border-bottom:none;border-radius:0 0 8px 8px}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:first-child{border-radius:8px 8px 0 0}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item span{display:block}.document-review-container ::ng-deep document-actions{margin-bottom:1.5rem}.document-review-container ::ng-deep document-actions .actions-card{margin:0;width:100%}.document-review-container .document-actions-section{padding:1rem 0}.document-review-container .alerts-section{margin-bottom:2rem}.document-review-container .alerts-section .alert-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1rem}.document-review-container .alerts-section .alert-card .alert-header{display:flex;align-items:center;gap:.75rem}.document-review-container .alerts-section .alert-card .alert-header .alert-icon{color:#ef4444;font-size:1.25rem}.document-review-container .alerts-section .alert-card .alert-header .alert-text{font-weight:500;color:#1f2937;font-size:1rem}.document-review-container .alerts-section .alert-card .alert-header .alert-badge{margin-left:auto;display:flex;align-items:center;gap:.5rem;background:#ef4444;color:#fff;border-radius:50%;width:24px;height:24px;justify-content:center;position:relative}.document-review-container .alerts-section .alert-card .alert-header .alert-badge .alert-count{font-size:.75rem;font-weight:600}.document-review-container .alerts-section .alert-card .alert-header .alert-badge i{position:absolute;right:-8px;font-size:.75rem;color:#ef4444;background:#fff;border-radius:50%;width:16px;height:16px;display:flex;align-items:center;justify-content:center}.document-review-container .timeline-section .timeline-title{font-size:1.25rem;font-weight:600;color:#1f2937;margin:0 0 1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item{margin-bottom:1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1.25rem;position:relative}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info{display:flex;align-items:center;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon{width:25px;height:25px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon i{font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-requested{background:#3b82f6}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-accepted{background:#10b981}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-rejected{background:#ef4444}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-default{background:#6b7280}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-label{font-weight:600;color:#1f2937;font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{color:#6b7280;font-size:.875rem;font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description p{color:#374151;line-height:1.5;margin:0;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents{display:flex;flex-direction:column;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:.5rem;display:flex;align-items:center;gap:.75rem;cursor:pointer;transition:all .2s ease}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:hover{background:#e2e8f0;border-color:#3b82f6;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:active{transform:translateY(0);box-shadow:0 1px 2px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-icon{color:#3b82f6;font-size:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-name{color:#1f2937;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user{font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-name{color:rgb(75,85,99,var(--tw-text-opacity, 1));font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-role{color:#6b7280;margin-left:.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-requested{background:#dbeafe;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-accepted{background:#dcfce7;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-rejected{background:#fee2e2;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-default{border-left:4px solid #6b7280}@media (max-width: 768px){.document-review-container{padding:1rem}.document-review-container .review-header{flex-direction:column;gap:1rem;align-items:flex-start}.document-review-container .review-header .actions-menu{align-self:flex-end}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{flex-direction:column;align-items:flex-start;gap:.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{align-self:flex-end}}.ai-sidebar-title{margin:0;font-size:1.1rem;font-weight:600;color:#111827}.ai-sidebar-content{flex:1;display:flex;flex-direction:column;height:100%;padding:0}::ng-deep .ai-chat-sidebar .p-sidebar-header{display:none!important;padding:0!important}::ng-deep .ai-chat-sidebar .p-sidebar-content{padding:0!important;display:flex;flex-direction:column}.ai-sidebar-text{margin:0;color:#4b5563;font-size:.95rem;line-height:1.5;white-space:pre-wrap}.ai-markdown p{margin:0 0 .5rem}.ai-markdown :last-child{margin-bottom:0}.ai-markdown strong{color:#111827;font-weight:700}.ai-markdown .ai-markdown-list{margin:0 0 .5rem 1.1rem;padding:0}.ai-markdown li{margin-bottom:.35rem}.ai-sidebar-error{margin:0;color:#dc2626;font-size:.9rem}.query-chat-messages{max-height:calc(100vh - 260px);overflow-y:auto;padding:.25rem .1rem .5rem;margin-bottom:.75rem}.query-chat-empty{color:#6b7280;font-size:.9rem;text-align:center;padding:.75rem .5rem}.query-chat-message{display:flex;margin-bottom:.6rem}.query-chat-message.user{justify-content:flex-end}.query-chat-message.assistant{justify-content:flex-start}.query-chat-bubble{max-width:85%;padding:.6rem .75rem;border-radius:12px;font-size:.9rem;line-height:1.45;border:1px solid #e5e7eb;background:#f9fafb;color:#1f2937}.query-chat-message.user .query-chat-bubble{background:#dbeafe;border-color:#bfdbfe}.query-chat-input-wrap{display:flex;flex-direction:column;gap:.5rem}.query-chat-input{width:100%;border:1px solid #d1d5db;border-radius:8px;padding:.6rem .7rem;font-size:.9rem;resize:vertical;min-height:70px}.query-chat-input:focus{outline:none;border-color:#60a5fa;box-shadow:0 0 0 2px #60a5fa33}.query-send-btn{align-self:flex-end;border:1px solid #2563eb;background:#2563eb;color:#fff;border-radius:8px;padding:.45rem .9rem;font-size:.85rem;cursor:pointer}.query-send-btn:hover:not(:disabled){background:#1d4ed8}.query-send-btn:disabled{cursor:not-allowed;opacity:.6}\n"] }]
|
|
7274
|
+
args: [{ selector: 'document-history', standalone: false, template: "<div class=\"document-review-container\">\r\n <!-- Header Section -->\r\n <div class=\"review-header\">\r\n <div class=\"review-title-section\">\r\n <h2 class=\"review-title\">Document Review</h2>\r\n <!-- <div class=\"ai-menu\" *ngIf=\"showDocumentAiUi\">\r\n <button class=\"ai-btn\" type=\"button\" (click)=\"openAiPanel('Query')\" [class.active]=\"documentHistoryAiService.state.showAiSidebar\">\r\n <i class=\"pi pi-sparkles\"></i>\r\n <span>AI</span>\r\n </button>\r\n </div> -->\r\n </div>\r\n <!-- <div class=\"actions-menu\" *ngIf=\"selectedDocument?.isUploaded || selectedDocument?.status == 'Approved'\"> -->\r\n <!-- <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.isUploaded || selectedDocument?.status == 'Approved') && !selectedDocument?.isSystemDocument\"> -->\r\n <div class=\"actions-menu\" *ngIf=\"(selectedDocument?.status !== 'Approved') && (!selectedDocument?.isSystemDocument)\">\r\n <button class=\"actions-btn\" (click)=\"toggleActionsMenu()\" [class.active]=\"showActionsMenu\">\r\n Actions\r\n <i class=\"pi pi-chevron-down\" [class.rotated]=\"showActionsMenu\"></i>\r\n </button>\r\n\r\n <!-- Actions Dropdown Menu -->\r\n <div class=\"actions-dropdown\" *ngIf=\"showActionsMenu\" (click)=\"$event.stopPropagation()\">\r\n <!-- <div class=\"dropdown-item\" *ngIf=\"selectedDocument?.status == 'Approved' || selectedDocument?.isUploaded || selectedDocument?.status == 'Uploaded'\">\r\n <ng-content [select]=\"'action-launcher'\"></ng-content>\r\n </div> -->\r\n <div *ngIf=\"selectedDocument?.status == 'Uploaded' || selectedDocument?.status === 'Rejected' || selectedDocument?.status === 'Reviewing' || selectedDocument?.status === 'Pending'\" [permission]=\"'documents-deleteDocumentByDocumentId'\" class=\"dropdown-item\" (click)=\"onDeleteTask()\">\r\n <span>Delete Document</span>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Document Actions Component - Below Header -->\r\n <div class=\"document-actions-section\">\r\n <ng-content select=\"[actions-component]\"></ng-content>\r\n </div>\r\n\r\n\r\n <!-- Alerts Section -->\r\n <!-- <div class=\"alerts-section\">\r\n <div class=\"alert-card\">\r\n <div class=\"alert-header\">\r\n <i class=\"pi pi-exclamation-triangle alert-icon\"></i>\r\n <span class=\"alert-text\">Alerts</span>\r\n <div class=\"alert-badge\">\r\n <span class=\"alert-count\">{{ getAlertCount() }}</span>\r\n <i class=\"pi pi-chevron-right\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <!-- Timeline Section -->\r\n <div class=\"timeline-section\" *ngIf=\"showHistory && historyData.length > 0\">\r\n <h3 class=\"timeline-title\">Timeline</h3>\r\n <div class=\"timeline-container\">\r\n <div class=\"timeline-item\" *ngFor=\"let section of processedHistoryData\">\r\n <ng-container *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-event mb-2\" *ngIf=\"!item.shouldHide\">\r\n <div class=\"event-card\" [ngClass]=\"item.eventCardClass\">\r\n <!-- Event Header -->\r\n <div class=\"event-header\">\r\n <div class=\"event-info\">\r\n <i [class]=\"item.eventIcon\"></i>\r\n <span class=\"event-label\">{{ item.label }}</span>\r\n </div>\r\n <div class=\"event-timestamp\">{{ item.dateTime }}</div>\r\n </div>\r\n <!-- User Information -->\r\n <div class=\"event-user mb-2\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n <!-- Event Description -->\r\n <div class=\"event-description\" *ngIf=\"item.requestDescription\">\r\n <ul class=\"event-description-list\" *ngIf=\"item.label.toLowerCase().includes('requested')\">\r\n <li class=\"event-description-item\">{{ item.requestDescription }}</li>\r\n </ul>\r\n <p *ngIf=\"!item.label.toLowerCase().includes('requested')\">{{ item.requestDescription }}</p>\r\n </div>\r\n\r\n <!-- Document Upload Cards -->\r\n <!-- Commented out child document list panel functionality -->\r\n <!-- <div class=\"document-uploads\" *ngIf=\"item.documentList && item.documentList.length > 0\">\r\n <div class=\"uploaded-documents\">\r\n <div class=\"document-card\" *ngFor=\"let doc of item.documentList\" (click)=\"onDocumentClick(doc)\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <span class=\"document-name\">{{ doc.docName }}</span>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- <ng-content [select]=\"'actions-component'\"></ng-content> -->\r\n</div>\r\n\r\n<p-sidebar *ngIf=\"showDocumentAiUi\" [(visible)]=\"documentHistoryAiService.state.showAiSidebar\" position=\"right\"\r\n [style]=\"{ width: '420px' }\" styleClass=\"ai-chat-sidebar\" [dismissible]=\"true\" [showCloseIcon]=\"false\"\r\n [showHeader]=\"false\" [appendTo]=\"'body'\">\r\n\r\n <div class=\"ai-sidebar-content\">\r\n <document-ai-chat [selectedDocument]=\"selectedDocument\"></document-ai-chat>\r\n </div>\r\n</p-sidebar>", styles: [".document-review-container{border-radius:8px;max-height:100%;overflow-y:auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.document-review-container .review-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:1rem;border-bottom:1px solid #e5e7eb}.document-review-container .review-header .review-title-section{display:flex;align-items:center;gap:.75rem}.document-review-container .review-header .review-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin:0}.document-review-container .review-header .ai-menu{position:relative}.document-review-container .review-header .ai-menu .ai-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 .85rem;color:#374151;font-size:.875rem;height:40px;line-height:1;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .ai-menu .ai-btn:hover{background:#f9fafb}.document-review-container .review-header .ai-menu .ai-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .ai-menu .ai-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu{position:relative}.document-review-container .review-header .actions-menu .actions-btn{background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:0 1rem;height:40px;line-height:1;color:#374151;font-size:.875rem;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}.document-review-container .review-header .actions-menu .actions-btn:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-btn.active{background:#f3f4f6;border-color:#9ca3af}.document-review-container .review-header .actions-menu .actions-btn i{font-size:.75rem;transition:transform .2s}.document-review-container .review-header .actions-menu .actions-btn i.rotated{transform:rotate(180deg)}.document-review-container .review-header .actions-menu .actions-dropdown{position:absolute;top:100%;right:0;background:#fff;border:1px solid #d1d5db;border-radius:8px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f;z-index:1000;min-width:180px;margin-top:.25rem}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item{padding:.75rem 1rem;cursor:pointer;color:#374151;font-size:.875rem;border-bottom:1px solid #f3f4f6;transition:background-color .2s}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:last-child{border-bottom:none;border-radius:0 0 8px 8px}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:first-child{border-radius:8px 8px 0 0}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item:hover{background:#f9fafb}.document-review-container .review-header .actions-menu .actions-dropdown .dropdown-item span{display:block}.document-review-container ::ng-deep document-actions{margin-bottom:1.5rem}.document-review-container ::ng-deep document-actions .actions-card{margin:0;width:100%}.document-review-container .document-actions-section{padding:1rem 0}.document-review-container .alerts-section{margin-bottom:2rem}.document-review-container .alerts-section .alert-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1rem}.document-review-container .alerts-section .alert-card .alert-header{display:flex;align-items:center;gap:.75rem}.document-review-container .alerts-section .alert-card .alert-header .alert-icon{color:#ef4444;font-size:1.25rem}.document-review-container .alerts-section .alert-card .alert-header .alert-text{font-weight:500;color:#1f2937;font-size:1rem}.document-review-container .alerts-section .alert-card .alert-header .alert-badge{margin-left:auto;display:flex;align-items:center;gap:.5rem;background:#ef4444;color:#fff;border-radius:50%;width:24px;height:24px;justify-content:center;position:relative}.document-review-container .alerts-section .alert-card .alert-header .alert-badge .alert-count{font-size:.75rem;font-weight:600}.document-review-container .alerts-section .alert-card .alert-header .alert-badge i{position:absolute;right:-8px;font-size:.75rem;color:#ef4444;background:#fff;border-radius:50%;width:16px;height:16px;display:flex;align-items:center;justify-content:center}.document-review-container .timeline-section .timeline-title{font-size:1.25rem;font-weight:600;color:#1f2937;margin:0 0 1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item{margin-bottom:1.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:1.25rem;position:relative}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info{display:flex;align-items:center;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon{width:25px;height:25px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon i{font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-requested{background:#3b82f6}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-accepted{background:#10b981}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-rejected{background:#ef4444}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-icon.icon-default{background:#6b7280}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-info .event-label{font-weight:600;color:#1f2937;font-size:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{color:#6b7280;font-size:.875rem;font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-description p{color:#374151;line-height:1.5;margin:0;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads{margin-bottom:1rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents{display:flex;flex-direction:column;gap:.75rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:.5rem;display:flex;align-items:center;gap:.75rem;cursor:pointer;transition:all .2s ease}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:hover{background:#e2e8f0;border-color:#3b82f6;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card:active{transform:translateY(0);box-shadow:0 1px 2px #0000001a}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-icon{color:#3b82f6;font-size:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .document-uploads .uploaded-documents .document-card .document-name{color:#1f2937;font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user{font-size:.875rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-name{color:rgb(75,85,99,var(--tw-text-opacity, 1));font-weight:500}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-user .user-role{color:#6b7280;margin-left:.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-requested{background:#dbeafe;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-accepted{background:#dcfce7;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-rejected{background:#fee2e2;border-radius:16px;font-size:.875rem;line-height:1.25rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card.event-default{border-left:4px solid #6b7280}@media (max-width: 768px){.document-review-container{padding:1rem}.document-review-container .review-header{flex-direction:column;gap:1rem;align-items:flex-start}.document-review-container .review-header .actions-menu{align-self:flex-end}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header{flex-direction:column;align-items:flex-start;gap:.5rem}.document-review-container .timeline-section .timeline-container .timeline-item .timeline-event .event-card .event-header .event-timestamp{align-self:flex-end}}.ai-sidebar-title{margin:0;font-size:1.1rem;font-weight:600;color:#111827}.ai-sidebar-content{flex:1;display:flex;flex-direction:column;height:100%;padding:0}::ng-deep .ai-chat-sidebar .p-sidebar-header{display:none!important;padding:0!important}::ng-deep .ai-chat-sidebar .p-sidebar-content{padding:0!important;display:flex;flex-direction:column}.ai-sidebar-text{margin:0;color:#4b5563;font-size:.95rem;line-height:1.5;white-space:pre-wrap}.ai-markdown p{margin:0 0 .5rem}.ai-markdown :last-child{margin-bottom:0}.ai-markdown strong{color:#111827;font-weight:700}.ai-markdown .ai-markdown-list{margin:0 0 .5rem 1.1rem;padding:0}.ai-markdown li{margin-bottom:.35rem}.ai-sidebar-error{margin:0;color:#dc2626;font-size:.9rem}.query-chat-messages{max-height:calc(100vh - 260px);overflow-y:auto;padding:.25rem .1rem .5rem;margin-bottom:.75rem}.query-chat-empty{color:#6b7280;font-size:.9rem;text-align:center;padding:.75rem .5rem}.query-chat-message{display:flex;margin-bottom:.6rem}.query-chat-message.user{justify-content:flex-end}.query-chat-message.assistant{justify-content:flex-start}.query-chat-bubble{max-width:85%;padding:.6rem .75rem;border-radius:12px;font-size:.9rem;line-height:1.45;border:1px solid #e5e7eb;background:#f9fafb;color:#1f2937}.query-chat-message.user .query-chat-bubble{background:#dbeafe;border-color:#bfdbfe}.query-chat-input-wrap{display:flex;flex-direction:column;gap:.5rem}.query-chat-input{width:100%;border:1px solid #d1d5db;border-radius:8px;padding:.6rem .7rem;font-size:.9rem;resize:vertical;min-height:70px}.query-chat-input:focus{outline:none;border-color:#60a5fa;box-shadow:0 0 0 2px #60a5fa33}.query-send-btn{align-self:flex-end;border:1px solid #2563eb;background:#2563eb;color:#fff;border-radius:8px;padding:.45rem .9rem;font-size:.85rem;cursor:pointer}.query-send-btn:hover:not(:disabled){background:#1d4ed8}.query-send-btn:disabled{cursor:not-allowed;opacity:.6}\n"] }]
|
|
7530
7275
|
}], ctorParameters: () => [{ type: DocumentHistoryService }, { type: DocumentViewerService }, { type: DocumentActionsService }, { type: i3.ConfirmationService }, { type: DocumentHttpService }, { type: DocumentHistoryAiService }], propDecorators: { historyData: [{
|
|
7531
7276
|
type: Input
|
|
7532
7277
|
}], showHistory: [{
|
|
@@ -10375,11 +10120,11 @@ class DocumentContainerComponent {
|
|
|
10375
10120
|
this.clearAllState();
|
|
10376
10121
|
}
|
|
10377
10122
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContainerComponent, deps: [{ token: DocumentHttpService }, { token: DocumentHelperService }, { token: DocumentQuery }, { token: DocumentStore }, { token: DocumentMenuService }], target: i0.ɵɵFactoryTarget.Component });
|
|
10378
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentContainerComponent, isStandalone: false, selector: "lib-document-container", inputs: { onOpenInNewTab: "onOpenInNewTab", contextId: "contextId" }, outputs: { selectedDocument: "selectedDocument", selectedDocumentInNewTab: "selectedDocumentInNewTab" }, viewQueries: [{ propertyName: "contentScrollContainer", first: true, predicate: ["contentScrollContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"grid m-0\">\r\n <!-- <div class=\"menu-panel col-12 md:col-2\">\r\n <lib-documents-menu \r\n [catagories]=\"catagories\" \r\n [applicationNumber]=\"applicationNumber\" \r\n [contextId]=\"contextId\"\r\n (menuItemSelected)=\"onMenuItemSelected($event)\">\r\n </lib-documents-menu>\r\n </div> -->\r\n \r\n <div class=\"col-12 md:col-12 p-0\" #contentScrollContainer>\r\n <div class=\"content-card\">\r\n <lib-folder-container [contextId]=\"contextId\" [userList]=\"userList\" [statusData]=\"statusData\" [categories]=\"catagories\"></lib-folder-container>\r\n </div>\r\n <div class=\"document-list-container\">\r\n <lib-document-list \r\n [contextId]=\"contextId\" \r\n [documentListResponse]=\"documentListResponse\"\r\n [selectedMenuItemId]=\"selectedMenuItemId\"\r\n [navigationInfo]=\"navigationInfo\"\r\n (handleSelectedDocumentInNewTab)=\"onDocumentSelectedInNewTab($event)\"\r\n (handleSelectedDocument)=\"onDocumentSelected($event)\"\r\n >\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n <p-confirmDialog \r\n [style]=\"{width: '25vw'}\" \r\n acceptLabel=\"Yes\"\r\n rejectLabel=\"No\"\r\n appendTo=\"body\"\r\n acceptIcon=\"pi pi-check\"\r\n rejectIcon=\"pi pi-times\">\r\n </p-confirmDialog>\r\n</div>\r\n", styles: [".document-container-layout{display:grid;grid-template-columns:1fr;height:98vh;overflow:auto;position:relative}@media (min-width: 768px){.document-container-layout{grid-template-columns:16.6667% 1fr}}.menu-panel{background-color:#fff;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.menu-panel{position:fixed;left:0;top:0;bottom:0;width:16.6667%}}.menu-panel::-webkit-scrollbar{display:none}.content-panel{display:flex;flex-direction:column;height:98vh;overflow-y:auto;overflow-x:hidden;padding:0;position:relative;z-index:10;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.content-panel{margin-left:16.6667%}}.content-panel::-webkit-scrollbar{display:none}@media (max-width: 1024px){.menu-panel{width:240px}.content-panel{margin-left:240px}}@media (max-width: 768px){.document-container-layout{grid-template-columns:1fr}.menu-panel{position:relative;width:100%;height:200px;border-right:none;border-bottom:1px solid #e5e7eb;z-index:auto}.content-panel{margin-left:0;flex:1}}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}*{scrollbar-width:thin}body,html{height:100%}::ng-deep .p-card{overflow:visible!important}::ng-deep .p-card-body{overflow:visible!important}::ng-deep .p-dialog{z-index:9999!important}::ng-deep .p-dialog-mask{z-index:9998!important}::ng-deep .content-panel .p-card{overflow:visible!important}\n"], dependencies: [{ kind: "component", type: i6$2.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }, { kind: "component", type: FolderContainerComponent, selector: "lib-folder-container", inputs: ["documentList", "folderList", "contextId", "userList", "statusData", "categories"] }, { kind: "component", type: DocumentListComponent, selector: "lib-document-list", inputs: ["contextId", "documentListResponse", "selectedMenuItemId", "navigationInfo", "documentList"], outputs: ["handleSelectedDocumentInNewTab", "handleSelectedDocument"] }] });
|
|
10123
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentContainerComponent, isStandalone: false, selector: "lib-document-container", inputs: { onOpenInNewTab: "onOpenInNewTab", contextId: "contextId" }, outputs: { selectedDocument: "selectedDocument", selectedDocumentInNewTab: "selectedDocumentInNewTab" }, viewQueries: [{ propertyName: "contentScrollContainer", first: true, predicate: ["contentScrollContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"grid m-0 h-full\">\r\n <!-- <div class=\"menu-panel col-12 md:col-2\">\r\n <lib-documents-menu \r\n [catagories]=\"catagories\" \r\n [applicationNumber]=\"applicationNumber\" \r\n [contextId]=\"contextId\"\r\n (menuItemSelected)=\"onMenuItemSelected($event)\">\r\n </lib-documents-menu>\r\n </div> -->\r\n \r\n <div class=\"col-12 md:col-12 p-0 h-full\" #contentScrollContainer>\r\n <div class=\"content-card\">\r\n <lib-folder-container [contextId]=\"contextId\" [userList]=\"userList\" [statusData]=\"statusData\" [categories]=\"catagories\"></lib-folder-container>\r\n </div>\r\n <div class=\"document-list-container\">\r\n <lib-document-list \r\n [contextId]=\"contextId\" \r\n [documentListResponse]=\"documentListResponse\"\r\n [selectedMenuItemId]=\"selectedMenuItemId\"\r\n [navigationInfo]=\"navigationInfo\"\r\n (handleSelectedDocumentInNewTab)=\"onDocumentSelectedInNewTab($event)\"\r\n (handleSelectedDocument)=\"onDocumentSelected($event)\"\r\n >\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n <p-confirmDialog \r\n [style]=\"{width: '25vw'}\" \r\n acceptLabel=\"Yes\"\r\n rejectLabel=\"No\"\r\n appendTo=\"body\"\r\n acceptIcon=\"pi pi-check\"\r\n rejectIcon=\"pi pi-times\">\r\n </p-confirmDialog>\r\n</div>\r\n", styles: [".document-container-layout{display:grid;grid-template-columns:1fr;height:98vh;overflow:auto;position:relative}@media (min-width: 768px){.document-container-layout{grid-template-columns:16.6667% 1fr}}.menu-panel{background-color:#fff;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.menu-panel{position:fixed;left:0;top:0;bottom:0;width:16.6667%}}.menu-panel::-webkit-scrollbar{display:none}.content-panel{display:flex;flex-direction:column;height:98vh;overflow-y:auto;overflow-x:hidden;padding:0;position:relative;z-index:10;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.content-panel{margin-left:16.6667%}}.content-panel::-webkit-scrollbar{display:none}@media (max-width: 1024px){.menu-panel{width:240px}.content-panel{margin-left:240px}}@media (max-width: 768px){.document-container-layout{grid-template-columns:1fr}.menu-panel{position:relative;width:100%;height:200px;border-right:none;border-bottom:1px solid #e5e7eb;z-index:auto}.content-panel{margin-left:0;flex:1}}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}*{scrollbar-width:thin}body,html{height:100%}::ng-deep .p-card{overflow:visible!important}::ng-deep .p-card-body{overflow:visible!important}::ng-deep .p-dialog{z-index:9999!important}::ng-deep .p-dialog-mask{z-index:9998!important}::ng-deep .content-panel .p-card{overflow:visible!important}\n"], dependencies: [{ kind: "component", type: i6$2.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }, { kind: "component", type: FolderContainerComponent, selector: "lib-folder-container", inputs: ["documentList", "folderList", "contextId", "userList", "statusData", "categories"] }, { kind: "component", type: DocumentListComponent, selector: "lib-document-list", inputs: ["contextId", "documentListResponse", "selectedMenuItemId", "navigationInfo", "documentList"], outputs: ["handleSelectedDocumentInNewTab", "handleSelectedDocument"] }] });
|
|
10379
10124
|
}
|
|
10380
10125
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContainerComponent, decorators: [{
|
|
10381
10126
|
type: Component,
|
|
10382
|
-
args: [{ selector: 'lib-document-container', standalone: false, template: "<div class=\"grid m-0\">\r\n <!-- <div class=\"menu-panel col-12 md:col-2\">\r\n <lib-documents-menu \r\n [catagories]=\"catagories\" \r\n [applicationNumber]=\"applicationNumber\" \r\n [contextId]=\"contextId\"\r\n (menuItemSelected)=\"onMenuItemSelected($event)\">\r\n </lib-documents-menu>\r\n </div> -->\r\n \r\n <div class=\"col-12 md:col-12 p-0\" #contentScrollContainer>\r\n <div class=\"content-card\">\r\n <lib-folder-container [contextId]=\"contextId\" [userList]=\"userList\" [statusData]=\"statusData\" [categories]=\"catagories\"></lib-folder-container>\r\n </div>\r\n <div class=\"document-list-container\">\r\n <lib-document-list \r\n [contextId]=\"contextId\" \r\n [documentListResponse]=\"documentListResponse\"\r\n [selectedMenuItemId]=\"selectedMenuItemId\"\r\n [navigationInfo]=\"navigationInfo\"\r\n (handleSelectedDocumentInNewTab)=\"onDocumentSelectedInNewTab($event)\"\r\n (handleSelectedDocument)=\"onDocumentSelected($event)\"\r\n >\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n <p-confirmDialog \r\n [style]=\"{width: '25vw'}\" \r\n acceptLabel=\"Yes\"\r\n rejectLabel=\"No\"\r\n appendTo=\"body\"\r\n acceptIcon=\"pi pi-check\"\r\n rejectIcon=\"pi pi-times\">\r\n </p-confirmDialog>\r\n</div>\r\n", styles: [".document-container-layout{display:grid;grid-template-columns:1fr;height:98vh;overflow:auto;position:relative}@media (min-width: 768px){.document-container-layout{grid-template-columns:16.6667% 1fr}}.menu-panel{background-color:#fff;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.menu-panel{position:fixed;left:0;top:0;bottom:0;width:16.6667%}}.menu-panel::-webkit-scrollbar{display:none}.content-panel{display:flex;flex-direction:column;height:98vh;overflow-y:auto;overflow-x:hidden;padding:0;position:relative;z-index:10;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.content-panel{margin-left:16.6667%}}.content-panel::-webkit-scrollbar{display:none}@media (max-width: 1024px){.menu-panel{width:240px}.content-panel{margin-left:240px}}@media (max-width: 768px){.document-container-layout{grid-template-columns:1fr}.menu-panel{position:relative;width:100%;height:200px;border-right:none;border-bottom:1px solid #e5e7eb;z-index:auto}.content-panel{margin-left:0;flex:1}}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}*{scrollbar-width:thin}body,html{height:100%}::ng-deep .p-card{overflow:visible!important}::ng-deep .p-card-body{overflow:visible!important}::ng-deep .p-dialog{z-index:9999!important}::ng-deep .p-dialog-mask{z-index:9998!important}::ng-deep .content-panel .p-card{overflow:visible!important}\n"] }]
|
|
10127
|
+
args: [{ selector: 'lib-document-container', standalone: false, template: "<div class=\"grid m-0 h-full\">\r\n <!-- <div class=\"menu-panel col-12 md:col-2\">\r\n <lib-documents-menu \r\n [catagories]=\"catagories\" \r\n [applicationNumber]=\"applicationNumber\" \r\n [contextId]=\"contextId\"\r\n (menuItemSelected)=\"onMenuItemSelected($event)\">\r\n </lib-documents-menu>\r\n </div> -->\r\n \r\n <div class=\"col-12 md:col-12 p-0 h-full\" #contentScrollContainer>\r\n <div class=\"content-card\">\r\n <lib-folder-container [contextId]=\"contextId\" [userList]=\"userList\" [statusData]=\"statusData\" [categories]=\"catagories\"></lib-folder-container>\r\n </div>\r\n <div class=\"document-list-container\">\r\n <lib-document-list \r\n [contextId]=\"contextId\" \r\n [documentListResponse]=\"documentListResponse\"\r\n [selectedMenuItemId]=\"selectedMenuItemId\"\r\n [navigationInfo]=\"navigationInfo\"\r\n (handleSelectedDocumentInNewTab)=\"onDocumentSelectedInNewTab($event)\"\r\n (handleSelectedDocument)=\"onDocumentSelected($event)\"\r\n >\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n <p-confirmDialog \r\n [style]=\"{width: '25vw'}\" \r\n acceptLabel=\"Yes\"\r\n rejectLabel=\"No\"\r\n appendTo=\"body\"\r\n acceptIcon=\"pi pi-check\"\r\n rejectIcon=\"pi pi-times\">\r\n </p-confirmDialog>\r\n</div>\r\n", styles: [".document-container-layout{display:grid;grid-template-columns:1fr;height:98vh;overflow:auto;position:relative}@media (min-width: 768px){.document-container-layout{grid-template-columns:16.6667% 1fr}}.menu-panel{background-color:#fff;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.menu-panel{position:fixed;left:0;top:0;bottom:0;width:16.6667%}}.menu-panel::-webkit-scrollbar{display:none}.content-panel{display:flex;flex-direction:column;height:98vh;overflow-y:auto;overflow-x:hidden;padding:0;position:relative;z-index:10;scrollbar-width:none;-ms-overflow-style:none}@media (min-width: 768px){.content-panel{margin-left:16.6667%}}.content-panel::-webkit-scrollbar{display:none}@media (max-width: 1024px){.menu-panel{width:240px}.content-panel{margin-left:240px}}@media (max-width: 768px){.document-container-layout{grid-template-columns:1fr}.menu-panel{position:relative;width:100%;height:200px;border-right:none;border-bottom:1px solid #e5e7eb;z-index:auto}.content-panel{margin-left:0;flex:1}}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}*{scrollbar-width:thin}body,html{height:100%}::ng-deep .p-card{overflow:visible!important}::ng-deep .p-card-body{overflow:visible!important}::ng-deep .p-dialog{z-index:9999!important}::ng-deep .p-dialog-mask{z-index:9998!important}::ng-deep .content-panel .p-card{overflow:visible!important}\n"] }]
|
|
10383
10128
|
}], ctorParameters: () => [{ type: DocumentHttpService }, { type: DocumentHelperService }, { type: DocumentQuery }, { type: DocumentStore }, { type: DocumentMenuService }], propDecorators: { onOpenInNewTab: [{
|
|
10384
10129
|
type: Input
|
|
10385
10130
|
}], contentScrollContainer: [{
|
|
@@ -10874,6 +10619,261 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
10874
10619
|
type: Output
|
|
10875
10620
|
}] } });
|
|
10876
10621
|
|
|
10622
|
+
class UserListService {
|
|
10623
|
+
documentStore;
|
|
10624
|
+
documentQuery;
|
|
10625
|
+
constructor(documentStore, documentQuery) {
|
|
10626
|
+
this.documentStore = documentStore;
|
|
10627
|
+
this.documentQuery = documentQuery;
|
|
10628
|
+
}
|
|
10629
|
+
getInitials(name) {
|
|
10630
|
+
if (!name || name.trim() === SHARED.EMPTY) {
|
|
10631
|
+
return SHARED.EMPTY;
|
|
10632
|
+
}
|
|
10633
|
+
const words = name.trim().split(SHARED.EMPTY_SPACE).filter(word => word.length > SHARED.INITIAL_COUNT);
|
|
10634
|
+
if (words.length === 1) {
|
|
10635
|
+
return words[0].substring(0, 2).toUpperCase();
|
|
10636
|
+
}
|
|
10637
|
+
else if (words.length >= 2) {
|
|
10638
|
+
const firstWord = words[0];
|
|
10639
|
+
const lastWord = words[words.length - 1];
|
|
10640
|
+
return (firstWord.charAt(0) + lastWord.charAt(0)).toUpperCase();
|
|
10641
|
+
}
|
|
10642
|
+
return SHARED.EMPTY;
|
|
10643
|
+
}
|
|
10644
|
+
getColorByIndex(index) {
|
|
10645
|
+
const colors = SHARED.COLORS;
|
|
10646
|
+
return colors[index % colors.length];
|
|
10647
|
+
}
|
|
10648
|
+
getColorValue(colorName) {
|
|
10649
|
+
const colorMap = SHARED.COLOR_MAP;
|
|
10650
|
+
return colorMap[colorName] || SHARED.DEFAULT_COLOR;
|
|
10651
|
+
}
|
|
10652
|
+
processUserData(userList) {
|
|
10653
|
+
return userList.map((user, index) => ({
|
|
10654
|
+
...user,
|
|
10655
|
+
initials: this.getInitials(user.name),
|
|
10656
|
+
color: this.getColorByIndex(index)
|
|
10657
|
+
}));
|
|
10658
|
+
}
|
|
10659
|
+
/**
|
|
10660
|
+
* Filters user list based on selected menu item category
|
|
10661
|
+
* @param userList - The complete user list
|
|
10662
|
+
* @param categories - The document categories
|
|
10663
|
+
* @returns Filtered user list
|
|
10664
|
+
*/
|
|
10665
|
+
filterUsersByCategory(userList, categories) {
|
|
10666
|
+
return userList;
|
|
10667
|
+
}
|
|
10668
|
+
selectUser(userId, userData) {
|
|
10669
|
+
const user = userData.find(u => u._id === userId);
|
|
10670
|
+
if (user) {
|
|
10671
|
+
this.documentStore.setSelectedUserId(userId);
|
|
10672
|
+
return { selectedUser: user.name, name: user.name };
|
|
10673
|
+
}
|
|
10674
|
+
return { selectedUser: undefined, name: undefined };
|
|
10675
|
+
}
|
|
10676
|
+
unselectUser() {
|
|
10677
|
+
this.documentStore.setSelectedUserId(null);
|
|
10678
|
+
}
|
|
10679
|
+
isUserSelected(userId, userData, selectedUser) {
|
|
10680
|
+
return selectedUser === userData.find(u => u._id === userId)?.name;
|
|
10681
|
+
}
|
|
10682
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListService, deps: [{ token: DocumentStore }, { token: DocumentQuery }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
10683
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListService, providedIn: 'root' });
|
|
10684
|
+
}
|
|
10685
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListService, decorators: [{
|
|
10686
|
+
type: Injectable,
|
|
10687
|
+
args: [{
|
|
10688
|
+
providedIn: 'root'
|
|
10689
|
+
}]
|
|
10690
|
+
}], ctorParameters: () => [{ type: DocumentStore }, { type: DocumentQuery }] });
|
|
10691
|
+
|
|
10692
|
+
class UserListComponent {
|
|
10693
|
+
documentService;
|
|
10694
|
+
documentStore;
|
|
10695
|
+
documentQuery;
|
|
10696
|
+
userListService;
|
|
10697
|
+
cdr;
|
|
10698
|
+
userList = SHARED.EMPTY_ARRAY;
|
|
10699
|
+
categories = SHARED.EMPTY_ARRAY;
|
|
10700
|
+
userSelected = new EventEmitter();
|
|
10701
|
+
userData = SHARED.EMPTY_ARRAY;
|
|
10702
|
+
filteredUserData = SHARED.EMPTY_ARRAY;
|
|
10703
|
+
selectedUser;
|
|
10704
|
+
shouldShowContainer = true;
|
|
10705
|
+
userListSubscription = new Subscription();
|
|
10706
|
+
categoriesSubscription = new Subscription();
|
|
10707
|
+
constructor(documentService, documentStore, documentQuery, userListService, cdr) {
|
|
10708
|
+
this.documentService = documentService;
|
|
10709
|
+
this.documentStore = documentStore;
|
|
10710
|
+
this.documentQuery = documentQuery;
|
|
10711
|
+
this.userListService = userListService;
|
|
10712
|
+
this.cdr = cdr;
|
|
10713
|
+
}
|
|
10714
|
+
ngOnChanges(changes) {
|
|
10715
|
+
if (changes[SHARED.USER_LIST] && !changes[SHARED.USER_LIST].firstChange) {
|
|
10716
|
+
this.initializeUserData();
|
|
10717
|
+
}
|
|
10718
|
+
if (changes[SHARED.CATEGORIES] && !changes[SHARED.CATEGORIES].firstChange) {
|
|
10719
|
+
this.updateFilteredUserData();
|
|
10720
|
+
}
|
|
10721
|
+
}
|
|
10722
|
+
initializeUserData() {
|
|
10723
|
+
if (this.userList && this.userList.length > 0) {
|
|
10724
|
+
this.userData = this.userListService.processUserData(this.userList);
|
|
10725
|
+
this.updateFilteredUserData();
|
|
10726
|
+
}
|
|
10727
|
+
}
|
|
10728
|
+
updateFilteredUserData() {
|
|
10729
|
+
if (this.userData.length > 0 && this.categories.length > 0) {
|
|
10730
|
+
this.filteredUserData = this.userListService.filterUsersByCategory(this.userData, this.categories);
|
|
10731
|
+
this.shouldShowContainer = true;
|
|
10732
|
+
if (this.selectedUser) {
|
|
10733
|
+
const selectedUserInFiltered = this.filteredUserData.find(user => user.name === this.selectedUser);
|
|
10734
|
+
if (!selectedUserInFiltered) {
|
|
10735
|
+
this.selectedUser = undefined;
|
|
10736
|
+
this.documentStore.setSelectedUserId(null);
|
|
10737
|
+
this.userSelected.emit(SHARED.EMPTY);
|
|
10738
|
+
}
|
|
10739
|
+
}
|
|
10740
|
+
}
|
|
10741
|
+
else {
|
|
10742
|
+
this.filteredUserData = this.userData;
|
|
10743
|
+
this.shouldShowContainer = true;
|
|
10744
|
+
}
|
|
10745
|
+
}
|
|
10746
|
+
ngOnInit() {
|
|
10747
|
+
this.initializeUserData();
|
|
10748
|
+
this.userListSubscription.add(this.documentQuery.selectUserList().subscribe(userList => {
|
|
10749
|
+
if (userList && userList.length > 0) {
|
|
10750
|
+
this.userList = userList;
|
|
10751
|
+
this.initializeUserData();
|
|
10752
|
+
this.cdr.markForCheck();
|
|
10753
|
+
}
|
|
10754
|
+
}));
|
|
10755
|
+
this.categoriesSubscription.add(this.documentQuery.selectDocumentCategories().subscribe(categories => {
|
|
10756
|
+
if (categories && categories.length > 0) {
|
|
10757
|
+
this.categories = categories;
|
|
10758
|
+
this.updateFilteredUserData();
|
|
10759
|
+
this.cdr.markForCheck();
|
|
10760
|
+
}
|
|
10761
|
+
}));
|
|
10762
|
+
this.userListSubscription.add(this.documentQuery.selectDocumentListResponse().subscribe(() => {
|
|
10763
|
+
const currentUserList = this.documentQuery.getUserList();
|
|
10764
|
+
if (currentUserList && currentUserList.length > 0) {
|
|
10765
|
+
this.userList = currentUserList;
|
|
10766
|
+
this.initializeUserData();
|
|
10767
|
+
this.cdr.markForCheck();
|
|
10768
|
+
}
|
|
10769
|
+
}));
|
|
10770
|
+
this.documentQuery.selectSelectedUserId().subscribe(userId => {
|
|
10771
|
+
if (userId) {
|
|
10772
|
+
const user = this.userData.find(u => u._id === userId);
|
|
10773
|
+
this.selectedUser = user ? user.name : undefined;
|
|
10774
|
+
}
|
|
10775
|
+
else {
|
|
10776
|
+
this.selectedUser = undefined;
|
|
10777
|
+
}
|
|
10778
|
+
this.cdr.markForCheck();
|
|
10779
|
+
});
|
|
10780
|
+
this.documentQuery.selectShowUserList().subscribe(show => {
|
|
10781
|
+
if (!show && this.selectedUser) {
|
|
10782
|
+
this.selectedUser = undefined;
|
|
10783
|
+
this.userSelected.emit(SHARED.EMPTY);
|
|
10784
|
+
}
|
|
10785
|
+
});
|
|
10786
|
+
}
|
|
10787
|
+
onUserSelect(username, id) {
|
|
10788
|
+
if (this.selectedUser === username) {
|
|
10789
|
+
this.selectedUser = undefined;
|
|
10790
|
+
this.userListService.unselectUser();
|
|
10791
|
+
this.userSelected.emit(SHARED.EMPTY);
|
|
10792
|
+
}
|
|
10793
|
+
else {
|
|
10794
|
+
this.selectedUser = username;
|
|
10795
|
+
this.documentStore.setSelectedUserId(id);
|
|
10796
|
+
this.userSelected.emit(username);
|
|
10797
|
+
}
|
|
10798
|
+
}
|
|
10799
|
+
getAvatarColor(color) {
|
|
10800
|
+
if (!color) {
|
|
10801
|
+
return SHARED.DEFAULT_COLOR;
|
|
10802
|
+
}
|
|
10803
|
+
return SHARED.COLOR_MAP[color] || SHARED.DEFAULT_COLOR;
|
|
10804
|
+
}
|
|
10805
|
+
ngOnDestroy() {
|
|
10806
|
+
this.userListSubscription.unsubscribe();
|
|
10807
|
+
this.categoriesSubscription.unsubscribe();
|
|
10808
|
+
}
|
|
10809
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListComponent, deps: [{ token: DocumentHelperService }, { token: DocumentStore }, { token: DocumentQuery }, { token: UserListService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
10810
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UserListComponent, isStandalone: false, selector: "lib-user-list", inputs: { userList: "userList", categories: "categories" }, outputs: { userSelected: "userSelected" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"user-list-container\" [@slideInFromTop]>\r\n <div class=\"user-cards\">\r\n <div \r\n *ngFor=\"let user of filteredUserData\" \r\n class=\"user-card\"\r\n [class.selected]=\"selectedUser === user.name\"\r\n [style.border-color]=\"selectedUser === user.name ? getAvatarColor(user.color) : 'transparent'\"\r\n (click)=\"onUserSelect(user.name, user._id)\"\r\n >\r\n @if(user.name === \"Application Docs\"){\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\"><i class=\"pi pi-user\"></i></span>\r\n </div>\r\n }@else {\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\">{{ user.initials }}</span>\r\n </div>\r\n }\r\n <div class=\"user-info\">\r\n <div class=\"username\">{{ user.name }}</div>\r\n <div class=\"document-counts\">\r\n <span style=\"color : #16A34A;\"> {{ user.approved }} approved </span><span>/ {{ user.pending }} outstanding</span>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n <!-- Show message when filtered list is empty -->\r\n <div *ngIf=\"filteredUserData.length === 0 && shouldShowContainer\" class=\"no-users-message\" [@slideInFromTop]>\r\n <p>No users available for this category.</p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".user-list-container{padding:1rem 1rem .5rem}.user-cards{display:flex;flex-wrap:wrap;transition:all .3s ease-in-out}.user-card{display:flex;align-items:center;gap:.75rem;padding:1rem;border:2px solid transparent;border-radius:8px;cursor:pointer;transition:all .2s ease;background:#fff;min-width:140px;max-width:300px;height:70px;position:relative;flex-shrink:0}.user-card:hover{box-shadow:0 4px 8px #00000026}.user-card.selected{background-color:#f8fafc;box-shadow:0 4px 8px #00000026;border-width:2px}.user-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;color:#fff;font-size:14px;flex-shrink:0;font-weight:400}.avatar-orange{background-color:#fef3c7;color:#b45309}.avatar-blue{background-color:#dbeafe;color:#1d4ed8}.avatar-green{background-color:#22c55e1a;color:#36aa86}.avatar-grey{background-color:#ebeced;color:#5b6676}.avatar-purple{background-color:#3b82f61a;color:#3b82f6}.user-info{flex:1;min-width:0;overflow:hidden}.username{font-weight:600;color:#1f2937;margin-bottom:.25rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2}.document-counts{font-size:.875rem;color:#6b7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.35;padding-bottom:2px}.selection-indicator{position:absolute;top:8px;right:8px;width:20px;height:20px;background-color:#10b981;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px;flex-shrink:0}.no-users-message{display:flex;justify-content:center;align-items:center;padding:2rem;background:#f8fafc;border-radius:8px;border:2px dashed #d1d5db;margin:1rem 0}.no-users-message p{color:#6b7280;font-size:.875rem;font-weight:500;margin:0;text-align:center}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [
|
|
10811
|
+
trigger('slideInFromTop', [
|
|
10812
|
+
state('void', style({
|
|
10813
|
+
opacity: 0,
|
|
10814
|
+
transform: 'translateY(-10px)'
|
|
10815
|
+
})),
|
|
10816
|
+
state('*', style({
|
|
10817
|
+
opacity: 1,
|
|
10818
|
+
transform: 'translateY(0)'
|
|
10819
|
+
})),
|
|
10820
|
+
transition('void => *', [
|
|
10821
|
+
animate('300ms ease-out')
|
|
10822
|
+
])
|
|
10823
|
+
]),
|
|
10824
|
+
trigger('fadeIn', [
|
|
10825
|
+
state('void', style({
|
|
10826
|
+
opacity: 0,
|
|
10827
|
+
transform: 'scale(0.8)'
|
|
10828
|
+
})),
|
|
10829
|
+
state('*', style({
|
|
10830
|
+
opacity: 1,
|
|
10831
|
+
transform: 'scale(1)'
|
|
10832
|
+
})),
|
|
10833
|
+
transition('void => *', [
|
|
10834
|
+
animate('200ms ease-in-out')
|
|
10835
|
+
])
|
|
10836
|
+
])
|
|
10837
|
+
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10838
|
+
}
|
|
10839
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListComponent, decorators: [{
|
|
10840
|
+
type: Component,
|
|
10841
|
+
args: [{ selector: 'lib-user-list', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, animations: [
|
|
10842
|
+
trigger('slideInFromTop', [
|
|
10843
|
+
state('void', style({
|
|
10844
|
+
opacity: 0,
|
|
10845
|
+
transform: 'translateY(-10px)'
|
|
10846
|
+
})),
|
|
10847
|
+
state('*', style({
|
|
10848
|
+
opacity: 1,
|
|
10849
|
+
transform: 'translateY(0)'
|
|
10850
|
+
})),
|
|
10851
|
+
transition('void => *', [
|
|
10852
|
+
animate('300ms ease-out')
|
|
10853
|
+
])
|
|
10854
|
+
]),
|
|
10855
|
+
trigger('fadeIn', [
|
|
10856
|
+
state('void', style({
|
|
10857
|
+
opacity: 0,
|
|
10858
|
+
transform: 'scale(0.8)'
|
|
10859
|
+
})),
|
|
10860
|
+
state('*', style({
|
|
10861
|
+
opacity: 1,
|
|
10862
|
+
transform: 'scale(1)'
|
|
10863
|
+
})),
|
|
10864
|
+
transition('void => *', [
|
|
10865
|
+
animate('200ms ease-in-out')
|
|
10866
|
+
])
|
|
10867
|
+
])
|
|
10868
|
+
], template: "<div class=\"user-list-container\" [@slideInFromTop]>\r\n <div class=\"user-cards\">\r\n <div \r\n *ngFor=\"let user of filteredUserData\" \r\n class=\"user-card\"\r\n [class.selected]=\"selectedUser === user.name\"\r\n [style.border-color]=\"selectedUser === user.name ? getAvatarColor(user.color) : 'transparent'\"\r\n (click)=\"onUserSelect(user.name, user._id)\"\r\n >\r\n @if(user.name === \"Application Docs\"){\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\"><i class=\"pi pi-user\"></i></span>\r\n </div>\r\n }@else {\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\">{{ user.initials }}</span>\r\n </div>\r\n }\r\n <div class=\"user-info\">\r\n <div class=\"username\">{{ user.name }}</div>\r\n <div class=\"document-counts\">\r\n <span style=\"color : #16A34A;\"> {{ user.approved }} approved </span><span>/ {{ user.pending }} outstanding</span>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n <!-- Show message when filtered list is empty -->\r\n <div *ngIf=\"filteredUserData.length === 0 && shouldShowContainer\" class=\"no-users-message\" [@slideInFromTop]>\r\n <p>No users available for this category.</p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".user-list-container{padding:1rem 1rem .5rem}.user-cards{display:flex;flex-wrap:wrap;transition:all .3s ease-in-out}.user-card{display:flex;align-items:center;gap:.75rem;padding:1rem;border:2px solid transparent;border-radius:8px;cursor:pointer;transition:all .2s ease;background:#fff;min-width:140px;max-width:300px;height:70px;position:relative;flex-shrink:0}.user-card:hover{box-shadow:0 4px 8px #00000026}.user-card.selected{background-color:#f8fafc;box-shadow:0 4px 8px #00000026;border-width:2px}.user-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;color:#fff;font-size:14px;flex-shrink:0;font-weight:400}.avatar-orange{background-color:#fef3c7;color:#b45309}.avatar-blue{background-color:#dbeafe;color:#1d4ed8}.avatar-green{background-color:#22c55e1a;color:#36aa86}.avatar-grey{background-color:#ebeced;color:#5b6676}.avatar-purple{background-color:#3b82f61a;color:#3b82f6}.user-info{flex:1;min-width:0;overflow:hidden}.username{font-weight:600;color:#1f2937;margin-bottom:.25rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2}.document-counts{font-size:.875rem;color:#6b7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.35;padding-bottom:2px}.selection-indicator{position:absolute;top:8px;right:8px;width:20px;height:20px;background-color:#10b981;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px;flex-shrink:0}.no-users-message{display:flex;justify-content:center;align-items:center;padding:2rem;background:#f8fafc;border-radius:8px;border:2px dashed #d1d5db;margin:1rem 0}.no-users-message p{color:#6b7280;font-size:.875rem;font-weight:500;margin:0;text-align:center}\n"] }]
|
|
10869
|
+
}], ctorParameters: () => [{ type: DocumentHelperService }, { type: DocumentStore }, { type: DocumentQuery }, { type: UserListService }, { type: i0.ChangeDetectorRef }], propDecorators: { userList: [{
|
|
10870
|
+
type: Input
|
|
10871
|
+
}], categories: [{
|
|
10872
|
+
type: Input
|
|
10873
|
+
}], userSelected: [{
|
|
10874
|
+
type: Output
|
|
10875
|
+
}] } });
|
|
10876
|
+
|
|
10877
10877
|
class SharedModule {
|
|
10878
10878
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
10879
10879
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: SharedModule, declarations: [TablePrimaryComponent, HasPermissionDirective, ConfirmationDialogComponent], imports: [CommonModule,
|