@tuki-io/tuki-widgets 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/karma.conf.js +44 -0
  2. package/ng-package.json +7 -0
  3. package/package.json +3 -39
  4. package/src/lib/widgets.component.spec.ts +23 -0
  5. package/src/lib/widgets.component.ts +20 -0
  6. package/src/lib/widgets.module.ts +16 -0
  7. package/src/lib/widgets.service.spec.ts +16 -0
  8. package/src/lib/widgets.service.ts +9 -0
  9. package/{public-api.d.ts → src/public-api.ts} +4 -0
  10. package/src/test.ts +27 -0
  11. package/styles/_variables.scss +90 -0
  12. package/styles/form.scss +231 -0
  13. package/styles/icons.scss +32 -0
  14. package/styles/styles.scss +110 -0
  15. package/styles/tables.scss +30 -0
  16. package/tsconfig.lib.json +36 -0
  17. package/tsconfig.lib.prod.json +10 -0
  18. package/tsconfig.spec.json +17 -0
  19. package/user-manage/ng-package.json +7 -0
  20. package/user-manage/src/app.constants.ts +38 -0
  21. package/user-manage/src/classes/device.ts +225 -0
  22. package/user-manage/src/classes/line.ts +117 -0
  23. package/user-manage/src/classes/notification.ts +39 -0
  24. package/user-manage/src/classes/pagination.ts +18 -0
  25. package/user-manage/src/classes/simplified-user.ts +128 -0
  26. package/user-manage/src/classes/table-data.ts +6 -0
  27. package/user-manage/src/classes/user-interface.ts +225 -0
  28. package/user-manage/src/classes/user-list.ts +40 -0
  29. package/user-manage/src/classes/user.ts +8 -0
  30. package/user-manage/src/common-functions.ts +16 -0
  31. package/user-manage/src/environments/environment.prod.ts +9 -0
  32. package/user-manage/src/environments/environment.ts +10 -0
  33. package/user-manage/src/interseptors/auth.interceptor.ts +36 -0
  34. package/user-manage/src/lazy-loading-select/lazy-loading-select.component.html +50 -0
  35. package/user-manage/src/lazy-loading-select/lazy-loading-select.component.scss +3 -0
  36. package/user-manage/src/lazy-loading-select/lazy-loading-select.component.ts +81 -0
  37. package/user-manage/src/material.module.ts +85 -0
  38. package/user-manage/src/notifications/notification.component.html +33 -0
  39. package/user-manage/src/notifications/notification.component.scss +84 -0
  40. package/user-manage/src/notifications/notification.component.ts +46 -0
  41. package/user-manage/src/removeKynFromIBM.service.ts +25 -0
  42. package/user-manage/src/services/api.service.ts +90 -0
  43. package/user-manage/src/services/notification.service.ts +68 -0
  44. package/user-manage/src/services/removeKynFromIBM.service.ts +25 -0
  45. package/user-manage/src/services/site-settings.service.ts +35 -0
  46. package/user-manage/src/services/user.service.ts +120 -0
  47. package/user-manage/src/services/users-search.service.ts +58 -0
  48. package/user-manage/src/services/utils.service.ts +71 -0
  49. package/user-manage/src/styles/_variables.scss +90 -0
  50. package/user-manage/src/styles/form.scss +231 -0
  51. package/user-manage/src/styles/icons.scss +32 -0
  52. package/user-manage/src/styles/styles.scss +110 -0
  53. package/user-manage/src/styles/tables.scss +30 -0
  54. package/user-manage/src/user-details/notification.service.ts +68 -0
  55. package/user-manage/src/user-info/user-info.component.html +32 -0
  56. package/user-manage/src/user-info/user-info.component.scss +53 -0
  57. package/user-manage/src/user-info/user-info.component.ts +19 -0
  58. package/user-manage/src/user-manage-widget.component.html +291 -0
  59. package/user-manage/src/user-manage-widget.component.scss +461 -0
  60. package/user-manage/src/user-manage-widget.component.ts +165 -0
  61. package/user-manage/src/user-manage.module.ts +53 -0
  62. package/user-manage/src/utils/app-loader/app-loader.component.html +6 -0
  63. package/user-manage/src/utils/app-loader/app-loader.component.scss +11 -0
  64. package/user-manage/src/utils/app-loader/app-loader.ts +13 -0
  65. package/user-manage/src/utils/pagination/pagination.component.html +26 -0
  66. package/user-manage/src/utils/pagination/pagination.component.scss +41 -0
  67. package/user-manage/src/utils/pagination/pagination.component.ts +41 -0
  68. package/users-list/ng-package.json +6 -0
  69. package/users-list/src/app.constants.ts +35 -0
  70. package/users-list/src/classes/device.ts +225 -0
  71. package/users-list/src/classes/line.ts +117 -0
  72. package/users-list/src/classes/notification.ts +38 -0
  73. package/users-list/src/classes/pagination.ts +18 -0
  74. package/users-list/src/classes/simlified-user.ts +74 -0
  75. package/users-list/src/classes/table-data.ts +6 -0
  76. package/users-list/src/classes/user-interface.ts +225 -0
  77. package/users-list/src/classes/user-list.ts +40 -0
  78. package/users-list/src/classes/user.ts +8 -0
  79. package/users-list/src/material.module.ts +84 -0
  80. package/users-list/src/services/api.service.ts +90 -0
  81. package/users-list/src/services/events-communication.service.ts +11 -0
  82. package/users-list/src/services/notification.service.ts +68 -0
  83. package/users-list/src/services/removeKynFromIBM.service.ts +25 -0
  84. package/users-list/src/services/user.service.ts +117 -0
  85. package/users-list/src/services/users-search.service.ts +58 -0
  86. package/users-list/src/users-list.component.css +4 -0
  87. package/users-list/src/users-list.component.css.map +1 -0
  88. package/users-list/src/users-list.component.html +39 -0
  89. package/users-list/src/users-list.component.scss +9 -0
  90. package/users-list/src/users-list.component.ts +87 -0
  91. package/users-list/src/users-list.module.ts +36 -0
  92. package/users-list/src/utils/app-loader/app-loader.component.css +11 -0
  93. package/users-list/src/utils/app-loader/app-loader.component.css.map +1 -0
  94. package/users-list/src/utils/app-loader/app-loader.component.html +6 -0
  95. package/users-list/src/utils/app-loader/app-loader.component.scss +11 -0
  96. package/users-list/src/utils/app-loader/app-loader.ts +13 -0
  97. package/users-list/src/utils/common-functions.ts +16 -0
  98. package/users-list/src/utils/notifications/notification.component.html +33 -0
  99. package/users-list/src/utils/notifications/notification.component.scss +84 -0
  100. package/users-list/src/utils/notifications/notification.component.ts +46 -0
  101. package/users-list/src/utils/pagination/pagination.component.css +45 -0
  102. package/users-list/src/utils/pagination/pagination.component.css.map +1 -0
  103. package/users-list/src/utils/pagination/pagination.component.html +26 -0
  104. package/users-list/src/utils/pagination/pagination.component.scss +41 -0
  105. package/users-list/src/utils/pagination/pagination.component.ts +41 -0
  106. package/users-list/src/utils/utils.service.ts +71 -0
  107. package/esm2020/lib/widgets.component.mjs +0 -22
  108. package/esm2020/lib/widgets.module.mjs +0 -21
  109. package/esm2020/lib/widgets.service.mjs +0 -14
  110. package/esm2020/public-api.mjs +0 -7
  111. package/esm2020/tuki-io-tuki-widgets.mjs +0 -5
  112. package/esm2020/user-manage/public-api.mjs +0 -7
  113. package/esm2020/user-manage/src/app.constants.mjs +0 -38
  114. package/esm2020/user-manage/src/classes/device.mjs +0 -7
  115. package/esm2020/user-manage/src/classes/line.mjs +0 -9
  116. package/esm2020/user-manage/src/classes/notification.mjs +0 -32
  117. package/esm2020/user-manage/src/classes/pagination.mjs +0 -8
  118. package/esm2020/user-manage/src/classes/simplified-user.mjs +0 -82
  119. package/esm2020/user-manage/src/classes/table-data.mjs +0 -2
  120. package/esm2020/user-manage/src/classes/user-list.mjs +0 -10
  121. package/esm2020/user-manage/src/common-functions.mjs +0 -19
  122. package/esm2020/user-manage/src/environments/environment.mjs +0 -11
  123. package/esm2020/user-manage/src/interseptors/auth.interceptor.mjs +0 -37
  124. package/esm2020/user-manage/src/lazy-loading-select/lazy-loading-select.component.mjs +0 -74
  125. package/esm2020/user-manage/src/material.module.mjs +0 -188
  126. package/esm2020/user-manage/src/notifications/notification.component.mjs +0 -35
  127. package/esm2020/user-manage/src/removeKynFromIBM.service.mjs +0 -25
  128. package/esm2020/user-manage/src/services/api.service.mjs +0 -79
  129. package/esm2020/user-manage/src/services/notification.service.mjs +0 -62
  130. package/esm2020/user-manage/src/services/removeKynFromIBM.service.mjs +0 -25
  131. package/esm2020/user-manage/src/services/site-settings.service.mjs +0 -36
  132. package/esm2020/user-manage/src/services/user.service.mjs +0 -108
  133. package/esm2020/user-manage/src/services/users-search.service.mjs +0 -49
  134. package/esm2020/user-manage/src/services/utils.service.mjs +0 -73
  135. package/esm2020/user-manage/src/user-info/user-info.component.mjs +0 -20
  136. package/esm2020/user-manage/src/user-manage-widget.component.mjs +0 -159
  137. package/esm2020/user-manage/src/user-manage.module.mjs +0 -84
  138. package/esm2020/user-manage/src/utils/app-loader/app-loader.mjs +0 -14
  139. package/esm2020/user-manage/src/utils/pagination/pagination.component.mjs +0 -43
  140. package/esm2020/user-manage/tuki-io-tuki-widgets-user-manage.mjs +0 -5
  141. package/esm2020/users-list/public-api.mjs +0 -9
  142. package/esm2020/users-list/src/app.constants.mjs +0 -35
  143. package/esm2020/users-list/src/classes/device.mjs +0 -7
  144. package/esm2020/users-list/src/classes/line.mjs +0 -9
  145. package/esm2020/users-list/src/classes/notification.mjs +0 -31
  146. package/esm2020/users-list/src/classes/pagination.mjs +0 -8
  147. package/esm2020/users-list/src/classes/simlified-user.mjs +0 -50
  148. package/esm2020/users-list/src/classes/table-data.mjs +0 -2
  149. package/esm2020/users-list/src/classes/user-list.mjs +0 -10
  150. package/esm2020/users-list/src/material.module.mjs +0 -188
  151. package/esm2020/users-list/src/services/api.service.mjs +0 -78
  152. package/esm2020/users-list/src/services/events-communication.service.mjs +0 -14
  153. package/esm2020/users-list/src/services/notification.service.mjs +0 -62
  154. package/esm2020/users-list/src/services/removeKynFromIBM.service.mjs +0 -25
  155. package/esm2020/users-list/src/services/user.service.mjs +0 -105
  156. package/esm2020/users-list/src/services/users-search.service.mjs +0 -49
  157. package/esm2020/users-list/src/users-list.component.mjs +0 -75
  158. package/esm2020/users-list/src/users-list.module.mjs +0 -58
  159. package/esm2020/users-list/src/utils/common-functions.mjs +0 -19
  160. package/esm2020/users-list/src/utils/pagination/pagination.component.mjs +0 -43
  161. package/esm2020/users-list/src/utils/utils.service.mjs +0 -73
  162. package/esm2020/users-list/tuki-io-tuki-widgets-users-list.mjs +0 -5
  163. package/fesm2015/tuki-io-tuki-widgets-user-manage.mjs +0 -1232
  164. package/fesm2015/tuki-io-tuki-widgets-user-manage.mjs.map +0 -1
  165. package/fesm2015/tuki-io-tuki-widgets-users-list.mjs +0 -869
  166. package/fesm2015/tuki-io-tuki-widgets-users-list.mjs.map +0 -1
  167. package/fesm2015/tuki-io-tuki-widgets.mjs +0 -63
  168. package/fesm2015/tuki-io-tuki-widgets.mjs.map +0 -1
  169. package/fesm2020/tuki-io-tuki-widgets-user-manage.mjs +0 -1219
  170. package/fesm2020/tuki-io-tuki-widgets-user-manage.mjs.map +0 -1
  171. package/fesm2020/tuki-io-tuki-widgets-users-list.mjs +0 -866
  172. package/fesm2020/tuki-io-tuki-widgets-users-list.mjs.map +0 -1
  173. package/fesm2020/tuki-io-tuki-widgets.mjs +0 -63
  174. package/fesm2020/tuki-io-tuki-widgets.mjs.map +0 -1
  175. package/index.d.ts +0 -5
  176. package/lib/widgets.component.d.ts +0 -8
  177. package/lib/widgets.module.d.ts +0 -7
  178. package/lib/widgets.service.d.ts +0 -6
  179. package/user-manage/index.d.ts +0 -5
  180. package/user-manage/src/app.constants.d.ts +0 -20
  181. package/user-manage/src/classes/device.d.ts +0 -224
  182. package/user-manage/src/classes/line.d.ts +0 -116
  183. package/user-manage/src/classes/notification.d.ts +0 -18
  184. package/user-manage/src/classes/pagination.d.ts +0 -13
  185. package/user-manage/src/classes/simplified-user.d.ts +0 -41
  186. package/user-manage/src/classes/table-data.d.ts +0 -5
  187. package/user-manage/src/classes/user-list.d.ts +0 -32
  188. package/user-manage/src/common-functions.d.ts +0 -1
  189. package/user-manage/src/environments/environment.d.ts +0 -9
  190. package/user-manage/src/interseptors/auth.interceptor.d.ts +0 -9
  191. package/user-manage/src/lazy-loading-select/lazy-loading-select.component.d.ts +0 -35
  192. package/user-manage/src/material.module.d.ts +0 -28
  193. package/user-manage/src/notifications/notification.component.d.ts +0 -19
  194. package/user-manage/src/removeKynFromIBM.service.d.ts +0 -8
  195. package/user-manage/src/services/api.service.d.ts +0 -20
  196. package/user-manage/src/services/notification.service.d.ts +0 -18
  197. package/user-manage/src/services/removeKynFromIBM.service.d.ts +0 -8
  198. package/user-manage/src/services/site-settings.service.d.ts +0 -9
  199. package/user-manage/src/services/user.service.d.ts +0 -26
  200. package/user-manage/src/services/users-search.service.d.ts +0 -25
  201. package/user-manage/src/services/utils.service.d.ts +0 -9
  202. package/user-manage/src/user-info/user-info.component.d.ts +0 -9
  203. package/user-manage/src/user-manage-widget.component.d.ts +0 -31
  204. package/user-manage/src/user-manage.module.d.ts +0 -18
  205. package/user-manage/src/utils/app-loader/app-loader.d.ts +0 -6
  206. package/user-manage/src/utils/pagination/pagination.component.d.ts +0 -18
  207. package/users-list/index.d.ts +0 -5
  208. package/users-list/src/app.constants.d.ts +0 -17
  209. package/users-list/src/classes/device.d.ts +0 -224
  210. package/users-list/src/classes/line.d.ts +0 -116
  211. package/users-list/src/classes/notification.d.ts +0 -18
  212. package/users-list/src/classes/pagination.d.ts +0 -13
  213. package/users-list/src/classes/simlified-user.d.ts +0 -25
  214. package/users-list/src/classes/table-data.d.ts +0 -5
  215. package/users-list/src/classes/user-list.d.ts +0 -32
  216. package/users-list/src/material.module.d.ts +0 -28
  217. package/users-list/src/services/api.service.d.ts +0 -20
  218. package/users-list/src/services/events-communication.service.d.ts +0 -8
  219. package/users-list/src/services/notification.service.d.ts +0 -18
  220. package/users-list/src/services/removeKynFromIBM.service.d.ts +0 -8
  221. package/users-list/src/services/user.service.d.ts +0 -26
  222. package/users-list/src/services/users-search.service.d.ts +0 -25
  223. package/users-list/src/users-list.component.d.ts +0 -34
  224. package/users-list/src/users-list.module.d.ts +0 -12
  225. package/users-list/src/utils/common-functions.d.ts +0 -1
  226. package/users-list/src/utils/pagination/pagination.component.d.ts +0 -18
  227. package/users-list/src/utils/utils.service.d.ts +0 -9
  228. /package/user-manage/{public-api.d.ts → public-api.ts} +0 -0
  229. /package/users-list/{public-api.d.ts → public-api.ts} +0 -0
