@tuki-io/tuki-widgets 0.0.6 → 0.0.8

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 (238) hide show
  1. package/README.md +9 -10
  2. package/esm2020/lib/widgets.component.mjs +22 -0
  3. package/esm2020/lib/widgets.module.mjs +21 -0
  4. package/esm2020/lib/widgets.service.mjs +14 -0
  5. package/esm2020/public-api.mjs +7 -0
  6. package/esm2020/tuki-io-tuki-widgets.mjs +5 -0
  7. package/esm2020/user-manage/public-api.mjs +7 -0
  8. package/esm2020/user-manage/src/app.constants.mjs +38 -0
  9. package/esm2020/user-manage/src/classes/device.mjs +7 -0
  10. package/esm2020/user-manage/src/classes/line.mjs +9 -0
  11. package/esm2020/user-manage/src/classes/notification.mjs +32 -0
  12. package/esm2020/user-manage/src/classes/pagination.mjs +8 -0
  13. package/esm2020/user-manage/src/classes/simplified-user.mjs +82 -0
  14. package/esm2020/user-manage/src/classes/table-data.mjs +2 -0
  15. package/esm2020/user-manage/src/classes/user-list.mjs +10 -0
  16. package/esm2020/user-manage/src/common-functions.mjs +19 -0
  17. package/esm2020/user-manage/src/environments/environment.mjs +11 -0
  18. package/esm2020/user-manage/src/interseptors/auth.interceptor.mjs +37 -0
  19. package/esm2020/user-manage/src/lazy-loading-select/lazy-loading-select.component.mjs +74 -0
  20. package/esm2020/user-manage/src/material.module.mjs +188 -0
  21. package/esm2020/user-manage/src/notifications/notification.component.mjs +35 -0
  22. package/esm2020/user-manage/src/removeKynFromIBM.service.mjs +25 -0
  23. package/esm2020/user-manage/src/services/api.service.mjs +79 -0
  24. package/esm2020/user-manage/src/services/notification.service.mjs +62 -0
  25. package/esm2020/user-manage/src/services/removeKynFromIBM.service.mjs +25 -0
  26. package/esm2020/user-manage/src/services/site-settings.service.mjs +36 -0
  27. package/esm2020/user-manage/src/services/user.service.mjs +108 -0
  28. package/esm2020/user-manage/src/services/users-search.service.mjs +49 -0
  29. package/esm2020/user-manage/src/services/utils.service.mjs +73 -0
  30. package/esm2020/user-manage/src/user-info/user-info.component.mjs +20 -0
  31. package/esm2020/user-manage/src/user-manage-widget.component.mjs +162 -0
  32. package/esm2020/user-manage/src/user-manage.module.mjs +84 -0
  33. package/esm2020/user-manage/src/utils/app-loader/app-loader.mjs +14 -0
  34. package/esm2020/user-manage/src/utils/pagination/pagination.component.mjs +43 -0
  35. package/esm2020/user-manage/tuki-io-tuki-widgets-user-manage.mjs +5 -0
  36. package/esm2020/users-list/public-api.mjs +9 -0
  37. package/esm2020/users-list/src/app.constants.mjs +35 -0
  38. package/esm2020/users-list/src/classes/device.mjs +7 -0
  39. package/esm2020/users-list/src/classes/line.mjs +9 -0
  40. package/esm2020/users-list/src/classes/notification.mjs +31 -0
  41. package/esm2020/users-list/src/classes/pagination.mjs +8 -0
  42. package/esm2020/users-list/src/classes/simlified-user.mjs +50 -0
  43. package/esm2020/users-list/src/classes/table-data.mjs +2 -0
  44. package/esm2020/users-list/src/classes/user-list.mjs +10 -0
  45. package/esm2020/users-list/src/material.module.mjs +188 -0
  46. package/esm2020/users-list/src/services/api.service.mjs +78 -0
  47. package/esm2020/users-list/src/services/events-communication.service.mjs +14 -0
  48. package/esm2020/users-list/src/services/notification.service.mjs +62 -0
  49. package/esm2020/users-list/src/services/removeKynFromIBM.service.mjs +25 -0
  50. package/esm2020/users-list/src/services/user.service.mjs +105 -0
  51. package/esm2020/users-list/src/services/users-search.service.mjs +49 -0
  52. package/esm2020/users-list/src/users-list.component.mjs +78 -0
  53. package/esm2020/users-list/src/users-list.module.mjs +58 -0
  54. package/esm2020/users-list/src/utils/common-functions.mjs +19 -0
  55. package/esm2020/users-list/src/utils/pagination/pagination.component.mjs +43 -0
  56. package/esm2020/users-list/src/utils/utils.service.mjs +73 -0
  57. package/esm2020/users-list/tuki-io-tuki-widgets-users-list.mjs +5 -0
  58. package/fesm2015/tuki-io-tuki-widgets-user-manage.mjs +1235 -0
  59. package/fesm2015/tuki-io-tuki-widgets-user-manage.mjs.map +1 -0
  60. package/fesm2015/tuki-io-tuki-widgets-users-list.mjs +872 -0
  61. package/fesm2015/tuki-io-tuki-widgets-users-list.mjs.map +1 -0
  62. package/fesm2015/tuki-io-tuki-widgets.mjs +63 -0
  63. package/fesm2015/tuki-io-tuki-widgets.mjs.map +1 -0
  64. package/fesm2020/tuki-io-tuki-widgets-user-manage.mjs +1222 -0
  65. package/fesm2020/tuki-io-tuki-widgets-user-manage.mjs.map +1 -0
  66. package/fesm2020/tuki-io-tuki-widgets-users-list.mjs +869 -0
  67. package/fesm2020/tuki-io-tuki-widgets-users-list.mjs.map +1 -0
  68. package/fesm2020/tuki-io-tuki-widgets.mjs +63 -0
  69. package/fesm2020/tuki-io-tuki-widgets.mjs.map +1 -0
  70. package/index.d.ts +5 -0
  71. package/lib/widgets.component.d.ts +8 -0
  72. package/lib/widgets.module.d.ts +7 -0
  73. package/lib/widgets.service.d.ts +6 -0
  74. package/package.json +44 -36
  75. package/{projects/tuki/widgets/src/public-api.ts → public-api.d.ts} +0 -4
  76. package/user-manage/index.d.ts +5 -0
  77. package/user-manage/src/app.constants.d.ts +20 -0
  78. package/user-manage/src/classes/device.d.ts +224 -0
  79. package/user-manage/src/classes/line.d.ts +116 -0
  80. package/user-manage/src/classes/notification.d.ts +18 -0
  81. package/user-manage/src/classes/pagination.d.ts +13 -0
  82. package/user-manage/src/classes/simplified-user.d.ts +41 -0
  83. package/user-manage/src/classes/table-data.d.ts +5 -0
  84. package/user-manage/src/classes/user-list.d.ts +32 -0
  85. package/user-manage/src/common-functions.d.ts +1 -0
  86. package/user-manage/src/environments/environment.d.ts +9 -0
  87. package/user-manage/src/interseptors/auth.interceptor.d.ts +9 -0
  88. package/user-manage/src/lazy-loading-select/lazy-loading-select.component.d.ts +35 -0
  89. package/user-manage/src/material.module.d.ts +28 -0
  90. package/user-manage/src/notifications/notification.component.d.ts +19 -0
  91. package/user-manage/src/removeKynFromIBM.service.d.ts +8 -0
  92. package/user-manage/src/services/api.service.d.ts +21 -0
  93. package/user-manage/src/services/notification.service.d.ts +18 -0
  94. package/user-manage/src/services/removeKynFromIBM.service.d.ts +8 -0
  95. package/user-manage/src/services/site-settings.service.d.ts +9 -0
  96. package/user-manage/src/services/user.service.d.ts +26 -0
  97. package/user-manage/src/services/users-search.service.d.ts +25 -0
  98. package/user-manage/src/services/utils.service.d.ts +9 -0
  99. package/user-manage/src/user-info/user-info.component.d.ts +9 -0
  100. package/user-manage/src/user-manage-widget.component.d.ts +32 -0
  101. package/user-manage/src/user-manage.module.d.ts +18 -0
  102. package/user-manage/src/utils/app-loader/app-loader.d.ts +6 -0
  103. package/user-manage/src/utils/pagination/pagination.component.d.ts +18 -0
  104. package/users-list/index.d.ts +5 -0
  105. package/users-list/src/app.constants.d.ts +17 -0
  106. package/users-list/src/classes/device.d.ts +224 -0
  107. package/users-list/src/classes/line.d.ts +116 -0
  108. package/users-list/src/classes/notification.d.ts +18 -0
  109. package/users-list/src/classes/pagination.d.ts +13 -0
  110. package/users-list/src/classes/simlified-user.d.ts +25 -0
  111. package/users-list/src/classes/table-data.d.ts +5 -0
  112. package/users-list/src/classes/user-list.d.ts +32 -0
  113. package/users-list/src/material.module.d.ts +28 -0
  114. package/users-list/src/services/api.service.d.ts +21 -0
  115. package/users-list/src/services/events-communication.service.d.ts +8 -0
  116. package/users-list/src/services/notification.service.d.ts +18 -0
  117. package/users-list/src/services/removeKynFromIBM.service.d.ts +8 -0
  118. package/users-list/src/services/user.service.d.ts +26 -0
  119. package/users-list/src/services/users-search.service.d.ts +25 -0
  120. package/users-list/src/users-list.component.d.ts +35 -0
  121. package/users-list/src/users-list.module.d.ts +12 -0
  122. package/users-list/src/utils/common-functions.d.ts +1 -0
  123. package/users-list/src/utils/pagination/pagination.component.d.ts +18 -0
  124. package/users-list/src/utils/utils.service.d.ts +9 -0
  125. package/.editorconfig +0 -16
  126. package/.vscode/extensions.json +0 -4
  127. package/.vscode/launch.json +0 -20
  128. package/.vscode/tasks.json +0 -42
  129. package/angular.json +0 -41
  130. package/projects/tuki/widgets/README.md +0 -24
  131. package/projects/tuki/widgets/karma.conf.js +0 -44
  132. package/projects/tuki/widgets/ng-package.json +0 -7
  133. package/projects/tuki/widgets/package.json +0 -13
  134. package/projects/tuki/widgets/src/lib/widgets.component.spec.ts +0 -23
  135. package/projects/tuki/widgets/src/lib/widgets.component.ts +0 -20
  136. package/projects/tuki/widgets/src/lib/widgets.module.ts +0 -16
  137. package/projects/tuki/widgets/src/lib/widgets.service.spec.ts +0 -16
  138. package/projects/tuki/widgets/src/lib/widgets.service.ts +0 -9
  139. package/projects/tuki/widgets/src/test.ts +0 -27
  140. package/projects/tuki/widgets/styles/_variables.scss +0 -90
  141. package/projects/tuki/widgets/styles/form.scss +0 -231
  142. package/projects/tuki/widgets/styles/icons.scss +0 -32
  143. package/projects/tuki/widgets/styles/styles.scss +0 -110
  144. package/projects/tuki/widgets/styles/tables.scss +0 -30
  145. package/projects/tuki/widgets/tsconfig.lib.json +0 -36
  146. package/projects/tuki/widgets/tsconfig.lib.prod.json +0 -10
  147. package/projects/tuki/widgets/tsconfig.spec.json +0 -17
  148. package/projects/tuki/widgets/user-manage/ng-package.json +0 -7
  149. package/projects/tuki/widgets/user-manage/src/app.constants.ts +0 -38
  150. package/projects/tuki/widgets/user-manage/src/classes/device.ts +0 -225
  151. package/projects/tuki/widgets/user-manage/src/classes/line.ts +0 -117
  152. package/projects/tuki/widgets/user-manage/src/classes/notification.ts +0 -39
  153. package/projects/tuki/widgets/user-manage/src/classes/pagination.ts +0 -18
  154. package/projects/tuki/widgets/user-manage/src/classes/simplified-user.ts +0 -128
  155. package/projects/tuki/widgets/user-manage/src/classes/table-data.ts +0 -6
  156. package/projects/tuki/widgets/user-manage/src/classes/user-interface.ts +0 -225
  157. package/projects/tuki/widgets/user-manage/src/classes/user-list.ts +0 -40
  158. package/projects/tuki/widgets/user-manage/src/classes/user.ts +0 -8
  159. package/projects/tuki/widgets/user-manage/src/common-functions.ts +0 -16
  160. package/projects/tuki/widgets/user-manage/src/environments/environment.prod.ts +0 -9
  161. package/projects/tuki/widgets/user-manage/src/environments/environment.ts +0 -10
  162. package/projects/tuki/widgets/user-manage/src/interseptors/auth.interceptor.ts +0 -36
  163. package/projects/tuki/widgets/user-manage/src/lazy-loading-select/lazy-loading-select.component.html +0 -50
  164. package/projects/tuki/widgets/user-manage/src/lazy-loading-select/lazy-loading-select.component.scss +0 -3
  165. package/projects/tuki/widgets/user-manage/src/lazy-loading-select/lazy-loading-select.component.ts +0 -81
  166. package/projects/tuki/widgets/user-manage/src/material.module.ts +0 -85
  167. package/projects/tuki/widgets/user-manage/src/notifications/notification.component.html +0 -33
  168. package/projects/tuki/widgets/user-manage/src/notifications/notification.component.scss +0 -84
  169. package/projects/tuki/widgets/user-manage/src/notifications/notification.component.ts +0 -46
  170. package/projects/tuki/widgets/user-manage/src/removeKynFromIBM.service.ts +0 -25
  171. package/projects/tuki/widgets/user-manage/src/services/api.service.ts +0 -89
  172. package/projects/tuki/widgets/user-manage/src/services/notification.service.ts +0 -68
  173. package/projects/tuki/widgets/user-manage/src/services/removeKynFromIBM.service.ts +0 -25
  174. package/projects/tuki/widgets/user-manage/src/services/site-settings.service.ts +0 -35
  175. package/projects/tuki/widgets/user-manage/src/services/user.service.ts +0 -120
  176. package/projects/tuki/widgets/user-manage/src/services/users-search.service.ts +0 -58
  177. package/projects/tuki/widgets/user-manage/src/services/utils.service.ts +0 -71
  178. package/projects/tuki/widgets/user-manage/src/styles/_variables.scss +0 -90
  179. package/projects/tuki/widgets/user-manage/src/styles/form.scss +0 -231
  180. package/projects/tuki/widgets/user-manage/src/styles/icons.scss +0 -32
  181. package/projects/tuki/widgets/user-manage/src/styles/styles.scss +0 -110
  182. package/projects/tuki/widgets/user-manage/src/styles/tables.scss +0 -30
  183. package/projects/tuki/widgets/user-manage/src/user-details/notification.service.ts +0 -68
  184. package/projects/tuki/widgets/user-manage/src/user-info/user-info.component.html +0 -32
  185. package/projects/tuki/widgets/user-manage/src/user-info/user-info.component.scss +0 -53
  186. package/projects/tuki/widgets/user-manage/src/user-info/user-info.component.ts +0 -19
  187. package/projects/tuki/widgets/user-manage/src/user-manage-widget.component.html +0 -291
  188. package/projects/tuki/widgets/user-manage/src/user-manage-widget.component.scss +0 -461
  189. package/projects/tuki/widgets/user-manage/src/user-manage-widget.component.ts +0 -163
  190. package/projects/tuki/widgets/user-manage/src/user-manage.module.ts +0 -53
  191. package/projects/tuki/widgets/user-manage/src/utils/app-loader/app-loader.component.html +0 -6
  192. package/projects/tuki/widgets/user-manage/src/utils/app-loader/app-loader.component.scss +0 -11
  193. package/projects/tuki/widgets/user-manage/src/utils/app-loader/app-loader.ts +0 -13
  194. package/projects/tuki/widgets/user-manage/src/utils/pagination/pagination.component.html +0 -26
  195. package/projects/tuki/widgets/user-manage/src/utils/pagination/pagination.component.scss +0 -41
  196. package/projects/tuki/widgets/user-manage/src/utils/pagination/pagination.component.ts +0 -41
  197. package/projects/tuki/widgets/users-list/ng-package.json +0 -6
  198. package/projects/tuki/widgets/users-list/src/app.constants.ts +0 -35
  199. package/projects/tuki/widgets/users-list/src/classes/device.ts +0 -225
  200. package/projects/tuki/widgets/users-list/src/classes/line.ts +0 -117
  201. package/projects/tuki/widgets/users-list/src/classes/notification.ts +0 -38
  202. package/projects/tuki/widgets/users-list/src/classes/pagination.ts +0 -18
  203. package/projects/tuki/widgets/users-list/src/classes/simlified-user.ts +0 -74
  204. package/projects/tuki/widgets/users-list/src/classes/table-data.ts +0 -6
  205. package/projects/tuki/widgets/users-list/src/classes/user-interface.ts +0 -225
  206. package/projects/tuki/widgets/users-list/src/classes/user-list.ts +0 -40
  207. package/projects/tuki/widgets/users-list/src/classes/user.ts +0 -8
  208. package/projects/tuki/widgets/users-list/src/material.module.ts +0 -84
  209. package/projects/tuki/widgets/users-list/src/services/api.service.ts +0 -87
  210. package/projects/tuki/widgets/users-list/src/services/events-communication.service.ts +0 -11
  211. package/projects/tuki/widgets/users-list/src/services/notification.service.ts +0 -68
  212. package/projects/tuki/widgets/users-list/src/services/removeKynFromIBM.service.ts +0 -25
  213. package/projects/tuki/widgets/users-list/src/services/user.service.ts +0 -117
  214. package/projects/tuki/widgets/users-list/src/services/users-search.service.ts +0 -58
  215. package/projects/tuki/widgets/users-list/src/users-list.component.css +0 -4
  216. package/projects/tuki/widgets/users-list/src/users-list.component.css.map +0 -1
  217. package/projects/tuki/widgets/users-list/src/users-list.component.html +0 -39
  218. package/projects/tuki/widgets/users-list/src/users-list.component.scss +0 -9
  219. package/projects/tuki/widgets/users-list/src/users-list.component.ts +0 -85
  220. package/projects/tuki/widgets/users-list/src/users-list.module.ts +0 -36
  221. package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.component.css +0 -11
  222. package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.component.css.map +0 -1
  223. package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.component.html +0 -6
  224. package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.component.scss +0 -11
  225. package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.ts +0 -13
  226. package/projects/tuki/widgets/users-list/src/utils/common-functions.ts +0 -16
  227. package/projects/tuki/widgets/users-list/src/utils/notifications/notification.component.html +0 -33
  228. package/projects/tuki/widgets/users-list/src/utils/notifications/notification.component.scss +0 -84
  229. package/projects/tuki/widgets/users-list/src/utils/notifications/notification.component.ts +0 -46
  230. package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.css +0 -45
  231. package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.css.map +0 -1
  232. package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.html +0 -26
  233. package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.scss +0 -41
  234. package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.ts +0 -41
  235. package/projects/tuki/widgets/users-list/src/utils/utils.service.ts +0 -71
  236. package/tsconfig.json +0 -46
  237. /package/{projects/tuki/widgets/user-manage/public-api.ts → user-manage/public-api.d.ts} +0 -0
  238. /package/{projects/tuki/widgets/users-list/public-api.ts → users-list/public-api.d.ts} +0 -0
