cat-documents-ng 0.2.66 → 0.2.68

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.
@@ -27,6 +27,7 @@ export declare class DocumentUploadComponent implements OnDestroy {
27
27
  private businessService;
28
28
  private formService;
29
29
  private dataService;
30
+ documentService: DocumentUploadService;
30
31
  /** The context ID for the document upload operation */
31
32
  contextId: string;
32
33
  /** Reference to the file upload component */
@@ -81,12 +82,7 @@ export declare class DocumentUploadComponent implements OnDestroy {
81
82
  * @param formService - Service for form validation and handling
82
83
  * @param dataService - Service for data loading operations
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
+ constructor(documentUpload: DocumentUploadService, uploadService: DocumentService, config: PrimeNGConfig, fileFormatService: FileFormatService, messageService: MessageService, cdr: ChangeDetectorRef, businessService: DocumentUploadBusinessService, formService: DocumentUploadFormService, dataService: DocumentUploadDataService, documentService: DocumentUploadService);
90
86
  /**
91
87
  * Handles changes in assignment type selection.
92
88
  * Resets form selections, loads categories, and handles applicant loading.
@@ -163,43 +159,6 @@ export declare class DocumentUploadComponent implements OnDestroy {
163
159
  * @returns True if the save button should be disabled, false otherwise
164
160
  */
165
161
  getSaveButtonDisabled(): boolean;
166
- /**
167
- * Gets the current upload queue status
168
- * @returns Object containing queue information
169
- */
170
- getUploadQueueStatus(): {
171
- isUploading: boolean;
172
- queueLength: number;
173
- totalFiles: number;
174
- };
175
- /**
176
- * Gets the number of files currently in the upload queue
177
- * @returns Number of files waiting to be uploaded
178
- */
179
- getUploadQueueLength(): number;
180
- /**
181
- * Checks if there are files waiting in the upload queue
182
- * @returns True if there are files waiting to be uploaded
183
- */
184
- hasFilesInQueue(): boolean;
185
- /**
186
- * Checks the upload service status for debugging purposes.
187
- */
188
- checkUploadServiceStatus(): void;
189
- /**
190
- * Logs the current upload status for debugging purposes.
191
- */
192
- logUploadStatus(): void;
193
- /**
194
- * Checks if all files have completed uploading.
195
- * @returns True if all files have completed uploading, false otherwise
196
- */
197
- areAllFilesUploaded(): boolean;
198
- /**
199
- * Gets the currently uploading file (if any)
200
- * @returns The file currently being uploaded or null
201
- */
202
- getCurrentlyUploadingFile(): File | null;
203
162
  /**
204
163
  * Gets the upload progress for a specific file.
205
164
  * @param file - The file to get progress for
@@ -229,10 +188,6 @@ export declare class DocumentUploadComponent implements OnDestroy {
229
188
  * Clears all selections, uploaded files, and progress tracking.
230
189
  */
231
190
  resetForm(): void;
232
- /**
233
- * Clears the upload queue manually
234
- */
235
- clearUploadQueue(): void;
236
191
  /**
237
192
  * Resets form selections (applicant, category, document type).
238
193
  * Clears document type options.
@@ -272,11 +227,11 @@ export declare class DocumentUploadComponent implements OnDestroy {
272
227
  */
273
228
  handleUploadSuccess(response: any): void;
274
229
  /**
275
- * Handles save operation error.
230
+ * Handles upload error.
276
231
  * Resets saving state.
277
- * @param error - The error that occurred during save operation
232
+ * @param error - The error that occurred during upload
278
233
  */
279
- handleSaveError(error: any): void;
234
+ handleUploadError(error: any): void;
280
235
  /**
281
236
  * Filters applicants based on the selected assignment type.
282
237
  * Updates the filtered applicant list.
@@ -298,12 +253,6 @@ export declare class DocumentUploadComponent implements OnDestroy {
298
253
  * @param file - The file to monitor for upload completion
299
254
  */
300
255
  setupFileUploadListener(file: File): void;
301
- /**
302
- * Handles upload error for a specific file.
303
- * @param file - The file that encountered an error
304
- * @param errorMessage - The error message
305
- */
306
- handleUploadError(file: File, errorMessage: string): void;
307
256
  /**
308
257
  * Handles errors during data loading operations.
309
258
  * Resets loading state and can be extended for error logging.
@@ -20,17 +20,10 @@ export declare class DocumentUploadService {
20
20
  response: any;
21
21
  }>;
22
22
  /**
23
- * Map to track upload progress for multiple files
23
+ * The file to upload.
24
+ * @type {*}
24
25
  */
25
- private uploadProgress;
26
- /**
27
- * Queue for handling multiple file uploads sequentially
28
- */
29
- private uploadQueue;
30
- /**
31
- * Flag to indicate if an upload is currently in progress
32
- */
33
- private isUploading;
26
+ uploadedFile: any;
34
27
  /**
35
28
  * Represent contextId
36
29
  * @type {string}
@@ -60,10 +53,6 @@ export declare class DocumentUploadService {
60
53
  * @returns {void}
61
54
  */
62
55
  handleTemplatedUpload(file: File, contextId: string): void;
63
- /**
64
- * Processes the upload queue sequentially
65
- */
66
- private processUploadQueue;
67
56
  /**
68
57
  * Get the file and contextId
69
58
  * @param file - The file to upload.
@@ -81,36 +70,6 @@ export declare class DocumentUploadService {
81
70
  * @returns {*} - The formdata object.
82
71
  */
83
72
  handleCreateFormData(uploadedFile?: File, contextId?: string): FormData | null;
84
- /**
85
- * Get upload progress for a specific file
86
- * @param file - The file to get progress for
87
- * @returns The upload progress percentage or undefined if not tracked
88
- */
89
- getUploadProgress(file: File): number | undefined;
90
- /**
91
- * Check if a file is currently being uploaded
92
- * @param file - The file to check
93
- * @returns True if the file is being uploaded
94
- */
95
- isFileUploading(file: File): boolean;
96
- /**
97
- * Get the current upload queue status
98
- * @returns Object containing queue information
99
- */
100
- getQueueStatus(): {
101
- isUploading: boolean;
102
- queueLength: number;
103
- totalFiles: number;
104
- };
105
- /**
106
- * Clear the upload queue (useful for cleanup)
107
- */
108
- clearUploadQueue(): void;
109
- /**
110
- * Get the number of files currently in the upload queue
111
- * @returns Number of files waiting to be uploaded
112
- */
113
- getQueueLength(): number;
114
73
  static ɵfac: i0.ɵɵFactoryDeclaration<DocumentUploadService, never>;
115
74
  static ɵprov: i0.ɵɵInjectableDeclaration<DocumentUploadService>;
116
75
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cat-documents-ng",
3
- "version": "0.2.66",
3
+ "version": "0.2.68",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.0.0",
6
6
  "@angular/core": "^19.0.0"