cat-documents-ng 0.2.88 → 0.2.90
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 +99 -0
- package/Shared/components/confirmation-dialog/confirmation-dialog.component.d.ts +6 -3
- package/Shared/shared.module.d.ts +1 -2
- package/fesm2022/cat-documents-ng.mjs +183 -135
- package/fesm2022/cat-documents-ng.mjs.map +1 -1
- package/lib/document/components/sidebar/sidebar.component.d.ts +5 -4
- package/lib/document/document.module.d.ts +4 -3
- package/package.json +1 -1
- package/src/lib/styles.scss +23 -0
|
@@ -26,6 +26,7 @@ import { DropdownModule } from 'primeng/dropdown';
|
|
|
26
26
|
import * as i4$1 from 'primeng/sidebar';
|
|
27
27
|
import { SidebarModule } from 'primeng/sidebar';
|
|
28
28
|
import * as i5 from 'primeng/messages';
|
|
29
|
+
import { MessagesModule } from 'primeng/messages';
|
|
29
30
|
import * as i1 from '@angular/router';
|
|
30
31
|
import * as i7 from 'primeng/dialog';
|
|
31
32
|
import { DialogModule } from 'primeng/dialog';
|
|
@@ -39,8 +40,6 @@ import * as i6 from 'ng2-pdf-viewer';
|
|
|
39
40
|
import { PdfViewerModule } from 'ng2-pdf-viewer';
|
|
40
41
|
import * as i3$2 from 'primeng/accordion';
|
|
41
42
|
import { AccordionModule } from 'primeng/accordion';
|
|
42
|
-
import * as i2$3 from 'primeng/confirmdialog';
|
|
43
|
-
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
44
43
|
import * as i5$2 from 'primeng/inputtextarea';
|
|
45
44
|
import { InputTextareaModule } from 'primeng/inputtextarea';
|
|
46
45
|
import * as i8 from 'primeng/tooltip';
|
|
@@ -56,6 +55,7 @@ import { TimelineModule } from 'primeng/timeline';
|
|
|
56
55
|
import { CheckboxModule } from 'primeng/checkbox';
|
|
57
56
|
import { PanelMenuModule } from 'primeng/panelmenu';
|
|
58
57
|
import { ToastModule } from 'primeng/toast';
|
|
58
|
+
import { MessageModule } from 'primeng/message';
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* The `SHARED` class contains shared constants used across the application.
|
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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();
|
|
@@ -3333,8 +3333,129 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
3333
3333
|
type: Output
|
|
3334
3334
|
}] } });
|
|
3335
3335
|
|
|
3336
|
+
class ConfirmationDialogComponent {
|
|
3337
|
+
confirmationOptions = {
|
|
3338
|
+
message: 'Are you sure that you want to proceed?',
|
|
3339
|
+
header: 'Confirmation',
|
|
3340
|
+
icon: 'pi pi-exclamation-triangle',
|
|
3341
|
+
acceptLabel: 'Yes',
|
|
3342
|
+
rejectLabel: 'No',
|
|
3343
|
+
acceptIcon: 'pi pi-check',
|
|
3344
|
+
rejectIcon: 'pi pi-times',
|
|
3345
|
+
acceptButtonClass: 'btn-success',
|
|
3346
|
+
rejectButtonClass: 'btn-secondary'
|
|
3347
|
+
};
|
|
3348
|
+
isVisible = false;
|
|
3349
|
+
currentOptions = this.confirmationOptions;
|
|
3350
|
+
acceptCallback;
|
|
3351
|
+
rejectCallback;
|
|
3352
|
+
/**
|
|
3353
|
+
* Shows the confirmation dialog with the specified options
|
|
3354
|
+
* @param options - Configuration options for the confirmation dialog
|
|
3355
|
+
* @param acceptCallback - Function to execute when user accepts
|
|
3356
|
+
* @param rejectCallback - Function to execute when user rejects
|
|
3357
|
+
*/
|
|
3358
|
+
confirm(options, acceptCallback, rejectCallback) {
|
|
3359
|
+
this.currentOptions = { ...this.confirmationOptions, ...options };
|
|
3360
|
+
this.acceptCallback = acceptCallback;
|
|
3361
|
+
this.rejectCallback = rejectCallback;
|
|
3362
|
+
this.isVisible = true;
|
|
3363
|
+
}
|
|
3364
|
+
/**
|
|
3365
|
+
* Shows a delete confirmation dialog
|
|
3366
|
+
* @param itemName - Name of the item to be deleted
|
|
3367
|
+
* @param acceptCallback - Function to execute when user accepts deletion
|
|
3368
|
+
* @param rejectCallback - Function to execute when user rejects deletion
|
|
3369
|
+
*/
|
|
3370
|
+
confirmDelete(itemName, acceptCallback, rejectCallback) {
|
|
3371
|
+
this.confirm({
|
|
3372
|
+
message: `Are you sure you want to delete "${itemName}"?`,
|
|
3373
|
+
header: 'Delete Confirmation',
|
|
3374
|
+
acceptLabel: 'Delete',
|
|
3375
|
+
rejectLabel: 'Cancel',
|
|
3376
|
+
acceptButtonClass: 'btn-danger'
|
|
3377
|
+
}, acceptCallback, rejectCallback);
|
|
3378
|
+
}
|
|
3379
|
+
onAccept() {
|
|
3380
|
+
this.isVisible = false;
|
|
3381
|
+
if (this.acceptCallback) {
|
|
3382
|
+
this.acceptCallback();
|
|
3383
|
+
}
|
|
3384
|
+
}
|
|
3385
|
+
onReject() {
|
|
3386
|
+
this.isVisible = false;
|
|
3387
|
+
if (this.rejectCallback) {
|
|
3388
|
+
this.rejectCallback();
|
|
3389
|
+
}
|
|
3390
|
+
}
|
|
3391
|
+
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"] }] });
|
|
3421
|
+
}
|
|
3422
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{
|
|
3423
|
+
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"] }]
|
|
3453
|
+
}], propDecorators: { confirmationOptions: [{
|
|
3454
|
+
type: Input
|
|
3455
|
+
}] } });
|
|
3456
|
+
|
|
3336
3457
|
class SidebarComponent {
|
|
3337
|
-
|
|
3458
|
+
confirmationDialog;
|
|
3338
3459
|
// Add setter to log visible changes
|
|
3339
3460
|
set visible(value) {
|
|
3340
3461
|
this._visible = value;
|
|
@@ -3352,8 +3473,8 @@ class SidebarComponent {
|
|
|
3352
3473
|
modal = true;
|
|
3353
3474
|
dismissible = true;
|
|
3354
3475
|
closeOnEscape = true;
|
|
3355
|
-
baseZIndex =
|
|
3356
|
-
autoZIndex =
|
|
3476
|
+
baseZIndex = 10000;
|
|
3477
|
+
autoZIndex = false;
|
|
3357
3478
|
styleClass = SHARED.EMPTY;
|
|
3358
3479
|
appendTo = 'body';
|
|
3359
3480
|
blockScroll = true;
|
|
@@ -3372,17 +3493,24 @@ class SidebarComponent {
|
|
|
3372
3493
|
showSuccessMessage = false;
|
|
3373
3494
|
showErrorMessage = false;
|
|
3374
3495
|
destroy$ = new Subject();
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3496
|
+
// Confirmation options for unsaved changes
|
|
3497
|
+
unsavedChangesConfirmationOptions = {
|
|
3498
|
+
message: SHARED.UNSAVED_CHANGES_MESSAGE,
|
|
3499
|
+
header: SHARED.UNSAVED_CHANGES_HEADER,
|
|
3500
|
+
icon: SHARED.UNSAVED_CHANGES_ICON,
|
|
3501
|
+
acceptLabel: SHARED.REMOVE,
|
|
3502
|
+
rejectLabel: SHARED.CANCEL,
|
|
3503
|
+
acceptIcon: SHARED.ACCEPT_ICON,
|
|
3504
|
+
rejectIcon: SHARED.REJECT_ICON,
|
|
3505
|
+
acceptButtonClass: SHARED.ACCEPT_BUTTON_STYLE_CLASS,
|
|
3506
|
+
rejectButtonClass: SHARED.REJECT_BUTTON_STYLE_CLASS
|
|
3507
|
+
};
|
|
3508
|
+
constructor() {
|
|
3380
3509
|
}
|
|
3381
3510
|
/**
|
|
3382
3511
|
* Handles the onHide event from PrimeNG sidebar
|
|
3383
3512
|
*/
|
|
3384
3513
|
onSidebarHide() {
|
|
3385
|
-
// Only emit onHide if we're not programmatically closing
|
|
3386
3514
|
if (!this.isProgrammaticallyClosing) {
|
|
3387
3515
|
this.onHide.emit();
|
|
3388
3516
|
}
|
|
@@ -3391,7 +3519,6 @@ class SidebarComponent {
|
|
|
3391
3519
|
* Handles the visibleChange event from PrimeNG sidebar
|
|
3392
3520
|
*/
|
|
3393
3521
|
onVisibleChange(value) {
|
|
3394
|
-
// Only emit visibleChange if we're not programmatically closing
|
|
3395
3522
|
if (!this.isProgrammaticallyClosing) {
|
|
3396
3523
|
this.visibleChange.emit(value);
|
|
3397
3524
|
}
|
|
@@ -3507,21 +3634,9 @@ class SidebarComponent {
|
|
|
3507
3634
|
* Shows confirmation dialog for unsaved changes
|
|
3508
3635
|
*/
|
|
3509
3636
|
showUnsavedChangesConfirmation() {
|
|
3510
|
-
this.
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
icon: SHARED.UNSAVED_CHANGES_ICON,
|
|
3514
|
-
acceptLabel: SHARED.REMOVE,
|
|
3515
|
-
rejectLabel: SHARED.CANCEL,
|
|
3516
|
-
acceptIcon: SHARED.ACCEPT_ICON,
|
|
3517
|
-
rejectIcon: SHARED.REJECT_ICON,
|
|
3518
|
-
acceptButtonStyleClass: SHARED.ACCEPT_BUTTON_STYLE_CLASS,
|
|
3519
|
-
rejectButtonStyleClass: SHARED.REJECT_BUTTON_STYLE_CLASS,
|
|
3520
|
-
accept: () => {
|
|
3521
|
-
this.closeAndDiscardChanges();
|
|
3522
|
-
},
|
|
3523
|
-
reject: () => { }
|
|
3524
|
-
});
|
|
3637
|
+
this.confirmationDialog.confirm(this.unsavedChangesConfirmationOptions, () => {
|
|
3638
|
+
this.closeAndDiscardChanges();
|
|
3639
|
+
}, () => { });
|
|
3525
3640
|
}
|
|
3526
3641
|
/**
|
|
3527
3642
|
* Shows success message and closes sidebar after delay
|
|
@@ -3563,13 +3678,16 @@ class SidebarComponent {
|
|
|
3563
3678
|
this.destroy$.next();
|
|
3564
3679
|
this.destroy$.complete();
|
|
3565
3680
|
}
|
|
3566
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SidebarComponent, deps: [
|
|
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:
|
|
3681
|
+
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"] }] });
|
|
3568
3683
|
}
|
|
3569
3684
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SidebarComponent, decorators: [{
|
|
3570
3685
|
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:
|
|
3572
|
-
}], ctorParameters: () => [
|
|
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"] }]
|
|
3687
|
+
}], ctorParameters: () => [], propDecorators: { confirmationDialog: [{
|
|
3688
|
+
type: ViewChild,
|
|
3689
|
+
args: ['confirmationDialog']
|
|
3690
|
+
}], visible: [{
|
|
3573
3691
|
type: Input
|
|
3574
3692
|
}], position: [{
|
|
3575
3693
|
type: Input
|
|
@@ -5384,85 +5502,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
5384
5502
|
type: Input
|
|
5385
5503
|
}] } });
|
|
5386
5504
|
|
|
5387
|
-
class ConfirmationDialogComponent {
|
|
5388
|
-
confirmationService;
|
|
5389
|
-
confirmationOptions = {
|
|
5390
|
-
message: 'Are you sure that you want to proceed?',
|
|
5391
|
-
header: 'Confirmation',
|
|
5392
|
-
icon: 'pi pi-exclamation-triangle',
|
|
5393
|
-
acceptLabel: 'Yes',
|
|
5394
|
-
rejectLabel: 'No',
|
|
5395
|
-
acceptIcon: 'pi pi-check',
|
|
5396
|
-
rejectIcon: 'pi pi-times',
|
|
5397
|
-
acceptButtonClass: 'p-button-success',
|
|
5398
|
-
rejectButtonClass: 'p-button-secondary'
|
|
5399
|
-
};
|
|
5400
|
-
constructor(confirmationService) {
|
|
5401
|
-
this.confirmationService = confirmationService;
|
|
5402
|
-
}
|
|
5403
|
-
/**
|
|
5404
|
-
* Shows the confirmation dialog with the specified options
|
|
5405
|
-
* @param options - Configuration options for the confirmation dialog
|
|
5406
|
-
* @param acceptCallback - Function to execute when user accepts
|
|
5407
|
-
* @param rejectCallback - Function to execute when user rejects
|
|
5408
|
-
*/
|
|
5409
|
-
confirm(options, acceptCallback, rejectCallback) {
|
|
5410
|
-
const finalOptions = { ...this.confirmationOptions, ...options };
|
|
5411
|
-
this.confirmationService.confirm({
|
|
5412
|
-
message: finalOptions.message,
|
|
5413
|
-
header: finalOptions.header,
|
|
5414
|
-
icon: finalOptions.icon,
|
|
5415
|
-
acceptLabel: finalOptions.acceptLabel,
|
|
5416
|
-
rejectLabel: finalOptions.rejectLabel,
|
|
5417
|
-
acceptIcon: finalOptions.acceptIcon,
|
|
5418
|
-
rejectIcon: finalOptions.rejectIcon,
|
|
5419
|
-
acceptButtonStyleClass: finalOptions.acceptButtonClass,
|
|
5420
|
-
rejectButtonStyleClass: finalOptions.rejectButtonClass,
|
|
5421
|
-
accept: acceptCallback,
|
|
5422
|
-
reject: rejectCallback
|
|
5423
|
-
});
|
|
5424
|
-
}
|
|
5425
|
-
/**
|
|
5426
|
-
* Shows a delete confirmation dialog
|
|
5427
|
-
* @param itemName - Name of the item to be deleted
|
|
5428
|
-
* @param acceptCallback - Function to execute when user accepts deletion
|
|
5429
|
-
* @param rejectCallback - Function to execute when user rejects deletion
|
|
5430
|
-
*/
|
|
5431
|
-
confirmDelete(itemName, acceptCallback, rejectCallback) {
|
|
5432
|
-
this.confirm({
|
|
5433
|
-
message: `Are you sure you want to delete "${itemName}"?`,
|
|
5434
|
-
header: 'Delete Confirmation',
|
|
5435
|
-
acceptLabel: 'Delete',
|
|
5436
|
-
rejectLabel: 'Cancel',
|
|
5437
|
-
acceptButtonClass: 'p-button-danger'
|
|
5438
|
-
}, acceptCallback, rejectCallback);
|
|
5439
|
-
}
|
|
5440
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ConfirmationDialogComponent, deps: [{ token: i3.ConfirmationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5441
|
-
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: `
|
|
5442
|
-
<p-confirmDialog
|
|
5443
|
-
[style]="{ width: '25rem', height : '15rem' }"
|
|
5444
|
-
acceptButtonStyleClass="p-button-success"
|
|
5445
|
-
rejectButtonStyleClass="p-button-secondary">
|
|
5446
|
-
</p-confirmDialog>
|
|
5447
|
-
`, isInline: true, dependencies: [{ kind: "component", type: i2$3.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }] });
|
|
5448
|
-
}
|
|
5449
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{
|
|
5450
|
-
type: Component,
|
|
5451
|
-
args: [{
|
|
5452
|
-
selector: 'app-confirmation-dialog',
|
|
5453
|
-
template: `
|
|
5454
|
-
<p-confirmDialog
|
|
5455
|
-
[style]="{ width: '25rem', height : '15rem' }"
|
|
5456
|
-
acceptButtonStyleClass="p-button-success"
|
|
5457
|
-
rejectButtonStyleClass="p-button-secondary">
|
|
5458
|
-
</p-confirmDialog>
|
|
5459
|
-
`,
|
|
5460
|
-
standalone: false
|
|
5461
|
-
}]
|
|
5462
|
-
}], ctorParameters: () => [{ type: i3.ConfirmationService }], propDecorators: { confirmationOptions: [{
|
|
5463
|
-
type: Input
|
|
5464
|
-
}] } });
|
|
5465
|
-
|
|
5466
5505
|
class DocumentActionsService {
|
|
5467
5506
|
/**
|
|
5468
5507
|
* Calculates the card class based on status
|
|
@@ -6843,13 +6882,11 @@ class SharedModule {
|
|
|
6843
6882
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: SharedModule, declarations: [TablePrimaryComponent, HasPermissionDirective, ConfirmationDialogComponent], imports: [CommonModule,
|
|
6844
6883
|
TableModule,
|
|
6845
6884
|
ButtonModule,
|
|
6846
|
-
RippleModule,
|
|
6847
|
-
ConfirmDialogModule], exports: [TablePrimaryComponent, HasPermissionDirective, ConfirmationDialogComponent] });
|
|
6885
|
+
RippleModule], exports: [TablePrimaryComponent, HasPermissionDirective, ConfirmationDialogComponent] });
|
|
6848
6886
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SharedModule, providers: [ConfirmationService], imports: [CommonModule,
|
|
6849
6887
|
TableModule,
|
|
6850
6888
|
ButtonModule,
|
|
6851
|
-
RippleModule
|
|
6852
|
-
ConfirmDialogModule] });
|
|
6889
|
+
RippleModule] });
|
|
6853
6890
|
}
|
|
6854
6891
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SharedModule, decorators: [{
|
|
6855
6892
|
type: NgModule,
|
|
@@ -6859,8 +6896,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
6859
6896
|
CommonModule,
|
|
6860
6897
|
TableModule,
|
|
6861
6898
|
ButtonModule,
|
|
6862
|
-
RippleModule
|
|
6863
|
-
ConfirmDialogModule
|
|
6899
|
+
RippleModule
|
|
6864
6900
|
],
|
|
6865
6901
|
providers: [ConfirmationService],
|
|
6866
6902
|
exports: [TablePrimaryComponent, HasPermissionDirective, ConfirmationDialogComponent]
|
|
@@ -7010,8 +7046,9 @@ class DocumentModule {
|
|
|
7010
7046
|
SharedModule,
|
|
7011
7047
|
InputTextareaModule,
|
|
7012
7048
|
ToastModule,
|
|
7013
|
-
|
|
7014
|
-
|
|
7049
|
+
TooltipModule,
|
|
7050
|
+
MessagesModule,
|
|
7051
|
+
MessageModule], exports: [
|
|
7015
7052
|
/**
|
|
7016
7053
|
* Exports the `DocumentContainerComponent` to be used in other modules.
|
|
7017
7054
|
*/
|
|
@@ -7160,8 +7197,9 @@ class DocumentModule {
|
|
|
7160
7197
|
SharedModule,
|
|
7161
7198
|
InputTextareaModule,
|
|
7162
7199
|
ToastModule,
|
|
7163
|
-
|
|
7164
|
-
|
|
7200
|
+
TooltipModule,
|
|
7201
|
+
MessagesModule,
|
|
7202
|
+
MessageModule] });
|
|
7165
7203
|
}
|
|
7166
7204
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentModule, decorators: [{
|
|
7167
7205
|
type: NgModule,
|
|
@@ -7302,8 +7340,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
7302
7340
|
SharedModule,
|
|
7303
7341
|
InputTextareaModule,
|
|
7304
7342
|
ToastModule,
|
|
7305
|
-
|
|
7306
|
-
|
|
7343
|
+
TooltipModule,
|
|
7344
|
+
MessagesModule,
|
|
7345
|
+
MessageModule
|
|
7307
7346
|
],
|
|
7308
7347
|
exports: [
|
|
7309
7348
|
/**
|
|
@@ -7381,6 +7420,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
7381
7420
|
|
|
7382
7421
|
/*
|
|
7383
7422
|
* 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"]
|
|
7384
7432
|
*/
|
|
7385
7433
|
|
|
7386
7434
|
/**
|