cat-documents-ng 0.3.41 → 0.3.43
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/fesm2022/cat-documents-ng.mjs +445 -237
- package/fesm2022/cat-documents-ng.mjs.map +1 -1
- package/lib/document/components/document-actions/document-actions.component.d.ts +1 -5
- package/lib/document/components/document-history/document-history.component.d.ts +97 -25
- package/lib/document/components/document-viewer/document-viewer.component.d.ts +10 -1
- package/lib/document/models/document-history.model.d.ts +23 -2
- package/package.json +1 -1
|
@@ -1,13 +1,11 @@
|
|
|
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 { ConfirmationService } from 'primeng/api';
|
|
5
4
|
import { SessionService } from '../../../../Shared/services/session.service';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
6
|
export declare class DocumentActionsComponent implements OnChanges {
|
|
8
7
|
private documentActionsService;
|
|
9
8
|
private sessionService;
|
|
10
|
-
private confirmationService;
|
|
11
9
|
readonly SHARED: typeof SHARED;
|
|
12
10
|
document?: any;
|
|
13
11
|
documentId?: string;
|
|
@@ -28,9 +26,8 @@ export declare class DocumentActionsComponent implements OnChanges {
|
|
|
28
26
|
acceptButtonClass: string;
|
|
29
27
|
isRejectNoteEmpty: boolean;
|
|
30
28
|
showApproveRejectActions: boolean;
|
|
31
|
-
showDeleteAction: boolean;
|
|
32
29
|
showNoActions: boolean;
|
|
33
|
-
constructor(documentActionsService: DocumentActionsService, sessionService: SessionService
|
|
30
|
+
constructor(documentActionsService: DocumentActionsService, sessionService: SessionService);
|
|
34
31
|
get rejectNote(): string;
|
|
35
32
|
set rejectNote(value: string);
|
|
36
33
|
/**
|
|
@@ -73,7 +70,6 @@ export declare class DocumentActionsComponent implements OnChanges {
|
|
|
73
70
|
private resetActionFlags;
|
|
74
71
|
onAcceptClick(): void;
|
|
75
72
|
onRejectClick(): void;
|
|
76
|
-
onDeleteClick(): void;
|
|
77
73
|
onAcceptConfirm(): void;
|
|
78
74
|
onRejectConfirm(): void;
|
|
79
75
|
onCancel(): void;
|
|
@@ -1,30 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { DocumentHistorySection, HistoryDocument } from '../../models/document-history.model';
|
|
2
3
|
import { DocumentHistoryService } from '../../services/document-history.service';
|
|
4
|
+
import { DocumentViewerService } from '../../services/document-viewer.service';
|
|
5
|
+
import { DocumentActionsService } from '../../services/document-actions.service';
|
|
6
|
+
import { ConfirmationService } from 'primeng/api';
|
|
3
7
|
import * as i0 from "@angular/core";
|
|
4
|
-
interface ProcessedDocumentHistoryItem {
|
|
5
|
-
label: string;
|
|
6
|
-
dateTime: string;
|
|
7
|
-
requestDescription: string;
|
|
8
|
-
userName: string;
|
|
9
|
-
userRole: string;
|
|
10
|
-
documentUrl?: string;
|
|
11
|
-
docName?: string;
|
|
12
|
-
actionIcon: string;
|
|
13
|
-
actionColor: string;
|
|
14
|
-
actionBgColor: string;
|
|
15
|
-
actionBorderColor: string;
|
|
16
|
-
actionIconBgColor: string;
|
|
17
|
-
}
|
|
18
|
-
interface ProcessedDocumentHistorySection extends DocumentHistorySection {
|
|
19
|
-
list: ProcessedDocumentHistoryItem[];
|
|
20
|
-
accordionClass?: string;
|
|
21
|
-
hasValidContent?: boolean;
|
|
22
|
-
}
|
|
23
8
|
/**
|
|
24
9
|
* Component for displaying document history in a timeline format.
|
|
25
10
|
*/
|
|
26
|
-
export declare class DocumentHistoryComponent {
|
|
11
|
+
export declare class DocumentHistoryComponent implements OnChanges {
|
|
27
12
|
private documentHistoryService;
|
|
13
|
+
private documentViewerService;
|
|
14
|
+
private documentActionsService;
|
|
15
|
+
private confirmationService;
|
|
28
16
|
/**
|
|
29
17
|
* Input data for document history sections
|
|
30
18
|
*/
|
|
@@ -33,6 +21,26 @@ export declare class DocumentHistoryComponent {
|
|
|
33
21
|
* Whether to show the history component
|
|
34
22
|
*/
|
|
35
23
|
showHistory: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The context ID for API calls
|
|
26
|
+
*/
|
|
27
|
+
contextId?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The selected document for actions
|
|
30
|
+
*/
|
|
31
|
+
selectedDocument?: any;
|
|
32
|
+
/**
|
|
33
|
+
* Event emitted when delete task is requested
|
|
34
|
+
*/
|
|
35
|
+
deleteTaskRequested: EventEmitter<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Event emitted when a document from history is selected
|
|
38
|
+
*/
|
|
39
|
+
documentSelected: EventEmitter<HistoryDocument>;
|
|
40
|
+
/**
|
|
41
|
+
* Reference to the document actions component
|
|
42
|
+
*/
|
|
43
|
+
documentActionsComponent?: any;
|
|
36
44
|
/**
|
|
37
45
|
* Active accordion index for controlling expand/collapse
|
|
38
46
|
*/
|
|
@@ -41,7 +49,15 @@ export declare class DocumentHistoryComponent {
|
|
|
41
49
|
* Whether the accordion is expanded
|
|
42
50
|
*/
|
|
43
51
|
isAccordionExpanded: boolean;
|
|
44
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Whether the actions dropdown menu is visible
|
|
54
|
+
*/
|
|
55
|
+
showActionsMenu: boolean;
|
|
56
|
+
constructor(documentHistoryService: DocumentHistoryService, documentViewerService: DocumentViewerService, documentActionsService: DocumentActionsService, confirmationService: ConfirmationService);
|
|
57
|
+
/**
|
|
58
|
+
* Handles changes to input properties
|
|
59
|
+
*/
|
|
60
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
45
61
|
/**
|
|
46
62
|
* Handle accordion open event
|
|
47
63
|
*/
|
|
@@ -57,14 +73,70 @@ export declare class DocumentHistoryComponent {
|
|
|
57
73
|
/**
|
|
58
74
|
* Process history data to add computed properties
|
|
59
75
|
*/
|
|
60
|
-
get processedHistoryData():
|
|
76
|
+
get processedHistoryData(): any[];
|
|
61
77
|
/**
|
|
62
78
|
* Downloads a document when clicked
|
|
63
79
|
* @param documentUrl - The URL of the document to download
|
|
64
80
|
* @param docName - The name of the document
|
|
65
81
|
*/
|
|
66
82
|
downloadDocument(documentUrl: string, docName?: string): void;
|
|
83
|
+
/**
|
|
84
|
+
* Get alert count for the alerts section
|
|
85
|
+
*/
|
|
86
|
+
getAlertCount(): number;
|
|
87
|
+
/**
|
|
88
|
+
* Get CSS class for event card based on action type
|
|
89
|
+
*/
|
|
90
|
+
getEventCardClass(label: string): string;
|
|
91
|
+
/**
|
|
92
|
+
* Get CSS class for event icon based on action type
|
|
93
|
+
*/
|
|
94
|
+
getEventIconClass(label: string): string;
|
|
95
|
+
/**
|
|
96
|
+
* Get the appropriate icon for the event
|
|
97
|
+
* @param label - The event label
|
|
98
|
+
* @returns {string} The icon class
|
|
99
|
+
*/
|
|
100
|
+
getEventIcon(label: string): string;
|
|
101
|
+
/**
|
|
102
|
+
* Toggle the actions dropdown menu
|
|
103
|
+
*/
|
|
104
|
+
toggleActionsMenu(): void;
|
|
105
|
+
/**
|
|
106
|
+
* Close the actions dropdown menu
|
|
107
|
+
*/
|
|
108
|
+
closeActionsMenu(): void;
|
|
109
|
+
/**
|
|
110
|
+
* Handle delete task action
|
|
111
|
+
*/
|
|
112
|
+
onDeleteTask(): void;
|
|
113
|
+
/**
|
|
114
|
+
* Set reference to document actions component
|
|
115
|
+
*/
|
|
116
|
+
setDocumentActionsComponent(component: any): void;
|
|
117
|
+
/**
|
|
118
|
+
* Handles document selection from history
|
|
119
|
+
* @param document - The selected document from history
|
|
120
|
+
*/
|
|
121
|
+
onDocumentClick(document: HistoryDocument): void;
|
|
122
|
+
/**
|
|
123
|
+
* Processed history data with document lists
|
|
124
|
+
*/
|
|
125
|
+
private _processedHistoryData;
|
|
126
|
+
/**
|
|
127
|
+
* Processes history data to include document lists for each item
|
|
128
|
+
*/
|
|
129
|
+
private processHistoryData;
|
|
130
|
+
/**
|
|
131
|
+
* Gets the list of valid documents for a history item
|
|
132
|
+
* @param item - The history item
|
|
133
|
+
* @returns Array of valid documents
|
|
134
|
+
*/
|
|
135
|
+
private getValidDocuments;
|
|
136
|
+
/**
|
|
137
|
+
* Listen for clicks outside the dropdown to close it
|
|
138
|
+
*/
|
|
139
|
+
onDocumentClickOutside(event: Event): void;
|
|
67
140
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentHistoryComponent, never>;
|
|
68
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentHistoryComponent, "document-history", never, { "historyData": { "alias": "historyData"; "required": false; }; "showHistory": { "alias": "showHistory"; "required": false; }; }, {}, never,
|
|
141
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentHistoryComponent, "document-history", never, { "historyData": { "alias": "historyData"; "required": false; }; "showHistory": { "alias": "showHistory"; "required": false; }; "contextId": { "alias": "contextId"; "required": false; }; "selectedDocument": { "alias": "selectedDocument"; "required": false; }; }, { "deleteTaskRequested": "deleteTaskRequested"; "documentSelected": "documentSelected"; }, never, ["[action-launcher]", "document-actions"], false, never>;
|
|
69
142
|
}
|
|
70
|
-
export {};
|
|
@@ -104,10 +104,19 @@ export declare class DocumentViewerComponent implements OnChanges, OnDestroy {
|
|
|
104
104
|
* Handles document name update event from content viewer
|
|
105
105
|
*/
|
|
106
106
|
onDocumentNameUpdated(): void;
|
|
107
|
+
/**
|
|
108
|
+
* Handles delete task request from history component
|
|
109
|
+
*/
|
|
110
|
+
onDeleteTaskRequested(): void;
|
|
111
|
+
/**
|
|
112
|
+
* Handles document selection from history component
|
|
113
|
+
* @param document - The selected document from history
|
|
114
|
+
*/
|
|
115
|
+
onDocumentSelected(document: any): void;
|
|
107
116
|
/**
|
|
108
117
|
* Refreshes document data when the viewer is closed
|
|
109
118
|
*/
|
|
110
119
|
private refreshDocumentData;
|
|
111
120
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentViewerComponent, never>;
|
|
112
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentViewerComponent, "document-viewer", never, { "selectedDocument": { "alias": "selectedDocument"; "required": false; }; "documentList": { "alias": "documentList"; "required": false; }; "contextId": { "alias": "contextId"; "required": false; }; }, { "documentStatusUpdated": "documentStatusUpdated"; "viewerDestroyed": "viewerDestroyed"; }, never, ["*"], false, never>;
|
|
121
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentViewerComponent, "document-viewer", never, { "selectedDocument": { "alias": "selectedDocument"; "required": false; }; "documentList": { "alias": "documentList"; "required": false; }; "contextId": { "alias": "contextId"; "required": false; }; }, { "documentStatusUpdated": "documentStatusUpdated"; "viewerDestroyed": "viewerDestroyed"; }, never, ["[action-launcher]", "*"], false, never>;
|
|
113
122
|
}
|
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a document in the history item.
|
|
3
|
+
*/
|
|
4
|
+
export interface HistoryDocument {
|
|
5
|
+
/**
|
|
6
|
+
* Name of the document
|
|
7
|
+
*/
|
|
8
|
+
docName: string | null;
|
|
9
|
+
/**
|
|
10
|
+
* URL of the document
|
|
11
|
+
*/
|
|
12
|
+
documentUrl: string | null;
|
|
13
|
+
/**
|
|
14
|
+
* Content type of the document
|
|
15
|
+
*/
|
|
16
|
+
contentType: string | null;
|
|
17
|
+
}
|
|
1
18
|
/**
|
|
2
19
|
* Represents a document history item.
|
|
3
20
|
*/
|
|
@@ -15,13 +32,17 @@ export interface DocumentHistoryItem {
|
|
|
15
32
|
*/
|
|
16
33
|
requestDescription: string;
|
|
17
34
|
/**
|
|
18
|
-
* URL of the document (optional)
|
|
35
|
+
* URL of the document (optional) - legacy field
|
|
19
36
|
*/
|
|
20
37
|
documentUrl?: string;
|
|
21
38
|
/**
|
|
22
|
-
* Name of the document (optional)
|
|
39
|
+
* Name of the document (optional) - legacy field
|
|
23
40
|
*/
|
|
24
41
|
docName?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Array of documents associated with this history item
|
|
44
|
+
*/
|
|
45
|
+
documents?: HistoryDocument[];
|
|
25
46
|
/**
|
|
26
47
|
* Name of the user who performed the action
|
|
27
48
|
*/
|