cat-documents-ng 0.3.2 → 0.3.3
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.
|
@@ -8,6 +8,7 @@ import { UserListModel } from '../../models/user-list.model';
|
|
|
8
8
|
import { StatusDataModel } from '../../models/status-data.model';
|
|
9
9
|
import { DocumentListResponse } from '../../models/document-list-response.model';
|
|
10
10
|
import { DocumentHelperService } from '../../services/document.service';
|
|
11
|
+
import { DocumentMenuService } from '../../services/document-menu.service';
|
|
11
12
|
import * as i0 from "@angular/core";
|
|
12
13
|
/**
|
|
13
14
|
*This component is responsible for managing and displaying a list of documents.
|
|
@@ -19,6 +20,8 @@ export declare class DocumentContainerComponent implements OnInit, OnDestroy, On
|
|
|
19
20
|
private documentHelperService;
|
|
20
21
|
private documentQuery;
|
|
21
22
|
private documentStore;
|
|
23
|
+
private documentMenuService;
|
|
24
|
+
refreshTrigger: any;
|
|
22
25
|
/**
|
|
23
26
|
* The document list response data
|
|
24
27
|
* @type {DocumentListResponse[] | null}
|
|
@@ -57,8 +60,9 @@ export declare class DocumentContainerComponent implements OnInit, OnDestroy, On
|
|
|
57
60
|
* @param {DocumentHelperService} documentHelperService - Service for document operations
|
|
58
61
|
* @param {DocumentQuery} documentQuery - Query service for document state
|
|
59
62
|
* @param {DocumentStore} documentStore - Store service for document state
|
|
63
|
+
* @param {DocumentMenuService} documentMenuService - Service for menu operations
|
|
60
64
|
*/
|
|
61
|
-
constructor(documentHttpService: DocumentHttpService, documentHelperService: DocumentHelperService, documentQuery: DocumentQuery, documentStore: DocumentStore);
|
|
65
|
+
constructor(documentHttpService: DocumentHttpService, documentHelperService: DocumentHelperService, documentQuery: DocumentQuery, documentStore: DocumentStore, documentMenuService: DocumentMenuService);
|
|
62
66
|
/**
|
|
63
67
|
* Get contextId in input.
|
|
64
68
|
* @type {string}
|
|
@@ -71,6 +75,11 @@ export declare class DocumentContainerComponent implements OnInit, OnDestroy, On
|
|
|
71
75
|
applicationNumber: string;
|
|
72
76
|
catagories: DocumentCategory[];
|
|
73
77
|
userList: UserListModel[];
|
|
78
|
+
/**
|
|
79
|
+
* Sorted menu items used to determine document section order
|
|
80
|
+
* @type {DocumentCategory[]}
|
|
81
|
+
*/
|
|
82
|
+
sortedMenuItems: DocumentCategory[];
|
|
74
83
|
/**
|
|
75
84
|
* Holds the subscription to manage observable cleanup.
|
|
76
85
|
* @type {Subscription}
|
|
@@ -149,5 +158,5 @@ export declare class DocumentContainerComponent implements OnInit, OnDestroy, On
|
|
|
149
158
|
*/
|
|
150
159
|
ngOnDestroy(): void;
|
|
151
160
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentContainerComponent, never>;
|
|
152
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentContainerComponent, "lib-document-container", never, { "contextId": { "alias": "contextId"; "required": false; }; }, { "selectedDocument": "selectedDocument"; }, never, ["*"], false, never>;
|
|
161
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentContainerComponent, "lib-document-container", never, { "refreshTrigger": { "alias": "refreshTrigger"; "required": false; }; "contextId": { "alias": "contextId"; "required": false; }; }, { "selectedDocument": "selectedDocument"; }, never, ["*"], false, never>;
|
|
153
162
|
}
|
|
@@ -4,6 +4,7 @@ import { TableData } from '../../../../Shared/components/table-primary/table-pri
|
|
|
4
4
|
import { DocumentListService } from '../../services/document-list.service';
|
|
5
5
|
import { Message } from 'primeng/api';
|
|
6
6
|
import { DocumentHttpService } from '../../services/document-http.service';
|
|
7
|
+
import { DocumentMenuService } from '../../services/document-menu.service';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
/**
|
|
9
10
|
* This component is responsible for displaying and managing a list of documents.
|
|
@@ -13,6 +14,7 @@ import * as i0 from "@angular/core";
|
|
|
13
14
|
export declare class DocumentListComponent implements OnInit, OnDestroy, OnChanges, AfterViewInit {
|
|
14
15
|
private documentListService;
|
|
15
16
|
private documentHttpService;
|
|
17
|
+
private documentMenuService;
|
|
16
18
|
/**
|
|
17
19
|
* Represents the context ID for the document list.
|
|
18
20
|
* This value is passed from the parent component.
|
|
@@ -43,6 +45,13 @@ export declare class DocumentListComponent implements OnInit, OnDestroy, OnChang
|
|
|
43
45
|
categoryLabel: string;
|
|
44
46
|
categoryIndex: number;
|
|
45
47
|
} | null;
|
|
48
|
+
/**
|
|
49
|
+
* Sorted menu items from the documents menu component
|
|
50
|
+
* Used to determine the order of document sections
|
|
51
|
+
* @type {any[]}
|
|
52
|
+
* @memberof DocumentListComponent
|
|
53
|
+
*/
|
|
54
|
+
sortedMenuItems: any[];
|
|
46
55
|
/**
|
|
47
56
|
* Reference to the document categories container for scrolling
|
|
48
57
|
*/
|
|
@@ -128,6 +137,14 @@ export declare class DocumentListComponent implements OnInit, OnDestroy, OnChang
|
|
|
128
137
|
* The file extension of the document being edited
|
|
129
138
|
*/
|
|
130
139
|
documentExtension: string;
|
|
140
|
+
/**
|
|
141
|
+
* Controls whether the document name input field is visible for editing
|
|
142
|
+
*/
|
|
143
|
+
isEditingDocumentName: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* The alias name returned after successful document name update
|
|
146
|
+
*/
|
|
147
|
+
aliasName: string;
|
|
131
148
|
handleSelectedDocument: EventEmitter<DocumentListItem>;
|
|
132
149
|
/**
|
|
133
150
|
* Regular expression to match disallowed characters in file names.
|
|
@@ -144,7 +161,7 @@ export declare class DocumentListComponent implements OnInit, OnDestroy, OnChang
|
|
|
144
161
|
* @class
|
|
145
162
|
* @param {DocumentListService} documentListService - The service responsible for document list operations.
|
|
146
163
|
*/
|
|
147
|
-
constructor(documentListService: DocumentListService, documentHttpService: DocumentHttpService);
|
|
164
|
+
constructor(documentListService: DocumentListService, documentHttpService: DocumentHttpService, documentMenuService: DocumentMenuService);
|
|
148
165
|
/**
|
|
149
166
|
* Handles changes to input properties
|
|
150
167
|
*/
|
|
@@ -167,6 +184,16 @@ export declare class DocumentListComponent implements OnInit, OnDestroy, OnChang
|
|
|
167
184
|
* Builds document categories from the API response
|
|
168
185
|
*/
|
|
169
186
|
buildDocumentCategories(): void;
|
|
187
|
+
/**
|
|
188
|
+
* Reorders document categories to match the menu item order
|
|
189
|
+
* This ensures sections are displayed in the same order as menu items
|
|
190
|
+
*/
|
|
191
|
+
private reorderCategoriesByMenuItemOrder;
|
|
192
|
+
/**
|
|
193
|
+
* Gets the menu item order from the sorted menu items input
|
|
194
|
+
* This ensures sections are displayed in the same order as the sorted menu items
|
|
195
|
+
*/
|
|
196
|
+
private getMenuItemOrder;
|
|
170
197
|
/**
|
|
171
198
|
* Sets up subscription to document list response from store
|
|
172
199
|
*/
|
|
@@ -180,6 +207,14 @@ export declare class DocumentListComponent implements OnInit, OnDestroy, OnChang
|
|
|
180
207
|
* @param {any} rowData - The row data containing the document to delete
|
|
181
208
|
*/
|
|
182
209
|
handleDeleteAction(rowData: any): void;
|
|
210
|
+
/**
|
|
211
|
+
* Handles clicking on the document name to enable editing
|
|
212
|
+
*/
|
|
213
|
+
onDocumentNameClick(): void;
|
|
214
|
+
/**
|
|
215
|
+
* Cancels editing and resets the document name
|
|
216
|
+
*/
|
|
217
|
+
cancelDocumentNameEdit(): void;
|
|
183
218
|
/**
|
|
184
219
|
* Closes the document viewer dialog and resets the selected document
|
|
185
220
|
*/
|
|
@@ -227,5 +262,5 @@ export declare class DocumentListComponent implements OnInit, OnDestroy, OnChang
|
|
|
227
262
|
*/
|
|
228
263
|
ngOnDestroy(): void;
|
|
229
264
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentListComponent, never>;
|
|
230
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentListComponent, "lib-document-list", never, { "contextId": { "alias": "contextId"; "required": false; }; "documentListResponse": { "alias": "documentListResponse"; "required": false; }; "selectedMenuItemId": { "alias": "selectedMenuItemId"; "required": false; }; "navigationInfo": { "alias": "navigationInfo"; "required": false; }; "documentList": { "alias": "documentList"; "required": false; }; }, { "handleSelectedDocument": "handleSelectedDocument"; }, never, ["*"], false, never>;
|
|
265
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentListComponent, "lib-document-list", never, { "contextId": { "alias": "contextId"; "required": false; }; "documentListResponse": { "alias": "documentListResponse"; "required": false; }; "selectedMenuItemId": { "alias": "selectedMenuItemId"; "required": false; }; "navigationInfo": { "alias": "navigationInfo"; "required": false; }; "sortedMenuItems": { "alias": "sortedMenuItems"; "required": false; }; "documentList": { "alias": "documentList"; "required": false; }; }, { "handleSelectedDocument": "handleSelectedDocument"; }, never, ["*"], false, never>;
|
|
231
266
|
}
|