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,94 +0,0 @@
1
- /**
2
- * Represents a document in the history item.
3
- */
4
- export interface HistoryDocument {
5
- /**
6
- * Unique identifier of the document
7
- */
8
- _id?: string | null;
9
- /**
10
- * Name of the document
11
- */
12
- docName: string | null;
13
- /**
14
- * URL of the document
15
- */
16
- documentUrl: string | null;
17
- /**
18
- * Content type of the document
19
- */
20
- contentType: string | null;
21
- /**
22
- * Parent request/task document id, if applicable
23
- */
24
- parentDocumentId?: string | null;
25
- /** Optional alias and flags preserved if backend provides them */
26
- aliasName?: string | null;
27
- isAliasEditable?: boolean | null;
28
- documentTypeName?: string | null;
29
- isSystemDocument?: boolean | null;
30
- }
31
- /**
32
- * Represents a document history item.
33
- */
34
- export interface DocumentHistoryItem {
35
- /**
36
- * The label/action type (e.g., "Document Uploaded", "Document Rejected", "Document Accepted")
37
- */
38
- label: string;
39
- /**
40
- * The date and time of the action
41
- */
42
- dateTime: string;
43
- /**
44
- * Description or comment for the action
45
- */
46
- requestDescription: string;
47
- /**
48
- * URL of the document (optional) - legacy field
49
- */
50
- documentUrl?: string;
51
- /**
52
- * Name of the document (optional) - legacy field
53
- */
54
- docName?: string;
55
- /**
56
- * Array of documents associated with this history item
57
- */
58
- documents?: HistoryDocument[];
59
- /**
60
- * Name of the user who performed the action
61
- */
62
- userName: string;
63
- /**
64
- * Role of the user who performed the action
65
- */
66
- userRole: string;
67
- actionColor: string;
68
- actionIcon: string;
69
- actionIconBgColor: string;
70
- actionBgColor: string;
71
- actionBorderColor: string;
72
- }
73
- /**
74
- * Represents a document history section with header and list of items.
75
- */
76
- export interface DocumentHistorySection {
77
- /**
78
- * The header/title of the section (e.g., "Initial Request", "Document History")
79
- */
80
- header: string;
81
- /**
82
- * List of history items in this section
83
- */
84
- list: DocumentHistoryItem[];
85
- }
86
- /**
87
- * Represents the complete document history response.
88
- */
89
- export interface DocumentHistoryResponse {
90
- /**
91
- * Array of document history sections
92
- */
93
- sections: DocumentHistorySection[];
94
- }
@@ -1,33 +0,0 @@
1
- /**
2
- * Represents a document list item within a category
3
- */
4
- export interface DocumentListItem {
5
- _id: string;
6
- fileName: string;
7
- docName: string;
8
- fileSize: string;
9
- documentUrl: string;
10
- status: string;
11
- isUploaded: boolean;
12
- statusId?: string;
13
- uploadedOn: string;
14
- ownerName: string;
15
- contentType: string;
16
- aliasName?: string;
17
- documentType?: string;
18
- documentTypeName?: string;
19
- isAliasEditable?: boolean;
20
- parentDocumentId?: string;
21
- isSystemDocument?: boolean;
22
- }
23
- /**
24
- * Represents the complete document list response
25
- */
26
- export interface DocumentListResponse {
27
- label: string;
28
- categoryDescription: string;
29
- totalDocs: number;
30
- acceptedDocs: number;
31
- list: DocumentListItem[];
32
- completed: string;
33
- }
@@ -1,37 +0,0 @@
1
- /**
2
- * DocumentTypeModel
3
- * @interface DocumentTypeModel Model for document types.
4
- * @typedef {DocumentTypeModel} Model for document types.
5
- */
6
- export interface DocumentTypeModel {
7
- /**
8
- * The label for the document type.
9
- * @type {string}
10
- * @memberof DocumentTypeModel
11
- */
12
- label?: string;
13
- /**
14
- * The match rules for the document type.
15
- * @type {string}
16
- * @memberof DocumentTypeModel
17
- */
18
- matchRules?: string;
19
- /**
20
- * The name of the document type.
21
- * @type {string}
22
- * @memberof DocumentTypeModel
23
- */
24
- name?: string;
25
- /**
26
- * The parent document type ID.
27
- * @type {string}
28
- * @memberof DocumentTypeModel
29
- */
30
- parentDocumentTypeId?: string;
31
- /**
32
- * The document type ID.
33
- * @type {string}
34
- * @memberof DocumentTypeModel
35
- */
36
- _id: string;
37
- }
@@ -1,44 +0,0 @@
1
- /**
2
- * Represents a document model.
3
- *
4
- * This class contains the structure for document-related data, including file name,
5
- * status, and document URL.
6
- */
7
- export declare class DocumentModel {
8
- /**
9
- * The unique identifier for the document.
10
- * @type {string}
11
- */
12
- _id: string;
13
- /**
14
- * The name of the document file.
15
- * @type {?string}
16
- */
17
- fileName?: string;
18
- /**
19
- * The current status of the document.
20
- * @type {?string}
21
- */
22
- status?: string;
23
- /**
24
- * The URL where the document is hosted or stored.
25
- * @type {?string}
26
- */
27
- documentUrl?: string;
28
- /**
29
- * Date of document get uploaded
30
- * @type {?Date}
31
- */
32
- createdAt?: Date;
33
- /**
34
- * Shows the type of document
35
- * @type {?string}
36
- */
37
- documentTypeName?: string;
38
- /**
39
- * Shows the type of content
40
- * @type {?string}
41
- */
42
- contentType?: string;
43
- documentName?: string;
44
- }
@@ -1,27 +0,0 @@
1
- /**
2
- * Model representing status data for documents.
3
- * @interface StatusDataModel
4
- */
5
- export interface StatusDataModel {
6
- /**
7
- * The status name (e.g., 'Approved', 'Pending', 'Rejected')
8
- * @type {string}
9
- */
10
- status: string;
11
- /**
12
- * The count of documents with this status
13
- * @type {number}
14
- */
15
- count: number;
16
- /**
17
- * The color associated with this status for UI display
18
- * @type {string}
19
- */
20
- color?: string;
21
- /**
22
- * The icon class associated with this status
23
- * @type {string}
24
- */
25
- icon?: string;
26
- _id?: string;
27
- }
@@ -1,7 +0,0 @@
1
- export interface UploadedFileResponse {
2
- id?: string;
3
- fileName: string;
4
- contentType: string;
5
- url: string;
6
- size: string;
7
- }
@@ -1,8 +0,0 @@
1
- export declare class UserListModel {
2
- _id: string;
3
- name: string;
4
- approved: number;
5
- pending: number;
6
- initials?: string;
7
- color?: string;
8
- }
@@ -1,88 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export interface CsvRowData {
3
- cells: Array<{
4
- value: string;
5
- isHeader?: boolean;
6
- style?: any;
7
- }>;
8
- }
9
- export interface ParsedCsvData {
10
- headers: string[];
11
- rows: string[][];
12
- styledData: CsvRowData[];
13
- totalRows: number;
14
- totalColumns: number;
15
- hasHeaders: boolean;
16
- }
17
- export declare class CsvParserService {
18
- constructor();
19
- /**
20
- * Parses CSV data from a string
21
- * @param csvContent - The CSV content as a string
22
- * @param options - Parsing options
23
- * @returns Parsed CSV data
24
- */
25
- parseCsvData(csvContent: string, options?: {
26
- delimiter?: string;
27
- hasHeaders?: boolean;
28
- maxRows?: number;
29
- }): ParsedCsvData;
30
- /**
31
- * Parses a single CSV line with proper handling of quoted fields
32
- * @param line - Single CSV line
33
- * @param delimiter - Field delimiter
34
- * @returns Array of field values
35
- */
36
- private parseCsvLine;
37
- /**
38
- * Creates styled data for display in tables
39
- * @param headers - Column headers
40
- * @param rows - Data rows
41
- * @param hasHeaders - Whether the data has headers
42
- * @returns Styled data array
43
- */
44
- private createStyledData;
45
- /**
46
- * Creates empty CSV data structure
47
- * @returns Empty CSV data
48
- */
49
- private createEmptyCsvData;
50
- /**
51
- * Validates CSV content
52
- * @param csvContent - CSV content to validate
53
- * @returns Validation result
54
- */
55
- validateCsvContent(csvContent: string): {
56
- isValid: boolean;
57
- errors: string[];
58
- };
59
- /**
60
- * Counts columns in a CSV line
61
- * @param line - CSV line
62
- * @returns Number of columns
63
- */
64
- private countColumns;
65
- /**
66
- * Exports data to CSV format
67
- * @param data - Data to export
68
- * @param headers - Column headers
69
- * @param delimiter - Field delimiter
70
- * @returns CSV string
71
- */
72
- exportToCsv(data: string[][], headers: string[], delimiter?: string): string;
73
- /**
74
- * Escapes a CSV field value
75
- * @param field - Field value to escape
76
- * @returns Escaped field value
77
- */
78
- private escapeCsvField;
79
- /**
80
- * Gets CSV preview (first few rows)
81
- * @param csvContent - Full CSV content
82
- * @param maxRows - Maximum number of rows to preview
83
- * @returns Preview data
84
- */
85
- getCsvPreview(csvContent: string, maxRows?: number): ParsedCsvData;
86
- static ɵfac: i0.ɵɵFactoryDeclaration<CsvParserService, never>;
87
- static ɵprov: i0.ɵɵInjectableDeclaration<CsvParserService>;
88
- }
@@ -1,48 +0,0 @@
1
- import { SHARED } from '../../../Shared/constant/SHARED';
2
- import * as i0 from "@angular/core";
3
- export interface DocumentAction {
4
- type: typeof SHARED.REJECT_ACTION | typeof SHARED.ACCEPT_ACTION | typeof SHARED.DELETE_ACTION;
5
- note?: string;
6
- }
7
- export declare class DocumentActionsService {
8
- /**
9
- * Calculates the card class based on status
10
- * @param currentStatus - The current status of the document
11
- * @param statusId - The status ID from API
12
- * @returns {string} The CSS class for the card
13
- */
14
- calculateCardClass(currentStatus?: string, statusId?: string): string;
15
- /**
16
- * Calculates the reject button class based on status
17
- * @param currentStatus - The current status of the document
18
- * @param statusId - The status ID from API
19
- * @returns {string} The CSS class for the reject button
20
- */
21
- calculateRejectButtonClass(currentStatus?: string, statusId?: string): string;
22
- /**
23
- * Calculates the accept button class based on status
24
- * @param currentStatus - The current status of the document
25
- * @param statusId - The status ID from API
26
- * @returns {string} The CSS class for the accept button
27
- */
28
- calculateAcceptButtonClass(currentStatus?: string, statusId?: string): string;
29
- /**
30
- * Creates an accept action
31
- * @param note - The acceptance note
32
- * @returns {DocumentAction} The accept action
33
- */
34
- createAcceptAction(note: string): DocumentAction;
35
- /**
36
- * Creates a reject action
37
- * @param note - The rejection note
38
- * @returns {DocumentAction} The reject action
39
- */
40
- createRejectAction(note: string): DocumentAction;
41
- /**
42
- * Creates a delete action
43
- * @returns {DocumentAction} The delete action
44
- */
45
- createDeleteAction(): DocumentAction;
46
- static ɵfac: i0.ɵɵFactoryDeclaration<DocumentActionsService, never>;
47
- static ɵprov: i0.ɵɵInjectableDeclaration<DocumentActionsService>;
48
- }
@@ -1,85 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- /**
3
- * Service for handling document content types and their mappings.
4
- * Supports the content types: "xlsx","xls","doc","docx","pdf","jpg","jpeg","odt","csv","png","msg","eml"
5
- * @class DocumentContentTypeService
6
- * @typedef {DocumentContentTypeService}
7
- */
8
- export declare class DocumentContentTypeService {
9
- /**
10
- * Mapping of file extensions to MIME types
11
- * @type {Record<string, string>}
12
- */
13
- private readonly extensionToMimeType;
14
- /**
15
- * Mapping of MIME types to file extensions
16
- * @type {Record<string, string>}
17
- */
18
- private readonly mimeTypeToExtension;
19
- /**
20
- * List of all supported file extensions
21
- * @type {string[]}
22
- */
23
- readonly supportedExtensions: string[];
24
- /**
25
- * List of all supported MIME types
26
- * @type {string[]}
27
- */
28
- readonly supportedMimeTypes: string[];
29
- /**
30
- * Gets the MIME type for a given file extension
31
- * @param {string} extension - The file extension (with or without dot)
32
- * @returns {string | undefined} The MIME type or undefined if not supported
33
- */
34
- getMimeType(extension: string): string | undefined;
35
- /**
36
- * Gets the file extension for a given MIME type
37
- * @param {string} mimeType - The MIME type
38
- * @returns {string | undefined} The file extension or undefined if not supported
39
- */
40
- getExtension(mimeType: string): string | undefined;
41
- /**
42
- * Checks if a file extension is supported
43
- * @param {string} extension - The file extension (with or without dot)
44
- * @returns {boolean} True if the extension is supported
45
- */
46
- isExtensionSupported(extension: string): boolean;
47
- /**
48
- * Checks if a MIME type is supported
49
- * @param {string} mimeType - The MIME type
50
- * @returns {boolean} True if the MIME type is supported
51
- */
52
- isMimeTypeSupported(mimeType: string): boolean;
53
- /**
54
- * Gets the file extension from a filename
55
- * @param {string} filename - The filename
56
- * @returns {string | undefined} The file extension or undefined if no extension found
57
- */
58
- getExtensionFromFilename(filename: string): string | undefined;
59
- /**
60
- * Gets the MIME type from a filename
61
- * @param {string} filename - The filename
62
- * @returns {string | undefined} The MIME type or undefined if not supported
63
- */
64
- getMimeTypeFromFilename(filename: string): string | undefined;
65
- /**
66
- * Validates if a file can be uploaded based on its extension
67
- * @param {string} filename - The filename to validate
68
- * @returns {boolean} True if the file can be uploaded
69
- */
70
- canUploadFile(filename: string): boolean;
71
- /**
72
- * Gets a human-readable description for a content type
73
- * @param {string} contentType - The content type (MIME type or extension)
74
- * @returns {string} Human-readable description
75
- */
76
- getContentTypeDescription(contentType: string): string;
77
- /**
78
- * Gets a human-readable description for a file extension
79
- * @param {string} extension - The file extension
80
- * @returns {string} Human-readable description
81
- */
82
- private getExtensionDescription;
83
- static ɵfac: i0.ɵɵFactoryDeclaration<DocumentContentTypeService, never>;
84
- static ɵprov: i0.ɵɵInjectableDeclaration<DocumentContentTypeService>;
85
- }
@@ -1,34 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- /**
3
- * Service for handling document history styling logic
4
- */
5
- export declare class DocumentHistoryStyleService {
6
- constructor();
7
- /**
8
- * Get the appropriate icon class based on the action label
9
- */
10
- getActionIcon(label: string): string;
11
- /**
12
- * Get the appropriate color class based on the action label
13
- */
14
- getActionColor(label: string): string;
15
- /**
16
- * Get the appropriate background color class based on the action label
17
- */
18
- getActionBgColor(label: string): string;
19
- /**
20
- * Get the appropriate border color class based on the action label
21
- */
22
- getActionBorderColor(label: string): string;
23
- /**
24
- * Get the appropriate icon background color class based on the action label
25
- */
26
- getActionIconBgColor(label: string): string;
27
- /**
28
- * Check if a section has valid content to display
29
- */
30
- checkValidContent(section: any): boolean;
31
- getAccordionClass(section: any): string;
32
- static ɵfac: i0.ɵɵFactoryDeclaration<DocumentHistoryStyleService, never>;
33
- static ɵprov: i0.ɵɵInjectableDeclaration<DocumentHistoryStyleService>;
34
- }
@@ -1,42 +0,0 @@
1
- import { DocumentHistoryItem, DocumentHistorySection } from '../models/document-history.model';
2
- import { DocumentHistoryStyleService } from './document-history-style.service';
3
- import { HttpClient } from '@angular/common/http';
4
- import * as i0 from "@angular/core";
5
- interface ProcessedDocumentHistoryItem extends DocumentHistoryItem {
6
- actionIcon: string;
7
- actionColor: string;
8
- actionBgColor: string;
9
- actionBorderColor: string;
10
- actionIconBgColor: string;
11
- }
12
- interface ProcessedDocumentHistorySection extends DocumentHistorySection {
13
- list: ProcessedDocumentHistoryItem[];
14
- accordionClass?: string;
15
- hasValidContent?: boolean;
16
- }
17
- export declare class DocumentHistoryService {
18
- private documentHistoryStyleService;
19
- private http;
20
- constructor(documentHistoryStyleService: DocumentHistoryStyleService, http: HttpClient);
21
- /**
22
- * Get the CSS class for accordion styling based on the section's label
23
- */
24
- private getAccordionClass;
25
- /**
26
- * Check if a section has valid content to display
27
- */
28
- private checkValidContent;
29
- /**
30
- * Process history data to add computed properties
31
- */
32
- processHistoryData(historyData: DocumentHistorySection[]): ProcessedDocumentHistorySection[];
33
- /**
34
- * Downloads a document when clicked
35
- * @param documentUrl - The URL of the document to download
36
- * @param docName - The name of the document
37
- */
38
- downloadDocument(documentUrl: string, docName?: string): void;
39
- static ɵfac: i0.ɵɵFactoryDeclaration<DocumentHistoryService, never>;
40
- static ɵprov: i0.ɵɵInjectableDeclaration<DocumentHistoryService>;
41
- }
42
- export {};