cat-documents-ng 0.1.28 → 0.1.30

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.
Files changed (92) hide show
  1. package/ng-package.json +11 -0
  2. package/package.json +20 -25
  3. package/{Shared/constant/ERROR.d.ts → src/Shared/constant/ERROR.ts} +38 -36
  4. package/src/Shared/constant/PERMISSIONS.ts +16 -0
  5. package/src/Shared/constant/SHARED.ts +312 -0
  6. package/{Shared/constant/URLS.d.ts → src/Shared/constant/URLS.ts} +65 -60
  7. package/src/Shared/services/app-config.service.spec.ts +19 -0
  8. package/src/Shared/services/app-config.service.ts +73 -0
  9. package/{Shared/services/global-error.handler.d.ts → src/Shared/services/global-error.handler.ts} +29 -27
  10. package/src/Shared/services/session.service.spec.ts +16 -0
  11. package/src/Shared/services/session.service.ts +76 -0
  12. package/src/assets/config/api.config.json +20 -0
  13. package/src/lib/document/components/document-container/document-container.component.html +14 -0
  14. package/src/lib/document/components/document-container/document-container.component.scss +8 -0
  15. package/src/lib/document/components/document-container/document-container.component.spec.ts +110 -0
  16. package/src/lib/document/components/document-container/document-container.component.ts +173 -0
  17. package/src/lib/document/components/document-list/document-list.component.html +81 -0
  18. package/src/lib/document/components/document-list/document-list.component.scss +82 -0
  19. package/src/lib/document/components/document-list/document-list.component.spec.ts +96 -0
  20. package/src/lib/document/components/document-list/document-list.component.ts +244 -0
  21. package/src/lib/document/components/document-list-item/document-list-item.component.html +36 -0
  22. package/src/lib/document/components/document-list-item/document-list-item.component.scss +34 -0
  23. package/src/lib/document/components/document-list-item/document-list-item.component.spec.ts +75 -0
  24. package/src/lib/document/components/document-list-item/document-list-item.component.ts +40 -0
  25. package/src/lib/document/components/document-upload/document-upload.component.html +56 -0
  26. package/src/lib/document/components/document-upload/document-upload.component.scss +32 -0
  27. package/src/lib/document/components/document-upload/document-upload.component.spec.ts +95 -0
  28. package/src/lib/document/components/document-upload/document-upload.component.ts +162 -0
  29. package/src/lib/document/components/document-viewer/document-viewer.component.html +98 -0
  30. package/src/lib/document/components/document-viewer/document-viewer.component.scss +54 -0
  31. package/src/lib/document/components/document-viewer/document-viewer.component.spec.ts +79 -0
  32. package/src/lib/document/components/document-viewer/document-viewer.component.ts +106 -0
  33. package/src/lib/document/components/folder-block/folder-block.component.html +46 -0
  34. package/src/lib/document/components/folder-block/folder-block.component.scss +9 -0
  35. package/src/lib/document/components/folder-block/folder-block.component.spec.ts +70 -0
  36. package/{lib/document/components/folder-block/folder-block.component.d.ts → src/lib/document/components/folder-block/folder-block.component.ts} +53 -37
  37. package/src/lib/document/components/folder-container/folder-container.component.html +2 -0
  38. package/src/lib/document/components/folder-container/folder-container.component.scss +0 -0
  39. package/src/lib/document/components/folder-container/folder-container.component.spec.ts +27 -0
  40. package/src/lib/document/components/folder-container/folder-container.component.ts +37 -0
  41. package/src/lib/document/components/linked-document/linked-document.component.html +23 -0
  42. package/src/lib/document/components/linked-document/linked-document.component.scss +10 -0
  43. package/src/lib/document/components/linked-document/linked-document.component.spec.ts +61 -0
  44. package/src/lib/document/components/linked-document/linked-document.component.ts +49 -0
  45. package/src/lib/document/directives/document.directive.ts +32 -0
  46. package/src/lib/document/directives/permission.directive.spec.ts +0 -0
  47. package/src/lib/document/directives/permission.directive.ts +66 -0
  48. package/src/lib/document/document.module.ts +241 -0
  49. package/{lib/document/models/document-alert.model.d.ts → src/lib/document/models/document-alert.model.ts} +45 -38
  50. package/src/lib/document/models/document-type.model.ts +44 -0
  51. package/src/lib/document/models/document.model.ts +53 -0
  52. package/{lib/document/models/folder.model.d.ts → src/lib/document/models/folder.model.ts} +35 -29
  53. package/src/lib/document/services/document-http.service.spec.ts +119 -0
  54. package/src/lib/document/services/document-http.service.ts +125 -0
  55. package/src/lib/document/services/document-upload.service.spec.ts +99 -0
  56. package/src/lib/document/services/document-upload.service.ts +127 -0
  57. package/src/lib/document/services/document.service.ts +29 -0
  58. package/src/lib/document/services/file-format.service.spec.ts +16 -0
  59. package/src/lib/document/services/file-format.service.ts +41 -0
  60. package/src/lib/document/state/document.query.ts +52 -0
  61. package/{lib/document/state/document.service.d.ts → src/lib/document/state/document.service.ts} +95 -64
  62. package/{lib/document/state/document.state.d.ts → src/lib/document/state/document.state.ts} +52 -36
  63. package/src/lib/document/state/document.store.ts +51 -0
  64. package/{public-api.d.ts → src/public-api.ts} +10 -6
  65. package/tsconfig.lib.json +15 -0
  66. package/tsconfig.lib.prod.json +11 -0
  67. package/tsconfig.spec.json +15 -0
  68. package/Shared/constant/PERMISSIONS.d.ts +0 -15
  69. package/Shared/constant/SHARED.d.ts +0 -209
  70. package/Shared/services/app-config.service.d.ts +0 -51
  71. package/Shared/services/session.service.d.ts +0 -46
  72. package/fesm2022/cat-documents-ng.mjs +0 -2538
  73. package/fesm2022/cat-documents-ng.mjs.map +0 -1
  74. package/index.d.ts +0 -5
  75. package/lib/document/components/document-container/document-container.component.d.ts +0 -85
  76. package/lib/document/components/document-list/document-list.component.d.ts +0 -160
  77. package/lib/document/components/document-list-item/document-list-item.component.d.ts +0 -28
  78. package/lib/document/components/document-upload/document-upload.component.d.ts +0 -120
  79. package/lib/document/components/document-viewer/document-viewer.component.d.ts +0 -73
  80. package/lib/document/components/folder-container/folder-container.component.d.ts +0 -29
  81. package/lib/document/components/linked-document/linked-document.component.d.ts +0 -38
  82. package/lib/document/directives/document.directive.d.ts +0 -20
  83. package/lib/document/directives/permission.directive.d.ts +0 -38
  84. package/lib/document/document.module.d.ts +0 -40
  85. package/lib/document/models/document-type.model.d.ts +0 -37
  86. package/lib/document/models/document.model.d.ts +0 -44
  87. package/lib/document/services/document-http.service.d.ts +0 -69
  88. package/lib/document/services/document-upload.service.d.ts +0 -67
  89. package/lib/document/services/document.service.d.ts +0 -20
  90. package/lib/document/services/file-format.service.d.ts +0 -23
  91. package/lib/document/state/document.query.d.ts +0 -42
  92. package/lib/document/state/document.store.d.ts +0 -29
