cat-documents-ng 0.2.57 → 0.2.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, EventEmitter, ViewChild, Input, ViewEncapsulation, Component, Output, Directive, NgModule, APP_INITIALIZER } from '@angular/core';
2
+ import { Injectable, EventEmitter, Output, ViewChild, Input, ViewEncapsulation, Component, Directive, NgModule, APP_INITIALIZER } from '@angular/core';
3
3
  import * as i2$1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import { firstValueFrom, tap, EMPTY, catchError, throwError, of, combineLatest, Subject, Observable, takeUntil, Subscription, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1 } from 'rxjs';
@@ -25,6 +25,7 @@ import * as i14 from 'primeng/dropdown';
25
25
  import { DropdownModule } from 'primeng/dropdown';
26
26
  import * as i4$1 from 'primeng/sidebar';
27
27
  import { SidebarModule } from 'primeng/sidebar';
28
+ import * as i5 from 'primeng/messages';
28
29
  import * as i1 from '@angular/router';
29
30
  import * as i7 from 'primeng/dialog';
30
31
  import { DialogModule } from 'primeng/dialog';
@@ -32,14 +33,13 @@ import * as i7$1 from 'primeng/inputtext';
32
33
  import { InputTextModule } from 'primeng/inputtext';
33
34
  import * as i2$2 from 'primeng/table';
34
35
  import { TableModule } from 'primeng/table';
35
- import * as i5 from 'primeng/ripple';
36
+ import * as i5$1 from 'primeng/ripple';
36
37
  import { RippleModule } from 'primeng/ripple';
37
- import * as i5$2 from 'primeng/messages';
38
38
  import * as i6 from 'ng2-pdf-viewer';
39
39
  import { PdfViewerModule } from 'ng2-pdf-viewer';
40
40
  import * as i3$2 from 'primeng/accordion';
41
41
  import { AccordionModule } from 'primeng/accordion';
42
- import * as i5$1 from 'primeng/inputtextarea';
42
+ import * as i5$2 from 'primeng/inputtextarea';
43
43
  import { InputTextareaModule } from 'primeng/inputtextarea';
44
44
  import * as i8 from 'primeng/tooltip';
45
45
  import * as i7$2 from 'primeng/badge';