@@ -1,866 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable, EventEmitter, Component, Input, Output, NgModule } from '@angular/core';
3
- import * as i6$1 from '@angular/material/table';
4
- import { MatTableDataSource, MatTableModule } from '@angular/material/table';
5
- import { of, forkJoin, Subject, BehaviorSubject } from 'rxjs';
6
- import * as i2 from '@angular/forms';
7
- import { FormBuilder, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
8
- import { map } from 'rxjs/operators';
9
- import * as i1 from '@angular/common/http';
10
- import { HttpHeaders, HttpClientModule } from '@angular/common/http';
11
- import * as i1$1 from '@angular/common';
12
- import * as i3 from '@angular/material/progress-spinner';
13
- import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
14
- import * as i4 from '@angular/material/core';
15
- import { MatNativeDateModule } from '@angular/material/core';
16
- import * as i5 from '@angular/material/select';
17
- import { MatSelectModule } from '@angular/material/select';
18
- import * as i6 from '@angular/material/paginator';
19
- import { MatPaginatorModule } from '@angular/material/paginator';
20
- import { BrowserModule } from '@angular/platform-browser';
21
- import { MatExpansionModule } from '@angular/material/expansion';
22
- import { MatDatepickerModule } from '@angular/material/datepicker';
23
- import { MatAutocompleteModule } from '@angular/material/autocomplete';
24
- import { MatChipsModule } from '@angular/material/chips';
25
- import { MatListModule } from '@angular/material/list';
26
- import { MatSidenavModule } from '@angular/material/sidenav';
27
- import { MatTreeModule } from '@angular/material/tree';
28
- import { DragDropModule } from '@angular/cdk/drag-drop';
29
- import { MatButtonModule } from '@angular/material/button';
30
- import { MatInputModule } from '@angular/material/input';
31
- import { MatTooltipModule } from '@angular/material/tooltip';
32
- import { MatFormFieldModule } from '@angular/material/form-field';
33
- import { MatStepperModule } from '@angular/material/stepper';
34
- import { MatTabsModule } from '@angular/material/tabs';
35
- import { MatCardModule } from '@angular/material/card';
36
- import { MatCheckboxModule } from '@angular/material/checkbox';
37
- import { MatSlideToggleModule } from '@angular/material/slide-toggle';
38
-
39
- const getSavableData = (model, exclude) => {
40
- let result = Object.keys(model);
41
- if (exclude && exclude.length) {
42
- result = result.filter(key => !exclude.some(item => item === key));
43
- }
44
- return result.reduce((result, key) => {
45
- if (model[key] instanceof Array && model[key].length && model[key][0].getSavableData) {
46
- result[key] = model[key].map((item) => item.getSavableData());
47
- }
48
- else if (model[key] instanceof Object && model[key].getSavableData) {
49
- result[key] = model[key].getSavableData();
50
- }
51
- else {
52
- result[key] = model[key];
53
- }
54
- return result;
55
- }, {});
56
- };
57
-
58
- const API = {
59
- USER_TOKEN: '/api/provision/:siteId/users/:userId/token',
60
- UPDATE_USER_FIELDS: '/api/provision/:siteId/userFields/:token',
61
- PERSIST_USER_CACHE: '/api/provision/:siteId/saveUser/:token',
62
- USER_BY_ID: '/api/provision/:siteId/users/:userId',
63
- QUICK_USERS_SEARCH: "/api/search/quickusers"
64
- };
65
- const REGEX_PATTERN = {
66
- EMAIL: '^(([^<>()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))' +
67
- '@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,62}[a-zA-Z0-9])' +
68
- '?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,62}[a-zA-Z0-9])?)*$'
69
- };
70
- const PAGINATION_DEFAULTS = {
71
- SIZE: 10,
72
- INDEX: 0
73
- };
74
- const PAGINATION_SIZE_OPTIONS = [
75
- 10,
76
- 50,
77
- 100,
78
- 500
79
- ];
80
- const CUCS_TO_IGNORE = [
81
- 189,
82
- 194,
83
- 191,
84
- 190
85
- ];
86
- const CUCMS_TO_IGNORE = [
87
- 249,
88
- 255,
89
- 251,
90
- 250
91
- ];
92
-
93
- class SimplifiedUser {
94
- constructor(user) {
95
- if (user) {
96
- this.userid = user.userid;
97
- this.email = user.email;
98
- this.firstName = user.firstName;
99
- this.lastName = user.lastName;
100
- this.token = user.token;
101
- }
102
- this.initForm();
103
- }
104
- initForm() {
105
- const formBuilder = new FormBuilder();
106
- const formSettings = {
107
- userid: [{ value: this.userid || '', disabled: true }, [Validators.required, Validators.maxLength(128)]],
108
- email: [{ value: this.email || '', disabled: true }, [
109
- Validators.pattern(REGEX_PATTERN.EMAIL),
110
- Validators.required
111
- ]],
112
- firstName: [{ value: this.firstName || '', disabled: true }],
113
- lastName: [{ value: this.lastName || '', disabled: true }, Validators.required],
114
- };
115
- this.form = formBuilder.group(formSettings);
116
- }
117
- toggleEditMode() {
118
- this.editMode = !this.editMode;
119
- ['userid', 'email', 'firstName', 'lastName'].forEach(token => {
120
- if (this.editMode) {
121
- this.form.get(token)?.enable();
122
- }
123
- else {
124
- this.form.get(token)?.disable();
125
- }
126
- });
127
- }
128
- getSavableData() {
129
- const excludedFields = ['form', 'editMode', 'viewMode', 'token', 'hasModifiedCache'];
130
- return getSavableData(this, excludedFields);
131
- }
132
- equal(userToCompare) {
133
- if (!userToCompare) {
134
- return false;
135
- }
136
- return JSON.stringify(this.getSavableData()) === JSON.stringify(userToCompare.getSavableData());
137
- }
138
- }
139
-
140
- class UtilsService {
141
- static sortSortArrayByProperty(array, sortBy) {
142
- if (!array) {
143
- return null;
144
- }
145
- return array.sort((a, b) => {
146
- if (!a[sortBy] && !b[sortBy]) {
147
- return 0;
148
- }
149
- if (a[sortBy] && !b[sortBy]) {
150
- return 1;
151
- }
152
- if (!a[sortBy] && b[sortBy]) {
153
- return -1;
154
- }
155
- const positionA = a[sortBy];
156
- const positionB = b[sortBy];
157
- return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
158
- });
159
- }
160
- static diff(origObject, updatedObj, path, keysToIgnore) {
161
- let result = [];
162
- if (Object.is(origObject, updatedObj)) {
163
- return undefined;
164
- }
165
- if (!updatedObj || typeof updatedObj !== 'object') {
166
- return updatedObj;
167
- }
168
- const concat = Array.from(new Set([...Object.keys(origObject || {}), ...Object.keys(updatedObj || {})]));
169
- const filter = keysToIgnore ? concat.filter(key => !keysToIgnore.includes(key)) : concat;
170
- filter
171
- .forEach(key => {
172
- if (typeof updatedObj[key] === 'object' && typeof origObject[key] === 'object') {
173
- if (UtilsService.differs(updatedObj[key], origObject[key])) {
174
- const newPath = `${path}${path ? '.' : ''}${key}`;
175
- const values = UtilsService.diff(origObject[key], updatedObj[key], newPath, keysToIgnore);
176
- if (values !== undefined) {
177
- result = [...result, ...values];
178
- }
179
- }
180
- }
181
- else if (updatedObj && !origObject || updatedObj[key] !== origObject[key] && !Object.is(origObject[key], updatedObj[key])) {
182
- const value = updatedObj ? UtilsService.formatIfEmpty(updatedObj[key]) : null;
183
- result.push(`${path}${path ? '.' : ''}${key}=${value}`);
184
- }
185
- });
186
- return result;
187
- }
188
- static formatIfEmpty(value) {
189
- if (value) {
190
- return value;
191
- }
192
- switch (typeof value) {
193
- case 'boolean':
194
- return value;
195
- case 'string':
196
- return '';
197
- default:
198
- return null;
199
- }
200
- }
201
- static differs(obj1, obj2) {
202
- return JSON.stringify(obj1) !== JSON.stringify(obj2);
203
- }
204
- }
205
- UtilsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
206
- UtilsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService });
207
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService, decorators: [{
208
- type: Injectable
209
- }] });
210
-
211
- const apiUrl = 'http://192.168.0.191:8080';
212
- class APIService {
213
- constructor(httpClient) {
214
- this.httpClient = httpClient;
215
- }
216
- fetch(url, params = {}, cache) {
217
- const headers = this.getHeaders(cache);
218
- return this.httpClient.get(apiUrl + url, { params: this.prepareEncodedParams(params), headers });
219
- }
220
- post(url, body, params = {}) {
221
- body = body || null;
222
- const headers = this.getHeaders();
223
- return this.httpClient.post(apiUrl + url, body, { params: this.prepareEncodedParams(params), headers });
224
- }
225
- // use when response extended data is necessary:
226
- postExtended(url, body = null, params = {}, headers = {}) {
227
- headers = headers || this.getHeaders();
228
- return this.httpClient.post(apiUrl + url, body, {
229
- headers,
230
- observe: 'response',
231
- params: this.prepareEncodedParams(params)
232
- });
233
- }
234
- put(url, body = null, params = {}) {
235
- const headers = this.getHeaders();
236
- return this.httpClient.put(apiUrl + url, body, { headers, params: this.prepareEncodedParams(params) });
237
- }
238
- delete(url, params = {}) {
239
- const headers = this.getHeaders();
240
- return this.httpClient.delete(apiUrl + url, { headers, params: this.prepareEncodedParams(params) });
241
- }
242
- fetchPagination(url, pageSize, pageNumber, additionalParams = {}, cache) {
243
- const copyAdditionalParams = JSON.parse(JSON.stringify(additionalParams));
244
- const params = Object.assign(copyAdditionalParams, { size: pageSize.toString(), page: pageNumber.toString() });
245
- return this.fetch(url, params, cache);
246
- }
247
- prepareEncodedParams(params) {
248
- const result = {};
249
- if (!params) {
250
- return {};
251
- }
252
- for (const key of Object.keys(params)) {
253
- if (params[key]) {
254
- const stringParam = params[key].toString();
255
- result[key] = stringParam.includes('+') ? encodeURIComponent(stringParam) : stringParam;
256
- }
257
- }
258
- return result;
259
- }
260
- getHeaders(cache) {
261
- let headers = new HttpHeaders();
262
- if (cache) {
263
- headers = headers.append('_Cache', 'true ');
264
- }
265
- const token = this.token || this.getParameterByName('token');
266
- headers = headers.append('Authorization', 'Bearer ' + token);
267
- return headers;
268
- }
269
- getParameterByName(name, url = window.location.href) {
270
- name = name.replace(/[\[\]]/g, '\\$&');
271
- var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), results = regex.exec(url);
272
- if (!results)
273
- return null;
274
- if (!results[2])
275
- return '';
276
- return decodeURIComponent(results[2].replace(/\+/g, ' '));
277
- }
278
- }
279
- APIService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: APIService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
280
- APIService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: APIService });
281
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: APIService, decorators: [{
282
- type: Injectable
283
- }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
284
-
285
- class UserService {
286
- constructor(apiService) {
287
- this.apiService = apiService;
288
- this.siteId = -1;
289
- this.userId = '';
290
- this.userIdExistPending = false;
291
- this.hasExistedUserId = false;
292
- }
293
- ngOnInit() {
294
- console.log(this.siteId);
295
- }
296
- fetchUserToken(siteId, userId) {
297
- if (this.siteId === siteId && this.userId === userId && this.user) {
298
- return of(this.user);
299
- }
300
- this.siteId = siteId;
301
- this.userId = userId;
302
- return this.apiService.fetch(API.USER_TOKEN.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(userId))))
303
- .pipe(map((result) => {
304
- this.setSimplifiedUser(Object.values(result)[0]);
305
- }));
306
- // .pipe(this.handleError(false, true));
307
- }
308
- updateUserFields(body) {
309
- if (!this.userId || !this.siteId || !this.user?.token) {
310
- return;
311
- }
312
- return this.apiService.post(API.UPDATE_USER_FIELDS.replace(':siteId', String(this.siteId)).replace(':token', this.user.token), body);
313
- // .pipe(this.handleError(false, true));
314
- }
315
- fetchUserById(id) {
316
- this.userIdExistPending = true;
317
- return this.apiService.fetch(API.USER_BY_ID.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(id))))
318
- .pipe(map(result => {
319
- this.userIdExistPending = false;
320
- return result;
321
- }));
322
- }
323
- persistCacheChanges() {
324
- const params = {
325
- excludeDeviceExtraOptions: true
326
- };
327
- return this.processUserChangesToCache()
328
- .pipe(map((result) => {
329
- return this.apiService.post(API.PERSIST_USER_CACHE.replace(':siteId', String(this.siteId)).replace(':token', this.user.token), {}, params)
330
- .subscribe(() => {
331
- });
332
- // .pipe(map((user) => {
333
- // // this.setUser(user, false, this.user.token);
334
- // this.user.hasModifiedCache = false;
335
- // }))
336
- // .pipe(this.handleError(true, true));
337
- }));
338
- }
339
- processUserChangesToCache() {
340
- const calls = [];
341
- const body = UtilsService.diff(this.originUser.getSavableData(), this.user.getSavableData(), 'user');
342
- if (body) {
343
- calls.push(this.updateUserFields(body));
344
- }
345
- if (!calls?.length) {
346
- return of(this.user);
347
- }
348
- return forkJoin(calls)
349
- .pipe(map((responses) => {
350
- // ApiUserResponse
351
- this.handleSaveUserResponse(responses);
352
- }));
353
- // .pipe(this.handleError(false, true));
354
- }
355
- hasUnsavedChanges() {
356
- return !this.user.equal(this.originUser);
357
- }
358
- setSimplifiedUser(user) {
359
- this.user = new SimplifiedUser(user);
360
- const copiedUser = JSON.parse(JSON.stringify(user));
361
- this.originUser = new SimplifiedUser(copiedUser);
362
- }
363
- handleSaveUserResponse(responses) {
364
- if (!responses?.length) {
365
- return;
366
- }
367
- for (let len = responses.length, i = len - 1; i >= 0; i--) {
368
- if (responses[i] && responses[i].currentUpdatedUser) {
369
- // this.setUser(responses[i].currentUpdatedUser, false, this.user.token);
370
- this.user.hasModifiedCache = true;
371
- return;
372
- }
373
- }
374
- }
375
- }
376
- UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService, deps: [{ token: APIService }], target: i0.ɵɵFactoryTarget.Injectable });
377
- UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService });
378
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService, decorators: [{
379
- type: Injectable
380
- }], ctorParameters: function () { return [{ type: APIService }]; } });
381
-
382
- const TTL_DEFAULT = 30000;
383
- const TTL_LONG_DEFAULT = 45000;
384
- var NotificationType;
385
- (function (NotificationType) {
386
- NotificationType["info"] = "info";
387
- NotificationType["error"] = "error";
388
- NotificationType["success"] = "success";
389
- NotificationType["warning"] = "warning";
390
- })(NotificationType || (NotificationType = {}));
391
- class Notification {
392
- constructor(data) {
393
- this.ttl = TTL_DEFAULT;
394
- Object.assign(this, data || {});
395
- if (this.ttl === undefined) {
396
- this.ttl = this.message && this.message.length && this.message.length < 80 ? TTL_DEFAULT : TTL_LONG_DEFAULT;
397
- }
398
- }
399
- isInfo() {
400
- return this.type === NotificationType.info;
401
- }
402
- isError() {
403
- return this.type === NotificationType.error;
404
- }
405
- isSuccess() {
406
- return this.type === NotificationType.success;
407
- }
408
- isWarning() {
409
- return this.type === NotificationType.warning;
410
- }
411
- }
412
-
413
- const SUCCESS_TIME = 5000;
414
- const INACTIVE_SESSION_MESSAGE = 'Your session was lost due to inactivity. Please login again';
415
- const INACTIVE_SESSION = 'SESSION_INACTIVE';
416
- class NotificationService {
417
- constructor() {
418
- this.listChange = new Subject();
419
- this.max = 0;
420
- this.list = [];
421
- }
422
- error(message, ttl) {
423
- this.notify('error', message, ttl);
424
- }
425
- success(message, ttl) {
426
- this.notify('success', message, (!ttl) ? SUCCESS_TIME : ttl);
427
- }
428
- warning(message, ttl) {
429
- this.notify('warning', message, ttl);
430
- }
431
- info(message, ttl) {
432
- this.notify('info', message, ttl);
433
- }
434
- notify(type, message, ttl) {
435
- const found = this.list.find((n) => n.message === message);
436
- if (found) {
437
- this.remove(found);
438
- }
439
- const notification = new Notification({
440
- id: ++this.max,
441
- type, message, ttl
442
- });
443
- if (notification.ttl > 0) {
444
- notification.timerId = setTimeout(() => this.remove(notification, true), notification.ttl);
445
- }
446
- this.list.push(notification);
447
- this.listChange.next(this.list);
448
- }
449
- remove(notification, auto) {
450
- if (!auto && notification.timerId) {
451
- // clear timeout in case of manual remove
452
- clearInterval(notification.timerId);
453
- }
454
- this.list = this.list.filter(n => n.id !== notification.id);
455
- this.listChange.next(this.list);
456
- }
457
- removeInactiveSessionError() {
458
- if (!this.list || !this.list.length) {
459
- return;
460
- }
461
- this.list = this.list.filter(n => n.message !== INACTIVE_SESSION_MESSAGE && n.message !== INACTIVE_SESSION);
462
- this.listChange.next(this.list);
463
- }
464
- }
465
- NotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
466
- NotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService });
467
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, decorators: [{
468
- type: Injectable
469
- }], ctorParameters: function () { return []; } });
470
-
471
- class ListUser {
472
- constructor(user) {
473
- this.devices = [];
474
- this.deviceProfiles = [];
475
- if (user) {
476
- Object.assign(this, user);
477
- }
478
- }
479
- }
480
-
481
- class RemoveKynFromIBMService {
482
- constructor() {
483
- }
484
- removeCUCMS(date, customerId) {
485
- if (customerId === 8) {
486
- return date.filter((val) => !CUCMS_TO_IGNORE.includes(Math.round(val.cucmId)));
487
- }
488
- return date;
489
- }
490
- removeCUCS(date, customerId) {
491
- if (customerId === 8) {
492
- return date.filter((val) => !CUCS_TO_IGNORE.includes(Math.round(val.cucId)));
493
- }
494
- return date;
495
- }
496
- }
497
- RemoveKynFromIBMService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
498
- RemoveKynFromIBMService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService });
499
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService, decorators: [{
500
- type: Injectable
501
- }], ctorParameters: function () { return []; } });
502
-
503
- class UsersSearchService {
504
- constructor(apiService, removeKynFromIBMService) {
505
- this.apiService = apiService;
506
- this.removeKynFromIBMService = removeKynFromIBMService;
507
- this.siteId = -1;
508
- this.userId = '';
509
- this.userIdExistPending = false;
510
- this.hasExistedUserId = false;
511
- this.pageSize = PAGINATION_DEFAULTS.SIZE;
512
- this.pageIndex = PAGINATION_DEFAULTS.SIZE;
513
- this.pageSizeOptions = PAGINATION_SIZE_OPTIONS;
514
- this.foundUsers$ = new BehaviorSubject(null);
515
- }
516
- getPagination() {
517
- return {
518
- total: this.total,
519
- pageSizeOptions: this.pageSizeOptions,
520
- pageSize: this.pageSize,
521
- pageIndex: this.pageIndex
522
- };
523
- }
524
- quickRegularUsersSearch() {
525
- this.searchParams = this.searchParams || { customerid: this.customerId };
526
- return this.apiService.fetchPagination(API.QUICK_USERS_SEARCH, this.pageSize, this.pageIndex, this.searchParams)
527
- .pipe(map((res) => {
528
- this.total = res.total;
529
- // this.totals = this.totals || {};
530
- // this.totals['users'] = res.total;
531
- const users = res.pageData && res.pageData.length ? res.pageData.map(user => new ListUser(user)) : [];
532
- // this.foundUsers$.next(this.removeKynFromIBMService.removeCUCMS(users, this.customerId));
533
- this.foundUsers$.next(users);
534
- }));
535
- // .pipe(this.handleError(true));
536
- }
537
- }
538
- UsersSearchService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersSearchService, deps: [{ token: APIService }, { token: RemoveKynFromIBMService }], target: i0.ɵɵFactoryTarget.Injectable });
539
- UsersSearchService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersSearchService });
540
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersSearchService, decorators: [{
541
- type: Injectable
542
- }], ctorParameters: function () { return [{ type: APIService }, { type: RemoveKynFromIBMService }]; } });
543
-
544
- class PaginationComponent {
545
- constructor() {
546
- this.pageEmitter = new EventEmitter();
547
- this.pageNumberChangeEmitter = new EventEmitter();
548
- this.pageSizeOptions = PAGINATION_SIZE_OPTIONS;
549
- }
550
- ngOnInit() {
551
- }
552
- pageEvent(event) {
553
- this.pageEmitter.emit(event);
554
- }
555
- changePerPageNumber(event) {
556
- this.pageNumberChangeEmitter.emit(event.value);
557
- }
558
- }
559
- PaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
560
- 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: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i4.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"] }] });
561
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PaginationComponent, decorators: [{
562
- type: Component,
563
- 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"] }]
564
- }], ctorParameters: function () { return []; }, propDecorators: { pagination: [{
565
- type: Input
566
- }], showPageSizeOptions: [{
567
- type: Input
568
- }], showRefreshButton: [{
569
- type: Input
570
- }], lengthPending: [{
571
- type: Input
572
- }], pageEmitter: [{
573
- type: Output
574
- }], pageNumberChangeEmitter: [{
575
- type: Output
576
- }] } });
577
-
578
- const DISPLAYED_COLS = ['user-icon', 'name', 'email', 'status', 'role'];
579
- class UsersListComponent {
580
- get form() {
581
- return this.userService?.user?.form;
582
- }
583
- constructor(userService, apiService, notifications, usersSearchService) {
584
- this.userService = userService;
585
- this.apiService = apiService;
586
- this.notifications = notifications;
587
- this.usersSearchService = usersSearchService;
588
- this.openUser = new EventEmitter();
589
- this.displayedColumns = DISPLAYED_COLS;
590
- console.log('users list 1');
591
- }
592
- ngOnInit() {
593
- console.log('users list 2');
594
- this.usersSearchService.customerId = this.customerId;
595
- this.apiService.token = this.token;
596
- this.runSearch();
597
- this.searchSubscription = this.usersSearchService.foundUsers$
598
- .subscribe((users) => {
599
- this.initializeDataSource(users);
600
- this.users = users;
601
- });
602
- }
603
- pageNumberChangeEvent(perPageNumber) {
604
- this.usersSearchService.pageSize = perPageNumber;
605
- this.usersSearchService.pageIndex = 0;
606
- this.runSearch();
607
- }
608
- pageEvent(event) {
609
- this.usersSearchService.pageSize = event.pageSize;
610
- this.usersSearchService.pageIndex = event.pageIndex;
611
- this.runSearch();
612
- }
613
- onUserClick(user) {
614
- this.openUser.emit(user);
615
- }
616
- initializeDataSource(users) {
617
- this.dataSource = new MatTableDataSource(users);
618
- }
619
- runSearch() {
620
- this.dataPending = true;
621
- this.usersSearchService.quickRegularUsersSearch()
622
- .subscribe(() => {
623
- this.dataPending = false;
624
- }, () => {
625
- this.dataPending = false;
626
- this.notifications.error('The data can not be received');
627
- });
628
- }
629
- }
630
- UsersListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersListComponent, deps: [{ token: UserService }, { token: APIService }, { token: NotificationService }, { token: UsersSearchService }], target: i0.ɵɵFactoryTarget.Component });
631
- UsersListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UsersListComponent, selector: "app-users-list", inputs: { token: "token", customerId: "customerId" }, outputs: { openUser: "openUser" }, ngImport: i0, template: "<app-pagination\n [pagination]=\"usersSearchService.getPagination()\"\n [showPageSizeOptions]=\"true\"\n (pageNumberChangeEmitter)=\"pageNumberChangeEvent($event)\"\n (pageEmitter)=\"pageEvent($event)\">\n</app-pagination>\n\n<table class=\"webex-table\" mat-table *ngIf=\"users?.length\" #table [dataSource]=\"dataSource\">\n\n <ng-container matColumnDef=\"user-icon\">\n <th mat-header-cell *matHeaderCellDef class=\"webex-table-th\"></th>\n <td class=\"user-site\" mat-cell *matCellDef=\"let user\" (click)=\"onUserClick(user)\">\n <span class=\"icon-webex-box\"><span class=\"icon-webex icon-webex-user\"></span></span>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell *matHeaderCellDef class=\"webex-table-th\">First Name/Last Name</th>\n <td class=\"user-site\" mat-cell *matCellDef=\"let user\" (click)=\"onUserClick(user)\"> {{ user.firstName }} {{ user.lastName }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef class=\"webex-table-th\">Email</th>\n <td class=\"user-site\" mat-cell *matCellDef=\"let user\" (click)=\"onUserClick(user)\"> {{ user.email }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef class=\"webex-table-th\">Status</th>\n <td class=\"user-site\" mat-cell *matCellDef=\"let user\" (click)=\"onUserClick(user)\"></td>\n </ng-container>\n\n <ng-container matColumnDef=\"role\">\n <th mat-header-cell *matHeaderCellDef class=\"webex-table-th\">Administrator Role</th>\n <td class=\"user-site\" mat-cell *matCellDef=\"let user\" (click)=\"onUserClick(user)\"></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n</table>\n", styles: ["table{border-collapse:collapse;border-spacing:0}table.mat-table{border-spacing:0;width:100%}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i6$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: PaginationComponent, selector: "app-pagination", inputs: ["pagination", "showPageSizeOptions", "showRefreshButton", "lengthPending"], outputs: ["pageEmitter", "pageNumberChangeEmitter"] }] });
632
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersListComponent, decorators: [{
633
- type: Component,
634
- args: [{ selector: 'app-users-list', template: "<app-pagination\n [pagination]=\"usersSearchService.getPagination()\"\n [showPageSizeOptions]=\"true\"\n (pageNumberChangeEmitter)=\"pageNumberChangeEvent($event)\"\n (pageEmitter)=\"pageEvent($event)\">\n</app-pagination>\n\n<table class=\"webex-table\" mat-table *ngIf=\"users?.length\" #table [dataSource]=\"dataSource\">\n\n <ng-container matColumnDef=\"user-icon\">\n <th mat-header-cell *matHeaderCellDef class=\"webex-table-th\"></th>\n <td class=\"user-site\" mat-cell *matCellDef=\"let user\" (click)=\"onUserClick(user)\">\n <span class=\"icon-webex-box\"><span class=\"icon-webex icon-webex-user\"></span></span>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell *matHeaderCellDef class=\"webex-table-th\">First Name/Last Name</th>\n <td class=\"user-site\" mat-cell *matCellDef=\"let user\" (click)=\"onUserClick(user)\"> {{ user.firstName }} {{ user.lastName }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef class=\"webex-table-th\">Email</th>\n <td class=\"user-site\" mat-cell *matCellDef=\"let user\" (click)=\"onUserClick(user)\"> {{ user.email }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef class=\"webex-table-th\">Status</th>\n <td class=\"user-site\" mat-cell *matCellDef=\"let user\" (click)=\"onUserClick(user)\"></td>\n </ng-container>\n\n <ng-container matColumnDef=\"role\">\n <th mat-header-cell *matHeaderCellDef class=\"webex-table-th\">Administrator Role</th>\n <td class=\"user-site\" mat-cell *matCellDef=\"let user\" (click)=\"onUserClick(user)\"></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n</table>\n", styles: ["table{border-collapse:collapse;border-spacing:0}table.mat-table{border-spacing:0;width:100%}\n"] }]
635
- }], ctorParameters: function () { return [{ type: UserService }, { type: APIService }, { type: NotificationService }, { type: UsersSearchService }]; }, propDecorators: { token: [{
636
- type: Input
637
- }], customerId: [{
638
- type: Input
639
- }], openUser: [{
640
- type: Output
641
- }] } });
642
-
643
- class EventsCommunicationService {
644
- constructor() {
645
- this.onSuccessfulLoginEvent = new Subject();
646
- }
647
- }
648
- EventsCommunicationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EventsCommunicationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
649
- EventsCommunicationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EventsCommunicationService });
650
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EventsCommunicationService, decorators: [{
651
- type: Injectable
652
- }], ctorParameters: function () { return []; } });
653
-
654
- class MaterialModule {
655
- }
656
- MaterialModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
657
- MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [DragDropModule,
658
- MatButtonModule,
659
- MatListModule,
660
- MatProgressSpinnerModule,
661
- MatExpansionModule,
662
- MatInputModule,
663
- MatInputModule,
664
- MatListModule,
665
- MatTreeModule,
666
- MatTreeModule,
667
- MatNativeDateModule,
668
- MatDatepickerModule,
669
- MatTooltipModule,
670
- MatAutocompleteModule,
671
- MatChipsModule,
672
- MatSidenavModule,
673
- MatFormFieldModule,
674
- MatStepperModule,
675
- MatTabsModule,
676
- MatCardModule,
677
- MatSelectModule,
678
- MatCheckboxModule,
679
- MatSlideToggleModule,
680
- MatTableModule,
681
- MatPaginatorModule], exports: [DragDropModule,
682
- MatButtonModule,
683
- MatListModule,
684
- MatProgressSpinnerModule,
685
- MatExpansionModule,
686
- MatInputModule,
687
- MatInputModule,
688
- MatListModule,
689
- MatTreeModule,
690
- MatTreeModule,
691
- MatNativeDateModule,
692
- MatDatepickerModule,
693
- MatTooltipModule,
694
- MatAutocompleteModule,
695
- MatChipsModule,
696
- MatSidenavModule,
697
- MatFormFieldModule,
698
- MatStepperModule,
699
- MatTabsModule,
700
- MatCardModule,
701
- MatCheckboxModule,
702
- MatSelectModule,
703
- MatSlideToggleModule,
704
- MatProgressSpinnerModule,
705
- MatTableModule,
706
- MatPaginatorModule] });
707
- MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [DragDropModule,
708
- MatButtonModule,
709
- MatListModule,
710
- MatProgressSpinnerModule,
711
- MatExpansionModule,
712
- MatInputModule,
713
- MatInputModule,
714
- MatListModule,
715
- MatTreeModule,
716
- MatTreeModule,
717
- MatNativeDateModule,
718
- MatDatepickerModule,
719
- MatTooltipModule,
720
- MatAutocompleteModule,
721
- MatChipsModule,
722
- MatSidenavModule,
723
- MatFormFieldModule,
724
- MatStepperModule,
725
- MatTabsModule,
726
- MatCardModule,
727
- MatSelectModule,
728
- MatCheckboxModule,
729
- MatSlideToggleModule,
730
- MatTableModule,
731
- MatPaginatorModule, DragDropModule,
732
- MatButtonModule,
733
- MatListModule,
734
- MatProgressSpinnerModule,
735
- MatExpansionModule,
736
- MatInputModule,
737
- MatInputModule,
738
- MatListModule,
739
- MatTreeModule,
740
- MatTreeModule,
741
- MatNativeDateModule,
742
- MatDatepickerModule,
743
- MatTooltipModule,
744
- MatAutocompleteModule,
745
- MatChipsModule,
746
- MatSidenavModule,
747
- MatFormFieldModule,
748
- MatStepperModule,
749
- MatTabsModule,
750
- MatCardModule,
751
- MatCheckboxModule,
752
- MatSelectModule,
753
- MatSlideToggleModule,
754
- MatProgressSpinnerModule,
755
- MatTableModule,
756
- MatPaginatorModule] });
757
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, decorators: [{
758
- type: NgModule,
759
- args: [{
760
- imports: [
761
- DragDropModule,
762
- MatButtonModule,
763
- MatListModule,
764
- MatProgressSpinnerModule,
765
- MatExpansionModule,
766
- MatInputModule,
767
- MatInputModule,
768
- MatListModule,
769
- MatTreeModule,
770
- MatTreeModule,
771
- MatNativeDateModule,
772
- MatDatepickerModule,
773
- MatTooltipModule,
774
- MatAutocompleteModule,
775
- MatChipsModule,
776
- MatSidenavModule,
777
- MatFormFieldModule,
778
- MatStepperModule,
779
- MatTabsModule,
780
- MatCardModule,
781
- MatSelectModule,
782
- MatCheckboxModule,
783
- MatSlideToggleModule,
784
- MatTableModule,
785
- MatPaginatorModule
786
- ],
787
- exports: [
788
- DragDropModule,
789
- MatButtonModule,
790
- MatListModule,
791
- MatProgressSpinnerModule,
792
- MatExpansionModule,
793
- MatInputModule,
794
- MatInputModule,
795
- MatListModule,
796
- MatTreeModule,
797
- MatTreeModule,
798
- MatNativeDateModule,
799
- MatDatepickerModule,
800
- MatTooltipModule,
801
- MatAutocompleteModule,
802
- MatChipsModule,
803
- MatSidenavModule,
804
- MatFormFieldModule,
805
- MatStepperModule,
806
- MatTabsModule,
807
- MatCardModule,
808
- MatCheckboxModule,
809
- MatSelectModule,
810
- MatSlideToggleModule,
811
- MatProgressSpinnerModule,
812
- MatTableModule,
813
- MatPaginatorModule
814
- ],
815
- }]
816
- }] });
817
-
818
- class UsersListModule {
819
- }
820
- UsersListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
821
- UsersListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: UsersListModule, declarations: [UsersListComponent, PaginationComponent], imports: [BrowserModule,
822
- FormsModule,
823
- ReactiveFormsModule,
824
- HttpClientModule,
825
- MaterialModule], exports: [UsersListComponent] });
826
- UsersListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersListModule, providers: [
827
- UserService,
828
- APIService,
829
- EventsCommunicationService,
830
- UsersSearchService,
831
- NotificationService,
832
- RemoveKynFromIBMService
833
- ], imports: [BrowserModule,
834
- FormsModule,
835
- ReactiveFormsModule,
836
- HttpClientModule,
837
- MaterialModule] });
838
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersListModule, decorators: [{
839
- type: NgModule,
840
- args: [{
841
- declarations: [UsersListComponent, PaginationComponent],
842
- imports: [
843
- BrowserModule,
844
- FormsModule,
845
- ReactiveFormsModule,
846
- HttpClientModule,
847
- MaterialModule
848
- ],
849
- providers: [
850
- UserService,
851
- APIService,
852
- EventsCommunicationService,
853
- UsersSearchService,
854
- NotificationService,
855
- RemoveKynFromIBMService
856
- ],
857
- exports: [UsersListComponent]
858
- }]
859
- }] });
860
-
861
- /**
862
- * Generated bundle index. Do not edit.
863
- */
864
-
865
- export { APIService, EventsCommunicationService, NotificationService, RemoveKynFromIBMService, UserService, UsersListComponent, UsersListModule, UsersSearchService };
866
- //# sourceMappingURL=tuki-io-tuki-widgets-users-list.mjs.map