cat-documents-ng 0.2.58 → 0.2.60

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.
@@ -65,6 +65,8 @@ export declare class DocumentUploadComponent implements OnDestroy {
65
65
  isSaving: boolean;
66
66
  /** Current form validation state */
67
67
  isFormValid: boolean;
68
+ /** File size property for testing */
69
+ fileSize: string;
68
70
  /** Subject for managing component lifecycle and unsubscribing from observables */
69
71
  private destroy$;
70
72
  /**
@@ -266,6 +268,11 @@ export declare class DocumentUploadComponent implements OnDestroy {
266
268
  * Emits form validation change event.
267
269
  */
268
270
  emitFormValidationChange(): void;
271
+ /**
272
+ * Formats file size for testing purposes.
273
+ * @param size - The file size in bytes
274
+ */
275
+ formatSize(size: number): void;
269
276
  /**
270
277
  * Lifecycle hook that is called when component is destroyed.
271
278
  * Cleans up subscriptions and destroys services.
@@ -10,6 +10,8 @@ export interface UploadedFile {
10
10
  formattedSize: string;
11
11
  progress: number;
12
12
  uploadResponse?: any;
13
+ url?: string;
14
+ contentType?: string;
13
15
  }
14
16
  export interface DocumentUploadPayload {
15
17
  source: 'Applicant' | 'Application';
@@ -20,9 +22,9 @@ export interface DocumentUploadPayload {
20
22
  documents: {
21
23
  fileName: string;
22
24
  fileSize: number;
23
- fileType: string;
24
- file: File;
25
25
  uploadedFileId?: string;
26
+ url?: string;
27
+ contentType?: string;
26
28
  }[];
27
29
  }
28
30
  export declare class DocumentUploadBusinessService {
@@ -46,6 +48,10 @@ export declare class DocumentUploadBusinessService {
46
48
  * Filters applicants based on assignment type
47
49
  */
48
50
  filterApplicants(applicantList: UserListModel[], assignmentType: 'Applicant' | 'Application'): UserListModel[];
51
+ /**
52
+ * Helper method to validate form data and return validation result
53
+ */
54
+ private validateFormData;
49
55
  /**
50
56
  * Validates form data
51
57
  */
@@ -16,10 +16,18 @@ export declare class DocumentUploadFormService {
16
16
  * Shows success message
17
17
  */
18
18
  showSuccessMessage(summary: string, detail: string): void;
19
+ /**
20
+ * Helper method to validate required fields and show appropriate messages
21
+ */
22
+ private validateRequiredFieldsWithMessages;
19
23
  /**
20
24
  * Validates required fields for upload
21
25
  */
22
26
  validateRequiredFields(assignmentType: 'Applicant' | 'Application' | null, selectedApplicant: string, selectedCategory: string, selectedDocumentType: string, uploadedFiles: UploadedFile[]): boolean;
27
+ /**
28
+ * Shows appropriate validation message based on the field that failed
29
+ */
30
+ private showValidationMessage;
23
31
  /**
24
32
  * Validates form completeness
25
33
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cat-documents-ng",
3
- "version": "0.2.58",
3
+ "version": "0.2.60",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.0.0",
6
6
  "@angular/core": "^19.0.0"