cat-documents-ng 1.0.4 → 1.0.6

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 (210) hide show
  1. package/ng-package.json +10 -0
  2. package/package.json +5 -11
  3. package/src/Shared/components/confirmation-dialog/confirmation-dialog.component.html +3 -0
  4. package/src/Shared/components/confirmation-dialog/confirmation-dialog.component.scss +13 -0
  5. package/src/Shared/components/confirmation-dialog/confirmation-dialog.component.spec.ts +70 -0
  6. package/src/Shared/components/confirmation-dialog/confirmation-dialog.component.ts +133 -0
  7. package/src/Shared/components/table-primary/table-primary.component.html +66 -0
  8. package/src/Shared/components/table-primary/table-primary.component.scss +227 -0
  9. package/src/Shared/components/table-primary/table-primary.component.spec.ts +23 -0
  10. package/src/Shared/components/table-primary/table-primary.component.ts +143 -0
  11. package/src/Shared/components/table-primary/table-primary.model.ts +21 -0
  12. package/src/Shared/constant/ERROR.ts +55 -0
  13. package/src/Shared/constant/PERMISSIONS.ts +17 -0
  14. package/src/Shared/constant/SHARED.ts +936 -0
  15. package/{Shared/constant/URLS.d.ts → src/Shared/constant/URLS.ts} +31 -25
  16. package/src/Shared/services/app-config.service.spec.ts +19 -0
  17. package/src/Shared/services/app-config.service.ts +73 -0
  18. package/{Shared/services/global-error.handler.d.ts → src/Shared/services/global-error.handler.ts} +11 -9
  19. package/src/Shared/services/session.service.spec.ts +16 -0
  20. package/src/Shared/services/session.service.ts +76 -0
  21. package/src/Shared/shared.module.ts +25 -0
  22. package/src/lib/document/components/csv-viewer/csv-viewer.component.ts +1 -0
  23. package/src/lib/document/components/document-actions/document-actions.component.html +59 -0
  24. package/src/lib/document/components/document-actions/document-actions.component.scss +362 -0
  25. package/src/lib/document/components/document-actions/document-actions.component.spec.ts +297 -0
  26. package/src/lib/document/components/document-actions/document-actions.component.ts +163 -0
  27. package/src/lib/document/components/document-container/document-container.component.html +36 -0
  28. package/src/lib/document/components/document-container/document-container.component.scss +144 -0
  29. package/src/lib/document/components/document-container/document-container.component.spec.ts +110 -0
  30. package/src/lib/document/components/document-container/document-container.component.ts +363 -0
  31. package/src/lib/document/components/document-content-viewer/document-content-viewer.component.html +332 -0
  32. package/src/lib/document/components/document-content-viewer/document-content-viewer.component.scss +1877 -0
  33. package/src/lib/document/components/document-content-viewer/document-content-viewer.component.spec.ts +258 -0
  34. package/src/lib/document/components/document-content-viewer/document-content-viewer.component.ts +664 -0
  35. package/src/lib/document/components/document-history/document-history.component.html +96 -0
  36. package/src/lib/document/components/document-history/document-history.component.scss +392 -0
  37. package/src/lib/document/components/document-history/document-history.component.spec.ts +93 -0
  38. package/src/lib/document/components/document-history/document-history.component.ts +373 -0
  39. package/src/lib/document/components/document-list/document-list.component.html +46 -0
  40. package/src/lib/document/components/document-list/document-list.component.scss +513 -0
  41. package/src/lib/document/components/document-list/document-list.component.spec.ts +486 -0
  42. package/src/lib/document/components/document-list/document-list.component.ts +682 -0
  43. package/src/lib/document/components/document-list-item/document-list-item.component.html +36 -0
  44. package/src/lib/document/components/document-list-item/document-list-item.component.scss +34 -0
  45. package/src/lib/document/components/document-list-item/document-list-item.component.spec.ts +75 -0
  46. package/src/lib/document/components/document-list-item/document-list-item.component.ts +40 -0
  47. package/src/lib/document/components/document-search/document-search.component.html +64 -0
  48. package/src/lib/document/components/document-search/document-search.component.scss +206 -0
  49. package/src/lib/document/components/document-search/document-search.component.spec.ts +82 -0
  50. package/src/lib/document/components/document-search/document-search.component.ts +163 -0
  51. package/src/lib/document/components/document-status/document-status.component.html +31 -0
  52. package/src/lib/document/components/document-status/document-status.component.scss +192 -0
  53. package/src/lib/document/components/document-status/document-status.component.spec.ts +23 -0
  54. package/src/lib/document/components/document-status/document-status.component.ts +87 -0
  55. package/src/lib/document/components/document-upload/document-upload.component.html +160 -0
  56. package/src/lib/document/components/document-upload/document-upload.component.scss +235 -0
  57. package/src/lib/document/components/document-upload/document-upload.component.spec.ts +95 -0
  58. package/src/lib/document/components/document-upload/document-upload.component.ts +668 -0
  59. package/src/lib/document/components/document-viewer/document-viewer.component.html +50 -0
  60. package/src/lib/document/components/document-viewer/document-viewer.component.scss +187 -0
  61. package/src/lib/document/components/document-viewer/document-viewer.component.spec.ts +79 -0
  62. package/src/lib/document/components/document-viewer/document-viewer.component.ts +261 -0
  63. package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.html +48 -0
  64. package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.scss +320 -0
  65. package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.spec.ts +59 -0
  66. package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.ts +150 -0
  67. package/src/lib/document/components/documents-menu/documents-menu.component.html +44 -0
  68. package/src/lib/document/components/documents-menu/documents-menu.component.scss +363 -0
  69. package/src/lib/document/components/documents-menu/documents-menu.component.spec.ts +23 -0
  70. package/src/lib/document/components/documents-menu/documents-menu.component.ts +316 -0
  71. package/src/lib/document/components/folder-block/folder-block.component.html +46 -0
  72. package/src/lib/document/components/folder-block/folder-block.component.scss +9 -0
  73. package/src/lib/document/components/folder-block/folder-block.component.spec.ts +70 -0
  74. package/{lib/document/components/folder-block/folder-block.component.d.ts → src/lib/document/components/folder-block/folder-block.component.ts} +28 -12
  75. package/src/lib/document/components/folder-container/folder-container.component.html +56 -0
  76. package/src/lib/document/components/folder-container/folder-container.component.scss +20 -0
  77. package/src/lib/document/components/folder-container/folder-container.component.spec.ts +27 -0
  78. package/src/lib/document/components/folder-container/folder-container.component.ts +328 -0
  79. package/src/lib/document/components/linked-document/linked-document.component.html +23 -0
  80. package/src/lib/document/components/linked-document/linked-document.component.scss +10 -0
  81. package/src/lib/document/components/linked-document/linked-document.component.spec.ts +61 -0
  82. package/src/lib/document/components/linked-document/linked-document.component.ts +49 -0
  83. package/src/lib/document/components/request-document/request-document.component.html +86 -0
  84. package/src/lib/document/components/request-document/request-document.component.scss +16 -0
  85. package/src/lib/document/components/request-document/request-document.component.ts +278 -0
  86. package/src/lib/document/components/sidebar/sidebar.component.html +75 -0
  87. package/src/lib/document/components/sidebar/sidebar.component.scss +157 -0
  88. package/src/lib/document/components/sidebar/sidebar.component.spec.ts +114 -0
  89. package/src/lib/document/components/sidebar/sidebar.component.ts +223 -0
  90. package/src/lib/document/components/user-list/user-list.component.html +33 -0
  91. package/src/lib/document/components/user-list/user-list.component.scss +118 -0
  92. package/src/lib/document/components/user-list/user-list.component.spec.ts +23 -0
  93. package/src/lib/document/components/user-list/user-list.component.ts +181 -0
  94. package/src/lib/document/constant/DOCUMENT_HISTORY.ts +52 -0
  95. package/src/lib/document/directives/document.directive.ts +32 -0
  96. package/src/lib/document/directives/permission.directive.spec.ts +0 -0
  97. package/src/lib/document/directives/permission.directive.ts +72 -0
  98. package/src/lib/document/document.module.ts +351 -0
  99. package/{lib/document/models/document-alert.model.d.ts → src/lib/document/models/document-alert.model.ts} +11 -4
  100. package/src/lib/document/models/document-category.model.ts +30 -0
  101. package/src/lib/document/models/document-history.model.ts +109 -0
  102. package/src/lib/document/models/document-list-response.model.ts +37 -0
  103. package/src/lib/document/models/document-type.model.ts +44 -0
  104. package/src/lib/document/models/document.model.ts +53 -0
  105. package/{lib/document/models/folder.model.d.ts → src/lib/document/models/folder.model.ts} +10 -4
  106. package/src/lib/document/models/status-data.model.ts +31 -0
  107. package/src/lib/document/models/uploaded-file-response.model.ts +7 -0
  108. package/src/lib/document/models/user-list.model.ts +10 -0
  109. package/src/lib/document/services/csv-parser.service.spec.ts +97 -0
  110. package/src/lib/document/services/csv-parser.service.ts +303 -0
  111. package/src/lib/document/services/document-actions.service.ts +125 -0
  112. package/src/lib/document/services/document-content-type.service.ts +193 -0
  113. package/src/lib/document/services/document-history-style.service.ts +138 -0
  114. package/src/lib/document/services/document-history.service.ts +129 -0
  115. package/src/lib/document/services/document-http.service.spec.ts +119 -0
  116. package/src/lib/document/services/document-http.service.ts +497 -0
  117. package/src/lib/document/services/document-list.service.ts +195 -0
  118. package/src/lib/document/services/document-menu.service.ts +277 -0
  119. package/src/lib/document/services/document-scroll.service.ts +138 -0
  120. package/src/lib/document/services/document-severity.service.ts +98 -0
  121. package/src/lib/document/services/document-table-builder.service.ts +82 -0
  122. package/src/lib/document/services/document-upload-business.service.ts +326 -0
  123. package/src/lib/document/services/document-upload-data.service.ts +82 -0
  124. package/src/lib/document/services/document-upload-form.service.ts +149 -0
  125. package/src/lib/document/services/document-upload.service.spec.ts +99 -0
  126. package/src/lib/document/services/document-upload.service.ts +209 -0
  127. package/src/lib/document/services/document-viewer.service.ts +279 -0
  128. package/src/lib/document/services/document-zoom.service.spec.ts +56 -0
  129. package/src/lib/document/services/document-zoom.service.ts +164 -0
  130. package/src/lib/document/services/document.service.ts +356 -0
  131. package/src/lib/document/services/eml-parser.service.ts +444 -0
  132. package/src/lib/document/services/excel-parser.service.spec.ts +66 -0
  133. package/src/lib/document/services/excel-parser.service.ts +483 -0
  134. package/src/lib/document/services/file-format.service.spec.ts +16 -0
  135. package/src/lib/document/services/file-format.service.ts +63 -0
  136. package/src/lib/document/services/status-calculator.service.ts +44 -0
  137. package/src/lib/document/services/user-list.service.ts +77 -0
  138. package/src/lib/document/state/document.query.ts +378 -0
  139. package/{lib/document/state/document.service.d.ts → src/lib/document/state/document.service.ts} +46 -15
  140. package/src/lib/document/state/document.state.ts +100 -0
  141. package/src/lib/document/state/document.store.ts +200 -0
  142. package/{public-api.d.ts → src/public-api.ts} +4 -0
  143. package/tsconfig.lib.json +15 -0
  144. package/tsconfig.lib.prod.json +11 -0
  145. package/tsconfig.spec.json +15 -0
  146. package/Shared/components/confirmation-dialog/confirmation-dialog.component.d.ts +0 -44
  147. package/Shared/components/table-primary/table-primary.component.d.ts +0 -31
  148. package/Shared/components/table-primary/table-primary.model.d.ts +0 -19
  149. package/Shared/constant/ERROR.d.ts +0 -52
  150. package/Shared/constant/SHARED.d.ts +0 -546
  151. package/Shared/services/app-config.service.d.ts +0 -51
  152. package/Shared/services/session.service.d.ts +0 -46
  153. package/Shared/shared.module.d.ts +0 -14
  154. package/fesm2022/cat-documents-ng.mjs +0 -11392
  155. package/fesm2022/cat-documents-ng.mjs.map +0 -1
  156. package/index.d.ts +0 -5
  157. package/lib/document/components/document-actions/document-actions.component.d.ts +0 -78
  158. package/lib/document/components/document-container/document-container.component.d.ts +0 -162
  159. package/lib/document/components/document-content-viewer/document-content-viewer.component.d.ts +0 -291
  160. package/lib/document/components/document-history/document-history.component.d.ts +0 -160
  161. package/lib/document/components/document-list/document-list.component.d.ts +0 -299
  162. package/lib/document/components/document-list-item/document-list-item.component.d.ts +0 -28
  163. package/lib/document/components/document-search/document-search.component.d.ts +0 -77
  164. package/lib/document/components/document-status/document-status.component.d.ts +0 -24
  165. package/lib/document/components/document-upload/document-upload.component.d.ts +0 -321
  166. package/lib/document/components/document-viewer/document-viewer.component.d.ts +0 -137
  167. package/lib/document/components/document-zoom-controls/document-zoom-controls.component.d.ts +0 -33
  168. package/lib/document/components/documents-menu/documents-menu.component.d.ts +0 -110
  169. package/lib/document/components/folder-container/folder-container.component.d.ts +0 -162
  170. package/lib/document/components/linked-document/linked-document.component.d.ts +0 -39
  171. package/lib/document/components/request-document/request-document.component.d.ts +0 -69
  172. package/lib/document/components/sidebar/sidebar.component.d.ts +0 -109
  173. package/lib/document/components/user-list/user-list.component.d.ts +0 -34
  174. package/lib/document/constant/DOCUMENT_HISTORY.d.ts +0 -41
  175. package/lib/document/directives/document.directive.d.ts +0 -20
  176. package/lib/document/directives/permission.directive.d.ts +0 -38
  177. package/lib/document/document.module.d.ts +0 -60
  178. package/lib/document/models/document-category.model.d.ts +0 -24
  179. package/lib/document/models/document-history.model.d.ts +0 -94
  180. package/lib/document/models/document-list-response.model.d.ts +0 -33
  181. package/lib/document/models/document-type.model.d.ts +0 -37
  182. package/lib/document/models/document.model.d.ts +0 -44
  183. package/lib/document/models/status-data.model.d.ts +0 -27
  184. package/lib/document/models/uploaded-file-response.model.d.ts +0 -7
  185. package/lib/document/models/user-list.model.d.ts +0 -8
  186. package/lib/document/services/csv-parser.service.d.ts +0 -88
  187. package/lib/document/services/document-actions.service.d.ts +0 -48
  188. package/lib/document/services/document-content-type.service.d.ts +0 -85
  189. package/lib/document/services/document-history-style.service.d.ts +0 -34
  190. package/lib/document/services/document-history.service.d.ts +0 -42
  191. package/lib/document/services/document-http.service.d.ts +0 -179
  192. package/lib/document/services/document-list.service.d.ts +0 -74
  193. package/lib/document/services/document-menu.service.d.ts +0 -122
  194. package/lib/document/services/document-scroll.service.d.ts +0 -55
  195. package/lib/document/services/document-table-builder.service.d.ts +0 -38
  196. package/lib/document/services/document-upload-business.service.d.ts +0 -107
  197. package/lib/document/services/document-upload-data.service.d.ts +0 -40
  198. package/lib/document/services/document-upload-form.service.d.ts +0 -41
  199. package/lib/document/services/document-upload.service.d.ts +0 -99
  200. package/lib/document/services/document-viewer.service.d.ts +0 -97
  201. package/lib/document/services/document-zoom.service.d.ts +0 -81
  202. package/lib/document/services/document.service.d.ts +0 -161
  203. package/lib/document/services/eml-parser.service.d.ts +0 -116
  204. package/lib/document/services/excel-parser.service.d.ts +0 -169
  205. package/lib/document/services/file-format.service.d.ts +0 -34
  206. package/lib/document/services/status-calculator.service.d.ts +0 -20
  207. package/lib/document/services/user-list.service.d.ts +0 -29
  208. package/lib/document/state/document.query.d.ts +0 -243
  209. package/lib/document/state/document.state.d.ts +0 -61
  210. package/lib/document/state/document.store.d.ts +0 -56
