cat-documents-ng 1.0.6 → 1.0.7

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.
Files changed (211) hide show
  1. package/README.md +322 -322
  2. package/Shared/components/confirmation-dialog/confirmation-dialog.component.d.ts +44 -0
  3. package/Shared/components/table-primary/table-primary.component.d.ts +31 -0
  4. package/Shared/components/table-primary/table-primary.model.d.ts +19 -0
  5. package/Shared/constant/ERROR.d.ts +52 -0
  6. package/Shared/constant/SHARED.d.ts +546 -0
  7. package/{src/Shared/constant/URLS.ts → Shared/constant/URLS.d.ts} +25 -31
  8. package/Shared/services/app-config.service.d.ts +51 -0
  9. package/{src/Shared/services/global-error.handler.ts → Shared/services/global-error.handler.d.ts} +9 -11
  10. package/Shared/services/session.service.d.ts +46 -0
  11. package/Shared/shared.module.d.ts +14 -0
  12. package/fesm2022/cat-documents-ng.mjs +11405 -0
  13. package/fesm2022/cat-documents-ng.mjs.map +1 -0
  14. package/index.d.ts +5 -0
  15. package/lib/document/components/document-actions/document-actions.component.d.ts +78 -0
  16. package/lib/document/components/document-container/document-container.component.d.ts +162 -0
  17. package/lib/document/components/document-content-viewer/document-content-viewer.component.d.ts +291 -0
  18. package/lib/document/components/document-history/document-history.component.d.ts +160 -0
  19. package/lib/document/components/document-list/document-list.component.d.ts +299 -0
  20. package/lib/document/components/document-list-item/document-list-item.component.d.ts +28 -0
  21. package/lib/document/components/document-search/document-search.component.d.ts +77 -0
  22. package/lib/document/components/document-status/document-status.component.d.ts +24 -0
  23. package/lib/document/components/document-upload/document-upload.component.d.ts +321 -0
  24. package/lib/document/components/document-viewer/document-viewer.component.d.ts +137 -0
  25. package/lib/document/components/document-zoom-controls/document-zoom-controls.component.d.ts +33 -0
  26. package/lib/document/components/documents-menu/documents-menu.component.d.ts +110 -0
  27. package/{src/lib/document/components/folder-block/folder-block.component.ts → lib/document/components/folder-block/folder-block.component.d.ts} +12 -28
  28. package/lib/document/components/folder-container/folder-container.component.d.ts +162 -0
  29. package/lib/document/components/linked-document/linked-document.component.d.ts +39 -0
  30. package/lib/document/components/request-document/request-document.component.d.ts +69 -0
  31. package/lib/document/components/sidebar/sidebar.component.d.ts +109 -0
  32. package/lib/document/components/user-list/user-list.component.d.ts +34 -0
  33. package/lib/document/constant/DOCUMENT_HISTORY.d.ts +41 -0
  34. package/lib/document/directives/document.directive.d.ts +20 -0
  35. package/lib/document/directives/permission.directive.d.ts +38 -0
  36. package/lib/document/document.module.d.ts +60 -0
  37. package/{src/lib/document/models/document-alert.model.ts → lib/document/models/document-alert.model.d.ts} +4 -11
  38. package/lib/document/models/document-category.model.d.ts +24 -0
  39. package/lib/document/models/document-history.model.d.ts +94 -0
  40. package/lib/document/models/document-list-response.model.d.ts +33 -0
  41. package/lib/document/models/document-type.model.d.ts +37 -0
  42. package/lib/document/models/document.model.d.ts +44 -0
  43. package/{src/lib/document/models/folder.model.ts → lib/document/models/folder.model.d.ts} +4 -10
  44. package/lib/document/models/status-data.model.d.ts +27 -0
  45. package/lib/document/models/uploaded-file-response.model.d.ts +7 -0
  46. package/lib/document/models/user-list.model.d.ts +8 -0
  47. package/lib/document/services/csv-parser.service.d.ts +88 -0
  48. package/lib/document/services/document-actions.service.d.ts +48 -0
  49. package/lib/document/services/document-content-type.service.d.ts +85 -0
  50. package/lib/document/services/document-history-style.service.d.ts +34 -0
  51. package/lib/document/services/document-history.service.d.ts +42 -0
  52. package/lib/document/services/document-http.service.d.ts +179 -0
  53. package/lib/document/services/document-list.service.d.ts +74 -0
  54. package/lib/document/services/document-menu.service.d.ts +122 -0
  55. package/lib/document/services/document-scroll.service.d.ts +55 -0
  56. package/lib/document/services/document-table-builder.service.d.ts +38 -0
  57. package/lib/document/services/document-upload-business.service.d.ts +107 -0
  58. package/lib/document/services/document-upload-data.service.d.ts +40 -0
  59. package/lib/document/services/document-upload-form.service.d.ts +41 -0
  60. package/lib/document/services/document-upload.service.d.ts +99 -0
  61. package/lib/document/services/document-viewer.service.d.ts +97 -0
  62. package/lib/document/services/document-zoom.service.d.ts +81 -0
  63. package/lib/document/services/document.service.d.ts +161 -0
  64. package/lib/document/services/eml-parser.service.d.ts +116 -0
  65. package/lib/document/services/excel-parser.service.d.ts +169 -0
  66. package/lib/document/services/file-format.service.d.ts +34 -0
  67. package/lib/document/services/status-calculator.service.d.ts +20 -0
  68. package/lib/document/services/user-list.service.d.ts +29 -0
  69. package/lib/document/state/document.query.d.ts +243 -0
  70. package/{src/lib/document/state/document.service.ts → lib/document/state/document.service.d.ts} +15 -46
  71. package/lib/document/state/document.state.d.ts +61 -0
  72. package/lib/document/state/document.store.d.ts +56 -0
  73. package/package.json +11 -5
  74. package/{src/public-api.ts → public-api.d.ts} +0 -4
  75. package/ng-package.json +0 -10
  76. package/src/Shared/components/confirmation-dialog/confirmation-dialog.component.html +0 -3
  77. package/src/Shared/components/confirmation-dialog/confirmation-dialog.component.scss +0 -13
  78. package/src/Shared/components/confirmation-dialog/confirmation-dialog.component.spec.ts +0 -70
  79. package/src/Shared/components/confirmation-dialog/confirmation-dialog.component.ts +0 -133
  80. package/src/Shared/components/table-primary/table-primary.component.html +0 -66
  81. package/src/Shared/components/table-primary/table-primary.component.scss +0 -227
  82. package/src/Shared/components/table-primary/table-primary.component.spec.ts +0 -23
  83. package/src/Shared/components/table-primary/table-primary.component.ts +0 -143
  84. package/src/Shared/components/table-primary/table-primary.model.ts +0 -21
  85. package/src/Shared/constant/ERROR.ts +0 -55
  86. package/src/Shared/constant/PERMISSIONS.ts +0 -17
  87. package/src/Shared/constant/SHARED.ts +0 -936
  88. package/src/Shared/services/app-config.service.spec.ts +0 -19
  89. package/src/Shared/services/app-config.service.ts +0 -73
  90. package/src/Shared/services/session.service.spec.ts +0 -16
  91. package/src/Shared/services/session.service.ts +0 -76
  92. package/src/Shared/shared.module.ts +0 -25
  93. package/src/lib/document/components/csv-viewer/csv-viewer.component.ts +0 -1
  94. package/src/lib/document/components/document-actions/document-actions.component.html +0 -59
  95. package/src/lib/document/components/document-actions/document-actions.component.scss +0 -362
  96. package/src/lib/document/components/document-actions/document-actions.component.spec.ts +0 -297
  97. package/src/lib/document/components/document-actions/document-actions.component.ts +0 -163
  98. package/src/lib/document/components/document-container/document-container.component.html +0 -36
  99. package/src/lib/document/components/document-container/document-container.component.scss +0 -144
  100. package/src/lib/document/components/document-container/document-container.component.spec.ts +0 -110
  101. package/src/lib/document/components/document-container/document-container.component.ts +0 -363
  102. package/src/lib/document/components/document-content-viewer/document-content-viewer.component.html +0 -332
  103. package/src/lib/document/components/document-content-viewer/document-content-viewer.component.scss +0 -1877
  104. package/src/lib/document/components/document-content-viewer/document-content-viewer.component.spec.ts +0 -258
  105. package/src/lib/document/components/document-content-viewer/document-content-viewer.component.ts +0 -664
  106. package/src/lib/document/components/document-history/document-history.component.html +0 -96
  107. package/src/lib/document/components/document-history/document-history.component.scss +0 -392
  108. package/src/lib/document/components/document-history/document-history.component.spec.ts +0 -93
  109. package/src/lib/document/components/document-history/document-history.component.ts +0 -373
  110. package/src/lib/document/components/document-list/document-list.component.html +0 -46
  111. package/src/lib/document/components/document-list/document-list.component.scss +0 -513
  112. package/src/lib/document/components/document-list/document-list.component.spec.ts +0 -486
  113. package/src/lib/document/components/document-list/document-list.component.ts +0 -682
  114. package/src/lib/document/components/document-list-item/document-list-item.component.html +0 -36
  115. package/src/lib/document/components/document-list-item/document-list-item.component.scss +0 -34
  116. package/src/lib/document/components/document-list-item/document-list-item.component.spec.ts +0 -75
  117. package/src/lib/document/components/document-list-item/document-list-item.component.ts +0 -40
  118. package/src/lib/document/components/document-search/document-search.component.html +0 -64
  119. package/src/lib/document/components/document-search/document-search.component.scss +0 -206
  120. package/src/lib/document/components/document-search/document-search.component.spec.ts +0 -82
  121. package/src/lib/document/components/document-search/document-search.component.ts +0 -163
  122. package/src/lib/document/components/document-status/document-status.component.html +0 -31
  123. package/src/lib/document/components/document-status/document-status.component.scss +0 -192
  124. package/src/lib/document/components/document-status/document-status.component.spec.ts +0 -23
  125. package/src/lib/document/components/document-status/document-status.component.ts +0 -87
  126. package/src/lib/document/components/document-upload/document-upload.component.html +0 -160
  127. package/src/lib/document/components/document-upload/document-upload.component.scss +0 -235
  128. package/src/lib/document/components/document-upload/document-upload.component.spec.ts +0 -95
  129. package/src/lib/document/components/document-upload/document-upload.component.ts +0 -668
  130. package/src/lib/document/components/document-viewer/document-viewer.component.html +0 -50
  131. package/src/lib/document/components/document-viewer/document-viewer.component.scss +0 -187
  132. package/src/lib/document/components/document-viewer/document-viewer.component.spec.ts +0 -79
  133. package/src/lib/document/components/document-viewer/document-viewer.component.ts +0 -261
  134. package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.html +0 -48
  135. package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.scss +0 -320
  136. package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.spec.ts +0 -59
  137. package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.ts +0 -150
  138. package/src/lib/document/components/documents-menu/documents-menu.component.html +0 -44
  139. package/src/lib/document/components/documents-menu/documents-menu.component.scss +0 -363
  140. package/src/lib/document/components/documents-menu/documents-menu.component.spec.ts +0 -23
  141. package/src/lib/document/components/documents-menu/documents-menu.component.ts +0 -316
  142. package/src/lib/document/components/folder-block/folder-block.component.html +0 -46
  143. package/src/lib/document/components/folder-block/folder-block.component.scss +0 -9
  144. package/src/lib/document/components/folder-block/folder-block.component.spec.ts +0 -70
  145. package/src/lib/document/components/folder-container/folder-container.component.html +0 -56
  146. package/src/lib/document/components/folder-container/folder-container.component.scss +0 -20
  147. package/src/lib/document/components/folder-container/folder-container.component.spec.ts +0 -27
  148. package/src/lib/document/components/folder-container/folder-container.component.ts +0 -328
  149. package/src/lib/document/components/linked-document/linked-document.component.html +0 -23
  150. package/src/lib/document/components/linked-document/linked-document.component.scss +0 -10
  151. package/src/lib/document/components/linked-document/linked-document.component.spec.ts +0 -61
  152. package/src/lib/document/components/linked-document/linked-document.component.ts +0 -49
  153. package/src/lib/document/components/request-document/request-document.component.html +0 -86
  154. package/src/lib/document/components/request-document/request-document.component.scss +0 -16
  155. package/src/lib/document/components/request-document/request-document.component.ts +0 -278
  156. package/src/lib/document/components/sidebar/sidebar.component.html +0 -75
  157. package/src/lib/document/components/sidebar/sidebar.component.scss +0 -157
  158. package/src/lib/document/components/sidebar/sidebar.component.spec.ts +0 -114
  159. package/src/lib/document/components/sidebar/sidebar.component.ts +0 -223
  160. package/src/lib/document/components/user-list/user-list.component.html +0 -33
  161. package/src/lib/document/components/user-list/user-list.component.scss +0 -118
  162. package/src/lib/document/components/user-list/user-list.component.spec.ts +0 -23
  163. package/src/lib/document/components/user-list/user-list.component.ts +0 -181
  164. package/src/lib/document/constant/DOCUMENT_HISTORY.ts +0 -52
  165. package/src/lib/document/directives/document.directive.ts +0 -32
  166. package/src/lib/document/directives/permission.directive.spec.ts +0 -0
  167. package/src/lib/document/directives/permission.directive.ts +0 -72
  168. package/src/lib/document/document.module.ts +0 -351
  169. package/src/lib/document/models/document-category.model.ts +0 -30
  170. package/src/lib/document/models/document-history.model.ts +0 -109
  171. package/src/lib/document/models/document-list-response.model.ts +0 -37
  172. package/src/lib/document/models/document-type.model.ts +0 -44
  173. package/src/lib/document/models/document.model.ts +0 -53
  174. package/src/lib/document/models/status-data.model.ts +0 -31
  175. package/src/lib/document/models/uploaded-file-response.model.ts +0 -7
  176. package/src/lib/document/models/user-list.model.ts +0 -10
  177. package/src/lib/document/services/csv-parser.service.spec.ts +0 -97
  178. package/src/lib/document/services/csv-parser.service.ts +0 -303
  179. package/src/lib/document/services/document-actions.service.ts +0 -125
  180. package/src/lib/document/services/document-content-type.service.ts +0 -193
  181. package/src/lib/document/services/document-history-style.service.ts +0 -138
  182. package/src/lib/document/services/document-history.service.ts +0 -129
  183. package/src/lib/document/services/document-http.service.spec.ts +0 -119
  184. package/src/lib/document/services/document-http.service.ts +0 -497
  185. package/src/lib/document/services/document-list.service.ts +0 -195
  186. package/src/lib/document/services/document-menu.service.ts +0 -277
  187. package/src/lib/document/services/document-scroll.service.ts +0 -138
  188. package/src/lib/document/services/document-severity.service.ts +0 -98
  189. package/src/lib/document/services/document-table-builder.service.ts +0 -82
  190. package/src/lib/document/services/document-upload-business.service.ts +0 -326
  191. package/src/lib/document/services/document-upload-data.service.ts +0 -82
  192. package/src/lib/document/services/document-upload-form.service.ts +0 -149
  193. package/src/lib/document/services/document-upload.service.spec.ts +0 -99
  194. package/src/lib/document/services/document-upload.service.ts +0 -209
  195. package/src/lib/document/services/document-viewer.service.ts +0 -279
  196. package/src/lib/document/services/document-zoom.service.spec.ts +0 -56
  197. package/src/lib/document/services/document-zoom.service.ts +0 -164
  198. package/src/lib/document/services/document.service.ts +0 -356
  199. package/src/lib/document/services/eml-parser.service.ts +0 -444
  200. package/src/lib/document/services/excel-parser.service.spec.ts +0 -66
  201. package/src/lib/document/services/excel-parser.service.ts +0 -483
  202. package/src/lib/document/services/file-format.service.spec.ts +0 -16
  203. package/src/lib/document/services/file-format.service.ts +0 -63
  204. package/src/lib/document/services/status-calculator.service.ts +0 -44
  205. package/src/lib/document/services/user-list.service.ts +0 -77
  206. package/src/lib/document/state/document.query.ts +0 -378
  207. package/src/lib/document/state/document.state.ts +0 -100
  208. package/src/lib/document/state/document.store.ts +0 -200
  209. package/tsconfig.lib.json +0 -15
  210. package/tsconfig.lib.prod.json +0 -11
  211. package/tsconfig.spec.json +0 -15
