cat-documents-ng 0.2.74 → 0.2.75

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.
@@ -3,7 +3,6 @@ import { FileUpload } from 'primeng/fileupload';
3
3
  import { MessageService } from 'primeng/api';
4
4
  import { PrimeNGConfig } from 'primeng/api';
5
5
  import { FileFormatService } from '../../services/file-format.service';
6
- import { DocumentService } from '../../state/document.service';
7
6
  import { DocumentUploadService } from '../../services/document-upload.service';
8
7
  import { DocumentUploadBusinessService, UploadedFile } from '../../services/document-upload-business.service';
9
8
  import { DocumentUploadFormService } from '../../services/document-upload-form.service';
@@ -18,8 +17,7 @@ import * as i0 from "@angular/core";
18
17
  * categories, document types, and applicant selection.
19
18
  */
20
19
  export declare class DocumentUploadComponent implements OnDestroy {
21
- documentUpload: DocumentUploadService;
22
- uploadService: DocumentService;
20
+ private documentUploadService;
23
21
  private config;
24
22
  fileFormatService: FileFormatService;
25
23
  messageService: MessageService;
@@ -27,7 +25,6 @@ export declare class DocumentUploadComponent implements OnDestroy {
27
25
  private businessService;
28
26
  private formService;
29
27
  private dataService;
30
- private documentUploadService;
31
28
  /** The context ID for the document upload operation */
32
29
  contextId: string;
33
30
  /** Reference to the file upload component */
@@ -82,7 +79,7 @@ export declare class DocumentUploadComponent implements OnDestroy {
82
79
  * @param formService - Service for form validation and handling
83
80
  * @param dataService - Service for data loading operations
84
81
  */
85
- constructor(documentUpload: DocumentUploadService, uploadService: DocumentService, config: PrimeNGConfig, fileFormatService: FileFormatService, messageService: MessageService, cdr: ChangeDetectorRef, businessService: DocumentUploadBusinessService, formService: DocumentUploadFormService, dataService: DocumentUploadDataService, documentUploadService: DocumentUploadService);
82
+ constructor(documentUploadService: DocumentUploadService, config: PrimeNGConfig, fileFormatService: FileFormatService, messageService: MessageService, cdr: ChangeDetectorRef, businessService: DocumentUploadBusinessService, formService: DocumentUploadFormService, dataService: DocumentUploadDataService);
86
83
  /**
87
84
  * Handles changes in assignment type selection.
88
85
  * Resets form selections, loads categories, and handles applicant loading.
@@ -247,12 +244,6 @@ export declare class DocumentUploadComponent implements OnDestroy {
247
244
  * Prepares upload payload and calls business service to save.
248
245
  */
249
246
  saveDocumentMetadata(): void;
250
- /**
251
- * Sets up a listener for file upload completion.
252
- * Updates progress tracking and emits validation change when upload completes.
253
- * @param file - The file to monitor for upload completion
254
- */
255
- setupFileUploadListener(file: File): void;
256
247
  /**
257
248
  * Handles errors during data loading operations.
258
249
  * Resets loading state and can be extended for error logging.
@@ -1,4 +1,3 @@
1
- import { EventEmitter } from '@angular/core';
2
1
  import { DocumentService } from '../state/document.service';
3
2
  import { DocumentStore } from '../state/document.store';
4
3
  import { MessageService } from 'primeng/api';
@@ -13,13 +12,6 @@ export declare class DocumentUploadService {
13
12
  documentService: DocumentService;
14
13
  documentUploadStore: DocumentStore;
15
14
  messageService: MessageService;
16
- /**
17
- * Event emitter for upload completion
18
- */
19
- uploadCompleted: EventEmitter<{
20
- file: File;
21
- response: UploadedFileResponse;
22
- }>;
23
15
  /**
24
16
  * The file to upload.
25
17
  * @type {*}
@@ -48,29 +40,18 @@ export declare class DocumentUploadService {
48
40
  * @returns {void}
49
41
  */
50
42
  constructor(documentService: DocumentService, documentUploadStore: DocumentStore, messageService: MessageService);
51
- /**
52
- * Prepares the files for upload by creating a FormData object.
53
- * This method appends each file to the FormData for submission.
54
- * @returns {void}
55
- */
56
- handleTemplatedUpload(file: File, contextId: string): void;
57
- /**
58
- * Get the file and contextId
59
- * @param file - The file to upload.
60
- * @param contextId - The contextId to upload.
61
- */
62
- getUploadFileData(file: File, contextId: string): void;
63
- /**
64
- * Get the document name and document type id
65
- * @param documentName - The document name to upload.
66
- * @param documentTypeId - The document type id to upload.
67
- */
68
- getDocumentNameAndType(documentTypeId: string): void;
69
43
  /**
70
44
  * Handle the creation of formdata.
71
45
  * @returns {*} - The formdata object.
72
46
  */
73
47
  handleCreateFormData(uploadedFile?: any, contextId?: string): FormData | null;
48
+ /**
49
+ * Upload a file and return the response.
50
+ * @param {File} file - The file to upload
51
+ * @param {string} contextId - The context ID for the upload
52
+ * @returns {Promise<UploadedFileResponse>} - Promise that resolves with the upload response
53
+ */
54
+ uploadFile(file: File, contextId: string): Promise<UploadedFileResponse>;
74
55
  static ɵfac: i0.ɵɵFactoryDeclaration<DocumentUploadService, never>;
75
56
  static ɵprov: i0.ɵɵInjectableDeclaration<DocumentUploadService>;
76
57
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cat-documents-ng",
3
- "version": "0.2.74",
3
+ "version": "0.2.75",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.0.0",
6
6
  "@angular/core": "^19.0.0"
@@ -0,0 +1,20 @@
1
+ {
2
+ "catQwUrl": "https://qa-qw-api.dynamatix.com/api/",
3
+ "apiUrl": "https://gatehouse-qa.dynamatix.com/api/",
4
+ "swaggerUrl": "https://qa-qw-api.dynamatix.com/api-docs/",
5
+ "adminEmail": "neeraj.kumar@catura.co.uk",
6
+ "interactBaseApi": "https://qa-interact-api.dynamatix.com/api/",
7
+ "actionBaseApi": "https://qa-qw-api.dynamatix.com/api/",
8
+ "documentApiUrl": "https://gatehouse-documents-qa-bgavezbwe9b6e9h6.uksouth-01.azurewebsites.net/api/",
9
+ "adminPhoneNumber": "+447380300545",
10
+ "visibilityOption": {
11
+ "isRationalVisible": false,
12
+ "isChecklistVisible": false,
13
+ "isAudit": false,
14
+ "isConversation": true,
15
+ "isOverview": true,
16
+ "isDocuments": true
17
+ },
18
+ "env": "qa"
19
+
20
+ }