@@ -1,162 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import { DocumentModel } from '../../models/document.model';
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';
8
- import { DocumentUploadComponent } from '../document-upload/document-upload.component';
9
- import { RequestDocumentComponent } from '../request-document/request-document.component';
10
- import { DocumentHelperService } from '../../services/document.service';
11
- import { SidebarComponent } from '../sidebar/sidebar.component';
12
- import * as i0 from "@angular/core";
13
- /**
14
- * The `FolderContainerComponent` is responsible for rendering a container
15
- * that displays a list of documents and associated folder panel data.
16
- * This component utilizes the `FOLDERPANEL` constant for folder panel data
17
- * and accepts a document list input of type `DocumentModel`.
18
- */
19
- export declare class FolderContainerComponent implements OnInit {
20
- private documentQuery;
21
- private documentHelperService;
22
- /**
23
- * A list of documents passed as input to the component.
24
- * Represents the document data to be displayed in the folder container.
25
- */
26
- documentList?: DocumentModel[];
27
- /**
28
- * A list of documents passed as input to the component.
29
- * Represents the document data to be displayed in the folder container.
30
- */
31
- folderList: FolderBlockModel[];
32
- /**
33
- * The context ID for the folder container.
34
- * @type {string}
35
- */
36
- contextId: string;
37
- /**
38
- * The list of users passed as input to the component.
39
- * @type {UserListModel[]}
40
- */
41
- userList: UserListModel[];
42
- /**
43
- * The status data passed as input to the component.
44
- * @type {StatusDataModel[]}
45
- */
46
- statusData: StatusDataModel[];
47
- /**
48
- * The document categories passed as input to the component.
49
- * @type {DocumentCategory[]}
50
- */
51
- categories: DocumentCategory[];
52
- /**
53
- * Flag to control user list visibility
54
- */
55
- showUserList: boolean;
56
- /**
57
- * Animation state for user list visibility
58
- */
59
- userListAnimationState: string;
60
- /**
61
- * Controls the visibility of the document upload sidebar
62
- */
63
- isDocumentUploadSidebarOpen: boolean;
64
- /**
65
- * Controls the visibility of the request document sidebar
66
- */
67
- isRequestDocumentSidebarOpen: boolean;
68
- /**
69
- * Reference to the document upload component
70
- */
71
- documentUploadComponent: DocumentUploadComponent;
72
- /**
73
- * References to the sidebars
74
- */
75
- uploadSidebarComponent: SidebarComponent;
76
- requestSidebarComponent: SidebarComponent;
77
- requestDocumentComponent: RequestDocumentComponent;
78
- /**
79
- * Tracks whether the save button should be disabled
80
- */
81
- isSaveButtonDisabled: boolean;
82
- /** Tracks save button disabled for request document */
83
- isRequestSaveButtonDisabled: boolean;
84
- /**
85
- * Tracks whether there are unsaved changes in the document upload form
86
- */
87
- hasUnsavedChanges: boolean;
88
- /**
89
- * Tracks whether there are unsaved changes in the request document form
90
- */
91
- requestHasUnsavedChanges: boolean;
92
- constructor(documentQuery: DocumentQuery, documentHelperService: DocumentHelperService);
93
- ngOnInit(): void;
94
- /**
95
- * Called when the view is initialized to set up the save button state
96
- */
97
- ngAfterViewInit(): void;
98
- /**
99
- * Updates the save button disabled state based on the document upload component
100
- */
101
- updateSaveButtonState(): void;
102
- /**
103
- * Handles form validation changes from the document upload component
104
- */
105
- onFormValidationChange(): void;
106
- /** Updates request save button disabled state */
107
- onRequestFormValidationChange(): void;
108
- /**
109
- * Checks if there are unsaved changes in the document upload form
110
- */
111
- private checkForUnsavedChanges;
112
- /**
113
- * Opens the document upload sidebar
114
- */
115
- openDocumentUploadSidebar(): void;
116
- /**
117
- * Opens the request document sidebar
118
- */
119
- openRequestDocumentSidebar(): void;
120
- /**
121
- * Handles the document upload sidebar hide event
122
- */
123
- onDocumentUploadSidebarHide(): void;
124
- /**
125
- * Handles the document upload sidebar close event (when close button is clicked or sidebar is dismissed)
126
- */
127
- onDocumentUploadSidebarClose(): void;
128
- /**
129
- * Handles the document upload sidebar close with unsaved changes event
130
- */
131
- onDocumentUploadSidebarCloseWithUnsavedChanges(): void;
132
- /**
133
- * Handles the request document sidebar hide event
134
- */
135
- onRequestDocumentSidebarHide(): void;
136
- /**
137
- * Handles the request document sidebar close with unsaved changes event
138
- */
139
- onRequestDocumentSidebarCloseWithUnsavedChanges(): void;
140
- /** Invoked from sidebar Save button for request document */
141
- onRequestDocumentSave(): void;
142
- /** Request success handler */
143
- onRequestDocumentSuccess(): void;
144
- /** Request error handler */
145
- onRequestDocumentError(error: any): void;
146
- /** Handle unsaved changes state from request form */
147
- onRequestUnsavedChange(hasChanges: boolean): void;
148
- /**
149
- * Handles the document upload save event
150
- */
151
- onDocumentUploadSave(): void;
152
- /**
153
- * Handles successful document upload and refreshes data
154
- */
155
- onDocumentUploadSuccess(): void;
156
- /**
157
- * Handles document upload error
158
- */
159
- onDocumentUploadError(error: any): void;
160
- static ɵfac: i0.ɵɵFactoryDeclaration<FolderContainerComponent, never>;
161
- 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>;
162
- }
@@ -1,39 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import { DocumentModel } from '../../models/document.model';
3
- import { DocumentListItem } from '../../models/document-list-response.model';
4
- import * as i0 from "@angular/core";
5
- /**
6
- * Description placeholder
7
- * @class LinkedDocumentComponent
8
- * @typedef {LinkedDocumentComponent}
9
- * @implements {OnChanges}
10
- */
11
- export declare class LinkedDocumentComponent {
12
- /**
13
- * Selected document for view.
14
- * @type {?DocumentModel}
15
- */
16
- selectedDocument?: DocumentListItem;
17
- /**
18
- * Whole document list.
19
- * @type {?DocumentModel[]}
20
- */
21
- documentList?: DocumentListItem[];
22
- /**
23
- * Changed selected document.
24
- * @type {*}
25
- */
26
- selectedDocumentChange: EventEmitter<DocumentListItem>;
27
- /**
28
- * Filtered documents.
29
- * @type {DocumentModel[]}
30
- */
31
- filteredDocuments: DocumentModel[];
32
- /**
33
- * Handle the click on the document.
34
- * @param {DocumentModel} document - Clicked document.
35
- */
36
- handleDocumentClick(document: DocumentListItem): void;
37
- static ɵfac: i0.ɵɵFactoryDeclaration<LinkedDocumentComponent, never>;
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>;
39
- }
@@ -1,69 +0,0 @@
1
- import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit, SimpleChanges, OnChanges } from '@angular/core';
2
- import { UserListModel } from '../../models/user-list.model';
3
- import { DocumentCategory } from '../../models/document-category.model';
4
- import { DocumentTypeModel } from '../../models/document-type.model';
5
- import { DocumentUploadService } from '../../services/document-upload.service';
6
- import { DocumentUploadFormService } from '../../services/document-upload-form.service';
7
- import { DocumentUploadDataService } from '../../services/document-upload-data.service';
8
- import { DocumentHttpService } from '../../services/document-http.service';
9
- import { SessionService } from '../../../../Shared/services/session.service';
10
- import * as i0 from "@angular/core";
11
- export declare class RequestDocumentComponent implements OnInit, OnChanges, OnDestroy {
12
- documentUpload: DocumentUploadService;
13
- private formService;
14
- private dataService;
15
- private cdr;
16
- private documentHttpService;
17
- private sessionService;
18
- contextId: string;
19
- isRequestSaveBtnClicked: boolean;
20
- isRequestSidebarClosed: boolean;
21
- onFormValidationChange: EventEmitter<void>;
22
- onRequestSuccess: EventEmitter<void>;
23
- onRequestError: EventEmitter<any>;
24
- hasUnsavedChangesChange: EventEmitter<boolean>;
25
- selectedAssignmentType: 'Applicant' | 'Application' | null;
26
- selectedApplicant: string;
27
- selectedCategory: string;
28
- selectedDocumentType: string;
29
- description: string;
30
- applicantList: UserListModel[];
31
- filteredApplicantList: UserListModel[];
32
- categoryOptions: DocumentCategory[];
33
- documentTypeOptions: DocumentTypeModel[];
34
- isLoadingApplicants: boolean;
35
- isLoadingCategories: boolean;
36
- isLoadingDocumentTypes: boolean;
37
- isSaving: boolean;
38
- isFormValid: boolean;
39
- private destroy$;
40
- constructor(documentUpload: DocumentUploadService, formService: DocumentUploadFormService, dataService: DocumentUploadDataService, cdr: ChangeDetectorRef, documentHttpService: DocumentHttpService, sessionService: SessionService);
41
- ngOnInit(): void;
42
- ngOnChanges(changes: SimpleChanges): void;
43
- onAssignmentTypeChange(): void;
44
- onCategoryChange(): void;
45
- onDocumentTypeChange(): void;
46
- onApplicantSelectionChange(): void;
47
- onDescriptionChange(): void;
48
- loadApplicants(): void;
49
- loadCategories(): void;
50
- loadDocumentTypes(): void;
51
- getSaveButtonDisabled(): boolean;
52
- saveRequestDocument(): void;
53
- resetForm(): void;
54
- resetSelections(): void;
55
- resetDocumentType(): void;
56
- handleApplicantLoading(): void;
57
- handleApplicantsLoaded(applicants: UserListModel[]): void;
58
- handleCategoriesLoaded(categories: DocumentCategory[]): void;
59
- handleDocumentTypesLoaded(documentTypes: DocumentTypeModel[]): void;
60
- filterApplicants(): void;
61
- validateForm(): void;
62
- validateAndEmit(): void;
63
- /** Emits unsaved changes state based on any field being non-empty */
64
- private emitUnsavedChanges;
65
- handleError(_title: string, _error: any, resetLoading: () => void): void;
66
- ngOnDestroy(): void;
67
- static ɵfac: i0.ɵɵFactoryDeclaration<RequestDocumentComponent, never>;
68
- static ɵcmp: i0.ɵɵComponentDeclaration<RequestDocumentComponent, "lib-request-document", never, { "contextId": { "alias": "contextId"; "required": false; }; "isRequestSaveBtnClicked": { "alias": "isRequestSaveBtnClicked"; "required": false; }; "isRequestSidebarClosed": { "alias": "isRequestSidebarClosed"; "required": false; }; }, { "onFormValidationChange": "onFormValidationChange"; "onRequestSuccess": "onRequestSuccess"; "onRequestError": "onRequestError"; "hasUnsavedChangesChange": "hasUnsavedChangesChange"; }, never, never, false, never>;
69
- }
@@ -1,109 +0,0 @@
1
- import { EventEmitter, OnDestroy } from '@angular/core';
2
- import { ConfirmationService } from 'primeng/api';
3
- import * as i0 from "@angular/core";
4
- interface ConfirmationOptions {
5
- message: string;
6
- header?: string;
7
- icon?: string;
8
- acceptLabel?: string;
9
- rejectLabel?: string;
10
- acceptIcon?: string;
11
- rejectIcon?: string;
12
- acceptButtonClass?: string;
13
- rejectButtonClass?: string;
14
- }
15
- export declare class SidebarComponent implements OnDestroy {
16
- private confirmationService;
17
- private isShowingConfirmation;
18
- set visible(value: boolean);
19
- get visible(): boolean;
20
- private _visible;
21
- position: 'left' | 'right';
22
- width: string;
23
- title: string;
24
- showCloseButton: boolean;
25
- modal: boolean;
26
- dismissible: boolean;
27
- styleClass: string;
28
- appendTo: string;
29
- blockScroll: boolean;
30
- closeIcon: string;
31
- showSaveButton: boolean;
32
- saveButtonText: string;
33
- saveButtonDisabled: boolean;
34
- successMessage: string;
35
- errorMessage: string;
36
- hasUnsavedChanges: boolean;
37
- visibleChange: EventEmitter<boolean>;
38
- onShow: EventEmitter<void>;
39
- onHide: EventEmitter<void>;
40
- onSave: EventEmitter<void>;
41
- onClose: EventEmitter<void>;
42
- showSuccessMessage: boolean;
43
- showErrorMessage: boolean;
44
- private destroy$;
45
- unsavedChangesConfirmationOptions: ConfirmationOptions;
46
- constructor(confirmationService: ConfirmationService);
47
- /**
48
- * Handles the onHide event from PrimeNG sidebar
49
- * Only emits when actually closing, not when showing confirmation
50
- */
51
- onSidebarHide(): void;
52
- /**
53
- * Handles the visibleChange event from PrimeNG sidebar
54
- * Intercepts automatic closing to show confirmation if needed
55
- */
56
- onVisibleChange(value: boolean): void;
57
- /**
58
- * Opens the sidebar
59
- */
60
- open(): void;
61
- /**
62
- * Closes the sidebar
63
- */
64
- close(): void;
65
- /**
66
- * Handles escape key press
67
- * Shows confirmation if there are unsaved changes
68
- */
69
- handleEscapeKey(event: KeyboardEvent): void;
70
- /**
71
- * Handles backdrop click events
72
- * Prevents default PrimeNG behavior and shows confirmation if needed
73
- */
74
- handleBackdropClick(event: Event): void;
75
- /**
76
- * Handles all closing scenarios (backdrop click, escape key, close button, etc.)
77
- * This is the single entry point for all closing logic
78
- */
79
- handleClose(): void;
80
- /**
81
- * Shows confirmation dialog for unsaved changes
82
- */
83
- private showUnsavedChangesConfirmation;
84
- /**
85
- * Shows success message and closes sidebar after delay
86
- */
87
- showSuccess(): void;
88
- /**
89
- * Shows error message
90
- */
91
- showError(message?: string): void;
92
- /**
93
- * Clears all messages
94
- */
95
- clearMessages(): void;
96
- /**
97
- * Checks if there are unsaved changes
98
- * @returns True if there are unsaved changes, false otherwise
99
- */
100
- checkForUnsavedChanges(): boolean;
101
- /**
102
- * Lifecycle hook that is called when component is destroyed.
103
- * Cleans up subscriptions.
104
- */
105
- ngOnDestroy(): void;
106
- static ɵfac: i0.ɵɵFactoryDeclaration<SidebarComponent, never>;
107
- static ɵcmp: i0.ɵɵComponentDeclaration<SidebarComponent, "lib-sidebar", never, { "visible": { "alias": "visible"; "required": false; }; "position": { "alias": "position"; "required": false; }; "width": { "alias": "width"; "required": false; }; "title": { "alias": "title"; "required": false; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; }; "modal": { "alias": "modal"; "required": false; }; "dismissible": { "alias": "dismissible"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "blockScroll": { "alias": "blockScroll"; "required": false; }; "closeIcon": { "alias": "closeIcon"; "required": false; }; "showSaveButton": { "alias": "showSaveButton"; "required": false; }; "saveButtonText": { "alias": "saveButtonText"; "required": false; }; "saveButtonDisabled": { "alias": "saveButtonDisabled"; "required": false; }; "successMessage": { "alias": "successMessage"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "hasUnsavedChanges": { "alias": "hasUnsavedChanges"; "required": false; }; }, { "visibleChange": "visibleChange"; "onShow": "onShow"; "onHide": "onHide"; "onSave": "onSave"; "onClose": "onClose"; }, never, ["[header]", "*"], false, never>;
108
- }
109
- export {};
@@ -1,34 +0,0 @@
1
- import { EventEmitter, OnInit, OnChanges, SimpleChanges, ChangeDetectorRef } 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
- private cdr;
15
- userList: UserListModel[];
16
- categories: DocumentCategory[];
17
- userSelected: EventEmitter<string>;
18
- userData: UserListModel[];
19
- filteredUserData: UserListModel[];
20
- selectedUser: string | undefined;
21
- shouldShowContainer: boolean;
22
- private userListSubscription;
23
- private categoriesSubscription;
24
- constructor(documentService: DocumentHelperService, documentStore: DocumentStore, documentQuery: DocumentQuery, userListService: UserListService, cdr: ChangeDetectorRef);
25
- ngOnChanges(changes: SimpleChanges): void;
26
- initializeUserData(): void;
27
- updateFilteredUserData(): void;
28
- ngOnInit(): void;
29
- onUserSelect(username: string, id: string): void;
30
- getAvatarColor(color: string | undefined): string;
31
- ngOnDestroy(): void;
32
- static ɵfac: i0.ɵɵFactoryDeclaration<UserListComponent, never>;
33
- 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>;
34
- }
@@ -1,41 +0,0 @@
1
- /**
2
- * Constants for Document History labels and styling
3
- */
4
- export declare const DOCUMENT_HISTORY: {
5
- LABELS: {
6
- DOCUMENT_REQUESTED: string;
7
- DOCUMENT_UPLOADED: string;
8
- DOCUMENT_REJECTED: string;
9
- DOCUMENT_ACCEPTED: string;
10
- };
11
- ICONS: {
12
- DOCUMENT_REQUESTED: string;
13
- DOCUMENT_UPLOADED: string;
14
- DOCUMENT_REJECTED: string;
15
- DOCUMENT_ACCEPTED: string;
16
- };
17
- TEXT_COLORS: {
18
- DOCUMENT_REQUESTED: string;
19
- DOCUMENT_UPLOADED: string;
20
- DOCUMENT_REJECTED: string;
21
- DOCUMENT_ACCEPTED: string;
22
- };
23
- BG_COLORS: {
24
- DOCUMENT_REQUESTED: string;
25
- DOCUMENT_UPLOADED: string;
26
- DOCUMENT_REJECTED: string;
27
- DOCUMENT_ACCEPTED: string;
28
- };
29
- BORDER_COLORS: {
30
- DOCUMENT_REQUESTED: string;
31
- DOCUMENT_UPLOADED: string;
32
- DOCUMENT_REJECTED: string;
33
- DOCUMENT_ACCEPTED: string;
34
- };
35
- ICON_BG_COLORS: {
36
- DOCUMENT_REQUESTED: string;
37
- DOCUMENT_UPLOADED: string;
38
- DOCUMENT_REJECTED: string;
39
- DOCUMENT_ACCEPTED: string;
40
- };
41
- };
@@ -1,20 +0,0 @@
1
- import { TemplateRef, ViewContainerRef } from "@angular/core";
2
- import { DocumentHelperService } from "../services/document.service";
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Directive to display the document data
6
- */
7
- export declare class DocumentDirective {
8
- private documentService;
9
- private templateRef;
10
- private vcr;
11
- /**
12
- * Creates an instance of DocumentDirective.
13
- * @param documentService Service to get the document data.
14
- * @param templateRef Reference to the template.
15
- * @param vcr View container reference to manage the view.
16
- */
17
- constructor(documentService: DocumentHelperService, templateRef: TemplateRef<any>, vcr: ViewContainerRef);
18
- static ɵfac: i0.ɵɵFactoryDeclaration<DocumentDirective, never>;
19
- static ɵdir: i0.ɵɵDirectiveDeclaration<DocumentDirective, "[doc]", never, {}, {}, never, never, false, never>;
20
- }
@@ -1,38 +0,0 @@
1
- import { ElementRef, Renderer2, SimpleChanges, OnChanges } from '@angular/core';
2
- import { SessionService } from '../../../Shared/services/session.service';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Directive to conditionally show or hide elements based on user permissions.
6
- * @class HasPermissionDirective
7
- * @typedef {HasPermissionDirective}
8
- */
9
- export declare class HasPermissionDirective implements OnChanges {
10
- private el;
11
- private renderer;
12
- sessionService: SessionService;
13
- /**
14
- * The required permission(s) to display the element.
15
- * Accepts a single string or an array of strings.
16
- * @type {string | string[]}
17
- */
18
- permission?: string | string[];
19
- /**
20
- * Creates an instance of HasPermissionDirective.
21
- * @param {ElementRef} el - Reference to the host element.
22
- * @param {Renderer2} renderer - Angular Renderer for DOM manipulation.
23
- * @param {SessionService} sessionService - Service to retrieve user permissions.
24
- */
25
- constructor(el: ElementRef, renderer: Renderer2, sessionService: SessionService);
26
- /**
27
- * Lifecycle hook that is called when input properties change.
28
- * @param {SimpleChanges} changes - The changes in input properties.
29
- */
30
- ngOnChanges(changes: SimpleChanges): void;
31
- /**
32
- * Checks if the user has the required permission(s).
33
- * Hides the element if the permission is not found.
34
- */
35
- private checkPermission;
36
- static ɵfac: i0.ɵɵFactoryDeclaration<HasPermissionDirective, never>;
37
- static ɵdir: i0.ɵɵDirectiveDeclaration<HasPermissionDirective, "[permission]", never, { "permission": { "alias": "permission"; "required": false; }; }, {}, never, never, false, never>;
38
- }
@@ -1,60 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./components/document-container/document-container.component";
3
- import * as i2 from "./components/folder-container/folder-container.component";
4
- import * as i3 from "./components/folder-block/folder-block.component";
5
- import * as i4 from "./components/document-list/document-list.component";
6
- import * as i5 from "./components/document-list-item/document-list-item.component";
7
- import * as i6 from "./components/document-upload/document-upload.component";
8
- import * as i7 from "./components/document-viewer/document-viewer.component";
9
- import * as i8 from "./components/document-history/document-history.component";
10
- import * as i9 from "./components/document-content-viewer/document-content-viewer.component";
11
- import * as i10 from "./components/document-zoom-controls/document-zoom-controls.component";
12
- import * as i11 from "./directives/document.directive";
13
- import * as i12 from "./components/linked-document/linked-document.component";
14
- import * as i13 from "./components/documents-menu/documents-menu.component";
15
- import * as i14 from "./components/user-list/user-list.component";
16
- import * as i15 from "./components/document-status/document-status.component";
17
- import * as i16 from "./components/document-actions/document-actions.component";
18
- import * as i17 from "./components/document-search/document-search.component";
19
- import * as i18 from "./components/sidebar/sidebar.component";
20
- import * as i19 from "./components/request-document/request-document.component";
21
- import * as i20 from "@angular/common";
22
- import * as i21 from "primeng/accordion";
23
- import * as i22 from "@angular/common/http";
24
- import * as i23 from "primeng/button";
25
- import * as i24 from "primeng/sidebar";
26
- import * as i25 from "primeng/fileupload";
27
- import * as i26 from "primeng/progressbar";
28
- import * as i27 from "primeng/badge";
29
- import * as i28 from "primeng/listbox";
30
- import * as i29 from "primeng/checkbox";
31
- import * as i30 from "primeng/radiobutton";
32
- import * as i31 from "primeng/timeline";
33
- import * as i32 from "primeng/inputtextarea";
34
- import * as i33 from "@angular/forms";
35
- import * as i34 from "ng2-pdf-viewer";
36
- import * as i35 from "ngx-doc-viewer";
37
- import * as i36 from "primeng/dialog";
38
- import * as i37 from "primeng/dropdown";
39
- import * as i38 from "primeng/inputtext";
40
- import * as i39 from "primeng/menu";
41
- import * as i40 from "primeng/panelmenu";
42
- import * as i41 from "primeng/card";
43
- import * as i42 from "primeng/table";
44
- import * as i43 from "../../Shared/shared.module";
45
- import * as i44 from "primeng/toast";
46
- import * as i45 from "primeng/tooltip";
47
- import * as i46 from "primeng/messages";
48
- import * as i47 from "primeng/message";
49
- /**
50
- * @module DocumentModule
51
- *
52
- * The `DocumentModule` handles the organization and display of document and folder components
53
- * in the application. This module is designed to support features like folder containers,
54
- * document lists, and individual document items.
55
- */
56
- export declare class DocumentModule {
57
- static ɵfac: i0.ɵɵFactoryDeclaration<DocumentModule, never>;
58
- static ɵmod: i0.ɵɵNgModuleDeclaration<DocumentModule, [typeof i1.DocumentContainerComponent, typeof i2.FolderContainerComponent, typeof i3.FolderBlockComponent, typeof i4.DocumentListComponent, typeof i5.DocumentListItemComponent, typeof i6.DocumentUploadComponent, typeof i7.DocumentViewerComponent, typeof i8.DocumentHistoryComponent, typeof i9.DocumentContentViewerComponent, typeof i10.DocumentZoomControlsComponent, typeof i11.DocumentDirective, typeof i12.LinkedDocumentComponent, typeof i13.DocumentsMenuComponent, typeof i14.UserListComponent, typeof i15.DocumentStatusComponent, typeof i16.DocumentActionsComponent, typeof i17.DocumentSearchComponent, typeof i18.SidebarComponent, typeof i19.RequestDocumentComponent], [typeof i20.CommonModule, typeof i21.AccordionModule, typeof i22.HttpClientModule, typeof i23.ButtonModule, typeof i24.SidebarModule, typeof i25.FileUploadModule, typeof i26.ProgressBarModule, typeof i27.BadgeModule, typeof i28.ListboxModule, typeof i29.CheckboxModule, typeof i30.RadioButtonModule, typeof i31.TimelineModule, typeof i32.InputTextareaModule, typeof i33.FormsModule, typeof i34.PdfViewerModule, typeof i35.NgxDocViewerModule, typeof i36.DialogModule, typeof i37.DropdownModule, typeof i38.InputTextModule, typeof i39.MenuModule, typeof i40.PanelMenuModule, typeof i41.CardModule, typeof i42.TableModule, typeof i43.SharedModule, typeof i32.InputTextareaModule, typeof i44.ToastModule, typeof i45.TooltipModule, typeof i46.MessagesModule, typeof i47.MessageModule], [typeof i1.DocumentContainerComponent, typeof i7.DocumentViewerComponent, typeof i9.DocumentContentViewerComponent, typeof i10.DocumentZoomControlsComponent, typeof i16.DocumentActionsComponent, typeof i4.DocumentListComponent, typeof i6.DocumentUploadComponent, typeof i11.DocumentDirective, typeof i17.DocumentSearchComponent, typeof i18.SidebarComponent, typeof i19.RequestDocumentComponent]>;
59
- static ɵinj: i0.ɵɵInjectorDeclaration<DocumentModule>;
60
- }
@@ -1,24 +0,0 @@
1
- export interface DocumentCategoryStatus {
2
- Pending?: number;
3
- Reviewing?: number;
4
- Accepted?: number;
5
- Rejected?: number;
6
- pending?: number;
7
- reviewing?: number;
8
- approved?: number;
9
- rejected?: number;
10
- }
11
- export interface DocumentCategoryItem {
12
- _id: string;
13
- label: string;
14
- icon: string;
15
- status: DocumentCategoryStatus;
16
- isSelectable?: boolean;
17
- }
18
- export interface DocumentCategory {
19
- label: string;
20
- items: DocumentCategoryItem[];
21
- }
22
- export interface DocumentCategoriesResponse {
23
- categories: DocumentCategory[];
24
- }