cat-documents-ng 0.3.34 → 0.3.35

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.
@@ -4942,6 +4942,7 @@ class TablePrimaryComponent {
4942
4942
  showHeader = true;
4943
4943
  tableStyle = { 'min-width': '100%' };
4944
4944
  rowClick = new EventEmitter();
4945
+ downloadDocument = new EventEmitter();
4945
4946
  processedData = [];
4946
4947
  // Expose SHARED constants for template use
4947
4948
  SHARED = SHARED;
@@ -5016,6 +5017,15 @@ class TablePrimaryComponent {
5016
5017
  onRowClick(rowData) {
5017
5018
  this.rowClick.emit(rowData);
5018
5019
  }
5020
+ onDownloadClick(rowData, event) {
5021
+ event.stopPropagation(); // Prevent row click event
5022
+ if (rowData.documentUrl) {
5023
+ this.downloadDocument.emit({
5024
+ documentUrl: rowData.documentUrl,
5025
+ docName: rowData.docName || rowData.fileName || 'Document'
5026
+ });
5027
+ }
5028
+ }
5019
5029
  getVisibleColumnCount() {
5020
5030
  return this.visibleColumns.length;
5021
5031
  }
@@ -5052,11 +5062,11 @@ class TablePrimaryComponent {
5052
5062
  return displayName;
5053
5063
  }
5054
5064
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TablePrimaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5055
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TablePrimaryComponent, isStandalone: false, selector: "lib-table-primary", inputs: { tableData: "tableData", showHeader: "showHeader", tableStyle: "tableStyle" }, outputs: { rowClick: "rowClick" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"card\">\r\n <p-table [value]=\"processedData\" [tableStyle]=\"tableStyle\">\r\n <ng-template pTemplate=\"header\" *ngIf=\"showHeader\">\r\n <tr>\r\n <ng-container *ngFor=\"let col of visibleColumns\">\r\n <th [style.width]=\"col.width\">\r\n {{ col.header }}\r\n </th>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData>\r\n <tr (click)=\"onRowClick(rowData)\" class=\"clickable-row\">\r\n <ng-container *ngFor=\"let col of visibleColumns\">\r\n <td [style.width]=\"col.width\">\r\n <!-- Document Cell -->\r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_DOCUMENT\" class=\"document-cell\">\r\n <div class=\"document-info\">\r\n <div class=\"document-icon\">\r\n <i [class]=\"SHARED.ICON_FILE_PDF\" *ngIf=\"rowData._isPdfFile\"></i>\r\n <i [class]=\"SHARED.ICON_IMAGE\" *ngIf=\"rowData._isImageFile\"></i>\r\n <i [class]=\"SHARED.ICON_FILE_EXCEL\" *ngIf=\"rowData._isExcelFile\"></i>\r\n <i [class]=\"SHARED.ICON_FILE\" *ngIf=\"rowData._isOtherFile\"></i>\r\n </div>\r\n <div class=\"document-details\">\r\n <div class=\"document-name\" [innerHTML]=\"formatDocumentDisplayName(rowData)\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Status Cell -->\r\n \r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_STATUS\" class=\"status-cell\">\r\n <span class=\"status-pill\" [ngClass]=\"rowData._statusClass\">\r\n <i [class]=\"rowData._statusIcon\"></i>\r\n {{ rowData[col.field] }}\r\n </span>\r\n </div>\r\n\r\n <!-- Actions Cell -->\r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_ACTIONS\" class=\"actions-cell\">\r\n <!-- Actions content can be added here if needed -->\r\n </div>\r\n\r\n <!-- Default Text Cell -->\r\n <div *ngIf=\"!col.type || col.type === SHARED.CELL_TYPE_TEXT\" class=\"text-cell\">\r\n {{ rowData[col.field] }}\r\n </div>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n \r\n <!-- No Records Template -->\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td [attr.colspan]=\"getVisibleColumnCount()\" class=\"no-records-cell\">\r\n <div class=\"no-records-content\">\r\n <i class=\"pi pi-inbox\" style=\"font-size: 2rem; color: #6c757d;\"></i>\r\n <p class=\"no-records-text\">No records found</p>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>", styles: [".document-cell .document-info{display:flex;align-items:center;gap:.75rem;text-align:left}.document-cell .document-info .document-icon{width:40px;height:40px;background-color:#e3f2fd;border-radius:6px;display:flex;align-items:center;justify-content:center;color:#1976d2;font-size:1.25rem;flex-shrink:0}.document-cell .document-info .document-details{flex:1;min-width:0}.document-cell .document-info .document-details .document-name{font-weight:400;color:#334155;line-height:18px;font-size:14px;text-align:left;word-break:break-word}.document-cell .document-info .document-details .document-name br{margin-bottom:.125rem}.document-cell .document-info .document-details .document-name .alias-name{font-weight:500;color:#1e40af;font-size:13px;line-height:16px}.document-cell .document-info .document-details .document-name .document-info{font-weight:400;color:#334155;font-size:14px;line-height:18px}.status-cell .status-pill{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;padding:.375rem .75rem;border-radius:20px;font-size:.75rem;font-weight:500;white-space:nowrap;min-width:80px}.status-cell .status-pill i{font-size:.875rem}.status-cell .status-pill.status-pending{background-color:#f3f4f6;color:#6b7280}.status-cell .status-pill.status-approved{background-color:#d1fae5;color:#065f46}.status-cell .status-pill.status-alert{background-color:#fee2e2;color:#dc2626}.status-cell .status-pill.status-uploaded{background-color:#dbeafe;color:#1d4ed8}.status-cell .status-pill.status-reviewing{background-color:#fef3c7;color:#d97706}.status-cell .status-pill.status-rejected{background-color:#fee2e2;color:#dc2626}.actions-cell{text-align:left}.actions-cell .p-button{width:2rem;height:2rem;border-radius:50%;background-color:transparent;border:none;color:#6c757d}.actions-cell .p-button:hover{background-color:#f8f9fa;color:#495057}.text-cell{font-weight:500;color:#475569;font-size:14px;line-height:20px;text-align:left}.clickable-row{cursor:pointer;transition:background-color .2s ease}.clickable-row:hover{background-color:#f8f9fa!important}.clickable-row:active{background-color:#e9ecef!important}::ng-deep .p-datatable .p-datatable-wrapper{border:1px solid #E2E8F0;border-radius:10px}::ng-deep .p-datatable .p-datatable-thead>tr>th{background-color:#f8f9fa;border:none;border-bottom:1px solid #dee2e6;padding:1rem 1.5rem;font-weight:600;color:#64748b;font-size:.875rem;text-transform:capitalize;letter-spacing:.5px;text-align:left;border-radius:8px 8px 0 0}::ng-deep .p-datatable .p-datatable-thead>tr>th:first-child{border-top-left-radius:8px}::ng-deep .p-datatable .p-datatable-thead>tr>th:last-child{border-top-right-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr{border-bottom:1px solid #f1f3f4}::ng-deep .p-datatable .p-datatable-tbody>tr:hover{background-color:#f8f9fa}::ng-deep .p-datatable .p-datatable-tbody>tr:last-child>td:first-child{border-bottom-left-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr:last-child>td:last-child{border-bottom-right-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr>td{border:none;padding:1rem 1.5rem;vertical-align:middle;text-align:left}.no-records-cell{text-align:center;padding:3rem 1.5rem!important;border:none}.no-records-cell .no-records-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem}.no-records-cell .no-records-content .no-records-text{margin:0;color:#6c757d;font-size:1rem;font-weight:500}\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: i2$2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }] });
5065
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TablePrimaryComponent, isStandalone: false, selector: "lib-table-primary", inputs: { tableData: "tableData", showHeader: "showHeader", tableStyle: "tableStyle" }, outputs: { rowClick: "rowClick", downloadDocument: "downloadDocument" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"card\">\r\n <p-table [value]=\"processedData\" [tableStyle]=\"tableStyle\">\r\n <ng-template pTemplate=\"header\" *ngIf=\"showHeader\">\r\n <tr>\r\n <ng-container *ngFor=\"let col of visibleColumns\">\r\n <th [style.width]=\"col.width\">\r\n {{ col.header }}\r\n </th>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData>\r\n <tr (click)=\"onRowClick(rowData)\" class=\"clickable-row\">\r\n <ng-container *ngFor=\"let col of visibleColumns\">\r\n <td [style.width]=\"col.width\">\r\n <!-- Document Cell -->\r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_DOCUMENT\" class=\"document-cell\">\r\n <div class=\"document-info\">\r\n <div class=\"document-icon\">\r\n <i [class]=\"SHARED.ICON_FILE_PDF\" *ngIf=\"rowData._isPdfFile\"></i>\r\n <i [class]=\"SHARED.ICON_IMAGE\" *ngIf=\"rowData._isImageFile\"></i>\r\n <i [class]=\"SHARED.ICON_FILE_EXCEL\" *ngIf=\"rowData._isExcelFile\"></i>\r\n <i [class]=\"SHARED.ICON_FILE\" *ngIf=\"rowData._isOtherFile\"></i>\r\n </div>\r\n <div class=\"document-details\">\r\n <div class=\"document-name\" \r\n [innerHTML]=\"formatDocumentDisplayName(rowData)\"\r\n (click)=\"onDownloadClick(rowData, $event)\"\r\n class=\"clickable-document-name\"\r\n [title]=\"'Click to download ' + (rowData.docName || rowData.fileName || 'Document')\">\r\n </div>\r\n <div class=\"document-actions\" *ngIf=\"rowData.documentUrl\">\r\n <button class=\"download-btn-small\"\r\n (click)=\"onDownloadClick(rowData, $event)\"\r\n [title]=\"'Download ' + (rowData.docName || rowData.fileName || 'Document')\">\r\n <i class=\"pi pi-download\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Status Cell -->\r\n \r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_STATUS\" class=\"status-cell\">\r\n <span class=\"status-pill\" [ngClass]=\"rowData._statusClass\">\r\n <i [class]=\"rowData._statusIcon\"></i>\r\n {{ rowData[col.field] }}\r\n </span>\r\n </div>\r\n\r\n <!-- Actions Cell -->\r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_ACTIONS\" class=\"actions-cell\">\r\n <!-- Actions content can be added here if needed -->\r\n </div>\r\n\r\n <!-- Default Text Cell -->\r\n <div *ngIf=\"!col.type || col.type === SHARED.CELL_TYPE_TEXT\" class=\"text-cell\">\r\n {{ rowData[col.field] }}\r\n </div>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n \r\n <!-- No Records Template -->\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td [attr.colspan]=\"getVisibleColumnCount()\" class=\"no-records-cell\">\r\n <div class=\"no-records-content\">\r\n <i class=\"pi pi-inbox\" style=\"font-size: 2rem; color: #6c757d;\"></i>\r\n <p class=\"no-records-text\">No records found</p>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>", styles: [".document-cell .document-info{display:flex;align-items:center;gap:.75rem;text-align:left}.document-cell .document-info .document-icon{width:40px;height:40px;background-color:#e3f2fd;border-radius:6px;display:flex;align-items:center;justify-content:center;color:#1976d2;font-size:1.25rem;flex-shrink:0}.document-cell .document-info .document-details{flex:1;min-width:0}.document-cell .document-info .document-details .document-name{font-weight:400;color:#334155;line-height:18px;font-size:14px;text-align:left;word-break:break-word}.document-cell .document-info .document-details .document-name br{margin-bottom:.125rem}.document-cell .document-info .document-details .document-name .alias-name{font-weight:500;color:#1e40af;font-size:13px;line-height:16px}.document-cell .document-info .document-details .document-name .document-info{font-weight:400;color:#334155;font-size:14px;line-height:18px}.status-cell .status-pill{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;padding:.375rem .75rem;border-radius:20px;font-size:.75rem;font-weight:500;white-space:nowrap;min-width:80px}.status-cell .status-pill i{font-size:.875rem}.status-cell .status-pill.status-pending{background-color:#f3f4f6;color:#6b7280}.status-cell .status-pill.status-approved{background-color:#d1fae5;color:#065f46}.status-cell .status-pill.status-alert{background-color:#fee2e2;color:#dc2626}.status-cell .status-pill.status-uploaded{background-color:#dbeafe;color:#1d4ed8}.status-cell .status-pill.status-reviewing{background-color:#fef3c7;color:#d97706}.status-cell .status-pill.status-rejected{background-color:#fee2e2;color:#dc2626}.actions-cell{text-align:left}.actions-cell .p-button{width:2rem;height:2rem;border-radius:50%;background-color:transparent;border:none;color:#6c757d}.actions-cell .p-button:hover{background-color:#f8f9fa;color:#495057}.text-cell{font-weight:500;color:#475569;font-size:14px;line-height:20px;text-align:left}.clickable-row{cursor:pointer;transition:background-color .2s ease}.clickable-row:hover{background-color:#f8f9fa!important}.clickable-row:active{background-color:#e9ecef!important}::ng-deep .p-datatable .p-datatable-wrapper{border:1px solid #E2E8F0;border-radius:10px}::ng-deep .p-datatable .p-datatable-thead>tr>th{background-color:#f8f9fa;border:none;border-bottom:1px solid #dee2e6;padding:1rem 1.5rem;font-weight:600;color:#64748b;font-size:.875rem;text-transform:capitalize;letter-spacing:.5px;text-align:left;border-radius:8px 8px 0 0}::ng-deep .p-datatable .p-datatable-thead>tr>th:first-child{border-top-left-radius:8px}::ng-deep .p-datatable .p-datatable-thead>tr>th:last-child{border-top-right-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr{border-bottom:1px solid #f1f3f4}::ng-deep .p-datatable .p-datatable-tbody>tr:hover{background-color:#f8f9fa}::ng-deep .p-datatable .p-datatable-tbody>tr:last-child>td:first-child{border-bottom-left-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr:last-child>td:last-child{border-bottom-right-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr>td{border:none;padding:1rem 1.5rem;vertical-align:middle;text-align:left}.no-records-cell{text-align:center;padding:3rem 1.5rem!important;border:none}.no-records-cell .no-records-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem}.no-records-cell .no-records-content .no-records-text{margin:0;color:#6c757d;font-size:1rem;font-weight:500}\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: i2$2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }] });
5056
5066
  }
5057
5067
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TablePrimaryComponent, decorators: [{
5058
5068
  type: Component,
5059
- args: [{ selector: 'lib-table-primary', standalone: false, template: "<div class=\"card\">\r\n <p-table [value]=\"processedData\" [tableStyle]=\"tableStyle\">\r\n <ng-template pTemplate=\"header\" *ngIf=\"showHeader\">\r\n <tr>\r\n <ng-container *ngFor=\"let col of visibleColumns\">\r\n <th [style.width]=\"col.width\">\r\n {{ col.header }}\r\n </th>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData>\r\n <tr (click)=\"onRowClick(rowData)\" class=\"clickable-row\">\r\n <ng-container *ngFor=\"let col of visibleColumns\">\r\n <td [style.width]=\"col.width\">\r\n <!-- Document Cell -->\r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_DOCUMENT\" class=\"document-cell\">\r\n <div class=\"document-info\">\r\n <div class=\"document-icon\">\r\n <i [class]=\"SHARED.ICON_FILE_PDF\" *ngIf=\"rowData._isPdfFile\"></i>\r\n <i [class]=\"SHARED.ICON_IMAGE\" *ngIf=\"rowData._isImageFile\"></i>\r\n <i [class]=\"SHARED.ICON_FILE_EXCEL\" *ngIf=\"rowData._isExcelFile\"></i>\r\n <i [class]=\"SHARED.ICON_FILE\" *ngIf=\"rowData._isOtherFile\"></i>\r\n </div>\r\n <div class=\"document-details\">\r\n <div class=\"document-name\" [innerHTML]=\"formatDocumentDisplayName(rowData)\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Status Cell -->\r\n \r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_STATUS\" class=\"status-cell\">\r\n <span class=\"status-pill\" [ngClass]=\"rowData._statusClass\">\r\n <i [class]=\"rowData._statusIcon\"></i>\r\n {{ rowData[col.field] }}\r\n </span>\r\n </div>\r\n\r\n <!-- Actions Cell -->\r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_ACTIONS\" class=\"actions-cell\">\r\n <!-- Actions content can be added here if needed -->\r\n </div>\r\n\r\n <!-- Default Text Cell -->\r\n <div *ngIf=\"!col.type || col.type === SHARED.CELL_TYPE_TEXT\" class=\"text-cell\">\r\n {{ rowData[col.field] }}\r\n </div>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n \r\n <!-- No Records Template -->\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td [attr.colspan]=\"getVisibleColumnCount()\" class=\"no-records-cell\">\r\n <div class=\"no-records-content\">\r\n <i class=\"pi pi-inbox\" style=\"font-size: 2rem; color: #6c757d;\"></i>\r\n <p class=\"no-records-text\">No records found</p>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>", styles: [".document-cell .document-info{display:flex;align-items:center;gap:.75rem;text-align:left}.document-cell .document-info .document-icon{width:40px;height:40px;background-color:#e3f2fd;border-radius:6px;display:flex;align-items:center;justify-content:center;color:#1976d2;font-size:1.25rem;flex-shrink:0}.document-cell .document-info .document-details{flex:1;min-width:0}.document-cell .document-info .document-details .document-name{font-weight:400;color:#334155;line-height:18px;font-size:14px;text-align:left;word-break:break-word}.document-cell .document-info .document-details .document-name br{margin-bottom:.125rem}.document-cell .document-info .document-details .document-name .alias-name{font-weight:500;color:#1e40af;font-size:13px;line-height:16px}.document-cell .document-info .document-details .document-name .document-info{font-weight:400;color:#334155;font-size:14px;line-height:18px}.status-cell .status-pill{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;padding:.375rem .75rem;border-radius:20px;font-size:.75rem;font-weight:500;white-space:nowrap;min-width:80px}.status-cell .status-pill i{font-size:.875rem}.status-cell .status-pill.status-pending{background-color:#f3f4f6;color:#6b7280}.status-cell .status-pill.status-approved{background-color:#d1fae5;color:#065f46}.status-cell .status-pill.status-alert{background-color:#fee2e2;color:#dc2626}.status-cell .status-pill.status-uploaded{background-color:#dbeafe;color:#1d4ed8}.status-cell .status-pill.status-reviewing{background-color:#fef3c7;color:#d97706}.status-cell .status-pill.status-rejected{background-color:#fee2e2;color:#dc2626}.actions-cell{text-align:left}.actions-cell .p-button{width:2rem;height:2rem;border-radius:50%;background-color:transparent;border:none;color:#6c757d}.actions-cell .p-button:hover{background-color:#f8f9fa;color:#495057}.text-cell{font-weight:500;color:#475569;font-size:14px;line-height:20px;text-align:left}.clickable-row{cursor:pointer;transition:background-color .2s ease}.clickable-row:hover{background-color:#f8f9fa!important}.clickable-row:active{background-color:#e9ecef!important}::ng-deep .p-datatable .p-datatable-wrapper{border:1px solid #E2E8F0;border-radius:10px}::ng-deep .p-datatable .p-datatable-thead>tr>th{background-color:#f8f9fa;border:none;border-bottom:1px solid #dee2e6;padding:1rem 1.5rem;font-weight:600;color:#64748b;font-size:.875rem;text-transform:capitalize;letter-spacing:.5px;text-align:left;border-radius:8px 8px 0 0}::ng-deep .p-datatable .p-datatable-thead>tr>th:first-child{border-top-left-radius:8px}::ng-deep .p-datatable .p-datatable-thead>tr>th:last-child{border-top-right-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr{border-bottom:1px solid #f1f3f4}::ng-deep .p-datatable .p-datatable-tbody>tr:hover{background-color:#f8f9fa}::ng-deep .p-datatable .p-datatable-tbody>tr:last-child>td:first-child{border-bottom-left-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr:last-child>td:last-child{border-bottom-right-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr>td{border:none;padding:1rem 1.5rem;vertical-align:middle;text-align:left}.no-records-cell{text-align:center;padding:3rem 1.5rem!important;border:none}.no-records-cell .no-records-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem}.no-records-cell .no-records-content .no-records-text{margin:0;color:#6c757d;font-size:1rem;font-weight:500}\n"] }]
5069
+ args: [{ selector: 'lib-table-primary', standalone: false, template: "<div class=\"card\">\r\n <p-table [value]=\"processedData\" [tableStyle]=\"tableStyle\">\r\n <ng-template pTemplate=\"header\" *ngIf=\"showHeader\">\r\n <tr>\r\n <ng-container *ngFor=\"let col of visibleColumns\">\r\n <th [style.width]=\"col.width\">\r\n {{ col.header }}\r\n </th>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData>\r\n <tr (click)=\"onRowClick(rowData)\" class=\"clickable-row\">\r\n <ng-container *ngFor=\"let col of visibleColumns\">\r\n <td [style.width]=\"col.width\">\r\n <!-- Document Cell -->\r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_DOCUMENT\" class=\"document-cell\">\r\n <div class=\"document-info\">\r\n <div class=\"document-icon\">\r\n <i [class]=\"SHARED.ICON_FILE_PDF\" *ngIf=\"rowData._isPdfFile\"></i>\r\n <i [class]=\"SHARED.ICON_IMAGE\" *ngIf=\"rowData._isImageFile\"></i>\r\n <i [class]=\"SHARED.ICON_FILE_EXCEL\" *ngIf=\"rowData._isExcelFile\"></i>\r\n <i [class]=\"SHARED.ICON_FILE\" *ngIf=\"rowData._isOtherFile\"></i>\r\n </div>\r\n <div class=\"document-details\">\r\n <div class=\"document-name\" \r\n [innerHTML]=\"formatDocumentDisplayName(rowData)\"\r\n (click)=\"onDownloadClick(rowData, $event)\"\r\n class=\"clickable-document-name\"\r\n [title]=\"'Click to download ' + (rowData.docName || rowData.fileName || 'Document')\">\r\n </div>\r\n <div class=\"document-actions\" *ngIf=\"rowData.documentUrl\">\r\n <button class=\"download-btn-small\"\r\n (click)=\"onDownloadClick(rowData, $event)\"\r\n [title]=\"'Download ' + (rowData.docName || rowData.fileName || 'Document')\">\r\n <i class=\"pi pi-download\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Status Cell -->\r\n \r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_STATUS\" class=\"status-cell\">\r\n <span class=\"status-pill\" [ngClass]=\"rowData._statusClass\">\r\n <i [class]=\"rowData._statusIcon\"></i>\r\n {{ rowData[col.field] }}\r\n </span>\r\n </div>\r\n\r\n <!-- Actions Cell -->\r\n <div *ngIf=\"col.type === SHARED.CELL_TYPE_ACTIONS\" class=\"actions-cell\">\r\n <!-- Actions content can be added here if needed -->\r\n </div>\r\n\r\n <!-- Default Text Cell -->\r\n <div *ngIf=\"!col.type || col.type === SHARED.CELL_TYPE_TEXT\" class=\"text-cell\">\r\n {{ rowData[col.field] }}\r\n </div>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n \r\n <!-- No Records Template -->\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td [attr.colspan]=\"getVisibleColumnCount()\" class=\"no-records-cell\">\r\n <div class=\"no-records-content\">\r\n <i class=\"pi pi-inbox\" style=\"font-size: 2rem; color: #6c757d;\"></i>\r\n <p class=\"no-records-text\">No records found</p>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>", styles: [".document-cell .document-info{display:flex;align-items:center;gap:.75rem;text-align:left}.document-cell .document-info .document-icon{width:40px;height:40px;background-color:#e3f2fd;border-radius:6px;display:flex;align-items:center;justify-content:center;color:#1976d2;font-size:1.25rem;flex-shrink:0}.document-cell .document-info .document-details{flex:1;min-width:0}.document-cell .document-info .document-details .document-name{font-weight:400;color:#334155;line-height:18px;font-size:14px;text-align:left;word-break:break-word}.document-cell .document-info .document-details .document-name br{margin-bottom:.125rem}.document-cell .document-info .document-details .document-name .alias-name{font-weight:500;color:#1e40af;font-size:13px;line-height:16px}.document-cell .document-info .document-details .document-name .document-info{font-weight:400;color:#334155;font-size:14px;line-height:18px}.status-cell .status-pill{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;padding:.375rem .75rem;border-radius:20px;font-size:.75rem;font-weight:500;white-space:nowrap;min-width:80px}.status-cell .status-pill i{font-size:.875rem}.status-cell .status-pill.status-pending{background-color:#f3f4f6;color:#6b7280}.status-cell .status-pill.status-approved{background-color:#d1fae5;color:#065f46}.status-cell .status-pill.status-alert{background-color:#fee2e2;color:#dc2626}.status-cell .status-pill.status-uploaded{background-color:#dbeafe;color:#1d4ed8}.status-cell .status-pill.status-reviewing{background-color:#fef3c7;color:#d97706}.status-cell .status-pill.status-rejected{background-color:#fee2e2;color:#dc2626}.actions-cell{text-align:left}.actions-cell .p-button{width:2rem;height:2rem;border-radius:50%;background-color:transparent;border:none;color:#6c757d}.actions-cell .p-button:hover{background-color:#f8f9fa;color:#495057}.text-cell{font-weight:500;color:#475569;font-size:14px;line-height:20px;text-align:left}.clickable-row{cursor:pointer;transition:background-color .2s ease}.clickable-row:hover{background-color:#f8f9fa!important}.clickable-row:active{background-color:#e9ecef!important}::ng-deep .p-datatable .p-datatable-wrapper{border:1px solid #E2E8F0;border-radius:10px}::ng-deep .p-datatable .p-datatable-thead>tr>th{background-color:#f8f9fa;border:none;border-bottom:1px solid #dee2e6;padding:1rem 1.5rem;font-weight:600;color:#64748b;font-size:.875rem;text-transform:capitalize;letter-spacing:.5px;text-align:left;border-radius:8px 8px 0 0}::ng-deep .p-datatable .p-datatable-thead>tr>th:first-child{border-top-left-radius:8px}::ng-deep .p-datatable .p-datatable-thead>tr>th:last-child{border-top-right-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr{border-bottom:1px solid #f1f3f4}::ng-deep .p-datatable .p-datatable-tbody>tr:hover{background-color:#f8f9fa}::ng-deep .p-datatable .p-datatable-tbody>tr:last-child>td:first-child{border-bottom-left-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr:last-child>td:last-child{border-bottom-right-radius:8px}::ng-deep .p-datatable .p-datatable-tbody>tr>td{border:none;padding:1rem 1.5rem;vertical-align:middle;text-align:left}.no-records-cell{text-align:center;padding:3rem 1.5rem!important;border:none}.no-records-cell .no-records-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem}.no-records-cell .no-records-content .no-records-text{margin:0;color:#6c757d;font-size:1rem;font-weight:500}\n"] }]
5060
5070
  }], propDecorators: { tableData: [{
5061
5071
  type: Input
5062
5072
  }], showHeader: [{
@@ -5065,6 +5075,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
5065
5075
  type: Input
5066
5076
  }], rowClick: [{
5067
5077
  type: Output
5078
+ }], downloadDocument: [{
5079
+ type: Output
5068
5080
  }] } });
5069
5081
 
5070
5082
  class DocumentViewerService {
@@ -5540,10 +5552,59 @@ class DocumentHistoryService {
5540
5552
  * @param docName - The name of the document
5541
5553
  */
5542
5554
  downloadDocument(documentUrl, docName) {
5555
+ console.log('DocumentHistoryService: downloadDocument called', { documentUrl, docName });
5543
5556
  if (!documentUrl) {
5544
5557
  console.warn(ERRORS.NO_DOCUMENT_URL);
5545
5558
  return;
5546
5559
  }
5560
+ // Validate URL format
5561
+ try {
5562
+ new URL(documentUrl);
5563
+ console.log('DocumentHistoryService: URL is valid');
5564
+ }
5565
+ catch (error) {
5566
+ console.error('DocumentHistoryService: Invalid URL format:', documentUrl);
5567
+ return;
5568
+ }
5569
+ console.log('DocumentHistoryService: Attempting to download document:', { documentUrl, docName });
5570
+ // For PDF files, try direct download first
5571
+ if (documentUrl.toLowerCase().includes('.pdf') || documentUrl.toLowerCase().includes('application/pdf')) {
5572
+ console.log('DocumentHistoryService: Detected PDF file, using direct download method');
5573
+ this.downloadPdfDirectly(documentUrl, docName);
5574
+ return;
5575
+ }
5576
+ // For other file types, use the blob approach
5577
+ console.log('DocumentHistoryService: Using blob download method');
5578
+ this.downloadWithBlob(documentUrl, docName);
5579
+ }
5580
+ /**
5581
+ * Downloads PDF files directly using a more reliable method
5582
+ */
5583
+ downloadPdfDirectly(documentUrl, docName) {
5584
+ try {
5585
+ console.log('DocumentHistoryService: Attempting direct PDF download');
5586
+ // Method 1: Create a hidden link and trigger download
5587
+ const link = document.createElement('a');
5588
+ link.href = documentUrl;
5589
+ link.download = docName || 'document.pdf';
5590
+ link.target = '_blank';
5591
+ link.rel = 'noopener noreferrer';
5592
+ link.style.display = 'none';
5593
+ document.body.appendChild(link);
5594
+ link.click();
5595
+ document.body.removeChild(link);
5596
+ console.log('DocumentHistoryService: PDF download initiated via direct link');
5597
+ }
5598
+ catch (error) {
5599
+ console.warn('DocumentHistoryService: Direct PDF download failed, trying blob method:', error);
5600
+ this.downloadWithBlob(documentUrl, docName);
5601
+ }
5602
+ }
5603
+ /**
5604
+ * Downloads other file types using a robust blob approach
5605
+ */
5606
+ downloadWithBlob(documentUrl, docName) {
5607
+ console.log('DocumentHistoryService: Starting blob download');
5547
5608
  this.http.get(documentUrl, { responseType: 'blob' }).subscribe({
5548
5609
  next: (blob) => {
5549
5610
  try {
@@ -5558,38 +5619,35 @@ class DocumentHistoryService {
5558
5619
  a.click();
5559
5620
  a.remove();
5560
5621
  window.URL.revokeObjectURL(blobUrl);
5622
+ console.log('DocumentHistoryService: Document downloaded successfully via blob method');
5561
5623
  }
5562
5624
  catch (error) {
5563
- console.error('Download failed:', error);
5564
- // Fallback: try to open the original URL in a new tab
5565
- try {
5566
- const newWindow = window.open(documentUrl, '_blank', 'noopener,noreferrer');
5567
- if (!newWindow) {
5568
- console.warn('Popup blocked, falling back to direct navigation');
5569
- window.location.href = documentUrl;
5570
- }
5571
- }
5572
- catch (fallbackError) {
5573
- console.error('All download methods failed:', fallbackError);
5574
- }
5625
+ console.error('DocumentHistoryService: Blob download failed:', error);
5626
+ this.fallbackDownload(documentUrl);
5575
5627
  }
5576
5628
  },
5577
5629
  error: (err) => {
5578
- console.error(ERRORS.DOWNLOAD_FAIL, err);
5579
- // Fallback: try to open the original URL directly
5580
- try {
5581
- const newWindow = window.open(documentUrl, '_blank', 'noopener,noreferrer');
5582
- if (!newWindow) {
5583
- console.warn('Popup blocked, falling back to direct navigation');
5584
- window.location.href = documentUrl;
5585
- }
5586
- }
5587
- catch (fallbackError) {
5588
- console.error('All fallback methods failed:', fallbackError);
5589
- }
5630
+ console.error('DocumentHistoryService: HTTP error during download:', err);
5631
+ this.fallbackDownload(documentUrl);
5590
5632
  }
5591
5633
  });
5592
5634
  }
5635
+ /**
5636
+ * Fallback download method when other methods fail
5637
+ */
5638
+ fallbackDownload(documentUrl) {
5639
+ try {
5640
+ console.log('DocumentHistoryService: Attempting fallback download method');
5641
+ const newWindow = window.open(documentUrl, '_blank', 'noopener,noreferrer');
5642
+ if (!newWindow) {
5643
+ console.warn('DocumentHistoryService: Popup blocked, falling back to direct navigation');
5644
+ window.location.href = documentUrl;
5645
+ }
5646
+ }
5647
+ catch (fallbackError) {
5648
+ console.error('DocumentHistoryService: All download methods failed:', fallbackError);
5649
+ }
5650
+ }
5593
5651
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryService, deps: [{ token: DocumentHistoryStyleService }, { token: i2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
5594
5652
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryService, providedIn: 'root' });
5595
5653
  }
@@ -5660,14 +5718,42 @@ class DocumentHistoryComponent {
5660
5718
  */
5661
5719
  downloadDocument(documentUrl, docName) {
5662
5720
  console.log('DocumentHistoryComponent: downloadDocument called', { documentUrl, docName });
5663
- this.documentHistoryService.downloadDocument(documentUrl, docName);
5721
+ if (!documentUrl) {
5722
+ console.error('DocumentHistoryComponent: No document URL provided');
5723
+ return;
5724
+ }
5725
+ // Log additional debugging information
5726
+ console.log('DocumentHistoryComponent: Document details:', {
5727
+ url: documentUrl,
5728
+ name: docName,
5729
+ urlType: typeof documentUrl,
5730
+ nameType: typeof docName,
5731
+ urlLength: documentUrl.length,
5732
+ hasUrl: !!documentUrl,
5733
+ urlStartsWith: documentUrl.substring(0, 20)
5734
+ });
5735
+ try {
5736
+ this.documentHistoryService.downloadDocument(documentUrl, docName);
5737
+ }
5738
+ catch (error) {
5739
+ console.error('DocumentHistoryComponent: Error calling download service:', error);
5740
+ }
5741
+ }
5742
+ /**
5743
+ * Test method to verify download functionality
5744
+ */
5745
+ testDownload() {
5746
+ console.log('DocumentHistoryComponent: Testing download functionality');
5747
+ const testUrl = 'https://example.com/test.pdf';
5748
+ const testName = 'test-document.pdf';
5749
+ this.downloadDocument(testUrl, testName);
5664
5750
  }
5665
5751
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryComponent, deps: [{ token: DocumentHistoryService }], target: i0.ɵɵFactoryTarget.Component });
5666
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentHistoryComponent, isStandalone: false, selector: "document-history", inputs: { historyData: "historyData", showHistory: "showHistory" }, ngImport: i0, template: "<div class=\"document-history-container\" *ngIf=\"showHistory && historyData.length > 0\">\r\n <div class=\"history-sections\">\r\n <div class=\"history-section\" *ngFor=\"let section of processedHistoryData\">\r\n <div *ngIf=\"section.header === 'Initial Request' && section.hasValidContent\" \r\n class=\"initial-request-section\"\r\n [ngClass]=\"section.accordionClass\">\r\n <p-accordion [activeIndex]=\"activeAccordionIndex\" \r\n (onOpen)=\"onAccordionOpen()\" \r\n (onClose)=\"onAccordionClose()\">\r\n <p-accordionTab [header]=\"section.header\">\r\n <div class=\"history-timeline\" *ngIf=\"section.hasValidContent\">\r\n <div class=\"timeline-item\" *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-card\" [ngClass]=\"item.actionBgColor\">\r\n <div class=\"card-header\">\r\n <div class=\"action-info\">\r\n <div class=\"action-icon\" [ngClass]=\"item.actionIconBgColor\">\r\n <i [class]=\"item.actionIcon\"></i>\r\n </div>\r\n <span class=\"action-label\" [ngClass]=\"item.actionColor\">\r\n {{ item.label }}\r\n </span>\r\n </div>\r\n <div class=\"timestamp\">\r\n {{ item.dateTime }}\r\n </div>\r\n </div>\r\n \r\n <!-- Description -->\r\n <div class=\"card-description\" *ngIf=\"item.requestDescription\">\r\n <p class=\"description-text\">{{ item.requestDescription ?? 'No Request' }}</p>\r\n </div>\r\n \r\n <!-- Document details if URL exists -->\r\n <div class=\"document-details\" *ngIf=\"item.documentUrl\">\r\n <div class=\"document-card\">\r\n <div class=\"document-info\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <div class=\"document-text\">\r\n <div class=\"document-title\">Document</div>\r\n <div class=\"document-filename\">\r\n <p-button class=\"document-name-btn\"\r\n (onClick)=\"downloadDocument(item.documentUrl, item.docName)\"\r\n [title]=\"'Download ' + (item.docName || 'Document')\">\r\n {{ item.docName || 'Document' }}\r\n </p-button>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n \r\n <!-- User information -->\r\n <div class=\"user-info\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- Show message if no valid content -->\r\n <div class=\"no-content-message\" *ngIf=\"!section.hasValidContent\">\r\n <p>No initial request details available.</p>\r\n </div>\r\n </p-accordionTab>\r\n </p-accordion>\r\n </div>\r\n \r\n <!-- Document History as regular timeline -->\r\n <div *ngIf=\"section.header !== 'Initial Request'\" class=\"document-history-section\">\r\n <div class=\"section-header\" *ngIf=\"section.header\">\r\n <h4 class=\"section-title\">{{ section.header }}</h4>\r\n </div>\r\n \r\n <div class=\"history-timeline\">\r\n <div class=\"timeline-item\" *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-card\" [ngClass]=\"item.actionBgColor\">\r\n <!-- Header with icon and timestamp -->\r\n <div class=\"card-header\">\r\n <div class=\"action-info\">\r\n <div class=\"action-icon\" [ngClass]=\"item.actionIconBgColor\">\r\n <i [class]=\"item.actionIcon\"></i>\r\n </div>\r\n <span class=\"action-label\" [ngClass]=\"item.actionColor\">\r\n {{ item.label }}\r\n </span>\r\n </div>\r\n <div class=\"timestamp\">\r\n {{ item.dateTime }}\r\n </div>\r\n </div>\r\n \r\n <!-- Description -->\r\n <div class=\"card-description\" *ngIf=\"item.requestDescription\">\r\n <p class=\"description-text\">{{ item.requestDescription }}</p>\r\n </div>\r\n \r\n <!-- Document details if URL exists -->\r\n <div class=\"document-details\" *ngIf=\"item.documentUrl\">\r\n <div class=\"document-card\">\r\n <div class=\"document-info\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <div class=\"document-text\">\r\n <div class=\"document-title\">Document</div>\r\n <div class=\"document-filename\">\r\n <button class=\"document-name-btn\"\r\n (click)=\"downloadDocument(item.documentUrl, item.docName)\"\r\n [title]=\"'Download ' + (item.docName || 'Document')\">\r\n {{ item.docName || 'Document' }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"document-actions\">\r\n <button class=\"action-btn download-btn\"\r\n (click)=\"downloadDocument(item.documentUrl, item.docName)\"\r\n [title]=\"'Download ' + (item.docName || 'Document')\">\r\n <i class=\"pi pi-download\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n <!-- User information -->\r\n <div class=\"user-info\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".document-history-container{padding:.75rem;background:#fff;border-radius:8px;box-shadow:0 2px 4px #0000001a;max-height:none;overflow-y:auto;min-width:0}.document-history-container .history-header{margin-bottom:1rem}.document-history-container .history-header .history-title{font-size:1.25rem;font-weight:600;color:#374151;margin:0}.document-history-container .history-sections .history-section{margin-bottom:1.5rem}.document-history-container .history-sections .history-section .initial-request-section{margin-bottom:1rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{background:#fff;border-top:1px solid;border-top-left-radius:8px;border-top-right-radius:8px;border-bottom:none;padding:.75rem 1rem;font-weight:600;color:#1f2937;font-size:1rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link:focus{box-shadow:none}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link .p-accordion-header-icon{color:#6b7280;font-size:.875rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header.p-highlight .p-accordion-header-link{background:#fff}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content{background:#fff;border:1px solid;border-top:none;border-radius:0 0 8px 8px;padding:1rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item{margin-bottom:0}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:.75rem;border-right:3px solid}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon{background:#7d879b;color:#fff;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon i{font-size:14px}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-label{color:#1f2937;font-weight:600;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .timestamp{color:#6b7280;font-size:.75rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-description .description-text{color:#374151;line-height:1.5;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .user-info .user-name{color:#1f2937;font-weight:500;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .user-info .user-role{color:#6b7280;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section.document-requested ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#d1d5db}.document-history-container .history-sections .history-section .initial-request-section.document-requested ::ng-deep .p-accordion .p-accordion-content{border-color:#d1d5db}.document-history-container .history-sections .history-section .initial-request-section.document-uploaded ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#86efac}.document-history-container .history-sections .history-section .initial-request-section.document-uploaded ::ng-deep .p-accordion .p-accordion-content{border-color:#86efac}.document-history-container .history-sections .history-section .initial-request-section.document-rejected ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#fca5a5}.document-history-container .history-sections .history-section .initial-request-section.document-rejected ::ng-deep .p-accordion .p-accordion-content{border-color:#fca5a5}.document-history-container .history-sections .history-section .initial-request-section.document-accepted ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#86efac}.document-history-container .history-sections .history-section .initial-request-section.document-accepted ::ng-deep .p-accordion .p-accordion-content{border-color:#86efac}.document-history-container .history-sections .history-section .document-history-section .section-header{margin-bottom:.75rem}.document-history-container .history-sections .history-section .document-history-section .section-header .section-title{font-size:1.25rem;font-weight:500;color:#374151;margin:0}.document-history-container .history-sections .history-section .history-timeline .timeline-item{margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card{border-radius:8px;border:1px solid;padding:1rem;position:relative;border-right:3px solid}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-green-50{background-color:#f0fdf4;border-color:#bbf7d0;border-right-color:#10b981}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-red-50{background-color:#fef2f2;border-color:#fecaca;border-right-color:#ef4444}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-blue-50{background-color:#eff6ff;border-color:#bfdbfe;border-right-color:#3b82f6}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-gray-50{background-color:#f8fafc;border-color:#e2e8f0;border-right-color:#6b7280}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info{display:flex;align-items:center;gap:.5rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon i{font-size:14px}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-label{font-weight:600;font-size:.875rem;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .timestamp{font-size:.75rem;color:#6b7280}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-description{margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-description .description-text{margin:0;color:#374151;font-size:.875rem;line-height:1.4;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details{margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card{background:#fff;border-radius:6px;padding:.75rem;display:flex;justify-content:space-between;align-items:center;border:1px solid #e5e7eb}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info{display:flex;align-items:center;gap:.5rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-icon{color:#3b82f6;font-size:1.25rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-title{font-weight:500;color:#374151;font-size:.875rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename{color:#3b82f6;font-size:.75rem;word-break:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-link{color:#3b82f6;text-decoration:underline;cursor:pointer;display:inline-block}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-link:hover{color:#2563eb;text-decoration:none}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-link:active{color:#1d4ed8}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-name{color:#374151;font-weight:500;word-break:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-name-btn{background:none;border:none;padding:0;margin:0;color:#3b82f6;text-decoration:underline;cursor:pointer;font-size:.75rem;font-weight:500;word-break:break-word;text-align:left}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-name-btn:hover{color:#2563eb;text-decoration:none}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-name-btn:active{color:#1d4ed8}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-name-btn:focus{outline:2px solid #3b82f6;outline-offset:2px}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions{display:flex;gap:.25rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn{width:24px;height:24px;border:none;border-radius:4px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:.75rem;text-decoration:none}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.edit-btn{background:#3b82f6;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.edit-btn:hover{background:#2563eb}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.delete-btn{background:#ef4444;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.delete-btn:hover{background:#dc2626}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.download-btn{background:#10b981;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.download-btn:hover{background:#059669}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info{text-align:right;font-size:.75rem;color:#374151}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info .user-name{font-weight:500;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info .user-role{color:#6b7280;word-wrap:break-word;overflow-wrap:break-word}.text-green-600{color:#059669}.text-red-600{color:#dc2626}.text-blue-600{color:#2563eb}.text-gray-600{color:#4b5563}.bg-green-50{background-color:#f0fdf4}.bg-red-50{background-color:#fef2f2}.bg-blue-50{background-color:#eff6ff}.bg-gray-50{background-color:#f8fafc}.border-green-200{border-color:#bbf7d0}.border-red-200{border-color:#fecaca}.border-blue-200{border-color:#bfdbfe}.border-gray-200{border-color:#e2e8f0}.icon-bg-green{background-color:#10b981}.icon-bg-red{background-color:#ef4444}.icon-bg-blue{background-color:#3b82f6}.icon-bg-gray{background-color:#6b7280}.no-content-message{text-align:center;padding:2rem;color:#6b7280;font-style:italic}.no-content-message p{margin:0;font-size:.875rem}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$2.Accordion, selector: "p-accordion", inputs: ["multiple", "style", "styleClass", "expandIcon", "collapseIcon", "activeIndex", "selectOnFocus", "headerAriaLevel"], outputs: ["onClose", "onOpen", "activeIndexChange"] }, { kind: "component", type: i3$2.AccordionTab, selector: "p-accordionTab", inputs: ["id", "header", "headerStyle", "tabStyle", "contentStyle", "tabStyleClass", "headerStyleClass", "contentStyleClass", "disabled", "cache", "transitionOptions", "iconPos", "selected", "headerAriaLevel"], outputs: ["selectedChange"] }, { kind: "component", type: i9.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }] });
5752
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentHistoryComponent, isStandalone: false, selector: "document-history", inputs: { historyData: "historyData", showHistory: "showHistory" }, ngImport: i0, template: "<div class=\"document-history-container\" *ngIf=\"showHistory && historyData.length > 0\">\r\n <!-- Debug test button -->\r\n <div class=\"debug-section\" style=\"margin-bottom: 1rem; padding: 0.5rem; background: #f3f4f6; border-radius: 4px;\">\r\n <button type=\"button\" \r\n class=\"p-button p-button-sm p-button-secondary\"\r\n (click)=\"testDownload()\"\r\n style=\"margin-right: 0.5rem;\">\r\n \uD83E\uDDEA Test Download\r\n </button>\r\n <small style=\"color: #6b7280;\">Debug: Test download functionality</small>\r\n </div>\r\n \r\n <div class=\"history-sections\">\r\n <div class=\"history-section\" *ngFor=\"let section of processedHistoryData\">\r\n <div *ngIf=\"section.header === 'Initial Request' && section.hasValidContent\" \r\n class=\"initial-request-section\"\r\n [ngClass]=\"section.accordionClass\">\r\n <p-accordion [activeIndex]=\"activeAccordionIndex\" \r\n (onOpen)=\"onAccordionOpen()\" \r\n (onClose)=\"onAccordionClose()\">\r\n <p-accordionTab [header]=\"section.header\">\r\n <div class=\"history-timeline\" *ngIf=\"section.hasValidContent\">\r\n <div class=\"timeline-item\" *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-card\" [ngClass]=\"item.actionBgColor\">\r\n <div class=\"card-header\">\r\n <div class=\"action-info\">\r\n <div class=\"action-icon\" [ngClass]=\"item.actionIconBgColor\">\r\n <i [class]=\"item.actionIcon\"></i>\r\n </div>\r\n <span class=\"action-label\" [ngClass]=\"item.actionColor\">\r\n {{ item.label }}\r\n </span>\r\n </div>\r\n <div class=\"timestamp\">\r\n {{ item.dateTime }}\r\n </div>\r\n </div>\r\n \r\n <!-- Description -->\r\n <div class=\"card-description\" *ngIf=\"item.requestDescription\">\r\n <p class=\"description-text\">{{ item.requestDescription ?? 'No Request' }}</p>\r\n </div>\r\n \r\n <!-- Document details if URL exists -->\r\n <div class=\"document-details\" *ngIf=\"item.documentUrl\">\r\n <div class=\"document-card\">\r\n <div class=\"document-info\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <div class=\"document-text\">\r\n <div class=\"document-title\">Document</div>\r\n <div class=\"document-filename\">\r\n <button class=\"document-name-btn\"\r\n type=\"button\"\r\n (click)=\"downloadDocument(item.documentUrl!, item.docName)\"\r\n [title]=\"'Download ' + (item.docName || 'Document')\"\r\n [attr.data-document-url]=\"item.documentUrl\"\r\n [attr.data-document-name]=\"item.docName\">\r\n {{ item.docName || 'Document' }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n \r\n <!-- User information -->\r\n <div class=\"user-info\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- Show message if no valid content -->\r\n <div class=\"no-content-message\" *ngIf=\"!section.hasValidContent\">\r\n <p>No initial request details available.</p>\r\n </div>\r\n </p-accordionTab>\r\n </p-accordion>\r\n </div>\r\n \r\n <!-- Document History as regular timeline -->\r\n <div *ngIf=\"section.header !== 'Initial Request'\" class=\"document-history-section\">\r\n <div class=\"section-header\" *ngIf=\"section.header\">\r\n <h4 class=\"section-title\">{{ section.header }}</h4>\r\n </div>\r\n \r\n <div class=\"history-timeline\">\r\n <div class=\"timeline-item\" *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-card\" [ngClass]=\"item.actionBgColor\">\r\n <!-- Header with icon and timestamp -->\r\n <div class=\"card-header\">\r\n <div class=\"action-info\">\r\n <div class=\"action-icon\" [ngClass]=\"item.actionIconBgColor\">\r\n <i [class]=\"item.actionIcon\"></i>\r\n </div>\r\n <span class=\"action-label\" [ngClass]=\"item.actionColor\">\r\n {{ item.label }}\r\n </span>\r\n </div>\r\n <div class=\"timestamp\">\r\n {{ item.dateTime }}\r\n </div>\r\n </div>\r\n \r\n <!-- Description -->\r\n <div class=\"card-description\" *ngIf=\"item.requestDescription\">\r\n <p class=\"description-text\">{{ item.requestDescription }}</p>\r\n </div>\r\n \r\n <!-- Document details if URL exists -->\r\n <div class=\"document-details\" *ngIf=\"item.documentUrl\">\r\n <div class=\"document-card\">\r\n <div class=\"document-info\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <div class=\"document-text\">\r\n <div class=\"document-title\">Document</div>\r\n <div class=\"document-filename\">\r\n <button class=\"document-name-btn\"\r\n type=\"button\"\r\n (click)=\"downloadDocument(item.documentUrl!, item.docName)\"\r\n [title]=\"'Download ' + (item.docName || 'Document')\"\r\n [attr.data-document-url]=\"item.documentUrl\"\r\n [attr.data-document-name]=\"item.docName\">\r\n {{ item.docName || 'Document' }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"document-actions\">\r\n <button class=\"action-btn download-btn\"\r\n (onClick)=\"downloadDocument(item.documentUrl, item.docName)\"\r\n [title]=\"'Download ' + (item.docName || 'Document')\">\r\n <i class=\"pi pi-download\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n <!-- User information -->\r\n <div class=\"user-info\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".document-history-container{padding:.75rem;background:#fff;border-radius:8px;box-shadow:0 2px 4px #0000001a;max-height:none;overflow-y:auto;min-width:0}.document-history-container .history-header{margin-bottom:1rem}.document-history-container .history-header .history-title{font-size:1.25rem;font-weight:600;color:#374151;margin:0}.document-history-container .history-sections .history-section{margin-bottom:1.5rem}.document-history-container .history-sections .history-section .initial-request-section{margin-bottom:1rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{background:#fff;border-top:1px solid;border-top-left-radius:8px;border-top-right-radius:8px;border-bottom:none;padding:.75rem 1rem;font-weight:600;color:#1f2937;font-size:1rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link:focus{box-shadow:none}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link .p-accordion-header-icon{color:#6b7280;font-size:.875rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header.p-highlight .p-accordion-header-link{background:#fff}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content{background:#fff;border:1px solid;border-top:none;border-radius:0 0 8px 8px;padding:1rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item{margin-bottom:0}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:.75rem;border-right:3px solid}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon{background:#7d879b;color:#fff;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon i{font-size:14px}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-label{color:#1f2937;font-weight:600;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .timestamp{color:#6b7280;font-size:.75rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-description .description-text{color:#374151;line-height:1.5;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .user-info .user-name{color:#1f2937;font-weight:500;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .user-info .user-role{color:#6b7280;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section.document-requested ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#d1d5db}.document-history-container .history-sections .history-section .initial-request-section.document-requested ::ng-deep .p-accordion .p-accordion-content{border-color:#d1d5db}.document-history-container .history-sections .history-section .initial-request-section.document-uploaded ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#86efac}.document-history-container .history-sections .history-section .initial-request-section.document-uploaded ::ng-deep .p-accordion .p-accordion-content{border-color:#86efac}.document-history-container .history-sections .history-section .initial-request-section.document-rejected ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#fca5a5}.document-history-container .history-sections .history-section .initial-request-section.document-rejected ::ng-deep .p-accordion .p-accordion-content{border-color:#fca5a5}.document-history-container .history-sections .history-section .initial-request-section.document-accepted ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#86efac}.document-history-container .history-sections .history-section .initial-request-section.document-accepted ::ng-deep .p-accordion .p-accordion-content{border-color:#86efac}.document-history-container .history-sections .history-section .document-history-section .section-header{margin-bottom:.75rem}.document-history-container .history-sections .history-section .document-history-section .section-header .section-title{font-size:1.25rem;font-weight:500;color:#374151;margin:0}.document-history-container .history-sections .history-section .history-timeline .timeline-item{margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card{border-radius:8px;border:1px solid;padding:1rem;position:relative;border-right:3px solid}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-green-50{background-color:#f0fdf4;border-color:#bbf7d0;border-right-color:#10b981}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-red-50{background-color:#fef2f2;border-color:#fecaca;border-right-color:#ef4444}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-blue-50{background-color:#eff6ff;border-color:#bfdbfe;border-right-color:#3b82f6}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-gray-50{background-color:#f8fafc;border-color:#e2e8f0;border-right-color:#6b7280}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info{display:flex;align-items:center;gap:.5rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon i{font-size:14px}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-label{font-weight:600;font-size:.875rem;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .timestamp{font-size:.75rem;color:#6b7280}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-description{margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-description .description-text{margin:0;color:#374151;font-size:.875rem;line-height:1.4;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details{margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card{background:#fff;border-radius:6px;padding:.75rem;display:flex;justify-content:space-between;align-items:center;border:1px solid #e5e7eb}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info{display:flex;align-items:center;gap:.5rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-icon{color:#3b82f6;font-size:1.25rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-title{font-weight:500;color:#374151;font-size:.875rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename{color:#3b82f6;font-size:.75rem;word-break:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-link{color:#3b82f6;text-decoration:underline;cursor:pointer;display:inline-block}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-link:hover{color:#2563eb;text-decoration:none}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-link:active{color:#1d4ed8}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-name{color:#374151;font-weight:500;word-break:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-name-btn{background:none;border:none;padding:0;margin:0;color:#3b82f6;text-decoration:underline;cursor:pointer;font-size:.75rem;font-weight:500;word-break:break-word;text-align:left}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-name-btn:hover{color:#2563eb;text-decoration:none}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-name-btn:active{color:#1d4ed8}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-name-btn:focus{outline:2px solid #3b82f6;outline-offset:2px}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions{display:flex;gap:.25rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn{width:24px;height:24px;border:none;border-radius:4px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:.75rem;text-decoration:none}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.edit-btn{background:#3b82f6;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.edit-btn:hover{background:#2563eb}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.delete-btn{background:#ef4444;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.delete-btn:hover{background:#dc2626}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.download-btn{background:#10b981;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.download-btn:hover{background:#059669}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info{text-align:right;font-size:.75rem;color:#374151}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info .user-name{font-weight:500;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info .user-role{color:#6b7280;word-wrap:break-word;overflow-wrap:break-word}.text-green-600{color:#059669}.text-red-600{color:#dc2626}.text-blue-600{color:#2563eb}.text-gray-600{color:#4b5563}.bg-green-50{background-color:#f0fdf4}.bg-red-50{background-color:#fef2f2}.bg-blue-50{background-color:#eff6ff}.bg-gray-50{background-color:#f8fafc}.border-green-200{border-color:#bbf7d0}.border-red-200{border-color:#fecaca}.border-blue-200{border-color:#bfdbfe}.border-gray-200{border-color:#e2e8f0}.icon-bg-green{background-color:#10b981}.icon-bg-red{background-color:#ef4444}.icon-bg-blue{background-color:#3b82f6}.icon-bg-gray{background-color:#6b7280}.no-content-message{text-align:center;padding:2rem;color:#6b7280;font-style:italic}.no-content-message p{margin:0;font-size:.875rem}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$2.Accordion, selector: "p-accordion", inputs: ["multiple", "style", "styleClass", "expandIcon", "collapseIcon", "activeIndex", "selectOnFocus", "headerAriaLevel"], outputs: ["onClose", "onOpen", "activeIndexChange"] }, { kind: "component", type: i3$2.AccordionTab, selector: "p-accordionTab", inputs: ["id", "header", "headerStyle", "tabStyle", "contentStyle", "tabStyleClass", "headerStyleClass", "contentStyleClass", "disabled", "cache", "transitionOptions", "iconPos", "selected", "headerAriaLevel"], outputs: ["selectedChange"] }] });
5667
5753
  }
5668
5754
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryComponent, decorators: [{
5669
5755
  type: Component,
5670
- args: [{ selector: 'document-history', standalone: false, template: "<div class=\"document-history-container\" *ngIf=\"showHistory && historyData.length > 0\">\r\n <div class=\"history-sections\">\r\n <div class=\"history-section\" *ngFor=\"let section of processedHistoryData\">\r\n <div *ngIf=\"section.header === 'Initial Request' && section.hasValidContent\" \r\n class=\"initial-request-section\"\r\n [ngClass]=\"section.accordionClass\">\r\n <p-accordion [activeIndex]=\"activeAccordionIndex\" \r\n (onOpen)=\"onAccordionOpen()\" \r\n (onClose)=\"onAccordionClose()\">\r\n <p-accordionTab [header]=\"section.header\">\r\n <div class=\"history-timeline\" *ngIf=\"section.hasValidContent\">\r\n <div class=\"timeline-item\" *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-card\" [ngClass]=\"item.actionBgColor\">\r\n <div class=\"card-header\">\r\n <div class=\"action-info\">\r\n <div class=\"action-icon\" [ngClass]=\"item.actionIconBgColor\">\r\n <i [class]=\"item.actionIcon\"></i>\r\n </div>\r\n <span class=\"action-label\" [ngClass]=\"item.actionColor\">\r\n {{ item.label }}\r\n </span>\r\n </div>\r\n <div class=\"timestamp\">\r\n {{ item.dateTime }}\r\n </div>\r\n </div>\r\n \r\n <!-- Description -->\r\n <div class=\"card-description\" *ngIf=\"item.requestDescription\">\r\n <p class=\"description-text\">{{ item.requestDescription ?? 'No Request' }}</p>\r\n </div>\r\n \r\n <!-- Document details if URL exists -->\r\n <div class=\"document-details\" *ngIf=\"item.documentUrl\">\r\n <div class=\"document-card\">\r\n <div class=\"document-info\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <div class=\"document-text\">\r\n <div class=\"document-title\">Document</div>\r\n <div class=\"document-filename\">\r\n <p-button class=\"document-name-btn\"\r\n (onClick)=\"downloadDocument(item.documentUrl, item.docName)\"\r\n [title]=\"'Download ' + (item.docName || 'Document')\">\r\n {{ item.docName || 'Document' }}\r\n </p-button>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n \r\n <!-- User information -->\r\n <div class=\"user-info\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- Show message if no valid content -->\r\n <div class=\"no-content-message\" *ngIf=\"!section.hasValidContent\">\r\n <p>No initial request details available.</p>\r\n </div>\r\n </p-accordionTab>\r\n </p-accordion>\r\n </div>\r\n \r\n <!-- Document History as regular timeline -->\r\n <div *ngIf=\"section.header !== 'Initial Request'\" class=\"document-history-section\">\r\n <div class=\"section-header\" *ngIf=\"section.header\">\r\n <h4 class=\"section-title\">{{ section.header }}</h4>\r\n </div>\r\n \r\n <div class=\"history-timeline\">\r\n <div class=\"timeline-item\" *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-card\" [ngClass]=\"item.actionBgColor\">\r\n <!-- Header with icon and timestamp -->\r\n <div class=\"card-header\">\r\n <div class=\"action-info\">\r\n <div class=\"action-icon\" [ngClass]=\"item.actionIconBgColor\">\r\n <i [class]=\"item.actionIcon\"></i>\r\n </div>\r\n <span class=\"action-label\" [ngClass]=\"item.actionColor\">\r\n {{ item.label }}\r\n </span>\r\n </div>\r\n <div class=\"timestamp\">\r\n {{ item.dateTime }}\r\n </div>\r\n </div>\r\n \r\n <!-- Description -->\r\n <div class=\"card-description\" *ngIf=\"item.requestDescription\">\r\n <p class=\"description-text\">{{ item.requestDescription }}</p>\r\n </div>\r\n \r\n <!-- Document details if URL exists -->\r\n <div class=\"document-details\" *ngIf=\"item.documentUrl\">\r\n <div class=\"document-card\">\r\n <div class=\"document-info\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <div class=\"document-text\">\r\n <div class=\"document-title\">Document</div>\r\n <div class=\"document-filename\">\r\n <button class=\"document-name-btn\"\r\n (click)=\"downloadDocument(item.documentUrl, item.docName)\"\r\n [title]=\"'Download ' + (item.docName || 'Document')\">\r\n {{ item.docName || 'Document' }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"document-actions\">\r\n <button class=\"action-btn download-btn\"\r\n (click)=\"downloadDocument(item.documentUrl, item.docName)\"\r\n [title]=\"'Download ' + (item.docName || 'Document')\">\r\n <i class=\"pi pi-download\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n <!-- User information -->\r\n <div class=\"user-info\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".document-history-container{padding:.75rem;background:#fff;border-radius:8px;box-shadow:0 2px 4px #0000001a;max-height:none;overflow-y:auto;min-width:0}.document-history-container .history-header{margin-bottom:1rem}.document-history-container .history-header .history-title{font-size:1.25rem;font-weight:600;color:#374151;margin:0}.document-history-container .history-sections .history-section{margin-bottom:1.5rem}.document-history-container .history-sections .history-section .initial-request-section{margin-bottom:1rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{background:#fff;border-top:1px solid;border-top-left-radius:8px;border-top-right-radius:8px;border-bottom:none;padding:.75rem 1rem;font-weight:600;color:#1f2937;font-size:1rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link:focus{box-shadow:none}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link .p-accordion-header-icon{color:#6b7280;font-size:.875rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header.p-highlight .p-accordion-header-link{background:#fff}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content{background:#fff;border:1px solid;border-top:none;border-radius:0 0 8px 8px;padding:1rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item{margin-bottom:0}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:.75rem;border-right:3px solid}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon{background:#7d879b;color:#fff;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon i{font-size:14px}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-label{color:#1f2937;font-weight:600;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .timestamp{color:#6b7280;font-size:.75rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-description .description-text{color:#374151;line-height:1.5;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .user-info .user-name{color:#1f2937;font-weight:500;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .user-info .user-role{color:#6b7280;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section.document-requested ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#d1d5db}.document-history-container .history-sections .history-section .initial-request-section.document-requested ::ng-deep .p-accordion .p-accordion-content{border-color:#d1d5db}.document-history-container .history-sections .history-section .initial-request-section.document-uploaded ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#86efac}.document-history-container .history-sections .history-section .initial-request-section.document-uploaded ::ng-deep .p-accordion .p-accordion-content{border-color:#86efac}.document-history-container .history-sections .history-section .initial-request-section.document-rejected ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#fca5a5}.document-history-container .history-sections .history-section .initial-request-section.document-rejected ::ng-deep .p-accordion .p-accordion-content{border-color:#fca5a5}.document-history-container .history-sections .history-section .initial-request-section.document-accepted ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#86efac}.document-history-container .history-sections .history-section .initial-request-section.document-accepted ::ng-deep .p-accordion .p-accordion-content{border-color:#86efac}.document-history-container .history-sections .history-section .document-history-section .section-header{margin-bottom:.75rem}.document-history-container .history-sections .history-section .document-history-section .section-header .section-title{font-size:1.25rem;font-weight:500;color:#374151;margin:0}.document-history-container .history-sections .history-section .history-timeline .timeline-item{margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card{border-radius:8px;border:1px solid;padding:1rem;position:relative;border-right:3px solid}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-green-50{background-color:#f0fdf4;border-color:#bbf7d0;border-right-color:#10b981}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-red-50{background-color:#fef2f2;border-color:#fecaca;border-right-color:#ef4444}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-blue-50{background-color:#eff6ff;border-color:#bfdbfe;border-right-color:#3b82f6}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-gray-50{background-color:#f8fafc;border-color:#e2e8f0;border-right-color:#6b7280}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info{display:flex;align-items:center;gap:.5rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon i{font-size:14px}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-label{font-weight:600;font-size:.875rem;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .timestamp{font-size:.75rem;color:#6b7280}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-description{margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-description .description-text{margin:0;color:#374151;font-size:.875rem;line-height:1.4;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details{margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card{background:#fff;border-radius:6px;padding:.75rem;display:flex;justify-content:space-between;align-items:center;border:1px solid #e5e7eb}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info{display:flex;align-items:center;gap:.5rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-icon{color:#3b82f6;font-size:1.25rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-title{font-weight:500;color:#374151;font-size:.875rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename{color:#3b82f6;font-size:.75rem;word-break:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-link{color:#3b82f6;text-decoration:underline;cursor:pointer;display:inline-block}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-link:hover{color:#2563eb;text-decoration:none}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-link:active{color:#1d4ed8}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-name{color:#374151;font-weight:500;word-break:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-name-btn{background:none;border:none;padding:0;margin:0;color:#3b82f6;text-decoration:underline;cursor:pointer;font-size:.75rem;font-weight:500;word-break:break-word;text-align:left}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-name-btn:hover{color:#2563eb;text-decoration:none}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-name-btn:active{color:#1d4ed8}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-name-btn:focus{outline:2px solid #3b82f6;outline-offset:2px}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions{display:flex;gap:.25rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn{width:24px;height:24px;border:none;border-radius:4px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:.75rem;text-decoration:none}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.edit-btn{background:#3b82f6;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.edit-btn:hover{background:#2563eb}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.delete-btn{background:#ef4444;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.delete-btn:hover{background:#dc2626}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.download-btn{background:#10b981;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.download-btn:hover{background:#059669}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info{text-align:right;font-size:.75rem;color:#374151}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info .user-name{font-weight:500;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info .user-role{color:#6b7280;word-wrap:break-word;overflow-wrap:break-word}.text-green-600{color:#059669}.text-red-600{color:#dc2626}.text-blue-600{color:#2563eb}.text-gray-600{color:#4b5563}.bg-green-50{background-color:#f0fdf4}.bg-red-50{background-color:#fef2f2}.bg-blue-50{background-color:#eff6ff}.bg-gray-50{background-color:#f8fafc}.border-green-200{border-color:#bbf7d0}.border-red-200{border-color:#fecaca}.border-blue-200{border-color:#bfdbfe}.border-gray-200{border-color:#e2e8f0}.icon-bg-green{background-color:#10b981}.icon-bg-red{background-color:#ef4444}.icon-bg-blue{background-color:#3b82f6}.icon-bg-gray{background-color:#6b7280}.no-content-message{text-align:center;padding:2rem;color:#6b7280;font-style:italic}.no-content-message p{margin:0;font-size:.875rem}\n"] }]
5756
+ args: [{ selector: 'document-history', standalone: false, template: "<div class=\"document-history-container\" *ngIf=\"showHistory && historyData.length > 0\">\r\n <!-- Debug test button -->\r\n <div class=\"debug-section\" style=\"margin-bottom: 1rem; padding: 0.5rem; background: #f3f4f6; border-radius: 4px;\">\r\n <button type=\"button\" \r\n class=\"p-button p-button-sm p-button-secondary\"\r\n (click)=\"testDownload()\"\r\n style=\"margin-right: 0.5rem;\">\r\n \uD83E\uDDEA Test Download\r\n </button>\r\n <small style=\"color: #6b7280;\">Debug: Test download functionality</small>\r\n </div>\r\n \r\n <div class=\"history-sections\">\r\n <div class=\"history-section\" *ngFor=\"let section of processedHistoryData\">\r\n <div *ngIf=\"section.header === 'Initial Request' && section.hasValidContent\" \r\n class=\"initial-request-section\"\r\n [ngClass]=\"section.accordionClass\">\r\n <p-accordion [activeIndex]=\"activeAccordionIndex\" \r\n (onOpen)=\"onAccordionOpen()\" \r\n (onClose)=\"onAccordionClose()\">\r\n <p-accordionTab [header]=\"section.header\">\r\n <div class=\"history-timeline\" *ngIf=\"section.hasValidContent\">\r\n <div class=\"timeline-item\" *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-card\" [ngClass]=\"item.actionBgColor\">\r\n <div class=\"card-header\">\r\n <div class=\"action-info\">\r\n <div class=\"action-icon\" [ngClass]=\"item.actionIconBgColor\">\r\n <i [class]=\"item.actionIcon\"></i>\r\n </div>\r\n <span class=\"action-label\" [ngClass]=\"item.actionColor\">\r\n {{ item.label }}\r\n </span>\r\n </div>\r\n <div class=\"timestamp\">\r\n {{ item.dateTime }}\r\n </div>\r\n </div>\r\n \r\n <!-- Description -->\r\n <div class=\"card-description\" *ngIf=\"item.requestDescription\">\r\n <p class=\"description-text\">{{ item.requestDescription ?? 'No Request' }}</p>\r\n </div>\r\n \r\n <!-- Document details if URL exists -->\r\n <div class=\"document-details\" *ngIf=\"item.documentUrl\">\r\n <div class=\"document-card\">\r\n <div class=\"document-info\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <div class=\"document-text\">\r\n <div class=\"document-title\">Document</div>\r\n <div class=\"document-filename\">\r\n <button class=\"document-name-btn\"\r\n type=\"button\"\r\n (click)=\"downloadDocument(item.documentUrl!, item.docName)\"\r\n [title]=\"'Download ' + (item.docName || 'Document')\"\r\n [attr.data-document-url]=\"item.documentUrl\"\r\n [attr.data-document-name]=\"item.docName\">\r\n {{ item.docName || 'Document' }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n \r\n <!-- User information -->\r\n <div class=\"user-info\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- Show message if no valid content -->\r\n <div class=\"no-content-message\" *ngIf=\"!section.hasValidContent\">\r\n <p>No initial request details available.</p>\r\n </div>\r\n </p-accordionTab>\r\n </p-accordion>\r\n </div>\r\n \r\n <!-- Document History as regular timeline -->\r\n <div *ngIf=\"section.header !== 'Initial Request'\" class=\"document-history-section\">\r\n <div class=\"section-header\" *ngIf=\"section.header\">\r\n <h4 class=\"section-title\">{{ section.header }}</h4>\r\n </div>\r\n \r\n <div class=\"history-timeline\">\r\n <div class=\"timeline-item\" *ngFor=\"let item of section.list; let i = index\">\r\n <div class=\"timeline-card\" [ngClass]=\"item.actionBgColor\">\r\n <!-- Header with icon and timestamp -->\r\n <div class=\"card-header\">\r\n <div class=\"action-info\">\r\n <div class=\"action-icon\" [ngClass]=\"item.actionIconBgColor\">\r\n <i [class]=\"item.actionIcon\"></i>\r\n </div>\r\n <span class=\"action-label\" [ngClass]=\"item.actionColor\">\r\n {{ item.label }}\r\n </span>\r\n </div>\r\n <div class=\"timestamp\">\r\n {{ item.dateTime }}\r\n </div>\r\n </div>\r\n \r\n <!-- Description -->\r\n <div class=\"card-description\" *ngIf=\"item.requestDescription\">\r\n <p class=\"description-text\">{{ item.requestDescription }}</p>\r\n </div>\r\n \r\n <!-- Document details if URL exists -->\r\n <div class=\"document-details\" *ngIf=\"item.documentUrl\">\r\n <div class=\"document-card\">\r\n <div class=\"document-info\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file\"></i>\r\n </div>\r\n <div class=\"document-text\">\r\n <div class=\"document-title\">Document</div>\r\n <div class=\"document-filename\">\r\n <button class=\"document-name-btn\"\r\n type=\"button\"\r\n (click)=\"downloadDocument(item.documentUrl!, item.docName)\"\r\n [title]=\"'Download ' + (item.docName || 'Document')\"\r\n [attr.data-document-url]=\"item.documentUrl\"\r\n [attr.data-document-name]=\"item.docName\">\r\n {{ item.docName || 'Document' }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"document-actions\">\r\n <button class=\"action-btn download-btn\"\r\n (onClick)=\"downloadDocument(item.documentUrl, item.docName)\"\r\n [title]=\"'Download ' + (item.docName || 'Document')\">\r\n <i class=\"pi pi-download\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n <!-- User information -->\r\n <div class=\"user-info\">\r\n <span class=\"user-name\">{{ item.userName }}</span>\r\n <span class=\"user-role\">({{ item.userRole }})</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".document-history-container{padding:.75rem;background:#fff;border-radius:8px;box-shadow:0 2px 4px #0000001a;max-height:none;overflow-y:auto;min-width:0}.document-history-container .history-header{margin-bottom:1rem}.document-history-container .history-header .history-title{font-size:1.25rem;font-weight:600;color:#374151;margin:0}.document-history-container .history-sections .history-section{margin-bottom:1.5rem}.document-history-container .history-sections .history-section .initial-request-section{margin-bottom:1rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{background:#fff;border-top:1px solid;border-top-left-radius:8px;border-top-right-radius:8px;border-bottom:none;padding:.75rem 1rem;font-weight:600;color:#1f2937;font-size:1rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link:focus{box-shadow:none}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link .p-accordion-header-icon{color:#6b7280;font-size:.875rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-header.p-highlight .p-accordion-header-link{background:#fff}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content{background:#fff;border:1px solid;border-top:none;border-radius:0 0 8px 8px;padding:1rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item{margin-bottom:0}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:.75rem;border-right:3px solid}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon{background:#7d879b;color:#fff;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon i{font-size:14px}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .action-info .action-label{color:#1f2937;font-weight:600;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-header .timestamp{color:#6b7280;font-size:.75rem}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .card-description .description-text{color:#374151;line-height:1.5;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .user-info .user-name{color:#1f2937;font-weight:500;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section ::ng-deep .p-accordion .p-accordion-content .history-timeline .timeline-item .timeline-card .user-info .user-role{color:#6b7280;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .initial-request-section.document-requested ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#d1d5db}.document-history-container .history-sections .history-section .initial-request-section.document-requested ::ng-deep .p-accordion .p-accordion-content{border-color:#d1d5db}.document-history-container .history-sections .history-section .initial-request-section.document-uploaded ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#86efac}.document-history-container .history-sections .history-section .initial-request-section.document-uploaded ::ng-deep .p-accordion .p-accordion-content{border-color:#86efac}.document-history-container .history-sections .history-section .initial-request-section.document-rejected ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#fca5a5}.document-history-container .history-sections .history-section .initial-request-section.document-rejected ::ng-deep .p-accordion .p-accordion-content{border-color:#fca5a5}.document-history-container .history-sections .history-section .initial-request-section.document-accepted ::ng-deep .p-accordion .p-accordion-header .p-accordion-header-link{border-color:#86efac}.document-history-container .history-sections .history-section .initial-request-section.document-accepted ::ng-deep .p-accordion .p-accordion-content{border-color:#86efac}.document-history-container .history-sections .history-section .document-history-section .section-header{margin-bottom:.75rem}.document-history-container .history-sections .history-section .document-history-section .section-header .section-title{font-size:1.25rem;font-weight:500;color:#374151;margin:0}.document-history-container .history-sections .history-section .history-timeline .timeline-item{margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card{border-radius:8px;border:1px solid;padding:1rem;position:relative;border-right:3px solid}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-green-50{background-color:#f0fdf4;border-color:#bbf7d0;border-right-color:#10b981}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-red-50{background-color:#fef2f2;border-color:#fecaca;border-right-color:#ef4444}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-blue-50{background-color:#eff6ff;border-color:#bfdbfe;border-right-color:#3b82f6}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card.bg-gray-50{background-color:#f8fafc;border-color:#e2e8f0;border-right-color:#6b7280}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info{display:flex;align-items:center;gap:.5rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-icon i{font-size:14px}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .action-info .action-label{font-weight:600;font-size:.875rem;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-header .timestamp{font-size:.75rem;color:#6b7280}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-description{margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .card-description .description-text{margin:0;color:#374151;font-size:.875rem;line-height:1.4;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details{margin-bottom:.75rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card{background:#fff;border-radius:6px;padding:.75rem;display:flex;justify-content:space-between;align-items:center;border:1px solid #e5e7eb}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info{display:flex;align-items:center;gap:.5rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-icon{color:#3b82f6;font-size:1.25rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-title{font-weight:500;color:#374151;font-size:.875rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename{color:#3b82f6;font-size:.75rem;word-break:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-link{color:#3b82f6;text-decoration:underline;cursor:pointer;display:inline-block}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-link:hover{color:#2563eb;text-decoration:none}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-link:active{color:#1d4ed8}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-name{color:#374151;font-weight:500;word-break:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-name-btn{background:none;border:none;padding:0;margin:0;color:#3b82f6;text-decoration:underline;cursor:pointer;font-size:.75rem;font-weight:500;word-break:break-word;text-align:left}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-name-btn:hover{color:#2563eb;text-decoration:none}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-name-btn:active{color:#1d4ed8}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-info .document-text .document-filename .document-name-btn:focus{outline:2px solid #3b82f6;outline-offset:2px}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions{display:flex;gap:.25rem}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn{width:24px;height:24px;border:none;border-radius:4px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:.75rem;text-decoration:none}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.edit-btn{background:#3b82f6;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.edit-btn:hover{background:#2563eb}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.delete-btn{background:#ef4444;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.delete-btn:hover{background:#dc2626}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.download-btn{background:#10b981;color:#fff}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .document-details .document-card .document-actions .action-btn.download-btn:hover{background:#059669}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info{text-align:right;font-size:.75rem;color:#374151}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info .user-name{font-weight:500;word-wrap:break-word;overflow-wrap:break-word}.document-history-container .history-sections .history-section .history-timeline .timeline-item .timeline-card .user-info .user-role{color:#6b7280;word-wrap:break-word;overflow-wrap:break-word}.text-green-600{color:#059669}.text-red-600{color:#dc2626}.text-blue-600{color:#2563eb}.text-gray-600{color:#4b5563}.bg-green-50{background-color:#f0fdf4}.bg-red-50{background-color:#fef2f2}.bg-blue-50{background-color:#eff6ff}.bg-gray-50{background-color:#f8fafc}.border-green-200{border-color:#bbf7d0}.border-red-200{border-color:#fecaca}.border-blue-200{border-color:#bfdbfe}.border-gray-200{border-color:#e2e8f0}.icon-bg-green{background-color:#10b981}.icon-bg-red{background-color:#ef4444}.icon-bg-blue{background-color:#3b82f6}.icon-bg-gray{background-color:#6b7280}.no-content-message{text-align:center;padding:2rem;color:#6b7280;font-style:italic}.no-content-message p{margin:0;font-size:.875rem}\n"] }]
5671
5757
  }], ctorParameters: () => [{ type: DocumentHistoryService }], propDecorators: { historyData: [{
5672
5758
  type: Input
5673
5759
  }], showHistory: [{
@@ -7992,7 +8078,7 @@ class DocumentListComponent {
7992
8078
  }
7993
8079
  }
7994
8080
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListComponent, deps: [{ token: DocumentListService }, { token: DocumentHttpService }, { token: DocumentMenuService }, { token: DocumentStore }, { token: DocumentScrollService }], target: i0.ɵɵFactoryTarget.Component });
7995
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentListComponent, isStandalone: false, selector: "lib-document-list", inputs: { contextId: "contextId", documentListResponse: "documentListResponse", selectedMenuItemId: "selectedMenuItemId", navigationInfo: "navigationInfo", documentList: "documentList" }, outputs: { handleSelectedDocument: "handleSelectedDocument" }, viewQueries: [{ propertyName: "documentCategoriesContainer", first: true, predicate: ["documentCategoriesContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"document-viewer\">\r\n <p-dialog [header]=\"selectedDocument?.aliasName ?? selectedDocument?.docName\" [(visible)]=\"isdialogVisible\" [modal]=\"true\"\r\n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\" (onHide)=\"handleCloseModal()\">\r\n <p-messages [(value)]=\"deleteMessage\" [enableService]=\"false\" [closable]=\"false\" />\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"inline-flex align-items-center justify-content-center gap-2\">\r\n <!-- Show alias name and document name when available -->\r\n <div *ngIf=\"!isEditingDocumentName && aliasName\" \r\n class=\"document-name-display clickable-doc-name\"\r\n (click)=\"onDocumentNameClick()\"\r\n title=\"Click to edit document name\">\r\n <div class=\"alias-name\">\r\n {{ selectedDocument?.aliasName }}\r\n <i class=\"pi pi-pencil edit-icon-small\"></i>\r\n </div>\r\n <div class=\"document-name\">{{ selectedDocument?.docName }}</div>\r\n </div>\r\n <span \r\n *ngIf=\"!isEditingDocumentName && !aliasName\" \r\n class=\"font-bold white-space-nowrap clickable-doc-name\"\r\n (click)=\"onDocumentNameClick()\"\r\n title=\"Click to edit document name\">\r\n {{selectedDocument?.docName}}\r\n <i class=\"pi pi-pencil edit-icon\"></i>\r\n </span>\r\n <input \r\n *ngIf=\"isEditingDocumentName\"\r\n #fileInput \r\n type=\"text\" \r\n class=\"h-3rem file-input-wrapper document-name-input\" \r\n pInputText \r\n [(ngModel)]=\"documentName\"\r\n (input)=\"onDocumentNameChange($event)\" \r\n (blur)=\"handleSaveClick()\"\r\n (keydown.escape)=\"cancelDocumentNameEdit()\"\r\n (keydown.enter)=\"handleSaveClick()\" />\r\n <div *ngIf=\"fileNameError\" class=\"error-message-wrapper\">\r\n {{ fileNameError }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\" [contextId]=\"contextId\"\r\n (documentStatusUpdated)=\"refreshDocumentList($event.actionType === 'delete')\"\r\n (viewerDestroyed)=\"handleViewerDestroyed()\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"w-full flex align-items-center justify-content-between\">\r\n <input type=\"text\" class=\"w-full border-none bg-white h-3rem file-input-wrapper\" pInputText\r\n [(ngModel)]=\"fileName\" />\r\n\r\n </div>\r\n </ng-template>\r\n @if(selectedDocument?.status === 'Approved'){\r\n <ng-content></ng-content>\r\n }\r\n </document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"document-categories-container\" #documentCategoriesContainer>\r\n <div class=\"category\" *ngFor=\"let category of documentCategories; let i = index\"\r\n [id]=\"categoryIds[i]\">\r\n <div class=\"category-header\">\r\n <div class=\"category-title\">\r\n <h3>{{ formattedCategoryLabels[i] }}</h3>\r\n <p class=\"category-description\">{{ category.categoryDescription }}</p>\r\n </div>\r\n <div class=\"completion-status\">\r\n <p-badge \r\n [severity]=\"categorySeverities[i]\" \r\n [value]=\"categoryCompletionCounts[i] + ' Complete'\"\r\n class=\"completion-badge\">\r\n </p-badge>\r\n </div>\r\n </div>\r\n\r\n <div class=\"table-container\">\r\n <lib-table-primary [tableData]=\"categoryTables[i]\" [tableStyle]=\"{ 'min-width': '100%' }\"\r\n (rowClick)=\"handleTableRowClick($event)\" (deleteAction)=\"handleDeleteAction($event)\">\r\n </lib-table-primary>\r\n </div>\r\n </div>\r\n</div>", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right{width:35%}.error-message-wrapper{color:#dc3545}.right-sidebar{width:35%}.document-title-wrapper{font-size:20px;font-weight:700;color:var(--text-color)}.document-input-field{display:flex;flex-direction:column}.document-input-field input{width:100%;height:46px;padding:10px 15px;gap:10px;border-radius:10px;outline:none;border:1px solid rgba(76,98,146,.1019607843);font-size:15px}label{color:#0f1729;font-weight:600}.document-list-dropDown .p-element{padding:10px 0 10px 15px}.document-list-dropDown .p-dropdown{border-radius:10px!important}.side-bar-con{display:flex;flex-direction:column}.save-btn-con{width:100%;border-top:1px solid rgba(76,98,146,.2);background:#4c629214;padding:13px 40px}.save-btn-wrapper{padding:10px 4px}.save-btn .p-button{height:45px!important;width:140px;border-radius:10px}.p-sidebar-footer{padding:0}.file-input-wrapper.p-inputtext:enabled:focus{box-shadow:0 0 0 .2rem #a6d5fa!important}.clickable-doc-name{cursor:pointer;transition:all .2s ease;padding:4px 8px;border-radius:4px}.clickable-doc-name:hover{background-color:#4c62921a;color:var(--primary-color, #4C6292)}.clickable-doc-name:active{background-color:#4c629233;transform:scale(.98)}.clickable-doc-name .edit-icon{font-size:.8em;margin-left:8px;opacity:.6;transition:opacity .2s ease}.clickable-doc-name:hover .edit-icon{opacity:1}.document-name-display{display:flex;flex-direction:column;align-items:flex-start;gap:4px;cursor:pointer;transition:all .2s ease;padding:4px 8px;border-radius:4px;width:100%}.document-name-display:hover{background-color:#4c62921a}.document-name-display:hover .alias-name{color:var(--primary-color, #4C6292)}.document-name-display:active{background-color:#4c629233;transform:scale(.98)}.document-name-display .alias-name{font-size:1.5rem;font-weight:700;color:var(--text-color, #2c3e50);line-height:1.2;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;max-width:none;transition:color .2s ease;display:flex;align-items:center;justify-content:flex-start;gap:8px}.document-name-display .alias-name .edit-icon-small{font-size:.6em;opacity:.5;transition:opacity .2s ease}.document-name-display:hover .edit-icon-small{opacity:1}.document-name-display .document-name{font-size:.875rem;color:var(--text-color-secondary, #6c757d);font-weight:400;line-height:1.2;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;max-width:none;opacity:.8}.file-input-wrapper{transition:all .2s ease;min-width:300px!important;width:auto!important;max-width:80vw!important}.file-input-wrapper:focus{border-color:var(--primary-color, #4C6292)!important;box-shadow:0 0 0 .2rem #4c629240!important}.document-name-input{min-width:400px!important;width:auto!important;max-width:70vw!important;padding:8px 12px!important;font-size:1.1rem!important;font-weight:500!important;border:2px solid var(--primary-color, #4C6292)!important;border-radius:6px!important;background-color:#fff!important}.document-name-input:focus{outline:none!important;border-color:var(--primary-color, #4C6292)!important;box-shadow:0 0 0 .2rem #4c629240!important}.document-viewer{position:relative;z-index:1}.document-viewer ::ng-deep .p-dialog{z-index:9999!important}.document-viewer ::ng-deep .p-dialog-mask{z-index:9998!important}.document-viewer ::ng-deep .p-dialog{width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;margin:0!important;top:0!important;left:0!important;transform:none!important}.document-viewer ::ng-deep .p-dialog-content{height:calc(100vh - 60px)!important;max-height:none!important}.document-categories-container{padding:1rem;background-color:#f8f9fa;min-height:auto}.document-categories-container .category{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden;transition:all .3s ease}.document-categories-container .category .category-header{display:flex;justify-content:space-between;align-items:center;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef;gap:1rem}.document-categories-container .category .category-header .category-title{flex:1;min-width:0}.document-categories-container .category .category-header .category-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-categories-container .category .category-header .category-title .category-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-categories-container .category .category-header .completion-status{display:flex;align-items:center;justify-content:center;min-width:fit-content}.document-categories-container .category .category-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-categories-container .category .category-header .completion-status .completion-badge{display:flex;align-items:center;justify-content:center}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge{font-size:.75rem;font-weight:500;padding:.375rem .75rem;border-radius:6px;display:flex;align-items:center;justify-content:center;min-width:fit-content;white-space:nowrap}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-success{background-color:#d1fae5;color:#065f46;font-family:inherit;font-size:12px;padding:15px;font-weight:400}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-info{background-color:#e5e7eb;color:#000;font-family:inherit;font-size:12px;font-weight:400;padding:15px;font-style:inherit}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;padding:15px;font-size:12px;font-weight:400;font-style:inherit}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-danger{background-color:#fee2e2;color:#dc2626;font-family:inherit;font-size:12px;padding:15px;font-weight:400;font-style:inherit}.document-categories-container .category .table-container{padding:0}@keyframes highlightPulse{0%{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}50%{transform:scale(1.03);box-shadow:0 6px 25px #3b82f680}to{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}}.document-sections-container{padding:1rem;background-color:#f8f9fa;min-height:100vh}.document-sections-container .section{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden}.document-sections-container .section .section-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef}.document-sections-container .section .section-header .section-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-sections-container .section .section-header .section-title .section-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-sections-container .section .section-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge{font-size:.75rem;font-weight:500;padding:.375rem .75rem;border-radius:6px}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-success{background-color:#10b981;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-info{background-color:#3b82f6;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-warning{background-color:#f59e0b;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-danger{background-color:#ef4444;color:#fff}.document-sections-container .section .table-container{padding:0}@media (max-width: 768px){.document-categories-container,.document-sections-container{padding:.5rem}.document-categories-container .category .category-header,.document-categories-container .category .section-header,.document-categories-container .section .category-header,.document-categories-container .section .section-header,.document-sections-container .category .category-header,.document-sections-container .category .section-header,.document-sections-container .section .category-header,.document-sections-container .section .section-header{flex-direction:column;gap:1rem;align-items:stretch}.document-categories-container .category .category-header .completion-status,.document-categories-container .category .section-header .completion-status,.document-categories-container .section .category-header .completion-status,.document-categories-container .section .section-header .completion-status,.document-sections-container .category .category-header .completion-status,.document-sections-container .category .section-header .completion-status,.document-sections-container .section .category-header .completion-status,.document-sections-container .section .section-header .completion-status{align-self:center;width:100%;justify-content:center}}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "component", type: i9$2.Badge, selector: "p-badge", inputs: ["styleClass", "style", "badgeSize", "severity", "value", "badgeDisabled", "size"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i12$1.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: TablePrimaryComponent, selector: "lib-table-primary", inputs: ["tableData", "showHeader", "tableStyle"], outputs: ["rowClick"] }, { kind: "component", type: DocumentViewerComponent, selector: "document-viewer", inputs: ["selectedDocument", "documentList", "contextId"], outputs: ["documentStatusUpdated", "viewerDestroyed"] }], encapsulation: i0.ViewEncapsulation.None });
8081
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentListComponent, isStandalone: false, selector: "lib-document-list", inputs: { contextId: "contextId", documentListResponse: "documentListResponse", selectedMenuItemId: "selectedMenuItemId", navigationInfo: "navigationInfo", documentList: "documentList" }, outputs: { handleSelectedDocument: "handleSelectedDocument" }, viewQueries: [{ propertyName: "documentCategoriesContainer", first: true, predicate: ["documentCategoriesContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"document-viewer\">\r\n <p-dialog [header]=\"selectedDocument?.aliasName ?? selectedDocument?.docName\" [(visible)]=\"isdialogVisible\" [modal]=\"true\"\r\n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\" (onHide)=\"handleCloseModal()\">\r\n <p-messages [(value)]=\"deleteMessage\" [enableService]=\"false\" [closable]=\"false\" />\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"inline-flex align-items-center justify-content-center gap-2\">\r\n <!-- Show alias name and document name when available -->\r\n <div *ngIf=\"!isEditingDocumentName && aliasName\" \r\n class=\"document-name-display clickable-doc-name\"\r\n (click)=\"onDocumentNameClick()\"\r\n title=\"Click to edit document name\">\r\n <div class=\"alias-name\">\r\n {{ selectedDocument?.aliasName }}\r\n <i class=\"pi pi-pencil edit-icon-small\"></i>\r\n </div>\r\n <div class=\"document-name\">{{ selectedDocument?.docName }}</div>\r\n </div>\r\n <span \r\n *ngIf=\"!isEditingDocumentName && !aliasName\" \r\n class=\"font-bold white-space-nowrap clickable-doc-name\"\r\n (click)=\"onDocumentNameClick()\"\r\n title=\"Click to edit document name\">\r\n {{selectedDocument?.docName}}\r\n <i class=\"pi pi-pencil edit-icon\"></i>\r\n </span>\r\n <input \r\n *ngIf=\"isEditingDocumentName\"\r\n #fileInput \r\n type=\"text\" \r\n class=\"h-3rem file-input-wrapper document-name-input\" \r\n pInputText \r\n [(ngModel)]=\"documentName\"\r\n (input)=\"onDocumentNameChange($event)\" \r\n (blur)=\"handleSaveClick()\"\r\n (keydown.escape)=\"cancelDocumentNameEdit()\"\r\n (keydown.enter)=\"handleSaveClick()\" />\r\n <div *ngIf=\"fileNameError\" class=\"error-message-wrapper\">\r\n {{ fileNameError }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\" [contextId]=\"contextId\"\r\n (documentStatusUpdated)=\"refreshDocumentList($event.actionType === 'delete')\"\r\n (viewerDestroyed)=\"handleViewerDestroyed()\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"w-full flex align-items-center justify-content-between\">\r\n <input type=\"text\" class=\"w-full border-none bg-white h-3rem file-input-wrapper\" pInputText\r\n [(ngModel)]=\"fileName\" />\r\n\r\n </div>\r\n </ng-template>\r\n @if(selectedDocument?.status === 'Approved'){\r\n <ng-content></ng-content>\r\n }\r\n </document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"document-categories-container\" #documentCategoriesContainer>\r\n <div class=\"category\" *ngFor=\"let category of documentCategories; let i = index\"\r\n [id]=\"categoryIds[i]\">\r\n <div class=\"category-header\">\r\n <div class=\"category-title\">\r\n <h3>{{ formattedCategoryLabels[i] }}</h3>\r\n <p class=\"category-description\">{{ category.categoryDescription }}</p>\r\n </div>\r\n <div class=\"completion-status\">\r\n <p-badge \r\n [severity]=\"categorySeverities[i]\" \r\n [value]=\"categoryCompletionCounts[i] + ' Complete'\"\r\n class=\"completion-badge\">\r\n </p-badge>\r\n </div>\r\n </div>\r\n\r\n <div class=\"table-container\">\r\n <lib-table-primary [tableData]=\"categoryTables[i]\" [tableStyle]=\"{ 'min-width': '100%' }\"\r\n (rowClick)=\"handleTableRowClick($event)\" (deleteAction)=\"handleDeleteAction($event)\">\r\n </lib-table-primary>\r\n </div>\r\n </div>\r\n</div>", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right{width:35%}.error-message-wrapper{color:#dc3545}.right-sidebar{width:35%}.document-title-wrapper{font-size:20px;font-weight:700;color:var(--text-color)}.document-input-field{display:flex;flex-direction:column}.document-input-field input{width:100%;height:46px;padding:10px 15px;gap:10px;border-radius:10px;outline:none;border:1px solid rgba(76,98,146,.1019607843);font-size:15px}label{color:#0f1729;font-weight:600}.document-list-dropDown .p-element{padding:10px 0 10px 15px}.document-list-dropDown .p-dropdown{border-radius:10px!important}.side-bar-con{display:flex;flex-direction:column}.save-btn-con{width:100%;border-top:1px solid rgba(76,98,146,.2);background:#4c629214;padding:13px 40px}.save-btn-wrapper{padding:10px 4px}.save-btn .p-button{height:45px!important;width:140px;border-radius:10px}.p-sidebar-footer{padding:0}.file-input-wrapper.p-inputtext:enabled:focus{box-shadow:0 0 0 .2rem #a6d5fa!important}.clickable-doc-name{cursor:pointer;transition:all .2s ease;padding:4px 8px;border-radius:4px}.clickable-doc-name:hover{background-color:#4c62921a;color:var(--primary-color, #4C6292)}.clickable-doc-name:active{background-color:#4c629233;transform:scale(.98)}.clickable-doc-name .edit-icon{font-size:.8em;margin-left:8px;opacity:.6;transition:opacity .2s ease}.clickable-doc-name:hover .edit-icon{opacity:1}.document-name-display{display:flex;flex-direction:column;align-items:flex-start;gap:4px;cursor:pointer;transition:all .2s ease;padding:4px 8px;border-radius:4px;width:100%}.document-name-display:hover{background-color:#4c62921a}.document-name-display:hover .alias-name{color:var(--primary-color, #4C6292)}.document-name-display:active{background-color:#4c629233;transform:scale(.98)}.document-name-display .alias-name{font-size:1.5rem;font-weight:700;color:var(--text-color, #2c3e50);line-height:1.2;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;max-width:none;transition:color .2s ease;display:flex;align-items:center;justify-content:flex-start;gap:8px}.document-name-display .alias-name .edit-icon-small{font-size:.6em;opacity:.5;transition:opacity .2s ease}.document-name-display:hover .edit-icon-small{opacity:1}.document-name-display .document-name{font-size:.875rem;color:var(--text-color-secondary, #6c757d);font-weight:400;line-height:1.2;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;max-width:none;opacity:.8}.file-input-wrapper{transition:all .2s ease;min-width:300px!important;width:auto!important;max-width:80vw!important}.file-input-wrapper:focus{border-color:var(--primary-color, #4C6292)!important;box-shadow:0 0 0 .2rem #4c629240!important}.document-name-input{min-width:400px!important;width:auto!important;max-width:70vw!important;padding:8px 12px!important;font-size:1.1rem!important;font-weight:500!important;border:2px solid var(--primary-color, #4C6292)!important;border-radius:6px!important;background-color:#fff!important}.document-name-input:focus{outline:none!important;border-color:var(--primary-color, #4C6292)!important;box-shadow:0 0 0 .2rem #4c629240!important}.document-viewer{position:relative;z-index:1}.document-viewer ::ng-deep .p-dialog{z-index:9999!important}.document-viewer ::ng-deep .p-dialog-mask{z-index:9998!important}.document-viewer ::ng-deep .p-dialog{width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;margin:0!important;top:0!important;left:0!important;transform:none!important}.document-viewer ::ng-deep .p-dialog-content{height:calc(100vh - 60px)!important;max-height:none!important}.document-categories-container{padding:1rem;background-color:#f8f9fa;min-height:auto}.document-categories-container .category{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden;transition:all .3s ease}.document-categories-container .category .category-header{display:flex;justify-content:space-between;align-items:center;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef;gap:1rem}.document-categories-container .category .category-header .category-title{flex:1;min-width:0}.document-categories-container .category .category-header .category-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-categories-container .category .category-header .category-title .category-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-categories-container .category .category-header .completion-status{display:flex;align-items:center;justify-content:center;min-width:fit-content}.document-categories-container .category .category-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-categories-container .category .category-header .completion-status .completion-badge{display:flex;align-items:center;justify-content:center}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge{font-size:.75rem;font-weight:500;padding:.375rem .75rem;border-radius:6px;display:flex;align-items:center;justify-content:center;min-width:fit-content;white-space:nowrap}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-success{background-color:#d1fae5;color:#065f46;font-family:inherit;font-size:12px;padding:15px;font-weight:400}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-info{background-color:#e5e7eb;color:#000;font-family:inherit;font-size:12px;font-weight:400;padding:15px;font-style:inherit}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;padding:15px;font-size:12px;font-weight:400;font-style:inherit}.document-categories-container .category .category-header .completion-status .completion-badge .p-badge.p-badge-danger{background-color:#fee2e2;color:#dc2626;font-family:inherit;font-size:12px;padding:15px;font-weight:400;font-style:inherit}.document-categories-container .category .table-container{padding:0}@keyframes highlightPulse{0%{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}50%{transform:scale(1.03);box-shadow:0 6px 25px #3b82f680}to{transform:scale(1.02);box-shadow:0 4px 20px #3b82f64d}}.document-sections-container{padding:1rem;background-color:#f8f9fa;min-height:100vh}.document-sections-container .section{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden}.document-sections-container .section .section-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef}.document-sections-container .section .section-header .section-title h3{margin:0 0 .5rem;font-size:1.25rem;font-weight:600;color:#2c3e50}.document-sections-container .section .section-header .section-title .section-description{margin:0;color:#6c757d;font-size:.875rem;line-height:1.4}.document-sections-container .section .section-header .completion-status .status-badge{background-color:#fbbf24;color:#92400e;padding:.375rem .75rem;border-radius:6px;font-size:.75rem;font-weight:500;display:inline-block}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge{font-size:.75rem;font-weight:500;padding:.375rem .75rem;border-radius:6px}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-success{background-color:#10b981;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-info{background-color:#3b82f6;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-warning{background-color:#f59e0b;color:#fff}.document-sections-container .section .section-header .completion-status .completion-badge .p-badge.p-badge-danger{background-color:#ef4444;color:#fff}.document-sections-container .section .table-container{padding:0}@media (max-width: 768px){.document-categories-container,.document-sections-container{padding:.5rem}.document-categories-container .category .category-header,.document-categories-container .category .section-header,.document-categories-container .section .category-header,.document-categories-container .section .section-header,.document-sections-container .category .category-header,.document-sections-container .category .section-header,.document-sections-container .section .category-header,.document-sections-container .section .section-header{flex-direction:column;gap:1rem;align-items:stretch}.document-categories-container .category .category-header .completion-status,.document-categories-container .category .section-header .completion-status,.document-categories-container .section .category-header .completion-status,.document-categories-container .section .section-header .completion-status,.document-sections-container .category .category-header .completion-status,.document-sections-container .category .section-header .completion-status,.document-sections-container .section .category-header .completion-status,.document-sections-container .section .section-header .completion-status{align-self:center;width:100%;justify-content:center}}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "component", type: i9$2.Badge, selector: "p-badge", inputs: ["styleClass", "style", "badgeSize", "severity", "value", "badgeDisabled", "size"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i12$1.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: TablePrimaryComponent, selector: "lib-table-primary", inputs: ["tableData", "showHeader", "tableStyle"], outputs: ["rowClick", "downloadDocument"] }, { kind: "component", type: DocumentViewerComponent, selector: "document-viewer", inputs: ["selectedDocument", "documentList", "contextId"], outputs: ["documentStatusUpdated", "viewerDestroyed"] }], encapsulation: i0.ViewEncapsulation.None });
7996
8082
  }
7997
8083
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListComponent, decorators: [{
7998
8084
  type: Component,