cat-documents-ng 0.2.34 → 0.2.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/Shared/components/table-primary/table-primary.component.d.ts +11 -13
  2. package/Shared/components/table-primary/table-primary.model.d.ts +19 -0
  3. package/Shared/constant/ERROR.d.ts +1 -0
  4. package/Shared/constant/SHARED.d.ts +113 -0
  5. package/Shared/constant/URLS.d.ts +22 -0
  6. package/fesm2022/cat-documents-ng.mjs +1333 -678
  7. package/fesm2022/cat-documents-ng.mjs.map +1 -1
  8. package/lib/document/components/document-container/document-container.component.d.ts +36 -35
  9. package/lib/document/components/document-list/document-list.component.d.ts +53 -35
  10. package/lib/document/components/document-status/document-status.component.d.ts +9 -12
  11. package/lib/document/components/document-viewer/document-viewer.component.d.ts +6 -6
  12. package/lib/document/components/documents-menu/documents-menu.component.d.ts +33 -11
  13. package/lib/document/components/folder-container/folder-container.component.d.ts +23 -6
  14. package/lib/document/components/linked-document/linked-document.component.d.ts +5 -4
  15. package/lib/document/components/user-list/user-list.component.d.ts +19 -22
  16. package/lib/document/directives/document.directive.d.ts +2 -2
  17. package/lib/document/models/document-category.model.d.ts +19 -0
  18. package/lib/document/models/document-list-response.model.d.ts +25 -0
  19. package/lib/document/models/status-data.model.d.ts +27 -0
  20. package/lib/document/models/user-list.model.d.ts +8 -0
  21. package/lib/document/services/document-http.service.d.ts +28 -2
  22. package/lib/document/services/document-menu.service.d.ts +65 -0
  23. package/lib/document/services/document-table-builder.service.d.ts +21 -35
  24. package/lib/document/services/document.service.d.ts +29 -8
  25. package/lib/document/services/status-calculator.service.d.ts +20 -0
  26. package/lib/document/services/user-list.service.d.ts +36 -0
  27. package/lib/document/state/document.query.d.ts +52 -1
  28. package/lib/document/state/document.state.d.ts +9 -0
  29. package/lib/document/state/document.store.d.ts +9 -0
  30. package/package.json +1 -1
  31. package/lib/document/models/document-status.model.d.ts +0 -6
@@ -1,14 +1,14 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, EventEmitter, Component, Output, Input, ViewEncapsulation, ViewChild, Directive, NgModule, APP_INITIALIZER } from '@angular/core';
3
- import * as i4 from '@angular/common';
2
+ import { Injectable, EventEmitter, Output, Input, Component, ViewChild, ViewEncapsulation, Directive, NgModule, APP_INITIALIZER } from '@angular/core';
3
+ import * as i5 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
- import { firstValueFrom, tap, EMPTY, catchError, throwError, BehaviorSubject, combineLatest, Subscription } from 'rxjs';
5
+ import { firstValueFrom, tap, EMPTY, catchError, throwError, combineLatest, Subscription } from 'rxjs';
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
9
  import { HttpParams, HttpClientModule } from '@angular/common/http';
