cat-documents-ng 0.2.71 → 0.2.74
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.
- package/fesm2022/cat-documents-ng.mjs +96 -93
- package/fesm2022/cat-documents-ng.mjs.map +1 -1
- package/lib/document/components/document-upload/document-upload.component.d.ts +4 -5
- package/lib/document/models/uploaded-file-response.model.d.ts +7 -0
- package/lib/document/services/document-upload-business.service.d.ts +5 -1
- package/lib/document/services/document-upload.service.d.ts +3 -2
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -11,7 +11,6 @@ import { DocumentUploadDataService } from '../../services/document-upload-data.s
|
|
|
11
11
|
import { UserListModel } from '../../models/user-list.model';
|
|
12
12
|
import { DocumentCategory } from '../../models/document-category.model';
|
|
13
13
|
import { DocumentTypeModel } from '../../models/document-type.model';
|
|
14
|
-
import { Observable } from 'rxjs';
|
|
15
14
|
import * as i0 from "@angular/core";
|
|
16
15
|
/**
|
|
17
16
|
* Component responsible for handling document uploads with templated metadata.
|
|
@@ -28,7 +27,7 @@ export declare class DocumentUploadComponent implements OnDestroy {
|
|
|
28
27
|
private businessService;
|
|
29
28
|
private formService;
|
|
30
29
|
private dataService;
|
|
31
|
-
|
|
30
|
+
private documentUploadService;
|
|
32
31
|
/** The context ID for the document upload operation */
|
|
33
32
|
contextId: string;
|
|
34
33
|
/** Reference to the file upload component */
|
|
@@ -83,7 +82,7 @@ export declare class DocumentUploadComponent implements OnDestroy {
|
|
|
83
82
|
* @param formService - Service for form validation and handling
|
|
84
83
|
* @param dataService - Service for data loading operations
|
|
85
84
|
*/
|
|
86
|
-
constructor(documentUpload: DocumentUploadService, uploadService: DocumentService, config: PrimeNGConfig, fileFormatService: FileFormatService, messageService: MessageService, cdr: ChangeDetectorRef, businessService: DocumentUploadBusinessService, formService: DocumentUploadFormService, dataService: DocumentUploadDataService,
|
|
85
|
+
constructor(documentUpload: DocumentUploadService, uploadService: DocumentService, config: PrimeNGConfig, fileFormatService: FileFormatService, messageService: MessageService, cdr: ChangeDetectorRef, businessService: DocumentUploadBusinessService, formService: DocumentUploadFormService, dataService: DocumentUploadDataService, documentUploadService: DocumentUploadService);
|
|
87
86
|
/**
|
|
88
87
|
* Handles changes in assignment type selection.
|
|
89
88
|
* Resets form selections, loads categories, and handles applicant loading.
|
|
@@ -111,7 +110,7 @@ export declare class DocumentUploadComponent implements OnDestroy {
|
|
|
111
110
|
*/
|
|
112
111
|
onSelectedFiles(event: {
|
|
113
112
|
currentFiles: File[];
|
|
114
|
-
}): void
|
|
113
|
+
}): Promise<void>;
|
|
115
114
|
/**
|
|
116
115
|
* Loads the list of applicants for the current context.
|
|
117
116
|
* Sets loading state and handles success/error responses.
|
|
@@ -137,7 +136,7 @@ export declare class DocumentUploadComponent implements OnDestroy {
|
|
|
137
136
|
* Sets up progress tracking and upload listener for the file.
|
|
138
137
|
* @param file - The file to be uploaded
|
|
139
138
|
*/
|
|
140
|
-
|
|
139
|
+
handleTemplatedUpload(file: File): Promise<void>;
|
|
141
140
|
/**
|
|
142
141
|
* Removes a document from the uploaded files list.
|
|
143
142
|
* Updates progress tracking and validates form.
|
|
@@ -4,14 +4,17 @@ import { FileFormatService } from './file-format.service';
|
|
|
4
4
|
import { UserListModel } from '../models/user-list.model';
|
|
5
5
|
import { DocumentCategory } from '../models/document-category.model';
|
|
6
6
|
import { DocumentTypeModel } from '../models/document-type.model';
|
|
7
|
+
import { UploadedFileResponse } from '../models/uploaded-file-response.model';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export interface UploadedFile {
|
|
9
10
|
file: File;
|
|
10
11
|
formattedSize: string;
|
|
11
12
|
progress: number;
|
|
12
|
-
uploadResponse?:
|
|
13
|
+
uploadResponse?: UploadedFileResponse;
|
|
13
14
|
url?: string;
|
|
14
15
|
contentType?: string;
|
|
16
|
+
fileName?: string;
|
|
17
|
+
size?: string;
|
|
15
18
|
}
|
|
16
19
|
export interface DocumentUploadPayload {
|
|
17
20
|
source: 'Applicant' | 'Application';
|
|
@@ -25,6 +28,7 @@ export interface DocumentUploadPayload {
|
|
|
25
28
|
uploadedFileId?: string;
|
|
26
29
|
url?: string;
|
|
27
30
|
contentType?: string;
|
|
31
|
+
size?: string;
|
|
28
32
|
}[];
|
|
29
33
|
}
|
|
30
34
|
export declare class DocumentUploadBusinessService {
|
|
@@ -2,6 +2,7 @@ import { EventEmitter } from '@angular/core';
|
|
|
2
2
|
import { DocumentService } from '../state/document.service';
|
|
3
3
|
import { DocumentStore } from '../state/document.store';
|
|
4
4
|
import { MessageService } from 'primeng/api';
|
|
5
|
+
import { UploadedFileResponse } from '../models/uploaded-file-response.model';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
/**
|
|
7
8
|
* Service for handling document uploads.
|
|
@@ -17,7 +18,7 @@ export declare class DocumentUploadService {
|
|
|
17
18
|
*/
|
|
18
19
|
uploadCompleted: EventEmitter<{
|
|
19
20
|
file: File;
|
|
20
|
-
response:
|
|
21
|
+
response: UploadedFileResponse;
|
|
21
22
|
}>;
|
|
22
23
|
/**
|
|
23
24
|
* The file to upload.
|
|
@@ -69,7 +70,7 @@ export declare class DocumentUploadService {
|
|
|
69
70
|
* Handle the creation of formdata.
|
|
70
71
|
* @returns {*} - The formdata object.
|
|
71
72
|
*/
|
|
72
|
-
handleCreateFormData(uploadedFile?:
|
|
73
|
+
handleCreateFormData(uploadedFile?: any, contextId?: string): FormData | null;
|
|
73
74
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentUploadService, never>;
|
|
74
75
|
static ɵprov: i0.ɵɵInjectableDeclaration<DocumentUploadService>;
|
|
75
76
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './lib/document/components/document-list/document-list.component';
|
|
|
7
7
|
export * from './lib/document/components/document-search/document-search.component';
|
|
8
8
|
export * from './lib/document/components/sidebar/sidebar.component';
|
|
9
9
|
export * from './lib/document/models/document-history.model';
|
|
10
|
+
export * from './lib/document/models/uploaded-file-response.model';
|
|
10
11
|
export * from './lib/document/services/document-table-builder.service';
|
|
11
12
|
export * from './lib/document/directives/document.directive';
|
|
12
13
|
export * from './lib/document/directives/permission.directive';
|