cat-documents-ng 0.2.44 → 0.2.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/cat-documents-ng.mjs +136 -17
- package/fesm2022/cat-documents-ng.mjs.map +1 -1
- package/lib/document/components/document-container/document-container.component.d.ts +11 -3
- package/lib/document/components/document-list/document-list.component.d.ts +10 -2
- package/lib/document/components/document-status/document-status.component.d.ts +5 -3
- package/lib/document/components/documents-menu/documents-menu.component.d.ts +4 -0
- package/lib/document/services/document.service.d.ts +7 -0
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import { firstValueFrom, tap, EMPTY, catchError, throwError, of, combineLatest,
|
|
|
6
6
|
import { __decorate } from 'tslib';
|
|
7
7
|
import { EntityStore, StoreConfig, QueryEntity } from '@datorama/akita';
|
|
8
8
|
import * as i2 from '@angular/common/http';
|
|
9
|
-
import { HttpParams, HttpClientModule } from '@angular/common/http';
|
|
9
|
+
import { HttpHeaders, HttpParams, HttpClientModule } from '@angular/common/http';
|
|
10
10
|
import { debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';
|
|
11
11
|
import { trigger, state, transition, style, animate } from '@angular/animations';
|
|
12
12
|
import * as i3 from '@angular/forms';
|
|
@@ -1571,7 +1571,8 @@ class DocumentHttpService {
|
|
|
1571
1571
|
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
1572
1572
|
*/
|
|
1573
1573
|
getDocumentCatagories(contextId) {
|
|
1574
|
-
|
|
1574
|
+
const header = new HttpHeaders({ Authorization: 'Bearer cccc6f79-5be6-4f74-9078-3908164ebc92' });
|
|
1575
|
+
return this.http.get(`${this.apiUrl}${URLS.DOCUMENTS_CATAGORIES}/${contextId}`, { headers: header }).pipe(tap((categories) => {
|
|
1575
1576
|
this.documentStore.setDocumentCategories(categories);
|
|
1576
1577
|
}), catchError((error) => {
|
|
1577
1578
|
return throwError(() => new Error(error));
|
|
@@ -1633,9 +1634,10 @@ class DocumentHttpService {
|
|
|
1633
1634
|
* @returns {Observable<UserListModel[]>} Observable that emits the user list data.
|
|
1634
1635
|
*/
|
|
1635
1636
|
getUserListByContextId(contextId) {
|
|
1637
|
+
const header = new HttpHeaders({ Authorization: 'Bearer cccc6f79-5be6-4f74-9078-3908164ebc92' });
|
|
1636
1638
|
if (!contextId)
|
|
1637
1639
|
return EMPTY;
|
|
1638
|
-
return this.http.get(`${this.apiUrl}${URLS.USERLIST}${contextId}
|
|
1640
|
+
return this.http.get(`${this.apiUrl}${URLS.USERLIST}${contextId}`, { headers: header }).pipe(tap((userList) => {
|
|
1639
1641
|
this.documentStore.setUserList(userList);
|
|
1640
1642
|
}), catchError((error) => {
|
|
1641
1643
|
return throwError(() => new Error(error));
|
|
@@ -1660,7 +1662,8 @@ class DocumentHttpService {
|
|
|
1660
1662
|
if (categoryId) {
|
|
1661
1663
|
params = params.set(SHARED.CATEGORY, categoryId);
|
|
1662
1664
|
}
|
|
1663
|
-
|
|
1665
|
+
const header = new HttpHeaders({ Authorization: 'Bearer cccc6f79-5be6-4f74-9078-3908164ebc92' });
|
|
1666
|
+
return this.http.get(url, { params, headers: header }).pipe(tap((statusData) => {
|
|
1664
1667
|
this.documentStore.setStatusData(statusData);
|
|
1665
1668
|
}), catchError((error) => {
|
|
1666
1669
|
return throwError(() => new Error(error));
|
|
@@ -1690,7 +1693,8 @@ class DocumentHttpService {
|
|
|
1690
1693
|
if (searchKey) {
|
|
1691
1694
|
params = params.set(SHARED.SEARCH_KEY, searchKey);
|
|
1692
1695
|
}
|
|
1693
|
-
|
|
1696
|
+
const header = new HttpHeaders({ Authorization: 'Bearer cccc6f79-5be6-4f74-9078-3908164ebc92' });
|
|
1697
|
+
return this.http.get(`${this.apiUrl}${URLS.GETALL}/${contextId}`, { params, headers: header }).pipe(tap((response) => {
|
|
1694
1698
|
if (response.documents) {
|
|
1695
1699
|
this.documentStore.setDocumentList(response.documents);
|
|
1696
1700
|
}
|
|
@@ -1702,7 +1706,8 @@ class DocumentHttpService {
|
|
|
1702
1706
|
if (!documentId) {
|
|
1703
1707
|
return of([]);
|
|
1704
1708
|
}
|
|
1705
|
-
|
|
1709
|
+
const header = new HttpHeaders({ Authorization: 'Bearer cccc6f79-5be6-4f74-9078-3908164ebc92' });
|
|
1710
|
+
return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_HISTORY}${documentId}`, { headers: header });
|
|
1706
1711
|
}
|
|
1707
1712
|
/**
|
|
1708
1713
|
* Updates the status of a document by document ID
|
|
@@ -1715,7 +1720,8 @@ class DocumentHttpService {
|
|
|
1715
1720
|
const payload = {
|
|
1716
1721
|
statusUpdateDescription: statusUpdateDescription
|
|
1717
1722
|
};
|
|
1718
|
-
|
|
1723
|
+
const header = new HttpHeaders({ Authorization: 'Bearer cccc6f79-5be6-4f74-9078-3908164ebc92' });
|
|
1724
|
+
return this.http.put(`${this.apiUrl}${URLS.UPDATE_DOCUMENT_STATUS}${documentId}/${status}`, payload, { headers: header }).pipe(tap((response) => {
|
|
1719
1725
|
if (response && response.status) {
|
|
1720
1726
|
const normalizedStatus = this.normalizeStatus(response.status);
|
|
1721
1727
|
response.normalizedStatus = normalizedStatus;
|
|
@@ -1748,7 +1754,8 @@ class DocumentHttpService {
|
|
|
1748
1754
|
* @returns {Observable<any>} Observable that emits the delete response
|
|
1749
1755
|
*/
|
|
1750
1756
|
deleteDocument(documentId, contextId) {
|
|
1751
|
-
|
|
1757
|
+
const header = new HttpHeaders({ Authorization: 'Bearer cccc6f79-5be6-4f74-9078-3908164ebc92' });
|
|
1758
|
+
return this.http.delete(`${this.apiUrl}${URLS.DELETE_DOCUMENT}${documentId}`, { headers: header }).pipe(tap(() => {
|
|
1752
1759
|
this.getDocumentCatagories(contextId).subscribe();
|
|
1753
1760
|
this.getUserListByContextId(contextId).subscribe();
|
|
1754
1761
|
this.getStatusDocumentCount(contextId).subscribe();
|
|
@@ -1957,6 +1964,22 @@ class DocumentHelperService {
|
|
|
1957
1964
|
}
|
|
1958
1965
|
});
|
|
1959
1966
|
}
|
|
1967
|
+
/**
|
|
1968
|
+
* Refresh status data for a specific context
|
|
1969
|
+
* @param contextId - The context ID to use for the API call
|
|
1970
|
+
* @param statusContextId - The status context ID (usually userId)
|
|
1971
|
+
* @param categoryId - The category ID (usually menuItem)
|
|
1972
|
+
*/
|
|
1973
|
+
refreshStatusData(contextId, statusContextId, categoryId) {
|
|
1974
|
+
this.documentHttpService.getStatusDocumentCount(contextId, statusContextId, categoryId).subscribe({
|
|
1975
|
+
next: (statusData) => {
|
|
1976
|
+
this.documentStore.setStatusData(statusData);
|
|
1977
|
+
},
|
|
1978
|
+
error: (error) => {
|
|
1979
|
+
console.error('Error refreshing status data:', error);
|
|
1980
|
+
}
|
|
1981
|
+
});
|
|
1982
|
+
}
|
|
1960
1983
|
/**
|
|
1961
1984
|
* Refresh all data with current filters after accept/reject/delete operations
|
|
1962
1985
|
* This includes document categories, status data, user list, and document list
|
|
@@ -2305,6 +2328,12 @@ class DocumentStatusComponent {
|
|
|
2305
2328
|
this.documentService = documentService;
|
|
2306
2329
|
this.statusCalculatorService = statusCalculatorService;
|
|
2307
2330
|
}
|
|
2331
|
+
ngOnChanges(changes) {
|
|
2332
|
+
if (changes['contextId'] && !changes['contextId'].firstChange) {
|
|
2333
|
+
// When contextId changes, refetch status data for the new context
|
|
2334
|
+
this.refetchStatusData();
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2308
2337
|
ngOnInit() {
|
|
2309
2338
|
this.subscription.add(this.documentQuery.selectSelectedStatus().subscribe(status => {
|
|
2310
2339
|
this.selectedStatus = status;
|
|
@@ -2316,9 +2345,19 @@ class DocumentStatusComponent {
|
|
|
2316
2345
|
this.updateCalculatedStatusData();
|
|
2317
2346
|
}
|
|
2318
2347
|
}));
|
|
2348
|
+
// Initial fetch of status data if contextId is provided
|
|
2349
|
+
if (this.contextId && this.contextId !== SHARED.EMPTY) {
|
|
2350
|
+
this.refetchStatusData();
|
|
2351
|
+
}
|
|
2319
2352
|
}
|
|
2320
|
-
|
|
2321
|
-
this.
|
|
2353
|
+
refetchStatusData() {
|
|
2354
|
+
if (this.contextId && this.contextId !== SHARED.EMPTY) {
|
|
2355
|
+
const currentState = this.documentQuery.getSelectionState();
|
|
2356
|
+
const statusContextId = currentState.userId || null;
|
|
2357
|
+
const categoryId = currentState.menuItem || null;
|
|
2358
|
+
// Use the document service to refresh status data for the new context
|
|
2359
|
+
this.documentService.refreshStatusData(this.contextId, statusContextId, categoryId);
|
|
2360
|
+
}
|
|
2322
2361
|
}
|
|
2323
2362
|
selectStatus(status) {
|
|
2324
2363
|
const newStatus = this.selectedStatus === status ? null : status;
|
|
@@ -2327,8 +2366,11 @@ class DocumentStatusComponent {
|
|
|
2327
2366
|
updateCalculatedStatusData() {
|
|
2328
2367
|
this.statusDataWithPercentages = this.statusCalculatorService.calculateStatusDataWithPercentages(this.statusData, this.selectedStatus);
|
|
2329
2368
|
}
|
|
2369
|
+
ngOnDestroy() {
|
|
2370
|
+
this.subscription.unsubscribe();
|
|
2371
|
+
}
|
|
2330
2372
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentStatusComponent, deps: [{ token: DocumentQuery }, { token: DocumentHelperService }, { token: StatusCalculatorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2331
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentStatusComponent, isStandalone: false, selector: "lib-document-status", inputs: { contextId: "contextId", statusData: "statusData" }, ngImport: i0, template: "<div class=\"status-summary-container\">\r\n <div class=\"status-cards\">\r\n \r\n <div \r\n *ngFor=\"let status of statusDataWithPercentages\" \r\n class=\"status-card {{ status.statusClass }}\"\r\n [class.selected]=\"status.isSelected\"\r\n (click)=\"selectStatus(status.status || '')\"\r\n >\r\n <div class=\"status-icon {{ status.iconClass }}\">\r\n <i [class]=\"status.icon\"></i>\r\n </div>\r\n <div class=\"status-info\">\r\n <div class=\"status-count\">{{ status.count }}</div>\r\n <div class=\"status-name\">{{ status.status }}</div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n \r\n <div class=\"progress-bar-container\">\r\n <div class=\"progress-bar\">\r\n <div \r\n *ngFor=\"let status of statusDataWithPercentages\" \r\n class=\"progress-segment\"\r\n [style.width.%]=\"status.percentage\"\r\n [style.background-color]=\"status.color\"\r\n ></div>\r\n </div>\r\n </div>\r\n</div>", styles: [".status-summary-container{padding:1rem}.status-cards{display:flex;flex-wrap:wrap;gap:1rem;margin-bottom:1.5rem}.status-card{display:flex;align-items:center;gap:.75rem;padding:1rem;border-radius:8px;background:#fff;box-shadow:0 2px 4px #0000001a;min-width:150px;flex:1;cursor:pointer;transition:all .2s ease;border:2px solid transparent}.status-card:hover{transform:translateY(-2px);box-shadow:0 4px 8px #00000026}.status-card.selected{border-width:3px!important;border-style:solid!important;box-shadow:0 4px 12px #0003}.status-card.selected.status-approved{border-color:#10b981!important;background:#ecfdf5!important}.status-card.selected.status-pending{border-color:#6b7280!important;background:#f8fafc!important}.status-card.selected.status-reviewing{border-color:#f59e0b!important;background:#fffbeb!important}.status-card.selected.status-rejected{border-color:#ef4444!important;background:#fff1f2!important}.status-card.selected.status-alert{border-color:#dc2626!important;background:#ef4444!important}.status-icon{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:18px;color:#fff}.icon-approved{background-color:#10b981}.icon-pending{background-color:#6b7280}.icon-reviewing{background-color:#f59e0b}.icon-rejected{background-color:#ef4444}.icon-alert{background-color:#dc2626}.status-info{flex:1}.status-name{font-weight:600;color:#1f2937;margin-bottom:.25rem}.status-count{font-size:1.5rem;font-weight:700;color:#374151}.progress-bar-container{margin-top:1rem}.progress-bar{height:8px;background-color:#e5e7eb;border-radius:4px;overflow:hidden;display:flex}.progress-segment{height:100%;transition:width .3s ease}\n"], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
2373
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentStatusComponent, isStandalone: false, selector: "lib-document-status", inputs: { contextId: "contextId", statusData: "statusData" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"status-summary-container\">\r\n <div class=\"status-cards\">\r\n \r\n <div \r\n *ngFor=\"let status of statusDataWithPercentages\" \r\n class=\"status-card {{ status.statusClass }}\"\r\n [class.selected]=\"status.isSelected\"\r\n (click)=\"selectStatus(status.status || '')\"\r\n >\r\n <div class=\"status-icon {{ status.iconClass }}\">\r\n <i [class]=\"status.icon\"></i>\r\n </div>\r\n <div class=\"status-info\">\r\n <div class=\"status-count\">{{ status.count }}</div>\r\n <div class=\"status-name\">{{ status.status }}</div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n \r\n <div class=\"progress-bar-container\">\r\n <div class=\"progress-bar\">\r\n <div \r\n *ngFor=\"let status of statusDataWithPercentages\" \r\n class=\"progress-segment\"\r\n [style.width.%]=\"status.percentage\"\r\n [style.background-color]=\"status.color\"\r\n ></div>\r\n </div>\r\n </div>\r\n</div>", styles: [".status-summary-container{padding:1rem}.status-cards{display:flex;flex-wrap:wrap;gap:1rem;margin-bottom:1.5rem}.status-card{display:flex;align-items:center;gap:.75rem;padding:1rem;border-radius:8px;background:#fff;box-shadow:0 2px 4px #0000001a;min-width:150px;flex:1;cursor:pointer;transition:all .2s ease;border:2px solid transparent}.status-card:hover{transform:translateY(-2px);box-shadow:0 4px 8px #00000026}.status-card.selected{border-width:3px!important;border-style:solid!important;box-shadow:0 4px 12px #0003}.status-card.selected.status-approved{border-color:#10b981!important;background:#ecfdf5!important}.status-card.selected.status-pending{border-color:#6b7280!important;background:#f8fafc!important}.status-card.selected.status-reviewing{border-color:#f59e0b!important;background:#fffbeb!important}.status-card.selected.status-rejected{border-color:#ef4444!important;background:#fff1f2!important}.status-card.selected.status-alert{border-color:#dc2626!important;background:#ef4444!important}.status-icon{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:18px;color:#fff}.icon-approved{background-color:#10b981}.icon-pending{background-color:#6b7280}.icon-reviewing{background-color:#f59e0b}.icon-rejected{background-color:#ef4444}.icon-alert{background-color:#dc2626}.status-info{flex:1}.status-name{font-weight:600;color:#1f2937;margin-bottom:.25rem}.status-count{font-size:1.5rem;font-weight:700;color:#374151}.progress-bar-container{margin-top:1rem}.progress-bar{height:8px;background-color:#e5e7eb;border-radius:4px;overflow:hidden;display:flex}.progress-segment{height:100%;transition:width .3s ease}\n"], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
2332
2374
|
}
|
|
2333
2375
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentStatusComponent, decorators: [{
|
|
2334
2376
|
type: Component,
|
|
@@ -3641,6 +3683,9 @@ class DocumentHistoryComponent {
|
|
|
3641
3683
|
* Process history data to add computed properties
|
|
3642
3684
|
*/
|
|
3643
3685
|
get processedHistoryData() {
|
|
3686
|
+
if (!this.historyData) {
|
|
3687
|
+
return [];
|
|
3688
|
+
}
|
|
3644
3689
|
return this.historyData.map(section => {
|
|
3645
3690
|
const processedSection = {
|
|
3646
3691
|
...section,
|
|
@@ -4222,6 +4267,15 @@ class DocumentListComponent {
|
|
|
4222
4267
|
this.documentTableBuilder = documentTableBuilder;
|
|
4223
4268
|
this.documentHelperService = documentHelperService;
|
|
4224
4269
|
}
|
|
4270
|
+
/**
|
|
4271
|
+
* Handles changes to input properties
|
|
4272
|
+
*/
|
|
4273
|
+
ngOnChanges(changes) {
|
|
4274
|
+
if (changes['contextId'] && !changes['contextId'].firstChange) {
|
|
4275
|
+
// When contextId changes, refresh the document list for the new context
|
|
4276
|
+
this.refreshDocumentListForNewContext();
|
|
4277
|
+
}
|
|
4278
|
+
}
|
|
4225
4279
|
/**
|
|
4226
4280
|
* Initializes the component by fetching the document type list.
|
|
4227
4281
|
*/
|
|
@@ -4395,6 +4449,17 @@ class DocumentListComponent {
|
|
|
4395
4449
|
});
|
|
4396
4450
|
}
|
|
4397
4451
|
}
|
|
4452
|
+
/**
|
|
4453
|
+
* Refreshes the document list for a new context
|
|
4454
|
+
*/
|
|
4455
|
+
refreshDocumentListForNewContext() {
|
|
4456
|
+
if (this.contextId && this.contextId !== SHARED.EMPTY) {
|
|
4457
|
+
// Clear current document list response
|
|
4458
|
+
this.documentStore.setDocumentListResponse(null);
|
|
4459
|
+
// Refresh documents for the new context
|
|
4460
|
+
this.documentHelperService.refreshDocumentsWithoutFilters(this.contextId);
|
|
4461
|
+
}
|
|
4462
|
+
}
|
|
4398
4463
|
/**
|
|
4399
4464
|
* Refreshes the document list after a status update
|
|
4400
4465
|
*/
|
|
@@ -4410,7 +4475,7 @@ class DocumentListComponent {
|
|
|
4410
4475
|
this.documentListSubscription.unsubscribe();
|
|
4411
4476
|
}
|
|
4412
4477
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListComponent, deps: [{ token: DocumentUploadService }, { token: DocumentHttpService }, { token: DocumentQuery }, { token: DocumentStore }, { token: DocumentTableBuilderService }, { token: DocumentHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4413
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentListComponent, isStandalone: false, selector: "lib-document-list", inputs: { contextId: "contextId", documentListResponse: "documentListResponse", isUploadButtonVisible: "isUploadButtonVisible", documentList: "documentList", status: "status", category: "category", searchKey: "searchKey" }, ngImport: i0, template: "<div class=\"document-viewer\">\r\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\" \r\n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\">\r\n <document-viewer \r\n [selectedDocument]=\"selectedDocument\" \r\n [documentList]=\"documentList\" \r\n [contextId]=\"contextId\" \r\n (documentStatusUpdated)=\"refreshDocumentList()\">\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 <button pButton pRipple class=\"mx-3 w-6rem save-btn-wrapper\" label=\"Save\" (click)=\"handleSaveClick()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n <ng-content></ng-content>\r\n </document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"document-categories-container\">\r\n <div class=\"category\" *ngFor=\"let category of documentCategories; let i = index\">\r\n <div class=\"category-header\">\r\n <div class=\"category-title\">\r\n <h3>{{ category.label }} Documents</h3>\r\n <p class=\"category-description\">{{ category.categoryDescription }}</p>\r\n </div>\r\n <div class=\"completion-status\">\r\n <span class=\"status-badge\">{{ categoryCompletionCounts[i] }} Complete</span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"table-container\">\r\n <lib-table-primary \r\n [tableData]=\"categoryTables[i]\" \r\n [tableStyle]=\"{ 'min-width': '100%' }\"\r\n (rowClick)=\"handleTableRowClick($event)\"\r\n (deleteAction)=\"handleDeleteAction($event)\">\r\n </lib-table-primary>\r\n </div>\r\n </div>\r\n</div>\r\n<div class=\"grid m-0\">\r\n <div class=\"col-12 p-0\">\r\n <p-sidebar [(visible)]=\"isSidebarVisible\" position=\"right\" [styleClass]=\"'right-sidebar'\" class=\"relative\">\r\n <ng-template pTemplate=\"header\">\r\n <p-messages [(value)]=\"messages\" [enableService]=\"false\" />\r\n </ng-template>\r\n <ng-template pTemplate=\"content\">\r\n <div class=\"side-bar-con\">\r\n <lib-document-upload [contextId]=\"contextId\"></lib-document-upload>\r\n <div class=\"p-fluid\">\r\n <div class=\"field\">\r\n <label for=\"city\">Select Folder</label>\r\n <p-dropdown id=\"city\" optionLabel=\"label\" optionValue=\"value\" [options]=\"options\"\r\n placeholder=\"Select a Folder\" [(ngModel)]=\"selectedOption\"></p-dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"footer\" class=\"bg-gray-100 p-0\">\r\n <div class=\"bg-gray-100 p-4\">\r\n <p-button label=\"Save\" class=\"p-button-rounded p-button-success save-btn\" (click)=\"handleUploadDocument()\"\r\n [disabled]=\"!selectedOption\">\r\n </p-button>\r\n </div>\r\n </ng-template>\r\n </p-sidebar>\r\n </div>\r\n</div>", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right,.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}.document-categories-container{padding:1rem;background-color:#f8f9fa;min-height:100vh}.document-categories-container .category{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden}.document-categories-container .category .category-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef}.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 .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 .table-container{padding:0}.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 .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:flex-start}.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:flex-end}}\n"], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i4.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"] }, { kind: "component", type: i10.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: i6.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "directive", type: i3.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i7$1.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: "component", type: i14.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "autoShowPanelOnPrintableCharacterKeyDown", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i15.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: TablePrimaryComponent, selector: "lib-table-primary", inputs: ["tableData", "showHeader", "tableStyle"], outputs: ["rowClick", "deleteAction"] }, { kind: "component", type: DocumentUploadComponent, selector: "lib-document-upload", inputs: ["contextId"] }, { kind: "component", type: DocumentViewerComponent, selector: "document-viewer", inputs: ["selectedDocument", "documentList", "contextId"], outputs: ["documentStatusUpdated"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
4478
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentListComponent, isStandalone: false, selector: "lib-document-list", inputs: { contextId: "contextId", documentListResponse: "documentListResponse", isUploadButtonVisible: "isUploadButtonVisible", documentList: "documentList", status: "status", category: "category", searchKey: "searchKey" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-viewer\">\r\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\" \r\n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\">\r\n <document-viewer \r\n [selectedDocument]=\"selectedDocument\" \r\n [documentList]=\"documentList\" \r\n [contextId]=\"contextId\" \r\n (documentStatusUpdated)=\"refreshDocumentList()\">\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 <button pButton pRipple class=\"mx-3 w-6rem save-btn-wrapper\" label=\"Save\" (click)=\"handleSaveClick()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n <ng-content></ng-content>\r\n </document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"document-categories-container\">\r\n <div class=\"category\" *ngFor=\"let category of documentCategories; let i = index\">\r\n <div class=\"category-header\">\r\n <div class=\"category-title\">\r\n <h3>{{ category.label }} Documents</h3>\r\n <p class=\"category-description\">{{ category.categoryDescription }}</p>\r\n </div>\r\n <div class=\"completion-status\">\r\n <span class=\"status-badge\">{{ categoryCompletionCounts[i] }} Complete</span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"table-container\">\r\n <lib-table-primary \r\n [tableData]=\"categoryTables[i]\" \r\n [tableStyle]=\"{ 'min-width': '100%' }\"\r\n (rowClick)=\"handleTableRowClick($event)\"\r\n (deleteAction)=\"handleDeleteAction($event)\">\r\n </lib-table-primary>\r\n </div>\r\n </div>\r\n</div>\r\n<div class=\"grid m-0\">\r\n <div class=\"col-12 p-0\">\r\n <p-sidebar [(visible)]=\"isSidebarVisible\" position=\"right\" [styleClass]=\"'right-sidebar'\" class=\"relative\">\r\n <ng-template pTemplate=\"header\">\r\n <p-messages [(value)]=\"messages\" [enableService]=\"false\" />\r\n </ng-template>\r\n <ng-template pTemplate=\"content\">\r\n <div class=\"side-bar-con\">\r\n <lib-document-upload [contextId]=\"contextId\"></lib-document-upload>\r\n <div class=\"p-fluid\">\r\n <div class=\"field\">\r\n <label for=\"city\">Select Folder</label>\r\n <p-dropdown id=\"city\" optionLabel=\"label\" optionValue=\"value\" [options]=\"options\"\r\n placeholder=\"Select a Folder\" [(ngModel)]=\"selectedOption\"></p-dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"footer\" class=\"bg-gray-100 p-0\">\r\n <div class=\"bg-gray-100 p-4\">\r\n <p-button label=\"Save\" class=\"p-button-rounded p-button-success save-btn\" (click)=\"handleUploadDocument()\"\r\n [disabled]=\"!selectedOption\">\r\n </p-button>\r\n </div>\r\n </ng-template>\r\n </p-sidebar>\r\n </div>\r\n</div>", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right,.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}.document-categories-container{padding:1rem;background-color:#f8f9fa;min-height:100vh}.document-categories-container .category{background:#fff;border-radius:8px;margin-bottom:2rem;box-shadow:0 2px 4px #0000001a;overflow:hidden}.document-categories-container .category .category-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1.5rem 1.5rem 1rem;border-bottom:1px solid #e9ecef}.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 .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 .table-container{padding:0}.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 .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:flex-start}.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:flex-end}}\n"], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i4.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"] }, { kind: "component", type: i10.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: i6.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "directive", type: i3.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i7$1.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: "component", type: i14.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "autoShowPanelOnPrintableCharacterKeyDown", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i15.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: TablePrimaryComponent, selector: "lib-table-primary", inputs: ["tableData", "showHeader", "tableStyle"], outputs: ["rowClick", "deleteAction"] }, { kind: "component", type: DocumentUploadComponent, selector: "lib-document-upload", inputs: ["contextId"] }, { kind: "component", type: DocumentViewerComponent, selector: "document-viewer", inputs: ["selectedDocument", "documentList", "contextId"], outputs: ["documentStatusUpdated"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
4414
4479
|
}
|
|
4415
4480
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListComponent, decorators: [{
|
|
4416
4481
|
type: Component,
|
|
@@ -4594,6 +4659,10 @@ class DocumentsMenuComponent {
|
|
|
4594
4659
|
if (changes['catagories'] && this.catagories) {
|
|
4595
4660
|
this.updateMenuItemsData();
|
|
4596
4661
|
}
|
|
4662
|
+
if (changes['contextId'] && !changes['contextId'].firstChange) {
|
|
4663
|
+
// When contextId changes, clear current selection and refresh data
|
|
4664
|
+
this.handleContextIdChange();
|
|
4665
|
+
}
|
|
4597
4666
|
}
|
|
4598
4667
|
/**
|
|
4599
4668
|
* Finds the label of a menu item by its _id
|
|
@@ -4668,15 +4737,28 @@ class DocumentsMenuComponent {
|
|
|
4668
4737
|
getSelectedMenuItem() {
|
|
4669
4738
|
return this.selectedMenuItem;
|
|
4670
4739
|
}
|
|
4740
|
+
/**
|
|
4741
|
+
* Handles contextId changes by clearing current selection and refreshing data
|
|
4742
|
+
*/
|
|
4743
|
+
handleContextIdChange() {
|
|
4744
|
+
if (this.contextId && this.contextId !== SHARED.EMPTY) {
|
|
4745
|
+
// Clear current selection
|
|
4746
|
+
this.selectedMenuItem = null;
|
|
4747
|
+
this.selectedMenuItemId = null;
|
|
4748
|
+
this.documentStore.setSelectedMenuItem(null);
|
|
4749
|
+
// Refresh documents for the new context
|
|
4750
|
+
this.documentHelperService.refreshDocumentsWithoutFilters(this.contextId);
|
|
4751
|
+
}
|
|
4752
|
+
}
|
|
4671
4753
|
getSelectedMenuItemId() {
|
|
4672
4754
|
return this.selectedMenuItemId;
|
|
4673
4755
|
}
|
|
4674
4756
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentsMenuComponent, deps: [{ token: DocumentStore }, { token: DocumentQuery }, { token: DocumentMenuService }, { token: DocumentHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4675
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentsMenuComponent, isStandalone: false, selector: "lib-documents-menu", inputs: { catagories: "catagories", applicationNumber: "applicationNumber", contextId: "contextId" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-sidebar-container h-full\">\r\n <p-card class=\"widget-menu-wrapper h-full\">\r\n @if(applicationNumber){\r\n <div class=\"flex align-items-center justify-content-between widget-menu-header-wrapper\">\r\n <p class=\"mb-0 application-title-wrapper\">ID - {{applicationNumber}}</p>\r\n <div class=\"expand-icon-wrapper\">\r\n <i class=\"ri-arrow-left-s-line text-primary flex align-items-center justify-content-center w-full h-full\"></i>\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class=\"widget-menu-container\" >\r\n <div class=\"widget-menu-wrapper h-ful l custom-scroll\">\r\n <p-menu [model]=\"catagories\" styleClass=\"w-full md:w-15rem\">\r\n <ng-template pTemplate=\"submenuheader\" let-item>\r\n <span [style]=\"{\r\n color : '#9EA0B3'\r\n }\">{{ item.label }}</span>\r\n </ng-template>\r\n <ng-template pTemplate=\"item\" let-item>\r\n <a pRipple \r\n class=\"flex align-items-center p-menuitem-link\"\r\n [class.selected-menu-item]=\"selectedMenuItemId === item._id\"\r\n (click)=\"onMenuItemClick($event, item)\">\r\n <span [class]=\"item.icon\" class=\"text-xl\"></span>\r\n <span class=\"ml-2\">{{ item.label }}</span>\r\n <p-badge *ngIf=\"item.menuData?.shouldShowBadge\" \r\n class=\"ml-auto\" \r\n [severity]=\"item.menuData?.badgeSeverity\" \r\n [value]=\"item.menuData?.badgeValue\" />\r\n </a>\r\n </ng-template>\r\n </p-menu>\r\n </div>\r\n </div>\r\n </p-card>\r\n</div>\r\n\r\n ", styles: [".expand-icon-wrapper{border:1px solid var(--primary-color);height:24px;width:24px;border-radius:50%;background:var(--blue-bg-light)}::ng-deep .p-badge.p-badge-success{background-color:#dcfce7;color:#16a34a;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-danger{background-color:#fee2e2;color:#dc2626;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-menu .p-menuitem>.p-menuitem-content .p-menuitem-link{color:#1f2937}@media screen and (min-width: 768px){::ng-deep .md\\:w-15rem{width:100%!important}}::ng-deep .p-menu .p-menuitem:not(p-highlight):not(p-disabled)>.p-menuitem-content:hover{color:#06f!important;background:#0066ff1a!important;background-color:#0066ff1a!important}::ng-deep .p-menu{border:none}::ng-deep .custom-scroll{scrollbar-gutter:inherit}::ng-deep .selected-menu-item{background-color:#0066ff1a!important;color:var(--primary-color)!important;border:1px solid rgba(68,72,109,.1)!important;border-radius:10px!important}::ng-deep .selected-menu-item .text-xl{color:var(--primary-color)!important}::ng-deep .
|
|
4757
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentsMenuComponent, isStandalone: false, selector: "lib-documents-menu", inputs: { catagories: "catagories", applicationNumber: "applicationNumber", contextId: "contextId" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-sidebar-container h-full\">\r\n <p-card class=\"widget-menu-wrapper h-full\">\r\n @if(applicationNumber){\r\n <div class=\"flex align-items-center justify-content-between widget-menu-header-wrapper\">\r\n <p class=\"mb-0 application-title-wrapper\">ID - {{applicationNumber}}</p>\r\n <div class=\"expand-icon-wrapper\">\r\n <i class=\"ri-arrow-left-s-line text-primary flex align-items-center justify-content-center w-full h-full\"></i>\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class=\"widget-menu-container\" >\r\n <div class=\"widget-menu-wrapper h-ful l custom-scroll\">\r\n <p-menu [model]=\"catagories\" styleClass=\"w-full md:w-15rem\">\r\n <ng-template pTemplate=\"submenuheader\" let-item>\r\n <span [style]=\"{\r\n color : '#9EA0B3'\r\n }\">{{ item.label }}</span>\r\n </ng-template>\r\n <ng-template pTemplate=\"item\" let-item>\r\n <a pRipple \r\n class=\"flex align-items-center p-menuitem-link\"\r\n [class.selected-menu-item]=\"selectedMenuItemId === item._id\"\r\n (click)=\"onMenuItemClick($event, item)\">\r\n <span [class]=\"item.icon\" class=\"text-xl\"></span>\r\n <span class=\"ml-2\">{{ item.label }}</span>\r\n <p-badge *ngIf=\"item.menuData?.shouldShowBadge\" \r\n class=\"ml-auto\" \r\n [severity]=\"item.menuData?.badgeSeverity\" \r\n [value]=\"item.menuData?.badgeValue\" />\r\n </a>\r\n </ng-template>\r\n </p-menu>\r\n </div>\r\n </div>\r\n </p-card>\r\n</div>\r\n\r\n ", styles: [".expand-icon-wrapper{border:1px solid var(--primary-color);height:24px;width:24px;border-radius:50%;background:var(--blue-bg-light)}::ng-deep .p-badge.p-badge-success{background-color:#dcfce7;color:#16a34a;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-danger{background-color:#fee2e2;color:#dc2626;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-menu .p-menuitem>.p-menuitem-content .p-menuitem-link{color:#1f2937}@media screen and (min-width: 768px){::ng-deep .md\\:w-15rem{width:100%!important}}::ng-deep .p-menu .p-menuitem:not(p-highlight):not(p-disabled)>.p-menuitem-content:hover{color:#06f!important;background:#0066ff1a!important;background-color:#0066ff1a!important}::ng-deep .p-menu{border:none}::ng-deep .custom-scroll{scrollbar-gutter:inherit}::ng-deep .selected-menu-item{background-color:#0066ff1a!important;color:var(--primary-color)!important;border:1px solid rgba(68,72,109,.1)!important;border-radius:10px!important}::ng-deep .selected-menu-item .text-xl{color:var(--primary-color)!important}::ng-deep .p-panelmenu .p-panelmenu-content{border:none!important}.application-title-wrapper{color:#9ea0b3;font-weight:500}.widget-menu-wrapper{margin-top:8px}.widget-menu-header-wrapper{padding:4px 4px 4px 16px}.widget-menu-container{height:calc(100% - 38px)}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}::ng-deep .document-sidebar-container .p-card{height:100%;box-shadow:none}::ng-deep .document-sidebar-container .p-card .p-card-content{height:100%;padding:0!important}::ng-deep .document-sidebar-container .p-card .p-card-body{height:100%;width:100%;padding:12px 8px;border-radius:10px;border:1px solid #e5e7eb}::ng-deep .document-sidebar-container .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content{border:none;color:var(--text-color);font-weight:400!important;background-color:var(--surface-0)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action{color:var(--text-color);font-weight:400!important;position:relative;padding:12px}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{position:absolute;right:0;top:16px;margin-right:7px;transform:rotate(90deg)!important;transition:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .company-action-wrapper:not(.p-disabled).p-highlight .p-panelmenu-header-content{margin:12px 0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content{background-color:transparent!important;border-radius:10px;padding:12px;border-bottom:0!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{transform:rotate(180deg)!important;transition:none!important;top:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link{background-color:var(--surface-0)!important;color:var(--text-color);padding:12px 6px!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);box-shadow:none!important;background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem.p-focus>.p-menuitem-content{background-color:#44486d1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:1px solid rgba(68,72,109,.1)!important;border-top:0!important;border-bottom-left-radius:10px;border-bottom-right-radius:10px}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator{border-top:1px solid rgba(68,72,109,.1)!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i7$3.Badge, selector: "p-badge", inputs: ["styleClass", "style", "badgeSize", "severity", "value", "badgeDisabled", "size"] }, { kind: "component", type: i8$1.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "component", type: i9.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }] });
|
|
4676
4758
|
}
|
|
4677
4759
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentsMenuComponent, decorators: [{
|
|
4678
4760
|
type: Component,
|
|
4679
|
-
args: [{ selector: 'lib-documents-menu', standalone: false, template: "<div class=\"document-sidebar-container h-full\">\r\n <p-card class=\"widget-menu-wrapper h-full\">\r\n @if(applicationNumber){\r\n <div class=\"flex align-items-center justify-content-between widget-menu-header-wrapper\">\r\n <p class=\"mb-0 application-title-wrapper\">ID - {{applicationNumber}}</p>\r\n <div class=\"expand-icon-wrapper\">\r\n <i class=\"ri-arrow-left-s-line text-primary flex align-items-center justify-content-center w-full h-full\"></i>\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class=\"widget-menu-container\" >\r\n <div class=\"widget-menu-wrapper h-ful l custom-scroll\">\r\n <p-menu [model]=\"catagories\" styleClass=\"w-full md:w-15rem\">\r\n <ng-template pTemplate=\"submenuheader\" let-item>\r\n <span [style]=\"{\r\n color : '#9EA0B3'\r\n }\">{{ item.label }}</span>\r\n </ng-template>\r\n <ng-template pTemplate=\"item\" let-item>\r\n <a pRipple \r\n class=\"flex align-items-center p-menuitem-link\"\r\n [class.selected-menu-item]=\"selectedMenuItemId === item._id\"\r\n (click)=\"onMenuItemClick($event, item)\">\r\n <span [class]=\"item.icon\" class=\"text-xl\"></span>\r\n <span class=\"ml-2\">{{ item.label }}</span>\r\n <p-badge *ngIf=\"item.menuData?.shouldShowBadge\" \r\n class=\"ml-auto\" \r\n [severity]=\"item.menuData?.badgeSeverity\" \r\n [value]=\"item.menuData?.badgeValue\" />\r\n </a>\r\n </ng-template>\r\n </p-menu>\r\n </div>\r\n </div>\r\n </p-card>\r\n</div>\r\n\r\n ", styles: [".expand-icon-wrapper{border:1px solid var(--primary-color);height:24px;width:24px;border-radius:50%;background:var(--blue-bg-light)}::ng-deep .p-badge.p-badge-success{background-color:#dcfce7;color:#16a34a;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-danger{background-color:#fee2e2;color:#dc2626;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-menu .p-menuitem>.p-menuitem-content .p-menuitem-link{color:#1f2937}@media screen and (min-width: 768px){::ng-deep .md\\:w-15rem{width:100%!important}}::ng-deep .p-menu .p-menuitem:not(p-highlight):not(p-disabled)>.p-menuitem-content:hover{color:#06f!important;background:#0066ff1a!important;background-color:#0066ff1a!important}::ng-deep .p-menu{border:none}::ng-deep .custom-scroll{scrollbar-gutter:inherit}::ng-deep .selected-menu-item{background-color:#0066ff1a!important;color:var(--primary-color)!important;border:1px solid rgba(68,72,109,.1)!important;border-radius:10px!important}::ng-deep .selected-menu-item .text-xl{color:var(--primary-color)!important}::ng-deep .
|
|
4761
|
+
args: [{ selector: 'lib-documents-menu', standalone: false, template: "<div class=\"document-sidebar-container h-full\">\r\n <p-card class=\"widget-menu-wrapper h-full\">\r\n @if(applicationNumber){\r\n <div class=\"flex align-items-center justify-content-between widget-menu-header-wrapper\">\r\n <p class=\"mb-0 application-title-wrapper\">ID - {{applicationNumber}}</p>\r\n <div class=\"expand-icon-wrapper\">\r\n <i class=\"ri-arrow-left-s-line text-primary flex align-items-center justify-content-center w-full h-full\"></i>\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class=\"widget-menu-container\" >\r\n <div class=\"widget-menu-wrapper h-ful l custom-scroll\">\r\n <p-menu [model]=\"catagories\" styleClass=\"w-full md:w-15rem\">\r\n <ng-template pTemplate=\"submenuheader\" let-item>\r\n <span [style]=\"{\r\n color : '#9EA0B3'\r\n }\">{{ item.label }}</span>\r\n </ng-template>\r\n <ng-template pTemplate=\"item\" let-item>\r\n <a pRipple \r\n class=\"flex align-items-center p-menuitem-link\"\r\n [class.selected-menu-item]=\"selectedMenuItemId === item._id\"\r\n (click)=\"onMenuItemClick($event, item)\">\r\n <span [class]=\"item.icon\" class=\"text-xl\"></span>\r\n <span class=\"ml-2\">{{ item.label }}</span>\r\n <p-badge *ngIf=\"item.menuData?.shouldShowBadge\" \r\n class=\"ml-auto\" \r\n [severity]=\"item.menuData?.badgeSeverity\" \r\n [value]=\"item.menuData?.badgeValue\" />\r\n </a>\r\n </ng-template>\r\n </p-menu>\r\n </div>\r\n </div>\r\n </p-card>\r\n</div>\r\n\r\n ", styles: [".expand-icon-wrapper{border:1px solid var(--primary-color);height:24px;width:24px;border-radius:50%;background:var(--blue-bg-light)}::ng-deep .p-badge.p-badge-success{background-color:#dcfce7;color:#16a34a;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-danger{background-color:#fee2e2;color:#dc2626;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-menu .p-menuitem>.p-menuitem-content .p-menuitem-link{color:#1f2937}@media screen and (min-width: 768px){::ng-deep .md\\:w-15rem{width:100%!important}}::ng-deep .p-menu .p-menuitem:not(p-highlight):not(p-disabled)>.p-menuitem-content:hover{color:#06f!important;background:#0066ff1a!important;background-color:#0066ff1a!important}::ng-deep .p-menu{border:none}::ng-deep .custom-scroll{scrollbar-gutter:inherit}::ng-deep .selected-menu-item{background-color:#0066ff1a!important;color:var(--primary-color)!important;border:1px solid rgba(68,72,109,.1)!important;border-radius:10px!important}::ng-deep .selected-menu-item .text-xl{color:var(--primary-color)!important}::ng-deep .p-panelmenu .p-panelmenu-content{border:none!important}.application-title-wrapper{color:#9ea0b3;font-weight:500}.widget-menu-wrapper{margin-top:8px}.widget-menu-header-wrapper{padding:4px 4px 4px 16px}.widget-menu-container{height:calc(100% - 38px)}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}::ng-deep .document-sidebar-container .p-card{height:100%;box-shadow:none}::ng-deep .document-sidebar-container .p-card .p-card-content{height:100%;padding:0!important}::ng-deep .document-sidebar-container .p-card .p-card-body{height:100%;width:100%;padding:12px 8px;border-radius:10px;border:1px solid #e5e7eb}::ng-deep .document-sidebar-container .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content{border:none;color:var(--text-color);font-weight:400!important;background-color:var(--surface-0)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action{color:var(--text-color);font-weight:400!important;position:relative;padding:12px}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{position:absolute;right:0;top:16px;margin-right:7px;transform:rotate(90deg)!important;transition:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .company-action-wrapper:not(.p-disabled).p-highlight .p-panelmenu-header-content{margin:12px 0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content{background-color:transparent!important;border-radius:10px;padding:12px;border-bottom:0!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{transform:rotate(180deg)!important;transition:none!important;top:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link{background-color:var(--surface-0)!important;color:var(--text-color);padding:12px 6px!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);box-shadow:none!important;background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem.p-focus>.p-menuitem-content{background-color:#44486d1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:1px solid rgba(68,72,109,.1)!important;border-top:0!important;border-bottom-left-radius:10px;border-bottom-right-radius:10px}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator{border-top:1px solid rgba(68,72,109,.1)!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}\n"] }]
|
|
4680
4762
|
}], ctorParameters: () => [{ type: DocumentStore }, { type: DocumentQuery }, { type: DocumentMenuService }, { type: DocumentHelperService }], propDecorators: { catagories: [{
|
|
4681
4763
|
type: Input
|
|
4682
4764
|
}], applicationNumber: [{
|
|
@@ -4740,6 +4822,15 @@ class DocumentContainerComponent {
|
|
|
4740
4822
|
* @type {Subscription}
|
|
4741
4823
|
*/
|
|
4742
4824
|
subscription = new Subscription();
|
|
4825
|
+
/**
|
|
4826
|
+
* Handles changes to input properties
|
|
4827
|
+
*/
|
|
4828
|
+
ngOnChanges(changes) {
|
|
4829
|
+
if (changes['contextId'] && !changes['contextId'].firstChange) {
|
|
4830
|
+
// When contextId changes, refetch all data for the new context
|
|
4831
|
+
this.refetchAllDataForNewContext();
|
|
4832
|
+
}
|
|
4833
|
+
}
|
|
4743
4834
|
/**
|
|
4744
4835
|
* Fetches the folder and document data on initialization.
|
|
4745
4836
|
* @returns {void}
|
|
@@ -4831,6 +4922,22 @@ class DocumentContainerComponent {
|
|
|
4831
4922
|
});
|
|
4832
4923
|
this.subscription.add(categoriesSubscription);
|
|
4833
4924
|
}
|
|
4925
|
+
/**
|
|
4926
|
+
* Refetches all data when contextId changes
|
|
4927
|
+
*/
|
|
4928
|
+
refetchAllDataForNewContext() {
|
|
4929
|
+
if (this.contextId && this.contextId !== SHARED.EMPTY) {
|
|
4930
|
+
// Clear current state
|
|
4931
|
+
this.documentStore.clearSelectionState();
|
|
4932
|
+
this.documentStore.clearDocumentViewerState();
|
|
4933
|
+
// Refetch all data for the new context
|
|
4934
|
+
this.fetchDocumentCatagories();
|
|
4935
|
+
this.fetchUserListWithFilters();
|
|
4936
|
+
this.fetchStatusData();
|
|
4937
|
+
// Reinitialize the selection watcher with the new contextId
|
|
4938
|
+
this.documentHelperService.initializeSelectionWatcherWithInitialLoad(this.contextId);
|
|
4939
|
+
}
|
|
4940
|
+
}
|
|
4834
4941
|
/**
|
|
4835
4942
|
* Sets up subscription to listen for filtered document responses
|
|
4836
4943
|
*/
|
|
@@ -4845,13 +4952,25 @@ class DocumentContainerComponent {
|
|
|
4845
4952
|
}));
|
|
4846
4953
|
}
|
|
4847
4954
|
/**
|
|
4848
|
-
* Unsubscribe subscription on destroy of component .
|
|
4955
|
+
* Unsubscribe subscription on destroy of component and clean up state.
|
|
4849
4956
|
*/
|
|
4850
4957
|
ngOnDestroy() {
|
|
4851
|
-
|
|
4958
|
+
// Unsubscribe from all subscriptions to prevent memory leaks
|
|
4959
|
+
if (this.subscription) {
|
|
4960
|
+
this.subscription.unsubscribe();
|
|
4961
|
+
}
|
|
4962
|
+
// Clean up any state that might have been set during component lifecycle
|
|
4963
|
+
this.documentStore.clearSelectionState();
|
|
4964
|
+
this.documentStore.clearDocumentViewerState();
|
|
4965
|
+
// Clear any cached data
|
|
4966
|
+
this.catagories = [];
|
|
4967
|
+
this.userList = [];
|
|
4968
|
+
this.statusData = [];
|
|
4969
|
+
this.documentListResponse = null;
|
|
4970
|
+
this.applicationNumber = '';
|
|
4852
4971
|
}
|
|
4853
4972
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContainerComponent, deps: [{ token: DocumentStore }, { token: DocumentService }, { token: DocumentQuery }, { token: DocumentHttpService }, { token: DocumentHelperService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4854
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentContainerComponent, isStandalone: false, selector: "lib-document-container", inputs: { contextId: "contextId" }, ngImport: i0, template: "<div class=\"grid m-0 h-full flex\">\r\n <div class=\"col-12 md:col-3 lg:col-3\">\r\n <lib-documents-menu [catagories]=\"catagories\" [applicationNumber]=\"applicationNumber\" [contextId]=\"contextId\"></lib-documents-menu>\r\n </div>\r\n <div class=\"col-12 md:col-9 lg:col-9 p-0 h-full\" [ngClass]=\"{'custom-scroll': true}\">\r\n <div>\r\n <lib-folder-container [contextId]=\"contextId\" [userList]=\"userList\" [statusData]=\"statusData\" [categories]=\"catagories\"></lib-folder-container>\r\n </div>\r\n <div >\r\n <lib-document-list [contextId]=\"contextId\" [documentListResponse]=\"documentListResponse\">\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n</div>", styles: [".custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: FolderContainerComponent, selector: "lib-folder-container", inputs: ["documentList", "folderList", "contextId", "userList", "statusData", "categories"] }, { kind: "component", type: DocumentListComponent, selector: "lib-document-list", inputs: ["contextId", "documentListResponse", "isUploadButtonVisible", "documentList", "status", "category", "searchKey"] }, { kind: "component", type: DocumentsMenuComponent, selector: "lib-documents-menu", inputs: ["catagories", "applicationNumber", "contextId"] }] });
|
|
4973
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentContainerComponent, isStandalone: false, selector: "lib-document-container", inputs: { contextId: "contextId" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"grid m-0 h-full flex\">\r\n <div class=\"col-12 md:col-3 lg:col-3\">\r\n <lib-documents-menu [catagories]=\"catagories\" [applicationNumber]=\"applicationNumber\" [contextId]=\"contextId\"></lib-documents-menu>\r\n </div>\r\n <div class=\"col-12 md:col-9 lg:col-9 p-0 h-full\" [ngClass]=\"{'custom-scroll': true}\">\r\n <div>\r\n <lib-folder-container [contextId]=\"contextId\" [userList]=\"userList\" [statusData]=\"statusData\" [categories]=\"catagories\"></lib-folder-container>\r\n </div>\r\n <div >\r\n <lib-document-list [contextId]=\"contextId\" [documentListResponse]=\"documentListResponse\">\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n</div>", styles: [".custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: FolderContainerComponent, selector: "lib-folder-container", inputs: ["documentList", "folderList", "contextId", "userList", "statusData", "categories"] }, { kind: "component", type: DocumentListComponent, selector: "lib-document-list", inputs: ["contextId", "documentListResponse", "isUploadButtonVisible", "documentList", "status", "category", "searchKey"] }, { kind: "component", type: DocumentsMenuComponent, selector: "lib-documents-menu", inputs: ["catagories", "applicationNumber", "contextId"] }] });
|
|
4855
4974
|
}
|
|
4856
4975
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContainerComponent, decorators: [{
|
|
4857
4976
|
type: Component,
|