cat-documents-ng 0.0.21 → 0.0.23
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/Shared/constant/ERROR.d.ts +36 -0
- package/Shared/constant/SHARED.d.ts +44 -0
- package/Shared/constant/URLS.d.ts +31 -0
- package/fesm2022/cat-documents-ng.mjs +720 -144
- package/fesm2022/cat-documents-ng.mjs.map +1 -1
- package/lib/document/components/document-container/document-container.component.d.ts +27 -4
- package/lib/document/components/document-list/document-list.component.d.ts +72 -10
- package/lib/document/components/document-upload/document-upload.component.d.ts +22 -15
- package/lib/document/components/document-viewer/document-viewer.component.d.ts +15 -39
- package/lib/document/components/folder-block/folder-block.component.d.ts +2 -2
- package/lib/document/components/folder-container/folder-container.component.d.ts +10 -9
- package/lib/document/document.module.d.ts +3 -1
- package/lib/document/models/document-alert.model.d.ts +38 -0
- package/lib/document/models/document-type.model.d.ts +37 -0
- package/lib/document/models/document.model.d.ts +5 -0
- package/lib/document/models/folder.model.d.ts +3 -3
- package/lib/document/services/document-http.service.d.ts +60 -0
- package/lib/document/services/document-upload.service.d.ts +67 -0
- package/lib/document/state/document.query.d.ts +28 -0
- package/lib/document/state/document.state.d.ts +9 -6
- package/lib/document/state/document.store.d.ts +6 -3
- package/package.json +1 -1
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { DocumentService } from '../../state/document.service';
|
|
3
3
|
import { DocumentModel } from '../../models/document.model';
|
|
4
|
+
import { FolderBlockModel } from '../../models/folder.model';
|
|
5
|
+
import { DocumentHttpService } from '../../services/document-http.service';
|
|
6
|
+
import { DocumentQuery } from '../../state/document.query';
|
|
4
7
|
import * as i0 from "@angular/core";
|
|
5
8
|
/**
|
|
6
9
|
*This component is responsible for managing and displaying a list of documents.
|
|
@@ -9,22 +12,30 @@ import * as i0 from "@angular/core";
|
|
|
9
12
|
*/
|
|
10
13
|
export declare class DocumentContainerComponent implements OnInit {
|
|
11
14
|
documentService: DocumentService;
|
|
15
|
+
documentQuery: DocumentQuery;
|
|
16
|
+
documentHttpService: DocumentHttpService;
|
|
12
17
|
/**
|
|
13
18
|
* Creates an instance of DocumentContainerComponent.
|
|
14
|
-
* @class
|
|
15
19
|
* @param {DocumentService} documentService - Service to manage document-related operations.
|
|
20
|
+
* @param {DocumentQuery} documentQuery - Query service to manage document-related state.
|
|
21
|
+
* @param {DocumentHttpService} documentHttpService - Service to make HTTP requests related to documents.
|
|
16
22
|
*/
|
|
17
|
-
constructor(documentService: DocumentService);
|
|
23
|
+
constructor(documentService: DocumentService, documentQuery: DocumentQuery, documentHttpService: DocumentHttpService);
|
|
18
24
|
/**
|
|
19
25
|
* Get contextId in input.
|
|
20
26
|
* @type {string}
|
|
21
27
|
*/
|
|
22
28
|
contextId: string;
|
|
23
29
|
/**
|
|
24
|
-
* The list of
|
|
30
|
+
* The list of documents.
|
|
25
31
|
* @type {Array}
|
|
26
32
|
*/
|
|
27
33
|
documentList: DocumentModel[];
|
|
34
|
+
/**
|
|
35
|
+
* The list of folders.
|
|
36
|
+
* @type {Array}
|
|
37
|
+
*/
|
|
38
|
+
folderList: FolderBlockModel[];
|
|
28
39
|
/**
|
|
29
40
|
* Holds the subscription to manage observable cleanup.
|
|
30
41
|
* @private
|
|
@@ -32,9 +43,21 @@ export declare class DocumentContainerComponent implements OnInit {
|
|
|
32
43
|
*/
|
|
33
44
|
private subscription;
|
|
34
45
|
/**
|
|
35
|
-
*
|
|
46
|
+
* Fetches the folder and document data on initialization.
|
|
47
|
+
* @returns {void}
|
|
36
48
|
*/
|
|
37
49
|
ngOnInit(): void;
|
|
50
|
+
/**
|
|
51
|
+
* Fetches the folder data from the API.
|
|
52
|
+
* @returns {void}
|
|
53
|
+
*/
|
|
54
|
+
private fetchFolder;
|
|
55
|
+
/**
|
|
56
|
+
* Fetches the document data from the API.
|
|
57
|
+
* @param {string} folderBlockId - The folder ID to fetch the document.
|
|
58
|
+
* @returns {void}
|
|
59
|
+
*/
|
|
60
|
+
private fetchDocuments;
|
|
38
61
|
/**
|
|
39
62
|
* Unsubscribe subscription on destroy of component .
|
|
40
63
|
*/
|
|
@@ -1,47 +1,109 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
1
2
|
import { DocumentModel } from '../../models/document.model';
|
|
3
|
+
import { DocumentHttpService } from '../../services/document-http.service';
|
|
4
|
+
import { DocumentUploadService } from '../../services/document-upload.service';
|
|
2
5
|
import * as i0 from "@angular/core";
|
|
3
6
|
/**
|
|
4
|
-
* This component is responsible for displaying a list of documents.
|
|
7
|
+
* This component is responsible for displaying and managing a list of documents.
|
|
8
|
+
* Provides functionality for file upload, document selection, and dialog management.
|
|
5
9
|
* @class DocumentListComponent
|
|
6
|
-
* @typedef {DocumentListComponent}
|
|
7
10
|
*/
|
|
8
|
-
export declare class DocumentListComponent {
|
|
11
|
+
export declare class DocumentListComponent implements OnInit {
|
|
12
|
+
documentUploadService: DocumentUploadService;
|
|
13
|
+
documentHttpService: DocumentHttpService;
|
|
9
14
|
/**
|
|
10
|
-
*
|
|
15
|
+
* Represents the context ID for the document list.
|
|
16
|
+
* This value is passed from the parent component.
|
|
11
17
|
* @type {string}
|
|
18
|
+
* @memberof DocumentListComponent
|
|
12
19
|
*/
|
|
13
20
|
contextId: string;
|
|
21
|
+
/**
|
|
22
|
+
* The currently selected document.
|
|
23
|
+
* @type {DocumentModel}
|
|
24
|
+
* @memberof DocumentListComponent
|
|
25
|
+
*/
|
|
14
26
|
selectedDocument: DocumentModel;
|
|
15
27
|
/**
|
|
16
|
-
* Default
|
|
28
|
+
* Default visibility of the sidebar.
|
|
17
29
|
* @type {boolean}
|
|
30
|
+
* @memberof DocumentListComponent
|
|
18
31
|
*/
|
|
19
32
|
isSidebarVisible: boolean;
|
|
20
33
|
/**
|
|
21
|
-
* Default
|
|
34
|
+
* Default visibility of the dialog.
|
|
22
35
|
* @type {boolean}
|
|
36
|
+
* @memberof DocumentListComponent
|
|
23
37
|
*/
|
|
24
38
|
isdialogVisible: boolean;
|
|
25
39
|
/**
|
|
26
40
|
* The list of documents to display.
|
|
41
|
+
* This value is passed from the parent component.
|
|
27
42
|
* @type {DocumentModel[]}
|
|
43
|
+
* @memberof DocumentListComponent
|
|
28
44
|
*/
|
|
29
45
|
documentList: DocumentModel[];
|
|
46
|
+
/**
|
|
47
|
+
* The name of the document being uploaded or managed.
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof DocumentListComponent
|
|
50
|
+
*/
|
|
51
|
+
documentName: string;
|
|
52
|
+
/**
|
|
53
|
+
* Available document types for selection.
|
|
54
|
+
* @type {string[]}
|
|
55
|
+
* @memberof DocumentListComponent
|
|
56
|
+
*/
|
|
57
|
+
options: any[];
|
|
58
|
+
/**
|
|
59
|
+
* The selected option for the document type.
|
|
60
|
+
* @type {(string | null)}
|
|
61
|
+
* @memberof DocumentListComponent
|
|
62
|
+
*/
|
|
63
|
+
selectedOption: string | null;
|
|
64
|
+
/**
|
|
65
|
+
* Creates an instance of DocumentListComponent.
|
|
66
|
+
* @class
|
|
67
|
+
* @param {DocumentUploadService} documentUploadService - The service responsible for uploading documents.
|
|
68
|
+
* @param {DocumentHttpService} documentHttpService - The service responsible for fetching documents from the server.
|
|
69
|
+
*/
|
|
70
|
+
constructor(documentUploadService: DocumentUploadService, documentHttpService: DocumentHttpService);
|
|
71
|
+
/**
|
|
72
|
+
* Initializes the component by fetching the document type list.
|
|
73
|
+
*/
|
|
74
|
+
ngOnInit(): void;
|
|
30
75
|
/**
|
|
31
76
|
* Handles the click event for file upload.
|
|
32
77
|
* Prevents event propagation and displays the sidebar.
|
|
33
78
|
* @param {MouseEvent} event - The click event triggered by the user.
|
|
79
|
+
* @memberof DocumentListComponent
|
|
34
80
|
*/
|
|
35
81
|
handleFileUploadClick(event: MouseEvent): void;
|
|
36
82
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
83
|
+
* Handles the selection of an individual document.
|
|
84
|
+
* Opens a dialog to display or manage the selected document.
|
|
85
|
+
* @param {DocumentModel} document - The document that was clicked by the user.
|
|
86
|
+
* @memberof DocumentListComponent
|
|
39
87
|
*/
|
|
40
|
-
handleClickForDocument(
|
|
88
|
+
handleClickForDocument(document: DocumentModel): void;
|
|
41
89
|
/**
|
|
42
|
-
*
|
|
90
|
+
* Closes the dialog and resets the selected document.
|
|
91
|
+
* @memberof DocumentListComponent
|
|
43
92
|
*/
|
|
44
93
|
handleCloseModel(): void;
|
|
94
|
+
/**
|
|
95
|
+
* Handles the upload action for a document.
|
|
96
|
+
* Validates if a document type is selected and logs the result.
|
|
97
|
+
* @memberof DocumentListComponent
|
|
98
|
+
*/
|
|
99
|
+
handleUploadDocument(): void;
|
|
100
|
+
/**
|
|
101
|
+
* Fetches the list of document types from the server.
|
|
102
|
+
* Updates the options array with the available document types.
|
|
103
|
+
* @memberof DocumentListComponent
|
|
104
|
+
* @returns {void}
|
|
105
|
+
*/
|
|
106
|
+
getDocumentTypeList(): void;
|
|
45
107
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentListComponent, never>;
|
|
46
108
|
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentListComponent, "lib-document-list", never, { "contextId": { "alias": "contextId"; "required": false; }; "documentList": { "alias": "documentList"; "required": false; }; }, {}, never, never, false, never>;
|
|
47
109
|
}
|
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
import { ChangeDetectorRef
|
|
1
|
+
import { ChangeDetectorRef } from '@angular/core';
|
|
2
2
|
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
6
|
import { DocumentService } from '../../state/document.service';
|
|
7
|
+
import { DocumentUploadService } from '../../services/document-upload.service';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
/**
|
|
9
10
|
* A component for handling document uploads, including file selection, removal, and progress tracking.
|
|
10
11
|
* @class DocumentUploadComponent
|
|
11
12
|
*/
|
|
12
13
|
export declare class DocumentUploadComponent {
|
|
14
|
+
documentUpload: DocumentUploadService;
|
|
13
15
|
uploadService: DocumentService;
|
|
14
16
|
private config;
|
|
15
17
|
fileFormatService: FileFormatService;
|
|
16
18
|
messageService: MessageService;
|
|
17
19
|
cdr: ChangeDetectorRef;
|
|
20
|
+
/**
|
|
21
|
+
* Represents the file size.
|
|
22
|
+
* @type {number}
|
|
23
|
+
*/
|
|
24
|
+
fileSize: string;
|
|
18
25
|
/**
|
|
19
26
|
* Represent contextId
|
|
20
27
|
* @type {string}
|
|
21
28
|
*/
|
|
22
29
|
contextId: string;
|
|
23
|
-
/**
|
|
24
|
-
* Provide id of file after upload.
|
|
25
|
-
* @type {*}
|
|
26
|
-
*/
|
|
27
|
-
onInput: EventEmitter<any>;
|
|
28
30
|
/**
|
|
29
31
|
* To make file explorer visible.
|
|
30
32
|
* @type {!FileUpload}
|
|
@@ -35,7 +37,11 @@ export declare class DocumentUploadComponent {
|
|
|
35
37
|
* List of files selected for upload.
|
|
36
38
|
* @type {File[]}
|
|
37
39
|
*/
|
|
38
|
-
uploadedFiles:
|
|
40
|
+
uploadedFiles: {
|
|
41
|
+
file: File;
|
|
42
|
+
formattedSize: string;
|
|
43
|
+
progress: number;
|
|
44
|
+
}[];
|
|
39
45
|
/**
|
|
40
46
|
* Percentage of the total size calculated for displaying upload progress.
|
|
41
47
|
* @type {number}
|
|
@@ -49,13 +55,14 @@ export declare class DocumentUploadComponent {
|
|
|
49
55
|
/**
|
|
50
56
|
* Creates an instance of DocumentUploadComponent.
|
|
51
57
|
* @class
|
|
58
|
+
* @param {DocumentUploadService} documentUpload - Service for handling document upload.
|
|
52
59
|
* @param {DocumentService} uploadService - Service for handling document upload.
|
|
53
60
|
* @param {PrimeNGConfig} config - PrimeNG configuration.
|
|
54
61
|
* @param {FileFormatService} fileFormatService - Service for formatting file sizes.
|
|
55
62
|
* @param {MessageService} messageService - Service for displaying messages.
|
|
56
63
|
* @param {ChangeDetectorRef} cdr - Service for detecting changes.
|
|
57
64
|
*/
|
|
58
|
-
constructor(uploadService: DocumentService, config: PrimeNGConfig, fileFormatService: FileFormatService, messageService: MessageService, cdr: ChangeDetectorRef);
|
|
65
|
+
constructor(documentUpload: DocumentUploadService, uploadService: DocumentService, config: PrimeNGConfig, fileFormatService: FileFormatService, messageService: MessageService, cdr: ChangeDetectorRef);
|
|
59
66
|
/**
|
|
60
67
|
* Open the file explorer.
|
|
61
68
|
* @param {*} event - The triggering event.
|
|
@@ -73,14 +80,14 @@ export declare class DocumentUploadComponent {
|
|
|
73
80
|
/**
|
|
74
81
|
* Handle the creation of formdata.
|
|
75
82
|
* @param {File} file - The file to append in formdata.
|
|
76
|
-
* @returns {*}
|
|
83
|
+
* @returns {*} - The formdata object.
|
|
77
84
|
*/
|
|
78
85
|
handleCreateFormData(file: File): FormData;
|
|
79
86
|
/**
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
87
|
+
* Handles the event when new files are selected.
|
|
88
|
+
* @param { { currentFiles: File[] } } event - The event containing the newly selected files.
|
|
89
|
+
* @returns {void} - No return value.
|
|
90
|
+
*/
|
|
84
91
|
onSelectedFiles(event: {
|
|
85
92
|
currentFiles: File[];
|
|
86
93
|
}): void;
|
|
@@ -89,7 +96,7 @@ export declare class DocumentUploadComponent {
|
|
|
89
96
|
* @param {number} bytes - The size of the file in bytes.
|
|
90
97
|
* @returns {string} The formatted file size (e.g., '1.2 KB', '2.3 MB').
|
|
91
98
|
*/
|
|
92
|
-
formatSize(bytes: number):
|
|
99
|
+
formatSize(bytes: number): void;
|
|
93
100
|
/**
|
|
94
101
|
* Handles the removal of a file from the uploaded files list.
|
|
95
102
|
* @param {File} file - The file to be removed.
|
|
@@ -109,5 +116,5 @@ export declare class DocumentUploadComponent {
|
|
|
109
116
|
*/
|
|
110
117
|
triggerFileUpload(): void;
|
|
111
118
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentUploadComponent, never>;
|
|
112
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentUploadComponent, "lib-document-upload", never, { "contextId": { "alias": "contextId"; "required": false; }; }, {
|
|
119
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentUploadComponent, "lib-document-upload", never, { "contextId": { "alias": "contextId"; "required": false; }; }, {}, never, never, false, never>;
|
|
113
120
|
}
|
|
@@ -1,35 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnChanges, OnDestroy } from '@angular/core';
|
|
2
2
|
import { DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
3
|
+
import { DocumentHttpService } from '../../services/document-http.service';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* For list box data.
|
|
6
|
-
* @interface Country
|
|
7
|
-
* @typedef {Country}
|
|
8
|
-
*/
|
|
9
|
-
interface Country {
|
|
10
|
-
/**
|
|
11
|
-
* For the name of the property.
|
|
12
|
-
* @type {string}
|
|
13
|
-
*/
|
|
14
|
-
name: string;
|
|
15
|
-
/**
|
|
16
|
-
* For the unique code of country.
|
|
17
|
-
* @type {string}
|
|
18
|
-
*/
|
|
19
|
-
code: string;
|
|
20
|
-
/**
|
|
21
|
-
* Mark check or unchecked.
|
|
22
|
-
* @type {?boolean}
|
|
23
|
-
*/
|
|
24
|
-
checked?: boolean;
|
|
25
|
-
}
|
|
26
5
|
/**
|
|
27
6
|
* Component for viewing and managing document details.
|
|
28
7
|
* @class DocumentViewerComponent
|
|
29
8
|
* @typedef {DocumentViewerComponent}
|
|
30
9
|
* @implements {OnInit}
|
|
31
10
|
*/
|
|
32
|
-
export declare class DocumentViewerComponent implements
|
|
11
|
+
export declare class DocumentViewerComponent implements OnChanges, OnDestroy {
|
|
12
|
+
documentHttpService: DocumentHttpService;
|
|
33
13
|
/**
|
|
34
14
|
* Get the selected document by user.
|
|
35
15
|
* @type {*}
|
|
@@ -40,21 +20,11 @@ export declare class DocumentViewerComponent implements OnInit {
|
|
|
40
20
|
* @type {!string}
|
|
41
21
|
*/
|
|
42
22
|
notes: string;
|
|
43
|
-
/**
|
|
44
|
-
* Country data according to Country model.
|
|
45
|
-
* @type {!Country[]}
|
|
46
|
-
*/
|
|
47
|
-
countries: Country[];
|
|
48
23
|
/**
|
|
49
24
|
* Indicates whether a checkbox is selected.
|
|
50
25
|
* @type {boolean}
|
|
51
26
|
*/
|
|
52
27
|
checked: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* The currently selected country.
|
|
55
|
-
* @type {Country}
|
|
56
|
-
*/
|
|
57
|
-
selectedCountry: Country;
|
|
58
28
|
/**
|
|
59
29
|
* Reference to the dynamic dialog used for displaying additional details.
|
|
60
30
|
* @type {(DynamicDialogRef | undefined)}
|
|
@@ -92,22 +62,28 @@ export declare class DocumentViewerComponent implements OnInit {
|
|
|
92
62
|
* @type {any}
|
|
93
63
|
*/
|
|
94
64
|
alertData: any;
|
|
65
|
+
/**
|
|
66
|
+
* Holds the subscription to manage observable cleanup.
|
|
67
|
+
* @private
|
|
68
|
+
* @type {Subscription}
|
|
69
|
+
*/
|
|
70
|
+
private subscription;
|
|
95
71
|
/**
|
|
96
72
|
* Initializes a new instance of the DocumentViewerComponent.
|
|
97
73
|
*/
|
|
98
|
-
constructor();
|
|
74
|
+
constructor(documentHttpService: DocumentHttpService);
|
|
99
75
|
/**
|
|
100
|
-
*
|
|
101
|
-
*
|
|
76
|
+
* Fetches the alerts for the selected document.
|
|
77
|
+
* @returns {void}
|
|
102
78
|
*/
|
|
103
|
-
|
|
79
|
+
ngOnChanges(): void;
|
|
104
80
|
/**
|
|
105
81
|
* Determines if the given content type is an image.
|
|
106
82
|
* @param {string} contentType - The MIME type of the content.
|
|
107
83
|
* @returns {boolean} `true` if the content type is an image; otherwise, `false`.
|
|
108
84
|
*/
|
|
109
85
|
isImage(contentType: string): boolean;
|
|
86
|
+
ngOnDestroy(): void;
|
|
110
87
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentViewerComponent, never>;
|
|
111
88
|
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentViewerComponent, "document-viewer", never, { "selectedDocument": { "alias": "selectedDocument"; "required": false; }; }, {}, never, never, false, never>;
|
|
112
89
|
}
|
|
113
|
-
export {};
|
|
@@ -14,7 +14,7 @@ export declare class FolderBlockComponent {
|
|
|
14
14
|
* Array of folder blocks data to display.
|
|
15
15
|
* Each folder is represented as a `FolderBlockModel`.
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
folderList: FolderBlockModel[];
|
|
18
18
|
/** Number of missing files, sourced from the `SHARED` constants. */
|
|
19
19
|
missingFileCount: number;
|
|
20
20
|
/** Number of pending files, sourced from the `SHARED` constants. */
|
|
@@ -33,5 +33,5 @@ export declare class FolderBlockComponent {
|
|
|
33
33
|
*/
|
|
34
34
|
handleClickForFilter(folderBlockId: string): string;
|
|
35
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<FolderBlockComponent, never>;
|
|
36
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FolderBlockComponent, "lib-folder-block", never, { "
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FolderBlockComponent, "lib-folder-block", never, { "folderList": { "alias": "folderList"; "required": false; }; }, {}, never, never, false, never>;
|
|
37
37
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DocumentModel } from '../../models/document.model';
|
|
2
|
+
import { FolderBlockModel } from '../../models/folder.model';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
/**
|
|
4
5
|
* The `FolderContainerComponent` is responsible for rendering a container
|
|
@@ -14,15 +15,15 @@ export declare class FolderContainerComponent {
|
|
|
14
15
|
*/
|
|
15
16
|
documentList?: DocumentModel[];
|
|
16
17
|
/**
|
|
17
|
-
*
|
|
18
|
+
* A list of documents passed as input to the component.
|
|
19
|
+
* Represents the document data to be displayed in the folder container.
|
|
20
|
+
*/
|
|
21
|
+
folderList: FolderBlockModel[];
|
|
22
|
+
/**
|
|
23
|
+
* The context ID for the folder container.
|
|
24
|
+
* @type {string}
|
|
18
25
|
*/
|
|
19
|
-
|
|
20
|
-
_id: string;
|
|
21
|
-
fileCount: number;
|
|
22
|
-
text: string;
|
|
23
|
-
missingFiles: number;
|
|
24
|
-
pendingFiles: number;
|
|
25
|
-
}[];
|
|
26
|
+
contextId: string;
|
|
26
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<FolderContainerComponent, never>;
|
|
27
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FolderContainerComponent, "lib-folder-container", never, { "documentList": { "alias": "documentList"; "required": false; }; }, {}, never, never, false, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FolderContainerComponent, "lib-folder-container", never, { "documentList": { "alias": "documentList"; "required": false; }; "folderList": { "alias": "folderList"; "required": false; }; "contextId": { "alias": "contextId"; "required": false; }; }, {}, never, never, false, never>;
|
|
28
29
|
}
|
|
@@ -21,6 +21,8 @@ import * as i19 from "primeng/inputtextarea";
|
|
|
21
21
|
import * as i20 from "@angular/forms";
|
|
22
22
|
import * as i21 from "ng2-pdf-viewer";
|
|
23
23
|
import * as i22 from "primeng/dialog";
|
|
24
|
+
import * as i23 from "primeng/dropdown";
|
|
25
|
+
import * as i24 from "primeng/inputtext";
|
|
24
26
|
/**
|
|
25
27
|
* @module DocumentModule
|
|
26
28
|
*
|
|
@@ -30,6 +32,6 @@ import * as i22 from "primeng/dialog";
|
|
|
30
32
|
*/
|
|
31
33
|
export declare class DocumentModule {
|
|
32
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentModule, never>;
|
|
33
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DocumentModule, [typeof i1.DocumentContainerComponent, typeof i2.FolderContainerComponent, typeof i3.FolderBlockComponent, typeof i4.DocumentListComponent, typeof i5.DocumentListItemComponent, typeof i6.DocumentUploadComponent, typeof i7.DocumentViewerComponent], [typeof i8.CommonModule, typeof i9.AccordionModule, typeof i10.HttpClientModule, typeof i11.ButtonModule, typeof i12.SidebarModule, typeof i13.FileUploadModule, typeof i14.ProgressBarModule, typeof i15.BadgeModule, typeof i16.ListboxModule, typeof i17.CheckboxModule, typeof i18.TimelineModule, typeof i19.InputTextareaModule, typeof i20.FormsModule, typeof i21.PdfViewerModule, typeof i22.DialogModule], [typeof i1.DocumentContainerComponent, typeof i7.DocumentViewerComponent]>;
|
|
35
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DocumentModule, [typeof i1.DocumentContainerComponent, typeof i2.FolderContainerComponent, typeof i3.FolderBlockComponent, typeof i4.DocumentListComponent, typeof i5.DocumentListItemComponent, typeof i6.DocumentUploadComponent, typeof i7.DocumentViewerComponent], [typeof i8.CommonModule, typeof i9.AccordionModule, typeof i10.HttpClientModule, typeof i11.ButtonModule, typeof i12.SidebarModule, typeof i13.FileUploadModule, typeof i14.ProgressBarModule, typeof i15.BadgeModule, typeof i16.ListboxModule, typeof i17.CheckboxModule, typeof i18.TimelineModule, typeof i19.InputTextareaModule, typeof i20.FormsModule, typeof i21.PdfViewerModule, typeof i22.DialogModule, typeof i23.DropdownModule, typeof i24.InputTextModule], [typeof i1.DocumentContainerComponent, typeof i7.DocumentViewerComponent]>;
|
|
34
36
|
static ɵinj: i0.ɵɵInjectorDeclaration<DocumentModule>;
|
|
35
37
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `DocumentAlertModel` is responsible for managing and displaying alert messages for documents.
|
|
3
|
+
* @export
|
|
4
|
+
* @class DocumentAlertModel
|
|
5
|
+
* @typedef {DocumentAlertModel} - Represents the document alert model.
|
|
6
|
+
*/
|
|
7
|
+
export declare class DocumentAlertModel {
|
|
8
|
+
/**
|
|
9
|
+
* The unique identifier for the document alert.
|
|
10
|
+
* @type {string}
|
|
11
|
+
*/
|
|
12
|
+
_id: string;
|
|
13
|
+
/**
|
|
14
|
+
* The alert status for the document.
|
|
15
|
+
* @type {string}
|
|
16
|
+
*/
|
|
17
|
+
alertStatus?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The context ID for the document.
|
|
20
|
+
* @type {?string}
|
|
21
|
+
*/
|
|
22
|
+
contextId?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The document ID for the document.
|
|
25
|
+
* @type {?string}
|
|
26
|
+
*/
|
|
27
|
+
documentId?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The alert message for the document.
|
|
30
|
+
* @type {?string}
|
|
31
|
+
*/
|
|
32
|
+
alertMessage?: string;
|
|
33
|
+
/**
|
|
34
|
+
* The alert type for the document.
|
|
35
|
+
* @type {?string}
|
|
36
|
+
*/
|
|
37
|
+
status?: string;
|
|
38
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DocumentTypeModel
|
|
3
|
+
* @interface DocumentTypeModel Model for document types.
|
|
4
|
+
* @typedef {DocumentTypeModel} Model for document types.
|
|
5
|
+
*/
|
|
6
|
+
export interface DocumentTypeModel {
|
|
7
|
+
/**
|
|
8
|
+
* The label for the document type.
|
|
9
|
+
* @type {string}
|
|
10
|
+
* @memberof DocumentTypeModel
|
|
11
|
+
*/
|
|
12
|
+
label?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The match rules for the document type.
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @memberof DocumentTypeModel
|
|
17
|
+
*/
|
|
18
|
+
matchRules?: string;
|
|
19
|
+
/**
|
|
20
|
+
* The name of the document type.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof DocumentTypeModel
|
|
23
|
+
*/
|
|
24
|
+
name?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The parent document type ID.
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof DocumentTypeModel
|
|
29
|
+
*/
|
|
30
|
+
parentDocumentTypeId?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The document type ID.
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof DocumentTypeModel
|
|
35
|
+
*/
|
|
36
|
+
_id: string;
|
|
37
|
+
}
|
|
@@ -11,13 +11,13 @@ export declare class FolderBlockModel {
|
|
|
11
11
|
*/
|
|
12
12
|
_id: string;
|
|
13
13
|
/**
|
|
14
|
-
* Total number of
|
|
14
|
+
* Total number of document within the folder block.
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
documentCount?: number;
|
|
17
17
|
/**
|
|
18
18
|
* Descriptive text associated with the folder block.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
folderName?: string;
|
|
21
21
|
/**
|
|
22
22
|
* Number of files marked as missing in the folder block.
|
|
23
23
|
*/
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { AppConfigService } from '../../../Shared/services/app-config.service';
|
|
3
|
+
import { DocumentStore } from '../state/document.store';
|
|
4
|
+
import { HttpClient } from '@angular/common/http';
|
|
5
|
+
import { DocumentTypeModel } from '../models/document-type.model';
|
|
6
|
+
import { DocumentAlertModel } from '../models/document-alert.model';
|
|
7
|
+
import { DocumentModel } from '../models/document.model';
|
|
8
|
+
import { FolderBlockModel } from '../models/folder.model';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
/**
|
|
11
|
+
* Service for making HTTP requests related to documents.
|
|
12
|
+
* @class DocumentHttpService
|
|
13
|
+
* @typedef {DocumentHttpService}
|
|
14
|
+
*/
|
|
15
|
+
export declare class DocumentHttpService {
|
|
16
|
+
documentStore: DocumentStore;
|
|
17
|
+
private http;
|
|
18
|
+
appConfigService: AppConfigService;
|
|
19
|
+
/**
|
|
20
|
+
* Creates an instance of DocumentService.
|
|
21
|
+
* @param {DocumentStore} documentStore - Store managing the state of documents.
|
|
22
|
+
* @param {HttpClient} http - Angular HTTP client for making API requests.
|
|
23
|
+
* @param {AppConfigService} appConfigService - Service for retrieving application configuration, such as API base URL.
|
|
24
|
+
*/
|
|
25
|
+
constructor(documentStore: DocumentStore, http: HttpClient, appConfigService: AppConfigService);
|
|
26
|
+
/**
|
|
27
|
+
* Get api url from appConfigService.
|
|
28
|
+
* @readonly
|
|
29
|
+
* @type {string}
|
|
30
|
+
*/
|
|
31
|
+
get apiUrl(): string;
|
|
32
|
+
/**
|
|
33
|
+
* Fetches a document by its path name and transforms the response for dropdown options.
|
|
34
|
+
* Includes error handling for failed API requests.
|
|
35
|
+
* @param {string} contextId - The context ID to fetch the document.
|
|
36
|
+
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
37
|
+
*/
|
|
38
|
+
getFoldersData(contextId: string): Observable<FolderBlockModel[]>;
|
|
39
|
+
/**
|
|
40
|
+
* Fetches a document by its path name and transforms the response for dropdown options.
|
|
41
|
+
* Includes error handling for failed API requests.
|
|
42
|
+
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
43
|
+
*/
|
|
44
|
+
getDocumentTypes(): Observable<DocumentTypeModel[]>;
|
|
45
|
+
/**
|
|
46
|
+
* Fetches a document by its path name and transforms the response for dropdown options.
|
|
47
|
+
* @param {string} documentId - The document ID to fetch the document.
|
|
48
|
+
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
49
|
+
*/
|
|
50
|
+
getAlertsByDocumentID(documentId: string): Observable<DocumentAlertModel>;
|
|
51
|
+
/**
|
|
52
|
+
* Fetches a document by its folder ID and transforms the response for dropdown options.
|
|
53
|
+
* @param {string} folderId - The folder ID to fetch the document.
|
|
54
|
+
* @param {string} contextId - The context ID to fetch the document.
|
|
55
|
+
* @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
|
|
56
|
+
*/
|
|
57
|
+
getDocumentByFolderID(folderId: string, contextId: string): Observable<DocumentModel[]>;
|
|
58
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentHttpService, never>;
|
|
59
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DocumentHttpService>;
|
|
60
|
+
}
|