cat-documents-ng 0.2.90 → 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/fesm2022/cat-documents-ng.mjs +2 -67
- package/fesm2022/cat-documents-ng.mjs.map +1 -1
- package/package.json +1 -1
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.
|
|
@@ -3389,67 +3389,11 @@ class ConfirmationDialogComponent {
|
|
|
3389
3389
|
}
|
|
3390
3390
|
}
|
|
3391
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"] }] });
|
|
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"] }] });
|
|
3421
3393
|
}
|
|
3422
3394
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{
|
|
3423
3395
|
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"] }]
|
|
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"] }]
|
|
3453
3397
|
}], propDecorators: { confirmationOptions: [{
|
|
3454
3398
|
type: Input
|
|
3455
3399
|
}] } });
|
|
@@ -7420,15 +7364,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
7420
7364
|
|
|
7421
7365
|
/*
|
|
7422
7366
|
* Public API Surface of cat-document-lib
|
|
7423
|
-
*
|
|
7424
|
-
* IMPORTANT: To ensure proper z-index values and prevent confirmation dialog visibility issues,
|
|
7425
|
-
* import the global styles in your host project:
|
|
7426
|
-
*
|
|
7427
|
-
* Option 1: In your styles.scss
|
|
7428
|
-
* @import '~cat-document-lib/lib/styles.scss';
|
|
7429
|
-
*
|
|
7430
|
-
* Option 2: In your angular.json
|
|
7431
|
-
* "styles": ["node_modules/cat-document-lib/lib/styles.scss"]
|
|
7432
7367
|
*/
|
|
7433
7368
|
|
|
7434
7369
|
/**
|