cat-documents-ng 0.2.89 → 0.2.91
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 +0 -99
- 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 +103 -129
- 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 -23
package/README.md
CHANGED
|
@@ -320,102 +320,3 @@ 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.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ConfirmationService } from 'primeng/api';
|
|
2
1
|
import * as i0 from "@angular/core";
|
|
3
2
|
export interface ConfirmationOptions {
|
|
4
3
|
message: string;
|
|
@@ -12,9 +11,11 @@ export interface ConfirmationOptions {
|
|
|
12
11
|
rejectButtonClass?: string;
|
|
13
12
|
}
|
|
14
13
|
export declare class ConfirmationDialogComponent {
|
|
15
|
-
private confirmationService;
|
|
16
14
|
confirmationOptions: ConfirmationOptions;
|
|
17
|
-
|
|
15
|
+
isVisible: boolean;
|
|
16
|
+
currentOptions: ConfirmationOptions;
|
|
17
|
+
private acceptCallback?;
|
|
18
|
+
private rejectCallback?;
|
|
18
19
|
/**
|
|
19
20
|
* Shows the confirmation dialog with the specified options
|
|
20
21
|
* @param options - Configuration options for the confirmation dialog
|
|
@@ -29,6 +30,8 @@ export declare class ConfirmationDialogComponent {
|
|
|
29
30
|
* @param rejectCallback - Function to execute when user rejects deletion
|
|
30
31
|
*/
|
|
31
32
|
confirmDelete(itemName: string, acceptCallback: () => void, rejectCallback?: () => void): void;
|
|
33
|
+
onAccept(): void;
|
|
34
|
+
onReject(): void;
|
|
32
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmationDialogComponent, never>;
|
|
33
36
|
static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmationDialogComponent, "app-confirmation-dialog", never, { "confirmationOptions": { "alias": "confirmationOptions"; "required": false; }; }, {}, never, never, false, never>;
|
|
34
37
|
}
|
|
@@ -6,9 +6,8 @@ import * as i4 from "@angular/common";
|
|
|
6
6
|
import * as i5 from "primeng/table";
|
|
7
7
|
import * as i6 from "primeng/button";
|
|
8
8
|
import * as i7 from "primeng/ripple";
|
|
9
|
-
import * as i8 from "primeng/confirmdialog";
|
|
10
9
|
export declare class SharedModule {
|
|
11
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<SharedModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedModule, [typeof i1.TablePrimaryComponent, typeof i2.HasPermissionDirective, typeof i3.ConfirmationDialogComponent], [typeof i4.CommonModule, typeof i5.TableModule, typeof i6.ButtonModule, typeof i7.RippleModule
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedModule, [typeof i1.TablePrimaryComponent, typeof i2.HasPermissionDirective, typeof i3.ConfirmationDialogComponent], [typeof i4.CommonModule, typeof i5.TableModule, typeof i6.ButtonModule, typeof i7.RippleModule], [typeof i1.TablePrimaryComponent, typeof i2.HasPermissionDirective, typeof i3.ConfirmationDialogComponent]>;
|
|
13
12
|
static ɵinj: i0.ɵɵInjectorDeclaration<SharedModule>;
|
|
14
13
|
}
|
|
@@ -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.
|
|
@@ -3333,8 +3333,73 @@ 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: "<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"] }] });
|
|
3393
|
+
}
|
|
3394
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{
|
|
3395
|
+
type: Component,
|
|
3396
|
+
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"] }]
|
|
3397
|
+
}], propDecorators: { confirmationOptions: [{
|
|
3398
|
+
type: Input
|
|
3399
|
+
}] } });
|
|
3400
|
+
|
|
3336
3401
|
class SidebarComponent {
|
|
3337
|
-
|
|
3402
|
+
confirmationDialog;
|
|
3338
3403
|
// Add setter to log visible changes
|
|
3339
3404
|
set visible(value) {
|
|
3340
3405
|
this._visible = value;
|
|
@@ -3372,17 +3437,24 @@ class SidebarComponent {
|
|
|
3372
3437
|
showSuccessMessage = false;
|
|
3373
3438
|
showErrorMessage = false;
|
|
3374
3439
|
destroy$ = new Subject();
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3440
|
+
// Confirmation options for unsaved changes
|
|
3441
|
+
unsavedChangesConfirmationOptions = {
|
|
3442
|
+
message: SHARED.UNSAVED_CHANGES_MESSAGE,
|
|
3443
|
+
header: SHARED.UNSAVED_CHANGES_HEADER,
|
|
3444
|
+
icon: SHARED.UNSAVED_CHANGES_ICON,
|
|
3445
|
+
acceptLabel: SHARED.REMOVE,
|
|
3446
|
+
rejectLabel: SHARED.CANCEL,
|
|
3447
|
+
acceptIcon: SHARED.ACCEPT_ICON,
|
|
3448
|
+
rejectIcon: SHARED.REJECT_ICON,
|
|
3449
|
+
acceptButtonClass: SHARED.ACCEPT_BUTTON_STYLE_CLASS,
|
|
3450
|
+
rejectButtonClass: SHARED.REJECT_BUTTON_STYLE_CLASS
|
|
3451
|
+
};
|
|
3452
|
+
constructor() {
|
|
3380
3453
|
}
|
|
3381
3454
|
/**
|
|
3382
3455
|
* Handles the onHide event from PrimeNG sidebar
|
|
3383
3456
|
*/
|
|
3384
3457
|
onSidebarHide() {
|
|
3385
|
-
// Only emit onHide if we're not programmatically closing
|
|
3386
3458
|
if (!this.isProgrammaticallyClosing) {
|
|
3387
3459
|
this.onHide.emit();
|
|
3388
3460
|
}
|
|
@@ -3391,7 +3463,6 @@ class SidebarComponent {
|
|
|
3391
3463
|
* Handles the visibleChange event from PrimeNG sidebar
|
|
3392
3464
|
*/
|
|
3393
3465
|
onVisibleChange(value) {
|
|
3394
|
-
// Only emit visibleChange if we're not programmatically closing
|
|
3395
3466
|
if (!this.isProgrammaticallyClosing) {
|
|
3396
3467
|
this.visibleChange.emit(value);
|
|
3397
3468
|
}
|
|
@@ -3507,21 +3578,9 @@ class SidebarComponent {
|
|
|
3507
3578
|
* Shows confirmation dialog for unsaved changes
|
|
3508
3579
|
*/
|
|
3509
3580
|
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
|
-
});
|
|
3581
|
+
this.confirmationDialog.confirm(this.unsavedChangesConfirmationOptions, () => {
|
|
3582
|
+
this.closeAndDiscardChanges();
|
|
3583
|
+
}, () => { });
|
|
3525
3584
|
}
|
|
3526
3585
|
/**
|
|
3527
3586
|
* Shows success message and closes sidebar after delay
|
|
@@ -3563,13 +3622,16 @@ class SidebarComponent {
|
|
|
3563
3622
|
this.destroy$.next();
|
|
3564
3623
|
this.destroy$.complete();
|
|
3565
3624
|
}
|
|
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: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"] }] });
|
|
3625
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3626
|
+
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
3627
|
}
|
|
3569
3628
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SidebarComponent, decorators: [{
|
|
3570
3629
|
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: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
|
-
}], ctorParameters: () => [
|
|
3630
|
+
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"] }]
|
|
3631
|
+
}], ctorParameters: () => [], propDecorators: { confirmationDialog: [{
|
|
3632
|
+
type: ViewChild,
|
|
3633
|
+
args: ['confirmationDialog']
|
|
3634
|
+
}], visible: [{
|
|
3573
3635
|
type: Input
|
|
3574
3636
|
}], position: [{
|
|
3575
3637
|
type: Input
|
|
@@ -5384,85 +5446,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
5384
5446
|
type: Input
|
|
5385
5447
|
}] } });
|
|
5386
5448
|
|
|
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
5449
|
class DocumentActionsService {
|
|
5467
5450
|
/**
|
|
5468
5451
|
* Calculates the card class based on status
|
|
@@ -6843,13 +6826,11 @@ class SharedModule {
|
|
|
6843
6826
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: SharedModule, declarations: [TablePrimaryComponent, HasPermissionDirective, ConfirmationDialogComponent], imports: [CommonModule,
|
|
6844
6827
|
TableModule,
|
|
6845
6828
|
ButtonModule,
|
|
6846
|
-
RippleModule,
|
|
6847
|
-
ConfirmDialogModule], exports: [TablePrimaryComponent, HasPermissionDirective, ConfirmationDialogComponent] });
|
|
6829
|
+
RippleModule], exports: [TablePrimaryComponent, HasPermissionDirective, ConfirmationDialogComponent] });
|
|
6848
6830
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SharedModule, providers: [ConfirmationService], imports: [CommonModule,
|
|
6849
6831
|
TableModule,
|
|
6850
6832
|
ButtonModule,
|
|
6851
|
-
RippleModule
|
|
6852
|
-
ConfirmDialogModule] });
|
|
6833
|
+
RippleModule] });
|
|
6853
6834
|
}
|
|
6854
6835
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SharedModule, decorators: [{
|
|
6855
6836
|
type: NgModule,
|
|
@@ -6859,8 +6840,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
6859
6840
|
CommonModule,
|
|
6860
6841
|
TableModule,
|
|
6861
6842
|
ButtonModule,
|
|
6862
|
-
RippleModule
|
|
6863
|
-
ConfirmDialogModule
|
|
6843
|
+
RippleModule
|
|
6864
6844
|
],
|
|
6865
6845
|
providers: [ConfirmationService],
|
|
6866
6846
|
exports: [TablePrimaryComponent, HasPermissionDirective, ConfirmationDialogComponent]
|
|
@@ -7010,8 +6990,9 @@ class DocumentModule {
|
|
|
7010
6990
|
SharedModule,
|
|
7011
6991
|
InputTextareaModule,
|
|
7012
6992
|
ToastModule,
|
|
7013
|
-
|
|
7014
|
-
|
|
6993
|
+
TooltipModule,
|
|
6994
|
+
MessagesModule,
|
|
6995
|
+
MessageModule], exports: [
|
|
7015
6996
|
/**
|
|
7016
6997
|
* Exports the `DocumentContainerComponent` to be used in other modules.
|
|
7017
6998
|
*/
|
|
@@ -7160,8 +7141,9 @@ class DocumentModule {
|
|
|
7160
7141
|
SharedModule,
|
|
7161
7142
|
InputTextareaModule,
|
|
7162
7143
|
ToastModule,
|
|
7163
|
-
|
|
7164
|
-
|
|
7144
|
+
TooltipModule,
|
|
7145
|
+
MessagesModule,
|
|
7146
|
+
MessageModule] });
|
|
7165
7147
|
}
|
|
7166
7148
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DocumentModule, decorators: [{
|
|
7167
7149
|
type: NgModule,
|
|
@@ -7302,8 +7284,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
7302
7284
|
SharedModule,
|
|
7303
7285
|
InputTextareaModule,
|
|
7304
7286
|
ToastModule,
|
|
7305
|
-
|
|
7306
|
-
|
|
7287
|
+
TooltipModule,
|
|
7288
|
+
MessagesModule,
|
|
7289
|
+
MessageModule
|
|
7307
7290
|
],
|
|
7308
7291
|
exports: [
|
|
7309
7292
|
/**
|
|
@@ -7381,15 +7364,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
7381
7364
|
|
|
7382
7365
|
/*
|
|
7383
7366
|
* 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"]
|
|
7393
7367
|
*/
|
|
7394
7368
|
|
|
7395
7369
|
/**
|