cat-documents-ng 0.1.37 → 0.2.32
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 +0 -7
- package/Shared/constant/PERMISSIONS.d.ts +1 -6
- package/Shared/constant/SHARED.d.ts +12 -6
- package/fesm2022/cat-documents-ng.mjs +243 -438
- package/fesm2022/cat-documents-ng.mjs.map +1 -1
- package/lib/document/components/document-container/document-container.component.d.ts +2 -20
- package/lib/document/components/document-list/document-list.component.d.ts +4 -43
- package/lib/document/components/document-viewer/document-viewer.component.d.ts +2 -9
- package/lib/document/components/documents-menu/documents-menu.component.d.ts +6 -0
- package/lib/document/components/folder-block/folder-block.component.d.ts +1 -1
- package/lib/document/document.module.d.ts +5 -2
- package/lib/document/models/document-alert.model.d.ts +0 -1
- package/lib/document/state/document.query.d.ts +0 -10
- package/lib/document/state/document.store.d.ts +0 -2
- package/package.json +1 -1
- package/public-api.d.ts +0 -1
- package/src/assets/config/api.config.json +20 -0
- package/lib/document/components/document-renderer/document-renderer.component.d.ts +0 -17
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
2
|
import { DocumentService } from '../../state/document.service';
|
|
3
3
|
import { DocumentModel } from '../../models/document.model';
|
|
4
|
-
import { Subject } from 'rxjs';
|
|
5
4
|
import { FolderBlockModel } from '../../models/folder.model';
|
|
6
5
|
import { DocumentHttpService } from '../../services/document-http.service';
|
|
7
6
|
import { DocumentQuery } from '../../state/document.query';
|
|
@@ -45,17 +44,6 @@ export declare class DocumentContainerComponent implements OnInit {
|
|
|
45
44
|
* @type {boolean}
|
|
46
45
|
*/
|
|
47
46
|
isUploadButtonVisible: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Emits the document selected by the user.
|
|
50
|
-
* @type {EventEmitter<DocumentModel>}
|
|
51
|
-
*/
|
|
52
|
-
selectedDocument: EventEmitter<DocumentModel>;
|
|
53
|
-
/**
|
|
54
|
-
* Subject used to clean up subscriptions when the component is destroyed.
|
|
55
|
-
* Helps prevent memory leaks in observables.
|
|
56
|
-
* @type {Subject<void>}
|
|
57
|
-
*/
|
|
58
|
-
destroy$: Subject<void>;
|
|
59
47
|
/**
|
|
60
48
|
* The list of documents.
|
|
61
49
|
* @type {Array}
|
|
@@ -77,12 +65,6 @@ export declare class DocumentContainerComponent implements OnInit {
|
|
|
77
65
|
* @returns {void}
|
|
78
66
|
*/
|
|
79
67
|
ngOnInit(): void;
|
|
80
|
-
/**
|
|
81
|
-
* Subscribes to the selected document from the document query store.
|
|
82
|
-
* Emits the selected document using the `selectedDocument` EventEmitter if it exists.
|
|
83
|
-
* Automatically unsubscribes when the component is destroyed.
|
|
84
|
-
*/
|
|
85
|
-
getSelectedDocumentData(): void;
|
|
86
68
|
/**
|
|
87
69
|
* Fetches the folder data from the API.
|
|
88
70
|
* @returns {void}
|
|
@@ -103,5 +85,5 @@ export declare class DocumentContainerComponent implements OnInit {
|
|
|
103
85
|
*/
|
|
104
86
|
ngOnDestroy(): void;
|
|
105
87
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentContainerComponent, never>;
|
|
106
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentContainerComponent, "lib-document-container", never, { "contextId": { "alias": "contextId"; "required": false; }; "isCollapsed": { "alias": "isCollapsed"; "required": false; }; "showFolderList": { "alias": "showFolderList"; "required": false; }; "isUploadButtonVisible": { "alias": "isUploadButtonVisible"; "required": false; }; }, {
|
|
88
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentContainerComponent, "lib-document-container", never, { "contextId": { "alias": "contextId"; "required": false; }; "isCollapsed": { "alias": "isCollapsed"; "required": false; }; "showFolderList": { "alias": "showFolderList"; "required": false; }; "isUploadButtonVisible": { "alias": "isUploadButtonVisible"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
107
89
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { DocumentModel } from '../../models/document.model';
|
|
3
3
|
import { DocumentHttpService } from '../../services/document-http.service';
|
|
4
4
|
import { DocumentUploadService } from '../../services/document-upload.service';
|
|
@@ -6,7 +6,6 @@ import { Message } from 'primeng/api';
|
|
|
6
6
|
import { DocumentQuery } from '../../state/document.query';
|
|
7
7
|
import { DocumentStore } from '../../state/document.store';
|
|
8
8
|
import { PERMISSIONS } from '../../../../Shared/constant/PERMISSIONS';
|
|
9
|
-
import { SessionService } from '../../../../Shared/services/session.service';
|
|
10
9
|
import * as i0 from "@angular/core";
|
|
11
10
|
/**
|
|
12
11
|
* This component is responsible for displaying and managing a list of documents.
|
|
@@ -18,7 +17,6 @@ export declare class DocumentListComponent implements OnInit {
|
|
|
18
17
|
documentHttpService: DocumentHttpService;
|
|
19
18
|
documentQuery: DocumentQuery;
|
|
20
19
|
documentStore: DocumentStore;
|
|
21
|
-
private sessionService;
|
|
22
20
|
onRefresh: EventEmitter<any>;
|
|
23
21
|
/**
|
|
24
22
|
* Represents the context ID for the document list.
|
|
@@ -75,7 +73,7 @@ export declare class DocumentListComponent implements OnInit {
|
|
|
75
73
|
* @type {string}
|
|
76
74
|
* @memberof DocumentListComponent
|
|
77
75
|
*/
|
|
78
|
-
documentName: string
|
|
76
|
+
documentName: string;
|
|
79
77
|
/**
|
|
80
78
|
* Available document types for selection.
|
|
81
79
|
* @type {string[]}
|
|
@@ -97,34 +95,7 @@ export declare class DocumentListComponent implements OnInit {
|
|
|
97
95
|
* It may be undefined until a file is selected or loaded.
|
|
98
96
|
* @type {string | undefined}
|
|
99
97
|
*/
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Indicates whether the user has permission to upload or modify documents.
|
|
103
|
-
* The exact type depends on the access control implementation.
|
|
104
|
-
* @type {any}
|
|
105
|
-
*/
|
|
106
|
-
hasDocumentPutAccess: any;
|
|
107
|
-
/**
|
|
108
|
-
* Error message related to the file name, if validation fails.
|
|
109
|
-
* @type {string}
|
|
110
|
-
*/
|
|
111
|
-
fileNameError: string;
|
|
112
|
-
/**
|
|
113
|
-
* Extension of the selected document file (e.g., .pdf, .docx).
|
|
114
|
-
* @type {string}
|
|
115
|
-
*/
|
|
116
|
-
documentExtension: string;
|
|
117
|
-
/**
|
|
118
|
-
* Regular expression to match disallowed characters in file names.
|
|
119
|
-
* Prevents characters like < > : " / \ | ? *
|
|
120
|
-
* @type {RegExp}
|
|
121
|
-
*/
|
|
122
|
-
disallowedCharsRegex: RegExp;
|
|
123
|
-
/**
|
|
124
|
-
* Reference to the file input element used for uploading documents.
|
|
125
|
-
* @type {ElementRef<HTMLInputElement>}
|
|
126
|
-
*/
|
|
127
|
-
fileInput: ElementRef<HTMLInputElement>;
|
|
98
|
+
fileName: string | undefined;
|
|
128
99
|
/**
|
|
129
100
|
* Creates an instance of DocumentListComponent.
|
|
130
101
|
* @class
|
|
@@ -132,14 +103,12 @@ export declare class DocumentListComponent implements OnInit {
|
|
|
132
103
|
* @param {DocumentHttpService} documentHttpService - The service responsible for fetching documents from the server.
|
|
133
104
|
* @param {DocumentQuery} documentQuery - The service responsible for geting stored documents.
|
|
134
105
|
* @param {DocumentStore} documentStore - The service responsible for storing documents.
|
|
135
|
-
* @param {SessionService} sessionService - Service for managing user session and authentication.
|
|
136
106
|
*/
|
|
137
|
-
constructor(documentUploadService: DocumentUploadService, documentHttpService: DocumentHttpService, documentQuery: DocumentQuery, documentStore: DocumentStore
|
|
107
|
+
constructor(documentUploadService: DocumentUploadService, documentHttpService: DocumentHttpService, documentQuery: DocumentQuery, documentStore: DocumentStore);
|
|
138
108
|
/**
|
|
139
109
|
* Initializes the component by fetching the document type list.
|
|
140
110
|
*/
|
|
141
111
|
ngOnInit(): void;
|
|
142
|
-
handleUpdatedDocument(document: DocumentModel): void;
|
|
143
112
|
/**
|
|
144
113
|
* Handles the click event for file upload.
|
|
145
114
|
* Prevents event propagation and displays the sidebar.
|
|
@@ -167,14 +136,6 @@ export declare class DocumentListComponent implements OnInit {
|
|
|
167
136
|
* @memberof DocumentListComponent
|
|
168
137
|
*/
|
|
169
138
|
handleCloseModal(): void;
|
|
170
|
-
/**
|
|
171
|
-
* Handles changes to the document name input field.
|
|
172
|
-
* - Updates the `documentName` property.
|
|
173
|
-
* - Validates for disallowed characters and sets appropriate error messages.
|
|
174
|
-
* - Dynamically adjusts the width of the input field based on the content using a hidden span element.
|
|
175
|
-
* @param {Event} event - The input change event triggered when the user types in the document name field.
|
|
176
|
-
*/
|
|
177
|
-
onDocumentNameChange(event: Event): void;
|
|
178
139
|
/**
|
|
179
140
|
* Handles the upload action for a document.
|
|
180
141
|
* Validates if a document type is selected and logs the result.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnChanges, OnDestroy } from '@angular/core';
|
|
2
2
|
import { DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
3
3
|
import { DocumentHttpService } from '../../services/document-http.service';
|
|
4
4
|
import { DocumentModel } from '../../models/document.model';
|
|
@@ -42,12 +42,6 @@ export declare class DocumentViewerComponent implements OnChanges, OnDestroy {
|
|
|
42
42
|
* @type {any}
|
|
43
43
|
*/
|
|
44
44
|
alertData: any;
|
|
45
|
-
private destroy$;
|
|
46
|
-
/**
|
|
47
|
-
* Emits the updated document after changes like upload, rename, or replace.
|
|
48
|
-
* @type {EventEmitter<DocumentModel>}
|
|
49
|
-
*/
|
|
50
|
-
updatedDocument: EventEmitter<DocumentModel>;
|
|
51
45
|
/**
|
|
52
46
|
* Holds the subscription to manage observable cleanup.
|
|
53
47
|
* @private
|
|
@@ -65,7 +59,6 @@ export declare class DocumentViewerComponent implements OnChanges, OnDestroy {
|
|
|
65
59
|
* @returns {void}
|
|
66
60
|
*/
|
|
67
61
|
ngOnChanges(): void;
|
|
68
|
-
getDocumentAlertList(): void;
|
|
69
62
|
handleSelectedDocument(document: DocumentModel): void;
|
|
70
63
|
/**
|
|
71
64
|
* Determines if the given content type is an image.
|
|
@@ -75,5 +68,5 @@ export declare class DocumentViewerComponent implements OnChanges, OnDestroy {
|
|
|
75
68
|
isImage(contentType?: string): boolean;
|
|
76
69
|
ngOnDestroy(): void;
|
|
77
70
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentViewerComponent, never>;
|
|
78
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentViewerComponent, "document-viewer", never, { "selectedDocument": { "alias": "selectedDocument"; "required": false; }; "documentList": { "alias": "documentList"; "required": false; }; }, {
|
|
71
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentViewerComponent, "document-viewer", never, { "selectedDocument": { "alias": "selectedDocument"; "required": false; }; "documentList": { "alias": "documentList"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
79
72
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class DocumentsMenuComponent {
|
|
3
|
+
items: any;
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentsMenuComponent, never>;
|
|
5
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentsMenuComponent, "lib-documents-menu", never, {}, {}, never, never, false, never>;
|
|
6
|
+
}
|
|
@@ -31,7 +31,7 @@ export declare class FolderBlockComponent {
|
|
|
31
31
|
* @param {string} folderBlockId - The unique identifier of the folder to filter by.
|
|
32
32
|
* @returns {string} The validated folder ID, or an empty string if the input is invalid.
|
|
33
33
|
*/
|
|
34
|
-
handleClickForFilter(folderBlockId:
|
|
34
|
+
handleClickForFilter(folderBlockId: string): string;
|
|
35
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<FolderBlockComponent, never>;
|
|
36
36
|
static ɵcmp: i0.ɵɵComponentDeclaration<FolderBlockComponent, "lib-folder-block", never, { "folderList": { "alias": "folderList"; "required": false; }; }, {}, never, never, false, never>;
|
|
37
37
|
}
|
|
@@ -9,7 +9,7 @@ import * as i7 from "./components/document-viewer/document-viewer.component";
|
|
|
9
9
|
import * as i8 from "./directives/document.directive";
|
|
10
10
|
import * as i9 from "./directives/permission.directive";
|
|
11
11
|
import * as i10 from "./components/linked-document/linked-document.component";
|
|
12
|
-
import * as i11 from "./components/
|
|
12
|
+
import * as i11 from "./components/documents-menu/documents-menu.component";
|
|
13
13
|
import * as i12 from "@angular/common";
|
|
14
14
|
import * as i13 from "primeng/accordion";
|
|
15
15
|
import * as i14 from "@angular/common/http";
|
|
@@ -27,6 +27,9 @@ import * as i25 from "ng2-pdf-viewer";
|
|
|
27
27
|
import * as i26 from "primeng/dialog";
|
|
28
28
|
import * as i27 from "primeng/dropdown";
|
|
29
29
|
import * as i28 from "primeng/inputtext";
|
|
30
|
+
import * as i29 from "primeng/menu";
|
|
31
|
+
import * as i30 from "primeng/panelmenu";
|
|
32
|
+
import * as i31 from "primeng/card";
|
|
30
33
|
/**
|
|
31
34
|
* @module DocumentModule
|
|
32
35
|
*
|
|
@@ -36,6 +39,6 @@ import * as i28 from "primeng/inputtext";
|
|
|
36
39
|
*/
|
|
37
40
|
export declare class DocumentModule {
|
|
38
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentModule, never>;
|
|
39
|
-
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.DocumentDirective, typeof i9.HasPermissionDirective, typeof i10.LinkedDocumentComponent, typeof i11.
|
|
42
|
+
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.DocumentDirective, typeof i9.HasPermissionDirective, typeof i10.LinkedDocumentComponent, typeof i11.DocumentsMenuComponent], [typeof i12.CommonModule, typeof i13.AccordionModule, typeof i14.HttpClientModule, typeof i15.ButtonModule, typeof i16.SidebarModule, typeof i17.FileUploadModule, typeof i18.ProgressBarModule, typeof i19.BadgeModule, typeof i20.ListboxModule, typeof i21.CheckboxModule, typeof i22.TimelineModule, typeof i23.InputTextareaModule, typeof i24.FormsModule, typeof i25.PdfViewerModule, typeof i26.DialogModule, typeof i27.DropdownModule, typeof i28.InputTextModule, typeof i29.MenuModule, typeof i30.PanelMenuModule, typeof i31.CardModule], [typeof i9.HasPermissionDirective, typeof i1.DocumentContainerComponent, typeof i7.DocumentViewerComponent, typeof i4.DocumentListComponent, typeof i8.DocumentDirective]>;
|
|
40
43
|
static ɵinj: i0.ɵɵInjectorDeclaration<DocumentModule>;
|
|
41
44
|
}
|
|
@@ -35,16 +35,6 @@ export declare class DocumentQuery extends QueryEntity<DocumentState> {
|
|
|
35
35
|
* @returns {Observable<DocumentModel[]>} Observable that emits the documets.
|
|
36
36
|
*/
|
|
37
37
|
selectDocumets(): Observable<DocumentModel[]>;
|
|
38
|
-
/**
|
|
39
|
-
* Retrieves the currently selected document from the store state.
|
|
40
|
-
* @returns {Observable<any>} Observable that emits the selected document.
|
|
41
|
-
*/
|
|
42
|
-
getSelectedDocument(): Observable<any>;
|
|
43
|
-
/**
|
|
44
|
-
* Retrieves the flag indicating whether a document has been updated.
|
|
45
|
-
* @returns {Observable<any>} Observable that emits a boolean or status flag.
|
|
46
|
-
*/
|
|
47
|
-
getIsDocumentUpdated(): Observable<any>;
|
|
48
38
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentQuery, never>;
|
|
49
39
|
static ɵprov: i0.ɵɵInjectableDeclaration<DocumentQuery>;
|
|
50
40
|
}
|
|
@@ -22,8 +22,6 @@ export declare class DocumentStore extends EntityStore<DocumentState> {
|
|
|
22
22
|
setParentDocumentTypeId(parentDocumentTypeId: string): void;
|
|
23
23
|
setMessage(message: Message[]): void;
|
|
24
24
|
setDocumentList(documents: DocumentModel[]): void;
|
|
25
|
-
setSelectedDocument(selectedDocument: any): void;
|
|
26
|
-
setIsDocumentUpdated(isDocumentUpdated: any): void;
|
|
27
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentStore, never>;
|
|
28
26
|
static ɵprov: i0.ɵɵInjectableDeclaration<DocumentStore>;
|
|
29
27
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -2,6 +2,5 @@ export * from './lib/document/document.module';
|
|
|
2
2
|
export * from './lib/document/components/document-container/document-container.component';
|
|
3
3
|
export * from './lib/document/components/document-viewer/document-viewer.component';
|
|
4
4
|
export * from './lib/document/components/document-list/document-list.component';
|
|
5
|
-
export * from './lib/document/components/document-renderer/document-renderer.component';
|
|
6
5
|
export * from './lib/document/directives/document.directive';
|
|
7
6
|
export * from './lib/document/directives/permission.directive';
|
|
@@ -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": "http://localhost:5100/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
|
+
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class DocumentRendererComponent implements OnInit {
|
|
4
|
-
selectedDocumentType: string;
|
|
5
|
-
documentType: {
|
|
6
|
-
_id: string;
|
|
7
|
-
name: string;
|
|
8
|
-
__v: number;
|
|
9
|
-
label: string;
|
|
10
|
-
parentDocumentTypeId: string;
|
|
11
|
-
source: null;
|
|
12
|
-
}[];
|
|
13
|
-
ngOnInit(): void;
|
|
14
|
-
handleFileUploadClick(event: any): void;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentRendererComponent, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DocumentRendererComponent, "app-document-renderer", never, {}, {}, never, never, false, never>;
|
|
17
|
-
}
|