cat-documents-ng 0.2.88 → 0.2.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -320,3 +320,102 @@ folderBlocks: Data sourced from FOLDERPANEL for folder blocks.
320
320
 
321
321
  ## Additional Resources
322
322
  For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
323
+
324
+ ## Troubleshooting
325
+
326
+ ### Confirmation Dialog Not Visible
327
+
328
+ If you experience issues where confirmation dialogs are not visible when the library is installed in your project, this is likely due to z-index conflicts. Here are the solutions:
329
+
330
+ #### Solution 1: Import Global Styles
331
+
332
+ Import the library's global styles in your main `styles.scss` or `angular.json`:
333
+
334
+ ```scss
335
+ // In your styles.scss
336
+ @import '~cat-document-lib/lib/styles.scss';
337
+ ```
338
+
339
+ #### Solution 2: Configure Z-Index in angular.json
340
+
341
+ Add the library's styles to your `angular.json` file:
342
+
343
+ ```json
344
+ {
345
+ "projects": {
346
+ "your-project": {
347
+ "architect": {
348
+ "build": {
349
+ "options": {
350
+ "styles": [
351
+ "src/styles.scss",
352
+ "node_modules/cat-document-lib/lib/styles.scss"
353
+ ]
354
+ }
355
+ }
356
+ }
357
+ }
358
+ }
359
+ }
360
+ ```
361
+
362
+ #### Solution 3: Override Z-Index in Host Project
363
+
364
+ If the above solutions don't work, you can override the z-index values in your host project's CSS:
365
+
366
+ ```scss
367
+ /* Ensure confirmation dialogs are visible */
368
+ .p-confirm-dialog {
369
+ z-index: 10001 !important;
370
+ }
371
+
372
+ .p-dialog-mask {
373
+ z-index: 10000 !important;
374
+ }
375
+
376
+ .p-sidebar {
377
+ z-index: 10000 !important;
378
+ }
379
+ ```
380
+
381
+ #### Solution 4: Use Higher Base Z-Index
382
+
383
+ When using the sidebar component, you can specify a higher base z-index:
384
+
385
+ ```html
386
+ <lib-sidebar
387
+ [baseZIndex]="20000"
388
+ [autoZIndex]="false">
389
+ <!-- content -->
390
+ </lib-sidebar>
391
+ ```
392
+
393
+ ### Common Issues
394
+
395
+ 1. **Dialog appears behind other elements**: This is usually a z-index issue. Use Solution 1 or 2 above.
396
+ 2. **Sidebar not visible**: Check if the `visible` property is properly bound and the component is not hidden by CSS.
397
+ 3. **Confirmation dialog not showing**: Ensure PrimeNG's ConfirmationService is properly configured in your app.
398
+
399
+ ## API Reference
400
+
401
+ ### SidebarComponent
402
+
403
+ The main sidebar component with the following inputs:
404
+
405
+ - `visible`: Boolean to control sidebar visibility
406
+ - `position`: 'left' | 'right' - Sidebar position
407
+ - `width`: String for sidebar width
408
+ - `baseZIndex`: Number for z-index (default: 10000)
409
+ - `autoZIndex`: Boolean to auto-manage z-index (default: false)
410
+
411
+ ## Contributing
412
+
413
+ 1. Fork the repository
414
+ 2. Create a feature branch
415
+ 3. Make your changes
416
+ 4. Add tests
417
+ 5. Submit a pull request
418
+
419
+ ## License
420
+
421
+ This project is licensed under the MIT License.
@@ -1313,7 +1313,7 @@ class DocumentService {
1313
1313
  * @returns {Observable<any>} Observable that emits the newly created document.
1314
1314
  */
1315
1315
  create(entity) {
1316
- const headers = { 'Authorization': 'Bearer f193f6cf-cab3-4459-a875-dc832d8d777d' };
1316
+ const headers = { 'Authorization': 'Bearer a79cbca8-164c-4ec3-991d-0efb441ff126' };
1317
1317
  return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, entity, { headers }).pipe(tap((newEntity) => this.documentStore.add(newEntity)));
1318
1318
  }
1319
1319
  /**
@@ -1718,7 +1718,7 @@ class DocumentHttpService {
1718
1718
  * @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
1719
1719
  */
