cat-documents-ng 0.2.54 → 0.2.56

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.
@@ -0,0 +1,33 @@
1
+ import { MessageService } from 'primeng/api';
2
+ import { UploadedFile } from './document-upload-business.service';
3
+ import * as i0 from "@angular/core";
4
+ export declare class DocumentUploadFormService {
5
+ private messageService;
6
+ constructor(messageService: MessageService);
7
+ /**
8
+ * Shows error message
9
+ */
10
+ showErrorMessage(summary: string, detail: string): void;
11
+ /**
12
+ * Shows warning message
13
+ */
14
+ showWarningMessage(summary: string, detail: string): void;
15
+ /**
16
+ * Shows success message
17
+ */
18
+ showSuccessMessage(summary: string, detail: string): void;
19
+ /**
20
+ * Validates required fields for upload
21
+ */
22
+ validateRequiredFields(assignmentType: 'Applicant' | 'Application' | null, selectedApplicant: string, selectedCategory: string, selectedDocumentType: string, uploadedFiles: UploadedFile[]): boolean;
23
+ /**
24
+ * Validates form completeness
25
+ */
26
+ validateFormCompleteness(): boolean;
27
+ /**
28
+ * Validates context ID presence
29
+ */
30
+ validateContextId(contextId: string, message: string): boolean;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<DocumentUploadFormService, never>;
32
+ static ɵprov: i0.ɵɵInjectableDeclaration<DocumentUploadFormService>;
33
+ }
@@ -1,3 +1,4 @@
1
+ import { EventEmitter } from '@angular/core';
1
2
  import { DocumentService } from '../state/document.service';
2
3
  import { DocumentStore } from '../state/document.store';
3
4
  import { MessageService } from 'primeng/api';
@@ -11,6 +12,13 @@ export declare class DocumentUploadService {
11
12
  documentService: DocumentService;
12
13
  documentUploadStore: DocumentStore;
13
14
  messageService: MessageService;
15
+ /**
16
+ * Event emitter for upload completion
17
+ */
18
+ uploadCompleted: EventEmitter<{
19
+ file: File;
20
+ response: any;
21
+ }>;
14
22
  /**
15
23
  * The file to upload.
16
24
  * @type {*}
@@ -44,7 +52,7 @@ export declare class DocumentUploadService {
44
52
  * This method appends each file to the FormData for submission.
45
53
  * @returns {void}
46
54
  */
47
- handleTemplatedUpload(): void;
55
+ handleTemplatedUpload(file: File, contextId: string): void;
48
56
  /**
49
57
  * Get the file and contextId
50
58
  * @param file - The file to upload.
@@ -61,7 +69,7 @@ export declare class DocumentUploadService {
61
69
  * Handle the creation of formdata.
62
70
  * @returns {*} - The formdata object.
63
71
  */
64
- handleCreateFormData(): FormData | null;
72
+ handleCreateFormData(uploadedFile?: File, contextId?: string): FormData | null;
65
73
  static ɵfac: i0.ɵɵFactoryDeclaration<DocumentUploadService, never>;
66
74
  static ɵprov: i0.ɵɵInjectableDeclaration<DocumentUploadService>;
67
75
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cat-documents-ng",
3
- "version": "0.2.54",
3
+ "version": "0.2.56",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.0.0",
6
6
  "@angular/core": "^19.0.0"
package/public-api.d.ts CHANGED
@@ -5,6 +5,7 @@ export * from './lib/document/components/document-actions/document-actions.compo
5
5
  export * from './lib/document/components/document-history/document-history.component';
6
6
  export * from './lib/document/components/document-list/document-list.component';
7
7
  export * from './lib/document/components/document-search/document-search.component';
8
+ export * from './lib/document/components/common-sidebar/common-sidebar.component';
8
9
  export * from './lib/document/models/document-history.model';
9
10
  export * from './lib/document/services/document-table-builder.service';
10
11
  export * from './lib/document/directives/document.directive';