cat-documents-ng 0.2.63 → 0.2.65

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.
@@ -82,6 +82,11 @@ export declare class DocumentUploadComponent implements OnDestroy {
82
82
  * @param dataService - Service for data loading operations
83
83
  */
84
84
  constructor(documentUpload: DocumentUploadService, uploadService: DocumentService, config: PrimeNGConfig, fileFormatService: FileFormatService, messageService: MessageService, cdr: ChangeDetectorRef, businessService: DocumentUploadBusinessService, formService: DocumentUploadFormService, dataService: DocumentUploadDataService);
85
+ /**
86
+ * Sets up a global listener for all upload completion events.
87
+ * This helps debug issues with multiple file uploads.
88
+ */
89
+ private setupGlobalUploadListener;
85
90
  /**
86
91
  * Handles changes in assignment type selection.
87
92
  * Resets form selections, loads categories, and handles applicant loading.
@@ -158,6 +163,19 @@ export declare class DocumentUploadComponent implements OnDestroy {
158
163
  * @returns True if the save button should be disabled, false otherwise
159
164
  */
160
165
  getSaveButtonDisabled(): boolean;
166
+ /**
167
+ * Checks the upload service status for debugging purposes.
168
+ */
169
+ checkUploadServiceStatus(): void;
170
+ /**
171
+ * Logs the current upload status for debugging purposes.
172
+ */
173
+ logUploadStatus(): void;
174
+ /**
175
+ * Checks if all files have completed uploading.
176
+ * @returns True if all files have completed uploading, false otherwise
177
+ */
178
+ areAllFilesUploaded(): boolean;
161
179
  /**
162
180
  * Gets the upload progress for a specific file.
163
181
  * @param file - The file to get progress for
@@ -226,11 +244,11 @@ export declare class DocumentUploadComponent implements OnDestroy {
226
244
  */
227
245
  handleUploadSuccess(response: any): void;
228
246
  /**
229
- * Handles upload error.
247
+ * Handles save operation error.
230
248
  * Resets saving state.
231
- * @param error - The error that occurred during upload
249
+ * @param error - The error that occurred during save operation
232
250
  */
233
- handleUploadError(error: any): void;
251
+ handleSaveError(error: any): void;
234
252
  /**
235
253
  * Filters applicants based on the selected assignment type.
236
254
  * Updates the filtered applicant list.
@@ -252,6 +270,12 @@ export declare class DocumentUploadComponent implements OnDestroy {
252
270
  * @param file - The file to monitor for upload completion
253
271
  */
254
272
  setupFileUploadListener(file: File): void;
273
+ /**
274
+ * Handles upload error for a specific file.
275
+ * @param file - The file that encountered an error
276
+ * @param errorMessage - The error message
277
+ */
278
+ handleUploadError(file: File, errorMessage: string): void;
255
279
  /**
256
280
  * Handles errors during data loading operations.
257
281
  * Resets loading state and can be extended for error logging.
@@ -20,10 +20,9 @@ export declare class DocumentUploadService {
20
20
  response: any;
21
21
  }>;
22
22
  /**
23
- * The file to upload.
24
- * @type {*}
23
+ * Map to track upload progress for multiple files
25
24
  */
26
- uploadedFile: any;
25
+ private uploadProgress;
27
26
  /**
28
27
  * Represent contextId
29
28
  * @type {string}
@@ -70,6 +69,18 @@ export declare class DocumentUploadService {
70
69
  * @returns {*} - The formdata object.
71
70
  */
72
71
  handleCreateFormData(uploadedFile?: File, contextId?: string): FormData | null;
72
+ /**
73
+ * Get upload progress for a specific file
74
+ * @param file - The file to get progress for
75
+ * @returns The upload progress percentage or undefined if not tracked
76
+ */
77
+ getUploadProgress(file: File): number | undefined;
78
+ /**
79
+ * Check if a file is currently being uploaded
80
+ * @param file - The file to check
81
+ * @returns True if the file is being uploaded
82
+ */
83
+ isFileUploading(file: File): boolean;
73
84
  static ɵfac: i0.ɵɵFactoryDeclaration<DocumentUploadService, never>;
74
85
  static ɵprov: i0.ɵɵInjectableDeclaration<DocumentUploadService>;
75
86
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cat-documents-ng",
3
- "version": "0.2.63",
3
+ "version": "0.2.65",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.0.0",
6
6
  "@angular/core": "^19.0.0"