10
- import { trigger, state, style, transition, animate } from '@angular/animations';
11
10
  import { debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';
11
+ import { trigger, state, transition, style, animate } from '@angular/animations';
12
12
  import * as i3 from 'primeng/api';
13
13
  import { MessageService } from 'primeng/api';
14
14
  import * as i8 from 'primeng/button';
@@ -26,19 +26,19 @@ import * as i14 from 'primeng/inputtext';
26
26
  import { InputTextModule } from 'primeng/inputtext';
27
27
  import * as i2$1 from 'primeng/table';
28
28
  import { TableModule } from 'primeng/table';
29
- import * as i5 from 'primeng/ripple';
29
+ import * as i5$1 from 'primeng/ripple';
30
30
  import { RippleModule } from 'primeng/ripple';
31
31
  import * as i7 from 'primeng/fileupload';
32
32
  import { FileUploadModule } from 'primeng/fileupload';
33
33
  import * as i8$1 from 'primeng/progressbar';
34
34
  import { ProgressBarModule } from 'primeng/progressbar';
35
- import * as i4$1 from 'ng2-pdf-viewer';
35
+ import * as i4 from 'ng2-pdf-viewer';
36
36
  import { PdfViewerModule } from 'ng2-pdf-viewer';
37
- import * as i5$1 from 'primeng/badge';
37
+ import * as i7$1 from 'primeng/badge';
38
38
  import { BadgeModule } from 'primeng/badge';
39
- import * as i6 from 'primeng/menu';
39
+ import * as i8$2 from 'primeng/menu';
40
40
  import { MenuModule } from 'primeng/menu';
41
- import * as i7$1 from 'primeng/card';
41
+ import * as i9$1 from 'primeng/card';
42
42
  import { CardModule } from 'primeng/card';
43
43
  import { AccordionModule } from 'primeng/accordion';
44
44
  import { ListboxModule } from 'primeng/listbox';
@@ -53,6 +53,34 @@ import { PanelMenuModule } from 'primeng/panelmenu';
53
53
  * These constants are related to document statuses and other shared data.
54
54
  */
55
55
  class SHARED {
56
+ /**
57
+ * Represents the info.
58
+ */
59
+ static VISIBLE = 'visible';
60
+ /**
61
+ * Represents the info.
62
+ */
63
+ static HIDDEN = 'hidden';
64
+ /**
65
+ * Represents the info.
66
+ */
67
+ static APPLICATION_DOCS = 'Application Docs';
68
+ /**
69
+ * Represents the info.
70
+ */
71
+ static INFO = 'info';
72
+ /**
73
+ * Represents the success.
74
+ */
75
+ static SUCCESS = 'success';
76
+ /**
77
+ * Represents the warning.
78
+ */
79
+ static WARNING = 'warning';
80
+ /**
81
+ * Represents the warning.
82
+ */
83
+ static DANGER = 'danger';
56
84
  /**
57
85
  * Represents the stores userData.
58
86
  */
@@ -113,6 +141,24 @@ class SHARED {
113
141
  * @type {string}
114
142
  */
115
143
  static FILE = 'file';
144
+ /**
145
+ * Query parameter for menu item filter.
146
+ * @static
147
+ * @type {string}
148
+ */
149
+ static MENU_ITEM_PARAM = 'menuItem';
150
+ /**
151
+ * Query parameter for user ID filter.
152
+ * @static
153
+ * @type {string}
154
+ */
155
+ static USER_ID_PARAM = 'userId';
156
+ /**
157
+ * Query parameter for status filter.
158
+ * @static
159
+ * @type {string}
160
+ */
161
+ static STATUS_PARAM = 'status';
116
162
  /**
117
163
  * Represents the array of file size units ('B', 'KB', 'MB') used for file size formatting.
118
164
  * @static
@@ -155,6 +201,12 @@ class SHARED {
155
201
  * @type {string}
156
202
  */
157
203
  static CONTEXT_ID = 'contextId';
204
+ /**
205
+ * Represent contextId.
206
+ * @static
207
+ * @type {string}
208
+ */
209
+ static CATEGORY = 'category';
158
210
  /**
159
211
  * Represent fileSize.
160
212
  * @static
@@ -283,6 +335,99 @@ class SHARED {
283
335
  ]
284
336
  }
285
337
  ];
338
+ static APPLICATION = 'Application';
339
+ static APPLICANTS = 'Applicants';
340
+ static EMPTY_SPACE = ' ';
341
+ static COLORS = ['orange', 'blue', 'green', 'grey', 'purple'];
342
+ static COLOR_MAP = {
343
+ 'orange': '#f97316',
344
+ 'blue': '#3b82f6',
345
+ 'green': '#10b981',
346
+ 'grey': '#6b7280',
347
+ 'purple': '#8b5cf6'
348
+ };
349
+ static DEFAULT_COLOR = '#3b82f6';
350
+ static STATUS_WITH_DASH = 'status-';
351
+ static ICON_WITH_DASH = 'icon-';
352
+ static SEARCH_KEY = 'searchKey';
353
+ static APPROVED = 'approved';
354
+ static UPLOADED = 'uploaded';
355
+ static PENDING = 'Pending';
356
+ static DOT = '.';
357
+ static PDF = 'PDF';
358
+ static PENDING_STATUS = 'pending';
359
+ // File extension constants
360
+ static JPG = 'JPG';
361
+ static PNG = 'PNG';
362
+ static XLSX = 'XLSX';
363
+ // Status constants
364
+ static APPROVED_STATUS = 'approved';
365
+ static ALERT_STATUS = 'alert';
366
+ static UPLOADED_STATUS = 'uploaded';
367
+ static REVIEWING_STATUS = 'reviewing';
368
+ static REJECTED_STATUS = 'rejected';
369
+ // Status class constants
370
+ static STATUS_PENDING_CLASS = 'status-pending';
371
+ static STATUS_APPROVED_CLASS = 'status-approved';
372
+ static STATUS_ALERT_CLASS = 'status-alert';
373
+ static STATUS_UPLOADED_CLASS = 'status-uploaded';
374
+ static STATUS_REVIEWING_CLASS = 'status-reviewing';
375
+ static STATUS_REJECTED_CLASS = 'status-rejected';
376
+ // Icon constants
377
+ static ICON_CHECK = 'pi pi-check';
378
+ static ICON_EXCLAMATION_TRIANGLE = 'pi pi-exclamation-triangle';
379
+ static ICON_CLOUD_UPLOAD = 'pi pi-cloud-upload';
380
+ static ICON_EYE = 'pi pi-eye';
381
+ static ICON_TIMES = 'pi pi-times';
382
+ static ICON_CLOCK = 'pi pi-clock';
383
+ // File type icons
384
+ static ICON_FILE_PDF = 'pi pi-file-pdf';
385
+ static ICON_IMAGE = 'pi pi-image';
386
+ static ICON_FILE_EXCEL = 'pi pi-file-excel';
387
+ static ICON_FILE = 'pi pi-file';
388
+ static ICON_DELETE = 'ri-delete-bin-6-line';
389
+ // Cell type constants
390
+ static CELL_TYPE_DOCUMENT = 'document';
391
+ static CELL_TYPE_STATUS = 'status';
392
+ static CELL_TYPE_ACTIONS = 'actions';
393
+ static CELL_TYPE_TEXT = 'text';
394
+ /**
395
+ * Document table columns configuration
396
+ * @static
397
+ * @type {Array<{field: string, header: string, type: 'text' | 'status' | 'document' | 'actions', width: string}>}
398
+ */
399
+ static DOCUMENT_TABLE_COLUMNS = [
400
+ {
401
+ field: 'docName',
402
+ header: 'Document',
403
+ type: 'document',
404
+ width: '35%'
405
+ },
406
+ {
407
+ field: 'status',
408
+ header: 'Status',
409
+ type: 'status',
410
+ width: '15%'
411
+ },
412
+ {
413
+ field: 'ownerName',
414
+ header: 'Owner',
415
+ type: 'text',
416
+ width: '20%'
417
+ },
418
+ {
419
+ field: 'uploadedOn',
420
+ header: 'Uploaded',
421
+ type: 'text',
422
+ width: '15%'
423
+ },
424
+ {
425
+ field: 'actions',
426
+ header: 'Actions',
427
+ type: 'actions',
428
+ width: '15%'
429
+ }
430
+ ];
286
431
  }
287
432
  /**
288
433
  * `DUMMYDOCUMENTLIST` is a mock list of document objects used for testing and development purposes.
@@ -457,9 +602,9 @@ const DUMMY_DOCUMENT_SECTIONS = [
457
602
  approvedDocument: 1,
458
603
  list: [
459
604
  {
460
- documentName: "passport_emma_wilson_2025.pdf",
605
+ documentName: "passport_emilia_wilson_2025.pdf",
461
606
  documentType: "Passport",
462
- documentUrl: "https://example.com/documents/passport_emma_wilson_2025.pdf",
607
+ documentUrl: "https://example.com/documents/passport_emilia_wilson_2025.pdf",
463
608
  status: "Pending",
464
609
  applicantName: "Charlotte Anderson",
465
610
  uploadedTime: "28 May 2025"
@@ -508,139 +653,62 @@ const DUMMY_DOCUMENT_SECTIONS = [
508
653
  },
509
654
  {
510
655
  header: "Income",
511
- description: "Employment and income verification documents",
656
+ description: "Personal Income documents required for verification",
512
657
  pendingDocument: 1,
513
658
  approvedDocument: 1,
514
659
  list: [
515
660
  {
516
- documentName: "latest_payslip_charlotte_2025.pdf",
517
- documentType: "Latest Payslip",
518
- documentUrl: "https://example.com/documents/latest_payslip_charlotte_2025.pdf",
661
+ documentName: "passport_emilia_wilson_2025.pdf",
662
+ documentType: "Passport",
663
+ documentUrl: "https://example.com/documents/passport_emilia_wilson_2025.pdf",
519
664
  status: "Pending",
520
665
  applicantName: "Charlotte Anderson",
521
- uploadedTime: "29 May 2025"
522
- },
523
- {
524
- documentName: "p60_document_sophia_2025.pdf",
525
- documentType: "P60 Document",
526
- documentUrl: "https://example.com/documents/p60_document_sophia_2025.pdf",
527
- status: "Alert",
528
- applicantName: "Sophia Reynolds",
529
- uploadedTime: "26 May 2025"
666
+ uploadedTime: "28 May 2025"
530
667
  },
531
668
  {
532
- documentName: "employer_reference_benjamin_2025.pdf",
533
- documentType: "Employer Reference",
534
- documentUrl: "https://example.com/documents/employer_reference_benjamin_2025.pdf",
669
+ documentName: "driving_license_benjamin_mitchell_2025.jpg",
670
+ documentType: "Driving License",
671
+ documentUrl: "https://example.com/documents/driving_license_benjamin_mitchell_2025.jpg",
535
672
  status: "Approved",
536
673
  applicantName: "Benjamin Mitchell",
537
674
  uploadedTime: "27 May 2025"
538
- }
539
- ]
540
- },
541
- {
542
- header: "Affordability",
543
- description: "Financial assessment and planning documents",
544
- pendingDocument: 1,
545
- approvedDocument: 0,
546
- list: [
547
- {
548
- documentName: "bank_statements_charlotte_2025.pdf",
549
- documentType: "Bank Statements",
550
- documentUrl: "https://example.com/documents/bank_statements_charlotte_2025.pdf",
551
- status: "Pending",
552
- applicantName: "Charlotte Anderson",
553
- uploadedTime: "28 May 2025"
554
675
  },
555
676
  {
556
- documentName: "budget_planner_sophia_2025.xlsx",
557
- documentType: "Budget Planner",
558
- documentUrl: "https://example.com/documents/budget_planner_sophia_2025.xlsx",
677
+ documentName: "british_gas_bill_may_2025.pdf",
678
+ documentType: "Utility Bill",
679
+ documentUrl: "https://example.com/documents/british_gas_bill_may_2025.pdf",
559
680
  status: "Alert",
560
681
  applicantName: "Sophia Reynolds",
561
- uploadedTime: "25 May 2025"
562
- }
563
- ]
564
- },
565
- {
566
- header: "Credit Conduct",
567
- description: "Credit history and mortgage documentation",
568
- pendingDocument: 1,
569
- approvedDocument: 0,
570
- list: [
682
+ uploadedTime: "26 May 2025"
683
+ },
571
684
  {
572
- documentName: "bank_statements_charlotte_2025.pdf",
573
- documentType: "Bank Statements",
574
- documentUrl: "https://example.com/documents/bank_statements_charlotte_2025.pdf",
575
- status: "Pending",
576
- applicantName: "Charlotte Anderson",
577
- uploadedTime: "28 May 2025"
685
+ documentName: "council_tax_oliver_thompson_2025_2026.pdf",
686
+ documentType: "Council Tax Bill",
687
+ documentUrl: "https://example.com/documents/council_tax_oliver_thompson_2025_2026.pdf",
688
+ status: "Uploaded",
689
+ applicantName: "Oliver Thompson",
690
+ uploadedTime: "30 May 2025"
578
691
  },
579
692
  {
580
- documentName: "budget_planner_sophia_2025.xlsx",
581
- documentType: "Budget Planner",
582
- documentUrl: "https://example.com/documents/budget_planner_sophia_2025.xlsx",
583
- status: "Alert",
584
- applicantName: "Sophia Reynolds",
585
- uploadedTime: "25 May 2025"
586
- }
587
- ]
588
- },
589
- {
590
- header: "KYC",
591
- description: "Know Your Customer verification documents",
592
- pendingDocument: 1,
593
- approvedDocument: 0,
594
- list: [
693
+ documentName: "certified_id_oliver_thompson_2025.pdf",
694
+ documentType: "Certified ID",
695
+ documentUrl: "https://example.com/documents/certified_id_oliver_thompson_2025.pdf",
696
+ status: "Reviewing",
697
+ applicantName: "Oliver Thompson",
698
+ uploadedTime: "02 Jun 2025"
699
+ },
595
700
  {
596
- documentName: "kyc_checklist_charlotte_2025.pdf",
597
- documentType: "KYC Checklist",
598
- documentUrl: "https://example.com/documents/kyc_checklist_charlotte_2025.pdf",
599
- status: "Pending",
600
- applicantName: "Charlotte Anderson",
601
- uploadedTime: "28 May 2025"
701
+ documentName: "proof_of_address_oliver_thompson_2025.pdf",
702
+ documentType: "Proof of Address",
703
+ documentUrl: "https://example.com/documents/proof_of_address_oliver_thompson_2025.pdf",
704
+ status: "Rejected",
705
+ applicantName: "Oliver Thompson",
706
+ uploadedTime: "02 Jun 2025"
602
707
  }
603
708
  ]
604
709
  }
605
710
  ];
606
711
 
607
- /**
608
- * A utility class containing common error messages.
609
- * @class ERRORS
610
- */
611
- class ERRORS {
612
- /**
613
- * Error message for invalid recipient.
614
- * @static
615
- * @type {string}
616
- */
617
- static INVALID_RECIPIENT = "Invalid recipient: The recipient cannot be empty.";
618
- /**
619
- * Error message for invalid document.
620
- * @static
621
- * @type {string}
622
- */
623
- static ERROR_FETCHING_DOCUMENTS = "Error fetching documents:";
624
- /**
625
- * Error message for invalid document.
626
- * @static
627
- * @type {string}
628
- */
629
- static ERROR_FETCHING_FOLDERS = "Error fetching folders:";
630
- /**
631
- * Error message for invalid document.
632
- * @static
633
- * @type {string}
634
- */
635
- static ERROR_ALLDOCUMENT_MISSING = "allDocumentTypes is missing in the response:";
636
- /**
637
- * Error message for invalid document.
638
- * @static
639
- * @type {string}
640
- */
641
- static ERROR_DOCUMENT_TYPES = "Error fetching document types:";
642
- }
643
-
644
712
  /**
645
713
  * Creates the initial state for the `DocumentState` store.
646
714
  * This function provides default values for all properties in the `DocumentState` interface,
@@ -660,12 +728,15 @@ function createInitialState() {
660
728
  folders: [],
661
729
  messages: [],
662
730
  documentList: [],
663
- // Initialize new selection properties
731
+ documentCategories: [],
664
732
  selectedMenuItem: null,
665
733
  selectedUserId: null,
666
734
  selectedStatus: null,
667
- // Initialize user list visibility to true
668
- showUserList: true
735
+ showUserList: true,
736
+ currentDocument: null,
737
+ userList: [],
738
+ statusData: [],
739
+ documentListResponse: null
669
740
  };
670
741
  }
671
742
 
@@ -704,6 +775,9 @@ let DocumentStore = class DocumentStore extends EntityStore {
704
775
  setDocumentList(documents) {
705
776
  this.update({ documents: documents });
706
777
  }
778
+ setDocumentCategories(categories) {
779
+ this.update({ documentCategories: categories });
780
+ }
707
781
  // New methods for selection state management
708
782
  setSelectedMenuItem(menuItem) {
709
783
  this.update({ selectedMenuItem: menuItem });
@@ -735,13 +809,29 @@ let DocumentStore = class DocumentStore extends EntityStore {
735
809
  setShowUserList(show) {
736
810
  this.update({ showUserList: show });
737
811
  }
738
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
739
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentStore, providedIn: 'root' });
812
+ // Method to set the current document
813
+ setCurrentDocument(document) {
814
+ this.update({ currentDocument: document });
815
+ }
816
+ // Method to set the user list
817
+ setUserList(userList) {
818
+ this.update({ userList: userList });
819
+ }
820
+ // Method to set the status data
821
+ setStatusData(statusData) {
822
+ this.update({ statusData: statusData });
823
+ }
824
+ // Method to set the document list response
825
+ setDocumentListResponse(response) {
826
+ this.update({ documentListResponse: response });
827
+ }
828
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
829
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentStore, providedIn: 'root' });
740
830
  };
741
831
  DocumentStore = __decorate([
742
832
  StoreConfig({ name: 'documents' })
743
833
  ], DocumentStore);
744
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentStore, decorators: [{
834
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentStore, decorators: [{
745
835
  type: Injectable,
746
836
  args: [{ providedIn: 'root' }]
747
837
  }], ctorParameters: () => [] });
@@ -767,6 +857,13 @@ class URLS {
767
857
  * @type {string}
768
858
  */
769
859
  static DOCUMENT_UPLOAD = "Documents";
860
+ /**
861
+ * The URL endpoint for document uploads.
862
+ * Used to send documents to the server for storage or processing.
863
+ * @static
864
+ * @type {string}
865
+ */
866
+ static DOCUMENTS_CATAGORIES = "documents/getAllCategoriesByApplicationId";
770
867
  /**
771
868
  * The query parameter to pass a context ID in API requests.
772
869
  * Used to specify the context for certain API calls, such as filtering or scoping the request.
@@ -798,6 +895,19 @@ class URLS {
798
895
  * @type {string}
799
896
  */
800
897
  static PARENT_DOCUMENT_TYPE_ID = "parentDocumentType?parentDocumentTypeId=";
898
+ /**
899
+ * The query parameter to pass a document ID in API requests.
900
+ * @static
901
+ * @type {string}
902
+ */
903
+ static USERLIST = "documents/getContextIdListByApplicationId/";
904
+ /**
905
+ * The URL endpoint for getting document status count by context ID.
906
+ * Used to fetch status data with applicationId, contextId, and category parameters.
907
+ * @static
908
+ * @type {string}
909
+ */
910
+ static STATUS_DOCUMENT_COUNT = "documents/getStatusDocumentCountByContextId/";
801
911
  /**
802
912
  * The query parameter to pass a context ID in API requests.
803
913
  * Used to specify the context for certain API calls, such as filtering or scoping the request.
@@ -805,6 +915,8 @@ class URLS {
805
915
  * @type {string}
806
916
  */
807
917
  static CONTEXT_ID = "&contextId=";
918
+ static GETALL = "documents/getAllByContextId";
919
+ static DOCUMENT_LIST = "list";
808
920
  }
809
921
 
810
922
  /**
@@ -868,10 +980,10 @@ class AppConfigService {
868
980
  get visibilityOptions() {
869
981
  return this.appConfig?.visibilityOption;
870
982
  }
871
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AppConfigService, deps: [{ token: i2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
872
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AppConfigService, providedIn: 'root' });
983
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AppConfigService, deps: [{ token: i2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
984
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AppConfigService, providedIn: 'root' });
873
985
  }
874
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AppConfigService, decorators: [{
986
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AppConfigService, decorators: [{
875
987
  type: Injectable,
876
988
  args: [{
877
989
  providedIn: 'root'
@@ -886,7 +998,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
886
998
  * @param {DocumentStore} documentStore - The store that manages the state of documents.
887
999
  * @param {HttpClient} http - The Angular HTTP client for making API requests.
888
1000
  */
889
- let DocumentService$1 = class DocumentService {
1001
+ class DocumentService {
890
1002
  documentStore;
891
1003
  http;
892
1004
  appConfigService;
@@ -949,10 +1061,10 @@ let DocumentService$1 = class DocumentService {
949
1061
  delete(id) {
950
1062
  return this.http.delete(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${id}`).pipe(tap(() => this.documentStore.remove(id)));
951
1063
  }
952
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentService, deps: [{ token: DocumentStore }, { token: i2.HttpClient }, { token: AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
953
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentService, providedIn: 'root' });
954
- };
955
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentService$1, decorators: [{
1064
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentService, deps: [{ token: DocumentStore }, { token: i2.HttpClient }, { token: AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
1065
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentService, providedIn: 'root' });
1066
+ }
1067
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentService, decorators: [{
956
1068
  type: Injectable,
957
1069
  args: [{ providedIn: 'root' }]
958
1070
  }], ctorParameters: () => [{ type: DocumentStore }, { type: i2.HttpClient }, { type: AppConfigService }] });
@@ -998,10 +1110,17 @@ class DocumentQuery extends QueryEntity {
998
1110
  selectDocumets() {
999
1111
  return this.select((state) => state.documentList);
1000
1112
  }
1113
+ /**
1114
+ * Selects the document categories.
1115
+ * @returns {Observable<DocumentCategory[]>} Observable that emits the document categories.
1116
+ */
1117
+ selectDocumentCategories() {
1118
+ return this.select((state) => state.documentCategories);
1119
+ }
1001
1120
  // New query methods for selection state
1002
1121
  /**
1003
1122
  * Selects the currently selected menu item.
1004
- * @returns {Observable<string | null>} Observable that emits the currently selected menu item.
1123
+ * @returns {Observable<string | null>} Observable that emits the currently selected menu item _id (not the label).
1005
1124
  */
1006
1125
  selectSelectedMenuItem() {
1007
1126
  return this.select((state) => state.selectedMenuItem);
@@ -1023,6 +1142,7 @@ class DocumentQuery extends QueryEntity {
1023
1142
  /**
1024
1143
  * Selects all selection state properties (menu item, user ID, status).
1025
1144
  * @returns {Observable<{menuItem: string | null, userId: string | null, status: string | null}>} Observable that emits the current selection state.
1145
+ * Note: menuItem is the _id of the selected menu item, not the label.
1026
1146
  */
1027
1147
  selectSelectionState() {
1028
1148
  return this.select((state) => ({
@@ -1034,6 +1154,7 @@ class DocumentQuery extends QueryEntity {
1034
1154
  /**
1035
1155
  * Gets the current selection state values (synchronous).
1036
1156
  * @returns {Object} The current selection state values.
1157
+ * Note: menuItem is the _id of the selected menu item, not the label.
1037
1158
  */
1038
1159
  getSelectionState() {
1039
1160
  const state = this.getValue();
@@ -1057,10 +1178,66 @@ class DocumentQuery extends QueryEntity {
1057
1178
  getShowUserList() {
1058
1179
  return this.getValue().showUserList;
1059
1180
  }
1060
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentQuery, deps: [{ token: DocumentStore }], target: i0.ɵɵFactoryTarget.Injectable });
1061
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentQuery, providedIn: 'root' });
1181
+ /**
1182
+ * Selects the current document.
1183
+ * @returns {Observable<DocumentModel | null>} Observable that emits the current document.
1184
+ */
1185
+ selectCurrentDocument() {
1186
+ return this.select((state) => state.currentDocument);
1187
+ }
1188
+ /**
1189
+ * Gets the current document value (synchronous).
1190
+ * @returns {DocumentModel | null} The current document.
1191
+ */
1192
+ getCurrentDocument() {
1193
+ return this.getValue().currentDocument;
1194
+ }
1195
+ /**
1196
+ * Selects the user list.
1197
+ * @returns {Observable<UserListModel[]>} Observable that emits the user list.
1198
+ */
1199
+ selectUserList() {
1200
+ return this.select((state) => state.userList);
1201
+ }
1202
+ /**
1203
+ * Gets the current user list value (synchronous).
1204
+ * @returns {UserListModel[]} The current user list.
1205
+ */
1206
+ getUserList() {
1207
+ return this.getValue().userList;
1208
+ }
1209
+ /**
1210
+ * Selects the status data.
1211
+ * @returns {Observable<StatusDataModel[]>} Observable that emits the status data.
1212
+ */
1213
+ selectStatusData() {
1214
+ return this.select((state) => state.statusData);
1215
+ }
1216
+ /**
1217
+ * Gets the current status data value (synchronous).
1218
+ * @returns {StatusDataModel[]} The current status data.
1219
+ */
1220
+ getStatusData() {
1221
+ return this.getValue().statusData;
1222
+ }
1223
+ /**
1224
+ * Selects the document list response.
1225
+ * @returns {Observable<DocumentListResponse[] | null>} Observable that emits the document list response.
1226
+ */
1227
+ selectDocumentListResponse() {
1228
+ return this.select((state) => state.documentListResponse);
1229
+ }
1230
+ /**
1231
+ * Gets the current document list response value (synchronous).
1232
+ * @returns {DocumentListResponse[] | null} The current document list response.
1233
+ */
1234
+ getDocumentListResponse() {
1235
+ return this.getValue().documentListResponse;
1236
+ }
1237
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentQuery, deps: [{ token: DocumentStore }], target: i0.ɵɵFactoryTarget.Injectable });
1238
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentQuery, providedIn: 'root' });
1062
1239
  }
1063
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentQuery, decorators: [{
1240
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentQuery, decorators: [{
1064
1241
  type: Injectable,
1065
1242
  args: [{ providedIn: 'root' }]
1066
1243
  }], ctorParameters: () => [{ type: DocumentStore }] });
@@ -1108,6 +1285,21 @@ class DocumentHttpService {
1108
1285
  return throwError(() => new Error(error));
1109
1286
  }));
1110
1287
  }
1288
+ /**
1289
+ * Fetches a document catagories by its path name.
1290
+ * Includes error handling for failed API requests.
1291
+ * @param {string} contextId - The context ID to fetch the document.
1292
+ * @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
1293
+ */
1294
+ getDocumentCatagories(contextId) {
1295
+ if (!contextId)
1296
+ return EMPTY;
1297
+ return this.http.get(`${this.apiUrl}${URLS.DOCUMENTS_CATAGORIES}/${contextId}`).pipe(tap((categories) => {
1298
+ this.documentStore.setDocumentCategories(categories);
1299
+ }), catchError((error) => {
1300
+ return throwError(() => new Error(error));
1301
+ }));
1302
+ }
1111
1303
  /**
1112
1304
  * Fetches a document by its path name and transforms the response for dropdown options.
1113
1305
  * Includes error handling for failed API requests.
@@ -1159,26 +1351,69 @@ class DocumentHttpService {
1159
1351
  }));
1160
1352
  }
1161
1353
  /**
1162
- * Fetches documents based on selection criteria (menu item, user ID, and status).
1354
+ * Fetches a userlist by its path name.
1355
+ * @param {string} contextId - The document ID to fetch the document.
1356
+ * @returns {Observable<UserListModel[]>} Observable that emits the user list data.
1357
+ */
1358
+ getUserListByContextId(contextId) {
1359
+ if (!contextId)
1360
+ return EMPTY;
1361
+ return this.http.get(`${this.apiUrl}${URLS.USERLIST}${contextId}`).pipe(tap((userList) => {
1362
+ this.documentStore.setUserList(userList);
1363
+ }), catchError((error) => {
1364
+ return throwError(() => new Error(error));
1365
+ }));
1366
+ }
1367
+ /**
1368
+ * Fetches document status count data by application ID with optional context ID and category parameters.
1369
+ * @param {string} applicationId - The application ID to fetch status data.
1370
+ * @param {string | null} contextId - The context ID (applicant ID) to filter by. If null, uses applicationId.
1371
+ * @param {string | null} categoryId - The category ID to filter by.
1372
+ * @returns {Observable<StatusDataModel[]>} Observable that emits the status data.
1373
+ */
1374
+ getStatusDocumentCount(applicationId, contextId = null, categoryId = null) {
1375
+ if (!applicationId)
1376
+ return EMPTY;
1377
+ let url = `${this.apiUrl}${URLS.STATUS_DOCUMENT_COUNT}${applicationId}`;
1378
+ let params = new HttpParams();
1379
+ const contextParam = contextId || null;
1380
+ if (contextParam) {
1381
+ params = params.set(SHARED.CONTEXT_ID, contextParam);
1382
+ }
1383
+ if (categoryId) {
1384
+ params = params.set(SHARED.CATEGORY, categoryId);
1385
+ }
1386
+ return this.http.get(url, { params }).pipe(tap((statusData) => {
1387
+ this.documentStore.setStatusData(statusData);
1388
+ }), catchError((error) => {
1389
+ return throwError(() => new Error(error));
1390
+ }));
1391
+ }
1392
+ /**
1393
+ * Fetches documents based on selection criteria (menu item, user ID, status, and search key).
1163
1394
  * This method sends an HTTP GET request with query parameters for the selected filters.
1395
+ * @param {string} contextId - The context ID (applicationId or applicantId).
1164
1396
  * @param {string | null} menuItem - The selected menu item filter.
1165
1397
  * @param {string | null} userId - The selected user ID filter.
1166
1398
  * @param {string | null} status - The selected status filter.
1399
+ * @param {string | null} searchKey - The search key filter.
1167
1400
  * @returns {Observable<any>} An observable that emits the filtered document data.
1168
1401
  */
1169
- getDocumentsBySelection(menuItem, userId, status) {
1402
+ getDocumentsBySelection(contextId, menuItem, userId, status, searchKey = null) {
1170
1403
  let params = new HttpParams();
1171
1404
  if (menuItem) {
1172
- params = params.set('menuItem', menuItem);
1405
+ params = params.set(SHARED.CATEGORY, menuItem);
1173
1406
  }
1174
1407
  if (userId) {
1175
- params = params.set('userId', userId);
1408
+ params = params.set(SHARED.CONTEXT_ID, userId);
1176
1409
  }
1177
1410
  if (status) {
1178
- params = params.set('status', status);
1411
+ params = params.set(SHARED.STATUS_PARAM, status);
1179
1412
  }
1180
- return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/filter`, { params }).pipe(tap((response) => {
1181
- // Update the store with the filtered results
1413
+ if (searchKey) {
1414
+ params = params.set(SHARED.SEARCH_KEY, searchKey);
1415
+ }
1416
+ return this.http.get(`${this.apiUrl}${URLS.GETALL}/${contextId}`, { params }).pipe(tap((response) => {
1182
1417
  if (response.documents) {
1183
1418
  this.documentStore.setDocumentList(response.documents);
1184
1419
  }
@@ -1186,10 +1421,10 @@ class DocumentHttpService {
1186
1421
  return throwError(() => new Error(error));
1187
1422
  }));
1188
1423
  }
1189
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentHttpService, deps: [{ token: DocumentStore }, { token: i2.HttpClient }, { token: AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
1190
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentHttpService, providedIn: 'root' });
1424
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHttpService, deps: [{ token: DocumentStore }, { token: i2.HttpClient }, { token: AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
1425
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHttpService, providedIn: 'root' });
1191
1426
  }
1192
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentHttpService, decorators: [{
1427
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHttpService, decorators: [{
1193
1428
  type: Injectable,
1194
1429
  args: [{
1195
1430
  providedIn: 'root'
@@ -1199,60 +1434,80 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
1199
1434
  /**
1200
1435
  * Service to manage the document data and selection state
1201
1436
  */
1202
- class DocumentService {
1437
+ class DocumentHelperService {
1203
1438
  documentStore;
1204
1439
  documentQuery;
1205
1440
  documentHttpService;
1206
- documentSubject$ = new BehaviorSubject(null);
1207
1441
  constructor(documentStore, documentQuery, documentHttpService) {
1208
1442
  this.documentStore = documentStore;
1209
1443
  this.documentQuery = documentQuery;
1210
1444
  this.documentHttpService = documentHttpService;
1211
- // Automatically call API when selection state changes
1212
- this.initializeSelectionWatcher();
1445
+ // Note: initializeSelectionWatcher now requires contextId
1446
+ // This should be called from the component that has access to contextId
1213
1447
  }
1214
1448
  /**
1215
1449
  * Initialize watcher for selection state changes
1450
+ * @param contextId - The context ID to use for API calls
1216
1451
  */
1217
- initializeSelectionWatcher() {
1218
- // Combine all selection observables and watch for changes
1452
+ initializeSelectionWatcher(contextId) {
1219
1453
  combineLatest([
1220
1454
  this.documentQuery.selectSelectedMenuItem(),
1221
1455
  this.documentQuery.selectSelectedUserId(),
1222
1456
  this.documentQuery.selectSelectedStatus()
1223
- ]).pipe(debounceTime(300), // Debounce to avoid too many API calls
1224
- distinctUntilChanged((prev, curr) => prev[0] === curr[0] && prev[1] === curr[1] && prev[2] === curr[2]), switchMap(([menuItem, userId, status]) => {
1225
- // Only call API if at least one selection is made
1226
- if (menuItem || userId || status) {
1227
- return this.documentHttpService.getDocumentsBySelection(menuItem, userId, status);
1228
- }
1229
- return [];
1457
+ ]).pipe(debounceTime(300), distinctUntilChanged((prev, curr) => {
1458
+ const isSame = prev[0] === curr[0] && prev[1] === curr[1] && prev[2] === curr[2];
1459
+ return isSame;
1460
+ }), switchMap(([menuItem, userId, status]) => {
1461
+ return this.documentHttpService.getDocumentsBySelection(contextId, menuItem, userId, status);
1230
1462
  })).subscribe({
1231
1463
  next: (response) => {
1232
- console.log('API called with selection:', response);
1464
+ const currentState = this.documentQuery.getSelectionState();
1465
+ this.documentStore.setDocumentListResponse(response);
1233
1466
  },
1234
1467
  error: (error) => {
1235
1468
  console.error('Error calling API with selection:', error);
1236
1469
  }
1237
1470
  });
1238
1471
  }
1472
+ /**
1473
+ * Initialize watcher for selection state changes with initial load
1474
+ * @param contextId - The context ID to use for API calls
1475
+ */
1476
+ initializeSelectionWatcherWithInitialLoad(contextId) {
1477
+ this.documentHttpService.getDocumentsBySelection(contextId, null, null, null).subscribe({
1478
+ next: (response) => {
1479
+ this.documentStore.setDocumentListResponse(response);
1480
+ },
1481
+ error: (error) => {
1482
+ console.error('Error calling initial API:', error);
1483
+ }
1484
+ });
1485
+ this.initializeSelectionWatcher(contextId);
1486
+ }
1239
1487
  /**
1240
1488
  * Set the document data
1241
1489
  * @param document the document data
1242
1490
  */
1243
1491
  set(document) {
1244
- this.documentSubject$.next(document);
1492
+ this.documentStore.setCurrentDocument(document);
1245
1493
  }
1246
1494
  /**
1247
1495
  * Get the document data
1248
1496
  * @returns the document data
1249
1497
  */
1250
1498
  get() {
1251
- return this.documentSubject$.asObservable();
1499
+ return this.documentQuery.selectCurrentDocument();
1500
+ }
1501
+ /**
1502
+ * Get the current document value synchronously
1503
+ * @returns the current document value
1504
+ */
1505
+ getValue() {
1506
+ return this.documentQuery.getCurrentDocument();
1252
1507
  }
1253
1508
  /**
1254
1509
  * Set the selected menu item
1255
- * @param menuItem the selected menu item
1510
+ * @param menuItem the selected menu item _id (not the label)
1256
1511
  */
1257
1512
  setSelectedMenuItem(menuItem) {
1258
1513
  this.documentStore.setSelectedMenuItem(menuItem);
@@ -1273,7 +1528,7 @@ class DocumentService {
1273
1528
  }
1274
1529
  /**
1275
1530
  * Set all selection state at once
1276
- * @param menuItem the selected menu item
1531
+ * @param menuItem the selected menu item _id (not the label)
1277
1532
  * @param userId the selected user ID
1278
1533
  * @param status the selected status
1279
1534
  */
@@ -1300,189 +1555,375 @@ class DocumentService {
1300
1555
  getSelectionState() {
1301
1556
  return this.documentQuery.selectSelectionState();
1302
1557
  }
1558
+ /**
1559
+ * Get observable for filtered documents
1560
+ * @returns Observable that emits filtered document responses
1561
+ */
1562
+ getFilteredDocuments() {
1563
+ return this.documentQuery.selectDocumentListResponse();
1564
+ }
1303
1565
  /**
1304
1566
  * Manually trigger API call with current selection state
1567
+ * @param contextId - The context ID to use for the API call
1305
1568
  */
1306
- refreshDocumentsWithCurrentSelection() {
1569
+ refreshDocumentsWithCurrentSelection(contextId) {
1307
1570
  const currentState = this.documentQuery.getSelectionState();
1308
- this.documentHttpService.getDocumentsBySelection(currentState.menuItem, currentState.userId, currentState.status).subscribe({
1571
+ this.documentHttpService.getDocumentsBySelection(contextId, currentState.menuItem, currentState.userId, currentState.status).subscribe({
1572
+ next: (response) => {
1573
+ this.documentStore.setDocumentListResponse(response);
1574
+ },
1575
+ error: (error) => {
1576
+ throw new Error(error);
1577
+ }
1578
+ });
1579
+ }
1580
+ /**
1581
+ * Force refresh documents with no filters
1582
+ * @param contextId - The context ID to use for the API call
1583
+ */
1584
+ refreshDocumentsWithoutFilters(contextId) {
1585
+ this.documentHttpService.getDocumentsBySelection(contextId, null, null, null).subscribe({
1309
1586
  next: (response) => {
1310
- console.log('Manual API refresh:', response);
1587
+ this.documentStore.setDocumentListResponse(response);
1311
1588
  },
1312
1589
  error: (error) => {
1313
- console.error('Error in manual API refresh:', error);
1590
+ console.error('Error in force refresh:', error);
1314
1591
  }
1315
1592
  });
1316
1593
  }
1317
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentService, deps: [{ token: DocumentStore }, { token: DocumentQuery }, { token: DocumentHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1318
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentService, providedIn: 'root' });
1594
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHelperService, deps: [{ token: DocumentStore }, { token: DocumentQuery }, { token: DocumentHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1595
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHelperService, providedIn: 'root' });
1319
1596
  }
1320
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentService, decorators: [{
1597
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHelperService, decorators: [{
1321
1598
  type: Injectable,
1322
1599
  args: [{
1323
1600
  providedIn: 'root',
1324
1601
  }]
1325
1602
  }], ctorParameters: () => [{ type: DocumentStore }, { type: DocumentQuery }, { type: DocumentHttpService }] });
1326
1603
 
1327
- class UserListComponent {
1328
- documentService;
1604
+ class UserListService {
1329
1605
  documentStore;
1330
1606
  documentQuery;
1331
- userData = [];
1332
- selectedUser;
1333
- userSelected = new EventEmitter();
1334
- constructor(documentService, documentStore, documentQuery) {
1335
- this.documentService = documentService;
1607
+ constructor(documentStore, documentQuery) {
1336
1608
  this.documentStore = documentStore;
1337
1609
  this.documentQuery = documentQuery;
1338
1610
  }
1339
- ngOnInit() {
1340
- // Initialize user data with persistent colors and initials
1341
- this.userData = USERLIST.map((user, index) => ({
1611
+ getInitials(name) {
1612
+ return name.split(SHARED.EMPTY_SPACE).map(name => name.charAt(0)).join(SHARED.EMPTY).toUpperCase();
1613
+ }
1614
+ getColorByIndex(index) {
1615
+ const colors = SHARED.COLORS;
1616
+ return colors[index % colors.length];
1617
+ }
1618
+ getColorValue(colorName) {
1619
+ const colorMap = SHARED.COLOR_MAP;
1620
+ return colorMap[colorName] || SHARED.DEFAULT_COLOR;
1621
+ }
1622
+ processUserData(userList) {
1623
+ return userList.map((user, index) => ({
1342
1624
  ...user,
1343
- initials: this.getInitials(user.username),
1625
+ initials: this.getInitials(user.name),
1344
1626
  color: this.getColorByIndex(index)
1345
1627
  }));
1346
- // Subscribe to selected user ID from state
1628
+ }
1629
+ /**
1630
+ * Finds the selected menu item from categories
1631
+ * @param selectedMenuItemId - The ID of the selected menu item
1632
+ * @param categories - The document categories
1633
+ * @returns The selected menu item or null
1634
+ */
1635
+ findSelectedMenuItem(selectedMenuItemId, categories) {
1636
+ for (const category of categories) {
1637
+ if (category.items) {
1638
+ const item = category.items.find(item => item._id === selectedMenuItemId);
1639
+ if (item) {
1640
+ return item;
1641
+ }
1642
+ }
1643
+ }
1644
+ return null;
1645
+ }
1646
+ /**
1647
+ * Filters user list based on selected menu item category
1648
+ * @param userList - The complete user list
1649
+ * @param categories - The document categories
1650
+ * @returns Filtered user list
1651
+ */
1652
+ filterUsersByCategory(userList, categories) {
1653
+ const selectedMenuItemId = this.documentQuery.getSelectionState().menuItem;
1654
+ if (!selectedMenuItemId) {
1655
+ return userList;
1656
+ }
1657
+ const selectedMenuItem = this.findSelectedMenuItem(selectedMenuItemId, categories);
1658
+ if (!selectedMenuItem) {
1659
+ return userList;
1660
+ }
1661
+ const selectedCategory = categories.find(category => category.items?.some(item => item._id === selectedMenuItemId));
1662
+ if (!selectedCategory) {
1663
+ return userList;
1664
+ }
1665
+ if (selectedCategory.label === SHARED.APPLICATION) {
1666
+ return userList.filter(user => user.name === SHARED.APPLICATION_DOCS);
1667
+ }
1668
+ return userList;
1669
+ }
1670
+ selectUser(userId, userData) {
1671
+ const user = userData.find(u => u._id === userId);
1672
+ if (user) {
1673
+ this.documentStore.setSelectedUserId(userId);
1674
+ return { selectedUser: user.name, name: user.name };
1675
+ }
1676
+ return { selectedUser: undefined, name: undefined };
1677
+ }
1678
+ unselectUser() {
1679
+ this.documentStore.setSelectedUserId(null);
1680
+ }
1681
+ isUserSelected(userId, userData, selectedUser) {
1682
+ return selectedUser === userData.find(u => u._id === userId)?.name;
1683
+ }
1684
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListService, deps: [{ token: DocumentStore }, { token: DocumentQuery }], target: i0.ɵɵFactoryTarget.Injectable });
1685
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListService, providedIn: 'root' });
1686
+ }
1687
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListService, decorators: [{
1688
+ type: Injectable,
1689
+ args: [{
1690
+ providedIn: 'root'
1691
+ }]
1692
+ }], ctorParameters: () => [{ type: DocumentStore }, { type: DocumentQuery }] });
1693
+
1694
+ class UserListComponent {
1695
+ documentService;
1696
+ documentStore;
1697
+ documentQuery;
1698
+ userListService;
1699
+ userList = SHARED.EMPTY_ARRAY;
1700
+ categories = SHARED.EMPTY_ARRAY;
1701
+ userSelected = new EventEmitter();
1702
+ userData = SHARED.EMPTY_ARRAY;
1703
+ filteredUserData = SHARED.EMPTY_ARRAY;
1704
+ selectedUser;
1705
+ shouldShowContainer = true;
1706
+ constructor(documentService, documentStore, documentQuery, userListService) {
1707
+ this.documentService = documentService;
1708
+ this.documentStore = documentStore;
1709
+ this.documentQuery = documentQuery;
1710
+ this.userListService = userListService;
1711
+ }
1712
+ ngOnChanges(changes) {
1713
+ if (changes['userList'] && !changes['userList'].firstChange) {
1714
+ this.initializeUserData();
1715
+ }
1716
+ }
1717
+ initializeUserData() {
1718
+ if (this.userList && this.userList.length > 0) {
1719
+ this.userData = this.userListService.processUserData(this.userList);
1720
+ this.updateFilteredUserData();
1721
+ }
1722
+ }
1723
+ updateFilteredUserData() {
1724
+ if (this.userData.length > 0 && this.categories.length > 0) {
1725
+ this.filteredUserData = this.userListService.filterUsersByCategory(this.userData, this.categories);
1726
+ this.shouldShowContainer = true;
1727
+ if (this.selectedUser) {
1728
+ const selectedUserInFiltered = this.filteredUserData.find(user => user.name === this.selectedUser);
1729
+ if (!selectedUserInFiltered) {
1730
+ this.selectedUser = undefined;
1731
+ this.documentStore.setSelectedUserId(null);
1732
+ this.userSelected.emit(SHARED.EMPTY);
1733
+ }
1734
+ }
1735
+ }
1736
+ else {
1737
+ this.filteredUserData = this.userData;
1738
+ this.shouldShowContainer = true;
1739
+ }
1740
+ }
1741
+ ngOnInit() {
1742
+ this.initializeUserData();
1347
1743
  this.documentQuery.selectSelectedUserId().subscribe(userId => {
1348
1744
  if (userId) {
1349
1745
  const user = this.userData.find(u => u._id === userId);
1350
- this.selectedUser = user ? user.username : undefined;
1746
+ this.selectedUser = user ? user.name : undefined;
1351
1747
  }
1352
1748
  else {
1353
1749
  this.selectedUser = undefined;
1354
1750
  }
1355
1751
  });
1356
- // Subscribe to user list visibility and reset selection when hidden
1752
+ this.documentQuery.selectSelectedMenuItem().subscribe(menuItemId => {
1753
+ this.updateFilteredUserData();
1754
+ if (this.selectedUser) {
1755
+ const selectedUserInFiltered = this.filteredUserData.find(user => user.name === this.selectedUser);
1756
+ if (!selectedUserInFiltered) {
1757
+ this.selectedUser = undefined;
1758
+ this.documentStore.setSelectedUserId(null);
1759
+ this.userSelected.emit(SHARED.EMPTY);
1760
+ }
1761
+ }
1762
+ });
1357
1763
  this.documentQuery.selectShowUserList().subscribe(show => {
1358
1764
  if (!show && this.selectedUser) {
1359
- // Reset user selection when user list is hidden
1360
1765
  this.selectedUser = undefined;
1361
- this.userSelected.emit('');
1766
+ this.userSelected.emit(SHARED.EMPTY);
1362
1767
  }
1363
1768
  });
1364
1769
  }
1365
- getInitials(username) {
1366
- return username.split(' ').map(name => name.charAt(0)).join('').toUpperCase();
1367
- }
1368
- getColorByIndex(index) {
1369
- const colors = ['orange', 'blue', 'green', 'grey', 'purple'];
1370
- return colors[index % colors.length];
1371
- }
1372
- getColorValue(colorName) {
1373
- const colorMap = {
1374
- 'orange': '#f97316',
1375
- 'blue': '#3b82f6',
1376
- 'green': '#10b981',
1377
- 'grey': '#6b7280',
1378
- 'purple': '#8b5cf6'
1379
- };
1380
- return colorMap[colorName] || '#3b82f6';
1381
- }
1382
1770
  onUserSelect(username, id) {
1383
- // If the same user is clicked again, unselect it
1384
1771
  if (this.selectedUser === username) {
1385
1772
  this.selectedUser = undefined;
1386
- this.documentStore.setSelectedUserId(null);
1387
- this.userSelected.emit('');
1773
+ this.userListService.unselectUser();
1774
+ this.userSelected.emit(SHARED.EMPTY);
1388
1775
  }
1389
1776
  else {
1390
- // Select the new user
1391
1777
  this.selectedUser = username;
1392
1778
  this.documentStore.setSelectedUserId(id);
1393
1779
  this.userSelected.emit(username);
1394
1780
  }
1395
1781
  }
1396
- // Method to programmatically select a user
1397
- selectUser(userId) {
1398
- const user = this.userData.find(u => u._id === userId);
1399
- if (user) {
1400
- this.selectedUser = user.username;
1401
- this.documentStore.setSelectedUserId(userId);
1402
- this.userSelected.emit(user.username);
1403
- }
1404
- }
1405
- // Method to programmatically unselect user
1406
- unselectUser() {
1407
- this.selectedUser = undefined;
1408
- this.documentStore.setSelectedUserId(null);
1409
- this.userSelected.emit('');
1410
- }
1411
- // Method to check if a user is selected
1412
- isUserSelected(userId) {
1413
- return this.selectedUser === this.userData.find(u => u._id === userId)?.username;
1414
- }
1415
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: UserListComponent, deps: [{ token: DocumentService }, { token: DocumentStore }, { token: DocumentQuery }], target: i0.ɵɵFactoryTarget.Component });
1416
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: UserListComponent, isStandalone: false, selector: "lib-user-list", outputs: { userSelected: "userSelected" }, ngImport: i0, template: "<div class=\"user-list-container\">\r\n <div class=\"user-cards\">\r\n <div \r\n *ngFor=\"let user of userData\" \r\n class=\"user-card\"\r\n [class.selected]=\"selectedUser === user.username\"\r\n [style.border-color]=\"selectedUser === user.username ? getColorValue(user.color) : 'transparent'\"\r\n (click)=\"onUserSelect(user.username, user._id)\"\r\n >\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\">{{ user.initials }}</span>\r\n </div>\r\n <div class=\"user-info\">\r\n <div class=\"username\">{{ user.username }}</div>\r\n <div class=\"document-counts\">\r\n {{ user.approveDocumentCount }} approved / {{ user.pendingDocumentCount }} pending\r\n </div>\r\n </div>\r\n <div class=\"selection-indicator\" *ngIf=\"selectedUser === user.username\">\r\n <i class=\"ri-check-line\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".user-list-container{padding:1rem;animation:slideInFromTop .3s ease-out}@keyframes slideInFromTop{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.user-cards{display:flex;flex-wrap:wrap;gap:1rem}.user-card{display:flex;align-items:center;gap:.75rem;padding:1rem;border:2px solid transparent;border-radius:8px;cursor:pointer;transition:all .2s ease;background:#fff;box-shadow:0 2px 4px #0000001a;min-width:330px;position:relative}.user-card:hover{box-shadow:0 4px 8px #00000026}.user-card.selected{background-color:#f8fafc;box-shadow:0 4px 8px #00000026;border-width:2px}.user-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;color:#fff;font-size:14px}.avatar-orange{background-color:#f97316}.avatar-blue{background-color:#3b82f6}.avatar-green{background-color:#10b981}.avatar-grey{background-color:#6b7280}.avatar-purple{background-color:#8b5cf6}.user-info{flex:1}.username{font-weight:600;color:#1f2937;margin-bottom:.25rem}.document-counts{font-size:.875rem;color:#6b7280}.selection-indicator{position:absolute;top:8px;right:8px;width:20px;height:20px;background-color:#10b981;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px;animation:fadeIn .2s ease-in-out}@keyframes fadeIn{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1782
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListComponent, deps: [{ token: DocumentHelperService }, { token: DocumentStore }, { token: DocumentQuery }, { token: UserListService }], target: i0.ɵɵFactoryTarget.Component });
1783
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: UserListComponent, isStandalone: false, selector: "lib-user-list", inputs: { userList: "userList", categories: "categories" }, outputs: { userSelected: "userSelected" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"user-list-container\" [@slideInFromTop]>\r\n <div class=\"user-cards\">\r\n <div \r\n *ngFor=\"let user of filteredUserData\" \r\n class=\"user-card\"\r\n [class.selected]=\"selectedUser === user.name\"\r\n [style.border-color]=\"selectedUser === user.name ? '#f97316' : 'transparent'\"\r\n (click)=\"onUserSelect(user.name, user._id)\"\r\n >\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\">{{ user.initials }}</span>\r\n </div>\r\n <div class=\"user-info\">\r\n <div class=\"username\">{{ user.name }}</div>\r\n <div class=\"document-counts\">\r\n {{ user.approved }} approved / {{ user.pending }} pending\r\n </div>\r\n </div>\r\n <div class=\"selection-indicator\" *ngIf=\"selectedUser === user.name\" [@fadeIn]>\r\n <i class=\"ri-check-line\"></i>\r\n </div>\r\n </div>\r\n \r\n <!-- Show message when filtered list is empty -->\r\n <div *ngIf=\"filteredUserData.length === 0 && shouldShowContainer\" class=\"no-users-message\" [@slideInFromTop]>\r\n <p>No users available for this category.</p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".user-list-container{padding:1rem}.user-cards{display:flex;flex-wrap:wrap;gap:1rem;transition:all .3s ease-in-out}.user-card{display:flex;align-items:center;gap:.75rem;padding:1rem;border:2px solid transparent;border-radius:8px;cursor:pointer;transition:all .2s ease;background:#fff;box-shadow:0 2px 4px #0000001a;min-width:330px;position:relative}.user-card:hover{box-shadow:0 4px 8px #00000026}.user-card.selected{background-color:#f8fafc;box-shadow:0 4px 8px #00000026;border-width:2px}.user-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;color:#fff;font-size:14px}.avatar-orange{background-color:#f97316}.avatar-blue{background-color:#3b82f6}.avatar-green{background-color:#10b981}.avatar-grey{background-color:#6b7280}.avatar-purple{background-color:#8b5cf6}.user-info{flex:1}.username{font-weight:600;color:#1f2937;margin-bottom:.25rem}.document-counts{font-size:.875rem;color:#6b7280}.selection-indicator{position:absolute;top:8px;right:8px;width:20px;height:20px;background-color:#10b981;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px}.no-users-message{display:flex;justify-content:center;align-items:center;padding:2rem;background:#f8fafc;border-radius:8px;border:2px dashed #d1d5db;margin:1rem 0}.no-users-message p{color:#6b7280;font-size:.875rem;font-weight:500;margin:0;text-align:center}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [
1784
+ trigger('slideInFromTop', [
1785
+ state('void', style({
1786
+ opacity: 0,
1787
+ transform: 'translateY(-10px)'
1788
+ })),
1789
+ state('*', style({
1790
+ opacity: 1,
1791
+ transform: 'translateY(0)'
1792
+ })),
1793
+ transition('void => *', [
1794
+ animate('300ms ease-out')
1795
+ ])
1796
+ ]),
1797
+ trigger('fadeIn', [
1798
+ state('void', style({
1799
+ opacity: 0,
1800
+ transform: 'scale(0.8)'
1801
+ })),
1802
+ state('*', style({
1803
+ opacity: 1,
1804
+ transform: 'scale(1)'
1805
+ })),
1806
+ transition('void => *', [
1807
+ animate('200ms ease-in-out')
1808
+ ])
1809
+ ])
1810
+ ] });
1417
1811
  }
1418
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: UserListComponent, decorators: [{
1812
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserListComponent, decorators: [{
1419
1813
  type: Component,
1420
- args: [{ selector: 'lib-user-list', standalone: false, template: "<div class=\"user-list-container\">\r\n <div class=\"user-cards\">\r\n <div \r\n *ngFor=\"let user of userData\" \r\n class=\"user-card\"\r\n [class.selected]=\"selectedUser === user.username\"\r\n [style.border-color]=\"selectedUser === user.username ? getColorValue(user.color) : 'transparent'\"\r\n (click)=\"onUserSelect(user.username, user._id)\"\r\n >\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\">{{ user.initials }}</span>\r\n </div>\r\n <div class=\"user-info\">\r\n <div class=\"username\">{{ user.username }}</div>\r\n <div class=\"document-counts\">\r\n {{ user.approveDocumentCount }} approved / {{ user.pendingDocumentCount }} pending\r\n </div>\r\n </div>\r\n <div class=\"selection-indicator\" *ngIf=\"selectedUser === user.username\">\r\n <i class=\"ri-check-line\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".user-list-container{padding:1rem;animation:slideInFromTop .3s ease-out}@keyframes slideInFromTop{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.user-cards{display:flex;flex-wrap:wrap;gap:1rem}.user-card{display:flex;align-items:center;gap:.75rem;padding:1rem;border:2px solid transparent;border-radius:8px;cursor:pointer;transition:all .2s ease;background:#fff;box-shadow:0 2px 4px #0000001a;min-width:330px;position:relative}.user-card:hover{box-shadow:0 4px 8px #00000026}.user-card.selected{background-color:#f8fafc;box-shadow:0 4px 8px #00000026;border-width:2px}.user-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;color:#fff;font-size:14px}.avatar-orange{background-color:#f97316}.avatar-blue{background-color:#3b82f6}.avatar-green{background-color:#10b981}.avatar-grey{background-color:#6b7280}.avatar-purple{background-color:#8b5cf6}.user-info{flex:1}.username{font-weight:600;color:#1f2937;margin-bottom:.25rem}.document-counts{font-size:.875rem;color:#6b7280}.selection-indicator{position:absolute;top:8px;right:8px;width:20px;height:20px;background-color:#10b981;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px;animation:fadeIn .2s ease-in-out}@keyframes fadeIn{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}\n"] }]
1421
- }], ctorParameters: () => [{ type: DocumentService }, { type: DocumentStore }, { type: DocumentQuery }], propDecorators: { userSelected: [{
1814
+ args: [{ selector: 'lib-user-list', standalone: false, animations: [
1815
+ trigger('slideInFromTop', [
1816
+ state('void', style({
1817
+ opacity: 0,
1818
+ transform: 'translateY(-10px)'
1819
+ })),
1820
+ state('*', style({
1821
+ opacity: 1,
1822
+ transform: 'translateY(0)'
1823
+ })),
1824
+ transition('void => *', [
1825
+ animate('300ms ease-out')
1826
+ ])
1827
+ ]),
1828
+ trigger('fadeIn', [
1829
+ state('void', style({
1830
+ opacity: 0,
1831
+ transform: 'scale(0.8)'
1832
+ })),
1833
+ state('*', style({
1834
+ opacity: 1,
1835
+ transform: 'scale(1)'
1836
+ })),
1837
+ transition('void => *', [
1838
+ animate('200ms ease-in-out')
1839
+ ])
1840
+ ])
1841
+ ], template: "<div class=\"user-list-container\" [@slideInFromTop]>\r\n <div class=\"user-cards\">\r\n <div \r\n *ngFor=\"let user of filteredUserData\" \r\n class=\"user-card\"\r\n [class.selected]=\"selectedUser === user.name\"\r\n [style.border-color]=\"selectedUser === user.name ? '#f97316' : 'transparent'\"\r\n (click)=\"onUserSelect(user.name, user._id)\"\r\n >\r\n <div class=\"user-avatar\" [ngClass]=\"'avatar-' + user.color\">\r\n <span class=\"initials\">{{ user.initials }}</span>\r\n </div>\r\n <div class=\"user-info\">\r\n <div class=\"username\">{{ user.name }}</div>\r\n <div class=\"document-counts\">\r\n {{ user.approved }} approved / {{ user.pending }} pending\r\n </div>\r\n </div>\r\n <div class=\"selection-indicator\" *ngIf=\"selectedUser === user.name\" [@fadeIn]>\r\n <i class=\"ri-check-line\"></i>\r\n </div>\r\n </div>\r\n \r\n <!-- Show message when filtered list is empty -->\r\n <div *ngIf=\"filteredUserData.length === 0 && shouldShowContainer\" class=\"no-users-message\" [@slideInFromTop]>\r\n <p>No users available for this category.</p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".user-list-container{padding:1rem}.user-cards{display:flex;flex-wrap:wrap;gap:1rem;transition:all .3s ease-in-out}.user-card{display:flex;align-items:center;gap:.75rem;padding:1rem;border:2px solid transparent;border-radius:8px;cursor:pointer;transition:all .2s ease;background:#fff;box-shadow:0 2px 4px #0000001a;min-width:330px;position:relative}.user-card:hover{box-shadow:0 4px 8px #00000026}.user-card.selected{background-color:#f8fafc;box-shadow:0 4px 8px #00000026;border-width:2px}.user-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;color:#fff;font-size:14px}.avatar-orange{background-color:#f97316}.avatar-blue{background-color:#3b82f6}.avatar-green{background-color:#10b981}.avatar-grey{background-color:#6b7280}.avatar-purple{background-color:#8b5cf6}.user-info{flex:1}.username{font-weight:600;color:#1f2937;margin-bottom:.25rem}.document-counts{font-size:.875rem;color:#6b7280}.selection-indicator{position:absolute;top:8px;right:8px;width:20px;height:20px;background-color:#10b981;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px}.no-users-message{display:flex;justify-content:center;align-items:center;padding:2rem;background:#f8fafc;border-radius:8px;border:2px dashed #d1d5db;margin:1rem 0}.no-users-message p{color:#6b7280;font-size:.875rem;font-weight:500;margin:0;text-align:center}\n"] }]
1842
+ }], ctorParameters: () => [{ type: DocumentHelperService }, { type: DocumentStore }, { type: DocumentQuery }, { type: UserListService }], propDecorators: { userList: [{
1843
+ type: Input
1844
+ }], categories: [{
1845
+ type: Input
1846
+ }], userSelected: [{
1422
1847
  type: Output
1423
1848
  }] } });
1424
1849
 
1850
+ class StatusCalculatorService {
1851
+ calculateTotalCount(statusData) {
1852
+ return statusData?.reduce((total, status) => total + (status.count ?? 0), 0) || 0;
1853
+ }
1854
+ calculateStatusDataWithPercentages(statusData, selectedStatus) {
1855
+ if (!statusData)
1856
+ return [];
1857
+ const totalCount = this.calculateTotalCount(statusData);
1858
+ return statusData.map((status) => ({
1859
+ ...status,
1860
+ percentage: totalCount > 0 ? (status.count ?? 0) / totalCount * 100 : 0,
1861
+ isSelected: selectedStatus === status.status,
1862
+ statusClass: status.status ? SHARED.STATUS_WITH_DASH + status.status.toLowerCase() : SHARED.EMPTY,
1863
+ iconClass: SHARED.ICON_WITH_DASH + (status?.status?.toLowerCase() || SHARED.EMPTY)
1864
+ }));
1865
+ }
1866
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StatusCalculatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1867
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StatusCalculatorService, providedIn: 'root' });
1868
+ }
1869
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: StatusCalculatorService, decorators: [{
1870
+ type: Injectable,
1871
+ args: [{
1872
+ providedIn: 'root'
1873
+ }]
1874
+ }] });
1875
+
1425
1876
  class DocumentStatusComponent {
1426
- documentStore;
1427
1877
  documentQuery;
1428
1878
  documentService;
1429
- statusData = SAMPLE_STATUS_DATA;
1879
+ statusCalculatorService;
1880
+ contextId = SHARED.EMPTY;
1881
+ statusData;
1430
1882
  selectedStatus = null;
1883
+ statusDataWithPercentages = [];
1431
1884
  subscription = new Subscription();
1432
- constructor(documentStore, documentQuery, documentService) {
1433
- this.documentStore = documentStore;
1885
+ constructor(documentQuery, documentService, statusCalculatorService) {
1434
1886
  this.documentQuery = documentQuery;
1435
1887
  this.documentService = documentService;
1888
+ this.statusCalculatorService = statusCalculatorService;
1436
1889
  }
1437
1890
  ngOnInit() {
1438
- // Subscribe to the selected status from the store
1439
1891
  this.subscription.add(this.documentQuery.selectSelectedStatus().subscribe(status => {
1440
1892
  this.selectedStatus = status;
1441
- console.log('Status selection changed:', status);
1893
+ this.updateCalculatedStatusData();
1442
1894
  }));
1443
- // Subscribe to all selection state changes
1444
- this.subscription.add(this.documentService.getSelectionState().subscribe(selectionState => {
1445
- console.log('Current selection state:', selectionState);
1895
+ this.subscription.add(this.documentQuery.selectStatusData().subscribe(statusData => {
1896
+ if (statusData && statusData.length > 0) {
1897
+ this.statusData = statusData;
1898
+ this.updateCalculatedStatusData();
1899
+ }
1446
1900
  }));
1447
1901
  }
1448
1902
  ngOnDestroy() {
1449
1903
  this.subscription.unsubscribe();
1450
1904
  }
1451
- getTotalCount() {
1452
- return this.statusData.reduce((total, status) => total + (status.count ?? 0), 0);
1453
- }
1454
- getPercentage(count) {
1455
- const total = this.getTotalCount();
1456
- return total > 0 ? (count / total) * 100 : 0;
1457
- }
1458
1905
  selectStatus(status) {
1459
1906
  const newStatus = this.selectedStatus === status ? null : status;
1460
1907
  this.documentService.setSelectedStatus(newStatus);
1461
1908
  }
1462
- isSelected(status) {
1463
- const isSelected = this.selectedStatus === status;
1464
- return isSelected;
1909
+ updateCalculatedStatusData() {
1910
+ this.statusDataWithPercentages = this.statusCalculatorService.calculateStatusDataWithPercentages(this.statusData, this.selectedStatus);
1465
1911
  }
1466
- // Example method to demonstrate setting other selection properties
1467
- setExampleSelections() {
1468
- // This is just for demonstration - in real usage, these would come from user interactions
1469
- this.documentService.setSelectionState('Identity', 'user123', 'Approved');
1470
- }
1471
- clearAllSelections() {
1472
- this.documentService.clearSelectionState();
1473
- }
1474
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentStatusComponent, deps: [{ token: DocumentStore }, { token: DocumentQuery }, { token: DocumentService }], target: i0.ɵɵFactoryTarget.Component });
1475
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DocumentStatusComponent, isStandalone: false, selector: "lib-document-status", ngImport: i0, template: "<div class=\"status-summary-container\">\n <div class=\"status-cards\">\n \n <div \n *ngFor=\"let status of statusData\" \n class=\"status-card\"\n [ngClass]=\"status.status ? 'status-' + status.status.toLowerCase() : ''\"\n [class.selected]=\"isSelected(status.status || '')\"\n (click)=\"selectStatus(status.status || '')\"\n >\n <div class=\"status-icon\" [ngClass]=\"'icon-' + status?.status?.toLowerCase()\">\n <i [class]=\"status.icon\"></i>\n </div>\n <div class=\"status-info\">\n <div class=\"status-count\">{{ status.count }}</div>\n <div class=\"status-name\">{{ status.status }}</div>\n \n </div>\n </div>\n </div>\n \n <div class=\"progress-bar-container\">\n <div class=\"progress-bar\">\n <div \n *ngFor=\"let status of statusData\" \n class=\"progress-segment\"\n [style.width.%]=\"getPercentage(status.count ?? 0)\"\n [style.background-color]=\"status.color\"\n ></div>\n </div>\n </div>\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: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
1912
+ 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 });
1913
+ 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"] }] });
1476
1914
  }
1477
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentStatusComponent, decorators: [{
1915
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentStatusComponent, decorators: [{
1478
1916
  type: Component,
1479
- args: [{ selector: 'lib-document-status', standalone: false, template: "<div class=\"status-summary-container\">\n <div class=\"status-cards\">\n \n <div \n *ngFor=\"let status of statusData\" \n class=\"status-card\"\n [ngClass]=\"status.status ? 'status-' + status.status.toLowerCase() : ''\"\n [class.selected]=\"isSelected(status.status || '')\"\n (click)=\"selectStatus(status.status || '')\"\n >\n <div class=\"status-icon\" [ngClass]=\"'icon-' + status?.status?.toLowerCase()\">\n <i [class]=\"status.icon\"></i>\n </div>\n <div class=\"status-info\">\n <div class=\"status-count\">{{ status.count }}</div>\n <div class=\"status-name\">{{ status.status }}</div>\n \n </div>\n </div>\n </div>\n \n <div class=\"progress-bar-container\">\n <div class=\"progress-bar\">\n <div \n *ngFor=\"let status of statusData\" \n class=\"progress-segment\"\n [style.width.%]=\"getPercentage(status.count ?? 0)\"\n [style.background-color]=\"status.color\"\n ></div>\n </div>\n </div>\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"] }]
1480
- }], ctorParameters: () => [{ type: DocumentStore }, { type: DocumentQuery }, { type: DocumentService }] });
1917
+ args: [{ selector: 'lib-document-status', standalone: false, 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"] }]
1918
+ }], ctorParameters: () => [{ type: DocumentQuery }, { type: DocumentHelperService }, { type: StatusCalculatorService }], propDecorators: { contextId: [{
1919
+ type: Input
1920
+ }], statusData: [{
1921
+ type: Input
1922
+ }] } });
1481
1923
 
1482
1924
  /**
1483
1925
  * The `FolderContainerComponent` is responsible for rendering a container
1484
1926
  * that displays a list of documents and associated folder panel data.
1485
- *
1486
1927
  * This component utilizes the `FOLDERPANEL` constant for folder panel data
1487
1928
  * and accepts a document list input of type `DocumentModel`.
1488
1929
  */
@@ -1503,85 +1944,146 @@ class FolderContainerComponent {
1503
1944
  * @type {string}
1504
1945
  */
1505
1946
  contextId = SHARED.EMPTY;
1947
+ /**
1948
+ * The list of users passed as input to the component.
1949
+ * @type {UserListModel[]}
1950
+ */
1951
+ userList = [];
1952
+ /**
1953
+ * The status data passed as input to the component.
1954
+ * @type {StatusDataModel[]}
1955
+ */
1956
+ statusData = [];
1957
+ /**
1958
+ * The document categories passed as input to the component.
1959
+ * @type {DocumentCategory[]}
1960
+ */
1961
+ categories = [];
1506
1962
  /**
1507
1963
  * Flag to control user list visibility
1508
1964
  */
1509
1965
  showUserList = true;
1966
+ /**
1967
+ * Animation state for user list visibility
1968
+ */
1969
+ userListAnimationState = SHARED.VISIBLE;
1510
1970
  constructor(documentQuery) {
1511
1971
  this.documentQuery = documentQuery;
1512
1972
  }
1513
1973
  ngOnInit() {
1514
- // Subscribe to user list visibility state
1515
1974
  this.documentQuery.selectShowUserList().subscribe(show => {
1516
1975
  this.showUserList = show;
1976
+ this.userListAnimationState = show ? SHARED.VISIBLE : SHARED.HIDDEN;
1517
1977
  });
1518
1978
  }
1519
- /**
1520
- * Get the animation state for the user list
1521
- */
1522
- getUserListAnimationState() {
1523
- return this.showUserList ? 'visible' : 'hidden';
1524
- }
1525
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FolderContainerComponent, deps: [{ token: DocumentQuery }], target: i0.ɵɵFactoryTarget.Component });
1526
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: FolderContainerComponent, isStandalone: false, selector: "lib-folder-container", inputs: { documentList: "documentList", folderList: "folderList", contextId: "contextId" }, ngImport: i0, template: "\r\n<!-- <lib-folder-block [folderList]=\"folderList\"></lib-folder-block> -->\r\n<div class=\"user-list-wrapper\" [@slideInOut]=\"getUserListAnimationState()\">\r\n <lib-user-list></lib-user-list>\r\n</div>\r\n<lib-document-status></lib-document-status>", styles: [".user-list-wrapper{overflow:hidden;margin-bottom:1rem}.user-list-wrapper ::ng-deep *{transition:opacity .2s ease-in-out}.user-list-wrapper.ng-animating{pointer-events:none}::ng-deep lib-user-list{display:block;width:100%}\n"], dependencies: [{ kind: "component", type: UserListComponent, selector: "lib-user-list", outputs: ["userSelected"] }, { kind: "component", type: DocumentStatusComponent, selector: "lib-document-status" }], animations: [
1979
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FolderContainerComponent, deps: [{ token: DocumentQuery }], target: i0.ɵɵFactoryTarget.Component });
1980
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FolderContainerComponent, isStandalone: false, selector: "lib-folder-container", inputs: { documentList: "documentList", folderList: "folderList", contextId: "contextId", userList: "userList", statusData: "statusData", categories: "categories" }, ngImport: i0, template: "\r\n<div class=\"user-list-wrapper\" [@slideInOut]=\"userListAnimationState\">\r\n <lib-user-list [userList]=\"userList\" [categories]=\"categories\"></lib-user-list>\r\n</div>\r\n<lib-document-status [contextId]=\"contextId\" [statusData]=\"statusData\"></lib-document-status>", styles: [".user-list-wrapper{overflow:hidden;margin-bottom:1rem}.user-list-wrapper ::ng-deep *{transition:opacity .2s ease-in-out}.user-list-wrapper.ng-animating{pointer-events:none}::ng-deep lib-user-list{display:block;width:100%}\n"], dependencies: [{ kind: "component", type: UserListComponent, selector: "lib-user-list", inputs: ["userList", "categories"], outputs: ["userSelected"] }, { kind: "component", type: DocumentStatusComponent, selector: "lib-document-status", inputs: ["contextId", "statusData"] }], animations: [
1527
1981
  trigger('slideInOut', [
1528
1982
  state('visible', style({
1529
- maxHeight: '600px',
1983
+ height: '*',
1530
1984
  opacity: 1,
1531
1985
  transform: 'translateY(0)',
1532
1986
  overflow: 'hidden',
1533
- marginBottom: '1rem'
1987
+ marginBottom: '1rem',
1988
+ visibility: 'visible'
1534
1989
  })),
1535
1990
  state('hidden', style({
1536
- maxHeight: '0px',
1991
+ height: '0px',
1537
1992
  opacity: 0,
1538
- transform: 'translateY(-30px)',
1993
+ transform: 'translateY(-20px)',
1539
1994
  overflow: 'hidden',
1540
- marginBottom: '0px'
1995
+ marginBottom: '0px',
1996
+ visibility: 'hidden'
1541
1997
  })),
1542
1998
  transition('visible => hidden', [
1543
- animate('400ms cubic-bezier(0.4, 0.0, 0.2, 1)')
1999
+ animate('250ms cubic-bezier(0.4, 0.0, 0.2, 1)')
1544
2000
  ]),
1545
2001
  transition('hidden => visible', [
1546
- animate('400ms cubic-bezier(0.4, 0.0, 0.2, 1)')
2002
+ animate('300ms cubic-bezier(0.0, 0.0, 0.2, 1)')
1547
2003
  ])
1548
2004
  ])
1549
2005
  ] });
1550
2006
  }
1551
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FolderContainerComponent, decorators: [{
2007
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FolderContainerComponent, decorators: [{
1552
2008
  type: Component,
1553
2009
  args: [{ selector: 'lib-folder-container', standalone: false, animations: [
1554
2010
  trigger('slideInOut', [
1555
2011
  state('visible', style({
1556
- maxHeight: '600px',
2012
+ height: '*',
1557
2013
  opacity: 1,
1558
2014
  transform: 'translateY(0)',
1559
2015
  overflow: 'hidden',
1560
- marginBottom: '1rem'
2016
+ marginBottom: '1rem',
2017
+ visibility: 'visible'
1561
2018
  })),
1562
2019
  state('hidden', style({
1563
- maxHeight: '0px',
2020
+ height: '0px',
1564
2021
  opacity: 0,
1565
- transform: 'translateY(-30px)',
2022
+ transform: 'translateY(-20px)',
1566
2023
  overflow: 'hidden',
1567
- marginBottom: '0px'
2024
+ marginBottom: '0px',
2025
+ visibility: 'hidden'
1568
2026
  })),
1569
2027
  transition('visible => hidden', [
1570
- animate('400ms cubic-bezier(0.4, 0.0, 0.2, 1)')
2028
+ animate('250ms cubic-bezier(0.4, 0.0, 0.2, 1)')
1571
2029
  ]),
1572
2030
  transition('hidden => visible', [
1573
- animate('400ms cubic-bezier(0.4, 0.0, 0.2, 1)')
2031
+ animate('300ms cubic-bezier(0.0, 0.0, 0.2, 1)')
1574
2032
  ])
1575
2033
  ])
1576
- ], template: "\r\n<!-- <lib-folder-block [folderList]=\"folderList\"></lib-folder-block> -->\r\n<div class=\"user-list-wrapper\" [@slideInOut]=\"getUserListAnimationState()\">\r\n <lib-user-list></lib-user-list>\r\n</div>\r\n<lib-document-status></lib-document-status>", styles: [".user-list-wrapper{overflow:hidden;margin-bottom:1rem}.user-list-wrapper ::ng-deep *{transition:opacity .2s ease-in-out}.user-list-wrapper.ng-animating{pointer-events:none}::ng-deep lib-user-list{display:block;width:100%}\n"] }]
2034
+ ], template: "\r\n<div class=\"user-list-wrapper\" [@slideInOut]=\"userListAnimationState\">\r\n <lib-user-list [userList]=\"userList\" [categories]=\"categories\"></lib-user-list>\r\n</div>\r\n<lib-document-status [contextId]=\"contextId\" [statusData]=\"statusData\"></lib-document-status>", styles: [".user-list-wrapper{overflow:hidden;margin-bottom:1rem}.user-list-wrapper ::ng-deep *{transition:opacity .2s ease-in-out}.user-list-wrapper.ng-animating{pointer-events:none}::ng-deep lib-user-list{display:block;width:100%}\n"] }]
1577
2035
  }], ctorParameters: () => [{ type: DocumentQuery }], propDecorators: { documentList: [{
1578
2036
  type: Input
1579
2037
  }], folderList: [{
1580
2038
  type: Input
1581
2039
  }], contextId: [{
1582
2040
  type: Input
2041
+ }], userList: [{
2042
+ type: Input
2043
+ }], statusData: [{
2044
+ type: Input
2045
+ }], categories: [{
2046
+ type: Input
1583
2047
  }] } });
1584
2048
 
2049
+ /**
2050
+ * A utility class containing common error messages.
2051
+ * @class ERRORS
2052
+ */
2053
+ class ERRORS {
2054
+ /**
2055
+ * Error message for invalid recipient.
2056
+ * @static
2057
+ * @type {string}
2058
+ */
2059
+ static INVALID_RECIPIENT = "Invalid recipient: The recipient cannot be empty.";
2060
+ /**
2061
+ * Error message for invalid document.
2062
+ * @static
2063
+ * @type {string}
2064
+ */
2065
+ static ERROR_FETCHING_DOCUMENTS = "Error fetching documents:";
2066
+ /**
2067
+ * Error message for invalid document.
2068
+ * @static
2069
+ * @type {string}
2070
+ */
2071
+ static ERROR_FETCHING_FOLDERS = "Error fetching folders:";
2072
+ /**
2073
+ * Error message for invalid document.
2074
+ * @static
2075
+ * @type {string}
2076
+ */
2077
+ static ERROR_ALLDOCUMENT_MISSING = "allDocumentTypes is missing in the response:";
2078
+ /**
2079
+ * Error message for invalid document.
2080
+ * @static
2081
+ * @type {string}
2082
+ */
2083
+ static ERROR_DOCUMENT_TYPES = "Error fetching document types:";
2084
+ static ERROR_DOCUMENT_CATAGORY = 'Error fetching document categories:';
2085
+ }
2086
+
1585
2087
  /**
1586
2088
  * Storing all permission properties.
1587
2089
  * @export
@@ -1710,142 +2212,78 @@ class DocumentUploadService {
1710
2212
  return null;
1711
2213
  }
1712
2214
  }
1713
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentUploadService, deps: [{ token: DocumentService$1 }, { token: DocumentStore }, { token: i3.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
1714
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentUploadService, providedIn: 'root' });
2215
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentUploadService, deps: [{ token: DocumentService }, { token: DocumentStore }, { token: i3.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
2216
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentUploadService, providedIn: 'root' });
1715
2217
  }
1716
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentUploadService, decorators: [{
2218
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentUploadService, decorators: [{
1717
2219
  type: Injectable,
1718
2220
  args: [{
1719
2221
  providedIn: 'root'
1720
2222
  }]
1721
- }], ctorParameters: () => [{ type: DocumentService$1 }, { type: DocumentStore }, { type: i3.MessageService }] });
2223
+ }], ctorParameters: () => [{ type: DocumentService }, { type: DocumentStore }, { type: i3.MessageService }] });
1722
2224
 
1723
2225
  class DocumentTableBuilderService {
1724
2226
  constructor() { }
1725
2227
  /**
1726
- * Builds table data for document sections
1727
- * @param sections Array of document sections
1728
- * @returns Array of TableData objects
1729
- */
1730
- buildDocumentSectionsTables(sections) {
1731
- return sections.map(section => this.buildTableForSection(section));
1732
- }
1733
- /**
1734
- * Builds table data for a single document section
1735
- * @param section Document section
1736
- * @returns TableData object
1737
- */
1738
- buildTableForSection(section) {
1739
- const columns = [
1740
- {
1741
- field: 'documentName',
1742
- header: 'Document',
1743
- type: 'document',
1744
- width: '35%'
1745
- },
1746
- {
1747
- field: 'status',
1748
- header: 'Status',
1749
- type: 'status',
1750
- width: '15%'
1751
- },
1752
- {
1753
- field: 'applicantName',
1754
- header: 'Applicant',
1755
- type: 'text',
1756
- width: '20%'
1757
- },
1758
- {
1759
- field: 'uploadedTime',
1760
- header: 'Uploaded',
1761
- type: 'text',
1762
- width: '15%'
1763
- },
1764
- {
1765
- field: 'actions',
1766
- header: 'Actions',
1767
- type: 'actions',
1768
- width: '15%'
1769
- }
1770
- ];
1771
- return {
1772
- columns: columns,
1773
- data: section.list
1774
- };
1775
- }
1776
- /**
1777
- * Builds a single table from document list
1778
- * @param documents Array of document items
2228
+ * Builds a single table from document list items
2229
+ * @param documents Array of document list items
1779
2230
  * @returns TableData object
1780
2231
  */
1781
2232
  buildDocumentTable(documents) {
1782
- const columns = [
1783
- {
1784
- field: 'documentName',
1785
- header: 'Document',
1786
- type: 'document',
1787
- width: '35%'
1788
- },
1789
- {
1790
- field: 'status',
1791
- header: 'Status',
1792
- type: 'status',
1793
- width: '15%'
1794
- },
1795
- {
1796
- field: 'applicantName',
1797
- header: 'Applicant',
1798
- type: 'text',
1799
- width: '20%'
1800
- },
1801
- {
1802
- field: 'uploadedTime',
1803
- header: 'Uploaded',
1804
- type: 'text',
1805
- width: '15%'
1806
- },
1807
- {
1808
- field: 'actions',
1809
- header: 'Actions',
1810
- type: 'actions',
1811
- width: '15%'
1812
- }
1813
- ];
1814
2233
  return {
1815
- columns: columns,
2234
+ columns: SHARED.DOCUMENT_TABLE_COLUMNS,
1816
2235
  data: documents
1817
2236
  };
1818
2237
  }
1819
2238
  /**
1820
- * Gets completion count for a section
1821
- * @param section Document section
2239
+ * Gets completion count for a category
2240
+ * @param category Document category
1822
2241
  * @returns Completion string (e.g., "2/4")
1823
2242
  */
1824
- getCompletionCount(section) {
1825
- const total = section.list.length;
1826
- const completed = section.list.filter(doc => doc.status.toLowerCase() === 'approved' ||
1827
- doc.status.toLowerCase() === 'uploaded').length;
2243
+ getCompletionCount(category) {
2244
+ const total = category.list.length;
2245
+ const completed = category.list.filter(doc => doc.status.toLowerCase() === SHARED.APPROVED ||
2246
+ doc.status.toLowerCase() === SHARED.UPLOADED).length;
1828
2247
  return `${completed}/${total}`;
1829
2248
  }
1830
2249
  /**
1831
- * Transforms document model to document item
2250
+ * Gets pending document count for a category
2251
+ * @param category Document category
2252
+ * @returns Number of pending documents
2253
+ */
2254
+ getPendingDocumentCount(category) {
2255
+ return category.totalDocs - category.acceptedDocs;
2256
+ }
2257
+ /**
2258
+ * Gets approved document count for a category
2259
+ * @param category Document category
2260
+ * @returns Number of approved documents
2261
+ */
2262
+ getApprovedDocumentCount(category) {
2263
+ return category.acceptedDocs;
2264
+ }
2265
+ /**
2266
+ * Transforms document model to document list item
1832
2267
  * @param documents Array of DocumentModel
1833
- * @returns Array of DocumentItem
2268
+ * @returns Array of DocumentListItem
1834
2269
  */
1835
- transformDocumentModelToItem(documents) {
2270
+ transformDocumentModelToListItem(documents) {
1836
2271
  return documents.map(doc => ({
1837
- documentName: doc.fileName || doc.documentName || '',
1838
- documentType: doc.documentType || doc.type || '',
1839
- documentUrl: doc.documentUrl || doc.url || '',
1840
- status: doc.status || 'Pending',
1841
- applicantName: doc.applicantName || doc.applicant || '',
1842
- uploadedTime: doc.uploadedTime || doc.uploadDate || ''
2272
+ _id: doc._id || SHARED.EMPTY,
2273
+ fileName: doc.fileName || SHARED.EMPTY,
2274
+ docName: doc.docName || doc.documentName || SHARED.EMPTY,
2275
+ fileSize: doc.fileSize || SHARED.EMPTY,
2276
+ documentUrl: doc.documentUrl || doc.url || SHARED.EMPTY,
2277
+ status: doc.status || SHARED.PENDING,
2278
+ uploadedOn: doc.uploadedOn || doc.uploadDate || SHARED.EMPTY,
2279
+ ownerName: doc.ownerName || doc.applicantName || SHARED.EMPTY,
2280
+ contentType: doc.contentType || SHARED.EMPTY
1843
2281
  }));
1844
2282
  }
1845
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentTableBuilderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1846
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentTableBuilderService, providedIn: 'root' });
2283
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentTableBuilderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2284
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentTableBuilderService, providedIn: 'root' });
1847
2285
  }
1848
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentTableBuilderService, decorators: [{
2286
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentTableBuilderService, decorators: [{
1849
2287
  type: Injectable,
1850
2288
  args: [{
1851
2289
  providedIn: 'root'
@@ -1856,69 +2294,94 @@ class TablePrimaryComponent {
1856
2294
  tableData = { columns: [], data: [] };
1857
2295
  showHeader = true;
1858
2296
  tableStyle = { 'min-width': '100%' };
1859
- // Helper methods for document table
2297
+ rowClick = new EventEmitter();
2298
+ processedData = [];
2299
+ // Expose SHARED constants for template use
2300
+ SHARED = SHARED;
2301
+ ngOnChanges(changes) {
2302
+ if (changes['tableData'] && this.tableData) {
2303
+ this.processTableData();
2304
+ }
2305
+ }
2306
+ processTableData() {
2307
+ this.processedData = this.tableData.data.map(rowData => {
2308
+ const processedRow = { ...rowData };
2309
+ if (rowData.fileName) {
2310
+ processedRow._fileExtension = this.getFileExtension(rowData.fileName);
2311
+ processedRow._isPdfFile = processedRow._fileExtension === SHARED.PDF;
2312
+ processedRow._isImageFile = processedRow._fileExtension === SHARED.JPG || processedRow._fileExtension === SHARED.PNG;
2313
+ processedRow._isExcelFile = processedRow._fileExtension === SHARED.XLSX;
2314
+ processedRow._isOtherFile = !processedRow._isPdfFile && !processedRow._isImageFile && !processedRow._isExcelFile;
2315
+ }
2316
+ this.tableData.columns.forEach(col => {
2317
+ if (col.type === SHARED.STATUS_PARAM && rowData[col.field]) {
2318
+ const status = rowData[col.field];
2319
+ processedRow._statusClass = this.getStatusClass(status);
2320
+ processedRow._statusIcon = this.getStatusIcon(status);
2321
+ }
2322
+ });
2323
+ return processedRow;
2324
+ });
2325
+ }
1860
2326
  getStatusClass(status) {
1861
2327
  switch (status.toLowerCase()) {
1862
- case 'pending':
1863
- return 'status-pending';
1864
- case 'approved':
1865
- return 'status-approved';
1866
- case 'alert':
1867
- return 'status-alert';
1868
- case 'uploaded':
1869
- return 'status-uploaded';
1870
- case 'reviewing':
1871
- return 'status-reviewing';
1872
- case 'rejected':
1873
- return 'status-rejected';
2328
+ case SHARED.PENDING_STATUS:
2329
+ return SHARED.STATUS_PENDING_CLASS;
2330
+ case SHARED.APPROVED_STATUS:
2331
+ return SHARED.STATUS_APPROVED_CLASS;
2332
+ case SHARED.ALERT_STATUS:
2333
+ return SHARED.STATUS_ALERT_CLASS;
2334
+ case SHARED.UPLOADED_STATUS:
2335
+ return SHARED.STATUS_UPLOADED_CLASS;
2336
+ case SHARED.REVIEWING_STATUS:
2337
+ return SHARED.STATUS_REVIEWING_CLASS;
2338
+ case SHARED.REJECTED_STATUS:
2339
+ return SHARED.STATUS_REJECTED_CLASS;
1874
2340
  default:
1875
- return 'status-pending';
2341
+ return SHARED.STATUS_PENDING_CLASS;
1876
2342
  }
1877
2343
  }
1878
2344
  getStatusIcon(status) {
1879
2345
  switch (status.toLowerCase()) {
1880
- case 'pending':
1881
- return 'pi pi-clock';
1882
- case 'approved':
1883
- return 'pi pi-check';
1884
- case 'alert':
1885
- return 'pi pi-exclamation-triangle';
1886
- case 'uploaded':
1887
- return 'pi pi-cloud-upload';
1888
- case 'reviewing':
1889
- return 'pi pi-eye';
1890
- case 'rejected':
1891
- return 'pi pi-times';
2346
+ case SHARED.PENDING_STATUS:
2347
+ return SHARED.ICON_CLOCK;
2348
+ case SHARED.APPROVED_STATUS:
2349
+ return SHARED.ICON_CHECK;
2350
+ case SHARED.ALERT_STATUS:
2351
+ return SHARED.ICON_EXCLAMATION_TRIANGLE;
2352
+ case SHARED.UPLOADED_STATUS:
2353
+ return SHARED.ICON_CLOUD_UPLOAD;
2354
+ case SHARED.REVIEWING_STATUS:
2355
+ return SHARED.ICON_EYE;
2356
+ case SHARED.REJECTED_STATUS:
2357
+ return SHARED.ICON_TIMES;
1892
2358
  default:
1893
- return 'pi pi-clock';
2359
+ return SHARED.ICON_CLOCK;
1894
2360
  }
1895
2361
  }
1896
- getFileSize(fileName) {
1897
- // Mock file size calculation - in real app, this would come from the document data
1898
- const sizes = ['2.4 MB', '1.8 MB', '3.2 MB', '1.1 MB', '4.5 MB', '2.1 MB'];
1899
- const randomIndex = Math.floor(Math.random() * sizes.length);
1900
- return sizes[randomIndex];
1901
- }
1902
2362
  getFileExtension(fileName) {
1903
- return fileName.split('.').pop()?.toUpperCase() || 'PDF';
2363
+ return fileName.split(SHARED.DOT).pop()?.toUpperCase() || SHARED.PDF;
1904
2364
  }
1905
2365
  onActionClick(event, rowData) {
1906
2366
  event.stopPropagation();
1907
- // Handle action menu click - can be extended with menu functionality
1908
- console.log('Action clicked for document:', rowData);
1909
2367
  }
1910
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TablePrimaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1911
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: TablePrimaryComponent, isStandalone: false, selector: "lib-table-primary", inputs: { tableData: "tableData", showHeader: "showHeader", tableStyle: "tableStyle" }, ngImport: i0, template: "<div class=\"card\">\r\n <p-table [value]=\"tableData.data\" [tableStyle]=\"tableStyle\">\r\n <ng-template pTemplate=\"header\" *ngIf=\"showHeader\">\r\n <tr>\r\n <th *ngFor=\"let col of tableData.columns\" [style.width]=\"col.width\">\r\n {{ col.header }}\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData>\r\n <tr>\r\n <td *ngFor=\"let col of tableData.columns\" [style.width]=\"col.width\">\r\n <!-- Document Cell -->\r\n <div *ngIf=\"col.type === 'document'\" class=\"document-cell\">\r\n <div class=\"document-info\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file-pdf\" *ngIf=\"getFileExtension(rowData[col.field]) === 'PDF'\"></i>\r\n <i class=\"pi pi-image\" *ngIf=\"getFileExtension(rowData[col.field]) === 'JPG' || getFileExtension(rowData[col.field]) === 'PNG'\"></i>\r\n <i class=\"pi pi-file-excel\" *ngIf=\"getFileExtension(rowData[col.field]) === 'XLSX'\"></i>\r\n <i class=\"pi pi-file\" *ngIf=\"getFileExtension(rowData[col.field]) !== 'PDF' && getFileExtension(rowData[col.field]) !== 'JPG' && getFileExtension(rowData[col.field]) !== 'PNG' && getFileExtension(rowData[col.field]) !== 'XLSX'\"></i>\r\n </div>\r\n <div class=\"document-details\">\r\n <div class=\"document-name\">{{ rowData.documentType }}</div>\r\n <div class=\"file-info\">{{ rowData[col.field] }} - {{ getFileSize(rowData[col.field]) }}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Status Cell -->\r\n <div *ngIf=\"col.type === 'status'\" class=\"status-cell\">\r\n <span class=\"status-pill\" [ngClass]=\"getStatusClass(rowData[col.field])\">\r\n <i [class]=\"getStatusIcon(rowData[col.field])\"></i>\r\n {{ rowData[col.field] }}\r\n </span>\r\n </div>\r\n\r\n <!-- Actions Cell -->\r\n <div *ngIf=\"col.type === 'actions'\" class=\"actions-cell\">\r\n <button pButton pRipple type=\"button\" icon=\"ri-delete-bin-6-line\" \r\n class=\"p-button-text p-button-rounded\" \r\n (click)=\"onActionClick($event, rowData)\">\r\n </button>\r\n </div>\r\n\r\n <!-- Default Text Cell -->\r\n <div *ngIf=\"!col.type || col.type === 'text'\" class=\"text-cell\">\r\n {{ rowData[col.field] }}\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:20px;font-size:14px;margin-bottom:.25rem;text-align:left}.document-cell .document-info .document-details .file-info{font-size:.75rem;color:#6c757d;text-align:left}.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}::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}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.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"] }, { kind: "directive", type: i8.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i5.Ripple, selector: "[pRipple]" }] });
2368
+ onRowClick(rowData) {
2369
+ this.rowClick.emit(rowData);
2370
+ }
2371
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TablePrimaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2372
+ 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 <th *ngFor=\"let col of tableData.columns\" [style.width]=\"col.width\">\r\n {{ col.header }}\r\n </th>\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 <td *ngFor=\"let col of tableData.columns\" [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\">{{ rowData.docName }}</div>\r\n <div class=\"file-info\">{{ rowData.fileName }} - {{ rowData.fileSize }}</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 <button pButton pRipple type=\"button\" [icon]=\"SHARED.ICON_DELETE\" \r\n class=\"p-button-text p-button-rounded\" \r\n (click)=\"onActionClick($event, rowData)\">\r\n </button>\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 </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:20px;font-size:14px;margin-bottom:.25rem;text-align:left}.document-cell .document-info .document-details .file-info{font-size:.75rem;color:#6c757d;text-align:left}.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}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.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"] }, { kind: "directive", type: i8.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i5$1.Ripple, selector: "[pRipple]" }] });
1912
2373
  }
1913
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TablePrimaryComponent, decorators: [{
2374
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TablePrimaryComponent, decorators: [{
1914
2375
  type: Component,
1915
- args: [{ selector: 'lib-table-primary', standalone: false, template: "<div class=\"card\">\r\n <p-table [value]=\"tableData.data\" [tableStyle]=\"tableStyle\">\r\n <ng-template pTemplate=\"header\" *ngIf=\"showHeader\">\r\n <tr>\r\n <th *ngFor=\"let col of tableData.columns\" [style.width]=\"col.width\">\r\n {{ col.header }}\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData>\r\n <tr>\r\n <td *ngFor=\"let col of tableData.columns\" [style.width]=\"col.width\">\r\n <!-- Document Cell -->\r\n <div *ngIf=\"col.type === 'document'\" class=\"document-cell\">\r\n <div class=\"document-info\">\r\n <div class=\"document-icon\">\r\n <i class=\"pi pi-file-pdf\" *ngIf=\"getFileExtension(rowData[col.field]) === 'PDF'\"></i>\r\n <i class=\"pi pi-image\" *ngIf=\"getFileExtension(rowData[col.field]) === 'JPG' || getFileExtension(rowData[col.field]) === 'PNG'\"></i>\r\n <i class=\"pi pi-file-excel\" *ngIf=\"getFileExtension(rowData[col.field]) === 'XLSX'\"></i>\r\n <i class=\"pi pi-file\" *ngIf=\"getFileExtension(rowData[col.field]) !== 'PDF' && getFileExtension(rowData[col.field]) !== 'JPG' && getFileExtension(rowData[col.field]) !== 'PNG' && getFileExtension(rowData[col.field]) !== 'XLSX'\"></i>\r\n </div>\r\n <div class=\"document-details\">\r\n <div class=\"document-name\">{{ rowData.documentType }}</div>\r\n <div class=\"file-info\">{{ rowData[col.field] }} - {{ getFileSize(rowData[col.field]) }}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Status Cell -->\r\n <div *ngIf=\"col.type === 'status'\" class=\"status-cell\">\r\n <span class=\"status-pill\" [ngClass]=\"getStatusClass(rowData[col.field])\">\r\n <i [class]=\"getStatusIcon(rowData[col.field])\"></i>\r\n {{ rowData[col.field] }}\r\n </span>\r\n </div>\r\n\r\n <!-- Actions Cell -->\r\n <div *ngIf=\"col.type === 'actions'\" class=\"actions-cell\">\r\n <button pButton pRipple type=\"button\" icon=\"ri-delete-bin-6-line\" \r\n class=\"p-button-text p-button-rounded\" \r\n (click)=\"onActionClick($event, rowData)\">\r\n </button>\r\n </div>\r\n\r\n <!-- Default Text Cell -->\r\n <div *ngIf=\"!col.type || col.type === 'text'\" class=\"text-cell\">\r\n {{ rowData[col.field] }}\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:20px;font-size:14px;margin-bottom:.25rem;text-align:left}.document-cell .document-info .document-details .file-info{font-size:.75rem;color:#6c757d;text-align:left}.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}::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}\n"] }]
2376
+ 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 <th *ngFor=\"let col of tableData.columns\" [style.width]=\"col.width\">\r\n {{ col.header }}\r\n </th>\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 <td *ngFor=\"let col of tableData.columns\" [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\">{{ rowData.docName }}</div>\r\n <div class=\"file-info\">{{ rowData.fileName }} - {{ rowData.fileSize }}</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 <button pButton pRipple type=\"button\" [icon]=\"SHARED.ICON_DELETE\" \r\n class=\"p-button-text p-button-rounded\" \r\n (click)=\"onActionClick($event, rowData)\">\r\n </button>\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 </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:20px;font-size:14px;margin-bottom:.25rem;text-align:left}.document-cell .document-info .document-details .file-info{font-size:.75rem;color:#6c757d;text-align:left}.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}\n"] }]
1916
2377
  }], propDecorators: { tableData: [{
1917
2378
  type: Input
1918
2379
  }], showHeader: [{
1919
2380
  type: Input
1920
2381
  }], tableStyle: [{
1921
2382
  type: Input
2383
+ }], rowClick: [{
2384
+ type: Output
1922
2385
  }] } });
1923
2386
 
1924
2387
  /**
@@ -1954,10 +2417,10 @@ class FileFormatService {
1954
2417
  return `${parseFloat(mbSize.toFixed(decimalPlaces))} ${sizes[SHARED.TWO]}`;
1955
2418
  }
1956
2419
  }
1957
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FileFormatService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1958
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FileFormatService, providedIn: 'root' });
2420
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FileFormatService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2421
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FileFormatService, providedIn: 'root' });
1959
2422
  }
1960
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FileFormatService, decorators: [{
2423
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FileFormatService, decorators: [{
1961
2424
  type: Injectable,
1962
2425
  args: [{
1963
2426
  providedIn: 'root'
@@ -2103,13 +2566,13 @@ class DocumentUploadComponent {
2103
2566
  triggerFileUpload() {
2104
2567
  this.fileUploader.choose();
2105
2568
  }
2106
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentUploadComponent, deps: [{ token: DocumentUploadService }, { token: DocumentService$1 }, { token: i3.PrimeNGConfig }, { token: FileFormatService }, { token: i3.MessageService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2107
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DocumentUploadComponent, isStandalone: false, selector: "lib-document-upload", inputs: { contextId: "contextId" }, viewQueries: [{ propertyName: "fileUploader", first: true, predicate: ["fileUploader"], descendants: true }], ngImport: i0, template: "<div class=\"grid\">\r\n <div class=\"col-12 md:col-12\">\r\n <p-fileUpload #fileUploader [multiple]=\"true\" auto=\"true\" accept=\"image/png,application/pdf\" maxFileSize=\"26214400\"\r\n (onSelect)=\"onSelectedFiles($event)\">\r\n <ng-template pTemplate=\"header\" let-chooseCallback=\"chooseCallback\" let-clearCallback=\"clearCallback\">\r\n <div class=\"docHeader p-2 flex flex-wrap justify-content-between align-items-center flex-1 gap-2\">\r\n <div class=\"flex gap-2\">\r\n <p-button (onClick)=\"choose($event, chooseCallback)\" icon=\"pi pi-images\" [rounded]=\"true\"\r\n [outlined]=\"true\" />\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"content\" let-removeFileCallback=\"removeFileCallback\"\r\n let-removeUploadedFileCallback=\"removeUploadedFileCallback\">\r\n <div class=\"col-12 md:col-12 p-0\">\r\n <div class=\"col-12 md:col-12 p-0\" *ngIf=\"uploadedFiles.length > 0\">\r\n <div *ngFor=\"let uploadedFile of uploadedFiles; let i = index\"\r\n class=\"m-0 flex flex-column align-items-center gap-1 mt-3\">\r\n <div class=\"col-12 md:col-12 p-0 flex documentInfo\">\r\n <div class=\"documentImage\">\r\n <img src=\"../../../../assets/images/document.png\" [alt]=\"uploadedFile.file.name\" width=\"45\" height=\"50\"\r\n class=\"object-contain\" />\r\n </div>\r\n <div class=\"flex w-full flex-column mt-2 ml-2\">\r\n <div class=\"flex justify-content-between\">\r\n <div style=\" font-weight: bold;font-size: 14px\">\r\n {{ uploadedFile.file.name }}\r\n </div>\r\n <i class=\"pi pi-times cursor-pointer\" (click)=\"handleDocumentRemove(uploadedFile.file,i)\"></i>\r\n </div>\r\n <div class=\"flex justify-content-between mt-1\">\r\n <div style=\"color: #676B89; font-size: 12px; color: green;\" class=\"pi pi-verified \"> {{ uploadedFile.formattedSize }}</div>\r\n <div class=\"white-space-nowrap\" style=\"color: #0F8BFD; font-family: 14px;\"> {{ uploadedFile.progress }} %</div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-12 p-0\">\r\n <p-progressBar [value]=\"totalSizePercent\" [showValue]=\"false\" styleClass=\"h-1/2rem md:ml-auto relative\"\r\n [ngClass]=\"{ 'exceeded-progress-bar': totalSizePercent > 100 }\">\r\n </p-progressBar>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"empty\" let-chooseCallback=\"chooseCallback\">\r\n <div *ngIf=\"!uploadedFiles.length\" class=\"flex align-items-center justify-content-center flex-column\"\r\n (click)=\"triggerFileUpload()\">\r\n <i class=\"pi pi-cloud-upload border-2 border-circle p-5 text-8xl text-400 border-400\"></i>\r\n <p class=\"mt-4 mb-0\">Drag and drop files here to upload.</p>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"file\"> </ng-template>\r\n </p-fileUpload>\r\n </div>\r\n</div>", styles: [".flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.flex-col{flex-direction:column}.text-muted-color{color:#6c757d}.p-fileupload-buttonbar{padding:0}.p-fileupload-content{background-color:#0f8bfd1a}.p-fileupload .p-fileupload-content{padding:1rem}.docHeader .p-button-icon{padding:.5rem}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i8.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: i7.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "component", type: i8$1.ProgressBar, selector: "p-progressBar", inputs: ["value", "showValue", "styleClass", "style", "unit", "mode", "color"] }], encapsulation: i0.ViewEncapsulation.None });
2569
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentUploadComponent, deps: [{ token: DocumentUploadService }, { token: DocumentService }, { token: i3.PrimeNGConfig }, { token: FileFormatService }, { token: i3.MessageService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2570
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentUploadComponent, isStandalone: false, selector: "lib-document-upload", inputs: { contextId: "contextId" }, viewQueries: [{ propertyName: "fileUploader", first: true, predicate: ["fileUploader"], descendants: true }], ngImport: i0, template: "<div class=\"grid\">\r\n <div class=\"col-12 md:col-12\">\r\n <p-fileUpload #fileUploader [multiple]=\"true\" auto=\"true\" accept=\"image/png,application/pdf\" maxFileSize=\"26214400\"\r\n (onSelect)=\"onSelectedFiles($event)\">\r\n <ng-template pTemplate=\"header\" let-chooseCallback=\"chooseCallback\" let-clearCallback=\"clearCallback\">\r\n <div class=\"docHeader p-2 flex flex-wrap justify-content-between align-items-center flex-1 gap-2\">\r\n <div class=\"flex gap-2\">\r\n <p-button (onClick)=\"choose($event, chooseCallback)\" icon=\"pi pi-images\" [rounded]=\"true\"\r\n [outlined]=\"true\" />\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"content\" let-removeFileCallback=\"removeFileCallback\"\r\n let-removeUploadedFileCallback=\"removeUploadedFileCallback\">\r\n <div class=\"col-12 md:col-12 p-0\">\r\n <div class=\"col-12 md:col-12 p-0\" *ngIf=\"uploadedFiles.length > 0\">\r\n <div *ngFor=\"let uploadedFile of uploadedFiles; let i = index\"\r\n class=\"m-0 flex flex-column align-items-center gap-1 mt-3\">\r\n <div class=\"col-12 md:col-12 p-0 flex documentInfo\">\r\n <div class=\"documentImage\">\r\n <img src=\"../../../../assets/images/document.png\" [alt]=\"uploadedFile.file.name\" width=\"45\" height=\"50\"\r\n class=\"object-contain\" />\r\n </div>\r\n <div class=\"flex w-full flex-column mt-2 ml-2\">\r\n <div class=\"flex justify-content-between\">\r\n <div style=\" font-weight: bold;font-size: 14px\">\r\n {{ uploadedFile.file.name }}\r\n </div>\r\n <i class=\"pi pi-times cursor-pointer\" (click)=\"handleDocumentRemove(uploadedFile.file,i)\"></i>\r\n </div>\r\n <div class=\"flex justify-content-between mt-1\">\r\n <div style=\"color: #676B89; font-size: 12px; color: green;\" class=\"pi pi-verified \"> {{ uploadedFile.formattedSize }}</div>\r\n <div class=\"white-space-nowrap\" style=\"color: #0F8BFD; font-family: 14px;\"> {{ uploadedFile.progress }} %</div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-12 p-0\">\r\n <p-progressBar [value]=\"totalSizePercent\" [showValue]=\"false\" styleClass=\"h-1/2rem md:ml-auto relative\"\r\n [ngClass]=\"{ 'exceeded-progress-bar': totalSizePercent > 100 }\">\r\n </p-progressBar>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"empty\" let-chooseCallback=\"chooseCallback\">\r\n <div *ngIf=\"!uploadedFiles.length\" class=\"flex align-items-center justify-content-center flex-column\"\r\n (click)=\"triggerFileUpload()\">\r\n <i class=\"pi pi-cloud-upload border-2 border-circle p-5 text-8xl text-400 border-400\"></i>\r\n <p class=\"mt-4 mb-0\">Drag and drop files here to upload.</p>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"file\"> </ng-template>\r\n </p-fileUpload>\r\n </div>\r\n</div>", styles: [".flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.flex-col{flex-direction:column}.text-muted-color{color:#6c757d}.p-fileupload-buttonbar{padding:0}.p-fileupload-content{background-color:#0f8bfd1a}.p-fileupload .p-fileupload-content{padding:1rem}.docHeader .p-button-icon{padding:.5rem}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i8.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: i7.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "component", type: i8$1.ProgressBar, selector: "p-progressBar", inputs: ["value", "showValue", "styleClass", "style", "unit", "mode", "color"] }], encapsulation: i0.ViewEncapsulation.None });
2108
2571
  }
2109
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentUploadComponent, decorators: [{
2572
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentUploadComponent, decorators: [{
2110
2573
  type: Component,
2111
2574
  args: [{ selector: 'lib-document-upload', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"grid\">\r\n <div class=\"col-12 md:col-12\">\r\n <p-fileUpload #fileUploader [multiple]=\"true\" auto=\"true\" accept=\"image/png,application/pdf\" maxFileSize=\"26214400\"\r\n (onSelect)=\"onSelectedFiles($event)\">\r\n <ng-template pTemplate=\"header\" let-chooseCallback=\"chooseCallback\" let-clearCallback=\"clearCallback\">\r\n <div class=\"docHeader p-2 flex flex-wrap justify-content-between align-items-center flex-1 gap-2\">\r\n <div class=\"flex gap-2\">\r\n <p-button (onClick)=\"choose($event, chooseCallback)\" icon=\"pi pi-images\" [rounded]=\"true\"\r\n [outlined]=\"true\" />\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"content\" let-removeFileCallback=\"removeFileCallback\"\r\n let-removeUploadedFileCallback=\"removeUploadedFileCallback\">\r\n <div class=\"col-12 md:col-12 p-0\">\r\n <div class=\"col-12 md:col-12 p-0\" *ngIf=\"uploadedFiles.length > 0\">\r\n <div *ngFor=\"let uploadedFile of uploadedFiles; let i = index\"\r\n class=\"m-0 flex flex-column align-items-center gap-1 mt-3\">\r\n <div class=\"col-12 md:col-12 p-0 flex documentInfo\">\r\n <div class=\"documentImage\">\r\n <img src=\"../../../../assets/images/document.png\" [alt]=\"uploadedFile.file.name\" width=\"45\" height=\"50\"\r\n class=\"object-contain\" />\r\n </div>\r\n <div class=\"flex w-full flex-column mt-2 ml-2\">\r\n <div class=\"flex justify-content-between\">\r\n <div style=\" font-weight: bold;font-size: 14px\">\r\n {{ uploadedFile.file.name }}\r\n </div>\r\n <i class=\"pi pi-times cursor-pointer\" (click)=\"handleDocumentRemove(uploadedFile.file,i)\"></i>\r\n </div>\r\n <div class=\"flex justify-content-between mt-1\">\r\n <div style=\"color: #676B89; font-size: 12px; color: green;\" class=\"pi pi-verified \"> {{ uploadedFile.formattedSize }}</div>\r\n <div class=\"white-space-nowrap\" style=\"color: #0F8BFD; font-family: 14px;\"> {{ uploadedFile.progress }} %</div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-12 p-0\">\r\n <p-progressBar [value]=\"totalSizePercent\" [showValue]=\"false\" styleClass=\"h-1/2rem md:ml-auto relative\"\r\n [ngClass]=\"{ 'exceeded-progress-bar': totalSizePercent > 100 }\">\r\n </p-progressBar>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"empty\" let-chooseCallback=\"chooseCallback\">\r\n <div *ngIf=\"!uploadedFiles.length\" class=\"flex align-items-center justify-content-center flex-column\"\r\n (click)=\"triggerFileUpload()\">\r\n <i class=\"pi pi-cloud-upload border-2 border-circle p-5 text-8xl text-400 border-400\"></i>\r\n <p class=\"mt-4 mb-0\">Drag and drop files here to upload.</p>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"file\"> </ng-template>\r\n </p-fileUpload>\r\n </div>\r\n</div>", styles: [".flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.flex-col{flex-direction:column}.text-muted-color{color:#6c757d}.p-fileupload-buttonbar{padding:0}.p-fileupload-content{background-color:#0f8bfd1a}.p-fileupload .p-fileupload-content{padding:1rem}.docHeader .p-button-icon{padding:.5rem}\n"] }]
2112
- }], ctorParameters: () => [{ type: DocumentUploadService }, { type: DocumentService$1 }, { type: i3.PrimeNGConfig }, { type: FileFormatService }, { type: i3.MessageService }, { type: i0.ChangeDetectorRef }], propDecorators: { contextId: [{
2575
+ }], ctorParameters: () => [{ type: DocumentUploadService }, { type: DocumentService }, { type: i3.PrimeNGConfig }, { type: FileFormatService }, { type: i3.MessageService }, { type: i0.ChangeDetectorRef }], propDecorators: { contextId: [{
2113
2576
  type: Input
2114
2577
  }], fileUploader: [{
2115
2578
  type: ViewChild,
@@ -2151,10 +2614,10 @@ class LinkedDocumentComponent {
2151
2614
  this.selectedDocument = document;
2152
2615
  this.selectedDocumentChange.emit(this.selectedDocument);
2153
2616
  }
2154
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: LinkedDocumentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2155
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: LinkedDocumentComponent, isStandalone: false, selector: "app-linked-document", inputs: { selectedDocument: "selectedDocument", documentList: "documentList" }, outputs: { selectedDocumentChange: "selectedDocumentChange" }, ngImport: i0, template: "<div class=\"summary-card mb-4 pb-1\">\r\n <div class=\"card p-0 mb-0\"\r\n style=\"border-bottom: 1px solid;border-color: rgba(68, 72, 109, 0.2); border-bottom-right-radius: 0px;border-bottom-left-radius: 0px; background-color: #F9fafb;\">\r\n <div class=\"p-0\">\r\n <h4 class=\"m-0 pt-3 pl-3 mb-3\" style=\"font-size: 21px; font-weight: bold; \">Linked Documents</h4>\r\n </div>\r\n </div>\r\n <div class=\"card mb-0\" style=\"border-top-right-radius: 0px;border-top-left-radius: 0px;\">\r\n @for(document of documentList; track document){\r\n <div class=\"linkedDocument documentName m-2\">\r\n <div class=\"documentName\" [class.selected]=\"document._id === selectedDocument?._id\"\r\n (click)=\"handleDocumentClick(document)\">\r\n <span class=\"pi pi-link\"></span>\r\n {{document.fileName}}\r\n </div>\r\n </div>\r\n }\r\n\r\n </div>\r\n \r\n \r\n </div>\r\n ", styles: [".documentName{font-family:inherit;text-decoration:underline;cursor:pointer;width:max-content}.selected{color:var(--primary-color)}\n"] });
2617
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LinkedDocumentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2618
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: LinkedDocumentComponent, isStandalone: false, selector: "app-linked-document", inputs: { selectedDocument: "selectedDocument", documentList: "documentList" }, outputs: { selectedDocumentChange: "selectedDocumentChange" }, ngImport: i0, template: "<div class=\"summary-card mb-4 pb-1\">\r\n <div class=\"card p-0 mb-0\"\r\n style=\"border-bottom: 1px solid;border-color: rgba(68, 72, 109, 0.2); border-bottom-right-radius: 0px;border-bottom-left-radius: 0px; background-color: #F9fafb;\">\r\n <div class=\"p-0\">\r\n <h4 class=\"m-0 pt-3 pl-3 mb-3\" style=\"font-size: 21px; font-weight: bold; \">Linked Documents</h4>\r\n </div>\r\n </div>\r\n <div class=\"card mb-0\" style=\"border-top-right-radius: 0px;border-top-left-radius: 0px;\">\r\n @for(document of documentList; track document){\r\n <div class=\"linkedDocument documentName m-2\">\r\n <div class=\"documentName\" [class.selected]=\"document._id === selectedDocument?._id\"\r\n (click)=\"handleDocumentClick(document)\">\r\n <span class=\"pi pi-link\"></span>\r\n {{document.fileName}}\r\n </div>\r\n </div>\r\n }\r\n\r\n </div>\r\n \r\n \r\n </div>\r\n ", styles: [".documentName{font-family:inherit;text-decoration:underline;cursor:pointer;width:max-content}.selected{color:var(--primary-color)}\n"] });
2156
2619
  }
2157
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: LinkedDocumentComponent, decorators: [{
2620
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LinkedDocumentComponent, decorators: [{
2158
2621
  type: Component,
2159
2622
  args: [{ selector: 'app-linked-document', standalone: false, template: "<div class=\"summary-card mb-4 pb-1\">\r\n <div class=\"card p-0 mb-0\"\r\n style=\"border-bottom: 1px solid;border-color: rgba(68, 72, 109, 0.2); border-bottom-right-radius: 0px;border-bottom-left-radius: 0px; background-color: #F9fafb;\">\r\n <div class=\"p-0\">\r\n <h4 class=\"m-0 pt-3 pl-3 mb-3\" style=\"font-size: 21px; font-weight: bold; \">Linked Documents</h4>\r\n </div>\r\n </div>\r\n <div class=\"card mb-0\" style=\"border-top-right-radius: 0px;border-top-left-radius: 0px;\">\r\n @for(document of documentList; track document){\r\n <div class=\"linkedDocument documentName m-2\">\r\n <div class=\"documentName\" [class.selected]=\"document._id === selectedDocument?._id\"\r\n (click)=\"handleDocumentClick(document)\">\r\n <span class=\"pi pi-link\"></span>\r\n {{document.fileName}}\r\n </div>\r\n </div>\r\n }\r\n\r\n </div>\r\n \r\n \r\n </div>\r\n ", styles: [".documentName{font-family:inherit;text-decoration:underline;cursor:pointer;width:max-content}.selected{color:var(--primary-color)}\n"] }]
2160
2623
  }], propDecorators: { selectedDocument: [{
@@ -2243,13 +2706,13 @@ class DocumentViewerComponent {
2243
2706
  ngOnDestroy() {
2244
2707
  this.subscription.unsubscribe();
2245
2708
  }
2246
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentViewerComponent, deps: [{ token: DocumentHttpService }, { token: DocumentService }], target: i0.ɵɵFactoryTarget.Component });
2247
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: DocumentViewerComponent, isStandalone: false, selector: "document-viewer", inputs: { selectedDocument: "selectedDocument", documentList: "documentList" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"grid\">\r\n <div class=\"col-12\">\r\n <div class=\"p-fluid p-formgrid grid m-0\">\r\n <div class=\"col-12 md:col-12 md:flex justify-content-evenly\">\r\n @if(selectedDocument){\r\n <div id=\"outerContainer col-12 md:col-7\">\r\n <div\r\n *ngIf=\"isImage(selectedDocument?.contentType)\"\r\n class=\"img-container\"\r\n >\r\n <img\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n class=\"uploadedImages\"\r\n alt=\"Document Image\"\r\n />\r\n </div>\r\n @if(selectedDocument?.contentType && selectedDocument?.contentType === \"application/pdf\"){\r\n <div class=\"pdf-container\">\r\n <pdf-viewer\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n [rotation]=\"0\"\r\n [original-size]=\"false\"\r\n [show-all]=\"true\"\r\n [fit-to-page]=\"false\"\r\n [zoom]=\"1\"\r\n [zoom-scale]=\"'page-width'\"\r\n [stick-to-page]=\"false\"\r\n [render-text]=\"true\"\r\n [external-link-target]=\"'blank'\"\r\n [autoresize]=\"true\"\r\n [show-borders]=\"false\"\r\n style=\"width: 50vw; height: 75vh\"\r\n ></pdf-viewer>\r\n </div>\r\n }@else{\r\n <div class=\"incorrect-docType\">\r\n ContentType is incorrect.\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"left-part col-12 md:col-3 pt-0\">\r\n <div class=\"alerts mb-4 pb-1\">\r\n <button\r\n type=\"button\"\r\n *ngIf=\"\r\n (alertData?.status !== 'Pending' && !!alertData?.status) ||\r\n alertData?.isAlert === false\r\n \"\r\n class=\"bg-green-500 border-none border-round-md flex align-items-center mb-3 p-2 px-3\"\r\n >\r\n <i\r\n class=\"pi pi-verified mr-2 cursor-pointer\"\r\n [ngStyle]=\"{\r\n color:\r\n alertData?.status === 'Pending' &&\r\n alertData?.isAlert !== false\r\n ? '#FFFFFF'\r\n : '#8A8EA6'\r\n }\"\r\n style=\"font-size: 20px\"\r\n ></i>\r\n <span class=\"font-semibold text-white\">Verified</span>\r\n </button>\r\n <div\r\n class=\"card mb-0\"\r\n [ngClass]=\"\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? 'alert-card'\r\n : 'success-alert'\r\n \"\r\n >\r\n <div class=\"flex align-items-center mb-2 pb-1\" *ngIf=\"alertData?.status !== 'Verified'\">\r\n <h4 class=\"mr-3 mt-0 mb-0 text-color font-bold\" style=\"font-size: 21px; font-weight: bold; border-color: rgba(68, 72, 109, 0.2) ;\" >Alerts</h4>\r\n <i\r\n class=\"pi pi-exclamation-triangle\"\r\n style=\"font-size: 20px\"\r\n [ngStyle]=\"{\r\n color:\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? '#FB392D'\r\n : '#8A8EA6'\r\n }\"\r\n ></i>\r\n </div>\r\n <p class=\"text-color mb-0\">{{ alertData?.alertMessage }}</p>\r\n </div>\r\n </div>\r\n <ng-content></ng-content>\r\n <app-linked-document (selectedDocumentChange)=\"handleSelectedDocument($event)\" [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\"></app-linked-document>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".alert-card{background-color:#fb392d1a}.success-alert{border-radius:10px;border:1px solid rgba(251,57,45,.1);background:linear-gradient(0deg,#dedede 0% 100%),#fff}.p-timeline-event-opposite{display:none}.decription{color:#676b89}.textAreaControl textarea{width:100%;resize:vertical;max-width:100%}.document-btn-wrapper .p-button-outlined{color:#f57c00}.document-viewer .p-dialog{width:100%;height:100%;max-height:100%!important;box-shadow:none!important}.document-viewer .p-dialog-header-close-icon{height:20px;width:20px}.document-viewer .p-dialog-header,.document-viewer .p-dialog-content{background-color:#fff;border-radius:0}.uploadedImages{width:95%;height:100%;object-fit:contain}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i4$1.PdfViewerComponent, selector: "pdf-viewer", inputs: ["src", "c-maps-url", "page", "render-text", "render-text-mode", "original-size", "show-all", "stick-to-page", "zoom", "zoom-scale", "rotation", "external-link-target", "autoresize", "fit-to-page", "show-borders"], outputs: ["after-load-complete", "page-rendered", "pages-initialized", "text-layer-rendered", "error", "on-progress", "pageChange"] }, { kind: "component", type: LinkedDocumentComponent, selector: "app-linked-document", inputs: ["selectedDocument", "documentList"], outputs: ["selectedDocumentChange"] }], encapsulation: i0.ViewEncapsulation.None });
2709
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentViewerComponent, deps: [{ token: DocumentHttpService }, { token: DocumentHelperService }], target: i0.ɵɵFactoryTarget.Component });
2710
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentViewerComponent, isStandalone: false, selector: "document-viewer", inputs: { selectedDocument: "selectedDocument", documentList: "documentList" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"grid\">\r\n <div class=\"col-12\">\r\n <div class=\"p-fluid p-formgrid grid m-0\">\r\n <div class=\"col-12 md:col-12 md:flex justify-content-evenly\">\r\n @if(selectedDocument){\r\n <div id=\"outerContainer col-12 md:col-7\">\r\n <div\r\n *ngIf=\"isImage(selectedDocument?.contentType)\"\r\n class=\"img-container\"\r\n >\r\n <img\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n class=\"uploadedImages\"\r\n alt=\"Document Image\"\r\n />\r\n </div>\r\n @if(selectedDocument?.contentType && selectedDocument?.contentType === \"application/pdf\"){\r\n <div class=\"pdf-container\">\r\n <pdf-viewer\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n [rotation]=\"0\"\r\n [original-size]=\"false\"\r\n [show-all]=\"true\"\r\n [fit-to-page]=\"false\"\r\n [zoom]=\"1\"\r\n [zoom-scale]=\"'page-width'\"\r\n [stick-to-page]=\"false\"\r\n [render-text]=\"true\"\r\n [external-link-target]=\"'blank'\"\r\n [autoresize]=\"true\"\r\n [show-borders]=\"false\"\r\n style=\"width: 50vw; height: 75vh\"\r\n ></pdf-viewer>\r\n </div>\r\n }@else{\r\n <div class=\"incorrect-docType\">\r\n ContentType is incorrect.\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"left-part col-12 md:col-3 pt-0\">\r\n <div class=\"alerts mb-4 pb-1\">\r\n <button\r\n type=\"button\"\r\n *ngIf=\"\r\n (alertData?.status !== 'Pending' && !!alertData?.status) ||\r\n alertData?.isAlert === false\r\n \"\r\n class=\"bg-green-500 border-none border-round-md flex align-items-center mb-3 p-2 px-3\"\r\n >\r\n <i\r\n class=\"pi pi-verified mr-2 cursor-pointer\"\r\n [ngStyle]=\"{\r\n color:\r\n alertData?.status === 'Pending' &&\r\n alertData?.isAlert !== false\r\n ? '#FFFFFF'\r\n : '#8A8EA6'\r\n }\"\r\n style=\"font-size: 20px\"\r\n ></i>\r\n <span class=\"font-semibold text-white\">Verified</span>\r\n </button>\r\n <div\r\n class=\"card mb-0\"\r\n [ngClass]=\"\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? 'alert-card'\r\n : 'success-alert'\r\n \"\r\n >\r\n <div class=\"flex align-items-center mb-2 pb-1\" *ngIf=\"alertData?.status !== 'Verified'\">\r\n <h4 class=\"mr-3 mt-0 mb-0 text-color font-bold\" style=\"font-size: 21px; font-weight: bold; border-color: rgba(68, 72, 109, 0.2) ;\" >Alerts</h4>\r\n <i\r\n class=\"pi pi-exclamation-triangle\"\r\n style=\"font-size: 20px\"\r\n [ngStyle]=\"{\r\n color:\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? '#FB392D'\r\n : '#8A8EA6'\r\n }\"\r\n ></i>\r\n </div>\r\n <p class=\"text-color mb-0\">{{ alertData?.alertMessage }}</p>\r\n </div>\r\n </div>\r\n <ng-content></ng-content>\r\n <app-linked-document (selectedDocumentChange)=\"handleSelectedDocument($event)\" [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\"></app-linked-document>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".alert-card{background-color:#fb392d1a}.success-alert{border-radius:10px;border:1px solid rgba(251,57,45,.1);background:linear-gradient(0deg,#dedede 0% 100%),#fff}.p-timeline-event-opposite{display:none}.decription{color:#676b89}.textAreaControl textarea{width:100%;resize:vertical;max-width:100%}.document-btn-wrapper .p-button-outlined{color:#f57c00}.document-viewer .p-dialog{width:100%;height:100%;max-height:100%!important;box-shadow:none!important}.document-viewer .p-dialog-header-close-icon{height:20px;width:20px}.document-viewer .p-dialog-header,.document-viewer .p-dialog-content{background-color:#fff;border-radius:0}.uploadedImages{width:95%;height:100%;object-fit:contain}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i4.PdfViewerComponent, selector: "pdf-viewer", inputs: ["src", "c-maps-url", "page", "render-text", "render-text-mode", "original-size", "show-all", "stick-to-page", "zoom", "zoom-scale", "rotation", "external-link-target", "autoresize", "fit-to-page", "show-borders"], outputs: ["after-load-complete", "page-rendered", "pages-initialized", "text-layer-rendered", "error", "on-progress", "pageChange"] }, { kind: "component", type: LinkedDocumentComponent, selector: "app-linked-document", inputs: ["selectedDocument", "documentList"], outputs: ["selectedDocumentChange"] }], encapsulation: i0.ViewEncapsulation.None });
2248
2711
  }
2249
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentViewerComponent, decorators: [{
2712
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentViewerComponent, decorators: [{
2250
2713
  type: Component,
2251
2714
  args: [{ selector: 'document-viewer', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"grid\">\r\n <div class=\"col-12\">\r\n <div class=\"p-fluid p-formgrid grid m-0\">\r\n <div class=\"col-12 md:col-12 md:flex justify-content-evenly\">\r\n @if(selectedDocument){\r\n <div id=\"outerContainer col-12 md:col-7\">\r\n <div\r\n *ngIf=\"isImage(selectedDocument?.contentType)\"\r\n class=\"img-container\"\r\n >\r\n <img\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n class=\"uploadedImages\"\r\n alt=\"Document Image\"\r\n />\r\n </div>\r\n @if(selectedDocument?.contentType && selectedDocument?.contentType === \"application/pdf\"){\r\n <div class=\"pdf-container\">\r\n <pdf-viewer\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n [rotation]=\"0\"\r\n [original-size]=\"false\"\r\n [show-all]=\"true\"\r\n [fit-to-page]=\"false\"\r\n [zoom]=\"1\"\r\n [zoom-scale]=\"'page-width'\"\r\n [stick-to-page]=\"false\"\r\n [render-text]=\"true\"\r\n [external-link-target]=\"'blank'\"\r\n [autoresize]=\"true\"\r\n [show-borders]=\"false\"\r\n style=\"width: 50vw; height: 75vh\"\r\n ></pdf-viewer>\r\n </div>\r\n }@else{\r\n <div class=\"incorrect-docType\">\r\n ContentType is incorrect.\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"left-part col-12 md:col-3 pt-0\">\r\n <div class=\"alerts mb-4 pb-1\">\r\n <button\r\n type=\"button\"\r\n *ngIf=\"\r\n (alertData?.status !== 'Pending' && !!alertData?.status) ||\r\n alertData?.isAlert === false\r\n \"\r\n class=\"bg-green-500 border-none border-round-md flex align-items-center mb-3 p-2 px-3\"\r\n >\r\n <i\r\n class=\"pi pi-verified mr-2 cursor-pointer\"\r\n [ngStyle]=\"{\r\n color:\r\n alertData?.status === 'Pending' &&\r\n alertData?.isAlert !== false\r\n ? '#FFFFFF'\r\n : '#8A8EA6'\r\n }\"\r\n style=\"font-size: 20px\"\r\n ></i>\r\n <span class=\"font-semibold text-white\">Verified</span>\r\n </button>\r\n <div\r\n class=\"card mb-0\"\r\n [ngClass]=\"\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? 'alert-card'\r\n : 'success-alert'\r\n \"\r\n >\r\n <div class=\"flex align-items-center mb-2 pb-1\" *ngIf=\"alertData?.status !== 'Verified'\">\r\n <h4 class=\"mr-3 mt-0 mb-0 text-color font-bold\" style=\"font-size: 21px; font-weight: bold; border-color: rgba(68, 72, 109, 0.2) ;\" >Alerts</h4>\r\n <i\r\n class=\"pi pi-exclamation-triangle\"\r\n style=\"font-size: 20px\"\r\n [ngStyle]=\"{\r\n color:\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? '#FB392D'\r\n : '#8A8EA6'\r\n }\"\r\n ></i>\r\n </div>\r\n <p class=\"text-color mb-0\">{{ alertData?.alertMessage }}</p>\r\n </div>\r\n </div>\r\n <ng-content></ng-content>\r\n <app-linked-document (selectedDocumentChange)=\"handleSelectedDocument($event)\" [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\"></app-linked-document>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".alert-card{background-color:#fb392d1a}.success-alert{border-radius:10px;border:1px solid rgba(251,57,45,.1);background:linear-gradient(0deg,#dedede 0% 100%),#fff}.p-timeline-event-opposite{display:none}.decription{color:#676b89}.textAreaControl textarea{width:100%;resize:vertical;max-width:100%}.document-btn-wrapper .p-button-outlined{color:#f57c00}.document-viewer .p-dialog{width:100%;height:100%;max-height:100%!important;box-shadow:none!important}.document-viewer .p-dialog-header-close-icon{height:20px;width:20px}.document-viewer .p-dialog-header,.document-viewer .p-dialog-content{background-color:#fff;border-radius:0}.uploadedImages{width:95%;height:100%;object-fit:contain}\n"] }]
2252
- }], ctorParameters: () => [{ type: DocumentHttpService }, { type: DocumentService }], propDecorators: { selectedDocument: [{
2715
+ }], ctorParameters: () => [{ type: DocumentHttpService }, { type: DocumentHelperService }], propDecorators: { selectedDocument: [{
2253
2716
  type: Input
2254
2717
  }], documentList: [{
2255
2718
  type: Input
@@ -2266,7 +2729,6 @@ class DocumentListComponent {
2266
2729
  documentQuery;
2267
2730
  documentStore;
2268
2731
  documentTableBuilder;
2269
- onRefresh = new EventEmitter();
2270
2732
  /**
2271
2733
  * Represents the context ID for the document list.
2272
2734
  * This value is passed from the parent component.
@@ -2274,6 +2736,16 @@ class DocumentListComponent {
2274
2736
  * @memberof DocumentListComponent
2275
2737
  */
2276
2738
  contextId = SHARED.EMPTY;
2739
+ /**
2740
+ * The document list response data passed from the parent component.
2741
+ * @type {DocumentListResponse[] | null}
2742
+ * @memberof DocumentListComponent
2743
+ */
2744
+ documentListResponse = null;
2745
+ /**
2746
+ * Subscription to document list response from store
2747
+ */
2748
+ documentListSubscription = new Subscription();
2277
2749
  /**
2278
2750
  * Default visibility of the upload button.
2279
2751
  * @type {boolean}
@@ -2292,12 +2764,6 @@ class DocumentListComponent {
2292
2764
  * @memberof DocumentListComponent
2293
2765
  */
2294
2766
  isSidebarVisible = SHARED.FALSE;
2295
- /**
2296
- * Default visibility of the Accordion.
2297
- * @type {boolean}
2298
- * @memberof DocumentListComponent
2299
- */
2300
- isCollapsed = SHARED.FALSE;
2301
2767
  /**
2302
2768
  * Default visibility of the messages.
2303
2769
  * @type {Message[]}
@@ -2346,13 +2812,23 @@ class DocumentListComponent {
2346
2812
  */
2347
2813
  fileName;
2348
2814
  /**
2349
- * Document sections data for rendering tables
2815
+ * Table data for each category
2816
+ */
2817
+ categoryTables = [];
2818
+ /**
2819
+ * Document categories from the response
2350
2820
  */
2351
- documentSections = DUMMY_DOCUMENT_SECTIONS;
2821
+ documentCategories = [];
2352
2822
  /**
2353
- * Table data for each section
2823
+ * Completion counts for each category
2354
2824
  */
2355
- sectionTables = [];
2825
+ categoryCompletionCounts = [];
2826
+ /**
2827
+ * Filter properties
2828
+ */
2829
+ status = null;
2830
+ category = null;
2831
+ searchKey = null;
2356
2832
  /**
2357
2833
  * Creates an instance of DocumentListComponent.
2358
2834
  * @class
@@ -2373,7 +2849,7 @@ class DocumentListComponent {
2373
2849
  */
2374
2850
  ngOnInit() {
2375
2851
  this.getDocumentTypeList();
2376
- this.buildSectionTables();
2852
+ this.setupDocumentListSubscription();
2377
2853
  }
2378
2854
  /**
2379
2855
  * Handles the click event for file upload.
@@ -2386,17 +2862,6 @@ class DocumentListComponent {
2386
2862
  this.documentStore.setMessage(SHARED.EMPTY_ARRAY);
2387
2863
  this.isSidebarVisible = SHARED.TRUE;
2388
2864
  }
2389
- /**
2390
- * Handles the selection of an individual document.
2391
- * Opens a dialog to display or manage the selected document.
2392
- * @param {DocumentModel} document - The document that was clicked by the user.
2393
- * @memberof DocumentListComponent
2394
- */
2395
- handleClickForDocument(document) {
2396
- this.isdialogVisible = SHARED.TRUE;
2397
- this.selectedDocument = document;
2398
- this.fileName = document.fileName;
2399
- }
2400
2865
  /**
2401
2866
  * Handles the save click event to update the document's file name.
2402
2867
  * This method creates a payload with the updated file name and calls the
@@ -2411,15 +2876,6 @@ class DocumentListComponent {
2411
2876
  console.log(`${SHARED.UPDATE_DOCUMENT_NAME} ${this.selectedDocument._id}`);
2412
2877
  });
2413
2878
  }
2414
- /**
2415
- * Closes the dialog and resets the selected document.
2416
- * @memberof DocumentListComponent
2417
- */
2418
- handleCloseModal() {
2419
- this.selectedDocument = { _id: SHARED.EMPTY };
2420
- this.isdialogVisible = SHARED.FALSE;
2421
- this.onRefresh.emit();
2422
- }
2423
2879
  /**
2424
2880
  * Handles the upload action for a document.
2425
2881
  * Validates if a document type is selected and logs the result.
@@ -2432,7 +2888,6 @@ class DocumentListComponent {
2432
2888
  this.documentQuery.selectMessages().subscribe((message) => {
2433
2889
  if (message.length > 0) {
2434
2890
  this.messages = message;
2435
- this.onRefresh.emit();
2436
2891
  this.selectedOption = null;
2437
2892
  setTimeout(() => {
2438
2893
  this.messages = SHARED.EMPTY_ARRAY;
@@ -2481,115 +2936,326 @@ class DocumentListComponent {
2481
2936
  this.isSidebarVisible = isVisible;
2482
2937
  }
2483
2938
  /**
2484
- * Builds table data for all document sections
2939
+ * Gets completion count for a category
2940
+ */
2941
+ getCompletionCount(category) {
2942
+ return this.documentTableBuilder.getCompletionCount(category);
2943
+ }
2944
+ /**
2945
+ * Gets pending document count for a category
2946
+ */
2947
+ getPendingDocumentCount(category) {
2948
+ return this.documentTableBuilder.getPendingDocumentCount(category);
2949
+ }
2950
+ /**
2951
+ * Gets approved document count for a category
2485
2952
  */
2486
- buildSectionTables() {
2487
- this.sectionTables = this.documentTableBuilder.buildDocumentSectionsTables(this.documentSections);
2953
+ getApprovedDocumentCount(category) {
2954
+ return this.documentTableBuilder.getApprovedDocumentCount(category);
2488
2955
  }
2489
2956
  /**
2490
- * Gets completion count for a section
2957
+ * Builds document categories from the API response
2491
2958
  */
2492
- getCompletionCount(section) {
2493
- return this.documentTableBuilder.getCompletionCount(section);
2959
+ buildDocumentCategories() {
2960
+ if (!this.documentListResponse) {
2961
+ this.documentCategories = SHARED.EMPTY_ARRAY;
2962
+ this.categoryTables = SHARED.EMPTY_ARRAY;
2963
+ this.categoryCompletionCounts = SHARED.EMPTY_ARRAY;
2964
+ return;
2965
+ }
2966
+ this.documentCategories = [...this.documentListResponse];
2967
+ this.categoryTables = this.documentListResponse.map(category => this.documentTableBuilder.buildDocumentTable(category.list));
2968
+ this.categoryCompletionCounts = this.documentListResponse.map(category => this.getCompletionCount(category));
2494
2969
  }
2495
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentListComponent, deps: [{ token: DocumentUploadService }, { token: DocumentHttpService }, { token: DocumentQuery }, { token: DocumentStore }, { token: DocumentTableBuilderService }], target: i0.ɵɵFactoryTarget.Component });
2496
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DocumentListComponent, isStandalone: false, selector: "lib-document-list", inputs: { contextId: "contextId", isUploadButtonVisible: "isUploadButtonVisible", isCollapsed: "isCollapsed", documentList: "documentList" }, outputs: { onRefresh: "onRefresh" }, ngImport: i0, template: "<div class=\"document-viewer\">\r\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\" (onHide)=\"handleCloseModal()\"\r\n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\">\r\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\">\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\r\n <ng-content></ng-content>\r\n \r\n </document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<!-- Document Sections Tables -->\r\n<div class=\"document-sections-container\">\r\n <div class=\"section\" *ngFor=\"let section of documentSections; let i = index\">\r\n <div class=\"section-header\">\r\n <div class=\"section-title\">\r\n <h3>{{ section.header }} Documents</h3>\r\n <p class=\"section-description\">{{ section.description }}</p>\r\n </div>\r\n <div class=\"completion-status\">\r\n <span class=\"status-badge\">{{ getCompletionCount(section) }} Complete</span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"table-container\">\r\n <lib-table-primary \r\n [tableData]=\"sectionTables[i]\" \r\n [tableStyle]=\"{ 'min-width': '100%' }\">\r\n </lib-table-primary>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- Original Document List (commented out for now) -->\r\n<!--\r\n<div class=\"col-12 p-0\">\r\n <div class=\"card p-0 mb-0 document-list-wrapper\">\r\n <p-accordion [activeIndex]=\"isCollapsed ? -1 : 0\">\r\n <p-accordionTab class=\"line-height-2 m-0\">\r\n <ng-template pTemplate=\"header\" let-active=\"active\">\r\n <div class=\"flex align-items-center justify-content-between w-full\">\r\n <span class=\"flex align-items-center gap-2 document-title-wrapper\">\r\n Documents\r\n </span>\r\n @if(isUploadButtonVisible){\r\n <button pButton pRipple class=\"p-button-raised col-3\" [permission]=\"PERMISSION.DOCUMENT_POST\" type=\"button\"\r\n label=\"Upload File\" style=\"border-radius: 10px;\" (click)=\"handleFileUploadClick($event)\"></button>\r\n }\r\n </div>\r\n </ng-template>\r\n @for(document of documentList; track document){\r\n <lib-document-list-item [document]=\"document\"\r\n (documentClick)=\"handleClickForDocument($event)\"></lib-document-list-item>\r\n }\r\n </p-accordionTab>\r\n </p-accordion>\r\n </div>\r\n</div>\r\n-->\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-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-sections-container{padding:.5rem}.document-sections-container .section .section-header{flex-direction:column;gap:1rem;align-items:flex-start}.document-sections-container .section .section-header .completion-status{align-self:flex-end}}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i8.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i8.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: i9.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: i10.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "directive", type: i11.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: i11.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i11.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i12.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: i13.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: i14.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: TablePrimaryComponent, selector: "lib-table-primary", inputs: ["tableData", "showHeader", "tableStyle"] }, { kind: "component", type: DocumentUploadComponent, selector: "lib-document-upload", inputs: ["contextId"] }, { kind: "component", type: DocumentViewerComponent, selector: "document-viewer", inputs: ["selectedDocument", "documentList"] }], encapsulation: i0.ViewEncapsulation.None });
2970
+ /**
2971
+ * Sets up subscription to document list response from store
2972
+ */
2973
+ setupDocumentListSubscription() {
2974
+ this.documentListSubscription.add(this.documentQuery.selectDocumentListResponse().subscribe({
2975
+ next: (response) => {
2976
+ this.documentListResponse = response;
2977
+ this.buildDocumentCategories();
2978
+ },
2979
+ error: (error) => {
2980
+ console.error('Error receiving document list response:', error);
2981
+ }
2982
+ }));
2983
+ }
2984
+ handleTableRowClick(rowData) {
2985
+ this.isdialogVisible = SHARED.TRUE;
2986
+ this.selectedDocument = rowData;
2987
+ }
2988
+ /**
2989
+ * Cleanup subscriptions on component destroy
2990
+ */
2991
+ ngOnDestroy() {
2992
+ this.documentListSubscription.unsubscribe();
2993
+ }
2994
+ 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 }], target: i0.ɵɵFactoryTarget.Component });
2995
+ 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 [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\">\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\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 </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.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i8.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i8.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: i9.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: i10.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "directive", type: i11.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: i11.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i11.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i12.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: i13.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: i14.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: TablePrimaryComponent, selector: "lib-table-primary", inputs: ["tableData", "showHeader", "tableStyle"], outputs: ["rowClick"] }, { kind: "component", type: DocumentUploadComponent, selector: "lib-document-upload", inputs: ["contextId"] }, { kind: "component", type: DocumentViewerComponent, selector: "document-viewer", inputs: ["selectedDocument", "documentList"] }], encapsulation: i0.ViewEncapsulation.None });
2497
2996
  }