@@ -76,6 +76,7 @@ class SHARED {
76
76
  static HIDDEN = 'hidden';
77
77
  static NO_DOCUMENTS_FOUND = 'No documents found';
78
78
  static DOCUMENT_TYPES_DELETE = 'DocumentTypes-DELETE';
79
+ static SUCCESS_MESSAGE = 'Document Saved Successfully';
79
80
  /**
80
81
  * Represents the info.
81
82
  */
@@ -279,6 +280,7 @@ class SHARED {
279
280
  static APPLICANT = 'Applicant';
280
281
  static CATAGORIES = 'catagories';
281
282
  static DOCUMENTS = 'Documents';
283
+ static UPLOAD_FAILED = 'Upload failed';
282
284
  static Menu = [
283
285
  {
284
286
  label: 'Applicant',
@@ -1116,7 +1118,7 @@ class URLS {
1116
1118
  * @static
1117
1119
  * @type {string}
1118
1120
  */
1119
- static SAVE_DOCUMENT_UPLOAD = "documents/saveDocumentUpload";
1121
+ static SAVE_DOCUMENT_UPLOAD = "documents/create";
1120
1122
  /**
1121
1123
  * The query parameter to pass a context ID in API requests.
1122
1124
  * @static
@@ -1270,7 +1272,7 @@ class DocumentService {
1270
1272
  * @returns {Observable<any>} Observable that emits the newly created document.
1271
1273
  */
1272
1274
  create(entity) {
1273
- const headers = { 'Authorization': 'Bearer 863660c6-dc2a-4ca5-bae1-0dd177d5c9a9' };
1275
+ const headers = { 'Authorization': 'Bearer e9a9d462-da86-4d3a-9f4d-e2d48f480e04' };
1274
1276
  return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, entity, { headers }).pipe(tap((newEntity) => this.documentStore.add(newEntity)));
1275
1277
  }
1276
1278
  /**
@@ -1675,7 +1677,7 @@ class DocumentHttpService {
1675
1677
  * @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
1676
1678
  */
1677
1679
  getDocumentCatagories(contextId) {
1678
- let headers = new HttpHeaders({ Authorization: `Bearer 863660c6-dc2a-4ca5-bae1-0dd177d5c9a9` });
1680
+ let headers = new HttpHeaders({ Authorization: `Bearer e9a9d462-da86-4d3a-9f4d-e2d48f480e04` });
1679
1681
  return this.http.get(`${this.apiUrl}${URLS.DOCUMENTS_CATAGORIES}/${contextId}`, { headers }).pipe(tap((response) => {
1680
1682
  // Store only the categories array, not the entire response
1681
1683
  if (response && response.categories) {
@@ -1734,7 +1736,7 @@ class DocumentHttpService {
1734
1736
  * @returns {Observable<DocumentModel>} An observable that emits the updated DocumentModel.
1735
1737
  */
1736
1738
  updateDocumentName(documentId, payload) {
1737
- let headers = new HttpHeaders({ Authorization: `Bearer 863660c6-dc2a-4ca5-bae1-0dd177d5c9a9` });
1739
+ let headers = new HttpHeaders({ Authorization: `Bearer e9a9d462-da86-4d3a-9f4d-e2d48f480e04` });
1738
1740
  return this.http.put(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${documentId}`, payload, { headers }).pipe(catchError((error) => {
1739
1741
  return throwError(() => new Error(error));
1740
1742
  }));
@@ -1747,7 +1749,7 @@ class DocumentHttpService {
1747
1749
  getUserListByContextId(contextId) {
1748
1750
  if (!contextId)
1749
1751
  return EMPTY;
1750
- let headers = new HttpHeaders({ Authorization: `Bearer 863660c6-dc2a-4ca5-bae1-0dd177d5c9a9` });
1752
+ let headers = new HttpHeaders({ Authorization: `Bearer e9a9d462-da86-4d3a-9f4d-e2d48f480e04` });
1751
1753
  return this.http.get(`${this.apiUrl}${URLS.USERLIST}${contextId}`, { headers }).pipe(tap((userList) => {
1752
1754
  this.documentStore.setUserList(userList);
1753
1755
  }), catchError((error) => {
@@ -1773,7 +1775,7 @@ class DocumentHttpService {
1773
1775
  if (categoryId) {
1774
1776
  params = params.set(SHARED.CATEGORY, categoryId);
1775
1777
  }
1776
- let headers = new HttpHeaders({ Authorization: `Bearer 863660c6-dc2a-4ca5-bae1-0dd177d5c9a9` });
1778
+ let headers = new HttpHeaders({ Authorization: `Bearer e9a9d462-da86-4d3a-9f4d-e2d48f480e04` });
1777
1779
  return this.http.get(url, { params, headers }).pipe(tap((statusData) => {
1778
1780
  this.documentStore.setStatusData(statusData);
1779
1781
  }), catchError((error) => {
@@ -1804,7 +1806,7 @@ class DocumentHttpService {
1804
1806
  if (searchKey) {
1805
1807
  params = params.set(SHARED.SEARCH_KEY, searchKey);
1806
1808
  }
1807
- let headers = new HttpHeaders({ Authorization: `Bearer 863660c6-dc2a-4ca5-bae1-0dd177d5c9a9` });
1809
+ let headers = new HttpHeaders({ Authorization: `Bearer e9a9d462-da86-4d3a-9f4d-e2d48f480e04` });
1808
1810
  return this.http.get(`${this.apiUrl}${URLS.GETALL}/${contextId}`, { params, headers }).pipe(tap((response) => {
1809
1811
  if (response.documents) {
1810
1812
  this.documentStore.setDocumentList(response.documents);
@@ -1817,7 +1819,7 @@ class DocumentHttpService {
1817
1819
  if (!documentId) {
1818
1820
  return of([]);
1819
1821
  }
1820
- let headers = new HttpHeaders({ Authorization: `Bearer 863660c6-dc2a-4ca5-bae1-0dd177d5c9a9` });
1822
+ let headers = new HttpHeaders({ Authorization: `Bearer e9a9d462-da86-4d3a-9f4d-e2d48f480e04` });
1821
1823
  return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_HISTORY}${documentId}`, { headers });
1822
1824
  }
1823
1825
  /**
@@ -1828,7 +1830,7 @@ class DocumentHttpService {
1828
1830
  getCategoriesBySource(source) {
1829
1831
  if (!source)
1830
1832
  return EMPTY;
1831
- let headers = new HttpHeaders({ Authorization: `Bearer 863660c6-dc2a-4ca5-bae1-0dd177d5c9a9` });
1833
+ let headers = new HttpHeaders({ Authorization: `Bearer e9a9d462-da86-4d3a-9f4d-e2d48f480e04` });
1832
1834
  return this.http.get(`${this.apiUrl}${URLS.GET_CATEGORIES_BY_SOURCE}${source}`, { headers }).pipe(catchError((error) => {
1833
1835
  return throwError(() => new Error(error));
1834
1836
  }));
@@ -1841,7 +1843,7 @@ class DocumentHttpService {
1841
1843
  getDocumentTypesByCategory(categoryId) {
1842
1844
  if (!categoryId)
1843
1845
  return EMPTY;
1844
- let headers = new HttpHeaders({ Authorization: `Bearer 863660c6-dc2a-4ca5-bae1-0dd177d5c9a9` });
1846
+ let headers = new HttpHeaders({ Authorization: `Bearer e9a9d462-da86-4d3a-9f4d-e2d48f480e04` });
1845
1847
  return this.http.get(`${this.apiUrl}${URLS.GET_DOCUMENT_TYPES_BY_CATEGORY}${categoryId}`, { headers }).pipe(catchError((error) => {
1846
1848
  return throwError(() => new Error(error));
1847
1849
  }));
@@ -1852,7 +1854,7 @@ class DocumentHttpService {
1852
1854
  * @returns {Observable<any>} Observable that emits the upload response.
1853
1855
  */
1854
1856
  uploadFile(formData) {
1855
- let headers = new HttpHeaders({ Authorization: `Bearer 863660c6-dc2a-4ca5-bae1-0dd177d5c9a9` });
1857
+ let headers = new HttpHeaders({ Authorization: `Bearer e9a9d462-da86-4d3a-9f4d-e2d48f480e04` });
1856
1858
  return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, formData, { headers }).pipe(catchError((error) => {
1857
1859
  return throwError(() => new Error(error));
1858
1860
  }));
@@ -1863,7 +1865,7 @@ class DocumentHttpService {
1863
1865
  * @returns {Observable<any>} Observable that emits the save response.
1864
1866
  */
1865
1867
  saveDocumentUpload(payload) {
1866
- let headers = new HttpHeaders({ Authorization: `Bearer 863660c6-dc2a-4ca5-bae1-0dd177d5c9a9` });
1868
+ let headers = new HttpHeaders({ Authorization: `Bearer e9a9d462-da86-4d3a-9f4d-e2d48f480e04` });
1867
1869
  return this.http.post(`${this.apiUrl}${URLS.SAVE_DOCUMENT_UPLOAD}`, payload, { headers }).pipe(catchError((error) => {
1868
1870
  return throwError(() => new Error(error));
1869
1871
  }));
@@ -1879,7 +1881,7 @@ class DocumentHttpService {
1879
1881
  const payload = {
1880
1882
  statusUpdateDescription: statusUpdateDescription
1881
1883
  };
1882
- let headers = new HttpHeaders({ Authorization: `Bearer 863660c6-dc2a-4ca5-bae1-0dd177d5c9a9` });
1884
+ let headers = new HttpHeaders({ Authorization: `Bearer e9a9d462-da86-4d3a-9f4d-e2d48f480e04` });
1883
1885
  return this.http.put(`${this.apiUrl}${URLS.UPDATE_DOCUMENT_STATUS}${documentId}/${status}`, payload, { headers }).pipe(tap((response) => {
1884
1886
  if (response && response.status) {
1885
1887
  const normalizedStatus = this.normalizeStatus(response.status);
@@ -1913,7 +1915,7 @@ class DocumentHttpService {
1913
1915
  * @returns {Observable<any>} Observable that emits the delete response
1914
1916
  */
1915
1917
  deleteDocument(documentId, contextId) {
1916
- let headers = new HttpHeaders({ Authorization: `Bearer 863660c6-dc2a-4ca5-bae1-0dd177d5c9a9` });
1918
+ let headers = new HttpHeaders({ Authorization: `Bearer e9a9d462-da86-4d3a-9f4d-e2d48f480e04` });
1917
1919
  return this.http.delete(`${this.apiUrl}${URLS.DELETE_DOCUMENT}${documentId}`, { headers }).pipe(tap(() => {
1918
1920
  this.getDocumentCatagories(contextId).subscribe();
1919
1921
  this.getUserListByContextId(contextId).subscribe();
@@ -2437,29 +2439,96 @@ class DocumentUploadBusinessService {
2437
2439
  * Validates form data
2438
2440
  */
2439
2441
  validateForm(assignmentType, selectedCategory, selectedDocumentType, selectedApplicant, uploadedFiles, categoryOptions, documentTypeOptions) {
2442
+ // If no assignment type is selected, form is invalid
2443
+ if (!assignmentType) {
2444
+ return false;
2445
+ }
2446
+ // Check if category and document type options are available
2440
2447
  if (!categoryOptions.length || !documentTypeOptions.length) {
2441
2448
  return false;
2442
2449
  }
2443
- const hasRequiredSelections = Boolean(selectedCategory) && Boolean(selectedDocumentType);
2444
- const hasFiles = uploadedFiles.length > 0;
2445
- if (assignmentType === SHARED.APPLICANT) {
2446
- return hasRequiredSelections && hasFiles && Boolean(selectedApplicant);
2450
+ // Check if required selections are made
2451
+ if (!selectedCategory || !selectedDocumentType) {
2452
+ return false;
2447
2453
  }
2448
- else {
2449
- return hasRequiredSelections && hasFiles;
2454
+ // Check if files are uploaded
2455
+ if (uploadedFiles.length === 0) {
2456
+ return false;
2450
2457
  }
2458
+ // Check if all files are fully uploaded
2459
+ const allFilesUploaded = uploadedFiles.every(file => file.progress === 100);
2460
+ if (!allFilesUploaded) {
2461
+ return false;
2462
+ }
2463
+ // For Applicant type, require applicant selection
2464
+ if (assignmentType === SHARED.APPLICANT) {
2465
+ return Boolean(selectedApplicant);
2466
+ }
2467
+ // For Application type, no applicant required
2468
+ return true;
2451
2469
  }
2452
2470
  /**
2453
2471
  * Checks if save button should be disabled
2454
2472
  */
2455
2473
  isSaveButtonDisabled(assignmentType, selectedCategory, selectedDocumentType, selectedApplicant, uploadedFiles, isSaving) {
2456
- const hasBasicData = selectedCategory && selectedDocumentType && uploadedFiles.length > 0;
2457
- if (assignmentType === SHARED.APPLICANT) {
2458
- return !hasBasicData || !selectedApplicant || isSaving;
2474
+ // If no assignment type is selected, disable save button
2475
+ if (!assignmentType) {
2476
+ return true;
2459
2477
  }
2460
- else {
2461
- return !hasBasicData || isSaving;
2478
+ // Check if files are uploaded
2479
+ if (uploadedFiles.length === 0) {
2480
+ return true;
2481
+ }
2482
+ // Check if all files are fully uploaded (progress = 100)
2483
+ const allFilesUploaded = uploadedFiles.every(file => file.progress === 100);
2484
+ if (!allFilesUploaded) {
2485
+ return true;
2486
+ }
2487
+ // Check basic required fields
2488
+ if (!selectedCategory || !selectedDocumentType) {
2489
+ return true;
2490
+ }
2491
+ // For Applicant type, require applicant selection
2492
+ if (assignmentType === SHARED.APPLICANT && !selectedApplicant) {
2493
+ return true;
2494
+ }
2495
+ // If saving is in progress, disable save button
2496
+ if (isSaving) {
2497
+ return true;
2498
+ }
2499
+ // All validation passed, enable save button
2500
+ return false;
2501
+ }
2502
+ /**
2503
+ * Validates the complete payload before save
2504
+ */
2505
+ validatePayload(assignmentType, selectedCategory, selectedDocumentType, selectedApplicant, uploadedFiles) {
2506
+ // Check assignment type
2507
+ if (!assignmentType) {
2508
+ return { isValid: false, message: 'Please select an assignment type (Applicant or Application)' };
2509
+ }
2510
+ // Check category
2511
+ if (!selectedCategory) {
2512
+ return { isValid: false, message: 'Please select a document category' };
2462
2513
  }
2514
+ // Check document type
2515
+ if (!selectedDocumentType) {
2516
+ return { isValid: false, message: 'Please select a document type' };
2517
+ }
2518
+ // Check files
2519
+ if (uploadedFiles.length === 0) {
2520
+ return { isValid: false, message: 'Please upload at least one document' };
2521
+ }
2522
+ // Check if all files are uploaded
2523
+ const incompleteFiles = uploadedFiles.filter(file => file.progress !== 100);
2524
+ if (incompleteFiles.length > 0) {
2525
+ return { isValid: false, message: 'Please wait for all files to finish uploading' };
2526
+ }
2527
+ // For Applicant type, check applicant selection
2528
+ if (assignmentType === SHARED.APPLICANT && !selectedApplicant) {
2529
+ return { isValid: false, message: 'Please select an applicant' };
2530
+ }
2531
+ return { isValid: true, message: 'All required fields are completed' };
2463
2532
  }
2464
2533
  /**
2465
2534
  * Prepares upload payload
@@ -2478,6 +2547,10 @@ class DocumentUploadBusinessService {
2478
2547
  uploadedFileId: file.uploadResponse?.fileId || file.uploadResponse?.id || file.uploadResponse?.fileName
2479
2548
  }))
2480
2549
  };
2550
+ // For Applicant type, include the applicant ID
2551
+ if (assignmentType === SHARED.APPLICANT && selectedApplicant) {
2552
+ payload.applicantId = selectedApplicant;
2553
+ }
2481
2554
  return payload;
2482
2555
  }
2483
2556
  /**
@@ -2507,10 +2580,10 @@ class DocumentUploadBusinessService {
2507
2580
  */
2508
2581
  getInitialFormState() {
2509
2582
  return {
2510
- selectedAssignmentType: 'Applicant',
2511
- selectedApplicant: SHARED.EMPTY,
2512
- selectedCategory: SHARED.EMPTY,
2513
- selectedDocumentType: SHARED.EMPTY,
2583
+ selectedAssignmentType: null,
2584
+ selectedApplicant: null,
2585
+ selectedCategory: null,
2586
+ selectedDocumentType: null,
2514
2587
  uploadedFiles: [],
2515
2588
  isFormValid: false
2516
2589
  };
@@ -2671,6 +2744,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
2671
2744
  }]
2672
2745
  }], ctorParameters: () => [{ type: DocumentUploadBusinessService }, { type: DocumentUploadFormService }] });
2673
2746
 
2747
+ /**
2748
+ * Component responsible for handling document uploads with templated metadata.
2749
+ * Provides a comprehensive interface for uploading documents with assignment types,
2750
+ * categories, document types, and applicant selection.
2751
+ */
2674
2752
  class DocumentUploadComponent {
2675
2753
  documentUpload;
2676
2754
  uploadService;
@@ -2681,29 +2759,58 @@ class DocumentUploadComponent {
2681
2759
  businessService;
2682
2760
  formService;
2683
2761
  dataService;
2762
+ /** The context ID for the document upload operation */
2684
2763
  contextId = SHARED.EMPTY;
2764
+ /** Reference to the file upload component */
2685
2765
  fileUploader;
2686
- // Form data
2766
+ /** Event emitted when form validation state changes */
2767
+ onFormValidationChange = new EventEmitter();
2768
+ /** Event emitted when upload is successful */
2769
+ onUploadSuccess = new EventEmitter();
2770
+ /** Currently selected assignment type (Applicant or Application) */
2687
2771
  selectedAssignmentType = null;
2772
+ /** Currently selected applicant ID */
2688
2773
  selectedApplicant = SHARED.EMPTY;
2774
+ /** Currently selected document category */
2689
2775
  selectedCategory = SHARED.EMPTY;
2776
+ /** Currently selected document type */
2690
2777
  selectedDocumentType = SHARED.EMPTY;
2691
- // Data lists
2778
+ /** List of available applicants */
2692
2779
  applicantList = SHARED.EMPTY_ARRAY;
2780
+ /** Filtered list of applicants based on current selection */
2693
2781
  filteredApplicantList = SHARED.EMPTY_ARRAY;
2782
+ /** Available document categories for the selected assignment type */
2694
2783
  categoryOptions = SHARED.EMPTY_ARRAY;
2784
+ /** Available document types for the selected category */
2695
2785
  documentTypeOptions = SHARED.EMPTY_ARRAY;
2696
- // File upload
2786
+ /** Array of files that have been uploaded */
2697
2787
  uploadedFiles = SHARED.EMPTY_ARRAY;
2788
+ /** Map tracking upload progress for each file */
2698
2789
  fileProgress = new Map();
2699
- // Loading states
2790
+ /** Loading state for applicants data */
2700
2791
  isLoadingApplicants = false;
2792
+ /** Loading state for categories data */
2701
2793
  isLoadingCategories = false;
2794
+ /** Loading state for document types data */
2702
2795
  isLoadingDocumentTypes = false;
2796
+ /** Loading state for save operation */
2703
2797
  isSaving = false;
2704
- // Validation
2798
+ /** Current form validation state */
2705
2799
  isFormValid = false;
2800
+ /** Subject for managing component lifecycle and unsubscribing from observables */
2706
2801
  destroy$ = new Subject();
2802
+ /**
2803
+ * Creates an instance of DocumentUploadComponent.
2804
+ * @param documentUpload - Service for handling document upload operations
2805
+ * @param uploadService - Service for document-related operations
2806
+ * @param config - PrimeNG configuration service
2807
+ * @param fileFormatService - Service for file format validation
2808
+ * @param messageService - Service for displaying messages
2809
+ * @param cdr - Change detector reference for manual change detection
2810
+ * @param businessService - Service for business logic operations
2811
+ * @param formService - Service for form validation and handling
2812
+ * @param dataService - Service for data loading operations
2813
+ */
2707
2814
  constructor(documentUpload, uploadService, config, fileFormatService, messageService, cdr, businessService, formService, dataService) {
2708
2815
  this.documentUpload = documentUpload;
2709
2816
  this.uploadService = uploadService;
@@ -2715,55 +2822,86 @@ class DocumentUploadComponent {
2715
2822
  this.formService = formService;
2716
2823
  this.dataService = dataService;
2717
2824
  }
2718
- // Event handlers
2825
+ /**
2826
+ * Handles changes in assignment type selection.
2827
+ * Resets form selections, loads categories, and handles applicant loading.
2828
+ */
2719
2829
  onAssignmentTypeChange() {
2720
2830
  this.resetSelections();
2721
2831
  this.loadCategories();
2722
2832
  this.handleApplicantLoading();
2833
+ this.emitFormValidationChange();
2723
2834
  }
2835
+ /**
2836
+ * Handles changes in category selection.
2837
+ * Resets document type and loads available document types if category is selected.
2838
+ */
2724
2839
  onCategoryChange() {
2725
2840
  this.resetDocumentType();
2726
- this.loadDocumentTypesIfCategorySelected();
2727
- this.validateForm();
2728
- }
2729
- onDocumentTypeChange() {
2730
- this.validateForm();
2731
- }
2732
- onApplicantSelectionChange() {
2733
- this.validateForm();
2841
+ if (this.selectedCategory)
2842
+ this.loadDocumentTypes();
2843
+ this.validateAndEmit();
2734
2844
  }
2845
+ /**
2846
+ * Handles changes in document type selection.
2847
+ * Validates form and emits validation change event.
2848
+ */
2849
+ onDocumentTypeChange() { this.validateAndEmit(); }
2850
+ /**
2851
+ * Handles changes in applicant selection.
2852
+ * Validates form and emits validation change event.
2853
+ */
2854
+ onApplicantSelectionChange() { this.validateAndEmit(); }
2855
+ /**
2856
+ * Handles file selection from the file upload component.
2857
+ * Processes each selected file for templated upload.
2858
+ * @param event - Event containing the selected files
2859
+ */
2735
2860
  onSelectedFiles(event) {
2736
- event.currentFiles.forEach((file) => {
2737
- this.handleTemplatedUpload(file);
2738
- });
2861
+ event.currentFiles.forEach(file => this.handleTemplatedUpload(file));
2739
2862
  this.fileUploader.clear();
2740
2863
  }
2741
- // Data loading methods
2864
+ /**
2865
+ * Loads the list of applicants for the current context.
2866
+ * Sets loading state and handles success/error responses.
2867
+ */
2742
2868
  loadApplicants() {
2743
2869
  this.isLoadingApplicants = true;
2744
- this.dataService.loadApplicants(this.contextId, (applicants) => this.handleApplicantsLoaded(applicants), (error) => this.handleApplicantsError(error)).pipe(takeUntil(this.destroy$)).subscribe({
2870
+ this.dataService.loadApplicants(this.contextId, (applicants) => this.handleApplicantsLoaded(applicants), (error) => this.handleError('Failed to Load Applicants', error, () => this.isLoadingApplicants = false)).pipe(takeUntil(this.destroy$)).subscribe({
2745
2871
  next: (applicants) => this.handleApplicantsLoaded(applicants),
2746
- error: (error) => this.handleApplicantsError(error)
2872
+ error: (error) => this.handleError('Failed to Load Applicants', error, () => this.isLoadingApplicants = false)
2747
2873
  });
2748
2874
  }
2875
+ /**
2876
+ * Loads document categories based on the selected assignment type.
2877
+ * Sets loading state and handles success/error responses.
2878
+ */
2749
2879
  loadCategories() {
2750
2880
  this.isLoadingCategories = true;
2751
- this.dataService.loadCategories(this.selectedAssignmentType, (categories) => this.handleCategoriesLoaded(categories), (error) => this.handleCategoriesError(error)).pipe(takeUntil(this.destroy$)).subscribe({
2881
+ this.dataService.loadCategories(this.selectedAssignmentType, (categories) => this.handleCategoriesLoaded(categories), (error) => this.handleError('Failed to Load Categories', error, () => this.isLoadingCategories = false)).pipe(takeUntil(this.destroy$)).subscribe({
2752
2882
  next: (categories) => this.handleCategoriesLoaded(categories),
2753
- error: (error) => this.handleCategoriesError(error)
2883
+ error: (error) => this.handleError('Failed to Load Categories', error, () => this.isLoadingCategories = false)
2754
2884
  });
2755
2885
  }
2886
+ /**
2887
+ * Loads document types based on the selected category.
2888
+ * Sets loading state and handles success/error responses.
2889
+ */
2756
2890
  loadDocumentTypes() {
2757
2891
  this.isLoadingDocumentTypes = true;
2758
- this.dataService.loadDocumentTypes(this.selectedCategory, (documentTypes) => this.handleDocumentTypesLoaded(documentTypes), (error) => this.handleDocumentTypesError(error)).pipe(takeUntil(this.destroy$)).subscribe({
2892
+ this.dataService.loadDocumentTypes(this.selectedCategory, (documentTypes) => this.handleDocumentTypesLoaded(documentTypes), (error) => this.handleError('Failed to Load Document Types', error, () => this.isLoadingDocumentTypes = false)).pipe(takeUntil(this.destroy$)).subscribe({
2759
2893
  next: (documentTypes) => this.handleDocumentTypesLoaded(documentTypes),
2760
- error: (error) => this.handleDocumentTypesError(error)
2894
+ error: (error) => this.handleError('Failed to Load Document Types', error, () => this.isLoadingDocumentTypes = false)
2761
2895
  });
2762
2896
  }
2763
- // Business logic methods
2897
+ /**
2898
+ * Saves the document upload with all metadata.
2899
+ * Validates payload and required fields before proceeding with upload.
2900
+ */
2764
2901
  saveDocumentUpload() {
2765
- if (!this.isFormValid) {
2766
- this.formService.validateFormCompleteness();
2902
+ const payloadValidation = this.businessService.validatePayload(this.selectedAssignmentType, this.selectedCategory, this.selectedDocumentType, this.selectedApplicant, this.uploadedFiles);
2903
+ if (!payloadValidation.isValid) {
2904
+ this.formService.showWarningMessage('Incomplete Form', payloadValidation.message);
2767
2905
  return;
2768
2906
  }
2769
2907
  if (!this.formService.validateRequiredFields(this.selectedAssignmentType, this.selectedApplicant, this.selectedCategory, this.selectedDocumentType, this.uploadedFiles))
@@ -2771,22 +2909,16 @@ class DocumentUploadComponent {
2771
2909
  this.isSaving = true;
2772
2910
  this.saveDocumentMetadata();
2773
2911
  }
2912
+ /**
2913
+ * Handles templated upload for a single file.
2914
+ * Sets up progress tracking and upload listener for the file.
2915
+ * @param file - The file to be uploaded
2916
+ */
2774
2917
  handleTemplatedUpload(file) {
2775
- if (!this.formService.validateContextId(this.contextId, 'Context ID is required for upload.')) {
2918
+ if (!this.formService.validateContextId(this.contextId, 'Context ID is required for upload.'))
2776
2919
  return;
2777
- }
2778
2920
  this.fileProgress.set(file, SHARED.UPLOAD_PROGRESS_10);
2779
- this.documentUpload.uploadCompleted.pipe(takeUntil(this.destroy$)).subscribe(({ file: uploadedFile, response }) => {
2780
- if (uploadedFile === file) {
2781
- this.fileProgress.set(file, SHARED.UPLOAD_PROGRESS_100);
2782
- const uploadedFileObj = this.uploadedFiles.find(uf => uf.file === file);
2783
- if (uploadedFileObj) {
2784
- uploadedFileObj.uploadResponse = response;
2785
- uploadedFileObj.progress = SHARED.UPLOAD_PROGRESS_100;
2786
- }
2787
- this.cdr.detectChanges();
2788
- }
2789
- });
2921
+ this.setupFileUploadListener(file);
2790
2922
  this.documentUpload.handleTemplatedUpload(file, this.contextId);
2791
2923
  const formattedSize = this.businessService.formatFileSize(file.size, this.config);
2792
2924
  const uploadedFile = this.businessService.createUploadedFile(file, formattedSize);
@@ -2794,55 +2926,94 @@ class DocumentUploadComponent {
2794
2926
  this.uploadedFiles.push(uploadedFile);
2795
2927
  this.validateForm();
2796
2928
  }
2929
+ /**
2930
+ * Removes a document from the uploaded files list.
2931
+ * Updates progress tracking and validates form.
2932
+ * @param file - The file to be removed
2933
+ * @param index - The index of the file in the uploaded files array
2934
+ */
2797
2935
  handleDocumentRemove(file, index) {
2798
2936
  this.uploadedFiles.splice(index, 1);
2799
2937
  this.fileProgress.delete(file);
2800
- this.validateForm();
2938
+ this.validateAndEmit();
2801
2939
  this.cdr.detectChanges();
2802
2940
  }
2803
- // Utility methods
2804
- choose(event, callback) {
2805
- callback();
2806
- }
2807
- triggerFileUpload() {
2808
- this.fileUploader.choose();
2809
- }
2941
+ /**
2942
+ * Utility method for file upload component integration.
2943
+ * @param event - The file upload event
2944
+ * @param callback - Callback function to execute
2945
+ */
2946
+ choose(event, callback) { callback(); }
2947
+ /**
2948
+ * Triggers the file upload dialog.
2949
+ */
2950
+ triggerFileUpload() { this.fileUploader.choose(); }
2951
+ /**
2952
+ * Determines if the save button should be disabled.
2953
+ * @returns True if the save button should be disabled, false otherwise
2954
+ */
2810
2955
  getSaveButtonDisabled() {
2811
2956
  return this.businessService.isSaveButtonDisabled(this.selectedAssignmentType, this.selectedCategory, this.selectedDocumentType, this.selectedApplicant, this.uploadedFiles, this.isSaving);
2812
2957
  }
2813
- getProgress(file) {
2814
- return this.fileProgress.get(file) || 0;
2815
- }
2958
+ /**
2959
+ * Gets the upload progress for a specific file.
2960
+ * @param file - The file to get progress for
2961
+ * @returns The upload progress percentage (0-100)
2962
+ */
2963
+ getProgress(file) { return this.fileProgress.get(file) || 0; }
2964
+ /**
2965
+ * Checks if a file is currently uploading.
2966
+ * @param file - The file to check
2967
+ * @returns True if the file is uploading, false otherwise
2968
+ */
2816
2969
  isFileUploading(file) {
2817
2970
  const progress = this.fileProgress.get(file);
2818
2971
  return progress !== undefined && progress > 0 && progress < SHARED.UPLOAD_PROGRESS_100;
2819
2972
  }
2820
- isFileUploaded(file) {
2821
- const progress = this.fileProgress.get(file);
2822
- return progress === SHARED.UPLOAD_PROGRESS_100;
2823
- }
2824
- isFileError(file) {
2825
- const progress = this.fileProgress.get(file);
2826
- return progress === -1;
2827
- }
2973
+ /**
2974
+ * Checks if a file has been successfully uploaded.
2975
+ * @param file - The file to check
2976
+ * @returns True if the file is uploaded, false otherwise
2977
+ */
2978
+ isFileUploaded(file) { return this.fileProgress.get(file) === SHARED.UPLOAD_PROGRESS_100; }
2979
+ /**
2980
+ * Checks if a file upload encountered an error.
2981
+ * @param file - The file to check
2982
+ * @returns True if the file has an error, false otherwise
2983
+ */
2984
+ isFileError(file) { return this.fileProgress.get(file) === -1; }
2985
+ /**
2986
+ * Resets the form to its initial state.
2987
+ * Clears all selections, uploaded files, and progress tracking.
2988
+ */
2828
2989
  resetForm() {
2829
2990
  const initialState = this.businessService.getInitialFormState();
2830
2991
  Object.assign(this, initialState);
2831
2992
  this.fileProgress.clear();
2832
- this.filteredApplicantList = SHARED.EMPTY_ARRAY;
2993
+ this.filteredApplicantList = [];
2994
+ this.categoryOptions = [];
2995
+ this.documentTypeOptions = [];
2833
2996
  this.cdr.detectChanges();
2834
2997
  }
2835
- // Private helper methods
2998
+ /**
2999
+ * Resets form selections (applicant, category, document type).
3000
+ * Clears document type options.
3001
+ */
2836
3002
  resetSelections() {
2837
- this.selectedApplicant = SHARED.EMPTY;
2838
- this.selectedCategory = SHARED.EMPTY;
2839
- this.selectedDocumentType = SHARED.EMPTY;
3003
+ this.selectedApplicant = this.selectedCategory = this.selectedDocumentType = SHARED.EMPTY;
2840
3004
  this.documentTypeOptions = SHARED.EMPTY_ARRAY;
2841
3005
  }
3006
+ /**
3007
+ * Resets document type selection and clears document type options.
3008
+ */
2842
3009
  resetDocumentType() {
2843
3010
  this.selectedDocumentType = SHARED.EMPTY;
2844
3011
  this.documentTypeOptions = SHARED.EMPTY_ARRAY;
2845
3012
  }
3013
+ /**
3014
+ * Handles applicant loading based on assignment type.
3015
+ * Loads applicants if type is 'Applicant', otherwise filters existing list.
3016
+ */
2846
3017
  handleApplicantLoading() {
2847
3018
  if (this.selectedAssignmentType === SHARED.APPLICANT) {
2848
3019
  this.loadApplicants();
@@ -2851,54 +3022,78 @@ class DocumentUploadComponent {
2851
3022
  this.filterApplicants();
2852
3023
  }
2853
3024
  }
2854
- loadDocumentTypesIfCategorySelected() {
2855
- if (this.selectedCategory) {
2856
- this.loadDocumentTypes();
2857
- }
2858
- }
3025
+ /**
3026
+ * Handles successful loading of applicants data.
3027
+ * Updates applicant list, filters applicants, and validates form.
3028
+ * @param applicants - Array of loaded applicants
3029
+ */
2859
3030
  handleApplicantsLoaded(applicants) {
2860
3031
  this.applicantList = applicants;
2861
3032
  this.filterApplicants();
2862
3033
  this.isLoadingApplicants = false;
2863
3034
  this.validateForm();
2864
3035
  }
2865
- handleApplicantsError(error) {
2866
- this.isLoadingApplicants = false;
2867
- this.formService.showErrorMessage('Failed to Load Applicants', error?.message || 'Failed to load applicants');
2868
- }
3036
+ /**
3037
+ * Handles successful loading of categories data.
3038
+ * Updates category options and validates form.
3039
+ * @param categories - Array of loaded categories
3040
+ */
2869
3041
  handleCategoriesLoaded(categories) {
2870
3042
  this.categoryOptions = categories;
2871
3043
  this.isLoadingCategories = false;
2872
3044
  this.validateForm();
2873
3045
  }
2874
- handleCategoriesError(error) {
2875
- this.isLoadingCategories = false;
2876
- this.formService.showErrorMessage('Failed to Load Categories', error?.message || 'Failed to load categories');
2877
- }
3046
+ /**
3047
+ * Handles successful loading of document types data.
3048
+ * Updates document type options and validates form.
3049
+ * @param documentTypes - Array of loaded document types
3050
+ */
2878
3051
  handleDocumentTypesLoaded(documentTypes) {
2879
3052
  this.documentTypeOptions = documentTypes;
2880
3053
  this.isLoadingDocumentTypes = false;
2881
3054
  this.validateForm();
2882
3055
  }
2883
- handleDocumentTypesError(error) {
2884
- this.isLoadingDocumentTypes = false;
2885
- this.formService.showErrorMessage('Failed to Load Document Types', error?.message || 'Failed to load document types');
2886
- }
3056
+ /**
3057
+ * Handles successful upload completion.
3058
+ * Resets form and emits upload success event.
3059
+ * @param response - The upload response from the server
3060
+ */
2887
3061
  handleUploadSuccess(response) {
2888
3062
  this.isSaving = false;
2889
- this.formService.showSuccessMessage('Upload Successful', 'Documents uploaded and saved successfully!');
2890
3063
  this.resetForm();
3064
+ this.onUploadSuccess.emit();
2891
3065
  }
3066
+ /**
3067
+ * Handles upload error.
3068
+ * Resets saving state.
3069
+ * @param error - The error that occurred during upload
3070
+ */
2892
3071
  handleUploadError(error) {
2893
3072
  this.isSaving = false;
2894
- this.formService.showErrorMessage('Upload Failed', error?.message || 'Failed to save document upload');
2895
3073
  }
3074
+ /**
3075
+ * Filters applicants based on the selected assignment type.
3076
+ * Updates the filtered applicant list.
3077
+ */
2896
3078
  filterApplicants() {
2897
3079
  this.filteredApplicantList = this.dataService.handleApplicantsLoaded(this.applicantList, this.selectedAssignmentType);
2898
3080
  }
3081
+ /**
3082
+ * Validates the current form state.
3083
+ * Checks payload validation and emits form validation change if state changed.
3084
+ */
2899
3085
  validateForm() {
2900
- this.isFormValid = this.businessService.validateForm(this.selectedAssignmentType, this.selectedCategory, this.selectedDocumentType, this.selectedApplicant, this.uploadedFiles, this.categoryOptions, this.documentTypeOptions);
3086
+ const payloadValidation = this.businessService.validatePayload(this.selectedAssignmentType, this.selectedCategory, this.selectedDocumentType, this.selectedApplicant, this.uploadedFiles);
3087
+ const previousValidationState = this.isFormValid;
3088
+ this.isFormValid = payloadValidation.isValid;
3089
+ if (previousValidationState !== this.isFormValid) {
3090
+ this.onFormValidationChange.emit();
3091
+ }
2901
3092
  }
3093
+ /**
3094
+ * Saves document metadata to the server.
3095
+ * Prepares upload payload and calls business service to save.
3096
+ */
2902
3097
  saveDocumentMetadata() {
2903
3098
  const contextId = this.selectedApplicant || this.contextId;
2904
3099
  const payload = this.businessService.prepareUploadPayload(this.selectedAssignmentType, this.selectedCategory, this.selectedDocumentType, this.selectedApplicant, this.uploadedFiles, contextId);
@@ -2909,6 +3104,52 @@ class DocumentUploadComponent {
2909
3104
  error: (error) => this.handleUploadError(error)
2910
3105
  });
2911
3106
  }
3107
+ /**
3108
+ * Sets up a listener for file upload completion.
3109
+ * Updates progress tracking and emits validation change when upload completes.
3110
+ * @param file - The file to monitor for upload completion
3111
+ */
3112
+ setupFileUploadListener(file) {
3113
+ this.documentUpload.uploadCompleted.pipe(takeUntil(this.destroy$)).subscribe(({ file: uploadedFile, response }) => {
3114
+ if (uploadedFile === file) {
3115
+ this.fileProgress.set(file, SHARED.UPLOAD_PROGRESS_100);
3116
+ const uploadedFileObj = this.uploadedFiles.find(uf => uf.file === file);
3117
+ if (uploadedFileObj) {
3118
+ uploadedFileObj.uploadResponse = response;
3119
+ uploadedFileObj.progress = SHARED.UPLOAD_PROGRESS_100;
3120
+ }
3121
+ this.cdr.detectChanges();
3122
+ this.onFormValidationChange.emit();
3123
+ }
3124
+ });
3125
+ }
3126
+ /**
3127
+ * Handles errors during data loading operations.
3128
+ * Resets loading state and can be extended for error logging.
3129
+ * @param title - Error title for display
3130
+ * @param error - The error object
3131
+ * @param resetLoading - Callback to reset loading state
3132
+ */
3133
+ handleError(title, error, resetLoading) {
3134
+ resetLoading();
3135
+ }
3136
+ /**
3137
+ * Validates form and emits validation change event.
3138
+ */
3139
+ validateAndEmit() {
3140
+ this.validateForm();
3141
+ this.onFormValidationChange.emit();
3142
+ }
3143
+ /**
3144
+ * Emits form validation change event.
3145
+ */
3146
+ emitFormValidationChange() {
3147
+ this.onFormValidationChange.emit();
3148
+ }
3149
+ /**
3150
+ * Lifecycle hook that is called when component is destroyed.
3151
+ * Cleans up subscriptions and destroys services.
3152
+ */
2912
3153
  ngOnDestroy() {
2913
3154
  this.destroy$.next();
2914
3155
  this.destroy$.complete();
@@ -2916,16 +3157,172 @@ class DocumentUploadComponent {
2916
3157
  this.dataService.destroy();
2917
3158
  }
2918
3159
  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 }, { token: DocumentUploadBusinessService }, { token: DocumentUploadFormService }, { token: DocumentUploadDataService }], target: i0.ɵɵFactoryTarget.Component });
2919
- 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=\"document-upload-container\">\r\n <!-- Assignment Section -->\r\n <div class=\"assignment-section\">\r\n <h4>Assign to Applicant(s) or Application</h4>\r\n <div class=\"radio-group\">\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Applicant\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'applicant'\"\r\n ></p-radioButton>\r\n <label [for]=\"'applicant'\" class=\"radio-label\">Applicant(s)</label>\r\n </div>\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Application\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'application'\"\r\n ></p-radioButton>\r\n <label [for]=\"'application'\" class=\"radio-label\">Application</label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Applicant Selection (only shown when Applicant is selected) -->\r\n <div class=\"applicant-section\" *ngIf=\"selectedAssignmentType === 'Applicant'\">\r\n <h4>Select Applicant(s)</h4>\r\n <div class=\"grid\">\r\n <div \r\n *ngFor=\"let applicant of filteredApplicantList\" \r\n class=\"applicant-item col-12 md:col-6\"\r\n >\r\n <p-radioButton \r\n name=\"selectedApplicant\"\r\n [value]=\"applicant._id\"\r\n [(ngModel)]=\"selectedApplicant\"\r\n [inputId]=\"'applicant-' + applicant._id\"\r\n (onClick)=\"onApplicantSelectionChange()\"\r\n ></p-radioButton>\r\n <label [for]=\"'applicant-' + applicant._id\" class=\"applicant-label\">\r\n {{ applicant.name }}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Category Selection -->\r\n <div class=\"category-section\">\r\n <h4>Category</h4>\r\n <p-dropdown\r\n [options]=\"categoryOptions\"\r\n [(ngModel)]=\"selectedCategory\"\r\n placeholder=\"Select Category type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onCategoryChange()\"\r\n [disabled]=\"!categoryOptions.length\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- Document Type Selection -->\r\n <div class=\"document-type-section\">\r\n <h4>Document Type</h4>\r\n <p-dropdown\r\n [options]=\"documentTypeOptions\"\r\n [(ngModel)]=\"selectedDocumentType\"\r\n placeholder=\"Select Document type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onDocumentTypeChange()\"\r\n [disabled]=\"!documentTypeOptions.length || !selectedCategory\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- File Upload Section -->\r\n <div class=\"file-upload-section\">\r\n <h4>Upload Documents</h4>\r\n <div class=\"grid\">\r\n <div class=\"col-12 md:col-12\">\r\n <p-fileUpload \r\n #fileUploader \r\n [multiple]=\"true\" \r\n auto=\"true\" \r\n accept=\"image/png,application/pdf\" \r\n maxFileSize=\"26214400\"\r\n (onSelect)=\"onSelectedFiles($event)\"\r\n >\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 \r\n (onClick)=\"choose($event, chooseCallback)\" \r\n icon=\"pi pi-images\" \r\n [rounded]=\"true\"\r\n [outlined]=\"true\" \r\n />\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\"> \r\n {{ uploadedFile.formattedSize }}\r\n </div>\r\n <div class=\"white-space-nowrap\" style=\"color: #0F8BFD; font-family: 14px;\"> \r\n {{ uploadedFile.progress }} % \r\n </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 \r\n [value]=\"uploadedFile.progress\" \r\n [showValue]=\"false\" \r\n styleClass=\"h-1/2rem md:ml-auto relative\"\r\n [ngClass]=\"{ 'exceeded-progress-bar': uploadedFile.progress > 100 }\"\r\n >\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>\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}.document-upload-container{padding:1rem;max-height:70vh;overflow-y:auto}.assignment-section,.applicant-section,.category-section,.document-type-section,.file-upload-section{margin-bottom:1.5rem}.assignment-section h4,.applicant-section h4,.category-section h4,.document-type-section h4,.file-upload-section h4{margin:0 0 .75rem;font-size:1rem;font-weight:600;color:#212529}.radio-group{display:flex;gap:.75rem}.radio-item{display:flex;align-items:center;gap:.5rem;cursor:pointer;transition:all .2s ease}.radio-item:has(.p-radiobutton-box.p-highlight) .radio-label{color:#0f8bfd;font-weight:600}.radio-label{font-size:.9rem;color:#495057;cursor:pointer;-webkit-user-select:none;user-select:none;transition:color .2s ease}::ng-deep .p-dropdown{width:100%}::ng-deep .p-dropdown .p-dropdown-label{font-size:.9rem;color:#495057}::ng-deep .p-dropdown .p-dropdown-trigger{color:#6c757d}::ng-deep .p-dropdown:not(.p-disabled):hover{border-color:#0f8bfd}::ng-deep .p-dropdown:not(.p-disabled).p-focus{border-color:#0f8bfd;box-shadow:0 0 0 2px #0f8bfd33}::ng-deep .p-radiobutton .p-radiobutton-box{border-color:#ced4da;border-radius:4px;width:18px;height:18px}::ng-deep .p-radiobutton .p-radiobutton-box:hover{border-color:#0f8bfd}::ng-deep .p-radiobutton .p-radiobutton-box.p-highlight{border-color:#0f8bfd;background-color:transparent}::ng-deep .p-radiobutton .p-radiobutton-icon{background-color:#0f8bfd;width:8px;height:8px;border-radius:2px}.applicant-section .grid{margin:0;padding:0}.applicant-section .applicant-item{display:flex;align-items:center;gap:.75rem;border-radius:.5rem;background-color:#fff;transition:all .2s ease;cursor:pointer;margin-bottom:.75rem}.applicant-section .applicant-item:has(.p-radiobutton-box.p-highlight) .applicant-label{color:#0f8bfd;font-weight:600}.applicant-section .applicant-label{font-size:.95rem;color:#495057;cursor:pointer;-webkit-user-select:none;user-select:none;flex:1;font-weight:500;margin:0;transition:color .2s ease}@media (max-width: 768px){.applicant-section .applicant-item{margin-bottom:.5rem;padding:.75rem;min-height:50px}.applicant-section .applicant-label{font-size:.9rem}.document-upload-container{padding:.75rem}.assignment-section,.applicant-section,.category-section,.document-type-section,.file-upload-section{margin-bottom:1rem}}.applicant-list{display:none}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i4.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i10.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: i11.ProgressBar, selector: "p-progressBar", inputs: ["value", "showValue", "styleClass", "style", "unit", "mode", "color"] }, { kind: "component", type: i12.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "variant", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i14.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "autoShowPanelOnPrintableCharacterKeyDown", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }], encapsulation: i0.ViewEncapsulation.None });
3160
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentUploadComponent, isStandalone: false, selector: "lib-document-upload", inputs: { contextId: "contextId" }, outputs: { onFormValidationChange: "onFormValidationChange", onUploadSuccess: "onUploadSuccess" }, viewQueries: [{ propertyName: "fileUploader", first: true, predicate: ["fileUploader"], descendants: true }], ngImport: i0, template: "<div class=\"document-upload-container\">\r\n <!-- Assignment Section -->\r\n <div class=\"assignment-section\">\r\n <h4>Assign to Applicant(s) or Application</h4>\r\n <div class=\"radio-group\">\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Applicant\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'applicant'\"\r\n ></p-radioButton>\r\n <label [for]=\"'applicant'\" class=\"radio-label\">Applicant(s)</label>\r\n </div>\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Application\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'application'\"\r\n ></p-radioButton>\r\n <label [for]=\"'application'\" class=\"radio-label\">Application</label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Applicant Selection (only shown when Applicant is selected) -->\r\n <div class=\"applicant-section\" *ngIf=\"selectedAssignmentType === 'Applicant'\">\r\n <h4>Select Applicant(s)</h4>\r\n <div class=\"grid\">\r\n <div \r\n *ngFor=\"let applicant of filteredApplicantList\" \r\n class=\"applicant-item col-12 md:col-6\"\r\n >\r\n <p-radioButton \r\n name=\"selectedApplicant\"\r\n [value]=\"applicant._id\"\r\n [(ngModel)]=\"selectedApplicant\"\r\n [inputId]=\"'applicant-' + applicant._id\"\r\n (onClick)=\"onApplicantSelectionChange()\"\r\n ></p-radioButton>\r\n <label [for]=\"'applicant-' + applicant._id\" class=\"applicant-label\">\r\n {{ applicant.name }}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Category Selection -->\r\n <div class=\"category-section\">\r\n <h4>Category</h4>\r\n <p-dropdown\r\n [options]=\"categoryOptions\"\r\n [(ngModel)]=\"selectedCategory\"\r\n placeholder=\"Select Category type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onCategoryChange()\"\r\n [disabled]=\"!categoryOptions.length\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- Document Type Selection -->\r\n <div class=\"document-type-section\">\r\n <h4>Document Type</h4>\r\n <p-dropdown\r\n [options]=\"documentTypeOptions\"\r\n [(ngModel)]=\"selectedDocumentType\"\r\n placeholder=\"Select Document type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onDocumentTypeChange()\"\r\n [disabled]=\"!documentTypeOptions.length || !selectedCategory\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- File Upload Section -->\r\n <div class=\"file-upload-section\">\r\n <h4>Upload Documents</h4>\r\n <div class=\"grid\">\r\n <div class=\"col-12 md:col-12\">\r\n <p-fileUpload \r\n #fileUploader \r\n [multiple]=\"true\" \r\n auto=\"true\" \r\n accept=\"image/png,application/pdf\" \r\n maxFileSize=\"26214400\"\r\n (onSelect)=\"onSelectedFiles($event)\"\r\n >\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 \r\n (onClick)=\"choose($event, chooseCallback)\" \r\n icon=\"pi pi-images\" \r\n [rounded]=\"true\"\r\n [outlined]=\"true\" \r\n />\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\"> \r\n {{ uploadedFile.formattedSize }}\r\n </div>\r\n <div class=\"white-space-nowrap\" style=\"color: #0F8BFD; font-family: 14px;\"> \r\n {{ uploadedFile.progress }} % \r\n </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 \r\n [value]=\"uploadedFile.progress\" \r\n [showValue]=\"false\" \r\n styleClass=\"h-1/2rem md:ml-auto relative\"\r\n [ngClass]=\"{ 'exceeded-progress-bar': uploadedFile.progress > 100 }\"\r\n >\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>\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}.document-upload-container{padding:1rem;max-height:90vh}.assignment-section,.applicant-section,.category-section,.document-type-section,.file-upload-section{margin-bottom:1.5rem}.assignment-section h4,.applicant-section h4,.category-section h4,.document-type-section h4,.file-upload-section h4{margin:0 0 .75rem;font-size:1rem;font-weight:600;color:#212529}.radio-group{display:flex;gap:.75rem}.radio-item{display:flex;align-items:center;gap:.5rem;cursor:pointer;transition:all .2s ease}.radio-item:has(.p-radiobutton-box.p-highlight) .radio-label{color:#0f8bfd;font-weight:600}.radio-label{font-size:.9rem;color:#495057;cursor:pointer;-webkit-user-select:none;user-select:none;transition:color .2s ease}::ng-deep .p-dropdown{width:100%}::ng-deep .p-dropdown .p-dropdown-label{font-size:.9rem;color:#495057}::ng-deep .p-dropdown .p-dropdown-trigger{color:#6c757d}::ng-deep .p-dropdown:not(.p-disabled):hover{border-color:#0f8bfd}::ng-deep .p-dropdown:not(.p-disabled).p-focus{border-color:#0f8bfd;box-shadow:0 0 0 2px #0f8bfd33}::ng-deep .p-radiobutton .p-radiobutton-box{border-color:#ced4da;border-radius:4px;width:18px;height:18px}::ng-deep .p-radiobutton .p-radiobutton-box:hover{border-color:#0f8bfd}::ng-deep .p-radiobutton .p-radiobutton-box.p-highlight{border-color:#0f8bfd;background-color:transparent}::ng-deep .p-radiobutton .p-radiobutton-icon{background-color:#0f8bfd;width:8px;height:8px;border-radius:2px}.applicant-section .grid{margin:0;padding:0}.applicant-section .applicant-item{display:flex;align-items:center;gap:.75rem;border-radius:.5rem;background-color:#fff;transition:all .2s ease;cursor:pointer;margin-bottom:.75rem}.applicant-section .applicant-item:has(.p-radiobutton-box.p-highlight) .applicant-label{color:#0f8bfd;font-weight:600}.applicant-section .applicant-label{font-size:.95rem;color:#495057;cursor:pointer;-webkit-user-select:none;user-select:none;flex:1;font-weight:500;margin:0;transition:color .2s ease}@media (max-width: 768px){.applicant-section .applicant-item{margin-bottom:.5rem;padding:.75rem;min-height:50px}.applicant-section .applicant-label{font-size:.9rem}.document-upload-container{padding:.75rem}.assignment-section,.applicant-section,.category-section,.document-type-section,.file-upload-section{margin-bottom:1rem}}.category-section .p-dropdown,.document-type-section .p-dropdown{width:100%!important;min-width:100%!important}.category-section .p-dropdown-panel,.document-type-section .p-dropdown-panel{width:100%!important}:host ::ng-deep .p-dropdown{width:100%!important}:host ::ng-deep .p-dropdown-panel{width:100%!important}.applicant-list{display:none}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i4.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i10.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: i11.ProgressBar, selector: "p-progressBar", inputs: ["value", "showValue", "styleClass", "style", "unit", "mode", "color"] }, { kind: "component", type: i12.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "variant", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i14.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "autoShowPanelOnPrintableCharacterKeyDown", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }], encapsulation: i0.ViewEncapsulation.None });
2920
3161
  }
2921
3162
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentUploadComponent, decorators: [{
2922
3163
  type: Component,
2923
- args: [{ selector: 'lib-document-upload', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-upload-container\">\r\n <!-- Assignment Section -->\r\n <div class=\"assignment-section\">\r\n <h4>Assign to Applicant(s) or Application</h4>\r\n <div class=\"radio-group\">\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Applicant\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'applicant'\"\r\n ></p-radioButton>\r\n <label [for]=\"'applicant'\" class=\"radio-label\">Applicant(s)</label>\r\n </div>\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Application\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'application'\"\r\n ></p-radioButton>\r\n <label [for]=\"'application'\" class=\"radio-label\">Application</label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Applicant Selection (only shown when Applicant is selected) -->\r\n <div class=\"applicant-section\" *ngIf=\"selectedAssignmentType === 'Applicant'\">\r\n <h4>Select Applicant(s)</h4>\r\n <div class=\"grid\">\r\n <div \r\n *ngFor=\"let applicant of filteredApplicantList\" \r\n class=\"applicant-item col-12 md:col-6\"\r\n >\r\n <p-radioButton \r\n name=\"selectedApplicant\"\r\n [value]=\"applicant._id\"\r\n [(ngModel)]=\"selectedApplicant\"\r\n [inputId]=\"'applicant-' + applicant._id\"\r\n (onClick)=\"onApplicantSelectionChange()\"\r\n ></p-radioButton>\r\n <label [for]=\"'applicant-' + applicant._id\" class=\"applicant-label\">\r\n {{ applicant.name }}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Category Selection -->\r\n <div class=\"category-section\">\r\n <h4>Category</h4>\r\n <p-dropdown\r\n [options]=\"categoryOptions\"\r\n [(ngModel)]=\"selectedCategory\"\r\n placeholder=\"Select Category type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onCategoryChange()\"\r\n [disabled]=\"!categoryOptions.length\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- Document Type Selection -->\r\n <div class=\"document-type-section\">\r\n <h4>Document Type</h4>\r\n <p-dropdown\r\n [options]=\"documentTypeOptions\"\r\n [(ngModel)]=\"selectedDocumentType\"\r\n placeholder=\"Select Document type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onDocumentTypeChange()\"\r\n [disabled]=\"!documentTypeOptions.length || !selectedCategory\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- File Upload Section -->\r\n <div class=\"file-upload-section\">\r\n <h4>Upload Documents</h4>\r\n <div class=\"grid\">\r\n <div class=\"col-12 md:col-12\">\r\n <p-fileUpload \r\n #fileUploader \r\n [multiple]=\"true\" \r\n auto=\"true\" \r\n accept=\"image/png,application/pdf\" \r\n maxFileSize=\"26214400\"\r\n (onSelect)=\"onSelectedFiles($event)\"\r\n >\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 \r\n (onClick)=\"choose($event, chooseCallback)\" \r\n icon=\"pi pi-images\" \r\n [rounded]=\"true\"\r\n [outlined]=\"true\" \r\n />\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\"> \r\n {{ uploadedFile.formattedSize }}\r\n </div>\r\n <div class=\"white-space-nowrap\" style=\"color: #0F8BFD; font-family: 14px;\"> \r\n {{ uploadedFile.progress }} % \r\n </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 \r\n [value]=\"uploadedFile.progress\" \r\n [showValue]=\"false\" \r\n styleClass=\"h-1/2rem md:ml-auto relative\"\r\n [ngClass]=\"{ 'exceeded-progress-bar': uploadedFile.progress > 100 }\"\r\n >\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>\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}.document-upload-container{padding:1rem;max-height:70vh;overflow-y:auto}.assignment-section,.applicant-section,.category-section,.document-type-section,.file-upload-section{margin-bottom:1.5rem}.assignment-section h4,.applicant-section h4,.category-section h4,.document-type-section h4,.file-upload-section h4{margin:0 0 .75rem;font-size:1rem;font-weight:600;color:#212529}.radio-group{display:flex;gap:.75rem}.radio-item{display:flex;align-items:center;gap:.5rem;cursor:pointer;transition:all .2s ease}.radio-item:has(.p-radiobutton-box.p-highlight) .radio-label{color:#0f8bfd;font-weight:600}.radio-label{font-size:.9rem;color:#495057;cursor:pointer;-webkit-user-select:none;user-select:none;transition:color .2s ease}::ng-deep .p-dropdown{width:100%}::ng-deep .p-dropdown .p-dropdown-label{font-size:.9rem;color:#495057}::ng-deep .p-dropdown .p-dropdown-trigger{color:#6c757d}::ng-deep .p-dropdown:not(.p-disabled):hover{border-color:#0f8bfd}::ng-deep .p-dropdown:not(.p-disabled).p-focus{border-color:#0f8bfd;box-shadow:0 0 0 2px #0f8bfd33}::ng-deep .p-radiobutton .p-radiobutton-box{border-color:#ced4da;border-radius:4px;width:18px;height:18px}::ng-deep .p-radiobutton .p-radiobutton-box:hover{border-color:#0f8bfd}::ng-deep .p-radiobutton .p-radiobutton-box.p-highlight{border-color:#0f8bfd;background-color:transparent}::ng-deep .p-radiobutton .p-radiobutton-icon{background-color:#0f8bfd;width:8px;height:8px;border-radius:2px}.applicant-section .grid{margin:0;padding:0}.applicant-section .applicant-item{display:flex;align-items:center;gap:.75rem;border-radius:.5rem;background-color:#fff;transition:all .2s ease;cursor:pointer;margin-bottom:.75rem}.applicant-section .applicant-item:has(.p-radiobutton-box.p-highlight) .applicant-label{color:#0f8bfd;font-weight:600}.applicant-section .applicant-label{font-size:.95rem;color:#495057;cursor:pointer;-webkit-user-select:none;user-select:none;flex:1;font-weight:500;margin:0;transition:color .2s ease}@media (max-width: 768px){.applicant-section .applicant-item{margin-bottom:.5rem;padding:.75rem;min-height:50px}.applicant-section .applicant-label{font-size:.9rem}.document-upload-container{padding:.75rem}.assignment-section,.applicant-section,.category-section,.document-type-section,.file-upload-section{margin-bottom:1rem}}.applicant-list{display:none}\n"] }]
3164
+ args: [{ selector: 'lib-document-upload', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-upload-container\">\r\n <!-- Assignment Section -->\r\n <div class=\"assignment-section\">\r\n <h4>Assign to Applicant(s) or Application</h4>\r\n <div class=\"radio-group\">\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Applicant\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'applicant'\"\r\n ></p-radioButton>\r\n <label [for]=\"'applicant'\" class=\"radio-label\">Applicant(s)</label>\r\n </div>\r\n <div class=\"radio-item\">\r\n <p-radioButton \r\n name=\"assignmentType\" \r\n value=\"Application\" \r\n [(ngModel)]=\"selectedAssignmentType\"\r\n (onClick)=\"onAssignmentTypeChange()\"\r\n [inputId]=\"'application'\"\r\n ></p-radioButton>\r\n <label [for]=\"'application'\" class=\"radio-label\">Application</label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Applicant Selection (only shown when Applicant is selected) -->\r\n <div class=\"applicant-section\" *ngIf=\"selectedAssignmentType === 'Applicant'\">\r\n <h4>Select Applicant(s)</h4>\r\n <div class=\"grid\">\r\n <div \r\n *ngFor=\"let applicant of filteredApplicantList\" \r\n class=\"applicant-item col-12 md:col-6\"\r\n >\r\n <p-radioButton \r\n name=\"selectedApplicant\"\r\n [value]=\"applicant._id\"\r\n [(ngModel)]=\"selectedApplicant\"\r\n [inputId]=\"'applicant-' + applicant._id\"\r\n (onClick)=\"onApplicantSelectionChange()\"\r\n ></p-radioButton>\r\n <label [for]=\"'applicant-' + applicant._id\" class=\"applicant-label\">\r\n {{ applicant.name }}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Category Selection -->\r\n <div class=\"category-section\">\r\n <h4>Category</h4>\r\n <p-dropdown\r\n [options]=\"categoryOptions\"\r\n [(ngModel)]=\"selectedCategory\"\r\n placeholder=\"Select Category type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onCategoryChange()\"\r\n [disabled]=\"!categoryOptions.length\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- Document Type Selection -->\r\n <div class=\"document-type-section\">\r\n <h4>Document Type</h4>\r\n <p-dropdown\r\n [options]=\"documentTypeOptions\"\r\n [(ngModel)]=\"selectedDocumentType\"\r\n placeholder=\"Select Document type\"\r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n (onChange)=\"onDocumentTypeChange()\"\r\n [disabled]=\"!documentTypeOptions.length || !selectedCategory\"\r\n class=\"w-full\"\r\n ></p-dropdown>\r\n </div>\r\n\r\n <!-- File Upload Section -->\r\n <div class=\"file-upload-section\">\r\n <h4>Upload Documents</h4>\r\n <div class=\"grid\">\r\n <div class=\"col-12 md:col-12\">\r\n <p-fileUpload \r\n #fileUploader \r\n [multiple]=\"true\" \r\n auto=\"true\" \r\n accept=\"image/png,application/pdf\" \r\n maxFileSize=\"26214400\"\r\n (onSelect)=\"onSelectedFiles($event)\"\r\n >\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 \r\n (onClick)=\"choose($event, chooseCallback)\" \r\n icon=\"pi pi-images\" \r\n [rounded]=\"true\"\r\n [outlined]=\"true\" \r\n />\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\"> \r\n {{ uploadedFile.formattedSize }}\r\n </div>\r\n <div class=\"white-space-nowrap\" style=\"color: #0F8BFD; font-family: 14px;\"> \r\n {{ uploadedFile.progress }} % \r\n </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 \r\n [value]=\"uploadedFile.progress\" \r\n [showValue]=\"false\" \r\n styleClass=\"h-1/2rem md:ml-auto relative\"\r\n [ngClass]=\"{ 'exceeded-progress-bar': uploadedFile.progress > 100 }\"\r\n >\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>\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}.document-upload-container{padding:1rem;max-height:90vh}.assignment-section,.applicant-section,.category-section,.document-type-section,.file-upload-section{margin-bottom:1.5rem}.assignment-section h4,.applicant-section h4,.category-section h4,.document-type-section h4,.file-upload-section h4{margin:0 0 .75rem;font-size:1rem;font-weight:600;color:#212529}.radio-group{display:flex;gap:.75rem}.radio-item{display:flex;align-items:center;gap:.5rem;cursor:pointer;transition:all .2s ease}.radio-item:has(.p-radiobutton-box.p-highlight) .radio-label{color:#0f8bfd;font-weight:600}.radio-label{font-size:.9rem;color:#495057;cursor:pointer;-webkit-user-select:none;user-select:none;transition:color .2s ease}::ng-deep .p-dropdown{width:100%}::ng-deep .p-dropdown .p-dropdown-label{font-size:.9rem;color:#495057}::ng-deep .p-dropdown .p-dropdown-trigger{color:#6c757d}::ng-deep .p-dropdown:not(.p-disabled):hover{border-color:#0f8bfd}::ng-deep .p-dropdown:not(.p-disabled).p-focus{border-color:#0f8bfd;box-shadow:0 0 0 2px #0f8bfd33}::ng-deep .p-radiobutton .p-radiobutton-box{border-color:#ced4da;border-radius:4px;width:18px;height:18px}::ng-deep .p-radiobutton .p-radiobutton-box:hover{border-color:#0f8bfd}::ng-deep .p-radiobutton .p-radiobutton-box.p-highlight{border-color:#0f8bfd;background-color:transparent}::ng-deep .p-radiobutton .p-radiobutton-icon{background-color:#0f8bfd;width:8px;height:8px;border-radius:2px}.applicant-section .grid{margin:0;padding:0}.applicant-section .applicant-item{display:flex;align-items:center;gap:.75rem;border-radius:.5rem;background-color:#fff;transition:all .2s ease;cursor:pointer;margin-bottom:.75rem}.applicant-section .applicant-item:has(.p-radiobutton-box.p-highlight) .applicant-label{color:#0f8bfd;font-weight:600}.applicant-section .applicant-label{font-size:.95rem;color:#495057;cursor:pointer;-webkit-user-select:none;user-select:none;flex:1;font-weight:500;margin:0;transition:color .2s ease}@media (max-width: 768px){.applicant-section .applicant-item{margin-bottom:.5rem;padding:.75rem;min-height:50px}.applicant-section .applicant-label{font-size:.9rem}.document-upload-container{padding:.75rem}.assignment-section,.applicant-section,.category-section,.document-type-section,.file-upload-section{margin-bottom:1rem}}.category-section .p-dropdown,.document-type-section .p-dropdown{width:100%!important;min-width:100%!important}.category-section .p-dropdown-panel,.document-type-section .p-dropdown-panel{width:100%!important}:host ::ng-deep .p-dropdown{width:100%!important}:host ::ng-deep .p-dropdown-panel{width:100%!important}.applicant-list{display:none}\n"] }]
2924
3165
  }], ctorParameters: () => [{ type: DocumentUploadService }, { type: DocumentService }, { type: i3.PrimeNGConfig }, { type: FileFormatService }, { type: i3.MessageService }, { type: i0.ChangeDetectorRef }, { type: DocumentUploadBusinessService }, { type: DocumentUploadFormService }, { type: DocumentUploadDataService }], propDecorators: { contextId: [{
2925
3166
  type: Input
2926
3167
  }], fileUploader: [{
2927
3168
  type: ViewChild,
2928
3169
  args: ['fileUploader']
3170
+ }], onFormValidationChange: [{
3171
+ type: Output
3172
+ }], onUploadSuccess: [{
3173
+ type: Output
3174
+ }] } });
3175
+
3176
+ class SidebarComponent {
3177
+ visible = false;
3178
+ position = 'right';
3179
+ width = SHARED.WIDTH;
3180
+ title = SHARED.EMPTY;
3181
+ showCloseButton = true;
3182
+ modal = true;
3183
+ dismissible = true;
3184
+ closeOnEscape = true;
3185
+ baseZIndex = SHARED.BASEZINDEX;
3186
+ autoZIndex = true;
3187
+ styleClass = SHARED.EMPTY;
3188
+ appendTo = 'body';
3189
+ blockScroll = true;
3190
+ closeIcon = SHARED.CLOSE_ICON;
3191
+ showSaveButton = false;
3192
+ saveButtonText = SHARED.SAVE;
3193
+ saveButtonDisabled = false;
3194
+ successMessage = SHARED.SUCCESS_MESSAGE;
3195
+ errorMessage = SHARED.EMPTY;
3196
+ visibleChange = new EventEmitter();
3197
+ onShow = new EventEmitter();
3198
+ onHide = new EventEmitter();
3199
+ onSave = new EventEmitter();
3200
+ showSuccessMessage = false;
3201
+ showErrorMessage = false;
3202
+ /**
3203
+ * Opens the sidebar
3204
+ */
3205
+ open() {
3206
+ this.visible = true;
3207
+ this.clearMessages();
3208
+ this.visibleChange.emit(this.visible);
3209
+ this.onShow.emit();
3210
+ }
3211
+ /**
3212
+ * Closes the sidebar
3213
+ */
3214
+ close() {
3215
+ this.visible = false;
3216
+ this.clearMessages();
3217
+ this.visibleChange.emit(this.visible);
3218
+ this.onHide.emit();
3219
+ }
3220
+ /**
3221
+ * Toggles the sidebar visibility
3222
+ */
3223
+ toggle() {
3224
+ this.visible = !this.visible;
3225
+ if (this.visible) {
3226
+ this.clearMessages();
3227
+ this.onShow.emit();
3228
+ }
3229
+ else {
3230
+ this.clearMessages();
3231
+ this.onHide.emit();
3232
+ }
3233
+ this.visibleChange.emit(this.visible);
3234
+ }
3235
+ /**
3236
+ * Handles the close button click
3237
+ */
3238
+ onCloseClick() {
3239
+ this.close();
3240
+ }
3241
+ /**
3242
+ * Handles the mask click (when dismissible is true)
3243
+ */
3244
+ onMaskClick() {
3245
+ if (this.dismissible) {
3246
+ this.close();
3247
+ }
3248
+ }
3249
+ /**
3250
+ * Shows success message and closes sidebar after delay
3251
+ */
3252
+ showSuccess() {
3253
+ this.showSuccessMessage = true;
3254
+ this.showErrorMessage = false;
3255
+ setTimeout(() => {
3256
+ this.close();
3257
+ }, 2000);
3258
+ }
3259
+ /**
3260
+ * Shows error message
3261
+ */
3262
+ showError(message) {
3263
+ this.showErrorMessage = true;
3264
+ this.showSuccessMessage = false;
3265
+ this.errorMessage = message || SHARED.EMPTY;
3266
+ }
3267
+ /**
3268
+ * Clears all messages
3269
+ */
3270
+ clearMessages() {
3271
+ this.showSuccessMessage = false;
3272
+ this.showErrorMessage = false;
3273
+ }
3274
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3275
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SidebarComponent, isStandalone: false, selector: "lib-sidebar", inputs: { visible: "visible", position: "position", width: "width", title: "title", showCloseButton: "showCloseButton", modal: "modal", dismissible: "dismissible", closeOnEscape: "closeOnEscape", baseZIndex: "baseZIndex", autoZIndex: "autoZIndex", styleClass: "styleClass", appendTo: "appendTo", blockScroll: "blockScroll", closeIcon: "closeIcon", showSaveButton: "showSaveButton", saveButtonText: "saveButtonText", saveButtonDisabled: "saveButtonDisabled", successMessage: "successMessage", errorMessage: "errorMessage" }, outputs: { visibleChange: "visibleChange", onShow: "onShow", onHide: "onHide", onSave: "onSave" }, ngImport: i0, template: "<p-sidebar \r\n [(visible)]=\"visible\"\r\n [position]=\"position\"\r\n [style]=\"{width: width}\"\r\n [modal]=\"modal\"\r\n [dismissible]=\"dismissible\"\r\n [closeOnEscape]=\"closeOnEscape\"\r\n [baseZIndex]=\"baseZIndex\"\r\n [autoZIndex]=\"autoZIndex\"\r\n [styleClass]=\"styleClass\"\r\n [appendTo]=\"appendTo\"\r\n [blockScroll]=\"blockScroll\"\r\n (visibleChange)=\"visibleChange.emit($event)\"\r\n (onShow)=\"onShow.emit()\"\r\n (onHide)=\"onHide.emit()\"\r\n \r\n>\r\n <ng-template pTemplate=\"header\" *ngIf=\"title || showCloseButton || showSaveButton\">\r\n <div class=\"sidebar-header\">\r\n <h3 *ngIf=\"title\" class=\"sidebar-title\">{{ title }}</h3>\r\n <div class=\"header-content\">\r\n <ng-content select=\"[header]\"></ng-content>\r\n \r\n <p-messages \r\n *ngIf=\"showSuccessMessage\"\r\n severity=\"success\"\r\n [closable]=\"false\"\r\n [style]=\"{'margin-bottom': '0.5rem'}\"\r\n class=\"ml-3\"\r\n >\r\n <ng-template pTemplate=\"message\">\r\n <span>{{ successMessage }}</span>\r\n </ng-template>\r\n </p-messages>\r\n <p-messages \r\n *ngIf=\"showErrorMessage\"\r\n severity=\"error\"\r\n [closable]=\"false\"\r\n [style]=\"{'margin-bottom': '0.5rem'}\"\r\n class=\"ml-3\"\r\n >\r\n <ng-template pTemplate=\"message\">\r\n <span>{{ errorMessage }}</span>\r\n </ng-template>\r\n </p-messages>\r\n\r\n <div class=\"header-actions mr-3\">\r\n \r\n <button \r\n *ngIf=\"showSaveButton\"\r\n pButton \r\n type=\"button\" \r\n [label]=\"saveButtonText\"\r\n [disabled]=\"saveButtonDisabled\"\r\n class=\"p-button-primary\"\r\n (click)=\"onSave.emit()\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"content\">\r\n <div class=\"sidebar-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </ng-template>\r\n</p-sidebar>\r\n", styles: [":host{display:block}.sidebar-header{display:flex;justify-content:space-between;align-items:center;padding:0;width:100%}.sidebar-title{margin:0;font-size:1.25rem;font-weight:600;color:#212529;flex:1}.header-content{display:flex;align-items:center;gap:.5rem;justify-content:space-between;width:100%}.header-actions{display:flex;align-items:center;gap:.5rem;margin-left:auto;margin-right:0}.close-button{background:none;border:none;color:#6c757d;cursor:pointer;padding:.5rem;border-radius:.375rem;transition:all .2s ease;display:flex;align-items:center;justify-content:center;min-width:2rem;min-height:2rem;margin-right:.5rem}.close-button:hover{background-color:#e9ecef;color:#495057}.close-button:focus{outline:none;box-shadow:0 0 0 3px #0f8bfd4d}.close-button i{font-size:1rem}.sidebar-content{height:100%;overflow-y:auto;padding:0}::ng-deep .p-sidebar .p-sidebar-header{border-bottom:1px solid #e9ecef;margin-bottom:1rem;background-color:#f8f9fa}::ng-deep .p-sidebar .p-sidebar-content{padding:0 1.5rem 1.5rem;height:calc(100% - 80px);overflow-y:auto}::ng-deep .p-sidebar.p-sidebar-right .p-sidebar-content{padding-left:1.5rem;padding-right:1.5rem}::ng-deep .p-sidebar.p-sidebar-left .p-sidebar-content{padding-left:1.5rem;padding-right:1.5rem}@media (max-width: 768px){::ng-deep .p-sidebar{width:100%!important;max-width:100%!important}::ng-deep .p-sidebar .p-sidebar-header{padding:1rem 1rem 0}::ng-deep .p-sidebar .p-sidebar-content{padding:0 1rem 1rem}}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i4$1.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: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }] });
3276
+ }
3277
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SidebarComponent, decorators: [{
3278
+ type: Component,
3279
+ args: [{ selector: 'lib-sidebar', standalone: false, template: "<p-sidebar \r\n [(visible)]=\"visible\"\r\n [position]=\"position\"\r\n [style]=\"{width: width}\"\r\n [modal]=\"modal\"\r\n [dismissible]=\"dismissible\"\r\n [closeOnEscape]=\"closeOnEscape\"\r\n [baseZIndex]=\"baseZIndex\"\r\n [autoZIndex]=\"autoZIndex\"\r\n [styleClass]=\"styleClass\"\r\n [appendTo]=\"appendTo\"\r\n [blockScroll]=\"blockScroll\"\r\n (visibleChange)=\"visibleChange.emit($event)\"\r\n (onShow)=\"onShow.emit()\"\r\n (onHide)=\"onHide.emit()\"\r\n \r\n>\r\n <ng-template pTemplate=\"header\" *ngIf=\"title || showCloseButton || showSaveButton\">\r\n <div class=\"sidebar-header\">\r\n <h3 *ngIf=\"title\" class=\"sidebar-title\">{{ title }}</h3>\r\n <div class=\"header-content\">\r\n <ng-content select=\"[header]\"></ng-content>\r\n \r\n <p-messages \r\n *ngIf=\"showSuccessMessage\"\r\n severity=\"success\"\r\n [closable]=\"false\"\r\n [style]=\"{'margin-bottom': '0.5rem'}\"\r\n class=\"ml-3\"\r\n >\r\n <ng-template pTemplate=\"message\">\r\n <span>{{ successMessage }}</span>\r\n </ng-template>\r\n </p-messages>\r\n <p-messages \r\n *ngIf=\"showErrorMessage\"\r\n severity=\"error\"\r\n [closable]=\"false\"\r\n [style]=\"{'margin-bottom': '0.5rem'}\"\r\n class=\"ml-3\"\r\n >\r\n <ng-template pTemplate=\"message\">\r\n <span>{{ errorMessage }}</span>\r\n </ng-template>\r\n </p-messages>\r\n\r\n <div class=\"header-actions mr-3\">\r\n \r\n <button \r\n *ngIf=\"showSaveButton\"\r\n pButton \r\n type=\"button\" \r\n [label]=\"saveButtonText\"\r\n [disabled]=\"saveButtonDisabled\"\r\n class=\"p-button-primary\"\r\n (click)=\"onSave.emit()\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"content\">\r\n <div class=\"sidebar-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </ng-template>\r\n</p-sidebar>\r\n", styles: [":host{display:block}.sidebar-header{display:flex;justify-content:space-between;align-items:center;padding:0;width:100%}.sidebar-title{margin:0;font-size:1.25rem;font-weight:600;color:#212529;flex:1}.header-content{display:flex;align-items:center;gap:.5rem;justify-content:space-between;width:100%}.header-actions{display:flex;align-items:center;gap:.5rem;margin-left:auto;margin-right:0}.close-button{background:none;border:none;color:#6c757d;cursor:pointer;padding:.5rem;border-radius:.375rem;transition:all .2s ease;display:flex;align-items:center;justify-content:center;min-width:2rem;min-height:2rem;margin-right:.5rem}.close-button:hover{background-color:#e9ecef;color:#495057}.close-button:focus{outline:none;box-shadow:0 0 0 3px #0f8bfd4d}.close-button i{font-size:1rem}.sidebar-content{height:100%;overflow-y:auto;padding:0}::ng-deep .p-sidebar .p-sidebar-header{border-bottom:1px solid #e9ecef;margin-bottom:1rem;background-color:#f8f9fa}::ng-deep .p-sidebar .p-sidebar-content{padding:0 1.5rem 1.5rem;height:calc(100% - 80px);overflow-y:auto}::ng-deep .p-sidebar.p-sidebar-right .p-sidebar-content{padding-left:1.5rem;padding-right:1.5rem}::ng-deep .p-sidebar.p-sidebar-left .p-sidebar-content{padding-left:1.5rem;padding-right:1.5rem}@media (max-width: 768px){::ng-deep .p-sidebar{width:100%!important;max-width:100%!important}::ng-deep .p-sidebar .p-sidebar-header{padding:1rem 1rem 0}::ng-deep .p-sidebar .p-sidebar-content{padding:0 1rem 1rem}}\n"] }]
3280
+ }], propDecorators: { visible: [{
3281
+ type: Input
3282
+ }], position: [{
3283
+ type: Input
3284
+ }], width: [{
3285
+ type: Input
3286
+ }], title: [{
3287
+ type: Input
3288
+ }], showCloseButton: [{
3289
+ type: Input
3290
+ }], modal: [{
3291
+ type: Input
3292
+ }], dismissible: [{
3293
+ type: Input
3294
+ }], closeOnEscape: [{
3295
+ type: Input
3296
+ }], baseZIndex: [{
3297
+ type: Input
3298
+ }], autoZIndex: [{
3299
+ type: Input
3300
+ }], styleClass: [{
3301
+ type: Input
3302
+ }], appendTo: [{
3303
+ type: Input
3304
+ }], blockScroll: [{
3305
+ type: Input
3306
+ }], closeIcon: [{
3307
+ type: Input
3308
+ }], showSaveButton: [{
3309
+ type: Input
3310
+ }], saveButtonText: [{
3311
+ type: Input
3312
+ }], saveButtonDisabled: [{
3313
+ type: Input
3314
+ }], successMessage: [{
3315
+ type: Input
3316
+ }], errorMessage: [{
3317
+ type: Input
3318
+ }], visibleChange: [{
3319
+ type: Output
3320
+ }], onShow: [{
3321
+ type: Output
3322
+ }], onHide: [{
3323
+ type: Output
3324
+ }], onSave: [{
3325
+ type: Output
2929
3326
  }] } });
2930
3327
 
2931
3328
  class UserListService {
@@ -3273,6 +3670,7 @@ class DocumentSearchComponent {
3273
3670
  onActionClick = new EventEmitter();
3274
3671
  searchTerm = SHARED.EMPTY;
3275
3672
  destroy$ = new Subject();
3673
+ searchSubject = new Subject();
3276
3674
  constructor(documentHelperService) {
3277
3675
  this.documentHelperService = documentHelperService;
3278
3676
  }
@@ -3315,134 +3713,18 @@ class DocumentSearchComponent {
3315
3713
  this.searchTerm = SHARED.EMPTY;
3316
3714
  this.documentHelperService.setSearchKey(null);
3317
3715
  }
3318
- searchSubject = new Subject();
3319
3716
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentSearchComponent, deps: [{ token: DocumentHelperService }], target: i0.ɵɵFactoryTarget.Component });
3320
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentSearchComponent, isStandalone: false, selector: "document-search", inputs: { contextId: "contextId" }, outputs: { onActionClick: "onActionClick" }, ngImport: i0, template: "<div class=\"search-container\">\r\n <div class=\"search-input-wrapper\">\r\n <i class=\"pi pi-search search-icon\"></i>\r\n <input \r\n type=\"text\" \r\n [(ngModel)]=\"searchTerm\"\r\n (ngModelChange)=\"onSearchInputChange($event)\"\r\n class=\"search-input\"\r\n placeholder=\"Search by document name, category, type, status or applicant name...\"\r\n [attr.aria-label]=\"'Search documents'\"\r\n />\r\n <button \r\n *ngIf=\"searchTerm\"\r\n type=\"button\"\r\n class=\"clear-button\"\r\n (click)=\"onClearSearch()\"\r\n [attr.aria-label]=\"'Clear search'\"\r\n >\r\n <i class=\"pi pi-times\"></i>\r\n </button>\r\n </div>\r\n \r\n <button \r\n type=\"button\"\r\n class=\"action-button\"\r\n (click)=\"onActionClick.emit()\"\r\n [attr.aria-label]=\"'Open actions menu'\"\r\n >\r\n Actions\r\n </button>\r\n</div> ", styles: [".search-container{display:flex;align-items:center;gap:1rem;width:100%;justify-content:space-between}.search-input-wrapper{position:relative;flex:1;display:flex;align-items:center;max-width:40%}.search-icon{position:absolute;left:12px;color:#6c757d;z-index:1}.search-input{width:100%;padding:12px 40px;border:1px solid #dee2e6;border-radius:8px;font-size:14px;outline:none;transition:border-color .2s ease,box-shadow .2s ease}.search-input:focus{border-color:#0f8bfd;box-shadow:0 0 0 3px #0f8bfd1a}.search-input::placeholder{color:#6c757d}.clear-button{position:absolute;right:12px;background:none;border:none;color:#6c757d;cursor:pointer;padding:4px;border-radius:4px;transition:background-color .2s ease,color .2s ease}.clear-button:hover{background-color:#f8f9fa;color:#495057}.action-button{background-color:#0f8bfd;color:#fff;border:none;padding:12px 24px;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color .2s ease,transform .1s ease;white-space:nowrap}.action-button:hover{background-color:#0d7ae6;transform:translateY(-1px)}.action-button:active{transform:translateY(0)}.action-button:focus{outline:none;box-shadow:0 0 0 3px #0f8bfd4d}@media (max-width: 768px){.search-container{flex-direction:column;gap:.75rem}.search-input-wrapper{max-width:100%}.action-button{width:100%;justify-content:center}}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
3717
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DocumentSearchComponent, isStandalone: false, selector: "document-search", inputs: { contextId: "contextId" }, outputs: { onActionClick: "onActionClick" }, ngImport: i0, template: "<div class=\"search-container\">\r\n <div class=\"search-input-wrapper\">\r\n <i class=\"pi pi-search search-icon\"></i>\r\n <input \r\n type=\"text\" \r\n [(ngModel)]=\"searchTerm\"\r\n (ngModelChange)=\"onSearchInputChange($event)\"\r\n class=\"search-input\"\r\n placeholder=\"Search by document name, category, type, status or applicant name...\"\r\n [attr.aria-label]=\"'Search documents'\"\r\n />\r\n <button \r\n *ngIf=\"searchTerm\"\r\n type=\"button\"\r\n class=\"clear-button\"\r\n (click)=\"onClearSearch()\"\r\n [attr.aria-label]=\"'Clear search'\"\r\n >\r\n <i class=\"pi pi-times\"></i>\r\n </button>\r\n </div>\r\n \r\n <button \r\n type=\"button\"\r\n class=\"action-button\"\r\n (click)=\"onActionClick.emit()\"\r\n [attr.aria-label]=\"'Open actions menu'\"\r\n >\r\n Actions\r\n </button>\r\n</div> ", styles: [".search-container{display:flex;align-items:center;gap:1rem;width:100%;justify-content:space-between;padding:10px}.search-input-wrapper{position:relative;flex:1;display:flex;align-items:center;max-width:40%}.search-icon{position:absolute;left:12px;color:#6c757d;z-index:1}.search-input{width:100%;padding:12px 40px;border:1px solid #dee2e6;border-radius:8px;font-size:14px;outline:none;transition:border-color .2s ease,box-shadow .2s ease}.search-input:focus{border-color:#0f8bfd;box-shadow:0 0 0 3px #0f8bfd1a}.search-input::placeholder{color:#6c757d}.clear-button{position:absolute;right:12px;background:none;border:none;color:#6c757d;cursor:pointer;padding:4px;border-radius:4px;transition:background-color .2s ease,color .2s ease}.clear-button:hover{background-color:#f8f9fa;color:#495057}.action-button{background-color:#0f8bfd;color:#fff;border:none;padding:12px 24px;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color .2s ease,transform .1s ease;white-space:nowrap}.action-button:hover{background-color:#0d7ae6;transform:translateY(-1px)}.action-button:active{transform:translateY(0)}.action-button:focus{outline:none;box-shadow:0 0 0 3px #0f8bfd4d}@media (max-width: 768px){.search-container{flex-direction:column;gap:.75rem}.search-input-wrapper{max-width:100%}.action-button{width:100%;justify-content:center}}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
3321
3718
  }
3322
3719
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentSearchComponent, decorators: [{
3323
3720
  type: Component,
3324
- args: [{ selector: 'document-search', standalone: false, template: "<div class=\"search-container\">\r\n <div class=\"search-input-wrapper\">\r\n <i class=\"pi pi-search search-icon\"></i>\r\n <input \r\n type=\"text\" \r\n [(ngModel)]=\"searchTerm\"\r\n (ngModelChange)=\"onSearchInputChange($event)\"\r\n class=\"search-input\"\r\n placeholder=\"Search by document name, category, type, status or applicant name...\"\r\n [attr.aria-label]=\"'Search documents'\"\r\n />\r\n <button \r\n *ngIf=\"searchTerm\"\r\n type=\"button\"\r\n class=\"clear-button\"\r\n (click)=\"onClearSearch()\"\r\n [attr.aria-label]=\"'Clear search'\"\r\n >\r\n <i class=\"pi pi-times\"></i>\r\n </button>\r\n </div>\r\n \r\n <button \r\n type=\"button\"\r\n class=\"action-button\"\r\n (click)=\"onActionClick.emit()\"\r\n [attr.aria-label]=\"'Open actions menu'\"\r\n >\r\n Actions\r\n </button>\r\n</div> ", styles: [".search-container{display:flex;align-items:center;gap:1rem;width:100%;justify-content:space-between}.search-input-wrapper{position:relative;flex:1;display:flex;align-items:center;max-width:40%}.search-icon{position:absolute;left:12px;color:#6c757d;z-index:1}.search-input{width:100%;padding:12px 40px;border:1px solid #dee2e6;border-radius:8px;font-size:14px;outline:none;transition:border-color .2s ease,box-shadow .2s ease}.search-input:focus{border-color:#0f8bfd;box-shadow:0 0 0 3px #0f8bfd1a}.search-input::placeholder{color:#6c757d}.clear-button{position:absolute;right:12px;background:none;border:none;color:#6c757d;cursor:pointer;padding:4px;border-radius:4px;transition:background-color .2s ease,color .2s ease}.clear-button:hover{background-color:#f8f9fa;color:#495057}.action-button{background-color:#0f8bfd;color:#fff;border:none;padding:12px 24px;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color .2s ease,transform .1s ease;white-space:nowrap}.action-button:hover{background-color:#0d7ae6;transform:translateY(-1px)}.action-button:active{transform:translateY(0)}.action-button:focus{outline:none;box-shadow:0 0 0 3px #0f8bfd4d}@media (max-width: 768px){.search-container{flex-direction:column;gap:.75rem}.search-input-wrapper{max-width:100%}.action-button{width:100%;justify-content:center}}\n"] }]
3721
+ args: [{ selector: 'document-search', standalone: false, template: "<div class=\"search-container\">\r\n <div class=\"search-input-wrapper\">\r\n <i class=\"pi pi-search search-icon\"></i>\r\n <input \r\n type=\"text\" \r\n [(ngModel)]=\"searchTerm\"\r\n (ngModelChange)=\"onSearchInputChange($event)\"\r\n class=\"search-input\"\r\n placeholder=\"Search by document name, category, type, status or applicant name...\"\r\n [attr.aria-label]=\"'Search documents'\"\r\n />\r\n <button \r\n *ngIf=\"searchTerm\"\r\n type=\"button\"\r\n class=\"clear-button\"\r\n (click)=\"onClearSearch()\"\r\n [attr.aria-label]=\"'Clear search'\"\r\n >\r\n <i class=\"pi pi-times\"></i>\r\n </button>\r\n </div>\r\n \r\n <button \r\n type=\"button\"\r\n class=\"action-button\"\r\n (click)=\"onActionClick.emit()\"\r\n [attr.aria-label]=\"'Open actions menu'\"\r\n >\r\n Actions\r\n </button>\r\n</div> ", styles: [".search-container{display:flex;align-items:center;gap:1rem;width:100%;justify-content:space-between;padding:10px}.search-input-wrapper{position:relative;flex:1;display:flex;align-items:center;max-width:40%}.search-icon{position:absolute;left:12px;color:#6c757d;z-index:1}.search-input{width:100%;padding:12px 40px;border:1px solid #dee2e6;border-radius:8px;font-size:14px;outline:none;transition:border-color .2s ease,box-shadow .2s ease}.search-input:focus{border-color:#0f8bfd;box-shadow:0 0 0 3px #0f8bfd1a}.search-input::placeholder{color:#6c757d}.clear-button{position:absolute;right:12px;background:none;border:none;color:#6c757d;cursor:pointer;padding:4px;border-radius:4px;transition:background-color .2s ease,color .2s ease}.clear-button:hover{background-color:#f8f9fa;color:#495057}.action-button{background-color:#0f8bfd;color:#fff;border:none;padding:12px 24px;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color .2s ease,transform .1s ease;white-space:nowrap}.action-button:hover{background-color:#0d7ae6;transform:translateY(-1px)}.action-button:active{transform:translateY(0)}.action-button:focus{outline:none;box-shadow:0 0 0 3px #0f8bfd4d}@media (max-width: 768px){.search-container{flex-direction:column;gap:.75rem}.search-input-wrapper{max-width:100%}.action-button{width:100%;justify-content:center}}\n"] }]
3325
3722
  }], ctorParameters: () => [{ type: DocumentHelperService }], propDecorators: { contextId: [{
3326
3723
  type: Input
3327
3724
  }], onActionClick: [{
3328
3725
  type: Output
3329
3726
  }] } });
3330
3727
 
3331
- class CommonSidebarComponent {
3332
- visible = false;
3333
- position = 'right';
3334
- width = SHARED.WIDTH;
3335
- title = SHARED.EMPTY;
3336
- showCloseButton = true;
3337
- modal = true;
3338
- dismissible = true;
3339
- closeOnEscape = true;
3340
- baseZIndex = SHARED.BASEZINDEX;
3341
- autoZIndex = true;
3342
- styleClass = SHARED.EMPTY;
3343
- appendTo = 'body';
3344
- blockScroll = true;
3345
- closeIcon = SHARED.CLOSE_ICON;
3346
- showSaveButton = false;
3347
- saveButtonText = SHARED.SAVE;
3348
- saveButtonDisabled = false;
3349
- visibleChange = new EventEmitter();
3350
- onShow = new EventEmitter();
3351
- onHide = new EventEmitter();
3352
- onSave = new EventEmitter();
3353
- /**
3354
- * Opens the sidebar
3355
- */
3356
- open() {
3357
- this.visible = true;
3358
- this.visibleChange.emit(this.visible);
3359
- this.onShow.emit();
3360
- }
3361
- /**
3362
- * Closes the sidebar
3363
- */
3364
- close() {
3365
- this.visible = false;
3366
- this.visibleChange.emit(this.visible);
3367
- this.onHide.emit();
3368
- }
3369
- /**
3370
- * Toggles the sidebar visibility
3371
- */
3372
- toggle() {
3373
- this.visible = !this.visible;
3374
- this.visibleChange.emit(this.visible);
3375
- if (this.visible) {
3376
- this.onShow.emit();
3377
- }
3378
- else {
3379
- this.onHide.emit();
3380
- }
3381
- }
3382
- /**
3383
- * Handles the close button click
3384
- */
3385
- onCloseClick() {
3386
- this.close();
3387
- }
3388
- /**
3389
- * Handles the mask click (when dismissible is true)
3390
- */
3391
- onMaskClick() {
3392
- if (this.dismissible) {
3393
- this.close();
3394
- }
3395
- }
3396
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CommonSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3397
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: CommonSidebarComponent, isStandalone: false, selector: "lib-common-sidebar", inputs: { visible: "visible", position: "position", width: "width", title: "title", showCloseButton: "showCloseButton", modal: "modal", dismissible: "dismissible", closeOnEscape: "closeOnEscape", baseZIndex: "baseZIndex", autoZIndex: "autoZIndex", styleClass: "styleClass", appendTo: "appendTo", blockScroll: "blockScroll", closeIcon: "closeIcon", showSaveButton: "showSaveButton", saveButtonText: "saveButtonText", saveButtonDisabled: "saveButtonDisabled" }, outputs: { visibleChange: "visibleChange", onShow: "onShow", onHide: "onHide", onSave: "onSave" }, ngImport: i0, template: "<p-sidebar \r\n [(visible)]=\"visible\"\r\n [position]=\"position\"\r\n [style]=\"{width: width}\"\r\n [modal]=\"modal\"\r\n [dismissible]=\"dismissible\"\r\n [closeOnEscape]=\"closeOnEscape\"\r\n [baseZIndex]=\"baseZIndex\"\r\n [autoZIndex]=\"autoZIndex\"\r\n [styleClass]=\"styleClass\"\r\n [appendTo]=\"appendTo\"\r\n [blockScroll]=\"blockScroll\"\r\n (visibleChange)=\"visibleChange.emit($event)\"\r\n (onShow)=\"onShow.emit()\"\r\n (onHide)=\"onHide.emit()\"\r\n \r\n>\r\n <ng-template pTemplate=\"header\" *ngIf=\"title || showCloseButton || showSaveButton\">\r\n <div class=\"sidebar-header\">\r\n <h3 *ngIf=\"title\" class=\"sidebar-title\">{{ title }}</h3>\r\n <div class=\"header-content\">\r\n <ng-content select=\"[header]\"></ng-content>\r\n <div class=\"header-actions\">\r\n <button \r\n *ngIf=\"showSaveButton\"\r\n pButton \r\n type=\"button\" \r\n [label]=\"saveButtonText\"\r\n [disabled]=\"saveButtonDisabled\"\r\n class=\"p-button-primary\"\r\n (click)=\"onSave.emit()\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"content\">\r\n <div class=\"sidebar-content\">\r\n <!-- Content projection slot -->\r\n <ng-content></ng-content>\r\n </div>\r\n </ng-template>\r\n</p-sidebar>\r\n", styles: [":host{display:block}.sidebar-header{display:flex;justify-content:space-between;align-items:center;padding:0;width:100%}.sidebar-title{margin:0;font-size:1.25rem;font-weight:600;color:#212529;flex:1}.header-content{display:flex;align-items:center;gap:.5rem;justify-content:space-between;width:100%}.header-actions{display:flex;align-items:center;gap:.5rem;margin-left:auto;margin-right:1rem}.close-button{background:none;border:none;color:#6c757d;cursor:pointer;padding:.5rem;border-radius:.375rem;transition:all .2s ease;display:flex;align-items:center;justify-content:center;min-width:2rem;min-height:2rem}.close-button:hover{background-color:#e9ecef;color:#495057}.close-button:focus{outline:none;box-shadow:0 0 0 3px #0f8bfd4d}.close-button i{font-size:1rem}.sidebar-content{height:100%;overflow-y:auto;padding:0}::ng-deep .p-sidebar .p-sidebar-header{border-bottom:1px solid #e9ecef;margin-bottom:1rem;background-color:#f8f9fa}::ng-deep .p-sidebar .p-sidebar-content{padding:0 1.5rem 1.5rem;height:calc(100% - 80px);overflow-y:auto}::ng-deep .p-sidebar.p-sidebar-right .p-sidebar-content{padding-left:1.5rem;padding-right:1.5rem}::ng-deep .p-sidebar.p-sidebar-left .p-sidebar-content{padding-left:1.5rem;padding-right:1.5rem}@media (max-width: 768px){::ng-deep .p-sidebar{width:100%!important;max-width:100%!important}::ng-deep .p-sidebar .p-sidebar-header{padding:1rem 1rem 0}::ng-deep .p-sidebar .p-sidebar-content{padding:0 1rem 1rem}}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i4$1.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }] });
3398
- }
3399
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CommonSidebarComponent, decorators: [{
3400
- type: Component,
3401
- args: [{ selector: 'lib-common-sidebar', standalone: false, template: "<p-sidebar \r\n [(visible)]=\"visible\"\r\n [position]=\"position\"\r\n [style]=\"{width: width}\"\r\n [modal]=\"modal\"\r\n [dismissible]=\"dismissible\"\r\n [closeOnEscape]=\"closeOnEscape\"\r\n [baseZIndex]=\"baseZIndex\"\r\n [autoZIndex]=\"autoZIndex\"\r\n [styleClass]=\"styleClass\"\r\n [appendTo]=\"appendTo\"\r\n [blockScroll]=\"blockScroll\"\r\n (visibleChange)=\"visibleChange.emit($event)\"\r\n (onShow)=\"onShow.emit()\"\r\n (onHide)=\"onHide.emit()\"\r\n \r\n>\r\n <ng-template pTemplate=\"header\" *ngIf=\"title || showCloseButton || showSaveButton\">\r\n <div class=\"sidebar-header\">\r\n <h3 *ngIf=\"title\" class=\"sidebar-title\">{{ title }}</h3>\r\n <div class=\"header-content\">\r\n <ng-content select=\"[header]\"></ng-content>\r\n <div class=\"header-actions\">\r\n <button \r\n *ngIf=\"showSaveButton\"\r\n pButton \r\n type=\"button\" \r\n [label]=\"saveButtonText\"\r\n [disabled]=\"saveButtonDisabled\"\r\n class=\"p-button-primary\"\r\n (click)=\"onSave.emit()\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"content\">\r\n <div class=\"sidebar-content\">\r\n <!-- Content projection slot -->\r\n <ng-content></ng-content>\r\n </div>\r\n </ng-template>\r\n</p-sidebar>\r\n", styles: [":host{display:block}.sidebar-header{display:flex;justify-content:space-between;align-items:center;padding:0;width:100%}.sidebar-title{margin:0;font-size:1.25rem;font-weight:600;color:#212529;flex:1}.header-content{display:flex;align-items:center;gap:.5rem;justify-content:space-between;width:100%}.header-actions{display:flex;align-items:center;gap:.5rem;margin-left:auto;margin-right:1rem}.close-button{background:none;border:none;color:#6c757d;cursor:pointer;padding:.5rem;border-radius:.375rem;transition:all .2s ease;display:flex;align-items:center;justify-content:center;min-width:2rem;min-height:2rem}.close-button:hover{background-color:#e9ecef;color:#495057}.close-button:focus{outline:none;box-shadow:0 0 0 3px #0f8bfd4d}.close-button i{font-size:1rem}.sidebar-content{height:100%;overflow-y:auto;padding:0}::ng-deep .p-sidebar .p-sidebar-header{border-bottom:1px solid #e9ecef;margin-bottom:1rem;background-color:#f8f9fa}::ng-deep .p-sidebar .p-sidebar-content{padding:0 1.5rem 1.5rem;height:calc(100% - 80px);overflow-y:auto}::ng-deep .p-sidebar.p-sidebar-right .p-sidebar-content{padding-left:1.5rem;padding-right:1.5rem}::ng-deep .p-sidebar.p-sidebar-left .p-sidebar-content{padding-left:1.5rem;padding-right:1.5rem}@media (max-width: 768px){::ng-deep .p-sidebar{width:100%!important;max-width:100%!important}::ng-deep .p-sidebar .p-sidebar-header{padding:1rem 1rem 0}::ng-deep .p-sidebar .p-sidebar-content{padding:0 1rem 1rem}}\n"] }]
3402
- }], propDecorators: { visible: [{
3403
- type: Input
3404
- }], position: [{
3405
- type: Input
3406
- }], width: [{
3407
- type: Input
3408
- }], title: [{
3409
- type: Input
3410
- }], showCloseButton: [{
3411
- type: Input
3412
- }], modal: [{
3413
- type: Input
3414
- }], dismissible: [{
3415
- type: Input
3416
- }], closeOnEscape: [{
3417
- type: Input
3418
- }], baseZIndex: [{
3419
- type: Input
3420
- }], autoZIndex: [{
3421
- type: Input
3422
- }], styleClass: [{
3423
- type: Input
3424
- }], appendTo: [{
3425
- type: Input
3426
- }], blockScroll: [{
3427
- type: Input
3428
- }], closeIcon: [{
3429
- type: Input
3430
- }], showSaveButton: [{
3431
- type: Input
3432
- }], saveButtonText: [{
3433
- type: Input
3434
- }], saveButtonDisabled: [{
3435
- type: Input
3436
- }], visibleChange: [{
3437
- type: Output
3438
- }], onShow: [{
3439
- type: Output
3440
- }], onHide: [{
3441
- type: Output
3442
- }], onSave: [{
3443
- type: Output
3444
- }] } });
3445
-
3446
3728
  /**
3447
3729
  * The `FolderContainerComponent` is responsible for rendering a container
3448
3730
  * that displays a list of documents and associated folder panel data.
@@ -3451,6 +3733,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
3451
3733
  */
3452
3734
  class FolderContainerComponent {
3453
3735
  documentQuery;
3736
+ documentHelperService;
3454
3737
  /**
3455
3738
  * A list of documents passed as input to the component.
3456
3739
  * Represents the document data to be displayed in the folder container.
@@ -3497,12 +3780,17 @@ class FolderContainerComponent {
3497
3780
  * Reference to the document upload component
3498
3781
  */
3499
3782
  documentUploadComponent;
3783
+ /**
3784
+ * Reference to the sidebar component
3785
+ */
3786
+ sidebarComponent;
3500
3787
  /**
3501
3788
  * Tracks whether the save button should be disabled
3502
3789
  */
3503
3790
  isSaveButtonDisabled = false;
3504
- constructor(documentQuery) {
3791
+ constructor(documentQuery, documentHelperService) {
3505
3792
  this.documentQuery = documentQuery;
3793
+ this.documentHelperService = documentHelperService;
3506
3794
  }
3507
3795
  ngOnInit() {
3508
3796
  this.documentQuery.selectShowUserList().subscribe(show => {
@@ -3524,6 +3812,12 @@ class FolderContainerComponent {
3524
3812
  this.isSaveButtonDisabled = this.documentUploadComponent.getSaveButtonDisabled();
3525
3813
  }
3526
3814
  }
3815
+ /**
3816
+ * Handles form validation changes from the document upload component
3817
+ */
3818
+ onFormValidationChange() {
3819
+ this.updateSaveButtonState();
3820
+ }
3527
3821
  /**
3528
3822
  * Opens the document upload sidebar
3529
3823
  */
@@ -3535,6 +3829,18 @@ class FolderContainerComponent {
3535
3829
  */
3536
3830
  onDocumentUploadSidebarHide() {
3537
3831
  this.isDocumentUploadSidebarOpen = false;
3832
+ if (this.documentUploadComponent) {
3833
+ this.documentUploadComponent.resetForm();
3834
+ }
3835
+ }
3836
+ /**
3837
+ * Handles the document upload sidebar close event (when close button is clicked or sidebar is dismissed)
3838
+ */
3839
+ onDocumentUploadSidebarClose() {
3840
+ this.isDocumentUploadSidebarOpen = false;
3841
+ if (this.documentUploadComponent) {
3842
+ this.documentUploadComponent.resetForm();
3843
+ }
3538
3844
  }
3539
3845
  /**
3540
3846
  * Handles the document upload save event
@@ -3545,8 +3851,26 @@ class FolderContainerComponent {
3545
3851
  this.updateSaveButtonState();
3546
3852
  }
3547
3853
  }
3548
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FolderContainerComponent, deps: [{ token: DocumentQuery }], target: i0.ɵɵFactoryTarget.Component });
3549
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FolderContainerComponent, isStandalone: false, selector: "lib-folder-container", inputs: { documentList: "documentList", folderList: "folderList", contextId: "contextId", userList: "userList", statusData: "statusData", categories: "categories" }, viewQueries: [{ propertyName: "documentUploadComponent", first: true, predicate: DocumentUploadComponent, descendants: true }], ngImport: i0, template: "\r\n<document-search [contextId]=\"contextId\" (onActionClick)=\"openDocumentUploadSidebar()\"></document-search>\r\n<div class=\"user-list-wrapper\" [@slideInOut]=\"userListAnimationState\">\r\n <lib-user-list [userList]=\"userList\" [categories]=\"categories\"></lib-user-list>\r\n</div>\r\n<lib-document-status [contextId]=\"contextId\" [statusData]=\"statusData\"></lib-document-status>\r\n\r\n<!-- Document Upload Sidebar -->\r\n<lib-common-sidebar\r\n [(visible)]=\"isDocumentUploadSidebarOpen\"\r\n position=\"right\"\r\n width=\"600px\"\r\n title=\"Upload Documents\"\r\n [showCloseButton]=\"true\"\r\n [showSaveButton]=\"true\"\r\n [saveButtonText]=\"'Save'\"\r\n [saveButtonDisabled]=\"isSaveButtonDisabled\"\r\n [modal]=\"true\"\r\n [dismissible]=\"true\"\r\n [closeOnEscape]=\"true\"\r\n [blockScroll]=\"true\"\r\n (onHide)=\"onDocumentUploadSidebarHide()\"\r\n (onSave)=\"onDocumentUploadSave()\"\r\n>\r\n <lib-document-upload [contextId]=\"contextId\"></lib-document-upload>\r\n</lib-common-sidebar>", styles: [".user-list-wrapper{overflow:hidden;margin-bottom:1rem}.user-list-wrapper ::ng-deep *{transition:opacity .2s ease-in-out}.user-list-wrapper.ng-animating{pointer-events:none}::ng-deep lib-user-list{display:block;width:100%}\n"], dependencies: [{ kind: "component", type: DocumentUploadComponent, selector: "lib-document-upload", inputs: ["contextId"] }, { kind: "component", type: UserListComponent, selector: "lib-user-list", inputs: ["userList", "categories"], outputs: ["userSelected"] }, { kind: "component", type: DocumentStatusComponent, selector: "lib-document-status", inputs: ["contextId", "statusData"] }, { kind: "component", type: DocumentSearchComponent, selector: "document-search", inputs: ["contextId"], outputs: ["onActionClick"] }, { kind: "component", type: CommonSidebarComponent, selector: "lib-common-sidebar", inputs: ["visible", "position", "width", "title", "showCloseButton", "modal", "dismissible", "closeOnEscape", "baseZIndex", "autoZIndex", "styleClass", "appendTo", "blockScroll", "closeIcon", "showSaveButton", "saveButtonText", "saveButtonDisabled"], outputs: ["visibleChange", "onShow", "onHide", "onSave"] }], animations: [
3854
+ /**
3855
+ * Handles successful document upload and refreshes data
3856
+ */
3857
+ onDocumentUploadSuccess() {
3858
+ this.documentHelperService.refreshAllDataWithCurrentFilters(this.contextId);
3859
+ if (this.sidebarComponent) {
3860
+ this.sidebarComponent.showSuccess();
3861
+ }
3862
+ }
3863
+ /**
3864
+ * Handles document upload error
3865
+ */
3866
+ onDocumentUploadError(error) {
3867
+ if (this.sidebarComponent) {
3868
+ const errorMessage = error?.message || SHARED.UPLOAD_FAILED;
3869
+ this.sidebarComponent.showError(errorMessage);
3870
+ }
3871
+ }
3872
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FolderContainerComponent, deps: [{ token: DocumentQuery }, { token: DocumentHelperService }], target: i0.ɵɵFactoryTarget.Component });
3873
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FolderContainerComponent, isStandalone: false, selector: "lib-folder-container", inputs: { documentList: "documentList", folderList: "folderList", contextId: "contextId", userList: "userList", statusData: "statusData", categories: "categories" }, viewQueries: [{ propertyName: "documentUploadComponent", first: true, predicate: DocumentUploadComponent, descendants: true }, { propertyName: "sidebarComponent", first: true, predicate: SidebarComponent, descendants: true }], ngImport: i0, template: "\r\n<document-search [contextId]=\"contextId\" (onActionClick)=\"openDocumentUploadSidebar()\"></document-search>\r\n<div class=\"user-list-wrapper\" [@slideInOut]=\"userListAnimationState\">\r\n <lib-user-list [userList]=\"userList\" [categories]=\"categories\"></lib-user-list>\r\n</div>\r\n<lib-document-status [contextId]=\"contextId\" [statusData]=\"statusData\"></lib-document-status>\r\n\r\n<!-- Document Upload Sidebar -->\r\n<lib-sidebar\r\n [(visible)]=\"isDocumentUploadSidebarOpen\"\r\n position=\"right\"\r\n width=\"600px\"\r\n title=\"Upload Documents\"\r\n [showCloseButton]=\"true\"\r\n [showSaveButton]=\"true\"\r\n [saveButtonText]=\"'Save'\"\r\n [saveButtonDisabled]=\"isSaveButtonDisabled\"\r\n [successMessage]=\"'Document Saved Successfully'\"\r\n [modal]=\"true\"\r\n [dismissible]=\"true\"\r\n [closeOnEscape]=\"true\"\r\n [blockScroll]=\"true\"\r\n (onHide)=\"onDocumentUploadSidebarHide()\"\r\n (onSave)=\"onDocumentUploadSave()\"\r\n (onClose)=\"onDocumentUploadSidebarClose()\"\r\n>\r\n <lib-document-upload \r\n [contextId]=\"contextId\" \r\n (onFormValidationChange)=\"onFormValidationChange()\" \r\n (onUploadSuccess)=\"onDocumentUploadSuccess()\"\r\n (onUploadError)=\"onDocumentUploadError($event)\"\r\n ></lib-document-upload>\r\n</lib-sidebar>", styles: [".user-list-wrapper{overflow:hidden;margin-bottom:1rem}.user-list-wrapper ::ng-deep *{transition:opacity .2s ease-in-out}.user-list-wrapper.ng-animating{pointer-events:none}::ng-deep lib-user-list{display:block;width:100%}\n"], dependencies: [{ kind: "component", type: DocumentUploadComponent, selector: "lib-document-upload", inputs: ["contextId"], outputs: ["onFormValidationChange", "onUploadSuccess"] }, { kind: "component", type: UserListComponent, selector: "lib-user-list", inputs: ["userList", "categories"], outputs: ["userSelected"] }, { kind: "component", type: DocumentStatusComponent, selector: "lib-document-status", inputs: ["contextId", "statusData"] }, { kind: "component", type: DocumentSearchComponent, selector: "document-search", inputs: ["contextId"], outputs: ["onActionClick"] }, { kind: "component", type: SidebarComponent, selector: "lib-sidebar", inputs: ["visible", "position", "width", "title", "showCloseButton", "modal", "dismissible", "closeOnEscape", "baseZIndex", "autoZIndex", "styleClass", "appendTo", "blockScroll", "closeIcon", "showSaveButton", "saveButtonText", "saveButtonDisabled", "successMessage", "errorMessage"], outputs: ["visibleChange", "onShow", "onHide", "onSave"] }], animations: [
3550
3874
  trigger('slideInOut', [
3551
3875
  state('visible', style({
3552
3876
  height: '*',
@@ -3600,8 +3924,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
3600
3924
  animate('300ms cubic-bezier(0.0, 0.0, 0.2, 1)')
3601
3925
  ])
3602
3926
  ])
3603
- ], template: "\r\n<document-search [contextId]=\"contextId\" (onActionClick)=\"openDocumentUploadSidebar()\"></document-search>\r\n<div class=\"user-list-wrapper\" [@slideInOut]=\"userListAnimationState\">\r\n <lib-user-list [userList]=\"userList\" [categories]=\"categories\"></lib-user-list>\r\n</div>\r\n<lib-document-status [contextId]=\"contextId\" [statusData]=\"statusData\"></lib-document-status>\r\n\r\n<!-- Document Upload Sidebar -->\r\n<lib-common-sidebar\r\n [(visible)]=\"isDocumentUploadSidebarOpen\"\r\n position=\"right\"\r\n width=\"600px\"\r\n title=\"Upload Documents\"\r\n [showCloseButton]=\"true\"\r\n [showSaveButton]=\"true\"\r\n [saveButtonText]=\"'Save'\"\r\n [saveButtonDisabled]=\"isSaveButtonDisabled\"\r\n [modal]=\"true\"\r\n [dismissible]=\"true\"\r\n [closeOnEscape]=\"true\"\r\n [blockScroll]=\"true\"\r\n (onHide)=\"onDocumentUploadSidebarHide()\"\r\n (onSave)=\"onDocumentUploadSave()\"\r\n>\r\n <lib-document-upload [contextId]=\"contextId\"></lib-document-upload>\r\n</lib-common-sidebar>", styles: [".user-list-wrapper{overflow:hidden;margin-bottom:1rem}.user-list-wrapper ::ng-deep *{transition:opacity .2s ease-in-out}.user-list-wrapper.ng-animating{pointer-events:none}::ng-deep lib-user-list{display:block;width:100%}\n"] }]
3604
- }], ctorParameters: () => [{ type: DocumentQuery }], propDecorators: { documentList: [{
3927
+ ], template: "\r\n<document-search [contextId]=\"contextId\" (onActionClick)=\"openDocumentUploadSidebar()\"></document-search>\r\n<div class=\"user-list-wrapper\" [@slideInOut]=\"userListAnimationState\">\r\n <lib-user-list [userList]=\"userList\" [categories]=\"categories\"></lib-user-list>\r\n</div>\r\n<lib-document-status [contextId]=\"contextId\" [statusData]=\"statusData\"></lib-document-status>\r\n\r\n<!-- Document Upload Sidebar -->\r\n<lib-sidebar\r\n [(visible)]=\"isDocumentUploadSidebarOpen\"\r\n position=\"right\"\r\n width=\"600px\"\r\n title=\"Upload Documents\"\r\n [showCloseButton]=\"true\"\r\n [showSaveButton]=\"true\"\r\n [saveButtonText]=\"'Save'\"\r\n [saveButtonDisabled]=\"isSaveButtonDisabled\"\r\n [successMessage]=\"'Document Saved Successfully'\"\r\n [modal]=\"true\"\r\n [dismissible]=\"true\"\r\n [closeOnEscape]=\"true\"\r\n [blockScroll]=\"true\"\r\n (onHide)=\"onDocumentUploadSidebarHide()\"\r\n (onSave)=\"onDocumentUploadSave()\"\r\n (onClose)=\"onDocumentUploadSidebarClose()\"\r\n>\r\n <lib-document-upload \r\n [contextId]=\"contextId\" \r\n (onFormValidationChange)=\"onFormValidationChange()\" \r\n (onUploadSuccess)=\"onDocumentUploadSuccess()\"\r\n (onUploadError)=\"onDocumentUploadError($event)\"\r\n ></lib-document-upload>\r\n</lib-sidebar>", 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"] }]
3928
+ }], ctorParameters: () => [{ type: DocumentQuery }, { type: DocumentHelperService }], propDecorators: { documentList: [{
3605
3929
  type: Input
3606
3930
  }], folderList: [{
3607
3931
  type: Input
@@ -3616,6 +3940,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
3616
3940
  }], documentUploadComponent: [{
3617
3941
  type: ViewChild,
3618
3942
  args: [DocumentUploadComponent]
3943
+ }], sidebarComponent: [{
3944
+ type: ViewChild,
3945
+ args: [SidebarComponent]
3619
3946
  }] } });
3620
3947
 
3621
3948
  /**
@@ -4081,7 +4408,7 @@ class TablePrimaryComponent {
4081
4408
  this.rowClick.emit(rowData);
4082
4409
  }
4083
4410
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TablePrimaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4084
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: TablePrimaryComponent, isStandalone: false, selector: "lib-table-primary", inputs: { tableData: "tableData", showHeader: "showHeader", tableStyle: "tableStyle" }, outputs: { rowClick: "rowClick", deleteAction: "deleteAction" }, 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 @if(rowData.isUploaded){\r\n <button pButton pRipple type=\"button\" [icon]=\"SHARED.ICON_DELETE\" \r\n class=\"p-button-text p-button-rounded\" \r\n [permission]=\"'documents-deleteDocumentByDocumentId'\"\r\n (click)=\"onActionClick($event, rowData)\">\r\n </button>\r\n } \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 \r\n <!-- No Records Template -->\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td [attr.colspan]=\"tableData.columns.length\" class=\"no-records-cell\">\r\n <div class=\"no-records-content\">\r\n <i class=\"pi pi-inbox\" style=\"font-size: 2rem; color: #6c757d;\"></i>\r\n <p class=\"no-records-text\">No records found</p>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>", styles: [".document-cell .document-info{display:flex;align-items:center;gap:.75rem;text-align:left}.document-cell .document-info .document-icon{width:40px;height:40px;background-color:#e3f2fd;border-radius:6px;display:flex;align-items:center;justify-content:center;color:#1976d2;font-size:1.25rem;flex-shrink:0}.document-cell .document-info .document-details{flex:1;min-width:0}.document-cell .document-info .document-details .document-name{font-weight:400;color:#334155;line-height:20px;font-size:14px;margin-bottom:.25rem;text-align:left;word-break:break-word}.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}.no-records-cell{text-align:center;padding:3rem 1.5rem!important;border:none}.no-records-cell .no-records-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem}.no-records-cell .no-records-content .no-records-text{margin:0;color:#6c757d;font-size:1rem;font-weight:500}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i5.Ripple, selector: "[pRipple]" }, { kind: "directive", type: HasPermissionDirective, selector: "[permission]", inputs: ["permission"] }] });
4411
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: TablePrimaryComponent, isStandalone: false, selector: "lib-table-primary", inputs: { tableData: "tableData", showHeader: "showHeader", tableStyle: "tableStyle" }, outputs: { rowClick: "rowClick", deleteAction: "deleteAction" }, 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 @if(rowData.isUploaded){\r\n <button pButton pRipple type=\"button\" [icon]=\"SHARED.ICON_DELETE\" \r\n class=\"p-button-text p-button-rounded\" \r\n [permission]=\"'documents-deleteDocumentByDocumentId'\"\r\n (click)=\"onActionClick($event, rowData)\">\r\n </button>\r\n } \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 \r\n <!-- No Records Template -->\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td [attr.colspan]=\"tableData.columns.length\" class=\"no-records-cell\">\r\n <div class=\"no-records-content\">\r\n <i class=\"pi pi-inbox\" style=\"font-size: 2rem; color: #6c757d;\"></i>\r\n <p class=\"no-records-text\">No records found</p>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n</div>", styles: [".document-cell .document-info{display:flex;align-items:center;gap:.75rem;text-align:left}.document-cell .document-info .document-icon{width:40px;height:40px;background-color:#e3f2fd;border-radius:6px;display:flex;align-items:center;justify-content:center;color:#1976d2;font-size:1.25rem;flex-shrink:0}.document-cell .document-info .document-details{flex:1;min-width:0}.document-cell .document-info .document-details .document-name{font-weight:400;color:#334155;line-height:20px;font-size:14px;margin-bottom:.25rem;text-align:left;word-break:break-word}.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}.no-records-cell{text-align:center;padding:3rem 1.5rem!important;border:none}.no-records-cell .no-records-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem}.no-records-cell .no-records-content .no-records-text{margin:0;color:#6c757d;font-size:1rem;font-weight:500}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i5$1.Ripple, selector: "[pRipple]" }, { kind: "directive", type: HasPermissionDirective, selector: "[permission]", inputs: ["permission"] }] });
4085
4412
  }
4086
4413
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TablePrimaryComponent, decorators: [{
4087
4414
  type: Component,
@@ -4132,10 +4459,7 @@ class DocumentViewerService {
4132
4459
  const alertData = this.getAlertData(document);
4133
4460
  const documentStatus = this.calculateDocumentStatus(document);
4134
4461
  const documentIsUploaded = this.calculateIsDocumentUploaded(document);
4135
- this.documentStore.updateDocumentViewerState(document, undefined, // Keep existing history
4136
- undefined, // Keep existing showHistory
4137
- undefined, // Keep existing loading
4138
- documentStatus, documentIsUploaded, alertData);
4462
+ this.documentStore.updateDocumentViewerState(document, undefined, undefined, undefined, documentStatus, documentIsUploaded, alertData);
4139
4463
  this.loadDocumentHistory(document._id);
4140
4464
  }
4141
4465
  /**
@@ -4147,15 +4471,10 @@ class DocumentViewerService {
4147
4471
  this.documentHttpService.getDocumentHistory(documentId)
4148
4472
  .subscribe({
4149
4473
  next: (history) => {
4150
- this.documentStore.updateDocumentViewerState(undefined, // Keep existing document
4151
- history, true // Show history
4152
- );
4474
+ this.documentStore.updateDocumentViewerState(undefined, history, true);
4153
4475
  },
4154
4476
  error: (error) => {
4155
- this.documentStore.updateDocumentViewerState(undefined, // Keep existing document
4156
- undefined, // Keep existing history
4157
- false // Hide history
4158
- );
4477
+ this.documentStore.updateDocumentViewerState(undefined, undefined, false);
4159
4478
  }
4160
4479
  });
4161
4480
  }
@@ -4505,13 +4824,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
4505
4824
  class DocumentHistoryService {
4506
4825
  documentHistoryStyleService;
4507
4826
  http;
4508
- sessionService;
4509
- appConfigService;
4510
- constructor(documentHistoryStyleService, http, sessionService, appConfigService) {
4827
+ constructor(documentHistoryStyleService, http) {
4511
4828
  this.documentHistoryStyleService = documentHistoryStyleService;
4512
4829
  this.http = http;
4513
- this.sessionService = sessionService;
4514
- this.appConfigService = appConfigService;
4515
4830
  }
4516
4831
  /**
4517
4832
  * Get the CSS class for accordion styling based on the section's label
@@ -4580,17 +4895,8 @@ class DocumentHistoryService {
4580
4895
  console.warn(ERRORS.NO_DOCUMENT_URL);
4581
4896
  return;
4582
4897
  }
4583
- // Ensure the URL is properly formatted
4584
- const fullUrl = this.getFullUrl(documentUrl);
4585
- console.log('Downloading document:', { originalUrl: documentUrl, fullUrl, docName });
4586
- // Let the HTTP interceptor handle authentication - no need to add headers manually
4587
- const httpOptions = {
4588
- responseType: 'blob'
4589
- };
4590
- console.log('HTTP options being sent (interceptor will add auth):', httpOptions);
4591
- this.http.get(fullUrl, httpOptions).subscribe({
4898
+ this.http.get(documentUrl, { responseType: 'blob' }).subscribe({
4592
4899
  next: (blob) => {
4593
- console.log('Download successful, blob size:', blob.size);
4594
4900
  const blobUrl = window.URL.createObjectURL(blob);
4595
4901
  const a = document.createElement('a');
4596
4902
  a.href = blobUrl;
@@ -4602,75 +4908,11 @@ class DocumentHistoryService {
4602
4908
  window.URL.revokeObjectURL(blobUrl);
4603
4909
  },
4604
4910
  error: (err) => {
4605
- console.error('Download failed:', err);
4606
4911
  console.error(ERRORS.DOWNLOAD_FAIL, err);
4607
4912
  }
4608
4913
  });
4609
4914
  }
4610
- /**
4611
- * Get the full URL for the document, handling relative URLs
4612
- * @private
4613
- * @param documentUrl - The document URL (can be relative or absolute)
4614
- * @returns {string} The full URL
4615
- */
4616
- getFullUrl(documentUrl) {
4617
- // If it's already an absolute URL, return as is
4618
- if (documentUrl.startsWith('http://') || documentUrl.startsWith('https://')) {
4619
- return documentUrl;
4620
- }
4621
- // If it's a relative URL, try to get the API base URL
4622
- try {
4623
- const apiBaseUrl = this.appConfigService.apiBaseUrl;
4624
- if (apiBaseUrl) {
4625
- // Remove leading slash from documentUrl if present
4626
- const cleanUrl = documentUrl.startsWith('/') ? documentUrl.substring(1) : documentUrl;
4627
- return `${apiBaseUrl}/${cleanUrl}`;
4628
- }
4629
- }
4630
- catch (error) {
4631
- console.warn('Could not get API base URL, using original URL:', error);
4632
- }
4633
- // Fallback to original URL
4634
- return documentUrl;
4635
- }
4636
- /**
4637
- * Debug method to help identify issues when the library is used in the main project
4638
- * @public
4639
- */
4640
- debugEnvironment() {
4641
- console.log('=== Document History Service Environment Debug ===');
4642
- // Check session data
4643
- const sessionData = this.sessionService.getUserSession();
4644
- console.log('Session data:', sessionData);
4645
- // Check localStorage for common token patterns
4646
- const localStorageKeys = ['token', 'accessToken', 'authToken', 'jwt', 'userData'];
4647
- const localStorageData = {};
4648
- localStorageKeys.forEach(key => {
4649
- const value = localStorage.getItem(key);
4650
- if (value) {
4651
- try {
4652
- localStorageData[key] = JSON.parse(value);
4653
- }
4654
- catch {
4655
- localStorageData[key] = value;
4656
- }
4657
- }
4658
- });
4659
- console.log('LocalStorage data:', localStorageData);
4660
- // Check API configuration
4661
- try {
4662
- const apiBaseUrl = this.appConfigService.apiBaseUrl;
4663
- console.log('API Base URL:', apiBaseUrl);
4664
- }
4665
- catch (error) {
4666
- console.log('API Base URL error:', error);
4667
- }
4668
- // Check if we're in a browser environment
4669
- console.log('User Agent:', navigator.userAgent);
4670
- console.log('Window location:', window.location.href);
4671
- console.log('=== End Debug ===');
4672
- }
4673
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryService, deps: [{ token: DocumentHistoryStyleService }, { token: i2.HttpClient }, { token: SessionService }, { token: AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
4915
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryService, deps: [{ token: DocumentHistoryStyleService }, { token: i2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
4674
4916
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryService, providedIn: 'root' });
4675
4917
  }
4676
4918
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentHistoryService, decorators: [{
@@ -4678,7 +4920,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
4678
4920
  args: [{
4679
4921
  providedIn: 'root'
4680
4922
  }]
4681
- }], ctorParameters: () => [{ type: DocumentHistoryStyleService }, { type: i2.HttpClient }, { type: SessionService }, { type: AppConfigService }] });
4923
+ }], ctorParameters: () => [{ type: DocumentHistoryStyleService }, { type: i2.HttpClient }] });
4682
4924
 
4683
4925
  /**
4684
4926
  * Component for displaying document history in a timeline format.
@@ -4946,7 +5188,7 @@ class DocumentActionsComponent {
4946
5188
  this.rejectNote = SHARED.EMPTY;
4947
5189
  }
4948
5190
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentActionsComponent, deps: [{ token: DocumentActionsService }], target: i0.ɵɵFactoryTarget.Component });
4949
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentActionsComponent, isStandalone: false, selector: "document-actions", inputs: { document: "document", documentId: "documentId", currentStatus: "currentStatus", isLoading: "isLoading", isUploaded: "isUploaded", statusId: "statusId" }, outputs: { actionPerformed: "actionPerformed" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-actions-container\" >\r\n <div class=\"actions-card\" [ngClass]=\"cardClass\">\r\n <div class=\"actions-buttons\">\r\n <!-- Reject Button -->\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn reject-btn\" [ngClass]=\"rejectButtonClass\" (click)=\"onRejectClick()\"\r\n [disabled]=\"currentStatus === SHARED.STATUS_REJECTED_LOWERCASE || isRejecting\">\r\n <i class=\"pi pi-times\" *ngIf=\"currentStatus === SHARED.STATUS_REJECTED_LOWERCASE\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isRejecting\"></i>\r\n <span>{{ currentStatus === SHARED.STATUS_REJECTED_LOWERCASE ? SHARED.BUTTON_LABEL_REJECTED :\r\n SHARED.BUTTON_LABEL_REJECT }}</span>\r\n </button>\r\n\r\n <!-- Accept Button -->\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn accept-btn\" [ngClass]=\"acceptButtonClass\" (click)=\"onAcceptClick()\"\r\n [disabled]=\"currentStatus === SHARED.STATUS_ACCEPTED || isAccepting\">\r\n <i class=\"pi pi-check\" *ngIf=\"currentStatus === SHARED.STATUS_ACCEPTED\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isAccepting\"></i>\r\n <span>{{ currentStatus === SHARED.STATUS_ACCEPTED ? SHARED.BUTTON_LABEL_ACCEPTED : SHARED.BUTTON_LABEL_ACCEPT\r\n }}</span>\r\n </button>\r\n\r\n <!-- Delete Button -->\r\n @if(document?.isUploaded){\r\n <button class=\"action-btn delete-btn\" (click)=\"onDeleteClick()\" [disabled]=\"isLoading\"\r\n [permission]=\"'documents-deleteDocumentByDocumentId'\" pTooltip=\"Delete Document\" tooltipPosition=\"top\">\r\n <i class=\"pi pi-trash\"></i>\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- Accept Confirmation Dialog -->\r\n<p-dialog [(visible)]=\"showAcceptDialog\" [header]=\"SHARED.ACCEPT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"acceptNote\" class=\"note-label\">{{ SHARED.ACCEPT_NOTE_LABEL }}</label>\r\n <textarea id=\"acceptNote\" pInputTextarea [(ngModel)]=\"acceptNote\" [placeholder]=\"SHARED.ACCEPT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.ACCEPT_BUTTON_LABEL\" class=\"p-button-success\" (click)=\"onAcceptConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n\r\n<!-- Reject Confirmation Dialog -->\r\n<p-dialog [(visible)]=\"showRejectDialog\" [header]=\"SHARED.REJECT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"rejectNote\" class=\"note-label\">{{ SHARED.REJECT_NOTE_LABEL }}</label>\r\n <textarea id=\"rejectNote\" pInputTextarea [(ngModel)]=\"rejectNote\" [placeholder]=\"SHARED.REJECT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.REJECT_BUTTON_LABEL\" class=\"p-button-danger\" [disabled]=\"isRejectNoteEmpty\"\r\n (click)=\"onRejectConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>", styles: [".document-actions-container{margin:0}.actions-card{border-radius:8px;padding:.75rem;box-shadow:0 2px 4px #0000001a;transition:all .3s ease}.actions-card.pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-card.accepted-card{background-color:#d4edda;border:1px solid #28a745}.actions-card.rejected-card{background-color:#f8d7da;border:1px solid #dc3545}.actions-card[class*=status-].status-approved-card{background-color:#d4edda;border:1px solid #28a745}.actions-card[class*=status-].status-rejected-card{background-color:#f8d7da;border:1px solid #dc3545}.actions-card[class*=status-].status-pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-buttons{display:flex;gap:.5rem;align-items:center}.action-btn{padding:.5rem 1rem;border-radius:6px;border:1px solid;font-weight:500;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;gap:.5rem;min-width:80px;justify-content:center}.action-btn:disabled{opacity:.6;cursor:not-allowed}.action-btn i{font-size:.875rem}.reject-btn.default-reject{background-color:#fff5f5;border-color:#feb2b2;color:#4a5568}.reject-btn.default-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn.secondary-reject{background-color:#f7fafc;border-color:#e2e8f0;color:#4a5568}.reject-btn.secondary-reject:hover:not(:disabled){background-color:#edf2f7;border-color:#cbd5e0}.reject-btn.primary-reject{background-color:#dc3545;border-color:#dc3545;color:#fff}.reject-btn.primary-reject:hover:not(:disabled){background-color:#c82333;border-color:#bd2130}.reject-btn[class*=status-].status-approved-reject{background-color:#f7fafc;border-color:#e2e8f0;color:#4a5568}.reject-btn[class*=status-].status-approved-reject:hover:not(:disabled){background-color:#edf2f7;border-color:#cbd5e0}.reject-btn[class*=status-].status-rejected-reject{background-color:#dc3545;border-color:#dc3545;color:#fff}.reject-btn[class*=status-].status-rejected-reject:hover:not(:disabled){background-color:#c82333;border-color:#bd2130}.reject-btn[class*=status-].status-pending-reject{background-color:#fff5f5;border-color:#feb2b2;color:#4a5568}.reject-btn[class*=status-].status-pending-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.accept-btn.default-accept{background-color:#f0fff4;border-color:#9ae6b4;color:#4a5568}.accept-btn.default-accept:hover:not(:disabled){background-color:#c6f6d5;border-color:#68d391}.accept-btn.secondary-accept{background-color:#f7fafc;border-color:#e2e8f0;color:#4a5568}.accept-btn.secondary-accept:hover:not(:disabled){background-color:#edf2f7;border-color:#cbd5e0}.accept-btn.primary-accept{background-color:#28a745;border-color:#28a745;color:#fff}.accept-btn.primary-accept:hover:not(:disabled){background-color:#218838;border-color:#1e7e34}.accept-btn[class*=status-].status-approved-accept{background-color:#28a745;border-color:#28a745;color:#fff}.accept-btn[class*=status-].status-approved-accept:hover:not(:disabled){background-color:#218838;border-color:#1e7e34}.accept-btn[class*=status-].status-rejected-accept{background-color:#f7fafc;border-color:#e2e8f0;color:#4a5568}.accept-btn[class*=status-].status-rejected-accept:hover:not(:disabled){background-color:#edf2f7;border-color:#cbd5e0}.accept-btn[class*=status-].status-pending-accept{background-color:#f0fff4;border-color:#9ae6b4;color:#4a5568}.accept-btn[class*=status-].status-pending-accept:hover:not(:disabled){background-color:#c6f6d5;border-color:#68d391}.delete-btn{background-color:#fff;border-color:#e2e8f0;color:#e53e3e;padding:.5rem;min-width:auto;width:40px;height:40px}.delete-btn:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181;color:#c53030}.delete-btn i{font-size:1rem}:host ::ng-deep .confirmation-dialog .p-dialog{border-radius:8px;box-shadow:0 4px 12px #00000026;border:none;overflow:hidden}:host ::ng-deep .confirmation-dialog .p-dialog-header{padding:1.25rem 1.5rem;background-color:#fff;border-bottom:none;border-top-right-radius:10px;border-top-left-radius:10px}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-header-icon{display:none}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-title{font-size:1.125rem;font-weight:600;color:#2d3748;margin:0}:host ::ng-deep .confirmation-dialog .p-dialog-content{padding:1.5rem;background-color:#fff}:host ::ng-deep .confirmation-dialog .p-dialog-footer{padding:1rem 1.5rem;background-color:#f7fafc;border-top:1px solid #e2e8f0;display:flex;gap:.75rem;justify-content:flex-end;border-bottom-right-radius:10px;border-bottom-left-radius:10px}.dialog-content .note-label{display:block;margin-bottom:.75rem;font-weight:500;font-size:.875rem;color:#2d3748}.dialog-content .note-textarea{width:100%;min-height:100px;padding:.75rem;border:1px solid #e2e8f0;border-radius:6px;font-family:inherit;font-size:.875rem;line-height:1.5;resize:vertical;background-color:#fff;color:#2d3748}.dialog-content .note-textarea::placeholder{color:#a0aec0}.dialog-content .note-textarea:focus{outline:none;border-color:#3182ce;box-shadow:0 0 0 3px #3182ce1a}.dialog-footer{display:flex;gap:.75rem;justify-content:flex-end}.dialog-footer button{min-width:80px;padding:.5rem 1rem;border-radius:6px;font-weight:500;font-size:.875rem;border:1px solid;cursor:pointer;transition:all .2s ease}.dialog-footer button.p-button-secondary{background-color:#f7fafc;border-color:#e2e8f0;color:#4a5568}.dialog-footer button.p-button-secondary:hover{background-color:#edf2f7;border-color:#cbd5e0}.dialog-footer button.p-button-success{background-color:#38a169;border-color:#38a169;color:#fff}.dialog-footer button.p-button-success:hover{background-color:#2f855a;border-color:#2f855a}.dialog-footer button.p-button-danger{background-color:#e53e3e;border-color:#e53e3e;color:#fff}.dialog-footer button.p-button-danger:hover{background-color:#c53030;border-color:#c53030}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i5$1.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant"], outputs: ["onResize"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i7.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i8.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: HasPermissionDirective, selector: "[permission]", inputs: ["permission"] }] });
5191
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentActionsComponent, isStandalone: false, selector: "document-actions", inputs: { document: "document", documentId: "documentId", currentStatus: "currentStatus", isLoading: "isLoading", isUploaded: "isUploaded", statusId: "statusId" }, outputs: { actionPerformed: "actionPerformed" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-actions-container\" >\r\n <div class=\"actions-card\" [ngClass]=\"cardClass\">\r\n <div class=\"actions-buttons\">\r\n <!-- Reject Button -->\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn reject-btn\" [ngClass]=\"rejectButtonClass\" (click)=\"onRejectClick()\"\r\n [disabled]=\"currentStatus === SHARED.STATUS_REJECTED_LOWERCASE || isRejecting\">\r\n <i class=\"pi pi-times\" *ngIf=\"currentStatus === SHARED.STATUS_REJECTED_LOWERCASE\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isRejecting\"></i>\r\n <span>{{ currentStatus === SHARED.STATUS_REJECTED_LOWERCASE ? SHARED.BUTTON_LABEL_REJECTED :\r\n SHARED.BUTTON_LABEL_REJECT }}</span>\r\n </button>\r\n\r\n <!-- Accept Button -->\r\n <button *ngIf=\"!document?.isUploaded\" class=\"action-btn accept-btn\" [ngClass]=\"acceptButtonClass\" (click)=\"onAcceptClick()\"\r\n [disabled]=\"currentStatus === SHARED.STATUS_ACCEPTED || isAccepting\">\r\n <i class=\"pi pi-check\" *ngIf=\"currentStatus === SHARED.STATUS_ACCEPTED\"></i>\r\n <i class=\"pi pi-spin pi-spinner\" *ngIf=\"isAccepting\"></i>\r\n <span>{{ currentStatus === SHARED.STATUS_ACCEPTED ? SHARED.BUTTON_LABEL_ACCEPTED : SHARED.BUTTON_LABEL_ACCEPT\r\n }}</span>\r\n </button>\r\n\r\n <!-- Delete Button -->\r\n @if(document?.isUploaded){\r\n <button class=\"action-btn delete-btn\" (click)=\"onDeleteClick()\" [disabled]=\"isLoading\"\r\n [permission]=\"'documents-deleteDocumentByDocumentId'\" pTooltip=\"Delete Document\" tooltipPosition=\"top\">\r\n <i class=\"pi pi-trash\"></i>\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- Accept Confirmation Dialog -->\r\n<p-dialog [(visible)]=\"showAcceptDialog\" [header]=\"SHARED.ACCEPT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"acceptNote\" class=\"note-label\">{{ SHARED.ACCEPT_NOTE_LABEL }}</label>\r\n <textarea id=\"acceptNote\" pInputTextarea [(ngModel)]=\"acceptNote\" [placeholder]=\"SHARED.ACCEPT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.ACCEPT_BUTTON_LABEL\" class=\"p-button-success\" (click)=\"onAcceptConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n\r\n<!-- Reject Confirmation Dialog -->\r\n<p-dialog [(visible)]=\"showRejectDialog\" [header]=\"SHARED.REJECT_CONFIRM_HEADER\" [modal]=\"true\" [draggable]=\"false\"\r\n [closable]=\"true\" [style]=\"{ width: '25rem', height: '25rem' }\" styleClass=\"confirmation-dialog\">\r\n <div class=\"dialog-content\">\r\n <label for=\"rejectNote\" class=\"note-label\">{{ SHARED.REJECT_NOTE_LABEL }}</label>\r\n <textarea id=\"rejectNote\" pInputTextarea [(ngModel)]=\"rejectNote\" [placeholder]=\"SHARED.REJECT_NOTE_PLACEHOLDER\"\r\n rows=\"6\" class=\"note-textarea\">\r\n </textarea>\r\n </div>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"dialog-footer\">\r\n <button pButton [label]=\"SHARED.CANCEL_BUTTON_LABEL\" class=\"p-button-secondary\" (click)=\"onCancel()\">\r\n </button>\r\n <button pButton [label]=\"SHARED.REJECT_BUTTON_LABEL\" class=\"p-button-danger\" [disabled]=\"isRejectNoteEmpty\"\r\n (click)=\"onRejectConfirm()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>", styles: [".document-actions-container{margin:0}.actions-card{border-radius:8px;padding:.75rem;box-shadow:0 2px 4px #0000001a;transition:all .3s ease}.actions-card.pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-card.accepted-card{background-color:#d4edda;border:1px solid #28a745}.actions-card.rejected-card{background-color:#f8d7da;border:1px solid #dc3545}.actions-card[class*=status-].status-approved-card{background-color:#d4edda;border:1px solid #28a745}.actions-card[class*=status-].status-rejected-card{background-color:#f8d7da;border:1px solid #dc3545}.actions-card[class*=status-].status-pending-card{background-color:#f8f9fa;border:1px solid #e9ecef}.actions-buttons{display:flex;gap:.5rem;align-items:center}.action-btn{padding:.5rem 1rem;border-radius:6px;border:1px solid;font-weight:500;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;gap:.5rem;min-width:80px;justify-content:center}.action-btn:disabled{opacity:.6;cursor:not-allowed}.action-btn i{font-size:.875rem}.reject-btn.default-reject{background-color:#fff5f5;border-color:#feb2b2;color:#4a5568}.reject-btn.default-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.reject-btn.secondary-reject{background-color:#f7fafc;border-color:#e2e8f0;color:#4a5568}.reject-btn.secondary-reject:hover:not(:disabled){background-color:#edf2f7;border-color:#cbd5e0}.reject-btn.primary-reject{background-color:#dc3545;border-color:#dc3545;color:#fff}.reject-btn.primary-reject:hover:not(:disabled){background-color:#c82333;border-color:#bd2130}.reject-btn[class*=status-].status-approved-reject{background-color:#f7fafc;border-color:#e2e8f0;color:#4a5568}.reject-btn[class*=status-].status-approved-reject:hover:not(:disabled){background-color:#edf2f7;border-color:#cbd5e0}.reject-btn[class*=status-].status-rejected-reject{background-color:#dc3545;border-color:#dc3545;color:#fff}.reject-btn[class*=status-].status-rejected-reject:hover:not(:disabled){background-color:#c82333;border-color:#bd2130}.reject-btn[class*=status-].status-pending-reject{background-color:#fff5f5;border-color:#feb2b2;color:#4a5568}.reject-btn[class*=status-].status-pending-reject:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181}.accept-btn.default-accept{background-color:#f0fff4;border-color:#9ae6b4;color:#4a5568}.accept-btn.default-accept:hover:not(:disabled){background-color:#c6f6d5;border-color:#68d391}.accept-btn.secondary-accept{background-color:#f7fafc;border-color:#e2e8f0;color:#4a5568}.accept-btn.secondary-accept:hover:not(:disabled){background-color:#edf2f7;border-color:#cbd5e0}.accept-btn.primary-accept{background-color:#28a745;border-color:#28a745;color:#fff}.accept-btn.primary-accept:hover:not(:disabled){background-color:#218838;border-color:#1e7e34}.accept-btn[class*=status-].status-approved-accept{background-color:#28a745;border-color:#28a745;color:#fff}.accept-btn[class*=status-].status-approved-accept:hover:not(:disabled){background-color:#218838;border-color:#1e7e34}.accept-btn[class*=status-].status-rejected-accept{background-color:#f7fafc;border-color:#e2e8f0;color:#4a5568}.accept-btn[class*=status-].status-rejected-accept:hover:not(:disabled){background-color:#edf2f7;border-color:#cbd5e0}.accept-btn[class*=status-].status-pending-accept{background-color:#f0fff4;border-color:#9ae6b4;color:#4a5568}.accept-btn[class*=status-].status-pending-accept:hover:not(:disabled){background-color:#c6f6d5;border-color:#68d391}.delete-btn{background-color:#fff;border-color:#e2e8f0;color:#e53e3e;padding:.5rem;min-width:auto;width:40px;height:40px}.delete-btn:hover:not(:disabled){background-color:#fed7d7;border-color:#fc8181;color:#c53030}.delete-btn i{font-size:1rem}:host ::ng-deep .confirmation-dialog .p-dialog{border-radius:8px;box-shadow:0 4px 12px #00000026;border:none;overflow:hidden}:host ::ng-deep .confirmation-dialog .p-dialog-header{padding:1.25rem 1.5rem;background-color:#fff;border-bottom:none;border-top-right-radius:10px;border-top-left-radius:10px}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-header-icon{display:none}:host ::ng-deep .confirmation-dialog .p-dialog-header .p-dialog-title{font-size:1.125rem;font-weight:600;color:#2d3748;margin:0}:host ::ng-deep .confirmation-dialog .p-dialog-content{padding:1.5rem;background-color:#fff}:host ::ng-deep .confirmation-dialog .p-dialog-footer{padding:1rem 1.5rem;background-color:#f7fafc;border-top:1px solid #e2e8f0;display:flex;gap:.75rem;justify-content:flex-end;border-bottom-right-radius:10px;border-bottom-left-radius:10px}.dialog-content .note-label{display:block;margin-bottom:.75rem;font-weight:500;font-size:.875rem;color:#2d3748}.dialog-content .note-textarea{width:100%;min-height:100px;padding:.75rem;border:1px solid #e2e8f0;border-radius:6px;font-family:inherit;font-size:.875rem;line-height:1.5;resize:vertical;background-color:#fff;color:#2d3748}.dialog-content .note-textarea::placeholder{color:#a0aec0}.dialog-content .note-textarea:focus{outline:none;border-color:#3182ce;box-shadow:0 0 0 3px #3182ce1a}.dialog-footer{display:flex;gap:.75rem;justify-content:flex-end}.dialog-footer button{min-width:80px;padding:.5rem 1rem;border-radius:6px;font-weight:500;font-size:.875rem;border:1px solid;cursor:pointer;transition:all .2s ease}.dialog-footer button.p-button-secondary{background-color:#f7fafc;border-color:#e2e8f0;color:#4a5568}.dialog-footer button.p-button-secondary:hover{background-color:#edf2f7;border-color:#cbd5e0}.dialog-footer button.p-button-success{background-color:#38a169;border-color:#38a169;color:#fff}.dialog-footer button.p-button-success:hover{background-color:#2f855a;border-color:#2f855a}.dialog-footer button.p-button-danger{background-color:#e53e3e;border-color:#e53e3e;color:#fff}.dialog-footer button.p-button-danger:hover{background-color:#c53030;border-color:#c53030}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i5$2.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant"], outputs: ["onResize"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i7.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i8.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: HasPermissionDirective, selector: "[permission]", inputs: ["permission"] }] });
4950
5192
  }
4951
5193
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentActionsComponent, decorators: [{
4952
5194
  type: Component,
@@ -5109,11 +5351,11 @@ class DocumentViewerComponent {
5109
5351
  this.subscription.unsubscribe();
5110
5352
  }
5111
5353
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentViewerComponent, deps: [{ token: DocumentHttpService }, { token: DocumentHelperService }, { token: i3.MessageService }, { token: DocumentViewerService }], target: i0.ɵɵFactoryTarget.Component });
5112
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentViewerComponent, isStandalone: false, selector: "document-viewer", inputs: { selectedDocument: "selectedDocument", documentList: "documentList", contextId: "contextId" }, outputs: { documentStatusUpdated: "documentStatusUpdated" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-viewer-container\">\r\n <div class=\"main-content\">\r\n <p-messages [(value)]=\"messages\" [enableService]=\"false\"></p-messages>\r\n \r\n <div class=\"content-grid\">\r\n @if(selectedDocument){\r\n <div class=\"document-preview\">\r\n @if(isSelectedDocumentImage){\r\n <div class=\"img-container\">\r\n <img\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n class=\"uploadedImages\"\r\n alt=\"Document Image\"\r\n />\r\n </div>\r\n }@else if(isSelectedDocumentPdf){\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: 100%; height: 100%\"\r\n ></pdf-viewer>\r\n </div>\r\n }@else if(isSelectedDocumentUnsupported){\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=\"sidebar\">\r\n <document-actions\r\n [document]=\"selectedDocument\"\r\n [documentId]=\"selectedDocument?._id\"\r\n [currentStatus]=\"currentState.documentStatus\"\r\n [isLoading]=\"currentState.isActionLoading\"\r\n [isUploaded]=\"currentState.documentIsUploaded\"\r\n [statusId]=\"selectedDocument?.statusId\"\r\n (actionPerformed)=\"handleDocumentAction($event)\">\r\n </document-actions>\r\n \r\n <document-history \r\n [historyData]=\"currentState.documentHistory\" \r\n [showHistory]=\"currentState.showDocumentHistory\">\r\n </document-history>\r\n \r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".document-viewer-container{height:100%;width:100%}.document-viewer-container .main-content{height:100%;display:flex;flex-direction:column}.document-viewer-container .main-content .p-messages{margin-bottom:.5rem}.document-viewer-container .main-content .content-grid{display:grid;grid-template-columns:1fr 350px;gap:1rem;height:calc(100% - 60px);min-height:0}.document-viewer-container .main-content .content-grid .document-preview{background:#f8f9fa;border-radius:8px;padding:.5rem;display:flex;align-items:center;justify-content:center;overflow:hidden}.document-viewer-container .main-content .content-grid .document-preview .img-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.document-viewer-container .main-content .content-grid .document-preview .img-container .uploadedImages{max-width:100%;max-height:100%;object-fit:contain;border-radius:4px}.document-viewer-container .main-content .content-grid .document-preview .pdf-container{width:100%;height:100%;border-radius:4px;overflow:hidden}.document-viewer-container .main-content .content-grid .document-preview .incorrect-docType{color:#dc3545;font-weight:500;text-align:center;padding:2rem}.document-viewer-container .main-content .content-grid .sidebar{display:flex;flex-direction:column;gap:.75rem;max-height:100%;overflow-y:auto}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-actions-container{margin:0}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-history-container{padding:.75rem;max-height:none}@media (max-width: 1200px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr 300px;gap:.75rem}}@media (max-width: 768px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr;gap:.5rem}.document-viewer-container .main-content .content-grid .sidebar{order:-1}}.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}\n"], dependencies: [{ kind: "component", type: i5$2.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "component", type: i6.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: DocumentHistoryComponent, selector: "document-history", inputs: ["historyData", "showHistory"] }, { kind: "component", type: DocumentActionsComponent, selector: "document-actions", inputs: ["document", "documentId", "currentStatus", "isLoading", "isUploaded", "statusId"], outputs: ["actionPerformed"] }], encapsulation: i0.ViewEncapsulation.None });
5354
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DocumentViewerComponent, isStandalone: false, selector: "document-viewer", inputs: { selectedDocument: "selectedDocument", documentList: "documentList", contextId: "contextId" }, outputs: { documentStatusUpdated: "documentStatusUpdated" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"document-viewer-container\">\r\n <div class=\"main-content\">\r\n <p-messages [(value)]=\"messages\" [enableService]=\"false\"></p-messages>\r\n \r\n <div class=\"content-grid\">\r\n @if(selectedDocument){\r\n <div class=\"document-preview\">\r\n @if(isSelectedDocumentImage){\r\n <div class=\"img-container\">\r\n <img\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n class=\"uploadedImages\"\r\n alt=\"Document Image\"\r\n />\r\n </div>\r\n }@else if(isSelectedDocumentPdf){\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]=\"0.7\"\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: 100%; height: 100%\"\r\n ></pdf-viewer>\r\n </div>\r\n }@else if(isSelectedDocumentUnsupported){\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-12 pt-0\">\r\n \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 -->\r\n \r\n <div class=\"sidebar\">\r\n <document-actions\r\n [document]=\"selectedDocument\"\r\n [documentId]=\"selectedDocument?._id\"\r\n [currentStatus]=\"currentState.documentStatus\"\r\n [isLoading]=\"currentState.isActionLoading\"\r\n [isUploaded]=\"currentState.documentIsUploaded\"\r\n [statusId]=\"selectedDocument?.statusId\"\r\n (actionPerformed)=\"handleDocumentAction($event)\">\r\n </document-actions>\r\n \r\n <document-history \r\n [historyData]=\"currentState.documentHistory\" \r\n [showHistory]=\"currentState.showDocumentHistory\">\r\n </document-history>\r\n \r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".document-viewer-container{height:100%;width:100%}.document-viewer-container .main-content{height:100%;display:flex;flex-direction:column}.document-viewer-container .main-content .p-messages{margin-bottom:.5rem}.document-viewer-container .main-content .content-grid{display:grid;grid-template-columns:1fr 350px;gap:1rem;height:calc(100% - 60px);min-height:0}.document-viewer-container .main-content .content-grid .document-preview{background:#f8f9fa;border-radius:8px;padding:.5rem;display:flex;align-items:center;justify-content:center;overflow:hidden}.document-viewer-container .main-content .content-grid .document-preview .img-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.document-viewer-container .main-content .content-grid .document-preview .img-container .uploadedImages{max-width:100%;max-height:100%;object-fit:contain;border-radius:4px}.document-viewer-container .main-content .content-grid .document-preview .pdf-container{width:100%;height:100%;border-radius:4px;overflow:hidden}.document-viewer-container .main-content .content-grid .document-preview .incorrect-docType{color:#dc3545;font-weight:500;text-align:center;padding:2rem}.document-viewer-container .main-content .content-grid .sidebar{display:flex;flex-direction:column;gap:.75rem;max-height:100%;overflow-y:auto}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-actions-container{margin:0}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-history-container{padding:.75rem;max-height:none}@media (max-width: 1200px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr 300px;gap:.75rem}}@media (max-width: 768px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr;gap:.5rem}.document-viewer-container .main-content .content-grid .sidebar{order:-1}}.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}\n"], dependencies: [{ kind: "component", type: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "component", type: i6.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: DocumentHistoryComponent, selector: "document-history", inputs: ["historyData", "showHistory"] }, { kind: "component", type: DocumentActionsComponent, selector: "document-actions", inputs: ["document", "documentId", "currentStatus", "isLoading", "isUploaded", "statusId"], outputs: ["actionPerformed"] }], encapsulation: i0.ViewEncapsulation.None });
5113
5355
  }
5114
5356
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentViewerComponent, decorators: [{
5115
5357
  type: Component,
5116
- args: [{ selector: 'document-viewer', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-viewer-container\">\r\n <div class=\"main-content\">\r\n <p-messages [(value)]=\"messages\" [enableService]=\"false\"></p-messages>\r\n \r\n <div class=\"content-grid\">\r\n @if(selectedDocument){\r\n <div class=\"document-preview\">\r\n @if(isSelectedDocumentImage){\r\n <div class=\"img-container\">\r\n <img\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n class=\"uploadedImages\"\r\n alt=\"Document Image\"\r\n />\r\n </div>\r\n }@else if(isSelectedDocumentPdf){\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: 100%; height: 100%\"\r\n ></pdf-viewer>\r\n </div>\r\n }@else if(isSelectedDocumentUnsupported){\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=\"sidebar\">\r\n <document-actions\r\n [document]=\"selectedDocument\"\r\n [documentId]=\"selectedDocument?._id\"\r\n [currentStatus]=\"currentState.documentStatus\"\r\n [isLoading]=\"currentState.isActionLoading\"\r\n [isUploaded]=\"currentState.documentIsUploaded\"\r\n [statusId]=\"selectedDocument?.statusId\"\r\n (actionPerformed)=\"handleDocumentAction($event)\">\r\n </document-actions>\r\n \r\n <document-history \r\n [historyData]=\"currentState.documentHistory\" \r\n [showHistory]=\"currentState.showDocumentHistory\">\r\n </document-history>\r\n \r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".document-viewer-container{height:100%;width:100%}.document-viewer-container .main-content{height:100%;display:flex;flex-direction:column}.document-viewer-container .main-content .p-messages{margin-bottom:.5rem}.document-viewer-container .main-content .content-grid{display:grid;grid-template-columns:1fr 350px;gap:1rem;height:calc(100% - 60px);min-height:0}.document-viewer-container .main-content .content-grid .document-preview{background:#f8f9fa;border-radius:8px;padding:.5rem;display:flex;align-items:center;justify-content:center;overflow:hidden}.document-viewer-container .main-content .content-grid .document-preview .img-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.document-viewer-container .main-content .content-grid .document-preview .img-container .uploadedImages{max-width:100%;max-height:100%;object-fit:contain;border-radius:4px}.document-viewer-container .main-content .content-grid .document-preview .pdf-container{width:100%;height:100%;border-radius:4px;overflow:hidden}.document-viewer-container .main-content .content-grid .document-preview .incorrect-docType{color:#dc3545;font-weight:500;text-align:center;padding:2rem}.document-viewer-container .main-content .content-grid .sidebar{display:flex;flex-direction:column;gap:.75rem;max-height:100%;overflow-y:auto}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-actions-container{margin:0}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-history-container{padding:.75rem;max-height:none}@media (max-width: 1200px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr 300px;gap:.75rem}}@media (max-width: 768px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr;gap:.5rem}.document-viewer-container .main-content .content-grid .sidebar{order:-1}}.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}\n"] }]
5358
+ args: [{ selector: 'document-viewer', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-viewer-container\">\r\n <div class=\"main-content\">\r\n <p-messages [(value)]=\"messages\" [enableService]=\"false\"></p-messages>\r\n \r\n <div class=\"content-grid\">\r\n @if(selectedDocument){\r\n <div class=\"document-preview\">\r\n @if(isSelectedDocumentImage){\r\n <div class=\"img-container\">\r\n <img\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n class=\"uploadedImages\"\r\n alt=\"Document Image\"\r\n />\r\n </div>\r\n }@else if(isSelectedDocumentPdf){\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]=\"0.7\"\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: 100%; height: 100%\"\r\n ></pdf-viewer>\r\n </div>\r\n }@else if(isSelectedDocumentUnsupported){\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-12 pt-0\">\r\n \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 -->\r\n \r\n <div class=\"sidebar\">\r\n <document-actions\r\n [document]=\"selectedDocument\"\r\n [documentId]=\"selectedDocument?._id\"\r\n [currentStatus]=\"currentState.documentStatus\"\r\n [isLoading]=\"currentState.isActionLoading\"\r\n [isUploaded]=\"currentState.documentIsUploaded\"\r\n [statusId]=\"selectedDocument?.statusId\"\r\n (actionPerformed)=\"handleDocumentAction($event)\">\r\n </document-actions>\r\n \r\n <document-history \r\n [historyData]=\"currentState.documentHistory\" \r\n [showHistory]=\"currentState.showDocumentHistory\">\r\n </document-history>\r\n \r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".document-viewer-container{height:100%;width:100%}.document-viewer-container .main-content{height:100%;display:flex;flex-direction:column}.document-viewer-container .main-content .p-messages{margin-bottom:.5rem}.document-viewer-container .main-content .content-grid{display:grid;grid-template-columns:1fr 350px;gap:1rem;height:calc(100% - 60px);min-height:0}.document-viewer-container .main-content .content-grid .document-preview{background:#f8f9fa;border-radius:8px;padding:.5rem;display:flex;align-items:center;justify-content:center;overflow:hidden}.document-viewer-container .main-content .content-grid .document-preview .img-container{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.document-viewer-container .main-content .content-grid .document-preview .img-container .uploadedImages{max-width:100%;max-height:100%;object-fit:contain;border-radius:4px}.document-viewer-container .main-content .content-grid .document-preview .pdf-container{width:100%;height:100%;border-radius:4px;overflow:hidden}.document-viewer-container .main-content .content-grid .document-preview .incorrect-docType{color:#dc3545;font-weight:500;text-align:center;padding:2rem}.document-viewer-container .main-content .content-grid .sidebar{display:flex;flex-direction:column;gap:.75rem;max-height:100%;overflow-y:auto}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-actions-container{margin:0}.document-viewer-container .main-content .content-grid .sidebar ::ng-deep .document-history-container{padding:.75rem;max-height:none}@media (max-width: 1200px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr 300px;gap:.75rem}}@media (max-width: 768px){.document-viewer-container .main-content .content-grid{grid-template-columns:1fr;gap:.5rem}.document-viewer-container .main-content .content-grid .sidebar{order:-1}}.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}\n"] }]
5117
5359
  }], ctorParameters: () => [{ type: DocumentHttpService }, { type: DocumentHelperService }, { type: i3.MessageService }, { type: DocumentViewerService }], propDecorators: { selectedDocument: [{
5118
5360
  type: Input
5119
5361
  }], documentList: [{
@@ -5493,6 +5735,11 @@ class DocumentsMenuComponent {
5493
5735
  this.documentMenuService = documentMenuService;
5494
5736
  this.documentHelperService = documentHelperService;
5495
5737
  }
5738
+ /**
5739
+ * Initialize the component
5740
+ * @returns {void}
5741
+ * @memberof DocumentsMenuComponent
5742
+ */
5496
5743
  ngOnInit() {
5497
5744
  this.documentQuery.selectSelectedMenuItem().subscribe(menuItemId => {
5498
5745
  this.selectedMenuItemId = menuItemId;
@@ -5506,6 +5753,12 @@ class DocumentsMenuComponent {
5506
5753
  }
5507
5754
  });
5508
5755
  }
5756
+ /**
5757
+ * Handle changes to input properties
5758
+ * @param {SimpleChanges} changes - The changes to the input properties
5759
+ * @returns {void}
5760
+ * @memberof DocumentsMenuComponent
5761
+ */
5509
5762
  ngOnChanges(changes) {
5510
5763
  if (changes[SHARED.CATAGORIES] && this.catagories) {
5511
5764
  this.updateMenuItemsData();
@@ -5587,14 +5840,15 @@ class DocumentsMenuComponent {
5587
5840
  * Handle deselection to ensure immediate visual feedback
5588
5841
  */
5589
5842
  handleDeselection() {
5590
- // Force immediate update of the component state
5591
5843
  this.selectedMenuItemId = null;
5592
5844
  this.selectedMenuItem = null;
5593
- // Trigger change detection
5594
5845
  setTimeout(() => {
5595
- // This ensures the UI updates immediately
5596
5846
  }, 0);
5597
5847
  }
5848
+ /**
5849
+ * Handle the menu item selection
5850
+ * @param {string} menuItemId - The ID of the menu item to select
5851
+ */
5598
5852
  onSelectMenuItem(menuItemId) {
5599
5853
  const label = this.findMenuItemLabelById(menuItemId);
5600
5854
  if (label) {
@@ -5604,12 +5858,19 @@ class DocumentsMenuComponent {
5604
5858
  this.documentMenuService.handleUserListVisibility(menuItemId, this.categories);
5605
5859
  }
5606
5860
  }
5861
+ /**
5862
+ * Handle the menu item unselection
5863
+ */
5607
5864
  onUnselectMenuItem() {
5608
5865
  this.selectedMenuItem = null;
5609
5866
  this.selectedMenuItemId = null;
5610
5867
  this.documentStore.setSelectedMenuItem(null);
5611
5868
  this.documentHelperService.refreshDocumentsWithoutFilters(this.contextId);
5612
5869
  }
5870
+ /**
5871
+ * Get the selected menu item
5872
+ * @returns {string | null} - The selected menu item
5873
+ */
5613
5874
  getSelectedMenuItem() {
5614
5875
  return this.selectedMenuItem;
5615
5876
  }
@@ -5624,6 +5885,10 @@ class DocumentsMenuComponent {
5624
5885
  this.documentHelperService.refreshDocumentsWithoutFilters(this.contextId);
5625
5886
  }
5626
5887
  }
5888
+ /**
5889
+ * Get the selected menu item id
5890
+ * @returns {string | null} - The selected menu item id
5891
+ */
5627
5892
  getSelectedMenuItemId() {
5628
5893
  return this.selectedMenuItemId;
5629
5894
  }
@@ -6181,9 +6446,9 @@ class DocumentModule {
6181
6446
  DocumentActionsComponent,
6182
6447
  DocumentSearchComponent,
6183
6448
  /**
6184
- * A common sidebar component for content projection.
6449
+ * A sidebar component for content projection.
6185
6450
  */
6186
- CommonSidebarComponent], imports: [
6451
+ SidebarComponent], imports: [
6187
6452
  /**
6188
6453
  * Angular's CommonModule is imported to access common directives like `ngIf` and `ngFor`.
6189
6454
  */
@@ -6288,9 +6553,9 @@ class DocumentModule {
6288
6553
  */
6289
6554
  DocumentSearchComponent,
6290
6555
  /**
6291
- * A common sidebar component for content projection.
6556
+ * A sidebar component for content projection.
6292
6557
  */
6293
- CommonSidebarComponent] });
6558
+ SidebarComponent] });
6294
6559
  static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentModule, providers: [
6295
6560
  /**
6296
6561
  * Provide the messageservice to be used in other components.
@@ -6461,9 +6726,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
6461
6726
  DocumentActionsComponent,
6462
6727
  DocumentSearchComponent,
6463
6728
  /**
6464
- * A common sidebar component for content projection.
6729
+ * A sidebar component for content projection.
6465
6730
  */
6466
- CommonSidebarComponent,
6731
+ SidebarComponent,
6467
6732
  ],
6468
6733
  imports: [
6469
6734
  /**
@@ -6572,9 +6837,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
6572
6837
  */
6573
6838
  DocumentSearchComponent,
6574
6839
  /**
6575
- * A common sidebar component for content projection.
6840
+ * A sidebar component for content projection.
6576
6841
  */
6577
- CommonSidebarComponent,
6842
+ SidebarComponent,
6578
6843
  ],
6579
6844
  providers: [
6580
6845
  /**
@@ -6623,5 +6888,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
6623
6888
  * Generated bundle index. Do not edit.
6624
6889
  */
6625
6890
 
6626
- export { CommonSidebarComponent, DocumentActionsComponent, DocumentContainerComponent, DocumentDirective, DocumentHistoryComponent, DocumentListComponent, DocumentModule, DocumentSearchComponent, DocumentTableBuilderService, DocumentViewerComponent, HasPermissionDirective };
6891
+ export { DocumentActionsComponent, DocumentContainerComponent, DocumentDirective, DocumentHistoryComponent, DocumentListComponent, DocumentModule, DocumentSearchComponent, DocumentTableBuilderService, DocumentViewerComponent, HasPermissionDirective, SidebarComponent };
6627
6892
  //# sourceMappingURL=cat-documents-ng.mjs.map