cat-documents-ng 0.3.4 → 0.3.8
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/Shared/components/confirmation-dialog/confirmation-dialog.component.d.ts +15 -8
- package/Shared/constant/URLS.d.ts +1 -0
- package/Shared/shared.module.d.ts +2 -1
- package/fesm2022/cat-documents-ng.mjs +265 -231
- package/fesm2022/cat-documents-ng.mjs.map +1 -1
- package/lib/document/components/document-actions/document-actions.component.d.ts +3 -3
- package/lib/document/components/sidebar/sidebar.component.d.ts +29 -31
- package/lib/document/models/document-list-response.model.d.ts +1 -0
- package/lib/document/services/document-table-builder.service.d.ts +7 -0
- package/package.json +1 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { SHARED } from '../../../../Shared/constant/SHARED';
|
|
3
3
|
import { DocumentActionsService, DocumentAction } from '../../services/document-actions.service';
|
|
4
|
-
import {
|
|
4
|
+
import { ConfirmationService } from 'primeng/api';
|
|
5
5
|
import { SessionService } from '../../../../Shared/services/session.service';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class DocumentActionsComponent implements OnChanges {
|
|
8
8
|
private documentActionsService;
|
|
9
9
|
private sessionService;
|
|
10
|
+
private confirmationService;
|
|
10
11
|
readonly SHARED: typeof SHARED;
|
|
11
12
|
document?: any;
|
|
12
13
|
documentId?: string;
|
|
@@ -29,8 +30,7 @@ export declare class DocumentActionsComponent implements OnChanges {
|
|
|
29
30
|
showApproveRejectActions: boolean;
|
|
30
31
|
showDeleteAction: boolean;
|
|
31
32
|
showNoActions: boolean;
|
|
32
|
-
|
|
33
|
-
constructor(documentActionsService: DocumentActionsService, sessionService: SessionService);
|
|
33
|
+
constructor(documentActionsService: DocumentActionsService, sessionService: SessionService, confirmationService: ConfirmationService);
|
|
34
34
|
get rejectNote(): string;
|
|
35
35
|
set rejectNote(value: string);
|
|
36
36
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
import { EventEmitter, OnDestroy } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ConfirmationService } from 'primeng/api';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
interface ConfirmationOptions {
|
|
5
|
+
message: string;
|
|
6
|
+
header?: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
acceptLabel?: string;
|
|
9
|
+
rejectLabel?: string;
|
|
10
|
+
acceptIcon?: string;
|
|
11
|
+
rejectIcon?: string;
|
|
12
|
+
acceptButtonClass?: string;
|
|
13
|
+
rejectButtonClass?: string;
|
|
14
|
+
}
|
|
4
15
|
export declare class SidebarComponent implements OnDestroy {
|
|
5
|
-
|
|
16
|
+
private confirmationService;
|
|
17
|
+
private isShowingConfirmation;
|
|
6
18
|
set visible(value: boolean);
|
|
7
19
|
get visible(): boolean;
|
|
8
20
|
private _visible;
|
|
9
|
-
private isProgrammaticallyClosing;
|
|
10
21
|
position: 'left' | 'right';
|
|
11
22
|
width: string;
|
|
12
23
|
title: string;
|
|
13
24
|
showCloseButton: boolean;
|
|
14
25
|
modal: boolean;
|
|
15
26
|
dismissible: boolean;
|
|
16
|
-
closeOnEscape: boolean;
|
|
17
|
-
baseZIndex: number;
|
|
18
|
-
autoZIndex: boolean;
|
|
19
27
|
styleClass: string;
|
|
20
28
|
appendTo: string;
|
|
21
29
|
blockScroll: boolean;
|
|
@@ -30,18 +38,20 @@ export declare class SidebarComponent implements OnDestroy {
|
|
|
30
38
|
onShow: EventEmitter<void>;
|
|
31
39
|
onHide: EventEmitter<void>;
|
|
32
40
|
onSave: EventEmitter<void>;
|
|
33
|
-
|
|
41
|
+
onClose: EventEmitter<void>;
|
|
34
42
|
showSuccessMessage: boolean;
|
|
35
43
|
showErrorMessage: boolean;
|
|
36
44
|
private destroy$;
|
|
37
45
|
unsavedChangesConfirmationOptions: ConfirmationOptions;
|
|
38
|
-
constructor();
|
|
46
|
+
constructor(confirmationService: ConfirmationService);
|
|
39
47
|
/**
|
|
40
48
|
* Handles the onHide event from PrimeNG sidebar
|
|
49
|
+
* Only emits when actually closing, not when showing confirmation
|
|
41
50
|
*/
|
|
42
51
|
onSidebarHide(): void;
|
|
43
52
|
/**
|
|
44
53
|
* Handles the visibleChange event from PrimeNG sidebar
|
|
54
|
+
* Intercepts automatic closing to show confirmation if needed
|
|
45
55
|
*/
|
|
46
56
|
onVisibleChange(value: boolean): void;
|
|
47
57
|
/**
|
|
@@ -53,33 +63,20 @@ export declare class SidebarComponent implements OnDestroy {
|
|
|
53
63
|
*/
|
|
54
64
|
close(): void;
|
|
55
65
|
/**
|
|
56
|
-
*
|
|
57
|
-
|
|
58
|
-
closeAndDiscardChanges(): void;
|
|
59
|
-
/**
|
|
60
|
-
* Toggles the sidebar visibility
|
|
61
|
-
*/
|
|
62
|
-
toggle(): void;
|
|
63
|
-
/**
|
|
64
|
-
* Handles the close button click with unsaved changes check
|
|
65
|
-
*/
|
|
66
|
-
onCloseClick(): void;
|
|
67
|
-
/**
|
|
68
|
-
* Handles the mask click (when dismissible is true) with unsaved changes check
|
|
69
|
-
*/
|
|
70
|
-
onMaskClick(): void;
|
|
71
|
-
/**
|
|
72
|
-
* Handles the escape key press with unsaved changes check
|
|
66
|
+
* Handles escape key press
|
|
67
|
+
* Shows confirmation if there are unsaved changes
|
|
73
68
|
*/
|
|
74
|
-
|
|
69
|
+
handleEscapeKey(event: KeyboardEvent): void;
|
|
75
70
|
/**
|
|
76
|
-
* Handles backdrop click
|
|
71
|
+
* Handles backdrop click events
|
|
72
|
+
* Prevents default PrimeNG behavior and shows confirmation if needed
|
|
77
73
|
*/
|
|
78
|
-
|
|
74
|
+
handleBackdropClick(event: Event): void;
|
|
79
75
|
/**
|
|
80
|
-
* Handles
|
|
76
|
+
* Handles all closing scenarios (backdrop click, escape key, close button, etc.)
|
|
77
|
+
* This is the single entry point for all closing logic
|
|
81
78
|
*/
|
|
82
|
-
|
|
79
|
+
handleClose(): void;
|
|
83
80
|
/**
|
|
84
81
|
* Shows confirmation dialog for unsaved changes
|
|
85
82
|
*/
|
|
@@ -107,5 +104,6 @@ export declare class SidebarComponent implements OnDestroy {
|
|
|
107
104
|
*/
|
|
108
105
|
ngOnDestroy(): void;
|
|
109
106
|
static ɵfac: i0.ɵɵFactoryDeclaration<SidebarComponent, never>;
|
|
110
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SidebarComponent, "lib-sidebar", never, { "visible": { "alias": "visible"; "required": false; }; "position": { "alias": "position"; "required": false; }; "width": { "alias": "width"; "required": false; }; "title": { "alias": "title"; "required": false; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; }; "modal": { "alias": "modal"; "required": false; }; "dismissible": { "alias": "dismissible"; "required": false; }; "
|
|
107
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SidebarComponent, "lib-sidebar", never, { "visible": { "alias": "visible"; "required": false; }; "position": { "alias": "position"; "required": false; }; "width": { "alias": "width"; "required": false; }; "title": { "alias": "title"; "required": false; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; }; "modal": { "alias": "modal"; "required": false; }; "dismissible": { "alias": "dismissible"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "blockScroll": { "alias": "blockScroll"; "required": false; }; "closeIcon": { "alias": "closeIcon"; "required": false; }; "showSaveButton": { "alias": "showSaveButton"; "required": false; }; "saveButtonText": { "alias": "saveButtonText"; "required": false; }; "saveButtonDisabled": { "alias": "saveButtonDisabled"; "required": false; }; "successMessage": { "alias": "successMessage"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "hasUnsavedChanges": { "alias": "hasUnsavedChanges"; "required": false; }; }, { "visibleChange": "visibleChange"; "onShow": "onShow"; "onHide": "onHide"; "onSave": "onSave"; "onClose": "onClose"; }, never, ["[header]", "*"], false, never>;
|
|
111
108
|
}
|
|
109
|
+
export {};
|
|
@@ -9,6 +9,13 @@ export declare class DocumentTableBuilderService {
|
|
|
9
9
|
* @returns TableData object
|
|
10
10
|
*/
|
|
11
11
|
buildDocumentTable(documents: DocumentListItem[]): TableData;
|
|
12
|
+
/**
|
|
13
|
+
* Formats document name to include aliasName if available
|
|
14
|
+
* @param docName The document name
|
|
15
|
+
* @param aliasName The alias name (optional)
|
|
16
|
+
* @returns Formatted display name
|
|
17
|
+
*/
|
|
18
|
+
private formatDocumentDisplayName;
|
|
12
19
|
/**
|
|
13
20
|
* Gets completion count for a category
|
|
14
21
|
* @param category Document category
|