2498
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentListComponent, decorators: [{
2997
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListComponent, decorators: [{
2499
2998
  type: Component,
2500
- args: [{ selector: 'lib-document-list', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-viewer\">\r\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\" (onHide)=\"handleCloseModal()\"\r\n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\">\r\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\">\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\r\n <ng-content></ng-content>\r\n \r\n </document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<!-- Document Sections Tables -->\r\n<div class=\"document-sections-container\">\r\n <div class=\"section\" *ngFor=\"let section of documentSections; let i = index\">\r\n <div class=\"section-header\">\r\n <div class=\"section-title\">\r\n <h3>{{ section.header }} Documents</h3>\r\n <p class=\"section-description\">{{ section.description }}</p>\r\n </div>\r\n <div class=\"completion-status\">\r\n <span class=\"status-badge\">{{ getCompletionCount(section) }} Complete</span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"table-container\">\r\n <lib-table-primary \r\n [tableData]=\"sectionTables[i]\" \r\n [tableStyle]=\"{ 'min-width': '100%' }\">\r\n </lib-table-primary>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- Original Document List (commented out for now) -->\r\n<!--\r\n<div class=\"col-12 p-0\">\r\n <div class=\"card p-0 mb-0 document-list-wrapper\">\r\n <p-accordion [activeIndex]=\"isCollapsed ? -1 : 0\">\r\n <p-accordionTab class=\"line-height-2 m-0\">\r\n <ng-template pTemplate=\"header\" let-active=\"active\">\r\n <div class=\"flex align-items-center justify-content-between w-full\">\r\n <span class=\"flex align-items-center gap-2 document-title-wrapper\">\r\n Documents\r\n </span>\r\n @if(isUploadButtonVisible){\r\n <button pButton pRipple class=\"p-button-raised col-3\" [permission]=\"PERMISSION.DOCUMENT_POST\" type=\"button\"\r\n label=\"Upload File\" style=\"border-radius: 10px;\" (click)=\"handleFileUploadClick($event)\"></button>\r\n }\r\n </div>\r\n </ng-template>\r\n @for(document of documentList; track document){\r\n <lib-document-list-item [document]=\"document\"\r\n (documentClick)=\"handleClickForDocument($event)\"></lib-document-list-item>\r\n }\r\n </p-accordionTab>\r\n </p-accordion>\r\n </div>\r\n</div>\r\n-->\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-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-sections-container{padding:.5rem}.document-sections-container .section .section-header{flex-direction:column;gap:1rem;align-items:flex-start}.document-sections-container .section .section-header .completion-status{align-self:flex-end}}\n"] }]
2501
- }], ctorParameters: () => [{ type: DocumentUploadService }, { type: DocumentHttpService }, { type: DocumentQuery }, { type: DocumentStore }, { type: DocumentTableBuilderService }], propDecorators: { onRefresh: [{
2502
- type: Output
2503
- }], contextId: [{
2999
+ args: [{ selector: 'lib-document-list', standalone: false, encapsulation: ViewEncapsulation.None, 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 [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\">\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\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 </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"] }]
3000
+ }], ctorParameters: () => [{ type: DocumentUploadService }, { type: DocumentHttpService }, { type: DocumentQuery }, { type: DocumentStore }, { type: DocumentTableBuilderService }], propDecorators: { contextId: [{
2504
3001
  type: Input
2505
- }], isUploadButtonVisible: [{
3002
+ }], documentListResponse: [{
2506
3003
  type: Input
2507
- }], isCollapsed: [{
3004
+ }], isUploadButtonVisible: [{
2508
3005
  type: Input
2509
3006
  }], documentList: [{
2510
3007
  type: Input
3008
+ }], status: [{
3009
+ type: Input
3010
+ }], category: [{
3011
+ type: Input
3012
+ }], searchKey: [{
3013
+ type: Input
2511
3014
  }] } });
