@tuki-io/tuki-widgets 0.0.0
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/.editorconfig +16 -0
- package/.vscode/extensions.json +4 -0
- package/.vscode/launch.json +20 -0
- package/.vscode/tasks.json +42 -0
- package/README.md +27 -0
- package/angular.json +41 -0
- package/package.json +42 -0
- package/projects/tuki/widgets/README.md +24 -0
- package/projects/tuki/widgets/karma.conf.js +44 -0
- package/projects/tuki/widgets/ng-package.json +7 -0
- package/projects/tuki/widgets/package.json +13 -0
- package/projects/tuki/widgets/src/lib/widgets.component.spec.ts +23 -0
- package/projects/tuki/widgets/src/lib/widgets.component.ts +20 -0
- package/projects/tuki/widgets/src/lib/widgets.module.ts +16 -0
- package/projects/tuki/widgets/src/lib/widgets.service.spec.ts +16 -0
- package/projects/tuki/widgets/src/lib/widgets.service.ts +9 -0
- package/projects/tuki/widgets/src/public-api.ts +7 -0
- package/projects/tuki/widgets/src/test.ts +27 -0
- package/projects/tuki/widgets/styles/_variables.scss +90 -0
- package/projects/tuki/widgets/styles/form.scss +231 -0
- package/projects/tuki/widgets/styles/icons.scss +32 -0
- package/projects/tuki/widgets/styles/styles.scss +110 -0
- package/projects/tuki/widgets/styles/tables.scss +30 -0
- package/projects/tuki/widgets/tsconfig.lib.json +36 -0
- package/projects/tuki/widgets/tsconfig.lib.prod.json +10 -0
- package/projects/tuki/widgets/tsconfig.spec.json +17 -0
- package/projects/tuki/widgets/user-manage/ng-package.json +7 -0
- package/projects/tuki/widgets/user-manage/public-api.ts +6 -0
- package/projects/tuki/widgets/user-manage/src/app.constants.ts +38 -0
- package/projects/tuki/widgets/user-manage/src/classes/device.ts +225 -0
- package/projects/tuki/widgets/user-manage/src/classes/line.ts +117 -0
- package/projects/tuki/widgets/user-manage/src/classes/notification.ts +39 -0
- package/projects/tuki/widgets/user-manage/src/classes/pagination.ts +18 -0
- package/projects/tuki/widgets/user-manage/src/classes/simplified-user.ts +128 -0
- package/projects/tuki/widgets/user-manage/src/classes/table-data.ts +6 -0
- package/projects/tuki/widgets/user-manage/src/classes/user-interface.ts +225 -0
- package/projects/tuki/widgets/user-manage/src/classes/user-list.ts +40 -0
- package/projects/tuki/widgets/user-manage/src/classes/user.ts +8 -0
- package/projects/tuki/widgets/user-manage/src/common-functions.ts +16 -0
- package/projects/tuki/widgets/user-manage/src/environments/environment.prod.ts +9 -0
- package/projects/tuki/widgets/user-manage/src/environments/environment.ts +10 -0
- package/projects/tuki/widgets/user-manage/src/interseptors/auth.interceptor.ts +36 -0
- package/projects/tuki/widgets/user-manage/src/lazy-loading-select/lazy-loading-select.component.html +50 -0
- package/projects/tuki/widgets/user-manage/src/lazy-loading-select/lazy-loading-select.component.scss +3 -0
- package/projects/tuki/widgets/user-manage/src/lazy-loading-select/lazy-loading-select.component.ts +81 -0
- package/projects/tuki/widgets/user-manage/src/material.module.ts +85 -0
- package/projects/tuki/widgets/user-manage/src/notifications/notification.component.html +33 -0
- package/projects/tuki/widgets/user-manage/src/notifications/notification.component.scss +84 -0
- package/projects/tuki/widgets/user-manage/src/notifications/notification.component.ts +46 -0
- package/projects/tuki/widgets/user-manage/src/removeKynFromIBM.service.ts +25 -0
- package/projects/tuki/widgets/user-manage/src/services/api.service.ts +89 -0
- package/projects/tuki/widgets/user-manage/src/services/notification.service.ts +68 -0
- package/projects/tuki/widgets/user-manage/src/services/removeKynFromIBM.service.ts +25 -0
- package/projects/tuki/widgets/user-manage/src/services/site-settings.service.ts +35 -0
- package/projects/tuki/widgets/user-manage/src/services/user.service.ts +120 -0
- package/projects/tuki/widgets/user-manage/src/services/users-search.service.ts +58 -0
- package/projects/tuki/widgets/user-manage/src/services/utils.service.ts +71 -0
- package/projects/tuki/widgets/user-manage/src/styles/_variables.scss +90 -0
- package/projects/tuki/widgets/user-manage/src/styles/form.scss +231 -0
- package/projects/tuki/widgets/user-manage/src/styles/icons.scss +32 -0
- package/projects/tuki/widgets/user-manage/src/styles/styles.scss +110 -0
- package/projects/tuki/widgets/user-manage/src/styles/tables.scss +30 -0
- package/projects/tuki/widgets/user-manage/src/user-details/notification.service.ts +68 -0
- package/projects/tuki/widgets/user-manage/src/user-info/user-info.component.html +32 -0
- package/projects/tuki/widgets/user-manage/src/user-info/user-info.component.scss +53 -0
- package/projects/tuki/widgets/user-manage/src/user-info/user-info.component.ts +19 -0
- package/projects/tuki/widgets/user-manage/src/user-manage-widget.component.html +291 -0
- package/projects/tuki/widgets/user-manage/src/user-manage-widget.component.scss +461 -0
- package/projects/tuki/widgets/user-manage/src/user-manage-widget.component.ts +163 -0
- package/projects/tuki/widgets/user-manage/src/user-manage.module.ts +53 -0
- package/projects/tuki/widgets/user-manage/src/utils/app-loader/app-loader.component.html +6 -0
- package/projects/tuki/widgets/user-manage/src/utils/app-loader/app-loader.component.scss +11 -0
- package/projects/tuki/widgets/user-manage/src/utils/app-loader/app-loader.ts +13 -0
- package/projects/tuki/widgets/user-manage/src/utils/pagination/pagination.component.html +26 -0
- package/projects/tuki/widgets/user-manage/src/utils/pagination/pagination.component.scss +41 -0
- package/projects/tuki/widgets/user-manage/src/utils/pagination/pagination.component.ts +41 -0
- package/projects/tuki/widgets/users-list/ng-package.json +6 -0
- package/projects/tuki/widgets/users-list/public-api.ts +8 -0
- package/projects/tuki/widgets/users-list/src/app.constants.ts +35 -0
- package/projects/tuki/widgets/users-list/src/classes/device.ts +225 -0
- package/projects/tuki/widgets/users-list/src/classes/line.ts +117 -0
- package/projects/tuki/widgets/users-list/src/classes/notification.ts +38 -0
- package/projects/tuki/widgets/users-list/src/classes/pagination.ts +18 -0
- package/projects/tuki/widgets/users-list/src/classes/simlified-user.ts +74 -0
- package/projects/tuki/widgets/users-list/src/classes/table-data.ts +6 -0
- package/projects/tuki/widgets/users-list/src/classes/user-interface.ts +225 -0
- package/projects/tuki/widgets/users-list/src/classes/user-list.ts +40 -0
- package/projects/tuki/widgets/users-list/src/classes/user.ts +8 -0
- package/projects/tuki/widgets/users-list/src/material.module.ts +84 -0
- package/projects/tuki/widgets/users-list/src/services/api.service.ts +87 -0
- package/projects/tuki/widgets/users-list/src/services/events-communication.service.ts +11 -0
- package/projects/tuki/widgets/users-list/src/services/notification.service.ts +68 -0
- package/projects/tuki/widgets/users-list/src/services/removeKynFromIBM.service.ts +25 -0
- package/projects/tuki/widgets/users-list/src/services/user.service.ts +117 -0
- package/projects/tuki/widgets/users-list/src/services/users-search.service.ts +58 -0
- package/projects/tuki/widgets/users-list/src/users-list.component.css +4 -0
- package/projects/tuki/widgets/users-list/src/users-list.component.css.map +1 -0
- package/projects/tuki/widgets/users-list/src/users-list.component.html +39 -0
- package/projects/tuki/widgets/users-list/src/users-list.component.scss +9 -0
- package/projects/tuki/widgets/users-list/src/users-list.component.ts +85 -0
- package/projects/tuki/widgets/users-list/src/users-list.module.ts +36 -0
- package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.component.css +11 -0
- package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.component.css.map +1 -0
- package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.component.html +6 -0
- package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.component.scss +11 -0
- package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.ts +13 -0
- package/projects/tuki/widgets/users-list/src/utils/common-functions.ts +16 -0
- package/projects/tuki/widgets/users-list/src/utils/notifications/notification.component.html +33 -0
- package/projects/tuki/widgets/users-list/src/utils/notifications/notification.component.scss +84 -0
- package/projects/tuki/widgets/users-list/src/utils/notifications/notification.component.ts +46 -0
- package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.css +45 -0
- package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.css.map +1 -0
- package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.html +26 -0
- package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.scss +41 -0
- package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.ts +41 -0
- package/projects/tuki/widgets/users-list/src/utils/utils.service.ts +71 -0
- package/tsconfig.json +46 -0
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
//@import url( 'https://fonts.googleapis.com/css?family=Roboto:400,700|Material+Icons');
|
|
2
|
+
//@import url('https://fonts.googleapis.com/css?family=Raleway:400,100,200,300,500,600,800,700,900');
|
|
3
|
+
@import url('https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900');
|
|
4
|
+
//@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400&display=swap');
|
|
5
|
+
|
|
6
|
+
$fa-font-path : '../../node_modules/font-awesome/fonts';
|
|
7
|
+
|
|
8
|
+
//$common-font: Raleway, 'Raleway', sans-serif;
|
|
9
|
+
//$special-font: Raleway, 'Roboto', sans-serif;
|
|
10
|
+
//$content-font: 'Roboto', sans-serif;
|
|
11
|
+
//$buttons-font: Raleway, 'Raleway', sans-serif;
|
|
12
|
+
//$input-font: 'Roboto', sans-serif;
|
|
13
|
+
$menu-font: Poppins, 'Poppins', sans-serif;
|
|
14
|
+
$main-font: Poppins, 'Poppins', sans-serif;
|
|
15
|
+
//$sub-menu-font: Inter, 'Inter', sans-serif;
|
|
16
|
+
$font-size: 14px;
|
|
17
|
+
$txt-color: rgba(0, 0, 0, 0.87);
|
|
18
|
+
$table-title-color: rgba(0,0,0,.54);;
|
|
19
|
+
$txt-grey-color: #454e5e;
|
|
20
|
+
$header-gradient: linear-gradient(90deg,#0d56aa,#0d56ab);
|
|
21
|
+
$poppins-font: Poppins, 'Poppins', sans-serif;
|
|
22
|
+
|
|
23
|
+
$icon-color: #8E9FB7;
|
|
24
|
+
$active-color: #0D56AA;
|
|
25
|
+
$icon-box-color: #0773BC;
|
|
26
|
+
$mark-color: #009FDB;
|
|
27
|
+
$hover-color: #0985A0;
|
|
28
|
+
$error-color: #C73636;
|
|
29
|
+
$main-txt-color: #333;
|
|
30
|
+
|
|
31
|
+
$table-border-color: rgba(0, 0, 0, 0.12);
|
|
32
|
+
$input-border-color: rgba(0, 0, 0, 0.30);
|
|
33
|
+
$bg-color: #F7F9FB;
|
|
34
|
+
|
|
35
|
+
$error-bg-color: #f2dede;
|
|
36
|
+
$error-border-color: #ebccd1;
|
|
37
|
+
$error-txt-color: #bc1e1b;
|
|
38
|
+
$qob-error-color: #E70707;
|
|
39
|
+
|
|
40
|
+
$warning-bg-color: #fcf8e3;
|
|
41
|
+
$warning-border-color: #e5e1cd;
|
|
42
|
+
$warning-txt-color: #8a6d3b;
|
|
43
|
+
|
|
44
|
+
$success-bg-color: #e3f4dc;
|
|
45
|
+
$success-border-color: #b3d692;
|
|
46
|
+
$success-txt-color: #3c763d;
|
|
47
|
+
|
|
48
|
+
$read-only-txt-color: rgba(0, 0, 0, 0.38);
|
|
49
|
+
$my-menu-txt-color: #555555;
|
|
50
|
+
|
|
51
|
+
$page-background-color: #F3F6F6;
|
|
52
|
+
$disabled-button-text-color: #BABCC5;
|
|
53
|
+
$dark-elements-color: #2C355D;
|
|
54
|
+
$dark-disabled-btn-color: #DFE3E7;
|
|
55
|
+
$disabled-color: #DFE3E7;
|
|
56
|
+
$link-color: #0985A0;
|
|
57
|
+
$title-color: #0985A0;
|
|
58
|
+
$active-link-color: #0985A0;
|
|
59
|
+
$text-color: #646464;
|
|
60
|
+
$light-border-color: #DEE5EA;
|
|
61
|
+
$icon-background: #D2E5E5;
|
|
62
|
+
|
|
63
|
+
// QOB style
|
|
64
|
+
$navy: #2399DA;
|
|
65
|
+
$dark-blue: #2C355D;
|
|
66
|
+
$qob-danger-color: #E70707;
|
|
67
|
+
$qob-disabled-color: #D4D4D4;
|
|
68
|
+
|
|
69
|
+
// WEBEX STYLE
|
|
70
|
+
|
|
71
|
+
$webex-body-bg: #f7f7f7;
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
$webex-icon-bg: #d0d0d0;
|
|
75
|
+
$webex-icon-color: #2a2a2a;
|
|
76
|
+
$webex-text-color: #252525;
|
|
77
|
+
|
|
78
|
+
$webex-tr-hover-bg: #ededed;
|
|
79
|
+
$webex-tr-border: #dedede;
|
|
80
|
+
|
|
81
|
+
$webex-table-th-bg: #f7f7f7;
|
|
82
|
+
$webex-table-th-txt: #636363;
|
|
83
|
+
$webex-table-th-size: 12px;
|
|
84
|
+
|
|
85
|
+
$webex-table-td-bg: #fff;
|
|
86
|
+
$webex-table-td-txt: #636363;
|
|
87
|
+
$webex-table-td-size: 14px;
|
|
88
|
+
|
|
89
|
+
$webex-pagination-txt: #636363;
|
|
90
|
+
$webex-pagination-hover-bg: #ededed;
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
.mat-form-field {
|
|
96
|
+
padding: 0 0 5px 0;
|
|
97
|
+
width: 93%;
|
|
98
|
+
}
|
|
99
|
+
.mat-form-field.mat-form-field-disabled {
|
|
100
|
+
border-bottom: none;
|
|
101
|
+
}
|
|
102
|
+
.mat-error {
|
|
103
|
+
color: $error-color;
|
|
104
|
+
margin: 13px 0 0 0;
|
|
105
|
+
}
|
|
106
|
+
.select-box {
|
|
107
|
+
border-radius: 30px;
|
|
108
|
+
background: #F3F6F6;
|
|
109
|
+
border: 1px solid #E2E9EF;
|
|
110
|
+
height: 35px;
|
|
111
|
+
position: relative;
|
|
112
|
+
|
|
113
|
+
select {
|
|
114
|
+
border: none !important;
|
|
115
|
+
background: transparent;
|
|
116
|
+
height: 100%;
|
|
117
|
+
width: 92%;
|
|
118
|
+
margin: auto;
|
|
119
|
+
display: block;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
option:focus, option:focus-visible {
|
|
125
|
+
border: none !important;
|
|
126
|
+
outline: none !important;
|
|
127
|
+
}
|
|
128
|
+
option {
|
|
129
|
+
height: 30px;
|
|
130
|
+
cursor: pointer;
|
|
131
|
+
color: $webex-pagination-txt;
|
|
132
|
+
}
|
|
133
|
+
option:hover {
|
|
134
|
+
background: $webex-pagination-hover-bg !important;
|
|
135
|
+
}
|
|
136
|
+
.mat-select {
|
|
137
|
+
height: 100%;
|
|
138
|
+
line-height: 35px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
.mat-select{
|
|
144
|
+
line-height: 20px !important;
|
|
145
|
+
}
|
|
146
|
+
.mat-form-field-appearance-outline .mat-form-field-infix {
|
|
147
|
+
padding: 14px 12px 10px;
|
|
148
|
+
border-top: 0;
|
|
149
|
+
max-width: 300px;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.mat-tab-group{
|
|
153
|
+
font-family: "Inter", sans-serif;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.mat-tab-label{
|
|
157
|
+
font-weight: 500 !important;
|
|
158
|
+
font-size: 14px !important;
|
|
159
|
+
height: auto !important;
|
|
160
|
+
min-width: auto !important;
|
|
161
|
+
padding: 0 !important;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.mat-ink-bar{
|
|
165
|
+
background-color: rgba(0, 0, 0, 0.9) !important;
|
|
166
|
+
height: 3px !important;
|
|
167
|
+
}
|
|
168
|
+
.mat-form-field-wrapper{
|
|
169
|
+
padding-bottom: 0 !important;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.mat-form-field{
|
|
173
|
+
padding: 0;
|
|
174
|
+
max-width: 300px;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
.fa:hover {
|
|
179
|
+
color: #0d56aa!important;
|
|
180
|
+
}
|
|
181
|
+
.mat-icon-button {
|
|
182
|
+
background: transparent;
|
|
183
|
+
}
|
|
184
|
+
.icon-webex-box {
|
|
185
|
+
width: 2rem;
|
|
186
|
+
height: 2rem;
|
|
187
|
+
font-size: .7rem;
|
|
188
|
+
line-height: 1rem;
|
|
189
|
+
display: inline-block;
|
|
190
|
+
background: $webex-icon-bg;
|
|
191
|
+
border-radius: 2rem;
|
|
192
|
+
line-height: 40px;
|
|
193
|
+
text-align: center;
|
|
194
|
+
}
|
|
195
|
+
.icon-webex {
|
|
196
|
+
filter: invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);
|
|
197
|
+
background-repeat: no-repeat;
|
|
198
|
+
background-position: center;
|
|
199
|
+
display: inline-block;
|
|
200
|
+
height: 1rem;
|
|
201
|
+
width: 1rem;
|
|
202
|
+
}
|
|
203
|
+
.icon-webex-user {
|
|
204
|
+
background-image: url('../assets/icons/icon_user.svg');
|
|
205
|
+
}
|
|
206
|
+
.icon-user-status {
|
|
207
|
+
display: inline-block;
|
|
208
|
+
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
*{
|
|
216
|
+
margin: 0;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
body {
|
|
220
|
+
background: $webex-body-bg;
|
|
221
|
+
}
|
|
222
|
+
body, th, td {
|
|
223
|
+
font-family: $main-font;
|
|
224
|
+
font-size: 14px;
|
|
225
|
+
}
|
|
226
|
+
th {
|
|
227
|
+
color: rgba(0,0,0,.54);
|
|
228
|
+
text-align: left;
|
|
229
|
+
}
|
|
230
|
+
td {
|
|
231
|
+
box-sizing: border-box;
|
|
232
|
+
padding: 10px 5px 10px 0;
|
|
233
|
+
}
|
|
234
|
+
.content-box {
|
|
235
|
+
margin: auto;
|
|
236
|
+
position: relative;
|
|
237
|
+
width: 70%;
|
|
238
|
+
|
|
239
|
+
table {
|
|
240
|
+
width: 100%
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
.edit-icon-td {
|
|
244
|
+
width: 50px;
|
|
245
|
+
position: relative;
|
|
246
|
+
|
|
247
|
+
button {
|
|
248
|
+
position: absolute;
|
|
249
|
+
top: 4px;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
.mat-progress-spinner circle, .mat-spinner circle {
|
|
253
|
+
stroke: #009fdb!important;
|
|
254
|
+
}
|
|
255
|
+
.data-loader {
|
|
256
|
+
position: absolute;
|
|
257
|
+
top: calc(50% - 25px);
|
|
258
|
+
left: calc(50% - 25px);
|
|
259
|
+
}
|
|
260
|
+
.flex-box {
|
|
261
|
+
display: flex;
|
|
262
|
+
justify-content: flex-start;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.user-info-box {
|
|
266
|
+
background: white;
|
|
267
|
+
display: grid;
|
|
268
|
+
grid-template-columns: 30% 70%;
|
|
269
|
+
border-radius: 8px;
|
|
270
|
+
border: rgba(0, 0, 0, 0.2) 1px solid;
|
|
271
|
+
padding: 24px;
|
|
272
|
+
font-weight: 400;
|
|
273
|
+
font-size: 14px;
|
|
274
|
+
|
|
275
|
+
h3 {
|
|
276
|
+
display: block;
|
|
277
|
+
font-weight: 500;
|
|
278
|
+
font-size: 16px;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
.mat-divider{
|
|
282
|
+
margin: 5px 0 !important;
|
|
283
|
+
}
|
|
284
|
+
.info-boxes-container {
|
|
285
|
+
padding: 24px 0;
|
|
286
|
+
display: flex;
|
|
287
|
+
flex-direction: column;
|
|
288
|
+
gap: 24px;
|
|
289
|
+
}
|
|
290
|
+
.header-box {
|
|
291
|
+
height: 60px;
|
|
292
|
+
width: 100%;
|
|
293
|
+
line-height: 60px;
|
|
294
|
+
background: white;
|
|
295
|
+
border-bottom: 1px solid #dedddd;
|
|
296
|
+
|
|
297
|
+
.header-back-block {
|
|
298
|
+
float: left;
|
|
299
|
+
}
|
|
300
|
+
.header-button-block {
|
|
301
|
+
float: right;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
.webex-table {
|
|
307
|
+
width: 100%;
|
|
308
|
+
margin: auto;
|
|
309
|
+
|
|
310
|
+
tr {
|
|
311
|
+
border-bottom: 1px solid $webex-tr-border;
|
|
312
|
+
}
|
|
313
|
+
th {
|
|
314
|
+
background: $webex-table-th-bg;
|
|
315
|
+
color: $webex-table-th-txt;
|
|
316
|
+
font-size: $webex-table-th-size;
|
|
317
|
+
}
|
|
318
|
+
td {
|
|
319
|
+
background: $webex-table-td-bg;
|
|
320
|
+
color: $webex-table-td-txt;
|
|
321
|
+
font-size: $webex-table-td-size;
|
|
322
|
+
}
|
|
323
|
+
tr:hover td {
|
|
324
|
+
background: $webex-tr-hover-bg;
|
|
325
|
+
cursor: pointer;
|
|
326
|
+
}
|
|
327
|
+
th.mat-header-cell, td.mat-cell, td.mat-footer-cell {
|
|
328
|
+
border-bottom: 1px solid $webex-tr-border;
|
|
329
|
+
}
|
|
330
|
+
tr.mat-header-row {
|
|
331
|
+
height: 37px;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
.mat-form-field {
|
|
337
|
+
padding: 0 0 5px 0;
|
|
338
|
+
width: 93%;
|
|
339
|
+
}
|
|
340
|
+
.mat-form-field.mat-form-field-disabled {
|
|
341
|
+
border-bottom: none;
|
|
342
|
+
}
|
|
343
|
+
.mat-error {
|
|
344
|
+
color: $error-color;
|
|
345
|
+
margin: 13px 0 0 0;
|
|
346
|
+
}
|
|
347
|
+
.select-box {
|
|
348
|
+
border-radius: 30px;
|
|
349
|
+
background: #F3F6F6;
|
|
350
|
+
border: 1px solid #E2E9EF;
|
|
351
|
+
height: 35px;
|
|
352
|
+
position: relative;
|
|
353
|
+
|
|
354
|
+
select {
|
|
355
|
+
border: none !important;
|
|
356
|
+
background: transparent;
|
|
357
|
+
height: 100%;
|
|
358
|
+
width: 92%;
|
|
359
|
+
margin: auto;
|
|
360
|
+
display: block;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
option:focus, option:focus-visible {
|
|
366
|
+
border: none !important;
|
|
367
|
+
outline: none !important;
|
|
368
|
+
}
|
|
369
|
+
option {
|
|
370
|
+
height: 30px;
|
|
371
|
+
cursor: pointer;
|
|
372
|
+
color: $webex-pagination-txt;
|
|
373
|
+
}
|
|
374
|
+
option:hover {
|
|
375
|
+
background: $webex-pagination-hover-bg !important;
|
|
376
|
+
}
|
|
377
|
+
.mat-select {
|
|
378
|
+
height: 100% !important;
|
|
379
|
+
line-height: 35px !important;
|
|
380
|
+
}
|
|
381
|
+
.info-holder, .input-holder {
|
|
382
|
+
display: grid;
|
|
383
|
+
grid-template-columns: 30% 70%;
|
|
384
|
+
align-items: baseline;
|
|
385
|
+
|
|
386
|
+
&__name{
|
|
387
|
+
font-weight: 500 !important;
|
|
388
|
+
font-size: 14px !important;
|
|
389
|
+
}
|
|
390
|
+
&__inputs{
|
|
391
|
+
& .input-holder{
|
|
392
|
+
display: grid;
|
|
393
|
+
grid-template-columns: 30% 70%;
|
|
394
|
+
align-items: baseline;
|
|
395
|
+
&__name{
|
|
396
|
+
font-weight: 400 !important;
|
|
397
|
+
font-size: 14px !important;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
.mat-form-field-wrapper {
|
|
403
|
+
height: 30px !important;
|
|
404
|
+
}
|
|
405
|
+
.mat-form-field-flex{
|
|
406
|
+
height: 30px !important;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.mat-form-field-appearance-outline .mat-form-field-outline{
|
|
410
|
+
height: 35px !important;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.mat-form-field-outline .mat-form-field-outline-thick{
|
|
414
|
+
height: 35px !important;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.mat-select{
|
|
418
|
+
line-height: 20px !important;
|
|
419
|
+
}
|
|
420
|
+
.mat-form-field-appearance-outline .mat-form-field-infix {
|
|
421
|
+
padding: 14px 12px 10px;
|
|
422
|
+
border-top: 0;
|
|
423
|
+
max-width: 300px;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.mat-tab-group{
|
|
427
|
+
font-family: "Inter", sans-serif;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.mat-tab-label{
|
|
431
|
+
font-weight: 500 !important;
|
|
432
|
+
font-size: 14px !important;
|
|
433
|
+
height: auto !important;
|
|
434
|
+
min-width: auto !important;
|
|
435
|
+
padding: 0 !important;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.mat-ink-bar{
|
|
439
|
+
background-color: rgba(0, 0, 0, 0.9) !important;
|
|
440
|
+
height: 3px !important;
|
|
441
|
+
}
|
|
442
|
+
.mat-form-field-wrapper{
|
|
443
|
+
padding-bottom: 0;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.mat-form-field{
|
|
447
|
+
padding: 0;
|
|
448
|
+
max-width: 300px;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.mat-divider{
|
|
452
|
+
margin: 12px 0;
|
|
453
|
+
}
|
|
454
|
+
table {
|
|
455
|
+
border-collapse: collapse;
|
|
456
|
+
border-spacing: 0;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.mat-form-field-appearance-outline .mat-form-field-infix {
|
|
460
|
+
padding: 0px !important;
|
|
461
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
2
|
+
import { FormGroup, Validators } from '@angular/forms';
|
|
3
|
+
import { UserService } from './services/user.service';
|
|
4
|
+
import { APIService } from "./services/api.service";
|
|
5
|
+
import { SimplifiedUser } from './classes/simplified-user';
|
|
6
|
+
|
|
7
|
+
@Component({
|
|
8
|
+
selector: 'app-user-manage-widget',
|
|
9
|
+
templateUrl: './user-manage-widget.component.html',
|
|
10
|
+
styleUrls: ['./user-manage-widget.component.scss'],
|
|
11
|
+
})
|
|
12
|
+
export class UserManageWidgetComponent implements OnInit {
|
|
13
|
+
|
|
14
|
+
public dataPending!: boolean;
|
|
15
|
+
|
|
16
|
+
@Output() onSave = new EventEmitter<string>();
|
|
17
|
+
@Input() token!: string;
|
|
18
|
+
@Input() siteId!: number;
|
|
19
|
+
@Input() userId!: string;
|
|
20
|
+
|
|
21
|
+
get form(): FormGroup {
|
|
22
|
+
return this.userService?.user?.form;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
get user(): SimplifiedUser {
|
|
26
|
+
return this.userService.user;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
get userName(): string {
|
|
30
|
+
return `${this.user?.firstName || ''} ${this.user?.lastName || ''}`;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
constructor(
|
|
35
|
+
public userService: UserService,
|
|
36
|
+
private apiService: APIService,
|
|
37
|
+
) {
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
ngOnInit(): void {
|
|
41
|
+
this.apiService.token = this.token;
|
|
42
|
+
this.getData();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
public onChangeField(token: string): void {
|
|
46
|
+
if (!token) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
(this.userService.user as any)[token] = this.form?.get(token)?.value;
|
|
50
|
+
|
|
51
|
+
if (token === 'middleName') {
|
|
52
|
+
this.form?.get(token)?.setValidators([Validators.pattern('[ a-zA-Z-]+')]);
|
|
53
|
+
}
|
|
54
|
+
if (token === 'telephoneNumber' || token === 'mobileNumber' || token === 'pagerNumber' || token === 'homeNumber') {
|
|
55
|
+
this.form?.get(token)?.setValidators([Validators.pattern('[ 0-9-+]+')]);
|
|
56
|
+
}
|
|
57
|
+
this.form?.get(token)?.updateValueAndValidity();
|
|
58
|
+
this.validateUserId();
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
public saveChanges(): void {
|
|
62
|
+
this.onSave.next("start saving..");
|
|
63
|
+
if (!this.userService.hasUnsavedChanges() || this.form?.invalid) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
this.userService.persistCacheChanges()
|
|
67
|
+
.subscribe(() => {
|
|
68
|
+
this.onSave.next("saved");
|
|
69
|
+
})
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
public toggleEditMode() {
|
|
73
|
+
this.userService.user.toggleEditMode();
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
public isSavingDisabled(): boolean {
|
|
77
|
+
return !this.userService.hasUnsavedChanges() || this.userService.hasExistedUserId;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
public changeField(token: string): void {
|
|
81
|
+
const formField = this.user?.form?.get(token);
|
|
82
|
+
if (token !== 'confirmDigestCredentials') {
|
|
83
|
+
// @ts-ignore
|
|
84
|
+
this.user[token] = formField?.value;
|
|
85
|
+
}
|
|
86
|
+
if (token === 'digestCredentials' || token === 'confirmDigestCredentials') {
|
|
87
|
+
this.digestCredentialsHandler(token, formField);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
private digestCredentialsHandler(token: string, field: any) {
|
|
92
|
+
const fieldNameToCompare = token === 'digestCredentials' ? 'confirmDigestCredentials' : 'digestCredentials';
|
|
93
|
+
const fieldToCompare = this.userService.user.form.get(fieldNameToCompare);
|
|
94
|
+
if (this.userService.user?.form?.get(token)) {
|
|
95
|
+
this.userService.user?.form?.get(token)?.setErrors(null);
|
|
96
|
+
this.userService.user?.form?.get(fieldNameToCompare)?.setErrors(null);
|
|
97
|
+
|
|
98
|
+
/* if (!field.value && !fieldToCompare.value) {
|
|
99
|
+
this.userService.user?.digestCredentials = null;
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (!field.value && fieldToCompare.value || !fieldToCompare.value && field.value) {
|
|
104
|
+
const requiredFieldName = field.value ? fieldNameToCompare : token;
|
|
105
|
+
this.userService.user.form.get(requiredFieldName).setErrors({required: true});
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (field.value && fieldToCompare.value && field.value !== fieldToCompare.value) {
|
|
109
|
+
this.userService.user.form.get(token).setErrors({mismatch: true});
|
|
110
|
+
this.userService.user.form.get(fieldNameToCompare).setErrors({mismatch: true});
|
|
111
|
+
}*/
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
private getData() {
|
|
117
|
+
this.dataPending = true;
|
|
118
|
+
this.userService.fetchUserToken(this.siteId, this.userId)
|
|
119
|
+
.subscribe({
|
|
120
|
+
complete: (v: any) => {
|
|
121
|
+
this.dataPending = false;
|
|
122
|
+
},
|
|
123
|
+
error: (e: any) => this.dataPending = false,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
private setCookie(name: string, value: string, days: number) {
|
|
128
|
+
var expires = "";
|
|
129
|
+
if (days) {
|
|
130
|
+
var date = new Date();
|
|
131
|
+
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
|
132
|
+
expires = "; expires=" + date.toUTCString();
|
|
133
|
+
}
|
|
134
|
+
document.cookie = name + "=" + (value || "") + expires + "; path=/";
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
private validateUserId() {
|
|
138
|
+
const idControl = this.form.get('userid');
|
|
139
|
+
if (idControl?.value !== '' && idControl?.value !== this.userService.originUser.userid) {
|
|
140
|
+
this.userService.fetchUserById(idControl?.value)
|
|
141
|
+
.subscribe(
|
|
142
|
+
(res: any) => {
|
|
143
|
+
this.userService.userIdExistPending = false;
|
|
144
|
+
idControl?.setErrors({exist: true});
|
|
145
|
+
if (this.form?.get('userid')?.hasError('exist')) {
|
|
146
|
+
this.userService.hasExistedUserId = true;
|
|
147
|
+
} else {
|
|
148
|
+
this.userService.hasExistedUserId = false;
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
((error) => {
|
|
152
|
+
this.userService.userIdExistPending = false;
|
|
153
|
+
if (error.status !== 404) {
|
|
154
|
+
// this.notificationService.warning(this.translate.instant('APP_USER_MSG.CHECK_USER_ID_FAILED'));
|
|
155
|
+
} else {
|
|
156
|
+
this.userService.user.newUserId = this.form?.get('userid')?.value
|
|
157
|
+
}
|
|
158
|
+
}));
|
|
159
|
+
} else {
|
|
160
|
+
delete this.userService?.user?.newUserId;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
3
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
4
|
+
import { APIService } from './services/api.service';
|
|
5
|
+
import { AppLoaderComponent } from './utils/app-loader/app-loader';
|
|
6
|
+
import { UserService } from './services/user.service';
|
|
7
|
+
import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
|
|
8
|
+
import { AuthInterceptor } from './interseptors/auth.interceptor';
|
|
9
|
+
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
10
|
+
import { CommonModule } from '@angular/common';
|
|
11
|
+
import { UserInfoComponent } from './user-info/user-info.component';
|
|
12
|
+
import { MaterialModule } from './material.module';
|
|
13
|
+
import { NotificationService } from './services/notification.service';
|
|
14
|
+
import { NotificationsComponent } from './notifications/notification.component';
|
|
15
|
+
import { UsersSearchService } from './services/users-search.service';
|
|
16
|
+
import { PaginationComponent } from './utils/pagination/pagination.component';
|
|
17
|
+
import { RemoveKynFromIBMService } from './services/removeKynFromIBM.service';
|
|
18
|
+
import { SiteSettingsService } from './services/site-settings.service';
|
|
19
|
+
import { LazyLoadingSelectComponent } from './lazy-loading-select/lazy-loading-select.component';
|
|
20
|
+
import { UserManageWidgetComponent } from './user-manage-widget.component';
|
|
21
|
+
|
|
22
|
+
@NgModule({
|
|
23
|
+
declarations: [
|
|
24
|
+
AppLoaderComponent,
|
|
25
|
+
UserInfoComponent,
|
|
26
|
+
NotificationsComponent,
|
|
27
|
+
PaginationComponent,
|
|
28
|
+
LazyLoadingSelectComponent,
|
|
29
|
+
UserManageWidgetComponent
|
|
30
|
+
],
|
|
31
|
+
imports: [
|
|
32
|
+
CommonModule,
|
|
33
|
+
BrowserModule,
|
|
34
|
+
BrowserAnimationsModule,
|
|
35
|
+
FormsModule,
|
|
36
|
+
ReactiveFormsModule,
|
|
37
|
+
HttpClientModule,
|
|
38
|
+
MaterialModule,
|
|
39
|
+
],
|
|
40
|
+
providers: [
|
|
41
|
+
APIService,
|
|
42
|
+
UserService,
|
|
43
|
+
NotificationService,
|
|
44
|
+
UsersSearchService,
|
|
45
|
+
RemoveKynFromIBMService,
|
|
46
|
+
SiteSettingsService,
|
|
47
|
+
{provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true}
|
|
48
|
+
],
|
|
49
|
+
exports: [UserManageWidgetComponent]
|
|
50
|
+
|
|
51
|
+
})
|
|
52
|
+
export class UserManageModule {
|
|
53
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Component, ViewEncapsulation } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'app-loader',
|
|
5
|
+
templateUrl: './app-loader.component.html',
|
|
6
|
+
styleUrls: ['./app-loader.component.scss'],
|
|
7
|
+
encapsulation: ViewEncapsulation.None,
|
|
8
|
+
})
|
|
9
|
+
export class AppLoaderComponent {
|
|
10
|
+
constructor() {
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
}
|