1720
1720
  getDocumentCatagories(contextId) {
1721
- let headers = new HttpHeaders({ Authorization: `Bearer f193f6cf-cab3-4459-a875-dc832d8d777d` });
1721
+ let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1722
1722
  return this.http.get(`${this.apiUrl}${URLS.DOCUMENTS_CATAGORIES}/${contextId}`, { headers }).pipe(tap((response) => {
1723
1723
  // Store only the categories array, not the entire response
1724
1724
  if (response && response.categories) {
@@ -1777,7 +1777,7 @@ class DocumentHttpService {
1777
1777
  * @returns {Observable<DocumentModel>} An observable that emits the updated DocumentModel.
1778
1778
  */
1779
1779
  updateDocumentName(documentId, payload) {
1780
- let headers = new HttpHeaders({ Authorization: `Bearer f193f6cf-cab3-4459-a875-dc832d8d777d` });
1780
+ let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1781
1781
  return this.http.put(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD}/${documentId}`, payload, { headers }).pipe(catchError((error) => {
1782
1782
  return throwError(() => new Error(error));
1783
1783
  }));
@@ -1790,7 +1790,7 @@ class DocumentHttpService {
1790
1790
  getUserListByContextId(contextId) {
1791
1791
  if (!contextId)
1792
1792
  return EMPTY;
1793
- let headers = new HttpHeaders({ Authorization: `Bearer f193f6cf-cab3-4459-a875-dc832d8d777d` });
1793
+ let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1794
1794
  return this.http.get(`${this.apiUrl}${URLS.USERLIST}${contextId}`, { headers }).pipe(tap((userList) => {
1795
1795
  this.documentStore.setUserList(userList);
1796
1796
  }), catchError((error) => {
@@ -1816,7 +1816,7 @@ class DocumentHttpService {
1816
1816
  if (categoryId) {
1817
1817
  params = params.set(SHARED.CATEGORY, categoryId);
1818
1818
  }
1819
- let headers = new HttpHeaders({ Authorization: `Bearer f193f6cf-cab3-4459-a875-dc832d8d777d` });
1819
+ let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1820
1820
  return this.http.get(url, { params, headers }).pipe(tap((statusData) => {
1821
1821
  this.documentStore.setStatusData(statusData);
1822
1822
  }), catchError((error) => {
@@ -1847,7 +1847,7 @@ class DocumentHttpService {
1847
1847
  if (searchKey) {
1848
1848
  params = params.set(SHARED.SEARCH_KEY, searchKey);
1849
1849
  }
1850
- let headers = new HttpHeaders({ Authorization: `Bearer f193f6cf-cab3-4459-a875-dc832d8d777d` });
1850
+ let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1851
1851
  return this.http.get(`${this.apiUrl}${URLS.GETALL}/${contextId}`, { params, headers }).pipe(tap((response) => {
1852
1852
  if (response.documents) {
1853
1853
  this.documentStore.setDocumentList(response.documents);
@@ -1860,7 +1860,7 @@ class DocumentHttpService {
1860
1860
  if (!documentId) {
1861
1861
  return of([]);
1862
1862
  }
1863
- let headers = new HttpHeaders({ Authorization: `Bearer f193f6cf-cab3-4459-a875-dc832d8d777d` });
1863
+ let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1864
1864
  return this.http.get(`${this.apiUrl}${URLS.DOCUMENT_HISTORY}${documentId}`, { headers });
1865
1865
  }
1866
1866
  /**
@@ -1871,7 +1871,7 @@ class DocumentHttpService {
1871
1871
  getCategoriesBySource(source) {
1872
1872
  if (!source)
1873
1873
  return EMPTY;
1874
- let headers = new HttpHeaders({ Authorization: `Bearer f193f6cf-cab3-4459-a875-dc832d8d777d` });
1874
+ let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1875
1875
  return this.http.get(`${this.apiUrl}${URLS.GET_CATEGORIES_BY_SOURCE}${source}`, { headers }).pipe(catchError((error) => {
1876
1876
  return throwError(() => new Error(error));
1877
1877
  }));
@@ -1884,7 +1884,7 @@ class DocumentHttpService {
1884
1884
  getDocumentTypesByCategory(categoryId) {
1885
1885
  if (!categoryId)
1886
1886
  return EMPTY;
1887
- let headers = new HttpHeaders({ Authorization: `Bearer f193f6cf-cab3-4459-a875-dc832d8d777d` });
1887
+ let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1888
1888
  return this.http.get(`${this.apiUrl}${URLS.GET_DOCUMENT_TYPES_BY_CATEGORY}${categoryId}`, { headers }).pipe(catchError((error) => {
1889
1889
  return throwError(() => new Error(error));
1890
1890
  }));
@@ -1895,7 +1895,7 @@ class DocumentHttpService {
1895
1895
  * @returns {Observable<any>} Observable that emits the upload response.
1896
1896
  */
1897
1897
  uploadFile(formData) {
1898
- let headers = new HttpHeaders({ Authorization: `Bearer f193f6cf-cab3-4459-a875-dc832d8d777d` });
1898
+ let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1899
1899
  return this.http.post(`${this.apiUrl}${URLS.DOCUMENT_UPLOAD_FILE}`, formData, { headers }).pipe(catchError((error) => {
1900
1900
  return throwError(() => new Error(error));
1901
1901
  }));
@@ -1906,7 +1906,7 @@ class DocumentHttpService {
1906
1906
  * @returns {Observable<any>} Observable that emits the save response.
1907
1907
  */
1908
1908
  saveDocumentUpload(payload) {
1909
- let headers = new HttpHeaders({ Authorization: `Bearer f193f6cf-cab3-4459-a875-dc832d8d777d` });
1909
+ let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1910
1910
  return this.http.post(`${this.apiUrl}${URLS.SAVE_DOCUMENT_UPLOAD}`, payload, { headers }).pipe(catchError((error) => {
1911
1911
  return throwError(() => new Error(error));
1912
1912
  }));
@@ -1922,7 +1922,7 @@ class DocumentHttpService {
1922
1922
  const payload = {
1923
1923
  statusUpdateDescription: statusUpdateDescription
1924
1924
  };
1925
- let headers = new HttpHeaders({ Authorization: `Bearer f193f6cf-cab3-4459-a875-dc832d8d777d` });
1925
+ let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1926
1926
  return this.http.put(`${this.apiUrl}${URLS.UPDATE_DOCUMENT_STATUS}${documentId}/${status}`, payload, { headers }).pipe(tap((response) => {
1927
1927
  if (response && response.status) {
1928
1928
  const normalizedStatus = this.normalizeStatus(response.status);
@@ -1956,7 +1956,7 @@ class DocumentHttpService {
1956
1956
  * @returns {Observable<any>} Observable that emits the delete response
1957
1957
  */
1958
1958
  deleteDocument(documentId, contextId) {
1959
- let headers = new HttpHeaders({ Authorization: `Bearer f193f6cf-cab3-4459-a875-dc832d8d777d` });
1959
+ let headers = new HttpHeaders({ Authorization: `Bearer a79cbca8-164c-4ec3-991d-0efb441ff126` });
1960
1960
  return this.http.delete(`${this.apiUrl}${URLS.DELETE_DOCUMENT}${documentId}`, { headers }).pipe(tap(() => {
1961
1961
  this.getDocumentCatagories(contextId).subscribe();
1962
1962
  this.getUserListByContextId(contextId).subscribe();
@@ -3352,8 +3352,8 @@ class SidebarComponent {
3352
3352
  modal = true;
3353
3353
  dismissible = true;
3354
3354
  closeOnEscape = true;
3355
- baseZIndex = SHARED.BASEZINDEX;
3356
- autoZIndex = true;
3355
+ baseZIndex = 10000;
3356
+ autoZIndex = false;
3357
3357
  styleClass = SHARED.EMPTY;
3358
3358
  appendTo = 'body';
3359
3359
  blockScroll = true;
@@ -3564,11 +3564,11 @@ class SidebarComponent {
3564
3564
  this.destroy$.complete();
3565
3565
  }
3566
3566
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SidebarComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
3567
- 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)" } }, 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", 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:999;cursor:pointer}::ng-deep .p-sidebar{z-index:1000!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"] }] });
3567
+ 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)" } }, 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", 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"] }] });
3568
3568
  }
3569
3569
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SidebarComponent, decorators: [{
3570
3570
  type: Component,
3571
- 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", 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:999;cursor:pointer}::ng-deep .p-sidebar{z-index:1000!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"] }]
3571
+ 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", 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"] }]
3572
3572
  }], ctorParameters: () => [{ type: i0.Injector }], propDecorators: { visible: [{
3573
3573
  type: Input
3574
3574
  }], position: [{
@@ -7381,6 +7381,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
7381
7381
 
7382
7382
  /*
7383
7383
  * Public API Surface of cat-document-lib
7384
+ *
7385
+ * IMPORTANT: To ensure proper z-index values and prevent confirmation dialog visibility issues,
7386
+ * import the global styles in your host project:
7387
+ *
7388
+ * Option 1: In your styles.scss
7389
+ * @import '~cat-document-lib/lib/styles.scss';
7390
+ *
7391
+ * Option 2: In your angular.json
7392
+ * "styles": ["node_modules/cat-document-lib/lib/styles.scss"]
7384
7393
  */
7385
7394
 
7386
7395
  /**