2512
3015
 
3016
+ class DocumentMenuService {
3017
+ documentStore;
3018
+ constructor(documentStore) {
3019
+ this.documentStore = documentStore;
3020
+ }
3021
+ /**
3022
+ * Gets the category name for a given menu item _id
3023
+ * @param menuItemId - The _id of the menu item
3024
+ * @param categories - The list of document categories
3025
+ * @returns The category name or null if not found
3026
+ */
3027
+ getMenuItemCategory(menuItemId, categories) {
3028
+ for (const category of categories) {
3029
+ if (category.items?.some((menuItem) => menuItem._id === menuItemId)) {
3030
+ return category.label;
3031
+ }
3032
+ }
3033
+ return null;
3034
+ }
3035
+ /**
3036
+ * Gets the menu item by its _id
3037
+ * @param menuItemId - The _id of the menu item
3038
+ * @param categories - The list of document categories
3039
+ * @returns The menu item or null if not found
3040
+ */
3041
+ getMenuItemById(menuItemId, categories) {
3042
+ for (const category of categories) {
3043
+ if (category.items) {
3044
+ const item = category.items.find((menuItem) => menuItem._id === menuItemId);
3045
+ if (item) {
3046
+ return item;
3047
+ }
3048
+ }
3049
+ }
3050
+ return null;
3051
+ }
3052
+ /**
3053
+ * Handles user list visibility based on menu item category
3054
+ * @param menuItemId - The _id of the menu item
3055
+ * @param categories - The list of document categories
3056
+ */
3057
+ handleUserListVisibility(menuItemId, categories) {
3058
+ const category = this.getMenuItemCategory(menuItemId, categories);
3059
+ const menuItem = this.getMenuItemById(menuItemId, categories);
3060
+ if (category === SHARED.APPLICATION) {
3061
+ this.documentStore.setShowUserList(true);
3062
+ }
3063
+ else if (category === SHARED.APPLICANTS) {
3064
+ this.documentStore.setShowUserList(true);
3065
+ }
3066
+ else {
3067
+ this.documentStore.setShowUserList(false);
3068
+ this.documentStore.setSelectedUserId(null);
3069
+ this.documentStore.setSelectedStatus(null);
3070
+ }
3071
+ }
3072
+ /**
3073
+ * Handles document status based on selected menu item
3074
+ * @param menuItemId - The _id of the selected menu item
3075
+ * @param categories - The list of document categories
3076
+ */
3077
+ handleDocumentStatus(menuItemId, categories) {
3078
+ const menuItem = this.getMenuItemById(menuItemId, categories);
3079
+ if (menuItem) {
3080
+ // You can add logic here to handle document status based on the selected menu item
3081
+ // For example, filtering documents by status, updating status counts, etc.
3082
+ console.log('Selected menu item:', menuItem.label, 'with status:', menuItem.status);
3083
+ }
3084
+ }
3085
+ /**
3086
+ * Calculates total documents for a menu item
3087
+ * @param item - The menu item
3088
+ * @returns Total number of documents
3089
+ */
3090
+ getTotalDocuments(item) {
3091
+ return item.status.Pending + item.status.Reviewing + item.status.Accepted + item.status.Rejected;
3092
+ }
3093
+ /**
3094
+ * Calculates completed documents for a menu item
3095
+ * @param item - The menu item
3096
+ * @returns Number of completed documents
3097
+ */
3098
+ getCompletedDocuments(item) {
3099
+ return item.status.Accepted;
3100
+ }
3101
+ /**
3102
+ * Gets badge value for a menu item
3103
+ * @param item - The menu item
3104
+ * @returns Badge value string (e.g., "1/2")
3105
+ */
3106
+ getBadgeValue(item) {
3107
+ const completed = this.getCompletedDocuments(item);
3108
+ const total = this.getTotalDocuments(item);
3109
+ return `${completed}/${total}`;
3110
+ }
3111
+ /**
3112
+ * Gets badge severity based on status
3113
+ * @param item - The menu item
3114
+ * @returns Badge severity for PrimeNG
3115
+ */
3116
+ getBadgeSeverity(item) {
3117
+ const completed = this.getCompletedDocuments(item);
3118
+ const total = this.getTotalDocuments(item);
3119
+ if (total === 0)
3120
+ return 'info';
3121
+ if (completed === total)
3122
+ return 'success';
3123
+ if (completed > 0)
3124
+ return 'warning';
3125
+ return 'danger';
3126
+ }
3127
+ /**
3128
+ * Checks if badge should be shown for a menu item
3129
+ * @param item - The menu item
3130
+ * @returns True if badge should be shown
3131
+ */
3132
+ shouldShowBadge(item) {
3133
+ return this.getTotalDocuments(item) > 0;
3134
+ }
3135
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentMenuService, deps: [{ token: DocumentStore }], target: i0.ɵɵFactoryTarget.Injectable });
3136
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentMenuService, providedIn: 'root' });
3137
+ }
3138
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentMenuService, decorators: [{
3139
+ type: Injectable,
3140
+ args: [{
3141
+ providedIn: 'root'
3142
+ }]
3143
+ }], ctorParameters: () => [{ type: DocumentStore }] });
3144
+
2513
3145
  class DocumentsMenuComponent {
2514
3146
  documentStore;
2515
3147
  documentQuery;
2516
- // Get the menu list from container
2517
- items;
3148
+ documentMenuService;
3149
+ documentHelperService;
3150
+ catagories = SHARED.EMPTY_ARRAY;
3151
+ applicationNumber = SHARED.EMPTY;
3152
+ contextId = SHARED.EMPTY;
2518
3153
  selectedMenuItem = null;
2519
- constructor(documentStore, documentQuery) {
3154
+ selectedMenuItemId = null;
3155
+ constructor(documentStore, documentQuery, documentMenuService, documentHelperService) {
2520
3156
  this.documentStore = documentStore;
2521
3157
  this.documentQuery = documentQuery;
3158
+ this.documentMenuService = documentMenuService;
3159
+ this.documentHelperService = documentHelperService;
2522
3160
  }
2523
3161
  ngOnInit() {
2524
- // Subscribe to selected menu item from state
2525
- this.documentQuery.selectSelectedMenuItem().subscribe(menuItem => {
2526
- this.selectedMenuItem = menuItem;
3162
+ this.documentQuery.selectSelectedMenuItem().subscribe(menuItemId => {
3163
+ this.selectedMenuItemId = menuItemId;
3164
+ this.selectedMenuItem = this.findMenuItemLabelById(menuItemId);
2527
3165
  });
2528
3166
  }
3167
+ ngOnChanges(changes) {
3168
+ if (changes['catagories'] && this.catagories) {
3169
+ this.updateMenuItemsData();
3170
+ }
3171
+ }
3172
+ /**
3173
+ * Finds the label of a menu item by its _id
3174
+ * @param id The _id to search for
3175
+ * @returns The label of the menu item or null if not found
3176
+ */
3177
+ findMenuItemLabelById(id) {
3178
+ if (!id)
3179
+ return null;
3180
+ for (const category of this.catagories) {
3181
+ if (category.items) {
3182
+ const item = category.items.find(item => item._id === id);
3183
+ if (item) {
3184
+ return item.label;
3185
+ }
3186
+ }
3187
+ }
3188
+ return null;
3189
+ }
3190
+ /**
3191
+ * Update menu use catagories
3192
+ */
3193
+ updateMenuItemsData() {
3194
+ this.catagories.forEach(category => {
3195
+ if (category.items) {
3196
+ category.items.forEach(item => {
3197
+ item.menuData = {
3198
+ totalDocuments: this.documentMenuService.getTotalDocuments(item),
3199
+ completedDocuments: this.documentMenuService.getCompletedDocuments(item),
3200
+ badgeValue: this.documentMenuService.getBadgeValue(item),
3201
+ badgeSeverity: this.documentMenuService.getBadgeSeverity(item),
3202
+ shouldShowBadge: this.documentMenuService.shouldShowBadge(item)
3203
+ };
3204
+ });
3205
+ }
3206
+ });
3207
+ }
3208
+ /**
3209
+ * Handle the menu item click
3210
+ * @param {*} event - Event
3211
+ * @param {DocumentCategoryItem} item - catagory item
3212
+ */
2529
3213
  onMenuItemClick(event, item) {
2530
- if (this.selectedMenuItem === item.label) {
3214
+ if (this.selectedMenuItemId === item._id) {
2531
3215
  this.selectedMenuItem = null;
3216
+ this.selectedMenuItemId = null;
2532
3217
  this.documentStore.setSelectedMenuItem(null);
3218
+ this.documentHelperService.refreshDocumentsWithoutFilters(this.contextId);
2533
3219
  }
2534
3220
  else {
2535
3221
  this.selectedMenuItem = item.label;
2536
- this.documentStore.setSelectedMenuItem(item.label);
2537
- this.handleUserListVisibility(item.label);
3222
+ this.selectedMenuItemId = item._id;
3223
+ this.documentStore.setSelectedMenuItem(item._id);
3224
+ this.documentMenuService.handleUserListVisibility(item._id, this.catagories);
2538
3225
  }
2539
3226
  }
2540
- selectMenuItem(menuItemLabel) {
2541
- this.selectedMenuItem = menuItemLabel;
2542
- this.documentStore.setSelectedMenuItem(menuItemLabel);
2543
- this.handleUserListVisibility(menuItemLabel);
3227
+ onSelectMenuItem(menuItemId) {
3228
+ const label = this.findMenuItemLabelById(menuItemId);
3229
+ if (label) {
3230
+ this.selectedMenuItem = label;
3231
+ this.selectedMenuItemId = menuItemId;
3232
+ this.documentStore.setSelectedMenuItem(menuItemId);
3233
+ this.documentMenuService.handleUserListVisibility(menuItemId, this.catagories);
3234
+ }
2544
3235
  }
2545
- // Method to programmatically unselect menu item
2546
- unselectMenuItem() {
3236
+ onUnselectMenuItem() {
2547
3237
  this.selectedMenuItem = null;
3238
+ this.selectedMenuItemId = null;
2548
3239
  this.documentStore.setSelectedMenuItem(null);
3240
+ this.documentHelperService.refreshDocumentsWithoutFilters(this.contextId);
2549
3241
  }
2550
- // Method to check if a menu item is selected
2551
- isMenuItemSelected(menuItemLabel) {
2552
- return this.selectedMenuItem === menuItemLabel;
2553
- }
2554
- // Method to get the currently selected menu item
2555
3242
  getSelectedMenuItem() {
2556
3243
  return this.selectedMenuItem;
2557
3244
  }
2558
- // Helper method to determine the category of a menu item
2559
- getMenuItemCategory(menuItemLabel) {
2560
- const applicationCategory = this.items.find((category) => category.label === 'Application');
2561
- const applicantCategory = this.items.find((category) => category.label === 'Applicant');
2562
- if (applicationCategory?.items?.some((menuItem) => menuItem.label === menuItemLabel)) {
2563
- return 'Application';
2564
- }
2565
- else if (applicantCategory?.items?.some((menuItem) => menuItem.label === menuItemLabel)) {
2566
- return 'Applicant';
2567
- }
2568
- return null;
2569
- }
2570
- // Helper method to handle user list visibility based on menu item category
2571
- handleUserListVisibility(menuItemLabel) {
2572
- const category = this.getMenuItemCategory(menuItemLabel);
2573
- if (category === 'Application') {
2574
- // Hide user list and reset filters when menu item is from Application category
2575
- this.documentStore.setSelectedUserId(null);
2576
- this.documentStore.setSelectedStatus(null);
2577
- this.documentStore.setShowUserList(false);
2578
- console.log('User list hidden for Application menu item:', menuItemLabel);
2579
- }
2580
- else if (category === 'Applicant') {
2581
- // Show user list when menu item is from Applicant category
2582
- this.documentStore.setShowUserList(true);
2583
- console.log('User list shown for Applicant menu item:', menuItemLabel);
2584
- }
3245
+ getSelectedMenuItemId() {
3246
+ return this.selectedMenuItemId;
2585
3247
  }
2586
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentsMenuComponent, deps: [{ token: DocumentStore }, { token: DocumentQuery }], target: i0.ɵɵFactoryTarget.Component });
2587
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DocumentsMenuComponent, isStandalone: false, selector: "lib-documents-menu", inputs: { items: "items" }, ngImport: i0, template: "<div class=\"document-sidebar-container h-full\">\r\n <p-card class=\"widget-menu-wrapper h-full\">\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 - 00123882</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 <div class=\"widget-menu-container\" >\r\n <div class=\"widget-menu-wrapper h-ful l custom-scroll\">\r\n <p-menu [model]=\"items\" 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]=\"isMenuItemSelected(item.label)\"\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.badge\" class=\"ml-auto \" severity=\"warning\" [value]=\"item.badge\" />\r\n <span *ngIf=\"item.shortcut\"\r\n class=\"ml-auto border-1 surface-border border-round surface-100 text-xs p-1\">{{ item.shortcut\r\n }}</span>\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-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-icon-wrapper{display:none}::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 .selected-menu-item span{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: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5$1.Badge, selector: "p-badge", inputs: ["styleClass", "style", "badgeSize", "severity", "value", "badgeDisabled", "size"] }, { kind: "component", type: i6.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: i7$1.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }] });
3248
+ 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 });
3249
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.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 <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 <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-icon-wrapper{display:none}::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 .selected-menu-item span{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.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i7$1.Badge, selector: "p-badge", inputs: ["styleClass", "style", "badgeSize", "severity", "value", "badgeDisabled", "size"] }, { kind: "component", type: i8$2.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$1.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }] });
2588
3250
  }
