cat-documents-ng 0.2.32 → 0.2.35
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 +25 -0
- package/Shared/constant/ERROR.d.ts +1 -0
- package/Shared/constant/SHARED.d.ts +96 -5
- package/Shared/constant/URLS.d.ts +22 -0
- package/Shared/shared.module.d.ts +11 -0
- package/fesm2022/cat-documents-ng.mjs +2154 -524
- package/fesm2022/cat-documents-ng.mjs.map +1 -1
- package/lib/document/components/document-container/document-container.component.d.ts +36 -34
- package/lib/document/components/document-list/document-list.component.d.ts +63 -26
- package/lib/document/components/document-status/document-status.component.d.ts +22 -0
- package/lib/document/components/document-viewer/document-viewer.component.d.ts +6 -6
- package/lib/document/components/documents-menu/documents-menu.component.d.ts +40 -3
- package/lib/document/components/folder-container/folder-container.component.d.ts +33 -3
- package/lib/document/components/linked-document/linked-document.component.d.ts +5 -4
- package/lib/document/components/user-list/user-list.component.d.ts +29 -0
- package/lib/document/directives/document.directive.d.ts +2 -2
- package/lib/document/document.module.d.ts +25 -21
- package/lib/document/models/document-category.model.d.ts +19 -0
- package/lib/document/models/document-list-response.model.d.ts +24 -0
- package/lib/document/models/status-data.model.d.ts +27 -0
- package/lib/document/models/user-list.model.d.ts +8 -0
- package/lib/document/services/document-http.service.d.ts +35 -0
- package/lib/document/services/document-menu.service.d.ts +65 -0
- package/lib/document/services/document-table-builder.service.d.ts +56 -0
- package/lib/document/services/document.service.d.ts +83 -6
- package/lib/document/services/status-calculator.service.d.ts +20 -0
- package/lib/document/services/user-list.service.d.ts +36 -0
- package/lib/document/state/document.query.d.ts +94 -0
- package/lib/document/state/document.state.d.ts +13 -0
- package/lib/document/state/document.store.d.ts +15 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/src/assets/config/api.config.json +0 -20
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
1
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
2
|
import { DocumentService } from '../../state/document.service';
|
|
3
|
-
import { DocumentModel } from '../../models/document.model';
|
|
4
|
-
import { FolderBlockModel } from '../../models/folder.model';
|
|
5
3
|
import { DocumentHttpService } from '../../services/document-http.service';
|
|
6
4
|
import { DocumentQuery } from '../../state/document.query';
|
|
7
5
|
import { DocumentStore } from '../../state/document.store';
|
|
6
|
+
import { DocumentCategory } from '../../models/document-category.model';
|
|
7
|
+
import { UserListModel } from '../../models/user-list.model';
|
|
8
|
+
import { StatusDataModel } from '../../models/status-data.model';
|
|
9
|
+
import { DocumentListResponse } from '../../models/document-list-response.model';
|
|
10
|
+
import { DocumentHelperService } from '../../services/document.service';
|
|
8
11
|
import * as i0 from "@angular/core";
|
|
9
12
|
/**
|
|
10
13
|
*This component is responsible for managing and displaying a list of documents.
|
|
11
14
|
* @class DocumentContainerComponent
|
|
12
15
|
* @typedef {DocumentContainerComponent}
|
|
13
16
|
*/
|
|
14
|
-
export declare class DocumentContainerComponent implements OnInit {
|
|
17
|
+
export declare class DocumentContainerComponent implements OnInit, OnDestroy {
|
|
15
18
|
documentStore: DocumentStore;
|
|
16
19
|
documentService: DocumentService;
|
|
17
20
|
documentQuery: DocumentQuery;
|
|
18
21
|
documentHttpService: DocumentHttpService;
|
|
22
|
+
documentHelperService: DocumentHelperService;
|
|
19
23
|
/**
|
|
20
24
|
* Creates an instance of DocumentContainerComponent.
|
|
21
25
|
* @param {DocumentStore} documentStore - Query Store service to manage store document-related state.
|
|
@@ -23,37 +27,29 @@ export declare class DocumentContainerComponent implements OnInit {
|
|
|
23
27
|
* @param {DocumentQuery} documentQuery - Query service to manage document-related state.
|
|
24
28
|
* @param {DocumentHttpService} documentHttpService - Service to make HTTP requests related to documents.
|
|
25
29
|
*/
|
|
26
|
-
constructor(documentStore: DocumentStore, documentService: DocumentService, documentQuery: DocumentQuery, documentHttpService: DocumentHttpService);
|
|
30
|
+
constructor(documentStore: DocumentStore, documentService: DocumentService, documentQuery: DocumentQuery, documentHttpService: DocumentHttpService, documentHelperService: DocumentHelperService);
|
|
27
31
|
/**
|
|
28
32
|
* Get contextId in input.
|
|
29
33
|
* @type {string}
|
|
30
34
|
*/
|
|
31
35
|
contextId: string;
|
|
32
36
|
/**
|
|
33
|
-
*
|
|
34
|
-
* @type {
|
|
37
|
+
* The list of folders.
|
|
38
|
+
* @type {Array}
|
|
35
39
|
*/
|
|
36
|
-
|
|
40
|
+
applicationNumber: string;
|
|
41
|
+
catagories: DocumentCategory[];
|
|
42
|
+
userList: UserListModel[];
|
|
37
43
|
/**
|
|
38
|
-
*
|
|
39
|
-
* @type {
|
|
44
|
+
* Status data for the current selection
|
|
45
|
+
* @type {StatusDataModel[]}
|
|
40
46
|
*/
|
|
41
|
-
|
|
47
|
+
statusData: StatusDataModel[];
|
|
42
48
|
/**
|
|
43
|
-
*
|
|
44
|
-
* @type {
|
|
49
|
+
* Document list response from API
|
|
50
|
+
* @type {DocumentListResponse | null}
|
|
45
51
|
*/
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* The list of documents.
|
|
49
|
-
* @type {Array}
|
|
50
|
-
*/
|
|
51
|
-
documentList: DocumentModel[];
|
|
52
|
-
/**
|
|
53
|
-
* The list of folders.
|
|
54
|
-
* @type {Array}
|
|
55
|
-
*/
|
|
56
|
-
folderList: FolderBlockModel[];
|
|
52
|
+
documentListResponse: DocumentListResponse[] | null;
|
|
57
53
|
/**
|
|
58
54
|
* Holds the subscription to manage observable cleanup.
|
|
59
55
|
* @private
|
|
@@ -66,24 +62,30 @@ export declare class DocumentContainerComponent implements OnInit {
|
|
|
66
62
|
*/
|
|
67
63
|
ngOnInit(): void;
|
|
68
64
|
/**
|
|
69
|
-
*
|
|
70
|
-
*
|
|
65
|
+
* Sets up subscriptions to monitor menu item and user selection changes
|
|
66
|
+
* to trigger status data fetching
|
|
71
67
|
*/
|
|
68
|
+
private setupStatusDataSubscriptions;
|
|
72
69
|
/**
|
|
73
|
-
* Fetches
|
|
74
|
-
* @returns {void}
|
|
70
|
+
* Fetches status data based on current selections
|
|
75
71
|
*/
|
|
76
|
-
|
|
72
|
+
private fetchStatusData;
|
|
77
73
|
/**
|
|
78
|
-
* Fetches
|
|
79
|
-
|
|
80
|
-
|
|
74
|
+
* Fetches document catagory data.
|
|
75
|
+
*/
|
|
76
|
+
fetchDocumentCatagories(): void;
|
|
77
|
+
/**
|
|
78
|
+
* Fetches userlist data
|
|
79
|
+
*/
|
|
80
|
+
fetchUserList(): void;
|
|
81
|
+
/**
|
|
82
|
+
* Sets up subscription to listen for filtered document responses
|
|
81
83
|
*/
|
|
82
|
-
private
|
|
84
|
+
private setupFilteredDocumentSubscription;
|
|
83
85
|
/**
|
|
84
86
|
* Unsubscribe subscription on destroy of component .
|
|
85
87
|
*/
|
|
86
88
|
ngOnDestroy(): void;
|
|
87
89
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentContainerComponent, never>;
|
|
88
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentContainerComponent, "lib-document-container", never, { "contextId": { "alias": "contextId"; "required": false; };
|
|
90
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentContainerComponent, "lib-document-container", never, { "contextId": { "alias": "contextId"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
89
91
|
}
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DocumentModel } from '../../models/document.model';
|
|
1
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
3
2
|
import { DocumentHttpService } from '../../services/document-http.service';
|
|
4
3
|
import { DocumentUploadService } from '../../services/document-upload.service';
|
|
5
4
|
import { Message } from 'primeng/api';
|
|
6
5
|
import { DocumentQuery } from '../../state/document.query';
|
|
7
6
|
import { DocumentStore } from '../../state/document.store';
|
|
8
7
|
import { PERMISSIONS } from '../../../../Shared/constant/PERMISSIONS';
|
|
8
|
+
import { DocumentTableBuilderService } from '../../services/document-table-builder.service';
|
|
9
|
+
import { TableData } from '../../../../Shared/components/table-primary/table-primary.component';
|
|
10
|
+
import { DocumentListItem, DocumentListResponse } from '../../models/document-list-response.model';
|
|
9
11
|
import * as i0 from "@angular/core";
|
|
10
12
|
/**
|
|
11
13
|
* This component is responsible for displaying and managing a list of documents.
|
|
12
14
|
* Provides functionality for file upload, document selection, and dialog management.
|
|
13
15
|
* @class DocumentListComponent
|
|
14
16
|
*/
|
|
15
|
-
export declare class DocumentListComponent implements OnInit {
|
|
17
|
+
export declare class DocumentListComponent implements OnInit, OnDestroy {
|
|
16
18
|
documentUploadService: DocumentUploadService;
|
|
17
19
|
documentHttpService: DocumentHttpService;
|
|
18
20
|
documentQuery: DocumentQuery;
|
|
19
21
|
documentStore: DocumentStore;
|
|
20
|
-
|
|
22
|
+
private documentTableBuilder;
|
|
21
23
|
/**
|
|
22
24
|
* Represents the context ID for the document list.
|
|
23
25
|
* This value is passed from the parent component.
|
|
@@ -25,6 +27,16 @@ export declare class DocumentListComponent implements OnInit {
|
|
|
25
27
|
* @memberof DocumentListComponent
|
|
26
28
|
*/
|
|
27
29
|
contextId: string;
|
|
30
|
+
/**
|
|
31
|
+
* The document list response data passed from the parent component.
|
|
32
|
+
* @type {DocumentListResponse[] | null}
|
|
33
|
+
* @memberof DocumentListComponent
|
|
34
|
+
*/
|
|
35
|
+
documentListResponse: DocumentListResponse[] | null;
|
|
36
|
+
/**
|
|
37
|
+
* Subscription to document list response from store
|
|
38
|
+
*/
|
|
39
|
+
private documentListSubscription;
|
|
28
40
|
/**
|
|
29
41
|
* Default visibility of the upload button.
|
|
30
42
|
* @type {boolean}
|
|
@@ -36,19 +48,13 @@ export declare class DocumentListComponent implements OnInit {
|
|
|
36
48
|
* @type {DocumentModel}
|
|
37
49
|
* @memberof DocumentListComponent
|
|
38
50
|
*/
|
|
39
|
-
selectedDocument:
|
|
51
|
+
selectedDocument: DocumentListItem;
|
|
40
52
|
/**
|
|
41
53
|
* Default visibility of the sidebar.
|
|
42
54
|
* @type {boolean}
|
|
43
55
|
* @memberof DocumentListComponent
|
|
44
56
|
*/
|
|
45
57
|
isSidebarVisible: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Default visibility of the Accordion.
|
|
48
|
-
* @type {boolean}
|
|
49
|
-
* @memberof DocumentListComponent
|
|
50
|
-
*/
|
|
51
|
-
isCollapsed: boolean;
|
|
52
58
|
/**
|
|
53
59
|
* Default visibility of the messages.
|
|
54
60
|
* @type {Message[]}
|
|
@@ -67,7 +73,7 @@ export declare class DocumentListComponent implements OnInit {
|
|
|
67
73
|
* @type {DocumentModel[]}
|
|
68
74
|
* @memberof DocumentListComponent
|
|
69
75
|
*/
|
|
70
|
-
documentList:
|
|
76
|
+
documentList: DocumentListItem[];
|
|
71
77
|
/**
|
|
72
78
|
* The name of the document being uploaded or managed.
|
|
73
79
|
* @type {string}
|
|
@@ -96,6 +102,20 @@ export declare class DocumentListComponent implements OnInit {
|
|
|
96
102
|
* @type {string | undefined}
|
|
97
103
|
*/
|
|
98
104
|
fileName: string | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* Table data for each category
|
|
107
|
+
*/
|
|
108
|
+
categoryTables: TableData[];
|
|
109
|
+
/**
|
|
110
|
+
* Document categories from the response
|
|
111
|
+
*/
|
|
112
|
+
documentCategories: DocumentListResponse[];
|
|
113
|
+
/**
|
|
114
|
+
* Filter properties
|
|
115
|
+
*/
|
|
116
|
+
status: string | null;
|
|
117
|
+
category: string | null;
|
|
118
|
+
searchKey: string | null;
|
|
99
119
|
/**
|
|
100
120
|
* Creates an instance of DocumentListComponent.
|
|
101
121
|
* @class
|
|
@@ -104,7 +124,7 @@ export declare class DocumentListComponent implements OnInit {
|
|
|
104
124
|
* @param {DocumentQuery} documentQuery - The service responsible for geting stored documents.
|
|
105
125
|
* @param {DocumentStore} documentStore - The service responsible for storing documents.
|
|
106
126
|
*/
|
|
107
|
-
constructor(documentUploadService: DocumentUploadService, documentHttpService: DocumentHttpService, documentQuery: DocumentQuery, documentStore: DocumentStore);
|
|
127
|
+
constructor(documentUploadService: DocumentUploadService, documentHttpService: DocumentHttpService, documentQuery: DocumentQuery, documentStore: DocumentStore, documentTableBuilder: DocumentTableBuilderService);
|
|
108
128
|
/**
|
|
109
129
|
* Initializes the component by fetching the document type list.
|
|
110
130
|
*/
|
|
@@ -116,13 +136,6 @@ export declare class DocumentListComponent implements OnInit {
|
|
|
116
136
|
* @memberof DocumentListComponent
|
|
117
137
|
*/
|
|
118
138
|
handleFileUploadClick(event: MouseEvent): void;
|
|
119
|
-
/**
|
|
120
|
-
* Handles the selection of an individual document.
|
|
121
|
-
* Opens a dialog to display or manage the selected document.
|
|
122
|
-
* @param {DocumentModel} document - The document that was clicked by the user.
|
|
123
|
-
* @memberof DocumentListComponent
|
|
124
|
-
*/
|
|
125
|
-
handleClickForDocument(document: DocumentModel): void;
|
|
126
139
|
/**
|
|
127
140
|
* Handles the save click event to update the document's file name.
|
|
128
141
|
* This method creates a payload with the updated file name and calls the
|
|
@@ -131,11 +144,6 @@ export declare class DocumentListComponent implements OnInit {
|
|
|
131
144
|
* @returns {void}
|
|
132
145
|
*/
|
|
133
146
|
handleSaveClick(): void;
|
|
134
|
-
/**
|
|
135
|
-
* Closes the dialog and resets the selected document.
|
|
136
|
-
* @memberof DocumentListComponent
|
|
137
|
-
*/
|
|
138
|
-
handleCloseModal(): void;
|
|
139
147
|
/**
|
|
140
148
|
* Handles the upload action for a document.
|
|
141
149
|
* Validates if a document type is selected and logs the result.
|
|
@@ -150,6 +158,35 @@ export declare class DocumentListComponent implements OnInit {
|
|
|
150
158
|
*/
|
|
151
159
|
getDocumentTypeList(): void;
|
|
152
160
|
handleOpenSideBar(isVisible: boolean): void;
|
|
161
|
+
/**
|
|
162
|
+
* Builds table data for all document categories
|
|
163
|
+
*/
|
|
164
|
+
private buildCategoryTables;
|
|
165
|
+
/**
|
|
166
|
+
* Gets completion count for a category
|
|
167
|
+
*/
|
|
168
|
+
getCompletionCount(category: DocumentListResponse): string;
|
|
169
|
+
/**
|
|
170
|
+
* Gets pending document count for a category
|
|
171
|
+
*/
|
|
172
|
+
getPendingDocumentCount(category: DocumentListResponse): number;
|
|
173
|
+
/**
|
|
174
|
+
* Gets approved document count for a category
|
|
175
|
+
*/
|
|
176
|
+
getApprovedDocumentCount(category: DocumentListResponse): number;
|
|
177
|
+
/**
|
|
178
|
+
* Builds document categories from the API response
|
|
179
|
+
*/
|
|
180
|
+
buildDocumentCategories(): void;
|
|
181
|
+
/**
|
|
182
|
+
* Sets up subscription to document list response from store
|
|
183
|
+
*/
|
|
184
|
+
private setupDocumentListSubscription;
|
|
185
|
+
handleTableRowClick(rowData: any): void;
|
|
186
|
+
/**
|
|
187
|
+
* Cleanup subscriptions on component destroy
|
|
188
|
+
*/
|
|
189
|
+
ngOnDestroy(): void;
|
|
153
190
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentListComponent, never>;
|
|
154
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentListComponent, "lib-document-list", never, { "contextId": { "alias": "contextId"; "required": false; }; "
|
|
191
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentListComponent, "lib-document-list", never, { "contextId": { "alias": "contextId"; "required": false; }; "documentListResponse": { "alias": "documentListResponse"; "required": false; }; "isUploadButtonVisible": { "alias": "isUploadButtonVisible"; "required": false; }; "documentList": { "alias": "documentList"; "required": false; }; "status": { "alias": "status"; "required": false; }; "category": { "alias": "category"; "required": false; }; "searchKey": { "alias": "searchKey"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
155
192
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { DocumentQuery } from '../../state/document.query';
|
|
3
|
+
import { StatusCalculatorService, CalculatedStatusData } from '../../services/status-calculator.service';
|
|
4
|
+
import { DocumentHelperService } from '../../services/document.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class DocumentStatusComponent implements OnInit, OnDestroy {
|
|
7
|
+
private documentQuery;
|
|
8
|
+
private documentService;
|
|
9
|
+
private statusCalculatorService;
|
|
10
|
+
contextId: string;
|
|
11
|
+
statusData: any;
|
|
12
|
+
selectedStatusId: string | null;
|
|
13
|
+
statusDataWithPercentages: CalculatedStatusData[];
|
|
14
|
+
private subscription;
|
|
15
|
+
constructor(documentQuery: DocumentQuery, documentService: DocumentHelperService, statusCalculatorService: StatusCalculatorService);
|
|
16
|
+
ngOnInit(): void;
|
|
17
|
+
ngOnDestroy(): void;
|
|
18
|
+
selectStatus(statusId: string): void;
|
|
19
|
+
private updateCalculatedStatusData;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentStatusComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentStatusComponent, "lib-document-status", never, { "contextId": { "alias": "contextId"; "required": false; }; "statusData": { "alias": "statusData"; "required": false; }; }, {}, never, never, false, never>;
|
|
22
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { OnChanges, OnDestroy } from '@angular/core';
|
|
2
2
|
import { DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
3
3
|
import { DocumentHttpService } from '../../services/document-http.service';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { DocumentHelperService } from '../../services/document.service';
|
|
5
|
+
import { DocumentListItem } from '../../models/document-list-response.model';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
8
|
* Component for viewing and managing document details.
|
|
@@ -16,12 +16,12 @@ export declare class DocumentViewerComponent implements OnChanges, OnDestroy {
|
|
|
16
16
|
* Get the selected document by user.
|
|
17
17
|
* @type {*}
|
|
18
18
|
*/
|
|
19
|
-
selectedDocument?:
|
|
19
|
+
selectedDocument?: DocumentListItem;
|
|
20
20
|
/**
|
|
21
21
|
* Get the selected document by user.
|
|
22
22
|
* @type {*}
|
|
23
23
|
*/
|
|
24
|
-
documentList?:
|
|
24
|
+
documentList?: DocumentListItem[];
|
|
25
25
|
/**
|
|
26
26
|
* Indicates whether a checkbox is selected.
|
|
27
27
|
* @type {boolean}
|
|
@@ -53,13 +53,13 @@ export declare class DocumentViewerComponent implements OnChanges, OnDestroy {
|
|
|
53
53
|
* @param {DocumentHttpService} documentHttpService - Handle the http service.
|
|
54
54
|
* @param {DocumentService} documentService - Handle the states.
|
|
55
55
|
*/
|
|
56
|
-
constructor(documentHttpService: DocumentHttpService, documentService:
|
|
56
|
+
constructor(documentHttpService: DocumentHttpService, documentService: DocumentHelperService);
|
|
57
57
|
/**
|
|
58
58
|
* Fetches the alerts for the selected document.
|
|
59
59
|
* @returns {void}
|
|
60
60
|
*/
|
|
61
61
|
ngOnChanges(): void;
|
|
62
|
-
handleSelectedDocument(document:
|
|
62
|
+
handleSelectedDocument(document: DocumentListItem): void;
|
|
63
63
|
/**
|
|
64
64
|
* Determines if the given content type is an image.
|
|
65
65
|
* @param {string | undefined} contentType - The MIME type of the content.
|
|
@@ -1,6 +1,43 @@
|
|
|
1
|
+
import { OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { DocumentStore } from '../../state/document.store';
|
|
3
|
+
import { DocumentQuery } from '../../state/document.query';
|
|
4
|
+
import { DocumentCategory, DocumentCategoryItem } from '../../models/document-category.model';
|
|
5
|
+
import { DocumentMenuService } from '../../services/document-menu.service';
|
|
6
|
+
import { DocumentHelperService } from '../../services/document.service';
|
|
1
7
|
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class DocumentsMenuComponent {
|
|
3
|
-
|
|
8
|
+
export declare class DocumentsMenuComponent implements OnInit, OnChanges {
|
|
9
|
+
private documentStore;
|
|
10
|
+
private documentQuery;
|
|
11
|
+
private documentMenuService;
|
|
12
|
+
private documentHelperService;
|
|
13
|
+
catagories: DocumentCategory[];
|
|
14
|
+
applicationNumber: string;
|
|
15
|
+
contextId: string;
|
|
16
|
+
selectedMenuItem: string | null;
|
|
17
|
+
selectedMenuItemId: string | null;
|
|
18
|
+
constructor(documentStore: DocumentStore, documentQuery: DocumentQuery, documentMenuService: DocumentMenuService, documentHelperService: DocumentHelperService);
|
|
19
|
+
ngOnInit(): void;
|
|
20
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
21
|
+
/**
|
|
22
|
+
* Finds the label of a menu item by its _id
|
|
23
|
+
* @param id The _id to search for
|
|
24
|
+
* @returns The label of the menu item or null if not found
|
|
25
|
+
*/
|
|
26
|
+
private findMenuItemLabelById;
|
|
27
|
+
/**
|
|
28
|
+
* Update menu use catagories
|
|
29
|
+
*/
|
|
30
|
+
private updateMenuItemsData;
|
|
31
|
+
/**
|
|
32
|
+
* Handle the menu item click
|
|
33
|
+
* @param {*} event - Event
|
|
34
|
+
* @param {DocumentCategoryItem} item - catagory item
|
|
35
|
+
*/
|
|
36
|
+
onMenuItemClick(event: any, item: DocumentCategoryItem): void;
|
|
37
|
+
onSelectMenuItem(menuItemId: string): void;
|
|
38
|
+
onUnselectMenuItem(): void;
|
|
39
|
+
getSelectedMenuItem(): string | null;
|
|
40
|
+
getSelectedMenuItemId(): string | null;
|
|
4
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentsMenuComponent, never>;
|
|
5
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentsMenuComponent, "lib-documents-menu", never, {}, {}, never, never, false, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentsMenuComponent, "lib-documents-menu", never, { "catagories": { "alias": "catagories"; "required": false; }; "applicationNumber": { "alias": "applicationNumber"; "required": false; }; "contextId": { "alias": "contextId"; "required": false; }; }, {}, never, never, false, never>;
|
|
6
43
|
}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
1
2
|
import { DocumentModel } from '../../models/document.model';
|
|
2
3
|
import { FolderBlockModel } from '../../models/folder.model';
|
|
4
|
+
import { DocumentQuery } from '../../state/document.query';
|
|
5
|
+
import { UserListModel } from '../../models/user-list.model';
|
|
6
|
+
import { StatusDataModel } from '../../models/status-data.model';
|
|
7
|
+
import { DocumentCategory } from '../../models/document-category.model';
|
|
3
8
|
import * as i0 from "@angular/core";
|
|
4
9
|
/**
|
|
5
10
|
* The `FolderContainerComponent` is responsible for rendering a container
|
|
6
11
|
* that displays a list of documents and associated folder panel data.
|
|
7
|
-
*
|
|
8
12
|
* This component utilizes the `FOLDERPANEL` constant for folder panel data
|
|
9
13
|
* and accepts a document list input of type `DocumentModel`.
|
|
10
14
|
*/
|
|
11
|
-
export declare class FolderContainerComponent {
|
|
15
|
+
export declare class FolderContainerComponent implements OnInit {
|
|
16
|
+
private documentQuery;
|
|
12
17
|
/**
|
|
13
18
|
* A list of documents passed as input to the component.
|
|
14
19
|
* Represents the document data to be displayed in the folder container.
|
|
@@ -24,6 +29,31 @@ export declare class FolderContainerComponent {
|
|
|
24
29
|
* @type {string}
|
|
25
30
|
*/
|
|
26
31
|
contextId: string;
|
|
32
|
+
/**
|
|
33
|
+
* The list of users passed as input to the component.
|
|
34
|
+
* @type {UserListModel[]}
|
|
35
|
+
*/
|
|
36
|
+
userList: UserListModel[];
|
|
37
|
+
/**
|
|
38
|
+
* The status data passed as input to the component.
|
|
39
|
+
* @type {StatusDataModel[]}
|
|
40
|
+
*/
|
|
41
|
+
statusData: StatusDataModel[];
|
|
42
|
+
/**
|
|
43
|
+
* The document categories passed as input to the component.
|
|
44
|
+
* @type {DocumentCategory[]}
|
|
45
|
+
*/
|
|
46
|
+
categories: DocumentCategory[];
|
|
47
|
+
/**
|
|
48
|
+
* Flag to control user list visibility
|
|
49
|
+
*/
|
|
50
|
+
showUserList: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Animation state for user list visibility
|
|
53
|
+
*/
|
|
54
|
+
userListAnimationState: string;
|
|
55
|
+
constructor(documentQuery: DocumentQuery);
|
|
56
|
+
ngOnInit(): void;
|
|
27
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<FolderContainerComponent, never>;
|
|
28
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FolderContainerComponent, "lib-folder-container", never, { "documentList": { "alias": "documentList"; "required": false; }; "folderList": { "alias": "folderList"; "required": false; }; "contextId": { "alias": "contextId"; "required": false; }; }, {}, never, never, false, never>;
|
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FolderContainerComponent, "lib-folder-container", never, { "documentList": { "alias": "documentList"; "required": false; }; "folderList": { "alias": "folderList"; "required": false; }; "contextId": { "alias": "contextId"; "required": false; }; "userList": { "alias": "userList"; "required": false; }; "statusData": { "alias": "statusData"; "required": false; }; "categories": { "alias": "categories"; "required": false; }; }, {}, never, never, false, never>;
|
|
29
59
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import { DocumentModel } from '../../models/document.model';
|
|
3
|
+
import { DocumentListItem } from '../../models/document-list-response.model';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
/**
|
|
5
6
|
* Description placeholder
|
|
@@ -12,17 +13,17 @@ export declare class LinkedDocumentComponent {
|
|
|
12
13
|
* Selected document for view.
|
|
13
14
|
* @type {?DocumentModel}
|
|
14
15
|
*/
|
|
15
|
-
selectedDocument?:
|
|
16
|
+
selectedDocument?: DocumentListItem;
|
|
16
17
|
/**
|
|
17
18
|
* Whole document list.
|
|
18
19
|
* @type {?DocumentModel[]}
|
|
19
20
|
*/
|
|
20
|
-
documentList?:
|
|
21
|
+
documentList?: DocumentListItem[];
|
|
21
22
|
/**
|
|
22
23
|
* Changed selected document.
|
|
23
24
|
* @type {*}
|
|
24
25
|
*/
|
|
25
|
-
selectedDocumentChange: EventEmitter<
|
|
26
|
+
selectedDocumentChange: EventEmitter<DocumentListItem>;
|
|
26
27
|
/**
|
|
27
28
|
* Filtered documents.
|
|
28
29
|
* @type {DocumentModel[]}
|
|
@@ -32,7 +33,7 @@ export declare class LinkedDocumentComponent {
|
|
|
32
33
|
* Handle the click on the document.
|
|
33
34
|
* @param {DocumentModel} document - Clicked document.
|
|
34
35
|
*/
|
|
35
|
-
handleDocumentClick(document:
|
|
36
|
+
handleDocumentClick(document: DocumentListItem): void;
|
|
36
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<LinkedDocumentComponent, never>;
|
|
37
38
|
static ɵcmp: i0.ɵɵComponentDeclaration<LinkedDocumentComponent, "app-linked-document", never, { "selectedDocument": { "alias": "selectedDocument"; "required": false; }; "documentList": { "alias": "documentList"; "required": false; }; }, { "selectedDocumentChange": "selectedDocumentChange"; }, never, never, false, never>;
|
|
38
39
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { DocumentStore } from '../../state/document.store';
|
|
3
|
+
import { DocumentQuery } from '../../state/document.query';
|
|
4
|
+
import { UserListModel } from '../../models/user-list.model';
|
|
5
|
+
import { UserListService } from '../../services/user-list.service';
|
|
6
|
+
import { DocumentCategory } from '../../models/document-category.model';
|
|
7
|
+
import { DocumentHelperService } from '../../services/document.service';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class UserListComponent implements OnInit, OnChanges {
|
|
10
|
+
documentService: DocumentHelperService;
|
|
11
|
+
private documentStore;
|
|
12
|
+
private documentQuery;
|
|
13
|
+
private userListService;
|
|
14
|
+
userList: UserListModel[];
|
|
15
|
+
categories: DocumentCategory[];
|
|
16
|
+
userSelected: EventEmitter<string>;
|
|
17
|
+
userData: UserListModel[];
|
|
18
|
+
filteredUserData: UserListModel[];
|
|
19
|
+
selectedUser: string | undefined;
|
|
20
|
+
shouldShowContainer: boolean;
|
|
21
|
+
constructor(documentService: DocumentHelperService, documentStore: DocumentStore, documentQuery: DocumentQuery, userListService: UserListService);
|
|
22
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
23
|
+
private initializeUserData;
|
|
24
|
+
private updateFilteredUserData;
|
|
25
|
+
ngOnInit(): void;
|
|
26
|
+
onUserSelect(username: string, id: string): void;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserListComponent, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UserListComponent, "lib-user-list", never, { "userList": { "alias": "userList"; "required": false; }; "categories": { "alias": "categories"; "required": false; }; }, { "userSelected": "userSelected"; }, never, never, false, never>;
|
|
29
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TemplateRef, ViewContainerRef } from "@angular/core";
|
|
2
|
-
import {
|
|
2
|
+
import { DocumentHelperService } from "../services/document.service";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
5
5
|
* Directive to display the document data
|
|
@@ -14,7 +14,7 @@ export declare class DocumentDirective {
|
|
|
14
14
|
* @param templateRef Reference to the template.
|
|
15
15
|
* @param vcr View container reference to manage the view.
|
|
16
16
|
*/
|
|
17
|
-
constructor(documentService:
|
|
17
|
+
constructor(documentService: DocumentHelperService, templateRef: TemplateRef<any>, vcr: ViewContainerRef);
|
|
18
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentDirective, never>;
|
|
19
19
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DocumentDirective, "[doc]", never, {}, {}, never, never, false, never>;
|
|
20
20
|
}
|
|
@@ -10,26 +10,30 @@ import * as i8 from "./directives/document.directive";
|
|
|
10
10
|
import * as i9 from "./directives/permission.directive";
|
|
11
11
|
import * as i10 from "./components/linked-document/linked-document.component";
|
|
12
12
|
import * as i11 from "./components/documents-menu/documents-menu.component";
|
|
13
|
-
import * as i12 from "
|
|
14
|
-
import * as i13 from "
|
|
15
|
-
import * as i14 from "@angular/common
|
|
16
|
-
import * as i15 from "primeng/
|
|
17
|
-
import * as i16 from "
|
|
18
|
-
import * as i17 from "primeng/
|
|
19
|
-
import * as i18 from "primeng/
|
|
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 "
|
|
26
|
-
import * as i25 from "
|
|
27
|
-
import * as i26 from "
|
|
28
|
-
import * as i27 from "
|
|
29
|
-
import * as i28 from "primeng/
|
|
30
|
-
import * as i29 from "primeng/
|
|
31
|
-
import * as i30 from "primeng/
|
|
32
|
-
import * as i31 from "primeng/
|
|
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 "@angular/common";
|
|
16
|
+
import * as i15 from "primeng/accordion";
|
|
17
|
+
import * as i16 from "@angular/common/http";
|
|
18
|
+
import * as i17 from "primeng/button";
|
|
19
|
+
import * as i18 from "primeng/sidebar";
|
|
20
|
+
import * as i19 from "primeng/fileupload";
|
|
21
|
+
import * as i20 from "primeng/progressbar";
|
|
22
|
+
import * as i21 from "primeng/badge";
|
|
23
|
+
import * as i22 from "primeng/listbox";
|
|
24
|
+
import * as i23 from "primeng/checkbox";
|
|
25
|
+
import * as i24 from "primeng/timeline";
|
|
26
|
+
import * as i25 from "primeng/inputtextarea";
|
|
27
|
+
import * as i26 from "@angular/forms";
|
|
28
|
+
import * as i27 from "ng2-pdf-viewer";
|
|
29
|
+
import * as i28 from "primeng/dialog";
|
|
30
|
+
import * as i29 from "primeng/dropdown";
|
|
31
|
+
import * as i30 from "primeng/inputtext";
|
|
32
|
+
import * as i31 from "primeng/menu";
|
|
33
|
+
import * as i32 from "primeng/panelmenu";
|
|
34
|
+
import * as i33 from "primeng/card";
|
|
35
|
+
import * as i34 from "primeng/table";
|
|
36
|
+
import * as i35 from "../../Shared/shared.module";
|
|
33
37
|
/**
|
|
34
38
|
* @module DocumentModule
|
|
35
39
|
*
|
|
@@ -39,6 +43,6 @@ import * as i31 from "primeng/card";
|
|
|
39
43
|
*/
|
|
40
44
|
export declare class DocumentModule {
|
|
41
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentModule, never>;
|
|
42
|
-
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.DocumentDirective, typeof i9.HasPermissionDirective, typeof i10.LinkedDocumentComponent, typeof i11.DocumentsMenuComponent], [typeof
|
|
46
|
+
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.DocumentDirective, typeof i9.HasPermissionDirective, typeof i10.LinkedDocumentComponent, typeof i11.DocumentsMenuComponent, typeof i12.UserListComponent, typeof i13.DocumentStatusComponent], [typeof i14.CommonModule, typeof i15.AccordionModule, typeof i16.HttpClientModule, typeof i17.ButtonModule, typeof i18.SidebarModule, typeof i19.FileUploadModule, typeof i20.ProgressBarModule, typeof i21.BadgeModule, typeof i22.ListboxModule, typeof i23.CheckboxModule, typeof i24.TimelineModule, typeof i25.InputTextareaModule, typeof i26.FormsModule, typeof i27.PdfViewerModule, typeof i28.DialogModule, typeof i29.DropdownModule, typeof i30.InputTextModule, typeof i31.MenuModule, typeof i32.PanelMenuModule, typeof i33.CardModule, typeof i34.TableModule, typeof i35.SharedModule], [typeof i9.HasPermissionDirective, typeof i1.DocumentContainerComponent, typeof i7.DocumentViewerComponent, typeof i4.DocumentListComponent, typeof i8.DocumentDirective]>;
|
|
43
47
|
static ɵinj: i0.ɵɵInjectorDeclaration<DocumentModule>;
|
|
44
48
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface DocumentCategoryStatus {
|
|
2
|
+
Pending: number;
|
|
3
|
+
Reviewing: number;
|
|
4
|
+
Accepted: number;
|
|
5
|
+
Rejected: number;
|
|
6
|
+
}
|
|
7
|
+
export interface DocumentCategoryItem {
|
|
8
|
+
_id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
icon: string;
|
|
11
|
+
status: DocumentCategoryStatus;
|
|
12
|
+
}
|
|
13
|
+
export interface DocumentCategory {
|
|
14
|
+
label: string;
|
|
15
|
+
items: DocumentCategoryItem[];
|
|
16
|
+
}
|
|
17
|
+
export interface DocumentCategoriesResponse {
|
|
18
|
+
categories: DocumentCategory[];
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a document list item within a category
|
|
3
|
+
*/
|
|
4
|
+
export interface DocumentListItem {
|
|
5
|
+
_id: string;
|
|
6
|
+
fileName: string;
|
|
7
|
+
docName: string;
|
|
8
|
+
fileSize: string;
|
|
9
|
+
documentUrl: string;
|
|
10
|
+
status: string;
|
|
11
|
+
uploadedOn: string;
|
|
12
|
+
ownerName: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Represents the complete document list response
|
|
16
|
+
*/
|
|
17
|
+
export interface DocumentListResponse {
|
|
18
|
+
label: string;
|
|
19
|
+
categoryDescription: string;
|
|
20
|
+
totalDocs: number;
|
|
21
|
+
acceptedDocs: number;
|
|
22
|
+
list: DocumentListItem[];
|
|
23
|
+
completed: string;
|
|
24
|
+
}
|