cat-documents-ng 0.4.11 → 0.5.10
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeDetectorRef, OnDestroy, EventEmitter, OnInit } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, OnDestroy, EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { FileUpload } from 'primeng/fileupload';
|
|
3
3
|
import { MessageService } from 'primeng/api';
|
|
4
4
|
import { PrimeNGConfig } from 'primeng/api';
|
|
@@ -17,7 +17,7 @@ import * as i0 from "@angular/core";
|
|
|
17
17
|
* Provides a comprehensive interface for uploading documents with assignment types,
|
|
18
18
|
* categories, document types, and applicant selection.
|
|
19
19
|
*/
|
|
20
|
-
export declare class DocumentUploadComponent implements OnInit, OnDestroy {
|
|
20
|
+
export declare class DocumentUploadComponent implements OnInit, OnChanges, OnDestroy {
|
|
21
21
|
documentUpload: DocumentUploadService;
|
|
22
22
|
uploadService: DocumentService;
|
|
23
23
|
private config;
|
|
@@ -29,6 +29,8 @@ export declare class DocumentUploadComponent implements OnInit, OnDestroy {
|
|
|
29
29
|
private dataService;
|
|
30
30
|
/** The context ID for the document upload operation */
|
|
31
31
|
contextId: string;
|
|
32
|
+
isDocumentSaveBtnClicked: boolean;
|
|
33
|
+
hasUnsavedChanges: boolean;
|
|
32
34
|
/** Whether to hide the form and show only upload functionality */
|
|
33
35
|
isFormHide: boolean;
|
|
34
36
|
/** Whether to hide the multi-attachment button */
|
|
@@ -41,6 +43,8 @@ export declare class DocumentUploadComponent implements OnInit, OnDestroy {
|
|
|
41
43
|
onUploadSuccess: EventEmitter<void>;
|
|
42
44
|
/** Event emitted when files are uploaded (for form-hidden mode) */
|
|
43
45
|
onFilesUploaded: EventEmitter<UploadedFile[]>;
|
|
46
|
+
isSaveBtnDisabled: EventEmitter<boolean>;
|
|
47
|
+
hasUnsavedChangesChange: EventEmitter<boolean>;
|
|
44
48
|
/** Event emitted when a file is removed (for form-hidden mode) */
|
|
45
49
|
onFileRemoved: EventEmitter<{
|
|
46
50
|
file: File;
|
|
@@ -98,11 +102,13 @@ export declare class DocumentUploadComponent implements OnInit, OnDestroy {
|
|
|
98
102
|
* Ensures no stale uploads are shown when navigating back.
|
|
99
103
|
*/
|
|
100
104
|
ngOnInit(): void;
|
|
105
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
101
106
|
/**
|
|
102
107
|
* Handles changes in assignment type selection.
|
|
103
108
|
* Resets form selections, loads categories, and handles applicant loading.
|
|
104
109
|
*/
|
|
105
110
|
onAssignmentTypeChange(): void;
|
|
111
|
+
private checkForUnsavedChanges;
|
|
106
112
|
/**
|
|
107
113
|
* Handles changes in category selection.
|
|
108
114
|
* Resets document type and loads available document types if category is selected.
|
|
@@ -298,16 +304,6 @@ export declare class DocumentUploadComponent implements OnInit, OnDestroy {
|
|
|
298
304
|
* @returns Array of uploaded files with their metadata
|
|
299
305
|
*/
|
|
300
306
|
getUploadedFiles(): UploadedFile[];
|
|
301
|
-
/**
|
|
302
|
-
* Creates the upload payload in the required format for onFilesUploaded event
|
|
303
|
-
* @returns The structured payload object
|
|
304
|
-
*/
|
|
305
|
-
private createUploadPayload;
|
|
306
|
-
/**
|
|
307
|
-
* Emits updated payload if files are already uploaded and form is not hidden
|
|
308
|
-
* This ensures the payload is always current when form selections change
|
|
309
|
-
*/
|
|
310
|
-
private emitUpdatedPayloadIfFilesUploaded;
|
|
311
307
|
/**
|
|
312
308
|
* Resets the upload component to its initial state (useful when form is hidden)
|
|
313
309
|
*/
|
|
@@ -318,5 +314,5 @@ export declare class DocumentUploadComponent implements OnInit, OnDestroy {
|
|
|
318
314
|
*/
|
|
319
315
|
ngOnDestroy(): void;
|
|
320
316
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentUploadComponent, never>;
|
|
321
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentUploadComponent, "lib-document-upload", never, { "contextId": { "alias": "contextId"; "required": false; }; "isFormHide": { "alias": "isFormHide"; "required": false; }; "isMultiAttachmentHidden": { "alias": "isMultiAttachmentHidden"; "required": false; }; }, { "onFormValidationChange": "onFormValidationChange"; "onUploadSuccess": "onUploadSuccess"; "onFilesUploaded": "onFilesUploaded"; "onFileRemoved": "onFileRemoved"; }, never, never, false, never>;
|
|
317
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentUploadComponent, "lib-document-upload", never, { "contextId": { "alias": "contextId"; "required": false; }; "isDocumentSaveBtnClicked": { "alias": "isDocumentSaveBtnClicked"; "required": false; }; "isFormHide": { "alias": "isFormHide"; "required": false; }; "isMultiAttachmentHidden": { "alias": "isMultiAttachmentHidden"; "required": false; }; }, { "onFormValidationChange": "onFormValidationChange"; "onUploadSuccess": "onUploadSuccess"; "onFilesUploaded": "onFilesUploaded"; "isSaveBtnDisabled": "isSaveBtnDisabled"; "hasUnsavedChangesChange": "hasUnsavedChangesChange"; "onFileRemoved": "onFileRemoved"; }, never, never, false, never>;
|
|
322
318
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -15,7 +15,6 @@ export * from './lib/document/services/document-table-builder.service';
|
|
|
15
15
|
export * from './lib/document/services/document-content-type.service';
|
|
16
16
|
export * from './lib/document/services/document-zoom.service';
|
|
17
17
|
export * from './lib/document/services/eml-parser.service';
|
|
18
|
-
export * from './lib/document/components/folder-container/folder-container.component';
|
|
19
18
|
export * from './lib/document/services/excel-parser.service';
|
|
20
19
|
export * from './lib/document/services/csv-parser.service';
|
|
21
20
|
export * from './lib/document/directives/document.directive';
|