2589
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentsMenuComponent, decorators: [{
3251
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentsMenuComponent, decorators: [{
2590
3252
  type: Component,
2591
- 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 <div class=\"flex align-items-center justify-content-between widget-menu-header-wrapper\">\r\n <p class=\"mb-0 application-title-wrapper\">ID - 00123882</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 <div class=\"widget-menu-container\" >\r\n <div class=\"widget-menu-wrapper h-ful l custom-scroll\">\r\n <p-menu [model]=\"items\" 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]=\"isMenuItemSelected(item.label)\"\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.badge\" class=\"ml-auto \" severity=\"warning\" [value]=\"item.badge\" />\r\n <span *ngIf=\"item.shortcut\"\r\n class=\"ml-auto border-1 surface-border border-round surface-100 text-xs p-1\">{{ item.shortcut\r\n }}</span>\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-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-icon-wrapper{display:none}::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 .selected-menu-item span{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"] }]
2592
- }], ctorParameters: () => [{ type: DocumentStore }, { type: DocumentQuery }], propDecorators: { items: [{
3253
+ 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 <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 <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-icon-wrapper{display:none}::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 .selected-menu-item span{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"] }]
3254
+ }], ctorParameters: () => [{ type: DocumentStore }, { type: DocumentQuery }, { type: DocumentMenuService }, { type: DocumentHelperService }], propDecorators: { catagories: [{
3255
+ type: Input
3256
+ }], applicationNumber: [{
3257
+ type: Input
3258
+ }], contextId: [{
2593
3259
  type: Input
2594
3260
  }] } });