@@ -1,58 +0,0 @@
1
- import { Injectable, OnInit } from '@angular/core';
2
- import { SimplifiedUser } from '../classes/simlified-user';
3
- import { APIService } from './api.service';
4
- import { ListUser, ListUserInterface } from '../classes/user-list';
5
- import { BehaviorSubject, Observable } from 'rxjs';
6
- import { API, PAGINATION_DEFAULTS, PAGINATION_SIZE_OPTIONS } from '../app.constants';
7
- import { TableDataInterface } from '../classes/table-data';
8
- import { map } from 'rxjs/operators';
9
- import { RemoveKynFromIBMService } from './removeKynFromIBM.service';
10
- import { PaginationDataDto } from '../classes/pagination';
11
-
12
-
13
-
14
- @Injectable()
15
- export class UsersSearchService {
16
- siteId: number = -1;
17
- userId: string = '';
18
- customerId!: number;
19
- userIdExistPending = false;
20
- hasExistedUserId = false;
21
- pageSize = PAGINATION_DEFAULTS.SIZE;
22
- pageIndex = PAGINATION_DEFAULTS.SIZE;
23
- pageSizeOptions = PAGINATION_SIZE_OPTIONS;
24
- total!: number;
25
- searchParams!: any;
26
- foundUsers$!: any;
27
-
28
- constructor(
29
- private apiService: APIService,
30
- private removeKynFromIBMService: RemoveKynFromIBMService
31
- ) {
32
- this.foundUsers$ = new BehaviorSubject(null);
33
-
34
- }
35
-
36
- public getPagination(): PaginationDataDto {
37
- return {
38
- total: this.total,
39
- pageSizeOptions: this.pageSizeOptions,
40
- pageSize: this.pageSize,
41
- pageIndex: this.pageIndex
42
- };
43
- }
44
-
45
- public quickRegularUsersSearch() {
46
- this.searchParams = this.searchParams || {customerid: this.customerId};
47
- return this.apiService.fetchPagination(API.QUICK_USERS_SEARCH, this.pageSize, this.pageIndex, this.searchParams)
48
- .pipe(map((res: TableDataInterface) => {
49
- this.total = res.total;
50
- // this.totals = this.totals || {};
51
- // this.totals['users'] = res.total;
52
- const users = res.pageData && res.pageData.length ? res.pageData.map(user => new ListUser(user)) : [];
53
- // this.foundUsers$.next(this.removeKynFromIBMService.removeCUCMS(users, this.customerId));
54
- this.foundUsers$.next(users);
55
- }));
56
- // .pipe(this.handleError(true));
57
- }
58
- }
@@ -1,4 +0,0 @@
1
- table {
2
- border-collapse: collapse;
3
- border-spacing: 0;
4
- }/*# sourceMappingURL=users-list.component.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sources":["users-list.component.scss","users-list.component.css"],"names":[],"mappings":"AAAA;EACE,yBAAA;EACA,iBAAA;ACCF","file":"users-list.component.css"}
@@ -1,39 +0,0 @@
1
- <app-pagination
2
- [pagination]="usersSearchService.getPagination()"
3
- [showPageSizeOptions]="true"
4
- (pageNumberChangeEmitter)="pageNumberChangeEvent($event)"
5
- (pageEmitter)="pageEvent($event)">
6
- </app-pagination>
7
-
8
- <table class="webex-table" mat-table *ngIf="users?.length" #table [dataSource]="dataSource">
9
-
10
- <ng-container matColumnDef="user-icon">
11
- <th mat-header-cell *matHeaderCellDef class="webex-table-th"></th>
12
- <td class="user-site" mat-cell *matCellDef="let user" (click)="onUserClick(user)">
13
- <span class="icon-webex-box"><span class="icon-webex icon-webex-user"></span></span>
14
- </td>
15
- </ng-container>
16
-
17
- <ng-container matColumnDef="name">
18
- <th mat-header-cell *matHeaderCellDef class="webex-table-th">First Name/Last Name</th>
19
- <td class="user-site" mat-cell *matCellDef="let user" (click)="onUserClick(user)"> {{ user.firstName }} {{ user.lastName }}</td>
20
- </ng-container>
21
-
22
- <ng-container matColumnDef="email">
23
- <th mat-header-cell *matHeaderCellDef class="webex-table-th">Email</th>
24
- <td class="user-site" mat-cell *matCellDef="let user" (click)="onUserClick(user)"> {{ user.email }}</td>
25
- </ng-container>
26
-
27
- <ng-container matColumnDef="status">
28
- <th mat-header-cell *matHeaderCellDef class="webex-table-th">Status</th>
29
- <td class="user-site" mat-cell *matCellDef="let user" (click)="onUserClick(user)"></td>
30
- </ng-container>
31
-
32
- <ng-container matColumnDef="role">
33
- <th mat-header-cell *matHeaderCellDef class="webex-table-th">Administrator Role</th>
34
- <td class="user-site" mat-cell *matCellDef="let user" (click)="onUserClick(user)"></td>
35
- </ng-container>
36
-
37
- <tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
38
- <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
39
- </table>
@@ -1,9 +0,0 @@
1
- table {
2
- border-collapse: collapse;
3
- border-spacing: 0;
4
- }
5
-
6
- table.mat-table {
7
- border-spacing: 0;
8
- width: 100%;
9
- }
@@ -1,85 +0,0 @@
1
- import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
2
- import { FormGroup } from '@angular/forms';
3
- import { UserService } from './services/user.service';
4
- import { APIService } from "./services/api.service";
5
- import { NotificationService } from './services/notification.service';
6
- import { Subscription } from 'rxjs';
7
- import { UsersSearchService } from './services/users-search.service';
8
- import { ListUser } from './classes/user-list';
9
- import { MatTableDataSource } from '@angular/material/table';
10
- import { PageEvent } from '@angular/material/paginator';
11
-
12
- const DISPLAYED_COLS = ['user-icon', 'name', 'email', 'status', 'role'];
13
-
14
- @Component({
15
- selector: 'app-users-list',
16
- templateUrl: './users-list.component.html',
17
- styleUrls: ['./users-list.component.scss']
18
- })
19
- export class UsersListComponent implements OnInit {
20
- @Input() token!: string;
21
- @Input() customerId!: number;
22
- @Output() openUser = new EventEmitter();
23
- dataPending!: boolean;
24
- users!: ListUser[];
25
- dataSource!: MatTableDataSource<ListUser>;
26
- displayedColumns = DISPLAYED_COLS;
27
- private searchSubscription!: Subscription;
28
-
29
- get form(): FormGroup {
30
- return this.userService?.user?.form;
31
- }
32
-
33
- constructor(
34
- public userService: UserService,
35
- private apiService: APIService,
36
- private notifications: NotificationService,
37
- public usersSearchService: UsersSearchService
38
- ) {
39
- console.log('users list 1');
40
- }
41
-
42
- ngOnInit(): void {
43
- console.log('users list 2');
44
- this.usersSearchService.customerId = this.customerId;
45
- this.apiService.token = this.token;
46
- this.runSearch();
47
-
48
- this.searchSubscription = this.usersSearchService.foundUsers$
49
- .subscribe((users: ListUser[]) => {
50
- this.initializeDataSource(users);
51
- this.users = users;
52
- });
53
- }
54
-
55
- public pageNumberChangeEvent(perPageNumber: number): void {
56
- this.usersSearchService.pageSize = perPageNumber;
57
- this.usersSearchService.pageIndex = 0;
58
- this.runSearch();
59
- }
60
-
61
- public pageEvent(event: PageEvent): void {
62
- this.usersSearchService.pageSize = event.pageSize;
63
- this.usersSearchService.pageIndex = event.pageIndex;
64
- this.runSearch();
65
- }
66
-
67
- public onUserClick(user: ListUser): void {
68
- this.openUser.emit(user);
69
- }
70
-
71
- private initializeDataSource(users: ListUser[]): void {
72
- this.dataSource = new MatTableDataSource(users);
73
- }
74
-
75
- private runSearch(): void {
76
- this.dataPending = true;
77
- this.usersSearchService.quickRegularUsersSearch()
78
- .subscribe(() => {
79
- this.dataPending = false;
80
- }, () => {
81
- this.dataPending = false;
82
- this.notifications.error('The data can not be received');
83
- });
84
- }
85
- }
@@ -1,36 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { UsersListComponent } from './users-list.component';
3
- import { FormsModule } from '@angular/forms';
4
- import { ReactiveFormsModule } from '@angular/forms';
5
- import { BrowserModule } from '@angular/platform-browser';
6
- import { MaterialModule } from './material.module';
7
- import { PaginationComponent } from './utils/pagination/pagination.component';
8
- import { UserService } from './services/user.service';
9
- import { APIService } from './services/api.service';
10
- import { EventsCommunicationService } from './services/events-communication.service';
11
- import { UsersSearchService } from './services/users-search.service';
12
- import { NotificationService } from './services/notification.service';
13
- import { RemoveKynFromIBMService } from './services/removeKynFromIBM.service';
14
- import { HttpClient, HttpClientModule } from '@angular/common/http';
15
-
16
-
17
- @NgModule({
18
- declarations: [UsersListComponent, PaginationComponent],
19
- imports: [
20
- BrowserModule,
21
- FormsModule,
22
- ReactiveFormsModule,
23
- HttpClientModule,
24
- MaterialModule
25
- ],
26
- providers: [
27
- UserService,
28
- APIService,
29
- EventsCommunicationService,
30
- UsersSearchService,
31
- NotificationService,
32
- RemoveKynFromIBMService
33
- ],
34
- exports: [UsersListComponent]
35
- })
36
- export class UsersListModule { }
@@ -1,11 +0,0 @@
1
- .overlay {
2
- position: fixed;
3
- width: 100%;
4
- height: 100%;
5
- top: 0;
6
- left: 0;
7
- right: 0;
8
- bottom: 0;
9
- background-color: rgba(255, 255, 255, 0.2);
10
- z-index: 200;
11
- }/*# sourceMappingURL=app-loader.component.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sources":["app-loader.component.scss","app-loader.component.css"],"names":[],"mappings":"AAAA;EACI,eAAA;EACA,WAAA;EACA,YAAA;EACA,MAAA;EACA,OAAA;EACA,QAAA;EACA,SAAA;EACA,0CAAA;EACA,YAAA;ACCJ","file":"app-loader.component.css"}
@@ -1,6 +0,0 @@
1
- <div class="overlay">
2
- <mat-progress-spinner
3
- class="page-spinner"
4
- mode="indeterminate"
5
- [diameter]="120"></mat-progress-spinner>
6
- </div>
@@ -1,11 +0,0 @@
1
- .overlay {
2
- position: fixed;
3
- width: 100%;
4
- height: 100%;
5
- top: 0;
6
- left: 0;
7
- right: 0;
8
- bottom: 0;
9
- background-color: rgba(255, 255, 255, 0.2);
10
- z-index: 200;
11
- }
@@ -1,13 +0,0 @@
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
- }
@@ -1,16 +0,0 @@
1
- export const getSavableData = (model: any, exclude?: Array<string>) => {
2
- let result = Object.keys(model);
3
- if (exclude && exclude.length) {
4
- result = result.filter(key => !exclude.some(item => item === key));
5
- }
6
- return result.reduce((result, key) => {
7
- if (model[key] instanceof Array && model[key].length && model[key][0].getSavableData) {
8
- (result as any)[key] = model[key].map((item: any) => item.getSavableData());
9
- } else if (model[key] instanceof Object && model[key].getSavableData) {
10
- (result as any)[key] = model[key].getSavableData();
11
- } else {
12
- (result as any)[key] = model[key];
13
- }
14
- return result;
15
- }, {});
16
- };
@@ -1,33 +0,0 @@
1
- <!--
2
-
3
- <div class="notification-block" role="alert" aria-live="assertive">
4
- <div class="notification"
5
- *ngFor="let notification of list"
6
- [ngClass]="{'error': notification.isError(), 'success': notification.isSuccess()}">
7
-
8
- <div class="flex-box">
9
- <div class="notification-icons-block">
10
- <i *ngIf="notification.isError()" class="fa fa-exclamation-triangle"></i>
11
- <i *ngIf="notification.isWarning()" class="fa fa-hand-paper-o"></i>
12
- <i *ngIf="notification.isSuccess()" class="fa fa-check"></i>
13
- <i *ngIf="notification.isInfo()" class="fa fa-info-circle"></i>
14
- </div>
15
- <div *ngIf="!isReadMore" class="message-block">
16
- {{notification.message | truncate:[93]}}
17
- </div>
18
- <div *ngIf="isReadMore" class="message-block">
19
- {{notification.message}}
20
- </div>
21
- </div>
22
- <div class="read-more-error link clickable" *ngIf="notification.message && notification.message.length > 93"
23
- (click)="readMore()">{{(isReadMore ? 'BUTTON.COLLAPSE' : 'BUTTON.READ_MORE') | translate}}</div>
24
- <button
25
- class="close"
26
- mat-icon-button
27
- matTooltip="{{'BUTTON.CLOSE' | translate}} {{'NOTIFICATION_MSG.' + notification.type | translate}} {{'NOTIFICATION_MSG.NOTI' | translate}}"
28
- (click)="removeNotification(notification)">
29
- <img class="notification-icon-close" src="assets/icons/close_icon_modal.svg" alt="">
30
- </button>
31
- </div>
32
- </div>
33
- -->
@@ -1,84 +0,0 @@
1
- @import '../../../styles/_variables';
2
-
3
- .notification-block {
4
- right: 0;
5
- top: 110px;
6
- position: absolute;
7
- width: 20%;
8
- z-index: 100;
9
-
10
- .read-more-error {
11
- margin: 10px 13px 3px 0;
12
- text-align: right;
13
- }
14
-
15
- .notification {
16
- padding: 15px 0 10px 0;
17
- margin-bottom: 18px;
18
- color: $main-txt-color;
19
- position: relative;
20
- border-radius: 3px;
21
- border-top: 1.5px solid $warning-border-color;
22
- background: $warning-bg-color;
23
- box-shadow: 0px 8px 12px 0px rgba(9, 30, 66, 0.15), 0px 0px 1px 0px rgba(9, 30, 66, 0.31);
24
- width: 368px;
25
- position: relative;
26
-
27
- .notification-icons-block {
28
- text-align: center;
29
- width: 56px;
30
- }
31
- .message-block {
32
- font-size: 14px;
33
- font-family: $poppins-font !important;
34
- word-break: break-word;
35
- width: 270px;
36
- }
37
- .notification-icon-close {
38
- height: 24px;
39
- }
40
-
41
- &.error {
42
- background: #FFE9E9;
43
- border-top: 1.5px solid #E16D6D;
44
- }
45
- &.success {
46
- background: $success-bg-color;
47
- border-top: 1.5px solid $success-border-color;
48
- }
49
- .fa-exclamation-triangle {
50
- color: #E16D6D !important;
51
- }
52
- .fa-check {
53
- color: #a0c37f !important;
54
- }
55
- .fa-info-circle, .fa-hand-paper-o {
56
- color: #bdb89e !important;
57
- }
58
- .fa {
59
- font-size: 20px;
60
- }
61
- .close {
62
- position: absolute;
63
- top: 2px;
64
- right: -5px;
65
- .fa {
66
- font-size: 14px;
67
- }
68
- }
69
- .fa {
70
- margin: 0;
71
- color: inherit;
72
- }
73
- }
74
- }
75
-
76
- @media screen and (max-width: 600px) {
77
- .notification-block {
78
- width: 50%;
79
- min-width: 150px;
80
- }
81
-
82
- }
83
-
84
-
@@ -1,46 +0,0 @@
1
- import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';
2
- import { Subscription } from 'rxjs';
3
- import { NotificationService } from '../../services/notification.service';
4
- import { Notification } from '../../classes/notification';
5
-
6
- @Component({
7
- selector: 'app-notification',
8
- templateUrl: './notification.component.html',
9
- styleUrls: ['./notification.component.scss'],
10
- changeDetection: ChangeDetectionStrategy.OnPush
11
- })
12
- export class NotificationsComponent implements OnInit, OnDestroy {
13
- public list!: Notification[];
14
- public isReadMore!: boolean;
15
- private listSubscription!: Subscription;
16
-
17
- constructor(
18
- public notificationService: NotificationService,
19
- private ref: ChangeDetectorRef
20
- ) {
21
- }
22
-
23
- ngOnInit() {
24
- this.listChangeSubscribe();
25
- }
26
-
27
- ngOnDestroy() {
28
- this.listSubscription.unsubscribe();
29
- }
30
-
31
- public readMore(): void {
32
- this.isReadMore = !this.isReadMore;
33
- }
34
-
35
- public removeNotification(notification: Notification): void {
36
- this.notificationService.remove(notification);
37
- }
38
-
39
- private listChangeSubscribe(): void {
40
- this.listSubscription = this.notificationService.listChange
41
- .subscribe((list: any) => {
42
- this.list = list;
43
- this.ref.detectChanges();
44
- });
45
- }
46
- }
@@ -1,45 +0,0 @@
1
- .search-header-refresh-icon {
2
- align-items: center;
3
- line-height: 54px;
4
- margin-left: 10px;
5
- }
6
-
7
- button[mat-icon-button] i {
8
- font-size: 18px;
9
- }
10
-
11
- mat-spinner.length-spinner {
12
- position: absolute;
13
- right: 120px;
14
- }
15
-
16
- h3, .search-header-refresh-icon {
17
- float: left;
18
- }
19
-
20
- .page-options, .mat-paginator {
21
- float: right;
22
- }
23
-
24
- .per-page-block mat-form-field {
25
- width: 70px !important;
26
- }
27
-
28
- .per-page-block span {
29
- margin-right: 20px;
30
- }
31
-
32
- .pagination {
33
- display: flex;
34
- justify-content: flex-end;
35
- }
36
-
37
- .select-page-size {
38
- width: 60px;
39
- margin: 0 0 0 15px;
40
- padding: 0 10px;
41
- }
42
-
43
- .item_per_page {
44
- line-height: 35px;
45
- }/*# sourceMappingURL=pagination.component.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sources":["pagination.component.scss","pagination.component.css"],"names":[],"mappings":"AAAA;EACE,mBAAA;EACA,iBAAA;EACA,iBAAA;ACCF;;ADGE;EACE,eAAA;ACAJ;;ADIA;EACE,kBAAA;EACA,YAAA;ACDF;;ADGA;EACE,WAAA;ACAF;;ADEA;EACE,YAAA;ACCF;;ADCA;EACE,sBAAA;ACEF;;ADAA;EACE,kBAAA;ACGF;;ADDA;EACE,aAAA;EACA,yBAAA;ACIF;;ADFA;EACE,WAAA;EACA,kBAAA;EACA,eAAA;ACKF;;ADHA;EACE,iBAAA;ACMF","file":"pagination.component.css"}
@@ -1,26 +0,0 @@
1
- <div class="flex-box pagination">
2
- <div class="page-indexes-box">
3
- <mat-paginator
4
- [id]="'commonPagination'"
5
- [hidePageSize]="true"
6
- [length]="pagination.total"
7
- [pageIndex]="pagination.pageIndex"
8
- [pageSize]="pagination.pageSize"
9
- [pageSizeOptions]="pagination.pageSizeOptions"
10
- (page)="pageEvent($event)">
11
- </mat-paginator>
12
- <mat-spinner class="length-spinner" [diameter]="20" mode="indeterminate" *ngIf="lengthPending">
13
- </mat-spinner>
14
- </div>
15
-
16
- <div class="flex-box per-page-block" *ngIf="showPageSizeOptions">
17
- <div class="item_per_page">Items per page:</div>
18
- <div class="select-box select-page-size">
19
- <mat-select [(ngModel)]="pagination.pageSize" (selectionChange)="changePerPageNumber($event)" #page
20
- [id]="'commonPaginationSelect'">
21
- <mat-option *ngFor="let option of pageSizeOptions; let i = index;" [id]="'paginationSelectOpt_' + i" [value]="option">{{option}}</mat-option>
22
- </mat-select>
23
- </div>
24
-
25
- </div>
26
- </div>
@@ -1,41 +0,0 @@
1
- .search-header-refresh-icon {
2
- align-items: center;
3
- line-height: 54px;
4
- margin-left: 10px;
5
- }
6
-
7
- button[mat-icon-button] {
8
- i {
9
- font-size: 18px;
10
- }
11
- }
12
-
13
- mat-spinner.length-spinner {
14
- position: absolute;
15
- right: 120px;
16
- }
17
- h3, .search-header-refresh-icon {
18
- float: left;
19
- }
20
- .page-options, .mat-paginator {
21
- float: right;
22
- }
23
- .per-page-block mat-form-field {
24
- width: 70px !important;
25
- }
26
- .per-page-block span {
27
- margin-right: 20px;
28
- }
29
- .pagination {
30
- display: flex;
31
- justify-content: flex-end;
32
- }
33
- .select-page-size {
34
- width: 60px;
35
- margin: 0 0 0 15px;
36
- padding: 0 10px;
37
- }
38
- .item_per_page {
39
- line-height: 35px;
40
- }
41
-
@@ -1,41 +0,0 @@
1
- import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
2
- import { PaginationDataDto } from '../../classes/pagination';
3
- import { PAGINATION_SIZE_OPTIONS } from '../../app.constants';
4
-
5
-
6
- @Component({
7
- selector: 'app-pagination',
8
- templateUrl: './pagination.component.html',
9
- styleUrls: ['./pagination.component.scss'],
10
- })
11
- export class PaginationComponent implements OnInit{
12
- @Input()
13
- public pagination!: PaginationDataDto;
14
- @Input()
15
- public showPageSizeOptions!: boolean;
16
- @Input()
17
- public showRefreshButton!: boolean;
18
- @Input()
19
- public lengthPending!: boolean;
20
- @Output()
21
- public pageEmitter = new EventEmitter();
22
- @Output()
23
- public pageNumberChangeEmitter = new EventEmitter<any>();
24
- public pageSizeOptions: number[] = PAGINATION_SIZE_OPTIONS;
25
-
26
- constructor(
27
- ) {
28
- }
29
-
30
- ngOnInit(): void {
31
- }
32
-
33
- public pageEvent(event: any) {
34
- this.pageEmitter.emit(event);
35
- }
36
-
37
- public changePerPageNumber(event: any) {
38
- this.pageNumberChangeEmitter.emit(event.value);
39
- }
40
-
41
- }