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
package/README.md
CHANGED
|
@@ -320,3 +320,102 @@ folderBlocks: Data sourced from FOLDERPANEL for folder blocks.
|
|
|
320
320
|
|
|
321
321
|
## Additional Resources
|
|
322
322
|
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
|
323
|
+
|
|
324
|
+
## Troubleshooting
|
|
325
|
+
|
|
326
|
+
### Confirmation Dialog Not Visible
|
|
327
|
+
|
|
328
|
+
If you experience issues where confirmation dialogs are not visible when the library is installed in your project, this is likely due to z-index conflicts. Here are the solutions:
|
|
329
|
+
|
|
330
|
+
#### Solution 1: Import Global Styles
|
|
331
|
+
|
|
332
|
+
Import the library's global styles in your main `styles.scss` or `angular.json`:
|
|
333
|
+
|
|
334
|
+
```scss
|
|
335
|
+
// In your styles.scss
|
|
336
|
+
@import '~cat-document-lib/lib/styles.scss';
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
#### Solution 2: Configure Z-Index in angular.json
|
|
340
|
+
|
|
341
|
+
Add the library's styles to your `angular.json` file:
|
|
342
|
+
|
|
343
|
+
```json
|
|
344
|
+
{
|
|
345
|
+
"projects": {
|
|
346
|
+
"your-project": {
|
|
347
|
+
"architect": {
|
|
348
|
+
"build": {
|
|
349
|
+
"options": {
|
|
350
|
+
"styles": [
|
|
351
|
+
"src/styles.scss",
|
|
352
|
+
"node_modules/cat-document-lib/lib/styles.scss"
|
|
353
|
+
]
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
#### Solution 3: Override Z-Index in Host Project
|
|
363
|
+
|
|
364
|
+
If the above solutions don't work, you can override the z-index values in your host project's CSS:
|
|
365
|
+
|
|
366
|
+
```scss
|
|
367
|
+
/* Ensure confirmation dialogs are visible */
|
|
368
|
+
.p-confirm-dialog {
|
|
369
|
+
z-index: 10001 !important;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.p-dialog-mask {
|
|
373
|
+
z-index: 10000 !important;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.p-sidebar {
|
|
377
|
+
z-index: 10000 !important;
|
|
378
|
+
}
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
#### Solution 4: Use Higher Base Z-Index
|
|
382
|
+
|
|
383
|
+
When using the sidebar component, you can specify a higher base z-index:
|
|
384
|
+
|
|
385
|
+
```html
|
|
386
|
+
<lib-sidebar
|
|
387
|
+
[baseZIndex]="20000"
|
|
388
|
+
[autoZIndex]="false">
|
|
389
|
+
<!-- content -->
|
|
390
|
+
</lib-sidebar>
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
### Common Issues
|
|
394
|
+
|
|
395
|
+
1. **Dialog appears behind other elements**: This is usually a z-index issue. Use Solution 1 or 2 above.
|
|
396
|
+
2. **Sidebar not visible**: Check if the `visible` property is properly bound and the component is not hidden by CSS.
|
|
397
|
+
3. **Confirmation dialog not showing**: Ensure PrimeNG's ConfirmationService is properly configured in your app.
|
|
398
|
+
|
|
399
|
+
## API Reference
|
|
400
|
+
|
|
401
|
+
### SidebarComponent
|
|
402
|
+
|
|
403
|
+
The main sidebar component with the following inputs:
|
|
404
|
+
|
|
405
|
+
- `visible`: Boolean to control sidebar visibility
|
|
406
|
+
- `position`: 'left' | 'right' - Sidebar position
|
|
407
|
+
- `width`: String for sidebar width
|
|
408
|
+
- `baseZIndex`: Number for z-index (default: 10000)
|
|
409
|
+
- `autoZIndex`: Boolean to auto-manage z-index (default: false)
|
|
410
|
+
|
|
411
|
+
## Contributing
|
|
412
|
+
|
|
413
|
+
1. Fork the repository
|
|
414
|
+
2. Create a feature branch
|
|
415
|
+
3. Make your changes
|
|
416
|
+
4. Add tests
|
|
417
|
+
5. Submit a pull request
|
|
418
|
+
|
|
419
|
+
## License
|
|
420
|
+
|
|
421
|
+
This project is licensed under the MIT License.
|
|
@@ -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
|
}
|