2595
3261
 
@@ -2603,6 +3269,7 @@ class DocumentContainerComponent {
2603
3269
  documentService;
2604
3270
  documentQuery;
2605
3271
  documentHttpService;
3272
+ documentHelperService;
2606
3273
  /**
2607
3274
  * Creates an instance of DocumentContainerComponent.
2608
3275
  * @param {DocumentStore} documentStore - Query Store service to manage store document-related state.
@@ -2610,11 +3277,14 @@ class DocumentContainerComponent {
2610
3277
  * @param {DocumentQuery} documentQuery - Query service to manage document-related state.
2611
3278
  * @param {DocumentHttpService} documentHttpService - Service to make HTTP requests related to documents.
2612
3279
  */
2613
- constructor(documentStore, documentService, documentQuery, documentHttpService) {
3280
+ constructor(documentStore, documentService, documentQuery, documentHttpService, documentHelperService) {
3281
+ // Note: initializeSelectionWatcher now requires contextId
3282
+ // This should be called from the component that has access to contextId
2614
3283
  this.documentStore = documentStore;
2615
3284
  this.documentService = documentService;
2616
3285
  this.documentQuery = documentQuery;
2617
3286
  this.documentHttpService = documentHttpService;
3287
+ this.documentHelperService = documentHelperService;
2618
3288
  }
2619
3289
  /**
2620
3290
  * Get contextId in input.
@@ -2622,31 +3292,22 @@ class DocumentContainerComponent {
2622
3292
  */
2623
3293
  contextId = SHARED.EMPTY;
2624
3294
  /**
2625
- * Get isCollapsed in input.
2626
- * @type {string}
3295
+ * The list of folders.
3296
+ * @type {Array}
2627
3297
  */
2628
- isCollapsed = SHARED.FALSE;
3298
+ applicationNumber = SHARED.EMPTY;
3299
+ catagories = SHARED.EMPTY_ARRAY;
3300
+ userList = SHARED.EMPTY_ARRAY;
2629
3301
  /**
2630
- * Get showFolderList in input.
2631
- * @type {boolean}
3302
+ * Status data for the current selection
3303
+ * @type {StatusDataModel[]}
2632
3304
  */
2633
- showFolderList = SHARED.TRUE;
3305
+ statusData = [];
2634
3306
  /**
2635
- * Get isUploadButtonVisible in input.
2636
- * @type {boolean}
3307
+ * Document list response from API
3308
+ * @type {DocumentListResponse | null}
2637
3309
  */
2638
- isUploadButtonVisible = SHARED.TRUE;
2639
- /**
2640
- * The list of documents.
2641
- * @type {Array}
2642
- */
2643
- documentList = [];
2644
- /**
2645
- * The list of folders.
2646
- * @type {Array}
2647
- */
2648
- folderList = SHARED.EMPTY_ARRAY;
2649
- items = SHARED.Menu;
3310
+ documentListResponse = null;
2650
3311
  /**
2651
3312
  * Holds the subscription to manage observable cleanup.
2652
3313
  * @private
@@ -2658,88 +3319,88 @@ class DocumentContainerComponent {
2658
3319
  * @returns {void}
2659
3320
  */
2660
3321
  ngOnInit() {
2661
- // this.fetchFolder();
2662
- const folderSubscription = this.documentQuery
2663
- .selectParentDocumentTypeId()
2664
- .subscribe((folderBlockId) => {
2665
- const validFolders = this.folderList.filter(folder => (folder.documentCount ?? 0) > 0);
2666
- const idToFetch = folderBlockId ?? validFolders[0]?._id;
2667
- if (idToFetch) {
2668
- // this.fetchDocuments(idToFetch);
2669
- }
2670
- else {
2671
- console.warn('No folders with documents available.');
2672
- }
2673
- });
2674
- this.subscription.add(folderSubscription);
3322
+ this.fetchDocumentCatagories();
3323
+ this.fetchUserList();
3324
+ this.setupStatusDataSubscriptions();
3325
+ this.setupFilteredDocumentSubscription();
3326
+ this.documentHelperService.initializeSelectionWatcherWithInitialLoad(this.contextId);
2675
3327
  }
2676
3328
  /**
2677
- * Fetches the folder data from the API.
2678
- * @returns {void}
3329
+ * Sets up subscriptions to monitor menu item and user selection changes
3330
+ * to trigger status data fetching
2679
3331
  */
3332
+ setupStatusDataSubscriptions() {
3333
+ this.subscription.add(this.documentQuery.selectSelectedMenuItem().subscribe(menuItem => {
3334
+ this.fetchStatusData();
3335
+ }));
3336
+ this.subscription.add(this.documentQuery.selectSelectedUserId().subscribe(userId => {
3337
+ this.fetchStatusData();
3338
+ }));
3339
+ this.fetchStatusData();
3340
+ }
2680
3341
  /**
2681
- * Fetches the folder data from the API.
2682
- * @returns {void}
3342
+ * Fetches status data based on current selections
2683
3343
  */
2684
- fetchFolder() {
2685
- const folderSubscription = this.documentHttpService.getFoldersData(this.contextId).subscribe({
2686
- /**
2687
- * Handles the successful API response.
2688
- * @param {FolderBlockModel[]} folder - The list of folders returned by the API.
2689
- */
2690
- next: (folder) => {
2691
- if (folder && folder.length > 0) {
2692
- this.folderList = folder.filter(f => (f.documentCount ?? 0) > 0);
2693
- if (this.folderList.length > 0) {
2694
- // this.fetchDocuments(this.folderList[0]._id);
2695
- }
2696
- else {
2697
- console.warn('No folders with documents found.');
2698
- }
2699
- }
2700
- else {
2701
- console.error(ERRORS.ERROR_ALLDOCUMENT_MISSING);
3344
+ fetchStatusData() {
3345
+ if (!this.contextId) {
3346
+ console.warn('Context ID is required to fetch status data');
3347
+ return;
3348
+ }
3349
+ const currentState = this.documentQuery.getSelectionState();
3350
+ const contextId = currentState.userId || null;
3351
+ const categoryId = currentState.menuItem || null;
3352
+ this.documentHttpService.getStatusDocumentCount(this.contextId, contextId, categoryId).subscribe({
3353
+ next: (statusData) => {
3354
+ this.statusData = statusData;
3355
+ this.documentStore.setStatusData(statusData);
3356
+ },
3357
+ error: (error) => {
3358
+ console.error('Error fetching status data:', error);
3359
+ }
3360
+ });
3361
+ }
3362
+ /**
3363
+ * Fetches document catagory data.
3364
+ */
3365
+ fetchDocumentCatagories() {
3366
+ const categoriesSubscription = this.documentHttpService.getDocumentCatagories(this.contextId).subscribe({
3367
+ next: (categories) => {
3368
+ if (categories) {
3369
+ this.catagories = categories.categories;
3370
+ this.applicationNumber = categories.applicationNumber;
2702
3371
  }
2703
3372
  },
2704
- /**
2705
- * Handles errors if the request fails.
2706
- * @param {any} err - The error object returned by the server.
2707
- */
2708
3373
  error: (err) => {
2709
- console.error(ERRORS.ERROR_DOCUMENT_TYPES, err);
3374
+ console.error('Error fetching document categories:', err);
2710
3375
  }
2711
3376
  });
2712
- this.subscription.add(folderSubscription);
3377
+ this.subscription.add(categoriesSubscription);
2713
3378
  }
2714
3379
  /**
2715
- * Fetches the document data from the API.
2716
- * @param {string} folderBlockId - The folder ID to fetch the document.
2717
- * @returns {void}
3380
+ * Fetches userlist data
2718
3381
  */
2719
- fetchDocuments(folderBlockId) {
2720
- const documentSubscription = this.documentHttpService.getDocumentByFolderID(folderBlockId, this.contextId).subscribe({
2721
- /**
2722
- * Handles the successful API response.
2723
- * @param {DocumentModel[]} documentList - The list of documents returned by the API.
2724
- */
2725
- next: (documentList) => {
2726
- if (documentList) {
2727
- this.documentList = documentList;
2728
- this.documentStore.setDocumentList(documentList);
2729
- }
2730
- else {
2731
- console.error(ERRORS.ERROR_FETCHING_DOCUMENTS);
2732
- }
3382
+ fetchUserList() {
3383
+ this.documentHttpService.getUserListByContextId(this.contextId).subscribe({
3384
+ next: (res) => {
3385
+ this.userList = res;
2733
3386
  },
2734
- /**
2735
- * Handles errors if the request fails.
2736
- * @param {any} err - The error object returned by the server.
2737
- */
2738
3387
  error: (err) => {
2739
- console.error(ERRORS.ERROR_FETCHING_DOCUMENTS, err);
3388
+ console.log(err);
2740
3389
  }
2741
3390
  });
2742
- this.subscription.add(documentSubscription);
3391
+ }
3392
+ /**
3393
+ * Sets up subscription to listen for filtered document responses
3394
+ */
3395
+ setupFilteredDocumentSubscription() {
3396
+ this.subscription.add(this.documentQuery.selectDocumentListResponse().subscribe({
3397
+ next: (response) => {
3398
+ this.documentListResponse = response;
3399
+ },
3400
+ error: (error) => {
3401
+ console.error('Error receiving filtered documents:', error);
3402
+ }
3403
+ }));
2743
3404
  }
2744
3405
  /**
2745
3406
  * Unsubscribe subscription on destroy of component .
@@ -2747,19 +3408,13 @@ class DocumentContainerComponent {
2747
3408
  ngOnDestroy() {
2748
3409
  this.subscription.unsubscribe();
2749
3410
  }
2750
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentContainerComponent, deps: [{ token: DocumentStore }, { token: DocumentService$1 }, { token: DocumentQuery }, { token: DocumentHttpService }], target: i0.ɵɵFactoryTarget.Component });
2751
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: DocumentContainerComponent, isStandalone: false, selector: "lib-document-container", inputs: { contextId: "contextId", isCollapsed: "isCollapsed", showFolderList: "showFolderList", isUploadButtonVisible: "isUploadButtonVisible" }, 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 [items]=\"items\"></lib-documents-menu>\r\n </div>\r\n <div class=\"col-12 md:col-9 lg:col-9 p-0 h-full\" [ngClass]=\"showFolderList ? 'custom-scroll' : ''\">\r\n @if(showFolderList){\r\n <div>\r\n <lib-folder-container [documentList]=\"documentList\" [folderList]=\"folderList\" [contextId]=\"contextId\"></lib-folder-container>\r\n </div>\r\n }\r\n <div [ngClass]=\"showFolderList ? 'mt-3' : ''\">\r\n <lib-document-list [isCollapsed]=\"isCollapsed\" [documentList]=\"documentList\" [contextId]=\"contextId\" [isUploadButtonVisible]=\"isUploadButtonVisible\" (onRefresh)=\"fetchFolder()\">\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: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: FolderContainerComponent, selector: "lib-folder-container", inputs: ["documentList", "folderList", "contextId"] }, { kind: "component", type: DocumentListComponent, selector: "lib-document-list", inputs: ["contextId", "isUploadButtonVisible", "isCollapsed", "documentList"], outputs: ["onRefresh"] }, { kind: "component", type: DocumentsMenuComponent, selector: "lib-documents-menu", inputs: ["items"] }] });
3411
+ 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 });
3412
+ 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"] }] });
2752
3413
  }
2753
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentContainerComponent, decorators: [{
3414
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentContainerComponent, decorators: [{
2754
3415
  type: Component,
2755
- args: [{ selector: 'lib-document-container', standalone: false, 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 [items]=\"items\"></lib-documents-menu>\r\n </div>\r\n <div class=\"col-12 md:col-9 lg:col-9 p-0 h-full\" [ngClass]=\"showFolderList ? 'custom-scroll' : ''\">\r\n @if(showFolderList){\r\n <div>\r\n <lib-folder-container [documentList]=\"documentList\" [folderList]=\"folderList\" [contextId]=\"contextId\"></lib-folder-container>\r\n </div>\r\n }\r\n <div [ngClass]=\"showFolderList ? 'mt-3' : ''\">\r\n <lib-document-list [isCollapsed]=\"isCollapsed\" [documentList]=\"documentList\" [contextId]=\"contextId\" [isUploadButtonVisible]=\"isUploadButtonVisible\" (onRefresh)=\"fetchFolder()\">\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"] }]
2756
- }], ctorParameters: () => [{ type: DocumentStore }, { type: DocumentService$1 }, { type: DocumentQuery }, { type: DocumentHttpService }], propDecorators: { contextId: [{
2757
- type: Input
2758
- }], isCollapsed: [{
2759
- type: Input
2760
- }], showFolderList: [{
2761
- type: Input
2762
- }], isUploadButtonVisible: [{
3416
+ args: [{ selector: 'lib-document-container', standalone: false, 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"] }]
3417
+ }], ctorParameters: () => [{ type: DocumentStore }, { type: DocumentService }, { type: DocumentQuery }, { type: DocumentHttpService }, { type: DocumentHelperService }], propDecorators: { contextId: [{
2763
3418
  type: Input
2764
3419
  }] } });
2765
3420
 
@@ -2802,10 +3457,10 @@ class FolderBlockComponent {
2802
3457
  this.documentStore.setParentDocumentTypeId(folderBlockId);
2803
3458
  return folderBlockId;
2804
3459
  }
2805
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FolderBlockComponent, deps: [{ token: DocumentStore }], target: i0.ɵɵFactoryTarget.Component });
2806
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: FolderBlockComponent, isStandalone: false, selector: "lib-folder-block", inputs: { folderList: "folderList" }, ngImport: i0, template: "<div class=\"card p-0 folder-info\">\r\n <div class=\"text-900 text-xl font-semibold ml-2 mb-1\">Folders</div>\r\n <div class=\"grid m-0\">\r\n <div *ngFor=\"let folder of folderList\" class=\"col-12 md:col-6 xl:col-4 container-wrapper\">\r\n <div\r\n class=\"p-3 border-1 h-full surface-border flex flex-column justify-content-between hover:surface-100 cursor-pointer border-round\"\r\n (click)=\"handleClickForFilter(folder._id)\"\r\n >\r\n <div class=\"icon\">\r\n <img src=\"../../../../assets/images/FolderImg.png\" alt=\"\" />\r\n </div>\r\n <div class=\"flex flex-column\">\r\n <span class=\"text-600 mt-2\"> {{ folder.documentCount }} Files </span>\r\n <span class=\"text-900 text-lg mt-2 mb-2 font-semibold font-medium\">\r\n {{ folder.folderName }}\r\n </span>\r\n </div>\r\n <hr />\r\n <div class=\"flex justify-content-between\">\r\n <div class=\"flex flex-column\">\r\n <span>Missing</span>\r\n <span\r\n [ngClass]=\"{\r\n 'text-pink-500': missingFileCount > 0,\r\n 'text-green-500': missingFileCount === 0\r\n }\"\r\n >\r\n {{ missingFileCount }}\r\n </span>\r\n </div>\r\n <div class=\"flex flex-column\">\r\n <span>Pending</span>\r\n <span\r\n [ngClass]=\"{\r\n 'text-yellow-500': pendingFileCount > 0,\r\n 'text-green-500': pendingFileCount === 0\r\n }\"\r\n >\r\n {{ pendingFileCount }}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".container-wrapper:nth-child(3n+1){padding-left:0}.container-wrapper:nth-child(3n){padding-right:0}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
3460
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FolderBlockComponent, deps: [{ token: DocumentStore }], target: i0.ɵɵFactoryTarget.Component });
3461
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FolderBlockComponent, isStandalone: false, selector: "lib-folder-block", inputs: { folderList: "folderList" }, ngImport: i0, template: "<div class=\"card p-0 folder-info\">\r\n <div class=\"text-900 text-xl font-semibold ml-2 mb-1\">Folders</div>\r\n <div class=\"grid m-0\">\r\n <div *ngFor=\"let folder of folderList\" class=\"col-12 md:col-6 xl:col-4 container-wrapper\">\r\n <div\r\n class=\"p-3 border-1 h-full surface-border flex flex-column justify-content-between hover:surface-100 cursor-pointer border-round\"\r\n (click)=\"handleClickForFilter(folder._id)\"\r\n >\r\n <div class=\"icon\">\r\n <img src=\"../../../../assets/images/FolderImg.png\" alt=\"\" />\r\n </div>\r\n <div class=\"flex flex-column\">\r\n <span class=\"text-600 mt-2\"> {{ folder.documentCount }} Files </span>\r\n <span class=\"text-900 text-lg mt-2 mb-2 font-semibold font-medium\">\r\n {{ folder.folderName }}\r\n </span>\r\n </div>\r\n <hr />\r\n <div class=\"flex justify-content-between\">\r\n <div class=\"flex flex-column\">\r\n <span>Missing</span>\r\n <span\r\n [ngClass]=\"{\r\n 'text-pink-500': missingFileCount > 0,\r\n 'text-green-500': missingFileCount === 0\r\n }\"\r\n >\r\n {{ missingFileCount }}\r\n </span>\r\n </div>\r\n <div class=\"flex flex-column\">\r\n <span>Pending</span>\r\n <span\r\n [ngClass]=\"{\r\n 'text-yellow-500': pendingFileCount > 0,\r\n 'text-green-500': pendingFileCount === 0\r\n }\"\r\n >\r\n {{ pendingFileCount }}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".container-wrapper:nth-child(3n+1){padding-left:0}.container-wrapper:nth-child(3n){padding-right:0}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
2807
3462
  }
2808
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FolderBlockComponent, decorators: [{
3463
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FolderBlockComponent, decorators: [{
2809
3464
  type: Component,
2810
3465
  args: [{ selector: 'lib-folder-block', standalone: false, template: "<div class=\"card p-0 folder-info\">\r\n <div class=\"text-900 text-xl font-semibold ml-2 mb-1\">Folders</div>\r\n <div class=\"grid m-0\">\r\n <div *ngFor=\"let folder of folderList\" class=\"col-12 md:col-6 xl:col-4 container-wrapper\">\r\n <div\r\n class=\"p-3 border-1 h-full surface-border flex flex-column justify-content-between hover:surface-100 cursor-pointer border-round\"\r\n (click)=\"handleClickForFilter(folder._id)\"\r\n >\r\n <div class=\"icon\">\r\n <img src=\"../../../../assets/images/FolderImg.png\" alt=\"\" />\r\n </div>\r\n <div class=\"flex flex-column\">\r\n <span class=\"text-600 mt-2\"> {{ folder.documentCount }} Files </span>\r\n <span class=\"text-900 text-lg mt-2 mb-2 font-semibold font-medium\">\r\n {{ folder.folderName }}\r\n </span>\r\n </div>\r\n <hr />\r\n <div class=\"flex justify-content-between\">\r\n <div class=\"flex flex-column\">\r\n <span>Missing</span>\r\n <span\r\n [ngClass]=\"{\r\n 'text-pink-500': missingFileCount > 0,\r\n 'text-green-500': missingFileCount === 0\r\n }\"\r\n >\r\n {{ missingFileCount }}\r\n </span>\r\n </div>\r\n <div class=\"flex flex-column\">\r\n <span>Pending</span>\r\n <span\r\n [ngClass]=\"{\r\n 'text-yellow-500': pendingFileCount > 0,\r\n 'text-green-500': pendingFileCount === 0\r\n }\"\r\n >\r\n {{ pendingFileCount }}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".container-wrapper:nth-child(3n+1){padding-left:0}.container-wrapper:nth-child(3n){padding-right:0}\n"] }]
2811
3466
  }], ctorParameters: () => [{ type: DocumentStore }], propDecorators: { folderList: [{
@@ -2840,10 +3495,10 @@ class DocumentListItemComponent {
2840
3495
  }
2841
3496
  this.documentClick.emit(document);
2842
3497
  }
2843
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2844
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DocumentListItemComponent, isStandalone: false, selector: "lib-document-list-item", inputs: { document: "document" }, outputs: { documentClick: "documentClick" }, ngImport: i0, template: "<div class=\"grid m-0\">\r\n <div\r\n class=\"col-12 flex align-items-center justify-content-between md:col-12 xl:col-12\"\r\n >\r\n <div\r\n class=\"col-5 flex cursor-pointer align-items-center pl-0\"\r\n (click)=\"handleOpenDocument(document)\"\r\n >\r\n <img src=\"../../../../assets/images/Frame.png\" alt=\"\" />\r\n <span class=\"ml-4 file-name-wrapper document-text-wrapper\">{{ document.fileName }}</span>\r\n </div>\r\n <div class=\"col-4 flex align-items-center justify-content-center\">\r\n <span\r\n [class]=\"'product-badge status-' + document.status?.toLowerCase()\"\r\n class=\"flex align-items-center justify-content-center pl-2 pr-2 pt-1 pb-1\"\r\n >\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'pending'\">\r\n <i class=\"pi pi-clock pr-1\" style=\"font-size: 12px;\"></i>\r\n Pending\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'verified'\">\r\n <i class=\"pi pi-check-circle pr-1\" style=\"font-size: 12px;\"></i>\r\n Verified\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'alert'\">\r\n <i class=\"pi pi-bell pr-1\" style=\"font-size: 12px;\"></i>\r\n Alert\r\n </ng-container>\r\n </span>\r\n </div>\r\n <div class=\"document-type file-name-wrapper document-text-wrapper\">\r\n {{document.documentTypeName}}\r\n </div>\r\n </div>\r\n </div>\r\n ", styles: [".product-badge.status-pending{background:#e9b127;color:#fff;border-radius:4px}.product-badge.status-verified{background:#4caf50;color:#fff;border-radius:4px}.product-badge.status-alert{background:#f57c00;color:#fff;border-radius:4px}.product-badge{text-transform:none;font-weight:500;font-size:12px}.file-name-wrapper{font-size:15px;font-weight:500}.document-text-wrapper{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3498
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3499
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentListItemComponent, isStandalone: false, selector: "lib-document-list-item", inputs: { document: "document" }, outputs: { documentClick: "documentClick" }, ngImport: i0, template: "<div class=\"grid m-0\">\r\n <div\r\n class=\"col-12 flex align-items-center justify-content-between md:col-12 xl:col-12\"\r\n >\r\n <div\r\n class=\"col-5 flex cursor-pointer align-items-center pl-0\"\r\n (click)=\"handleOpenDocument(document)\"\r\n >\r\n <img src=\"../../../../assets/images/Frame.png\" alt=\"\" />\r\n <span class=\"ml-4 file-name-wrapper document-text-wrapper\">{{ document.fileName }}</span>\r\n </div>\r\n <div class=\"col-4 flex align-items-center justify-content-center\">\r\n <span\r\n [class]=\"'product-badge status-' + document.status?.toLowerCase()\"\r\n class=\"flex align-items-center justify-content-center pl-2 pr-2 pt-1 pb-1\"\r\n >\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'pending'\">\r\n <i class=\"pi pi-clock pr-1\" style=\"font-size: 12px;\"></i>\r\n Pending\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'verified'\">\r\n <i class=\"pi pi-check-circle pr-1\" style=\"font-size: 12px;\"></i>\r\n Verified\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'alert'\">\r\n <i class=\"pi pi-bell pr-1\" style=\"font-size: 12px;\"></i>\r\n Alert\r\n </ng-container>\r\n </span>\r\n </div>\r\n <div class=\"document-type file-name-wrapper document-text-wrapper\">\r\n {{document.documentTypeName}}\r\n </div>\r\n </div>\r\n </div>\r\n ", styles: [".product-badge.status-pending{background:#e9b127;color:#fff;border-radius:4px}.product-badge.status-verified{background:#4caf50;color:#fff;border-radius:4px}.product-badge.status-alert{background:#f57c00;color:#fff;border-radius:4px}.product-badge{text-transform:none;font-weight:500;font-size:12px}.file-name-wrapper{font-size:15px;font-weight:500}.document-text-wrapper{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
2845
3500
  }
2846
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentListItemComponent, decorators: [{
3501
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentListItemComponent, decorators: [{
2847
3502
  type: Component,
2848
3503
  args: [{ selector: 'lib-document-list-item', standalone: false, template: "<div class=\"grid m-0\">\r\n <div\r\n class=\"col-12 flex align-items-center justify-content-between md:col-12 xl:col-12\"\r\n >\r\n <div\r\n class=\"col-5 flex cursor-pointer align-items-center pl-0\"\r\n (click)=\"handleOpenDocument(document)\"\r\n >\r\n <img src=\"../../../../assets/images/Frame.png\" alt=\"\" />\r\n <span class=\"ml-4 file-name-wrapper document-text-wrapper\">{{ document.fileName }}</span>\r\n </div>\r\n <div class=\"col-4 flex align-items-center justify-content-center\">\r\n <span\r\n [class]=\"'product-badge status-' + document.status?.toLowerCase()\"\r\n class=\"flex align-items-center justify-content-center pl-2 pr-2 pt-1 pb-1\"\r\n >\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'pending'\">\r\n <i class=\"pi pi-clock pr-1\" style=\"font-size: 12px;\"></i>\r\n Pending\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'verified'\">\r\n <i class=\"pi pi-check-circle pr-1\" style=\"font-size: 12px;\"></i>\r\n Verified\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'alert'\">\r\n <i class=\"pi pi-bell pr-1\" style=\"font-size: 12px;\"></i>\r\n Alert\r\n </ng-container>\r\n </span>\r\n </div>\r\n <div class=\"document-type file-name-wrapper document-text-wrapper\">\r\n {{document.documentTypeName}}\r\n </div>\r\n </div>\r\n </div>\r\n ", styles: [".product-badge.status-pending{background:#e9b127;color:#fff;border-radius:4px}.product-badge.status-verified{background:#4caf50;color:#fff;border-radius:4px}.product-badge.status-alert{background:#f57c00;color:#fff;border-radius:4px}.product-badge{text-transform:none;font-weight:500;font-size:12px}.file-name-wrapper{font-size:15px;font-weight:500}.document-text-wrapper{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}\n"] }]
2849
3504
  }], propDecorators: { documentClick: [{
@@ -2878,10 +3533,10 @@ class GlobalErrorHandler {
2878
3533
  handleError(error) {
2879
3534
  console.error('GlobalErrorHandler:', error);
2880
3535
  }
2881
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: GlobalErrorHandler, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
2882
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: GlobalErrorHandler });
3536
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GlobalErrorHandler, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
3537
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GlobalErrorHandler });
2883
3538
  }
2884
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: GlobalErrorHandler, decorators: [{
3539
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GlobalErrorHandler, decorators: [{
2885
3540
  type: Injectable
2886
3541
  }], ctorParameters: () => [{ type: i0.Injector }] });
2887
3542
 
@@ -2909,16 +3564,16 @@ class DocumentDirective {
2909
3564
  }
2910
3565
  });
2911
3566
  }
2912
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentDirective, deps: [{ token: DocumentService }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
2913
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: DocumentDirective, isStandalone: false, selector: "[doc]", ngImport: i0 });
3567
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentDirective, deps: [{ token: DocumentHelperService }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
3568
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.14", type: DocumentDirective, isStandalone: false, selector: "[doc]", ngImport: i0 });
2914
3569
  }
2915
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentDirective, decorators: [{
3570
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentDirective, decorators: [{
2916
3571
  type: Directive,
2917
3572
  args: [{
2918
3573
  selector: '[doc]',
2919
3574
  standalone: false
2920
3575
  }]
2921
- }], ctorParameters: () => [{ type: DocumentService }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }] });
3576
+ }], ctorParameters: () => [{ type: DocumentHelperService }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }] });
2922
3577
 
2923
3578
  /**
2924
3579
  * Service for managing user session details.
@@ -2984,10 +3639,10 @@ class SessionService {
2984
3639
  clearSession() {
2985
3640
  localStorage.clear();
2986
3641
  }
2987
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SessionService, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
2988
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SessionService, providedIn: 'root' });
3642
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SessionService, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
3643
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SessionService, providedIn: 'root' });
2989
3644
  }
2990
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SessionService, decorators: [{
3645
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SessionService, decorators: [{
2991
3646
  type: Injectable,
2992
3647
  args: [{
2993
3648
  providedIn: 'root'
@@ -3047,10 +3702,10 @@ class HasPermissionDirective {
3047
3702
  this.renderer.removeStyle(this.el.nativeElement, 'display');
3048
3703
  }
3049
3704
  }
3050
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: HasPermissionDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SessionService }], target: i0.ɵɵFactoryTarget.Directive });
3051
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: HasPermissionDirective, isStandalone: false, selector: "[permission]", inputs: { permission: "permission" }, usesOnChanges: true, ngImport: i0 });
3705
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: HasPermissionDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SessionService }], target: i0.ɵɵFactoryTarget.Directive });
3706
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.14", type: HasPermissionDirective, isStandalone: false, selector: "[permission]", inputs: { permission: "permission" }, usesOnChanges: true, ngImport: i0 });
3052
3707
  }
3053
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: HasPermissionDirective, decorators: [{
3708
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: HasPermissionDirective, decorators: [{
3054
3709
  type: Directive,
3055
3710
  args: [{
3056
3711
  selector: '[permission]',
@@ -3061,17 +3716,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
3061
3716
  }] } });
3062
3717
 
3063
3718
  class SharedModule {
3064
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3065
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: SharedModule, declarations: [TablePrimaryComponent], imports: [CommonModule,
3719
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3720
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: SharedModule, declarations: [TablePrimaryComponent], imports: [CommonModule,
3066
3721
  TableModule,
3067
3722
  ButtonModule,
3068
3723
  RippleModule], exports: [TablePrimaryComponent] });
3069
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SharedModule, imports: [CommonModule,
3724
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SharedModule, imports: [CommonModule,
3070
3725
  TableModule,
3071
3726
  ButtonModule,
3072
3727
  RippleModule] });
3073
3728
  }
3074
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SharedModule, decorators: [{
3729
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SharedModule, decorators: [{
3075
3730
  type: NgModule,
3076
3731
  args: [{
3077
3732
  declarations: [TablePrimaryComponent],
@@ -3093,8 +3748,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
3093
3748
  * document lists, and individual document items.
3094
3749
  */
3095
3750
  class DocumentModule {
3096
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3097
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: DocumentModule, declarations: [
3751
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3752
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: DocumentModule, declarations: [
3098
3753
  /**
3099
3754
  * The main container for managing documents.
3100
3755
  * DocumentContainerComponent
@@ -3237,7 +3892,7 @@ class DocumentModule {
3237
3892
  * A directive to show the document.
3238
3893
  */
3239
3894
  DocumentDirective] });
3240
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentModule, providers: [
3895
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentModule, providers: [
3241
3896
  /**
3242
3897
  * Provide the messageservice to be used in other components.
3243
3898
  */
@@ -3343,7 +3998,7 @@ class DocumentModule {
3343
3998
  TableModule,
3344
3999
  SharedModule] });
3345
4000
  }
3346
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentModule, decorators: [{
4001
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentModule, decorators: [{
3347
4002
  type: NgModule,
3348
4003
  args: [{
3349
4004
  declarations: [