cat-documents-ng 0.2.40 → 0.2.42
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/table-primary/table-primary.component.d.ts +2 -1
- package/Shared/constant/SHARED.d.ts +35 -0
- package/Shared/constant/URLS.d.ts +8 -0
- package/Shared/shared.module.d.ts +6 -5
- package/fesm2022/cat-documents-ng.mjs +825 -236
- package/fesm2022/cat-documents-ng.mjs.map +1 -1
- package/lib/document/components/document-actions/document-actions.component.d.ts +35 -0
- package/lib/document/components/document-list/document-list.component.d.ts +12 -1
- package/lib/document/components/document-search/document-search.component.d.ts +35 -0
- package/lib/document/components/document-viewer/document-viewer.component.d.ts +57 -4
- package/lib/document/document.module.d.ts +29 -28
- package/lib/document/models/document-list-response.model.d.ts +2 -0
- package/lib/document/services/document-actions.service.d.ts +48 -0
- package/lib/document/services/document-http.service.d.ts +21 -0
- package/lib/document/services/document.service.d.ts +7 -1
- package/lib/document/state/document.query.d.ts +9 -2
- package/lib/document/state/document.state.d.ts +1 -0
- package/lib/document/state/document.store.d.ts +2 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { SHARED } from '../../../../Shared/constant/SHARED';
|
|
3
|
+
import { DocumentActionsService, DocumentAction } from '../../services/document-actions.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DocumentActionsComponent implements OnChanges {
|
|
6
|
+
private documentActionsService;
|
|
7
|
+
readonly SHARED: typeof SHARED;
|
|
8
|
+
documentId?: string;
|
|
9
|
+
currentStatus?: typeof SHARED.STATUS_PENDING | typeof SHARED.STATUS_ACCEPTED | typeof SHARED.STATUS_REJECTED_LOWERCASE;
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
isUploaded?: boolean;
|
|
12
|
+
statusId?: string;
|
|
13
|
+
actionPerformed: EventEmitter<DocumentAction>;
|
|
14
|
+
showAcceptDialog: boolean;
|
|
15
|
+
showRejectDialog: boolean;
|
|
16
|
+
acceptNote: string;
|
|
17
|
+
rejectNote: string;
|
|
18
|
+
cardClass: string;
|
|
19
|
+
rejectButtonClass: string;
|
|
20
|
+
acceptButtonClass: string;
|
|
21
|
+
constructor(documentActionsService: DocumentActionsService);
|
|
22
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
23
|
+
/**
|
|
24
|
+
* Updates computed properties based on currentStatus and statusId
|
|
25
|
+
*/
|
|
26
|
+
private updateComputedProperties;
|
|
27
|
+
onAcceptClick(): void;
|
|
28
|
+
onRejectClick(): void;
|
|
29
|
+
onDeleteClick(): void;
|
|
30
|
+
onAcceptConfirm(): void;
|
|
31
|
+
onRejectConfirm(): void;
|
|
32
|
+
onCancel(): void;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentActionsComponent, never>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentActionsComponent, "document-actions", never, { "documentId": { "alias": "documentId"; "required": false; }; "currentStatus": { "alias": "currentStatus"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "isUploaded": { "alias": "isUploaded"; "required": false; }; "statusId": { "alias": "statusId"; "required": false; }; }, { "actionPerformed": "actionPerformed"; }, never, never, false, never>;
|
|
35
|
+
}
|
|
@@ -8,6 +8,7 @@ import { PERMISSIONS } from '../../../../Shared/constant/PERMISSIONS';
|
|
|
8
8
|
import { DocumentTableBuilderService } from '../../services/document-table-builder.service';
|
|
9
9
|
import { DocumentListItem, DocumentListResponse } from '../../models/document-list-response.model';
|
|
10
10
|
import { TableData } from '../../../../Shared/components/table-primary/table-primary.model';
|
|
11
|
+
import { DocumentHelperService } from '../../services/document.service';
|
|
11
12
|
import * as i0 from "@angular/core";
|
|
12
13
|
/**
|
|
13
14
|
* This component is responsible for displaying and managing a list of documents.
|
|
@@ -20,6 +21,7 @@ export declare class DocumentListComponent implements OnInit, OnDestroy {
|
|
|
20
21
|
documentQuery: DocumentQuery;
|
|
21
22
|
documentStore: DocumentStore;
|
|
22
23
|
private documentTableBuilder;
|
|
24
|
+
private documentHelperService;
|
|
23
25
|
/**
|
|
24
26
|
* Represents the context ID for the document list.
|
|
25
27
|
* This value is passed from the parent component.
|
|
@@ -128,7 +130,7 @@ export declare class DocumentListComponent implements OnInit, OnDestroy {
|
|
|
128
130
|
* @param {DocumentQuery} documentQuery - The service responsible for geting stored documents.
|
|
129
131
|
* @param {DocumentStore} documentStore - The service responsible for storing documents.
|
|
130
132
|
*/
|
|
131
|
-
constructor(documentUploadService: DocumentUploadService, documentHttpService: DocumentHttpService, documentQuery: DocumentQuery, documentStore: DocumentStore, documentTableBuilder: DocumentTableBuilderService);
|
|
133
|
+
constructor(documentUploadService: DocumentUploadService, documentHttpService: DocumentHttpService, documentQuery: DocumentQuery, documentStore: DocumentStore, documentTableBuilder: DocumentTableBuilderService, documentHelperService: DocumentHelperService);
|
|
132
134
|
/**
|
|
133
135
|
* Initializes the component by fetching the document type list.
|
|
134
136
|
*/
|
|
@@ -183,6 +185,15 @@ export declare class DocumentListComponent implements OnInit, OnDestroy {
|
|
|
183
185
|
*/
|
|
184
186
|
private setupDocumentListSubscription;
|
|
185
187
|
handleTableRowClick(rowData: any): void;
|
|
188
|
+
/**
|
|
189
|
+
* Handles the delete action from the table component
|
|
190
|
+
* @param {any} rowData - The row data containing the document to delete
|
|
191
|
+
*/
|
|
192
|
+
handleDeleteAction(rowData: any): void;
|
|
193
|
+
/**
|
|
194
|
+
* Refreshes the document list after a status update
|
|
195
|
+
*/
|
|
196
|
+
refreshDocumentList(): void;
|
|
186
197
|
/**
|
|
187
198
|
* Cleanup subscriptions on component destroy
|
|
188
199
|
*/
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { SHARED } from '../../../../Shared/constant/SHARED';
|
|
3
|
+
import { DocumentHelperService } from '../../services/document.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DocumentSearchComponent implements OnInit, OnDestroy {
|
|
6
|
+
private documentHelperService;
|
|
7
|
+
readonly SHARED: typeof SHARED;
|
|
8
|
+
contextId?: string;
|
|
9
|
+
searchTerm: string;
|
|
10
|
+
private destroy$;
|
|
11
|
+
constructor(documentHelperService: DocumentHelperService);
|
|
12
|
+
ngOnInit(): void;
|
|
13
|
+
ngOnDestroy(): void;
|
|
14
|
+
/**
|
|
15
|
+
* Sets up the search input subscription with debouncing
|
|
16
|
+
*/
|
|
17
|
+
private setupSearchSubscription;
|
|
18
|
+
/**
|
|
19
|
+
* Handles search term changes from ngModel
|
|
20
|
+
* @param searchTerm - The search term entered by the user
|
|
21
|
+
*/
|
|
22
|
+
onSearchInputChange(searchTerm: string): void;
|
|
23
|
+
/**
|
|
24
|
+
* Handles search term changes
|
|
25
|
+
* @param searchTerm - The search term entered by the user
|
|
26
|
+
*/
|
|
27
|
+
private onSearchChange;
|
|
28
|
+
/**
|
|
29
|
+
* Clears the search input
|
|
30
|
+
*/
|
|
31
|
+
onClearSearch(): void;
|
|
32
|
+
private searchSubject;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentSearchComponent, never>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentSearchComponent, "document-search", never, { "contextId": { "alias": "contextId"; "required": false; }; }, {}, never, never, false, never>;
|
|
35
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { OnChanges, OnDestroy } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
3
3
|
import { DocumentHttpService } from '../../services/document-http.service';
|
|
4
4
|
import { DocumentHelperService } from '../../services/document.service';
|
|
5
5
|
import { DocumentListItem } from '../../models/document-list-response.model';
|
|
6
6
|
import { DocumentHistorySection } from '../../models/document-history.model';
|
|
7
|
+
import { DocumentAction } from '../../services/document-actions.service';
|
|
8
|
+
import { MessageService } from 'primeng/api';
|
|
7
9
|
import * as i0 from "@angular/core";
|
|
8
10
|
/**
|
|
9
11
|
* Component for viewing and managing document details.
|
|
@@ -13,6 +15,7 @@ import * as i0 from "@angular/core";
|
|
|
13
15
|
export declare class DocumentViewerComponent implements OnChanges, OnDestroy {
|
|
14
16
|
documentHttpService: DocumentHttpService;
|
|
15
17
|
private documentService;
|
|
18
|
+
private messageService;
|
|
16
19
|
/**
|
|
17
20
|
* Get the selected document by user.
|
|
18
21
|
* @type {*}
|
|
@@ -23,6 +26,11 @@ export declare class DocumentViewerComponent implements OnChanges, OnDestroy {
|
|
|
23
26
|
* @type {*}
|
|
24
27
|
*/
|
|
25
28
|
documentList?: DocumentListItem[];
|
|
29
|
+
/**
|
|
30
|
+
* Event emitted when document status is updated to refresh the document list
|
|
31
|
+
* @type {EventEmitter<void>}
|
|
32
|
+
*/
|
|
33
|
+
documentStatusUpdated: EventEmitter<void>;
|
|
26
34
|
/**
|
|
27
35
|
* Indicates whether a checkbox is selected.
|
|
28
36
|
* @type {boolean}
|
|
@@ -53,6 +61,26 @@ export declare class DocumentViewerComponent implements OnChanges, OnDestroy {
|
|
|
53
61
|
* @type {boolean}
|
|
54
62
|
*/
|
|
55
63
|
showDocumentHistory: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Messages for user feedback
|
|
66
|
+
* @type {any[]}
|
|
67
|
+
*/
|
|
68
|
+
messages: any[];
|
|
69
|
+
/**
|
|
70
|
+
* Loading state for document actions
|
|
71
|
+
* @type {boolean}
|
|
72
|
+
*/
|
|
73
|
+
isActionLoading: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Computed document status for the actions component
|
|
76
|
+
* @type {'pending' | 'accepted' | 'rejected'}
|
|
77
|
+
*/
|
|
78
|
+
documentStatus: 'pending' | 'accepted' | 'rejected';
|
|
79
|
+
/**
|
|
80
|
+
* Computed flag indicating if document is uploaded
|
|
81
|
+
* @type {boolean}
|
|
82
|
+
*/
|
|
83
|
+
documentIsUploaded: boolean;
|
|
56
84
|
/**
|
|
57
85
|
* Holds the subscription to manage observable cleanup.
|
|
58
86
|
* @private
|
|
@@ -64,12 +92,12 @@ export declare class DocumentViewerComponent implements OnChanges, OnDestroy {
|
|
|
64
92
|
* @param {DocumentHttpService} documentHttpService - Handle the http service.
|
|
65
93
|
* @param {DocumentService} documentService - Handle the states.
|
|
66
94
|
*/
|
|
67
|
-
constructor(documentHttpService: DocumentHttpService, documentService: DocumentHelperService);
|
|
95
|
+
constructor(documentHttpService: DocumentHttpService, documentService: DocumentHelperService, messageService: MessageService);
|
|
68
96
|
/**
|
|
69
97
|
* Fetches the alerts for the selected document.
|
|
70
98
|
* @returns {void}
|
|
71
99
|
*/
|
|
72
|
-
ngOnChanges(): void;
|
|
100
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
73
101
|
handleSelectedDocument(document: DocumentListItem): void;
|
|
74
102
|
/**
|
|
75
103
|
* Loads document history data
|
|
@@ -83,6 +111,31 @@ export declare class DocumentViewerComponent implements OnChanges, OnDestroy {
|
|
|
83
111
|
*/
|
|
84
112
|
isImage(contentType?: string): boolean;
|
|
85
113
|
ngOnDestroy(): void;
|
|
114
|
+
/**
|
|
115
|
+
* Updates computed properties based on selectedDocument
|
|
116
|
+
*/
|
|
117
|
+
private updateComputedProperties;
|
|
118
|
+
/**
|
|
119
|
+
* Calculates the current status of the document for the actions component
|
|
120
|
+
* @returns {'pending' | 'accepted' | 'rejected'} The current document status
|
|
121
|
+
*/
|
|
122
|
+
private calculateDocumentStatus;
|
|
123
|
+
/**
|
|
124
|
+
* Calculates if the document is uploaded and ready for actions
|
|
125
|
+
* @returns {boolean} True if document is uploaded
|
|
126
|
+
*/
|
|
127
|
+
private calculateIsDocumentUploaded;
|
|
128
|
+
/**
|
|
129
|
+
* Handles document actions from the actions component
|
|
130
|
+
* @param {DocumentAction} action - The action performed
|
|
131
|
+
*/
|
|
132
|
+
handleDocumentAction(action: DocumentAction): void;
|
|
133
|
+
/**
|
|
134
|
+
* Updates the document status via API call
|
|
135
|
+
* @param {string} status - The new status (Approved, Rejected)
|
|
136
|
+
* @param {string} description - The status update description
|
|
137
|
+
*/
|
|
138
|
+
private updateDocumentStatus;
|
|
86
139
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentViewerComponent, never>;
|
|
87
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentViewerComponent, "document-viewer", never, { "selectedDocument": { "alias": "selectedDocument"; "required": false; }; "documentList": { "alias": "documentList"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
140
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentViewerComponent, "document-viewer", never, { "selectedDocument": { "alias": "selectedDocument"; "required": false; }; "documentList": { "alias": "documentList"; "required": false; }; }, { "documentStatusUpdated": "documentStatusUpdated"; }, never, ["*"], false, never>;
|
|
88
141
|
}
|
|
@@ -8,33 +8,34 @@ import * as i6 from "./components/document-upload/document-upload.component";
|
|
|
8
8
|
import * as i7 from "./components/document-viewer/document-viewer.component";
|
|
9
9
|
import * as i8 from "./components/document-history/document-history.component";
|
|
10
10
|
import * as i9 from "./directives/document.directive";
|
|
11
|
-
import * as i10 from "./
|
|
12
|
-
import * as i11 from "./components/
|
|
13
|
-
import * as i12 from "./components/
|
|
14
|
-
import * as i13 from "./components/
|
|
15
|
-
import * as i14 from "./components/document-
|
|
16
|
-
import * as i15 from "
|
|
17
|
-
import * as i16 from "
|
|
18
|
-
import * as i17 from "
|
|
19
|
-
import * as i18 from "
|
|
20
|
-
import * as i19 from "primeng/
|
|
21
|
-
import * as i20 from "primeng/
|
|
22
|
-
import * as i21 from "primeng/
|
|
23
|
-
import * as i22 from "primeng/
|
|
24
|
-
import * as i23 from "primeng/
|
|
25
|
-
import * as i24 from "primeng/
|
|
26
|
-
import * as i25 from "primeng/
|
|
27
|
-
import * as i26 from "primeng/
|
|
28
|
-
import * as i27 from "
|
|
29
|
-
import * as i28 from "
|
|
30
|
-
import * as i29 from "
|
|
31
|
-
import * as i30 from "primeng/
|
|
32
|
-
import * as i31 from "primeng/
|
|
33
|
-
import * as i32 from "primeng/
|
|
34
|
-
import * as i33 from "primeng/
|
|
35
|
-
import * as i34 from "primeng/
|
|
36
|
-
import * as i35 from "primeng/
|
|
37
|
-
import * as i36 from "
|
|
11
|
+
import * as i10 from "./components/linked-document/linked-document.component";
|
|
12
|
+
import * as i11 from "./components/documents-menu/documents-menu.component";
|
|
13
|
+
import * as i12 from "./components/user-list/user-list.component";
|
|
14
|
+
import * as i13 from "./components/document-status/document-status.component";
|
|
15
|
+
import * as i14 from "./components/document-actions/document-actions.component";
|
|
16
|
+
import * as i15 from "./components/document-search/document-search.component";
|
|
17
|
+
import * as i16 from "@angular/common";
|
|
18
|
+
import * as i17 from "primeng/accordion";
|
|
19
|
+
import * as i18 from "@angular/common/http";
|
|
20
|
+
import * as i19 from "primeng/button";
|
|
21
|
+
import * as i20 from "primeng/sidebar";
|
|
22
|
+
import * as i21 from "primeng/fileupload";
|
|
23
|
+
import * as i22 from "primeng/progressbar";
|
|
24
|
+
import * as i23 from "primeng/badge";
|
|
25
|
+
import * as i24 from "primeng/listbox";
|
|
26
|
+
import * as i25 from "primeng/checkbox";
|
|
27
|
+
import * as i26 from "primeng/timeline";
|
|
28
|
+
import * as i27 from "primeng/inputtextarea";
|
|
29
|
+
import * as i28 from "@angular/forms";
|
|
30
|
+
import * as i29 from "ng2-pdf-viewer";
|
|
31
|
+
import * as i30 from "primeng/dialog";
|
|
32
|
+
import * as i31 from "primeng/dropdown";
|
|
33
|
+
import * as i32 from "primeng/inputtext";
|
|
34
|
+
import * as i33 from "primeng/menu";
|
|
35
|
+
import * as i34 from "primeng/panelmenu";
|
|
36
|
+
import * as i35 from "primeng/card";
|
|
37
|
+
import * as i36 from "primeng/table";
|
|
38
|
+
import * as i37 from "../../Shared/shared.module";
|
|
38
39
|
/**
|
|
39
40
|
* @module DocumentModule
|
|
40
41
|
*
|
|
@@ -44,6 +45,6 @@ import * as i36 from "../../Shared/shared.module";
|
|
|
44
45
|
*/
|
|
45
46
|
export declare class DocumentModule {
|
|
46
47
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentModule, never>;
|
|
47
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DocumentModule, [typeof i1.DocumentContainerComponent, typeof i2.FolderContainerComponent, typeof i3.FolderBlockComponent, typeof i4.DocumentListComponent, typeof i5.DocumentListItemComponent, typeof i6.DocumentUploadComponent, typeof i7.DocumentViewerComponent, typeof i8.DocumentHistoryComponent, typeof i9.DocumentDirective, typeof i10.
|
|
48
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DocumentModule, [typeof i1.DocumentContainerComponent, typeof i2.FolderContainerComponent, typeof i3.FolderBlockComponent, typeof i4.DocumentListComponent, typeof i5.DocumentListItemComponent, typeof i6.DocumentUploadComponent, typeof i7.DocumentViewerComponent, typeof i8.DocumentHistoryComponent, typeof i9.DocumentDirective, typeof i10.LinkedDocumentComponent, typeof i11.DocumentsMenuComponent, typeof i12.UserListComponent, typeof i13.DocumentStatusComponent, typeof i14.DocumentActionsComponent, typeof i15.DocumentSearchComponent], [typeof i16.CommonModule, typeof i17.AccordionModule, typeof i18.HttpClientModule, typeof i19.ButtonModule, typeof i20.SidebarModule, typeof i21.FileUploadModule, typeof i22.ProgressBarModule, typeof i23.BadgeModule, typeof i24.ListboxModule, typeof i25.CheckboxModule, typeof i26.TimelineModule, typeof i27.InputTextareaModule, typeof i28.FormsModule, typeof i29.PdfViewerModule, typeof i30.DialogModule, typeof i31.DropdownModule, typeof i32.InputTextModule, typeof i33.MenuModule, typeof i34.PanelMenuModule, typeof i35.CardModule, typeof i36.TableModule, typeof i37.SharedModule, typeof i27.InputTextareaModule], [typeof i1.DocumentContainerComponent, typeof i7.DocumentViewerComponent, typeof i14.DocumentActionsComponent, typeof i4.DocumentListComponent, typeof i9.DocumentDirective, typeof i15.DocumentSearchComponent]>;
|
|
48
49
|
static ɵinj: i0.ɵɵInjectorDeclaration<DocumentModule>;
|
|
49
50
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { SHARED } from '../../../Shared/constant/SHARED';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export interface DocumentAction {
|
|
4
|
+
type: typeof SHARED.REJECT_ACTION | typeof SHARED.ACCEPT_ACTION | typeof SHARED.DELETE_ACTION;
|
|
5
|
+
note?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class DocumentActionsService {
|
|
8
|
+
/**
|
|
9
|
+
* Calculates the card class based on status
|
|
10
|
+
* @param currentStatus - The current status of the document
|
|
11
|
+
* @param statusId - The status ID from API
|
|
12
|
+
* @returns {string} The CSS class for the card
|
|
13
|
+
*/
|
|
14
|
+
calculateCardClass(currentStatus?: string, statusId?: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Calculates the reject button class based on status
|
|
17
|
+
* @param currentStatus - The current status of the document
|
|
18
|
+
* @param statusId - The status ID from API
|
|
19
|
+
* @returns {string} The CSS class for the reject button
|
|
20
|
+
*/
|
|
21
|
+
calculateRejectButtonClass(currentStatus?: string, statusId?: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Calculates the accept button class based on status
|
|
24
|
+
* @param currentStatus - The current status of the document
|
|
25
|
+
* @param statusId - The status ID from API
|
|
26
|
+
* @returns {string} The CSS class for the accept button
|
|
27
|
+
*/
|
|
28
|
+
calculateAcceptButtonClass(currentStatus?: string, statusId?: string): string;
|
|
29
|
+
/**
|
|
30
|
+
* Creates an accept action
|
|
31
|
+
* @param note - The acceptance note
|
|
32
|
+
* @returns {DocumentAction} The accept action
|
|
33
|
+
*/
|
|
34
|
+
createAcceptAction(note: string): DocumentAction;
|
|
35
|
+
/**
|
|
36
|
+
* Creates a reject action
|
|
37
|
+
* @param note - The rejection note
|
|
38
|
+
* @returns {DocumentAction} The reject action
|
|
39
|
+
*/
|
|
40
|
+
createRejectAction(note: string): DocumentAction;
|
|
41
|
+
/**
|
|
42
|
+
* Creates a delete action
|
|
43
|
+
* @returns {DocumentAction} The delete action
|
|
44
|
+
*/
|
|
45
|
+
createDeleteAction(): DocumentAction;
|
|
46
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentActionsService, never>;
|
|
47
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DocumentActionsService>;
|
|
48
|
+
}
|
|
@@ -101,6 +101,27 @@ export declare class DocumentHttpService {
|
|
|
101
101
|
*/
|
|
102
102
|
getDocumentsBySelection(contextId: string, menuItem: string | null, userId: string | null, status: string | null, searchKey?: string | null): Observable<any>;
|
|
103
103
|
getDocumentHistory(documentId: string): Observable<DocumentHistorySection[]>;
|
|
104
|
+
/**
|
|
105
|
+
* Updates the status of a document by document ID
|
|
106
|
+
* @param {string} documentId - The ID of the document to update
|
|
107
|
+
* @param {string} status - The new status (Approved, Rejected, etc.)
|
|
108
|
+
* @param {string} statusUpdateDescription - The description/note for the status update
|
|
109
|
+
* @returns {Observable<any>} Observable that emits the updated document data with normalized status
|
|
110
|
+
*/
|
|
111
|
+
updateDocumentStatus(documentId: string, status: string, statusUpdateDescription: string): Observable<any>;
|
|
112
|
+
/**
|
|
113
|
+
* Normalizes the status from API response to match component expectations
|
|
114
|
+
* @param {string} status - The status from API response (Approved, Rejected, etc.)
|
|
115
|
+
* @returns {string} Normalized status value
|
|
116
|
+
*/
|
|
117
|
+
private normalizeStatus;
|
|
118
|
+
/**
|
|
119
|
+
* Deletes a document by its ID and refreshes the document list
|
|
120
|
+
* @param {string} documentId - The ID of the document to delete
|
|
121
|
+
* @param {string} contextId - The context ID to refresh the document list
|
|
122
|
+
* @returns {Observable<any>} Observable that emits the delete response
|
|
123
|
+
*/
|
|
124
|
+
deleteDocument(documentId: string, contextId: string): Observable<any>;
|
|
104
125
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentHttpService, never>;
|
|
105
126
|
static ɵprov: i0.ɵɵInjectableDeclaration<DocumentHttpService>;
|
|
106
127
|
}
|
|
@@ -52,13 +52,19 @@ export declare class DocumentHelperService {
|
|
|
52
52
|
* @param status the selected status
|
|
53
53
|
*/
|
|
54
54
|
setSelectedStatus(status: string | null): void;
|
|
55
|
+
/**
|
|
56
|
+
* Set the search key
|
|
57
|
+
* @param searchKey the search term
|
|
58
|
+
*/
|
|
59
|
+
setSearchKey(searchKey: string | null): void;
|
|
55
60
|
/**
|
|
56
61
|
* Set all selection state at once
|
|
57
62
|
* @param menuItem the selected menu item _id (not the label)
|
|
58
63
|
* @param userId the selected user ID
|
|
59
64
|
* @param status the selected status
|
|
65
|
+
* @param searchKey the search term
|
|
60
66
|
*/
|
|
61
|
-
setSelectionState(menuItem: string | null, userId: string | null, status: string | null): void;
|
|
67
|
+
setSelectionState(menuItem: string | null, userId: string | null, status: string | null, searchKey?: string | null): void;
|
|
62
68
|
/**
|
|
63
69
|
* Clear all selection state
|
|
64
70
|
*/
|
|
@@ -60,14 +60,20 @@ export declare class DocumentQuery extends QueryEntity<DocumentState> {
|
|
|
60
60
|
*/
|
|
61
61
|
selectSelectedStatus(): Observable<string | null>;
|
|
62
62
|
/**
|
|
63
|
-
* Selects
|
|
64
|
-
* @returns {Observable<
|
|
63
|
+
* Selects the current search key.
|
|
64
|
+
* @returns {Observable<string | null>} Observable that emits the current search key.
|
|
65
|
+
*/
|
|
66
|
+
selectSearchKey(): Observable<string | null>;
|
|
67
|
+
/**
|
|
68
|
+
* Selects all selection state properties (menu item, user ID, status, search key).
|
|
69
|
+
* @returns {Observable<{menuItem: string | null, userId: string | null, status: string | null, searchKey: string | null}>} Observable that emits the current selection state.
|
|
65
70
|
* Note: menuItem is the _id of the selected menu item, not the label.
|
|
66
71
|
*/
|
|
67
72
|
selectSelectionState(): Observable<{
|
|
68
73
|
menuItem: string | null;
|
|
69
74
|
userId: string | null;
|
|
70
75
|
status: string | null;
|
|
76
|
+
searchKey: string | null;
|
|
71
77
|
}>;
|
|
72
78
|
/**
|
|
73
79
|
* Gets the current selection state values (synchronous).
|
|
@@ -78,6 +84,7 @@ export declare class DocumentQuery extends QueryEntity<DocumentState> {
|
|
|
78
84
|
menuItem: string | null;
|
|
79
85
|
userId: string | null;
|
|
80
86
|
status: string | null;
|
|
87
|
+
searchKey: string | null;
|
|
81
88
|
};
|
|
82
89
|
/**
|
|
83
90
|
* Selects the user list visibility state.
|
|
@@ -34,6 +34,7 @@ export interface DocumentState extends EntityState<DocumentModel, string> {
|
|
|
34
34
|
selectedMenuItem: string | null;
|
|
35
35
|
selectedUserId: string | null;
|
|
36
36
|
selectedStatus: string | null;
|
|
37
|
+
searchKey: string | null;
|
|
37
38
|
showUserList: boolean;
|
|
38
39
|
currentDocument: DocumentModel | null;
|
|
39
40
|
userList: UserListModel[];
|
|
@@ -30,7 +30,8 @@ export declare class DocumentStore extends EntityStore<DocumentState> {
|
|
|
30
30
|
setSelectedMenuItem(menuItem: string | null): void;
|
|
31
31
|
setSelectedUserId(userId: string | null): void;
|
|
32
32
|
setSelectedStatus(status: string | null): void;
|
|
33
|
-
|
|
33
|
+
setSearchKey(searchKey: string | null): void;
|
|
34
|
+
setSelectionState(menuItem: string | null, userId: string | null, status: string | null, searchKey?: string | null): void;
|
|
34
35
|
clearSelectionState(): void;
|
|
35
36
|
setShowUserList(show: boolean): void;
|
|
36
37
|
setCurrentDocument(document: DocumentModel | null): void;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from './lib/document/document.module';
|
|
2
2
|
export * from './lib/document/components/document-container/document-container.component';
|
|
3
3
|
export * from './lib/document/components/document-viewer/document-viewer.component';
|
|
4
|
+
export * from './lib/document/components/document-actions/document-actions.component';
|
|
4
5
|
export * from './lib/document/components/document-history/document-history.component';
|
|
5
6
|
export * from './lib/document/components/document-list/document-list.component';
|
|
7
|
+
export * from './lib/document/components/document-search/document-search.component';
|
|
6
8
|
export * from './lib/document/models/document-history.model';
|
|
7
9
|
export * from './lib/document/services/document-table-builder.service';
|
|
8
10
|
export * from './lib/document/directives/document.directive';
|