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
|
@@ -2,40 +2,46 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Injectable, Component, Input, EventEmitter, Output, ViewEncapsulation, ViewChild, Directive, APP_INITIALIZER, NgModule } from '@angular/core';
|
|
3
3
|
import * as i5 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { firstValueFrom, tap, EMPTY, catchError, throwError, BehaviorSubject,
|
|
5
|
+
import { firstValueFrom, tap, EMPTY, catchError, throwError, BehaviorSubject, Subscription } from 'rxjs';
|
|
6
6
|
import { __decorate } from 'tslib';
|
|
7
7
|
import { EntityStore, StoreConfig, QueryEntity } from '@datorama/akita';
|
|
8
8
|
import * as i2 from '@angular/common/http';
|
|
9
9
|
import { HttpClientModule } from '@angular/common/http';
|
|
10
10
|
import * as i3 from 'primeng/api';
|
|
11
11
|
import { MessageService } from 'primeng/api';
|
|
12
|
-
import * as
|
|
13
|
-
import * as i7$1 from 'primeng/accordion';
|
|
12
|
+
import * as i5$1 from 'primeng/accordion';
|
|
14
13
|
import { AccordionModule } from 'primeng/accordion';
|
|
15
|
-
import * as
|
|
14
|
+
import * as i7 from 'primeng/button';
|
|
16
15
|
import { ButtonModule } from 'primeng/button';
|
|
17
|
-
import * as
|
|
16
|
+
import * as i8$1 from 'primeng/sidebar';
|
|
18
17
|
import { SidebarModule } from 'primeng/sidebar';
|
|
19
|
-
import * as
|
|
20
|
-
import * as
|
|
18
|
+
import * as i9 from 'primeng/messages';
|
|
19
|
+
import * as i10 from '@angular/forms';
|
|
21
20
|
import { FormsModule } from '@angular/forms';
|
|
22
|
-
import * as
|
|
21
|
+
import * as i11 from 'primeng/dialog';
|
|
23
22
|
import { DialogModule } from 'primeng/dialog';
|
|
24
|
-
import * as
|
|
23
|
+
import * as i12 from 'primeng/dropdown';
|
|
25
24
|
import { DropdownModule } from 'primeng/dropdown';
|
|
26
|
-
import * as
|
|
25
|
+
import * as i13 from 'primeng/inputtext';
|
|
27
26
|
import { InputTextModule } from 'primeng/inputtext';
|
|
28
|
-
import * as i7 from 'primeng/fileupload';
|
|
27
|
+
import * as i7$1 from 'primeng/fileupload';
|
|
29
28
|
import { FileUploadModule } from 'primeng/fileupload';
|
|
30
29
|
import * as i8 from 'primeng/progressbar';
|
|
31
30
|
import { ProgressBarModule } from 'primeng/progressbar';
|
|
32
31
|
import * as i4 from 'ng2-pdf-viewer';
|
|
33
32
|
import { PdfViewerModule } from 'ng2-pdf-viewer';
|
|
33
|
+
import * as i1 from '@angular/router';
|
|
34
|
+
import * as i3$1 from 'primeng/badge';
|
|
34
35
|
import { BadgeModule } from 'primeng/badge';
|
|
36
|
+
import * as i4$1 from 'primeng/menu';
|
|
37
|
+
import { MenuModule } from 'primeng/menu';
|
|
38
|
+
import * as i5$2 from 'primeng/card';
|
|
39
|
+
import { CardModule } from 'primeng/card';
|
|
35
40
|
import { ListboxModule } from 'primeng/listbox';
|
|
36
41
|
import { TimelineModule } from 'primeng/timeline';
|
|
37
42
|
import { CheckboxModule } from 'primeng/checkbox';
|
|
38
43
|
import { InputTextareaModule } from 'primeng/inputtextarea';
|
|
44
|
+
import { PanelMenuModule } from 'primeng/panelmenu';
|
|
39
45
|
|
|
40
46
|
/**
|
|
41
47
|
* The `SHARED` class contains shared constants used across the application.
|
|
@@ -180,12 +186,98 @@ class SHARED {
|
|
|
180
186
|
* @type {string}
|
|
181
187
|
*/
|
|
182
188
|
static UPDATE_DOCUMENT_NAME = 'Document name updated for ID:';
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
+
static Menu = [
|
|
190
|
+
{
|
|
191
|
+
label: 'Applicant',
|
|
192
|
+
// expanded: true,
|
|
193
|
+
// disabled: true,
|
|
194
|
+
// separator: true,
|
|
195
|
+
items: [
|
|
196
|
+
{
|
|
197
|
+
label: 'Identity',
|
|
198
|
+
icon: 'ri-id-card-line',
|
|
199
|
+
badge: "2/5"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
label: 'Income',
|
|
203
|
+
icon: 'ri-money-pound-circle-line',
|
|
204
|
+
badge: "2/5"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
label: 'Affordability',
|
|
208
|
+
icon: 'ri-calculator-line',
|
|
209
|
+
badge: "2/8"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
label: 'Cradit conduct',
|
|
213
|
+
icon: 'ri-calendar-event-fill',
|
|
214
|
+
badge: "2/4"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
label: 'KYC',
|
|
218
|
+
icon: 'ri-calendar-event-fill',
|
|
219
|
+
badge: "2/4"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
badge: "2/4",
|
|
223
|
+
label: 'Welcome Call',
|
|
224
|
+
icon: 'ri-calendar-event-fill'
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
label: 'Gatehouse Bank Exposure',
|
|
228
|
+
badge: "2/4",
|
|
229
|
+
icon: 'ri-calendar-event-fill'
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
label: 'Application',
|
|
235
|
+
// expanded: true,
|
|
236
|
+
// disabled: true,
|
|
237
|
+
// separator: true,
|
|
238
|
+
items: [
|
|
239
|
+
{
|
|
240
|
+
badge: "2/4",
|
|
241
|
+
label: 'Deposit',
|
|
242
|
+
icon: 'ri-mail-open-line'
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
badge: "2/4",
|
|
246
|
+
label: 'Direct Debit',
|
|
247
|
+
icon: 'ri-mail-open-line'
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
label: 'Property',
|
|
251
|
+
icon: 'ri-mail-open-line'
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
badge: "2/4",
|
|
255
|
+
label: 'Completions',
|
|
256
|
+
icon: 'ri-mail-open-line'
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
badge: "2/4",
|
|
260
|
+
label: 'Summary',
|
|
261
|
+
icon: 'ri-mail-open-line'
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
badge: "2/4",
|
|
265
|
+
label: 'System Documents',
|
|
266
|
+
icon: 'ri-mail-open-line'
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
badge: "2/4",
|
|
270
|
+
label: 'Ad Hoc',
|
|
271
|
+
icon: 'ri-mail-open-line'
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
badge: "2/4",
|
|
275
|
+
label: 'Miscellaneous',
|
|
276
|
+
icon: 'ri-mail-open-line'
|
|
277
|
+
}
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
];
|
|
189
281
|
}
|
|
190
282
|
/**
|
|
191
283
|
* `DUMMYDOCUMENTLIST` is a mock list of document objects used for testing and development purposes.
|
|
@@ -362,13 +454,6 @@ class ERRORS {
|
|
|
362
454
|
* @type {string}
|
|
363
455
|
*/
|
|
364
456
|
static ERROR_DOCUMENT_TYPES = "Error fetching document types:";
|
|
365
|
-
/**
|
|
366
|
-
* Error message when the file name contains invalid characters.
|
|
367
|
-
* Disallowed characters: <, >, :, ", /, \, |, ?, *
|
|
368
|
-
* @static
|
|
369
|
-
* @type {string}
|
|
370
|
-
*/
|
|
371
|
-
static ERROR_INVALID_FILENAME_CHARACTERS = 'File name contains invalid characters: <, >, :, ", /, \\, |, ?, *';
|
|
372
457
|
}
|
|
373
458
|
|
|
374
459
|
/**
|
|
@@ -389,9 +474,7 @@ function createInitialState() {
|
|
|
389
474
|
documentAlert: { _id: '' },
|
|
390
475
|
folders: [],
|
|
391
476
|
messages: [],
|
|
392
|
-
documentList: []
|
|
393
|
-
selectedDocument: '',
|
|
394
|
-
isDocumentUpdated: null
|
|
477
|
+
documentList: []
|
|
395
478
|
};
|
|
396
479
|
}
|
|
397
480
|
|
|
@@ -430,12 +513,6 @@ let DocumentStore = class DocumentStore extends EntityStore {
|
|
|
430
513
|
setDocumentList(documents) {
|
|
431
514
|
this.update({ documents: documents });
|
|
432
515
|
}
|
|
433
|
-
setSelectedDocument(selectedDocument) {
|
|
434
|
-
this.update({ selectedDocument: selectedDocument });
|
|
435
|
-
}
|
|
436
|
-
setIsDocumentUpdated(isDocumentUpdated) {
|
|
437
|
-
this.update({ isDocumentUpdated: isDocumentUpdated });
|
|
438
|
-
}
|
|
439
516
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
440
517
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentStore, providedIn: 'root' });
|
|
441
518
|
};
|
|
@@ -492,7 +569,7 @@ class URLS {
|
|
|
492
569
|
* @static
|
|
493
570
|
* @type {string}
|
|
494
571
|
*/
|
|
495
|
-
static ALERT_BY_DOCUMENT_ID = "
|
|
572
|
+
static ALERT_BY_DOCUMENT_ID = "alerts?documentId=";
|
|
496
573
|
/**
|
|
497
574
|
* The query parameter to pass a document ID in API requests.
|
|
498
575
|
* @static
|
|
@@ -699,20 +776,6 @@ class DocumentQuery extends QueryEntity {
|
|
|
699
776
|
selectDocumets() {
|
|
700
777
|
return this.select((state) => state.documentList);
|
|
701
778
|
}
|
|
702
|
-
/**
|
|
703
|
-
* Retrieves the currently selected document from the store state.
|
|
704
|
-
* @returns {Observable<any>} Observable that emits the selected document.
|
|
705
|
-
*/
|
|
706
|
-
getSelectedDocument() {
|
|
707
|
-
return this.select((state) => state['selectedDocument']);
|
|
708
|
-
}
|
|
709
|
-
/**
|
|
710
|
-
* Retrieves the flag indicating whether a document has been updated.
|
|
711
|
-
* @returns {Observable<any>} Observable that emits a boolean or status flag.
|
|
712
|
-
*/
|
|
713
|
-
getIsDocumentUpdated() {
|
|
714
|
-
return this.select((state) => state['isDocumentUpdated']);
|
|
715
|
-
}
|
|
716
779
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentQuery, deps: [{ token: DocumentStore }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
717
780
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentQuery, providedIn: 'root' });
|
|
718
781
|
}
|
|
@@ -912,6 +975,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
912
975
|
|
|
913
976
|
/**
|
|
914
977
|
* Storing all permission properties.
|
|
978
|
+
* @export
|
|
915
979
|
* @class PERMISSIONS
|
|
916
980
|
* @typedef {PERMISSIONS}
|
|
917
981
|
*/
|
|
@@ -922,12 +986,6 @@ class PERMISSIONS {
|
|
|
922
986
|
* @type {string}
|
|
923
987
|
*/
|
|
924
988
|
static DOCUMENT_POST = 'Documents-POST';
|
|
925
|
-
/**
|
|
926
|
-
* Access permission for updating existing documents.
|
|
927
|
-
* @static
|
|
928
|
-
* @type {string}
|
|
929
|
-
*/
|
|
930
|
-
static DOCUMENT_PUT = 'Documents-PUT';
|
|
931
989
|
}
|
|
932
990
|
|
|
933
991
|
/**
|
|
@@ -1053,80 +1111,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
1053
1111
|
}]
|
|
1054
1112
|
}], ctorParameters: () => [{ type: DocumentService$1 }, { type: DocumentStore }, { type: i3.MessageService }] });
|
|
1055
1113
|
|
|
1056
|
-
/**
|
|
1057
|
-
* Service for managing user session details.
|
|
1058
|
-
* @class SessionService
|
|
1059
|
-
* @typedef {SessionService}
|
|
1060
|
-
*/
|
|
1061
|
-
class SessionService {
|
|
1062
|
-
router;
|
|
1063
|
-
/**
|
|
1064
|
-
* Creates an instance of SessionService.
|
|
1065
|
-
* @param {Router} router - Angular Router for navigation.
|
|
1066
|
-
*/
|
|
1067
|
-
constructor(router) {
|
|
1068
|
-
this.router = router;
|
|
1069
|
-
}
|
|
1070
|
-
/**
|
|
1071
|
-
* Retrieves the current user's role from local storage.
|
|
1072
|
-
* @returns {string | null} The user's role, or null if not found.
|
|
1073
|
-
*/
|
|
1074
|
-
getUserRole() {
|
|
1075
|
-
return localStorage.getItem('role');
|
|
1076
|
-
}
|
|
1077
|
-
/**
|
|
1078
|
-
* Stores the user session data in local storage.
|
|
1079
|
-
* @param {any} data - The session data to store.
|
|
1080
|
-
*/
|
|
1081
|
-
setUserSession(data) {
|
|
1082
|
-
localStorage.setItem(SHARED.SESSIONKEY, JSON.stringify(data));
|
|
1083
|
-
}
|
|
1084
|
-
/**
|
|
1085
|
-
* Retrieves the stored user session data.
|
|
1086
|
-
* @returns {any | null} The parsed session data, or null if not found.
|
|
1087
|
-
*/
|
|
1088
|
-
getUserSession() {
|
|
1089
|
-
const sessionData = localStorage.getItem(SHARED.SESSIONKEY);
|
|
1090
|
-
return sessionData ? JSON.parse(sessionData) : null;
|
|
1091
|
-
}
|
|
1092
|
-
/**
|
|
1093
|
-
* Retrieves the user's permissions from the stored session data.
|
|
1094
|
-
* @returns {any | null} The user's permissions, or null if not found.
|
|
1095
|
-
*/
|
|
1096
|
-
getUserPermissions() {
|
|
1097
|
-
const sessionData = localStorage.getItem(SHARED.SESSIONKEY);
|
|
1098
|
-
return sessionData ? JSON.parse(sessionData).permissions : null;
|
|
1099
|
-
}
|
|
1100
|
-
/**
|
|
1101
|
-
* Retrieves the session ID from the stored session data.
|
|
1102
|
-
* @returns {any | null} The session ID, or null if not found.
|
|
1103
|
-
*/
|
|
1104
|
-
getSessionID() {
|
|
1105
|
-
const sessionData = localStorage.getItem(SHARED.SESSIONKEY);
|
|
1106
|
-
console.log(sessionData);
|
|
1107
|
-
if (sessionData) {
|
|
1108
|
-
const sessionId = JSON.parse(sessionData);
|
|
1109
|
-
console.log(sessionId);
|
|
1110
|
-
return sessionId;
|
|
1111
|
-
}
|
|
1112
|
-
return null;
|
|
1113
|
-
}
|
|
1114
|
-
/**
|
|
1115
|
-
* Clears all stored session data from local storage.
|
|
1116
|
-
*/
|
|
1117
|
-
clearSession() {
|
|
1118
|
-
localStorage.clear();
|
|
1119
|
-
}
|
|
1120
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SessionService, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1121
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SessionService, providedIn: 'root' });
|
|
1122
|
-
}
|
|
1123
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SessionService, decorators: [{
|
|
1124
|
-
type: Injectable,
|
|
1125
|
-
args: [{
|
|
1126
|
-
providedIn: 'root'
|
|
1127
|
-
}]
|
|
1128
|
-
}], ctorParameters: () => [{ type: i1.Router }] });
|
|
1129
|
-
|
|
1130
1114
|
/**
|
|
1131
1115
|
* DocumentListItemComponent
|
|
1132
1116
|
*
|
|
@@ -1156,11 +1140,11 @@ class DocumentListItemComponent {
|
|
|
1156
1140
|
this.documentClick.emit(document);
|
|
1157
1141
|
}
|
|
1158
1142
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1159
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DocumentListItemComponent, isStandalone: false, selector: "lib-document-list-item", inputs: { document: "document" }, outputs: { documentClick: "documentClick" }, ngImport: i0, template: "<div class=\"grid m-0\">\r\n <div\r\n class=\"col-12 flex align-items-center justify-content-between md:col-12 xl:col-12\"\r\n >\r\n <div\r\n class=\"col-5 flex cursor-pointer align-items-center pl-0\"\r\n (click)=\"handleOpenDocument(document)\"\r\n >\r\n <img src=\"../../../../assets/images/Frame.png\" alt=\"\" />\r\n <span class=\"ml-4 file-name-wrapper document-text-wrapper\">{{ document.
|
|
1143
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DocumentListItemComponent, isStandalone: false, selector: "lib-document-list-item", inputs: { document: "document" }, outputs: { documentClick: "documentClick" }, ngImport: i0, template: "<div class=\"grid m-0\">\r\n <div\r\n class=\"col-12 flex align-items-center justify-content-between md:col-12 xl:col-12\"\r\n >\r\n <div\r\n class=\"col-5 flex cursor-pointer align-items-center pl-0\"\r\n (click)=\"handleOpenDocument(document)\"\r\n >\r\n <img src=\"../../../../assets/images/Frame.png\" alt=\"\" />\r\n <span class=\"ml-4 file-name-wrapper document-text-wrapper\">{{ document.fileName }}</span>\r\n </div>\r\n <div class=\"col-4 flex align-items-center justify-content-center\">\r\n <span\r\n [class]=\"'product-badge status-' + document.status?.toLowerCase()\"\r\n class=\"flex align-items-center justify-content-center pl-2 pr-2 pt-1 pb-1\"\r\n >\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'pending'\">\r\n <i class=\"pi pi-clock pr-1\" style=\"font-size: 12px;\"></i>\r\n Pending\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'verified'\">\r\n <i class=\"pi pi-check-circle pr-1\" style=\"font-size: 12px;\"></i>\r\n Verified\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'alert'\">\r\n <i class=\"pi pi-bell pr-1\" style=\"font-size: 12px;\"></i>\r\n Alert\r\n </ng-container>\r\n </span>\r\n </div>\r\n <div class=\"document-type file-name-wrapper document-text-wrapper\">\r\n {{document.documentTypeName}}\r\n </div>\r\n </div>\r\n </div>\r\n ", styles: [".product-badge.status-pending{background:#e9b127;color:#fff;border-radius:4px}.product-badge.status-verified{background:#4caf50;color:#fff;border-radius:4px}.product-badge.status-alert{background:#f57c00;color:#fff;border-radius:4px}.product-badge{text-transform:none;font-weight:500;font-size:12px}.file-name-wrapper{font-size:15px;font-weight:500}.document-text-wrapper{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1160
1144
|
}
|
|
1161
1145
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentListItemComponent, decorators: [{
|
|
1162
1146
|
type: Component,
|
|
1163
|
-
args: [{ selector: 'lib-document-list-item', standalone: false, template: "<div class=\"grid m-0\">\r\n <div\r\n class=\"col-12 flex align-items-center justify-content-between md:col-12 xl:col-12\"\r\n >\r\n <div\r\n class=\"col-5 flex cursor-pointer align-items-center pl-0\"\r\n (click)=\"handleOpenDocument(document)\"\r\n >\r\n <img src=\"../../../../assets/images/Frame.png\" alt=\"\" />\r\n <span class=\"ml-4 file-name-wrapper document-text-wrapper\">{{ document.
|
|
1147
|
+
args: [{ selector: 'lib-document-list-item', standalone: false, template: "<div class=\"grid m-0\">\r\n <div\r\n class=\"col-12 flex align-items-center justify-content-between md:col-12 xl:col-12\"\r\n >\r\n <div\r\n class=\"col-5 flex cursor-pointer align-items-center pl-0\"\r\n (click)=\"handleOpenDocument(document)\"\r\n >\r\n <img src=\"../../../../assets/images/Frame.png\" alt=\"\" />\r\n <span class=\"ml-4 file-name-wrapper document-text-wrapper\">{{ document.fileName }}</span>\r\n </div>\r\n <div class=\"col-4 flex align-items-center justify-content-center\">\r\n <span\r\n [class]=\"'product-badge status-' + document.status?.toLowerCase()\"\r\n class=\"flex align-items-center justify-content-center pl-2 pr-2 pt-1 pb-1\"\r\n >\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'pending'\">\r\n <i class=\"pi pi-clock pr-1\" style=\"font-size: 12px;\"></i>\r\n Pending\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'verified'\">\r\n <i class=\"pi pi-check-circle pr-1\" style=\"font-size: 12px;\"></i>\r\n Verified\r\n </ng-container>\r\n <ng-container *ngIf=\"document.status?.toLowerCase() === 'alert'\">\r\n <i class=\"pi pi-bell pr-1\" style=\"font-size: 12px;\"></i>\r\n Alert\r\n </ng-container>\r\n </span>\r\n </div>\r\n <div class=\"document-type file-name-wrapper document-text-wrapper\">\r\n {{document.documentTypeName}}\r\n </div>\r\n </div>\r\n </div>\r\n ", styles: [".product-badge.status-pending{background:#e9b127;color:#fff;border-radius:4px}.product-badge.status-verified{background:#4caf50;color:#fff;border-radius:4px}.product-badge.status-alert{background:#f57c00;color:#fff;border-radius:4px}.product-badge{text-transform:none;font-weight:500;font-size:12px}.file-name-wrapper{font-size:15px;font-weight:500}.document-text-wrapper{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}\n"] }]
|
|
1164
1148
|
}], propDecorators: { documentClick: [{
|
|
1165
1149
|
type: Output
|
|
1166
1150
|
}], document: [{
|
|
@@ -1350,7 +1334,7 @@ class DocumentUploadComponent {
|
|
|
1350
1334
|
this.fileUploader.choose();
|
|
1351
1335
|
}
|
|
1352
1336
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentUploadComponent, deps: [{ token: DocumentUploadService }, { token: DocumentService$1 }, { token: i3.PrimeNGConfig }, { token: FileFormatService }, { token: i3.MessageService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1353
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DocumentUploadComponent, isStandalone: false, selector: "lib-document-upload", inputs: { contextId: "contextId" }, viewQueries: [{ propertyName: "fileUploader", first: true, predicate: ["fileUploader"], descendants: true }], ngImport: i0, template: "<div class=\"grid\">\r\n <div class=\"col-12 md:col-12\">\r\n <p-fileUpload #fileUploader [multiple]=\"true\" auto=\"true\" accept=\"image/png,application/pdf\" maxFileSize=\"26214400\"\r\n (onSelect)=\"onSelectedFiles($event)\">\r\n <ng-template pTemplate=\"header\" let-chooseCallback=\"chooseCallback\" let-clearCallback=\"clearCallback\">\r\n <div class=\"docHeader p-2 flex flex-wrap justify-content-between align-items-center flex-1 gap-2\">\r\n <div class=\"flex gap-2\">\r\n <p-button (onClick)=\"choose($event, chooseCallback)\" icon=\"pi pi-images\" [rounded]=\"true\"\r\n [outlined]=\"true\" />\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"content\" let-removeFileCallback=\"removeFileCallback\"\r\n let-removeUploadedFileCallback=\"removeUploadedFileCallback\">\r\n <div class=\"col-12 md:col-12 p-0\">\r\n <div class=\"col-12 md:col-12 p-0\" *ngIf=\"uploadedFiles.length > 0\">\r\n <div *ngFor=\"let uploadedFile of uploadedFiles; let i = index\"\r\n class=\"m-0 flex flex-column align-items-center gap-1 mt-3\">\r\n <div class=\"col-12 md:col-12 p-0 flex documentInfo\">\r\n <div class=\"documentImage\">\r\n <img src=\"../../../../assets/images/document.png\" [alt]=\"uploadedFile.file.name\" width=\"45\" height=\"50\"\r\n class=\"object-contain\" />\r\n </div>\r\n <div class=\"flex w-full flex-column mt-2 ml-2\">\r\n <div class=\"flex justify-content-between\">\r\n <div style=\" font-weight: bold;font-size: 14px\">\r\n {{ uploadedFile.file.name }}\r\n </div>\r\n <i class=\"pi pi-times cursor-pointer\" (click)=\"handleDocumentRemove(uploadedFile.file,i)\"></i>\r\n </div>\r\n <div class=\"flex justify-content-between mt-1\">\r\n <div style=\"color: #676B89; font-size: 12px; color: green;\" class=\"pi pi-verified \"> {{ uploadedFile.formattedSize }}</div>\r\n <div class=\"white-space-nowrap\" style=\"color: #0F8BFD; font-family: 14px;\"> {{ uploadedFile.progress }} %</div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-12 p-0\">\r\n <p-progressBar [value]=\"totalSizePercent\" [showValue]=\"false\" styleClass=\"h-1/2rem md:ml-auto relative\"\r\n [ngClass]=\"{ 'exceeded-progress-bar': totalSizePercent > 100 }\">\r\n </p-progressBar>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"empty\" let-chooseCallback=\"chooseCallback\">\r\n <div *ngIf=\"!uploadedFiles.length\" class=\"flex align-items-center justify-content-center flex-column\"\r\n (click)=\"triggerFileUpload()\">\r\n <i class=\"pi pi-cloud-upload border-2 border-circle p-5 text-8xl text-400 border-400\"></i>\r\n <p class=\"mt-4 mb-0\">Drag and drop files here to upload.</p>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"file\"> </ng-template>\r\n </p-fileUpload>\r\n </div>\r\n</div>", styles: [".flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.flex-col{flex-direction:column}.text-muted-color{color:#6c757d}.p-fileupload-buttonbar{padding:0}.p-fileupload-content{background-color:#0f8bfd1a}.p-fileupload .p-fileupload-content{padding:1rem}.docHeader .p-button-icon{padding:.5rem}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type:
|
|
1337
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DocumentUploadComponent, isStandalone: false, selector: "lib-document-upload", inputs: { contextId: "contextId" }, viewQueries: [{ propertyName: "fileUploader", first: true, predicate: ["fileUploader"], descendants: true }], ngImport: i0, template: "<div class=\"grid\">\r\n <div class=\"col-12 md:col-12\">\r\n <p-fileUpload #fileUploader [multiple]=\"true\" auto=\"true\" accept=\"image/png,application/pdf\" maxFileSize=\"26214400\"\r\n (onSelect)=\"onSelectedFiles($event)\">\r\n <ng-template pTemplate=\"header\" let-chooseCallback=\"chooseCallback\" let-clearCallback=\"clearCallback\">\r\n <div class=\"docHeader p-2 flex flex-wrap justify-content-between align-items-center flex-1 gap-2\">\r\n <div class=\"flex gap-2\">\r\n <p-button (onClick)=\"choose($event, chooseCallback)\" icon=\"pi pi-images\" [rounded]=\"true\"\r\n [outlined]=\"true\" />\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"content\" let-removeFileCallback=\"removeFileCallback\"\r\n let-removeUploadedFileCallback=\"removeUploadedFileCallback\">\r\n <div class=\"col-12 md:col-12 p-0\">\r\n <div class=\"col-12 md:col-12 p-0\" *ngIf=\"uploadedFiles.length > 0\">\r\n <div *ngFor=\"let uploadedFile of uploadedFiles; let i = index\"\r\n class=\"m-0 flex flex-column align-items-center gap-1 mt-3\">\r\n <div class=\"col-12 md:col-12 p-0 flex documentInfo\">\r\n <div class=\"documentImage\">\r\n <img src=\"../../../../assets/images/document.png\" [alt]=\"uploadedFile.file.name\" width=\"45\" height=\"50\"\r\n class=\"object-contain\" />\r\n </div>\r\n <div class=\"flex w-full flex-column mt-2 ml-2\">\r\n <div class=\"flex justify-content-between\">\r\n <div style=\" font-weight: bold;font-size: 14px\">\r\n {{ uploadedFile.file.name }}\r\n </div>\r\n <i class=\"pi pi-times cursor-pointer\" (click)=\"handleDocumentRemove(uploadedFile.file,i)\"></i>\r\n </div>\r\n <div class=\"flex justify-content-between mt-1\">\r\n <div style=\"color: #676B89; font-size: 12px; color: green;\" class=\"pi pi-verified \"> {{ uploadedFile.formattedSize }}</div>\r\n <div class=\"white-space-nowrap\" style=\"color: #0F8BFD; font-family: 14px;\"> {{ uploadedFile.progress }} %</div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-12 p-0\">\r\n <p-progressBar [value]=\"totalSizePercent\" [showValue]=\"false\" styleClass=\"h-1/2rem md:ml-auto relative\"\r\n [ngClass]=\"{ 'exceeded-progress-bar': totalSizePercent > 100 }\">\r\n </p-progressBar>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"empty\" let-chooseCallback=\"chooseCallback\">\r\n <div *ngIf=\"!uploadedFiles.length\" class=\"flex align-items-center justify-content-center flex-column\"\r\n (click)=\"triggerFileUpload()\">\r\n <i class=\"pi pi-cloud-upload border-2 border-circle p-5 text-8xl text-400 border-400\"></i>\r\n <p class=\"mt-4 mb-0\">Drag and drop files here to upload.</p>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"file\"> </ng-template>\r\n </p-fileUpload>\r\n </div>\r\n</div>", styles: [".flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.flex-col{flex-direction:column}.text-muted-color{color:#6c757d}.p-fileupload-buttonbar{padding:0}.p-fileupload-content{background-color:#0f8bfd1a}.p-fileupload .p-fileupload-content{padding:1rem}.docHeader .p-button-icon{padding:.5rem}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i7.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i7$1.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "component", type: i8.ProgressBar, selector: "p-progressBar", inputs: ["value", "showValue", "styleClass", "style", "unit", "mode", "color"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1354
1338
|
}
|
|
1355
1339
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentUploadComponent, decorators: [{
|
|
1356
1340
|
type: Component,
|
|
@@ -1427,11 +1411,11 @@ class LinkedDocumentComponent {
|
|
|
1427
1411
|
this.selectedDocumentChange.emit(this.selectedDocument);
|
|
1428
1412
|
}
|
|
1429
1413
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: LinkedDocumentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1430
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: LinkedDocumentComponent, isStandalone: false, selector: "app-linked-document", inputs: { selectedDocument: "selectedDocument", documentList: "documentList" }, outputs: { selectedDocumentChange: "selectedDocumentChange" }, ngImport: i0, template: "<div class=\"summary-card mb-4 pb-1\">\r\n <div class=\"card p-0 mb-0\"\r\n style=\"border-bottom: 1px solid;border-color: rgba(68, 72, 109, 0.2); border-bottom-right-radius: 0px;border-bottom-left-radius: 0px; background-color: #F9fafb;\">\r\n <div class=\"p-0\">\r\n <h4 class=\"m-0 pt-3 pl-3 mb-3\" style=\"font-size: 21px; font-weight: bold; \">Linked Documents</h4>\r\n </div>\r\n </div>\r\n <div class=\"card mb-0\" style=\"border-top-right-radius: 0px;border-top-left-radius: 0px;\">\r\n @for(document of documentList; track document){\r\n <div class=\"linkedDocument documentName m-2\">\r\n <div class=\"documentName\" [class.selected]=\"document._id === selectedDocument?._id\"\r\n (click)=\"handleDocumentClick(document)\">\r\n <span class=\"pi pi-link\"></span>\r\n {{document.
|
|
1414
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: LinkedDocumentComponent, isStandalone: false, selector: "app-linked-document", inputs: { selectedDocument: "selectedDocument", documentList: "documentList" }, outputs: { selectedDocumentChange: "selectedDocumentChange" }, ngImport: i0, template: "<div class=\"summary-card mb-4 pb-1\">\r\n <div class=\"card p-0 mb-0\"\r\n style=\"border-bottom: 1px solid;border-color: rgba(68, 72, 109, 0.2); border-bottom-right-radius: 0px;border-bottom-left-radius: 0px; background-color: #F9fafb;\">\r\n <div class=\"p-0\">\r\n <h4 class=\"m-0 pt-3 pl-3 mb-3\" style=\"font-size: 21px; font-weight: bold; \">Linked Documents</h4>\r\n </div>\r\n </div>\r\n <div class=\"card mb-0\" style=\"border-top-right-radius: 0px;border-top-left-radius: 0px;\">\r\n @for(document of documentList; track document){\r\n <div class=\"linkedDocument documentName m-2\">\r\n <div class=\"documentName\" [class.selected]=\"document._id === selectedDocument?._id\"\r\n (click)=\"handleDocumentClick(document)\">\r\n <span class=\"pi pi-link\"></span>\r\n {{document.fileName}}\r\n </div>\r\n </div>\r\n }\r\n\r\n </div>\r\n \r\n \r\n </div>\r\n ", styles: [".documentName{font-family:inherit;text-decoration:underline;cursor:pointer;width:max-content}.selected{color:var(--primary-color)}\n"] });
|
|
1431
1415
|
}
|
|
1432
1416
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: LinkedDocumentComponent, decorators: [{
|
|
1433
1417
|
type: Component,
|
|
1434
|
-
args: [{ selector: 'app-linked-document', standalone: false, template: "<div class=\"summary-card mb-4 pb-1\">\r\n <div class=\"card p-0 mb-0\"\r\n style=\"border-bottom: 1px solid;border-color: rgba(68, 72, 109, 0.2); border-bottom-right-radius: 0px;border-bottom-left-radius: 0px; background-color: #F9fafb;\">\r\n <div class=\"p-0\">\r\n <h4 class=\"m-0 pt-3 pl-3 mb-3\" style=\"font-size: 21px; font-weight: bold; \">Linked Documents</h4>\r\n </div>\r\n </div>\r\n <div class=\"card mb-0\" style=\"border-top-right-radius: 0px;border-top-left-radius: 0px;\">\r\n @for(document of documentList; track document){\r\n <div class=\"linkedDocument documentName m-2\">\r\n <div class=\"documentName\" [class.selected]=\"document._id === selectedDocument?._id\"\r\n (click)=\"handleDocumentClick(document)\">\r\n <span class=\"pi pi-link\"></span>\r\n {{document.
|
|
1418
|
+
args: [{ selector: 'app-linked-document', standalone: false, template: "<div class=\"summary-card mb-4 pb-1\">\r\n <div class=\"card p-0 mb-0\"\r\n style=\"border-bottom: 1px solid;border-color: rgba(68, 72, 109, 0.2); border-bottom-right-radius: 0px;border-bottom-left-radius: 0px; background-color: #F9fafb;\">\r\n <div class=\"p-0\">\r\n <h4 class=\"m-0 pt-3 pl-3 mb-3\" style=\"font-size: 21px; font-weight: bold; \">Linked Documents</h4>\r\n </div>\r\n </div>\r\n <div class=\"card mb-0\" style=\"border-top-right-radius: 0px;border-top-left-radius: 0px;\">\r\n @for(document of documentList; track document){\r\n <div class=\"linkedDocument documentName m-2\">\r\n <div class=\"documentName\" [class.selected]=\"document._id === selectedDocument?._id\"\r\n (click)=\"handleDocumentClick(document)\">\r\n <span class=\"pi pi-link\"></span>\r\n {{document.fileName}}\r\n </div>\r\n </div>\r\n }\r\n\r\n </div>\r\n \r\n \r\n </div>\r\n ", styles: [".documentName{font-family:inherit;text-decoration:underline;cursor:pointer;width:max-content}.selected{color:var(--primary-color)}\n"] }]
|
|
1435
1419
|
}], propDecorators: { selectedDocument: [{
|
|
1436
1420
|
type: Input
|
|
1437
1421
|
}], documentList: [{
|
|
@@ -1478,12 +1462,6 @@ class DocumentViewerComponent {
|
|
|
1478
1462
|
* @type {any}
|
|
1479
1463
|
*/
|
|
1480
1464
|
alertData;
|
|
1481
|
-
destroy$ = new Subject();
|
|
1482
|
-
/**
|
|
1483
|
-
* Emits the updated document after changes like upload, rename, or replace.
|
|
1484
|
-
* @type {EventEmitter<DocumentModel>}
|
|
1485
|
-
*/
|
|
1486
|
-
updatedDocument = new EventEmitter();
|
|
1487
1465
|
/**
|
|
1488
1466
|
* Holds the subscription to manage observable cleanup.
|
|
1489
1467
|
* @private
|
|
@@ -1504,25 +1482,13 @@ class DocumentViewerComponent {
|
|
|
1504
1482
|
* @returns {void}
|
|
1505
1483
|
*/
|
|
1506
1484
|
ngOnChanges() {
|
|
1507
|
-
this.getDocumentAlertList();
|
|
1508
1485
|
if (this.selectedDocument) {
|
|
1509
1486
|
this.documentService.set(this.selectedDocument);
|
|
1510
|
-
|
|
1511
|
-
}
|
|
1512
|
-
}
|
|
1513
|
-
getDocumentAlertList() {
|
|
1514
|
-
const documentId = this.selectedDocument?._id;
|
|
1515
|
-
if (documentId) {
|
|
1516
|
-
this.documentHttpService.getAlertsByDocumentID(documentId)
|
|
1517
|
-
.pipe(takeUntil(this.destroy$))
|
|
1518
|
-
.subscribe((res) => {
|
|
1519
|
-
this.alertData = res;
|
|
1520
|
-
});
|
|
1487
|
+
this.alertData = DocumentAlertList.find((res) => res.status === this.selectedDocument?.status);
|
|
1521
1488
|
}
|
|
1522
1489
|
}
|
|
1523
1490
|
handleSelectedDocument(document) {
|
|
1524
1491
|
this.selectedDocument = document;
|
|
1525
|
-
this.updatedDocument.emit({ ...document });
|
|
1526
1492
|
this.documentService.set(this.selectedDocument);
|
|
1527
1493
|
}
|
|
1528
1494
|
/**
|
|
@@ -1537,19 +1503,91 @@ class DocumentViewerComponent {
|
|
|
1537
1503
|
this.subscription.unsubscribe();
|
|
1538
1504
|
}
|
|
1539
1505
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentViewerComponent, deps: [{ token: DocumentHttpService }, { token: DocumentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1540
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: DocumentViewerComponent, isStandalone: false, selector: "document-viewer", inputs: { selectedDocument: "selectedDocument", documentList: "documentList" },
|
|
1506
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: DocumentViewerComponent, isStandalone: false, selector: "document-viewer", inputs: { selectedDocument: "selectedDocument", documentList: "documentList" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"grid\">\r\n <div class=\"col-12\">\r\n <div class=\"p-fluid p-formgrid grid m-0\">\r\n <div class=\"col-12 md:col-12 md:flex justify-content-evenly\">\r\n @if(selectedDocument){\r\n <div id=\"outerContainer col-12 md:col-7\">\r\n <div\r\n *ngIf=\"isImage(selectedDocument?.contentType)\"\r\n class=\"img-container\"\r\n >\r\n <img\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n class=\"uploadedImages\"\r\n alt=\"Document Image\"\r\n />\r\n </div>\r\n @if(selectedDocument?.contentType && selectedDocument?.contentType === \"application/pdf\"){\r\n <div class=\"pdf-container\">\r\n <pdf-viewer\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n [rotation]=\"0\"\r\n [original-size]=\"false\"\r\n [show-all]=\"true\"\r\n [fit-to-page]=\"false\"\r\n [zoom]=\"1\"\r\n [zoom-scale]=\"'page-width'\"\r\n [stick-to-page]=\"false\"\r\n [render-text]=\"true\"\r\n [external-link-target]=\"'blank'\"\r\n [autoresize]=\"true\"\r\n [show-borders]=\"false\"\r\n style=\"width: 50vw; height: 75vh\"\r\n ></pdf-viewer>\r\n </div>\r\n }@else{\r\n <div class=\"incorrect-docType\">\r\n ContentType is incorrect.\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"left-part col-12 md:col-3 pt-0\">\r\n <div class=\"alerts mb-4 pb-1\">\r\n <button\r\n type=\"button\"\r\n *ngIf=\"\r\n (alertData?.status !== 'Pending' && !!alertData?.status) ||\r\n alertData?.isAlert === false\r\n \"\r\n class=\"bg-green-500 border-none border-round-md flex align-items-center mb-3 p-2 px-3\"\r\n >\r\n <i\r\n class=\"pi pi-verified mr-2 cursor-pointer\"\r\n [ngStyle]=\"{\r\n color:\r\n alertData?.status === 'Pending' &&\r\n alertData?.isAlert !== false\r\n ? '#FFFFFF'\r\n : '#8A8EA6'\r\n }\"\r\n style=\"font-size: 20px\"\r\n ></i>\r\n <span class=\"font-semibold text-white\">Verified</span>\r\n </button>\r\n <div\r\n class=\"card mb-0\"\r\n [ngClass]=\"\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? 'alert-card'\r\n : 'success-alert'\r\n \"\r\n >\r\n <div class=\"flex align-items-center mb-2 pb-1\" *ngIf=\"alertData?.status !== 'Verified'\">\r\n <h4 class=\"mr-3 mt-0 mb-0 text-color font-bold\" style=\"font-size: 21px; font-weight: bold; border-color: rgba(68, 72, 109, 0.2) ;\" >Alerts</h4>\r\n <i\r\n class=\"pi pi-exclamation-triangle\"\r\n style=\"font-size: 20px\"\r\n [ngStyle]=\"{\r\n color:\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? '#FB392D'\r\n : '#8A8EA6'\r\n }\"\r\n ></i>\r\n </div>\r\n <p class=\"text-color mb-0\">{{ alertData?.alertMessage }}</p>\r\n </div>\r\n </div>\r\n <ng-content></ng-content>\r\n <app-linked-document (selectedDocumentChange)=\"handleSelectedDocument($event)\" [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\"></app-linked-document>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".alert-card{background-color:#fb392d1a}.success-alert{border-radius:10px;border:1px solid rgba(251,57,45,.1);background:linear-gradient(0deg,#dedede 0% 100%),#fff}.p-timeline-event-opposite{display:none}.decription{color:#676b89}.textAreaControl textarea{width:100%;resize:vertical;max-width:100%}.document-btn-wrapper .p-button-outlined{color:#f57c00}.document-viewer .p-dialog{width:100%;height:100%;max-height:100%!important;box-shadow:none!important}.document-viewer .p-dialog-header-close-icon{height:20px;width:20px}.document-viewer .p-dialog-header,.document-viewer .p-dialog-content{background-color:#fff;border-radius:0}.uploadedImages{width:95%;height:100%;object-fit:contain}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i4.PdfViewerComponent, selector: "pdf-viewer", inputs: ["src", "c-maps-url", "page", "render-text", "render-text-mode", "original-size", "show-all", "stick-to-page", "zoom", "zoom-scale", "rotation", "external-link-target", "autoresize", "fit-to-page", "show-borders"], outputs: ["after-load-complete", "page-rendered", "pages-initialized", "text-layer-rendered", "error", "on-progress", "pageChange"] }, { kind: "component", type: LinkedDocumentComponent, selector: "app-linked-document", inputs: ["selectedDocument", "documentList"], outputs: ["selectedDocumentChange"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1541
1507
|
}
|
|
1542
1508
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentViewerComponent, decorators: [{
|
|
1543
1509
|
type: Component,
|
|
1544
|
-
args: [{ selector: 'document-viewer', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"grid\">\r\n <div class=\"col-12\">\r\n <div class=\"p-fluid p-formgrid grid m-0\">\r\n <div class=\"col-12 md:col-12 md:flex justify-content-evenly\">\r\n @if(selectedDocument){\r\n <div id=\"outerContainer col-12 md:col-7\">\r\n <div\r\n *ngIf=\"isImage(selectedDocument?.contentType)\"\r\n class=\"img-container\"\r\n >\r\n <img\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n class=\"uploadedImages\"\r\n alt=\"Document Image\"\r\n />\r\n </div>\r\n @if(selectedDocument?.contentType && selectedDocument?.contentType === \"application/pdf\"){\r\n <div class=\"pdf-container\">\r\n <pdf-viewer\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n [rotation]=\"0\"\r\n [original-size]=\"false\"\r\n [show-all]=\"true\"\r\n [fit-to-page]=\"false\"\r\n [zoom]=\"1\"\r\n [zoom-scale]=\"'page-width'\"\r\n [stick-to-page]=\"false\"\r\n [render-text]=\"true\"\r\n [external-link-target]=\"'blank'\"\r\n [autoresize]=\"true\"\r\n [show-borders]=\"false\"\r\n style=\"width: 50vw; height: 75vh\"\r\n ></pdf-viewer>\r\n </div>\r\n }@else{\r\n <div class=\"incorrect-docType\">\r\n ContentType is incorrect.\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"left-part col-12 md:col-3
|
|
1510
|
+
args: [{ selector: 'document-viewer', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"grid\">\r\n <div class=\"col-12\">\r\n <div class=\"p-fluid p-formgrid grid m-0\">\r\n <div class=\"col-12 md:col-12 md:flex justify-content-evenly\">\r\n @if(selectedDocument){\r\n <div id=\"outerContainer col-12 md:col-7\">\r\n <div\r\n *ngIf=\"isImage(selectedDocument?.contentType)\"\r\n class=\"img-container\"\r\n >\r\n <img\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n class=\"uploadedImages\"\r\n alt=\"Document Image\"\r\n />\r\n </div>\r\n @if(selectedDocument?.contentType && selectedDocument?.contentType === \"application/pdf\"){\r\n <div class=\"pdf-container\">\r\n <pdf-viewer\r\n [src]=\"selectedDocument?.documentUrl || ''\"\r\n [rotation]=\"0\"\r\n [original-size]=\"false\"\r\n [show-all]=\"true\"\r\n [fit-to-page]=\"false\"\r\n [zoom]=\"1\"\r\n [zoom-scale]=\"'page-width'\"\r\n [stick-to-page]=\"false\"\r\n [render-text]=\"true\"\r\n [external-link-target]=\"'blank'\"\r\n [autoresize]=\"true\"\r\n [show-borders]=\"false\"\r\n style=\"width: 50vw; height: 75vh\"\r\n ></pdf-viewer>\r\n </div>\r\n }@else{\r\n <div class=\"incorrect-docType\">\r\n ContentType is incorrect.\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"left-part col-12 md:col-3 pt-0\">\r\n <div class=\"alerts mb-4 pb-1\">\r\n <button\r\n type=\"button\"\r\n *ngIf=\"\r\n (alertData?.status !== 'Pending' && !!alertData?.status) ||\r\n alertData?.isAlert === false\r\n \"\r\n class=\"bg-green-500 border-none border-round-md flex align-items-center mb-3 p-2 px-3\"\r\n >\r\n <i\r\n class=\"pi pi-verified mr-2 cursor-pointer\"\r\n [ngStyle]=\"{\r\n color:\r\n alertData?.status === 'Pending' &&\r\n alertData?.isAlert !== false\r\n ? '#FFFFFF'\r\n : '#8A8EA6'\r\n }\"\r\n style=\"font-size: 20px\"\r\n ></i>\r\n <span class=\"font-semibold text-white\">Verified</span>\r\n </button>\r\n <div\r\n class=\"card mb-0\"\r\n [ngClass]=\"\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? 'alert-card'\r\n : 'success-alert'\r\n \"\r\n >\r\n <div class=\"flex align-items-center mb-2 pb-1\" *ngIf=\"alertData?.status !== 'Verified'\">\r\n <h4 class=\"mr-3 mt-0 mb-0 text-color font-bold\" style=\"font-size: 21px; font-weight: bold; border-color: rgba(68, 72, 109, 0.2) ;\" >Alerts</h4>\r\n <i\r\n class=\"pi pi-exclamation-triangle\"\r\n style=\"font-size: 20px\"\r\n [ngStyle]=\"{\r\n color:\r\n (alertData?.status === 'Pending' || !alertData?.status) &&\r\n alertData?.isAlert !== false\r\n ? '#FB392D'\r\n : '#8A8EA6'\r\n }\"\r\n ></i>\r\n </div>\r\n <p class=\"text-color mb-0\">{{ alertData?.alertMessage }}</p>\r\n </div>\r\n </div>\r\n <ng-content></ng-content>\r\n <app-linked-document (selectedDocumentChange)=\"handleSelectedDocument($event)\" [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\"></app-linked-document>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".alert-card{background-color:#fb392d1a}.success-alert{border-radius:10px;border:1px solid rgba(251,57,45,.1);background:linear-gradient(0deg,#dedede 0% 100%),#fff}.p-timeline-event-opposite{display:none}.decription{color:#676b89}.textAreaControl textarea{width:100%;resize:vertical;max-width:100%}.document-btn-wrapper .p-button-outlined{color:#f57c00}.document-viewer .p-dialog{width:100%;height:100%;max-height:100%!important;box-shadow:none!important}.document-viewer .p-dialog-header-close-icon{height:20px;width:20px}.document-viewer .p-dialog-header,.document-viewer .p-dialog-content{background-color:#fff;border-radius:0}.uploadedImages{width:95%;height:100%;object-fit:contain}\n"] }]
|
|
1545
1511
|
}], ctorParameters: () => [{ type: DocumentHttpService }, { type: DocumentService }], propDecorators: { selectedDocument: [{
|
|
1546
1512
|
type: Input
|
|
1547
1513
|
}], documentList: [{
|
|
1548
1514
|
type: Input
|
|
1549
|
-
}], updatedDocument: [{
|
|
1550
|
-
type: Output
|
|
1551
1515
|
}] } });
|
|
1552
1516
|
|
|
1517
|
+
/**
|
|
1518
|
+
* Service for managing user session details.
|
|
1519
|
+
* @class SessionService
|
|
1520
|
+
* @typedef {SessionService}
|
|
1521
|
+
*/
|
|
1522
|
+
class SessionService {
|
|
1523
|
+
router;
|
|
1524
|
+
/**
|
|
1525
|
+
* Creates an instance of SessionService.
|
|
1526
|
+
* @param {Router} router - Angular Router for navigation.
|
|
1527
|
+
*/
|
|
1528
|
+
constructor(router) {
|
|
1529
|
+
this.router = router;
|
|
1530
|
+
}
|
|
1531
|
+
/**
|
|
1532
|
+
* Retrieves the current user's role from local storage.
|
|
1533
|
+
* @returns {string | null} The user's role, or null if not found.
|
|
1534
|
+
*/
|
|
1535
|
+
getUserRole() {
|
|
1536
|
+
return localStorage.getItem('role');
|
|
1537
|
+
}
|
|
1538
|
+
/**
|
|
1539
|
+
* Stores the user session data in local storage.
|
|
1540
|
+
* @param {any} data - The session data to store.
|
|
1541
|
+
*/
|
|
1542
|
+
setUserSession(data) {
|
|
1543
|
+
localStorage.setItem(SHARED.SESSIONKEY, JSON.stringify(data));
|
|
1544
|
+
}
|
|
1545
|
+
/**
|
|
1546
|
+
* Retrieves the stored user session data.
|
|
1547
|
+
* @returns {any | null} The parsed session data, or null if not found.
|
|
1548
|
+
*/
|
|
1549
|
+
getUserSession() {
|
|
1550
|
+
const sessionData = localStorage.getItem(SHARED.SESSIONKEY);
|
|
1551
|
+
return sessionData ? JSON.parse(sessionData) : null;
|
|
1552
|
+
}
|
|
1553
|
+
/**
|
|
1554
|
+
* Retrieves the user's permissions from the stored session data.
|
|
1555
|
+
* @returns {any | null} The user's permissions, or null if not found.
|
|
1556
|
+
*/
|
|
1557
|
+
getUserPermissions() {
|
|
1558
|
+
const sessionData = localStorage.getItem(SHARED.SESSIONKEY);
|
|
1559
|
+
return sessionData ? JSON.parse(sessionData).permissions : null;
|
|
1560
|
+
}
|
|
1561
|
+
/**
|
|
1562
|
+
* Retrieves the session ID from the stored session data.
|
|
1563
|
+
* @returns {any | null} The session ID, or null if not found.
|
|
1564
|
+
*/
|
|
1565
|
+
getSessionID() {
|
|
1566
|
+
const sessionData = localStorage.getItem(SHARED.SESSIONKEY);
|
|
1567
|
+
console.log(sessionData);
|
|
1568
|
+
if (sessionData) {
|
|
1569
|
+
const sessionId = JSON.parse(sessionData);
|
|
1570
|
+
console.log(sessionId);
|
|
1571
|
+
return sessionId;
|
|
1572
|
+
}
|
|
1573
|
+
return null;
|
|
1574
|
+
}
|
|
1575
|
+
/**
|
|
1576
|
+
* Clears all stored session data from local storage.
|
|
1577
|
+
*/
|
|
1578
|
+
clearSession() {
|
|
1579
|
+
localStorage.clear();
|
|
1580
|
+
}
|
|
1581
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SessionService, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1582
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SessionService, providedIn: 'root' });
|
|
1583
|
+
}
|
|
1584
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SessionService, decorators: [{
|
|
1585
|
+
type: Injectable,
|
|
1586
|
+
args: [{
|
|
1587
|
+
providedIn: 'root'
|
|
1588
|
+
}]
|
|
1589
|
+
}], ctorParameters: () => [{ type: i1.Router }] });
|
|
1590
|
+
|
|
1553
1591
|
/**
|
|
1554
1592
|
* Directive to conditionally show or hide elements based on user permissions.
|
|
1555
1593
|
* @class HasPermissionDirective
|
|
@@ -1626,7 +1664,6 @@ class DocumentListComponent {
|
|
|
1626
1664
|
documentHttpService;
|
|
1627
1665
|
documentQuery;
|
|
1628
1666
|
documentStore;
|
|
1629
|
-
sessionService;
|
|
1630
1667
|
onRefresh = new EventEmitter();
|
|
1631
1668
|
/**
|
|
1632
1669
|
* Represents the context ID for the document list.
|
|
@@ -1705,34 +1742,7 @@ class DocumentListComponent {
|
|
|
1705
1742
|
* It may be undefined until a file is selected or loaded.
|
|
1706
1743
|
* @type {string | undefined}
|
|
1707
1744
|
*/
|
|
1708
|
-
|
|
1709
|
-
/**
|
|
1710
|
-
* Indicates whether the user has permission to upload or modify documents.
|
|
1711
|
-
* The exact type depends on the access control implementation.
|
|
1712
|
-
* @type {any}
|
|
1713
|
-
*/
|
|
1714
|
-
hasDocumentPutAccess;
|
|
1715
|
-
/**
|
|
1716
|
-
* Error message related to the file name, if validation fails.
|
|
1717
|
-
* @type {string}
|
|
1718
|
-
*/
|
|
1719
|
-
fileNameError;
|
|
1720
|
-
/**
|
|
1721
|
-
* Extension of the selected document file (e.g., .pdf, .docx).
|
|
1722
|
-
* @type {string}
|
|
1723
|
-
*/
|
|
1724
|
-
documentExtension;
|
|
1725
|
-
/**
|
|
1726
|
-
* Regular expression to match disallowed characters in file names.
|
|
1727
|
-
* Prevents characters like < > : " / \ | ? *
|
|
1728
|
-
* @type {RegExp}
|
|
1729
|
-
*/
|
|
1730
|
-
disallowedCharsRegex = /[<>:"\/\\|?*]/;
|
|
1731
|
-
/**
|
|
1732
|
-
* Reference to the file input element used for uploading documents.
|
|
1733
|
-
* @type {ElementRef<HTMLInputElement>}
|
|
1734
|
-
*/
|
|
1735
|
-
fileInput;
|
|
1745
|
+
fileName;
|
|
1736
1746
|
/**
|
|
1737
1747
|
* Creates an instance of DocumentListComponent.
|
|
1738
1748
|
* @class
|
|
@@ -1740,36 +1750,18 @@ class DocumentListComponent {
|
|
|
1740
1750
|
* @param {DocumentHttpService} documentHttpService - The service responsible for fetching documents from the server.
|
|
1741
1751
|
* @param {DocumentQuery} documentQuery - The service responsible for geting stored documents.
|
|
1742
1752
|
* @param {DocumentStore} documentStore - The service responsible for storing documents.
|
|
1743
|
-
* @param {SessionService} sessionService - Service for managing user session and authentication.
|
|
1744
1753
|
*/
|
|
1745
|
-
constructor(documentUploadService, documentHttpService, documentQuery, documentStore
|
|
1754
|
+
constructor(documentUploadService, documentHttpService, documentQuery, documentStore) {
|
|
1746
1755
|
this.documentUploadService = documentUploadService;
|
|
1747
1756
|
this.documentHttpService = documentHttpService;
|
|
1748
1757
|
this.documentQuery = documentQuery;
|
|
1749
1758
|
this.documentStore = documentStore;
|
|
1750
|
-
this.sessionService = sessionService;
|
|
1751
1759
|
}
|
|
1752
1760
|
/**
|
|
1753
1761
|
* Initializes the component by fetching the document type list.
|
|
1754
1762
|
*/
|
|
1755
1763
|
ngOnInit() {
|
|
1756
1764
|
this.getDocumentTypeList();
|
|
1757
|
-
const userPermissions = this.sessionService.getUserPermissions();
|
|
1758
|
-
const permissionNames = userPermissions.map((perm) => perm.name);
|
|
1759
|
-
this.hasDocumentPutAccess = permissionNames.includes(PERMISSIONS.DOCUMENT_PUT);
|
|
1760
|
-
}
|
|
1761
|
-
handleUpdatedDocument(document) {
|
|
1762
|
-
this.selectedDocument = document;
|
|
1763
|
-
if (document.documentName) {
|
|
1764
|
-
const extensionMatch = document.documentName.match(/(\.[^/.]+)$/);
|
|
1765
|
-
this.documentExtension = extensionMatch ? extensionMatch[0] : '';
|
|
1766
|
-
this.documentName = document.documentName?.replace(/\.[^/.]+$/, '');
|
|
1767
|
-
}
|
|
1768
|
-
this.documentStatus = document.status;
|
|
1769
|
-
this.documentStore.setSelectedDocument(document);
|
|
1770
|
-
setTimeout(() => {
|
|
1771
|
-
this.onDocumentNameChange({ target: this.fileInput.nativeElement });
|
|
1772
|
-
});
|
|
1773
1765
|
}
|
|
1774
1766
|
/**
|
|
1775
1767
|
* Handles the click event for file upload.
|
|
@@ -1791,16 +1783,7 @@ class DocumentListComponent {
|
|
|
1791
1783
|
handleClickForDocument(document) {
|
|
1792
1784
|
this.isdialogVisible = SHARED.TRUE;
|
|
1793
1785
|
this.selectedDocument = document;
|
|
1794
|
-
|
|
1795
|
-
const extensionMatch = document.documentName.match(/(\.[^/.]+)$/);
|
|
1796
|
-
this.documentExtension = extensionMatch ? extensionMatch[0] : '';
|
|
1797
|
-
this.documentName = document.documentName?.replace(/\.[^/.]+$/, '');
|
|
1798
|
-
}
|
|
1799
|
-
this.documentStatus = document.status;
|
|
1800
|
-
this.documentStore.setSelectedDocument(document);
|
|
1801
|
-
setTimeout(() => {
|
|
1802
|
-
this.onDocumentNameChange({ target: this.fileInput.nativeElement });
|
|
1803
|
-
});
|
|
1786
|
+
this.fileName = document.fileName;
|
|
1804
1787
|
}
|
|
1805
1788
|
/**
|
|
1806
1789
|
* Handles the save click event to update the document's file name.
|
|
@@ -1810,53 +1793,21 @@ class DocumentListComponent {
|
|
|
1810
1793
|
* @returns {void}
|
|
1811
1794
|
*/
|
|
1812
1795
|
handleSaveClick() {
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
console.log(`${SHARED.UPDATE_DOCUMENT_NAME} ${this.selectedDocument._id}`);
|
|
1819
|
-
this.documentStore.setIsDocumentUpdated({ ...res });
|
|
1820
|
-
});
|
|
1821
|
-
}
|
|
1796
|
+
const payload = { fileName: this.fileName };
|
|
1797
|
+
this.documentHttpService.updateDocumentName(this.selectedDocument._id, payload)
|
|
1798
|
+
.subscribe((res) => {
|
|
1799
|
+
console.log(`${SHARED.UPDATE_DOCUMENT_NAME} ${this.selectedDocument._id}`);
|
|
1800
|
+
});
|
|
1822
1801
|
}
|
|
1823
1802
|
/**
|
|
1824
1803
|
* Closes the dialog and resets the selected document.
|
|
1825
1804
|
* @memberof DocumentListComponent
|
|
1826
1805
|
*/
|
|
1827
1806
|
handleCloseModal() {
|
|
1828
|
-
if (!!this.fileNameError)
|
|
1829
|
-
return;
|
|
1830
1807
|
this.selectedDocument = { _id: SHARED.EMPTY };
|
|
1831
|
-
this.documentStore.setSelectedDocument(SHARED.EMPTY);
|
|
1832
1808
|
this.isdialogVisible = SHARED.FALSE;
|
|
1833
1809
|
this.onRefresh.emit();
|
|
1834
1810
|
}
|
|
1835
|
-
/**
|
|
1836
|
-
* Handles changes to the document name input field.
|
|
1837
|
-
* - Updates the `documentName` property.
|
|
1838
|
-
* - Validates for disallowed characters and sets appropriate error messages.
|
|
1839
|
-
* - Dynamically adjusts the width of the input field based on the content using a hidden span element.
|
|
1840
|
-
* @param {Event} event - The input change event triggered when the user types in the document name field.
|
|
1841
|
-
*/
|
|
1842
|
-
onDocumentNameChange(event) {
|
|
1843
|
-
const input = event.target;
|
|
1844
|
-
this.documentName = input.value;
|
|
1845
|
-
if (this.disallowedCharsRegex.test(this.documentName)) {
|
|
1846
|
-
this.fileNameError = ERRORS.ERROR_INVALID_FILENAME_CHARACTERS;
|
|
1847
|
-
}
|
|
1848
|
-
else {
|
|
1849
|
-
this.fileNameError = SHARED.EMPTY;
|
|
1850
|
-
}
|
|
1851
|
-
const span = document.querySelector('.hidden-measure');
|
|
1852
|
-
if (span) {
|
|
1853
|
-
const computedStyle = window.getComputedStyle(input);
|
|
1854
|
-
span.style.fontSize = computedStyle.fontSize;
|
|
1855
|
-
span.textContent = input.value || ' ';
|
|
1856
|
-
input.style.width = `${span.offsetWidth + 50}px`;
|
|
1857
|
-
input.style.minWidth = `${span.offsetWidth + 50}px`;
|
|
1858
|
-
}
|
|
1859
|
-
}
|
|
1860
1811
|
/**
|
|
1861
1812
|
* Handles the upload action for a document.
|
|
1862
1813
|
* Validates if a document type is selected and logs the result.
|
|
@@ -1917,13 +1868,13 @@ class DocumentListComponent {
|
|
|
1917
1868
|
handleOpenSideBar(isVisible) {
|
|
1918
1869
|
this.isSidebarVisible = isVisible;
|
|
1919
1870
|
}
|
|
1920
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentListComponent, deps: [{ token: DocumentUploadService }, { token: DocumentHttpService }, { token: DocumentQuery }, { token: DocumentStore }
|
|
1921
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: DocumentListComponent, isStandalone: false, selector: "lib-document-list", inputs: { contextId: "contextId", isUploadButtonVisible: "isUploadButtonVisible", isCollapsed: "isCollapsed", documentList: "documentList" }, outputs: { onRefresh: "onRefresh" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "\r\n<div class=\"document-viewer\">\r\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\" (onHide)=\"handleCloseModal()\"\r\n class=\"w-full h-full document-dailog-wrapper\"\r\n [draggable]=\"false\" [closable]=\"true\">\r\n <ng-template pTemplate=\"header\">\r\n <div>\r\n <div class=\"w-full flex align-items-center file-input-container\">\r\n <span class=\"hidden-measure\">{{ documentName }}</span>\r\n <input \r\n #fileInput\r\n type=\"text\" \r\n class=\"h-3rem file-input-wrapper\"\r\n pInputText \r\n [readonly]=\"!hasDocumentPutAccess\"\r\n [(ngModel)]=\"documentName\"\r\n (input)=\"onDocumentNameChange($event)\"\r\n (blur)=\"handleSaveClick()\" />\r\n <div class=\"ml-3\">\r\n <p\r\n [class]=\"'product-badge status-' + documentStatus?.toLowerCase()\"\r\n class=\"flex align-items-center justify-content-center px-2 py-1 m-0\"\r\n >\r\n <ng-container *ngIf=\"documentStatus?.toLowerCase() === 'pending'\">\r\n <div class=\"flex align-items-center\">\r\n <i class=\"pi pi-clock pr-1 status-icon-wrapper\" style=\"font-size: 12px;\"></i>\r\n <span>Pending</span>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"documentStatus?.toLowerCase() === 'verified'\">\r\n <div class=\"flex align-items-center\">\r\n <i class=\"pi pi-check-circle pr-1 status-icon-wrapper\" style=\"font-size: 12px;\"></i>\r\n <span>Verified</span>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"documentStatus?.toLowerCase() === 'alert'\">\r\n <div class=\"flex align-items-center\">\r\n <i class=\"pi pi-bell pr-1 status-icon-wrapper\" style=\"font-size: 12px;\"></i>\r\n <span>Alert</span>\r\n </div>\r\n </ng-container>\r\n </p>\r\n </div>\r\n </div>\r\n <div *ngIf=\"fileNameError\" class=\"error-message-wrapper\">\r\n {{ fileNameError }}\r\n </div>\r\n </div>\r\n </ng-template>\r\n \r\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\" (updatedDocument)=\"handleUpdatedDocument($event)\">\r\n <ng-content></ng-content>\r\n </document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"col-12 p-0\">\r\n <div class=\"card p-0 mb-0 document-list-wrapper\">\r\n <p-accordion [activeIndex]=\"isCollapsed ? -1 : 0\">\r\n <p-accordionTab class=\"line-height-2 m-0\">\r\n <ng-template pTemplate=\"header\" let-active=\"active\">\r\n <div class=\"flex align-items-center justify-content-between w-full\">\r\n <span class=\"flex align-items-center gap-2 document-title-wrapper\">\r\n Documents\r\n </span>\r\n @if(isUploadButtonVisible){\r\n <button pButton pRipple class=\"p-button-raised col-3\" [permission]=\"PERMISSION.DOCUMENT_POST\" type=\"button\" label=\"Upload File\"\r\n style=\"border-radius: 10px;\" (click)=\"handleFileUploadClick($event)\"></button>\r\n }\r\n </div>\r\n </ng-template>\r\n @for(document of documentList; track document){\r\n <lib-document-list-item [document]=\"document\"\r\n (documentClick)=\"handleClickForDocument($event)\"></lib-document-list-item>\r\n }\r\n </p-accordionTab>\r\n </p-accordion>\r\n </div>\r\n</div>\r\n<div class=\"grid m-0\">\r\n <div class=\"col-12 p-0\">\r\n <p-sidebar [(visible)]=\"isSidebarVisible\" position=\"right\" [styleClass]=\"'right-sidebar'\" class=\"relative\">\r\n <ng-template pTemplate=\"header\">\r\n <p-messages [(value)]=\"messages\" [enableService]=\"false\" />\r\n </ng-template>\r\n <ng-template pTemplate=\"content\">\r\n <div class=\"side-bar-con\">\r\n <lib-document-upload [contextId]=\"contextId\"></lib-document-upload>\r\n <div class=\"p-fluid\">\r\n <div class=\"field\">\r\n <label for=\"city\">Select Folder</label>\r\n <p-dropdown id=\"city\" optionLabel=\"label\" optionValue=\"value\" [options]=\"options\"\r\n placeholder=\"Select a Folder\" [(ngModel)]=\"selectedOption\"></p-dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"footer\" class=\"bg-gray-100 p-0\">\r\n <div class=\"bg-gray-100 p-4\">\r\n <p-button label=\"Save\" class=\"p-button-rounded p-button-success save-btn\" (click)=\"handleUploadDocument()\"\r\n [disabled]=\"!selectedOption\">\r\n </p-button>\r\n </div>\r\n </ng-template>\r\n </p-sidebar>\r\n </div>\r\n</div>", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right,.right-sidebar{width:35%}.document-title-wrapper{font-size:20px;font-weight:700;color:var(--text-color)}.document-input-field{display:flex;flex-direction:column}.document-input-field input{width:100%;height:46px;padding:10px 15px;gap:10px;border-radius:10px;outline:none;border:1px solid rgba(76,98,146,.1019607843);font-size:15px}label{color:#0f1729;font-weight:600}.document-list-dropDown .p-element{padding:10px 0 10px 15px}.document-list-dropDown .p-dropdown{border-radius:10px!important}.side-bar-con{display:flex;flex-direction:column}.save-btn-con{width:100%;border-top:1px solid rgba(76,98,146,.2);background:#4c629214;padding:13px 40px}.save-btn-wrapper{padding:10px 4px}.save-btn .p-button{height:45px!important;width:140px;border-radius:10px}.p-sidebar-footer{padding:0}.file-input-container{max-width:96%}.file-input-wrapper{border-radius:6px;border:1px solid rgba(76,98,146,.2);background:#f4f4f6;font-weight:700;font-size:28px}.error-message-wrapper{font-size:17px;font-weight:600;color:#fb392d;margin-top:3px}.file-input-wrapper.p-inputtext:enabled:focus{box-shadow:0 0 0 .2rem #a6d5fa!important}.status-icon-wrapper{margin-top:3px}.product-badge{padding:6px 16px}.product-badge.status-pending{background:#e9b127;color:#fff;border-radius:4px}.product-badge.status-verified{background:#4caf50;color:#fff;border-radius:4px}.product-badge.status-alert{background:#f57c00;color:#fff;border-radius:4px}.hidden-measure{visibility:hidden;white-space:nowrap;position:absolute;font-family:inherit;font-size:inherit}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7$1.Accordion, selector: "p-accordion", inputs: ["multiple", "style", "styleClass", "expandIcon", "collapseIcon", "activeIndex", "selectOnFocus", "headerAriaLevel"], outputs: ["onClose", "onOpen", "activeIndexChange"] }, { kind: "component", type: i7$1.AccordionTab, selector: "p-accordionTab", inputs: ["id", "header", "headerStyle", "tabStyle", "contentStyle", "tabStyleClass", "headerStyleClass", "contentStyleClass", "disabled", "cache", "transitionOptions", "iconPos", "selected", "headerAriaLevel"], outputs: ["selectedChange"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i9.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i9.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i10.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: i11.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "directive", type: i12.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i12.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i12.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i13.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "component", type: i14.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "autoShowPanelOnPrintableCharacterKeyDown", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i15.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: DocumentListItemComponent, selector: "lib-document-list-item", inputs: ["document"], outputs: ["documentClick"] }, { kind: "component", type: DocumentUploadComponent, selector: "lib-document-upload", inputs: ["contextId"] }, { kind: "component", type: DocumentViewerComponent, selector: "document-viewer", inputs: ["selectedDocument", "documentList"], outputs: ["updatedDocument"] }, { kind: "directive", type: HasPermissionDirective, selector: "[permission]", inputs: ["permission"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1871
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentListComponent, deps: [{ token: DocumentUploadService }, { token: DocumentHttpService }, { token: DocumentQuery }, { token: DocumentStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
1872
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: DocumentListComponent, isStandalone: false, selector: "lib-document-list", inputs: { contextId: "contextId", isUploadButtonVisible: "isUploadButtonVisible", isCollapsed: "isCollapsed", documentList: "documentList" }, outputs: { onRefresh: "onRefresh" }, ngImport: i0, template: "<div class=\"document-viewer\">\r\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\" (onHide)=\"handleCloseModal()\"\r\n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\">\r\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"w-full flex align-items-center justify-content-between\">\r\n <input type=\"text\" class=\"w-full border-none bg-white h-3rem file-input-wrapper\" pInputText\r\n [(ngModel)]=\"fileName\" />\r\n <button pButton pRipple class=\"mx-3 w-6rem save-btn-wrapper\" label=\"Save\" (click)=\"handleSaveClick()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-content></ng-content>\r\n \r\n </document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"col-12 p-0\">\r\n <div class=\"card p-0 mb-0 document-list-wrapper\">\r\n <p-accordion [activeIndex]=\"isCollapsed ? -1 : 0\">\r\n <p-accordionTab class=\"line-height-2 m-0\">\r\n <ng-template pTemplate=\"header\" let-active=\"active\">\r\n <div class=\"flex align-items-center justify-content-between w-full\">\r\n <span class=\"flex align-items-center gap-2 document-title-wrapper\">\r\n Documents\r\n </span>\r\n @if(isUploadButtonVisible){\r\n <button pButton pRipple class=\"p-button-raised col-3\" [permission]=\"PERMISSION.DOCUMENT_POST\" type=\"button\"\r\n label=\"Upload File\" style=\"border-radius: 10px;\" (click)=\"handleFileUploadClick($event)\"></button>\r\n }\r\n </div>\r\n </ng-template>\r\n @for(document of documentList; track document){\r\n <lib-document-list-item [document]=\"document\"\r\n (documentClick)=\"handleClickForDocument($event)\"></lib-document-list-item>\r\n }\r\n </p-accordionTab>\r\n </p-accordion>\r\n </div>\r\n</div>\r\n<div class=\"grid m-0\">\r\n <div class=\"col-12 p-0\">\r\n <p-sidebar [(visible)]=\"isSidebarVisible\" position=\"right\" [styleClass]=\"'right-sidebar'\" class=\"relative\">\r\n <ng-template pTemplate=\"header\">\r\n <p-messages [(value)]=\"messages\" [enableService]=\"false\" />\r\n </ng-template>\r\n <ng-template pTemplate=\"content\">\r\n <div class=\"side-bar-con\">\r\n <lib-document-upload [contextId]=\"contextId\"></lib-document-upload>\r\n <div class=\"p-fluid\">\r\n <div class=\"field\">\r\n <label for=\"city\">Select Folder</label>\r\n <p-dropdown id=\"city\" optionLabel=\"label\" optionValue=\"value\" [options]=\"options\"\r\n placeholder=\"Select a Folder\" [(ngModel)]=\"selectedOption\"></p-dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"footer\" class=\"bg-gray-100 p-0\">\r\n <div class=\"bg-gray-100 p-4\">\r\n <p-button label=\"Save\" class=\"p-button-rounded p-button-success save-btn\" (click)=\"handleUploadDocument()\"\r\n [disabled]=\"!selectedOption\">\r\n </p-button>\r\n </div>\r\n </ng-template>\r\n </p-sidebar>\r\n </div>\r\n</div>", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right,.right-sidebar{width:35%}.document-title-wrapper{font-size:20px;font-weight:700;color:var(--text-color)}.document-input-field{display:flex;flex-direction:column}.document-input-field input{width:100%;height:46px;padding:10px 15px;gap:10px;border-radius:10px;outline:none;border:1px solid rgba(76,98,146,.1019607843);font-size:15px}label{color:#0f1729;font-weight:600}.document-list-dropDown .p-element{padding:10px 0 10px 15px}.document-list-dropDown .p-dropdown{border-radius:10px!important}.side-bar-con{display:flex;flex-direction:column}.save-btn-con{width:100%;border-top:1px solid rgba(76,98,146,.2);background:#4c629214;padding:13px 40px}.save-btn-wrapper{padding:10px 4px}.save-btn .p-button{height:45px!important;width:140px;border-radius:10px}.p-sidebar-footer{padding:0}.file-input-wrapper.p-inputtext:enabled:focus{box-shadow:0 0 0 .2rem #a6d5fa!important}\n"], dependencies: [{ kind: "component", type: i5$1.Accordion, selector: "p-accordion", inputs: ["multiple", "style", "styleClass", "expandIcon", "collapseIcon", "activeIndex", "selectOnFocus", "headerAriaLevel"], outputs: ["onClose", "onOpen", "activeIndexChange"] }, { kind: "component", type: i5$1.AccordionTab, selector: "p-accordionTab", inputs: ["id", "header", "headerStyle", "tabStyle", "contentStyle", "tabStyleClass", "headerStyleClass", "contentStyleClass", "disabled", "cache", "transitionOptions", "iconPos", "selected", "headerAriaLevel"], outputs: ["selectedChange"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i7.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i7.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i8$1.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: i9.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }, { kind: "directive", type: i10.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i10.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i10.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i11.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "component", type: i12.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "autoShowPanelOnPrintableCharacterKeyDown", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i13.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: DocumentListItemComponent, selector: "lib-document-list-item", inputs: ["document"], outputs: ["documentClick"] }, { kind: "component", type: DocumentUploadComponent, selector: "lib-document-upload", inputs: ["contextId"] }, { kind: "component", type: DocumentViewerComponent, selector: "document-viewer", inputs: ["selectedDocument", "documentList"] }, { kind: "directive", type: HasPermissionDirective, selector: "[permission]", inputs: ["permission"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1922
1873
|
}
|
|
1923
1874
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentListComponent, decorators: [{
|
|
1924
1875
|
type: Component,
|
|
1925
|
-
args: [{ selector: 'lib-document-list', standalone: false, encapsulation: ViewEncapsulation.None, template: "
|
|
1926
|
-
}], ctorParameters: () => [{ type: DocumentUploadService }, { type: DocumentHttpService }, { type: DocumentQuery }, { type: DocumentStore }
|
|
1876
|
+
args: [{ selector: 'lib-document-list', standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"document-viewer\">\r\n <p-dialog [(visible)]=\"isdialogVisible\" [modal]=\"true\" (onHide)=\"handleCloseModal()\"\r\n class=\"w-full h-full document-dailog-wrapper\" [draggable]=\"false\" [closable]=\"true\">\r\n <document-viewer [selectedDocument]=\"selectedDocument\" [documentList]=\"documentList\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"w-full flex align-items-center justify-content-between\">\r\n <input type=\"text\" class=\"w-full border-none bg-white h-3rem file-input-wrapper\" pInputText\r\n [(ngModel)]=\"fileName\" />\r\n <button pButton pRipple class=\"mx-3 w-6rem save-btn-wrapper\" label=\"Save\" (click)=\"handleSaveClick()\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-content></ng-content>\r\n \r\n </document-viewer>\r\n </p-dialog>\r\n</div>\r\n\r\n<div class=\"col-12 p-0\">\r\n <div class=\"card p-0 mb-0 document-list-wrapper\">\r\n <p-accordion [activeIndex]=\"isCollapsed ? -1 : 0\">\r\n <p-accordionTab class=\"line-height-2 m-0\">\r\n <ng-template pTemplate=\"header\" let-active=\"active\">\r\n <div class=\"flex align-items-center justify-content-between w-full\">\r\n <span class=\"flex align-items-center gap-2 document-title-wrapper\">\r\n Documents\r\n </span>\r\n @if(isUploadButtonVisible){\r\n <button pButton pRipple class=\"p-button-raised col-3\" [permission]=\"PERMISSION.DOCUMENT_POST\" type=\"button\"\r\n label=\"Upload File\" style=\"border-radius: 10px;\" (click)=\"handleFileUploadClick($event)\"></button>\r\n }\r\n </div>\r\n </ng-template>\r\n @for(document of documentList; track document){\r\n <lib-document-list-item [document]=\"document\"\r\n (documentClick)=\"handleClickForDocument($event)\"></lib-document-list-item>\r\n }\r\n </p-accordionTab>\r\n </p-accordion>\r\n </div>\r\n</div>\r\n<div class=\"grid m-0\">\r\n <div class=\"col-12 p-0\">\r\n <p-sidebar [(visible)]=\"isSidebarVisible\" position=\"right\" [styleClass]=\"'right-sidebar'\" class=\"relative\">\r\n <ng-template pTemplate=\"header\">\r\n <p-messages [(value)]=\"messages\" [enableService]=\"false\" />\r\n </ng-template>\r\n <ng-template pTemplate=\"content\">\r\n <div class=\"side-bar-con\">\r\n <lib-document-upload [contextId]=\"contextId\"></lib-document-upload>\r\n <div class=\"p-fluid\">\r\n <div class=\"field\">\r\n <label for=\"city\">Select Folder</label>\r\n <p-dropdown id=\"city\" optionLabel=\"label\" optionValue=\"value\" [options]=\"options\"\r\n placeholder=\"Select a Folder\" [(ngModel)]=\"selectedOption\"></p-dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template pTemplate=\"footer\" class=\"bg-gray-100 p-0\">\r\n <div class=\"bg-gray-100 p-4\">\r\n <p-button label=\"Save\" class=\"p-button-rounded p-button-success save-btn\" (click)=\"handleUploadDocument()\"\r\n [disabled]=\"!selectedOption\">\r\n </p-button>\r\n </div>\r\n </ng-template>\r\n </p-sidebar>\r\n </div>\r\n</div>", styles: [".document-list-wrapper .p-accordion-header-link{padding:.5rem}.document-list-wrapper .p-sidebar-right,.right-sidebar{width:35%}.document-title-wrapper{font-size:20px;font-weight:700;color:var(--text-color)}.document-input-field{display:flex;flex-direction:column}.document-input-field input{width:100%;height:46px;padding:10px 15px;gap:10px;border-radius:10px;outline:none;border:1px solid rgba(76,98,146,.1019607843);font-size:15px}label{color:#0f1729;font-weight:600}.document-list-dropDown .p-element{padding:10px 0 10px 15px}.document-list-dropDown .p-dropdown{border-radius:10px!important}.side-bar-con{display:flex;flex-direction:column}.save-btn-con{width:100%;border-top:1px solid rgba(76,98,146,.2);background:#4c629214;padding:13px 40px}.save-btn-wrapper{padding:10px 4px}.save-btn .p-button{height:45px!important;width:140px;border-radius:10px}.p-sidebar-footer{padding:0}.file-input-wrapper.p-inputtext:enabled:focus{box-shadow:0 0 0 .2rem #a6d5fa!important}\n"] }]
|
|
1877
|
+
}], ctorParameters: () => [{ type: DocumentUploadService }, { type: DocumentHttpService }, { type: DocumentQuery }, { type: DocumentStore }], propDecorators: { onRefresh: [{
|
|
1927
1878
|
type: Output
|
|
1928
1879
|
}], contextId: [{
|
|
1929
1880
|
type: Input
|
|
@@ -1933,11 +1884,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
1933
1884
|
type: Input
|
|
1934
1885
|
}], documentList: [{
|
|
1935
1886
|
type: Input
|
|
1936
|
-
}], fileInput: [{
|
|
1937
|
-
type: ViewChild,
|
|
1938
|
-
args: [SHARED.FILE_INPUT]
|
|
1939
1887
|
}] } });
|
|
1940
1888
|
|
|
1889
|
+
class DocumentsMenuComponent {
|
|
1890
|
+
// Get the menu list from container
|
|
1891
|
+
items = SHARED.Menu;
|
|
1892
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentsMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1893
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DocumentsMenuComponent, isStandalone: false, selector: "lib-documents-menu", ngImport: i0, template: "<div class=\"document-sidebar-container h-full\">\r\n <p-card class=\"widget-menu-wrapper h-full\">\r\n <div class=\"flex align-items-center justify-content-between widget-menu-header-wrapper\">\r\n <p class=\"mb-0 application-title-wrapper\">ID - 00123882</p>\r\n <div class=\"expand-icon-wrapper\">\r\n <i class=\"ri-arrow-left-s-line text-primary flex align-items-center justify-content-center w-full h-full\"></i>\r\n </div>\r\n </div>\r\n\r\n <div class=\"widget-menu-container\" >\r\n <div class=\"widget-menu-wrapper h-ful l custom-scroll\">\r\n <p-menu [model]=\"items\" styleClass=\"w-full md:w-15rem\">\r\n <ng-template pTemplate=\"submenuheader\" let-item>\r\n <span [style]=\"{\r\n color : '#9EA0B3'\r\n }\">{{ item.label }}</span>\r\n </ng-template>\r\n <ng-template pTemplate=\"item\" let-item>\r\n <a pRipple class=\"flex align-items-center p-menuitem-link\">\r\n <span [class]=\"item.icon\" class=\"text-xl\"></span>\r\n <span class=\"ml-2\">{{ item.label }}</span>\r\n <p-badge *ngIf=\"item.badge\" class=\"ml-auto \" severity=\"warning\" [value]=\"item.badge\" />\r\n <span *ngIf=\"item.shortcut\"\r\n class=\"ml-auto border-1 surface-border border-round surface-100 text-xs p-1\">{{ item.shortcut\r\n }}</span>\r\n </a>\r\n </ng-template>\r\n </p-menu>\r\n </div>\r\n </div>\r\n </p-card>\r\n</div>\r\n\r\n ", styles: [".expand-icon-wrapper{border:1px solid var(--primary-color);height:24px;width:24px;border-radius:50%;background:var(--blue-bg-light)}::ng-deep .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-icon-wrapper{display:none}::ng-deep .p-menu .p-menuitem>.p-menuitem-content .p-menuitem-link{color:#1f2937}@media screen and (min-width: 768px){::ng-deep .md\\:w-15rem{width:100%!important}}::ng-deep .p-menu .p-menuitem:not(p-highlight):not(p-disabled)>.p-menuitem-content:hover{color:#06f!important;background:#0066ff1a!important;background-color:#0066ff1a!important}::ng-deep .p-menu{border:none}::ng-deep .custom-scroll{scrollbar-gutter:inherit}::ng-deep .p-panelmenu .p-panelmenu-content{border:none!important}.application-title-wrapper{color:#9ea0b3;font-weight:500}.widget-menu-wrapper{margin-top:8px}.widget-menu-header-wrapper{padding:4px 4px 4px 16px}.widget-menu-container{height:calc(100% - 38px)}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}::ng-deep .document-sidebar-container .p-card{height:100%;box-shadow:none}::ng-deep .document-sidebar-container .p-card .p-card-content{height:100%;padding:0!important}::ng-deep .document-sidebar-container .p-card .p-card-body{height:100%;width:100%;padding:12px 8px;border-radius:10px;border:1px solid #e5e7eb}::ng-deep .document-sidebar-container .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content{border:none;color:var(--text-color);font-weight:400!important;background-color:var(--surface-0)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action{color:var(--text-color);font-weight:400!important;position:relative;padding:12px}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{position:absolute;right:0;top:16px;margin-right:7px;transform:rotate(90deg)!important;transition:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .company-action-wrapper:not(.p-disabled).p-highlight .p-panelmenu-header-content{margin:12px 0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content{background-color:transparent!important;border-radius:10px;padding:12px;border-bottom:0!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{transform:rotate(180deg)!important;transition:none!important;top:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link{background-color:var(--surface-0)!important;color:var(--text-color);padding:12px 6px!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);box-shadow:none!important;background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem.p-focus>.p-menuitem-content{background-color:#44486d1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:1px solid rgba(68,72,109,.1)!important;border-top:0!important;border-bottom-left-radius:10px;border-bottom-right-radius:10px}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator{border-top:1px solid rgba(68,72,109,.1)!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i3$1.Badge, selector: "p-badge", inputs: ["styleClass", "style", "badgeSize", "severity", "value", "badgeDisabled", "size"] }, { kind: "component", type: i4$1.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "component", type: i5$2.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }] });
|
|
1894
|
+
}
|
|
1895
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentsMenuComponent, decorators: [{
|
|
1896
|
+
type: Component,
|
|
1897
|
+
args: [{ selector: 'lib-documents-menu', standalone: false, template: "<div class=\"document-sidebar-container h-full\">\r\n <p-card class=\"widget-menu-wrapper h-full\">\r\n <div class=\"flex align-items-center justify-content-between widget-menu-header-wrapper\">\r\n <p class=\"mb-0 application-title-wrapper\">ID - 00123882</p>\r\n <div class=\"expand-icon-wrapper\">\r\n <i class=\"ri-arrow-left-s-line text-primary flex align-items-center justify-content-center w-full h-full\"></i>\r\n </div>\r\n </div>\r\n\r\n <div class=\"widget-menu-container\" >\r\n <div class=\"widget-menu-wrapper h-ful l custom-scroll\">\r\n <p-menu [model]=\"items\" styleClass=\"w-full md:w-15rem\">\r\n <ng-template pTemplate=\"submenuheader\" let-item>\r\n <span [style]=\"{\r\n color : '#9EA0B3'\r\n }\">{{ item.label }}</span>\r\n </ng-template>\r\n <ng-template pTemplate=\"item\" let-item>\r\n <a pRipple class=\"flex align-items-center p-menuitem-link\">\r\n <span [class]=\"item.icon\" class=\"text-xl\"></span>\r\n <span class=\"ml-2\">{{ item.label }}</span>\r\n <p-badge *ngIf=\"item.badge\" class=\"ml-auto \" severity=\"warning\" [value]=\"item.badge\" />\r\n <span *ngIf=\"item.shortcut\"\r\n class=\"ml-auto border-1 surface-border border-round surface-100 text-xs p-1\">{{ item.shortcut\r\n }}</span>\r\n </a>\r\n </ng-template>\r\n </p-menu>\r\n </div>\r\n </div>\r\n </p-card>\r\n</div>\r\n\r\n ", styles: [".expand-icon-wrapper{border:1px solid var(--primary-color);height:24px;width:24px;border-radius:50%;background:var(--blue-bg-light)}::ng-deep .p-badge.p-badge-warning{background-color:#fef3c7;color:#d97706;font-family:inherit;font-size:12px;font-weight:400;font-style:inherit}::ng-deep .p-icon-wrapper{display:none}::ng-deep .p-menu .p-menuitem>.p-menuitem-content .p-menuitem-link{color:#1f2937}@media screen and (min-width: 768px){::ng-deep .md\\:w-15rem{width:100%!important}}::ng-deep .p-menu .p-menuitem:not(p-highlight):not(p-disabled)>.p-menuitem-content:hover{color:#06f!important;background:#0066ff1a!important;background-color:#0066ff1a!important}::ng-deep .p-menu{border:none}::ng-deep .custom-scroll{scrollbar-gutter:inherit}::ng-deep .p-panelmenu .p-panelmenu-content{border:none!important}.application-title-wrapper{color:#9ea0b3;font-weight:500}.widget-menu-wrapper{margin-top:8px}.widget-menu-header-wrapper{padding:4px 4px 4px 16px}.widget-menu-container{height:calc(100% - 38px)}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}::ng-deep .document-sidebar-container .p-card{height:100%;box-shadow:none}::ng-deep .document-sidebar-container .p-card .p-card-content{height:100%;padding:0!important}::ng-deep .document-sidebar-container .p-card .p-card-body{height:100%;width:100%;padding:12px 8px;border-radius:10px;border:1px solid #e5e7eb}::ng-deep .document-sidebar-container .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content{border:none;color:var(--text-color);font-weight:400!important;background-color:var(--surface-0)!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action{color:var(--text-color);font-weight:400!important;position:relative;padding:12px}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{position:absolute;right:0;top:16px;margin-right:7px;transform:rotate(90deg)!important;transition:none!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-panelmenu-header-action .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-header .p-panelmenu-header-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .company-action-wrapper:not(.p-disabled).p-highlight .p-panelmenu-header-content{margin:12px 0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content{background-color:transparent!important;border-radius:10px;padding:12px;border-bottom:0!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .no-highlight.p-panelmenu-header:not(.p-disabled).p-highlight .p-panelmenu-header-content .p-panelmenu-header-action .p-icon-wrapper{transform:rotate(180deg)!important;transition:none!important;top:0!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link{background-color:var(--surface-0)!important;color:var(--text-color);padding:12px 6px!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link .p-menuitem-text{max-width:75%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-all}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active{border:1px solid rgba(68,72,109,.1);border-radius:10px;padding:12px;color:var(--primary-color);box-shadow:none!important;background-color:#0066ff1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-icon{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem>.p-menuitem-content .p-menuitem-link-active .p-menuitem-text{color:var(--primary-color)}::ng-deep .widget-menu-wrapper .p-panelmenu .p-panelmenu-content .p-menuitem.p-focus>.p-menuitem-content{background-color:#44486d1a!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .p-panelmenu-expanded .p-panelmenu-content{border:1px solid rgba(68,72,109,.1)!important;border-top:0!important;border-bottom-left-radius:10px;border-bottom-right-radius:10px}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator{border-top:1px solid rgba(68,72,109,.1)!important}::ng-deep .widget-menu-wrapper .p-panelmenu-panel .widget-separator .p-panelmenu-header-content .p-panelmenu-header-action{padding:0!important}\n"] }]
|
|
1898
|
+
}] });
|
|
1899
|
+
|
|
1941
1900
|
/**
|
|
1942
1901
|
*This component is responsible for managing and displaying a list of documents.
|
|
1943
1902
|
* @class DocumentContainerComponent
|
|
@@ -1981,17 +1940,6 @@ class DocumentContainerComponent {
|
|
|
1981
1940
|
* @type {boolean}
|
|
1982
1941
|
*/
|
|
1983
1942
|
isUploadButtonVisible = SHARED.TRUE;
|
|
1984
|
-
/**
|
|
1985
|
-
* Emits the document selected by the user.
|
|
1986
|
-
* @type {EventEmitter<DocumentModel>}
|
|
1987
|
-
*/
|
|
1988
|
-
selectedDocument = new EventEmitter();
|
|
1989
|
-
/**
|
|
1990
|
-
* Subject used to clean up subscriptions when the component is destroyed.
|
|
1991
|
-
* Helps prevent memory leaks in observables.
|
|
1992
|
-
* @type {Subject<void>}
|
|
1993
|
-
*/
|
|
1994
|
-
destroy$ = new Subject();
|
|
1995
1943
|
/**
|
|
1996
1944
|
* The list of documents.
|
|
1997
1945
|
* @type {Array}
|
|
@@ -2013,35 +1961,20 @@ class DocumentContainerComponent {
|
|
|
2013
1961
|
* @returns {void}
|
|
2014
1962
|
*/
|
|
2015
1963
|
ngOnInit() {
|
|
2016
|
-
this.fetchFolder();
|
|
1964
|
+
// this.fetchFolder();
|
|
2017
1965
|
const folderSubscription = this.documentQuery
|
|
2018
1966
|
.selectParentDocumentTypeId()
|
|
2019
1967
|
.subscribe((folderBlockId) => {
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
}
|
|
1968
|
+
const validFolders = this.folderList.filter(folder => (folder.documentCount ?? 0) > 0);
|
|
1969
|
+
const idToFetch = folderBlockId ?? validFolders[0]?._id;
|
|
1970
|
+
if (idToFetch) {
|
|
1971
|
+
// this.fetchDocuments(idToFetch);
|
|
1972
|
+
}
|
|
1973
|
+
else {
|
|
1974
|
+
console.warn('No folders with documents available.');
|
|
2028
1975
|
}
|
|
2029
1976
|
});
|
|
2030
1977
|
this.subscription.add(folderSubscription);
|
|
2031
|
-
this.getSelectedDocumentData();
|
|
2032
|
-
}
|
|
2033
|
-
/**
|
|
2034
|
-
* Subscribes to the selected document from the document query store.
|
|
2035
|
-
* Emits the selected document using the `selectedDocument` EventEmitter if it exists.
|
|
2036
|
-
* Automatically unsubscribes when the component is destroyed.
|
|
2037
|
-
*/
|
|
2038
|
-
getSelectedDocumentData() {
|
|
2039
|
-
this.documentQuery.getSelectedDocument()
|
|
2040
|
-
.pipe(takeUntil(this.destroy$))
|
|
2041
|
-
.subscribe((res) => {
|
|
2042
|
-
if (res)
|
|
2043
|
-
this.selectedDocument.emit(res);
|
|
2044
|
-
});
|
|
2045
1978
|
}
|
|
2046
1979
|
/**
|
|
2047
1980
|
* Fetches the folder data from the API.
|
|
@@ -2115,17 +2048,14 @@ class DocumentContainerComponent {
|
|
|
2115
2048
|
* Unsubscribe subscription on destroy of component .
|
|
2116
2049
|
*/
|
|
2117
2050
|
ngOnDestroy() {
|
|
2118
|
-
this.documentStore.setParentDocumentTypeId(SHARED.EMPTY);
|
|
2119
|
-
this.destroy$.next();
|
|
2120
|
-
this.destroy$.complete();
|
|
2121
2051
|
this.subscription.unsubscribe();
|
|
2122
2052
|
}
|
|
2123
2053
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentContainerComponent, deps: [{ token: DocumentStore }, { token: DocumentService$1 }, { token: DocumentQuery }, { token: DocumentHttpService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2124
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: DocumentContainerComponent, isStandalone: false, selector: "lib-document-container", inputs: { contextId: "contextId", isCollapsed: "isCollapsed", showFolderList: "showFolderList", isUploadButtonVisible: "isUploadButtonVisible" },
|
|
2054
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: DocumentContainerComponent, isStandalone: false, selector: "lib-document-container", inputs: { contextId: "contextId", isCollapsed: "isCollapsed", showFolderList: "showFolderList", isUploadButtonVisible: "isUploadButtonVisible" }, ngImport: i0, template: "<div class=\"grid m-0 h-full flex\">\r\n <div class=\"col-12 md:col-3 lg:col-3\">\r\n <lib-documents-menu></lib-documents-menu>\r\n </div>\r\n <div class=\"col-12 md:col-9 lg:col-9 p-0 h-full\" [ngClass]=\"showFolderList ? 'custom-scroll' : ''\">\r\n @if(showFolderList){\r\n <div>\r\n <lib-folder-container [documentList]=\"documentList\" [folderList]=\"folderList\" [contextId]=\"contextId\"></lib-folder-container>\r\n </div>\r\n }\r\n <div [ngClass]=\"showFolderList ? 'mt-3' : ''\">\r\n <lib-document-list [isCollapsed]=\"isCollapsed\" [documentList]=\"documentList\" [contextId]=\"contextId\" [isUploadButtonVisible]=\"isUploadButtonVisible\" (onRefresh)=\"fetchFolder()\">\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n</div>", styles: [".custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: FolderContainerComponent, selector: "lib-folder-container", inputs: ["documentList", "folderList", "contextId"] }, { kind: "component", type: DocumentListComponent, selector: "lib-document-list", inputs: ["contextId", "isUploadButtonVisible", "isCollapsed", "documentList"], outputs: ["onRefresh"] }, { kind: "component", type: DocumentsMenuComponent, selector: "lib-documents-menu" }] });
|
|
2125
2055
|
}
|
|
2126
2056
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentContainerComponent, decorators: [{
|
|
2127
2057
|
type: Component,
|
|
2128
|
-
args: [{ selector: 'lib-document-container', standalone: false, template: "<div class=\"grid m-0 h-full\">\r\n <div class=\"col-12 md:col-
|
|
2058
|
+
args: [{ selector: 'lib-document-container', standalone: false, template: "<div class=\"grid m-0 h-full flex\">\r\n <div class=\"col-12 md:col-3 lg:col-3\">\r\n <lib-documents-menu></lib-documents-menu>\r\n </div>\r\n <div class=\"col-12 md:col-9 lg:col-9 p-0 h-full\" [ngClass]=\"showFolderList ? 'custom-scroll' : ''\">\r\n @if(showFolderList){\r\n <div>\r\n <lib-folder-container [documentList]=\"documentList\" [folderList]=\"folderList\" [contextId]=\"contextId\"></lib-folder-container>\r\n </div>\r\n }\r\n <div [ngClass]=\"showFolderList ? 'mt-3' : ''\">\r\n <lib-document-list [isCollapsed]=\"isCollapsed\" [documentList]=\"documentList\" [contextId]=\"contextId\" [isUploadButtonVisible]=\"isUploadButtonVisible\" (onRefresh)=\"fetchFolder()\">\r\n <ng-content></ng-content>\r\n </lib-document-list>\r\n </div>\r\n </div>\r\n</div>", styles: [".custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}\n"] }]
|
|
2129
2059
|
}], ctorParameters: () => [{ type: DocumentStore }, { type: DocumentService$1 }, { type: DocumentQuery }, { type: DocumentHttpService }], propDecorators: { contextId: [{
|
|
2130
2060
|
type: Input
|
|
2131
2061
|
}], isCollapsed: [{
|
|
@@ -2134,8 +2064,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
2134
2064
|
type: Input
|
|
2135
2065
|
}], isUploadButtonVisible: [{
|
|
2136
2066
|
type: Input
|
|
2137
|
-
}], selectedDocument: [{
|
|
2138
|
-
type: Output
|
|
2139
2067
|
}] } });
|
|
2140
2068
|
|
|
2141
2069
|
/**
|
|
@@ -2206,136 +2134,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
2206
2134
|
}]
|
|
2207
2135
|
}], ctorParameters: () => [{ type: DocumentService }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }] });
|
|
2208
2136
|
|
|
2209
|
-
class DocumentRendererComponent {
|
|
2210
|
-
selectedDocumentType = SHARED.EMPTY;
|
|
2211
|
-
documentType = [
|
|
2212
|
-
{
|
|
2213
|
-
"_id": "67e53f7fda90f2dcef43461e",
|
|
2214
|
-
"name": "Business Bank Statements",
|
|
2215
|
-
"__v": 0,
|
|
2216
|
-
"label": "Business Bank Statements",
|
|
2217
|
-
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cf7",
|
|
2218
|
-
"source": null
|
|
2219
|
-
},
|
|
2220
|
-
{
|
|
2221
|
-
"_id": "67e92b904fefd4fc91fe3d26",
|
|
2222
|
-
"name": "Bank Statements",
|
|
2223
|
-
"__v": 0,
|
|
2224
|
-
"label": "Bank Statements",
|
|
2225
|
-
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cf7",
|
|
2226
|
-
"source": null
|
|
2227
|
-
},
|
|
2228
|
-
{
|
|
2229
|
-
"_id": "67e92b904fefd4fc91fe3d27",
|
|
2230
|
-
"name": "Budget Planner",
|
|
2231
|
-
"__v": 0,
|
|
2232
|
-
"label": "Budget Planner",
|
|
2233
|
-
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cf7",
|
|
2234
|
-
"source": null
|
|
2235
|
-
},
|
|
2236
|
-
{
|
|
2237
|
-
"_id": "67e92b904fefd4fc91fe3d28",
|
|
2238
|
-
"name": "Credit Card Statements",
|
|
2239
|
-
"__v": 0,
|
|
2240
|
-
"label": "Credit Card Statements",
|
|
2241
|
-
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cf7",
|
|
2242
|
-
"source": null
|
|
2243
|
-
},
|
|
2244
|
-
{
|
|
2245
|
-
"_id": "67e53f7cda90f2dcef43461c",
|
|
2246
|
-
"name": "Payslips",
|
|
2247
|
-
"__v": 0,
|
|
2248
|
-
"label": "Payslips",
|
|
2249
|
-
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
|
|
2250
|
-
"source": null
|
|
2251
|
-
},
|
|
2252
|
-
{
|
|
2253
|
-
"_id": "67e92b914fefd4fc91fe3d32",
|
|
2254
|
-
"name": "Accountants certificate",
|
|
2255
|
-
"__v": 0,
|
|
2256
|
-
"label": "Accountants certificate",
|
|
2257
|
-
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
|
|
2258
|
-
"source": null
|
|
2259
|
-
},
|
|
2260
|
-
{
|
|
2261
|
-
"_id": "67e92b914fefd4fc91fe3d33",
|
|
2262
|
-
"name": "Company Accounts",
|
|
2263
|
-
"__v": 0,
|
|
2264
|
-
"label": "Company Accounts",
|
|
2265
|
-
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
|
|
2266
|
-
"source": null
|
|
2267
|
-
},
|
|
2268
|
-
{
|
|
2269
|
-
"_id": "67e92b914fefd4fc91fe3d34",
|
|
2270
|
-
"name": "Employer Reference",
|
|
2271
|
-
"__v": 0,
|
|
2272
|
-
"label": "EmployerReference",
|
|
2273
|
-
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
|
|
2274
|
-
"source": null
|
|
2275
|
-
},
|
|
2276
|
-
{
|
|
2277
|
-
"_id": "67e92b914fefd4fc91fe3d35",
|
|
2278
|
-
"name": "Employers reference request form",
|
|
2279
|
-
"__v": 0,
|
|
2280
|
-
"label": "Employers reference request form",
|
|
2281
|
-
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
|
|
2282
|
-
"source": null
|
|
2283
|
-
},
|
|
2284
|
-
{
|
|
2285
|
-
"_id": "67e92b914fefd4fc91fe3d36",
|
|
2286
|
-
"name": "Evidence of Historical Contract Work",
|
|
2287
|
-
"__v": 0,
|
|
2288
|
-
"label": "Evidence of Historical Contract Work",
|
|
2289
|
-
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
|
|
2290
|
-
"source": null
|
|
2291
|
-
},
|
|
2292
|
-
{
|
|
2293
|
-
"_id": "67e92b914fefd4fc91fe3d37",
|
|
2294
|
-
"name": "P60",
|
|
2295
|
-
"__v": 0,
|
|
2296
|
-
"label": "P60",
|
|
2297
|
-
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
|
|
2298
|
-
"source": null
|
|
2299
|
-
},
|
|
2300
|
-
{
|
|
2301
|
-
"_id": "67e92b914fefd4fc91fe3d38",
|
|
2302
|
-
"name": "Pension Evidence",
|
|
2303
|
-
"__v": 0,
|
|
2304
|
-
"label": "Pension Evidence",
|
|
2305
|
-
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
|
|
2306
|
-
"source": null
|
|
2307
|
-
},
|
|
2308
|
-
{
|
|
2309
|
-
"_id": "67e92b914fefd4fc91fe3d39",
|
|
2310
|
-
"name": "SA302s",
|
|
2311
|
-
"__v": 0,
|
|
2312
|
-
"label": "SA302s",
|
|
2313
|
-
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
|
|
2314
|
-
"source": null
|
|
2315
|
-
},
|
|
2316
|
-
{
|
|
2317
|
-
"_id": "67e92b914fefd4fc91fe3d3a",
|
|
2318
|
-
"name": "Signed Copy of Contract",
|
|
2319
|
-
"__v": 0,
|
|
2320
|
-
"label": "Signed Copy of Contract",
|
|
2321
|
-
"parentDocumentTypeId": "67e92a524fefd4fc91fe3cfb",
|
|
2322
|
-
"source": null
|
|
2323
|
-
}
|
|
2324
|
-
];
|
|
2325
|
-
ngOnInit() {
|
|
2326
|
-
console.log(this.documentType);
|
|
2327
|
-
}
|
|
2328
|
-
handleFileUploadClick(event) {
|
|
2329
|
-
console.log('File upload clicked', event);
|
|
2330
|
-
}
|
|
2331
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2332
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DocumentRendererComponent, isStandalone: false, selector: "app-document-renderer", ngImport: i0, template: "<div class=\"document-renderer-container\">\r\n <div class=\"card p-0 mb-0 document-renderer-wrapper\">\r\n <div class=\"document-header-wrapper flex align-items-center justify-content-between\">\r\n <h4 class=\"m-0 title-wrapper\">Related Documents</h4>\r\n <button pButton pRipple icon=\"pi pi-upload\" class=\"p-button-raised\" type=\"button\" label=\"Upload New Document\"\r\n (click)=\"handleFileUploadClick($event)\"></button>\r\n </div> \r\n\r\n <div class=\"document-list-wrapper\">\r\n <p class=\"m-0\">The following documents have been supplied to support your income declaration.</p>\r\n <div class=\"document-type-wrapper\">\r\n <div class=\"flex align-items-center justify-content-end\">\r\n <p-dropdown \r\n [options]=\"documentType\" \r\n [(ngModel)]=\"selectedDocumentType\" \r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n placeholder=\"Select Type\" />\r\n </div>\r\n <div class=\"grid m-0 mt-3\">\r\n <div class=\"col-12 md:col-3\">\r\n <div class=\"flex align-items-center\">\r\n <i class=\"pi pi-book type-icon-wrapper\"></i>\r\n <div class=\"ml-3 document-content-wrapper\">\r\n <h4 class=\"m-0\">Latest Payslips</h4>\r\n <p class=\"mt-2\">Uploaded on 28 Mar 2025</p>\r\n <div class=\"flex align-items-center\">\r\n <button pButton pRipple icon=\"pi pi-eye\" class=\"p-button-raised action-btn-wrapper\" type=\"button\" label=\"View\"\r\n ></button>\r\n <button pButton pRipple icon=\"pi pi-download\" class=\"p-button-raised ml-2 action-btn-wrapper\" type=\"button\" label=\"Download\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-3\">\r\n <div class=\"flex align-items-center\">\r\n <i class=\"pi pi-book type-icon-wrapper\"></i>\r\n <div class=\"document-content-wrapper ml-3\">\r\n <h4 class=\"m-0\">Latest Payslips</h4>\r\n <p class=\"mt-2\">Uploaded on 28 Mar 2025</p>\r\n <div class=\"flex align-items-center\">\r\n <button pButton pRipple icon=\"pi pi-eye\" class=\"p-button-raised action-btn-wrapper\" type=\"button\" label=\"View\"\r\n ></button>\r\n <button pButton pRipple icon=\"pi pi-download\" class=\"p-button-raised ml-2 action-btn-wrapper\" type=\"button\" label=\"Download\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-3\">\r\n <div class=\"flex align-items-center\">\r\n <i class=\"pi pi-book type-icon-wrapper\"></i> \r\n <div class=\"document-content-wrapper ml-3\">\r\n <h4 class=\"m-0\">Latest Payslips</h4>\r\n <p class=\"mt-2\">Uploaded on 28 Mar 2025</p>\r\n <div class=\"flex align-items-center\">\r\n <button pButton pRipple icon=\"pi pi-eye\" class=\"p-button-raised action-btn-wrapper\" type=\"button\" label=\"View\"\r\n ></button>\r\n <button pButton pRipple icon=\"pi pi-download\" class=\"p-button-raised ml-2 action-btn-wrapper\" type=\"button\" label=\"Download\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"document-footer-wrapper\">\r\n <div class=\"flex align-items-center mt-3\">\r\n <i class=\"pi pi-info-circle\"></i>\r\n <p class=\"m-0 ml-3\">All documents are securely stored and will only be used for verification purposes. Documents must be less than 3 months old.</p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>", styles: [".title-wrapper{font-size:20px;font-weight:600;color:var(--text-color)}.document-renderer-container{padding:16px}.type-icon-wrapper{background-color:#dbeafe;border-radius:50%;padding:12px}.action-btn-wrapper.p-button{background-color:transparent;color:var(--primary-color);border:none;box-shadow:none}\n"], dependencies: [{ kind: "directive", type: i9.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i12.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i12.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i14.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "autoShowPanelOnPrintableCharacterKeyDown", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }] });
|
|
2333
|
-
}
|
|
2334
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentRendererComponent, decorators: [{
|
|
2335
|
-
type: Component,
|
|
2336
|
-
args: [{ selector: 'app-document-renderer', standalone: false, template: "<div class=\"document-renderer-container\">\r\n <div class=\"card p-0 mb-0 document-renderer-wrapper\">\r\n <div class=\"document-header-wrapper flex align-items-center justify-content-between\">\r\n <h4 class=\"m-0 title-wrapper\">Related Documents</h4>\r\n <button pButton pRipple icon=\"pi pi-upload\" class=\"p-button-raised\" type=\"button\" label=\"Upload New Document\"\r\n (click)=\"handleFileUploadClick($event)\"></button>\r\n </div> \r\n\r\n <div class=\"document-list-wrapper\">\r\n <p class=\"m-0\">The following documents have been supplied to support your income declaration.</p>\r\n <div class=\"document-type-wrapper\">\r\n <div class=\"flex align-items-center justify-content-end\">\r\n <p-dropdown \r\n [options]=\"documentType\" \r\n [(ngModel)]=\"selectedDocumentType\" \r\n optionLabel=\"label\"\r\n optionValue=\"_id\"\r\n placeholder=\"Select Type\" />\r\n </div>\r\n <div class=\"grid m-0 mt-3\">\r\n <div class=\"col-12 md:col-3\">\r\n <div class=\"flex align-items-center\">\r\n <i class=\"pi pi-book type-icon-wrapper\"></i>\r\n <div class=\"ml-3 document-content-wrapper\">\r\n <h4 class=\"m-0\">Latest Payslips</h4>\r\n <p class=\"mt-2\">Uploaded on 28 Mar 2025</p>\r\n <div class=\"flex align-items-center\">\r\n <button pButton pRipple icon=\"pi pi-eye\" class=\"p-button-raised action-btn-wrapper\" type=\"button\" label=\"View\"\r\n ></button>\r\n <button pButton pRipple icon=\"pi pi-download\" class=\"p-button-raised ml-2 action-btn-wrapper\" type=\"button\" label=\"Download\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-3\">\r\n <div class=\"flex align-items-center\">\r\n <i class=\"pi pi-book type-icon-wrapper\"></i>\r\n <div class=\"document-content-wrapper ml-3\">\r\n <h4 class=\"m-0\">Latest Payslips</h4>\r\n <p class=\"mt-2\">Uploaded on 28 Mar 2025</p>\r\n <div class=\"flex align-items-center\">\r\n <button pButton pRipple icon=\"pi pi-eye\" class=\"p-button-raised action-btn-wrapper\" type=\"button\" label=\"View\"\r\n ></button>\r\n <button pButton pRipple icon=\"pi pi-download\" class=\"p-button-raised ml-2 action-btn-wrapper\" type=\"button\" label=\"Download\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-3\">\r\n <div class=\"flex align-items-center\">\r\n <i class=\"pi pi-book type-icon-wrapper\"></i> \r\n <div class=\"document-content-wrapper ml-3\">\r\n <h4 class=\"m-0\">Latest Payslips</h4>\r\n <p class=\"mt-2\">Uploaded on 28 Mar 2025</p>\r\n <div class=\"flex align-items-center\">\r\n <button pButton pRipple icon=\"pi pi-eye\" class=\"p-button-raised action-btn-wrapper\" type=\"button\" label=\"View\"\r\n ></button>\r\n <button pButton pRipple icon=\"pi pi-download\" class=\"p-button-raised ml-2 action-btn-wrapper\" type=\"button\" label=\"Download\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"document-footer-wrapper\">\r\n <div class=\"flex align-items-center mt-3\">\r\n <i class=\"pi pi-info-circle\"></i>\r\n <p class=\"m-0 ml-3\">All documents are securely stored and will only be used for verification purposes. Documents must be less than 3 months old.</p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>", styles: [".title-wrapper{font-size:20px;font-weight:600;color:var(--text-color)}.document-renderer-container{padding:16px}.type-icon-wrapper{background-color:#dbeafe;border-radius:50%;padding:12px}.action-btn-wrapper.p-button{background-color:transparent;color:var(--primary-color);border:none;box-shadow:none}\n"] }]
|
|
2337
|
-
}] });
|
|
2338
|
-
|
|
2339
2137
|
/**
|
|
2340
2138
|
* @module DocumentModule
|
|
2341
2139
|
*
|
|
@@ -2391,7 +2189,7 @@ class DocumentModule {
|
|
|
2391
2189
|
* A component which have linked documents.
|
|
2392
2190
|
*/
|
|
2393
2191
|
LinkedDocumentComponent,
|
|
2394
|
-
|
|
2192
|
+
DocumentsMenuComponent], imports: [
|
|
2395
2193
|
/**
|
|
2396
2194
|
* Angular's CommonModule is imported to access common directives like `ngIf` and `ngFor`.
|
|
2397
2195
|
*/
|
|
@@ -2459,7 +2257,10 @@ class DocumentModule {
|
|
|
2459
2257
|
/**
|
|
2460
2258
|
* PrimeNG InputTextModule is used for creating InputTextFeilds, allowing users to enter name for a document.
|
|
2461
2259
|
*/
|
|
2462
|
-
InputTextModule
|
|
2260
|
+
InputTextModule,
|
|
2261
|
+
MenuModule,
|
|
2262
|
+
PanelMenuModule,
|
|
2263
|
+
CardModule], exports: [
|
|
2463
2264
|
/**
|
|
2464
2265
|
* A directive to give permission.
|
|
2465
2266
|
*/
|
|
@@ -2480,8 +2281,7 @@ class DocumentModule {
|
|
|
2480
2281
|
/**
|
|
2481
2282
|
* A directive to show the document.
|
|
2482
2283
|
*/
|
|
2483
|
-
DocumentDirective
|
|
2484
|
-
DocumentRendererComponent] });
|
|
2284
|
+
DocumentDirective] });
|
|
2485
2285
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentModule, providers: [
|
|
2486
2286
|
/**
|
|
2487
2287
|
* Provide the messageservice to be used in other components.
|
|
@@ -2581,7 +2381,10 @@ class DocumentModule {
|
|
|
2581
2381
|
/**
|
|
2582
2382
|
* PrimeNG InputTextModule is used for creating InputTextFeilds, allowing users to enter name for a document.
|
|
2583
2383
|
*/
|
|
2584
|
-
InputTextModule
|
|
2384
|
+
InputTextModule,
|
|
2385
|
+
MenuModule,
|
|
2386
|
+
PanelMenuModule,
|
|
2387
|
+
CardModule] });
|
|
2585
2388
|
}
|
|
2586
2389
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentModule, decorators: [{
|
|
2587
2390
|
type: NgModule,
|
|
@@ -2632,7 +2435,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
2632
2435
|
* A component which have linked documents.
|
|
2633
2436
|
*/
|
|
2634
2437
|
LinkedDocumentComponent,
|
|
2635
|
-
|
|
2438
|
+
DocumentsMenuComponent,
|
|
2636
2439
|
],
|
|
2637
2440
|
imports: [
|
|
2638
2441
|
/**
|
|
@@ -2702,7 +2505,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
2702
2505
|
/**
|
|
2703
2506
|
* PrimeNG InputTextModule is used for creating InputTextFeilds, allowing users to enter name for a document.
|
|
2704
2507
|
*/
|
|
2705
|
-
InputTextModule
|
|
2508
|
+
InputTextModule,
|
|
2509
|
+
MenuModule,
|
|
2510
|
+
PanelMenuModule,
|
|
2511
|
+
CardModule
|
|
2706
2512
|
],
|
|
2707
2513
|
exports: [
|
|
2708
2514
|
/**
|
|
@@ -2726,7 +2532,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
2726
2532
|
* A directive to show the document.
|
|
2727
2533
|
*/
|
|
2728
2534
|
DocumentDirective,
|
|
2729
|
-
DocumentRendererComponent
|
|
2730
2535
|
],
|
|
2731
2536
|
providers: [
|
|
2732
2537
|
/**
|
|
@@ -2771,5 +2576,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
2771
2576
|
* Generated bundle index. Do not edit.
|
|
2772
2577
|
*/
|
|
2773
2578
|
|
|
2774
|
-
export { DocumentContainerComponent, DocumentDirective, DocumentListComponent, DocumentModule,
|
|
2579
|
+
export { DocumentContainerComponent, DocumentDirective, DocumentListComponent, DocumentModule, DocumentViewerComponent, HasPermissionDirective };
|
|
2775
2580
|
//# sourceMappingURL=cat-documents-ng.mjs.map
|