cat-documents-ng 0.2.90 → 0.2.92

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.
@@ -301,6 +301,11 @@ class SHARED {
301
301
  static REJECT_ICON = 'pi pi-check';
302
302
  static ACCEPT_BUTTON_STYLE_CLASS = 'p-button-danger';
303
303
  static REJECT_BUTTON_STYLE_CLASS = 'p-button-secondary';
304
+ static FILE_TYPES = [
305
+ 'xlsx', 'xls', 'doc', 'docx', 'pdf', 'jpg', 'jpeg',
306
+ 'odt', 'csv', 'png', 'msg', 'eml'
307
+ ];
308
+ static COMMA = ',';
304
309
  static Menu = [
305
310
  {
306
311
  label: 'Applicant',
@@ -1313,7 +1318,7 @@ class DocumentService {
1313
1318
  * @returns {Observable<any>} Observable that emits the newly created document.
1314
1319
  */
1315
1320
  create(entity) {
1316
- const headers = { 'Authorization': 'Bearer a79cbca8-164c-4ec3-991d-0efb441ff126' };
1321
+ const headers = { 'Authorization': 'Bearer 514330f0-41d4-4c03-8d2e-f248a1340e8d' };
1317
1322
  return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, entity, { headers }).pipe(tap((newEntity) => this.documentStore.add(newEntity)));
1318
1323
  }
1319
1324
  /**
@@ -1718,7 +1723,7 @@ class DocumentHttpService {
1718
1723
  * @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
1719
1724
  */
1720
1725
  getDocumentCatagories(contextId) {
1721
- let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1726
+ let headers = new HttpHeaders({ Authorization: `Bearer 514330f0-41d4-4c03-8d2e-f248a1340e8d` });
1722
1727
  return this.http.get(`${this.apiUrl}${URLS.DOCUMENTS_CATAGORIES}/${contextId}`, { headers }).pipe(tap((response) => {
1723
1728
  // Store only the categories array, not the entire response
1724
1729
  if (response && response.categories) {
@@ -1777,7 +1782,7 @@ class DocumentHttpService {
1777
1782
  * @returns {Observable<DocumentModel>} An observable that emits the updated DocumentModel.
1778
1783
  */
1779
1784
  updateDocumentName(documentId, payload) {
1780
- let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1785
+ let headers = new HttpHeaders({ Authorization: `Bearer 514330f0-41d4-4c03-8d2e-f248a1340e8d` });
1781
1786
  return this.http.put(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${documentId}`, payload, { headers }).pipe(catchError((error) => {
1782
1787
  return throwError(() => new Error(error));
1783
1788
  }));
@@ -1790,7 +1795,7 @@ class DocumentHttpService {
1790
1795
  getUserListByContextId(contextId) {
1791
1796
  if (!contextId)
1792
1797
  return EMPTY;
1793
- let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1798
+ let headers = new HttpHeaders({ Authorization: `Bearer 514330f0-41d4-4c03-8d2e-f248a1340e8d` });
1794
1799
  return this.http.get(`${this.apiUrl}${URLS.USERLIST}${contextId}`, { headers }).pipe(tap((userList) => {
1795
1800
  this.documentStore.setUserList(userList);
1796
1801
  }), catchError((error) => {
@@ -1816,7 +1821,7 @@ class DocumentHttpService {
1816
1821
  if (categoryId) {
1817
1822
  params = params.set(SHARED.CATEGORY, categoryId);
1818
1823
  }
1819
- let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1824
+ let headers = new HttpHeaders({ Authorization: `Bearer 514330f0-41d4-4c03-8d2e-f248a1340e8d` });
1820
1825
  return this.http.get(url, { params, headers }).pipe(tap((statusData) => {
1821
1826
  this.documentStore.setStatusData(statusData);
1822
1827
  }), catchError((error) => {
@@ -1847,7 +1852,7 @@ class DocumentHttpService {
1847
1852
  if (searchKey) {
1848
1853
  params = params.set(SHARED.SEARCH_KEY, searchKey);
1849
1854
  }
1850
- let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1855
+ let headers = new HttpHeaders({ Authorization: `Bearer 514330f0-41d4-4c03-8d2e-f248a1340e8d` });
1851
1856
  return this.http.get(`${this.apiUrl}${URLS.GETALL}/${contextId}`, { params, headers }).pipe(tap((response) => {
1852
1857
  if (response.documents) {
1853
1858
  this.documentStore.setDocumentList(response.documents);
@@ -1860,7 +1865,7 @@ class DocumentHttpService {
1860
1865
  if (!documentId) {
1861
1866
  return of([]);
1862
1867
  }
1863
- let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1868
+ let headers = new HttpHeaders({ Authorization: `Bearer 514330f0-41d4-4c03-8d2e-f248a1340e8d` });
1864
1869
  return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_HISTORY}${documentId}`, { headers });
1865
1870
  }
1866
1871
  /**
@@ -1871,7 +1876,7 @@ class DocumentHttpService {
1871
1876
  getCategoriesBySource(source) {
1872
1877
  if (!source)
1873
1878
  return EMPTY;
1874
- let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1879
+ let headers = new HttpHeaders({ Authorization: `Bearer 514330f0-41d4-4c03-8d2e-f248a1340e8d` });
1875
1880
  return this.http.get(`${this.apiUrl}${URLS.GET_CATEGORIES_BY_SOURCE}${source}`, { headers }).pipe(catchError((error) => {
1876
1881
  return throwError(() => new Error(error));
1877
1882
  }));
@@ -1884,7 +1889,7 @@ class DocumentHttpService {
1884
1889
  getDocumentTypesByCategory(categoryId) {
1885
1890
  if (!categoryId)
1886
1891
  return EMPTY;
1887
- let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1892
+ let headers = new HttpHeaders({ Authorization: `Bearer 514330f0-41d4-4c03-8d2e-f248a1340e8d` });
1888
1893
  return this.http.get(`${this.apiUrl}${URLS.GET_DOCUMENT_TYPES_BY_CATEGORY}${categoryId}`, { headers }).pipe(catchError((error) => {
1889
1894
  return throwError(() => new Error(error));
1890
1895
  }));
@@ -1895,7 +1900,7 @@ class DocumentHttpService {
1895
1900
  * @returns {Observable<any>} Observable that emits the upload response.
1896
1901
  */
1897
1902
  uploadFile(formData) {
1898
- let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1903
+ let headers = new HttpHeaders({ Authorization: `Bearer 514330f0-41d4-4c03-8d2e-f248a1340e8d` });
1899
1904
  return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, formData, { headers }).pipe(catchError((error) => {
1900
1905
  return throwError(() => new Error(error));
1901
1906
  }));
@@ -1906,7 +1911,7 @@ class DocumentHttpService {
1906
1911
  * @returns {Observable<any>} Observable that emits the save response.
1907
1912
  */
1908
1913
  saveDocumentUpload(payload) {
1909
- let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1914
+ let headers = new HttpHeaders({ Authorization: `Bearer 514330f0-41d4-4c03-8d2e-f248a1340e8d` });
1910
1915
  return this.http.post(`${this.apiUrl}${URLS.SAVE_DOCUMENT_UPLOAD}`, payload, { headers }).pipe(catchError((error) => {
1911
1916
  return throwError(() => new Error(error));
1912
1917
  }));
@@ -1922,7 +1927,7 @@ class DocumentHttpService {
1922
1927
  const payload = {
1923
1928
  statusUpdateDescription: statusUpdateDescription
1924
1929
  };
1925
- let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1930
+ let headers = new HttpHeaders({ Authorization: `Bearer 514330f0-41d4-4c03-8d2e-f248a1340e8d` });
1926
1931
  return this.http.put(`${this.apiUrl}${URLS.UPDATE_DOCUMENT_STATUS}${documentId}/${status}`, payload, { headers }).pipe(tap((response) => {
1927
1932
  if (response && response.status) {
1928
1933
  const normalizedStatus = this.normalizeStatus(response.status);
@@ -1956,7 +1961,7 @@ class DocumentHttpService {
1956
1961
  * @returns {Observable<any>} Observable that emits the delete response
1957
1962
  */
1958
1963
  deleteDocument(documentId, contextId) {
1959
- let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1964
+ let headers = new HttpHeaders({ Authorization: `Bearer 514330f0-41d4-4c03-8d2e-f248a1340e8d` });
1960
1965
  return this.http.delete(`${this.apiUrl}${URLS.DELETE_DOCUMENT}${documentId}`, { headers }).pipe(tap(() => {
1961
1966
  this.getDocumentCatagories(contextId).subscribe();
1962
1967
  this.getUserListByContextId(contextId).subscribe();
@@ -2417,7 +2422,7 @@ class DocumentUploadService {
2417
2422
  if (uploadedFile) {
2418
2423
  let formData = new FormData();
2419
2424
  formData.append(SHARED.FILE, uploadedFile, uploadedFile.name);
2420
- formData.append(SHARED.CONTEXT_ID, this.contextId);
2425
+ formData.append(SHARED.CONTEXT_ID, this.contextId || contextId || SHARED.EMPTY);
2421
2426
  return formData;
2422
2427
  }
2423
2428
  else {
@@ -2489,6 +2494,23 @@ class FileFormatService {
2489
2494
  return `${parseFloat(mbSize.toFixed(decimalPlaces))} ${sizes[SHARED.TWO]}`;
2490
2495
  }
2491
2496
  }
2497
+ /**
2498
+ * Validates if a file has an allowed extension
2499
+ * @param fileName - The name of the file to validate
2500
+ * @returns True if the file extension is allowed, false otherwise
2501
+ */
2502
+ isAllowedFileType(fileName) {
2503
+ const allowedExtensions = SHARED.FILE_TYPES;
2504
+ const fileExtension = fileName.toLowerCase().split('.').pop();
2505
+ return fileExtension ? allowedExtensions.includes(fileExtension) : false;
2506
+ }
2507
+ /**
2508
+ * Gets the list of allowed file extensions
2509
+ * @returns Array of allowed file extensions
2510
+ */
2511
+ getAllowedFileExtensions() {
2512
+ return SHARED.FILE_TYPES;
2513
+ }
2492
2514
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FileFormatService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2493
2515
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FileFormatService, providedIn: 'root' });
2494
2516
  }
@@ -3006,7 +3028,20 @@ class DocumentUploadComponent {
3006
3028
  * @param event - Event containing the selected files
3007
3029
  */
3008
3030
  async onSelectedFiles(event) {
3009
- await this.processFilesSequentially(event.currentFiles);
3031
+ // Filter out files with unsupported extensions
3032
+ const validFiles = event.currentFiles.filter(file => this.fileFormatService.isAllowedFileType(file.name));
3033
+ if (validFiles.length !== event.currentFiles.length) {
3034
+ const invalidFiles = event.currentFiles.filter(file => !this.fileFormatService.isAllowedFileType(file.name));
3035
+ const invalidFileNames = invalidFiles.map(file => file.name).join(', ');
3036
+ this.messageService.add({
3037
+ severity: 'warn',
3038
+ summary: 'Invalid File Type',
3039
+ detail: `The following files have unsupported formats and will be skipped: ${invalidFileNames}`
3040
+ });
3041
+ }
3042
+ if (validFiles.length > 0) {
3043
+ await this.processFilesSequentially(validFiles);
3044
+ }
3010
3045
  this.fileUploader.clear();
3011
3046
  }
3012
3047
  /**
@@ -3306,6 +3341,15 @@ class DocumentUploadComponent {
3306
3341
  formatSize(size) {
3307
3342
  this.fileSize = this.businessService.formatFileSize(size, this.config);
3308
3343
  }
3344
+ /**
3345
+ * Gets the accept string for the file upload component
3346
+ * @returns String with file extensions for the accept attribute
3347
+ */
3348
+ getFileUploadAcceptString() {
3349
+ return this.fileFormatService.getAllowedFileExtensions()
3350
+ .map(ext => `.${ext}`)
3351
+ .join(SHARED.COMMA);
3352
+ }
3309
3353
  /**
3310
3354
  * Lifecycle hook that is called when component is destroyed.
3311
3355
  * Cleans up subscriptions and destroys services.
@@ -3317,11 +3361,11 @@ class DocumentUploadComponent {
3317
3361
  this.dataService.destroy();
3318
3362
  }
3319
3363
  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 });
3320
- 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 <span class=\"text-red-500\">*</span> </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) <span class=\"text-red-500\">*</span></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 <span class=\"text-red-500\">*</span></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 <span class=\"text-red-500\">*</span></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 <span class=\"text-red-500\">*</span></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 ?? 0\" \r\n [showValue]=\"false\" \r\n styleClass=\"h-1/2rem md:ml-auto relative\"\r\n [ngClass]=\"{ 'exceeded-progress-bar': (uploadedFile.progress ?? 0) > 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 });
3364
+ 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 <span class=\"text-red-500\">*</span> </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) <span class=\"text-red-500\">*</span></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 <span class=\"text-red-500\">*</span></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 <span class=\"text-red-500\">*</span></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 <span class=\"text-red-500\">*</span></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]=\"getFileUploadAcceptString()\" \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 ?? 0\" \r\n [showValue]=\"false\" \r\n styleClass=\"h-1/2rem md:ml-auto relative\"\r\n [ngClass]=\"{ 'exceeded-progress-bar': (uploadedFile.progress ?? 0) > 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 });
3321
3365
  }
3322
3366
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentUploadComponent, decorators: [{
3323
3367
  type: Component,
3324
- 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 <span class=\"text-red-500\">*</span> </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) <span class=\"text-red-500\">*</span></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 <span class=\"text-red-500\">*</span></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 <span class=\"text-red-500\">*</span></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 <span class=\"text-red-500\">*</span></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 ?? 0\" \r\n [showValue]=\"false\" \r\n styleClass=\"h-1/2rem md:ml-auto relative\"\r\n [ngClass]=\"{ 'exceeded-progress-bar': (uploadedFile.progress ?? 0) > 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"] }]
3368
+ 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 <span class=\"text-red-500\">*</span> </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) <span class=\"text-red-500\">*</span></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 <span class=\"text-red-500\">*</span></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 <span class=\"text-red-500\">*</span></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 <span class=\"text-red-500\">*</span></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]=\"getFileUploadAcceptString()\" \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 ?? 0\" \r\n [showValue]=\"false\" \r\n styleClass=\"h-1/2rem md:ml-auto relative\"\r\n [ngClass]=\"{ 'exceeded-progress-bar': (uploadedFile.progress ?? 0) > 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"] }]
3325
3369
  }], ctorParameters: () => [{ type: DocumentUploadService }, { type: DocumentService }, { type: i3.PrimeNGConfig }, { type: FileFormatService }, { type: i3.MessageService }, { type: i0.ChangeDetectorRef }, { type: DocumentUploadBusinessService }, { type: DocumentUploadFormService }, { type: DocumentUploadDataService }], propDecorators: { contextId: [{
3326
3370
  type: Input
3327
3371
  }], fileUploader: [{
@@ -3389,67 +3433,11 @@ class ConfirmationDialogComponent {
3389
3433
  }
3390
3434
  }
3391
3435
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ConfirmationDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3392
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ConfirmationDialogComponent, isStandalone: false, selector: "app-confirmation-dialog", inputs: { confirmationOptions: "confirmationOptions" }, ngImport: i0, template: `
3393
- <div *ngIf="isVisible" class="custom-confirmation-overlay">
3394
- <div class="custom-confirmation-dialog">
3395
- <div class="dialog-header">
3396
- <i *ngIf="currentOptions.icon" [class]="currentOptions.icon"></i>
3397
- <h3>{{ currentOptions.header }}</h3>
3398
- </div>
3399
- <div class="dialog-content">
3400
- <p>{{ currentOptions.message }}</p>
3401
- </div>
3402
- <div class="dialog-actions">
3403
- <button
3404
- type="button"
3405
- class="btn btn-secondary"
3406
- (click)="onReject()">
3407
- <i *ngIf="currentOptions.rejectIcon" [class]="currentOptions.rejectIcon"></i>
3408
- {{ currentOptions.rejectLabel }}
3409
- </button>
3410
- <button
3411
- type="button"
3412
- [class]="'btn ' + currentOptions.acceptButtonClass"
3413
- (click)="onAccept()">
3414
- <i *ngIf="currentOptions.acceptIcon" [class]="currentOptions.acceptIcon"></i>
3415
- {{ currentOptions.acceptLabel }}
3416
- </button>
3417
- </div>
3418
- </div>
3419
- </div>
3420
- `, isInline: true, styles: [".custom-confirmation-overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:10001}.custom-confirmation-dialog{background:#fff;border-radius:8px;padding:1.5rem;max-width:400px;width:90%;box-shadow:0 4px 20px #00000026}.dialog-header{display:flex;align-items:center;gap:.5rem;margin-bottom:1rem;padding-bottom:1rem;border-bottom:1px solid #e9ecef}.dialog-header h3{margin:0;font-size:1.25rem;font-weight:600}.dialog-content{margin-bottom:1.5rem}.dialog-content p{margin:0;color:#495057;line-height:1.5}.dialog-actions{display:flex;gap:.75rem;justify-content:flex-end}.btn{padding:.5rem 1rem;border:none;border-radius:4px;cursor:pointer;font-size:.875rem;font-weight:500;display:flex;align-items:center;gap:.5rem;transition:all .2s ease}.btn:hover{transform:translateY(-1px);box-shadow:0 2px 8px #00000026}.btn-secondary{background-color:#6c757d;color:#fff}.btn-secondary:hover{background-color:#5a6268}.btn-success{background-color:#28a745;color:#fff}.btn-success:hover{background-color:#218838}.btn-danger{background-color:#dc3545;color:#fff}.btn-danger:hover{background-color:#c82333}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3436
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ConfirmationDialogComponent, isStandalone: false, selector: "app-confirmation-dialog", inputs: { confirmationOptions: "confirmationOptions" }, ngImport: i0, template: "<div *ngIf=\"isVisible\" class=\"custom-confirmation-overlay\">\r\n <div class=\"custom-confirmation-dialog\">\r\n <div class=\"dialog-header\">\r\n <i *ngIf=\"currentOptions.icon\" [class]=\"currentOptions.icon\"></i>\r\n <h3>{{ currentOptions.header }}</h3>\r\n </div>\r\n <div class=\"dialog-content\">\r\n <p>{{ currentOptions.message }}</p>\r\n </div>\r\n <div class=\"dialog-actions\">\r\n <button \r\n type=\"button\" \r\n pButton\r\n class=\"btn btn-secondary\"\r\n (click)=\"onReject()\">\r\n <i *ngIf=\"currentOptions.rejectIcon\" [class]=\"currentOptions.rejectIcon\"></i>\r\n {{ currentOptions.rejectLabel }}\r\n </button>\r\n <button \r\n type=\"button\" \r\n pButton\r\n [class]=\"'btn ' + currentOptions.acceptButtonClass\"\r\n (click)=\"onAccept()\">\r\n <i *ngIf=\"currentOptions.acceptIcon\" [class]=\"currentOptions.acceptIcon\"></i>\r\n {{ currentOptions.acceptLabel }}\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".custom-confirmation-overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:10001}.custom-confirmation-dialog{background:#fff;border-radius:8px;padding:1.5rem;max-width:400px;width:90%;box-shadow:0 4px 20px #00000026}.dialog-header{display:flex;align-items:center;gap:.5rem;margin-bottom:1rem;padding-bottom:1rem;border-bottom:1px solid #e9ecef}.dialog-header h3{margin:0;font-size:1.25rem;font-weight:600}.dialog-content{margin-bottom:1.5rem}.dialog-content p{margin:0;color:#495057;line-height:1.5}.dialog-actions{display:flex;gap:.75rem;justify-content:flex-end}.btn{padding:.5rem 1rem;border:none;border-radius:4px;cursor:pointer;font-size:.875rem;font-weight:500;display:flex;align-items:center;gap:.5rem;transition:all .2s ease}.btn:hover{transform:translateY(-1px);box-shadow:0 2px 8px #00000026}.btn-secondary{background-color:#6c757d;color:#fff}.btn-secondary:hover{background-color:#5a6268}.btn-success{background-color:#28a745;color:#fff}.btn-success:hover{background-color:#218838}.btn-danger{background-color:#dc3545;color:#fff}.btn-danger:hover{background-color:#c82333}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }] });
3421
3437
  }
3422
3438
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{
3423
3439
  type: Component,
3424
- args: [{ selector: 'app-confirmation-dialog', template: `
3425
- <div *ngIf="isVisible" class="custom-confirmation-overlay">
3426
- <div class="custom-confirmation-dialog">
3427
- <div class="dialog-header">
3428
- <i *ngIf="currentOptions.icon" [class]="currentOptions.icon"></i>
3429
- <h3>{{ currentOptions.header }}</h3>
3430
- </div>
3431
- <div class="dialog-content">
3432
- <p>{{ currentOptions.message }}</p>
3433
- </div>
3434
- <div class="dialog-actions">
3435
- <button
3436
- type="button"
3437
- class="btn btn-secondary"
3438
- (click)="onReject()">
3439
- <i *ngIf="currentOptions.rejectIcon" [class]="currentOptions.rejectIcon"></i>
3440
- {{ currentOptions.rejectLabel }}
3441
- </button>
3442
- <button
3443
- type="button"
3444
- [class]="'btn ' + currentOptions.acceptButtonClass"
3445
- (click)="onAccept()">
3446
- <i *ngIf="currentOptions.acceptIcon" [class]="currentOptions.acceptIcon"></i>
3447
- {{ currentOptions.acceptLabel }}
3448
- </button>
3449
- </div>
3450
- </div>
3451
- </div>
3452
- `, standalone: false, styles: [".custom-confirmation-overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:10001}.custom-confirmation-dialog{background:#fff;border-radius:8px;padding:1.5rem;max-width:400px;width:90%;box-shadow:0 4px 20px #00000026}.dialog-header{display:flex;align-items:center;gap:.5rem;margin-bottom:1rem;padding-bottom:1rem;border-bottom:1px solid #e9ecef}.dialog-header h3{margin:0;font-size:1.25rem;font-weight:600}.dialog-content{margin-bottom:1.5rem}.dialog-content p{margin:0;color:#495057;line-height:1.5}.dialog-actions{display:flex;gap:.75rem;justify-content:flex-end}.btn{padding:.5rem 1rem;border:none;border-radius:4px;cursor:pointer;font-size:.875rem;font-weight:500;display:flex;align-items:center;gap:.5rem;transition:all .2s ease}.btn:hover{transform:translateY(-1px);box-shadow:0 2px 8px #00000026}.btn-secondary{background-color:#6c757d;color:#fff}.btn-secondary:hover{background-color:#5a6268}.btn-success{background-color:#28a745;color:#fff}.btn-success:hover{background-color:#218838}.btn-danger{background-color:#dc3545;color:#fff}.btn-danger:hover{background-color:#c82333}\n"] }]
3440
+ args: [{ selector: 'app-confirmation-dialog', standalone: false, template: "<div *ngIf=\"isVisible\" class=\"custom-confirmation-overlay\">\r\n <div class=\"custom-confirmation-dialog\">\r\n <div class=\"dialog-header\">\r\n <i *ngIf=\"currentOptions.icon\" [class]=\"currentOptions.icon\"></i>\r\n <h3>{{ currentOptions.header }}</h3>\r\n </div>\r\n <div class=\"dialog-content\">\r\n <p>{{ currentOptions.message }}</p>\r\n </div>\r\n <div class=\"dialog-actions\">\r\n <button \r\n type=\"button\" \r\n pButton\r\n class=\"btn btn-secondary\"\r\n (click)=\"onReject()\">\r\n <i *ngIf=\"currentOptions.rejectIcon\" [class]=\"currentOptions.rejectIcon\"></i>\r\n {{ currentOptions.rejectLabel }}\r\n </button>\r\n <button \r\n type=\"button\" \r\n pButton\r\n [class]=\"'btn ' + currentOptions.acceptButtonClass\"\r\n (click)=\"onAccept()\">\r\n <i *ngIf=\"currentOptions.acceptIcon\" [class]=\"currentOptions.acceptIcon\"></i>\r\n {{ currentOptions.acceptLabel }}\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".custom-confirmation-overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:10001}.custom-confirmation-dialog{background:#fff;border-radius:8px;padding:1.5rem;max-width:400px;width:90%;box-shadow:0 4px 20px #00000026}.dialog-header{display:flex;align-items:center;gap:.5rem;margin-bottom:1rem;padding-bottom:1rem;border-bottom:1px solid #e9ecef}.dialog-header h3{margin:0;font-size:1.25rem;font-weight:600}.dialog-content{margin-bottom:1.5rem}.dialog-content p{margin:0;color:#495057;line-height:1.5}.dialog-actions{display:flex;gap:.75rem;justify-content:flex-end}.btn{padding:.5rem 1rem;border:none;border-radius:4px;cursor:pointer;font-size:.875rem;font-weight:500;display:flex;align-items:center;gap:.5rem;transition:all .2s ease}.btn:hover{transform:translateY(-1px);box-shadow:0 2px 8px #00000026}.btn-secondary{background-color:#6c757d;color:#fff}.btn-secondary:hover{background-color:#5a6268}.btn-success{background-color:#28a745;color:#fff}.btn-success:hover{background-color:#218838}.btn-danger{background-color:#dc3545;color:#fff}.btn-danger:hover{background-color:#c82333}\n"] }]
3453
3441
  }], propDecorators: { confirmationOptions: [{
3454
3442
  type: Input
3455
3443
  }] } });
@@ -3679,11 +3667,11 @@ class SidebarComponent {
3679
3667
  this.destroy$.complete();
3680
3668
  }
3681
3669
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3682
- 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", hasUnsavedChanges: "hasUnsavedChanges" }, outputs: { visibleChange: "visibleChange", onShow: "onShow", onHide: "onHide", onSave: "onSave", onDiscardChanges: "onDiscardChanges" }, host: { listeners: { "document:keydown.escape": "onEscapeKey($event)" } }, viewQueries: [{ propertyName: "confirmationDialog", first: true, predicate: ["confirmationDialog"], descendants: true }], ngImport: i0, template: "<!-- Custom backdrop for better control over outside clicks -->\n<div \n *ngIf=\"visible\" \n class=\"custom-sidebar-backdrop\" \n (click)=\"onBackdropClick($event)\"\n></div>\n\n<p-sidebar \n [(visible)]=\"visible\"\n [position]=\"position\"\n [style]=\"{width: width}\"\n [modal]=\"false\"\n [dismissible]=\"false\"\n [closeOnEscape]=\"false\"\n [showCloseIcon]=\"false\"\n [baseZIndex]=\"baseZIndex\"\n [autoZIndex]=\"autoZIndex\"\n [styleClass]=\"styleClass\"\n [appendTo]=\"appendTo\"\n [blockScroll]=\"blockScroll\"\n (visibleChange)=\"onVisibleChange($event)\"\n (onShow)=\"onShow.emit()\"\n (onHide)=\"onSidebarHide()\"\n>\n <ng-template pTemplate=\"header\" *ngIf=\"title || showCloseButton || showSaveButton\">\n <div class=\"sidebar-header\">\n <h3 *ngIf=\"title\" class=\"sidebar-title\">{{ title }}</h3>\n <div class=\"header-content\">\n <ng-content select=\"[header]\"></ng-content>\n \n <p-messages \n *ngIf=\"showSuccessMessage\"\n severity=\"success\"\n [closable]=\"false\"\n [style]=\"{'margin-bottom': '0.5rem'}\"\n class=\"ml-3\"\n >\n <ng-template pTemplate=\"message\">\n <span>{{ successMessage }}</span>\n </ng-template>\n </p-messages>\n <p-messages \n *ngIf=\"showErrorMessage\"\n severity=\"error\"\n [closable]=\"false\"\n [style]=\"{'margin-bottom': '0.5rem'}\"\n class=\"ml-3\"\n >\n <ng-template pTemplate=\"message\">\n <span>{{ errorMessage }}</span>\n </ng-template>\n </p-messages>\n\n <div class=\"header-actions mr-3\">\n <button \n *ngIf=\"showSaveButton\"\n pButton \n type=\"button\" \n [label]=\"saveButtonText\"\n [disabled]=\"saveButtonDisabled\"\n class=\"p-button-primary\"\n (click)=\"onSave.emit()\"\n ></button>\n\n <button \n *ngIf=\"showCloseButton\"\n pButton \n type=\"button\" \n icon=\"pi pi-times\"\n class=\"p-button-text p-button-rounded\"\n (click)=\"onCloseButtonClick()\"\n ></button>\n \n </div>\n </div>\n </div>\n </ng-template>\n\n <ng-template pTemplate=\"content\">\n <div class=\"sidebar-content\">\n <ng-content></ng-content>\n </div>\n </ng-template>\n</p-sidebar>\n\n<!-- Custom confirmation dialog for unsaved changes -->\n<app-confirmation-dialog \n #confirmationDialog\n [confirmationOptions]=\"unsavedChangesConfirmationOptions\">\n</app-confirmation-dialog>\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}.custom-sidebar-backdrop{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#0006;z-index:9999;cursor:pointer}::ng-deep .p-sidebar{z-index:10000!important}::ng-deep .p-confirm-dialog{z-index:10001!important}::ng-deep .p-dialog-mask{z-index:10000!important}::ng-deep .p-confirm-dialog-mask{z-index:10000!important}.header-actions .p-button-text.p-button-rounded{width:2rem;height:2rem;border-radius:50%}.header-actions .p-button-text.p-button-rounded:hover{background-color:#0000001a}::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"] }, { kind: "component", type: ConfirmationDialogComponent, selector: "app-confirmation-dialog", inputs: ["confirmationOptions"] }] });
3670
+ 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", hasUnsavedChanges: "hasUnsavedChanges" }, outputs: { visibleChange: "visibleChange", onShow: "onShow", onHide: "onHide", onSave: "onSave", onDiscardChanges: "onDiscardChanges" }, host: { listeners: { "document:keydown.escape": "onEscapeKey($event)" } }, viewQueries: [{ propertyName: "confirmationDialog", first: true, predicate: ["confirmationDialog"], descendants: true }], ngImport: i0, template: "<!-- Custom backdrop for better control over outside clicks -->\r\n<div \r\n *ngIf=\"visible\" \r\n class=\"custom-sidebar-backdrop\" \r\n (click)=\"onBackdropClick($event)\"\r\n></div>\r\n\r\n<p-sidebar \r\n [(visible)]=\"visible\"\r\n [position]=\"position\"\r\n [style]=\"{width: width}\"\r\n [modal]=\"false\"\r\n [dismissible]=\"false\"\r\n [closeOnEscape]=\"false\"\r\n [showCloseIcon]=\"false\"\r\n [baseZIndex]=\"baseZIndex\"\r\n [autoZIndex]=\"autoZIndex\"\r\n [styleClass]=\"styleClass\"\r\n [appendTo]=\"appendTo\"\r\n [blockScroll]=\"blockScroll\"\r\n (visibleChange)=\"onVisibleChange($event)\"\r\n (onShow)=\"onShow.emit()\"\r\n (onHide)=\"onSidebarHide()\"\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 <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\r\n <button \r\n *ngIf=\"showCloseButton\"\r\n pButton \r\n type=\"button\" \r\n icon=\"pi pi-times\"\r\n class=\"p-button-text p-button-rounded\"\r\n (click)=\"onCloseButtonClick()\"\r\n ></button>\r\n \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\r\n<!-- Custom confirmation dialog for unsaved changes -->\r\n<app-confirmation-dialog \r\n #confirmationDialog\r\n [confirmationOptions]=\"unsavedChangesConfirmationOptions\">\r\n</app-confirmation-dialog>\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}.custom-sidebar-backdrop{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#0006;z-index:9999;cursor:pointer}::ng-deep .p-sidebar{z-index:10000!important}::ng-deep .p-confirm-dialog{z-index:10001!important}::ng-deep .p-dialog-mask{z-index:10000!important}::ng-deep .p-confirm-dialog-mask{z-index:10000!important}.header-actions .p-button-text.p-button-rounded{width:2rem;height:2rem;border-radius:50%}.header-actions .p-button-text.p-button-rounded:hover{background-color:#0000001a}::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"] }, { kind: "component", type: ConfirmationDialogComponent, selector: "app-confirmation-dialog", inputs: ["confirmationOptions"] }] });
3683
3671
  }
3684
3672
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SidebarComponent, decorators: [{
3685
3673
  type: Component,
3686
- args: [{ selector: 'lib-sidebar', standalone: false, template: "<!-- Custom backdrop for better control over outside clicks -->\n<div \n *ngIf=\"visible\" \n class=\"custom-sidebar-backdrop\" \n (click)=\"onBackdropClick($event)\"\n></div>\n\n<p-sidebar \n [(visible)]=\"visible\"\n [position]=\"position\"\n [style]=\"{width: width}\"\n [modal]=\"false\"\n [dismissible]=\"false\"\n [closeOnEscape]=\"false\"\n [showCloseIcon]=\"false\"\n [baseZIndex]=\"baseZIndex\"\n [autoZIndex]=\"autoZIndex\"\n [styleClass]=\"styleClass\"\n [appendTo]=\"appendTo\"\n [blockScroll]=\"blockScroll\"\n (visibleChange)=\"onVisibleChange($event)\"\n (onShow)=\"onShow.emit()\"\n (onHide)=\"onSidebarHide()\"\n>\n <ng-template pTemplate=\"header\" *ngIf=\"title || showCloseButton || showSaveButton\">\n <div class=\"sidebar-header\">\n <h3 *ngIf=\"title\" class=\"sidebar-title\">{{ title }}</h3>\n <div class=\"header-content\">\n <ng-content select=\"[header]\"></ng-content>\n \n <p-messages \n *ngIf=\"showSuccessMessage\"\n severity=\"success\"\n [closable]=\"false\"\n [style]=\"{'margin-bottom': '0.5rem'}\"\n class=\"ml-3\"\n >\n <ng-template pTemplate=\"message\">\n <span>{{ successMessage }}</span>\n </ng-template>\n </p-messages>\n <p-messages \n *ngIf=\"showErrorMessage\"\n severity=\"error\"\n [closable]=\"false\"\n [style]=\"{'margin-bottom': '0.5rem'}\"\n class=\"ml-3\"\n >\n <ng-template pTemplate=\"message\">\n <span>{{ errorMessage }}</span>\n </ng-template>\n </p-messages>\n\n <div class=\"header-actions mr-3\">\n <button \n *ngIf=\"showSaveButton\"\n pButton \n type=\"button\" \n [label]=\"saveButtonText\"\n [disabled]=\"saveButtonDisabled\"\n class=\"p-button-primary\"\n (click)=\"onSave.emit()\"\n ></button>\n\n <button \n *ngIf=\"showCloseButton\"\n pButton \n type=\"button\" \n icon=\"pi pi-times\"\n class=\"p-button-text p-button-rounded\"\n (click)=\"onCloseButtonClick()\"\n ></button>\n \n </div>\n </div>\n </div>\n </ng-template>\n\n <ng-template pTemplate=\"content\">\n <div class=\"sidebar-content\">\n <ng-content></ng-content>\n </div>\n </ng-template>\n</p-sidebar>\n\n<!-- Custom confirmation dialog for unsaved changes -->\n<app-confirmation-dialog \n #confirmationDialog\n [confirmationOptions]=\"unsavedChangesConfirmationOptions\">\n</app-confirmation-dialog>\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}.custom-sidebar-backdrop{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#0006;z-index:9999;cursor:pointer}::ng-deep .p-sidebar{z-index:10000!important}::ng-deep .p-confirm-dialog{z-index:10001!important}::ng-deep .p-dialog-mask{z-index:10000!important}::ng-deep .p-confirm-dialog-mask{z-index:10000!important}.header-actions .p-button-text.p-button-rounded{width:2rem;height:2rem;border-radius:50%}.header-actions .p-button-text.p-button-rounded:hover{background-color:#0000001a}::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"] }]
3674
+ args: [{ selector: 'lib-sidebar', standalone: false, template: "<!-- Custom backdrop for better control over outside clicks -->\r\n<div \r\n *ngIf=\"visible\" \r\n class=\"custom-sidebar-backdrop\" \r\n (click)=\"onBackdropClick($event)\"\r\n></div>\r\n\r\n<p-sidebar \r\n [(visible)]=\"visible\"\r\n [position]=\"position\"\r\n [style]=\"{width: width}\"\r\n [modal]=\"false\"\r\n [dismissible]=\"false\"\r\n [closeOnEscape]=\"false\"\r\n [showCloseIcon]=\"false\"\r\n [baseZIndex]=\"baseZIndex\"\r\n [autoZIndex]=\"autoZIndex\"\r\n [styleClass]=\"styleClass\"\r\n [appendTo]=\"appendTo\"\r\n [blockScroll]=\"blockScroll\"\r\n (visibleChange)=\"onVisibleChange($event)\"\r\n (onShow)=\"onShow.emit()\"\r\n (onHide)=\"onSidebarHide()\"\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 <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\r\n <button \r\n *ngIf=\"showCloseButton\"\r\n pButton \r\n type=\"button\" \r\n icon=\"pi pi-times\"\r\n class=\"p-button-text p-button-rounded\"\r\n (click)=\"onCloseButtonClick()\"\r\n ></button>\r\n \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\r\n<!-- Custom confirmation dialog for unsaved changes -->\r\n<app-confirmation-dialog \r\n #confirmationDialog\r\n [confirmationOptions]=\"unsavedChangesConfirmationOptions\">\r\n</app-confirmation-dialog>\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}.custom-sidebar-backdrop{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#0006;z-index:9999;cursor:pointer}::ng-deep .p-sidebar{z-index:10000!important}::ng-deep .p-confirm-dialog{z-index:10001!important}::ng-deep .p-dialog-mask{z-index:10000!important}::ng-deep .p-confirm-dialog-mask{z-index:10000!important}.header-actions .p-button-text.p-button-rounded{width:2rem;height:2rem;border-radius:50%}.header-actions .p-button-text.p-button-rounded:hover{background-color:#0000001a}::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"] }]
3687
3675
  }], ctorParameters: () => [], propDecorators: { confirmationDialog: [{
3688
3676
  type: ViewChild,
3689
3677
  args: ['confirmationDialog']
@@ -7420,15 +7408,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
7420
7408
 
7421
7409
  /*
7422
7410
  * Public API Surface of cat-document-lib
7423
- *
7424
- * IMPORTANT: To ensure proper z-index values and prevent confirmation dialog visibility issues,
7425
- * import the global styles in your host project:
7426
- *
7427
- * Option 1: In your styles.scss
7428
- * @import '~cat-document-lib/lib/styles.scss';
7429
- *
7430
- * Option 2: In your angular.json
7431
- * "styles": ["node_modules/cat-document-lib/lib/styles.scss"]
7432
7411
  */
7433
7412
 
7434
7413
  /**