package/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="cat-documents-ng" />
5
+ export * from './public-api';
@@ -0,0 +1,78 @@
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 { SessionService } from '../../../../Shared/services/session.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class DocumentActionsComponent implements OnChanges {
7
+ private documentActionsService;
8
+ private sessionService;
9
+ readonly SHARED: typeof SHARED;
10
+ document?: any;
11
+ documentId?: string;
12
+ currentStatus?: string;
13
+ isLoading?: boolean;
14
+ isUploaded?: boolean;
15
+ statusId?: string;
16
+ actionPerformed: EventEmitter<DocumentAction>;
17
+ showAcceptDialog: boolean;
18
+ showRejectDialog: boolean;
19
+ acceptNote: string;
20
+ private _rejectNote;
21
+ userRole: any;
22
+ isAccepting: boolean;
23
+ isRejecting: boolean;
24
+ cardClass: string;
25
+ rejectButtonClass: string;
26
+ acceptButtonClass: string;
27
+ isRejectNoteEmpty: boolean;
28
+ showApproveRejectActions: boolean;
29
+ showNoActions: boolean;
30
+ constructor(documentActionsService: DocumentActionsService, sessionService: SessionService);
31
+ get rejectNote(): string;
32
+ set rejectNote(value: string);
33
+ /**
34
+ * Checks if both action buttons should be disabled
35
+ * @returns {boolean} True if both buttons should be disabled
36
+ */
37
+ get areButtonsDisabled(): boolean;
38
+ /**
39
+ * Checks if the document is approved (case-insensitive)
40
+ * @returns {boolean} True if document is approved
41
+ */
42
+ get isDocumentApproved(): boolean;
43
+ /**
44
+ * Checks if the document is rejected (case-insensitive)
45
+ * @returns {boolean} True if document is rejected
46
+ */
47
+ get isDocumentRejected(): boolean;
48
+ ngOnChanges(changes: SimpleChanges): void;
49
+ /**
50
+ * Updates computed properties based on currentStatus and statusId
51
+ */
52
+ private updateComputedProperties;
53
+ /**
54
+ * Checks if the current user is a Team Leader
55
+ * @returns {boolean} True if user is Team Leader
56
+ */
57
+ isUserTeamLeader(): boolean;
58
+ /**
59
+ * Checks if the current user is an Underwriter
60
+ * @returns {boolean} True if user is Underwriter
61
+ */
62
+ isUserUnderwriter(): boolean;
63
+ /**
64
+ * Updates the isRejectNoteEmpty property based on current rejectNote value
65
+ */
66
+ updateRejectNoteEmpty(): void;
67
+ /**
68
+ * Resets the action processing flags
69
+ */
70
+ private resetActionFlags;
71
+ onAcceptClick(): void;
72
+ onRejectClick(): void;
73
+ onAcceptConfirm(): void;
74
+ onRejectConfirm(): void;
75
+ onCancel(): void;
76
+ static ɵfac: i0.ɵɵFactoryDeclaration<DocumentActionsComponent, never>;
77
+ static ɵcmp: i0.ɵɵComponentDeclaration<DocumentActionsComponent, "document-actions", never, { "document": { "alias": "document"; "required": false; }; "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>;
78
+ }
@@ -0,0 +1,162 @@
1
+ import { OnInit, OnDestroy, OnChanges, SimpleChanges, ElementRef, EventEmitter } from '@angular/core';
2
+ import { Subscription } from 'rxjs';
3
+ import { DocumentHttpService } from '../../services/document-http.service';
4
+ import { DocumentQuery } from '../../state/document.query';
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';
11
+ import { DocumentMenuService } from '../../services/document-menu.service';
12
+ import * as i0 from "@angular/core";
13
+ /**
14
+ *This component is responsible for managing and displaying a list of documents.
15
+ * @class DocumentContainerComponent
16
+ * @typedef {DocumentContainerComponent}
17
+ */
18
+ export declare class DocumentContainerComponent implements OnInit, OnDestroy, OnChanges {
19
+ private documentHttpService;
20
+ private documentHelperService;
21
+ private documentQuery;
22
+ private documentStore;
23
+ private documentMenuService;
24
+ /**
25
+ * The document list response data
26
+ * @type {DocumentListResponse[] | null}
27
+ */
28
+ documentListResponse: DocumentListResponse[] | null;
29
+ /**
30
+ * Status data for the current selection
31
+ * @type {StatusDataModel[]}
32
+ */
33
+ statusData: StatusDataModel[];
34
+ /**
35
+ * The currently selected menu item ID for scrolling
36
+ */
37
+ selectedMenuItemId: string | null;
38
+ /**
39
+ * Additional navigation information for better scrolling
40
+ */
41
+ navigationInfo: {
42
+ menuItemId: string;
43
+ menuItemLabel: string;
44
+ categoryLabel: string;
45
+ categoryIndex: number;
46
+ } | null;
47
+ /**
48
+ * Reference to the content scroll container
49
+ */
50
+ contentScrollContainer: ElementRef;
51
+ selectedDocument: EventEmitter<any>;
52
+ selectedDocumentInNewTab: EventEmitter<any>;
53
+ /**
54
+ * Subscription to track selected menu item changes
55
+ */
56
+ private selectedMenuItemSubscription;
57
+ /**
58
+ * Creates an instance of DocumentContainerComponent.
59
+ * @param {DocumentHttpService} documentHttpService - Service for HTTP operations
60
+ * @param {DocumentHelperService} documentHelperService - Service for document operations
61
+ * @param {DocumentQuery} documentQuery - Query service for document state
62
+ * @param {DocumentStore} documentStore - Store service for document state
63
+ * @param {DocumentMenuService} documentMenuService - Service for menu operations
64
+ */
65
+ constructor(documentHttpService: DocumentHttpService, documentHelperService: DocumentHelperService, documentQuery: DocumentQuery, documentStore: DocumentStore, documentMenuService: DocumentMenuService);
66
+ /**
67
+ * Get contextId in input.
68
+ * @type {string}
69
+ */
70
+ contextId: string;
71
+ /**
72
+ * The list of folders.
73
+ * @type {Array}
74
+ */
75
+ applicationNumber: string;
76
+ catagories: DocumentCategory[];
77
+ userList: UserListModel[];
78
+ /**
79
+ * Holds the subscription to manage observable cleanup.
80
+ * @type {Subscription}
81
+ */
82
+ subscription: Subscription;
83
+ /**
84
+ * Handles changes to input properties
85
+ */
86
+ ngOnChanges(changes: SimpleChanges): void;
87
+ /**
88
+ * Initializes the component
89
+ */
90
+ ngOnInit(): void;
91
+ /**
92
+ * Sets up subscription to track selected menu item changes
93
+ */
94
+ setupSelectedMenuItemSubscription(): void;
95
+ /**
96
+ * Handles menu item selection events from the documents menu
97
+ * @param event - The menu item selection event
98
+ */
99
+ onMenuItemSelected(event: {
100
+ item: any;
101
+ category: any;
102
+ navigationInfo?: {
103
+ menuItemId: string;
104
+ menuItemLabel: string;
105
+ categoryLabel: string;
106
+ categoryIndex: number;
107
+ };
108
+ }): void;
109
+ /**
110
+ * Resets the content scroll container to the top
111
+ */
112
+ private resetContentScrollToTop;
113
+ /**
114
+ * Initialize all data with proper sequencing to avoid duplicate API calls
115
+ */
116
+ initializeData(): void;
117
+ /**
118
+ * Clears all state (store and component) comprehensively
119
+ */
120
+ clearAllState(): void;
121
+ /**
122
+ * Handles contextId change by clearing all state and refetching data
123
+ */
124
+ handleContextIdChange(): void;
125
+ /**
126
+ * Sets up subscriptions to monitor menu item and user selection changes
127
+ * to trigger status data fetching and user list refreshing
128
+ */
129
+ setupStatusDataSubscriptions(): void;
130
+ onDocumentSelectedInNewTab(event: {
131
+ selectedDocument: any;
132
+ contextId: string;
133
+ documentList: any[];
134
+ }): void;
135
+ /**
136
+ * Fetches status data based on current selections
137
+ */
138
+ fetchStatusData(): void;
139
+ /**
140
+ * Fetches userlist data with current filters applied
141
+ */
142
+ fetchUserListWithFilters(): void;
143
+ /**
144
+ * Fetches document catagory data.
145
+ */
146
+ fetchDocumentCatagories(): void;
147
+ /**
148
+ * Refetches all data when contextId changes
149
+ */
150
+ refetchAllDataForNewContext(): void;
151
+ /**
152
+ * Sets up subscription to listen for filtered document responses
153
+ */
154
+ setupFilteredDocumentSubscription(): void;
155
+ onDocumentSelected(document: any): void;
156
+ /**
157
+ * Unsubscribe subscription on destroy of component and clean up state.
158
+ */
159
+ ngOnDestroy(): void;
160
+ static ɵfac: i0.ɵɵFactoryDeclaration<DocumentContainerComponent, never>;
161
+ static ɵcmp: i0.ɵɵComponentDeclaration<DocumentContainerComponent, "lib-document-container", never, { "contextId": { "alias": "contextId"; "required": false; }; }, { "selectedDocument": "selectedDocument"; "selectedDocumentInNewTab": "selectedDocumentInNewTab"; }, never, ["*"], false, never>;
162
+ }
@@ -0,0 +1,291 @@
1
+ import { OnChanges, SimpleChanges, OnInit } from '@angular/core';
2
+ import { ExcelParserService, ExcelRowData } from '../../services/excel-parser.service';
3
+ import { CsvParserService, CsvRowData } from '../../services/csv-parser.service';
4
+ import { EmlParserService, ParsedEmailData } from '../../services/eml-parser.service';
5
+ import { DocumentHttpService } from '../../services/document-http.service';
6
+ import { DocumentZoomService } from '../../services/document-zoom.service';
7
+ import { DocumentListItem } from '../../models/document-list-response.model';
8
+ import { DomSanitizer } from '@angular/platform-browser';
9
+ import * as i0 from "@angular/core";
10
+ /**
11
+ * Component for viewing different types of document content.
12
+ * Supports PDF, images, and other document formats.
13
+ * @class DocumentContentViewerComponent
14
+ * @typedef {DocumentContentViewerComponent}
15
+ */
16
+ export declare class DocumentContentViewerComponent implements OnChanges, OnInit {
17
+ private excelParserService;
18
+ private csvParserService;
19
+ private emlParserService;
20
+ private documentHttpService;
21
+ private zoomService;
22
+ private sanitizer;
23
+ /**
24
+ * The document URL to display
25
+ * @type {string}
26
+ */
27
+ documentUrl?: string;
28
+ /**
29
+ * The content type of the document
30
+ * @type {string}
31
+ */
32
+ contentType?: string;
33
+ /**
34
+ * The document name for display purposes
35
+ * @type {string}
36
+ */
37
+ documentName?: string;
38
+ /**
39
+ * The selected document for display purposes
40
+ * @type {DocumentListItem}
41
+ */
42
+ selectedDocument?: DocumentListItem;
43
+ /**
44
+ * The context ID for the document
45
+ * @type {string}
46
+ */
47
+ contextId?: string;
48
+ /**
49
+ * Flag to hide form elements
50
+ * @type {boolean}
51
+ */
52
+ isFormHide: boolean;
53
+ /**
54
+ * Excel data for display
55
+ * @type {any}
56
+ */
57
+ excelData: any;
58
+ /**
59
+ * Parsed Excel data as table rows
60
+ * @type {any[][]}
61
+ */
62
+ excelTableData: any[][];
63
+ /**
64
+ * Enhanced Excel data with styling information
65
+ * @type {ExcelRowData[]}
66
+ */
67
+ excelStyledData: ExcelRowData[];
68
+ /**
69
+ * Excel sheet names
70
+ * @type {string[]}
71
+ */
72
+ excelSheets: string[];
73
+ /**
74
+ * Current active sheet
75
+ * @type {string}
76
+ */
77
+ currentSheet: string;
78
+ /**
79
+ * Loading state for Excel files
80
+ * @type {boolean}
81
+ */
82
+ isLoadingExcel: boolean;
83
+ /**
84
+ * Error state for Excel files
85
+ * @type {string | null}
86
+ */
87
+ excelError: string | null;
88
+ /**
89
+ * Loading state specifically for Word documents
90
+ * @type {boolean}
91
+ */
92
+ isLoadingWordDocument: boolean;
93
+ /**
94
+ * CSV data for display
95
+ * @type {any}
96
+ */
97
+ csvData: any;
98
+ /**
99
+ * Parsed CSV data as table rows
100
+ * @type {any[][]}
101
+ */
102
+ csvTableData: any[][];
103
+ /**
104
+ * Enhanced CSV data with styling information
105
+ * @type {CsvRowData[]}
106
+ */
107
+ csvStyledData: CsvRowData[];
108
+ /**
109
+ * Loading state for CSV files
110
+ * @type {boolean}
111
+ */
112
+ isLoadingCsv: boolean;
113
+ /**
114
+ * Error state for CSV files
115
+ * @type {string | null}
116
+ */
117
+ csvError: string | null;
118
+ /**
119
+ * Current zoom level for the document
120
+ * @type {number}
121
+ */
122
+ currentZoom: number;
123
+ /**
124
+ * Email data for display
125
+ * @type {ParsedEmailData | null}
126
+ */
127
+ emailData: ParsedEmailData | null;
128
+ /**
129
+ * Loading state for Email files
130
+ * @type {boolean}
131
+ */
132
+ isLoadingEmail: boolean;
133
+ /**
134
+ * Error state for Email files
135
+ * @type {string | null}
136
+ */
137
+ emailError: string | null;
138
+ /**
139
+ * Constructor
140
+ * @param {ExcelParserService} excelParserService - Service for parsing Excel files
141
+ * @param {CsvParserService} csvParserService - Service for parsing CSV files
142
+ * @param {EmlParserService} emlParserService - Service for parsing EML files
143
+ * @param {DocumentHttpService} documentHttpService - Service for making HTTP requests for Excel/CSV files
144
+ * @param {DocumentZoomService} zoomService - Service for handling zoom functionality
145
+ * @param {DomSanitizer} sanitizer - Service for sanitizing HTML content
146
+ */
147
+ constructor(excelParserService: ExcelParserService, csvParserService: CsvParserService, emlParserService: EmlParserService, documentHttpService: DocumentHttpService, zoomService: DocumentZoomService, sanitizer: DomSanitizer);
148
+ /**
149
+ * Computed property to determine if the document is a PDF
150
+ * @type {boolean}
151
+ */
152
+ get isPdf(): boolean;
153
+ /**
154
+ * Computed property to determine if the document is an Excel file
155
+ * @type {boolean}
156
+ */
157
+ get isExcel(): boolean;
158
+ /**
159
+ * Computed property to determine if the document is a Word file
160
+ * @type {boolean}
161
+ */
162
+ get isWord(): boolean;
163
+ /**
164
+ * Computed property to determine if the document is a CSV file
165
+ * @type {boolean}
166
+ */
167
+ get isCsv(): boolean;
168
+ /**
169
+ * Computed property to determine if the document is an email file
170
+ * @type {boolean}
171
+ */
172
+ get isEmail(): boolean;
173
+ /**
174
+ * Computed property to determine if the document is an OpenDocument file
175
+ * @type {boolean}
176
+ */
177
+ get isOpenDocument(): boolean;
178
+ /**
179
+ * Computed property to determine if the document has an unsupported content type
180
+ * @type {boolean}
181
+ */
182
+ get isUnsupported(): boolean;
183
+ /**
184
+ * Computed property to get the appropriate icon for the document type
185
+ * @type {string}
186
+ */
187
+ get documentIcon(): string;
188
+ /**
189
+ * Computed property to get the display text for the document type
190
+ * @type {string}
191
+ */
192
+ get documentTypeText(): string;
193
+ /**
194
+ * Safely gets the styled Excel data for display
195
+ * @type {ExcelRowData[]}
196
+ */
197
+ get safeExcelStyledData(): ExcelRowData[];
198
+ /**
199
+ * Safely gets the styled CSV data for display
200
+ * @type {CsvRowData[]}
201
+ */
202
+ get safeCsvStyledData(): CsvRowData[];
203
+ /**
204
+ * Handles changes to input properties
205
+ * @param {SimpleChanges} changes - The changes object
206
+ */
207
+ ngOnChanges(changes: SimpleChanges): void;
208
+ /**
209
+ * Initializes the component
210
+ */
211
+ ngOnInit(): void;
212
+ /**
213
+ * Initializes zoom functionality
214
+ */
215
+ private initializeZoom;
216
+ /**
217
+ * Handles mouse wheel events for zooming
218
+ */
219
+ onWheel(event: WheelEvent): void;
220
+ /**
221
+ * Handles wheel zoom for document viewers
222
+ */
223
+ handleWheelZoom(event: WheelEvent): void;
224
+ /**
225
+ * Applies zoom transform to the document viewer
226
+ */
227
+ private applyZoomTransform;
228
+ /**
229
+ * Downloads the document
230
+ */
231
+ downloadDocument(): void;
232
+ /**
233
+ * Opens the document in a new tab
234
+ */
235
+ openInNewTab(): void;
236
+ /**
237
+ * Loads Excel data for display
238
+ */
239
+ private loadExcelData;
240
+ /**
241
+ * Parses Excel data using the service
242
+ * @param {ArrayBuffer} data - Excel file data
243
+ */
244
+ private parseExcelData;
245
+ /**
246
+ * Changes the active Excel sheet
247
+ * @param {string} sheetName - Name of the sheet to activate
248
+ */
249
+ changeSheet(sheetName: string): void;
250
+ /**
251
+ * Resets Excel data to initial state
252
+ */
253
+ private resetExcelData;
254
+ /**
255
+ * Loads CSV data for display
256
+ */
257
+ private loadCsvData;
258
+ /**
259
+ * Parses CSV data using the service
260
+ * @param {string} data - CSV file data
261
+ */
262
+ private parseCsvData;
263
+ /**
264
+ * Resets CSV data to initial state
265
+ */
266
+ private resetCsvData;
267
+ /**
268
+ * TrackBy function for CSV cells to improve performance
269
+ * @param index - Cell index
270
+ * @param cell - Cell object
271
+ * @returns Unique identifier for the cell
272
+ */
273
+ trackByCell(index: number, cell: any): any;
274
+ /**
275
+ * Checks if CSV data is valid and ready for display
276
+ * @returns {boolean} True if CSV data is valid
277
+ */
278
+ private isCsvDataValid;
279
+ private getFileExtension;
280
+ get isImage(): boolean;
281
+ /**
282
+ * Loads Email data for display
283
+ */
284
+ private loadEmailData;
285
+ /**
286
+ * Resets Email data to initial state
287
+ */
288
+ private resetEmailData;
289
+ static ɵfac: i0.ɵɵFactoryDeclaration<DocumentContentViewerComponent, never>;
290
+ static ɵcmp: i0.ɵɵComponentDeclaration<DocumentContentViewerComponent, "document-content-viewer", never, { "documentUrl": { "alias": "documentUrl"; "required": false; }; "contentType": { "alias": "contentType"; "required": false; }; "documentName": { "alias": "documentName"; "required": false; }; "selectedDocument": { "alias": "selectedDocument"; "required": false; }; "contextId": { "alias": "contextId"; "required": false; }; "isFormHide": { "alias": "isFormHide"; "required": false; }; }, {}, never, never, false, never>;
291
+ }
@@ -0,0 +1,160 @@
1
+ import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { DocumentHistorySection, HistoryDocument } from '../../models/document-history.model';
3
+ import { DocumentHistoryService } from '../../services/document-history.service';
4
+ import { DocumentViewerService } from '../../services/document-viewer.service';
5
+ import { DocumentActionsService } from '../../services/document-actions.service';
6
+ import { ConfirmationService } from 'primeng/api';
7
+ import { DocumentHttpService } from '../../services/document-http.service';
8
+ import * as i0 from "@angular/core";
9
+ /**
10
+ * Component for displaying document history in a timeline format.
11
+ */
12
+ export declare class DocumentHistoryComponent implements OnChanges {
13
+ private documentHistoryService;
14
+ private documentViewerService;
15
+ private documentActionsService;
16
+ private confirmationService;
17
+ private documentHttpService;
18
+ /**
19
+ * Input data for document history sections
20
+ */
21
+ historyData: DocumentHistorySection[];
22
+ /**
23
+ * Whether to show the history component
24
+ */
25
+ showHistory: boolean;
26
+ /**
27
+ * The context ID for API calls
28
+ */
29
+ contextId?: string;
30
+ /**
31
+ * The selected document for actions
32
+ */
33
+ selectedDocument?: any;
34
+ /**
35
+ * Event emitted when delete task is requested
36
+ */
37
+ deleteTaskRequested: EventEmitter<void>;
38
+ /**
39
+ * Event emitted when a document from history is selected
40
+ */
41
+ documentSelected: EventEmitter<HistoryDocument>;
42
+ /**
43
+ * Reference to the document actions component
44
+ */
45
+ documentActionsComponent?: any;
46
+ /**
47
+ * Active accordion index for controlling expand/collapse
48
+ */
49
+ activeAccordionIndex: number;
50
+ /**
51
+ * Whether the accordion is expanded
52
+ */
53
+ isAccordionExpanded: boolean;
54
+ /**
55
+ * Whether the actions dropdown menu is visible
56
+ */
57
+ showActionsMenu: boolean;
58
+ constructor(documentHistoryService: DocumentHistoryService, documentViewerService: DocumentViewerService, documentActionsService: DocumentActionsService, confirmationService: ConfirmationService, documentHttpService: DocumentHttpService);
59
+ /**
60
+ * Handles changes to input properties
61
+ */
62
+ ngOnChanges(changes: SimpleChanges): void;
63
+ /**
64
+ * Handle accordion open event
65
+ */
66
+ onAccordionOpen(): void;
67
+ /**
68
+ * Handle accordion close event
69
+ */
70
+ onAccordionClose(): void;
71
+ /**
72
+ * Toggle accordion state
73
+ */
74
+ toggleAccordion(): void;
75
+ /**
76
+ * Process history data to add computed properties
77
+ */
78
+ get processedHistoryData(): any[];
79
+ /**
80
+ * Downloads a document when clicked
81
+ * @param documentUrl - The URL of the document to download
82
+ * @param docName - The name of the document
83
+ */
84
+ downloadDocument(documentUrl: string, docName?: string): void;
85
+ /**
86
+ * Get alert count for the alerts section
87
+ */
88
+ getAlertCount(): number;
89
+ /**
90
+ * Get CSS class for event card based on action type
91
+ */
92
+ getEventCardClass(label: string): string;
93
+ /**
94
+ * Get CSS class for event icon based on action type
95
+ */
96
+ getEventIconClass(label: string): string;
97
+ /**
98
+ * Get the appropriate icon for the event
99
+ * @param label - The event label
100
+ * @returns {string} The icon class
101
+ */
102
+ getEventIcon(label: string): string;
103
+ /**
104
+ * Toggle the actions dropdown menu
105
+ */
106
+ toggleActionsMenu(): void;
107
+ /**
108
+ * Close the actions dropdown menu
109
+ */
110
+ closeActionsMenu(): void;
111
+ /**
112
+ * Handle delete task action
113
+ */
114
+ onDeleteTask(): void;
115
+ /**
116
+ * Shows standard delete confirmation dialog
117
+ * @private
118
+ */
119
+ private showStandardDeleteConfirmation;
120
+ /**
121
+ * Performs the actual delete operation
122
+ * @private
123
+ */
124
+ private performDelete;
125
+ /**
126
+ * Set reference to document actions component
127
+ */
128
+ setDocumentActionsComponent(component: any): void;
129
+ /**
130
+ * Handles document selection from history
131
+ * @param document - The selected document from history
132
+ */
133
+ onDocumentClick(document: HistoryDocument): void;
134
+ /**
135
+ * Processed history data with document lists
136
+ */
137
+ private _processedHistoryData;
138
+ /**
139
+ * Processes history data to include document lists for each item
140
+ */
141
+ private processHistoryData;
142
+ /**
143
+ * Gets the list of valid documents for a history item
144
+ * @param item - The history item
145
+ * @returns Array of valid documents
146
+ */
147
+ private getValidDocuments;
148
+ /**
149
+ * Determines if a timeline item should be hidden
150
+ * @param item - The history item
151
+ * @returns True if the item should be hidden
152
+ */
153
+ private shouldHideItem;
154
+ /**
155
+ * Listen for clicks outside the dropdown to close it
156
+ */
157
+ onDocumentClickOutside(event: Event): void;
158
+ static ɵfac: i0.ɵɵFactoryDeclaration<DocumentHistoryComponent, never>;
159
+ static ɵcmp: i0.ɵɵComponentDeclaration<DocumentHistoryComponent, "document-history", never, { "historyData": { "alias": "historyData"; "required": false; }; "showHistory": { "alias": "showHistory"; "required": false; }; "contextId": { "alias": "contextId"; "required": false; }; "selectedDocument": { "alias": "selectedDocument"; "required": false; }; }, { "deleteTaskRequested": "deleteTaskRequested"; "documentSelected": "documentSelected"; }, never, ["*", "[actions-component]"], false, never>;
160
+ }