@@ -1,160 +0,0 @@
1
- import { ElementRef, EventEmitter, OnInit } from '@angular/core';
2
- import { DocumentModel } from '../../models/document.model';
3
- import { DocumentHttpService } from '../../services/document-http.service';
4
- import { DocumentUploadService } from '../../services/document-upload.service';
5
- import { Message } from 'primeng/api';
6
- import { DocumentQuery } from '../../state/document.query';
7
- import { DocumentStore } from '../../state/document.store';
8
- import { PERMISSIONS } from '../../../../Shared/constant/PERMISSIONS';
9
- import { SessionService } from '../../../../Shared/services/session.service';
10
- import { DocumentService } from '../../services/document.service';
11
- import * as i0 from "@angular/core";
12
- /**
13
- * This component is responsible for displaying and managing a list of documents.
14
- * Provides functionality for file upload, document selection, and dialog management.
15
- * @class DocumentListComponent
16
- */
17
- export declare class DocumentListComponent implements OnInit {
18
- documentUploadService: DocumentUploadService;
19
- documentHttpService: DocumentHttpService;
20
- documentQuery: DocumentQuery;
21
- documentStore: DocumentStore;
22
- private sessionService;
23
- private documentService;
24
- onRefresh: EventEmitter<any>;
25
- /**
26
- * Represents the context ID for the document list.
27
- * This value is passed from the parent component.
28
- * @type {string}
29
- * @memberof DocumentListComponent
30
- */
31
- contextId: string;
32
- /**
33
- * Default visibility of the upload button.
34
- * @type {boolean}
35
- * @memberof DocumentListComponent
36
- */
37
- isUploadButtonVisible: boolean;
38
- /**
39
- * The currently selected document.
40
- * @type {DocumentModel}
41
- * @memberof DocumentListComponent
42
- */
43
- selectedDocument: DocumentModel;
44
- /**
45
- * Default visibility of the sidebar.
46
- * @type {boolean}
47
- * @memberof DocumentListComponent
48
- */
49
- isSidebarVisible: boolean;
50
- /**
51
- * Default visibility of the messages.
52
- * @type {Message[]}
53
- * @memberof DocumentListComponent
54
- */
55
- messages: Message[];
56
- /**
57
- * Default visibility of the dialog.
58
- * @type {boolean}
59
- * @memberof DocumentListComponent
60
- */
61
- isdialogVisible: boolean;
62
- /**
63
- * The list of documents to display.
64
- * This value is passed from the parent component.
65
- * @type {DocumentModel[]}
66
- * @memberof DocumentListComponent
67
- */
68
- documentList: DocumentModel[];
69
- /**
70
- * The name of the document being uploaded or managed.
71
- * @type {string}
72
- * @memberof DocumentListComponent
73
- */
74
- documentName: string | undefined;
75
- /**
76
- * Available document types for selection.
77
- * @type {string[]}
78
- * @memberof DocumentListComponent
79
- */
80
- options: any[];
81
- /**
82
- * The selected option for the document type.
83
- * @type {(string | null)}
84
- * @memberof DocumentListComponent
85
- */
86
- selectedOption: string | null;
87
- /**
88
- * The set of permissions available for this component.
89
- */
90
- PERMISSION: typeof PERMISSIONS;
91
- /**
92
- * The file name associated with the document.
93
- * It may be undefined until a file is selected or loaded.
94
- * @type {string | undefined}
95
- */
96
- documentStatus: string | undefined;
97
- hasDocumentPutAccess: any;
98
- fileNameError: string;
99
- documentExtension: string;
100
- disallowedCharsRegex: RegExp;
101
- fileInput: ElementRef<HTMLInputElement>;
102
- /**
103
- * Creates an instance of DocumentListComponent.
104
- * @class
105
- * @param {DocumentUploadService} documentUploadService - The service responsible for uploading documents.
106
- * @param {DocumentHttpService} documentHttpService - The service responsible for fetching documents from the server.
107
- * @param {DocumentQuery} documentQuery - The service responsible for geting stored documents.
108
- * @param {DocumentStore} documentStore - The service responsible for storing documents.
109
- */
110
- constructor(documentUploadService: DocumentUploadService, documentHttpService: DocumentHttpService, documentQuery: DocumentQuery, documentStore: DocumentStore, sessionService: SessionService, documentService: DocumentService);
111
- /**
112
- * Initializes the component by fetching the document type list.
113
- */
114
- ngOnInit(): void;
115
- handleUpdatedDocument(document: DocumentModel): void;
116
- /**
117
- * Handles the click event for file upload.
118
- * Prevents event propagation and displays the sidebar.
119
- * @param {MouseEvent} event - The click event triggered by the user.
120
- * @memberof DocumentListComponent
121
- */
122
- handleFileUploadClick(event: MouseEvent): void;
123
- /**
124
- * Handles the selection of an individual document.
125
- * Opens a dialog to display or manage the selected document.
126
- * @param {DocumentModel} document - The document that was clicked by the user.
127
- * @memberof DocumentListComponent
128
- */
129
- handleClickForDocument(document: DocumentModel): void;
130
- /**
131
- * Handles the save click event to update the document's file name.
132
- * This method creates a payload with the updated file name and calls the
133
- * updateDocumentName() method from the documentHttpService. On a successful update,
134
- * it logs a message with the document's ID.
135
- * @returns {void}
136
- */
137
- handleSaveClick(): void;
138
- /**
139
- * Closes the dialog and resets the selected document.
140
- * @memberof DocumentListComponent
141
- */
142
- handleCloseModal(): void;
143
- onDocumentNameChange(event: Event): void;
144
- /**
145
- * Handles the upload action for a document.
146
- * Validates if a document type is selected and logs the result.
147
- * @memberof DocumentListComponent
148
- */
149
- handleUploadDocument(): void;
150
- /**
151
- * Fetches the list of document types from the server.
152
- * Updates the options array with the available document types.
153
- * @memberof DocumentListComponent
154
- * @returns {void}
155
- */
156
- getDocumentTypeList(): void;
157
- handleOpenSideBar(isVisible: boolean): void;
158
- static ɵfac: i0.ɵɵFactoryDeclaration<DocumentListComponent, never>;
159
- static ɵcmp: i0.ɵɵComponentDeclaration<DocumentListComponent, "lib-document-list", never, { "contextId": { "alias": "contextId"; "required": false; }; "isUploadButtonVisible": { "alias": "isUploadButtonVisible"; "required": false; }; "documentList": { "alias": "documentList"; "required": false; }; }, { "onRefresh": "onRefresh"; }, never, ["*"], false, never>;
160
- }
@@ -1,28 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import { DocumentModel } from '../../models/document.model';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * DocumentListItemComponent
6
- *
7
- * This component displays individual document items within a list.
8
- * It accepts a list of documents as input and handles interactions with documents.
9
- */
10
- export declare class DocumentListItemComponent {
11
- /**
12
- * Emit the selected document.
13
- * @type {EventEmitter<DocumentModel>}
14
- */
15
- documentClick: EventEmitter<DocumentModel>;
16
- /**
17
- * The document to display.
18
- * @type {DocumentModel[]}
19
- */
20
- document: DocumentModel;
21
- /**
22
- * Handles interactions with a document.
23
- * @param {DocumentModel} document - The document to be opened or interacted with.
24
- */
25
- handleOpenDocument(document: DocumentModel): void;
26
- static ɵfac: i0.ɵɵFactoryDeclaration<DocumentListItemComponent, never>;
27
- static ɵcmp: i0.ɵɵComponentDeclaration<DocumentListItemComponent, "lib-document-list-item", never, { "document": { "alias": "document"; "required": false; }; }, { "documentClick": "documentClick"; }, never, never, false, never>;
28
- }
@@ -1,120 +0,0 @@
1
- import { ChangeDetectorRef } from '@angular/core';
2
- import { FileUpload } from 'primeng/fileupload';
3
- import { MessageService } from 'primeng/api';
4
- import { PrimeNGConfig } from 'primeng/api';
5
- import { FileFormatService } from '../../services/file-format.service';
6
- import { DocumentService } from '../../state/document.service';
7
- import { DocumentUploadService } from '../../services/document-upload.service';
8
- import * as i0 from "@angular/core";
9
- /**
10
- * A component for handling document uploads, including file selection, removal, and progress tracking.
11
- * @class DocumentUploadComponent
12
- */
13
- export declare class DocumentUploadComponent {
14
- documentUpload: DocumentUploadService;
15
- uploadService: DocumentService;
16
- private config;
17
- fileFormatService: FileFormatService;
18
- messageService: MessageService;
19
- cdr: ChangeDetectorRef;
20
- /**
21
- * Represents the file size.
22
- * @type {number}
23
- */
24
- fileSize: string;
25
- /**
26
- * Represent contextId
27
- * @type {string}
28
- */
29
- contextId: string;
30
- /**
31
- * To make file explorer visible.
32
- * @type {!FileUpload}
33
- */
34
- fileUploader: FileUpload;
35
- fileProgress: Map<File, number>;
36
- /**
37
- * List of files selected for upload.
38
- * @type {File[]}
39
- */
40
- uploadedFiles: {
41
- file: File;
42
- formattedSize: string;
43
- progress: number;
44
- }[];
45
- /**
46
- * Percentage of the total size calculated for displaying upload progress.
47
- * @type {number}
48
- */
49
- totalSizePercent: number;
50
- /**
51
- * The current upload progress percentage (SHARED.INITIAL_VALUE-100).
52
- * @type {number}
53
- */
54
- uploadProgress: number;
55
- /**
56
- * Creates an instance of DocumentUploadComponent.
57
- * @class
58
- * @param {DocumentUploadService} documentUpload - Service for handling document upload.
59
- * @param {DocumentService} uploadService - Service for handling document upload.
60
- * @param {PrimeNGConfig} config - PrimeNG configuration.
61
- * @param {FileFormatService} fileFormatService - Service for formatting file sizes.
62
- * @param {MessageService} messageService - Service for displaying messages.
63
- * @param {ChangeDetectorRef} cdr - Service for detecting changes.
64
- */
65
- constructor(documentUpload: DocumentUploadService, uploadService: DocumentService, config: PrimeNGConfig, fileFormatService: FileFormatService, messageService: MessageService, cdr: ChangeDetectorRef);
66
- /**
67
- * Open the file explorer.
68
- * @param {*} event - The triggering event.
69
- * @param {() => void} callback - A callback function to execute.
70
- * @returns {void} - No return value.
71
- */
72
- choose(event: any, callback: () => void): void;
73
- /**
74
- * Prepares the files for upload by creating a FormData object.
75
- * This method appends each file to the FormData for submission.
76
- * @param {File} file - The file to upload.
77
- * @returns {void}
78
- */
79
- handleTemplatedUpload(file: File): void;
80
- /**
81
- * Handle the creation of formdata.
82
- * @param {File} file - The file to append in formdata.
83
- * @returns {*} - The formdata object.
84
- */
85
- handleCreateFormData(file: File): FormData;
86
- /**
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
- */
91
- onSelectedFiles(event: {
92
- currentFiles: File[];
93
- }): void;
94
- /**
95
- * Formats the given file size in bytes into a readable format (e.g., KB, MB).
96
- * @param {number} bytes - The size of the file in bytes.
97
- * @returns {string} The formatted file size (e.g., '1.2 KB', '2.3 MB').
98
- */
99
- formatSize(bytes: number): void;
100
- /**
101
- * Handles the removal of a file from the uploaded files list.
102
- * @param {File} file - The file to be removed.
103
- * @param {number} index - The index of the file in the uploaded files list.
104
- */
105
- handleDocumentRemove(file: File, index: number): void;
106
- /**
107
- * Major progress for the progress bar.
108
- * @param {File} file - File to check progress for.
109
- * @returns {number} - The progress percentage for the file.
110
- */
111
- getProgress(file: File): number;
112
- /**
113
- * Triggers the file upload dialog.
114
- * Opens the file explorer for selecting files.
115
- * @returns {void}
116
- */
117
- triggerFileUpload(): void;
118
- static ɵfac: i0.ɵɵFactoryDeclaration<DocumentUploadComponent, never>;
119
- static ɵcmp: i0.ɵɵComponentDeclaration<DocumentUploadComponent, "lib-document-upload", never, { "contextId": { "alias": "contextId"; "required": false; }; }, {}, never, never, false, never>;
120
- }
@@ -1,73 +0,0 @@
1
- import { EventEmitter, OnChanges, OnDestroy } from '@angular/core';
2
- import { DynamicDialogRef } from 'primeng/dynamicdialog';
3
- import { DocumentHttpService } from '../../services/document-http.service';
4
- import { DocumentModel } from '../../models/document.model';
5
- import { DocumentService } from '../../services/document.service';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * Component for viewing and managing document details.
9
- * @class DocumentViewerComponent
10
- * @typedef {DocumentViewerComponent}
11
- */
12
- export declare class DocumentViewerComponent implements OnChanges, OnDestroy {
13
- documentHttpService: DocumentHttpService;
14
- private documentService;
15
- /**
16
- * Get the selected document by user.
17
- * @type {*}
18
- */
19
- selectedDocument?: DocumentModel;
20
- /**
21
- * Get the selected document by user.
22
- * @type {*}
23
- */
24
- documentList?: DocumentModel[];
25
- /**
26
- * Indicates whether a checkbox is selected.
27
- * @type {boolean}
28
- */
29
- checked: boolean;
30
- /**
31
- * Reference to the dynamic dialog used for displaying additional details.
32
- * @type {(DynamicDialogRef | undefined)}
33
- */
34
- ref: DynamicDialogRef | undefined;
35
- /**
36
- * Indicates whether the document has been verified.
37
- * @type {boolean}
38
- */
39
- isVerified: boolean;
40
- /**
41
- * Data used for displaying alert messages.
42
- * @type {any}
43
- */
44
- alertData: any;
45
- updatedDocument: EventEmitter<DocumentModel>;
46
- /**
47
- * Holds the subscription to manage observable cleanup.
48
- * @private
49
- * @type {Subscription}
50
- */
51
- private subscription;
52
- /**
53
- * Initializes a new instance of the DocumentViewerComponent.
54
- * @param {DocumentHttpService} documentHttpService - Handle the http service.
55
- * @param {DocumentService} documentService - Handle the states.
56
- */
57
- constructor(documentHttpService: DocumentHttpService, documentService: DocumentService);
58
- /**
59
- * Fetches the alerts for the selected document.
60
- * @returns {void}
61
- */
62
- ngOnChanges(): void;
63
- handleSelectedDocument(document: DocumentModel): void;
64
- /**
65
- * Determines if the given content type is an image.
66
- * @param {string | undefined} contentType - The MIME type of the content.
67
- * @returns {boolean} `true` if the content type is an image; otherwise, `false`.
68
- */
69
- isImage(contentType?: string): boolean;
70
- ngOnDestroy(): void;
71
- static ɵfac: i0.ɵɵFactoryDeclaration<DocumentViewerComponent, never>;
72
- static ɵcmp: i0.ɵɵComponentDeclaration<DocumentViewerComponent, "document-viewer", never, { "selectedDocument": { "alias": "selectedDocument"; "required": false; }; "documentList": { "alias": "documentList"; "required": false; }; }, { "updatedDocument": "updatedDocument"; }, never, ["[action-launcher]", "*"], false, never>;
73
- }
@@ -1,29 +0,0 @@
1
- import { DocumentModel } from '../../models/document.model';
2
- import { FolderBlockModel } from '../../models/folder.model';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * The `FolderContainerComponent` is responsible for rendering a container
6
- * that displays a list of documents and associated folder panel data.
7
- *
8
- * This component utilizes the `FOLDERPANEL` constant for folder panel data
9
- * and accepts a document list input of type `DocumentModel`.
10
- */
11
- export declare class FolderContainerComponent {
12
- /**
13
- * A list of documents passed as input to the component.
14
- * Represents the document data to be displayed in the folder container.
15
- */
16
- documentList?: DocumentModel[];
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}
25
- */
26
- contextId: string;
27
- static ɵfac: i0.ɵɵFactoryDeclaration<FolderContainerComponent, 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>;
29
- }
@@ -1,38 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import { DocumentModel } from '../../models/document.model';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Description placeholder
6
- * @class LinkedDocumentComponent
7
- * @typedef {LinkedDocumentComponent}
8
- * @implements {OnChanges}
9
- */
10
- export declare class LinkedDocumentComponent {
11
- /**
12
- * Selected document for view.
13
- * @type {?DocumentModel}
14
- */
15
- selectedDocument?: DocumentModel;
16
- /**
17
- * Whole document list.
18
- * @type {?DocumentModel[]}
19
- */
20
- documentList?: DocumentModel[];
21
- /**
22
- * Changed selected document.
23
- * @type {*}
24
- */
25
- selectedDocumentChange: EventEmitter<DocumentModel>;
26
- /**
27
- * Filtered documents.
28
- * @type {DocumentModel[]}
29
- */
30
- filteredDocuments: DocumentModel[];
31
- /**
32
- * Handle the click on the document.
33
- * @param {DocumentModel} document - Clicked document.
34
- */
35
- handleDocumentClick(document: DocumentModel): void;
36
- static ɵfac: i0.ɵɵFactoryDeclaration<LinkedDocumentComponent, never>;
37
- static ɵcmp: i0.ɵɵComponentDeclaration<LinkedDocumentComponent, "app-linked-document", never, { "selectedDocument": { "alias": "selectedDocument"; "required": false; }; "documentList": { "alias": "documentList"; "required": false; }; }, { "selectedDocumentChange": "selectedDocumentChange"; }, never, never, false, never>;
38
- }
@@ -1,20 +0,0 @@
1
- import { TemplateRef, ViewContainerRef } from "@angular/core";
2
- import { DocumentService } from "../services/document.service";
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Directive to display the document data
6
- */
7
- export declare class DocumentDirective {
8
- private documentService;
9
- private templateRef;
10
- private vcr;
11
- /**
12
- * Creates an instance of DocumentDirective.
13
- * @param documentService Service to get the document data.
14
- * @param templateRef Reference to the template.
15
- * @param vcr View container reference to manage the view.
16
- */
17
- constructor(documentService: DocumentService, templateRef: TemplateRef<any>, vcr: ViewContainerRef);
18
- static ɵfac: i0.ɵɵFactoryDeclaration<DocumentDirective, never>;
19
- static ɵdir: i0.ɵɵDirectiveDeclaration<DocumentDirective, "[doc]", never, {}, {}, never, never, false, never>;
20
- }
@@ -1,38 +0,0 @@
1
- import { ElementRef, Renderer2, SimpleChanges, OnChanges } from '@angular/core';
2
- import { SessionService } from '../../../Shared/services/session.service';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Directive to conditionally show or hide elements based on user permissions.
6
- * @class HasPermissionDirective
7
- * @typedef {HasPermissionDirective}
8
- */
9
- export declare class HasPermissionDirective implements OnChanges {
10
- private el;
11
- private renderer;
12
- sessionService: SessionService;
13
- /**
14
- * The required permission(s) to display the element.
15
- * Accepts a single string or an array of strings.
16
- * @type {string | string[]}
17
- */
18
- permission?: string | string[];
19
- /**
20
- * Creates an instance of HasPermissionDirective.
21
- * @param {ElementRef} el - Reference to the host element.
22
- * @param {Renderer2} renderer - Angular Renderer for DOM manipulation.
23
- * @param {SessionService} sessionService - Service to retrieve user permissions.
24
- */
25
- constructor(el: ElementRef, renderer: Renderer2, sessionService: SessionService);
26
- /**
27
- * Lifecycle hook that is called when input properties change.
28
- * @param {SimpleChanges} changes - The changes in input properties.
29
- */
30
- ngOnChanges(changes: SimpleChanges): void;
31
- /**
32
- * Checks if the user has the required permission(s).
33
- * Hides the element if the permission is not found.
34
- */
35
- private checkPermission;
36
- static ɵfac: i0.ɵɵFactoryDeclaration<HasPermissionDirective, never>;
37
- static ɵdir: i0.ɵɵDirectiveDeclaration<HasPermissionDirective, "[permission]", never, { "permission": { "alias": "permission"; "required": false; }; }, {}, never, never, false, never>;
38
- }
@@ -1,40 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./components/document-container/document-container.component";
3
- import * as i2 from "./components/folder-container/folder-container.component";
4
- import * as i3 from "./components/folder-block/folder-block.component";
5
- import * as i4 from "./components/document-list/document-list.component";
6
- import * as i5 from "./components/document-list-item/document-list-item.component";
7
- import * as i6 from "./components/document-upload/document-upload.component";
8
- import * as i7 from "./components/document-viewer/document-viewer.component";
9
- import * as i8 from "./directives/document.directive";
10
- import * as i9 from "./directives/permission.directive";
11
- import * as i10 from "./components/linked-document/linked-document.component";
12
- import * as i11 from "@angular/common";
13
- import * as i12 from "primeng/accordion";
14
- import * as i13 from "@angular/common/http";
15
- import * as i14 from "primeng/button";
16
- import * as i15 from "primeng/sidebar";
17
- import * as i16 from "primeng/fileupload";
18
- import * as i17 from "primeng/progressbar";
19
- import * as i18 from "primeng/badge";
20
- import * as i19 from "primeng/listbox";
21
- import * as i20 from "primeng/checkbox";
22
- import * as i21 from "primeng/timeline";
23
- import * as i22 from "primeng/inputtextarea";
24
- import * as i23 from "@angular/forms";
25
- import * as i24 from "ng2-pdf-viewer";
26
- import * as i25 from "primeng/dialog";
27
- import * as i26 from "primeng/dropdown";
28
- import * as i27 from "primeng/inputtext";
29
- /**
30
- * @module DocumentModule
31
- *
32
- * The `DocumentModule` handles the organization and display of document and folder components
33
- * in the application. This module is designed to support features like folder containers,
34
- * document lists, and individual document items.
35
- */
36
- export declare class DocumentModule {
37
- static ɵfac: i0.ɵɵFactoryDeclaration<DocumentModule, never>;
38
- 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.CommonModule, typeof i12.AccordionModule, typeof i13.HttpClientModule, typeof i14.ButtonModule, typeof i15.SidebarModule, typeof i16.FileUploadModule, typeof i17.ProgressBarModule, typeof i18.BadgeModule, typeof i19.ListboxModule, typeof i20.CheckboxModule, typeof i21.TimelineModule, typeof i22.InputTextareaModule, typeof i23.FormsModule, typeof i24.PdfViewerModule, typeof i25.DialogModule, typeof i26.DropdownModule, typeof i27.InputTextModule], [typeof i9.HasPermissionDirective, typeof i1.DocumentContainerComponent, typeof i7.DocumentViewerComponent, typeof i4.DocumentListComponent, typeof i8.DocumentDirective]>;
39
- static ɵinj: i0.ɵɵInjectorDeclaration<DocumentModule>;
40
- }
@@ -1,37 +0,0 @@
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
- }
@@ -1,44 +0,0 @@
1
- /**
2
- * Represents a document model.
3
- *
4
- * This class contains the structure for document-related data, including file name,
5
- * status, and document URL.
6
- */
7
- export declare class DocumentModel {
8
- /**
9
- * The unique identifier for the document.
10
- * @type {string}
11
- */
12
- _id: string;
13
- /**
14
- * The name of the document file.
15
- * @type {?string}
16
- */
17
- fileName?: string;
18
- /**
19
- * The current status of the document.
20
- * @type {?string}
21
- */
22
- status?: string;
23
- /**
24
- * The URL where the document is hosted or stored.
25
- * @type {?string}
26
- */
27
- documentUrl?: string;
28
- /**
29
- * Date of document get uploaded
30
- * @type {?Date}
31
- */
32
- createdAt?: Date;
33
- /**
34
- * Shows the type of document
35
- * @type {?string}
36
- */
37
- documentTypeName?: string;
38
- /**
39
- * Shows the type of content
40
- * @type {?string}
41
- */
42
- contentType?: string;
43
- documentName?: string;
44
- }