@tuki-io/tuki-widgets 0.0.5 → 0.0.7
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 +9 -10
- package/esm2020/lib/widgets.component.mjs +22 -0
- package/esm2020/lib/widgets.module.mjs +21 -0
- package/esm2020/lib/widgets.service.mjs +14 -0
- package/esm2020/public-api.mjs +7 -0
- package/esm2020/tuki-io-tuki-widgets.mjs +5 -0
- package/esm2020/user-manage/public-api.mjs +7 -0
- package/esm2020/user-manage/src/app.constants.mjs +38 -0
- package/esm2020/user-manage/src/classes/device.mjs +7 -0
- package/esm2020/user-manage/src/classes/line.mjs +9 -0
- package/esm2020/user-manage/src/classes/notification.mjs +32 -0
- package/esm2020/user-manage/src/classes/pagination.mjs +8 -0
- package/esm2020/user-manage/src/classes/simplified-user.mjs +82 -0
- package/esm2020/user-manage/src/classes/table-data.mjs +2 -0
- package/esm2020/user-manage/src/classes/user-list.mjs +10 -0
- package/esm2020/user-manage/src/common-functions.mjs +19 -0
- package/esm2020/user-manage/src/environments/environment.mjs +11 -0
- package/esm2020/user-manage/src/interseptors/auth.interceptor.mjs +37 -0
- package/esm2020/user-manage/src/lazy-loading-select/lazy-loading-select.component.mjs +74 -0
- package/esm2020/user-manage/src/material.module.mjs +188 -0
- package/esm2020/user-manage/src/notifications/notification.component.mjs +35 -0
- package/esm2020/user-manage/src/removeKynFromIBM.service.mjs +25 -0
- package/esm2020/user-manage/src/services/api.service.mjs +79 -0
- package/esm2020/user-manage/src/services/notification.service.mjs +62 -0
- package/esm2020/user-manage/src/services/removeKynFromIBM.service.mjs +25 -0
- package/esm2020/user-manage/src/services/site-settings.service.mjs +36 -0
- package/esm2020/user-manage/src/services/user.service.mjs +108 -0
- package/esm2020/user-manage/src/services/users-search.service.mjs +49 -0
- package/esm2020/user-manage/src/services/utils.service.mjs +73 -0
- package/esm2020/user-manage/src/user-info/user-info.component.mjs +20 -0
- package/esm2020/user-manage/src/user-manage-widget.component.mjs +159 -0
- package/esm2020/user-manage/src/user-manage.module.mjs +84 -0
- package/esm2020/user-manage/src/utils/app-loader/app-loader.mjs +14 -0
- package/esm2020/user-manage/src/utils/pagination/pagination.component.mjs +43 -0
- package/esm2020/user-manage/tuki-io-tuki-widgets-user-manage.mjs +5 -0
- package/esm2020/users-list/public-api.mjs +9 -0
- package/esm2020/users-list/src/app.constants.mjs +35 -0
- package/esm2020/users-list/src/classes/device.mjs +7 -0
- package/esm2020/users-list/src/classes/line.mjs +9 -0
- package/esm2020/users-list/src/classes/notification.mjs +31 -0
- package/esm2020/users-list/src/classes/pagination.mjs +8 -0
- package/esm2020/users-list/src/classes/simlified-user.mjs +50 -0
- package/esm2020/users-list/src/classes/table-data.mjs +2 -0
- package/esm2020/users-list/src/classes/user-list.mjs +10 -0
- package/esm2020/users-list/src/material.module.mjs +188 -0
- package/esm2020/users-list/src/services/api.service.mjs +78 -0
- package/esm2020/users-list/src/services/events-communication.service.mjs +14 -0
- package/esm2020/users-list/src/services/notification.service.mjs +62 -0
- package/esm2020/users-list/src/services/removeKynFromIBM.service.mjs +25 -0
- package/esm2020/users-list/src/services/user.service.mjs +105 -0
- package/esm2020/users-list/src/services/users-search.service.mjs +49 -0
- package/esm2020/users-list/src/users-list.component.mjs +75 -0
- package/esm2020/users-list/src/users-list.module.mjs +58 -0
- package/esm2020/users-list/src/utils/common-functions.mjs +19 -0
- package/esm2020/users-list/src/utils/pagination/pagination.component.mjs +43 -0
- package/esm2020/users-list/src/utils/utils.service.mjs +73 -0
- package/esm2020/users-list/tuki-io-tuki-widgets-users-list.mjs +5 -0
- package/fesm2015/tuki-io-tuki-widgets-user-manage.mjs +1232 -0
- package/fesm2015/tuki-io-tuki-widgets-user-manage.mjs.map +1 -0
- package/fesm2015/tuki-io-tuki-widgets-users-list.mjs +869 -0
- package/fesm2015/tuki-io-tuki-widgets-users-list.mjs.map +1 -0
- package/fesm2015/tuki-io-tuki-widgets.mjs +63 -0
- package/fesm2015/tuki-io-tuki-widgets.mjs.map +1 -0
- package/fesm2020/tuki-io-tuki-widgets-user-manage.mjs +1219 -0
- package/fesm2020/tuki-io-tuki-widgets-user-manage.mjs.map +1 -0
- package/fesm2020/tuki-io-tuki-widgets-users-list.mjs +866 -0
- package/fesm2020/tuki-io-tuki-widgets-users-list.mjs.map +1 -0
- package/fesm2020/tuki-io-tuki-widgets.mjs +63 -0
- package/fesm2020/tuki-io-tuki-widgets.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/widgets.component.d.ts +8 -0
- package/lib/widgets.module.d.ts +7 -0
- package/lib/widgets.service.d.ts +6 -0
- package/package.json +44 -36
- package/{projects/tuki/widgets/src/public-api.ts → public-api.d.ts} +0 -4
- package/user-manage/index.d.ts +5 -0
- package/user-manage/src/app.constants.d.ts +20 -0
- package/user-manage/src/classes/device.d.ts +224 -0
- package/user-manage/src/classes/line.d.ts +116 -0
- package/user-manage/src/classes/notification.d.ts +18 -0
- package/user-manage/src/classes/pagination.d.ts +13 -0
- package/user-manage/src/classes/simplified-user.d.ts +41 -0
- package/user-manage/src/classes/table-data.d.ts +5 -0
- package/user-manage/src/classes/user-list.d.ts +32 -0
- package/user-manage/src/common-functions.d.ts +1 -0
- package/user-manage/src/environments/environment.d.ts +9 -0
- package/user-manage/src/interseptors/auth.interceptor.d.ts +9 -0
- package/user-manage/src/lazy-loading-select/lazy-loading-select.component.d.ts +35 -0
- package/user-manage/src/material.module.d.ts +28 -0
- package/user-manage/src/notifications/notification.component.d.ts +19 -0
- package/user-manage/src/removeKynFromIBM.service.d.ts +8 -0
- package/user-manage/src/services/api.service.d.ts +20 -0
- package/user-manage/src/services/notification.service.d.ts +18 -0
- package/user-manage/src/services/removeKynFromIBM.service.d.ts +8 -0
- package/user-manage/src/services/site-settings.service.d.ts +9 -0
- package/user-manage/src/services/user.service.d.ts +26 -0
- package/user-manage/src/services/users-search.service.d.ts +25 -0
- package/user-manage/src/services/utils.service.d.ts +9 -0
- package/user-manage/src/user-info/user-info.component.d.ts +9 -0
- package/user-manage/src/user-manage-widget.component.d.ts +31 -0
- package/user-manage/src/user-manage.module.d.ts +18 -0
- package/user-manage/src/utils/app-loader/app-loader.d.ts +6 -0
- package/user-manage/src/utils/pagination/pagination.component.d.ts +18 -0
- package/users-list/index.d.ts +5 -0
- package/users-list/src/app.constants.d.ts +17 -0
- package/users-list/src/classes/device.d.ts +224 -0
- package/users-list/src/classes/line.d.ts +116 -0
- package/users-list/src/classes/notification.d.ts +18 -0
- package/users-list/src/classes/pagination.d.ts +13 -0
- package/users-list/src/classes/simlified-user.d.ts +25 -0
- package/users-list/src/classes/table-data.d.ts +5 -0
- package/users-list/src/classes/user-list.d.ts +32 -0
- package/users-list/src/material.module.d.ts +28 -0
- package/users-list/src/services/api.service.d.ts +20 -0
- package/users-list/src/services/events-communication.service.d.ts +8 -0
- package/users-list/src/services/notification.service.d.ts +18 -0
- package/users-list/src/services/removeKynFromIBM.service.d.ts +8 -0
- package/users-list/src/services/user.service.d.ts +26 -0
- package/users-list/src/services/users-search.service.d.ts +25 -0
- package/users-list/src/users-list.component.d.ts +34 -0
- package/users-list/src/users-list.module.d.ts +12 -0
- package/users-list/src/utils/common-functions.d.ts +1 -0
- package/users-list/src/utils/pagination/pagination.component.d.ts +18 -0
- package/users-list/src/utils/utils.service.d.ts +9 -0
- package/.editorconfig +0 -16
- package/.vscode/extensions.json +0 -4
- package/.vscode/launch.json +0 -20
- package/.vscode/tasks.json +0 -42
- package/angular.json +0 -41
- package/projects/tuki/widgets/README.md +0 -24
- package/projects/tuki/widgets/karma.conf.js +0 -44
- package/projects/tuki/widgets/ng-package.json +0 -7
- package/projects/tuki/widgets/package.json +0 -13
- package/projects/tuki/widgets/src/lib/widgets.component.spec.ts +0 -23
- package/projects/tuki/widgets/src/lib/widgets.component.ts +0 -20
- package/projects/tuki/widgets/src/lib/widgets.module.ts +0 -16
- package/projects/tuki/widgets/src/lib/widgets.service.spec.ts +0 -16
- package/projects/tuki/widgets/src/lib/widgets.service.ts +0 -9
- package/projects/tuki/widgets/src/test.ts +0 -27
- package/projects/tuki/widgets/styles/_variables.scss +0 -90
- package/projects/tuki/widgets/styles/form.scss +0 -231
- package/projects/tuki/widgets/styles/icons.scss +0 -32
- package/projects/tuki/widgets/styles/styles.scss +0 -110
- package/projects/tuki/widgets/styles/tables.scss +0 -30
- package/projects/tuki/widgets/tsconfig.lib.json +0 -36
- package/projects/tuki/widgets/tsconfig.lib.prod.json +0 -10
- package/projects/tuki/widgets/tsconfig.spec.json +0 -17
- package/projects/tuki/widgets/user-manage/ng-package.json +0 -7
- package/projects/tuki/widgets/user-manage/src/app.constants.ts +0 -38
- package/projects/tuki/widgets/user-manage/src/classes/device.ts +0 -225
- package/projects/tuki/widgets/user-manage/src/classes/line.ts +0 -117
- package/projects/tuki/widgets/user-manage/src/classes/notification.ts +0 -39
- package/projects/tuki/widgets/user-manage/src/classes/pagination.ts +0 -18
- package/projects/tuki/widgets/user-manage/src/classes/simplified-user.ts +0 -128
- package/projects/tuki/widgets/user-manage/src/classes/table-data.ts +0 -6
- package/projects/tuki/widgets/user-manage/src/classes/user-interface.ts +0 -225
- package/projects/tuki/widgets/user-manage/src/classes/user-list.ts +0 -40
- package/projects/tuki/widgets/user-manage/src/classes/user.ts +0 -8
- package/projects/tuki/widgets/user-manage/src/common-functions.ts +0 -16
- package/projects/tuki/widgets/user-manage/src/environments/environment.prod.ts +0 -9
- package/projects/tuki/widgets/user-manage/src/environments/environment.ts +0 -10
- package/projects/tuki/widgets/user-manage/src/interseptors/auth.interceptor.ts +0 -36
- package/projects/tuki/widgets/user-manage/src/lazy-loading-select/lazy-loading-select.component.html +0 -50
- package/projects/tuki/widgets/user-manage/src/lazy-loading-select/lazy-loading-select.component.scss +0 -3
- package/projects/tuki/widgets/user-manage/src/lazy-loading-select/lazy-loading-select.component.ts +0 -81
- package/projects/tuki/widgets/user-manage/src/material.module.ts +0 -85
- package/projects/tuki/widgets/user-manage/src/notifications/notification.component.html +0 -33
- package/projects/tuki/widgets/user-manage/src/notifications/notification.component.scss +0 -84
- package/projects/tuki/widgets/user-manage/src/notifications/notification.component.ts +0 -46
- package/projects/tuki/widgets/user-manage/src/removeKynFromIBM.service.ts +0 -25
- package/projects/tuki/widgets/user-manage/src/services/api.service.ts +0 -89
- package/projects/tuki/widgets/user-manage/src/services/notification.service.ts +0 -68
- package/projects/tuki/widgets/user-manage/src/services/removeKynFromIBM.service.ts +0 -25
- package/projects/tuki/widgets/user-manage/src/services/site-settings.service.ts +0 -35
- package/projects/tuki/widgets/user-manage/src/services/user.service.ts +0 -120
- package/projects/tuki/widgets/user-manage/src/services/users-search.service.ts +0 -58
- package/projects/tuki/widgets/user-manage/src/services/utils.service.ts +0 -71
- package/projects/tuki/widgets/user-manage/src/styles/_variables.scss +0 -90
- package/projects/tuki/widgets/user-manage/src/styles/form.scss +0 -231
- package/projects/tuki/widgets/user-manage/src/styles/icons.scss +0 -32
- package/projects/tuki/widgets/user-manage/src/styles/styles.scss +0 -110
- package/projects/tuki/widgets/user-manage/src/styles/tables.scss +0 -30
- package/projects/tuki/widgets/user-manage/src/user-details/notification.service.ts +0 -68
- package/projects/tuki/widgets/user-manage/src/user-info/user-info.component.html +0 -32
- package/projects/tuki/widgets/user-manage/src/user-info/user-info.component.scss +0 -53
- package/projects/tuki/widgets/user-manage/src/user-info/user-info.component.ts +0 -19
- package/projects/tuki/widgets/user-manage/src/user-manage-widget.component.html +0 -291
- package/projects/tuki/widgets/user-manage/src/user-manage-widget.component.scss +0 -461
- package/projects/tuki/widgets/user-manage/src/user-manage-widget.component.ts +0 -163
- package/projects/tuki/widgets/user-manage/src/user-manage.module.ts +0 -53
- package/projects/tuki/widgets/user-manage/src/utils/app-loader/app-loader.component.html +0 -6
- package/projects/tuki/widgets/user-manage/src/utils/app-loader/app-loader.component.scss +0 -11
- package/projects/tuki/widgets/user-manage/src/utils/app-loader/app-loader.ts +0 -13
- package/projects/tuki/widgets/user-manage/src/utils/pagination/pagination.component.html +0 -26
- package/projects/tuki/widgets/user-manage/src/utils/pagination/pagination.component.scss +0 -41
- package/projects/tuki/widgets/user-manage/src/utils/pagination/pagination.component.ts +0 -41
- package/projects/tuki/widgets/users-list/ng-package.json +0 -6
- package/projects/tuki/widgets/users-list/src/app.constants.ts +0 -35
- package/projects/tuki/widgets/users-list/src/classes/device.ts +0 -225
- package/projects/tuki/widgets/users-list/src/classes/line.ts +0 -117
- package/projects/tuki/widgets/users-list/src/classes/notification.ts +0 -38
- package/projects/tuki/widgets/users-list/src/classes/pagination.ts +0 -18
- package/projects/tuki/widgets/users-list/src/classes/simlified-user.ts +0 -74
- package/projects/tuki/widgets/users-list/src/classes/table-data.ts +0 -6
- package/projects/tuki/widgets/users-list/src/classes/user-interface.ts +0 -225
- package/projects/tuki/widgets/users-list/src/classes/user-list.ts +0 -40
- package/projects/tuki/widgets/users-list/src/classes/user.ts +0 -8
- package/projects/tuki/widgets/users-list/src/material.module.ts +0 -84
- package/projects/tuki/widgets/users-list/src/services/api.service.ts +0 -87
- package/projects/tuki/widgets/users-list/src/services/events-communication.service.ts +0 -11
- package/projects/tuki/widgets/users-list/src/services/notification.service.ts +0 -68
- package/projects/tuki/widgets/users-list/src/services/removeKynFromIBM.service.ts +0 -25
- package/projects/tuki/widgets/users-list/src/services/user.service.ts +0 -117
- package/projects/tuki/widgets/users-list/src/services/users-search.service.ts +0 -58
- package/projects/tuki/widgets/users-list/src/users-list.component.css +0 -4
- package/projects/tuki/widgets/users-list/src/users-list.component.css.map +0 -1
- package/projects/tuki/widgets/users-list/src/users-list.component.html +0 -39
- package/projects/tuki/widgets/users-list/src/users-list.component.scss +0 -9
- package/projects/tuki/widgets/users-list/src/users-list.component.ts +0 -85
- package/projects/tuki/widgets/users-list/src/users-list.module.ts +0 -36
- package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.component.css +0 -11
- package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.component.css.map +0 -1
- package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.component.html +0 -6
- package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.component.scss +0 -11
- package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.ts +0 -13
- package/projects/tuki/widgets/users-list/src/utils/common-functions.ts +0 -16
- package/projects/tuki/widgets/users-list/src/utils/notifications/notification.component.html +0 -33
- package/projects/tuki/widgets/users-list/src/utils/notifications/notification.component.scss +0 -84
- package/projects/tuki/widgets/users-list/src/utils/notifications/notification.component.ts +0 -46
- package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.css +0 -45
- package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.css.map +0 -1
- package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.html +0 -26
- package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.scss +0 -41
- package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.ts +0 -41
- package/projects/tuki/widgets/users-list/src/utils/utils.service.ts +0 -71
- package/tsconfig.json +0 -46
- /package/{projects/tuki/widgets/user-manage/public-api.ts → user-manage/public-api.d.ts} +0 -0
- /package/{projects/tuki/widgets/users-list/public-api.ts → users-list/public-api.d.ts} +0 -0
|
@@ -0,0 +1,1232 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, Component, ViewEncapsulation, Input, NgModule, ChangeDetectionStrategy, EventEmitter, Output } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common/http';
|
|
4
|
+
import { HttpHeaders, HttpErrorResponse, HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
5
|
+
import { map, catchError } from 'rxjs/operators';
|
|
6
|
+
import { of, forkJoin, throwError, Subject, BehaviorSubject } from 'rxjs';
|
|
7
|
+
import * as i4 from '@angular/forms';
|
|
8
|
+
import { FormBuilder, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
9
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
10
|
+
import * as i1$1 from '@angular/material/progress-spinner';
|
|
11
|
+
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
12
|
+
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
13
|
+
import * as i3 from '@angular/common';
|
|
14
|
+
import { CommonModule } from '@angular/common';
|
|
15
|
+
import { MatExpansionModule } from '@angular/material/expansion';
|
|
16
|
+
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
17
|
+
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
18
|
+
import { MatChipsModule } from '@angular/material/chips';
|
|
19
|
+
import { MatListModule } from '@angular/material/list';
|
|
20
|
+
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
21
|
+
import { MatTreeModule } from '@angular/material/tree';
|
|
22
|
+
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
23
|
+
import * as i5$1 from '@angular/material/button';
|
|
24
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
25
|
+
import * as i9 from '@angular/material/input';
|
|
26
|
+
import { MatInputModule } from '@angular/material/input';
|
|
27
|
+
import * as i4$1 from '@angular/material/core';
|
|
28
|
+
import { MatNativeDateModule } from '@angular/material/core';
|
|
29
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
30
|
+
import * as i6$1 from '@angular/material/form-field';
|
|
31
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
32
|
+
import { MatStepperModule } from '@angular/material/stepper';
|
|
33
|
+
import * as i10 from '@angular/material/tabs';
|
|
34
|
+
import { MatTabsModule } from '@angular/material/tabs';
|
|
35
|
+
import { MatCardModule } from '@angular/material/card';
|
|
36
|
+
import * as i5 from '@angular/material/select';
|
|
37
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
38
|
+
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
39
|
+
import * as i11 from '@angular/material/slide-toggle';
|
|
40
|
+
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
41
|
+
import { MatTableModule } from '@angular/material/table';
|
|
42
|
+
import * as i6 from '@angular/material/paginator';
|
|
43
|
+
import { MatPaginatorModule } from '@angular/material/paginator';
|
|
44
|
+
import * as i6$2 from '@angular/material/divider';
|
|
45
|
+
|
|
46
|
+
const apiUrl = 'http://192.168.0.191:8080';
|
|
47
|
+
class APIService {
|
|
48
|
+
constructor(httpClient) {
|
|
49
|
+
this.httpClient = httpClient;
|
|
50
|
+
}
|
|
51
|
+
fetch(url, params, cache) {
|
|
52
|
+
const headers = this.getHeaders(cache);
|
|
53
|
+
params = params || {};
|
|
54
|
+
return this.httpClient.get(apiUrl + url, { params: this.prepareEncodedParams(params), headers });
|
|
55
|
+
}
|
|
56
|
+
post(url, body, params = {}) {
|
|
57
|
+
body = body || null;
|
|
58
|
+
const headers = this.getHeaders();
|
|
59
|
+
return this.httpClient.post(apiUrl + url, body, { params: this.prepareEncodedParams(params), headers });
|
|
60
|
+
}
|
|
61
|
+
// use when response extended data is necessary:
|
|
62
|
+
postExtended(url, body = null, params = {}, headers = {}) {
|
|
63
|
+
headers = headers || this.getHeaders();
|
|
64
|
+
return this.httpClient.post(apiUrl + url, body, {
|
|
65
|
+
headers,
|
|
66
|
+
observe: 'response',
|
|
67
|
+
params: this.prepareEncodedParams(params)
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
put(url, body = null, params = {}) {
|
|
71
|
+
const headers = this.getHeaders();
|
|
72
|
+
return this.httpClient.put(apiUrl + url, body, { headers, params: this.prepareEncodedParams(params) });
|
|
73
|
+
}
|
|
74
|
+
delete(url, params = {}) {
|
|
75
|
+
const headers = this.getHeaders();
|
|
76
|
+
return this.httpClient.delete(apiUrl + url, { headers, params: this.prepareEncodedParams(params) });
|
|
77
|
+
}
|
|
78
|
+
fetchPagination(url, pageSize, pageNumber, additionalParams = {}, cache) {
|
|
79
|
+
const copyAdditionalParams = JSON.parse(JSON.stringify(additionalParams));
|
|
80
|
+
const params = Object.assign(copyAdditionalParams, { size: pageSize.toString(), page: pageNumber.toString() });
|
|
81
|
+
return this.fetch(url, params, cache);
|
|
82
|
+
}
|
|
83
|
+
prepareEncodedParams(params) {
|
|
84
|
+
const result = {};
|
|
85
|
+
if (!params) {
|
|
86
|
+
return {};
|
|
87
|
+
}
|
|
88
|
+
for (const key of Object.keys(params)) {
|
|
89
|
+
if (params[key]) {
|
|
90
|
+
const stringParam = params[key].toString();
|
|
91
|
+
result[key] = stringParam.includes('+') ? encodeURIComponent(stringParam) : stringParam;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return result;
|
|
95
|
+
}
|
|
96
|
+
getHeaders(cache) {
|
|
97
|
+
let headers = new HttpHeaders();
|
|
98
|
+
if (cache) {
|
|
99
|
+
headers = headers.append('_Cache', 'true ');
|
|
100
|
+
}
|
|
101
|
+
const token = this.token || this.getParameterByName('token');
|
|
102
|
+
headers = headers.append('Authorization', 'Bearer ' + token);
|
|
103
|
+
return headers;
|
|
104
|
+
}
|
|
105
|
+
getParameterByName(name, url = window.location.href) {
|
|
106
|
+
name = name.replace(/[\[\]]/g, '\\$&');
|
|
107
|
+
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), results = regex.exec(url);
|
|
108
|
+
if (!results)
|
|
109
|
+
return null;
|
|
110
|
+
if (!results[2])
|
|
111
|
+
return '';
|
|
112
|
+
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
APIService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: APIService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
116
|
+
APIService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: APIService });
|
|
117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: APIService, decorators: [{
|
|
118
|
+
type: Injectable
|
|
119
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
|
120
|
+
|
|
121
|
+
const API = {
|
|
122
|
+
USER_TOKEN: '/api/provision/:siteId/users/:userId/token',
|
|
123
|
+
UPDATE_USER_FIELDS: '/api/provision/:siteId/userFields/:token',
|
|
124
|
+
PERSIST_USER_CACHE: '/api/provision/:siteId/saveUser/:token',
|
|
125
|
+
USER_BY_ID: '/api/provision/:siteId/users/:userId',
|
|
126
|
+
QUICK_USERS_SEARCH: "/api/search/quickusers",
|
|
127
|
+
LOCATION: "/api/provision/options/:siteId/locations",
|
|
128
|
+
USER_LOCALES: "/api/provision/options/:siteId/userlocales",
|
|
129
|
+
USER_PROFILES: "/api/provision/options/:siteId/userprofiles"
|
|
130
|
+
};
|
|
131
|
+
const REGEX_PATTERN = {
|
|
132
|
+
EMAIL: '^(([^<>()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))' +
|
|
133
|
+
'@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,62}[a-zA-Z0-9])' +
|
|
134
|
+
'?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,62}[a-zA-Z0-9])?)*$'
|
|
135
|
+
};
|
|
136
|
+
const PAGINATION_DEFAULTS = {
|
|
137
|
+
SIZE: 10,
|
|
138
|
+
INDEX: 0
|
|
139
|
+
};
|
|
140
|
+
const PAGINATION_SIZE_OPTIONS = [
|
|
141
|
+
10,
|
|
142
|
+
50,
|
|
143
|
+
100,
|
|
144
|
+
500
|
|
145
|
+
];
|
|
146
|
+
const CUCS_TO_IGNORE = [
|
|
147
|
+
189,
|
|
148
|
+
194,
|
|
149
|
+
191,
|
|
150
|
+
190
|
|
151
|
+
];
|
|
152
|
+
const CUCMS_TO_IGNORE = [
|
|
153
|
+
249,
|
|
154
|
+
255,
|
|
155
|
+
251,
|
|
156
|
+
250
|
|
157
|
+
];
|
|
158
|
+
|
|
159
|
+
const urlMap = {
|
|
160
|
+
locations: API.LOCATION,
|
|
161
|
+
userLocales: API.USER_LOCALES,
|
|
162
|
+
userProfiles: API.USER_PROFILES
|
|
163
|
+
};
|
|
164
|
+
class SiteSettingsService {
|
|
165
|
+
constructor(apiService) {
|
|
166
|
+
this.apiService = apiService;
|
|
167
|
+
}
|
|
168
|
+
getSelectionOptions(siteId, token) {
|
|
169
|
+
if (!siteId) {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
// @ts-ignore
|
|
173
|
+
const URL = urlMap[token];
|
|
174
|
+
return this.apiService.fetch(URL.replace(':siteId', String(siteId)), null, true)
|
|
175
|
+
// @ts-ignore
|
|
176
|
+
.pipe(map((options) => {
|
|
177
|
+
// @ts-ignore
|
|
178
|
+
this[token] = options ? options.sort() : [];
|
|
179
|
+
// @ts-ignore
|
|
180
|
+
return this[token];
|
|
181
|
+
}));
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
SiteSettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SiteSettingsService, deps: [{ token: APIService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
185
|
+
SiteSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SiteSettingsService });
|
|
186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SiteSettingsService, decorators: [{
|
|
187
|
+
type: Injectable
|
|
188
|
+
}], ctorParameters: function () { return [{ type: APIService }]; } });
|
|
189
|
+
|
|
190
|
+
const getSavableData = (model, exclude) => {
|
|
191
|
+
let result = Object.keys(model);
|
|
192
|
+
if (exclude && exclude.length) {
|
|
193
|
+
result = result.filter(key => !exclude.some(item => item === key));
|
|
194
|
+
}
|
|
195
|
+
return result.reduce((result, key) => {
|
|
196
|
+
if (model[key] instanceof Array && model[key].length && model[key][0].getSavableData) {
|
|
197
|
+
result[key] = model[key].map((item) => item.getSavableData());
|
|
198
|
+
}
|
|
199
|
+
else if (model[key] instanceof Object && model[key].getSavableData) {
|
|
200
|
+
result[key] = model[key].getSavableData();
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
result[key] = model[key];
|
|
204
|
+
}
|
|
205
|
+
return result;
|
|
206
|
+
}, {});
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
class SimplifiedUser {
|
|
210
|
+
constructor(user) {
|
|
211
|
+
if (user) {
|
|
212
|
+
this.userid = user.userid;
|
|
213
|
+
this.email = user.email;
|
|
214
|
+
this.firstName = user.firstName;
|
|
215
|
+
this.lastName = user.lastName;
|
|
216
|
+
this.token = user.token;
|
|
217
|
+
this.department = user.department;
|
|
218
|
+
this.manager = user.manager;
|
|
219
|
+
this.associatedPc = user.associatedPc;
|
|
220
|
+
this.digestCredentials = user.digestCredentials;
|
|
221
|
+
this.userProfile = user.userProfile;
|
|
222
|
+
this.enableMobileVoiceAccess = user.enableMobileVoiceAccess;
|
|
223
|
+
this.userLocale = user.userLocale;
|
|
224
|
+
this.confirmDigestCredentials = user.confirmDigestCredentials;
|
|
225
|
+
this.middleName = user.middleName;
|
|
226
|
+
this.telephoneNumber = user.telephoneNumber;
|
|
227
|
+
this.mobileNumber = user.mobileNumber;
|
|
228
|
+
this.directoryUri = user.directoryUri;
|
|
229
|
+
this.title = user.title;
|
|
230
|
+
this.homeNumber = user.homeNumber;
|
|
231
|
+
this.pagerNumber = user.pagerNumber;
|
|
232
|
+
this.displayName = user.displayName;
|
|
233
|
+
}
|
|
234
|
+
this.initForm();
|
|
235
|
+
}
|
|
236
|
+
initForm() {
|
|
237
|
+
const formBuilder = new FormBuilder();
|
|
238
|
+
const formSettings = {
|
|
239
|
+
userid: [{ value: this.userid || '', disabled: false }, [Validators.required, Validators.maxLength(128)]],
|
|
240
|
+
email: [{ value: this.email || '', disabled: false }, [
|
|
241
|
+
Validators.pattern(REGEX_PATTERN.EMAIL),
|
|
242
|
+
Validators.required
|
|
243
|
+
]],
|
|
244
|
+
firstName: [{ value: this.firstName || '', disabled: false }],
|
|
245
|
+
lastName: [{ value: this.lastName || '', disabled: false }, Validators.required],
|
|
246
|
+
department: [{ value: this.department || '', disabled: false }],
|
|
247
|
+
middleName: [{ value: this.middleName || '', disabled: false }],
|
|
248
|
+
title: [{ value: this.title || '', disabled: false }],
|
|
249
|
+
telephoneNumber: [{ value: this.telephoneNumber || '', disabled: false }],
|
|
250
|
+
homeNumber: [{ value: this.homeNumber || '', disabled: false }],
|
|
251
|
+
mobileNumber: [{ value: this.mobileNumber || '', disabled: false }],
|
|
252
|
+
pagerNumber: [{ value: this.pagerNumber || '', disabled: false }],
|
|
253
|
+
displayName: [{ value: this.displayName || '', disabled: false }],
|
|
254
|
+
manager: [{ value: this.manager || '', disabled: false }],
|
|
255
|
+
associatedPc: [this.associatedPc || ''],
|
|
256
|
+
directoryUri: [this.directoryUri || ''],
|
|
257
|
+
userProfile: [this.userProfile],
|
|
258
|
+
enableMobileVoiceAccess: [this.enableMobileVoiceAccess],
|
|
259
|
+
userLocale: [this.userLocale || ''],
|
|
260
|
+
digestCredentials: [''],
|
|
261
|
+
confirmDigestCredentials: ['']
|
|
262
|
+
};
|
|
263
|
+
this.form = formBuilder.group(formSettings);
|
|
264
|
+
}
|
|
265
|
+
toggleEditMode() {
|
|
266
|
+
this.editMode = !this.editMode;
|
|
267
|
+
['userid', 'email', 'firstName', 'lastName'].forEach(token => {
|
|
268
|
+
var _a, _b;
|
|
269
|
+
if (this.editMode) {
|
|
270
|
+
(_a = this.form.get(token)) === null || _a === void 0 ? void 0 : _a.enable();
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
(_b = this.form.get(token)) === null || _b === void 0 ? void 0 : _b.disable();
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
getSavableData() {
|
|
278
|
+
const excludedFields = ['form', 'editMode', 'viewMode', 'token', 'hasModifiedCache', 'confirmDigestCredentials'];
|
|
279
|
+
return getSavableData(this, excludedFields);
|
|
280
|
+
}
|
|
281
|
+
equal(userToCompare) {
|
|
282
|
+
if (!userToCompare) {
|
|
283
|
+
return false;
|
|
284
|
+
}
|
|
285
|
+
return JSON.stringify(this.getSavableData()) === JSON.stringify(userToCompare.getSavableData());
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
class UtilsService {
|
|
290
|
+
static sortSortArrayByProperty(array, sortBy) {
|
|
291
|
+
if (!array) {
|
|
292
|
+
return null;
|
|
293
|
+
}
|
|
294
|
+
return array.sort((a, b) => {
|
|
295
|
+
if (!a[sortBy] && !b[sortBy]) {
|
|
296
|
+
return 0;
|
|
297
|
+
}
|
|
298
|
+
if (a[sortBy] && !b[sortBy]) {
|
|
299
|
+
return 1;
|
|
300
|
+
}
|
|
301
|
+
if (!a[sortBy] && b[sortBy]) {
|
|
302
|
+
return -1;
|
|
303
|
+
}
|
|
304
|
+
const positionA = a[sortBy];
|
|
305
|
+
const positionB = b[sortBy];
|
|
306
|
+
return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
static diff(origObject, updatedObj, path, keysToIgnore) {
|
|
310
|
+
let result = [];
|
|
311
|
+
if (Object.is(origObject, updatedObj)) {
|
|
312
|
+
return undefined;
|
|
313
|
+
}
|
|
314
|
+
if (!updatedObj || typeof updatedObj !== 'object') {
|
|
315
|
+
return updatedObj;
|
|
316
|
+
}
|
|
317
|
+
const concat = Array.from(new Set([...Object.keys(origObject || {}), ...Object.keys(updatedObj || {})]));
|
|
318
|
+
const filter = keysToIgnore ? concat.filter(key => !keysToIgnore.includes(key)) : concat;
|
|
319
|
+
filter
|
|
320
|
+
.forEach(key => {
|
|
321
|
+
if (typeof updatedObj[key] === 'object' && typeof origObject[key] === 'object') {
|
|
322
|
+
if (UtilsService.differs(updatedObj[key], origObject[key])) {
|
|
323
|
+
const newPath = `${path}${path ? '.' : ''}${key}`;
|
|
324
|
+
const values = UtilsService.diff(origObject[key], updatedObj[key], newPath, keysToIgnore);
|
|
325
|
+
if (values !== undefined) {
|
|
326
|
+
result = [...result, ...values];
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
else if (updatedObj && !origObject || updatedObj[key] !== origObject[key] && !Object.is(origObject[key], updatedObj[key])) {
|
|
331
|
+
const value = updatedObj ? UtilsService.formatIfEmpty(updatedObj[key]) : null;
|
|
332
|
+
result.push(`${path}${path ? '.' : ''}${key}=${value}`);
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
return result;
|
|
336
|
+
}
|
|
337
|
+
static formatIfEmpty(value) {
|
|
338
|
+
if (value) {
|
|
339
|
+
return value;
|
|
340
|
+
}
|
|
341
|
+
switch (typeof value) {
|
|
342
|
+
case 'boolean':
|
|
343
|
+
return value;
|
|
344
|
+
case 'string':
|
|
345
|
+
return '';
|
|
346
|
+
default:
|
|
347
|
+
return null;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
static differs(obj1, obj2) {
|
|
351
|
+
return JSON.stringify(obj1) !== JSON.stringify(obj2);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
UtilsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
355
|
+
UtilsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService });
|
|
356
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService, decorators: [{
|
|
357
|
+
type: Injectable
|
|
358
|
+
}] });
|
|
359
|
+
|
|
360
|
+
class UserService {
|
|
361
|
+
constructor(apiService) {
|
|
362
|
+
this.apiService = apiService;
|
|
363
|
+
this.siteId = -1;
|
|
364
|
+
this.userId = '';
|
|
365
|
+
this.userIdExistPending = false;
|
|
366
|
+
this.hasExistedUserId = false;
|
|
367
|
+
}
|
|
368
|
+
ngOnInit() {
|
|
369
|
+
console.log(this.siteId);
|
|
370
|
+
}
|
|
371
|
+
fetchUserToken(siteId, userId) {
|
|
372
|
+
if (this.siteId === siteId && this.userId === userId && this.user) {
|
|
373
|
+
return of(this.user);
|
|
374
|
+
}
|
|
375
|
+
this.siteId = siteId;
|
|
376
|
+
this.userId = userId;
|
|
377
|
+
return this.apiService.fetch(API.USER_TOKEN.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(userId))))
|
|
378
|
+
.pipe(map((result) => {
|
|
379
|
+
this.setSimplifiedUser(Object.values(result)[0]);
|
|
380
|
+
}));
|
|
381
|
+
// .pipe(this.handleError(false, true));
|
|
382
|
+
}
|
|
383
|
+
updateUserFields(body) {
|
|
384
|
+
var _a;
|
|
385
|
+
if (!this.userId || !this.siteId || !((_a = this.user) === null || _a === void 0 ? void 0 : _a.token)) {
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
return this.apiService.post(API.UPDATE_USER_FIELDS.replace(':siteId', String(this.siteId)).replace(':token', this.user.token), body);
|
|
389
|
+
// .pipe(this.handleError(false, true));
|
|
390
|
+
}
|
|
391
|
+
fetchUserById(id) {
|
|
392
|
+
this.userIdExistPending = true;
|
|
393
|
+
return this.apiService.fetch(API.USER_BY_ID.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(id))))
|
|
394
|
+
.pipe(map(result => {
|
|
395
|
+
this.userIdExistPending = false;
|
|
396
|
+
return result;
|
|
397
|
+
}));
|
|
398
|
+
}
|
|
399
|
+
persistCacheChanges() {
|
|
400
|
+
const params = {
|
|
401
|
+
excludeDeviceExtraOptions: true
|
|
402
|
+
};
|
|
403
|
+
return this.processUserChangesToCache()
|
|
404
|
+
.pipe(map((result) => {
|
|
405
|
+
return this.apiService.post(API.PERSIST_USER_CACHE.replace(':siteId', String(this.siteId)).replace(':token', this.user.token), {}, params)
|
|
406
|
+
.subscribe(() => {
|
|
407
|
+
});
|
|
408
|
+
// .pipe(map((user) => {
|
|
409
|
+
// // this.setUser(user, false, this.user.token);
|
|
410
|
+
// this.user.hasModifiedCache = false;
|
|
411
|
+
// }))
|
|
412
|
+
// .pipe(this.handleError(true, true));
|
|
413
|
+
}));
|
|
414
|
+
}
|
|
415
|
+
processUserChangesToCache() {
|
|
416
|
+
const calls = [];
|
|
417
|
+
const body = UtilsService.diff(this.originUser.getSavableData(), this.user.getSavableData(), 'user');
|
|
418
|
+
if (body) {
|
|
419
|
+
calls.push(this.updateUserFields(body));
|
|
420
|
+
}
|
|
421
|
+
if (!(calls === null || calls === void 0 ? void 0 : calls.length)) {
|
|
422
|
+
return of(this.user);
|
|
423
|
+
}
|
|
424
|
+
return forkJoin(calls)
|
|
425
|
+
.pipe(map((responses) => {
|
|
426
|
+
// ApiUserResponse
|
|
427
|
+
this.handleSaveUserResponse(responses);
|
|
428
|
+
}));
|
|
429
|
+
// .pipe(this.handleError(false, true));
|
|
430
|
+
}
|
|
431
|
+
hasUnsavedChanges() {
|
|
432
|
+
if (this.user && this.originUser) {
|
|
433
|
+
return !this.user.equal(this.originUser);
|
|
434
|
+
}
|
|
435
|
+
return false;
|
|
436
|
+
}
|
|
437
|
+
setSimplifiedUser(user) {
|
|
438
|
+
this.user = new SimplifiedUser(user);
|
|
439
|
+
const copiedUser = JSON.parse(JSON.stringify(user));
|
|
440
|
+
this.originUser = new SimplifiedUser(copiedUser);
|
|
441
|
+
}
|
|
442
|
+
handleSaveUserResponse(responses) {
|
|
443
|
+
if (!(responses === null || responses === void 0 ? void 0 : responses.length)) {
|
|
444
|
+
return;
|
|
445
|
+
}
|
|
446
|
+
for (let len = responses.length, i = len - 1; i >= 0; i--) {
|
|
447
|
+
if (responses[i] && responses[i].currentUpdatedUser) {
|
|
448
|
+
// this.setUser(responses[i].currentUpdatedUser, false, this.user.token);
|
|
449
|
+
this.user.hasModifiedCache = true;
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService, deps: [{ token: APIService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
456
|
+
UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService });
|
|
457
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService, decorators: [{
|
|
458
|
+
type: Injectable
|
|
459
|
+
}], ctorParameters: function () { return [{ type: APIService }]; } });
|
|
460
|
+
|
|
461
|
+
class AppLoaderComponent {
|
|
462
|
+
constructor() {
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
AppLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
466
|
+
AppLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AppLoaderComponent, selector: "app-loader", ngImport: i0, template: "<div class=\"overlay\">\n <mat-progress-spinner\n class=\"page-spinner\"\n mode=\"indeterminate\"\n [diameter]=\"120\"></mat-progress-spinner>\n</div>\n", styles: [".overlay{position:fixed;width:100%;height:100%;inset:0;background-color:#fff3;z-index:200}\n"], dependencies: [{ kind: "component", type: i1$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
467
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, decorators: [{
|
|
468
|
+
type: Component,
|
|
469
|
+
args: [{ selector: 'app-loader', encapsulation: ViewEncapsulation.None, template: "<div class=\"overlay\">\n <mat-progress-spinner\n class=\"page-spinner\"\n mode=\"indeterminate\"\n [diameter]=\"120\"></mat-progress-spinner>\n</div>\n", styles: [".overlay{position:fixed;width:100%;height:100%;inset:0;background-color:#fff3;z-index:200}\n"] }]
|
|
470
|
+
}], ctorParameters: function () { return []; } });
|
|
471
|
+
|
|
472
|
+
class AuthInterceptor {
|
|
473
|
+
constructor() {
|
|
474
|
+
}
|
|
475
|
+
intercept(request, next) {
|
|
476
|
+
request = request.clone({
|
|
477
|
+
setHeaders: {
|
|
478
|
+
// Authorization: basicAuthHeaderString
|
|
479
|
+
},
|
|
480
|
+
withCredentials: true
|
|
481
|
+
});
|
|
482
|
+
console.log('request :: ', request);
|
|
483
|
+
return next.handle(request).pipe(catchError(err => {
|
|
484
|
+
if (err instanceof HttpErrorResponse) {
|
|
485
|
+
if (err.status === 401) {
|
|
486
|
+
if (window.history.length < 3) {
|
|
487
|
+
err.error.message = '';
|
|
488
|
+
}
|
|
489
|
+
else {
|
|
490
|
+
err.error.message = 'SESSION_INACTIVE';
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
return throwError(err);
|
|
495
|
+
}));
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
AuthInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
499
|
+
AuthInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor });
|
|
500
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor, decorators: [{
|
|
501
|
+
type: Injectable
|
|
502
|
+
}], ctorParameters: function () { return []; } });
|
|
503
|
+
|
|
504
|
+
class UserInfoComponent {
|
|
505
|
+
}
|
|
506
|
+
UserInfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
507
|
+
UserInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserInfoComponent, selector: "app-user-info", inputs: { name: "name", active: "active", email: "email", position: "position" }, ngImport: i0, template: "<div class=\"info-holder\">\n <div class=\"content-box flex-box\">\n <div class=\"info-holder__user-image\">\n <img src=\"../../../assets/a24749b225874bb3e3a4cb5d2f42e82c.png\" alt=\"\" class=\"avatar\">\n </div>\n <div class=\"info-holder__user-information\">\n <div class=\"info-holder__user-name\">{{name}}</div>\n <div class=\"info-holder__user-breadcrumbs\">\n <div class=\"is-active\" *ngIf=\"false; else notActive\">\n <svg width=\"8\" height=\"9\" viewBox=\"0 0 8 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4 8.5C6.20914 8.5 8 6.70914 8 4.5C8 2.29086 6.20914 0.5 4 0.5C1.79086 0.5 0 2.29086 0 4.5C0 6.70914 1.79086 8.5 4 8.5Z\" fill=\"#1D805F\"/>\n </svg>\n <div>Active</div>\n </div>\n <div class=\"icon-separator\"></div>\n <div class=\"email\">{{email}}</div>\n <div class=\"icon-separator\"></div>\n <div class=\"position\">{{position}}</div>\n </div>\n </div>\n </div>\n\n</div>\n\n<ng-template #notActive>\n <div class=\"is-active\">\n <svg width=\"8\" height=\"9\" viewBox=\"0 0 8 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4 8.5C6.20914 8.5 8 6.70914 8 4.5C8 2.29086 6.20914 0.5 4 0.5C1.79086 0.5 0 2.29086 0 4.5C0 6.70914 1.79086 8.5 4 8.5Z\" fill=\"grey\"/>\n </svg>\n <div>Not active</div>\n </div>\n</ng-template>\n", styles: [".info-holder{display:flex;gap:16px;align-items:center;font-family:Inter,sans-serif;height:102px;width:100%;background:white;margin:0 0 30px}.info-holder__user-image img{width:40px;border-radius:120px;margin:20px 0 0}.info-holder__user-information{padding:10px;margin:10px;gap:10px;display:flex;flex-direction:column}.info-holder__user-name{font-size:20px;font-weight:500}.info-holder__user-breadcrumbs{display:flex;gap:8px;font-weight:400;font-size:14px;color:#000000b3;align-items:center}.info-holder .icon-separator{height:5px;width:5px;background-color:#000000b3;border-radius:50%}.info-holder .is-active{display:flex;gap:8px;align-items:center}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
508
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserInfoComponent, decorators: [{
|
|
509
|
+
type: Component,
|
|
510
|
+
args: [{ selector: 'app-user-info', template: "<div class=\"info-holder\">\n <div class=\"content-box flex-box\">\n <div class=\"info-holder__user-image\">\n <img src=\"../../../assets/a24749b225874bb3e3a4cb5d2f42e82c.png\" alt=\"\" class=\"avatar\">\n </div>\n <div class=\"info-holder__user-information\">\n <div class=\"info-holder__user-name\">{{name}}</div>\n <div class=\"info-holder__user-breadcrumbs\">\n <div class=\"is-active\" *ngIf=\"false; else notActive\">\n <svg width=\"8\" height=\"9\" viewBox=\"0 0 8 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4 8.5C6.20914 8.5 8 6.70914 8 4.5C8 2.29086 6.20914 0.5 4 0.5C1.79086 0.5 0 2.29086 0 4.5C0 6.70914 1.79086 8.5 4 8.5Z\" fill=\"#1D805F\"/>\n </svg>\n <div>Active</div>\n </div>\n <div class=\"icon-separator\"></div>\n <div class=\"email\">{{email}}</div>\n <div class=\"icon-separator\"></div>\n <div class=\"position\">{{position}}</div>\n </div>\n </div>\n </div>\n\n</div>\n\n<ng-template #notActive>\n <div class=\"is-active\">\n <svg width=\"8\" height=\"9\" viewBox=\"0 0 8 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4 8.5C6.20914 8.5 8 6.70914 8 4.5C8 2.29086 6.20914 0.5 4 0.5C1.79086 0.5 0 2.29086 0 4.5C0 6.70914 1.79086 8.5 4 8.5Z\" fill=\"grey\"/>\n </svg>\n <div>Not active</div>\n </div>\n</ng-template>\n", styles: [".info-holder{display:flex;gap:16px;align-items:center;font-family:Inter,sans-serif;height:102px;width:100%;background:white;margin:0 0 30px}.info-holder__user-image img{width:40px;border-radius:120px;margin:20px 0 0}.info-holder__user-information{padding:10px;margin:10px;gap:10px;display:flex;flex-direction:column}.info-holder__user-name{font-size:20px;font-weight:500}.info-holder__user-breadcrumbs{display:flex;gap:8px;font-weight:400;font-size:14px;color:#000000b3;align-items:center}.info-holder .icon-separator{height:5px;width:5px;background-color:#000000b3;border-radius:50%}.info-holder .is-active{display:flex;gap:8px;align-items:center}\n"] }]
|
|
511
|
+
}], propDecorators: { name: [{
|
|
512
|
+
type: Input
|
|
513
|
+
}], active: [{
|
|
514
|
+
type: Input
|
|
515
|
+
}], email: [{
|
|
516
|
+
type: Input
|
|
517
|
+
}], position: [{
|
|
518
|
+
type: Input
|
|
519
|
+
}] } });
|
|
520
|
+
|
|
521
|
+
class MaterialModule {
|
|
522
|
+
}
|
|
523
|
+
MaterialModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
524
|
+
MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [DragDropModule,
|
|
525
|
+
MatButtonModule,
|
|
526
|
+
MatListModule,
|
|
527
|
+
MatProgressSpinnerModule,
|
|
528
|
+
MatExpansionModule,
|
|
529
|
+
MatInputModule,
|
|
530
|
+
MatInputModule,
|
|
531
|
+
MatListModule,
|
|
532
|
+
MatTreeModule,
|
|
533
|
+
MatTreeModule,
|
|
534
|
+
MatNativeDateModule,
|
|
535
|
+
MatDatepickerModule,
|
|
536
|
+
MatTooltipModule,
|
|
537
|
+
MatAutocompleteModule,
|
|
538
|
+
MatChipsModule,
|
|
539
|
+
MatSidenavModule,
|
|
540
|
+
MatFormFieldModule,
|
|
541
|
+
MatStepperModule,
|
|
542
|
+
MatTabsModule,
|
|
543
|
+
MatCardModule,
|
|
544
|
+
MatSelectModule,
|
|
545
|
+
MatCheckboxModule,
|
|
546
|
+
MatSlideToggleModule,
|
|
547
|
+
MatTableModule,
|
|
548
|
+
MatPaginatorModule], exports: [DragDropModule,
|
|
549
|
+
MatButtonModule,
|
|
550
|
+
MatListModule,
|
|
551
|
+
MatProgressSpinnerModule,
|
|
552
|
+
MatExpansionModule,
|
|
553
|
+
MatInputModule,
|
|
554
|
+
MatInputModule,
|
|
555
|
+
MatListModule,
|
|
556
|
+
MatTreeModule,
|
|
557
|
+
MatTreeModule,
|
|
558
|
+
MatNativeDateModule,
|
|
559
|
+
MatDatepickerModule,
|
|
560
|
+
MatTooltipModule,
|
|
561
|
+
MatAutocompleteModule,
|
|
562
|
+
MatChipsModule,
|
|
563
|
+
MatSidenavModule,
|
|
564
|
+
MatFormFieldModule,
|
|
565
|
+
MatStepperModule,
|
|
566
|
+
MatTabsModule,
|
|
567
|
+
MatCardModule,
|
|
568
|
+
MatCheckboxModule,
|
|
569
|
+
MatSelectModule,
|
|
570
|
+
MatSlideToggleModule,
|
|
571
|
+
MatProgressSpinnerModule,
|
|
572
|
+
MatTableModule,
|
|
573
|
+
MatPaginatorModule] });
|
|
574
|
+
MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [DragDropModule,
|
|
575
|
+
MatButtonModule,
|
|
576
|
+
MatListModule,
|
|
577
|
+
MatProgressSpinnerModule,
|
|
578
|
+
MatExpansionModule,
|
|
579
|
+
MatInputModule,
|
|
580
|
+
MatInputModule,
|
|
581
|
+
MatListModule,
|
|
582
|
+
MatTreeModule,
|
|
583
|
+
MatTreeModule,
|
|
584
|
+
MatNativeDateModule,
|
|
585
|
+
MatDatepickerModule,
|
|
586
|
+
MatTooltipModule,
|
|
587
|
+
MatAutocompleteModule,
|
|
588
|
+
MatChipsModule,
|
|
589
|
+
MatSidenavModule,
|
|
590
|
+
MatFormFieldModule,
|
|
591
|
+
MatStepperModule,
|
|
592
|
+
MatTabsModule,
|
|
593
|
+
MatCardModule,
|
|
594
|
+
MatSelectModule,
|
|
595
|
+
MatCheckboxModule,
|
|
596
|
+
MatSlideToggleModule,
|
|
597
|
+
MatTableModule,
|
|
598
|
+
MatPaginatorModule, DragDropModule,
|
|
599
|
+
MatButtonModule,
|
|
600
|
+
MatListModule,
|
|
601
|
+
MatProgressSpinnerModule,
|
|
602
|
+
MatExpansionModule,
|
|
603
|
+
MatInputModule,
|
|
604
|
+
MatInputModule,
|
|
605
|
+
MatListModule,
|
|
606
|
+
MatTreeModule,
|
|
607
|
+
MatTreeModule,
|
|
608
|
+
MatNativeDateModule,
|
|
609
|
+
MatDatepickerModule,
|
|
610
|
+
MatTooltipModule,
|
|
611
|
+
MatAutocompleteModule,
|
|
612
|
+
MatChipsModule,
|
|
613
|
+
MatSidenavModule,
|
|
614
|
+
MatFormFieldModule,
|
|
615
|
+
MatStepperModule,
|
|
616
|
+
MatTabsModule,
|
|
617
|
+
MatCardModule,
|
|
618
|
+
MatCheckboxModule,
|
|
619
|
+
MatSelectModule,
|
|
620
|
+
MatSlideToggleModule,
|
|
621
|
+
MatProgressSpinnerModule,
|
|
622
|
+
MatTableModule,
|
|
623
|
+
MatPaginatorModule] });
|
|
624
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, decorators: [{
|
|
625
|
+
type: NgModule,
|
|
626
|
+
args: [{
|
|
627
|
+
imports: [
|
|
628
|
+
DragDropModule,
|
|
629
|
+
MatButtonModule,
|
|
630
|
+
MatListModule,
|
|
631
|
+
MatProgressSpinnerModule,
|
|
632
|
+
MatExpansionModule,
|
|
633
|
+
MatInputModule,
|
|
634
|
+
MatInputModule,
|
|
635
|
+
MatListModule,
|
|
636
|
+
MatTreeModule,
|
|
637
|
+
MatTreeModule,
|
|
638
|
+
MatNativeDateModule,
|
|
639
|
+
MatDatepickerModule,
|
|
640
|
+
MatTooltipModule,
|
|
641
|
+
MatAutocompleteModule,
|
|
642
|
+
MatChipsModule,
|
|
643
|
+
MatSidenavModule,
|
|
644
|
+
MatFormFieldModule,
|
|
645
|
+
MatStepperModule,
|
|
646
|
+
MatTabsModule,
|
|
647
|
+
MatCardModule,
|
|
648
|
+
MatSelectModule,
|
|
649
|
+
MatCheckboxModule,
|
|
650
|
+
MatSlideToggleModule,
|
|
651
|
+
MatTableModule,
|
|
652
|
+
MatPaginatorModule
|
|
653
|
+
],
|
|
654
|
+
exports: [
|
|
655
|
+
DragDropModule,
|
|
656
|
+
MatButtonModule,
|
|
657
|
+
MatListModule,
|
|
658
|
+
MatProgressSpinnerModule,
|
|
659
|
+
MatExpansionModule,
|
|
660
|
+
MatInputModule,
|
|
661
|
+
MatInputModule,
|
|
662
|
+
MatListModule,
|
|
663
|
+
MatTreeModule,
|
|
664
|
+
MatTreeModule,
|
|
665
|
+
MatNativeDateModule,
|
|
666
|
+
MatDatepickerModule,
|
|
667
|
+
MatTooltipModule,
|
|
668
|
+
MatAutocompleteModule,
|
|
669
|
+
MatChipsModule,
|
|
670
|
+
MatSidenavModule,
|
|
671
|
+
MatFormFieldModule,
|
|
672
|
+
MatStepperModule,
|
|
673
|
+
MatTabsModule,
|
|
674
|
+
MatCardModule,
|
|
675
|
+
MatCheckboxModule,
|
|
676
|
+
MatSelectModule,
|
|
677
|
+
MatSlideToggleModule,
|
|
678
|
+
MatProgressSpinnerModule,
|
|
679
|
+
MatTableModule,
|
|
680
|
+
MatPaginatorModule
|
|
681
|
+
],
|
|
682
|
+
}]
|
|
683
|
+
}] });
|
|
684
|
+
|
|
685
|
+
const environment = {
|
|
686
|
+
production: false,
|
|
687
|
+
// apiUrl: 'http://localhost:4200',
|
|
688
|
+
apiUrl: 'http://192.168.0.191:8080',
|
|
689
|
+
notificationsLifetime: 30000,
|
|
690
|
+
longNotificationsLifetime: 45000,
|
|
691
|
+
cashCleanTimer: 900000,
|
|
692
|
+
cashArrayLength: 10000,
|
|
693
|
+
matomoUrl: 'http://192.168.0.136/matomo/',
|
|
694
|
+
};
|
|
695
|
+
|
|
696
|
+
const TTL_DEFAULT = environment.notificationsLifetime;
|
|
697
|
+
const TTL_LONG_DEFAULT = environment.longNotificationsLifetime;
|
|
698
|
+
var NotificationType;
|
|
699
|
+
(function (NotificationType) {
|
|
700
|
+
NotificationType["info"] = "info";
|
|
701
|
+
NotificationType["error"] = "error";
|
|
702
|
+
NotificationType["success"] = "success";
|
|
703
|
+
NotificationType["warning"] = "warning";
|
|
704
|
+
})(NotificationType || (NotificationType = {}));
|
|
705
|
+
class Notification {
|
|
706
|
+
constructor(data) {
|
|
707
|
+
this.ttl = TTL_DEFAULT;
|
|
708
|
+
Object.assign(this, data || {});
|
|
709
|
+
if (this.ttl === undefined) {
|
|
710
|
+
this.ttl = this.message && this.message.length && this.message.length < 80 ? TTL_DEFAULT : TTL_LONG_DEFAULT;
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
isInfo() {
|
|
714
|
+
return this.type === NotificationType.info;
|
|
715
|
+
}
|
|
716
|
+
isError() {
|
|
717
|
+
return this.type === NotificationType.error;
|
|
718
|
+
}
|
|
719
|
+
isSuccess() {
|
|
720
|
+
return this.type === NotificationType.success;
|
|
721
|
+
}
|
|
722
|
+
isWarning() {
|
|
723
|
+
return this.type === NotificationType.warning;
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
const SUCCESS_TIME = 5000;
|
|
728
|
+
const INACTIVE_SESSION_MESSAGE = 'Your session was lost due to inactivity. Please login again';
|
|
729
|
+
const INACTIVE_SESSION = 'SESSION_INACTIVE';
|
|
730
|
+
class NotificationService {
|
|
731
|
+
constructor() {
|
|
732
|
+
this.listChange = new Subject();
|
|
733
|
+
this.max = 0;
|
|
734
|
+
this.list = [];
|
|
735
|
+
}
|
|
736
|
+
error(message, ttl) {
|
|
737
|
+
this.notify('error', message, ttl);
|
|
738
|
+
}
|
|
739
|
+
success(message, ttl) {
|
|
740
|
+
this.notify('success', message, (!ttl) ? SUCCESS_TIME : ttl);
|
|
741
|
+
}
|
|
742
|
+
warning(message, ttl) {
|
|
743
|
+
this.notify('warning', message, ttl);
|
|
744
|
+
}
|
|
745
|
+
info(message, ttl) {
|
|
746
|
+
this.notify('info', message, ttl);
|
|
747
|
+
}
|
|
748
|
+
notify(type, message, ttl) {
|
|
749
|
+
const found = this.list.find((n) => n.message === message);
|
|
750
|
+
if (found) {
|
|
751
|
+
this.remove(found);
|
|
752
|
+
}
|
|
753
|
+
const notification = new Notification({
|
|
754
|
+
id: ++this.max,
|
|
755
|
+
type, message, ttl
|
|
756
|
+
});
|
|
757
|
+
if (notification.ttl > 0) {
|
|
758
|
+
notification.timerId = setTimeout(() => this.remove(notification, true), notification.ttl);
|
|
759
|
+
}
|
|
760
|
+
this.list.push(notification);
|
|
761
|
+
this.listChange.next(this.list);
|
|
762
|
+
}
|
|
763
|
+
remove(notification, auto) {
|
|
764
|
+
if (!auto && notification.timerId) {
|
|
765
|
+
// clear timeout in case of manual remove
|
|
766
|
+
clearInterval(notification.timerId);
|
|
767
|
+
}
|
|
768
|
+
this.list = this.list.filter(n => n.id !== notification.id);
|
|
769
|
+
this.listChange.next(this.list);
|
|
770
|
+
}
|
|
771
|
+
removeInactiveSessionError() {
|
|
772
|
+
if (!this.list || !this.list.length) {
|
|
773
|
+
return;
|
|
774
|
+
}
|
|
775
|
+
this.list = this.list.filter(n => n.message !== INACTIVE_SESSION_MESSAGE && n.message !== INACTIVE_SESSION);
|
|
776
|
+
this.listChange.next(this.list);
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
NotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
780
|
+
NotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService });
|
|
781
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, decorators: [{
|
|
782
|
+
type: Injectable
|
|
783
|
+
}], ctorParameters: function () { return []; } });
|
|
784
|
+
|
|
785
|
+
class NotificationsComponent {
|
|
786
|
+
constructor(notificationService, ref) {
|
|
787
|
+
this.notificationService = notificationService;
|
|
788
|
+
this.ref = ref;
|
|
789
|
+
}
|
|
790
|
+
ngOnInit() {
|
|
791
|
+
this.listChangeSubscribe();
|
|
792
|
+
}
|
|
793
|
+
ngOnDestroy() {
|
|
794
|
+
this.listSubscription.unsubscribe();
|
|
795
|
+
}
|
|
796
|
+
readMore() {
|
|
797
|
+
this.isReadMore = !this.isReadMore;
|
|
798
|
+
}
|
|
799
|
+
removeNotification(notification) {
|
|
800
|
+
this.notificationService.remove(notification);
|
|
801
|
+
}
|
|
802
|
+
listChangeSubscribe() {
|
|
803
|
+
this.listSubscription = this.notificationService.listChange
|
|
804
|
+
.subscribe((list) => {
|
|
805
|
+
this.list = list;
|
|
806
|
+
this.ref.detectChanges();
|
|
807
|
+
});
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
NotificationsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationsComponent, deps: [{ token: NotificationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
811
|
+
NotificationsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: NotificationsComponent, selector: "app-notification", ngImport: i0, template: "<!--\n\n<div class=\"notification-block\" role=\"alert\" aria-live=\"assertive\">\n <div class=\"notification\"\n *ngFor=\"let notification of list\"\n [ngClass]=\"{'error': notification.isError(), 'success': notification.isSuccess()}\">\n\n <div class=\"flex-box\">\n <div class=\"notification-icons-block\">\n <i *ngIf=\"notification.isError()\" class=\"fa fa-exclamation-triangle\"></i>\n <i *ngIf=\"notification.isWarning()\" class=\"fa fa-hand-paper-o\"></i>\n <i *ngIf=\"notification.isSuccess()\" class=\"fa fa-check\"></i>\n <i *ngIf=\"notification.isInfo()\" class=\"fa fa-info-circle\"></i>\n </div>\n <div *ngIf=\"!isReadMore\" class=\"message-block\">\n {{notification.message | truncate:[93]}}\n </div>\n <div *ngIf=\"isReadMore\" class=\"message-block\">\n {{notification.message}}\n </div>\n </div>\n <div class=\"read-more-error link clickable\" *ngIf=\"notification.message && notification.message.length > 93\"\n (click)=\"readMore()\">{{(isReadMore ? 'BUTTON.COLLAPSE' : 'BUTTON.READ_MORE') | translate}}</div>\n <button\n class=\"close\"\n mat-icon-button\n matTooltip=\"{{'BUTTON.CLOSE' | translate}} {{'NOTIFICATION_MSG.' + notification.type | translate}} {{'NOTIFICATION_MSG.NOTI' | translate}}\"\n (click)=\"removeNotification(notification)\">\n <img class=\"notification-icon-close\" src=\"assets/icons/close_icon_modal.svg\" alt=\"\">\n </button>\n </div>\n</div>\n-->\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.notification-block{right:0;top:110px;position:absolute;width:20%;z-index:100}.notification-block .read-more-error{margin:10px 13px 3px 0;text-align:right}.notification-block .notification{padding:15px 0 10px;margin-bottom:18px;color:#333;border-radius:3px;border-top:1.5px solid #e5e1cd;background:#fcf8e3;box-shadow:0 8px 12px #091e4226,0 0 1px #091e424f;width:368px;position:relative}.notification-block .notification .notification-icons-block{text-align:center;width:56px}.notification-block .notification .message-block{font-size:14px;font-family:Poppins,Poppins,sans-serif!important;word-break:break-word;width:270px}.notification-block .notification .notification-icon-close{height:24px}.notification-block .notification.error{background:#FFE9E9;border-top:1.5px solid #E16D6D}.notification-block .notification.success{background:#e3f4dc;border-top:1.5px solid #b3d692}.notification-block .notification .fa-exclamation-triangle{color:#e16d6d!important}.notification-block .notification .fa-check{color:#a0c37f!important}.notification-block .notification .fa-info-circle,.notification-block .notification .fa-hand-paper-o{color:#bdb89e!important}.notification-block .notification .fa{font-size:20px}.notification-block .notification .close{position:absolute;top:2px;right:-5px}.notification-block .notification .close .fa{font-size:14px}.notification-block .notification .fa{margin:0;color:inherit}@media screen and (max-width: 600px){.notification-block{width:50%;min-width:150px}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
812
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationsComponent, decorators: [{
|
|
813
|
+
type: Component,
|
|
814
|
+
args: [{ selector: 'app-notification', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n\n<div class=\"notification-block\" role=\"alert\" aria-live=\"assertive\">\n <div class=\"notification\"\n *ngFor=\"let notification of list\"\n [ngClass]=\"{'error': notification.isError(), 'success': notification.isSuccess()}\">\n\n <div class=\"flex-box\">\n <div class=\"notification-icons-block\">\n <i *ngIf=\"notification.isError()\" class=\"fa fa-exclamation-triangle\"></i>\n <i *ngIf=\"notification.isWarning()\" class=\"fa fa-hand-paper-o\"></i>\n <i *ngIf=\"notification.isSuccess()\" class=\"fa fa-check\"></i>\n <i *ngIf=\"notification.isInfo()\" class=\"fa fa-info-circle\"></i>\n </div>\n <div *ngIf=\"!isReadMore\" class=\"message-block\">\n {{notification.message | truncate:[93]}}\n </div>\n <div *ngIf=\"isReadMore\" class=\"message-block\">\n {{notification.message}}\n </div>\n </div>\n <div class=\"read-more-error link clickable\" *ngIf=\"notification.message && notification.message.length > 93\"\n (click)=\"readMore()\">{{(isReadMore ? 'BUTTON.COLLAPSE' : 'BUTTON.READ_MORE') | translate}}</div>\n <button\n class=\"close\"\n mat-icon-button\n matTooltip=\"{{'BUTTON.CLOSE' | translate}} {{'NOTIFICATION_MSG.' + notification.type | translate}} {{'NOTIFICATION_MSG.NOTI' | translate}}\"\n (click)=\"removeNotification(notification)\">\n <img class=\"notification-icon-close\" src=\"assets/icons/close_icon_modal.svg\" alt=\"\">\n </button>\n </div>\n</div>\n-->\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.notification-block{right:0;top:110px;position:absolute;width:20%;z-index:100}.notification-block .read-more-error{margin:10px 13px 3px 0;text-align:right}.notification-block .notification{padding:15px 0 10px;margin-bottom:18px;color:#333;border-radius:3px;border-top:1.5px solid #e5e1cd;background:#fcf8e3;box-shadow:0 8px 12px #091e4226,0 0 1px #091e424f;width:368px;position:relative}.notification-block .notification .notification-icons-block{text-align:center;width:56px}.notification-block .notification .message-block{font-size:14px;font-family:Poppins,Poppins,sans-serif!important;word-break:break-word;width:270px}.notification-block .notification .notification-icon-close{height:24px}.notification-block .notification.error{background:#FFE9E9;border-top:1.5px solid #E16D6D}.notification-block .notification.success{background:#e3f4dc;border-top:1.5px solid #b3d692}.notification-block .notification .fa-exclamation-triangle{color:#e16d6d!important}.notification-block .notification .fa-check{color:#a0c37f!important}.notification-block .notification .fa-info-circle,.notification-block .notification .fa-hand-paper-o{color:#bdb89e!important}.notification-block .notification .fa{font-size:20px}.notification-block .notification .close{position:absolute;top:2px;right:-5px}.notification-block .notification .close .fa{font-size:14px}.notification-block .notification .fa{margin:0;color:inherit}@media screen and (max-width: 600px){.notification-block{width:50%;min-width:150px}}\n"] }]
|
|
815
|
+
}], ctorParameters: function () { return [{ type: NotificationService }, { type: i0.ChangeDetectorRef }]; } });
|
|
816
|
+
|
|
817
|
+
class ListUser {
|
|
818
|
+
constructor(user) {
|
|
819
|
+
this.devices = [];
|
|
820
|
+
this.deviceProfiles = [];
|
|
821
|
+
if (user) {
|
|
822
|
+
Object.assign(this, user);
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
let RemoveKynFromIBMService$1 = class RemoveKynFromIBMService {
|
|
828
|
+
constructor() {
|
|
829
|
+
}
|
|
830
|
+
removeCUCMS(date, customerId) {
|
|
831
|
+
if (customerId === 8) {
|
|
832
|
+
return date.filter((val) => !CUCMS_TO_IGNORE.includes(Math.round(val.cucmId)));
|
|
833
|
+
}
|
|
834
|
+
return date;
|
|
835
|
+
}
|
|
836
|
+
removeCUCS(date, customerId) {
|
|
837
|
+
if (customerId === 8) {
|
|
838
|
+
return date.filter((val) => !CUCS_TO_IGNORE.includes(Math.round(val.cucId)));
|
|
839
|
+
}
|
|
840
|
+
return date;
|
|
841
|
+
}
|
|
842
|
+
};
|
|
843
|
+
RemoveKynFromIBMService$1.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService$1, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
844
|
+
RemoveKynFromIBMService$1.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService$1 });
|
|
845
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService$1, decorators: [{
|
|
846
|
+
type: Injectable
|
|
847
|
+
}], ctorParameters: function () { return []; } });
|
|
848
|
+
|
|
849
|
+
class UsersSearchService {
|
|
850
|
+
constructor(apiService, removeKynFromIBMService) {
|
|
851
|
+
this.apiService = apiService;
|
|
852
|
+
this.removeKynFromIBMService = removeKynFromIBMService;
|
|
853
|
+
this.siteId = -1;
|
|
854
|
+
this.userId = '';
|
|
855
|
+
this.userIdExistPending = false;
|
|
856
|
+
this.hasExistedUserId = false;
|
|
857
|
+
this.pageSize = PAGINATION_DEFAULTS.SIZE;
|
|
858
|
+
this.pageIndex = PAGINATION_DEFAULTS.SIZE;
|
|
859
|
+
this.pageSizeOptions = PAGINATION_SIZE_OPTIONS;
|
|
860
|
+
this.foundUsers$ = new BehaviorSubject(null);
|
|
861
|
+
}
|
|
862
|
+
getPagination() {
|
|
863
|
+
return {
|
|
864
|
+
total: this.total,
|
|
865
|
+
pageSizeOptions: this.pageSizeOptions,
|
|
866
|
+
pageSize: this.pageSize,
|
|
867
|
+
pageIndex: this.pageIndex
|
|
868
|
+
};
|
|
869
|
+
}
|
|
870
|
+
quickRegularUsersSearch() {
|
|
871
|
+
this.searchParams = this.searchParams || { customerid: this.customerId };
|
|
872
|
+
return this.apiService.fetchPagination(API.QUICK_USERS_SEARCH, this.pageSize, this.pageIndex, this.searchParams)
|
|
873
|
+
.pipe(map((res) => {
|
|
874
|
+
this.total = res.total;
|
|
875
|
+
// this.totals = this.totals || {};
|
|
876
|
+
// this.totals['users'] = res.total;
|
|
877
|
+
const users = res.pageData && res.pageData.length ? res.pageData.map(user => new ListUser(user)) : [];
|
|
878
|
+
// this.foundUsers$.next(this.removeKynFromIBMService.removeCUCMS(users, this.customerId));
|
|
879
|
+
this.foundUsers$.next(users);
|
|
880
|
+
}));
|
|
881
|
+
// .pipe(this.handleError(true));
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
UsersSearchService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersSearchService, deps: [{ token: APIService }, { token: RemoveKynFromIBMService$1 }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
885
|
+
UsersSearchService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersSearchService });
|
|
886
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersSearchService, decorators: [{
|
|
887
|
+
type: Injectable
|
|
888
|
+
}], ctorParameters: function () { return [{ type: APIService }, { type: RemoveKynFromIBMService$1 }]; } });
|
|
889
|
+
|
|
890
|
+
class PaginationComponent {
|
|
891
|
+
constructor() {
|
|
892
|
+
this.pageEmitter = new EventEmitter();
|
|
893
|
+
this.pageNumberChangeEmitter = new EventEmitter();
|
|
894
|
+
this.pageSizeOptions = PAGINATION_SIZE_OPTIONS;
|
|
895
|
+
}
|
|
896
|
+
ngOnInit() {
|
|
897
|
+
}
|
|
898
|
+
pageEvent(event) {
|
|
899
|
+
this.pageEmitter.emit(event);
|
|
900
|
+
}
|
|
901
|
+
changePerPageNumber(event) {
|
|
902
|
+
this.pageNumberChangeEmitter.emit(event.value);
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
PaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
906
|
+
PaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PaginationComponent, selector: "app-pagination", inputs: { pagination: "pagination", showPageSizeOptions: "showPageSizeOptions", showRefreshButton: "showRefreshButton", lengthPending: "lengthPending" }, outputs: { pageEmitter: "pageEmitter", pageNumberChangeEmitter: "pageNumberChangeEmitter" }, ngImport: i0, template: "<div class=\"flex-box pagination\">\n <div class=\"page-indexes-box\">\n <mat-paginator\n [id]=\"'commonPagination'\"\n [hidePageSize]=\"true\"\n [length]=\"pagination.total\"\n [pageIndex]=\"pagination.pageIndex\"\n [pageSize]=\"pagination.pageSize\"\n [pageSizeOptions]=\"pagination.pageSizeOptions\"\n (page)=\"pageEvent($event)\">\n </mat-paginator>\n <mat-spinner class=\"length-spinner\" [diameter]=\"20\" mode=\"indeterminate\" *ngIf=\"lengthPending\">\n </mat-spinner>\n </div>\n\n <div class=\"flex-box per-page-block\" *ngIf=\"showPageSizeOptions\">\n <div class=\"item_per_page\">Items per page:</div>\n <div class=\"select-box select-page-size\">\n <mat-select [(ngModel)]=\"pagination.pageSize\" (selectionChange)=\"changePerPageNumber($event)\" #page\n [id]=\"'commonPaginationSelect'\">\n <mat-option *ngFor=\"let option of pageSizeOptions; let i = index;\" [id]=\"'paginationSelectOpt_' + i\" [value]=\"option\">{{option}}</mat-option>\n </mat-select>\n </div>\n\n </div>\n</div>\n", styles: [".search-header-refresh-icon{align-items:center;line-height:54px;margin-left:10px}button[mat-icon-button] i{font-size:18px}mat-spinner.length-spinner{position:absolute;right:120px}h3,.search-header-refresh-icon{float:left}.page-options,.mat-paginator{float:right}.per-page-block mat-form-field{width:70px!important}.per-page-block span{margin-right:20px}.pagination{display:flex;justify-content:flex-end}.select-page-size{width:60px;margin:0 0 0 15px;padding:0 10px}.item_per_page{line-height:35px}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i4$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i5.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }] });
|
|
907
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PaginationComponent, decorators: [{
|
|
908
|
+
type: Component,
|
|
909
|
+
args: [{ selector: 'app-pagination', template: "<div class=\"flex-box pagination\">\n <div class=\"page-indexes-box\">\n <mat-paginator\n [id]=\"'commonPagination'\"\n [hidePageSize]=\"true\"\n [length]=\"pagination.total\"\n [pageIndex]=\"pagination.pageIndex\"\n [pageSize]=\"pagination.pageSize\"\n [pageSizeOptions]=\"pagination.pageSizeOptions\"\n (page)=\"pageEvent($event)\">\n </mat-paginator>\n <mat-spinner class=\"length-spinner\" [diameter]=\"20\" mode=\"indeterminate\" *ngIf=\"lengthPending\">\n </mat-spinner>\n </div>\n\n <div class=\"flex-box per-page-block\" *ngIf=\"showPageSizeOptions\">\n <div class=\"item_per_page\">Items per page:</div>\n <div class=\"select-box select-page-size\">\n <mat-select [(ngModel)]=\"pagination.pageSize\" (selectionChange)=\"changePerPageNumber($event)\" #page\n [id]=\"'commonPaginationSelect'\">\n <mat-option *ngFor=\"let option of pageSizeOptions; let i = index;\" [id]=\"'paginationSelectOpt_' + i\" [value]=\"option\">{{option}}</mat-option>\n </mat-select>\n </div>\n\n </div>\n</div>\n", styles: [".search-header-refresh-icon{align-items:center;line-height:54px;margin-left:10px}button[mat-icon-button] i{font-size:18px}mat-spinner.length-spinner{position:absolute;right:120px}h3,.search-header-refresh-icon{float:left}.page-options,.mat-paginator{float:right}.per-page-block mat-form-field{width:70px!important}.per-page-block span{margin-right:20px}.pagination{display:flex;justify-content:flex-end}.select-page-size{width:60px;margin:0 0 0 15px;padding:0 10px}.item_per_page{line-height:35px}\n"] }]
|
|
910
|
+
}], ctorParameters: function () { return []; }, propDecorators: { pagination: [{
|
|
911
|
+
type: Input
|
|
912
|
+
}], showPageSizeOptions: [{
|
|
913
|
+
type: Input
|
|
914
|
+
}], showRefreshButton: [{
|
|
915
|
+
type: Input
|
|
916
|
+
}], lengthPending: [{
|
|
917
|
+
type: Input
|
|
918
|
+
}], pageEmitter: [{
|
|
919
|
+
type: Output
|
|
920
|
+
}], pageNumberChangeEmitter: [{
|
|
921
|
+
type: Output
|
|
922
|
+
}] } });
|
|
923
|
+
|
|
924
|
+
class RemoveKynFromIBMService {
|
|
925
|
+
constructor() {
|
|
926
|
+
}
|
|
927
|
+
removeCUCMS(date, customerId) {
|
|
928
|
+
if (customerId === 8) {
|
|
929
|
+
return date.filter((val) => !CUCMS_TO_IGNORE.includes(Math.round(val.cucmId)));
|
|
930
|
+
}
|
|
931
|
+
return date;
|
|
932
|
+
}
|
|
933
|
+
removeCUCS(date, customerId) {
|
|
934
|
+
if (customerId === 8) {
|
|
935
|
+
return date.filter((val) => !CUCS_TO_IGNORE.includes(Math.round(val.cucId)));
|
|
936
|
+
}
|
|
937
|
+
return date;
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
RemoveKynFromIBMService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
941
|
+
RemoveKynFromIBMService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService });
|
|
942
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService, decorators: [{
|
|
943
|
+
type: Injectable
|
|
944
|
+
}], ctorParameters: function () { return []; } });
|
|
945
|
+
|
|
946
|
+
class LazyLoadingSelectComponent {
|
|
947
|
+
get formControl() {
|
|
948
|
+
var _a;
|
|
949
|
+
return (_a = this.form) === null || _a === void 0 ? void 0 : _a.get(this.controlName);
|
|
950
|
+
}
|
|
951
|
+
constructor(notificationService, siteSettingsService) {
|
|
952
|
+
this.notificationService = notificationService;
|
|
953
|
+
this.siteSettingsService = siteSettingsService;
|
|
954
|
+
this.standalone = true;
|
|
955
|
+
this.appearance = 'standard';
|
|
956
|
+
this.changeField = new EventEmitter();
|
|
957
|
+
}
|
|
958
|
+
ngAfterContentInit() {
|
|
959
|
+
var _a, _b;
|
|
960
|
+
this.options = [(_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.get(this.controlName)) === null || _b === void 0 ? void 0 : _b.value];
|
|
961
|
+
}
|
|
962
|
+
getOptions() {
|
|
963
|
+
if (!this.siteId && this.options.length > 1) {
|
|
964
|
+
return;
|
|
965
|
+
}
|
|
966
|
+
this.optionsPending = true;
|
|
967
|
+
this.siteSettingsService.getSelectionOptions(this.siteId, this.optionsToken)
|
|
968
|
+
.subscribe(() => {
|
|
969
|
+
this.optionsPending = false;
|
|
970
|
+
// @ts-ignore
|
|
971
|
+
this.options = this.siteSettingsService[this.optionsToken];
|
|
972
|
+
}, () => {
|
|
973
|
+
this.optionsPending = false;
|
|
974
|
+
// this.notificationService.error(this.translate.instant('COMMON.LOAD_SELECT_OPTIONS_FAILED'));
|
|
975
|
+
});
|
|
976
|
+
}
|
|
977
|
+
onFieldChange(token) {
|
|
978
|
+
this.changeField.emit(token);
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
LazyLoadingSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LazyLoadingSelectComponent, deps: [{ token: NotificationService }, { token: SiteSettingsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
982
|
+
LazyLoadingSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: LazyLoadingSelectComponent, selector: "app-lazy-loading-select", inputs: { siteId: "siteId", form: "form", standalone: "standalone", placeholder: "placeholder", controlName: "controlName", optionsToken: "optionsToken", appearance: "appearance", errorCode: "errorCode", errorText: "errorText", default: "default", id: "id" }, outputs: { changeField: "changeField" }, ngImport: i0, template: "<ng-container *ngIf=\"standalone\">\n <mat-form-field appearance=\"outline\">\n <mat-select [formControl]=\"formControl\"\n (openedChange)=\"getOptions()\"\n [placeholder]=\"placeholder\"\n (selectionChange)=\"onFieldChange(controlName)\"\n [id]=\"id\">\n <mat-option *ngIf=\"default\" [disabled]=\"default.disabled\" [value]=\"default.key\">{{default.value}}</mat-option>\n <mat-option *ngFor=\"let type of options\" [value]=\"type\">\n {{type}}\n </mat-option>\n <mat-progress-spinner class=\"field-spinner\"\n [diameter]=\"20\"\n mode=\"indeterminate\"\n *ngIf=\"optionsPending\"></mat-progress-spinner>\n </mat-select>\n <mat-error *ngIf=\"form.get(controlName)?.hasError(errorCode)\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n {{errorText}}\n </mat-error>\n </mat-form-field>\n</ng-container>\n\n<!--\nThis duplication is caused by the following bug: https://github.com/angular/components/issues/9411\nWhich doesn't allow projection in mat-form-field\n-->\n\n<ng-container *ngIf=\"!standalone\">\n <mat-select *ngIf=\"form.get(controlName)\"\n [formControl]=\"formControl\"\n (openedChange)=\"getOptions()\"\n [placeholder]=\"placeholder\"\n (selectionChange)=\"onFieldChange(controlName)\"\n [id]=\"id\"\n >\n <mat-option *ngIf=\"default\" [disabled]=\"default.disabled\" [value]=\"default.key\">{{default.value}}</mat-option>\n <mat-option *ngFor=\"let type of options\" [value]=\"type\">\n {{type}}\n </mat-option>\n <mat-progress-spinner class=\"field-spinner\"\n [diameter]=\"20\"\n mode=\"indeterminate\"\n *ngIf=\"optionsPending\"></mat-progress-spinner>\n </mat-select>\n <mat-error *ngIf=\"form.get(controlName)?.hasError(errorCode)\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n {{errorText}}\n </mat-error>\n</ng-container>\n", styles: [".field-spinner{margin-top:-30px}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i1$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: i6$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i4$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i5.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }] });
|
|
983
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LazyLoadingSelectComponent, decorators: [{
|
|
984
|
+
type: Component,
|
|
985
|
+
args: [{ selector: 'app-lazy-loading-select', template: "<ng-container *ngIf=\"standalone\">\n <mat-form-field appearance=\"outline\">\n <mat-select [formControl]=\"formControl\"\n (openedChange)=\"getOptions()\"\n [placeholder]=\"placeholder\"\n (selectionChange)=\"onFieldChange(controlName)\"\n [id]=\"id\">\n <mat-option *ngIf=\"default\" [disabled]=\"default.disabled\" [value]=\"default.key\">{{default.value}}</mat-option>\n <mat-option *ngFor=\"let type of options\" [value]=\"type\">\n {{type}}\n </mat-option>\n <mat-progress-spinner class=\"field-spinner\"\n [diameter]=\"20\"\n mode=\"indeterminate\"\n *ngIf=\"optionsPending\"></mat-progress-spinner>\n </mat-select>\n <mat-error *ngIf=\"form.get(controlName)?.hasError(errorCode)\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n {{errorText}}\n </mat-error>\n </mat-form-field>\n</ng-container>\n\n<!--\nThis duplication is caused by the following bug: https://github.com/angular/components/issues/9411\nWhich doesn't allow projection in mat-form-field\n-->\n\n<ng-container *ngIf=\"!standalone\">\n <mat-select *ngIf=\"form.get(controlName)\"\n [formControl]=\"formControl\"\n (openedChange)=\"getOptions()\"\n [placeholder]=\"placeholder\"\n (selectionChange)=\"onFieldChange(controlName)\"\n [id]=\"id\"\n >\n <mat-option *ngIf=\"default\" [disabled]=\"default.disabled\" [value]=\"default.key\">{{default.value}}</mat-option>\n <mat-option *ngFor=\"let type of options\" [value]=\"type\">\n {{type}}\n </mat-option>\n <mat-progress-spinner class=\"field-spinner\"\n [diameter]=\"20\"\n mode=\"indeterminate\"\n *ngIf=\"optionsPending\"></mat-progress-spinner>\n </mat-select>\n <mat-error *ngIf=\"form.get(controlName)?.hasError(errorCode)\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n {{errorText}}\n </mat-error>\n</ng-container>\n", styles: [".field-spinner{margin-top:-30px}\n"] }]
|
|
986
|
+
}], ctorParameters: function () { return [{ type: NotificationService }, { type: SiteSettingsService }]; }, propDecorators: { siteId: [{
|
|
987
|
+
type: Input
|
|
988
|
+
}], form: [{
|
|
989
|
+
type: Input
|
|
990
|
+
}], standalone: [{
|
|
991
|
+
type: Input
|
|
992
|
+
}], placeholder: [{
|
|
993
|
+
type: Input
|
|
994
|
+
}], controlName: [{
|
|
995
|
+
type: Input
|
|
996
|
+
}], optionsToken: [{
|
|
997
|
+
type: Input
|
|
998
|
+
}], appearance: [{
|
|
999
|
+
type: Input
|
|
1000
|
+
}], errorCode: [{
|
|
1001
|
+
type: Input
|
|
1002
|
+
}], errorText: [{
|
|
1003
|
+
type: Input
|
|
1004
|
+
}], default: [{
|
|
1005
|
+
type: Input
|
|
1006
|
+
}], id: [{
|
|
1007
|
+
type: Input
|
|
1008
|
+
}], changeField: [{
|
|
1009
|
+
type: Output
|
|
1010
|
+
}] } });
|
|
1011
|
+
|
|
1012
|
+
class UserManageWidgetComponent {
|
|
1013
|
+
get form() {
|
|
1014
|
+
var _a, _b;
|
|
1015
|
+
return (_b = (_a = this.userService) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.form;
|
|
1016
|
+
}
|
|
1017
|
+
get user() {
|
|
1018
|
+
return this.userService.user;
|
|
1019
|
+
}
|
|
1020
|
+
get userName() {
|
|
1021
|
+
var _a, _b;
|
|
1022
|
+
return `${((_a = this.user) === null || _a === void 0 ? void 0 : _a.firstName) || ''} ${((_b = this.user) === null || _b === void 0 ? void 0 : _b.lastName) || ''}`;
|
|
1023
|
+
}
|
|
1024
|
+
constructor(userService, apiService) {
|
|
1025
|
+
this.userService = userService;
|
|
1026
|
+
this.apiService = apiService;
|
|
1027
|
+
this.onSave = new EventEmitter();
|
|
1028
|
+
}
|
|
1029
|
+
ngOnInit() {
|
|
1030
|
+
this.apiService.token = this.token;
|
|
1031
|
+
this.getData();
|
|
1032
|
+
}
|
|
1033
|
+
onChangeField(token) {
|
|
1034
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1035
|
+
if (!token) {
|
|
1036
|
+
return;
|
|
1037
|
+
}
|
|
1038
|
+
this.userService.user[token] = (_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.get(token)) === null || _b === void 0 ? void 0 : _b.value;
|
|
1039
|
+
if (token === 'middleName') {
|
|
1040
|
+
(_d = (_c = this.form) === null || _c === void 0 ? void 0 : _c.get(token)) === null || _d === void 0 ? void 0 : _d.setValidators([Validators.pattern('[ a-zA-Z-]+')]);
|
|
1041
|
+
}
|
|
1042
|
+
if (token === 'telephoneNumber' || token === 'mobileNumber' || token === 'pagerNumber' || token === 'homeNumber') {
|
|
1043
|
+
(_f = (_e = this.form) === null || _e === void 0 ? void 0 : _e.get(token)) === null || _f === void 0 ? void 0 : _f.setValidators([Validators.pattern('[ 0-9-+]+')]);
|
|
1044
|
+
}
|
|
1045
|
+
(_h = (_g = this.form) === null || _g === void 0 ? void 0 : _g.get(token)) === null || _h === void 0 ? void 0 : _h.updateValueAndValidity();
|
|
1046
|
+
this.validateUserId();
|
|
1047
|
+
}
|
|
1048
|
+
saveChanges() {
|
|
1049
|
+
var _a;
|
|
1050
|
+
this.onSave.next("start saving..");
|
|
1051
|
+
if (!this.userService.hasUnsavedChanges() || ((_a = this.form) === null || _a === void 0 ? void 0 : _a.invalid)) {
|
|
1052
|
+
return;
|
|
1053
|
+
}
|
|
1054
|
+
this.userService.persistCacheChanges()
|
|
1055
|
+
.subscribe(() => {
|
|
1056
|
+
this.onSave.next("saved");
|
|
1057
|
+
});
|
|
1058
|
+
}
|
|
1059
|
+
toggleEditMode() {
|
|
1060
|
+
this.userService.user.toggleEditMode();
|
|
1061
|
+
}
|
|
1062
|
+
isSavingDisabled() {
|
|
1063
|
+
return !this.userService.hasUnsavedChanges() || this.userService.hasExistedUserId;
|
|
1064
|
+
}
|
|
1065
|
+
changeField(token) {
|
|
1066
|
+
var _a, _b;
|
|
1067
|
+
const formField = (_b = (_a = this.user) === null || _a === void 0 ? void 0 : _a.form) === null || _b === void 0 ? void 0 : _b.get(token);
|
|
1068
|
+
if (token !== 'confirmDigestCredentials') {
|
|
1069
|
+
// @ts-ignore
|
|
1070
|
+
this.user[token] = formField === null || formField === void 0 ? void 0 : formField.value;
|
|
1071
|
+
}
|
|
1072
|
+
if (token === 'digestCredentials' || token === 'confirmDigestCredentials') {
|
|
1073
|
+
this.digestCredentialsHandler(token, formField);
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
digestCredentialsHandler(token, field) {
|
|
1077
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1078
|
+
const fieldNameToCompare = token === 'digestCredentials' ? 'confirmDigestCredentials' : 'digestCredentials';
|
|
1079
|
+
const fieldToCompare = this.userService.user.form.get(fieldNameToCompare);
|
|
1080
|
+
if ((_b = (_a = this.userService.user) === null || _a === void 0 ? void 0 : _a.form) === null || _b === void 0 ? void 0 : _b.get(token)) {
|
|
1081
|
+
(_e = (_d = (_c = this.userService.user) === null || _c === void 0 ? void 0 : _c.form) === null || _d === void 0 ? void 0 : _d.get(token)) === null || _e === void 0 ? void 0 : _e.setErrors(null);
|
|
1082
|
+
(_h = (_g = (_f = this.userService.user) === null || _f === void 0 ? void 0 : _f.form) === null || _g === void 0 ? void 0 : _g.get(fieldNameToCompare)) === null || _h === void 0 ? void 0 : _h.setErrors(null);
|
|
1083
|
+
/* if (!field.value && !fieldToCompare.value) {
|
|
1084
|
+
this.userService.user?.digestCredentials = null;
|
|
1085
|
+
return;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
if (!field.value && fieldToCompare.value || !fieldToCompare.value && field.value) {
|
|
1089
|
+
const requiredFieldName = field.value ? fieldNameToCompare : token;
|
|
1090
|
+
this.userService.user.form.get(requiredFieldName).setErrors({required: true});
|
|
1091
|
+
return;
|
|
1092
|
+
}
|
|
1093
|
+
if (field.value && fieldToCompare.value && field.value !== fieldToCompare.value) {
|
|
1094
|
+
this.userService.user.form.get(token).setErrors({mismatch: true});
|
|
1095
|
+
this.userService.user.form.get(fieldNameToCompare).setErrors({mismatch: true});
|
|
1096
|
+
}*/
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
getData() {
|
|
1100
|
+
this.dataPending = true;
|
|
1101
|
+
this.userService.fetchUserToken(this.siteId, this.userId)
|
|
1102
|
+
.subscribe({
|
|
1103
|
+
complete: (v) => {
|
|
1104
|
+
this.dataPending = false;
|
|
1105
|
+
},
|
|
1106
|
+
error: (e) => this.dataPending = false,
|
|
1107
|
+
});
|
|
1108
|
+
}
|
|
1109
|
+
setCookie(name, value, days) {
|
|
1110
|
+
var expires = "";
|
|
1111
|
+
if (days) {
|
|
1112
|
+
var date = new Date();
|
|
1113
|
+
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
|
1114
|
+
expires = "; expires=" + date.toUTCString();
|
|
1115
|
+
}
|
|
1116
|
+
document.cookie = name + "=" + (value || "") + expires + "; path=/";
|
|
1117
|
+
}
|
|
1118
|
+
validateUserId() {
|
|
1119
|
+
var _a, _b;
|
|
1120
|
+
const idControl = this.form.get('userid');
|
|
1121
|
+
if ((idControl === null || idControl === void 0 ? void 0 : idControl.value) !== '' && (idControl === null || idControl === void 0 ? void 0 : idControl.value) !== this.userService.originUser.userid) {
|
|
1122
|
+
this.userService.fetchUserById(idControl === null || idControl === void 0 ? void 0 : idControl.value)
|
|
1123
|
+
.subscribe((res) => {
|
|
1124
|
+
var _a, _b;
|
|
1125
|
+
this.userService.userIdExistPending = false;
|
|
1126
|
+
idControl === null || idControl === void 0 ? void 0 : idControl.setErrors({ exist: true });
|
|
1127
|
+
if ((_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.get('userid')) === null || _b === void 0 ? void 0 : _b.hasError('exist')) {
|
|
1128
|
+
this.userService.hasExistedUserId = true;
|
|
1129
|
+
}
|
|
1130
|
+
else {
|
|
1131
|
+
this.userService.hasExistedUserId = false;
|
|
1132
|
+
}
|
|
1133
|
+
}, ((error) => {
|
|
1134
|
+
var _a, _b;
|
|
1135
|
+
this.userService.userIdExistPending = false;
|
|
1136
|
+
if (error.status !== 404) {
|
|
1137
|
+
// this.notificationService.warning(this.translate.instant('APP_USER_MSG.CHECK_USER_ID_FAILED'));
|
|
1138
|
+
}
|
|
1139
|
+
else {
|
|
1140
|
+
this.userService.user.newUserId = (_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.get('userid')) === null || _b === void 0 ? void 0 : _b.value;
|
|
1141
|
+
}
|
|
1142
|
+
}));
|
|
1143
|
+
}
|
|
1144
|
+
else {
|
|
1145
|
+
(_b = (_a = this.userService) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? true : delete _b.newUserId;
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
UserManageWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageWidgetComponent, deps: [{ token: UserService }, { token: APIService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1150
|
+
UserManageWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserManageWidgetComponent, selector: "app-user-manage-widget", inputs: { token: "token", siteId: "siteId", userId: "userId" }, outputs: { onSave: "onSave" }, ngImport: i0, template: "<div class=\"header-box\">\n <div class=\"content-box\">\n <div class=\"header-back-block\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5.70746 7.99987L11.3539 2.35352C11.4453 2.25928 11.496 2.13287 11.495 2.00159C11.494 1.8703 11.4414 1.74467 11.3486 1.65183C11.2558 1.55899 11.1301 1.50639 10.9988 1.50539C10.8676 1.50438 10.7411 1.55506 10.6469 1.64647L4.64691 7.64647C4.55316 7.74023 4.50049 7.8674 4.50049 7.99999C4.50049 8.13259 4.55316 8.25975 4.64691 8.35352L10.6469 14.3535C10.6931 14.4011 10.7482 14.439 10.8092 14.4651C10.8702 14.4912 10.9357 14.5049 11.002 14.5054C11.0683 14.5059 11.134 14.4932 11.1954 14.468C11.2567 14.4429 11.3125 14.4058 11.3593 14.3589C11.4062 14.312 11.4433 14.2563 11.4685 14.1949C11.4936 14.1336 11.5063 14.0679 11.5058 14.0016C11.5053 13.9353 11.4916 13.8697 11.4655 13.8088C11.4394 13.7478 11.4015 13.6926 11.3539 13.6465L5.70746 7.99987Z\" fill=\"black\" fill-opacity=\"0.95\"/>\n </svg>\n Users\n </div>\n <div class=\"header-button-block\">\n <button mat-raised-button\n [disabled]=\"!userService.hasUnsavedChanges()\"\n (click)=\"saveChanges()\">Save</button>\n </div>\n </div>\n</div>\n<app-user-info *ngIf=\"user\" [name]=\"userName\" [email]=\"user.email\" [active]=\"false\" [position]=\"'Sales Senior VP'\"></app-user-info>\n\n<mat-tab-group disableRipple class=\"content-box\">\n <mat-tab label=\"Profile\">\n <ng-container *ngTemplateOutlet=\"userProfile\">\n </ng-container>\n </mat-tab>\n <mat-tab ></mat-tab>\n <mat-tab ></mat-tab>\n <mat-tab ></mat-tab>\n</mat-tab-group>\n\n<ng-template #userProfile>\n <form *ngIf=\"user && form\" [formGroup]=\"form\">\n <div class=\"info-boxes-container\">\n <div *ngIf=\"dataPending == true\" class=\"data-loader\">\n <mat-spinner [diameter]=\"50\"></mat-spinner>\n </div>\n\n <!-- USER INFO BOX-->\n <div class=\"user-info-box user-details-box\">\n <h3 class=\"user-box-title\">User General Info</h3>\n <div class=\"form-holder__inputs\">\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">User Id</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"userid\"\n matInput (input)=\"onChangeField('userid')\">\n <mat-error\n *ngIf=\"form.get('userid').hasError('required')\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n This field is required\n </mat-error>\n <mat-error *ngIf=\"form.get('userid').hasError('exist')\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n User ID already exists\n </mat-error>\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Email</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"email\"\n matInput (input)=\"onChangeField('email')\">\n <mat-error\n *ngIf=\"form.get('email').touched && form.get('email').hasError('required')\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n This field is required\n </mat-error>\n <mat-error *ngIf=\"form.get('email').touched && form.get('email').hasError('pattern')\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n Please enter valid email\n </mat-error>\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Fisrt Name</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"firstName\"\n matInput (input)=\"onChangeField('firstName')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Last Name</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"lastName\"\n matInput (input)=\"onChangeField('lastName')\">\n <mat-error\n *ngIf=\"form.get('lastName').touched && form.get('lastName').hasError('required')\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n This field is required\n </mat-error>\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n </div>\n\n </div>\n\n\n <!-- USER INFO BOX-->\n <div class=\"user-info-box user-details-box\">\n <h3 class=\"user-box-title\">User General Info</h3>\n <div class=\"form-holder__inputs\">\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Department</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"department\" matInput type=\"text\" (input)=\"onChangeField('department')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Manager user ID</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"manager\" matInput type=\"text\" (input)=\"onChangeField('manager')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Associated PC</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"associatedPc\" matInput type=\"text\" (input)=\"onChangeField('associatedPc')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Digest credentials</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"digestCredentials\" matInput type=\"text\" (input)=\"onChangeField('digestCredentials')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">User profile</div>\n <div class=\"input-holder__input\">\n <app-lazy-loading-select\n [siteId]=\"siteId\"\n [controlName]=\"'userProfile'\"\n [form]=\"user.form\"\n (changeField)=\"changeField('userProfile')\"\n [optionsToken]=\"'userProfiles'\"\n ></app-lazy-loading-select>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Mobile voice access</div>\n <div class=\"input-holder__input\">\n <mat-slide-toggle\n formControlName=\"enableMobileVoiceAccess\"\n (change)=\"onChangeField('enableMobileVoiceAccess')\"\n [checked]=\"user.enableMobileVoiceAccess\">\n </mat-slide-toggle>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Userlocale</div>\n <div class=\"input-holder__input\">\n <app-lazy-loading-select\n [siteId]=\"siteId\"\n [controlName]=\"'userLocale'\"\n [form]=\"user.form\"\n (changeField)=\"changeField($event)\"\n [optionsToken]=\"'userLocales'\"\n [default]=\"{key: '', value: 'None', disabled: false}\">\n </app-lazy-loading-select>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Confirm digest credentials</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"confirmDigestCredentials\" matInput type=\"text\" (input)=\"onChangeField('confirmDigestCredentials')\">\n </mat-form-field>\n </div>\n </div>\n </div>\n </div>\n\n <!-- USER INFO BOX-->\n <div class=\"user-info-box user-details-box\">\n <h3 class=\"user-box-title\">Contact Information</h3>\n <div class=\"form-holder__inputs\">\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Middle Name</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"text\" formControlName=\"middleName\" (input)=\"onChangeField('middleName')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Telephone Number</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"number\" formControlName=\"telephoneNumber\" (input)=\"onChangeField('telephoneNumber')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Mobile Number</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"number\" formControlName=\"mobileNumber\" (input)=\"onChangeField('mobileNumber')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Digest credentials</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"text\" formControlName=\"digestCredentials\" (input)=\"onChangeField('digestCredentials')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Diractory URI</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"text\" formControlName=\"directoryUri\" (input)=\"onChangeField('directoryUri')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Title</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"text\" formControlName=\"title\" (input)=\"onChangeField('title')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Home Number</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"number\" formControlName=\"homeNumber\" (input)=\"onChangeField('homeNumber')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Pager Number</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"number\" formControlName=\"pagerNumber\" (input)=\"onChangeField('pagerNumber')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Display Name</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"text\" formControlName=\"displayName\" (input)=\"onChangeField('displayName')\">\n </mat-form-field>\n </div>\n </div>\n </div>\n </div>\n\n </div>\n\n </form>\n</ng-template>\n\n<mat-progress-spinner *ngIf=\"dataPending\"\n class=\"page-spinner\"\n mode=\"indeterminate\"\n [diameter]=\"120\"></mat-progress-spinner>\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.mat-select{height:100%;line-height:35px}.mat-form-field-wrapper{padding-bottom:0!important}.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-webex-user{background-image:url(../assets/icons/icon_user.svg)}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:70%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:#009fdb!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important;line-height:35px!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}.mat-form-field-wrapper,.mat-form-field-flex{height:30px!important}.mat-form-field-appearance-outline .mat-form-field-outline,.mat-form-field-outline .mat-form-field-outline-thick{height:35px!important}.mat-select{line-height:20px!important}.mat-form-field-appearance-outline .mat-form-field-infix{padding:14px 12px 10px;border-top:0;max-width:300px}.mat-tab-group{font-family:Inter,sans-serif}.mat-tab-label{font-weight:500!important;font-size:14px!important;height:auto!important;min-width:auto!important;padding:0!important}.mat-ink-bar{background-color:#000000e6!important;height:3px!important}.mat-form-field-wrapper{padding-bottom:0}.mat-form-field{padding:0;max-width:300px}.mat-divider{margin:12px 0}table{border-collapse:collapse;border-spacing:0}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.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: i4.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6$2.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i1$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: i6$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i10.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { kind: "component", type: i10.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: i11.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { kind: "component", type: UserInfoComponent, selector: "app-user-info", inputs: ["name", "active", "email", "position"] }, { kind: "component", type: LazyLoadingSelectComponent, selector: "app-lazy-loading-select", inputs: ["siteId", "form", "standalone", "placeholder", "controlName", "optionsToken", "appearance", "errorCode", "errorText", "default", "id"], outputs: ["changeField"] }] });
|
|
1151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageWidgetComponent, decorators: [{
|
|
1152
|
+
type: Component,
|
|
1153
|
+
args: [{ selector: 'app-user-manage-widget', template: "<div class=\"header-box\">\n <div class=\"content-box\">\n <div class=\"header-back-block\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5.70746 7.99987L11.3539 2.35352C11.4453 2.25928 11.496 2.13287 11.495 2.00159C11.494 1.8703 11.4414 1.74467 11.3486 1.65183C11.2558 1.55899 11.1301 1.50639 10.9988 1.50539C10.8676 1.50438 10.7411 1.55506 10.6469 1.64647L4.64691 7.64647C4.55316 7.74023 4.50049 7.8674 4.50049 7.99999C4.50049 8.13259 4.55316 8.25975 4.64691 8.35352L10.6469 14.3535C10.6931 14.4011 10.7482 14.439 10.8092 14.4651C10.8702 14.4912 10.9357 14.5049 11.002 14.5054C11.0683 14.5059 11.134 14.4932 11.1954 14.468C11.2567 14.4429 11.3125 14.4058 11.3593 14.3589C11.4062 14.312 11.4433 14.2563 11.4685 14.1949C11.4936 14.1336 11.5063 14.0679 11.5058 14.0016C11.5053 13.9353 11.4916 13.8697 11.4655 13.8088C11.4394 13.7478 11.4015 13.6926 11.3539 13.6465L5.70746 7.99987Z\" fill=\"black\" fill-opacity=\"0.95\"/>\n </svg>\n Users\n </div>\n <div class=\"header-button-block\">\n <button mat-raised-button\n [disabled]=\"!userService.hasUnsavedChanges()\"\n (click)=\"saveChanges()\">Save</button>\n </div>\n </div>\n</div>\n<app-user-info *ngIf=\"user\" [name]=\"userName\" [email]=\"user.email\" [active]=\"false\" [position]=\"'Sales Senior VP'\"></app-user-info>\n\n<mat-tab-group disableRipple class=\"content-box\">\n <mat-tab label=\"Profile\">\n <ng-container *ngTemplateOutlet=\"userProfile\">\n </ng-container>\n </mat-tab>\n <mat-tab ></mat-tab>\n <mat-tab ></mat-tab>\n <mat-tab ></mat-tab>\n</mat-tab-group>\n\n<ng-template #userProfile>\n <form *ngIf=\"user && form\" [formGroup]=\"form\">\n <div class=\"info-boxes-container\">\n <div *ngIf=\"dataPending == true\" class=\"data-loader\">\n <mat-spinner [diameter]=\"50\"></mat-spinner>\n </div>\n\n <!-- USER INFO BOX-->\n <div class=\"user-info-box user-details-box\">\n <h3 class=\"user-box-title\">User General Info</h3>\n <div class=\"form-holder__inputs\">\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">User Id</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"userid\"\n matInput (input)=\"onChangeField('userid')\">\n <mat-error\n *ngIf=\"form.get('userid').hasError('required')\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n This field is required\n </mat-error>\n <mat-error *ngIf=\"form.get('userid').hasError('exist')\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n User ID already exists\n </mat-error>\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Email</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"email\"\n matInput (input)=\"onChangeField('email')\">\n <mat-error\n *ngIf=\"form.get('email').touched && form.get('email').hasError('required')\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n This field is required\n </mat-error>\n <mat-error *ngIf=\"form.get('email').touched && form.get('email').hasError('pattern')\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n Please enter valid email\n </mat-error>\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Fisrt Name</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"firstName\"\n matInput (input)=\"onChangeField('firstName')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Last Name</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"lastName\"\n matInput (input)=\"onChangeField('lastName')\">\n <mat-error\n *ngIf=\"form.get('lastName').touched && form.get('lastName').hasError('required')\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n This field is required\n </mat-error>\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n </div>\n\n </div>\n\n\n <!-- USER INFO BOX-->\n <div class=\"user-info-box user-details-box\">\n <h3 class=\"user-box-title\">User General Info</h3>\n <div class=\"form-holder__inputs\">\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Department</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"department\" matInput type=\"text\" (input)=\"onChangeField('department')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Manager user ID</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"manager\" matInput type=\"text\" (input)=\"onChangeField('manager')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Associated PC</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"associatedPc\" matInput type=\"text\" (input)=\"onChangeField('associatedPc')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Digest credentials</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"digestCredentials\" matInput type=\"text\" (input)=\"onChangeField('digestCredentials')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">User profile</div>\n <div class=\"input-holder__input\">\n <app-lazy-loading-select\n [siteId]=\"siteId\"\n [controlName]=\"'userProfile'\"\n [form]=\"user.form\"\n (changeField)=\"changeField('userProfile')\"\n [optionsToken]=\"'userProfiles'\"\n ></app-lazy-loading-select>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Mobile voice access</div>\n <div class=\"input-holder__input\">\n <mat-slide-toggle\n formControlName=\"enableMobileVoiceAccess\"\n (change)=\"onChangeField('enableMobileVoiceAccess')\"\n [checked]=\"user.enableMobileVoiceAccess\">\n </mat-slide-toggle>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Userlocale</div>\n <div class=\"input-holder__input\">\n <app-lazy-loading-select\n [siteId]=\"siteId\"\n [controlName]=\"'userLocale'\"\n [form]=\"user.form\"\n (changeField)=\"changeField($event)\"\n [optionsToken]=\"'userLocales'\"\n [default]=\"{key: '', value: 'None', disabled: false}\">\n </app-lazy-loading-select>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Confirm digest credentials</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"confirmDigestCredentials\" matInput type=\"text\" (input)=\"onChangeField('confirmDigestCredentials')\">\n </mat-form-field>\n </div>\n </div>\n </div>\n </div>\n\n <!-- USER INFO BOX-->\n <div class=\"user-info-box user-details-box\">\n <h3 class=\"user-box-title\">Contact Information</h3>\n <div class=\"form-holder__inputs\">\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Middle Name</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"text\" formControlName=\"middleName\" (input)=\"onChangeField('middleName')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Telephone Number</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"number\" formControlName=\"telephoneNumber\" (input)=\"onChangeField('telephoneNumber')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Mobile Number</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"number\" formControlName=\"mobileNumber\" (input)=\"onChangeField('mobileNumber')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Digest credentials</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"text\" formControlName=\"digestCredentials\" (input)=\"onChangeField('digestCredentials')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Diractory URI</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"text\" formControlName=\"directoryUri\" (input)=\"onChangeField('directoryUri')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Title</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"text\" formControlName=\"title\" (input)=\"onChangeField('title')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Home Number</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"number\" formControlName=\"homeNumber\" (input)=\"onChangeField('homeNumber')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Pager Number</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"number\" formControlName=\"pagerNumber\" (input)=\"onChangeField('pagerNumber')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Display Name</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"text\" formControlName=\"displayName\" (input)=\"onChangeField('displayName')\">\n </mat-form-field>\n </div>\n </div>\n </div>\n </div>\n\n </div>\n\n </form>\n</ng-template>\n\n<mat-progress-spinner *ngIf=\"dataPending\"\n class=\"page-spinner\"\n mode=\"indeterminate\"\n [diameter]=\"120\"></mat-progress-spinner>\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.mat-select{height:100%;line-height:35px}.mat-form-field-wrapper{padding-bottom:0!important}.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-webex-user{background-image:url(../assets/icons/icon_user.svg)}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:70%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:#009fdb!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important;line-height:35px!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}.mat-form-field-wrapper,.mat-form-field-flex{height:30px!important}.mat-form-field-appearance-outline .mat-form-field-outline,.mat-form-field-outline .mat-form-field-outline-thick{height:35px!important}.mat-select{line-height:20px!important}.mat-form-field-appearance-outline .mat-form-field-infix{padding:14px 12px 10px;border-top:0;max-width:300px}.mat-tab-group{font-family:Inter,sans-serif}.mat-tab-label{font-weight:500!important;font-size:14px!important;height:auto!important;min-width:auto!important;padding:0!important}.mat-ink-bar{background-color:#000000e6!important;height:3px!important}.mat-form-field-wrapper{padding-bottom:0}.mat-form-field{padding:0;max-width:300px}.mat-divider{margin:12px 0}table{border-collapse:collapse;border-spacing:0}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}\n"] }]
|
|
1154
|
+
}], ctorParameters: function () { return [{ type: UserService }, { type: APIService }]; }, propDecorators: { onSave: [{
|
|
1155
|
+
type: Output
|
|
1156
|
+
}], token: [{
|
|
1157
|
+
type: Input
|
|
1158
|
+
}], siteId: [{
|
|
1159
|
+
type: Input
|
|
1160
|
+
}], userId: [{
|
|
1161
|
+
type: Input
|
|
1162
|
+
}] } });
|
|
1163
|
+
|
|
1164
|
+
class UserManageModule {
|
|
1165
|
+
}
|
|
1166
|
+
UserManageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1167
|
+
UserManageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, declarations: [AppLoaderComponent,
|
|
1168
|
+
UserInfoComponent,
|
|
1169
|
+
NotificationsComponent,
|
|
1170
|
+
PaginationComponent,
|
|
1171
|
+
LazyLoadingSelectComponent,
|
|
1172
|
+
UserManageWidgetComponent], imports: [CommonModule,
|
|
1173
|
+
BrowserModule,
|
|
1174
|
+
BrowserAnimationsModule,
|
|
1175
|
+
FormsModule,
|
|
1176
|
+
ReactiveFormsModule,
|
|
1177
|
+
HttpClientModule,
|
|
1178
|
+
MaterialModule], exports: [UserManageWidgetComponent] });
|
|
1179
|
+
UserManageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, providers: [
|
|
1180
|
+
APIService,
|
|
1181
|
+
UserService,
|
|
1182
|
+
NotificationService,
|
|
1183
|
+
UsersSearchService,
|
|
1184
|
+
RemoveKynFromIBMService,
|
|
1185
|
+
SiteSettingsService,
|
|
1186
|
+
{ provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
|
|
1187
|
+
], imports: [CommonModule,
|
|
1188
|
+
BrowserModule,
|
|
1189
|
+
BrowserAnimationsModule,
|
|
1190
|
+
FormsModule,
|
|
1191
|
+
ReactiveFormsModule,
|
|
1192
|
+
HttpClientModule,
|
|
1193
|
+
MaterialModule] });
|
|
1194
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, decorators: [{
|
|
1195
|
+
type: NgModule,
|
|
1196
|
+
args: [{
|
|
1197
|
+
declarations: [
|
|
1198
|
+
AppLoaderComponent,
|
|
1199
|
+
UserInfoComponent,
|
|
1200
|
+
NotificationsComponent,
|
|
1201
|
+
PaginationComponent,
|
|
1202
|
+
LazyLoadingSelectComponent,
|
|
1203
|
+
UserManageWidgetComponent
|
|
1204
|
+
],
|
|
1205
|
+
imports: [
|
|
1206
|
+
CommonModule,
|
|
1207
|
+
BrowserModule,
|
|
1208
|
+
BrowserAnimationsModule,
|
|
1209
|
+
FormsModule,
|
|
1210
|
+
ReactiveFormsModule,
|
|
1211
|
+
HttpClientModule,
|
|
1212
|
+
MaterialModule,
|
|
1213
|
+
],
|
|
1214
|
+
providers: [
|
|
1215
|
+
APIService,
|
|
1216
|
+
UserService,
|
|
1217
|
+
NotificationService,
|
|
1218
|
+
UsersSearchService,
|
|
1219
|
+
RemoveKynFromIBMService,
|
|
1220
|
+
SiteSettingsService,
|
|
1221
|
+
{ provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
|
|
1222
|
+
],
|
|
1223
|
+
exports: [UserManageWidgetComponent]
|
|
1224
|
+
}]
|
|
1225
|
+
}] });
|
|
1226
|
+
|
|
1227
|
+
/**
|
|
1228
|
+
* Generated bundle index. Do not edit.
|
|
1229
|
+
*/
|
|
1230
|
+
|
|
1231
|
+
export { APIService, SiteSettingsService, UserManageModule, UserManageWidgetComponent, UserService, UtilsService };
|
|
1232
|
+
//# sourceMappingURL=tuki-io-tuki-widgets-user-manage.mjs.map
|