cat-qw-lib 0.0.0-watch
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/README.md +63 -0
- package/fesm2022/cat-qw-lib.mjs +3185 -0
- package/fesm2022/cat-qw-lib.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/admin/action-admin/action-admin.module.d.ts +14 -0
- package/lib/admin/action-admin/components/admin-action-form/admin-action-form.component.d.ts +27 -0
- package/lib/admin/action-admin/components/admin-action-list/admin-action-list.component.d.ts +15 -0
- package/lib/admin/action-admin/models/admin-action.model.d.ts +11 -0
- package/lib/admin/action-admin/state/admin-action.service.d.ts +16 -0
- package/lib/admin/action-admin/state/admin-action.store.d.ts +8 -0
- package/lib/admin/api-admin/api-admin.module.d.ts +17 -0
- package/lib/admin/api-admin/components/api-admin-form/api-admin-form.component.d.ts +35 -0
- package/lib/admin/api-admin/components/api-admin-list/api-admin-list.component.d.ts +15 -0
- package/lib/admin/api-admin/models/api-config.model.d.ts +17 -0
- package/lib/admin/api-admin/state/api-admin.service.d.ts +19 -0
- package/lib/admin/api-admin/state/api-admin.store.d.ts +8 -0
- package/lib/admin/dd-admin/components/dd-admin-form/dd-admin-form.component.d.ts +35 -0
- package/lib/admin/dd-admin/components/dd-admin-item-form/dd-admin-item-form.component.d.ts +27 -0
- package/lib/admin/dd-admin/components/dd-admin-list/dd-admin-list.component.d.ts +13 -0
- package/lib/admin/dd-admin/dd-admin.module.d.ts +20 -0
- package/lib/admin/dd-admin/models/api-property.model.d.ts +6 -0
- package/lib/admin/dd-admin/models/dd-attribute-sidebar-view.model.d.ts +4 -0
- package/lib/admin/dd-admin/models/dictionary.model.d.ts +13 -0
- package/lib/admin/dd-admin/state/dictionary.query.d.ts +16 -0
- package/lib/admin/dd-admin/state/dictionary.service.d.ts +17 -0
- package/lib/admin/dd-admin/state/dictionary.state.d.ts +13 -0
- package/lib/admin/dd-admin/state/dictionary.store.d.ts +10 -0
- package/lib/admin/queue-admin/components/queue-admin-form/queue-admin-form.component.d.ts +33 -0
- package/lib/admin/queue-admin/components/queue-admin-list/queue-admin-list.component.d.ts +18 -0
- package/lib/admin/queue-admin/components/queue-application-list/queue-application-list.component.d.ts +28 -0
- package/lib/admin/queue-admin/models/queue.model.d.ts +13 -0
- package/lib/admin/queue-admin/queue-admin-routing.module.d.ts +7 -0
- package/lib/admin/queue-admin/queue-admin.module.d.ts +15 -0
- package/lib/admin/queue-admin/state/queue.query.d.ts +10 -0
- package/lib/admin/queue-admin/state/queue.service.d.ts +16 -0
- package/lib/admin/queue-admin/state/queue.state.d.ts +6 -0
- package/lib/admin/queue-admin/state/queue.store.d.ts +8 -0
- package/lib/admin/widget-admin/components/widget-admin-form/widget-admin-form.component.d.ts +38 -0
- package/lib/admin/widget-admin/components/widget-admin-list/widget-admin-list.component.d.ts +14 -0
- package/lib/admin/widget-admin/models/widget.model.d.ts +27 -0
- package/lib/admin/widget-admin/state/widget-admin.query.d.ts +13 -0
- package/lib/admin/widget-admin/state/widget-admin.service.d.ts +17 -0
- package/lib/admin/widget-admin/state/widget-admin.store.d.ts +11 -0
- package/lib/admin/widget-admin/widget-admin.module.d.ts +20 -0
- package/lib/shared/_base/base-container/base-container.component.d.ts +10 -0
- package/lib/shared/_base/base-control/base-control.component.d.ts +22 -0
- package/lib/shared/_base/base-form/base-form.component.d.ts +34 -0
- package/lib/shared/_base/base-list/base-list.component.d.ts +22 -0
- package/lib/shared/components/form-container/form-container.component.d.ts +21 -0
- package/lib/shared/components/list/block-list.component.d.ts +16 -0
- package/lib/shared/components/queue-search-customer/queue-search-customer.component.d.ts +10 -0
- package/lib/shared/components/sidebar/sidebar.component.d.ts +13 -0
- package/lib/shared/constant/CSS.d.ts +11 -0
- package/lib/shared/constant/DATASOURCES.d.ts +15 -0
- package/lib/shared/constant/ERROR.d.ts +15 -0
- package/lib/shared/constant/HEADERS.d.ts +4 -0
- package/lib/shared/constant/LIST-CONFIG.d.ts +7 -0
- package/lib/shared/constant/LOOKUPS.d.ts +3 -0
- package/lib/shared/constant/MESSAGES.d.ts +6 -0
- package/lib/shared/constant/ROUTES.d.ts +13 -0
- package/lib/shared/constant/SHARED.d.ts +183 -0
- package/lib/shared/constant/URLS.d.ts +7 -0
- package/lib/shared/controls/button/button.component.d.ts +6 -0
- package/lib/shared/controls/check-box/check-box.component.d.ts +9 -0
- package/lib/shared/controls/date/date.component.d.ts +12 -0
- package/lib/shared/controls/dropdown/dropdown.component.d.ts +22 -0
- package/lib/shared/controls/file-upload/file-upload.component.d.ts +7 -0
- package/lib/shared/controls/password/password.component.d.ts +9 -0
- package/lib/shared/controls/text-area/text-area.component.d.ts +8 -0
- package/lib/shared/controls/text-box/text-box.component.d.ts +7 -0
- package/lib/shared/controls/username/username.component.d.ts +6 -0
- package/lib/shared/index.d.ts +31 -0
- package/lib/shared/models/attribute.model.d.ts +43 -0
- package/lib/shared/models/base.model.d.ts +3 -0
- package/lib/shared/models/list.model.d.ts +11 -0
- package/lib/shared/pipe/capitalize-words.pipe.d.ts +7 -0
- package/lib/shared/services/app-config.service.d.ts +18 -0
- package/lib/shared/services/auth/auth.guard.d.ts +12 -0
- package/lib/shared/services/data-transformer.service.d.ts +8 -0
- package/lib/shared/services/date-parser.service.d.ts +7 -0
- package/lib/shared/services/list.service.d.ts +13 -0
- package/lib/shared/services/session.service.d.ts +13 -0
- package/lib/shared/services/table.builder.d.ts +14 -0
- package/lib/shared/services/validator.service.d.ts +7 -0
- package/lib/shared/shared.module.d.ts +35 -0
- package/lib/shared/state/base.query.d.ts +23 -0
- package/lib/shared/state/base.service.d.ts +27 -0
- package/lib/shared/state/base.state.d.ts +4 -0
- package/lib/shared/state/base.store.d.ts +27 -0
- package/lib/shared/table-primary/components/table-primary.component.d.ts +26 -0
- package/lib/shared/table-primary/models/table-primary-header.model.d.ts +6 -0
- package/lib/shared/table-primary/models/table-primary.model.d.ts +5 -0
- package/lib/widget/components/widget-body/widget-body.component.d.ts +7 -0
- package/lib/widget/components/widget-container/widget-container.component.d.ts +17 -0
- package/lib/widget/components/widget-footer/widget-footer.component.d.ts +11 -0
- package/lib/widget/components/widget-header/widget-header.component.d.ts +7 -0
- package/lib/widget/components/widget-item/widget-item.component.d.ts +7 -0
- package/lib/widget/models/widget.model.d.ts +13 -0
- package/lib/widget/state/widget.query.d.ts +15 -0
- package/lib/widget/state/widget.service.d.ts +18 -0
- package/lib/widget/state/widget.store.d.ts +14 -0
- package/lib/widget/widget.module.d.ts +17 -0
- package/package.json +25 -0
- package/public-api.d.ts +18 -0
- package/src/assets/config/api.config.json +7 -0
|
@@ -0,0 +1,3185 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, Input, Output, Injectable, ViewEncapsulation, Pipe, NgModule, APP_INITIALIZER } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i3$1 from '@angular/forms';
|
|
6
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
+
import * as i2$2 from 'primeng/inputtext';
|
|
8
|
+
import { InputTextModule } from 'primeng/inputtext';
|
|
9
|
+
import * as i3$4 from 'primeng/dropdown';
|
|
10
|
+
import { DropdownModule } from 'primeng/dropdown';
|
|
11
|
+
import { InputGroupModule } from 'primeng/inputgroup';
|
|
12
|
+
import * as i2$1 from 'primeng/button';
|
|
13
|
+
import { ButtonModule } from 'primeng/button';
|
|
14
|
+
import * as i7 from 'primeng/card';
|
|
15
|
+
import { CardModule } from 'primeng/card';
|
|
16
|
+
import * as i3 from 'primeng/sidebar';
|
|
17
|
+
import { SidebarModule } from 'primeng/sidebar';
|
|
18
|
+
import * as i2 from 'primeng/api';
|
|
19
|
+
import { MessageService, ConfirmationService } from 'primeng/api';
|
|
20
|
+
import * as i4 from 'primeng/divider';
|
|
21
|
+
import { DividerModule } from 'primeng/divider';
|
|
22
|
+
import * as i3$2 from 'primeng/checkbox';
|
|
23
|
+
import { CheckboxModule } from 'primeng/checkbox';
|
|
24
|
+
import { EntityStore, StoreConfig, QueryEntity } from '@datorama/akita';
|
|
25
|
+
import { __decorate } from 'tslib';
|
|
26
|
+
import { BehaviorSubject, firstValueFrom, of, tap as tap$1, map, catchError, Subscription } from 'rxjs';
|
|
27
|
+
import { DragDropModule } from 'primeng/dragdrop';
|
|
28
|
+
import * as i4$2 from 'primeng/confirmdialog';
|
|
29
|
+
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
30
|
+
import * as i5 from 'primeng/toast';
|
|
31
|
+
import { ToastModule } from 'primeng/toast';
|
|
32
|
+
import * as i6 from 'primeng/messages';
|
|
33
|
+
import { MessagesModule } from 'primeng/messages';
|
|
34
|
+
import * as i4$1 from 'primeng/tooltip';
|
|
35
|
+
import { TooltipModule } from 'primeng/tooltip';
|
|
36
|
+
import * as i3$3 from '@angular/router';
|
|
37
|
+
import { RouterModule } from '@angular/router';
|
|
38
|
+
import { tap } from 'rxjs/operators';
|
|
39
|
+
import * as i1$1 from '@angular/common/http';
|
|
40
|
+
import { HttpClientModule } from '@angular/common/http';
|
|
41
|
+
import * as i2$4 from 'primeng/inputtextarea';
|
|
42
|
+
import { InputTextareaModule } from 'primeng/inputtextarea';
|
|
43
|
+
import * as i3$5 from 'primeng/calendar';
|
|
44
|
+
import { CalendarModule } from 'primeng/calendar';
|
|
45
|
+
import moment from 'moment';
|
|
46
|
+
import { DialogModule } from 'primeng/dialog';
|
|
47
|
+
import { TimelineModule } from 'primeng/timeline';
|
|
48
|
+
import { ListboxModule } from 'primeng/listbox';
|
|
49
|
+
import * as i2$3 from 'primeng/fileupload';
|
|
50
|
+
import { FileUploadModule } from 'primeng/fileupload';
|
|
51
|
+
import { RippleModule } from 'primeng/ripple';
|
|
52
|
+
import * as i3$6 from 'primeng/badge';
|
|
53
|
+
import { BadgeModule } from 'primeng/badge';
|
|
54
|
+
import * as i3$7 from 'primeng/table';
|
|
55
|
+
import { TableModule } from 'primeng/table';
|
|
56
|
+
import { ToggleButtonModule } from 'primeng/togglebutton';
|
|
57
|
+
import { InputSwitchModule } from 'primeng/inputswitch';
|
|
58
|
+
import * as i10 from '@kerwin612/ngx-query-builder';
|
|
59
|
+
import { QueryBuilderModule } from '@kerwin612/ngx-query-builder';
|
|
60
|
+
|
|
61
|
+
class SHARED {
|
|
62
|
+
static EMPTY = "";
|
|
63
|
+
static REQUIRED_ERROR = "Field Required";
|
|
64
|
+
static EMPTYARRAY = [];
|
|
65
|
+
static NULL = "NULL";
|
|
66
|
+
static HIPHEN = "-";
|
|
67
|
+
static SLASH = "/";
|
|
68
|
+
static USERROLE = "role";
|
|
69
|
+
static SESSIONKEY = "userData";
|
|
70
|
+
static SUCCESS = "success";
|
|
71
|
+
static ERROR = "error";
|
|
72
|
+
static ERROR_MESSAGE = "Success Message";
|
|
73
|
+
static SUCCESS_MESSAGE = "Success Message";
|
|
74
|
+
static DICTIONARY = "Dictionary";
|
|
75
|
+
static TITLE = 'title';
|
|
76
|
+
static DICTIONARY_ITEM = 'dictionaryItem';
|
|
77
|
+
static DICTIONARY_ITEM_MAPPER = 'dictionaryItemMapper';
|
|
78
|
+
static SIDEBAR_MASK = '.p-sidebar-mask';
|
|
79
|
+
static CUSTOMSIDEBAROVERLAY = 'custom-sidebar-overlay';
|
|
80
|
+
static ID = 'id';
|
|
81
|
+
static _ID = '_id';
|
|
82
|
+
static DATE_FORMAT = "DD/MM/YYYY";
|
|
83
|
+
static DATE_FORMAT_TYPE2 = "DD-MM-YYYY";
|
|
84
|
+
static DATE_FORMAT_TYPE3 = "YY-MM-DD";
|
|
85
|
+
static DATE_FORMAT_TYPE4 = "YYYY-MM-DD";
|
|
86
|
+
static INVALIDDATE = "Invalid Date";
|
|
87
|
+
static __V = '__v';
|
|
88
|
+
static CREATEDAT = 'createdAt';
|
|
89
|
+
static UPDATEDAT = 'updatedAt';
|
|
90
|
+
static ZERO = 0;
|
|
91
|
+
static TYPE_OBJECT = 'object';
|
|
92
|
+
static DICTIONARYITEMS = 'dictionaryItems';
|
|
93
|
+
static GET_DATA_MESSAGE = [{ severity: 'info', detail: 'Data has been fetched successfully.', life: 1000 }];
|
|
94
|
+
static PRIMARY = 'primary';
|
|
95
|
+
static mappingInfo = 'mappingInfo';
|
|
96
|
+
static YES = 'Yes';
|
|
97
|
+
static NO = 'No';
|
|
98
|
+
static selectedQueue = 'selectedQueue';
|
|
99
|
+
static DASH = "-";
|
|
100
|
+
static selectedApplication = 'selectedApplication';
|
|
101
|
+
static selectedApplicationNumber = 'selectedApplicationNumber';
|
|
102
|
+
static GREEN = "green";
|
|
103
|
+
static RED = "red";
|
|
104
|
+
static FROM_EMAIL = "neeraj.kumar@catura.co.uk";
|
|
105
|
+
static to_EMAIL = "shubham.prajapati@dynamatix.com";
|
|
106
|
+
static EMAIL = 'email';
|
|
107
|
+
static token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxOTI2ZjcyN2RkZWI0MDAxMWE2ZDZmNyIsIm5hbWUiOiJKb2huIERvZSIsInJvbGUiOiJ1c2VyIiwiaWF0IjoxNjQyNzQ5MzYyLCJleHAiOjE2NDI4MzU3NjJ9.4fBQqP2_6z0H4Ow7J-R27XEdIgl2MrMoIXCgD_qZFlA';
|
|
108
|
+
static null = 'null';
|
|
109
|
+
static undefined = 'undefined';
|
|
110
|
+
static rationale = 'rationale';
|
|
111
|
+
static accepted = 'Accepted';
|
|
112
|
+
static application = 'Application';
|
|
113
|
+
static INVALID_API_PATH = 'Please enter the API path.';
|
|
114
|
+
static WIDTH_AUTO = 'w-auto';
|
|
115
|
+
static TRUE = true;
|
|
116
|
+
static FALSE = false;
|
|
117
|
+
static STRING_TRUE = "true";
|
|
118
|
+
static STRING_FALSE = "false";
|
|
119
|
+
static AND = 'AND';
|
|
120
|
+
static STRING = 'string';
|
|
121
|
+
static OPERATORS = ["=", "<>", ">", "<", ">=", "<="];
|
|
122
|
+
static STATUS_ACTIVE = 'active';
|
|
123
|
+
static TODAY = 'Today';
|
|
124
|
+
static YESTERDAY = 'Yesterday';
|
|
125
|
+
static ALL = 'All';
|
|
126
|
+
static UK = 'UK';
|
|
127
|
+
static INTERNATIONAL = 'International';
|
|
128
|
+
static QUEUE1 = 'Q1';
|
|
129
|
+
static QUEUE2 = 'Q2';
|
|
130
|
+
static QUEUE3 = 'Q3';
|
|
131
|
+
static SELECTED_QUEUE = 'Selected Queue:';
|
|
132
|
+
static QUEUEID = "queueId";
|
|
133
|
+
static QUESTION_MARK = "?";
|
|
134
|
+
static EQUALS = "=";
|
|
135
|
+
static AMPERSAND = "&";
|
|
136
|
+
static RECORDID = "recordId";
|
|
137
|
+
static MISSING_QUEUE_ID = "Missing queueId";
|
|
138
|
+
static MISSING_RECORD_ID = "Missing recordId";
|
|
139
|
+
static EMPTY_STRING = " ";
|
|
140
|
+
static SELECTED_QUEUE_ID = "selectedQueueId";
|
|
141
|
+
static ISITEMEXPRESSION = "isItemExpression";
|
|
142
|
+
}
|
|
143
|
+
const MESSAGE_TYPES = ['SMS', 'WhatsApp', 'Email'];
|
|
144
|
+
const delimiters = ['|', '/', '-'];
|
|
145
|
+
const dictionaryItemList = [];
|
|
146
|
+
const dictionaryItemMapperList = [];
|
|
147
|
+
const dictionaryApiFieldList = {
|
|
148
|
+
title: 'Property data',
|
|
149
|
+
data: [{ name: 'First name' },
|
|
150
|
+
{ name: 'Last name' },
|
|
151
|
+
{ name: 'Email' },
|
|
152
|
+
{ name: 'Address' },
|
|
153
|
+
{ name: 'Gender' },
|
|
154
|
+
{ name: 'Dob' }
|
|
155
|
+
]
|
|
156
|
+
};
|
|
157
|
+
const FolderPanel = [
|
|
158
|
+
{
|
|
159
|
+
_id: 'folder1',
|
|
160
|
+
fileCount: 10,
|
|
161
|
+
text: 'Documents',
|
|
162
|
+
missingFiles: 3,
|
|
163
|
+
pendingFiles: 2
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
_id: 'folder2',
|
|
167
|
+
fileCount: 5,
|
|
168
|
+
text: 'Images',
|
|
169
|
+
missingFiles: 0,
|
|
170
|
+
pendingFiles: 1
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
_id: 'folder3',
|
|
174
|
+
fileCount: 20,
|
|
175
|
+
text: 'Reports',
|
|
176
|
+
missingFiles: 5,
|
|
177
|
+
pendingFiles: 0
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
_id: 'folder4',
|
|
181
|
+
fileCount: 8,
|
|
182
|
+
text: 'Videos',
|
|
183
|
+
missingFiles: 0,
|
|
184
|
+
pendingFiles: 0
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
_id: 'folder5',
|
|
188
|
+
fileCount: 15,
|
|
189
|
+
text: 'Archives',
|
|
190
|
+
missingFiles: 1,
|
|
191
|
+
pendingFiles: 3
|
|
192
|
+
}
|
|
193
|
+
];
|
|
194
|
+
const DocumentList = [
|
|
195
|
+
{
|
|
196
|
+
id: 1,
|
|
197
|
+
fileName: 'Document 1',
|
|
198
|
+
status: 'pending',
|
|
199
|
+
documentUrl: 'https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf',
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
id: 2,
|
|
203
|
+
fileName: 'Document 2',
|
|
204
|
+
status: 'verified',
|
|
205
|
+
documentUrl: 'https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf',
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
id: 3,
|
|
209
|
+
fileName: 'Document 3',
|
|
210
|
+
status: 'sentReminder',
|
|
211
|
+
documentUrl: 'https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf',
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
id: 4,
|
|
215
|
+
fileName: 'Document 4',
|
|
216
|
+
status: 'pending',
|
|
217
|
+
documentUrl: 'https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf',
|
|
218
|
+
},
|
|
219
|
+
];
|
|
220
|
+
const widgetLinkList = [
|
|
221
|
+
{ name: 'https://dummy-url.com/NY', code: 'NY' },
|
|
222
|
+
{ name: 'https://dummy-url.com/RM', code: 'RM' },
|
|
223
|
+
{ name: 'https://dummy-url.com/LDN', code: 'LDN' },
|
|
224
|
+
{ name: 'https://dummy-url.com/IST', code: 'IST' },
|
|
225
|
+
{ name: 'https://dummy-url.com/PRS', code: 'PRS' }
|
|
226
|
+
];
|
|
227
|
+
const dictionaryList = [
|
|
228
|
+
{ "id": 1, "Name": "John Doe", "API": "Dynamatix.com/getfinance" },
|
|
229
|
+
{ "id": 2, "Name": "Jane Smith", "API": "Dynamatix.com/getfinance" },
|
|
230
|
+
{ "id": 3, "Name": "David Lee", "API": "Dynamatix.com/getfinance" },
|
|
231
|
+
{ "id": 4, "Name": "Emma Wilson", "API": "Dynamatix.com/getfinance" },
|
|
232
|
+
{ "id": 5, "Name": "Michael Brown", "API": "Dynamatix.com/getfinance" }
|
|
233
|
+
];
|
|
234
|
+
const SEQUENTIAL_MESSAGE = [
|
|
235
|
+
"Your case is under review.",
|
|
236
|
+
"We have received your application.",
|
|
237
|
+
"A new update is available for your case.",
|
|
238
|
+
"Please verify your contact details.",
|
|
239
|
+
"Your case is pending further action.",
|
|
240
|
+
"We are processing your request.",
|
|
241
|
+
"Your case has been escalated.",
|
|
242
|
+
"Thank you for reaching out.",
|
|
243
|
+
"Your documents have been received.",
|
|
244
|
+
"Our team will contact you shortly."
|
|
245
|
+
];
|
|
246
|
+
const apiHiddenHeaderList = ['credentials', 'createdAt', 'updatedAt', '__v', 'properties', '_id'];
|
|
247
|
+
const dictionaryHiddenHeaderList = ['dictionaryItems', '_id', '__v', 'updatedAt', 'createdAt'];
|
|
248
|
+
const widgetHiddenHeaderList = ['_id', 'dataItems', '__v', 'createdAt', 'updatedAt', 'headerDictionaryID', 'headerDictionaryItemID', 'order', 'subHeaderDictionaryID', 'subHeaderDictionaryItemID'];
|
|
249
|
+
const hiddenHeaderList = ['status', 'actions'];
|
|
250
|
+
const expectedRoutes = ['apiManagement', 'queue', 'dictionary', 'widget'];
|
|
251
|
+
const mileList = [
|
|
252
|
+
{ name: '0.5 Mile', value: 0.5 },
|
|
253
|
+
{ name: '1 Mile', value: 1 }
|
|
254
|
+
];
|
|
255
|
+
const messageType = [
|
|
256
|
+
{ name: 'Email', icon: 'pi pi-envelope' },
|
|
257
|
+
{ name: 'WhatsApp', icon: 'pi pi-whatsapp' },
|
|
258
|
+
{ name: 'SMS', icon: 'pi pi-comment' },
|
|
259
|
+
];
|
|
260
|
+
const propertyDataList = [
|
|
261
|
+
{
|
|
262
|
+
key: '0',
|
|
263
|
+
label: 'Documents',
|
|
264
|
+
data: 'Documents Folder',
|
|
265
|
+
icon: 'pi pi-fw pi-inbox',
|
|
266
|
+
children: [
|
|
267
|
+
{
|
|
268
|
+
key: '0-0',
|
|
269
|
+
label: 'Work',
|
|
270
|
+
data: 'Work Folder',
|
|
271
|
+
icon: 'pi pi-fw pi-cog',
|
|
272
|
+
children: [
|
|
273
|
+
{ key: '0-0-0', label: 'Expenses.doc', icon: 'pi pi-fw pi-file', data: 'Expenses Document' },
|
|
274
|
+
{ key: '0-0-1', label: 'Resume.doc', icon: 'pi pi-fw pi-file', data: 'Resume Document' }
|
|
275
|
+
]
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
key: '0-1',
|
|
279
|
+
label: 'Home',
|
|
280
|
+
data: 'Home Folder',
|
|
281
|
+
icon: 'pi pi-fw pi-home',
|
|
282
|
+
children: [{ key: '0-1-0', label: 'Invoices.txt', icon: 'pi pi-fw pi-file', data: 'Invoices for this month' }]
|
|
283
|
+
}
|
|
284
|
+
]
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
key: '1',
|
|
288
|
+
label: 'Events',
|
|
289
|
+
data: 'Events Folder',
|
|
290
|
+
icon: 'pi pi-fw pi-calendar',
|
|
291
|
+
children: [
|
|
292
|
+
{ key: '1-0', label: 'Meeting', icon: 'pi pi-fw pi-calendar-plus', data: 'Meeting' },
|
|
293
|
+
{ key: '1-1', label: 'Product Launch', icon: 'pi pi-fw pi-calendar-plus', data: 'Product Launch' },
|
|
294
|
+
{ key: '1-2', label: 'Report Review', icon: 'pi pi-fw pi-calendar-plus', data: 'Report Review' }
|
|
295
|
+
]
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
key: '2',
|
|
299
|
+
label: 'Movies',
|
|
300
|
+
data: 'Movies Folder',
|
|
301
|
+
icon: 'pi pi-fw pi-star-fill',
|
|
302
|
+
children: [
|
|
303
|
+
{
|
|
304
|
+
key: '2-0',
|
|
305
|
+
icon: 'pi pi-fw pi-star-fill',
|
|
306
|
+
label: 'Al Pacino',
|
|
307
|
+
data: 'Pacino Movies',
|
|
308
|
+
children: [
|
|
309
|
+
{ key: '2-0-0', label: 'Scarface', icon: 'pi pi-fw pi-video', data: 'Scarface Movie' },
|
|
310
|
+
{ key: '2-0-1', label: 'Serpico', icon: 'pi pi-fw pi-video', data: 'Serpico Movie' }
|
|
311
|
+
]
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
key: '2-1',
|
|
315
|
+
label: 'Robert De Niro',
|
|
316
|
+
icon: 'pi pi-fw pi-star-fill',
|
|
317
|
+
data: 'De Niro Movies',
|
|
318
|
+
children: [
|
|
319
|
+
{ key: '2-1-0', label: 'Goodfellas', icon: 'pi pi-fw pi-video', data: 'Goodfellas Movie' },
|
|
320
|
+
{ key: '2-1-1', label: 'Untouchables', icon: 'pi pi-fw pi-video', data: 'Untouchables Movie', selectable: false }
|
|
321
|
+
]
|
|
322
|
+
}
|
|
323
|
+
]
|
|
324
|
+
}
|
|
325
|
+
];
|
|
326
|
+
const actionHiddenHeaderList = ['_id', 'createdAt', 'updatedAt', '__v', 'formFields'];
|
|
327
|
+
const actionList = [
|
|
328
|
+
{ action: 'Valuation Fee',
|
|
329
|
+
prompt: `The following conversation includes references to various addresses. Based on the selected form "Valuation Fee",
|
|
330
|
+
identify and extract the most recent address provided (in descending order of appearance in the text) and map it to the following schema::
|
|
331
|
+
{
|
|
332
|
+
"Line1": string,
|
|
333
|
+
"Line2": string,
|
|
334
|
+
"town": string,
|
|
335
|
+
"postcode": string
|
|
336
|
+
}.
|
|
337
|
+
|
|
338
|
+
Respond **only** with a valid JSON object matching this schema. Do not include any explanation, additional text, or comments.
|
|
339
|
+
|
|
340
|
+
Data:`, queueId: '674f1c645dafa6a66511c8fb', apiEndPoint: 'http://qa-gb.api.dynamatix.com:3100/api/applications', status: 'Enable'
|
|
341
|
+
},
|
|
342
|
+
{ action: 'UK Resident',
|
|
343
|
+
prompt: `
|
|
344
|
+
The following conversation involves information related to UK residency. Based on the selected form "UK Resident",
|
|
345
|
+
extract the most recent address mentioned (in descending order of appearance in the text) and map it to the following schema::
|
|
346
|
+
{
|
|
347
|
+
"Line1": string,
|
|
348
|
+
"Line2": string,
|
|
349
|
+
"town": string,
|
|
350
|
+
"postcode": string
|
|
351
|
+
}.
|
|
352
|
+
|
|
353
|
+
Respond **only** with a valid JSON object matching this schema. Do not include any explanation, additional text, or comments.
|
|
354
|
+
|
|
355
|
+
Data:`, queueId: '676e4b27ee779eafc72b11b9', apiEndPoint: 'http://qa-gb.api.dynamatix.com:3100/api/applications', status: 'Disable'
|
|
356
|
+
},
|
|
357
|
+
{ action: 'Address Update',
|
|
358
|
+
prompt: `
|
|
359
|
+
The following conversation contains updates related to address changes. Based on the selected form "Address Update",
|
|
360
|
+
identify and extract the most recent address mentioned (in descending order of appearance in the text) and map it to the following schema::
|
|
361
|
+
{
|
|
362
|
+
"Line1": string,
|
|
363
|
+
"Line2": string,
|
|
364
|
+
"town": string,
|
|
365
|
+
"postcode": string
|
|
366
|
+
}.
|
|
367
|
+
|
|
368
|
+
Respond **only** with a valid JSON object matching this schema. Do not include any explanation, additional text, or comments.
|
|
369
|
+
|
|
370
|
+
Data:`, queueId: '67332cf2f9439e97c47a3c43', apiEndPoint: 'http://qa-gb.api.dynamatix.com:3100/api/applications', status: 'Enable'
|
|
371
|
+
}
|
|
372
|
+
];
|
|
373
|
+
const actionTableColumnWidthList = { name: 'w-3', apiConfigID: 'w-3', queueID: 'w-3', prompt: 'w-4', isActive: 'w-2' };
|
|
374
|
+
|
|
375
|
+
class SidebarComponent {
|
|
376
|
+
renderer;
|
|
377
|
+
isSidebarVisible;
|
|
378
|
+
title;
|
|
379
|
+
onClose = new EventEmitter();
|
|
380
|
+
constructor(renderer) {
|
|
381
|
+
this.renderer = renderer;
|
|
382
|
+
}
|
|
383
|
+
onSidebarShow() {
|
|
384
|
+
const overlay = document.querySelector(SHARED.SIDEBAR_MASK);
|
|
385
|
+
if (overlay) {
|
|
386
|
+
this.renderer.addClass(overlay, SHARED.CUSTOMSIDEBAROVERLAY);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
handleSidebarClose() {
|
|
390
|
+
this.onClose.emit(false);
|
|
391
|
+
}
|
|
392
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: SidebarComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
393
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: SidebarComponent, isStandalone: false, selector: "sidebar", inputs: { isSidebarVisible: "isSidebarVisible", title: "title" }, outputs: { onClose: "onClose" }, ngImport: i0, template: "<div *ngIf=\"isSidebarVisible\" class=\"backdrop-shadow\" (click)=\"handleSidebarClose()\"></div>\r\n<div>\r\n<p-sidebar class=\"sidebar-panel-wrapper\" [(visible)]=\"isSidebarVisible\" (onShow)=\"onSidebarShow()\" (onHide)=\"handleSidebarClose()\" [position]=\"'right'\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"flex align-items-center\">\r\n <h2 class=\"sidebar-title-wrapper text-color mb-0\">\r\n {{title}}\r\n </h2>\r\n </div>\r\n </ng-template>\r\n <p-divider class=\"sidebar-devider\"></p-divider>\r\n <ng-content></ng-content>\r\n</p-sidebar>", styles: ["::ng-deep .custom-sidebar-overlay{z-index:0!important}::ng-deep .sidebar-panel-wrapper .p-sidebar-header{padding:1.4rem 1rem}::ng-deep .sidebar-panel-wrapper .p-sidebar-content{padding:0}::ng-deep .sidebar-panel-wrapper .p-sidebar-right{width:35%!important}::ng-deep .sidebar-devider .p-divider{margin:0}.sidebar-title-wrapper{font-size:24px;font-weight:700}.backdrop-shadow{position:fixed;top:0;left:0;width:100%;height:100%;background:#00000080;z-index:999}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i3.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: i4.Divider, selector: "p-divider", inputs: ["style", "styleClass", "layout", "type", "align"] }] });
|
|
394
|
+
}
|
|
395
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: SidebarComponent, decorators: [{
|
|
396
|
+
type: Component,
|
|
397
|
+
args: [{ selector: 'sidebar', standalone: false, template: "<div *ngIf=\"isSidebarVisible\" class=\"backdrop-shadow\" (click)=\"handleSidebarClose()\"></div>\r\n<div>\r\n<p-sidebar class=\"sidebar-panel-wrapper\" [(visible)]=\"isSidebarVisible\" (onShow)=\"onSidebarShow()\" (onHide)=\"handleSidebarClose()\" [position]=\"'right'\">\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"flex align-items-center\">\r\n <h2 class=\"sidebar-title-wrapper text-color mb-0\">\r\n {{title}}\r\n </h2>\r\n </div>\r\n </ng-template>\r\n <p-divider class=\"sidebar-devider\"></p-divider>\r\n <ng-content></ng-content>\r\n</p-sidebar>", styles: ["::ng-deep .custom-sidebar-overlay{z-index:0!important}::ng-deep .sidebar-panel-wrapper .p-sidebar-header{padding:1.4rem 1rem}::ng-deep .sidebar-panel-wrapper .p-sidebar-content{padding:0}::ng-deep .sidebar-panel-wrapper .p-sidebar-right{width:35%!important}::ng-deep .sidebar-devider .p-divider{margin:0}.sidebar-title-wrapper{font-size:24px;font-weight:700}.backdrop-shadow{position:fixed;top:0;left:0;width:100%;height:100%;background:#00000080;z-index:999}\n"] }]
|
|
398
|
+
}], ctorParameters: () => [{ type: i0.Renderer2 }], propDecorators: { isSidebarVisible: [{
|
|
399
|
+
type: Input
|
|
400
|
+
}], title: [{
|
|
401
|
+
type: Input
|
|
402
|
+
}], onClose: [{
|
|
403
|
+
type: Output
|
|
404
|
+
}] } });
|
|
405
|
+
|
|
406
|
+
var BaseStore_1;
|
|
407
|
+
/**
|
|
408
|
+
* BaseStore is a generic class that extends EntityStore from Akita.
|
|
409
|
+
*/
|
|
410
|
+
let BaseStore = class BaseStore extends EntityStore {
|
|
411
|
+
static { BaseStore_1 = this; }
|
|
412
|
+
static storeName = 'base';
|
|
413
|
+
recordChange$;
|
|
414
|
+
onDocumentAccept$;
|
|
415
|
+
onDailogClose$;
|
|
416
|
+
openDocument$;
|
|
417
|
+
alertMessage$;
|
|
418
|
+
constructor() {
|
|
419
|
+
super({ records: [], lists: [] }, { name: BaseStore_1.storeName });
|
|
420
|
+
this.recordChange$ = new BehaviorSubject([]);
|
|
421
|
+
this.onDocumentAccept$ = new BehaviorSubject({});
|
|
422
|
+
this.onDailogClose$ = new BehaviorSubject(false);
|
|
423
|
+
this.openDocument$ = new BehaviorSubject({});
|
|
424
|
+
this.alertMessage$ = new BehaviorSubject('');
|
|
425
|
+
}
|
|
426
|
+
setList(data) {
|
|
427
|
+
this.update({ lists: data });
|
|
428
|
+
}
|
|
429
|
+
setRecordChange(value) {
|
|
430
|
+
this.recordChange$.next(value);
|
|
431
|
+
}
|
|
432
|
+
setOnDocumentAccept(value) {
|
|
433
|
+
this.onDocumentAccept$.next(value);
|
|
434
|
+
}
|
|
435
|
+
setOnDailogClose(value) {
|
|
436
|
+
this.onDailogClose$.next(value);
|
|
437
|
+
}
|
|
438
|
+
setOpenDocument(value) {
|
|
439
|
+
this.openDocument$.next(value);
|
|
440
|
+
}
|
|
441
|
+
setAlertMessage(value) {
|
|
442
|
+
this.alertMessage$.next(value);
|
|
443
|
+
}
|
|
444
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
445
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseStore, providedIn: 'root' });
|
|
446
|
+
};
|
|
447
|
+
BaseStore = BaseStore_1 = __decorate([
|
|
448
|
+
StoreConfig({ name: 'base' })
|
|
449
|
+
], BaseStore);
|
|
450
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseStore, decorators: [{
|
|
451
|
+
type: Injectable,
|
|
452
|
+
args: [{ providedIn: 'root' }]
|
|
453
|
+
}], ctorParameters: () => [] });
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* BaseQuery is a generic class that extends QueryEntity from Akita.
|
|
457
|
+
* It provides methods to interact with the state of entities managed by the BaseStore.
|
|
458
|
+
*/
|
|
459
|
+
class BaseQuery extends QueryEntity {
|
|
460
|
+
store;
|
|
461
|
+
constructor(store) {
|
|
462
|
+
super(store);
|
|
463
|
+
this.store = store;
|
|
464
|
+
}
|
|
465
|
+
selectAllEntities() {
|
|
466
|
+
return this.selectAll();
|
|
467
|
+
}
|
|
468
|
+
selectEntityById(id) {
|
|
469
|
+
return this.selectEntity(id);
|
|
470
|
+
}
|
|
471
|
+
getLists() {
|
|
472
|
+
return this.select(state => state.lists);
|
|
473
|
+
}
|
|
474
|
+
getRecordChange() {
|
|
475
|
+
return this.store.recordChange$.asObservable();
|
|
476
|
+
}
|
|
477
|
+
getOnDocumentAccept() {
|
|
478
|
+
return this.store.onDocumentAccept$.asObservable();
|
|
479
|
+
}
|
|
480
|
+
getonDailogClose() {
|
|
481
|
+
return this.store.onDailogClose$.asObservable();
|
|
482
|
+
}
|
|
483
|
+
getOpenDocument() {
|
|
484
|
+
return this.store.openDocument$.asObservable();
|
|
485
|
+
}
|
|
486
|
+
getAlertMessage() {
|
|
487
|
+
return this.store.alertMessage$.asObservable();
|
|
488
|
+
}
|
|
489
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseQuery, deps: [{ token: BaseStore }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
490
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseQuery, providedIn: 'root' });
|
|
491
|
+
}
|
|
492
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseQuery, decorators: [{
|
|
493
|
+
type: Injectable,
|
|
494
|
+
args: [{ providedIn: 'root' }]
|
|
495
|
+
}], ctorParameters: () => [{ type: BaseStore }] });
|
|
496
|
+
|
|
497
|
+
class BaseControlComponent {
|
|
498
|
+
constructor() { }
|
|
499
|
+
store;
|
|
500
|
+
record;
|
|
501
|
+
attributeModel;
|
|
502
|
+
error = "";
|
|
503
|
+
onInput = new EventEmitter();
|
|
504
|
+
onEnterKeydown = new EventEmitter();
|
|
505
|
+
onBtnClick = new EventEmitter();
|
|
506
|
+
query;
|
|
507
|
+
ngOnChanges() {
|
|
508
|
+
if (this.store) {
|
|
509
|
+
this.query = new BaseQuery(this.store);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
handleModelChange(event, valid, val) {
|
|
513
|
+
if (this.attributeModel?.name) {
|
|
514
|
+
this.record[this.attributeModel?.name] = event;
|
|
515
|
+
this.onInput.emit(event);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
// handleEnterKey(event:any, valid: boolean|null) {
|
|
519
|
+
// if (this.attributeModel?.name) {
|
|
520
|
+
// this.record[this.attributeModel?.name] = event;
|
|
521
|
+
// this.onEnterKeydown.emit(event);
|
|
522
|
+
// this.record[this.attributeModel?.name] = SHARED.EMPTY;
|
|
523
|
+
// }
|
|
524
|
+
// }
|
|
525
|
+
handleButtonClick(event) {
|
|
526
|
+
this.onBtnClick.emit(event);
|
|
527
|
+
}
|
|
528
|
+
getValue() {
|
|
529
|
+
return this.record[this.attributeModel.name];
|
|
530
|
+
}
|
|
531
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
532
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: BaseControlComponent, isStandalone: true, selector: "app-base-control", inputs: { store: "store", record: "record", attributeModel: "attributeModel", error: "error" }, outputs: { onInput: "onInput", onEnterKeydown: "onEnterKeydown", onBtnClick: "onBtnClick" }, providers: [BaseStore], usesOnChanges: true, ngImport: i0, template: "<p>base-control works!</p>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
533
|
+
}
|
|
534
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseControlComponent, decorators: [{
|
|
535
|
+
type: Component,
|
|
536
|
+
args: [{ selector: 'app-base-control', standalone: true, imports: [CommonModule], providers: [BaseStore], template: "<p>base-control works!</p>\r\n" }]
|
|
537
|
+
}], ctorParameters: () => [], propDecorators: { store: [{
|
|
538
|
+
type: Input
|
|
539
|
+
}], record: [{
|
|
540
|
+
type: Input
|
|
541
|
+
}], attributeModel: [{
|
|
542
|
+
type: Input
|
|
543
|
+
}], error: [{
|
|
544
|
+
type: Input
|
|
545
|
+
}], onInput: [{
|
|
546
|
+
type: Output
|
|
547
|
+
}], onEnterKeydown: [{
|
|
548
|
+
type: Output
|
|
549
|
+
}], onBtnClick: [{
|
|
550
|
+
type: Output
|
|
551
|
+
}] } });
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* CheckBoxComponent
|
|
555
|
+
*/
|
|
556
|
+
class CheckBoxComponent extends BaseControlComponent {
|
|
557
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: CheckBoxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
558
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: CheckBoxComponent, isStandalone: true, selector: "check-box", usesInheritance: true, ngImport: i0, template: "<div class=\"checkBoxContainer\">\r\n \r\n <div class=\"checkBox\">\r\n <p-checkbox\r\n [disabled]=\"attributeModel.readonly ?? false\"\r\n [binary]=\"true\"\r\n inputId=\"binary\"\r\n [label]=\"attributeModel.displayText ?? ''\"\r\n class=\"dynamic-checkbox\"\r\n #checkBox=\"ngModel\"\r\n [ngModel]=\"this.record[this.attributeModel.name]\"\r\n [style]=\"{\r\n '--checkbox-size': attributeModel.customColumnWidth || '20px',\r\n '--checkbox-height': attributeModel.customHeight || '20px'\r\n }\"\r\n [required]=\"attributeModel.isRequired ?? false\" \r\n (ngModelChange)=\"handleModelChange($event, checkBox.valid)\"\r\n >\r\n </p-checkbox>\r\n <span class=\"asterisk ml-1\" *ngIf=\"attributeModel.isRequired\">*</span>\r\n </div>\r\n</div>", styles: [".asterisk{color:red}.checkBoxContainer{max-height:100%;display:flex;align-items:center;font-family:var(--font-family);position:relative}.checkBox{position:relative;max-width:100%;max-height:100%;word-wrap:break-word}::ng-deep .dynamic-checkbox .p-checkbox{width:var(--checkbox-size)!important;height:var(--checkbox-height)!important}::ng-deep .dynamic-checkbox .p-checkbox .p-checkbox-box{width:var(--checkbox-size)!important;height:var(--checkbox-height)!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i3$2.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }] });
|
|
559
|
+
}
|
|
560
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: CheckBoxComponent, decorators: [{
|
|
561
|
+
type: Component,
|
|
562
|
+
args: [{ selector: 'check-box', standalone: true, imports: [CommonModule, FormsModule, CheckboxModule], template: "<div class=\"checkBoxContainer\">\r\n \r\n <div class=\"checkBox\">\r\n <p-checkbox\r\n [disabled]=\"attributeModel.readonly ?? false\"\r\n [binary]=\"true\"\r\n inputId=\"binary\"\r\n [label]=\"attributeModel.displayText ?? ''\"\r\n class=\"dynamic-checkbox\"\r\n #checkBox=\"ngModel\"\r\n [ngModel]=\"this.record[this.attributeModel.name]\"\r\n [style]=\"{\r\n '--checkbox-size': attributeModel.customColumnWidth || '20px',\r\n '--checkbox-height': attributeModel.customHeight || '20px'\r\n }\"\r\n [required]=\"attributeModel.isRequired ?? false\" \r\n (ngModelChange)=\"handleModelChange($event, checkBox.valid)\"\r\n >\r\n </p-checkbox>\r\n <span class=\"asterisk ml-1\" *ngIf=\"attributeModel.isRequired\">*</span>\r\n </div>\r\n</div>", styles: [".asterisk{color:red}.checkBoxContainer{max-height:100%;display:flex;align-items:center;font-family:var(--font-family);position:relative}.checkBox{position:relative;max-width:100%;max-height:100%;word-wrap:break-word}::ng-deep .dynamic-checkbox .p-checkbox{width:var(--checkbox-size)!important;height:var(--checkbox-height)!important}::ng-deep .dynamic-checkbox .p-checkbox .p-checkbox-box{width:var(--checkbox-size)!important;height:var(--checkbox-height)!important}\n"] }]
|
|
563
|
+
}] });
|
|
564
|
+
|
|
565
|
+
class ButtonComponent extends BaseControlComponent {
|
|
566
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
567
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: ButtonComponent, isStandalone: true, selector: "lib-button", usesInheritance: true, ngImport: i0, template: "<ng-container>\r\n <div class=\"btn-control\">\r\n <p-button\r\n type=\"button\"\r\n [label]=\"attributeModel.buttonLabel ?? 'Click Me'\"\r\n [disabled]=\"attributeModel.isDisabled ?? false\"\r\n [style]=\"{\r\n width: attributeModel.customButtonWidth\r\n ? attributeModel.customButtonWidth\r\n : 'auto',\r\n padding: attributeModel.customPadding\r\n ? attributeModel.customPadding\r\n : '0.5rem' \r\n }\"\r\n [icon]=\"attributeModel.icon ? attributeModel.icon : ''\"\r\n [iconPos]=\"attributeModel.iconPosition ?? 'left'\" \r\n [ngClass]=\"{\r\n 'p-button-primary': attributeModel.isPrimary ?? true,\r\n 'p-button-secondary': !attributeModel.isPrimary\r\n }\"\r\n (onClick)=\"handleButtonClick($event)\"\r\n></p-button>\r\n\r\n </div>\r\n </ng-container>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i2$1.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"] }] });
|
|
568
|
+
}
|
|
569
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
570
|
+
type: Component,
|
|
571
|
+
args: [{ selector: 'lib-button', standalone: true, imports: [CommonModule, InputTextModule, FormsModule, ButtonModule], template: "<ng-container>\r\n <div class=\"btn-control\">\r\n <p-button\r\n type=\"button\"\r\n [label]=\"attributeModel.buttonLabel ?? 'Click Me'\"\r\n [disabled]=\"attributeModel.isDisabled ?? false\"\r\n [style]=\"{\r\n width: attributeModel.customButtonWidth\r\n ? attributeModel.customButtonWidth\r\n : 'auto',\r\n padding: attributeModel.customPadding\r\n ? attributeModel.customPadding\r\n : '0.5rem' \r\n }\"\r\n [icon]=\"attributeModel.icon ? attributeModel.icon : ''\"\r\n [iconPos]=\"attributeModel.iconPosition ?? 'left'\" \r\n [ngClass]=\"{\r\n 'p-button-primary': attributeModel.isPrimary ?? true,\r\n 'p-button-secondary': !attributeModel.isPrimary\r\n }\"\r\n (onClick)=\"handleButtonClick($event)\"\r\n></p-button>\r\n\r\n </div>\r\n </ng-container>" }]
|
|
572
|
+
}] });
|
|
573
|
+
|
|
574
|
+
class TextBoxComponent extends BaseControlComponent {
|
|
575
|
+
getValue() {
|
|
576
|
+
if (this.record[this.attributeModel.name] == false) {
|
|
577
|
+
return typeof this.record[this.attributeModel.name] == "string" ? "" : "No";
|
|
578
|
+
}
|
|
579
|
+
else if (this.record[this.attributeModel.name] == true) {
|
|
580
|
+
return "Yes";
|
|
581
|
+
}
|
|
582
|
+
else {
|
|
583
|
+
return this.record[this.attributeModel.name] ?? "-";
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: TextBoxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
587
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: TextBoxComponent, isStandalone: true, selector: "text-box", usesInheritance: true, ngImport: i0, template: "<ng-container >\r\n <div class=\"\">\r\n\r\n <div *ngIf=\"attributeModel.displayText\" class=\"mb-2\">\r\n <label>{{ attributeModel.displayText }}</label>\r\n <span class=\"asterisk ml-1\" *ngIf=\"attributeModel.isRequired\">*</span>\r\n </div>\r\n @if (attributeModel.readonly) {\r\n <div class=\"mb-2\" [ngStyle]=\"{'font-size':'14px', 'color':'#0F1729', 'font-weight':'600' }\">\r\n <label [for]=\"attributeModel.name ?? 'textBox'\" class=\"text-value-wrapper\" [ngStyle]=\"{color: attributeModel.textColorOnReadonly}\">{{ getValue() }}</label>\r\n </div>\r\n } @else {\r\n <div class=\"inputTextBox\">\r\n\r\n <input\r\n pInputText\r\n type=\"text\"\r\n autocomplete=\"off\"\r\n [placeholder]=\"attributeModel.placeholder ?? ''\"\r\n class=\"block p-inputtext w-full\"\r\n [pTooltip]=\"attributeModel.tooltip ?? ''\"\r\n [tooltipPosition]=\"attributeModel.toolTipPosition ?? '' \"\r\n [ngModel]=\"record?.[attributeModel.name] ?? ''\"\r\n [disabled]=\"attributeModel.disable ?? false\" \r\n [name]=\"attributeModel.name ?? 'textBox'\"\r\n [id]=\"attributeModel.name ?? 'textBox'\"\r\n [required]=\"attributeModel.isRequired ?? false\" \r\n [ngStyle]=\"{\r\n width: attributeModel.customColumnWidth\r\n ? attributeModel.customColumnWidth\r\n : '',\r\n padding: attributeModel.customPadding ? attributeModel.customPadding : ''\r\n }\"\r\n #textboxField=\"ngModel\"\r\n (ngModelChange)=\"handleModelChange($event, textboxField.valid)\"\r\n [ngClass]=\"{\r\n 'ng-dirty ng-invalid':\r\n (!textboxField.valid && error)\r\n }\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n \r\n</ng-container>\r\n", styles: [".asterisk{color:red}.inputTextBox{position:relative}.textCount{position:absolute;bottom:23%;right:1%;color:#bcbcbc}.markRed{color:red}.text-value-wrapper{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2$2.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3$1.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: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }] });
|
|
588
|
+
}
|
|
589
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: TextBoxComponent, decorators: [{
|
|
590
|
+
type: Component,
|
|
591
|
+
args: [{ selector: 'text-box', standalone: true, imports: [CommonModule, InputTextModule, FormsModule, TooltipModule], template: "<ng-container >\r\n <div class=\"\">\r\n\r\n <div *ngIf=\"attributeModel.displayText\" class=\"mb-2\">\r\n <label>{{ attributeModel.displayText }}</label>\r\n <span class=\"asterisk ml-1\" *ngIf=\"attributeModel.isRequired\">*</span>\r\n </div>\r\n @if (attributeModel.readonly) {\r\n <div class=\"mb-2\" [ngStyle]=\"{'font-size':'14px', 'color':'#0F1729', 'font-weight':'600' }\">\r\n <label [for]=\"attributeModel.name ?? 'textBox'\" class=\"text-value-wrapper\" [ngStyle]=\"{color: attributeModel.textColorOnReadonly}\">{{ getValue() }}</label>\r\n </div>\r\n } @else {\r\n <div class=\"inputTextBox\">\r\n\r\n <input\r\n pInputText\r\n type=\"text\"\r\n autocomplete=\"off\"\r\n [placeholder]=\"attributeModel.placeholder ?? ''\"\r\n class=\"block p-inputtext w-full\"\r\n [pTooltip]=\"attributeModel.tooltip ?? ''\"\r\n [tooltipPosition]=\"attributeModel.toolTipPosition ?? '' \"\r\n [ngModel]=\"record?.[attributeModel.name] ?? ''\"\r\n [disabled]=\"attributeModel.disable ?? false\" \r\n [name]=\"attributeModel.name ?? 'textBox'\"\r\n [id]=\"attributeModel.name ?? 'textBox'\"\r\n [required]=\"attributeModel.isRequired ?? false\" \r\n [ngStyle]=\"{\r\n width: attributeModel.customColumnWidth\r\n ? attributeModel.customColumnWidth\r\n : '',\r\n padding: attributeModel.customPadding ? attributeModel.customPadding : ''\r\n }\"\r\n #textboxField=\"ngModel\"\r\n (ngModelChange)=\"handleModelChange($event, textboxField.valid)\"\r\n [ngClass]=\"{\r\n 'ng-dirty ng-invalid':\r\n (!textboxField.valid && error)\r\n }\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n \r\n</ng-container>\r\n", styles: [".asterisk{color:red}.inputTextBox{position:relative}.textCount{position:absolute;bottom:23%;right:1%;color:#bcbcbc}.markRed{color:red}.text-value-wrapper{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%}\n"] }]
|
|
592
|
+
}] });
|
|
593
|
+
|
|
594
|
+
class FormContainerComponent {
|
|
595
|
+
router;
|
|
596
|
+
route;
|
|
597
|
+
messages = [];
|
|
598
|
+
record;
|
|
599
|
+
headerText;
|
|
600
|
+
showSave = SHARED.FALSE;
|
|
601
|
+
disableSaveButton = SHARED.FALSE;
|
|
602
|
+
onSave = new EventEmitter();
|
|
603
|
+
onCancel = new EventEmitter();
|
|
604
|
+
constructor(router, route) {
|
|
605
|
+
this.router = router;
|
|
606
|
+
this.route = route;
|
|
607
|
+
}
|
|
608
|
+
handleSaveClick() {
|
|
609
|
+
this.onSave.emit();
|
|
610
|
+
}
|
|
611
|
+
handleCancelClick() {
|
|
612
|
+
this.onCancel.emit();
|
|
613
|
+
}
|
|
614
|
+
handleCreateBtnClick() { }
|
|
615
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FormContainerComponent, deps: [{ token: i3$3.Router }, { token: i3$3.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
616
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: FormContainerComponent, isStandalone: true, selector: "form-container", inputs: { messages: "messages", record: "record", headerText: "headerText", showSave: "showSave", disableSaveButton: "disableSaveButton" }, outputs: { onSave: "onSave", onCancel: "onCancel" }, providers: [MessageService, ConfirmationService], ngImport: i0, template: "<div class=\"form-container\">\r\n <div class=\"text-900 font-bold text-xl form-header mt-2\">\r\n <div class=\"form-header-container w-full mr-0\">\r\n <div class=\"form-header-title\"[innerHTML]=\"this.headerText\">\r\n </div>\r\n <div class=\"form-header-messege w-full\">\r\n <p-messages class=\"message-wrapper\" [(value)]=\"messages\" [enableService]=\"false\" />\r\n </div>\r\n </div>\r\n\r\n <div class=\"btn-wrapper\">\r\n <ng-content select=\"[headerButtons]\"></ng-content>\r\n @if(showSave){\r\n <button\r\n pButton\r\n pRipple\r\n label=\"Cancel\"\r\n (click)=\"handleCancelClick()\"\r\n class=\"p-button-outlined mr-2\"\r\n ></button>\r\n\r\n <button\r\n pButton\r\n class=\"p-button-success\"\r\n label=\"Save\"\r\n [disabled]=\"disableSaveButton\"\r\n type=\"button\"\r\n tooltipPosition=\"bottom\"\r\n (click)=\"handleSaveClick()\"\r\n ></button>\r\n }\r\n <ng-content select=\"[headerButtons]\"></ng-content>\r\n </div>\r\n </div>\r\n \r\n \r\n <p-toast></p-toast>\r\n\r\n <div>\r\n <p-confirmDialog>\r\n <ng-template pTemplate=\"message\" let-message>\r\n <div class=\"flex flex-column align-items-center w-full gap-3 border-bottom-1 surface-border\">\r\n <i class=\"pi pi-exclamation-circle text-6xl text-primary-500\"></i>\r\n <p>{{ message.message }}</p>\r\n </div>\r\n </ng-template>\r\n </p-confirmDialog>\r\n </div> \r\n <div class=\"grid mt-3\">\r\n <div class=\"col-12\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n ", styles: [".form-container{display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden}.form-container.card{padding:0}.form-container .p-button{padding:.5rem 1.25rem}.form-container .form-footer{background-color:var(--surface-100);padding:6px 0;height:46px;width:100%;margin-top:auto;position:sticky;bottom:0;z-index:4}.form-container .form-footer.card{margin-bottom:0!important}.form-container .form-header{padding:6px 0;height:46px;display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:4;width:100%}.form-container .form-top button{height:fit-content}.form-container .form-header-bg-light{background-color:#e1e2e8!important}.form-container .form-header-bg-dark{background-color:#3b3848!important}.form-container .left-wrapper{display:flex}.form-container .p-16{padding:4px 32px 16px}.form-container .m-16{margin:0 16px}.form-container .errors{position:sticky;top:3.4rem;z-index:1;background-color:var(--surface-900);padding:0 16px}.btn-wrapper{display:flex;justify-content:flex-end;align-items:center}.form-header-container{display:flex;flex-wrap:nowrap;align-items:center;margin-right:2rem}.form-header-container .form-header-title{text-wrap:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ConfirmDialogModule }, { kind: "component", type: i4$2.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }, { kind: "ngmodule", type: ToastModule }, { kind: "component", type: i5.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i6.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
617
|
+
}
|
|
618
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FormContainerComponent, decorators: [{
|
|
619
|
+
type: Component,
|
|
620
|
+
args: [{ selector: "form-container", standalone: true, imports: [
|
|
621
|
+
CommonModule,
|
|
622
|
+
ButtonModule,
|
|
623
|
+
ConfirmDialogModule,
|
|
624
|
+
ToastModule,
|
|
625
|
+
MessagesModule,
|
|
626
|
+
ButtonComponent,
|
|
627
|
+
TextBoxComponent,
|
|
628
|
+
], providers: [MessageService, ConfirmationService], encapsulation: ViewEncapsulation.None, template: "<div class=\"form-container\">\r\n <div class=\"text-900 font-bold text-xl form-header mt-2\">\r\n <div class=\"form-header-container w-full mr-0\">\r\n <div class=\"form-header-title\"[innerHTML]=\"this.headerText\">\r\n </div>\r\n <div class=\"form-header-messege w-full\">\r\n <p-messages class=\"message-wrapper\" [(value)]=\"messages\" [enableService]=\"false\" />\r\n </div>\r\n </div>\r\n\r\n <div class=\"btn-wrapper\">\r\n <ng-content select=\"[headerButtons]\"></ng-content>\r\n @if(showSave){\r\n <button\r\n pButton\r\n pRipple\r\n label=\"Cancel\"\r\n (click)=\"handleCancelClick()\"\r\n class=\"p-button-outlined mr-2\"\r\n ></button>\r\n\r\n <button\r\n pButton\r\n class=\"p-button-success\"\r\n label=\"Save\"\r\n [disabled]=\"disableSaveButton\"\r\n type=\"button\"\r\n tooltipPosition=\"bottom\"\r\n (click)=\"handleSaveClick()\"\r\n ></button>\r\n }\r\n <ng-content select=\"[headerButtons]\"></ng-content>\r\n </div>\r\n </div>\r\n \r\n \r\n <p-toast></p-toast>\r\n\r\n <div>\r\n <p-confirmDialog>\r\n <ng-template pTemplate=\"message\" let-message>\r\n <div class=\"flex flex-column align-items-center w-full gap-3 border-bottom-1 surface-border\">\r\n <i class=\"pi pi-exclamation-circle text-6xl text-primary-500\"></i>\r\n <p>{{ message.message }}</p>\r\n </div>\r\n </ng-template>\r\n </p-confirmDialog>\r\n </div> \r\n <div class=\"grid mt-3\">\r\n <div class=\"col-12\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n ", styles: [".form-container{display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden}.form-container.card{padding:0}.form-container .p-button{padding:.5rem 1.25rem}.form-container .form-footer{background-color:var(--surface-100);padding:6px 0;height:46px;width:100%;margin-top:auto;position:sticky;bottom:0;z-index:4}.form-container .form-footer.card{margin-bottom:0!important}.form-container .form-header{padding:6px 0;height:46px;display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:4;width:100%}.form-container .form-top button{height:fit-content}.form-container .form-header-bg-light{background-color:#e1e2e8!important}.form-container .form-header-bg-dark{background-color:#3b3848!important}.form-container .left-wrapper{display:flex}.form-container .p-16{padding:4px 32px 16px}.form-container .m-16{margin:0 16px}.form-container .errors{position:sticky;top:3.4rem;z-index:1;background-color:var(--surface-900);padding:0 16px}.btn-wrapper{display:flex;justify-content:flex-end;align-items:center}.form-header-container{display:flex;flex-wrap:nowrap;align-items:center;margin-right:2rem}.form-header-container .form-header-title{text-wrap:nowrap}\n"] }]
|
|
629
|
+
}], ctorParameters: () => [{ type: i3$3.Router }, { type: i3$3.ActivatedRoute }], propDecorators: { messages: [{
|
|
630
|
+
type: Input
|
|
631
|
+
}], record: [{
|
|
632
|
+
type: Input
|
|
633
|
+
}], headerText: [{
|
|
634
|
+
type: Input
|
|
635
|
+
}], showSave: [{
|
|
636
|
+
type: Input
|
|
637
|
+
}], disableSaveButton: [{
|
|
638
|
+
type: Input
|
|
639
|
+
}], onSave: [{
|
|
640
|
+
type: Output
|
|
641
|
+
}], onCancel: [{
|
|
642
|
+
type: Output
|
|
643
|
+
}] } });
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* URLS
|
|
647
|
+
*/
|
|
648
|
+
class URLS {
|
|
649
|
+
static CONFIGFILEURL = "assets/config/api.config.json";
|
|
650
|
+
static API_CONFIGURATIONS = "api-configurations/";
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
class ERROR {
|
|
654
|
+
static ERROR = "Error";
|
|
655
|
+
static VALIDATE_API_FAILED = "API validation failed. Please review the input and try again.";
|
|
656
|
+
static VALIDATE_ACTION_API_FAILED = "Validation action failed. Please check the configuration or try again later.";
|
|
657
|
+
static API_CONFIG_FAILED = "Error loading app config:";
|
|
658
|
+
static API_CONFIG_LOADING_FAILED = "App configuration not loaded. Ensure loadAppConfig() is called before accessing properties.";
|
|
659
|
+
static API_NAME_NOT_SET = "API name is not set.";
|
|
660
|
+
static ERROR_FETCHING_DATA = "Error fetching data:";
|
|
661
|
+
static UNABLE_TO_FETCH_QUEUE_LIST = "Unable to fetch queue list.";
|
|
662
|
+
static NO_QUEUE_FOUND_WITH_ID = "No queue found with the provided ID.";
|
|
663
|
+
static ERROR_FETCHING_WIDGET_DATA = "Error fetching record widget data:";
|
|
664
|
+
static ERROR_MISSING_PARAMETERS = "Required parameters are missing:";
|
|
665
|
+
static INVALID_INDEX = "Invalid index:";
|
|
666
|
+
static ERROR_DELETE_DICTIONARY_ITEM = "Failed to delete dictionary item with ID:";
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* This service is used to get the app configuration from the config file.
|
|
671
|
+
*/
|
|
672
|
+
class AppConfigService {
|
|
673
|
+
http;
|
|
674
|
+
appConfig;
|
|
675
|
+
isConfigLoaded = false;
|
|
676
|
+
constructor(http) {
|
|
677
|
+
this.http = http;
|
|
678
|
+
}
|
|
679
|
+
loadAppConfig() {
|
|
680
|
+
return firstValueFrom(this.http.get(URLS.CONFIGFILEURL))
|
|
681
|
+
.then(config => {
|
|
682
|
+
this.appConfig = config;
|
|
683
|
+
this.isConfigLoaded = true;
|
|
684
|
+
})
|
|
685
|
+
.catch(err => {
|
|
686
|
+
console.error(ERROR.API_CONFIG_FAILED, err);
|
|
687
|
+
throw err;
|
|
688
|
+
});
|
|
689
|
+
}
|
|
690
|
+
ensureConfigLoaded() {
|
|
691
|
+
if (!this.isConfigLoaded) {
|
|
692
|
+
throw new Error(ERROR.API_CONFIG_LOADING_FAILED);
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
get apiBaseUrl() {
|
|
696
|
+
this.ensureConfigLoaded();
|
|
697
|
+
return this.appConfig?.catQwUrl;
|
|
698
|
+
}
|
|
699
|
+
get visibilityOptions() {
|
|
700
|
+
this.ensureConfigLoaded();
|
|
701
|
+
return this.appConfig?.visibilityOption;
|
|
702
|
+
}
|
|
703
|
+
get swaggerUrl() {
|
|
704
|
+
this.ensureConfigLoaded();
|
|
705
|
+
return this.appConfig?.swaggerUrl;
|
|
706
|
+
}
|
|
707
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AppConfigService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
708
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AppConfigService, providedIn: 'root' });
|
|
709
|
+
}
|
|
710
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AppConfigService, decorators: [{
|
|
711
|
+
type: Injectable,
|
|
712
|
+
args: [{
|
|
713
|
+
providedIn: 'root'
|
|
714
|
+
}]
|
|
715
|
+
}], ctorParameters: () => [{ type: i1$1.HttpClient }] });
|
|
716
|
+
|
|
717
|
+
class List {
|
|
718
|
+
dataSource;
|
|
719
|
+
records;
|
|
720
|
+
label;
|
|
721
|
+
value;
|
|
722
|
+
forProperty;
|
|
723
|
+
items;
|
|
724
|
+
allItems;
|
|
725
|
+
constructor(dataSource, records = [], label, value, forProperty) {
|
|
726
|
+
this.dataSource = dataSource;
|
|
727
|
+
this.records = records;
|
|
728
|
+
this.label = label;
|
|
729
|
+
this.value = value;
|
|
730
|
+
this.dataSource = dataSource;
|
|
731
|
+
this.forProperty = forProperty ?? "";
|
|
732
|
+
this.items = records?.map((i) => {
|
|
733
|
+
return { label: i[this?.label] ? i[this?.label] : 'No label', value: i[this?.value] };
|
|
734
|
+
});
|
|
735
|
+
this.allItems = this.records?.map((i) => {
|
|
736
|
+
return { label: i[this?.label] ? i[this?.label] : 'No label', value: i[this?.value] };
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
class ListService {
|
|
742
|
+
http;
|
|
743
|
+
configService;
|
|
744
|
+
constructor(http, configService) {
|
|
745
|
+
this.http = http;
|
|
746
|
+
this.configService = configService;
|
|
747
|
+
}
|
|
748
|
+
async getLists(models) {
|
|
749
|
+
const lists = [];
|
|
750
|
+
for (const model of models) {
|
|
751
|
+
if (model.dataSource) {
|
|
752
|
+
try {
|
|
753
|
+
const response = await firstValueFrom(this.getbyPathName(model.dataSource));
|
|
754
|
+
const listData = response.data || response;
|
|
755
|
+
const list = new List(model.dataSource, listData, model.listLabelProperty, model.listValueProperty, model.dataSource);
|
|
756
|
+
list.forProperty = model.name;
|
|
757
|
+
lists.push(list);
|
|
758
|
+
}
|
|
759
|
+
catch (error) {
|
|
760
|
+
console.error(`Error fetching data from ${model.dataSource}:`, error);
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
else if (model.options) {
|
|
764
|
+
const list = new List(model.dataSource, model.options, model.listLabelProperty, model.listValueProperty, undefined);
|
|
765
|
+
list.forProperty = model.name;
|
|
766
|
+
lists.push(list);
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
return lists;
|
|
770
|
+
}
|
|
771
|
+
getbyPathName(data) {
|
|
772
|
+
return this.http.get(this.configService.apiBaseUrl + data);
|
|
773
|
+
}
|
|
774
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ListService, deps: [{ token: i1$1.HttpClient }, { token: AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
775
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ListService, providedIn: 'root' });
|
|
776
|
+
}
|
|
777
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ListService, decorators: [{
|
|
778
|
+
type: Injectable,
|
|
779
|
+
args: [{
|
|
780
|
+
providedIn: 'root',
|
|
781
|
+
}]
|
|
782
|
+
}], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: AppConfigService }] });
|
|
783
|
+
|
|
784
|
+
class BaseService {
|
|
785
|
+
store;
|
|
786
|
+
appConfigService;
|
|
787
|
+
listService;
|
|
788
|
+
_pathName = SHARED.EMPTY;
|
|
789
|
+
lists;
|
|
790
|
+
http;
|
|
791
|
+
list;
|
|
792
|
+
constructor(http, store, appConfigService, listService) {
|
|
793
|
+
this.store = store;
|
|
794
|
+
this.appConfigService = appConfigService;
|
|
795
|
+
this.listService = listService;
|
|
796
|
+
this.http = http;
|
|
797
|
+
}
|
|
798
|
+
get apiUrl() {
|
|
799
|
+
return this.appConfigService.apiBaseUrl;
|
|
800
|
+
}
|
|
801
|
+
set pathName(value) {
|
|
802
|
+
this._pathName = value;
|
|
803
|
+
}
|
|
804
|
+
async initList() {
|
|
805
|
+
let response = await this.listService.getLists(this.list);
|
|
806
|
+
if (response && response.length > 0) {
|
|
807
|
+
this.store.setList(response);
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
create(entity) {
|
|
811
|
+
return this.http.post(this.apiUrl + this._pathName, entity).pipe(tap((newEntity) => this.store.add(newEntity)));
|
|
812
|
+
}
|
|
813
|
+
getAll() {
|
|
814
|
+
return this.http.get(this.apiUrl + this._pathName).pipe(tap((entities) => this.store.set(entities)));
|
|
815
|
+
}
|
|
816
|
+
getById(id) {
|
|
817
|
+
return this.http.get(`${this.apiUrl}${this._pathName}/${id}`).pipe(tap((entity) => this.store.upsert(id, entity)));
|
|
818
|
+
}
|
|
819
|
+
update(id, entity) {
|
|
820
|
+
return this.http.put(`${this.apiUrl}${this._pathName}/${id}`, entity).pipe(tap((updatedEntity) => this.store.update(id, updatedEntity)));
|
|
821
|
+
}
|
|
822
|
+
delete(id) {
|
|
823
|
+
return this.http.delete(`${this.apiUrl}${this._pathName}/${id}`).pipe(tap(() => this.store.remove(id)));
|
|
824
|
+
}
|
|
825
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseService, deps: [{ token: i1$1.HttpClient }, { token: BaseStore }, { token: AppConfigService }, { token: ListService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
826
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseService, providedIn: 'root' });
|
|
827
|
+
}
|
|
828
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseService, decorators: [{
|
|
829
|
+
type: Injectable,
|
|
830
|
+
args: [{ providedIn: 'root' }]
|
|
831
|
+
}], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: BaseStore }, { type: AppConfigService }, { type: ListService }] });
|
|
832
|
+
|
|
833
|
+
class TablePrimaryModel {
|
|
834
|
+
name;
|
|
835
|
+
headers;
|
|
836
|
+
records;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
class TablePrimaryHeaderModel {
|
|
840
|
+
name;
|
|
841
|
+
attributes;
|
|
842
|
+
width;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* TableBuilder
|
|
847
|
+
*/
|
|
848
|
+
class TableBuilder {
|
|
849
|
+
hiddenHeaders = [];
|
|
850
|
+
buildTable(records, headerWidths) {
|
|
851
|
+
const table = new TablePrimaryModel();
|
|
852
|
+
table.records = records;
|
|
853
|
+
if (records && records.length > 0) {
|
|
854
|
+
table.headers = this.buildHeaders(Object.keys(records[0]), headerWidths);
|
|
855
|
+
}
|
|
856
|
+
else {
|
|
857
|
+
table.headers = [];
|
|
858
|
+
}
|
|
859
|
+
return table;
|
|
860
|
+
}
|
|
861
|
+
buildHeaders(keys, headerWidths) {
|
|
862
|
+
const headers = [];
|
|
863
|
+
const filteredKeys = keys.filter(key => key !== SHARED.ID && !this.hiddenHeaders.includes(key) // hide headers
|
|
864
|
+
);
|
|
865
|
+
for (const key of filteredKeys) {
|
|
866
|
+
const header = new TablePrimaryHeaderModel();
|
|
867
|
+
header.name = key;
|
|
868
|
+
if (headerWidths)
|
|
869
|
+
header.width = headerWidths[key] || SHARED.WIDTH_AUTO;
|
|
870
|
+
headers.push(header);
|
|
871
|
+
}
|
|
872
|
+
return headers;
|
|
873
|
+
}
|
|
874
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: TableBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
875
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: TableBuilder, providedIn: 'root' });
|
|
876
|
+
}
|
|
877
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: TableBuilder, decorators: [{
|
|
878
|
+
type: Injectable,
|
|
879
|
+
args: [{
|
|
880
|
+
providedIn: 'root'
|
|
881
|
+
}]
|
|
882
|
+
}] });
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* BaseListComponent is a generic class that provides a base implementation for a list component.
|
|
886
|
+
*/
|
|
887
|
+
class BaseListComponent {
|
|
888
|
+
service;
|
|
889
|
+
builder;
|
|
890
|
+
refreshTable = false;
|
|
891
|
+
table;
|
|
892
|
+
constructor(service, builder) {
|
|
893
|
+
this.service = service;
|
|
894
|
+
this.builder = builder;
|
|
895
|
+
}
|
|
896
|
+
ngOnChanges() {
|
|
897
|
+
if (this.refreshTable) {
|
|
898
|
+
this.handleRefreshTable();
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
init(dynamicWidth) {
|
|
902
|
+
this.service.getAll().subscribe((res) => {
|
|
903
|
+
this.table = this.builder.buildTable(res.data, dynamicWidth);
|
|
904
|
+
this.afterTableBuild();
|
|
905
|
+
});
|
|
906
|
+
}
|
|
907
|
+
afterTableBuild() {
|
|
908
|
+
}
|
|
909
|
+
handleRefreshTable() {
|
|
910
|
+
this.init();
|
|
911
|
+
}
|
|
912
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseListComponent, deps: [{ token: BaseService }, { token: TableBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
913
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: BaseListComponent, isStandalone: true, selector: "lib-base-list", inputs: { refreshTable: "refreshTable" }, usesOnChanges: true, ngImport: i0, template: "<p>base-list works!</p>\r\n", styles: [""] });
|
|
914
|
+
}
|
|
915
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseListComponent, decorators: [{
|
|
916
|
+
type: Component,
|
|
917
|
+
args: [{ selector: 'lib-base-list', template: "<p>base-list works!</p>\r\n" }]
|
|
918
|
+
}], ctorParameters: () => [{ type: BaseService }, { type: TableBuilder }], propDecorators: { refreshTable: [{
|
|
919
|
+
type: Input
|
|
920
|
+
}] } });
|
|
921
|
+
|
|
922
|
+
/**
|
|
923
|
+
* DropdownComponent
|
|
924
|
+
*/
|
|
925
|
+
class DropdownComponent extends BaseControlComponent {
|
|
926
|
+
listService;
|
|
927
|
+
options = [];
|
|
928
|
+
list;
|
|
929
|
+
childListRecords = [];
|
|
930
|
+
isStaticDropdown = false;
|
|
931
|
+
constructor(listService) {
|
|
932
|
+
super();
|
|
933
|
+
this.listService = listService;
|
|
934
|
+
}
|
|
935
|
+
ngOnChanges() {
|
|
936
|
+
if (this.store) {
|
|
937
|
+
this.query = new BaseQuery(this.store);
|
|
938
|
+
}
|
|
939
|
+
if (this.attributeModel.options) {
|
|
940
|
+
this.options = this.attributeModel.options;
|
|
941
|
+
}
|
|
942
|
+
if (!this.isStaticDropdown) {
|
|
943
|
+
this.handleGetAndSetList();
|
|
944
|
+
}
|
|
945
|
+
else {
|
|
946
|
+
this.options = this.attributeModel.options?.map((x) => {
|
|
947
|
+
return { label: x[this.attributeModel?.listLabelProperty || 0], value: x[this.attributeModel?.listValueProperty || 0] };
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
handleGetAndSetList() {
|
|
952
|
+
try {
|
|
953
|
+
this.query.getLists().subscribe((response) => {
|
|
954
|
+
if (response) {
|
|
955
|
+
this.mapResponseToOptions(response);
|
|
956
|
+
}
|
|
957
|
+
});
|
|
958
|
+
}
|
|
959
|
+
catch (error) {
|
|
960
|
+
console.error('Error fetching data:', error);
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
mapResponseToOptions(lists) {
|
|
964
|
+
if (lists && lists.length > 0) {
|
|
965
|
+
const clonedLists = JSON.parse(JSON.stringify(lists));
|
|
966
|
+
this.list = clonedLists.find((x) => x.forProperty === this.attributeModel.name);
|
|
967
|
+
if (this.list) {
|
|
968
|
+
this.options = this.list?.items ?? [];
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
if (!this.options || this.options.length === 0) {
|
|
972
|
+
this.options = this.attributeModel.options ?? [];
|
|
973
|
+
}
|
|
974
|
+
return this.options;
|
|
975
|
+
}
|
|
976
|
+
handleModelChange(event, valid, val) {
|
|
977
|
+
super.handleModelChange(event, valid);
|
|
978
|
+
}
|
|
979
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DropdownComponent, deps: [{ token: ListService }], target: i0.ɵɵFactoryTarget.Component });
|
|
980
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: DropdownComponent, isStandalone: true, selector: "dropdown", inputs: { isStaticDropdown: "isStaticDropdown" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container>\r\n <div class=\"mb-2\">\r\n <label>{{ attributeModel.displayText }}</label>\r\n <span class=\"asterisk ml-1\" *ngIf=\"attributeModel.isRequired\">*</span>\r\n </div>\r\n <div class=\"dropdownbox\">\r\n\r\n <p-dropdown \r\n \r\n [options]=\"options\" \r\n [disabled]=\"attributeModel.readonly ?? false\"\r\n [showClear]=\"true\"\r\n [name]=\"attributeModel.name ?? 'testSingleSelect'\" \r\n [ngModel]=\"record[attributeModel.name]\" \r\n [placeholder]=\"attributeModel.placeholder ?? ''\" \r\n [required]=\"attributeModel.isRequired ?? false\"\r\n filterBy=\"label\" \r\n [filter]=\"attributeModel.filter ?? false\" \r\n class=\"dropdownFeild\"\r\n #dropdown=\"ngModel\"\r\n (ngModelChange)=\"handleModelChange($event, dropdown.valid)\" \r\n [ngClass]=\"!dropdown.valid && error == attributeModel.name ? 'ng-dirty ng-invalid':''\" \r\n appendTo=\"body\" \r\n optionLabel=\"label\" \r\n optionValue=\"value\">\r\n</p-dropdown>\r\n</div>\r\n\r\n</ng-container>\r\n", styles: [".asterisk{color:red}.p-dropdown,.dropdownFeild{width:100%!important}.dropdownbox{position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i3$4.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: "ngmodule", type: FormsModule }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
981
|
+
}
|
|
982
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
983
|
+
type: Component,
|
|
984
|
+
args: [{ selector: 'dropdown', standalone: true, imports: [CommonModule, DropdownModule, FormsModule], encapsulation: ViewEncapsulation.None, template: "<ng-container>\r\n <div class=\"mb-2\">\r\n <label>{{ attributeModel.displayText }}</label>\r\n <span class=\"asterisk ml-1\" *ngIf=\"attributeModel.isRequired\">*</span>\r\n </div>\r\n <div class=\"dropdownbox\">\r\n\r\n <p-dropdown \r\n \r\n [options]=\"options\" \r\n [disabled]=\"attributeModel.readonly ?? false\"\r\n [showClear]=\"true\"\r\n [name]=\"attributeModel.name ?? 'testSingleSelect'\" \r\n [ngModel]=\"record[attributeModel.name]\" \r\n [placeholder]=\"attributeModel.placeholder ?? ''\" \r\n [required]=\"attributeModel.isRequired ?? false\"\r\n filterBy=\"label\" \r\n [filter]=\"attributeModel.filter ?? false\" \r\n class=\"dropdownFeild\"\r\n #dropdown=\"ngModel\"\r\n (ngModelChange)=\"handleModelChange($event, dropdown.valid)\" \r\n [ngClass]=\"!dropdown.valid && error == attributeModel.name ? 'ng-dirty ng-invalid':''\" \r\n appendTo=\"body\" \r\n optionLabel=\"label\" \r\n optionValue=\"value\">\r\n</p-dropdown>\r\n</div>\r\n\r\n</ng-container>\r\n", styles: [".asterisk{color:red}.p-dropdown,.dropdownFeild{width:100%!important}.dropdownbox{position:relative}\n"] }]
|
|
985
|
+
}], ctorParameters: () => [{ type: ListService }], propDecorators: { isStaticDropdown: [{
|
|
986
|
+
type: Input
|
|
987
|
+
}] } });
|
|
988
|
+
|
|
989
|
+
class ValidatorService {
|
|
990
|
+
constructor() { }
|
|
991
|
+
handleValidateRecords(record) {
|
|
992
|
+
return true;
|
|
993
|
+
}
|
|
994
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ValidatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
995
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ValidatorService, providedIn: 'root' });
|
|
996
|
+
}
|
|
997
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ValidatorService, decorators: [{
|
|
998
|
+
type: Injectable,
|
|
999
|
+
args: [{
|
|
1000
|
+
providedIn: 'root'
|
|
1001
|
+
}]
|
|
1002
|
+
}], ctorParameters: () => [] });
|
|
1003
|
+
|
|
1004
|
+
/**
|
|
1005
|
+
* BaseFormComponent
|
|
1006
|
+
*/
|
|
1007
|
+
class BaseFormComponent {
|
|
1008
|
+
service;
|
|
1009
|
+
validatorService;
|
|
1010
|
+
router;
|
|
1011
|
+
activatedRoute;
|
|
1012
|
+
baseStore;
|
|
1013
|
+
subscriptions;
|
|
1014
|
+
record;
|
|
1015
|
+
recordChange = new BehaviorSubject({});
|
|
1016
|
+
onSave = new EventEmitter();
|
|
1017
|
+
onCancel = new EventEmitter();
|
|
1018
|
+
constructor(service, validatorService, router, activatedRoute, baseStore) {
|
|
1019
|
+
this.service = service;
|
|
1020
|
+
this.validatorService = validatorService;
|
|
1021
|
+
this.router = router;
|
|
1022
|
+
this.activatedRoute = activatedRoute;
|
|
1023
|
+
this.baseStore = baseStore;
|
|
1024
|
+
this.subscriptions = [];
|
|
1025
|
+
this.record = {};
|
|
1026
|
+
}
|
|
1027
|
+
message = [];
|
|
1028
|
+
attributeMode;
|
|
1029
|
+
init() {
|
|
1030
|
+
this.service.initList();
|
|
1031
|
+
this.baseStore?.setRecordChange(SHARED.EMPTY);
|
|
1032
|
+
let id = this.activatedRoute ? this.activatedRoute.snapshot.params[SHARED.ID] : '';
|
|
1033
|
+
if ((id !== SHARED.ZERO.toString()) && id) {
|
|
1034
|
+
this.service.getById(id).subscribe((res) => {
|
|
1035
|
+
// To make the object immutable
|
|
1036
|
+
this.record = JSON.parse(JSON.stringify(res));
|
|
1037
|
+
this.baseStore?.setRecordChange(res);
|
|
1038
|
+
this.recordChange.next(res);
|
|
1039
|
+
});
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
handleSubmit() {
|
|
1043
|
+
let validateRecords = this.validatorService ? this.validatorService.handleValidateRecords(this.record) : true;
|
|
1044
|
+
if (validateRecords) {
|
|
1045
|
+
if (this.record._id) {
|
|
1046
|
+
this.handleUpdateRecord();
|
|
1047
|
+
}
|
|
1048
|
+
else {
|
|
1049
|
+
this.handleAddRecord();
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
handleUpdateRecord() {
|
|
1054
|
+
this.service.update(this.record._id, this.record).subscribe({
|
|
1055
|
+
next: (response) => {
|
|
1056
|
+
console.log('Record updated:', response);
|
|
1057
|
+
this.onSave.emit();
|
|
1058
|
+
},
|
|
1059
|
+
error: (error) => {
|
|
1060
|
+
console.error('Error updating record:', error);
|
|
1061
|
+
}
|
|
1062
|
+
});
|
|
1063
|
+
}
|
|
1064
|
+
handleAddRecord() {
|
|
1065
|
+
this.service.create(this.record).subscribe({
|
|
1066
|
+
next: (response) => {
|
|
1067
|
+
console.log('Record created:', response);
|
|
1068
|
+
this.onSave.emit();
|
|
1069
|
+
},
|
|
1070
|
+
error: (error) => {
|
|
1071
|
+
console.error('Error creating record:', error);
|
|
1072
|
+
}
|
|
1073
|
+
});
|
|
1074
|
+
}
|
|
1075
|
+
handleCancel() {
|
|
1076
|
+
this.onCancel.emit();
|
|
1077
|
+
}
|
|
1078
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseFormComponent, deps: [{ token: BaseService }, { token: ValidatorService }, { token: i3$3.Router }, { token: i3$3.ActivatedRoute }, { token: BaseStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
1079
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: BaseFormComponent, isStandalone: true, selector: "base-form", outputs: { onSave: "onSave", onCancel: "onCancel" }, providers: [ValidatorService], ngImport: i0, template: "<p>base-form works!</p>\r\n", styles: [""] });
|
|
1080
|
+
}
|
|
1081
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseFormComponent, decorators: [{
|
|
1082
|
+
type: Component,
|
|
1083
|
+
args: [{ selector: 'base-form', providers: [ValidatorService], template: "<p>base-form works!</p>\r\n" }]
|
|
1084
|
+
}], ctorParameters: () => [{ type: BaseService }, { type: ValidatorService }, { type: i3$3.Router }, { type: i3$3.ActivatedRoute }, { type: BaseStore }], propDecorators: { onSave: [{
|
|
1085
|
+
type: Output
|
|
1086
|
+
}], onCancel: [{
|
|
1087
|
+
type: Output
|
|
1088
|
+
}] } });
|
|
1089
|
+
|
|
1090
|
+
class DateParserService {
|
|
1091
|
+
constructor() { }
|
|
1092
|
+
parseDate(date) {
|
|
1093
|
+
if (moment(date, SHARED.DATE_FORMAT_TYPE2, true).isValid()) {
|
|
1094
|
+
const date1 = date.toString().split(SHARED.HIPHEN)[0];
|
|
1095
|
+
const month = date.toString().split(SHARED.HIPHEN)[1];
|
|
1096
|
+
const year = date.toString().split(SHARED.HIPHEN)[2];
|
|
1097
|
+
return moment.utc(`${year}-${month}-${date1}`).toDate();
|
|
1098
|
+
}
|
|
1099
|
+
else if (moment(date, SHARED.DATE_FORMAT, true).isValid()) {
|
|
1100
|
+
const date1 = date.toString().split(SHARED.SLASH)[0];
|
|
1101
|
+
const month = date.toString().split(SHARED.SLASH)[1];
|
|
1102
|
+
const year = date.toString().split(SHARED.SLASH)[2];
|
|
1103
|
+
return moment.utc(`${year}-${month}-${date1}`).toDate();
|
|
1104
|
+
}
|
|
1105
|
+
else if (moment(date, SHARED.DATE_FORMAT_TYPE3, true).isValid()) {
|
|
1106
|
+
const dateParts = date.toString().split(SHARED.HIPHEN);
|
|
1107
|
+
const year = dateParts[0];
|
|
1108
|
+
const month = dateParts[1];
|
|
1109
|
+
const day = dateParts[2];
|
|
1110
|
+
return moment.utc(`${year}-${month}-${day}`).toDate();
|
|
1111
|
+
}
|
|
1112
|
+
else if (date instanceof Date ||
|
|
1113
|
+
new Date(date).toString() != SHARED.INVALIDDATE) {
|
|
1114
|
+
const result = new Date(date);
|
|
1115
|
+
result.setHours(0, 0, 0, 0);
|
|
1116
|
+
return moment.utc(`${result.getFullYear()}-${result.getMonth() + 1}-${result.getDate()}`).toDate();
|
|
1117
|
+
}
|
|
1118
|
+
else {
|
|
1119
|
+
throw new Error(SHARED.INVALIDDATE);
|
|
1120
|
+
}
|
|
1121
|
+
return SHARED.INVALIDDATE;
|
|
1122
|
+
}
|
|
1123
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DateParserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1124
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DateParserService, providedIn: 'root' });
|
|
1125
|
+
}
|
|
1126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DateParserService, decorators: [{
|
|
1127
|
+
type: Injectable,
|
|
1128
|
+
args: [{
|
|
1129
|
+
providedIn: 'root'
|
|
1130
|
+
}]
|
|
1131
|
+
}], ctorParameters: () => [] });
|
|
1132
|
+
|
|
1133
|
+
class DateComponent extends BaseControlComponent {
|
|
1134
|
+
dateService;
|
|
1135
|
+
constructor(dateService) {
|
|
1136
|
+
super();
|
|
1137
|
+
this.dateService = dateService;
|
|
1138
|
+
}
|
|
1139
|
+
ngOnChanges() {
|
|
1140
|
+
if (this.attributeModel.readonly) {
|
|
1141
|
+
this.getValue();
|
|
1142
|
+
}
|
|
1143
|
+
else {
|
|
1144
|
+
this.record[this.attributeModel.name] = this.dateService.parseDate(this.record[this.attributeModel?.name]) ??
|
|
1145
|
+
new Date();
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
getValue() {
|
|
1149
|
+
if (this.record[this.attributeModel.name]) {
|
|
1150
|
+
const formattedDate = moment(this.record[this.attributeModel.name]).format('DD/MM/YYYY');
|
|
1151
|
+
if (formattedDate == "Invalid date") {
|
|
1152
|
+
return SHARED.HIPHEN;
|
|
1153
|
+
}
|
|
1154
|
+
else {
|
|
1155
|
+
return formattedDate;
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
return SHARED.EMPTY;
|
|
1159
|
+
}
|
|
1160
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DateComponent, deps: [{ token: DateParserService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1161
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: DateComponent, isStandalone: true, selector: "date", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@if (attributeModel && record) {\r\n<div class=\"\">\r\n <div class=\"mb-2\">\r\n <label>{{\r\n attributeModel?.displayText\r\n ? attributeModel?.displayText\r\n : attributeModel?.name\r\n }}</label>\r\n <span class=\"asterisk ml-1\" *ngIf=\"attributeModel.isRequired\">*</span>\r\n </div>\r\n @if (attributeModel.readonly) {\r\n <div class=\"mb-2\" [ngStyle]=\"{ 'font-size': '14px', color: '#0F1729', 'font-weight':'600' }\">\r\n <label>{{ getValue() }}</label>\r\n </div>\r\n } @else {\r\n <div>\r\n <p-calendar\r\n [showIcon]=\"attributeModel.showCalenderIcon ?? true\"\r\n inputId=\"icon\"\r\n [disabled]=\"attributeModel?.readonly ?? false\"\r\n [required]=\"attributeModel?.isRequired ?? false\"\r\n [name]=\"attributeModel?.name ? attributeModel?.name : 'testDatePicker'\"\r\n [placeholder]=\"\r\n attributeModel.placeholder ? attributeModel.placeholder : ''\r\n \"\r\n [yearRange]=\"attributeModel.yearRange ?? '1950 : 2050'\"\r\n [title]=\"attributeModel.title ? attributeModel.title : ''\"\r\n [(ngModel)]=\"record[attributeModel?.name]\"\r\n #dateField=\"ngModel\"\r\n [dateFormat]=\"'dd/mm/yy'\"\r\n appendTo=\"body\"\r\n (ngModelChange)=\"handleModelChange($event, dateField.valid)\"\r\n [ngClass]=\"{\r\n 'ng-dirty ng-invalid': !dateField.valid && error == attributeModel?.name\r\n }\"\r\n [hourFormat]=\"attributeModel?.hourFormat ? '24' : ''\"\r\n >\r\n </p-calendar>\r\n </div>\r\n }\r\n</div>\r\n\r\n}\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: CalendarModule }, { kind: "component", type: i3$5.Calendar, selector: "p-calendar", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepYearPicker", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "variant", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
1162
|
+
}
|
|
1163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DateComponent, decorators: [{
|
|
1164
|
+
type: Component,
|
|
1165
|
+
args: [{ selector: 'date', standalone: true, imports: [CommonModule, CalendarModule, FormsModule], template: "@if (attributeModel && record) {\r\n<div class=\"\">\r\n <div class=\"mb-2\">\r\n <label>{{\r\n attributeModel?.displayText\r\n ? attributeModel?.displayText\r\n : attributeModel?.name\r\n }}</label>\r\n <span class=\"asterisk ml-1\" *ngIf=\"attributeModel.isRequired\">*</span>\r\n </div>\r\n @if (attributeModel.readonly) {\r\n <div class=\"mb-2\" [ngStyle]=\"{ 'font-size': '14px', color: '#0F1729', 'font-weight':'600' }\">\r\n <label>{{ getValue() }}</label>\r\n </div>\r\n } @else {\r\n <div>\r\n <p-calendar\r\n [showIcon]=\"attributeModel.showCalenderIcon ?? true\"\r\n inputId=\"icon\"\r\n [disabled]=\"attributeModel?.readonly ?? false\"\r\n [required]=\"attributeModel?.isRequired ?? false\"\r\n [name]=\"attributeModel?.name ? attributeModel?.name : 'testDatePicker'\"\r\n [placeholder]=\"\r\n attributeModel.placeholder ? attributeModel.placeholder : ''\r\n \"\r\n [yearRange]=\"attributeModel.yearRange ?? '1950 : 2050'\"\r\n [title]=\"attributeModel.title ? attributeModel.title : ''\"\r\n [(ngModel)]=\"record[attributeModel?.name]\"\r\n #dateField=\"ngModel\"\r\n [dateFormat]=\"'dd/mm/yy'\"\r\n appendTo=\"body\"\r\n (ngModelChange)=\"handleModelChange($event, dateField.valid)\"\r\n [ngClass]=\"{\r\n 'ng-dirty ng-invalid': !dateField.valid && error == attributeModel?.name\r\n }\"\r\n [hourFormat]=\"attributeModel?.hourFormat ? '24' : ''\"\r\n >\r\n </p-calendar>\r\n </div>\r\n }\r\n</div>\r\n\r\n}\r\n" }]
|
|
1166
|
+
}], ctorParameters: () => [{ type: DateParserService }] });
|
|
1167
|
+
|
|
1168
|
+
class FileUploadComponent extends BaseControlComponent {
|
|
1169
|
+
handleSingleUpload(event) {
|
|
1170
|
+
console.log(event);
|
|
1171
|
+
}
|
|
1172
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FileUploadComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1173
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: FileUploadComponent, isStandalone: true, selector: "file-upload", usesInheritance: true, ngImport: i0, template: "<ng-container class=\"documentContainer\">\r\n @if(!attributeModel.hideLabelOnForm){\r\n <div class=\"mb-2\">\r\n <label class=\"form-header-label\">{{ attributeModel?.displayText }}</label>\r\n <span class=\"asterisk ml-1\" *ngIf=\"attributeModel.isRequired\">*</span>\r\n </div>\r\n }\r\n<div class=\"card flex justify-content-center\">\r\n <p-fileUpload \r\n mode=\"basic\" \r\n [chooseLabel]=\"record[attributeModel.name] ? attributeModel.displayText : 'No Files'\"\r\n chooseIcon=\"pi pi-plus\"\r\n [name]=\"attributeModel?.name\"\r\n accept=\"image/*,application/pdf\" \r\n [maxFileSize]=\"209715200\" class=\"fileUploader\"\r\n (onSelect)=\"handleSingleUpload($event)\" />\r\n</div>\r\n</ng-container>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i2$3.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"] }] });
|
|
1174
|
+
}
|
|
1175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FileUploadComponent, decorators: [{
|
|
1176
|
+
type: Component,
|
|
1177
|
+
args: [{ selector: 'file-upload', standalone: true, imports: [CommonModule, FormsModule, FileUploadModule], template: "<ng-container class=\"documentContainer\">\r\n @if(!attributeModel.hideLabelOnForm){\r\n <div class=\"mb-2\">\r\n <label class=\"form-header-label\">{{ attributeModel?.displayText }}</label>\r\n <span class=\"asterisk ml-1\" *ngIf=\"attributeModel.isRequired\">*</span>\r\n </div>\r\n }\r\n<div class=\"card flex justify-content-center\">\r\n <p-fileUpload \r\n mode=\"basic\" \r\n [chooseLabel]=\"record[attributeModel.name] ? attributeModel.displayText : 'No Files'\"\r\n chooseIcon=\"pi pi-plus\"\r\n [name]=\"attributeModel?.name\"\r\n accept=\"image/*,application/pdf\" \r\n [maxFileSize]=\"209715200\" class=\"fileUploader\"\r\n (onSelect)=\"handleSingleUpload($event)\" />\r\n</div>\r\n</ng-container>" }]
|
|
1178
|
+
}] });
|
|
1179
|
+
|
|
1180
|
+
class CapitalizeWordsPipe {
|
|
1181
|
+
transform(value) {
|
|
1182
|
+
if (!value)
|
|
1183
|
+
return value;
|
|
1184
|
+
return value
|
|
1185
|
+
.split(' ')
|
|
1186
|
+
.map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
|
|
1187
|
+
.join(' ');
|
|
1188
|
+
}
|
|
1189
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: CapitalizeWordsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1190
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.4", ngImport: i0, type: CapitalizeWordsPipe, isStandalone: true, name: "capitalizeWords" });
|
|
1191
|
+
}
|
|
1192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: CapitalizeWordsPipe, decorators: [{
|
|
1193
|
+
type: Pipe,
|
|
1194
|
+
args: [{
|
|
1195
|
+
name: 'capitalizeWords',
|
|
1196
|
+
standalone: true,
|
|
1197
|
+
}]
|
|
1198
|
+
}] });
|
|
1199
|
+
|
|
1200
|
+
class TextAreaComponent extends BaseControlComponent {
|
|
1201
|
+
rowspan = 0;
|
|
1202
|
+
getValue() {
|
|
1203
|
+
if (this.record[this.attributeModel.name] == false) {
|
|
1204
|
+
return typeof this.record[this.attributeModel.name] == "string" ? "" : "No";
|
|
1205
|
+
}
|
|
1206
|
+
else if (this.record[this.attributeModel.name] == true) {
|
|
1207
|
+
return "Yes";
|
|
1208
|
+
}
|
|
1209
|
+
else {
|
|
1210
|
+
return this.record[this.attributeModel.name] ?? "-";
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: TextAreaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1214
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: TextAreaComponent, isStandalone: true, selector: "text-area", inputs: { rowspan: "rowspan" }, usesInheritance: true, ngImport: i0, template: "<ng-container class=\"textAreaContainer\">\r\n <div *ngIf=\"attributeModel.displayText\" class=\"mb-2\">\r\n <label>{{ attributeModel.displayText }}</label>\r\n <span class=\"asterisk ml-1\" *ngIf=\"attributeModel.isRequired\">*</span>\r\n </div>\r\n @if (attributeModel.readonly) {\r\n <div class=\"mb-2\" [ngStyle]=\"{'font-size':'14px', 'color':'#0F1729', 'font-weight':'600' }\">\r\n <label class=\"text-value-wrapper\" [ngStyle]=\"{color: attributeModel.textColorOnReadonly}\">{{ getValue() }}</label>\r\n </div>\r\n } @else {\r\n <div class=\"textAreaControl\">\r\n <textarea\r\n pInputTextarea\r\n [rows]=\"rowspan ?? 3\"\r\n cols=\"30\"\r\n [disabled]=\"attributeModel?.readonly ?? false\"\r\n [ngModel]=\"record[attributeModel.name]\"\r\n [name]=\"attributeModel.name ?? 'textArea'\"\r\n [required]=\"attributeModel?.isRequired ?? false\"\r\n [ngStyle]=\"{\r\n width: attributeModel.customColumnWidth\r\n ? attributeModel.customColumnWidth\r\n : ''\r\n }\"\r\n #textArea=\"ngModel\"\r\n (ngModelChange)=\"handleModelChange($event, textArea.valid)\"\r\n [ngClass]=\"{\r\n 'ng-dirty ng-invalid':\r\n (!textArea.valid && error == attributeModel?.name)\r\n \r\n }\"\r\n ></textarea>\r\n \r\n </div>\r\n }\r\n</ng-container>\r\n", styles: [".asterisk{color:red}.textAreaControl{position:relative}.textAreaControl textarea{width:100%;resize:vertical}.textCount{position:absolute;bottom:10%;right:2%;color:#bcbcbc}.markRed{color:red}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: InputTextareaModule }, { kind: "directive", type: i2$4.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize", "variant"], outputs: ["onResize"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3$1.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: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
1215
|
+
}
|
|
1216
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: TextAreaComponent, decorators: [{
|
|
1217
|
+
type: Component,
|
|
1218
|
+
args: [{ selector: 'text-area', standalone: true, imports: [CommonModule, InputTextareaModule, FormsModule], template: "<ng-container class=\"textAreaContainer\">\r\n <div *ngIf=\"attributeModel.displayText\" class=\"mb-2\">\r\n <label>{{ attributeModel.displayText }}</label>\r\n <span class=\"asterisk ml-1\" *ngIf=\"attributeModel.isRequired\">*</span>\r\n </div>\r\n @if (attributeModel.readonly) {\r\n <div class=\"mb-2\" [ngStyle]=\"{'font-size':'14px', 'color':'#0F1729', 'font-weight':'600' }\">\r\n <label class=\"text-value-wrapper\" [ngStyle]=\"{color: attributeModel.textColorOnReadonly}\">{{ getValue() }}</label>\r\n </div>\r\n } @else {\r\n <div class=\"textAreaControl\">\r\n <textarea\r\n pInputTextarea\r\n [rows]=\"rowspan ?? 3\"\r\n cols=\"30\"\r\n [disabled]=\"attributeModel?.readonly ?? false\"\r\n [ngModel]=\"record[attributeModel.name]\"\r\n [name]=\"attributeModel.name ?? 'textArea'\"\r\n [required]=\"attributeModel?.isRequired ?? false\"\r\n [ngStyle]=\"{\r\n width: attributeModel.customColumnWidth\r\n ? attributeModel.customColumnWidth\r\n : ''\r\n }\"\r\n #textArea=\"ngModel\"\r\n (ngModelChange)=\"handleModelChange($event, textArea.valid)\"\r\n [ngClass]=\"{\r\n 'ng-dirty ng-invalid':\r\n (!textArea.valid && error == attributeModel?.name)\r\n \r\n }\"\r\n ></textarea>\r\n \r\n </div>\r\n }\r\n</ng-container>\r\n", styles: [".asterisk{color:red}.textAreaControl{position:relative}.textAreaControl textarea{width:100%;resize:vertical}.textCount{position:absolute;bottom:10%;right:2%;color:#bcbcbc}.markRed{color:red}\n"] }]
|
|
1219
|
+
}], propDecorators: { rowspan: [{
|
|
1220
|
+
type: Input
|
|
1221
|
+
}] } });
|
|
1222
|
+
|
|
1223
|
+
class QueueSearchCustomerComponent {
|
|
1224
|
+
constructor() { }
|
|
1225
|
+
queues = [
|
|
1226
|
+
{ name: SHARED.ALL, code: SHARED.QUEUE1 },
|
|
1227
|
+
{ name: SHARED.UK, code: SHARED.QUEUE2 },
|
|
1228
|
+
{ name: SHARED.INTERNATIONAL, code: SHARED.QUEUE3 }
|
|
1229
|
+
];
|
|
1230
|
+
queueData = [];
|
|
1231
|
+
selectedQueue;
|
|
1232
|
+
onSearch() {
|
|
1233
|
+
console.log(SHARED.SELECTED_QUEUE, this.selectedQueue);
|
|
1234
|
+
}
|
|
1235
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueSearchCustomerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1236
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: QueueSearchCustomerComponent, isStandalone: false, selector: "queue-search-customer", ngImport: i0, template: "<div class=\"flex mt-5 xl:mt-0 xl:justify-content-between xl:align-items-center vh-100\">\r\n <div class=\"p-field m-0 p-0 w-full bg-white border-round\">\r\n <div class=\"p-inputgroup border-round-left bg-white\">\r\n <span class=\"p-inputgroup-addon bg-white\">\r\n <i class=\"pi pi-search\"></i>\r\n </span>\r\n <input type=\"text\" class=\"border-none h-44 border-noround-right bg-white\" pInputText placeholder=\"Search with Applicaiton no., Name or Address\" />\r\n </div>\r\n </div>\r\n <div class=\"p-field m-0 p-0 py-2 border-round-right border-noround-left\">\r\n <p-dropdown \r\n [styleClass]=\"'bg-white font-bold'\"\r\n [options]=\"queues\" \r\n [(ngModel)]=\"selectedQueue\" \r\n placeholder=\"All queue\"\r\n optionLabel=\"name\"\r\n class=\"left-arrow-dropdown\"\r\n ></p-dropdown>\r\n </div>\r\n <div class=\"p-field p-0 m-0 ml-3\">\r\n <button class=\"py-3 border-none\" pButton type=\"button\" label=\"Search\" (click)=\"onSearch()\"></button>\r\n </div>\r\n </div>\r\n ", styles: [".p-inputgroup{width:100%}.bg-primary{background-color:#d9d9d9}::ng-deep .left-arrow-dropdown .p-dropdown{direction:rtl;width:100%;height:44px;border-top-left-radius:0;border-bottom-left-radius:0}::ng-deep .left-arrow-dropdown .p-dropdown-label{display:flex;align-items:center}.h-44{height:44px}@media screen and (min-width: 1200px){.vh-100{height:calc(100vh - 170px)}}.bg-while{background-color:#fff}\n"], dependencies: [{ kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$2.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "directive", type: i2$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: i3$4.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"] }] });
|
|
1237
|
+
}
|
|
1238
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueSearchCustomerComponent, decorators: [{
|
|
1239
|
+
type: Component,
|
|
1240
|
+
args: [{ selector: 'queue-search-customer', standalone: false, template: "<div class=\"flex mt-5 xl:mt-0 xl:justify-content-between xl:align-items-center vh-100\">\r\n <div class=\"p-field m-0 p-0 w-full bg-white border-round\">\r\n <div class=\"p-inputgroup border-round-left bg-white\">\r\n <span class=\"p-inputgroup-addon bg-white\">\r\n <i class=\"pi pi-search\"></i>\r\n </span>\r\n <input type=\"text\" class=\"border-none h-44 border-noround-right bg-white\" pInputText placeholder=\"Search with Applicaiton no., Name or Address\" />\r\n </div>\r\n </div>\r\n <div class=\"p-field m-0 p-0 py-2 border-round-right border-noround-left\">\r\n <p-dropdown \r\n [styleClass]=\"'bg-white font-bold'\"\r\n [options]=\"queues\" \r\n [(ngModel)]=\"selectedQueue\" \r\n placeholder=\"All queue\"\r\n optionLabel=\"name\"\r\n class=\"left-arrow-dropdown\"\r\n ></p-dropdown>\r\n </div>\r\n <div class=\"p-field p-0 m-0 ml-3\">\r\n <button class=\"py-3 border-none\" pButton type=\"button\" label=\"Search\" (click)=\"onSearch()\"></button>\r\n </div>\r\n </div>\r\n ", styles: [".p-inputgroup{width:100%}.bg-primary{background-color:#d9d9d9}::ng-deep .left-arrow-dropdown .p-dropdown{direction:rtl;width:100%;height:44px;border-top-left-radius:0;border-bottom-left-radius:0}::ng-deep .left-arrow-dropdown .p-dropdown-label{display:flex;align-items:center}.h-44{height:44px}@media screen and (min-width: 1200px){.vh-100{height:calc(100vh - 170px)}}.bg-while{background-color:#fff}\n"] }]
|
|
1241
|
+
}], ctorParameters: () => [] });
|
|
1242
|
+
|
|
1243
|
+
class ROUTES {
|
|
1244
|
+
static QUEUE_FORM = "/queue/";
|
|
1245
|
+
static DICTIONARY_CREATE_FORM = '/dictionary/create';
|
|
1246
|
+
static DICTIONARY = '/dictionary/';
|
|
1247
|
+
static APIMANAGEMENT = '/apiManagement/';
|
|
1248
|
+
static APICONFIG = 'apiConfig';
|
|
1249
|
+
static VALIDATEAPI = 'api-configurations/validateApi';
|
|
1250
|
+
static APPLICATION = "application/";
|
|
1251
|
+
static APIPROPERTIES = "api-configurations/get-parent";
|
|
1252
|
+
static APPLICATION_WIDGET = "widgets/evaluate";
|
|
1253
|
+
static DOCUMENTALERT = "alerts/documentId";
|
|
1254
|
+
static VALIDATE_ACTIONS = 'actions/validate';
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
class BlockListComponent {
|
|
1258
|
+
router;
|
|
1259
|
+
// @Input() list!: any;
|
|
1260
|
+
queueData;
|
|
1261
|
+
showQueueDataForm = true;
|
|
1262
|
+
queueDataById = new EventEmitter();
|
|
1263
|
+
selectedQueueId;
|
|
1264
|
+
constructor(router) {
|
|
1265
|
+
this.router = router;
|
|
1266
|
+
}
|
|
1267
|
+
ngOnChanges() {
|
|
1268
|
+
this.queueData = this.queueData.map((queue) => {
|
|
1269
|
+
if (queue.name === SHARED.UK) {
|
|
1270
|
+
return { ...queue, itemCount: 5 };
|
|
1271
|
+
}
|
|
1272
|
+
else if (queue.name === SHARED.INTERNATIONAL) {
|
|
1273
|
+
return { ...queue, itemCount: 2 };
|
|
1274
|
+
}
|
|
1275
|
+
return queue;
|
|
1276
|
+
});
|
|
1277
|
+
this.queueDataById.emit(this.queueData[0]?._id);
|
|
1278
|
+
this.selectedQueueId = this.queueData[0]?._id;
|
|
1279
|
+
// this.handleQueueClick(this.list[0]._id, this.showQueueDataForm);
|
|
1280
|
+
}
|
|
1281
|
+
insertQueue() {
|
|
1282
|
+
this.router.navigate([ROUTES.QUEUE_FORM + SHARED.ZERO]);
|
|
1283
|
+
}
|
|
1284
|
+
handleQueueClick(queueId, showQueueDataForm) {
|
|
1285
|
+
this.selectedQueueId = queueId;
|
|
1286
|
+
if (showQueueDataForm) {
|
|
1287
|
+
this.router.navigateByUrl(ROUTES.QUEUE_FORM + queueId);
|
|
1288
|
+
localStorage.setItem(SHARED.SELECTED_QUEUE_ID, queueId);
|
|
1289
|
+
}
|
|
1290
|
+
else {
|
|
1291
|
+
this.queueDataById.emit(queueId);
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BlockListComponent, deps: [{ token: i3$3.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
1295
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: BlockListComponent, isStandalone: true, selector: "block-list", inputs: { queueData: "queueData", showQueueDataForm: "showQueueDataForm" }, outputs: { queueDataById: "queueDataById" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"card p-4 pr-3 mb-0\">\r\n <!-- <div class=\"px-4 w-full flex\">\r\n <button pButton pRipple label=\"Add New Queue\" routerLinkActive=\"router-link-active\" icon=\"pi pi-plus font-semibold\" class=\"py-3 justify-content-center font-semibold w-full border-round\" (click)=\"insertQueue()\"></button>\r\n </div> -->\r\n <div class=\"queues overflow-y-scroll scrollable\">\r\n\r\n @for(queue of queueData; let i = $index; track queue){\r\n <div class=\"flex flex-column gap-5 overflow-y-auto scrollable kanban-list\" [ngClass]=\"i !== 0 ? 'mt-2 pt-1' : ''\" #listEl style=\"min-height:2rem\" (click)=\"handleQueueClick(queue._id, false)\" >\r\n <div class=\"flex flex-column py-4 px-3 cursor-pointer queue-list-wrapper\" [ngClass]=\"{'active-queue-wrapper': queue._id === this.selectedQueueId}\">\r\n <div class=\"flex text-center justify-content-between flex align-items-center\">\r\n <!-- <button class=\"btn-edit\" type=\"button\" pButton pRipple icon=\"pi pi-pencil\" -->\r\n <!-- (click)=\"handleQueueClick(queue._id, true)\"></button> -->\r\n <span class=\"text-color queue-name font-semibold\"\r\n [ngClass]=\"{'active-title-wrapper': queue._id === this.selectedQueueId}\"\r\n >{{queue.name}}</span>\r\n <p-badge [value]=\"queue.itemCount\" severity=\"primary\" />\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n <div class=\"flex flex-column gap-5 overflow-y-auto mt-2 pt-1 scrollable kanban-list\" #listEl style=\"min-height:2rem\" >\r\n <div class=\"flex flex-column py-4 px-3 p-3 cursor-pointer queue-list-wrapper\">\r\n <div class=\"flex text-center justify-content-between flex align-items-center\">\r\n <!-- <button class=\"btn-edit\" type=\"button\" pButton pRipple icon=\"pi pi-pencil\" -->\r\n <!-- (click)=\"handleQueueClick(queue._id, true)\"></button> -->\r\n <span class=\"text-color queue-name font-semibold\"\r\n >Total Loss</span>\r\n <p-badge [value]=\"11\" severity=\"primary\" />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"flex flex-column gap-5 overflow-y-auto mt-2 pt-1 scrollable kanban-list\" #listEl style=\"min-height:2rem\" >\r\n <div class=\"flex flex-column py-4 px-3 p-3 cursor-pointer queue-list-wrapper\">\r\n <div class=\"flex text-center justify-content-between flex align-items-center\">\r\n <!-- <button class=\"btn-edit\" type=\"button\" pButton pRipple icon=\"pi pi-pencil\" -->\r\n <!-- (click)=\"handleQueueClick(queue._id, true)\"></button> -->\r\n <span class=\"text-color queue-name font-semibold\"\r\n >Repair</span>\r\n <p-badge [value]=\"7\" severity=\"primary\" />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div> ", styles: [".block-list-wrapper{height:calc(100vh - 260px);overflow-y:scroll}.card{height:86vh}.scrollable{scroll-behavior:smooth;max-height:75vh}.queue-list-wrapper{border-radius:10px;border:1px solid rgba(76,98,146,.18);background:var(--surface-0)}.active-queue-wrapper{border:1px solid #0F8BFD}.active-title-wrapper{color:#0f8bfd!important}:host ::-webkit-scrollbar{width:8px}:host ::-webkit-scrollbar-track{background:transparent}:host ::-webkit-scrollbar-thumb{background-color:var(--gray-500);border-radius:20px}.queue-name{max-width:150px;word-wrap:break-word;white-space:normal}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: RippleModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: BadgeModule }, { kind: "component", type: i3$6.Badge, selector: "p-badge", inputs: ["styleClass", "style", "badgeSize", "severity", "value", "badgeDisabled", "size"] }] });
|
|
1296
|
+
}
|
|
1297
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BlockListComponent, decorators: [{
|
|
1298
|
+
type: Component,
|
|
1299
|
+
args: [{ selector: 'block-list', standalone: true, imports: [CommonModule, RippleModule, ButtonModule, RouterModule, BadgeModule], template: "<div class=\"card p-4 pr-3 mb-0\">\r\n <!-- <div class=\"px-4 w-full flex\">\r\n <button pButton pRipple label=\"Add New Queue\" routerLinkActive=\"router-link-active\" icon=\"pi pi-plus font-semibold\" class=\"py-3 justify-content-center font-semibold w-full border-round\" (click)=\"insertQueue()\"></button>\r\n </div> -->\r\n <div class=\"queues overflow-y-scroll scrollable\">\r\n\r\n @for(queue of queueData; let i = $index; track queue){\r\n <div class=\"flex flex-column gap-5 overflow-y-auto scrollable kanban-list\" [ngClass]=\"i !== 0 ? 'mt-2 pt-1' : ''\" #listEl style=\"min-height:2rem\" (click)=\"handleQueueClick(queue._id, false)\" >\r\n <div class=\"flex flex-column py-4 px-3 cursor-pointer queue-list-wrapper\" [ngClass]=\"{'active-queue-wrapper': queue._id === this.selectedQueueId}\">\r\n <div class=\"flex text-center justify-content-between flex align-items-center\">\r\n <!-- <button class=\"btn-edit\" type=\"button\" pButton pRipple icon=\"pi pi-pencil\" -->\r\n <!-- (click)=\"handleQueueClick(queue._id, true)\"></button> -->\r\n <span class=\"text-color queue-name font-semibold\"\r\n [ngClass]=\"{'active-title-wrapper': queue._id === this.selectedQueueId}\"\r\n >{{queue.name}}</span>\r\n <p-badge [value]=\"queue.itemCount\" severity=\"primary\" />\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n <div class=\"flex flex-column gap-5 overflow-y-auto mt-2 pt-1 scrollable kanban-list\" #listEl style=\"min-height:2rem\" >\r\n <div class=\"flex flex-column py-4 px-3 p-3 cursor-pointer queue-list-wrapper\">\r\n <div class=\"flex text-center justify-content-between flex align-items-center\">\r\n <!-- <button class=\"btn-edit\" type=\"button\" pButton pRipple icon=\"pi pi-pencil\" -->\r\n <!-- (click)=\"handleQueueClick(queue._id, true)\"></button> -->\r\n <span class=\"text-color queue-name font-semibold\"\r\n >Total Loss</span>\r\n <p-badge [value]=\"11\" severity=\"primary\" />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"flex flex-column gap-5 overflow-y-auto mt-2 pt-1 scrollable kanban-list\" #listEl style=\"min-height:2rem\" >\r\n <div class=\"flex flex-column py-4 px-3 p-3 cursor-pointer queue-list-wrapper\">\r\n <div class=\"flex text-center justify-content-between flex align-items-center\">\r\n <!-- <button class=\"btn-edit\" type=\"button\" pButton pRipple icon=\"pi pi-pencil\" -->\r\n <!-- (click)=\"handleQueueClick(queue._id, true)\"></button> -->\r\n <span class=\"text-color queue-name font-semibold\"\r\n >Repair</span>\r\n <p-badge [value]=\"7\" severity=\"primary\" />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div> ", styles: [".block-list-wrapper{height:calc(100vh - 260px);overflow-y:scroll}.card{height:86vh}.scrollable{scroll-behavior:smooth;max-height:75vh}.queue-list-wrapper{border-radius:10px;border:1px solid rgba(76,98,146,.18);background:var(--surface-0)}.active-queue-wrapper{border:1px solid #0F8BFD}.active-title-wrapper{color:#0f8bfd!important}:host ::-webkit-scrollbar{width:8px}:host ::-webkit-scrollbar-track{background:transparent}:host ::-webkit-scrollbar-thumb{background-color:var(--gray-500);border-radius:20px}.queue-name{max-width:150px;word-wrap:break-word;white-space:normal}\n"] }]
|
|
1300
|
+
}], ctorParameters: () => [{ type: i3$3.Router }], propDecorators: { queueData: [{
|
|
1301
|
+
type: Input
|
|
1302
|
+
}], showQueueDataForm: [{
|
|
1303
|
+
type: Input
|
|
1304
|
+
}], queueDataById: [{
|
|
1305
|
+
type: Output
|
|
1306
|
+
}] } });
|
|
1307
|
+
|
|
1308
|
+
class SharedModule {
|
|
1309
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: SharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1310
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.4", ngImport: i0, type: SharedModule, declarations: [SidebarComponent, QueueSearchCustomerComponent], imports: [CommonModule,
|
|
1311
|
+
FormsModule,
|
|
1312
|
+
InputTextModule,
|
|
1313
|
+
ButtonModule,
|
|
1314
|
+
DropdownModule,
|
|
1315
|
+
InputGroupModule,
|
|
1316
|
+
CardModule,
|
|
1317
|
+
SidebarModule,
|
|
1318
|
+
CheckBoxComponent,
|
|
1319
|
+
DragDropModule,
|
|
1320
|
+
FormContainerComponent,
|
|
1321
|
+
BaseListComponent,
|
|
1322
|
+
DropdownComponent,
|
|
1323
|
+
BaseListComponent,
|
|
1324
|
+
TextBoxComponent,
|
|
1325
|
+
InputTextareaModule,
|
|
1326
|
+
DividerModule,
|
|
1327
|
+
DateComponent,
|
|
1328
|
+
DialogModule,
|
|
1329
|
+
TimelineModule,
|
|
1330
|
+
ListboxModule,
|
|
1331
|
+
CheckboxModule,
|
|
1332
|
+
FileUploadComponent,
|
|
1333
|
+
FileUploadModule,
|
|
1334
|
+
CapitalizeWordsPipe,
|
|
1335
|
+
TextAreaComponent,
|
|
1336
|
+
BaseFormComponent,
|
|
1337
|
+
BlockListComponent], exports: [CapitalizeWordsPipe, TextBoxComponent, FormsModule, ListboxModule, DialogModule, CheckboxModule, DropdownComponent, FormContainerComponent, BaseListComponent, SidebarComponent, DividerModule, CardModule, QueueSearchCustomerComponent, BlockListComponent] });
|
|
1338
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: SharedModule, imports: [CommonModule,
|
|
1339
|
+
FormsModule,
|
|
1340
|
+
InputTextModule,
|
|
1341
|
+
ButtonModule,
|
|
1342
|
+
DropdownModule,
|
|
1343
|
+
InputGroupModule,
|
|
1344
|
+
CardModule,
|
|
1345
|
+
SidebarModule,
|
|
1346
|
+
CheckBoxComponent,
|
|
1347
|
+
DragDropModule,
|
|
1348
|
+
FormContainerComponent,
|
|
1349
|
+
DropdownComponent,
|
|
1350
|
+
TextBoxComponent,
|
|
1351
|
+
InputTextareaModule,
|
|
1352
|
+
DividerModule,
|
|
1353
|
+
DateComponent,
|
|
1354
|
+
DialogModule,
|
|
1355
|
+
TimelineModule,
|
|
1356
|
+
ListboxModule,
|
|
1357
|
+
CheckboxModule,
|
|
1358
|
+
FileUploadComponent,
|
|
1359
|
+
FileUploadModule,
|
|
1360
|
+
TextAreaComponent,
|
|
1361
|
+
BlockListComponent, FormsModule, ListboxModule, DialogModule, CheckboxModule, DividerModule, CardModule] });
|
|
1362
|
+
}
|
|
1363
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: SharedModule, decorators: [{
|
|
1364
|
+
type: NgModule,
|
|
1365
|
+
args: [{
|
|
1366
|
+
declarations: [SidebarComponent, QueueSearchCustomerComponent],
|
|
1367
|
+
imports: [
|
|
1368
|
+
CommonModule,
|
|
1369
|
+
FormsModule,
|
|
1370
|
+
InputTextModule,
|
|
1371
|
+
ButtonModule,
|
|
1372
|
+
DropdownModule,
|
|
1373
|
+
InputGroupModule,
|
|
1374
|
+
CardModule,
|
|
1375
|
+
SidebarModule,
|
|
1376
|
+
CheckBoxComponent,
|
|
1377
|
+
DragDropModule,
|
|
1378
|
+
FormContainerComponent,
|
|
1379
|
+
BaseListComponent,
|
|
1380
|
+
DropdownComponent,
|
|
1381
|
+
BaseListComponent,
|
|
1382
|
+
TextBoxComponent,
|
|
1383
|
+
InputTextareaModule,
|
|
1384
|
+
DividerModule,
|
|
1385
|
+
DateComponent,
|
|
1386
|
+
DialogModule,
|
|
1387
|
+
TimelineModule,
|
|
1388
|
+
ListboxModule,
|
|
1389
|
+
CheckboxModule,
|
|
1390
|
+
FileUploadComponent,
|
|
1391
|
+
FileUploadModule,
|
|
1392
|
+
CapitalizeWordsPipe,
|
|
1393
|
+
TextAreaComponent,
|
|
1394
|
+
BaseFormComponent,
|
|
1395
|
+
BlockListComponent
|
|
1396
|
+
],
|
|
1397
|
+
exports: [CapitalizeWordsPipe, TextBoxComponent, FormsModule, ListboxModule, DialogModule, CheckboxModule, DropdownComponent, FormContainerComponent, BaseListComponent, SidebarComponent, DividerModule, CardModule, QueueSearchCustomerComponent, BlockListComponent]
|
|
1398
|
+
}]
|
|
1399
|
+
}] });
|
|
1400
|
+
|
|
1401
|
+
/**
|
|
1402
|
+
* This class is used to store the API Paths for the application
|
|
1403
|
+
*/
|
|
1404
|
+
class DATASOURCES {
|
|
1405
|
+
static QUEUES = "queues";
|
|
1406
|
+
static DICTIONARY = "data-dictionaries";
|
|
1407
|
+
static ACTIONS = "actions";
|
|
1408
|
+
static WIDGET = "widgets";
|
|
1409
|
+
static APIMANAGEMENT = "api-configurations";
|
|
1410
|
+
static APPLICATION = "applications";
|
|
1411
|
+
static DOCUMETS = "documents";
|
|
1412
|
+
static RATIONALE = "rationale";
|
|
1413
|
+
static QUEUESAPICONFIG = "api-configurations/get-queues-apiconfig";
|
|
1414
|
+
static DELETEDICTIONARYITEM = "data-dictionaries/dictionaryItems";
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
class HEADERS {
|
|
1418
|
+
static API_MANAGEMENT = "Api Management";
|
|
1419
|
+
static DICTIONARY_FORM = "Dictionary Form";
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
class UsernameComponent extends BaseControlComponent {
|
|
1423
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: UsernameComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1424
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: UsernameComponent, isStandalone: true, selector: "username", usesInheritance: true, ngImport: i0, template: "<ng-container>\r\n <div *ngIf=\"attributeModel.displayText\" class=\"mb-2\">\r\n <label>{{ attributeModel.displayText }}</label>\r\n <span class=\"asterisk ml-1\" *ngIf=\"attributeModel.isRequired\">*</span>\r\n </div>\r\n <div class=\"username-control\">\r\n <span class=\"p-input-icon-left\">\r\n <i class=\"pi pi-envelope\"></i>\r\n <input pInputText type=\"text\"\r\n autocomplete=\"off\"\r\n [placeholder]=\"attributeModel.placeholder ?? ''\" \r\n [ngModel]=\"record[attributeModel.name]\"\r\n [required]=\"attributeModel.isRequired ?? false\" \r\n [disabled]=\"attributeModel.readonly ?? false\"\r\n #usernameField=\"ngModel\"\r\n (ngModelChange)=\"handleModelChange($event, usernameField.valid)\" \r\n />\r\n </span>\r\n </div>\r\n </ng-container>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2$2.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3$1.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: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
1425
|
+
}
|
|
1426
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: UsernameComponent, decorators: [{
|
|
1427
|
+
type: Component,
|
|
1428
|
+
args: [{ selector: 'username', standalone: true, imports: [CommonModule, InputTextModule, FormsModule], template: "<ng-container>\r\n <div *ngIf=\"attributeModel.displayText\" class=\"mb-2\">\r\n <label>{{ attributeModel.displayText }}</label>\r\n <span class=\"asterisk ml-1\" *ngIf=\"attributeModel.isRequired\">*</span>\r\n </div>\r\n <div class=\"username-control\">\r\n <span class=\"p-input-icon-left\">\r\n <i class=\"pi pi-envelope\"></i>\r\n <input pInputText type=\"text\"\r\n autocomplete=\"off\"\r\n [placeholder]=\"attributeModel.placeholder ?? ''\" \r\n [ngModel]=\"record[attributeModel.name]\"\r\n [required]=\"attributeModel.isRequired ?? false\" \r\n [disabled]=\"attributeModel.readonly ?? false\"\r\n #usernameField=\"ngModel\"\r\n (ngModelChange)=\"handleModelChange($event, usernameField.valid)\" \r\n />\r\n </span>\r\n </div>\r\n </ng-container>" }]
|
|
1429
|
+
}] });
|
|
1430
|
+
|
|
1431
|
+
class PasswordComponent extends BaseControlComponent {
|
|
1432
|
+
invalidPasswordErrorMsg;
|
|
1433
|
+
constructor() {
|
|
1434
|
+
super();
|
|
1435
|
+
}
|
|
1436
|
+
ngOninit() {
|
|
1437
|
+
this.invalidPasswordErrorMsg = "Invalid Password";
|
|
1438
|
+
}
|
|
1439
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: PasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1440
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: PasswordComponent, isStandalone: true, selector: "password", usesInheritance: true, ngImport: i0, template: "<ng-container>\r\n <div *ngIf=\"attributeModel.displayText\" class=\"mb-2\">\r\n <label>{{ attributeModel.displayText }}</label>\r\n <span class=\"asterisk ml-1\" *ngIf=\"attributeModel.isRequired\">*</span>\r\n </div>\r\n <div class=\"password-control\">\r\n <span class=\"p-input-icon-left\">\r\n <i class=\"pi pi-key\"></i>\r\n <input type=\"password\" autocomplete=\"off\" pInputText [placeholder]=\"attributeModel.placeholder ?? ''\"\r\n [ngModel]=\"record[attributeModel.name]\" [required]=\"attributeModel.isRequired ?? false\" #passwordField=\"ngModel\"\r\n (ngModelChange)=\"handleModelChange($event, passwordField.valid)\" [ngClass]=\"{\r\n 'ng-dirty ng-invalid': !passwordField.valid && error == attributeModel.name\r\n }\" class=\"block p-inputtext\" />\r\n\r\n </span>\r\n </div>\r\n @if (!passwordField.valid && passwordField.dirty) {\r\n <div>\r\n <small id=\"password-help\" class=\"p-error\">{{\r\n invalidPasswordErrorMsg\r\n }}</small>\r\n </div>\r\n }\r\n\r\n</ng-container>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3$1.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: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
1441
|
+
}
|
|
1442
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: PasswordComponent, decorators: [{
|
|
1443
|
+
type: Component,
|
|
1444
|
+
args: [{ selector: 'password', standalone: true, imports: [CommonModule, FormsModule], template: "<ng-container>\r\n <div *ngIf=\"attributeModel.displayText\" class=\"mb-2\">\r\n <label>{{ attributeModel.displayText }}</label>\r\n <span class=\"asterisk ml-1\" *ngIf=\"attributeModel.isRequired\">*</span>\r\n </div>\r\n <div class=\"password-control\">\r\n <span class=\"p-input-icon-left\">\r\n <i class=\"pi pi-key\"></i>\r\n <input type=\"password\" autocomplete=\"off\" pInputText [placeholder]=\"attributeModel.placeholder ?? ''\"\r\n [ngModel]=\"record[attributeModel.name]\" [required]=\"attributeModel.isRequired ?? false\" #passwordField=\"ngModel\"\r\n (ngModelChange)=\"handleModelChange($event, passwordField.valid)\" [ngClass]=\"{\r\n 'ng-dirty ng-invalid': !passwordField.valid && error == attributeModel.name\r\n }\" class=\"block p-inputtext\" />\r\n\r\n </span>\r\n </div>\r\n @if (!passwordField.valid && passwordField.dirty) {\r\n <div>\r\n <small id=\"password-help\" class=\"p-error\">{{\r\n invalidPasswordErrorMsg\r\n }}</small>\r\n </div>\r\n }\r\n\r\n</ng-container>" }]
|
|
1445
|
+
}], ctorParameters: () => [] });
|
|
1446
|
+
|
|
1447
|
+
class CSS {
|
|
1448
|
+
static DIALOGUE_BREAKPOINTS = {
|
|
1449
|
+
'960px': '75vw',
|
|
1450
|
+
'640px': '90vw'
|
|
1451
|
+
};
|
|
1452
|
+
static DIALOGUE_OVERFLOW = { overflow: 'auto' };
|
|
1453
|
+
static DIALOGUE_WIDTH = '100vw';
|
|
1454
|
+
static DIALOGUE_HIGHT = '100vh';
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
class AttributeModel {
|
|
1458
|
+
displayText;
|
|
1459
|
+
readonly;
|
|
1460
|
+
name;
|
|
1461
|
+
isRequired;
|
|
1462
|
+
placeholder;
|
|
1463
|
+
maxLength;
|
|
1464
|
+
infoText;
|
|
1465
|
+
buttonLabel;
|
|
1466
|
+
isDisabled;
|
|
1467
|
+
customButtonWidth;
|
|
1468
|
+
isPrimary;
|
|
1469
|
+
title;
|
|
1470
|
+
customColumnWidth;
|
|
1471
|
+
customHeight;
|
|
1472
|
+
icon;
|
|
1473
|
+
iconPosition;
|
|
1474
|
+
customPadding;
|
|
1475
|
+
dataSource;
|
|
1476
|
+
listValueProperty;
|
|
1477
|
+
listLabelProperty;
|
|
1478
|
+
options;
|
|
1479
|
+
childListName;
|
|
1480
|
+
childListKey;
|
|
1481
|
+
inputId;
|
|
1482
|
+
allowFraction = 'Y';
|
|
1483
|
+
numberMode;
|
|
1484
|
+
currency;
|
|
1485
|
+
locale;
|
|
1486
|
+
tooltip;
|
|
1487
|
+
toolTipPosition;
|
|
1488
|
+
hourFormat;
|
|
1489
|
+
yearRange;
|
|
1490
|
+
showCalenderIcon;
|
|
1491
|
+
additionalFilterList;
|
|
1492
|
+
additionalFilterKey;
|
|
1493
|
+
lookupName;
|
|
1494
|
+
textColorOnReadonly;
|
|
1495
|
+
hideLabelOnForm = false;
|
|
1496
|
+
disable = false;
|
|
1497
|
+
filter = false;
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
class BaseModel {
|
|
1501
|
+
_id;
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
class SessionService {
|
|
1505
|
+
router;
|
|
1506
|
+
constructor(router) {
|
|
1507
|
+
this.router = router;
|
|
1508
|
+
}
|
|
1509
|
+
getUserRole() {
|
|
1510
|
+
const role = sessionStorage.getItem('role');
|
|
1511
|
+
return role;
|
|
1512
|
+
}
|
|
1513
|
+
setUserSession(data) {
|
|
1514
|
+
sessionStorage.setItem(SHARED.SESSIONKEY, JSON.stringify(data));
|
|
1515
|
+
}
|
|
1516
|
+
getUserSession() {
|
|
1517
|
+
const sessionData = sessionStorage.getItem(SHARED.SESSIONKEY);
|
|
1518
|
+
return sessionData ? JSON.parse(sessionData) : null;
|
|
1519
|
+
}
|
|
1520
|
+
getSessionID() {
|
|
1521
|
+
return 1;
|
|
1522
|
+
}
|
|
1523
|
+
clearSession() {
|
|
1524
|
+
sessionStorage.clear();
|
|
1525
|
+
localStorage.clear();
|
|
1526
|
+
}
|
|
1527
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: SessionService, deps: [{ token: i3$3.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1528
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: SessionService, providedIn: 'root' });
|
|
1529
|
+
}
|
|
1530
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: SessionService, decorators: [{
|
|
1531
|
+
type: Injectable,
|
|
1532
|
+
args: [{
|
|
1533
|
+
providedIn: 'root'
|
|
1534
|
+
}]
|
|
1535
|
+
}], ctorParameters: () => [{ type: i3$3.Router }] });
|
|
1536
|
+
|
|
1537
|
+
class AuthGuard {
|
|
1538
|
+
_sessionService;
|
|
1539
|
+
_router;
|
|
1540
|
+
constructor(_sessionService, _router) {
|
|
1541
|
+
this._sessionService = _sessionService;
|
|
1542
|
+
this._router = _router;
|
|
1543
|
+
}
|
|
1544
|
+
canActivate(next, state) {
|
|
1545
|
+
return of(this._sessionService.getSessionID()).pipe(tap$1((sessionID) => {
|
|
1546
|
+
if (!sessionID) {
|
|
1547
|
+
this._router.navigateByUrl("auth/login" + "?returnUrl=" + state.url);
|
|
1548
|
+
}
|
|
1549
|
+
}), map((sessionID) => !!sessionID));
|
|
1550
|
+
}
|
|
1551
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AuthGuard, deps: [{ token: SessionService }, { token: i3$3.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1552
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AuthGuard, providedIn: 'root' });
|
|
1553
|
+
}
|
|
1554
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AuthGuard, decorators: [{
|
|
1555
|
+
type: Injectable,
|
|
1556
|
+
args: [{
|
|
1557
|
+
providedIn: 'root',
|
|
1558
|
+
}]
|
|
1559
|
+
}], ctorParameters: () => [{ type: SessionService }, { type: i3$3.Router }] });
|
|
1560
|
+
|
|
1561
|
+
class BaseContainerComponent {
|
|
1562
|
+
service;
|
|
1563
|
+
constructor(service) {
|
|
1564
|
+
this.service = service;
|
|
1565
|
+
}
|
|
1566
|
+
init() {
|
|
1567
|
+
this.service.initList();
|
|
1568
|
+
}
|
|
1569
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseContainerComponent, deps: [{ token: BaseService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1570
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: BaseContainerComponent, isStandalone: true, selector: "lib-base-container", ngImport: i0, template: "<p>base-container works!</p>\r\n", styles: [""] });
|
|
1571
|
+
}
|
|
1572
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseContainerComponent, decorators: [{
|
|
1573
|
+
type: Component,
|
|
1574
|
+
args: [{ selector: 'lib-base-container', template: "<p>base-container works!</p>\r\n" }]
|
|
1575
|
+
}], ctorParameters: () => [{ type: BaseService }] });
|
|
1576
|
+
|
|
1577
|
+
class LOOKUPS {
|
|
1578
|
+
static DOCUMENTTYPE = 'DocumentType';
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
class TablePrimaryComponent {
|
|
1582
|
+
_router;
|
|
1583
|
+
table;
|
|
1584
|
+
title;
|
|
1585
|
+
showStatus = true;
|
|
1586
|
+
showActions = true;
|
|
1587
|
+
showSearchBar = true;
|
|
1588
|
+
showNewRecordButton = true;
|
|
1589
|
+
showRefreshButton = true;
|
|
1590
|
+
globalFilter = SHARED.EMPTY;
|
|
1591
|
+
constructor(_router) {
|
|
1592
|
+
this._router = _router;
|
|
1593
|
+
}
|
|
1594
|
+
ngOnInit() {
|
|
1595
|
+
// Ensure that table headers are not empty
|
|
1596
|
+
if (this.table.headers.length === 0) {
|
|
1597
|
+
console.error('Table headers are missing.');
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
clearSearch(table) {
|
|
1601
|
+
this.globalFilter = SHARED.EMPTY;
|
|
1602
|
+
table.clear();
|
|
1603
|
+
}
|
|
1604
|
+
refreshTable() {
|
|
1605
|
+
}
|
|
1606
|
+
handleCreate() {
|
|
1607
|
+
const currentRouteURL = this._router.url;
|
|
1608
|
+
this._router.navigate([currentRouteURL + SHARED.SLASH + SHARED.ZERO]);
|
|
1609
|
+
}
|
|
1610
|
+
handleEditClick(id) {
|
|
1611
|
+
const currentRouteURL = this._router.url;
|
|
1612
|
+
this._router.navigate([currentRouteURL + SHARED.SLASH + id]);
|
|
1613
|
+
}
|
|
1614
|
+
editRow(rowData) {
|
|
1615
|
+
console.log('Edit Row:', rowData);
|
|
1616
|
+
}
|
|
1617
|
+
deleteRow(rowData) {
|
|
1618
|
+
console.log('Delete Row:', rowData);
|
|
1619
|
+
}
|
|
1620
|
+
viewRow(rowData) {
|
|
1621
|
+
console.log('Delete Row:', rowData);
|
|
1622
|
+
}
|
|
1623
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: TablePrimaryComponent, deps: [{ token: i3$3.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
1624
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: TablePrimaryComponent, isStandalone: true, selector: "lib-table-primary", inputs: { table: "table", title: "title", showStatus: "showStatus", showActions: "showActions", showSearchBar: "showSearchBar", showNewRecordButton: "showNewRecordButton", showRefreshButton: "showRefreshButton" }, ngImport: i0, template: "<p-table #dt2 [columns]=\"table.headers\" class=\"table-primary-container\" [value]=\"table.records\">\r\n <ng-template pTemplate=\"caption\">\r\n <div class=\"table-header-wrapper flex align-items-center justify-content-between\">\r\n <h3 class=\"text-color table-title-wrapper text-color m-0\">{{title}}</h3>\r\n <div class=\"flex align-items-center justify-content-between w-full\">\r\n <div class=\"flex justify-content-end w-full\" *ngIf=\"showSearchBar\">\r\n <input pInputText type=\"text\" [(ngModel)]=\"globalFilter\" (input)=\"dt2.filterGlobal($event, 'contains')\"\r\n [placeholder]=\"'Search ...'\" class=\"search-input-wrapper w-4\" />\r\n <p-button icon=\"pi pi-cog\" class=\"setting-icon-wrapper ml-3\"></p-button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <!-- Header Template -->\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr *ngIf=\"table.headers.length > 0\">\r\n <th *ngFor=\"let col of table.headers\" class=\"p-4\" [pSortableColumn]=\"col.name\" [ngClass]=\"col.width ? col.width : 'w-full'\">\r\n <h4 class=\"flex align-items-center table-header-title capitalize text-color font-semibold m-0\">\r\n {{ col.name }}\r\n <p-sortIcon [field]=\"col.name\" />\r\n </h4>\r\n </th>\r\n <th *ngIf=\"showActions\" class=\"table-action-title p-4\" [ngClass]=\"table.headers[0]?.width ? 'w-2' : 'w-full'\">\r\n <h4 class=\"text-color font-semibold table-header-title capitalize m-0\">Actions</h4></th>\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- Table Body -->\r\n <ng-template pTemplate=\"body\" let-rowData>\r\n <tr *ngIf=\"table.headers.length > 0\" class=\"table-row-wrapper relative table-group-wrapper\">\r\n <td class=\"text-left p-4\" *ngFor=\"let col of table.headers\">\r\n <div class=\"table-text-wrapper p-0\" \r\n [ngClass]=\"{\r\n 'enable-badge-wrapper': col.name.toLowerCase() === 'status' && rowData[col.name] === 'Enable',\r\n 'disable-badge-wrapper': col.name.toLowerCase() === 'status' && rowData[col.name] === 'Disable',\r\n 'w-8': col.name.toLowerCase() === 'status',\r\n 'text-primary font-semibold': col.name.toLowerCase() === 'action' || col.name.toLowerCase() === 'name'\r\n }\"\r\n >\r\n {{ rowData[col.name] }}\r\n <p *ngIf=\"col.name.toLowerCase() === 'action'\" class=\"text-color font-normal\">{{rowData['apiEndPoint']}}</p>\r\n </div>\r\n </td>\r\n\r\n <!-- Actions -->\r\n <td *ngIf=\"showActions\" class=\"action-data-wrapper text-left p-4\">\r\n <div class=\"flex align-items-center\">\r\n <p-button icon=\"pi pi-pencil\" (click)=\"handleEditClick(rowData._id)\" class=\"edit-icon-wrapper mr-3\"></p-button>\r\n <p-button icon=\"pi pi-trash\" (click)=\"deleteRow(rowData)\" class=\"delete-icon-wrapper mr-3\"></p-button>\r\n </div>\r\n </td>\r\n <p-button icon=\"pi pi-eye\" (click)=\"viewRow(rowData)\" class=\"view-icon-wrapper icon-position-wrapper table-group-wrapper-hover:visible\"></p-button>\r\n </tr>\r\n </ng-template>\r\n</p-table>", styles: [".table-header-container{padding:20px 20px 20px 8px}.table-header-title{font-size:14px}.table-text-wrapper{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;max-width:100%;padding:.5rem;box-sizing:border-box}.table-title-wrapper{font-size:20px;font-weight:700}.table-action-title{border-radius:0 10px 0 0;border-right:1px solid rgba(68,72,109,.1)!important}.action-data-wrapper{border-right:1px solid rgba(68,72,109,.1)!important}.enable-badge-wrapper{border-radius:4px;background:var(--green-500);color:var(--surface-0);text-align:center;padding:5px!important}.disable-badge-wrapper{border-radius:4px;background:#44486d;color:var(--surface-0);text-align:center;padding:5px!important}.search-input-wrapper{height:50px;border-radius:10px;border:1px solid rgba(76,98,146,.1);background:#4c62920a}.table-row-wrapper{position:relative;transition:all .3s ease-in-out}.icon-position-wrapper{position:absolute;top:50%;left:16%;transform:translate(-50%,-50%);opacity:0;visibility:hidden;transition:opacity .3s ease-in-out,visibility .3s ease-in-out}.table-row-wrapper:hover .icon-position-wrapper{opacity:1;visibility:visible}.table-group-wrapper:hover .icon-position-wrapper{visibility:visible;opacity:1}::ng-deep .edit-icon-wrapper .p-button{border-radius:10px;border:1px solid rgba(76,98,146,.1);background:#eef0f5;padding:12px 20px}::ng-deep .edit-icon-wrapper .p-button .pi-pencil{color:var(--primary-color)}::ng-deep .delete-icon-wrapper .p-button{border-radius:10px;border:1px solid rgba(76,98,146,.1);background:#eef0f5;padding:12px 20px}::ng-deep .delete-icon-wrapper .p-button .pi-trash{color:var(--red-500)}::ng-deep .setting-icon-wrapper .p-button{border-radius:10px;border:1px solid rgba(76,98,146,.1);background:#eef0f5;padding:24px;height:50px}::ng-deep .setting-icon-wrapper .p-button .pi-cog{color:var(--primary-color)}::ng-deep .view-icon-wrapper .p-button{border-radius:10px;border:1px solid rgba(76,98,146,.3);background:var(--surface-0);padding:20px;height:40px;box-shadow:none}::ng-deep .view-icon-wrapper .p-button .pi-eye{color:#44486d}::ng-deep .table-primary-container .p-datatable-table{min-width:50rem;padding:20px;background-color:#fff;table-layout:fixed}::ng-deep .table-primary-container .p-datatable-header{padding:20px 20px 0;border-radius:10px 10px 0 0!important;border:none!important}::ng-deep .table-primary-container .p-datatable-thead th{border:1px solid rgba(68,72,109,.1);border-left:none;border-right:none;background:#f9f9fa}::ng-deep .table-primary-container .p-datatable-thead th:first-child{border-radius:10px 0 0;border-left:1px solid rgba(68,72,109,.1)}::ng-deep .table-primary-container tr td{border-bottom:1px solid rgba(68,72,109,.1)}::ng-deep .table-primary-container tr td:first-child{border-left:1px solid rgba(68,72,109,.1)}::ng-deep .table-primary-container tr:last-child td:first-child{border-radius:0 0 0 10px}::ng-deep .table-primary-container tr:last-child td:last-child{border-radius:0 0 10px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i3$7.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i3$7.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i3$7.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i2$1.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: "ngmodule", type: ToggleButtonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3$1.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: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: InputSwitchModule }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2$2.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "ngmodule", type: TooltipModule }] });
|
|
1625
|
+
}
|
|
1626
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: TablePrimaryComponent, decorators: [{
|
|
1627
|
+
type: Component,
|
|
1628
|
+
args: [{ selector: 'lib-table-primary', standalone: true, imports: [CommonModule, TableModule, ButtonModule, ToggleButtonModule, FormsModule, InputSwitchModule, InputTextModule, TooltipModule], template: "<p-table #dt2 [columns]=\"table.headers\" class=\"table-primary-container\" [value]=\"table.records\">\r\n <ng-template pTemplate=\"caption\">\r\n <div class=\"table-header-wrapper flex align-items-center justify-content-between\">\r\n <h3 class=\"text-color table-title-wrapper text-color m-0\">{{title}}</h3>\r\n <div class=\"flex align-items-center justify-content-between w-full\">\r\n <div class=\"flex justify-content-end w-full\" *ngIf=\"showSearchBar\">\r\n <input pInputText type=\"text\" [(ngModel)]=\"globalFilter\" (input)=\"dt2.filterGlobal($event, 'contains')\"\r\n [placeholder]=\"'Search ...'\" class=\"search-input-wrapper w-4\" />\r\n <p-button icon=\"pi pi-cog\" class=\"setting-icon-wrapper ml-3\"></p-button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <!-- Header Template -->\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr *ngIf=\"table.headers.length > 0\">\r\n <th *ngFor=\"let col of table.headers\" class=\"p-4\" [pSortableColumn]=\"col.name\" [ngClass]=\"col.width ? col.width : 'w-full'\">\r\n <h4 class=\"flex align-items-center table-header-title capitalize text-color font-semibold m-0\">\r\n {{ col.name }}\r\n <p-sortIcon [field]=\"col.name\" />\r\n </h4>\r\n </th>\r\n <th *ngIf=\"showActions\" class=\"table-action-title p-4\" [ngClass]=\"table.headers[0]?.width ? 'w-2' : 'w-full'\">\r\n <h4 class=\"text-color font-semibold table-header-title capitalize m-0\">Actions</h4></th>\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- Table Body -->\r\n <ng-template pTemplate=\"body\" let-rowData>\r\n <tr *ngIf=\"table.headers.length > 0\" class=\"table-row-wrapper relative table-group-wrapper\">\r\n <td class=\"text-left p-4\" *ngFor=\"let col of table.headers\">\r\n <div class=\"table-text-wrapper p-0\" \r\n [ngClass]=\"{\r\n 'enable-badge-wrapper': col.name.toLowerCase() === 'status' && rowData[col.name] === 'Enable',\r\n 'disable-badge-wrapper': col.name.toLowerCase() === 'status' && rowData[col.name] === 'Disable',\r\n 'w-8': col.name.toLowerCase() === 'status',\r\n 'text-primary font-semibold': col.name.toLowerCase() === 'action' || col.name.toLowerCase() === 'name'\r\n }\"\r\n >\r\n {{ rowData[col.name] }}\r\n <p *ngIf=\"col.name.toLowerCase() === 'action'\" class=\"text-color font-normal\">{{rowData['apiEndPoint']}}</p>\r\n </div>\r\n </td>\r\n\r\n <!-- Actions -->\r\n <td *ngIf=\"showActions\" class=\"action-data-wrapper text-left p-4\">\r\n <div class=\"flex align-items-center\">\r\n <p-button icon=\"pi pi-pencil\" (click)=\"handleEditClick(rowData._id)\" class=\"edit-icon-wrapper mr-3\"></p-button>\r\n <p-button icon=\"pi pi-trash\" (click)=\"deleteRow(rowData)\" class=\"delete-icon-wrapper mr-3\"></p-button>\r\n </div>\r\n </td>\r\n <p-button icon=\"pi pi-eye\" (click)=\"viewRow(rowData)\" class=\"view-icon-wrapper icon-position-wrapper table-group-wrapper-hover:visible\"></p-button>\r\n </tr>\r\n </ng-template>\r\n</p-table>", styles: [".table-header-container{padding:20px 20px 20px 8px}.table-header-title{font-size:14px}.table-text-wrapper{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;max-width:100%;padding:.5rem;box-sizing:border-box}.table-title-wrapper{font-size:20px;font-weight:700}.table-action-title{border-radius:0 10px 0 0;border-right:1px solid rgba(68,72,109,.1)!important}.action-data-wrapper{border-right:1px solid rgba(68,72,109,.1)!important}.enable-badge-wrapper{border-radius:4px;background:var(--green-500);color:var(--surface-0);text-align:center;padding:5px!important}.disable-badge-wrapper{border-radius:4px;background:#44486d;color:var(--surface-0);text-align:center;padding:5px!important}.search-input-wrapper{height:50px;border-radius:10px;border:1px solid rgba(76,98,146,.1);background:#4c62920a}.table-row-wrapper{position:relative;transition:all .3s ease-in-out}.icon-position-wrapper{position:absolute;top:50%;left:16%;transform:translate(-50%,-50%);opacity:0;visibility:hidden;transition:opacity .3s ease-in-out,visibility .3s ease-in-out}.table-row-wrapper:hover .icon-position-wrapper{opacity:1;visibility:visible}.table-group-wrapper:hover .icon-position-wrapper{visibility:visible;opacity:1}::ng-deep .edit-icon-wrapper .p-button{border-radius:10px;border:1px solid rgba(76,98,146,.1);background:#eef0f5;padding:12px 20px}::ng-deep .edit-icon-wrapper .p-button .pi-pencil{color:var(--primary-color)}::ng-deep .delete-icon-wrapper .p-button{border-radius:10px;border:1px solid rgba(76,98,146,.1);background:#eef0f5;padding:12px 20px}::ng-deep .delete-icon-wrapper .p-button .pi-trash{color:var(--red-500)}::ng-deep .setting-icon-wrapper .p-button{border-radius:10px;border:1px solid rgba(76,98,146,.1);background:#eef0f5;padding:24px;height:50px}::ng-deep .setting-icon-wrapper .p-button .pi-cog{color:var(--primary-color)}::ng-deep .view-icon-wrapper .p-button{border-radius:10px;border:1px solid rgba(76,98,146,.3);background:var(--surface-0);padding:20px;height:40px;box-shadow:none}::ng-deep .view-icon-wrapper .p-button .pi-eye{color:#44486d}::ng-deep .table-primary-container .p-datatable-table{min-width:50rem;padding:20px;background-color:#fff;table-layout:fixed}::ng-deep .table-primary-container .p-datatable-header{padding:20px 20px 0;border-radius:10px 10px 0 0!important;border:none!important}::ng-deep .table-primary-container .p-datatable-thead th{border:1px solid rgba(68,72,109,.1);border-left:none;border-right:none;background:#f9f9fa}::ng-deep .table-primary-container .p-datatable-thead th:first-child{border-radius:10px 0 0;border-left:1px solid rgba(68,72,109,.1)}::ng-deep .table-primary-container tr td{border-bottom:1px solid rgba(68,72,109,.1)}::ng-deep .table-primary-container tr td:first-child{border-left:1px solid rgba(68,72,109,.1)}::ng-deep .table-primary-container tr:last-child td:first-child{border-radius:0 0 0 10px}::ng-deep .table-primary-container tr:last-child td:last-child{border-radius:0 0 10px}\n"] }]
|
|
1629
|
+
}], ctorParameters: () => [{ type: i3$3.Router }], propDecorators: { table: [{
|
|
1630
|
+
type: Input
|
|
1631
|
+
}], title: [{
|
|
1632
|
+
type: Input
|
|
1633
|
+
}], showStatus: [{
|
|
1634
|
+
type: Input
|
|
1635
|
+
}], showActions: [{
|
|
1636
|
+
type: Input
|
|
1637
|
+
}], showSearchBar: [{
|
|
1638
|
+
type: Input
|
|
1639
|
+
}], showNewRecordButton: [{
|
|
1640
|
+
type: Input
|
|
1641
|
+
}], showRefreshButton: [{
|
|
1642
|
+
type: Input
|
|
1643
|
+
}] } });
|
|
1644
|
+
|
|
1645
|
+
class MESSAGE {
|
|
1646
|
+
static VALIDATE_SUCCESS_MESSAGE = "API validation completed successfully! Your API is now ready for use.";
|
|
1647
|
+
static VALIDATE_ACTION_SUCCESS_MESSAGE = "Validation action was successful. The configuration is valid.";
|
|
1648
|
+
static QUERY_CHANGE_EVENT = "Query Change Event:";
|
|
1649
|
+
static DELETE_DICTIONARY_ITEM_SUCCESS = "Dictionary item deleted successfully.";
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
class LISTCONFIG {
|
|
1653
|
+
static createConfig(name, dataSource) {
|
|
1654
|
+
return {
|
|
1655
|
+
name: name,
|
|
1656
|
+
dataSource: dataSource,
|
|
1657
|
+
listValueProperty: "_id",
|
|
1658
|
+
listLabelProperty: "name"
|
|
1659
|
+
};
|
|
1660
|
+
}
|
|
1661
|
+
static APICONFIG = [
|
|
1662
|
+
LISTCONFIG.createConfig("parentApiConfigID", "api-configurations")
|
|
1663
|
+
];
|
|
1664
|
+
static QUEUECONFIG = [
|
|
1665
|
+
LISTCONFIG.createConfig("queueID", "queues")
|
|
1666
|
+
];
|
|
1667
|
+
static ACTIONAPICONFIG = [
|
|
1668
|
+
LISTCONFIG.createConfig("apiConfigID", "api-configurations")
|
|
1669
|
+
];
|
|
1670
|
+
static QUEUEAPICONFIG = [
|
|
1671
|
+
LISTCONFIG.createConfig("apiConfigId", "api-configurations")
|
|
1672
|
+
];
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
let ApiAdminStore = class ApiAdminStore extends BaseStore {
|
|
1676
|
+
constructor() {
|
|
1677
|
+
super();
|
|
1678
|
+
}
|
|
1679
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ApiAdminStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1680
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ApiAdminStore, providedIn: 'root' });
|
|
1681
|
+
};
|
|
1682
|
+
ApiAdminStore = __decorate([
|
|
1683
|
+
StoreConfig({ name: 'apiManagementStore' })
|
|
1684
|
+
], ApiAdminStore);
|
|
1685
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ApiAdminStore, decorators: [{
|
|
1686
|
+
type: Injectable,
|
|
1687
|
+
args: [{ providedIn: 'root' }]
|
|
1688
|
+
}], ctorParameters: () => [] });
|
|
1689
|
+
|
|
1690
|
+
/**
|
|
1691
|
+
* Service for managing API configurations.
|
|
1692
|
+
*/
|
|
1693
|
+
class ApiAdminService extends BaseService {
|
|
1694
|
+
apiManagementStore;
|
|
1695
|
+
configService;
|
|
1696
|
+
constructor(http, apiManagementStore, configService, listService) {
|
|
1697
|
+
super(http, apiManagementStore, configService, listService);
|
|
1698
|
+
this.apiManagementStore = apiManagementStore;
|
|
1699
|
+
this.configService = configService;
|
|
1700
|
+
this._pathName = DATASOURCES.APIMANAGEMENT;
|
|
1701
|
+
}
|
|
1702
|
+
list = LISTCONFIG.APICONFIG;
|
|
1703
|
+
checkApiByPathName(name, record) {
|
|
1704
|
+
return this.http.post(this.apiUrl + name, record).pipe(tap$1((entities) => this.apiManagementStore.set(entities)));
|
|
1705
|
+
}
|
|
1706
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ApiAdminService, deps: [{ token: i1$1.HttpClient }, { token: ApiAdminStore }, { token: AppConfigService }, { token: ListService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1707
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ApiAdminService, providedIn: 'root' });
|
|
1708
|
+
}
|
|
1709
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ApiAdminService, decorators: [{
|
|
1710
|
+
type: Injectable,
|
|
1711
|
+
args: [{ providedIn: 'root' }]
|
|
1712
|
+
}], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: ApiAdminStore }, { type: AppConfigService }, { type: ListService }] });
|
|
1713
|
+
|
|
1714
|
+
/**
|
|
1715
|
+
* Form component for creating and updating API configurations.
|
|
1716
|
+
*/
|
|
1717
|
+
class ApiAdminFormComponent extends BaseFormComponent {
|
|
1718
|
+
apiAdminService;
|
|
1719
|
+
validatorService;
|
|
1720
|
+
router;
|
|
1721
|
+
activatedRoute;
|
|
1722
|
+
apiAdminStore;
|
|
1723
|
+
isDisable = SHARED.TRUE;
|
|
1724
|
+
messages = SHARED.EMPTYARRAY;
|
|
1725
|
+
name = SHARED.EMPTY;
|
|
1726
|
+
selectedParentId;
|
|
1727
|
+
filteredRecords = SHARED.EMPTYARRAY;
|
|
1728
|
+
dropdownOptions = SHARED.EMPTYARRAY;
|
|
1729
|
+
apiPropertyList;
|
|
1730
|
+
recordChangeSubscription = null;
|
|
1731
|
+
constructor(apiAdminService, validatorService, router, activatedRoute, apiAdminStore) {
|
|
1732
|
+
super(apiAdminService, validatorService, router, activatedRoute);
|
|
1733
|
+
this.apiAdminService = apiAdminService;
|
|
1734
|
+
this.validatorService = validatorService;
|
|
1735
|
+
this.router = router;
|
|
1736
|
+
this.activatedRoute = activatedRoute;
|
|
1737
|
+
this.apiAdminStore = apiAdminStore;
|
|
1738
|
+
this.record.isActive = true;
|
|
1739
|
+
}
|
|
1740
|
+
ngOnInit() {
|
|
1741
|
+
this.init();
|
|
1742
|
+
}
|
|
1743
|
+
hanldeValidateApi() {
|
|
1744
|
+
const payload = {
|
|
1745
|
+
path: this.record.path,
|
|
1746
|
+
getByIDPath: this.record.getByIDPath,
|
|
1747
|
+
idProperty: this.record.idProperty
|
|
1748
|
+
};
|
|
1749
|
+
if (this.record.path) {
|
|
1750
|
+
this.apiAdminService.checkApiByPathName(ROUTES.VALIDATEAPI, payload).subscribe({
|
|
1751
|
+
next: (res) => {
|
|
1752
|
+
if (res && res.isValid) {
|
|
1753
|
+
this.handleErrorAndSuccess(res.isValid, res.message);
|
|
1754
|
+
}
|
|
1755
|
+
else {
|
|
1756
|
+
this.handleErrorAndSuccess(res.isValid, SHARED.EMPTY);
|
|
1757
|
+
}
|
|
1758
|
+
},
|
|
1759
|
+
error: (error) => {
|
|
1760
|
+
this.handleErrorAndSuccess(false, error.message);
|
|
1761
|
+
},
|
|
1762
|
+
});
|
|
1763
|
+
}
|
|
1764
|
+
else {
|
|
1765
|
+
this.handleErrorAndSuccess(false, ERROR.VALIDATE_API_FAILED);
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
handleModelChange(event) {
|
|
1769
|
+
if (event) {
|
|
1770
|
+
this.apiAdminService.getById(event).subscribe((res) => {
|
|
1771
|
+
this.apiPropertyList = res.properties.map((property) => ({
|
|
1772
|
+
label: property,
|
|
1773
|
+
value: property
|
|
1774
|
+
}));
|
|
1775
|
+
});
|
|
1776
|
+
}
|
|
1777
|
+
else {
|
|
1778
|
+
this.record.parentKey = SHARED.EMPTY;
|
|
1779
|
+
this.apiPropertyList = SHARED.EMPTYARRAY;
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
handleErrorAndSuccess(isValid, error) {
|
|
1783
|
+
if (isValid) {
|
|
1784
|
+
this.messages = [{ severity: SHARED.SUCCESS, detail: MESSAGE.VALIDATE_SUCCESS_MESSAGE }];
|
|
1785
|
+
setTimeout(() => {
|
|
1786
|
+
this.messages = SHARED.EMPTYARRAY;
|
|
1787
|
+
}, 3000);
|
|
1788
|
+
this.isDisable = SHARED.FALSE;
|
|
1789
|
+
}
|
|
1790
|
+
else {
|
|
1791
|
+
this.messages = [{ severity: SHARED.ERROR, detail: error }];
|
|
1792
|
+
setTimeout(() => {
|
|
1793
|
+
this.messages = SHARED.EMPTYARRAY;
|
|
1794
|
+
}, 3000);
|
|
1795
|
+
this.isDisable = SHARED.TRUE;
|
|
1796
|
+
}
|
|
1797
|
+
}
|
|
1798
|
+
ngOnDestroy() {
|
|
1799
|
+
if (this.recordChangeSubscription) {
|
|
1800
|
+
this.recordChangeSubscription.unsubscribe();
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ApiAdminFormComponent, deps: [{ token: ApiAdminService }, { token: ValidatorService }, { token: i3$3.Router }, { token: i3$3.ActivatedRoute }, { token: ApiAdminStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
1804
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: ApiAdminFormComponent, isStandalone: false, selector: "lib-api-admin-form", usesInheritance: true, ngImport: i0, template: "<form-container\r\n [headerText]=\"'Api Management Form'\"\r\n [messages]=\"messages\"\r\n (onSave)=\"handleSubmit()\"\r\n [showSave]=\"true\" \r\n [disableSaveButton]=\"isDisable\"\r\n (onCancel)=\"handleCancel()\"\r\n>\r\n <div class=\"card p-fluid p-formgrid grid \">\r\n <h4 class=\"font-bold col-12 md:col-12\">Api Config Form</h4>\r\n <div class=\"col-12 md:col-6\">\r\n <text-box\r\n [store]=\"apiAdminStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n readonly: false,\r\n name: 'name',\r\n isRequired: true,\r\n displayText: 'Name',\r\n placeholder: 'Enter Name'\r\n }\"\r\n ></text-box>\r\n </div>\r\n <div class=\"col-12 md:col-6\">\r\n <text-box\r\n [store]=\"apiAdminStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n readonly: false,\r\n name: 'path',\r\n isRequired: true,\r\n displayText: 'Path',\r\n placeholder: 'Enter Path'\r\n }\"\r\n ></text-box>\r\n </div>\r\n <div class=\"col-12 md:col-6\">\r\n <text-box\r\n [store]=\"apiAdminStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n readonly: false,\r\n name: 'getByIDPath',\r\n isRequired: false,\r\n displayText: 'Get By ID Path',\r\n placeholder: 'Enter getByID Path'\r\n }\"\r\n ></text-box>\r\n </div>\r\n <div class=\"col-12 md:col-6\">\r\n <text-box\r\n [store]=\"apiAdminStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n readonly: false,\r\n name: 'idProperty',\r\n isRequired: false,\r\n displayText: 'Id Property',\r\n placeholder: 'Enter Id Property'\r\n }\"\r\n ></text-box>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-2\">\r\n <button\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n label=\"Validate\"\r\n (click)=\"hanldeValidateApi()\"\r\n class=\"p-button-raised\"\r\n ></button>\r\n </div>\r\n </div>\r\n <div class=\"card p-fluid p-formgrid grid \">\r\n <h4 class=\"font-bold\">Other Details</h4>\r\n <div class=\"col-12 md:col-12 p-0 m-0 flex align-items-center\">\r\n <div class=\"col-12 md:col-6\">\r\n <text-box\r\n [store]=\"apiAdminStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n readonly: false,\r\n name: 'authHeaderName',\r\n isRequired: false,\r\n displayText: 'Auth Header',\r\n placeholder: 'Enter Auth Header'\r\n }\"\r\n ></text-box>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-6\">\r\n <text-box\r\n [store]=\"apiAdminStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n readonly: false,\r\n name: 'authToken',\r\n isRequired: false,\r\n displayText: 'Token',\r\n placeholder: 'Enter token'\r\n }\"\r\n ></text-box>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-6\">\r\n <dropdown\r\n [store]=\"apiAdminStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n name: 'parentApiConfigID',\r\n dataSource: 'api-configurations',\r\n listLabelProperty: 'name',\r\n listValueProperty: '_id', \r\n displayText: 'Select Parent',\r\n placeholder: 'Select Parent API',\r\n childListName: 'parentKey',\r\n childListKey: 'name'\r\n }\"\r\n (onInput)=\"handleModelChange($event)\"\r\n ></dropdown>\r\n\r\n </div>\r\n <div class=\"col-12 md:col-6\">\r\n <dropdown\r\n [store]=\"apiAdminStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n name:'parentKey',\r\n displayText : 'Property',\r\n placeholder: 'Select Property',\r\n options: apiPropertyList\r\n }\"></dropdown>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-12\">\r\n <text-area\r\n [store]=\"apiAdminStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n readonly: false,\r\n name: 'description',\r\n isRequired: false,\r\n displayText: 'Description',\r\n placeholder: 'Enter Description'\r\n }\"\r\n ></text-area>\r\n </div>\r\n </div>\r\n</form-container>", styles: [".p-message{margin-left:1rem;margin-right:1rem}.p-message .p-message-wrapper{padding:.143rem 1.357rem}\n"], dependencies: [{ kind: "component", type: TextBoxComponent, selector: "text-box" }, { kind: "component", type: DropdownComponent, selector: "dropdown", inputs: ["isStaticDropdown"] }, { kind: "component", type: FormContainerComponent, selector: "form-container", inputs: ["messages", "record", "headerText", "showSave", "disableSaveButton"], outputs: ["onSave", "onCancel"] }, { kind: "directive", type: i2$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: TextAreaComponent, selector: "text-area", inputs: ["rowspan"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1805
|
+
}
|
|
1806
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ApiAdminFormComponent, decorators: [{
|
|
1807
|
+
type: Component,
|
|
1808
|
+
args: [{ selector: 'lib-api-admin-form', standalone: false, encapsulation: ViewEncapsulation.None, template: "<form-container\r\n [headerText]=\"'Api Management Form'\"\r\n [messages]=\"messages\"\r\n (onSave)=\"handleSubmit()\"\r\n [showSave]=\"true\" \r\n [disableSaveButton]=\"isDisable\"\r\n (onCancel)=\"handleCancel()\"\r\n>\r\n <div class=\"card p-fluid p-formgrid grid \">\r\n <h4 class=\"font-bold col-12 md:col-12\">Api Config Form</h4>\r\n <div class=\"col-12 md:col-6\">\r\n <text-box\r\n [store]=\"apiAdminStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n readonly: false,\r\n name: 'name',\r\n isRequired: true,\r\n displayText: 'Name',\r\n placeholder: 'Enter Name'\r\n }\"\r\n ></text-box>\r\n </div>\r\n <div class=\"col-12 md:col-6\">\r\n <text-box\r\n [store]=\"apiAdminStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n readonly: false,\r\n name: 'path',\r\n isRequired: true,\r\n displayText: 'Path',\r\n placeholder: 'Enter Path'\r\n }\"\r\n ></text-box>\r\n </div>\r\n <div class=\"col-12 md:col-6\">\r\n <text-box\r\n [store]=\"apiAdminStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n readonly: false,\r\n name: 'getByIDPath',\r\n isRequired: false,\r\n displayText: 'Get By ID Path',\r\n placeholder: 'Enter getByID Path'\r\n }\"\r\n ></text-box>\r\n </div>\r\n <div class=\"col-12 md:col-6\">\r\n <text-box\r\n [store]=\"apiAdminStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n readonly: false,\r\n name: 'idProperty',\r\n isRequired: false,\r\n displayText: 'Id Property',\r\n placeholder: 'Enter Id Property'\r\n }\"\r\n ></text-box>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-2\">\r\n <button\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n label=\"Validate\"\r\n (click)=\"hanldeValidateApi()\"\r\n class=\"p-button-raised\"\r\n ></button>\r\n </div>\r\n </div>\r\n <div class=\"card p-fluid p-formgrid grid \">\r\n <h4 class=\"font-bold\">Other Details</h4>\r\n <div class=\"col-12 md:col-12 p-0 m-0 flex align-items-center\">\r\n <div class=\"col-12 md:col-6\">\r\n <text-box\r\n [store]=\"apiAdminStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n readonly: false,\r\n name: 'authHeaderName',\r\n isRequired: false,\r\n displayText: 'Auth Header',\r\n placeholder: 'Enter Auth Header'\r\n }\"\r\n ></text-box>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-6\">\r\n <text-box\r\n [store]=\"apiAdminStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n readonly: false,\r\n name: 'authToken',\r\n isRequired: false,\r\n displayText: 'Token',\r\n placeholder: 'Enter token'\r\n }\"\r\n ></text-box>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-6\">\r\n <dropdown\r\n [store]=\"apiAdminStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n name: 'parentApiConfigID',\r\n dataSource: 'api-configurations',\r\n listLabelProperty: 'name',\r\n listValueProperty: '_id', \r\n displayText: 'Select Parent',\r\n placeholder: 'Select Parent API',\r\n childListName: 'parentKey',\r\n childListKey: 'name'\r\n }\"\r\n (onInput)=\"handleModelChange($event)\"\r\n ></dropdown>\r\n\r\n </div>\r\n <div class=\"col-12 md:col-6\">\r\n <dropdown\r\n [store]=\"apiAdminStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n name:'parentKey',\r\n displayText : 'Property',\r\n placeholder: 'Select Property',\r\n options: apiPropertyList\r\n }\"></dropdown>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-12\">\r\n <text-area\r\n [store]=\"apiAdminStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n readonly: false,\r\n name: 'description',\r\n isRequired: false,\r\n displayText: 'Description',\r\n placeholder: 'Enter Description'\r\n }\"\r\n ></text-area>\r\n </div>\r\n </div>\r\n</form-container>", styles: [".p-message{margin-left:1rem;margin-right:1rem}.p-message .p-message-wrapper{padding:.143rem 1.357rem}\n"] }]
|
|
1809
|
+
}], ctorParameters: () => [{ type: ApiAdminService }, { type: ValidatorService }, { type: i3$3.Router }, { type: i3$3.ActivatedRoute }, { type: ApiAdminStore }] });
|
|
1810
|
+
|
|
1811
|
+
/**
|
|
1812
|
+
* ApiAdminListComponent
|
|
1813
|
+
*/
|
|
1814
|
+
class ApiAdminListComponent extends BaseListComponent {
|
|
1815
|
+
tableBuilder;
|
|
1816
|
+
constructor(apiAdminService, tableBuilder) {
|
|
1817
|
+
super(apiAdminService, tableBuilder);
|
|
1818
|
+
this.tableBuilder = tableBuilder;
|
|
1819
|
+
this.tableBuilder.hiddenHeaders = apiHiddenHeaderList;
|
|
1820
|
+
}
|
|
1821
|
+
ngOnInit() {
|
|
1822
|
+
this.init();
|
|
1823
|
+
}
|
|
1824
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ApiAdminListComponent, deps: [{ token: ApiAdminService }, { token: TableBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
1825
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: ApiAdminListComponent, isStandalone: false, selector: "lib-api-admin-list", usesInheritance: true, ngImport: i0, template: "\r\n@if(table){\r\n <lib-table-primary [table]=\"table\">\r\n \r\n </lib-table-primary>\r\n}", styles: [""], dependencies: [{ kind: "component", type: TablePrimaryComponent, selector: "lib-table-primary", inputs: ["table", "title", "showStatus", "showActions", "showSearchBar", "showNewRecordButton", "showRefreshButton"] }] });
|
|
1826
|
+
}
|
|
1827
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ApiAdminListComponent, decorators: [{
|
|
1828
|
+
type: Component,
|
|
1829
|
+
args: [{ selector: 'lib-api-admin-list', standalone: false, template: "\r\n@if(table){\r\n <lib-table-primary [table]=\"table\">\r\n \r\n </lib-table-primary>\r\n}" }]
|
|
1830
|
+
}], ctorParameters: () => [{ type: ApiAdminService }, { type: TableBuilder }] });
|
|
1831
|
+
|
|
1832
|
+
class ApiAdminModule {
|
|
1833
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ApiAdminModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1834
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.4", ngImport: i0, type: ApiAdminModule, declarations: [ApiAdminFormComponent, ApiAdminListComponent], imports: [CommonModule,
|
|
1835
|
+
FormsModule,
|
|
1836
|
+
SharedModule,
|
|
1837
|
+
HttpClientModule,
|
|
1838
|
+
ButtonModule,
|
|
1839
|
+
UsernameComponent,
|
|
1840
|
+
PasswordComponent,
|
|
1841
|
+
TextAreaComponent,
|
|
1842
|
+
TablePrimaryComponent], exports: [ApiAdminFormComponent, ApiAdminListComponent] });
|
|
1843
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ApiAdminModule, providers: [
|
|
1844
|
+
{
|
|
1845
|
+
provide: APP_INITIALIZER,
|
|
1846
|
+
useFactory: (configService) => () => configService.loadAppConfig(),
|
|
1847
|
+
deps: [AppConfigService],
|
|
1848
|
+
multi: true,
|
|
1849
|
+
},
|
|
1850
|
+
], imports: [CommonModule,
|
|
1851
|
+
FormsModule,
|
|
1852
|
+
SharedModule,
|
|
1853
|
+
HttpClientModule,
|
|
1854
|
+
ButtonModule,
|
|
1855
|
+
UsernameComponent,
|
|
1856
|
+
PasswordComponent,
|
|
1857
|
+
TextAreaComponent,
|
|
1858
|
+
TablePrimaryComponent] });
|
|
1859
|
+
}
|
|
1860
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ApiAdminModule, decorators: [{
|
|
1861
|
+
type: NgModule,
|
|
1862
|
+
args: [{
|
|
1863
|
+
declarations: [ApiAdminFormComponent, ApiAdminListComponent],
|
|
1864
|
+
imports: [
|
|
1865
|
+
CommonModule,
|
|
1866
|
+
FormsModule,
|
|
1867
|
+
SharedModule,
|
|
1868
|
+
HttpClientModule,
|
|
1869
|
+
ButtonModule,
|
|
1870
|
+
UsernameComponent,
|
|
1871
|
+
PasswordComponent,
|
|
1872
|
+
TextAreaComponent,
|
|
1873
|
+
TablePrimaryComponent
|
|
1874
|
+
],
|
|
1875
|
+
exports: [ApiAdminFormComponent, ApiAdminListComponent],
|
|
1876
|
+
providers: [
|
|
1877
|
+
{
|
|
1878
|
+
provide: APP_INITIALIZER,
|
|
1879
|
+
useFactory: (configService) => () => configService.loadAppConfig(),
|
|
1880
|
+
deps: [AppConfigService],
|
|
1881
|
+
multi: true,
|
|
1882
|
+
},
|
|
1883
|
+
],
|
|
1884
|
+
}]
|
|
1885
|
+
}] });
|
|
1886
|
+
|
|
1887
|
+
/**
|
|
1888
|
+
* Widget Admin Store
|
|
1889
|
+
*/
|
|
1890
|
+
let WidgetAdminStore = class WidgetAdminStore extends BaseStore {
|
|
1891
|
+
constructor() {
|
|
1892
|
+
super();
|
|
1893
|
+
}
|
|
1894
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetAdminStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1895
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetAdminStore, providedIn: 'root' });
|
|
1896
|
+
};
|
|
1897
|
+
WidgetAdminStore = __decorate([
|
|
1898
|
+
StoreConfig({ name: 'widgetStore' })
|
|
1899
|
+
], WidgetAdminStore);
|
|
1900
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetAdminStore, decorators: [{
|
|
1901
|
+
type: Injectable,
|
|
1902
|
+
args: [{ providedIn: 'root' }]
|
|
1903
|
+
}], ctorParameters: () => [] });
|
|
1904
|
+
|
|
1905
|
+
/**
|
|
1906
|
+
* Service for managing widget configurations.
|
|
1907
|
+
*/
|
|
1908
|
+
class WidgetAdminService extends BaseService {
|
|
1909
|
+
apiManagementStore;
|
|
1910
|
+
configService;
|
|
1911
|
+
constructor(http, apiManagementStore, configService, listService) {
|
|
1912
|
+
super(http, apiManagementStore, configService, listService);
|
|
1913
|
+
this.apiManagementStore = apiManagementStore;
|
|
1914
|
+
this.configService = configService;
|
|
1915
|
+
this._pathName = DATASOURCES.WIDGET;
|
|
1916
|
+
}
|
|
1917
|
+
list = [
|
|
1918
|
+
{
|
|
1919
|
+
name: "queueID",
|
|
1920
|
+
dataSource: DATASOURCES.QUEUES,
|
|
1921
|
+
listValueProperty: "_id",
|
|
1922
|
+
listLabelProperty: "name",
|
|
1923
|
+
},
|
|
1924
|
+
{
|
|
1925
|
+
name: "dictionaryID",
|
|
1926
|
+
dataSource: DATASOURCES.DICTIONARY,
|
|
1927
|
+
listValueProperty: "_id",
|
|
1928
|
+
listLabelProperty: "name",
|
|
1929
|
+
},
|
|
1930
|
+
{
|
|
1931
|
+
name: "dictionaryItemID",
|
|
1932
|
+
dataSource: "data-dictionaries/dictionaryItems",
|
|
1933
|
+
listValueProperty: "_id",
|
|
1934
|
+
listLabelProperty: "key",
|
|
1935
|
+
},
|
|
1936
|
+
{
|
|
1937
|
+
name: "linkedWidgetID",
|
|
1938
|
+
dataSource: DATASOURCES.WIDGET,
|
|
1939
|
+
listValueProperty: "_id",
|
|
1940
|
+
listLabelProperty: "widgetName",
|
|
1941
|
+
},
|
|
1942
|
+
];
|
|
1943
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetAdminService, deps: [{ token: i1$1.HttpClient }, { token: WidgetAdminStore }, { token: AppConfigService }, { token: ListService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1944
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetAdminService, providedIn: 'root' });
|
|
1945
|
+
}
|
|
1946
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetAdminService, decorators: [{
|
|
1947
|
+
type: Injectable,
|
|
1948
|
+
args: [{ providedIn: 'root' }]
|
|
1949
|
+
}], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: WidgetAdminStore }, { type: AppConfigService }, { type: ListService }] });
|
|
1950
|
+
|
|
1951
|
+
/**
|
|
1952
|
+
* Widget Admin List Component
|
|
1953
|
+
*/
|
|
1954
|
+
class WidgetAdminListComponent extends BaseListComponent {
|
|
1955
|
+
tableBuilder;
|
|
1956
|
+
constructor(widgetAdminService, tableBuilder) {
|
|
1957
|
+
super(widgetAdminService, tableBuilder);
|
|
1958
|
+
this.tableBuilder = tableBuilder;
|
|
1959
|
+
this.tableBuilder.hiddenHeaders = widgetHiddenHeaderList;
|
|
1960
|
+
}
|
|
1961
|
+
ngOnInit() {
|
|
1962
|
+
this.init();
|
|
1963
|
+
}
|
|
1964
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetAdminListComponent, deps: [{ token: WidgetAdminService }, { token: TableBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
1965
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: WidgetAdminListComponent, isStandalone: false, selector: "lib-widget-admin-list", usesInheritance: true, ngImport: i0, template: "@if(table){\r\n<lib-table-primary [table]=\"table\">\r\n\r\n</lib-table-primary>\r\n}", styles: [""], dependencies: [{ kind: "component", type: TablePrimaryComponent, selector: "lib-table-primary", inputs: ["table", "title", "showStatus", "showActions", "showSearchBar", "showNewRecordButton", "showRefreshButton"] }] });
|
|
1966
|
+
}
|
|
1967
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetAdminListComponent, decorators: [{
|
|
1968
|
+
type: Component,
|
|
1969
|
+
args: [{ selector: 'lib-widget-admin-list', standalone: false, template: "@if(table){\r\n<lib-table-primary [table]=\"table\">\r\n\r\n</lib-table-primary>\r\n}" }]
|
|
1970
|
+
}], ctorParameters: () => [{ type: WidgetAdminService }, { type: TableBuilder }] });
|
|
1971
|
+
|
|
1972
|
+
/**
|
|
1973
|
+
* WidgetModel class represents the model of a widget.
|
|
1974
|
+
*/
|
|
1975
|
+
class WidgetModel extends BaseModel {
|
|
1976
|
+
name;
|
|
1977
|
+
queueID;
|
|
1978
|
+
dataItems = [];
|
|
1979
|
+
order;
|
|
1980
|
+
headerDictionaryID;
|
|
1981
|
+
subHeaderDictionaryID;
|
|
1982
|
+
headerDictionaryItemID;
|
|
1983
|
+
subHeaderDictionaryItemID;
|
|
1984
|
+
isActive;
|
|
1985
|
+
}
|
|
1986
|
+
/**
|
|
1987
|
+
* WidgetItemModel class represents the model of a widget item.
|
|
1988
|
+
*/
|
|
1989
|
+
class WidgetItemModel extends BaseModel {
|
|
1990
|
+
name;
|
|
1991
|
+
dictionaryItemID;
|
|
1992
|
+
dictionaryID;
|
|
1993
|
+
isMain;
|
|
1994
|
+
isEditable;
|
|
1995
|
+
linkedWidgetID;
|
|
1996
|
+
isActive;
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1999
|
+
/**
|
|
2000
|
+
* Widget Admin Query
|
|
2001
|
+
*/
|
|
2002
|
+
class WidgetAdminQuery extends BaseQuery {
|
|
2003
|
+
store;
|
|
2004
|
+
constructor(store) {
|
|
2005
|
+
super(store);
|
|
2006
|
+
this.store = store;
|
|
2007
|
+
}
|
|
2008
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetAdminQuery, deps: [{ token: WidgetAdminStore }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2009
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetAdminQuery, providedIn: 'root' });
|
|
2010
|
+
}
|
|
2011
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetAdminQuery, decorators: [{
|
|
2012
|
+
type: Injectable,
|
|
2013
|
+
args: [{ providedIn: 'root' }]
|
|
2014
|
+
}], ctorParameters: () => [{ type: WidgetAdminStore }] });
|
|
2015
|
+
|
|
2016
|
+
/**
|
|
2017
|
+
* WidgetAdminFormComponent
|
|
2018
|
+
*/
|
|
2019
|
+
class WidgetAdminFormComponent extends BaseFormComponent {
|
|
2020
|
+
service;
|
|
2021
|
+
validatorService;
|
|
2022
|
+
widgetStore;
|
|
2023
|
+
query;
|
|
2024
|
+
router;
|
|
2025
|
+
activatedRoute;
|
|
2026
|
+
widgetItem;
|
|
2027
|
+
widgetItems = [];
|
|
2028
|
+
dictionaries = [];
|
|
2029
|
+
headerDictionaryItems = [];
|
|
2030
|
+
subHeaderDictionaryItems = [];
|
|
2031
|
+
dictionaryItemArray = [];
|
|
2032
|
+
widgetOptionsArray = [];
|
|
2033
|
+
constructor(service, validatorService, widgetStore, query, router, activatedRoute) {
|
|
2034
|
+
super(service, validatorService, router, activatedRoute);
|
|
2035
|
+
this.service = service;
|
|
2036
|
+
this.validatorService = validatorService;
|
|
2037
|
+
this.widgetStore = widgetStore;
|
|
2038
|
+
this.query = query;
|
|
2039
|
+
this.router = router;
|
|
2040
|
+
this.activatedRoute = activatedRoute;
|
|
2041
|
+
this.record = new WidgetModel();
|
|
2042
|
+
this.widgetItem = new WidgetItemModel();
|
|
2043
|
+
}
|
|
2044
|
+
ngOnInit() {
|
|
2045
|
+
super.init();
|
|
2046
|
+
this.recordChange.asObservable().subscribe((record) => {
|
|
2047
|
+
this.handleQueueChange(record.queueID);
|
|
2048
|
+
this.handleHeaderDictionarySelect(record.headerDictionaryID);
|
|
2049
|
+
this.handleSubHeaderDictionarySelect(record.subHeaderDictionaryID);
|
|
2050
|
+
if (record?.dataItems?.length > 0) {
|
|
2051
|
+
record.dataItems.forEach((item, index) => {
|
|
2052
|
+
this.handleWidgetItemDictionarySelect(item.dictionaryID, index);
|
|
2053
|
+
});
|
|
2054
|
+
}
|
|
2055
|
+
});
|
|
2056
|
+
}
|
|
2057
|
+
handleWidgetItemAddBtnClick() {
|
|
2058
|
+
this.record.dataItems = [...this.record.dataItems, new WidgetItemModel()];
|
|
2059
|
+
}
|
|
2060
|
+
handleQueueChange(event) {
|
|
2061
|
+
this.query.getLists().subscribe((allLists) => {
|
|
2062
|
+
const allDictionaryRecords = allLists.find((list) => list.forProperty === 'dictionaryID')?.records;
|
|
2063
|
+
this.dictionaries = allDictionaryRecords?.filter((item) => item.queueID === event) || [];
|
|
2064
|
+
});
|
|
2065
|
+
}
|
|
2066
|
+
handleHeaderDictionarySelect(dictionaryId) {
|
|
2067
|
+
this.query.getLists().subscribe((allLists) => {
|
|
2068
|
+
const allDictionaryItemRecords = allLists.find((list) => list.forProperty === 'dictionaryItemID')?.records;
|
|
2069
|
+
this.headerDictionaryItems = allDictionaryItemRecords?.filter((item) => item.dictionaryID === dictionaryId) || [];
|
|
2070
|
+
});
|
|
2071
|
+
}
|
|
2072
|
+
handleSubHeaderDictionarySelect(dictionaryId) {
|
|
2073
|
+
this.query.getLists().subscribe((allLists) => {
|
|
2074
|
+
const allDictionaryItemRecords = allLists.find((list) => list.forProperty === 'dictionaryItemID')?.records;
|
|
2075
|
+
this.subHeaderDictionaryItems = allDictionaryItemRecords?.filter((item) => item.dictionaryID === dictionaryId) || [];
|
|
2076
|
+
});
|
|
2077
|
+
}
|
|
2078
|
+
handleWidgetItemDictionarySelect(dictionaryId, index) {
|
|
2079
|
+
this.query.getLists().subscribe((allLists) => {
|
|
2080
|
+
const allDictionaryItemRecords = allLists.find((list) => list.forProperty === 'dictionaryItemID')?.records;
|
|
2081
|
+
this.dictionaryItemArray[index] = allDictionaryItemRecords?.filter((item) => item.dictionaryID === dictionaryId) || [];
|
|
2082
|
+
});
|
|
2083
|
+
}
|
|
2084
|
+
handleDeleteRecord(index) {
|
|
2085
|
+
if (index >= 0 && index < this.record.dataItems.length) {
|
|
2086
|
+
this.record.dataItems = this.record.dataItems.filter((_, i) => i !== index);
|
|
2087
|
+
}
|
|
2088
|
+
else {
|
|
2089
|
+
console.error(ERROR.INVALID_INDEX, index);
|
|
2090
|
+
}
|
|
2091
|
+
}
|
|
2092
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetAdminFormComponent, deps: [{ token: WidgetAdminService }, { token: ValidatorService }, { token: WidgetAdminStore }, { token: WidgetAdminQuery }, { token: i3$3.Router }, { token: i3$3.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
2093
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: WidgetAdminFormComponent, isStandalone: false, selector: "lib-widget-admin-form", usesInheritance: true, ngImport: i0, template: "<form-container [record]=\"record\" [showSave]=\"true\" [messages]=\"message\" (onSave)=\"handleSubmit()\"\r\n (onCancel)=\"handleCancel()\">\r\n <div class=\"card p-fluid p-formgrid\">\r\n <h4 class=\"font-bold col-12 md:col-12\">Widget Form</h4>\r\n <div class=\"col-12 md:col-12 mt-2 mb-2 flex\">\r\n <div class=\"col-5 md:col-5 mt-2 mb-2\">\r\n <text-box [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\r\n readonly: false,\r\n name: 'name',\r\n isRequired: true,\r\n displayText: 'Name',\r\n placeholder: 'Enter Widget Name'\r\n }\"></text-box>\r\n </div>\r\n\r\n <div class=\"col-5 md:col-5 mt-2 mb-2\">\r\n <dropdown [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\r\n name:'queueID',\r\n displayText : 'Select Queue 2',\r\n isRequired:true,\r\n }\" (onInput)=\"handleQueueChange($event)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"col-2 md:col-2 mt-5\">\r\n <check-box [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\r\n name:'isActive',\r\n displayText : 'Active',\r\n }\">\r\n </check-box>\r\n </div>\r\n </div>\r\n <div class=\"flex\">\r\n <div class=\"col-6 md:col-6 mt-2 mb-2 flex\">\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'headerDictionaryID',\r\n listLabelProperty:'name',\r\n listValueProperty:'_id',\r\n displayText : 'Select Dictionary',\r\n options: dictionaries\r\n }\" (onInput)=\"handleHeaderDictionarySelect($event)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'headerDictionaryItemID',\r\n listLabelProperty:'itemName',\r\n listValueProperty:'_id',\r\n displayText : 'Select Header Item',\r\n options: headerDictionaryItems\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n <div class=\"col-6 md:col-6 mt-2 mb-2 flex\">\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'subHeaderDictionaryID',\r\n listLabelProperty:'name',\r\n listValueProperty:'_id',\r\n displayText : 'Select Dictionary',\r\n options: dictionaries\r\n }\" (onInput)=\"handleSubHeaderDictionarySelect($event)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'subHeaderDictionaryItemID',\r\n listLabelProperty:'itemName',\r\n listValueProperty:'_id',\r\n displayText : 'Select SubHeader Item',\r\n options: subHeaderDictionaryItems\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"field p-0 pr-2 col-12 md:col-2\">\r\n <div class=\"card m-0 p-0 mb-2\">\r\n <div class=\"mt-3 w-full flex\">\r\n <button pButton pRipple routerLinkActive=\"router-link-active\"\r\n icon=\"pi pi-plus font-semibold\"\r\n class=\"py-3 justify-content-center font-semibold w-full border-round\"\r\n (click)=\"handleWidgetItemAddBtnClick()\">\r\n <span class=\"ml-3\">Add Widget Item </span>\r\n </button>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Widget Items -->\r\n <div class=\"feild-card col-12 md:col-12 flex\" *ngFor=\"let widgetItem of record.dataItems; let i = index;\">\r\n <div class=\"field col-2 col-sm-6\">\r\n <text-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name : 'name',\r\n readonly : false,\r\n displayText : 'Item Label',\r\n isRequired : true,\r\n }\"></text-box>\r\n </div>\r\n <div class=\"field col-2 col-sm-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'dictionaryID',\r\n listLabelProperty:'name',\r\n listValueProperty:'_id',\r\n displayText : 'Select Dictionary',\r\n isRequired:true,\r\n options: dictionaries\r\n }\" (onInput)=\"handleWidgetItemDictionarySelect($event, i)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-2 col-sm-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'dictionaryItemID',\r\n listLabelProperty:'itemName',\r\n listValueProperty:'_id',\r\n displayText : 'Select Properties',\r\n isRequired:true,\r\n options: dictionaryItemArray[i]\r\n }\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-2 col-sm-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'linkedWidgetID',\r\n listLabelProperty:'widgetName',\r\n listValueProperty:'_id',\r\n displayText : 'Select Linked Widget',\r\n }\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-4 m-0 flex justify-content-around md:col-4 mt-5\">\r\n <div class=\"m-0\">\r\n <check-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'isMain',\r\n displayText : 'Add to Main ?',\r\n }\">\r\n </check-box>\r\n </div>\r\n <div class=\"m-0\">\r\n <check-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'isEditable',\r\n displayText : 'Is Editable ?',\r\n }\">\r\n </check-box>\r\n </div>\r\n <div class=\"m-0\">\r\n <check-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'isActive',\r\n displayText : 'Is Active ?',\r\n }\">\r\n </check-box>\r\n </div>\r\n <div class=\"ml-1 delete-icon-container\">\r\n <i class=\"pi pi-trash trash-icon-wrapper cursor-pointer\" (click)=\"handleDeleteRecord(i)\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</form-container>", styles: [".trash-icon-wrapper{font-size:20px;color:var(--red-500)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: TextBoxComponent, selector: "text-box" }, { kind: "component", type: DropdownComponent, selector: "dropdown", inputs: ["isStaticDropdown"] }, { kind: "component", type: FormContainerComponent, selector: "form-container", inputs: ["messages", "record", "headerText", "showSave", "disableSaveButton"], outputs: ["onSave", "onCancel"] }, { kind: "component", type: CheckBoxComponent, selector: "check-box" }, { kind: "directive", type: i2$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }] });
|
|
2094
|
+
}
|
|
2095
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetAdminFormComponent, decorators: [{
|
|
2096
|
+
type: Component,
|
|
2097
|
+
args: [{ selector: 'lib-widget-admin-form', standalone: false, template: "<form-container [record]=\"record\" [showSave]=\"true\" [messages]=\"message\" (onSave)=\"handleSubmit()\"\r\n (onCancel)=\"handleCancel()\">\r\n <div class=\"card p-fluid p-formgrid\">\r\n <h4 class=\"font-bold col-12 md:col-12\">Widget Form</h4>\r\n <div class=\"col-12 md:col-12 mt-2 mb-2 flex\">\r\n <div class=\"col-5 md:col-5 mt-2 mb-2\">\r\n <text-box [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\r\n readonly: false,\r\n name: 'name',\r\n isRequired: true,\r\n displayText: 'Name',\r\n placeholder: 'Enter Widget Name'\r\n }\"></text-box>\r\n </div>\r\n\r\n <div class=\"col-5 md:col-5 mt-2 mb-2\">\r\n <dropdown [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\r\n name:'queueID',\r\n displayText : 'Select Queue 2',\r\n isRequired:true,\r\n }\" (onInput)=\"handleQueueChange($event)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"col-2 md:col-2 mt-5\">\r\n <check-box [store]=\"widgetStore\" [record]=\"record\" [attributeModel]=\"{\r\n name:'isActive',\r\n displayText : 'Active',\r\n }\">\r\n </check-box>\r\n </div>\r\n </div>\r\n <div class=\"flex\">\r\n <div class=\"col-6 md:col-6 mt-2 mb-2 flex\">\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'headerDictionaryID',\r\n listLabelProperty:'name',\r\n listValueProperty:'_id',\r\n displayText : 'Select Dictionary',\r\n options: dictionaries\r\n }\" (onInput)=\"handleHeaderDictionarySelect($event)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'headerDictionaryItemID',\r\n listLabelProperty:'itemName',\r\n listValueProperty:'_id',\r\n displayText : 'Select Header Item',\r\n options: headerDictionaryItems\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n <div class=\"col-6 md:col-6 mt-2 mb-2 flex\">\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'subHeaderDictionaryID',\r\n listLabelProperty:'name',\r\n listValueProperty:'_id',\r\n displayText : 'Select Dictionary',\r\n options: dictionaries\r\n }\" (onInput)=\"handleSubHeaderDictionarySelect($event)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-6 pl-2 pb-0 mb-2 md:mr-2 md:col-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"record\" [attributeModel]=\"{\r\n name:'subHeaderDictionaryItemID',\r\n listLabelProperty:'itemName',\r\n listValueProperty:'_id',\r\n displayText : 'Select SubHeader Item',\r\n options: subHeaderDictionaryItems\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"field p-0 pr-2 col-12 md:col-2\">\r\n <div class=\"card m-0 p-0 mb-2\">\r\n <div class=\"mt-3 w-full flex\">\r\n <button pButton pRipple routerLinkActive=\"router-link-active\"\r\n icon=\"pi pi-plus font-semibold\"\r\n class=\"py-3 justify-content-center font-semibold w-full border-round\"\r\n (click)=\"handleWidgetItemAddBtnClick()\">\r\n <span class=\"ml-3\">Add Widget Item </span>\r\n </button>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <!-- Widget Items -->\r\n <div class=\"feild-card col-12 md:col-12 flex\" *ngFor=\"let widgetItem of record.dataItems; let i = index;\">\r\n <div class=\"field col-2 col-sm-6\">\r\n <text-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name : 'name',\r\n readonly : false,\r\n displayText : 'Item Label',\r\n isRequired : true,\r\n }\"></text-box>\r\n </div>\r\n <div class=\"field col-2 col-sm-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'dictionaryID',\r\n listLabelProperty:'name',\r\n listValueProperty:'_id',\r\n displayText : 'Select Dictionary',\r\n isRequired:true,\r\n options: dictionaries\r\n }\" (onInput)=\"handleWidgetItemDictionarySelect($event, i)\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-2 col-sm-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'dictionaryItemID',\r\n listLabelProperty:'itemName',\r\n listValueProperty:'_id',\r\n displayText : 'Select Properties',\r\n isRequired:true,\r\n options: dictionaryItemArray[i]\r\n }\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-2 col-sm-6\">\r\n <dropdown [store]=\"widgetStore\" [isStaticDropdown]=\"true\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'linkedWidgetID',\r\n listLabelProperty:'widgetName',\r\n listValueProperty:'_id',\r\n displayText : 'Select Linked Widget',\r\n }\">\r\n </dropdown>\r\n </div>\r\n <div class=\"field col-4 m-0 flex justify-content-around md:col-4 mt-5\">\r\n <div class=\"m-0\">\r\n <check-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'isMain',\r\n displayText : 'Add to Main ?',\r\n }\">\r\n </check-box>\r\n </div>\r\n <div class=\"m-0\">\r\n <check-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'isEditable',\r\n displayText : 'Is Editable ?',\r\n }\">\r\n </check-box>\r\n </div>\r\n <div class=\"m-0\">\r\n <check-box [store]=\"widgetStore\" [record]=\"widgetItem\" [attributeModel]=\"{\r\n name:'isActive',\r\n displayText : 'Is Active ?',\r\n }\">\r\n </check-box>\r\n </div>\r\n <div class=\"ml-1 delete-icon-container\">\r\n <i class=\"pi pi-trash trash-icon-wrapper cursor-pointer\" (click)=\"handleDeleteRecord(i)\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</form-container>", styles: [".trash-icon-wrapper{font-size:20px;color:var(--red-500)}\n"] }]
|
|
2098
|
+
}], ctorParameters: () => [{ type: WidgetAdminService }, { type: ValidatorService }, { type: WidgetAdminStore }, { type: WidgetAdminQuery }, { type: i3$3.Router }, { type: i3$3.ActivatedRoute }] });
|
|
2099
|
+
|
|
2100
|
+
/**
|
|
2101
|
+
* Module for managing widgets.
|
|
2102
|
+
*/
|
|
2103
|
+
class QWWidgetAdminModule {
|
|
2104
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QWWidgetAdminModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2105
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.4", ngImport: i0, type: QWWidgetAdminModule, declarations: [WidgetAdminListComponent, WidgetAdminFormComponent], imports: [CommonModule,
|
|
2106
|
+
FormsModule,
|
|
2107
|
+
SharedModule,
|
|
2108
|
+
TablePrimaryComponent,
|
|
2109
|
+
DropdownComponent,
|
|
2110
|
+
CheckBoxComponent,
|
|
2111
|
+
ButtonComponent,
|
|
2112
|
+
ButtonModule,
|
|
2113
|
+
TextBoxComponent], exports: [WidgetAdminListComponent, WidgetAdminFormComponent] });
|
|
2114
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QWWidgetAdminModule, imports: [CommonModule,
|
|
2115
|
+
FormsModule,
|
|
2116
|
+
SharedModule,
|
|
2117
|
+
TablePrimaryComponent,
|
|
2118
|
+
DropdownComponent,
|
|
2119
|
+
CheckBoxComponent,
|
|
2120
|
+
ButtonComponent,
|
|
2121
|
+
ButtonModule,
|
|
2122
|
+
TextBoxComponent] });
|
|
2123
|
+
}
|
|
2124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QWWidgetAdminModule, decorators: [{
|
|
2125
|
+
type: NgModule,
|
|
2126
|
+
args: [{
|
|
2127
|
+
declarations: [WidgetAdminListComponent, WidgetAdminFormComponent],
|
|
2128
|
+
imports: [
|
|
2129
|
+
CommonModule,
|
|
2130
|
+
FormsModule,
|
|
2131
|
+
SharedModule,
|
|
2132
|
+
TablePrimaryComponent,
|
|
2133
|
+
DropdownComponent,
|
|
2134
|
+
CheckBoxComponent,
|
|
2135
|
+
ButtonComponent,
|
|
2136
|
+
ButtonModule,
|
|
2137
|
+
TextBoxComponent
|
|
2138
|
+
],
|
|
2139
|
+
exports: [WidgetAdminListComponent, WidgetAdminFormComponent]
|
|
2140
|
+
}]
|
|
2141
|
+
}] });
|
|
2142
|
+
|
|
2143
|
+
class QueueModel extends BaseModel {
|
|
2144
|
+
name;
|
|
2145
|
+
description;
|
|
2146
|
+
apiConfigId;
|
|
2147
|
+
rules;
|
|
2148
|
+
properties;
|
|
2149
|
+
itemCount;
|
|
2150
|
+
apiConfigUrl = "";
|
|
2151
|
+
detailsApiConfigUrl;
|
|
2152
|
+
header;
|
|
2153
|
+
subHeader;
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
let QueueStore = class QueueStore extends BaseStore {
|
|
2157
|
+
constructor() {
|
|
2158
|
+
super();
|
|
2159
|
+
}
|
|
2160
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2161
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueStore, providedIn: "root" });
|
|
2162
|
+
};
|
|
2163
|
+
QueueStore = __decorate([
|
|
2164
|
+
StoreConfig({ name: "queues" })
|
|
2165
|
+
], QueueStore);
|
|
2166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueStore, decorators: [{
|
|
2167
|
+
type: Injectable,
|
|
2168
|
+
args: [{ providedIn: "root" }]
|
|
2169
|
+
}], ctorParameters: () => [] });
|
|
2170
|
+
|
|
2171
|
+
class QueueQuery extends BaseQuery {
|
|
2172
|
+
store;
|
|
2173
|
+
constructor(store) {
|
|
2174
|
+
super(store);
|
|
2175
|
+
this.store = store;
|
|
2176
|
+
}
|
|
2177
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueQuery, deps: [{ token: QueueStore }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2178
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueQuery, providedIn: "root" });
|
|
2179
|
+
}
|
|
2180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueQuery, decorators: [{
|
|
2181
|
+
type: Injectable,
|
|
2182
|
+
args: [{ providedIn: "root" }]
|
|
2183
|
+
}], ctorParameters: () => [{ type: QueueStore }] });
|
|
2184
|
+
|
|
2185
|
+
class QueueService extends BaseService {
|
|
2186
|
+
queueStore;
|
|
2187
|
+
constructor(queueStore, http, appConfigService, listService) {
|
|
2188
|
+
super(http, queueStore, appConfigService, listService);
|
|
2189
|
+
this.queueStore = queueStore;
|
|
2190
|
+
this._pathName = DATASOURCES.QUEUES;
|
|
2191
|
+
}
|
|
2192
|
+
list = LISTCONFIG.QUEUEAPICONFIG;
|
|
2193
|
+
getbyApiPath(id) {
|
|
2194
|
+
return this.http
|
|
2195
|
+
.get(`${this.apiUrl}${URLS.API_CONFIGURATIONS}${id}`)
|
|
2196
|
+
.pipe(tap$1((entities) => this.queueStore.set(entities)));
|
|
2197
|
+
}
|
|
2198
|
+
getCaseById(url) {
|
|
2199
|
+
return this.http
|
|
2200
|
+
.get(url)
|
|
2201
|
+
.pipe(tap$1((entities) => this.queueStore.set(entities)));
|
|
2202
|
+
}
|
|
2203
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueService, deps: [{ token: QueueStore }, { token: i1$1.HttpClient }, { token: AppConfigService }, { token: ListService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2204
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueService, providedIn: "root" });
|
|
2205
|
+
}
|
|
2206
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueService, decorators: [{
|
|
2207
|
+
type: Injectable,
|
|
2208
|
+
args: [{ providedIn: "root" }]
|
|
2209
|
+
}], ctorParameters: () => [{ type: QueueStore }, { type: i1$1.HttpClient }, { type: AppConfigService }, { type: ListService }] });
|
|
2210
|
+
|
|
2211
|
+
class QueueAdminFormComponent extends BaseFormComponent {
|
|
2212
|
+
queueQuery;
|
|
2213
|
+
queueService;
|
|
2214
|
+
activatedRoute;
|
|
2215
|
+
queueStore;
|
|
2216
|
+
validatorService;
|
|
2217
|
+
router;
|
|
2218
|
+
constructor(queueQuery, queueService, activatedRoute, queueStore, validatorService, router) {
|
|
2219
|
+
super(queueService, validatorService, router, activatedRoute);
|
|
2220
|
+
this.queueQuery = queueQuery;
|
|
2221
|
+
this.queueService = queueService;
|
|
2222
|
+
this.activatedRoute = activatedRoute;
|
|
2223
|
+
this.queueStore = queueStore;
|
|
2224
|
+
this.validatorService = validatorService;
|
|
2225
|
+
this.router = router;
|
|
2226
|
+
this.record = new QueueModel();
|
|
2227
|
+
}
|
|
2228
|
+
fetchedProperties;
|
|
2229
|
+
config = { fields: {} };
|
|
2230
|
+
query = {
|
|
2231
|
+
condition: SHARED.AND,
|
|
2232
|
+
rules: [],
|
|
2233
|
+
};
|
|
2234
|
+
ngOnInit() {
|
|
2235
|
+
this.init();
|
|
2236
|
+
const id = this.activatedRoute
|
|
2237
|
+
? this.activatedRoute.snapshot.params[SHARED.ID]
|
|
2238
|
+
: "";
|
|
2239
|
+
if (id && id !== SHARED.ZERO.toString()) {
|
|
2240
|
+
this.service.getById(id).subscribe((res) => {
|
|
2241
|
+
if (res) {
|
|
2242
|
+
this.record = res;
|
|
2243
|
+
this.query = structuredClone(res.rules || { condition: SHARED.AND, rules: [] });
|
|
2244
|
+
this.fetchedProperties = res.properties;
|
|
2245
|
+
this.setupQueryBuilderConfig(this.fetchedProperties);
|
|
2246
|
+
}
|
|
2247
|
+
});
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
setupQueryBuilderConfig(properties) {
|
|
2251
|
+
const fieldsConfig = {};
|
|
2252
|
+
properties.forEach((prop) => {
|
|
2253
|
+
fieldsConfig[prop] = {
|
|
2254
|
+
name: prop,
|
|
2255
|
+
type: SHARED.STRING,
|
|
2256
|
+
operators: SHARED.OPERATORS,
|
|
2257
|
+
options: [],
|
|
2258
|
+
};
|
|
2259
|
+
});
|
|
2260
|
+
this.config = { fields: fieldsConfig };
|
|
2261
|
+
}
|
|
2262
|
+
onQueryChange(event) {
|
|
2263
|
+
console.log(MESSAGE.QUERY_CHANGE_EVENT, event);
|
|
2264
|
+
}
|
|
2265
|
+
handleGetData() {
|
|
2266
|
+
if (this.record.apiConfigId) {
|
|
2267
|
+
this.queueService.getbyApiPath(this.record.apiConfigId).subscribe({
|
|
2268
|
+
next: (res) => {
|
|
2269
|
+
if (res) {
|
|
2270
|
+
this.fetchedProperties = res.properties;
|
|
2271
|
+
this.setupQueryBuilderConfig(res.properties);
|
|
2272
|
+
this.query = structuredClone(res.rules || { condition: SHARED.AND, rules: [] });
|
|
2273
|
+
}
|
|
2274
|
+
},
|
|
2275
|
+
error: (error) => {
|
|
2276
|
+
console.error(ERROR.ERROR_FETCHING_DATA, error);
|
|
2277
|
+
},
|
|
2278
|
+
complete: () => {
|
|
2279
|
+
this.message = SHARED.GET_DATA_MESSAGE;
|
|
2280
|
+
},
|
|
2281
|
+
});
|
|
2282
|
+
}
|
|
2283
|
+
else {
|
|
2284
|
+
console.warn(ERROR.API_NAME_NOT_SET);
|
|
2285
|
+
}
|
|
2286
|
+
}
|
|
2287
|
+
handleSubmit() {
|
|
2288
|
+
this.convertStringToBoolean(this.query.rules);
|
|
2289
|
+
this.record.rules = this.query;
|
|
2290
|
+
this.record.properties = this.fetchedProperties;
|
|
2291
|
+
super.handleSubmit();
|
|
2292
|
+
}
|
|
2293
|
+
convertStringToBoolean(rules) {
|
|
2294
|
+
rules.forEach(rule => {
|
|
2295
|
+
if (rule.rules) {
|
|
2296
|
+
this.convertStringToBoolean(rule.rules);
|
|
2297
|
+
}
|
|
2298
|
+
else if (rule.value === SHARED.STRING_TRUE) {
|
|
2299
|
+
rule.value = true;
|
|
2300
|
+
}
|
|
2301
|
+
else if (rule.value === SHARED.STRING_FALSE) {
|
|
2302
|
+
rule.value = false;
|
|
2303
|
+
}
|
|
2304
|
+
});
|
|
2305
|
+
}
|
|
2306
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueAdminFormComponent, deps: [{ token: QueueQuery }, { token: QueueService }, { token: i3$3.ActivatedRoute }, { token: QueueStore }, { token: ValidatorService }, { token: i3$3.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
2307
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: QueueAdminFormComponent, isStandalone: false, selector: "lib-queue-admin-form", usesInheritance: true, ngImport: i0, template: "<div class=\"grid m-0\">\r\n <div class=\"col-12\">\r\n <div>\r\n <form-container\r\n [record]=\"record\"\r\n [headerText]=\"'Queue / Create Queue'\"\r\n (onSave)=\"handleSubmit()\"\r\n (onCancel)=\"handleCancel()\"\r\n [showSave]=\"true\"\r\n [messages]=\"message\"\r\n >\r\n <div class=\"col-12 card md:col-12 mb-0\">\r\n <h4 class=\"font-bold col-12 md:col-12\">Create Queue</h4>\r\n <div\r\n class=\"mt-4 field mb-0 flex align-items-center justify-content-between col-12 px-0\"\r\n >\r\n <div class=\"field mb-0 col-12 md:col-6\">\r\n <text-box\r\n [record]=\"record\"\r\n [store]=\"queueStore\"\r\n [attributeModel]=\"{\r\n name : 'name',\r\n displayText:'Project Name',\r\n readonly : false,\r\n isRequired : true,\r\n }\"\r\n >\r\n </text-box>\r\n </div>\r\n <div class=\"field mb-0 col-12 md:col-6\">\r\n <dropdown\r\n [record]=\"record\"\r\n [store]=\"queueStore\"\r\n [attributeModel]=\"{\r\n name: 'apiConfigId',\r\n readonly: false,\r\n isRequired: true,\r\n dataSource: 'apiConfig',\r\n listLabelProperty: 'name',\r\n listValueProperty: '_id',\r\n displayText: 'Api'\r\n }\"\r\n >\r\n </dropdown>\r\n </div>\r\n </div>\r\n <div class=\"field mb-0 col-12 md:col-2\">\r\n <button\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n label=\"Validate\"\r\n (click)=\"handleGetData()\"\r\n class=\"p-button-raised\"\r\n ></button>\r\n </div>\r\n <div class=\"my-4 field flex align-items-center justify-content-between col-12 px-0\">\r\n <div class=\"field mb-0 col-12 md:col-6\">\r\n <text-box\r\n [record]=\"record\"\r\n [store]=\"queueStore\"\r\n [attributeModel]=\"{\r\n name : 'header',\r\n displayText:'Header',\r\n readonly : false,\r\n isRequired : true,\r\n }\"\r\n >\r\n </text-box>\r\n </div>\r\n <div class=\"field mb-0 col-12 md:col-6\">\r\n <text-box\r\n [record]=\"record\"\r\n [store]=\"queueStore\"\r\n [attributeModel]=\"{\r\n name : 'subHeader',\r\n displayText:'SubHeader',\r\n readonly : false,\r\n isRequired : false,\r\n }\"\r\n >\r\n </text-box>\r\n </div>\r\n </div>\r\n <ngx-query-builder\r\n [(ngModel)]=\"query\"\r\n [config]=\"config\"\r\n (queryChange)=\"onQueryChange($event)\"\r\n ></ngx-query-builder>\r\n </div>\r\n </form-container>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".q-ruleset .q-switch-radio:checked+.q-switch-label{background:var(--surface-section)!important;color:var(--text-color)!important;border:1px solid var(--primary-color)!important}.q-ruleset .q-switch-label{color:#000!important;border:1px solid}.q-ruleset .q-button{color:var(--text-color)!important;background:var(--primary-color)!important;border-radius:var(--border-radius)!important}.q-ruleset .q-rule{background:var(--surface-section)!important}.q-ruleset .q-field-control,.q-ruleset .q-operator-control,.q-ruleset .q-input-control,.q-ruleset .q-remove-button{background:var(--surface-section)!important;color:var(--text-color)!important;border:1px solid var(--surface-border)!important}.q-ruleset .q-row{border:1px solid var(--surface-border)!important}.card-footer{display:flex;justify-content:flex-end;margin:10px}.button-container{display:flex}.create-button{padding:10px}\n"], dependencies: [{ kind: "component", type: TextBoxComponent, selector: "text-box" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DropdownComponent, selector: "dropdown", inputs: ["isStaticDropdown"] }, { kind: "component", type: FormContainerComponent, selector: "form-container", inputs: ["messages", "record", "headerText", "showSave", "disableSaveButton"], outputs: ["onSave", "onCancel"] }, { kind: "component", type: i10.QueryBuilderComponent, selector: "ngx-query-builder", inputs: ["disabled", "level", "data", "allowRuleset", "allowCollapse", "emptyMessage", "classNames", "operatorMap", "parentValue", "config", "parentArrowIconTemplate", "parentInputTemplates", "parentOperatorTemplate", "parentFieldTemplate", "parentEntityTemplate", "parentSwitchGroupTemplate", "parentButtonGroupTemplate", "parentRulesetAddRuleButtonTemplate", "parentRulesetAddRulesetButtonTemplate", "parentRulesetRemoveButtonTemplate", "parentRuleRemoveButtonTemplate", "parentEmptyWarningTemplate", "parentChangeCallback", "parentTouchedCallback", "persistValueOnFieldChange", "value"] }, { kind: "directive", type: i2$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
2308
|
+
}
|
|
2309
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueAdminFormComponent, decorators: [{
|
|
2310
|
+
type: Component,
|
|
2311
|
+
args: [{ selector: "lib-queue-admin-form", standalone: false, encapsulation: ViewEncapsulation.None, template: "<div class=\"grid m-0\">\r\n <div class=\"col-12\">\r\n <div>\r\n <form-container\r\n [record]=\"record\"\r\n [headerText]=\"'Queue / Create Queue'\"\r\n (onSave)=\"handleSubmit()\"\r\n (onCancel)=\"handleCancel()\"\r\n [showSave]=\"true\"\r\n [messages]=\"message\"\r\n >\r\n <div class=\"col-12 card md:col-12 mb-0\">\r\n <h4 class=\"font-bold col-12 md:col-12\">Create Queue</h4>\r\n <div\r\n class=\"mt-4 field mb-0 flex align-items-center justify-content-between col-12 px-0\"\r\n >\r\n <div class=\"field mb-0 col-12 md:col-6\">\r\n <text-box\r\n [record]=\"record\"\r\n [store]=\"queueStore\"\r\n [attributeModel]=\"{\r\n name : 'name',\r\n displayText:'Project Name',\r\n readonly : false,\r\n isRequired : true,\r\n }\"\r\n >\r\n </text-box>\r\n </div>\r\n <div class=\"field mb-0 col-12 md:col-6\">\r\n <dropdown\r\n [record]=\"record\"\r\n [store]=\"queueStore\"\r\n [attributeModel]=\"{\r\n name: 'apiConfigId',\r\n readonly: false,\r\n isRequired: true,\r\n dataSource: 'apiConfig',\r\n listLabelProperty: 'name',\r\n listValueProperty: '_id',\r\n displayText: 'Api'\r\n }\"\r\n >\r\n </dropdown>\r\n </div>\r\n </div>\r\n <div class=\"field mb-0 col-12 md:col-2\">\r\n <button\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n label=\"Validate\"\r\n (click)=\"handleGetData()\"\r\n class=\"p-button-raised\"\r\n ></button>\r\n </div>\r\n <div class=\"my-4 field flex align-items-center justify-content-between col-12 px-0\">\r\n <div class=\"field mb-0 col-12 md:col-6\">\r\n <text-box\r\n [record]=\"record\"\r\n [store]=\"queueStore\"\r\n [attributeModel]=\"{\r\n name : 'header',\r\n displayText:'Header',\r\n readonly : false,\r\n isRequired : true,\r\n }\"\r\n >\r\n </text-box>\r\n </div>\r\n <div class=\"field mb-0 col-12 md:col-6\">\r\n <text-box\r\n [record]=\"record\"\r\n [store]=\"queueStore\"\r\n [attributeModel]=\"{\r\n name : 'subHeader',\r\n displayText:'SubHeader',\r\n readonly : false,\r\n isRequired : false,\r\n }\"\r\n >\r\n </text-box>\r\n </div>\r\n </div>\r\n <ngx-query-builder\r\n [(ngModel)]=\"query\"\r\n [config]=\"config\"\r\n (queryChange)=\"onQueryChange($event)\"\r\n ></ngx-query-builder>\r\n </div>\r\n </form-container>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".q-ruleset .q-switch-radio:checked+.q-switch-label{background:var(--surface-section)!important;color:var(--text-color)!important;border:1px solid var(--primary-color)!important}.q-ruleset .q-switch-label{color:#000!important;border:1px solid}.q-ruleset .q-button{color:var(--text-color)!important;background:var(--primary-color)!important;border-radius:var(--border-radius)!important}.q-ruleset .q-rule{background:var(--surface-section)!important}.q-ruleset .q-field-control,.q-ruleset .q-operator-control,.q-ruleset .q-input-control,.q-ruleset .q-remove-button{background:var(--surface-section)!important;color:var(--text-color)!important;border:1px solid var(--surface-border)!important}.q-ruleset .q-row{border:1px solid var(--surface-border)!important}.card-footer{display:flex;justify-content:flex-end;margin:10px}.button-container{display:flex}.create-button{padding:10px}\n"] }]
|
|
2312
|
+
}], ctorParameters: () => [{ type: QueueQuery }, { type: QueueService }, { type: i3$3.ActivatedRoute }, { type: QueueStore }, { type: ValidatorService }, { type: i3$3.Router }] });
|
|
2313
|
+
|
|
2314
|
+
const routes = [
|
|
2315
|
+
{
|
|
2316
|
+
path: '',
|
|
2317
|
+
component: QueueAdminFormComponent,
|
|
2318
|
+
children: [],
|
|
2319
|
+
},
|
|
2320
|
+
];
|
|
2321
|
+
class QueueRoutingModule {
|
|
2322
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2323
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.4", ngImport: i0, type: QueueRoutingModule, imports: [i3$3.RouterModule], exports: [RouterModule] });
|
|
2324
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] });
|
|
2325
|
+
}
|
|
2326
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueRoutingModule, decorators: [{
|
|
2327
|
+
type: NgModule,
|
|
2328
|
+
args: [{
|
|
2329
|
+
imports: [RouterModule.forChild(routes)],
|
|
2330
|
+
exports: [RouterModule],
|
|
2331
|
+
}]
|
|
2332
|
+
}] });
|
|
2333
|
+
|
|
2334
|
+
class DataTransformerService {
|
|
2335
|
+
constructor() { }
|
|
2336
|
+
flattenObject(data, result = [], additionalFields = {}) {
|
|
2337
|
+
for (const key in data) {
|
|
2338
|
+
if (data.hasOwnProperty(key)) {
|
|
2339
|
+
if (typeof data[key] === SHARED.TYPE_OBJECT && data[key] !== null && !Array.isArray(data[key])) {
|
|
2340
|
+
this.flattenObject(data[key], result);
|
|
2341
|
+
}
|
|
2342
|
+
else {
|
|
2343
|
+
result.push({
|
|
2344
|
+
label: this.transformLabel(key),
|
|
2345
|
+
value: data[key]
|
|
2346
|
+
});
|
|
2347
|
+
}
|
|
2348
|
+
}
|
|
2349
|
+
}
|
|
2350
|
+
if (additionalFields._id) {
|
|
2351
|
+
result.push({
|
|
2352
|
+
_id: additionalFields._id
|
|
2353
|
+
});
|
|
2354
|
+
}
|
|
2355
|
+
if (additionalFields.QueueID) {
|
|
2356
|
+
result.push({
|
|
2357
|
+
QueueID: additionalFields.QueueID
|
|
2358
|
+
});
|
|
2359
|
+
}
|
|
2360
|
+
return result;
|
|
2361
|
+
}
|
|
2362
|
+
transformLabel(key) {
|
|
2363
|
+
return key.replace(/_/g, ' ').replace(/\b\w/g, l => l.toUpperCase());
|
|
2364
|
+
}
|
|
2365
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DataTransformerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2366
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DataTransformerService, providedIn: 'root' });
|
|
2367
|
+
}
|
|
2368
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DataTransformerService, decorators: [{
|
|
2369
|
+
type: Injectable,
|
|
2370
|
+
args: [{
|
|
2371
|
+
providedIn: 'root'
|
|
2372
|
+
}]
|
|
2373
|
+
}], ctorParameters: () => [] });
|
|
2374
|
+
|
|
2375
|
+
class QueueApplicationListComponent {
|
|
2376
|
+
queueService;
|
|
2377
|
+
dataTransformService;
|
|
2378
|
+
router;
|
|
2379
|
+
queueStore;
|
|
2380
|
+
queueData;
|
|
2381
|
+
selectedStatus = SHARED.STATUS_ACTIVE;
|
|
2382
|
+
isAscending = true;
|
|
2383
|
+
associateQueueList;
|
|
2384
|
+
constructor(queueService, dataTransformService, router, queueStore) {
|
|
2385
|
+
this.queueService = queueService;
|
|
2386
|
+
this.dataTransformService = dataTransformService;
|
|
2387
|
+
this.router = router;
|
|
2388
|
+
this.queueStore = queueStore;
|
|
2389
|
+
}
|
|
2390
|
+
ngOnChanges() {
|
|
2391
|
+
if (this.queueData) {
|
|
2392
|
+
this.loadAssociatedList();
|
|
2393
|
+
}
|
|
2394
|
+
}
|
|
2395
|
+
loadAssociatedList() {
|
|
2396
|
+
if (this.queueData && this.queueData._id) {
|
|
2397
|
+
this.queueService.getCaseById(this.queueData.apiConfigUrl).subscribe((application) => {
|
|
2398
|
+
if (application) {
|
|
2399
|
+
const messages = SEQUENTIAL_MESSAGE;
|
|
2400
|
+
this.associateQueueList = application.map((item, index) => ({
|
|
2401
|
+
...item,
|
|
2402
|
+
initials: this.getInitials(item.FullName),
|
|
2403
|
+
message: {
|
|
2404
|
+
content: messages[index % messages.length],
|
|
2405
|
+
type: this.getTypeByIndex(index),
|
|
2406
|
+
day: index % 2 === 0 ? SHARED.TODAY : SHARED.YESTERDAY,
|
|
2407
|
+
count: this.getRandomCount(),
|
|
2408
|
+
},
|
|
2409
|
+
}));
|
|
2410
|
+
}
|
|
2411
|
+
});
|
|
2412
|
+
}
|
|
2413
|
+
else {
|
|
2414
|
+
this.associateQueueList = [];
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
getRandomCount() {
|
|
2418
|
+
return Math.floor(Math.random() * 10) + 1;
|
|
2419
|
+
}
|
|
2420
|
+
getInitials(fullName) {
|
|
2421
|
+
if (!fullName)
|
|
2422
|
+
return '';
|
|
2423
|
+
const nameParts = fullName?.split(' ')?.filter(Boolean);
|
|
2424
|
+
const initials = nameParts?.length > 1
|
|
2425
|
+
? nameParts[0][0] + nameParts[nameParts?.length - 1][0]
|
|
2426
|
+
: nameParts[0][0];
|
|
2427
|
+
return initials?.toUpperCase();
|
|
2428
|
+
}
|
|
2429
|
+
getTypeByIndex(index) {
|
|
2430
|
+
const types = MESSAGE_TYPES;
|
|
2431
|
+
return types[index % types.length];
|
|
2432
|
+
}
|
|
2433
|
+
getRandomType() {
|
|
2434
|
+
const types = MESSAGE_TYPES;
|
|
2435
|
+
return types[Math.floor(Math.random() * types.length)];
|
|
2436
|
+
}
|
|
2437
|
+
handleApplicationClick(application) {
|
|
2438
|
+
localStorage.setItem(SHARED.selectedApplication, application._id);
|
|
2439
|
+
localStorage.setItem(SHARED.selectedApplicationNumber, application.applicationNumber);
|
|
2440
|
+
this.router.navigate([ROUTES.APPLICATION + application.CaseId]);
|
|
2441
|
+
}
|
|
2442
|
+
onStatusChange(selectedStatus) {
|
|
2443
|
+
this.selectedStatus = selectedStatus.target.value;
|
|
2444
|
+
}
|
|
2445
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueApplicationListComponent, deps: [{ token: QueueService }, { token: DataTransformerService }, { token: i3$3.Router }, { token: QueueStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
2446
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: QueueApplicationListComponent, isStandalone: false, selector: "queue-application-list", inputs: { queueData: "queueData" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"grid m-0\">\r\n <div class=\"col-12\">\r\n <div class=\"p-fluid p-formgrid grid p-2\">\r\n <div class=\"card col-12 md:col-12 flex flex-column border-bottom align-items-start p-4 pb-3\" style=\"\r\n border-bottom: 1px solid var(--surface-border);\r\n border-radius: 0px;\r\n border-top-left-radius: 8px;\r\n border-top-right-radius: 8px;\r\n \">\r\n <h4 class=\"text-color m-0 queue-name font-semibold margin\">\r\n {{ queueData.name }}\r\n </h4>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-12 p-0 flex scrollable flex-column\" [ngClass]=\"\r\n selectedStatus === 'active' ? 'surface-card' : 'inactive-card-wrapper'\r\n \">\r\n @for(record of associateQueueList; track record; let i = $index) {\r\n @if(record){\r\n <div class=\"col-12 md:col-12 border-bottom-1 p-0 surface-border gap-2 hover:surface-ground cursor-pointer\"\r\n (click)=\"handleApplicationClick(record)\">\r\n\r\n <div class=\"col-12 md:col-12 flex align-items-center py-3 px-4 userInfo\">\r\n <div class=\"col-12 md:col-2 p-0 userImage\">\r\n <div\r\n class=\"mainimg flex align-items-center justify-content-center circleColor w-3rem h-3rem border-circle\">\r\n <span class=\"font-bold\" style=\"font-weight: 600; font-size: 13.5; font-family: inherit;\">\r\n {{ record.initials }}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-10 p-0\">\r\n <div class=\"flex justify-content-between align-items-center col-12 md:col-12 p-0\">\r\n <div class=\"userName\" style=\"font-weight: 600; font-size: 15px; \">\r\n {{ record.FullName | capitalizeWords }} \r\n </div>\r\n <div class=\"dayAndtime flex\">\r\n @if(record.message.type == \"Email\"){\r\n <span class=\"pi pi-envelope mr-2\" style=\"color: #676B89; font-size: 17px;\"></span>\r\n }\r\n @else if(record.message.type == \"SMS\") {\r\n <span class=\"pi pi-comments mr-2\" style=\"color: #676B89; font-size: 17px;\"></span>\r\n }@else if(record.message.type == \"WhatsApp\"){\r\n <span class=\"pi pi-whatsapp mr-2\" style=\"color: #676B89;font-size: 17px;\"></span>\r\n\r\n }\r\n <span style=\"color: #676B89; font-family: inherit;\"> {{record.message.day}}</span>\r\n </div>\r\n </div>\r\n <div class=\"flex align-items-center justify-content-between mt-1\">\r\n <div class=\"email col-12 md:col-12 p-0\" style=\"color: #8A8EA6;\">\r\n {{ record.message.content }}\r\n </div>\r\n \r\n <div class=\"countOfMessages\">\r\n <span>{{record.message.count}}</span>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n }\r\n\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".label,.value{font-size:14px}.card{margin-bottom:0!important}.queue-name{max-width:85%;word-wrap:break-word;white-space:normal}.text-verflow-elipses{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.card{background:var(--surface-card)}.card .filter-section .filter-dropdown,.card .filter-section .filter-button{padding:.2rem .5rem;border:1px solid #cce7ff;border-radius:5px;background-color:#f0f8ff;color:#333;cursor:pointer}.set-reminder-box{background-color:#4c629214;border:1px solid rgba(76,98,146,.2)}.set-reminder-box .pi-bell{color:#f57c00}.inactive-card-wrapper{background-color:#f3f5f8;border-left:1px solid #e0e3f3!important;border-right:1px solid #e0e3f3!important}::ng-deep .inactive-tag-wrapper .p-tag{background-color:#676b89!important}.circleColor{background-color:#eef0f5;color:#4c6292}.email{max-width:85%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.countOfMessages{display:flex;align-items:center;justify-content:center;border-radius:50%;background-color:#0f8bfd;color:#fff;width:22px!important;height:22px!important}.userInfo:hover{background-color:#eef0f5b3}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: CapitalizeWordsPipe, name: "capitalizeWords" }] });
|
|
2447
|
+
}
|
|
2448
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueApplicationListComponent, decorators: [{
|
|
2449
|
+
type: Component,
|
|
2450
|
+
args: [{ selector: 'queue-application-list', standalone: false, template: "<div class=\"grid m-0\">\r\n <div class=\"col-12\">\r\n <div class=\"p-fluid p-formgrid grid p-2\">\r\n <div class=\"card col-12 md:col-12 flex flex-column border-bottom align-items-start p-4 pb-3\" style=\"\r\n border-bottom: 1px solid var(--surface-border);\r\n border-radius: 0px;\r\n border-top-left-radius: 8px;\r\n border-top-right-radius: 8px;\r\n \">\r\n <h4 class=\"text-color m-0 queue-name font-semibold margin\">\r\n {{ queueData.name }}\r\n </h4>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-12 p-0 flex scrollable flex-column\" [ngClass]=\"\r\n selectedStatus === 'active' ? 'surface-card' : 'inactive-card-wrapper'\r\n \">\r\n @for(record of associateQueueList; track record; let i = $index) {\r\n @if(record){\r\n <div class=\"col-12 md:col-12 border-bottom-1 p-0 surface-border gap-2 hover:surface-ground cursor-pointer\"\r\n (click)=\"handleApplicationClick(record)\">\r\n\r\n <div class=\"col-12 md:col-12 flex align-items-center py-3 px-4 userInfo\">\r\n <div class=\"col-12 md:col-2 p-0 userImage\">\r\n <div\r\n class=\"mainimg flex align-items-center justify-content-center circleColor w-3rem h-3rem border-circle\">\r\n <span class=\"font-bold\" style=\"font-weight: 600; font-size: 13.5; font-family: inherit;\">\r\n {{ record.initials }}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-10 p-0\">\r\n <div class=\"flex justify-content-between align-items-center col-12 md:col-12 p-0\">\r\n <div class=\"userName\" style=\"font-weight: 600; font-size: 15px; \">\r\n {{ record.FullName | capitalizeWords }} \r\n </div>\r\n <div class=\"dayAndtime flex\">\r\n @if(record.message.type == \"Email\"){\r\n <span class=\"pi pi-envelope mr-2\" style=\"color: #676B89; font-size: 17px;\"></span>\r\n }\r\n @else if(record.message.type == \"SMS\") {\r\n <span class=\"pi pi-comments mr-2\" style=\"color: #676B89; font-size: 17px;\"></span>\r\n }@else if(record.message.type == \"WhatsApp\"){\r\n <span class=\"pi pi-whatsapp mr-2\" style=\"color: #676B89;font-size: 17px;\"></span>\r\n\r\n }\r\n <span style=\"color: #676B89; font-family: inherit;\"> {{record.message.day}}</span>\r\n </div>\r\n </div>\r\n <div class=\"flex align-items-center justify-content-between mt-1\">\r\n <div class=\"email col-12 md:col-12 p-0\" style=\"color: #8A8EA6;\">\r\n {{ record.message.content }}\r\n </div>\r\n \r\n <div class=\"countOfMessages\">\r\n <span>{{record.message.count}}</span>\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n }\r\n\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".label,.value{font-size:14px}.card{margin-bottom:0!important}.queue-name{max-width:85%;word-wrap:break-word;white-space:normal}.text-verflow-elipses{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.card{background:var(--surface-card)}.card .filter-section .filter-dropdown,.card .filter-section .filter-button{padding:.2rem .5rem;border:1px solid #cce7ff;border-radius:5px;background-color:#f0f8ff;color:#333;cursor:pointer}.set-reminder-box{background-color:#4c629214;border:1px solid rgba(76,98,146,.2)}.set-reminder-box .pi-bell{color:#f57c00}.inactive-card-wrapper{background-color:#f3f5f8;border-left:1px solid #e0e3f3!important;border-right:1px solid #e0e3f3!important}::ng-deep .inactive-tag-wrapper .p-tag{background-color:#676b89!important}.circleColor{background-color:#eef0f5;color:#4c6292}.email{max-width:85%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.countOfMessages{display:flex;align-items:center;justify-content:center;border-radius:50%;background-color:#0f8bfd;color:#fff;width:22px!important;height:22px!important}.userInfo:hover{background-color:#eef0f5b3}\n"] }]
|
|
2451
|
+
}], ctorParameters: () => [{ type: QueueService }, { type: DataTransformerService }, { type: i3$3.Router }, { type: QueueStore }], propDecorators: { queueData: [{
|
|
2452
|
+
type: Input
|
|
2453
|
+
}] } });
|
|
2454
|
+
|
|
2455
|
+
class QueueAdminListComponent extends BaseContainerComponent {
|
|
2456
|
+
queueStore;
|
|
2457
|
+
queueService;
|
|
2458
|
+
constructor(queueStore, queueService) {
|
|
2459
|
+
super(queueService);
|
|
2460
|
+
this.queueStore = queueStore;
|
|
2461
|
+
this.queueService = queueService;
|
|
2462
|
+
}
|
|
2463
|
+
queueList = [];
|
|
2464
|
+
selectedQueue;
|
|
2465
|
+
queueId;
|
|
2466
|
+
ngOnInit() {
|
|
2467
|
+
this.init();
|
|
2468
|
+
this.getAllQueueList();
|
|
2469
|
+
}
|
|
2470
|
+
getAllQueueList() {
|
|
2471
|
+
this.queueService.getAll().subscribe({
|
|
2472
|
+
next: (res) => {
|
|
2473
|
+
this.queueList = res;
|
|
2474
|
+
this.selectedQueue = res[0];
|
|
2475
|
+
},
|
|
2476
|
+
error: (err) => {
|
|
2477
|
+
console.error(ERROR.UNABLE_TO_FETCH_QUEUE_LIST, err);
|
|
2478
|
+
}
|
|
2479
|
+
});
|
|
2480
|
+
}
|
|
2481
|
+
handleQueueId(event) {
|
|
2482
|
+
this.selectedQueue = this.queueList.find((i) => i._id == event);
|
|
2483
|
+
if (this.selectedQueue) {
|
|
2484
|
+
sessionStorage.setItem(SHARED.selectedQueue, JSON.stringify(this.selectedQueue));
|
|
2485
|
+
}
|
|
2486
|
+
else {
|
|
2487
|
+
console.warn(ERROR.NO_QUEUE_FOUND_WITH_ID);
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2490
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueAdminListComponent, deps: [{ token: QueueStore }, { token: QueueService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2491
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: QueueAdminListComponent, isStandalone: false, selector: "lib-queue-admin-list", usesInheritance: true, ngImport: i0, template: "<div class=\"container grid m-0\">\r\n <div class=\"col-12 xl:col-3 md:col-12\">\r\n <block-list\r\n [queueData]=\"queueList\"\r\n (queueDataById)=\"handleQueueId($event)\"\r\n ></block-list>\r\n </div>\r\n <div class=\"col-12 xl:col-3 md:col-12\">\r\n @if(selectedQueue){\r\n <div class=\"animation-duration-500 associated-list\">\r\n <queue-application-list\r\n [queueData]=\"selectedQueue\"\r\n ></queue-application-list>\r\n </div>\r\n }\r\n </div>\r\n \r\n <div class=\"xl:col-6 md:col-12\">\r\n <div class=\"searchbar-wrapper\">\r\n <queue-search-customer></queue-search-customer>\r\n </div>\r\n </div>\r\n </div>\r\n ", styles: [".custom-tabview .p-tabview-nav{display:flex}::ng-deep .custom-tabview .p-tabview-nav-content ul li{flex:1;max-width:25%}.scrollable{scroll-behavior:smooth;max-height:75vh}:host ::-webkit-scrollbar{width:8px}:host ::-webkit-scrollbar-track{background:transparent}:host ::-webkit-scrollbar-thumb{background-color:var(--gray-500);border-radius:20px}\n"], dependencies: [{ kind: "component", type: QueueSearchCustomerComponent, selector: "queue-search-customer" }, { kind: "component", type: BlockListComponent, selector: "block-list", inputs: ["queueData", "showQueueDataForm"], outputs: ["queueDataById"] }, { kind: "component", type: QueueApplicationListComponent, selector: "queue-application-list", inputs: ["queueData"] }] });
|
|
2492
|
+
}
|
|
2493
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueAdminListComponent, decorators: [{
|
|
2494
|
+
type: Component,
|
|
2495
|
+
args: [{ selector: 'lib-queue-admin-list', standalone: false, template: "<div class=\"container grid m-0\">\r\n <div class=\"col-12 xl:col-3 md:col-12\">\r\n <block-list\r\n [queueData]=\"queueList\"\r\n (queueDataById)=\"handleQueueId($event)\"\r\n ></block-list>\r\n </div>\r\n <div class=\"col-12 xl:col-3 md:col-12\">\r\n @if(selectedQueue){\r\n <div class=\"animation-duration-500 associated-list\">\r\n <queue-application-list\r\n [queueData]=\"selectedQueue\"\r\n ></queue-application-list>\r\n </div>\r\n }\r\n </div>\r\n \r\n <div class=\"xl:col-6 md:col-12\">\r\n <div class=\"searchbar-wrapper\">\r\n <queue-search-customer></queue-search-customer>\r\n </div>\r\n </div>\r\n </div>\r\n ", styles: [".custom-tabview .p-tabview-nav{display:flex}::ng-deep .custom-tabview .p-tabview-nav-content ul li{flex:1;max-width:25%}.scrollable{scroll-behavior:smooth;max-height:75vh}:host ::-webkit-scrollbar{width:8px}:host ::-webkit-scrollbar-track{background:transparent}:host ::-webkit-scrollbar-thumb{background-color:var(--gray-500);border-radius:20px}\n"] }]
|
|
2496
|
+
}], ctorParameters: () => [{ type: QueueStore }, { type: QueueService }] });
|
|
2497
|
+
|
|
2498
|
+
class QueueAdminModule {
|
|
2499
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueAdminModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2500
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.4", ngImport: i0, type: QueueAdminModule, declarations: [QueueAdminFormComponent, QueueAdminListComponent, QueueApplicationListComponent], imports: [CommonModule,
|
|
2501
|
+
SharedModule,
|
|
2502
|
+
QueueRoutingModule,
|
|
2503
|
+
FormsModule,
|
|
2504
|
+
QueryBuilderModule,
|
|
2505
|
+
ButtonModule], exports: [QueueAdminFormComponent, QueueAdminListComponent, QueueApplicationListComponent] });
|
|
2506
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueAdminModule, imports: [CommonModule,
|
|
2507
|
+
SharedModule,
|
|
2508
|
+
QueueRoutingModule,
|
|
2509
|
+
FormsModule,
|
|
2510
|
+
QueryBuilderModule,
|
|
2511
|
+
ButtonModule] });
|
|
2512
|
+
}
|
|
2513
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: QueueAdminModule, decorators: [{
|
|
2514
|
+
type: NgModule,
|
|
2515
|
+
args: [{
|
|
2516
|
+
declarations: [QueueAdminFormComponent, QueueAdminListComponent, QueueApplicationListComponent],
|
|
2517
|
+
imports: [
|
|
2518
|
+
CommonModule,
|
|
2519
|
+
SharedModule,
|
|
2520
|
+
QueueRoutingModule,
|
|
2521
|
+
FormsModule,
|
|
2522
|
+
QueryBuilderModule,
|
|
2523
|
+
ButtonModule
|
|
2524
|
+
],
|
|
2525
|
+
exports: [QueueAdminFormComponent, QueueAdminListComponent, QueueApplicationListComponent],
|
|
2526
|
+
}]
|
|
2527
|
+
}] });
|
|
2528
|
+
|
|
2529
|
+
let AdminActionStore = class AdminActionStore extends BaseStore {
|
|
2530
|
+
constructor() {
|
|
2531
|
+
super();
|
|
2532
|
+
}
|
|
2533
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AdminActionStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2534
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AdminActionStore, providedIn: 'root' });
|
|
2535
|
+
};
|
|
2536
|
+
AdminActionStore = __decorate([
|
|
2537
|
+
StoreConfig({ name: 'action' })
|
|
2538
|
+
], AdminActionStore);
|
|
2539
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AdminActionStore, decorators: [{
|
|
2540
|
+
type: Injectable,
|
|
2541
|
+
args: [{ providedIn: 'root' }]
|
|
2542
|
+
}], ctorParameters: () => [] });
|
|
2543
|
+
|
|
2544
|
+
class AdminActionService extends BaseService {
|
|
2545
|
+
actionStore;
|
|
2546
|
+
list = [...LISTCONFIG.ACTIONAPICONFIG, ...LISTCONFIG.QUEUECONFIG];
|
|
2547
|
+
constructor(actionStore, http, appConfigService, listService) {
|
|
2548
|
+
super(http, actionStore, appConfigService, listService);
|
|
2549
|
+
this.actionStore = actionStore;
|
|
2550
|
+
this._pathName = DATASOURCES.ACTIONS;
|
|
2551
|
+
}
|
|
2552
|
+
handleValidateAction(name, id, record) {
|
|
2553
|
+
const apiUrl = `${this.apiUrl}${name}/${encodeURIComponent(id)}`;
|
|
2554
|
+
return this.http.post(`${apiUrl}`, record).pipe(tap$1((entities) => this.actionStore.set(entities)));
|
|
2555
|
+
}
|
|
2556
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AdminActionService, deps: [{ token: AdminActionStore }, { token: i1$1.HttpClient }, { token: AppConfigService }, { token: ListService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2557
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AdminActionService, providedIn: 'root' });
|
|
2558
|
+
}
|
|
2559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AdminActionService, decorators: [{
|
|
2560
|
+
type: Injectable,
|
|
2561
|
+
args: [{ providedIn: 'root' }]
|
|
2562
|
+
}], ctorParameters: () => [{ type: AdminActionStore }, { type: i1$1.HttpClient }, { type: AppConfigService }, { type: ListService }] });
|
|
2563
|
+
|
|
2564
|
+
/**
|
|
2565
|
+
* Admin Action List Component
|
|
2566
|
+
*/
|
|
2567
|
+
class AdminActionListComponent extends BaseListComponent {
|
|
2568
|
+
tableBuilder;
|
|
2569
|
+
constructor(service, tableBuilder) {
|
|
2570
|
+
super(service, tableBuilder);
|
|
2571
|
+
this.tableBuilder = tableBuilder;
|
|
2572
|
+
this.tableBuilder.hiddenHeaders = actionHiddenHeaderList;
|
|
2573
|
+
}
|
|
2574
|
+
ngOnInit() {
|
|
2575
|
+
this.init(actionTableColumnWidthList);
|
|
2576
|
+
}
|
|
2577
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AdminActionListComponent, deps: [{ token: AdminActionService }, { token: TableBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
2578
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: AdminActionListComponent, isStandalone: false, selector: "lib-admin-action-list", usesInheritance: true, ngImport: i0, template: "<div class=\"dicitonary-list-wrapper\">\r\n @if(table){\r\n <lib-table-primary [title]=\"'Actions'\" [table]=\"table\"></lib-table-primary>\r\n }\r\n</div>", styles: [""], dependencies: [{ kind: "component", type: TablePrimaryComponent, selector: "lib-table-primary", inputs: ["table", "title", "showStatus", "showActions", "showSearchBar", "showNewRecordButton", "showRefreshButton"] }] });
|
|
2579
|
+
}
|
|
2580
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AdminActionListComponent, decorators: [{
|
|
2581
|
+
type: Component,
|
|
2582
|
+
args: [{ selector: 'lib-admin-action-list', standalone: false, template: "<div class=\"dicitonary-list-wrapper\">\r\n @if(table){\r\n <lib-table-primary [title]=\"'Actions'\" [table]=\"table\"></lib-table-primary>\r\n }\r\n</div>" }]
|
|
2583
|
+
}], ctorParameters: () => [{ type: AdminActionService }, { type: TableBuilder }] });
|
|
2584
|
+
|
|
2585
|
+
class AdminActionFormComponent extends BaseFormComponent {
|
|
2586
|
+
adminActionService;
|
|
2587
|
+
validatorService;
|
|
2588
|
+
router;
|
|
2589
|
+
activatedRoute;
|
|
2590
|
+
adminActionStore;
|
|
2591
|
+
appConfigService;
|
|
2592
|
+
messages = SHARED.EMPTYARRAY;
|
|
2593
|
+
apiConfigList = [];
|
|
2594
|
+
queueList = [];
|
|
2595
|
+
isDisable = SHARED.TRUE;
|
|
2596
|
+
constructor(adminActionService, validatorService, router, activatedRoute, adminActionStore, appConfigService) {
|
|
2597
|
+
super(adminActionService, validatorService, router, activatedRoute);
|
|
2598
|
+
this.adminActionService = adminActionService;
|
|
2599
|
+
this.validatorService = validatorService;
|
|
2600
|
+
this.router = router;
|
|
2601
|
+
this.activatedRoute = activatedRoute;
|
|
2602
|
+
this.adminActionStore = adminActionStore;
|
|
2603
|
+
this.appConfigService = appConfigService;
|
|
2604
|
+
this.record.isActive = true;
|
|
2605
|
+
}
|
|
2606
|
+
ngOnInit() {
|
|
2607
|
+
this.init();
|
|
2608
|
+
}
|
|
2609
|
+
handleValidateAction() {
|
|
2610
|
+
const payload = { path: this.appConfigService.swaggerUrl };
|
|
2611
|
+
this.adminActionService.handleValidateAction(ROUTES.VALIDATE_ACTIONS, this.record.apiConfigID, payload)
|
|
2612
|
+
.subscribe({
|
|
2613
|
+
next: (res) => {
|
|
2614
|
+
if (res) {
|
|
2615
|
+
this.isDisable = SHARED.FALSE;
|
|
2616
|
+
this.messages = [{ severity: SHARED.SUCCESS, detail: MESSAGE.VALIDATE_ACTION_SUCCESS_MESSAGE }];
|
|
2617
|
+
setTimeout(() => {
|
|
2618
|
+
this.messages = SHARED.EMPTYARRAY;
|
|
2619
|
+
}, 3000);
|
|
2620
|
+
}
|
|
2621
|
+
},
|
|
2622
|
+
error: (error) => {
|
|
2623
|
+
this.isDisable = SHARED.FALSE;
|
|
2624
|
+
},
|
|
2625
|
+
});
|
|
2626
|
+
}
|
|
2627
|
+
handleSubmit() {
|
|
2628
|
+
this.record.formFields = JSON.stringify(this.record.formFields);
|
|
2629
|
+
super.handleSubmit();
|
|
2630
|
+
}
|
|
2631
|
+
;
|
|
2632
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AdminActionFormComponent, deps: [{ token: AdminActionService }, { token: ValidatorService }, { token: i3$3.Router }, { token: i3$3.ActivatedRoute }, { token: AdminActionStore }, { token: AppConfigService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2633
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: AdminActionFormComponent, isStandalone: false, selector: "lib-admin-action-form", usesInheritance: true, ngImport: i0, template: "<form-container\r\n [record]=\"record\"\r\n [headerText]=\"'Actions / Actions Form'\"\r\n [messages]=\"messages\"\r\n (onSave)=\"handleSubmit()\"\r\n [showSave]=\"true\"\r\n [disableSaveButton]=\"isDisable\"\r\n (onCancel)=\"handleCancel()\"\r\n>\r\n <div class=\"card p-fluid p-formgrid grid \">\r\n <h4 class=\"font-bold col-12 md:col-12\">Actions Form</h4>\r\n <div class=\"col-12 md:col-6\">\r\n <text-box\r\n [store]=\"adminActionStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n readonly: false,\r\n name: 'name',\r\n isRequired: true,\r\n displayText: 'Action Name',\r\n placeholder: 'Enter Action Name'\r\n }\"\r\n ></text-box>\r\n </div>\r\n \r\n <div class=\"col-12 md:col-6\">\r\n <dropdown\r\n [store]=\"adminActionStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n name: 'apiConfigID',\r\n readonly: false,\r\n isRequired: true,\r\n displayText: 'End Point',\r\n placeholder: 'Select End Point'\r\n }\"></dropdown>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-12\">\r\n <text-area\r\n [store]=\"adminActionStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n readonly: false,\r\n name: 'prompt',\r\n isRequired: true,\r\n displayText: 'Prompt',\r\n placeholder: 'Enter prompt'\r\n }\"\r\n ></text-area>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-6\">\r\n <dropdown\r\n [store]=\"adminActionStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n name:'queueID',\r\n isRequired: true,\r\n displayText : 'Queue',\r\n placeholder: 'Select Queue',\r\n readonly: false\r\n }\"></dropdown>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-2 flex align-items-end justify-content-end validate-btn-wrapper\">\r\n <button\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n label=\"Validate\"\r\n class=\"p-button-raised\"\r\n (click)=\"handleValidateAction()\"\r\n ></button>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-12\">\r\n <text-area\r\n [store]=\"adminActionStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n readonly: false,\r\n name: 'formFields',\r\n isRequired: true,\r\n displayText: 'Form Configuration',\r\n placeholder: 'Enter form fields'\r\n }\"\r\n ></text-area>\r\n </div>\r\n </div>\r\n \r\n</form-container>", styles: [".validate-btn-wrapper{margin-bottom:2px}\n"], dependencies: [{ kind: "component", type: TextBoxComponent, selector: "text-box" }, { kind: "component", type: DropdownComponent, selector: "dropdown", inputs: ["isStaticDropdown"] }, { kind: "component", type: FormContainerComponent, selector: "form-container", inputs: ["messages", "record", "headerText", "showSave", "disableSaveButton"], outputs: ["onSave", "onCancel"] }, { kind: "component", type: TextAreaComponent, selector: "text-area", inputs: ["rowspan"] }, { kind: "directive", type: i2$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }] });
|
|
2634
|
+
}
|
|
2635
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AdminActionFormComponent, decorators: [{
|
|
2636
|
+
type: Component,
|
|
2637
|
+
args: [{ selector: 'lib-admin-action-form', standalone: false, template: "<form-container\r\n [record]=\"record\"\r\n [headerText]=\"'Actions / Actions Form'\"\r\n [messages]=\"messages\"\r\n (onSave)=\"handleSubmit()\"\r\n [showSave]=\"true\"\r\n [disableSaveButton]=\"isDisable\"\r\n (onCancel)=\"handleCancel()\"\r\n>\r\n <div class=\"card p-fluid p-formgrid grid \">\r\n <h4 class=\"font-bold col-12 md:col-12\">Actions Form</h4>\r\n <div class=\"col-12 md:col-6\">\r\n <text-box\r\n [store]=\"adminActionStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n readonly: false,\r\n name: 'name',\r\n isRequired: true,\r\n displayText: 'Action Name',\r\n placeholder: 'Enter Action Name'\r\n }\"\r\n ></text-box>\r\n </div>\r\n \r\n <div class=\"col-12 md:col-6\">\r\n <dropdown\r\n [store]=\"adminActionStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n name: 'apiConfigID',\r\n readonly: false,\r\n isRequired: true,\r\n displayText: 'End Point',\r\n placeholder: 'Select End Point'\r\n }\"></dropdown>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-12\">\r\n <text-area\r\n [store]=\"adminActionStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n readonly: false,\r\n name: 'prompt',\r\n isRequired: true,\r\n displayText: 'Prompt',\r\n placeholder: 'Enter prompt'\r\n }\"\r\n ></text-area>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-6\">\r\n <dropdown\r\n [store]=\"adminActionStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n name:'queueID',\r\n isRequired: true,\r\n displayText : 'Queue',\r\n placeholder: 'Select Queue',\r\n readonly: false\r\n }\"></dropdown>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-2 flex align-items-end justify-content-end validate-btn-wrapper\">\r\n <button\r\n pButton\r\n pRipple\r\n type=\"button\"\r\n label=\"Validate\"\r\n class=\"p-button-raised\"\r\n (click)=\"handleValidateAction()\"\r\n ></button>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-12\">\r\n <text-area\r\n [store]=\"adminActionStore\"\r\n [record]=\"record\"\r\n [attributeModel]=\"{\r\n readonly: false,\r\n name: 'formFields',\r\n isRequired: true,\r\n displayText: 'Form Configuration',\r\n placeholder: 'Enter form fields'\r\n }\"\r\n ></text-area>\r\n </div>\r\n </div>\r\n \r\n</form-container>", styles: [".validate-btn-wrapper{margin-bottom:2px}\n"] }]
|
|
2638
|
+
}], ctorParameters: () => [{ type: AdminActionService }, { type: ValidatorService }, { type: i3$3.Router }, { type: i3$3.ActivatedRoute }, { type: AdminActionStore }, { type: AppConfigService }] });
|
|
2639
|
+
|
|
2640
|
+
class ActionAdminModule {
|
|
2641
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ActionAdminModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2642
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.4", ngImport: i0, type: ActionAdminModule, declarations: [AdminActionListComponent, AdminActionFormComponent], imports: [CommonModule,
|
|
2643
|
+
FormsModule,
|
|
2644
|
+
SharedModule,
|
|
2645
|
+
TablePrimaryComponent,
|
|
2646
|
+
TextAreaComponent,
|
|
2647
|
+
ButtonModule], exports: [AdminActionListComponent, AdminActionFormComponent] });
|
|
2648
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ActionAdminModule, imports: [CommonModule,
|
|
2649
|
+
FormsModule,
|
|
2650
|
+
SharedModule,
|
|
2651
|
+
TablePrimaryComponent,
|
|
2652
|
+
TextAreaComponent,
|
|
2653
|
+
ButtonModule] });
|
|
2654
|
+
}
|
|
2655
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ActionAdminModule, decorators: [{
|
|
2656
|
+
type: NgModule,
|
|
2657
|
+
args: [{
|
|
2658
|
+
declarations: [AdminActionListComponent, AdminActionFormComponent],
|
|
2659
|
+
imports: [
|
|
2660
|
+
CommonModule,
|
|
2661
|
+
FormsModule,
|
|
2662
|
+
SharedModule,
|
|
2663
|
+
TablePrimaryComponent,
|
|
2664
|
+
TextAreaComponent,
|
|
2665
|
+
ButtonModule
|
|
2666
|
+
],
|
|
2667
|
+
exports: [AdminActionListComponent, AdminActionFormComponent]
|
|
2668
|
+
}]
|
|
2669
|
+
}] });
|
|
2670
|
+
|
|
2671
|
+
class DdAdminModel extends BaseModel {
|
|
2672
|
+
name;
|
|
2673
|
+
queueID;
|
|
2674
|
+
dictionaryItems = [];
|
|
2675
|
+
message;
|
|
2676
|
+
}
|
|
2677
|
+
class DdItemModel extends BaseModel {
|
|
2678
|
+
itemName = SHARED.EMPTY;
|
|
2679
|
+
itemExpression = SHARED.EMPTY;
|
|
2680
|
+
styleExpression = SHARED.EMPTY;
|
|
2681
|
+
isActive = SHARED.TRUE;
|
|
2682
|
+
}
|
|
2683
|
+
|
|
2684
|
+
let DictionaryStore = class DictionaryStore extends BaseStore {
|
|
2685
|
+
setPropertiesData(value) {
|
|
2686
|
+
this.update({ propertyData: value });
|
|
2687
|
+
}
|
|
2688
|
+
setSidebarVisible(value) {
|
|
2689
|
+
this.update({ isSideBarVisible: value });
|
|
2690
|
+
}
|
|
2691
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DictionaryStore, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
2692
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DictionaryStore, providedIn: 'root' });
|
|
2693
|
+
};
|
|
2694
|
+
DictionaryStore = __decorate([
|
|
2695
|
+
StoreConfig({ name: 'dictionary' })
|
|
2696
|
+
], DictionaryStore);
|
|
2697
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DictionaryStore, decorators: [{
|
|
2698
|
+
type: Injectable,
|
|
2699
|
+
args: [{ providedIn: 'root' }]
|
|
2700
|
+
}] });
|
|
2701
|
+
|
|
2702
|
+
class DictionaryService extends BaseService {
|
|
2703
|
+
dictionaryStore;
|
|
2704
|
+
constructor(dictionaryStore, http, appConfigService, listService) {
|
|
2705
|
+
super(http, dictionaryStore, appConfigService, listService);
|
|
2706
|
+
this.dictionaryStore = dictionaryStore;
|
|
2707
|
+
this._pathName = DATASOURCES.DICTIONARY;
|
|
2708
|
+
}
|
|
2709
|
+
list = LISTCONFIG.QUEUECONFIG;
|
|
2710
|
+
getAllApiProperties(name, id) {
|
|
2711
|
+
return this.http.get(`${this.apiUrl + name}/${id}`).pipe(tap$1((propertiesData) => this.dictionaryStore.setPropertiesData(propertiesData)));
|
|
2712
|
+
}
|
|
2713
|
+
deleteDictionaryItemById(name, dictionaryItemId) {
|
|
2714
|
+
const Url = `${this.apiUrl + name}/${dictionaryItemId}`;
|
|
2715
|
+
return this.http.delete(Url).pipe(catchError((error) => {
|
|
2716
|
+
console.error(ERROR.ERROR_DELETE_DICTIONARY_ITEM, error);
|
|
2717
|
+
return of({ error: true, message: ERROR.ERROR_DELETE_DICTIONARY_ITEM });
|
|
2718
|
+
}));
|
|
2719
|
+
}
|
|
2720
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DictionaryService, deps: [{ token: DictionaryStore }, { token: i1$1.HttpClient }, { token: AppConfigService }, { token: ListService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2721
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DictionaryService, providedIn: 'root' });
|
|
2722
|
+
}
|
|
2723
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DictionaryService, decorators: [{
|
|
2724
|
+
type: Injectable,
|
|
2725
|
+
args: [{ providedIn: 'root' }]
|
|
2726
|
+
}], ctorParameters: () => [{ type: DictionaryStore }, { type: i1$1.HttpClient }, { type: AppConfigService }, { type: ListService }] });
|
|
2727
|
+
|
|
2728
|
+
class DictionaryQuery extends BaseQuery {
|
|
2729
|
+
store;
|
|
2730
|
+
constructor(store) {
|
|
2731
|
+
super(store);
|
|
2732
|
+
this.store = store;
|
|
2733
|
+
}
|
|
2734
|
+
selectPropertyData() {
|
|
2735
|
+
return this.select((state) => state['propertyData']);
|
|
2736
|
+
}
|
|
2737
|
+
getPropertyData() {
|
|
2738
|
+
return this.getValue()['propertyData'];
|
|
2739
|
+
}
|
|
2740
|
+
selectSidebarVisible() {
|
|
2741
|
+
return this.select((state) => state['isSideBarVisible']);
|
|
2742
|
+
}
|
|
2743
|
+
getSidebarVisible() {
|
|
2744
|
+
return this.getValue()['isSideBarVisible'];
|
|
2745
|
+
}
|
|
2746
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DictionaryQuery, deps: [{ token: DictionaryStore }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2747
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DictionaryQuery, providedIn: 'root' });
|
|
2748
|
+
}
|
|
2749
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DictionaryQuery, decorators: [{
|
|
2750
|
+
type: Injectable,
|
|
2751
|
+
args: [{ providedIn: 'root' }]
|
|
2752
|
+
}], ctorParameters: () => [{ type: DictionaryStore }] });
|
|
2753
|
+
|
|
2754
|
+
class DdAttributeSidebarViewModel {
|
|
2755
|
+
mappingInfo = SHARED.EMPTY;
|
|
2756
|
+
propertyList = SHARED.EMPTY;
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
class DdAdminItemFormComponent {
|
|
2760
|
+
dictionaryStore;
|
|
2761
|
+
dictionaryQuery;
|
|
2762
|
+
ddItemRecord = { itemName: SHARED.EMPTY, itemExpression: SHARED.EMPTY, styleExpression: SHARED.EMPTY, isActive: SHARED.FALSE };
|
|
2763
|
+
isItemExpression;
|
|
2764
|
+
isSidebarVisible;
|
|
2765
|
+
saveClick = new EventEmitter();
|
|
2766
|
+
attributeRecord;
|
|
2767
|
+
dictionaryItemName = SHARED.EMPTY;
|
|
2768
|
+
condition = SHARED.EMPTY;
|
|
2769
|
+
propertyOptions = [];
|
|
2770
|
+
subscriptions = new Subscription();
|
|
2771
|
+
constructor(dictionaryStore, dictionaryQuery) {
|
|
2772
|
+
this.dictionaryStore = dictionaryStore;
|
|
2773
|
+
this.dictionaryQuery = dictionaryQuery;
|
|
2774
|
+
this.attributeRecord = new DdAttributeSidebarViewModel();
|
|
2775
|
+
}
|
|
2776
|
+
ngOnChanges(changes) {
|
|
2777
|
+
this.subscriptions.add(this.dictionaryQuery.selectPropertyData().subscribe((res) => {
|
|
2778
|
+
if (res) {
|
|
2779
|
+
if (res?.properties?.length) {
|
|
2780
|
+
res.properties.forEach((property) => {
|
|
2781
|
+
this.propertyOptions.push({ label: `${res.name}.${property}`, value: `${res.name}.${property}` });
|
|
2782
|
+
});
|
|
2783
|
+
}
|
|
2784
|
+
if (res?.childApis?.length) {
|
|
2785
|
+
res.childApis.forEach((childApi) => {
|
|
2786
|
+
childApi.properties.forEach((property) => {
|
|
2787
|
+
this.propertyOptions.push({ label: `${res.name}.${childApi.name}.${property}`, value: `${res.name}.${childApi.name}.${property}` });
|
|
2788
|
+
});
|
|
2789
|
+
});
|
|
2790
|
+
}
|
|
2791
|
+
}
|
|
2792
|
+
}));
|
|
2793
|
+
if (changes[SHARED.ISITEMEXPRESSION]) {
|
|
2794
|
+
this.attributeRecord.mappingInfo = (this.isItemExpression ? this.ddItemRecord.itemExpression : this.ddItemRecord.styleExpression) ?? SHARED.EMPTY;
|
|
2795
|
+
}
|
|
2796
|
+
}
|
|
2797
|
+
handleSaveBtnClick(event) {
|
|
2798
|
+
if (this.isItemExpression) {
|
|
2799
|
+
this.ddItemRecord.itemExpression = this.attributeRecord.mappingInfo;
|
|
2800
|
+
}
|
|
2801
|
+
else {
|
|
2802
|
+
this.ddItemRecord.styleExpression = this.attributeRecord.mappingInfo;
|
|
2803
|
+
}
|
|
2804
|
+
this.attributeRecord.propertyList = SHARED.EMPTY;
|
|
2805
|
+
this.saveClick.emit(false);
|
|
2806
|
+
}
|
|
2807
|
+
handleAddExpressionClick(event) {
|
|
2808
|
+
if (this.attributeRecord.propertyList) {
|
|
2809
|
+
const formattedProperty = `\${${this.attributeRecord.propertyList}}`;
|
|
2810
|
+
this.attributeRecord.mappingInfo += this.attributeRecord.mappingInfo
|
|
2811
|
+
? `${formattedProperty}`
|
|
2812
|
+
: formattedProperty;
|
|
2813
|
+
}
|
|
2814
|
+
}
|
|
2815
|
+
ngOnDestroy() {
|
|
2816
|
+
this.subscriptions.unsubscribe();
|
|
2817
|
+
}
|
|
2818
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DdAdminItemFormComponent, deps: [{ token: DictionaryStore }, { token: DictionaryQuery }], target: i0.ɵɵFactoryTarget.Component });
|
|
2819
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: DdAdminItemFormComponent, isStandalone: false, selector: "lib-dd-admin-item-form", inputs: { ddItemRecord: "ddItemRecord", isItemExpression: "isItemExpression", isSidebarVisible: "isSidebarVisible" }, outputs: { saveClick: "saveClick" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"dicitonary-edit-action px-3\">\r\n <div class=\"flex align-items-center justify-content-end mt-3\">\r\n <lib-button\r\n [store]=\"dictionaryStore\"\r\n [record]=\"attributeRecord\"\r\n [attributeModel]=\"{\r\n buttonLabel: 'Save',\r\n isDisabled: false,\r\n }\"\r\n (onBtnClick)=\"handleSaveBtnClick($event)\"\r\n >\r\n </lib-button>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-12 mt-5\">\r\n <label *ngIf=\"!isItemExpression\" for=\"styleInput\" class=\"text-gray-600 text-sm mb-2 block\">\r\n Hint: Use key-value pairs for styles.\r\n <br/>\r\n Example:<code>\r\n 'background-color': 'lightgray',\r\n 'font-size': '16px',<br>\r\n 'padding': '10px'\r\n </code>\r\n </label>\r\n <text-area\r\n [store]=\"dictionaryStore\"\r\n [record]=\"attributeRecord\"\r\n [attributeModel]=\"{\r\n displayText: 'Expression',\r\n readonly : false,\r\n name : 'mappingInfo',\r\n isRequired : false,\r\n placeholder : 'Enter Text',\r\n customPadding: '12px',\r\n }\"\r\n ></text-area>\r\n </div>\r\n <div class=\"col-12 md:col-12\">\r\n <div class=\"p-field queue-list-wrapper\">\r\n <dropdown [store]=\"dictionaryStore\" [record]=\"attributeRecord\" [attributeModel]=\"{\r\n name:'propertyList',\r\n displayText : 'Select properties',\r\n isRequired:false,\r\n options : propertyOptions,\r\n filter : true\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-3\">\r\n <lib-button\r\n [store]=\"dictionaryStore\"\r\n [record]=\"attributeRecord\"\r\n [attributeModel]=\"{\r\n buttonLabel: 'Add to expression',\r\n isDisabled: false,\r\n }\"\r\n (onBtnClick)=\"handleAddExpressionClick($event)\"\r\n >\r\n </lib-button>\r\n </div>\r\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DropdownComponent, selector: "dropdown", inputs: ["isStaticDropdown"] }, { kind: "component", type: ButtonComponent, selector: "lib-button" }, { kind: "component", type: TextAreaComponent, selector: "text-area", inputs: ["rowspan"] }] });
|
|
2820
|
+
}
|
|
2821
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DdAdminItemFormComponent, decorators: [{
|
|
2822
|
+
type: Component,
|
|
2823
|
+
args: [{ selector: 'lib-dd-admin-item-form', standalone: false, template: "<div class=\"dicitonary-edit-action px-3\">\r\n <div class=\"flex align-items-center justify-content-end mt-3\">\r\n <lib-button\r\n [store]=\"dictionaryStore\"\r\n [record]=\"attributeRecord\"\r\n [attributeModel]=\"{\r\n buttonLabel: 'Save',\r\n isDisabled: false,\r\n }\"\r\n (onBtnClick)=\"handleSaveBtnClick($event)\"\r\n >\r\n </lib-button>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-12 mt-5\">\r\n <label *ngIf=\"!isItemExpression\" for=\"styleInput\" class=\"text-gray-600 text-sm mb-2 block\">\r\n Hint: Use key-value pairs for styles.\r\n <br/>\r\n Example:<code>\r\n 'background-color': 'lightgray',\r\n 'font-size': '16px',<br>\r\n 'padding': '10px'\r\n </code>\r\n </label>\r\n <text-area\r\n [store]=\"dictionaryStore\"\r\n [record]=\"attributeRecord\"\r\n [attributeModel]=\"{\r\n displayText: 'Expression',\r\n readonly : false,\r\n name : 'mappingInfo',\r\n isRequired : false,\r\n placeholder : 'Enter Text',\r\n customPadding: '12px',\r\n }\"\r\n ></text-area>\r\n </div>\r\n <div class=\"col-12 md:col-12\">\r\n <div class=\"p-field queue-list-wrapper\">\r\n <dropdown [store]=\"dictionaryStore\" [record]=\"attributeRecord\" [attributeModel]=\"{\r\n name:'propertyList',\r\n displayText : 'Select properties',\r\n isRequired:false,\r\n options : propertyOptions,\r\n filter : true\r\n }\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-3\">\r\n <lib-button\r\n [store]=\"dictionaryStore\"\r\n [record]=\"attributeRecord\"\r\n [attributeModel]=\"{\r\n buttonLabel: 'Add to expression',\r\n isDisabled: false,\r\n }\"\r\n (onBtnClick)=\"handleAddExpressionClick($event)\"\r\n >\r\n </lib-button>\r\n </div>\r\n</div>" }]
|
|
2824
|
+
}], ctorParameters: () => [{ type: DictionaryStore }, { type: DictionaryQuery }], propDecorators: { ddItemRecord: [{
|
|
2825
|
+
type: Input
|
|
2826
|
+
}], isItemExpression: [{
|
|
2827
|
+
type: Input
|
|
2828
|
+
}], isSidebarVisible: [{
|
|
2829
|
+
type: Input
|
|
2830
|
+
}], saveClick: [{
|
|
2831
|
+
type: Output
|
|
2832
|
+
}] } });
|
|
2833
|
+
|
|
2834
|
+
class DdAdminFormComponent extends BaseFormComponent {
|
|
2835
|
+
service;
|
|
2836
|
+
dictionaryQuery;
|
|
2837
|
+
validatorService;
|
|
2838
|
+
router;
|
|
2839
|
+
activatedRoute;
|
|
2840
|
+
ddAdminStore;
|
|
2841
|
+
baseStore;
|
|
2842
|
+
baseQuery;
|
|
2843
|
+
sidebarVisibility = [];
|
|
2844
|
+
messages = SHARED.EMPTYARRAY;
|
|
2845
|
+
dictionaryItem;
|
|
2846
|
+
dictionaryName = SHARED.EMPTY;
|
|
2847
|
+
isItemExpression = SHARED.FALSE;
|
|
2848
|
+
constructor(service, dictionaryQuery, validatorService, router, activatedRoute, ddAdminStore, baseStore, baseQuery) {
|
|
2849
|
+
super(service, validatorService, router, activatedRoute);
|
|
2850
|
+
this.service = service;
|
|
2851
|
+
this.dictionaryQuery = dictionaryQuery;
|
|
2852
|
+
this.validatorService = validatorService;
|
|
2853
|
+
this.router = router;
|
|
2854
|
+
this.activatedRoute = activatedRoute;
|
|
2855
|
+
this.ddAdminStore = ddAdminStore;
|
|
2856
|
+
this.baseStore = baseStore;
|
|
2857
|
+
this.baseQuery = baseQuery;
|
|
2858
|
+
}
|
|
2859
|
+
ngOnInit() {
|
|
2860
|
+
this.init();
|
|
2861
|
+
if (!this.record) {
|
|
2862
|
+
this.record = {};
|
|
2863
|
+
}
|
|
2864
|
+
if (!Array.isArray(this.record.dictionaryItems)) {
|
|
2865
|
+
this.record.dictionaryItems = [];
|
|
2866
|
+
}
|
|
2867
|
+
this.sidebarVisibility = new Array(this.record.dictionaryItems.length).fill(false);
|
|
2868
|
+
}
|
|
2869
|
+
handleDictionaryItemAddBtnClick() {
|
|
2870
|
+
if (!this.record.dictionaryItems) {
|
|
2871
|
+
this.record.dictionaryItems = [];
|
|
2872
|
+
}
|
|
2873
|
+
this.record.dictionaryItems = [...this.record.dictionaryItems, new DdItemModel()];
|
|
2874
|
+
}
|
|
2875
|
+
handleItemExpression(i, event) {
|
|
2876
|
+
this.sidebarVisibility[i] = true;
|
|
2877
|
+
this.isItemExpression = SHARED.TRUE;
|
|
2878
|
+
}
|
|
2879
|
+
handleStyleExpression(i, event) {
|
|
2880
|
+
this.sidebarVisibility[i] = true;
|
|
2881
|
+
this.isItemExpression = SHARED.FALSE;
|
|
2882
|
+
}
|
|
2883
|
+
handleGetProperties(event) {
|
|
2884
|
+
this.service.getAllApiProperties(DATASOURCES.QUEUESAPICONFIG, event).subscribe();
|
|
2885
|
+
}
|
|
2886
|
+
onSidebarClose(isVisible) {
|
|
2887
|
+
this.sidebarVisibility = this.sidebarVisibility.map(() => isVisible);
|
|
2888
|
+
}
|
|
2889
|
+
handleDeleteRecord(index, dictionaryItemId) {
|
|
2890
|
+
if (index >= 0 && index < this.record.dictionaryItems.length) {
|
|
2891
|
+
this.record.dictionaryItems = this.record.dictionaryItems.filter((_, i) => i !== index);
|
|
2892
|
+
if (dictionaryItemId) {
|
|
2893
|
+
this.service.deleteDictionaryItemById(DATASOURCES.DELETEDICTIONARYITEM, dictionaryItemId).subscribe((res) => {
|
|
2894
|
+
this.messages = [{ severity: SHARED.SUCCESS, detail: res?.message || MESSAGE.DELETE_DICTIONARY_ITEM_SUCCESS }];
|
|
2895
|
+
setTimeout(() => {
|
|
2896
|
+
this.messages = SHARED.EMPTYARRAY;
|
|
2897
|
+
}, 3000);
|
|
2898
|
+
});
|
|
2899
|
+
}
|
|
2900
|
+
}
|
|
2901
|
+
else {
|
|
2902
|
+
console.error(ERROR.INVALID_INDEX, index);
|
|
2903
|
+
}
|
|
2904
|
+
}
|
|
2905
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DdAdminFormComponent, deps: [{ token: DictionaryService }, { token: DictionaryQuery }, { token: ValidatorService }, { token: i3$3.Router }, { token: i3$3.ActivatedRoute }, { token: DictionaryStore }, { token: BaseStore }, { token: BaseQuery }], target: i0.ɵɵFactoryTarget.Component });
|
|
2906
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: DdAdminFormComponent, isStandalone: false, selector: "lib-dd-admin-form", usesInheritance: true, ngImport: i0, template: "<form-container \r\n [messages]=\"messages\" \r\n [record]=\"record\" \r\n [headerText]=\"'Dictionary Form'\" \r\n [showSave]=\"true\" \r\n (onCancel)=\"handleCancel()\"\r\n (onSave)=\"handleSubmit()\">\r\n <div class=\"card p-fluid p-formgrid grid\">\r\n <div class=\"col-12 md:col-12 flex align-items-center justify-content-between\">\r\n <div class=\"col-12 md:col-6 p-field\">\r\n <div class=\"dictionary-name\">\r\n <text-box [store]=\"ddAdminStore\" [record]=\"record\" [attributeModel]=\"{\r\n readonly : false,\r\n name : 'name',\r\n isRequired : true,\r\n displayText: 'Dictionary Name',\r\n placeholder : 'Enter Text',\r\n }\"></text-box>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-6\">\r\n <div class=\"p-field queue-list-wrapper\">\r\n <dropdown [store]=\"ddAdminStore\" [record]=\"record\" [attributeModel]=\"{\r\n name: 'queueID',\r\n dataSource: 'queues',\r\n listLabelProperty: 'name',\r\n listValueProperty: '_id',\r\n displayText: 'Queue',\r\n placeholder: 'Select Queue',\r\n isRequired: true\r\n }\" (onInput)=\"handleGetProperties($event)\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"field p-0 pr-2 ml-3 col-12 md:col-2\">\r\n <div class=\"card m-0 p-0 mb-2\">\r\n <div class=\"mt-3 w-full flex\">\r\n <button pButton pRipple routerLinkActive=\"router-link-active\"\r\n class=\"py-3 justify-content-center font-semibold w-full border-round\"\r\n (click)=\"handleDictionaryItemAddBtnClick()\">\r\n Add New Item\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- dictionary Items -->\r\n <div class=\"col-12 md:col-12 flex align-items-center justify-content-between\"\r\n *ngFor=\"let ddItem of record.dictionaryItems; let i = index\">\r\n <div class=\"field col-12 md:col-3 pr-0\">\r\n <text-box [store]=\"ddAdminStore\" [record]=\"ddItem\" [attributeModel]=\"{\r\n name : 'itemName',\r\n readonly : false,\r\n displayText : 'Item Name',\r\n isRequired : true,\r\n }\"></text-box>\r\n </div>\r\n <div class=\"field flex align-items-center justify-content-between col-12 md:col-3 pr-0\">\r\n <div class=\"flex align-items-center w-full\">\r\n <div class=\"w-full mr-3\">\r\n <text-box [store]=\"ddAdminStore\" [record]=\"ddItem\" [attributeModel]=\"{\r\n name : 'itemExpression',\r\n readonly : false,\r\n disable : true,\r\n displayText : 'Item Expression',\r\n isRequired : true,\r\n }\">\r\n </text-box>\r\n </div>\r\n <span class=\"pi pi-cog mt-4 cursor-pointer text-xl\" (click)=\"handleItemExpression(i, $event )\"></span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"field col-12 md:col-3 flex align-items-center justify-content-between pr-0\">\r\n <div class=\"flex align-items-center w-full\">\r\n <div class=\"w-full mr-3\">\r\n <text-box [store]=\"ddAdminStore\" [record]=\"ddItem\" [attributeModel]=\"{\r\n name : 'styleExpression',\r\n readonly : false,\r\n disable : true,\r\n displayText : 'Style Expression',\r\n isRequired : true,\r\n }\">\r\n </text-box>\r\n </div>\r\n <span class=\"pi pi-cog mt-4 text-xl cursor-pointer text-color\"\r\n (click)=\"handleStyleExpression(i, $event)\"></span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"field col-12 md:col-2 flex align-items-center justify-content-center mt-4\">\r\n <check-box [store]=\"ddAdminStore\" [record]=\"ddItem\" [attributeModel]=\"{\r\n name:'isActive',\r\n displayText : 'Is Active',\r\n }\">\r\n </check-box>\r\n\r\n <div class=\"ml-6 delete-icon-container\">\r\n <i class=\"pi pi-trash trash-icon-wrapper cursor-pointer\" (click)=\"handleDeleteRecord(i, ddItem?._id)\"></i>\r\n </div>\r\n </div>\r\n <sidebar [isSidebarVisible]=\"sidebarVisibility[i]\" [title]=\"'Edit Expression'\"\r\n (onClose)=\"onSidebarClose($event)\">\r\n <lib-dd-admin-item-form [ddItemRecord]=\"ddItem\" [isItemExpression]=\"isItemExpression\"\r\n (saveClick)=\"onSidebarClose($event)\"></lib-dd-admin-item-form>\r\n </sidebar>\r\n </div>\r\n\r\n </div>\r\n</form-container>", styles: [".trash-icon-wrapper{font-size:20px;color:var(--red-500)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: TextBoxComponent, selector: "text-box" }, { kind: "component", type: DropdownComponent, selector: "dropdown", inputs: ["isStaticDropdown"] }, { kind: "component", type: FormContainerComponent, selector: "form-container", inputs: ["messages", "record", "headerText", "showSave", "disableSaveButton"], outputs: ["onSave", "onCancel"] }, { kind: "component", type: SidebarComponent, selector: "sidebar", inputs: ["isSidebarVisible", "title"], outputs: ["onClose"] }, { kind: "component", type: CheckBoxComponent, selector: "check-box" }, { kind: "directive", type: i2$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "component", type: DdAdminItemFormComponent, selector: "lib-dd-admin-item-form", inputs: ["ddItemRecord", "isItemExpression", "isSidebarVisible"], outputs: ["saveClick"] }] });
|
|
2907
|
+
}
|
|
2908
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DdAdminFormComponent, decorators: [{
|
|
2909
|
+
type: Component,
|
|
2910
|
+
args: [{ selector: 'lib-dd-admin-form', standalone: false, template: "<form-container \r\n [messages]=\"messages\" \r\n [record]=\"record\" \r\n [headerText]=\"'Dictionary Form'\" \r\n [showSave]=\"true\" \r\n (onCancel)=\"handleCancel()\"\r\n (onSave)=\"handleSubmit()\">\r\n <div class=\"card p-fluid p-formgrid grid\">\r\n <div class=\"col-12 md:col-12 flex align-items-center justify-content-between\">\r\n <div class=\"col-12 md:col-6 p-field\">\r\n <div class=\"dictionary-name\">\r\n <text-box [store]=\"ddAdminStore\" [record]=\"record\" [attributeModel]=\"{\r\n readonly : false,\r\n name : 'name',\r\n isRequired : true,\r\n displayText: 'Dictionary Name',\r\n placeholder : 'Enter Text',\r\n }\"></text-box>\r\n </div>\r\n </div>\r\n <div class=\"col-12 md:col-6\">\r\n <div class=\"p-field queue-list-wrapper\">\r\n <dropdown [store]=\"ddAdminStore\" [record]=\"record\" [attributeModel]=\"{\r\n name: 'queueID',\r\n dataSource: 'queues',\r\n listLabelProperty: 'name',\r\n listValueProperty: '_id',\r\n displayText: 'Queue',\r\n placeholder: 'Select Queue',\r\n isRequired: true\r\n }\" (onInput)=\"handleGetProperties($event)\">\r\n </dropdown>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"field p-0 pr-2 ml-3 col-12 md:col-2\">\r\n <div class=\"card m-0 p-0 mb-2\">\r\n <div class=\"mt-3 w-full flex\">\r\n <button pButton pRipple routerLinkActive=\"router-link-active\"\r\n class=\"py-3 justify-content-center font-semibold w-full border-round\"\r\n (click)=\"handleDictionaryItemAddBtnClick()\">\r\n Add New Item\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- dictionary Items -->\r\n <div class=\"col-12 md:col-12 flex align-items-center justify-content-between\"\r\n *ngFor=\"let ddItem of record.dictionaryItems; let i = index\">\r\n <div class=\"field col-12 md:col-3 pr-0\">\r\n <text-box [store]=\"ddAdminStore\" [record]=\"ddItem\" [attributeModel]=\"{\r\n name : 'itemName',\r\n readonly : false,\r\n displayText : 'Item Name',\r\n isRequired : true,\r\n }\"></text-box>\r\n </div>\r\n <div class=\"field flex align-items-center justify-content-between col-12 md:col-3 pr-0\">\r\n <div class=\"flex align-items-center w-full\">\r\n <div class=\"w-full mr-3\">\r\n <text-box [store]=\"ddAdminStore\" [record]=\"ddItem\" [attributeModel]=\"{\r\n name : 'itemExpression',\r\n readonly : false,\r\n disable : true,\r\n displayText : 'Item Expression',\r\n isRequired : true,\r\n }\">\r\n </text-box>\r\n </div>\r\n <span class=\"pi pi-cog mt-4 cursor-pointer text-xl\" (click)=\"handleItemExpression(i, $event )\"></span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"field col-12 md:col-3 flex align-items-center justify-content-between pr-0\">\r\n <div class=\"flex align-items-center w-full\">\r\n <div class=\"w-full mr-3\">\r\n <text-box [store]=\"ddAdminStore\" [record]=\"ddItem\" [attributeModel]=\"{\r\n name : 'styleExpression',\r\n readonly : false,\r\n disable : true,\r\n displayText : 'Style Expression',\r\n isRequired : true,\r\n }\">\r\n </text-box>\r\n </div>\r\n <span class=\"pi pi-cog mt-4 text-xl cursor-pointer text-color\"\r\n (click)=\"handleStyleExpression(i, $event)\"></span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"field col-12 md:col-2 flex align-items-center justify-content-center mt-4\">\r\n <check-box [store]=\"ddAdminStore\" [record]=\"ddItem\" [attributeModel]=\"{\r\n name:'isActive',\r\n displayText : 'Is Active',\r\n }\">\r\n </check-box>\r\n\r\n <div class=\"ml-6 delete-icon-container\">\r\n <i class=\"pi pi-trash trash-icon-wrapper cursor-pointer\" (click)=\"handleDeleteRecord(i, ddItem?._id)\"></i>\r\n </div>\r\n </div>\r\n <sidebar [isSidebarVisible]=\"sidebarVisibility[i]\" [title]=\"'Edit Expression'\"\r\n (onClose)=\"onSidebarClose($event)\">\r\n <lib-dd-admin-item-form [ddItemRecord]=\"ddItem\" [isItemExpression]=\"isItemExpression\"\r\n (saveClick)=\"onSidebarClose($event)\"></lib-dd-admin-item-form>\r\n </sidebar>\r\n </div>\r\n\r\n </div>\r\n</form-container>", styles: [".trash-icon-wrapper{font-size:20px;color:var(--red-500)}\n"] }]
|
|
2911
|
+
}], ctorParameters: () => [{ type: DictionaryService }, { type: DictionaryQuery }, { type: ValidatorService }, { type: i3$3.Router }, { type: i3$3.ActivatedRoute }, { type: DictionaryStore }, { type: BaseStore }, { type: BaseQuery }] });
|
|
2912
|
+
|
|
2913
|
+
class DdAdminListComponent extends BaseListComponent {
|
|
2914
|
+
tableBuilder;
|
|
2915
|
+
constructor(service, tableBuilder) {
|
|
2916
|
+
super(service, tableBuilder);
|
|
2917
|
+
this.tableBuilder = tableBuilder;
|
|
2918
|
+
this.tableBuilder.hiddenHeaders = dictionaryHiddenHeaderList;
|
|
2919
|
+
}
|
|
2920
|
+
ngOnInit() {
|
|
2921
|
+
this.init();
|
|
2922
|
+
}
|
|
2923
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DdAdminListComponent, deps: [{ token: DictionaryService }, { token: TableBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
2924
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: DdAdminListComponent, isStandalone: false, selector: "lib-dd-admin-list", usesInheritance: true, ngImport: i0, template: "<div class=\"dicitonary-list-wrapper\">\r\n @if(table){\r\n <lib-table-primary [title]=\"'Dictionary'\" [table]=\"table\"></lib-table-primary>\r\n }\r\n</div>", styles: [""], dependencies: [{ kind: "component", type: TablePrimaryComponent, selector: "lib-table-primary", inputs: ["table", "title", "showStatus", "showActions", "showSearchBar", "showNewRecordButton", "showRefreshButton"] }] });
|
|
2925
|
+
}
|
|
2926
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DdAdminListComponent, decorators: [{
|
|
2927
|
+
type: Component,
|
|
2928
|
+
args: [{ selector: 'lib-dd-admin-list', standalone: false, template: "<div class=\"dicitonary-list-wrapper\">\r\n @if(table){\r\n <lib-table-primary [title]=\"'Dictionary'\" [table]=\"table\"></lib-table-primary>\r\n }\r\n</div>" }]
|
|
2929
|
+
}], ctorParameters: () => [{ type: DictionaryService }, { type: TableBuilder }] });
|
|
2930
|
+
|
|
2931
|
+
class DdAdminModule {
|
|
2932
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DdAdminModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2933
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.4", ngImport: i0, type: DdAdminModule, declarations: [DdAdminFormComponent, DdAdminListComponent, DdAdminItemFormComponent], imports: [CommonModule,
|
|
2934
|
+
SharedModule,
|
|
2935
|
+
DropdownModule,
|
|
2936
|
+
ButtonComponent,
|
|
2937
|
+
InputTextareaModule,
|
|
2938
|
+
ReactiveFormsModule,
|
|
2939
|
+
FormsModule,
|
|
2940
|
+
TablePrimaryComponent,
|
|
2941
|
+
CheckBoxComponent,
|
|
2942
|
+
ButtonModule,
|
|
2943
|
+
TextAreaComponent,
|
|
2944
|
+
FormContainerComponent], exports: [DdAdminFormComponent, DdAdminListComponent] });
|
|
2945
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DdAdminModule, imports: [CommonModule,
|
|
2946
|
+
SharedModule,
|
|
2947
|
+
DropdownModule,
|
|
2948
|
+
ButtonComponent,
|
|
2949
|
+
InputTextareaModule,
|
|
2950
|
+
ReactiveFormsModule,
|
|
2951
|
+
FormsModule,
|
|
2952
|
+
TablePrimaryComponent,
|
|
2953
|
+
CheckBoxComponent,
|
|
2954
|
+
ButtonModule,
|
|
2955
|
+
TextAreaComponent,
|
|
2956
|
+
FormContainerComponent] });
|
|
2957
|
+
}
|
|
2958
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: DdAdminModule, decorators: [{
|
|
2959
|
+
type: NgModule,
|
|
2960
|
+
args: [{
|
|
2961
|
+
declarations: [DdAdminFormComponent, DdAdminListComponent, DdAdminItemFormComponent],
|
|
2962
|
+
imports: [
|
|
2963
|
+
CommonModule,
|
|
2964
|
+
SharedModule,
|
|
2965
|
+
DropdownModule,
|
|
2966
|
+
ButtonComponent,
|
|
2967
|
+
InputTextareaModule,
|
|
2968
|
+
ReactiveFormsModule,
|
|
2969
|
+
FormsModule,
|
|
2970
|
+
TablePrimaryComponent,
|
|
2971
|
+
CheckBoxComponent,
|
|
2972
|
+
ButtonModule,
|
|
2973
|
+
TextAreaComponent,
|
|
2974
|
+
FormContainerComponent
|
|
2975
|
+
],
|
|
2976
|
+
exports: [DdAdminFormComponent, DdAdminListComponent]
|
|
2977
|
+
}]
|
|
2978
|
+
}] });
|
|
2979
|
+
|
|
2980
|
+
/**
|
|
2981
|
+
* Widget Admin Store
|
|
2982
|
+
*/
|
|
2983
|
+
let WidgetStore = class WidgetStore extends BaseStore {
|
|
2984
|
+
onViewAllDetails$;
|
|
2985
|
+
constructor() {
|
|
2986
|
+
super();
|
|
2987
|
+
this.onViewAllDetails$ = new BehaviorSubject(SHARED.EMPTY_STRING);
|
|
2988
|
+
}
|
|
2989
|
+
setOnViewAllDetails(value) {
|
|
2990
|
+
this.onViewAllDetails$.next(value);
|
|
2991
|
+
}
|
|
2992
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2993
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetStore, providedIn: 'root' });
|
|
2994
|
+
};
|
|
2995
|
+
WidgetStore = __decorate([
|
|
2996
|
+
StoreConfig({ name: 'widgetStore' })
|
|
2997
|
+
], WidgetStore);
|
|
2998
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetStore, decorators: [{
|
|
2999
|
+
type: Injectable,
|
|
3000
|
+
args: [{ providedIn: 'root' }]
|
|
3001
|
+
}], ctorParameters: () => [] });
|
|
3002
|
+
|
|
3003
|
+
/**
|
|
3004
|
+
* Service for managing widget configurations.
|
|
3005
|
+
*/
|
|
3006
|
+
class WidgetService extends BaseService {
|
|
3007
|
+
widgetStore;
|
|
3008
|
+
configService;
|
|
3009
|
+
constructor(http, widgetStore, configService, listService) {
|
|
3010
|
+
super(http, widgetStore, configService, listService);
|
|
3011
|
+
this.widgetStore = widgetStore;
|
|
3012
|
+
this.configService = configService;
|
|
3013
|
+
this._pathName = DATASOURCES.WIDGET;
|
|
3014
|
+
}
|
|
3015
|
+
getAllWidgets(name) {
|
|
3016
|
+
const url = `${this.apiUrl}${name}`;
|
|
3017
|
+
return this.http.get(url).pipe(tap$1((entities) => this.widgetStore.set(entities)));
|
|
3018
|
+
}
|
|
3019
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetService, deps: [{ token: i1$1.HttpClient }, { token: WidgetStore }, { token: AppConfigService }, { token: ListService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3020
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetService, providedIn: 'root' });
|
|
3021
|
+
}
|
|
3022
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetService, decorators: [{
|
|
3023
|
+
type: Injectable,
|
|
3024
|
+
args: [{ providedIn: 'root' }]
|
|
3025
|
+
}], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: WidgetStore }, { type: AppConfigService }, { type: ListService }] });
|
|
3026
|
+
|
|
3027
|
+
/**
|
|
3028
|
+
* Widget Admin Query
|
|
3029
|
+
*/
|
|
3030
|
+
class WidgetQuery extends BaseQuery {
|
|
3031
|
+
store;
|
|
3032
|
+
widgetStore;
|
|
3033
|
+
constructor(store, widgetStore) {
|
|
3034
|
+
super(store);
|
|
3035
|
+
this.store = store;
|
|
3036
|
+
this.widgetStore = widgetStore;
|
|
3037
|
+
}
|
|
3038
|
+
getOnViewAllDetails() {
|
|
3039
|
+
return this.widgetStore.onViewAllDetails$.asObservable();
|
|
3040
|
+
}
|
|
3041
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetQuery, deps: [{ token: WidgetStore }, { token: WidgetStore }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3042
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetQuery, providedIn: 'root' });
|
|
3043
|
+
}
|
|
3044
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetQuery, decorators: [{
|
|
3045
|
+
type: Injectable,
|
|
3046
|
+
args: [{ providedIn: 'root' }]
|
|
3047
|
+
}], ctorParameters: () => [{ type: WidgetStore }, { type: WidgetStore }] });
|
|
3048
|
+
|
|
3049
|
+
class WidgetHeaderComponent {
|
|
3050
|
+
widget;
|
|
3051
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3052
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: WidgetHeaderComponent, isStandalone: false, selector: "lib-widget-header", inputs: { widget: "widget" }, ngImport: i0, template: "<div class=\"grid m-0 align-items-center\">\r\n <div class=\"col-12 p-0\">\r\n <div class=\"flex align-items-center\">\r\n <h3 class=\"mb-0 application-title-wrapper font-bold mr-3\">\r\n {{ (widget.header) }}\r\n </h3>\r\n </div>\r\n <div *ngIf=\"widget?.subHeader\" class=\"flex align-items-center mt-2\">\r\n <span class=\"mr-1\">Risk Rating:</span>\r\n <span\r\n class=\"mr-3 font-semibold\"\r\n [ngClass]=\"{\r\n 'text-red-500': widget.subHeader === 'High',\r\n 'text-green-500': widget.subHeader === 'Low',\r\n 'text-yellow-500': widget.subHeader === 'Medium'\r\n }\"\r\n >{{ widget.subHeader }}</span\r\n >\r\n </div>\r\n </div>\r\n </div>", styles: ["::ng-deep .badge-wrapper .p-button{padding:4px 8px}.application-title-wrapper{font-size:20px;font-weight:400}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
3053
|
+
}
|
|
3054
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetHeaderComponent, decorators: [{
|
|
3055
|
+
type: Component,
|
|
3056
|
+
args: [{ selector: 'lib-widget-header', standalone: false, template: "<div class=\"grid m-0 align-items-center\">\r\n <div class=\"col-12 p-0\">\r\n <div class=\"flex align-items-center\">\r\n <h3 class=\"mb-0 application-title-wrapper font-bold mr-3\">\r\n {{ (widget.header) }}\r\n </h3>\r\n </div>\r\n <div *ngIf=\"widget?.subHeader\" class=\"flex align-items-center mt-2\">\r\n <span class=\"mr-1\">Risk Rating:</span>\r\n <span\r\n class=\"mr-3 font-semibold\"\r\n [ngClass]=\"{\r\n 'text-red-500': widget.subHeader === 'High',\r\n 'text-green-500': widget.subHeader === 'Low',\r\n 'text-yellow-500': widget.subHeader === 'Medium'\r\n }\"\r\n >{{ widget.subHeader }}</span\r\n >\r\n </div>\r\n </div>\r\n </div>", styles: ["::ng-deep .badge-wrapper .p-button{padding:4px 8px}.application-title-wrapper{font-size:20px;font-weight:400}\n"] }]
|
|
3057
|
+
}], propDecorators: { widget: [{
|
|
3058
|
+
type: Input
|
|
3059
|
+
}] } });
|
|
3060
|
+
|
|
3061
|
+
class WidgetFooterComponent {
|
|
3062
|
+
widgetStore;
|
|
3063
|
+
widget;
|
|
3064
|
+
constructor(widgetStore) {
|
|
3065
|
+
this.widgetStore = widgetStore;
|
|
3066
|
+
}
|
|
3067
|
+
viewAllDetails() {
|
|
3068
|
+
this.widgetStore.setOnViewAllDetails(this.widget);
|
|
3069
|
+
}
|
|
3070
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetFooterComponent, deps: [{ token: WidgetStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
3071
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: WidgetFooterComponent, isStandalone: false, selector: "lib-widget-footer", inputs: { widget: "widget" }, ngImport: i0, template: "<div\r\n class=\"col-12 p-0 mt-3 flex justify-content-center\"\r\n >\r\n <a\r\n class=\"p-button p-button-link text-primary-500\"\r\n >\r\n <span class=\"underline font-semibold\" (click)=\"viewAllDetails()\">View All Details</span>\r\n <i class=\"pi pi-arrow-up-right arrow-up-icon ml-2\"></i>\r\n </a>\r\n</div>", styles: [""] });
|
|
3072
|
+
}
|
|
3073
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetFooterComponent, decorators: [{
|
|
3074
|
+
type: Component,
|
|
3075
|
+
args: [{ selector: 'lib-widget-footer', standalone: false, template: "<div\r\n class=\"col-12 p-0 mt-3 flex justify-content-center\"\r\n >\r\n <a\r\n class=\"p-button p-button-link text-primary-500\"\r\n >\r\n <span class=\"underline font-semibold\" (click)=\"viewAllDetails()\">View All Details</span>\r\n <i class=\"pi pi-arrow-up-right arrow-up-icon ml-2\"></i>\r\n </a>\r\n</div>" }]
|
|
3076
|
+
}], ctorParameters: () => [{ type: WidgetStore }], propDecorators: { widget: [{
|
|
3077
|
+
type: Input
|
|
3078
|
+
}] } });
|
|
3079
|
+
|
|
3080
|
+
class WidgetItemComponent {
|
|
3081
|
+
widgetItem;
|
|
3082
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3083
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: WidgetItemComponent, isStandalone: false, selector: "lib-widget-item", inputs: { widgetItem: "widgetItem" }, ngImport: i0, template: "<div class=\"flex align-items-center justify-content-between\">\r\n <p class=\"mb-0 text-color-secondary mr-3\">{{widgetItem?.key}}</p>\r\n <p class=\"mb-0 text-color font-semibold text-value-wrapper\" [ngClass]=\"widgetItem?.style\">{{widgetItem?.value}}</p>\r\n</div>", styles: [".text-value-wrapper{-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;max-width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
3084
|
+
}
|
|
3085
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetItemComponent, decorators: [{
|
|
3086
|
+
type: Component,
|
|
3087
|
+
args: [{ selector: 'lib-widget-item', standalone: false, template: "<div class=\"flex align-items-center justify-content-between\">\r\n <p class=\"mb-0 text-color-secondary mr-3\">{{widgetItem?.key}}</p>\r\n <p class=\"mb-0 text-color font-semibold text-value-wrapper\" [ngClass]=\"widgetItem?.style\">{{widgetItem?.value}}</p>\r\n</div>", styles: [".text-value-wrapper{-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;max-width:100%}\n"] }]
|
|
3088
|
+
}], propDecorators: { widgetItem: [{
|
|
3089
|
+
type: Input
|
|
3090
|
+
}] } });
|
|
3091
|
+
|
|
3092
|
+
class WidgetBodyComponent {
|
|
3093
|
+
widget;
|
|
3094
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3095
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: WidgetBodyComponent, isStandalone: false, selector: "lib-widget-body", inputs: { widget: "widget" }, ngImport: i0, template: "<div class=\"widget-body-container\">\r\n <div *ngFor=\"let dataItem of widget?.dataItems || []; let i = index\">\r\n <div [ngClass]=\"i !== ((widget?.dataItems || []).length - 1) ? 'widget-item-wrapper' : ''\">\r\n <div [ngClass]=\"i !== ((widget?.dataItems || []).length - 1) ? 'widget-wrapper' : 'widget-last-wrapper'\">\r\n <lib-widget-item [widgetItem]=\"dataItem\"></lib-widget-item>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".widget-item-wrapper{border-bottom:1px solid rgba(68,72,109,.1)}.widget-wrapper{padding:10px 0}.widget-last-wrapper{padding:10px 0 0}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: WidgetItemComponent, selector: "lib-widget-item", inputs: ["widgetItem"] }] });
|
|
3096
|
+
}
|
|
3097
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetBodyComponent, decorators: [{
|
|
3098
|
+
type: Component,
|
|
3099
|
+
args: [{ selector: 'lib-widget-body', standalone: false, template: "<div class=\"widget-body-container\">\r\n <div *ngFor=\"let dataItem of widget?.dataItems || []; let i = index\">\r\n <div [ngClass]=\"i !== ((widget?.dataItems || []).length - 1) ? 'widget-item-wrapper' : ''\">\r\n <div [ngClass]=\"i !== ((widget?.dataItems || []).length - 1) ? 'widget-wrapper' : 'widget-last-wrapper'\">\r\n <lib-widget-item [widgetItem]=\"dataItem\"></lib-widget-item>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".widget-item-wrapper{border-bottom:1px solid rgba(68,72,109,.1)}.widget-wrapper{padding:10px 0}.widget-last-wrapper{padding:10px 0 0}\n"] }]
|
|
3100
|
+
}], propDecorators: { widget: [{
|
|
3101
|
+
type: Input
|
|
3102
|
+
}] } });
|
|
3103
|
+
|
|
3104
|
+
class WidgetContainerComponent {
|
|
3105
|
+
widgetService;
|
|
3106
|
+
activatedRoute;
|
|
3107
|
+
widgetQuery;
|
|
3108
|
+
constructor(widgetService, activatedRoute, widgetQuery) {
|
|
3109
|
+
this.widgetService = widgetService;
|
|
3110
|
+
this.activatedRoute = activatedRoute;
|
|
3111
|
+
this.widgetQuery = widgetQuery;
|
|
3112
|
+
}
|
|
3113
|
+
widgets = [];
|
|
3114
|
+
onViewAllDetails = new EventEmitter();
|
|
3115
|
+
ngOnInit() {
|
|
3116
|
+
this.widgetQuery.getOnViewAllDetails().subscribe((res) => {
|
|
3117
|
+
this.onViewAllDetails.emit(res);
|
|
3118
|
+
});
|
|
3119
|
+
const queueId = localStorage.getItem(SHARED.selectedQueue);
|
|
3120
|
+
const recordId = this.activatedRoute.snapshot.params[SHARED.ID];
|
|
3121
|
+
if (!queueId || !recordId) {
|
|
3122
|
+
console.error(ERROR.ERROR_MISSING_PARAMETERS, {
|
|
3123
|
+
queueId: queueId || SHARED.MISSING_QUEUE_ID,
|
|
3124
|
+
recordId: recordId || SHARED.MISSING_RECORD_ID
|
|
3125
|
+
});
|
|
3126
|
+
return;
|
|
3127
|
+
}
|
|
3128
|
+
let url = `${ROUTES.APPLICATION_WIDGET}${SHARED.QUESTION_MARK}${SHARED.QUEUEID}${SHARED.EQUALS}${queueId}${SHARED.AMPERSAND}${SHARED.RECORDID}${SHARED.EQUALS}${recordId}`;
|
|
3129
|
+
this.widgetService.getAllWidgets(url).subscribe((res) => {
|
|
3130
|
+
this.widgets = res.sort((a, b) => a.order - b.order);
|
|
3131
|
+
}, (error) => {
|
|
3132
|
+
console.error(ERROR.ERROR_FETCHING_WIDGET_DATA, error);
|
|
3133
|
+
});
|
|
3134
|
+
}
|
|
3135
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetContainerComponent, deps: [{ token: WidgetService }, { token: i3$3.ActivatedRoute }, { token: WidgetQuery }], target: i0.ɵɵFactoryTarget.Component });
|
|
3136
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: WidgetContainerComponent, isStandalone: false, selector: "lib-widget-container", outputs: { onViewAllDetails: "onViewAllDetails" }, ngImport: i0, template: "<p-card class=\"widget-block-wrapper block\">\r\n <div class=\"flex align-items-center justify-content-end pb-0 px-3\">\r\n <p-button\r\n class=\"p-0 refresh-btn-wrapper\"\r\n [text]=\"true\"\r\n aria-label=\"Refresh\"\r\n >\r\n <i class=\"pi pi-sync pr-2\" style=\"font-size: 16px\"></i>\r\n <span class=\"text-lg font-semibold\">Refresh</span>\r\n </p-button>\r\n </div>\r\n <p-divider />\r\n \r\n <div class=\"widget-section-wrapper p-3\">\r\n <ng-container *ngIf=\"widgets && widgets.length > 0; else noWidgets\">\r\n <ng-container *ngFor=\"let widget of widgets\">\r\n <div class=\"widget-container-wrapper\">\r\n <lib-widget-header [widget]=\"widget\"></lib-widget-header>\r\n <div class=\"widget-content-wrapper mt-4 p-3\">\r\n <lib-widget-body [widget]=\"widget\"></lib-widget-body>\r\n <lib-widget-footer [widget]=\"widget\"></lib-widget-footer>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #noWidgets>\r\n <p class=\"text-color font-semibold\">No Widgets Configured</p>\r\n </ng-template>\r\n </div>\r\n</p-card>", styles: ["::ng-deep .badge-wrapper .p-button{padding:4px 8px}::ng-deep .refresh-btn-wrapper .p-button{padding:0}::ng-deep .valuation-timeline-wrapper .p-timeline-event-opposite{display:none}::ng-deep .rating-badge-wrapper .p-button{display:flex;align-items:center}::ng-deep .widget-block-wrapper{height:100%}::ng-deep .widget-block-wrapper .p-card{height:100%}::ng-deep .widget-block-wrapper .p-card-body{padding:0;height:100%}::ng-deep .widget-block-wrapper .p-card-content{padding-bottom:0;height:100%}.application-title-wrapper{font-size:20px;font-weight:400}.application-section-wrapper{background-color:#4c629208;border:1px solid rgba(76,98,146,.1);border-radius:10px}.widget-section-wrapper{height:calc(100% - 34px);overflow-y:auto}.widget-content-wrapper{border-radius:10px;border:1px solid rgba(76,98,146,.1);background:linear-gradient(0deg,#4c629208 0% 100%),#fff}:host ::-webkit-scrollbar{width:10px}:host ::-webkit-scrollbar-track{background:transparent}:host ::-webkit-scrollbar-thumb{background-color:var(--gray-500);border-radius:20px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.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: i4.Divider, selector: "p-divider", inputs: ["style", "styleClass", "layout", "type", "align"] }, { kind: "component", type: i7.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }, { kind: "component", type: WidgetHeaderComponent, selector: "lib-widget-header", inputs: ["widget"] }, { kind: "component", type: WidgetFooterComponent, selector: "lib-widget-footer", inputs: ["widget"] }, { kind: "component", type: WidgetBodyComponent, selector: "lib-widget-body", inputs: ["widget"] }] });
|
|
3137
|
+
}
|
|
3138
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetContainerComponent, decorators: [{
|
|
3139
|
+
type: Component,
|
|
3140
|
+
args: [{ selector: 'lib-widget-container', standalone: false, template: "<p-card class=\"widget-block-wrapper block\">\r\n <div class=\"flex align-items-center justify-content-end pb-0 px-3\">\r\n <p-button\r\n class=\"p-0 refresh-btn-wrapper\"\r\n [text]=\"true\"\r\n aria-label=\"Refresh\"\r\n >\r\n <i class=\"pi pi-sync pr-2\" style=\"font-size: 16px\"></i>\r\n <span class=\"text-lg font-semibold\">Refresh</span>\r\n </p-button>\r\n </div>\r\n <p-divider />\r\n \r\n <div class=\"widget-section-wrapper p-3\">\r\n <ng-container *ngIf=\"widgets && widgets.length > 0; else noWidgets\">\r\n <ng-container *ngFor=\"let widget of widgets\">\r\n <div class=\"widget-container-wrapper\">\r\n <lib-widget-header [widget]=\"widget\"></lib-widget-header>\r\n <div class=\"widget-content-wrapper mt-4 p-3\">\r\n <lib-widget-body [widget]=\"widget\"></lib-widget-body>\r\n <lib-widget-footer [widget]=\"widget\"></lib-widget-footer>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #noWidgets>\r\n <p class=\"text-color font-semibold\">No Widgets Configured</p>\r\n </ng-template>\r\n </div>\r\n</p-card>", styles: ["::ng-deep .badge-wrapper .p-button{padding:4px 8px}::ng-deep .refresh-btn-wrapper .p-button{padding:0}::ng-deep .valuation-timeline-wrapper .p-timeline-event-opposite{display:none}::ng-deep .rating-badge-wrapper .p-button{display:flex;align-items:center}::ng-deep .widget-block-wrapper{height:100%}::ng-deep .widget-block-wrapper .p-card{height:100%}::ng-deep .widget-block-wrapper .p-card-body{padding:0;height:100%}::ng-deep .widget-block-wrapper .p-card-content{padding-bottom:0;height:100%}.application-title-wrapper{font-size:20px;font-weight:400}.application-section-wrapper{background-color:#4c629208;border:1px solid rgba(76,98,146,.1);border-radius:10px}.widget-section-wrapper{height:calc(100% - 34px);overflow-y:auto}.widget-content-wrapper{border-radius:10px;border:1px solid rgba(76,98,146,.1);background:linear-gradient(0deg,#4c629208 0% 100%),#fff}:host ::-webkit-scrollbar{width:10px}:host ::-webkit-scrollbar-track{background:transparent}:host ::-webkit-scrollbar-thumb{background-color:var(--gray-500);border-radius:20px}\n"] }]
|
|
3141
|
+
}], ctorParameters: () => [{ type: WidgetService }, { type: i3$3.ActivatedRoute }, { type: WidgetQuery }], propDecorators: { onViewAllDetails: [{
|
|
3142
|
+
type: Output
|
|
3143
|
+
}] } });
|
|
3144
|
+
|
|
3145
|
+
class WidgetModule {
|
|
3146
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3147
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.4", ngImport: i0, type: WidgetModule, declarations: [WidgetContainerComponent, WidgetHeaderComponent, WidgetFooterComponent, WidgetBodyComponent, WidgetItemComponent], imports: [CommonModule,
|
|
3148
|
+
ButtonModule,
|
|
3149
|
+
DividerModule,
|
|
3150
|
+
CardModule,
|
|
3151
|
+
SharedModule,
|
|
3152
|
+
SidebarModule], exports: [WidgetContainerComponent] });
|
|
3153
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetModule, imports: [CommonModule,
|
|
3154
|
+
ButtonModule,
|
|
3155
|
+
DividerModule,
|
|
3156
|
+
CardModule,
|
|
3157
|
+
SharedModule,
|
|
3158
|
+
SidebarModule] });
|
|
3159
|
+
}
|
|
3160
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetModule, decorators: [{
|
|
3161
|
+
type: NgModule,
|
|
3162
|
+
args: [{
|
|
3163
|
+
declarations: [WidgetContainerComponent, WidgetHeaderComponent, WidgetFooterComponent, WidgetBodyComponent, WidgetItemComponent],
|
|
3164
|
+
imports: [
|
|
3165
|
+
CommonModule,
|
|
3166
|
+
ButtonModule,
|
|
3167
|
+
DividerModule,
|
|
3168
|
+
CardModule,
|
|
3169
|
+
SharedModule,
|
|
3170
|
+
SidebarModule
|
|
3171
|
+
],
|
|
3172
|
+
exports: [WidgetContainerComponent]
|
|
3173
|
+
}]
|
|
3174
|
+
}] });
|
|
3175
|
+
|
|
3176
|
+
/*
|
|
3177
|
+
* Public API Surface of cat-qw-lib
|
|
3178
|
+
*/
|
|
3179
|
+
|
|
3180
|
+
/**
|
|
3181
|
+
* Generated bundle index. Do not edit.
|
|
3182
|
+
*/
|
|
3183
|
+
|
|
3184
|
+
export { ActionAdminModule, AdminActionFormComponent, AdminActionListComponent, ApiAdminFormComponent, ApiAdminListComponent, ApiAdminModule, DdAdminFormComponent, DdAdminListComponent, DdAdminModule, QWWidgetAdminModule, QueueAdminFormComponent, QueueAdminListComponent, QueueAdminModule, QueueApplicationListComponent, WidgetAdminFormComponent, WidgetAdminListComponent, WidgetContainerComponent, WidgetModule };
|
|
3185
|
+
//# sourceMappingURL=cat-qw-lib.mjs.map
|