cat-documents-ng 1.0.6 → 1.0.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/README.md +322 -322
- package/Shared/components/confirmation-dialog/confirmation-dialog.component.d.ts +44 -0
- package/Shared/components/table-primary/table-primary.component.d.ts +31 -0
- package/Shared/components/table-primary/table-primary.model.d.ts +19 -0
- package/Shared/constant/ERROR.d.ts +52 -0
- package/Shared/constant/SHARED.d.ts +546 -0
- package/{src/Shared/constant/URLS.ts → Shared/constant/URLS.d.ts} +25 -31
- package/Shared/services/app-config.service.d.ts +51 -0
- package/{src/Shared/services/global-error.handler.ts → Shared/services/global-error.handler.d.ts} +9 -11
- package/Shared/services/session.service.d.ts +46 -0
- package/Shared/shared.module.d.ts +14 -0
- package/fesm2022/cat-documents-ng.mjs +11405 -0
- package/fesm2022/cat-documents-ng.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/document/components/document-actions/document-actions.component.d.ts +78 -0
- package/lib/document/components/document-container/document-container.component.d.ts +162 -0
- package/lib/document/components/document-content-viewer/document-content-viewer.component.d.ts +291 -0
- package/lib/document/components/document-history/document-history.component.d.ts +160 -0
- package/lib/document/components/document-list/document-list.component.d.ts +299 -0
- package/lib/document/components/document-list-item/document-list-item.component.d.ts +28 -0
- package/lib/document/components/document-search/document-search.component.d.ts +77 -0
- package/lib/document/components/document-status/document-status.component.d.ts +24 -0
- package/lib/document/components/document-upload/document-upload.component.d.ts +321 -0
- package/lib/document/components/document-viewer/document-viewer.component.d.ts +137 -0
- package/lib/document/components/document-zoom-controls/document-zoom-controls.component.d.ts +33 -0
- package/lib/document/components/documents-menu/documents-menu.component.d.ts +110 -0
- package/{src/lib/document/components/folder-block/folder-block.component.ts → lib/document/components/folder-block/folder-block.component.d.ts} +12 -28
- package/lib/document/components/folder-container/folder-container.component.d.ts +162 -0
- package/lib/document/components/linked-document/linked-document.component.d.ts +39 -0
- package/lib/document/components/request-document/request-document.component.d.ts +69 -0
- package/lib/document/components/sidebar/sidebar.component.d.ts +109 -0
- package/lib/document/components/user-list/user-list.component.d.ts +34 -0
- package/lib/document/constant/DOCUMENT_HISTORY.d.ts +41 -0
- package/lib/document/directives/document.directive.d.ts +20 -0
- package/lib/document/directives/permission.directive.d.ts +38 -0
- package/lib/document/document.module.d.ts +60 -0
- package/{src/lib/document/models/document-alert.model.ts → lib/document/models/document-alert.model.d.ts} +4 -11
- package/lib/document/models/document-category.model.d.ts +24 -0
- package/lib/document/models/document-history.model.d.ts +94 -0
- package/lib/document/models/document-list-response.model.d.ts +33 -0
- package/lib/document/models/document-type.model.d.ts +37 -0
- package/lib/document/models/document.model.d.ts +44 -0
- package/{src/lib/document/models/folder.model.ts → lib/document/models/folder.model.d.ts} +4 -10
- package/lib/document/models/status-data.model.d.ts +27 -0
- package/lib/document/models/uploaded-file-response.model.d.ts +7 -0
- package/lib/document/models/user-list.model.d.ts +8 -0
- package/lib/document/services/csv-parser.service.d.ts +88 -0
- package/lib/document/services/document-actions.service.d.ts +48 -0
- package/lib/document/services/document-content-type.service.d.ts +85 -0
- package/lib/document/services/document-history-style.service.d.ts +34 -0
- package/lib/document/services/document-history.service.d.ts +42 -0
- package/lib/document/services/document-http.service.d.ts +179 -0
- package/lib/document/services/document-list.service.d.ts +74 -0
- package/lib/document/services/document-menu.service.d.ts +122 -0
- package/lib/document/services/document-scroll.service.d.ts +55 -0
- package/lib/document/services/document-table-builder.service.d.ts +38 -0
- package/lib/document/services/document-upload-business.service.d.ts +107 -0
- package/lib/document/services/document-upload-data.service.d.ts +40 -0
- package/lib/document/services/document-upload-form.service.d.ts +41 -0
- package/lib/document/services/document-upload.service.d.ts +99 -0
- package/lib/document/services/document-viewer.service.d.ts +97 -0
- package/lib/document/services/document-zoom.service.d.ts +81 -0
- package/lib/document/services/document.service.d.ts +161 -0
- package/lib/document/services/eml-parser.service.d.ts +116 -0
- package/lib/document/services/excel-parser.service.d.ts +169 -0
- package/lib/document/services/file-format.service.d.ts +34 -0
- package/lib/document/services/status-calculator.service.d.ts +20 -0
- package/lib/document/services/user-list.service.d.ts +29 -0
- package/lib/document/state/document.query.d.ts +243 -0
- package/{src/lib/document/state/document.service.ts → lib/document/state/document.service.d.ts} +15 -46
- package/lib/document/state/document.state.d.ts +61 -0
- package/lib/document/state/document.store.d.ts +56 -0
- package/package.json +11 -5
- package/{src/public-api.ts → public-api.d.ts} +0 -4
- package/ng-package.json +0 -10
- package/src/Shared/components/confirmation-dialog/confirmation-dialog.component.html +0 -3
- package/src/Shared/components/confirmation-dialog/confirmation-dialog.component.scss +0 -13
- package/src/Shared/components/confirmation-dialog/confirmation-dialog.component.spec.ts +0 -70
- package/src/Shared/components/confirmation-dialog/confirmation-dialog.component.ts +0 -133
- package/src/Shared/components/table-primary/table-primary.component.html +0 -66
- package/src/Shared/components/table-primary/table-primary.component.scss +0 -227
- package/src/Shared/components/table-primary/table-primary.component.spec.ts +0 -23
- package/src/Shared/components/table-primary/table-primary.component.ts +0 -143
- package/src/Shared/components/table-primary/table-primary.model.ts +0 -21
- package/src/Shared/constant/ERROR.ts +0 -55
- package/src/Shared/constant/PERMISSIONS.ts +0 -17
- package/src/Shared/constant/SHARED.ts +0 -936
- package/src/Shared/services/app-config.service.spec.ts +0 -19
- package/src/Shared/services/app-config.service.ts +0 -73
- package/src/Shared/services/session.service.spec.ts +0 -16
- package/src/Shared/services/session.service.ts +0 -76
- package/src/Shared/shared.module.ts +0 -25
- package/src/lib/document/components/csv-viewer/csv-viewer.component.ts +0 -1
- package/src/lib/document/components/document-actions/document-actions.component.html +0 -59
- package/src/lib/document/components/document-actions/document-actions.component.scss +0 -362
- package/src/lib/document/components/document-actions/document-actions.component.spec.ts +0 -297
- package/src/lib/document/components/document-actions/document-actions.component.ts +0 -163
- package/src/lib/document/components/document-container/document-container.component.html +0 -36
- package/src/lib/document/components/document-container/document-container.component.scss +0 -144
- package/src/lib/document/components/document-container/document-container.component.spec.ts +0 -110
- package/src/lib/document/components/document-container/document-container.component.ts +0 -363
- package/src/lib/document/components/document-content-viewer/document-content-viewer.component.html +0 -332
- package/src/lib/document/components/document-content-viewer/document-content-viewer.component.scss +0 -1877
- package/src/lib/document/components/document-content-viewer/document-content-viewer.component.spec.ts +0 -258
- package/src/lib/document/components/document-content-viewer/document-content-viewer.component.ts +0 -664
- package/src/lib/document/components/document-history/document-history.component.html +0 -96
- package/src/lib/document/components/document-history/document-history.component.scss +0 -392
- package/src/lib/document/components/document-history/document-history.component.spec.ts +0 -93
- package/src/lib/document/components/document-history/document-history.component.ts +0 -373
- package/src/lib/document/components/document-list/document-list.component.html +0 -46
- package/src/lib/document/components/document-list/document-list.component.scss +0 -513
- package/src/lib/document/components/document-list/document-list.component.spec.ts +0 -486
- package/src/lib/document/components/document-list/document-list.component.ts +0 -682
- package/src/lib/document/components/document-list-item/document-list-item.component.html +0 -36
- package/src/lib/document/components/document-list-item/document-list-item.component.scss +0 -34
- package/src/lib/document/components/document-list-item/document-list-item.component.spec.ts +0 -75
- package/src/lib/document/components/document-list-item/document-list-item.component.ts +0 -40
- package/src/lib/document/components/document-search/document-search.component.html +0 -64
- package/src/lib/document/components/document-search/document-search.component.scss +0 -206
- package/src/lib/document/components/document-search/document-search.component.spec.ts +0 -82
- package/src/lib/document/components/document-search/document-search.component.ts +0 -163
- package/src/lib/document/components/document-status/document-status.component.html +0 -31
- package/src/lib/document/components/document-status/document-status.component.scss +0 -192
- package/src/lib/document/components/document-status/document-status.component.spec.ts +0 -23
- package/src/lib/document/components/document-status/document-status.component.ts +0 -87
- package/src/lib/document/components/document-upload/document-upload.component.html +0 -160
- package/src/lib/document/components/document-upload/document-upload.component.scss +0 -235
- package/src/lib/document/components/document-upload/document-upload.component.spec.ts +0 -95
- package/src/lib/document/components/document-upload/document-upload.component.ts +0 -668
- package/src/lib/document/components/document-viewer/document-viewer.component.html +0 -50
- package/src/lib/document/components/document-viewer/document-viewer.component.scss +0 -187
- package/src/lib/document/components/document-viewer/document-viewer.component.spec.ts +0 -79
- package/src/lib/document/components/document-viewer/document-viewer.component.ts +0 -261
- package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.html +0 -48
- package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.scss +0 -320
- package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.spec.ts +0 -59
- package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.ts +0 -150
- package/src/lib/document/components/documents-menu/documents-menu.component.html +0 -44
- package/src/lib/document/components/documents-menu/documents-menu.component.scss +0 -363
- package/src/lib/document/components/documents-menu/documents-menu.component.spec.ts +0 -23
- package/src/lib/document/components/documents-menu/documents-menu.component.ts +0 -316
- package/src/lib/document/components/folder-block/folder-block.component.html +0 -46
- package/src/lib/document/components/folder-block/folder-block.component.scss +0 -9
- package/src/lib/document/components/folder-block/folder-block.component.spec.ts +0 -70
- package/src/lib/document/components/folder-container/folder-container.component.html +0 -56
- package/src/lib/document/components/folder-container/folder-container.component.scss +0 -20
- package/src/lib/document/components/folder-container/folder-container.component.spec.ts +0 -27
- package/src/lib/document/components/folder-container/folder-container.component.ts +0 -328
- package/src/lib/document/components/linked-document/linked-document.component.html +0 -23
- package/src/lib/document/components/linked-document/linked-document.component.scss +0 -10
- package/src/lib/document/components/linked-document/linked-document.component.spec.ts +0 -61
- package/src/lib/document/components/linked-document/linked-document.component.ts +0 -49
- package/src/lib/document/components/request-document/request-document.component.html +0 -86
- package/src/lib/document/components/request-document/request-document.component.scss +0 -16
- package/src/lib/document/components/request-document/request-document.component.ts +0 -278
- package/src/lib/document/components/sidebar/sidebar.component.html +0 -75
- package/src/lib/document/components/sidebar/sidebar.component.scss +0 -157
- package/src/lib/document/components/sidebar/sidebar.component.spec.ts +0 -114
- package/src/lib/document/components/sidebar/sidebar.component.ts +0 -223
- package/src/lib/document/components/user-list/user-list.component.html +0 -33
- package/src/lib/document/components/user-list/user-list.component.scss +0 -118
- package/src/lib/document/components/user-list/user-list.component.spec.ts +0 -23
- package/src/lib/document/components/user-list/user-list.component.ts +0 -181
- package/src/lib/document/constant/DOCUMENT_HISTORY.ts +0 -52
- package/src/lib/document/directives/document.directive.ts +0 -32
- package/src/lib/document/directives/permission.directive.spec.ts +0 -0
- package/src/lib/document/directives/permission.directive.ts +0 -72
- package/src/lib/document/document.module.ts +0 -351
- package/src/lib/document/models/document-category.model.ts +0 -30
- package/src/lib/document/models/document-history.model.ts +0 -109
- package/src/lib/document/models/document-list-response.model.ts +0 -37
- package/src/lib/document/models/document-type.model.ts +0 -44
- package/src/lib/document/models/document.model.ts +0 -53
- package/src/lib/document/models/status-data.model.ts +0 -31
- package/src/lib/document/models/uploaded-file-response.model.ts +0 -7
- package/src/lib/document/models/user-list.model.ts +0 -10
- package/src/lib/document/services/csv-parser.service.spec.ts +0 -97
- package/src/lib/document/services/csv-parser.service.ts +0 -303
- package/src/lib/document/services/document-actions.service.ts +0 -125
- package/src/lib/document/services/document-content-type.service.ts +0 -193
- package/src/lib/document/services/document-history-style.service.ts +0 -138
- package/src/lib/document/services/document-history.service.ts +0 -129
- package/src/lib/document/services/document-http.service.spec.ts +0 -119
- package/src/lib/document/services/document-http.service.ts +0 -497
- package/src/lib/document/services/document-list.service.ts +0 -195
- package/src/lib/document/services/document-menu.service.ts +0 -277
- package/src/lib/document/services/document-scroll.service.ts +0 -138
- package/src/lib/document/services/document-severity.service.ts +0 -98
- package/src/lib/document/services/document-table-builder.service.ts +0 -82
- package/src/lib/document/services/document-upload-business.service.ts +0 -326
- package/src/lib/document/services/document-upload-data.service.ts +0 -82
- package/src/lib/document/services/document-upload-form.service.ts +0 -149
- package/src/lib/document/services/document-upload.service.spec.ts +0 -99
- package/src/lib/document/services/document-upload.service.ts +0 -209
- package/src/lib/document/services/document-viewer.service.ts +0 -279
- package/src/lib/document/services/document-zoom.service.spec.ts +0 -56
- package/src/lib/document/services/document-zoom.service.ts +0 -164
- package/src/lib/document/services/document.service.ts +0 -356
- package/src/lib/document/services/eml-parser.service.ts +0 -444
- package/src/lib/document/services/excel-parser.service.spec.ts +0 -66
- package/src/lib/document/services/excel-parser.service.ts +0 -483
- package/src/lib/document/services/file-format.service.spec.ts +0 -16
- package/src/lib/document/services/file-format.service.ts +0 -63
- package/src/lib/document/services/status-calculator.service.ts +0 -44
- package/src/lib/document/services/user-list.service.ts +0 -77
- package/src/lib/document/state/document.query.ts +0 -378
- package/src/lib/document/state/document.state.ts +0 -100
- package/src/lib/document/state/document.store.ts +0 -200
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, OnDestroy, OnChanges, SimpleChanges, ElementRef, AfterViewInit } from '@angular/core';
|
|
2
|
+
import { DocumentListItem, DocumentListResponse } from '../../models/document-list-response.model';
|
|
3
|
+
import { TableData } from '../../../../Shared/components/table-primary/table-primary.model';
|
|
4
|
+
import { DocumentListService } from '../../services/document-list.service';
|
|
5
|
+
import { Message } from 'primeng/api';
|
|
6
|
+
import { DocumentHttpService } from '../../services/document-http.service';
|
|
7
|
+
import { DocumentMenuService } from '../../services/document-menu.service';
|
|
8
|
+
import { DocumentStore } from '../../state/document.store';
|
|
9
|
+
import { DocumentScrollService } from '../../services/document-scroll.service';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
/**
|
|
12
|
+
* This component is responsible for displaying and managing a list of documents.
|
|
13
|
+
* Provides functionality for file upload, document selection, and dialog management.
|
|
14
|
+
* @class DocumentListComponent
|
|
15
|
+
*/
|
|
16
|
+
export declare class DocumentListComponent implements OnInit, OnDestroy, OnChanges, AfterViewInit {
|
|
17
|
+
private documentListService;
|
|
18
|
+
private documentHttpService;
|
|
19
|
+
private documentMenuService;
|
|
20
|
+
private documentStore;
|
|
21
|
+
private documentScrollService;
|
|
22
|
+
/**
|
|
23
|
+
* Represents the context ID for the document list.
|
|
24
|
+
* This value is passed from the parent component.
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @memberof DocumentListComponent
|
|
27
|
+
*/
|
|
28
|
+
contextId: string;
|
|
29
|
+
/**
|
|
30
|
+
* The document list response data passed from the parent component.
|
|
31
|
+
* @type {DocumentListResponse[] | null}
|
|
32
|
+
* @memberof DocumentListComponent
|
|
33
|
+
*/
|
|
34
|
+
documentListResponse: DocumentListResponse[] | null;
|
|
35
|
+
/**
|
|
36
|
+
* The selected menu item ID for scrolling to specific sections
|
|
37
|
+
* @type {string | null}
|
|
38
|
+
* @memberof DocumentListComponent
|
|
39
|
+
*/
|
|
40
|
+
selectedMenuItemId: string | null;
|
|
41
|
+
/**
|
|
42
|
+
* Additional navigation information for precise scrolling
|
|
43
|
+
* @type {object | null}
|
|
44
|
+
* @memberof DocumentListComponent
|
|
45
|
+
*/
|
|
46
|
+
navigationInfo: {
|
|
47
|
+
menuItemId: string;
|
|
48
|
+
menuItemLabel: string;
|
|
49
|
+
categoryLabel: string;
|
|
50
|
+
categoryIndex: number;
|
|
51
|
+
} | null;
|
|
52
|
+
/**
|
|
53
|
+
* Reference to the document categories container for scrolling
|
|
54
|
+
*/
|
|
55
|
+
documentCategoriesContainer: ElementRef;
|
|
56
|
+
/**
|
|
57
|
+
* Subscription to document list response from store
|
|
58
|
+
*/
|
|
59
|
+
private documentListSubscription;
|
|
60
|
+
handleSelectedDocumentInNewTab: EventEmitter<{
|
|
61
|
+
selectedDocument: DocumentListItem;
|
|
62
|
+
contextId: string;
|
|
63
|
+
documentList: DocumentListItem[];
|
|
64
|
+
}>;
|
|
65
|
+
/**
|
|
66
|
+
* The currently selected document.
|
|
67
|
+
* @type {DocumentModel}
|
|
68
|
+
* @memberof DocumentListComponent
|
|
69
|
+
*/
|
|
70
|
+
selectedDocument: DocumentListItem;
|
|
71
|
+
/**
|
|
72
|
+
* Default visibility of the sidebar.
|
|
73
|
+
* @type {boolean}
|
|
74
|
+
* @memberof DocumentListComponent
|
|
75
|
+
*/
|
|
76
|
+
isSidebarVisible: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Default visibility of the messages.
|
|
79
|
+
* @type {Message[]}
|
|
80
|
+
* @memberof DocumentListComponent
|
|
81
|
+
*/
|
|
82
|
+
messages: Message[];
|
|
83
|
+
/**
|
|
84
|
+
* Default visibility of the dialog.
|
|
85
|
+
* @type {boolean}
|
|
86
|
+
* @memberof DocumentListComponent
|
|
87
|
+
*/
|
|
88
|
+
isdialogVisible: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* The list of documents to display.
|
|
91
|
+
* This value is passed from the parent component.
|
|
92
|
+
* @type {DocumentModel[]}
|
|
93
|
+
* @memberof DocumentListComponent
|
|
94
|
+
*/
|
|
95
|
+
documentList: DocumentListItem[];
|
|
96
|
+
/**
|
|
97
|
+
* Available document types for selection.
|
|
98
|
+
* @type {string[]}
|
|
99
|
+
* @memberof DocumentListComponent
|
|
100
|
+
*/
|
|
101
|
+
options: any[];
|
|
102
|
+
/**
|
|
103
|
+
* The selected option for the document type.
|
|
104
|
+
* @type {(string | null)}
|
|
105
|
+
* @memberof DocumentListComponent
|
|
106
|
+
*/
|
|
107
|
+
selectedOption: string | null;
|
|
108
|
+
/**
|
|
109
|
+
* The file name associated with the document.
|
|
110
|
+
* It may be undefined until a file is selected or loaded.
|
|
111
|
+
* @type {string | undefined}
|
|
112
|
+
*/
|
|
113
|
+
fileName: string | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* Table data for each category
|
|
116
|
+
*/
|
|
117
|
+
categoryTables: TableData[];
|
|
118
|
+
/**
|
|
119
|
+
* Document categories from the response
|
|
120
|
+
*/
|
|
121
|
+
documentCategories: DocumentListResponse[];
|
|
122
|
+
/**
|
|
123
|
+
* Completion counts for each category
|
|
124
|
+
*/
|
|
125
|
+
categoryCompletionCounts: string[];
|
|
126
|
+
/**
|
|
127
|
+
* Severity levels for each category completion badge
|
|
128
|
+
*/
|
|
129
|
+
categorySeverities: ('success' | 'info' | 'warning' | 'danger')[];
|
|
130
|
+
/**
|
|
131
|
+
* Message to display for document deletion
|
|
132
|
+
*/
|
|
133
|
+
deleteMessage: Message[];
|
|
134
|
+
handleSelectedDocument: EventEmitter<DocumentListItem>;
|
|
135
|
+
/**
|
|
136
|
+
* Getter to return category labels as they come from the API
|
|
137
|
+
*/
|
|
138
|
+
get formattedCategoryLabels(): string[];
|
|
139
|
+
/**
|
|
140
|
+
* Getter to generate safe category IDs for HTML elements
|
|
141
|
+
*/
|
|
142
|
+
get categoryIds(): string[];
|
|
143
|
+
/**
|
|
144
|
+
* Creates an instance of DocumentListComponent.
|
|
145
|
+
* @class
|
|
146
|
+
* @param {DocumentListService} documentListService - The service responsible for document list operations.
|
|
147
|
+
*/
|
|
148
|
+
constructor(documentListService: DocumentListService, documentHttpService: DocumentHttpService, documentMenuService: DocumentMenuService, documentStore: DocumentStore, documentScrollService: DocumentScrollService);
|
|
149
|
+
/**
|
|
150
|
+
* Handles changes to input properties
|
|
151
|
+
*/
|
|
152
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
153
|
+
/**
|
|
154
|
+
* Initializes the component by setting up document list subscription.
|
|
155
|
+
*/
|
|
156
|
+
ngOnInit(): void;
|
|
157
|
+
/**
|
|
158
|
+
* Called after the view is initialized
|
|
159
|
+
*/
|
|
160
|
+
ngAfterViewInit(): void;
|
|
161
|
+
/**
|
|
162
|
+
* Handles the visibility of the sidebar.
|
|
163
|
+
* @param {boolean} isVisible - Indicates whether the sidebar should be visible or not.
|
|
164
|
+
* @memberof DocumentListComponent
|
|
165
|
+
*/
|
|
166
|
+
handleOpenSideBar(isVisible: boolean): void;
|
|
167
|
+
/**
|
|
168
|
+
* Builds document categories from the API response
|
|
169
|
+
*/
|
|
170
|
+
buildDocumentCategories(): void;
|
|
171
|
+
/**
|
|
172
|
+
* Sets up subscription to document list response from store
|
|
173
|
+
*/
|
|
174
|
+
setupDocumentListSubscription(): void;
|
|
175
|
+
/**
|
|
176
|
+
* Handles table row click event
|
|
177
|
+
*/
|
|
178
|
+
handleTableRowClick(rowData: any): void;
|
|
179
|
+
/**
|
|
180
|
+
* Handles the delete action from the table component
|
|
181
|
+
* @param {any} rowData - The row data containing the document to delete
|
|
182
|
+
*/
|
|
183
|
+
handleDeleteAction(rowData: any): void;
|
|
184
|
+
/**
|
|
185
|
+
* Closes the document viewer dialog and resets the selected document
|
|
186
|
+
*/
|
|
187
|
+
handleCloseModal(): void;
|
|
188
|
+
/**
|
|
189
|
+
* Refreshes the document list after a status update
|
|
190
|
+
* @param {boolean} isDeleteAction - Optional flag indicating if this refresh is due to a delete action
|
|
191
|
+
*/
|
|
192
|
+
refreshDocumentList(isDeleteAction?: boolean): void;
|
|
193
|
+
handleTableRowCtrlClick(rowData: any): void;
|
|
194
|
+
/**
|
|
195
|
+
* Handles document status update events from viewer
|
|
196
|
+
* @param event - The status update event
|
|
197
|
+
*/
|
|
198
|
+
handleDocumentStatusUpdate(event: {
|
|
199
|
+
actionType?: string;
|
|
200
|
+
}): void;
|
|
201
|
+
/**
|
|
202
|
+
* Shows delete error message for 2 seconds without closing dialog
|
|
203
|
+
* @param error - The error object from the delete operation
|
|
204
|
+
*/
|
|
205
|
+
private showDeleteErrorMessage;
|
|
206
|
+
/**
|
|
207
|
+
* Handles delete error events from the document viewer
|
|
208
|
+
* @param error - The error object from the delete operation
|
|
209
|
+
*/
|
|
210
|
+
handleDeleteError(error: any): void;
|
|
211
|
+
/**
|
|
212
|
+
* Handles delete success events from the document viewer
|
|
213
|
+
*/
|
|
214
|
+
handleDeleteSuccess(): void;
|
|
215
|
+
/**
|
|
216
|
+
* Handles document name update event from viewer
|
|
217
|
+
*/
|
|
218
|
+
handleDocumentNameUpdate(): void;
|
|
219
|
+
/**
|
|
220
|
+
* Handles the event when the document viewer is destroyed
|
|
221
|
+
* Triggers a refresh of the document data
|
|
222
|
+
*/
|
|
223
|
+
handleViewerDestroyed(): void;
|
|
224
|
+
/**
|
|
225
|
+
* Scrolls to the category section that matches the selected menu item
|
|
226
|
+
* @param menuItemId - The ID of the selected menu item
|
|
227
|
+
*/
|
|
228
|
+
scrollToCategorySection(menuItemId: string): void;
|
|
229
|
+
/**
|
|
230
|
+
* Finds category by converting menuItemId to readable format and matching exactly
|
|
231
|
+
* @param menuItemId - The menu item ID to match
|
|
232
|
+
* @returns The matching category or null
|
|
233
|
+
*/
|
|
234
|
+
private findCategoryByMenuItemId;
|
|
235
|
+
/**
|
|
236
|
+
* Converts menuItemId to readable label format
|
|
237
|
+
* @param menuItemId - The menu item ID
|
|
238
|
+
* @returns Readable label
|
|
239
|
+
*/
|
|
240
|
+
private convertMenuItemIdToReadableLabel;
|
|
241
|
+
/**
|
|
242
|
+
* Checks if a menu label is a substring of a longer category name
|
|
243
|
+
* @param menuLabel - The menu label to check
|
|
244
|
+
* @param categoryLabel - The category label to check against
|
|
245
|
+
* @returns True if menuLabel is a substring of a longer category
|
|
246
|
+
*/
|
|
247
|
+
private isSubstringOfLongerCategory;
|
|
248
|
+
/**
|
|
249
|
+
* Legacy matching for backward compatibility with existing hardcoded keywords
|
|
250
|
+
* @param menuItemId - The menu item ID
|
|
251
|
+
* @returns The matching category or null
|
|
252
|
+
*/
|
|
253
|
+
private findCategoryByLegacyMatching;
|
|
254
|
+
/**
|
|
255
|
+
* Scrolls to the category section using navigationInfo
|
|
256
|
+
* @param navigationInfo - The navigation info object containing menuItemId
|
|
257
|
+
*/
|
|
258
|
+
scrollToCategorySectionWithNavigationInfo(navigationInfo: {
|
|
259
|
+
menuItemId: string;
|
|
260
|
+
menuItemLabel: string;
|
|
261
|
+
categoryLabel: string;
|
|
262
|
+
categoryIndex: number;
|
|
263
|
+
}): void;
|
|
264
|
+
/**
|
|
265
|
+
* Adds a temporary highlight effect to the scrolled category
|
|
266
|
+
* @param categoryElement - The DOM element of the category to highlight
|
|
267
|
+
*/
|
|
268
|
+
highlightCategory(categoryElement: HTMLElement): void;
|
|
269
|
+
/**
|
|
270
|
+
* Alternative scrolling method using IntersectionObserver for better performance
|
|
271
|
+
* This method can be used as a fallback or alternative to the current approach
|
|
272
|
+
* @param navigationInfo - The navigation info object
|
|
273
|
+
*/
|
|
274
|
+
scrollToCategorySectionWithIntersectionObserver(navigationInfo: {
|
|
275
|
+
menuItemId: string;
|
|
276
|
+
menuItemLabel: string;
|
|
277
|
+
categoryLabel: string;
|
|
278
|
+
categoryIndex: number;
|
|
279
|
+
}): void;
|
|
280
|
+
/**
|
|
281
|
+
* Resets the document list to the top when menu item is deselected
|
|
282
|
+
*/
|
|
283
|
+
private resetToTop;
|
|
284
|
+
/**
|
|
285
|
+
* Handles changes in document list due to filtering
|
|
286
|
+
* Checks if the selected menu item's section is still visible and deselects if not
|
|
287
|
+
*/
|
|
288
|
+
private handleDocumentListFilteringChange;
|
|
289
|
+
/**
|
|
290
|
+
* Deselects the current menu item and resets the view
|
|
291
|
+
*/
|
|
292
|
+
private deselectMenuItemAndReset;
|
|
293
|
+
/**
|
|
294
|
+
* Cleanup subscriptions on component destroy
|
|
295
|
+
*/
|
|
296
|
+
ngOnDestroy(): void;
|
|
297
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentListComponent, never>;
|
|
298
|
+
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; }; }, { "handleSelectedDocumentInNewTab": "handleSelectedDocumentInNewTab"; "handleSelectedDocument": "handleSelectedDocument"; }, never, ["*"], false, never>;
|
|
299
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { DocumentModel } from '../../models/document.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* DocumentListItemComponent
|
|
6
|
+
*
|
|
7
|
+
* This component displays individual document items within a list.
|
|
8
|
+
* It accepts a list of documents as input and handles interactions with documents.
|
|
9
|
+
*/
|
|
10
|
+
export declare class DocumentListItemComponent {
|
|
11
|
+
/**
|
|
12
|
+
* Emit the selected document.
|
|
13
|
+
* @type {EventEmitter<DocumentModel>}
|
|
14
|
+
*/
|
|
15
|
+
documentClick: EventEmitter<DocumentModel>;
|
|
16
|
+
/**
|
|
17
|
+
* The document to display.
|
|
18
|
+
* @type {DocumentModel[]}
|
|
19
|
+
*/
|
|
20
|
+
document: DocumentModel;
|
|
21
|
+
/**
|
|
22
|
+
* Handles interactions with a document.
|
|
23
|
+
* @param {DocumentModel} document - The document to be opened or interacted with.
|
|
24
|
+
*/
|
|
25
|
+
handleOpenDocument(document: DocumentModel): void;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentListItemComponent, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentListItemComponent, "lib-document-list-item", never, { "document": { "alias": "document"; "required": false; }; }, { "documentClick": "documentClick"; }, never, never, false, never>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { OnInit, OnDestroy, EventEmitter } from '@angular/core';
|
|
2
|
+
import { SHARED } from '../../../../Shared/constant/SHARED';
|
|
3
|
+
import { DocumentHelperService } from '../../services/document.service';
|
|
4
|
+
import { DocumentQuery } from '../../state/document.query';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class DocumentSearchComponent implements OnInit, OnDestroy {
|
|
7
|
+
private documentHelperService;
|
|
8
|
+
private documentQuery;
|
|
9
|
+
readonly SHARED: typeof SHARED;
|
|
10
|
+
contextId: string;
|
|
11
|
+
onActionClick: EventEmitter<void>;
|
|
12
|
+
onRequestClick: EventEmitter<void>;
|
|
13
|
+
searchTerm: string;
|
|
14
|
+
showActionsMenu: boolean;
|
|
15
|
+
private destroy$;
|
|
16
|
+
private searchSubject;
|
|
17
|
+
private hasActiveFilters;
|
|
18
|
+
constructor(documentHelperService: DocumentHelperService, documentQuery: DocumentQuery);
|
|
19
|
+
ngOnInit(): void;
|
|
20
|
+
ngOnDestroy(): void;
|
|
21
|
+
/**
|
|
22
|
+
* Sets up the search input subscription with debouncing
|
|
23
|
+
*/
|
|
24
|
+
private setupSearchSubscription;
|
|
25
|
+
/**
|
|
26
|
+
* Sets up subscription to monitor all filter states
|
|
27
|
+
*/
|
|
28
|
+
private setupFilterSubscription;
|
|
29
|
+
/**
|
|
30
|
+
* Handles search term changes from ngModel
|
|
31
|
+
* @param searchTerm - The search term entered by the user
|
|
32
|
+
*/
|
|
33
|
+
onSearchInputChange(searchTerm: string): void;
|
|
34
|
+
/**
|
|
35
|
+
* Handles search term changes
|
|
36
|
+
* @param searchTerm - The search term entered by the user
|
|
37
|
+
*/
|
|
38
|
+
private onSearchChange;
|
|
39
|
+
/**
|
|
40
|
+
* Clears the search input
|
|
41
|
+
*/
|
|
42
|
+
onClearSearch(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Clears all filters including search, menu item, user, and status selections
|
|
45
|
+
*/
|
|
46
|
+
onClearAllFilters(): void;
|
|
47
|
+
/**
|
|
48
|
+
* Determines if the Clear All button should be visible
|
|
49
|
+
*/
|
|
50
|
+
get shouldShowClearAll(): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Toggles the actions dropdown menu
|
|
53
|
+
*/
|
|
54
|
+
toggleActionsMenu(): void;
|
|
55
|
+
/**
|
|
56
|
+
* Handles upload document action
|
|
57
|
+
*/
|
|
58
|
+
handleUploadDocument(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Handles request document action
|
|
61
|
+
*/
|
|
62
|
+
handleRequestDocument(): void;
|
|
63
|
+
/**
|
|
64
|
+
* Sets up click outside listener to close dropdown
|
|
65
|
+
*/
|
|
66
|
+
private setupClickOutsideListener;
|
|
67
|
+
/**
|
|
68
|
+
* Removes click outside listener
|
|
69
|
+
*/
|
|
70
|
+
private removeClickOutsideListener;
|
|
71
|
+
/**
|
|
72
|
+
* Handles clicks outside the dropdown to close it
|
|
73
|
+
*/
|
|
74
|
+
private handleClickOutside;
|
|
75
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentSearchComponent, never>;
|
|
76
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentSearchComponent, "document-search", never, { "contextId": { "alias": "contextId"; "required": false; }; }, { "onActionClick": "onActionClick"; "onRequestClick": "onRequestClick"; }, never, never, false, never>;
|
|
77
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { OnInit, OnDestroy, OnChanges, SimpleChanges } 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, OnChanges {
|
|
7
|
+
private documentQuery;
|
|
8
|
+
private documentService;
|
|
9
|
+
private statusCalculatorService;
|
|
10
|
+
contextId: string;
|
|
11
|
+
statusData: any;
|
|
12
|
+
selectedStatus: string | null;
|
|
13
|
+
statusDataWithPercentages: CalculatedStatusData[];
|
|
14
|
+
private subscription;
|
|
15
|
+
constructor(documentQuery: DocumentQuery, documentService: DocumentHelperService, statusCalculatorService: StatusCalculatorService);
|
|
16
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
17
|
+
ngOnInit(): void;
|
|
18
|
+
private refetchStatusData;
|
|
19
|
+
selectStatus(status: string): void;
|
|
20
|
+
private updateCalculatedStatusData;
|
|
21
|
+
ngOnDestroy(): void;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentStatusComponent, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentStatusComponent, "lib-document-status", never, { "contextId": { "alias": "contextId"; "required": false; }; "statusData": { "alias": "statusData"; "required": false; }; }, {}, never, never, false, never>;
|
|
24
|
+
}
|