@tuki-io/tuki-widgets 0.0.32 → 0.0.35

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 (248) hide show
  1. package/README.md +24 -24
  2. package/esm2020/lib/widgets.component.mjs +22 -22
  3. package/esm2020/lib/widgets.module.mjs +21 -21
  4. package/esm2020/lib/widgets.service.mjs +14 -14
  5. package/esm2020/public-api.mjs +7 -7
  6. package/esm2020/tuki-io-tuki-widgets.mjs +4 -4
  7. package/esm2020/user-device-manage/public-api.mjs +9 -9
  8. package/esm2020/user-device-manage/src/app.constants.mjs +95 -95
  9. package/esm2020/user-device-manage/src/classes/device.mjs +85 -85
  10. package/esm2020/user-device-manage/src/classes/line-association-interface.mjs +2 -2
  11. package/esm2020/user-device-manage/src/classes/line-association.mjs +121 -121
  12. package/esm2020/user-device-manage/src/classes/line-call-info-display.mjs +10 -10
  13. package/esm2020/user-device-manage/src/classes/line-directory.mjs +27 -27
  14. package/esm2020/user-device-manage/src/classes/line.mjs +18 -18
  15. package/esm2020/user-device-manage/src/classes/notification.mjs +32 -32
  16. package/esm2020/user-device-manage/src/classes/recording-options.mjs +7 -7
  17. package/esm2020/user-device-manage/src/classes/simplified-user.mjs +111 -111
  18. package/esm2020/user-device-manage/src/classes/site-defaults.mjs +21 -21
  19. package/esm2020/user-device-manage/src/classes/translation-pattern.mjs +32 -32
  20. package/esm2020/user-device-manage/src/classes/types.mjs +24 -24
  21. package/esm2020/user-device-manage/src/common-functions.mjs +19 -19
  22. package/esm2020/user-device-manage/src/confirm-dialog/info-dialog.component.mjs +34 -34
  23. package/esm2020/user-device-manage/src/device-associated-line/associated-line-row/associated-line-row.component.mjs +31 -31
  24. package/esm2020/user-device-manage/src/device-associated-line/device-associated-line-details-box/device-associated-line-details-box.component.mjs +16 -16
  25. package/esm2020/user-device-manage/src/device-associated-line/device-associated-line-extension/device-associated-line-extension.component.mjs +64 -64
  26. package/esm2020/user-device-manage/src/device-associated-line/device-associated-line.component.mjs +179 -179
  27. package/esm2020/user-device-manage/src/device-list/device-list.component.mjs +24 -24
  28. package/esm2020/user-device-manage/src/device-manage-widget.component.mjs +335 -335
  29. package/esm2020/user-device-manage/src/environments/environment.mjs +11 -11
  30. package/esm2020/user-device-manage/src/interseptors/auth.interceptor.mjs +36 -36
  31. package/esm2020/user-device-manage/src/lazy-loading-select/lazy-loading-select.component.mjs +74 -74
  32. package/esm2020/user-device-manage/src/material.module.mjs +192 -192
  33. package/esm2020/user-device-manage/src/notifications/notification.component.mjs +35 -35
  34. package/esm2020/user-device-manage/src/services/api.service.mjs +79 -79
  35. package/esm2020/user-device-manage/src/services/device.service.mjs +83 -83
  36. package/esm2020/user-device-manage/src/services/dns.service.mjs +104 -104
  37. package/esm2020/user-device-manage/src/services/line.service.mjs +76 -76
  38. package/esm2020/user-device-manage/src/services/notification.service.mjs +62 -62
  39. package/esm2020/user-device-manage/src/services/removeKynFromIBM.service.mjs +25 -25
  40. package/esm2020/user-device-manage/src/services/site-settings.service.mjs +70 -70
  41. package/esm2020/user-device-manage/src/services/sorting-utils.service.mjs +197 -197
  42. package/esm2020/user-device-manage/src/services/user.service.mjs +243 -243
  43. package/esm2020/user-device-manage/src/services/utils.service.mjs +87 -87
  44. package/esm2020/user-device-manage/src/services/validation.service.mjs +760 -760
  45. package/esm2020/user-device-manage/src/user-device-manage.module.mjs +107 -107
  46. package/esm2020/user-device-manage/src/utils/app-loader/app-loader.mjs +14 -14
  47. package/esm2020/user-device-manage/tuki-io-tuki-widgets-user-device-manage.mjs +4 -4
  48. package/esm2020/user-manage/public-api.mjs +7 -7
  49. package/esm2020/user-manage/src/app.constants.mjs +50 -50
  50. package/esm2020/user-manage/src/classes/device.mjs +37 -37
  51. package/esm2020/user-manage/src/classes/line-association-interface.mjs +2 -2
  52. package/esm2020/user-manage/src/classes/line-association.mjs +110 -110
  53. package/esm2020/user-manage/src/classes/line-call-info-display.mjs +10 -10
  54. package/esm2020/user-manage/src/classes/line-directory.mjs +27 -27
  55. package/esm2020/user-manage/src/classes/line.mjs +18 -18
  56. package/esm2020/user-manage/src/classes/notification.mjs +32 -32
  57. package/esm2020/user-manage/src/classes/pagination.mjs +8 -8
  58. package/esm2020/user-manage/src/classes/recording-options.mjs +7 -7
  59. package/esm2020/user-manage/src/classes/simplified-user.mjs +109 -109
  60. package/esm2020/user-manage/src/classes/table-data.mjs +2 -2
  61. package/esm2020/user-manage/src/classes/translation-pattern.mjs +32 -32
  62. package/esm2020/user-manage/src/classes/user-list.mjs +10 -10
  63. package/esm2020/user-manage/src/common-functions.mjs +19 -19
  64. package/esm2020/user-manage/src/device-list/device-list.component.mjs +24 -24
  65. package/esm2020/user-manage/src/environments/environment.mjs +11 -11
  66. package/esm2020/user-manage/src/interseptors/auth.interceptor.mjs +36 -36
  67. package/esm2020/user-manage/src/lazy-loading-select/lazy-loading-select.component.mjs +74 -74
  68. package/esm2020/user-manage/src/material.module.mjs +188 -188
  69. package/esm2020/user-manage/src/notifications/notification.component.mjs +35 -35
  70. package/esm2020/user-manage/src/removeKynFromIBM.service.mjs +25 -25
  71. package/esm2020/user-manage/src/services/api.service.mjs +79 -79
  72. package/esm2020/user-manage/src/services/dns.service.mjs +110 -110
  73. package/esm2020/user-manage/src/services/line.service.mjs +34 -34
  74. package/esm2020/user-manage/src/services/notification.service.mjs +62 -62
  75. package/esm2020/user-manage/src/services/removeKynFromIBM.service.mjs +25 -25
  76. package/esm2020/user-manage/src/services/site-settings.service.mjs +36 -36
  77. package/esm2020/user-manage/src/services/sorting-utils.service.mjs +197 -197
  78. package/esm2020/user-manage/src/services/user.service.mjs +207 -207
  79. package/esm2020/user-manage/src/services/users-search.service.mjs +49 -49
  80. package/esm2020/user-manage/src/services/utils.service.mjs +73 -73
  81. package/esm2020/user-manage/src/user-calling/user-calling-extension/user-calling-extension.component.mjs +65 -65
  82. package/esm2020/user-manage/src/user-calling/user-calling.component.mjs +78 -78
  83. package/esm2020/user-manage/src/user-info/user-info.component.mjs +20 -20
  84. package/esm2020/user-manage/src/user-manage-widget.component.mjs +208 -208
  85. package/esm2020/user-manage/src/user-manage.module.mjs +99 -99
  86. package/esm2020/user-manage/src/utils/app-loader/app-loader.mjs +14 -14
  87. package/esm2020/user-manage/src/utils/pagination/pagination.component.mjs +43 -43
  88. package/esm2020/user-manage/tuki-io-tuki-widgets-user-manage.mjs +4 -4
  89. package/esm2020/users-list/public-api.mjs +9 -9
  90. package/esm2020/users-list/src/app.constants.mjs +50 -50
  91. package/esm2020/users-list/src/classes/device.mjs +7 -7
  92. package/esm2020/users-list/src/classes/line.mjs +18 -18
  93. package/esm2020/users-list/src/classes/notification.mjs +31 -31
  94. package/esm2020/users-list/src/classes/pagination.mjs +8 -8
  95. package/esm2020/users-list/src/classes/simlified-user.mjs +50 -50
  96. package/esm2020/users-list/src/classes/table-data.mjs +2 -2
  97. package/esm2020/users-list/src/classes/user-list.mjs +13 -13
  98. package/esm2020/users-list/src/material.module.mjs +209 -209
  99. package/esm2020/users-list/src/move-user-wizard/move-user-stepper/move-user-stepper.component.mjs +95 -95
  100. package/esm2020/users-list/src/move-user-wizard/move-user-wizard.component.mjs +35 -35
  101. package/esm2020/users-list/src/services/api-webex.service.mjs +17 -17
  102. package/esm2020/users-list/src/services/api.service.mjs +78 -78
  103. package/esm2020/users-list/src/services/dns.service.mjs +120 -120
  104. package/esm2020/users-list/src/services/events-communication.service.mjs +14 -14
  105. package/esm2020/users-list/src/services/notification.service.mjs +62 -62
  106. package/esm2020/users-list/src/services/removeKynFromIBM.service.mjs +25 -25
  107. package/esm2020/users-list/src/services/user.service.mjs +150 -150
  108. package/esm2020/users-list/src/services/users-search.service.mjs +120 -120
  109. package/esm2020/users-list/src/user-list-confirm-dialog/user-list-confirm-dialog.component.mjs +34 -34
  110. package/esm2020/users-list/src/users-list.component.mjs +260 -259
  111. package/esm2020/users-list/src/users-list.module.mjs +80 -80
  112. package/esm2020/users-list/src/utils/app-loader/app-loader.mjs +14 -14
  113. package/esm2020/users-list/src/utils/common-functions.mjs +19 -19
  114. package/esm2020/users-list/src/utils/pagination/pagination.component.mjs +43 -43
  115. package/esm2020/users-list/src/utils/utils.service.mjs +73 -73
  116. package/esm2020/users-list/tuki-io-tuki-widgets-users-list.mjs +4 -4
  117. package/fesm2015/tuki-io-tuki-widgets-user-device-manage.mjs +3277 -3277
  118. package/fesm2015/tuki-io-tuki-widgets-user-device-manage.mjs.map +1 -1
  119. package/fesm2015/tuki-io-tuki-widgets-user-manage.mjs +2004 -2004
  120. package/fesm2015/tuki-io-tuki-widgets-user-manage.mjs.map +1 -1
  121. package/fesm2015/tuki-io-tuki-widgets-users-list.mjs +1429 -1428
  122. package/fesm2015/tuki-io-tuki-widgets-users-list.mjs.map +1 -1
  123. package/fesm2015/tuki-io-tuki-widgets.mjs +48 -48
  124. package/fesm2015/tuki-io-tuki-widgets.mjs.map +1 -1
  125. package/fesm2020/tuki-io-tuki-widgets-user-device-manage.mjs +3239 -3239
  126. package/fesm2020/tuki-io-tuki-widgets-user-device-manage.mjs.map +1 -1
  127. package/fesm2020/tuki-io-tuki-widgets-user-manage.mjs +1987 -1987
  128. package/fesm2020/tuki-io-tuki-widgets-user-manage.mjs.map +1 -1
  129. package/fesm2020/tuki-io-tuki-widgets-users-list.mjs +1418 -1417
  130. package/fesm2020/tuki-io-tuki-widgets-users-list.mjs.map +1 -1
  131. package/fesm2020/tuki-io-tuki-widgets.mjs +48 -48
  132. package/fesm2020/tuki-io-tuki-widgets.mjs.map +1 -1
  133. package/index.d.ts +5 -5
  134. package/lib/widgets.component.d.ts +8 -8
  135. package/lib/widgets.module.d.ts +7 -7
  136. package/lib/widgets.service.d.ts +6 -6
  137. package/package.json +1 -1
  138. package/public-api.d.ts +3 -3
  139. package/user-device-manage/index.d.ts +5 -5
  140. package/user-device-manage/public-api.d.ts +8 -8
  141. package/user-device-manage/src/app.constants.d.ts +74 -74
  142. package/user-device-manage/src/classes/device.d.ts +233 -233
  143. package/user-device-manage/src/classes/line-association-interface.d.ts +45 -45
  144. package/user-device-manage/src/classes/line-association.d.ts +62 -62
  145. package/user-device-manage/src/classes/line-call-info-display.d.ts +11 -11
  146. package/user-device-manage/src/classes/line-directory.d.ts +15 -15
  147. package/user-device-manage/src/classes/line.d.ts +140 -140
  148. package/user-device-manage/src/classes/notification.d.ts +18 -18
  149. package/user-device-manage/src/classes/recording-options.d.ts +5 -5
  150. package/user-device-manage/src/classes/simplified-user.d.ts +52 -52
  151. package/user-device-manage/src/classes/site-defaults.d.ts +146 -146
  152. package/user-device-manage/src/classes/translation-pattern.d.ts +19 -19
  153. package/user-device-manage/src/classes/types.d.ts +19 -19
  154. package/user-device-manage/src/common-functions.d.ts +1 -1
  155. package/user-device-manage/src/confirm-dialog/info-dialog.component.d.ts +20 -20
  156. package/user-device-manage/src/device-associated-line/associated-line-row/associated-line-row.component.d.ts +15 -15
  157. package/user-device-manage/src/device-associated-line/device-associated-line-details-box/device-associated-line-details-box.component.d.ts +7 -7
  158. package/user-device-manage/src/device-associated-line/device-associated-line-extension/device-associated-line-extension.component.d.ts +24 -24
  159. package/user-device-manage/src/device-associated-line/device-associated-line.component.d.ts +89 -89
  160. package/user-device-manage/src/device-list/device-list.component.d.ts +11 -11
  161. package/user-device-manage/src/device-manage-widget.component.d.ts +71 -71
  162. package/user-device-manage/src/environments/environment.d.ts +9 -9
  163. package/user-device-manage/src/interseptors/auth.interceptor.d.ts +9 -9
  164. package/user-device-manage/src/lazy-loading-select/lazy-loading-select.component.d.ts +35 -35
  165. package/user-device-manage/src/material.module.d.ts +29 -29
  166. package/user-device-manage/src/notifications/notification.component.d.ts +19 -19
  167. package/user-device-manage/src/services/api.service.d.ts +20 -20
  168. package/user-device-manage/src/services/device.service.d.ts +21 -21
  169. package/user-device-manage/src/services/dns.service.d.ts +14 -14
  170. package/user-device-manage/src/services/line.service.d.ts +33 -33
  171. package/user-device-manage/src/services/notification.service.d.ts +18 -18
  172. package/user-device-manage/src/services/removeKynFromIBM.service.d.ts +8 -8
  173. package/user-device-manage/src/services/site-settings.service.d.ts +25 -25
  174. package/user-device-manage/src/services/sorting-utils.service.d.ts +26 -26
  175. package/user-device-manage/src/services/user.service.d.ts +51 -51
  176. package/user-device-manage/src/services/utils.service.d.ts +10 -10
  177. package/user-device-manage/src/services/validation.service.d.ts +165 -165
  178. package/user-device-manage/src/user-device-manage.module.d.ts +22 -22
  179. package/user-device-manage/src/utils/app-loader/app-loader.d.ts +6 -6
  180. package/user-manage/index.d.ts +5 -5
  181. package/user-manage/public-api.d.ts +6 -6
  182. package/user-manage/src/app.constants.d.ts +29 -29
  183. package/user-manage/src/classes/device.d.ts +203 -203
  184. package/user-manage/src/classes/line-association-interface.d.ts +40 -40
  185. package/user-manage/src/classes/line-association.d.ts +55 -55
  186. package/user-manage/src/classes/line-call-info-display.d.ts +11 -11
  187. package/user-manage/src/classes/line-directory.d.ts +16 -16
  188. package/user-manage/src/classes/line.d.ts +140 -140
  189. package/user-manage/src/classes/notification.d.ts +18 -18
  190. package/user-manage/src/classes/pagination.d.ts +13 -13
  191. package/user-manage/src/classes/recording-options.d.ts +5 -5
  192. package/user-manage/src/classes/simplified-user.d.ts +50 -50
  193. package/user-manage/src/classes/table-data.d.ts +5 -5
  194. package/user-manage/src/classes/translation-pattern.d.ts +18 -18
  195. package/user-manage/src/classes/user-list.d.ts +34 -34
  196. package/user-manage/src/common-functions.d.ts +1 -1
  197. package/user-manage/src/device-list/device-list.component.d.ts +11 -11
  198. package/user-manage/src/environments/environment.d.ts +9 -9
  199. package/user-manage/src/interseptors/auth.interceptor.d.ts +9 -9
  200. package/user-manage/src/lazy-loading-select/lazy-loading-select.component.d.ts +35 -35
  201. package/user-manage/src/material.module.d.ts +28 -28
  202. package/user-manage/src/notifications/notification.component.d.ts +19 -19
  203. package/user-manage/src/removeKynFromIBM.service.d.ts +8 -8
  204. package/user-manage/src/services/api.service.d.ts +21 -21
  205. package/user-manage/src/services/dns.service.d.ts +14 -14
  206. package/user-manage/src/services/line.service.d.ts +17 -17
  207. package/user-manage/src/services/notification.service.d.ts +18 -18
  208. package/user-manage/src/services/removeKynFromIBM.service.d.ts +8 -8
  209. package/user-manage/src/services/site-settings.service.d.ts +9 -9
  210. package/user-manage/src/services/sorting-utils.service.d.ts +26 -26
  211. package/user-manage/src/services/user.service.d.ts +43 -43
  212. package/user-manage/src/services/users-search.service.d.ts +25 -25
  213. package/user-manage/src/services/utils.service.d.ts +9 -9
  214. package/user-manage/src/user-calling/user-calling-extension/user-calling-extension.component.d.ts +24 -24
  215. package/user-manage/src/user-calling/user-calling.component.d.ts +30 -30
  216. package/user-manage/src/user-info/user-info.component.d.ts +9 -9
  217. package/user-manage/src/user-manage-widget.component.d.ts +45 -45
  218. package/user-manage/src/user-manage.module.d.ts +21 -21
  219. package/user-manage/src/utils/app-loader/app-loader.d.ts +6 -6
  220. package/user-manage/src/utils/pagination/pagination.component.d.ts +18 -18
  221. package/users-list/index.d.ts +5 -5
  222. package/users-list/public-api.d.ts +8 -8
  223. package/users-list/src/app.constants.d.ts +32 -32
  224. package/users-list/src/classes/device.d.ts +224 -224
  225. package/users-list/src/classes/line.d.ts +140 -140
  226. package/users-list/src/classes/notification.d.ts +18 -18
  227. package/users-list/src/classes/pagination.d.ts +13 -13
  228. package/users-list/src/classes/simlified-user.d.ts +25 -25
  229. package/users-list/src/classes/table-data.d.ts +5 -5
  230. package/users-list/src/classes/user-list.d.ts +36 -36
  231. package/users-list/src/material.module.d.ts +31 -31
  232. package/users-list/src/move-user-wizard/move-user-stepper/move-user-stepper.component.d.ts +25 -25
  233. package/users-list/src/move-user-wizard/move-user-wizard.component.d.ts +16 -16
  234. package/users-list/src/services/api-webex.service.d.ts +8 -8
  235. package/users-list/src/services/api.service.d.ts +21 -21
  236. package/users-list/src/services/dns.service.d.ts +18 -18
  237. package/users-list/src/services/events-communication.service.d.ts +8 -8
  238. package/users-list/src/services/notification.service.d.ts +18 -18
  239. package/users-list/src/services/removeKynFromIBM.service.d.ts +8 -8
  240. package/users-list/src/services/user.service.d.ts +34 -34
  241. package/users-list/src/services/users-search.service.d.ts +34 -34
  242. package/users-list/src/user-list-confirm-dialog/user-list-confirm-dialog.component.d.ts +20 -20
  243. package/users-list/src/users-list.component.d.ts +59 -59
  244. package/users-list/src/users-list.module.d.ts +16 -16
  245. package/users-list/src/utils/app-loader/app-loader.d.ts +6 -6
  246. package/users-list/src/utils/common-functions.d.ts +1 -1
  247. package/users-list/src/utils/pagination/pagination.component.d.ts +18 -18
  248. package/users-list/src/utils/utils.service.d.ts +9 -9
@@ -43,2063 +43,2063 @@ import { MatPaginatorModule } from '@angular/material/paginator';
43
43
  import * as i5$1 from '@angular/material/divider';
44
44
  import { Big } from 'big.js';
45
45
 
46
- class APIService {
47
- constructor(httpClient) {
48
- this.httpClient = httpClient;
49
- this.apiUrl = window.location.protocol + '//' + window.location.hostname + '/dcp';
50
- }
51
- fetch(url, params, cache) {
52
- const headers = this.getHeaders(cache);
53
- params = params || {};
54
- return this.httpClient.get(this.apiUrl + url, { params: this.prepareEncodedParams(params), headers });
55
- }
56
- post(url, body, params = {}) {
57
- body = body || null;
58
- const headers = this.getHeaders();
59
- return this.httpClient.post(this.apiUrl + url, body, { params: this.prepareEncodedParams(params), headers });
60
- }
61
- // use when response extended data is necessary:
62
- postExtended(url, body = null, params = {}, headers = {}) {
63
- headers = headers || this.getHeaders();
64
- return this.httpClient.post(this.apiUrl + url, body, {
65
- headers,
66
- observe: 'response',
67
- params: this.prepareEncodedParams(params)
68
- });
69
- }
70
- put(url, body = null, params = {}) {
71
- const headers = this.getHeaders();
72
- return this.httpClient.put(this.apiUrl + url, body, { headers, params: this.prepareEncodedParams(params) });
73
- }
74
- delete(url, params = {}) {
75
- const headers = this.getHeaders();
76
- return this.httpClient.delete(this.apiUrl + url, { headers, params: this.prepareEncodedParams(params) });
77
- }
78
- fetchPagination(url, pageSize, pageNumber, additionalParams = {}, cache) {
79
- const copyAdditionalParams = JSON.parse(JSON.stringify(additionalParams));
80
- const params = Object.assign(copyAdditionalParams, { size: pageSize.toString(), page: pageNumber.toString() });
81
- return this.fetch(url, params, cache);
82
- }
83
- prepareEncodedParams(params) {
84
- const result = {};
85
- if (!params) {
86
- return {};
87
- }
88
- for (const key of Object.keys(params)) {
89
- if (params[key]) {
90
- const stringParam = params[key].toString();
91
- result[key] = stringParam.includes('+') ? encodeURIComponent(stringParam) : stringParam;
92
- }
93
- }
94
- return result;
95
- }
96
- getHeaders(cache) {
97
- let headers = new HttpHeaders();
98
- if (cache) {
99
- headers = headers.append('_Cache', 'true ');
100
- }
101
- const token = this.token || this.getParameterByName('token');
102
- headers = headers.append('Authorization', 'Bearer ' + token);
103
- return headers;
104
- }
105
- getParameterByName(name, url = window.location.href) {
106
- name = name.replace(/[\[\]]/g, '\\$&');
107
- var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), results = regex.exec(url);
108
- if (!results)
109
- return null;
110
- if (!results[2])
111
- return '';
112
- return decodeURIComponent(results[2].replace(/\+/g, ' '));
113
- }
114
- }
115
- APIService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: APIService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
116
- APIService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: APIService });
117
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: APIService, decorators: [{
118
- type: Injectable
46
+ class APIService {
47
+ constructor(httpClient) {
48
+ this.httpClient = httpClient;
49
+ this.apiUrl = window.location.protocol + '//' + window.location.hostname + '/dcp';
50
+ }
51
+ fetch(url, params, cache) {
52
+ const headers = this.getHeaders(cache);
53
+ params = params || {};
54
+ return this.httpClient.get(this.apiUrl + url, { params: this.prepareEncodedParams(params), headers });
55
+ }
56
+ post(url, body, params = {}) {
57
+ body = body || null;
58
+ const headers = this.getHeaders();
59
+ return this.httpClient.post(this.apiUrl + url, body, { params: this.prepareEncodedParams(params), headers });
60
+ }
61
+ // use when response extended data is necessary:
62
+ postExtended(url, body = null, params = {}, headers = {}) {
63
+ headers = headers || this.getHeaders();
64
+ return this.httpClient.post(this.apiUrl + url, body, {
65
+ headers,
66
+ observe: 'response',
67
+ params: this.prepareEncodedParams(params)
68
+ });
69
+ }
70
+ put(url, body = null, params = {}) {
71
+ const headers = this.getHeaders();
72
+ return this.httpClient.put(this.apiUrl + url, body, { headers, params: this.prepareEncodedParams(params) });
73
+ }
74
+ delete(url, params = {}) {
75
+ const headers = this.getHeaders();
76
+ return this.httpClient.delete(this.apiUrl + url, { headers, params: this.prepareEncodedParams(params) });
77
+ }
78
+ fetchPagination(url, pageSize, pageNumber, additionalParams = {}, cache) {
79
+ const copyAdditionalParams = JSON.parse(JSON.stringify(additionalParams));
80
+ const params = Object.assign(copyAdditionalParams, { size: pageSize.toString(), page: pageNumber.toString() });
81
+ return this.fetch(url, params, cache);
82
+ }
83
+ prepareEncodedParams(params) {
84
+ const result = {};
85
+ if (!params) {
86
+ return {};
87
+ }
88
+ for (const key of Object.keys(params)) {
89
+ if (params[key]) {
90
+ const stringParam = params[key].toString();
91
+ result[key] = stringParam.includes('+') ? encodeURIComponent(stringParam) : stringParam;
92
+ }
93
+ }
94
+ return result;
95
+ }
96
+ getHeaders(cache) {
97
+ let headers = new HttpHeaders();
98
+ if (cache) {
99
+ headers = headers.append('_Cache', 'true ');
100
+ }
101
+ const token = this.token || this.getParameterByName('token');
102
+ headers = headers.append('Authorization', 'Bearer ' + token);
103
+ return headers;
104
+ }
105
+ getParameterByName(name, url = window.location.href) {
106
+ name = name.replace(/[\[\]]/g, '\\$&');
107
+ var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), results = regex.exec(url);
108
+ if (!results)
109
+ return null;
110
+ if (!results[2])
111
+ return '';
112
+ return decodeURIComponent(results[2].replace(/\+/g, ' '));
113
+ }
114
+ }
115
+ APIService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: APIService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
116
+ APIService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: APIService });
117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: APIService, decorators: [{
118
+ type: Injectable
119
119
  }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
120
120
 
121
- const API = {
122
- USER_TOKEN: '/api/provision/:siteId/users/:userId/token',
123
- UPDATE_USER_FIELDS: '/api/provision/:siteId/userFields/:token',
124
- PERSIST_USER_CACHE: '/api/provision/:siteId/saveUser/:token',
125
- USER_BY_ID: '/api/provision/:siteId/users/:userId',
126
- QUICK_USERS_SEARCH: "/api/search/quickusers",
127
- LOCATION: "/api/provision/options/:siteId/locations",
128
- USER_LOCALES: "/api/provision/options/:siteId/userlocales",
129
- USER_PROFILES: "/api/provision/options/:siteId/userprofiles",
130
- AVAILABLE_DN_IN_RANGES: "/api/sites/:siteId/available-dn-in-ranges",
131
- DELETE_LINE: "/api/provision/:siteId/deleteLine/:pkid/:token",
132
- DISASSOCIATE_LINE: "/api/provision/:siteId/:deviceName/deleteLineAssociation/:linePkid/:token",
133
- CHECK_DELETE_LINE: "/api/provision/:siteId/checklinedeletion",
134
- ASSOCIATE_LINE: "/api/provision/:siteId/:deviceName/createLineAssociation/:token",
135
- CHECK_DESTINATION_NUMBER: "/api/provision/:siteId/check-dn",
136
- UPDATE_LINE_FIELDS: "/api/provision/:siteId/lineFields/:pkid/:token",
137
- UPDATE_DEVICE_FIELDS: "/api/provision/:siteId/deviceFields/:deviceName/:token"
138
- };
139
- const REGEX_PATTERN = {
140
- EMAIL: '^(([^<>()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))' +
141
- '@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,62}[a-zA-Z0-9])' +
142
- '?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,62}[a-zA-Z0-9])?)*$'
143
- };
144
- const PAGINATION_DEFAULTS = {
145
- SIZE: 10,
146
- INDEX: 0
147
- };
148
- const PAGINATION_SIZE_OPTIONS = [
149
- 10,
150
- 50,
151
- 100,
152
- 500
153
- ];
154
- const CUCS_TO_IGNORE = [
155
- 189,
156
- 194,
157
- 191,
158
- 190
159
- ];
160
- const CUCMS_TO_IGNORE = [
161
- 249,
162
- 255,
163
- 251,
164
- 250
165
- ];
166
- const RECORDING_MEDIA_SOURCE = [
167
- "Gateway Preferred",
168
- "Phone Preferred"
121
+ const API = {
122
+ USER_TOKEN: '/api/provision/:siteId/users/:userId/token',
123
+ UPDATE_USER_FIELDS: '/api/provision/:siteId/userFields/:token',
124
+ PERSIST_USER_CACHE: '/api/provision/:siteId/saveUser/:token',
125
+ USER_BY_ID: '/api/provision/:siteId/users/:userId',
126
+ QUICK_USERS_SEARCH: "/api/search/quickusers",
127
+ LOCATION: "/api/provision/options/:siteId/locations",
128
+ USER_LOCALES: "/api/provision/options/:siteId/userlocales",
129
+ USER_PROFILES: "/api/provision/options/:siteId/userprofiles",
130
+ AVAILABLE_DN_IN_RANGES: "/api/sites/:siteId/available-dn-in-ranges",
131
+ DELETE_LINE: "/api/provision/:siteId/deleteLine/:pkid/:token",
132
+ DISASSOCIATE_LINE: "/api/provision/:siteId/:deviceName/deleteLineAssociation/:linePkid/:token",
133
+ CHECK_DELETE_LINE: "/api/provision/:siteId/checklinedeletion",
134
+ ASSOCIATE_LINE: "/api/provision/:siteId/:deviceName/createLineAssociation/:token",
135
+ CHECK_DESTINATION_NUMBER: "/api/provision/:siteId/check-dn",
136
+ UPDATE_LINE_FIELDS: "/api/provision/:siteId/lineFields/:pkid/:token",
137
+ UPDATE_DEVICE_FIELDS: "/api/provision/:siteId/deviceFields/:deviceName/:token"
138
+ };
139
+ const REGEX_PATTERN = {
140
+ EMAIL: '^(([^<>()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))' +
141
+ '@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,62}[a-zA-Z0-9])' +
142
+ '?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,62}[a-zA-Z0-9])?)*$'
143
+ };
144
+ const PAGINATION_DEFAULTS = {
145
+ SIZE: 10,
146
+ INDEX: 0
147
+ };
148
+ const PAGINATION_SIZE_OPTIONS = [
149
+ 10,
150
+ 50,
151
+ 100,
152
+ 500
153
+ ];
154
+ const CUCS_TO_IGNORE = [
155
+ 189,
156
+ 194,
157
+ 191,
158
+ 190
159
+ ];
160
+ const CUCMS_TO_IGNORE = [
161
+ 249,
162
+ 255,
163
+ 251,
164
+ 250
165
+ ];
166
+ const RECORDING_MEDIA_SOURCE = [
167
+ "Gateway Preferred",
168
+ "Phone Preferred"
169
169
  ];
170
170
 
171
- const urlMap = {
172
- locations: API.LOCATION,
173
- userLocales: API.USER_LOCALES,
174
- userProfiles: API.USER_PROFILES
175
- };
176
- class SiteSettingsService {
177
- constructor(apiService) {
178
- this.apiService = apiService;
179
- }
180
- getSelectionOptions(siteId, token) {
181
- if (!siteId) {
182
- return;
183
- }
184
- // @ts-ignore
185
- const URL = urlMap[token];
186
- return this.apiService.fetch(URL.replace(':siteId', String(siteId)), null, true)
187
- // @ts-ignore
188
- .pipe(map((options) => {
189
- // @ts-ignore
190
- this[token] = options ? options.sort() : [];
191
- // @ts-ignore
192
- return this[token];
193
- }));
194
- }
195
- }
196
- SiteSettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SiteSettingsService, deps: [{ token: APIService }], target: i0.ɵɵFactoryTarget.Injectable });
197
- SiteSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SiteSettingsService });
198
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SiteSettingsService, decorators: [{
199
- type: Injectable
171
+ const urlMap = {
172
+ locations: API.LOCATION,
173
+ userLocales: API.USER_LOCALES,
174
+ userProfiles: API.USER_PROFILES
175
+ };
176
+ class SiteSettingsService {
177
+ constructor(apiService) {
178
+ this.apiService = apiService;
179
+ }
180
+ getSelectionOptions(siteId, token) {
181
+ if (!siteId) {
182
+ return;
183
+ }
184
+ // @ts-ignore
185
+ const URL = urlMap[token];
186
+ return this.apiService.fetch(URL.replace(':siteId', String(siteId)), null, true)
187
+ // @ts-ignore
188
+ .pipe(map((options) => {
189
+ // @ts-ignore
190
+ this[token] = options ? options.sort() : [];
191
+ // @ts-ignore
192
+ return this[token];
193
+ }));
194
+ }
195
+ }
196
+ SiteSettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SiteSettingsService, deps: [{ token: APIService }], target: i0.ɵɵFactoryTarget.Injectable });
197
+ SiteSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SiteSettingsService });
198
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SiteSettingsService, decorators: [{
199
+ type: Injectable
200
200
  }], ctorParameters: function () { return [{ type: APIService }]; } });
201
201
 
202
- const getSavableData = (model, exclude) => {
203
- let result = Object.keys(model);
204
- if (exclude && exclude.length) {
205
- result = result.filter(key => !exclude.some(item => item === key));
206
- }
207
- return result.reduce((result, key) => {
208
- if (model[key] instanceof Array && model[key].length && model[key][0].getSavableData) {
209
- result[key] = model[key].map((item) => item.getSavableData());
210
- }
211
- else if (model[key] instanceof Object && model[key].getSavableData) {
212
- result[key] = model[key].getSavableData();
213
- }
214
- else {
215
- result[key] = model[key];
216
- }
217
- return result;
218
- }, {});
202
+ const getSavableData = (model, exclude) => {
203
+ let result = Object.keys(model);
204
+ if (exclude && exclude.length) {
205
+ result = result.filter(key => !exclude.some(item => item === key));
206
+ }
207
+ return result.reduce((result, key) => {
208
+ if (model[key] instanceof Array && model[key].length && model[key][0].getSavableData) {
209
+ result[key] = model[key].map((item) => item.getSavableData());
210
+ }
211
+ else if (model[key] instanceof Object && model[key].getSavableData) {
212
+ result[key] = model[key].getSavableData();
213
+ }
214
+ else {
215
+ result[key] = model[key];
216
+ }
217
+ return result;
218
+ }, {});
219
219
  };
220
220
 
221
- class LineDirectory {
222
- constructor(lineDirectory) {
223
- Object.assign(this, lineDirectory || {});
224
- // @ts-ignore
225
- if (this.directoryNumber && this.routePartitionName) {
226
- this.displayValue = `${this.directoryNumber}/${this.routePartitionName}`;
227
- }
228
- this.initForm();
229
- }
230
- getSavableData() {
231
- return getSavableData(this, ['form', 'displayValue', 'templateDirectoryNumber']);
232
- }
233
- equal(itemToCompare) {
234
- return JSON.stringify(this.getSavableData()) === JSON.stringify(itemToCompare.getSavableData());
235
- }
236
- initForm() {
237
- const formBuilder = new FormBuilder();
238
- const formSettings = {
239
- directoryNumber: [{ value: this.directoryNumber || '', disabled: true }, [Validators.required]],
240
- routePartitionName: [{ value: this.routePartitionName || '', disabled: true }]
241
- };
242
- this.form = formBuilder.group(formSettings);
243
- }
221
+ class LineDirectory {
222
+ constructor(lineDirectory) {
223
+ Object.assign(this, lineDirectory || {});
224
+ // @ts-ignore
225
+ if (this.directoryNumber && this.routePartitionName) {
226
+ this.displayValue = `${this.directoryNumber}/${this.routePartitionName}`;
227
+ }
228
+ this.initForm();
229
+ }
230
+ getSavableData() {
231
+ return getSavableData(this, ['form', 'displayValue', 'templateDirectoryNumber']);
232
+ }
233
+ equal(itemToCompare) {
234
+ return JSON.stringify(this.getSavableData()) === JSON.stringify(itemToCompare.getSavableData());
235
+ }
236
+ initForm() {
237
+ const formBuilder = new FormBuilder();
238
+ const formSettings = {
239
+ directoryNumber: [{ value: this.directoryNumber || '', disabled: true }, [Validators.required]],
240
+ routePartitionName: [{ value: this.routePartitionName || '', disabled: true }]
241
+ };
242
+ this.form = formBuilder.group(formSettings);
243
+ }
244
244
  }
245
245
 
246
- class LineCallInfoDisplay {
247
- constructor(lineCallInfoDisplay) {
248
- Object.assign(this, lineCallInfoDisplay || {});
249
- }
250
- getSavableData() {
251
- return getSavableData(this, ['form']);
252
- }
246
+ class LineCallInfoDisplay {
247
+ constructor(lineCallInfoDisplay) {
248
+ Object.assign(this, lineCallInfoDisplay || {});
249
+ }
250
+ getSavableData() {
251
+ return getSavableData(this, ['form']);
252
+ }
253
253
  }
254
254
 
255
- class TranslationPattern {
256
- constructor(translationPattern) {
257
- Object.assign(this, translationPattern || {});
258
- this.initForm();
259
- }
260
- getSavableData() {
261
- return getSavableData(this, ['form', 'isNewForExistingLine']);
262
- }
263
- initForm() {
264
- const formBuilder = new FormBuilder();
265
- const formSettings = {
266
- pattern: [{ value: this.pattern || '' }],
267
- calledPartyTransformationMask: [{ value: this.calledPartyTransformationMask || '' }]
268
- };
269
- this.form = formBuilder.group(formSettings);
270
- }
271
- getSiteId() {
272
- if (this.site && this.site.id != null) {
273
- return this.site.id;
274
- }
275
- if (this.hasMultipleSiteIds()) {
276
- return this.multipleSitesId.split(',')[0];
277
- }
278
- return null;
279
- }
280
- hasMultipleSiteIds() {
281
- return this.hasMultipleSites && !!this.multipleSitesId && this.multipleSitesId.length > 0;
282
- }
255
+ class TranslationPattern {
256
+ constructor(translationPattern) {
257
+ Object.assign(this, translationPattern || {});
258
+ this.initForm();
259
+ }
260
+ getSavableData() {
261
+ return getSavableData(this, ['form', 'isNewForExistingLine']);
262
+ }
263
+ initForm() {
264
+ const formBuilder = new FormBuilder();
265
+ const formSettings = {
266
+ pattern: [{ value: this.pattern || '' }],
267
+ calledPartyTransformationMask: [{ value: this.calledPartyTransformationMask || '' }]
268
+ };
269
+ this.form = formBuilder.group(formSettings);
270
+ }
271
+ getSiteId() {
272
+ if (this.site && this.site.id != null) {
273
+ return this.site.id;
274
+ }
275
+ if (this.hasMultipleSiteIds()) {
276
+ return this.multipleSitesId.split(',')[0];
277
+ }
278
+ return null;
279
+ }
280
+ hasMultipleSiteIds() {
281
+ return this.hasMultipleSites && !!this.multipleSitesId && this.multipleSitesId.length > 0;
282
+ }
283
283
  }
284
284
 
285
- class LineAssociation {
286
- constructor(lineAssociation) {
287
- this.sharedUsers = [];
288
- this.sharedDevices = [];
289
- Object.assign(this, lineAssociation || {});
290
- if (lineAssociation) {
291
- this.index = lineAssociation.index || null;
292
- this.position = lineAssociation.position || null;
293
- this.e164Mask = lineAssociation.e164Mask || '';
294
- this.textLabel = lineAssociation.textLabel || '';
295
- this.displayLabel = lineAssociation.displayLabel || '';
296
- this.displayLabelAscii = lineAssociation.displayLabelAscii || '';
297
- this.linePkid = lineAssociation.linePkid || lineAssociation.pkid || '';
298
- this.maxNumberOfCalls = lineAssociation.maxNumberOfCalls || null;
299
- this.busyTrigger = lineAssociation.busyTrigger || null;
300
- this.directoryNumber = new LineDirectory(lineAssociation.directoryNumber);
301
- this.didPattern = new TranslationPattern(lineAssociation.didPattern);
302
- this.recordingOption = lineAssociation.recordingOption || RecordingOptions.disabled;
303
- this.recordingProfile = lineAssociation.recordingProfile || '';
304
- this.recordingMediaSource = lineAssociation.recordingMediaSource || RECORDING_MEDIA_SOURCE[0];
305
- this.visualMWI = lineAssociation.visualMWI || '';
306
- this.audibleMWI = lineAssociation.audibleMWI || '';
307
- this.ringSetting_idle = lineAssociation.ringSetting_idle || '';
308
- this.ringSetting_active = lineAssociation.ringSetting_active || '';
309
- this.pickupAAS_idle = lineAssociation.pickupAAS_idle || '';
310
- this.pickupAAS_active = lineAssociation.pickupAAS_active || '';
311
- this.monitorCSS = lineAssociation.monitorCSS || '';
312
- this.logMissedCall = lineAssociation.logMissedCall || true;
313
- this.callInfoDisplay = new LineCallInfoDisplay(lineAssociation.callInfoDisplay);
314
- this.lineLocalId = lineAssociation.lineLocalId || lineAssociation.localId || '';
315
- this.callingSearchSpace = lineAssociation.callingSearchSpace || '';
316
- this.ownerUserId = lineAssociation.ownerUserId;
317
- this.associated = lineAssociation.associated;
318
- this.alertingName = lineAssociation.alertingName;
319
- this.description = lineAssociation.description;
320
- this.patternUsage = lineAssociation.patternUsage;
321
- this.plarDestinationNumber = lineAssociation.plarDestinationNumber;
322
- this.prefixDigits = lineAssociation.prefixDigits;
323
- this.plarDescription = lineAssociation.plarDescription;
324
- this.plarEnabled = lineAssociation.plarEnabled;
325
- this.populateWithDid = lineAssociation.populateWithDid;
326
- }
327
- this.initForm();
328
- }
329
- getSavableData() {
330
- const excludedFields = ['viewMode', 'form', 'callingSearchSpace', 'plarDestinationNumber', 'prefixDigits', 'plarDescription', 'plarEnabled'];
331
- return getSavableData(this, excludedFields);
332
- }
333
- getDnSavableData() {
334
- }
335
- initForm() {
336
- // TEMP simplified line form
337
- const formBuilder = new FormBuilder();
338
- const formSettings = {
339
- directoryNumber: [this.directoryNumber.directoryNumber || ''],
340
- };
341
- this.form = formBuilder.group(formSettings);
342
- }
343
- /*initForm(appValidators: ValidationService) {
344
- const formBuilder = new FormBuilder();
345
- const formSettings = {
346
- displayLabel: [this.displayLabel || '', [Validators.maxLength(30), Validators.pattern('[^%&\\[{}|"<>\\]]*')]],
347
- alertingName: [this.alertingName || ''],
348
- description: [this.description || ''],
349
- e164Mask: [this.e164Mask || '', [appValidators.e164MaskLabel]],
350
- displayLabelAscii: [this.displayLabelAscii || '', [appValidators.displayLabelAscii]],
351
- textLabel: [this.textLabel || '', [Validators.maxLength(30), Validators.pattern('[^"]*')]],
352
- maxNumberOfCalls: [this.maxNumberOfCalls || '', [ Validators.min(0)]],
353
- busyTrigger: [this.busyTrigger || '', [Validators.min(0), Validators.max(this.maxNumberOfCalls || 200)]],
354
- recordingOption: [this.recordingOption || ''],
355
- recordingProfile: [this.recordingProfile || '', [appValidators.conditionalRequired('recordingOption',
356
- [RecordingOptions.auto_enabled, RecordingOptions.selective_enabled])]],
357
- recordingMediaSource: [this.recordingMediaSource || ''],
358
- visualMWI: [this.visualMWI || ''],
359
- audibleMWI: [this.audibleMWI || ''],
360
- ringSetting_idle: [this.ringSetting_idle || ''],
361
- ringSetting_active: [this.ringSetting_active || ''],
362
- pickupAAS_idle: [this.pickupAAS_idle || ''],
363
- pickupAAS_active: [this.pickupAAS_active || ''],
364
- monitorCSS: [this.monitorCSS || ''],
365
- logMissedCall: [this.logMissedCall === 'true'],
366
- callerName: [this.callInfoDisplay && this.callInfoDisplay.callerName === 'true'],
367
- callerNumber: [this.callInfoDisplay && this.callInfoDisplay.callerNumber === 'true'],
368
- redirectedNumber: [this.callInfoDisplay && this.callInfoDisplay.redirectedNumber === 'true'],
369
- dialedNumber: [this.callInfoDisplay && this.callInfoDisplay.dialedNumber === 'true' ]
370
- };
371
- this.form = formBuilder.group(formSettings);
372
- if (this.directoryNumber) {
373
- this.form.addControl('directoryNumber', this.directoryNumber.form);
374
- }
375
- if (this.didPattern) {
376
- this.form.addControl('didPattern', this.didPattern.form);
377
- }
378
- }*/
379
- equals(line) {
380
- if (!line) {
381
- return false;
382
- }
383
- return this.directoryNumber.directoryNumber === line.directoryNumber.directoryNumber &&
384
- this.directoryNumber.routePartitionName === line.directoryNumber.routePartitionName;
385
- }
285
+ class LineAssociation {
286
+ constructor(lineAssociation) {
287
+ this.sharedUsers = [];
288
+ this.sharedDevices = [];
289
+ Object.assign(this, lineAssociation || {});
290
+ if (lineAssociation) {
291
+ this.index = lineAssociation.index || null;
292
+ this.position = lineAssociation.position || null;
293
+ this.e164Mask = lineAssociation.e164Mask || '';
294
+ this.textLabel = lineAssociation.textLabel || '';
295
+ this.displayLabel = lineAssociation.displayLabel || '';
296
+ this.displayLabelAscii = lineAssociation.displayLabelAscii || '';
297
+ this.linePkid = lineAssociation.linePkid || lineAssociation.pkid || '';
298
+ this.maxNumberOfCalls = lineAssociation.maxNumberOfCalls || null;
299
+ this.busyTrigger = lineAssociation.busyTrigger || null;
300
+ this.directoryNumber = new LineDirectory(lineAssociation.directoryNumber);
301
+ this.didPattern = new TranslationPattern(lineAssociation.didPattern);
302
+ this.recordingOption = lineAssociation.recordingOption || RecordingOptions.disabled;
303
+ this.recordingProfile = lineAssociation.recordingProfile || '';
304
+ this.recordingMediaSource = lineAssociation.recordingMediaSource || RECORDING_MEDIA_SOURCE[0];
305
+ this.visualMWI = lineAssociation.visualMWI || '';
306
+ this.audibleMWI = lineAssociation.audibleMWI || '';
307
+ this.ringSetting_idle = lineAssociation.ringSetting_idle || '';
308
+ this.ringSetting_active = lineAssociation.ringSetting_active || '';
309
+ this.pickupAAS_idle = lineAssociation.pickupAAS_idle || '';
310
+ this.pickupAAS_active = lineAssociation.pickupAAS_active || '';
311
+ this.monitorCSS = lineAssociation.monitorCSS || '';
312
+ this.logMissedCall = lineAssociation.logMissedCall || true;
313
+ this.callInfoDisplay = new LineCallInfoDisplay(lineAssociation.callInfoDisplay);
314
+ this.lineLocalId = lineAssociation.lineLocalId || lineAssociation.localId || '';
315
+ this.callingSearchSpace = lineAssociation.callingSearchSpace || '';
316
+ this.ownerUserId = lineAssociation.ownerUserId;
317
+ this.associated = lineAssociation.associated;
318
+ this.alertingName = lineAssociation.alertingName;
319
+ this.description = lineAssociation.description;
320
+ this.patternUsage = lineAssociation.patternUsage;
321
+ this.plarDestinationNumber = lineAssociation.plarDestinationNumber;
322
+ this.prefixDigits = lineAssociation.prefixDigits;
323
+ this.plarDescription = lineAssociation.plarDescription;
324
+ this.plarEnabled = lineAssociation.plarEnabled;
325
+ this.populateWithDid = lineAssociation.populateWithDid;
326
+ }
327
+ this.initForm();
328
+ }
329
+ getSavableData() {
330
+ const excludedFields = ['viewMode', 'form', 'callingSearchSpace', 'plarDestinationNumber', 'prefixDigits', 'plarDescription', 'plarEnabled'];
331
+ return getSavableData(this, excludedFields);
332
+ }
333
+ getDnSavableData() {
334
+ }
335
+ initForm() {
336
+ // TEMP simplified line form
337
+ const formBuilder = new FormBuilder();
338
+ const formSettings = {
339
+ directoryNumber: [this.directoryNumber.directoryNumber || ''],
340
+ };
341
+ this.form = formBuilder.group(formSettings);
342
+ }
343
+ /*initForm(appValidators: ValidationService) {
344
+ const formBuilder = new FormBuilder();
345
+ const formSettings = {
346
+ displayLabel: [this.displayLabel || '', [Validators.maxLength(30), Validators.pattern('[^%&\\[{}|"<>\\]]*')]],
347
+ alertingName: [this.alertingName || ''],
348
+ description: [this.description || ''],
349
+ e164Mask: [this.e164Mask || '', [appValidators.e164MaskLabel]],
350
+ displayLabelAscii: [this.displayLabelAscii || '', [appValidators.displayLabelAscii]],
351
+ textLabel: [this.textLabel || '', [Validators.maxLength(30), Validators.pattern('[^"]*')]],
352
+ maxNumberOfCalls: [this.maxNumberOfCalls || '', [ Validators.min(0)]],
353
+ busyTrigger: [this.busyTrigger || '', [Validators.min(0), Validators.max(this.maxNumberOfCalls || 200)]],
354
+ recordingOption: [this.recordingOption || ''],
355
+ recordingProfile: [this.recordingProfile || '', [appValidators.conditionalRequired('recordingOption',
356
+ [RecordingOptions.auto_enabled, RecordingOptions.selective_enabled])]],
357
+ recordingMediaSource: [this.recordingMediaSource || ''],
358
+ visualMWI: [this.visualMWI || ''],
359
+ audibleMWI: [this.audibleMWI || ''],
360
+ ringSetting_idle: [this.ringSetting_idle || ''],
361
+ ringSetting_active: [this.ringSetting_active || ''],
362
+ pickupAAS_idle: [this.pickupAAS_idle || ''],
363
+ pickupAAS_active: [this.pickupAAS_active || ''],
364
+ monitorCSS: [this.monitorCSS || ''],
365
+ logMissedCall: [this.logMissedCall === 'true'],
366
+ callerName: [this.callInfoDisplay && this.callInfoDisplay.callerName === 'true'],
367
+ callerNumber: [this.callInfoDisplay && this.callInfoDisplay.callerNumber === 'true'],
368
+ redirectedNumber: [this.callInfoDisplay && this.callInfoDisplay.redirectedNumber === 'true'],
369
+ dialedNumber: [this.callInfoDisplay && this.callInfoDisplay.dialedNumber === 'true' ]
370
+ };
371
+ this.form = formBuilder.group(formSettings);
372
+ if (this.directoryNumber) {
373
+ this.form.addControl('directoryNumber', this.directoryNumber.form);
374
+ }
375
+ if (this.didPattern) {
376
+ this.form.addControl('didPattern', this.didPattern.form);
377
+ }
378
+ }*/
379
+ equals(line) {
380
+ if (!line) {
381
+ return false;
382
+ }
383
+ return this.directoryNumber.directoryNumber === line.directoryNumber.directoryNumber &&
384
+ this.directoryNumber.routePartitionName === line.directoryNumber.routePartitionName;
385
+ }
386
386
  }
387
387
 
388
- class Device {
389
- constructor(device) {
390
- this.lineAssociationsHasChanges = false;
391
- this.plarService = false;
392
- if (device) {
393
- this.name = device.name;
394
- this.pkiid = device.pkiid;
395
- this.deviceType = device.deviceType;
396
- this.protocol = device.protocol;
397
- this.description = device.description;
398
- this.buttonTemplate = device.buttonTemplate;
399
- this.softkeyTemplate = device.softkeyTemplate;
400
- this.devicePoolName = device.devicePoolName;
401
- this.location = device.location;
402
- this.firmwareVersion = device.firmwareVersion;
403
- this.plarService = device.plarService;
404
- this.callingSearchSpaceName = device.callingSearchSpaceName;
405
- this.registrationStatus = 'Unknown'; // TEMP for demo
406
- this.ipAddress = 'None'; // TEMP for demo
407
- this.lineAssociations = device.lineAssociations?.length ?
408
- device.lineAssociations.map((line) => new LineAssociation(line)) : [];
409
- }
410
- }
411
- getSavableData() {
412
- const excludedFields = ['form'];
413
- return getSavableData(this, excludedFields);
414
- }
415
- }
416
- var RecordingOptions;
417
- (function (RecordingOptions) {
418
- RecordingOptions["disabled"] = "Call Recording Disabled";
419
- RecordingOptions["auto_enabled"] = "Automatic Call Recording Enabled";
420
- RecordingOptions["selective_enabled"] = "Selective Call Recording Enabled";
388
+ class Device {
389
+ constructor(device) {
390
+ this.lineAssociationsHasChanges = false;
391
+ this.plarService = false;
392
+ if (device) {
393
+ this.name = device.name;
394
+ this.pkiid = device.pkiid;
395
+ this.deviceType = device.deviceType;
396
+ this.protocol = device.protocol;
397
+ this.description = device.description;
398
+ this.buttonTemplate = device.buttonTemplate;
399
+ this.softkeyTemplate = device.softkeyTemplate;
400
+ this.devicePoolName = device.devicePoolName;
401
+ this.location = device.location;
402
+ this.firmwareVersion = device.firmwareVersion;
403
+ this.plarService = device.plarService;
404
+ this.callingSearchSpaceName = device.callingSearchSpaceName;
405
+ this.registrationStatus = 'Unknown'; // TEMP for demo
406
+ this.ipAddress = 'None'; // TEMP for demo
407
+ this.lineAssociations = device.lineAssociations?.length ?
408
+ device.lineAssociations.map((line) => new LineAssociation(line)) : [];
409
+ }
410
+ }
411
+ getSavableData() {
412
+ const excludedFields = ['form'];
413
+ return getSavableData(this, excludedFields);
414
+ }
415
+ }
416
+ var RecordingOptions;
417
+ (function (RecordingOptions) {
418
+ RecordingOptions["disabled"] = "Call Recording Disabled";
419
+ RecordingOptions["auto_enabled"] = "Automatic Call Recording Enabled";
420
+ RecordingOptions["selective_enabled"] = "Selective Call Recording Enabled";
421
421
  })(RecordingOptions || (RecordingOptions = {}));
422
422
 
423
- class SimplifiedUser {
424
- constructor(user, isLdap) {
425
- // isLdap TEMP because of token response issue
426
- if (user) {
427
- this.userid = user.userid;
428
- this.email = user.email;
429
- this.firstName = user.firstName;
430
- this.lastName = user.lastName;
431
- this.siteId = user.siteId;
432
- this.siteName = user.siteName;
433
- this.token = user.token;
434
- this.department = user.department;
435
- this.manager = user.manager;
436
- this.associatedPc = user.associatedPc;
437
- this.digestCredentials = user.digestCredentials;
438
- this.userProfile = user.userProfile;
439
- this.enableMobileVoiceAccess = user.enableMobileVoiceAccess;
440
- this.ldapIntegrated = user.ldapIntegrated || isLdap || false;
441
- this.userLocale = user.userLocale;
442
- this.confirmDigestCredentials = user.confirmDigestCredentials;
443
- this.middleName = user.middleName;
444
- this.telephoneNumber = user.telephoneNumber;
445
- this.mobileNumber = user.mobileNumber;
446
- this.directoryUri = user.directoryUri;
447
- this.title = user.title;
448
- this.homeNumber = user.homeNumber;
449
- this.pagerNumber = user.pagerNumber;
450
- this.displayName = user.displayName;
451
- if (user.devices && user.devices.length) {
452
- this.devices = user.devices.map((device) => new Device(device));
453
- if (user.lines && user.lines.length) {
454
- this.devices.forEach(device => {
455
- if (device && device.lineAssociations && device.lineAssociations.length) {
456
- device.lineAssociations.forEach(lineAssociation => {
457
- lineAssociation.callingSearchSpace = this.getLineVal(lineAssociation, user.lines, 'callingSearchSpace');
458
- lineAssociation.textLabel = lineAssociation.textLabel || this.getLineVal(lineAssociation, user.lines, 'textLabel') || '';
459
- lineAssociation.alertingName = lineAssociation.alertingName || this.getLineVal(lineAssociation, user.lines, 'alertingName') || '';
460
- });
461
- }
462
- });
463
- }
464
- }
465
- }
466
- this.initForm();
467
- }
468
- getLineVal(lineAssociation, lines, token) {
469
- const lineForVal = lines.find((line) => line.directoryNumber.directoryNumber === lineAssociation.directoryNumber.directoryNumber);
470
- return lineForVal && lineForVal[token] || '';
471
- }
472
- getUserDetailsSavableData() {
473
- const excludedFields = ['devices', 'deviceProfiles', 'lines', 'singleNumberReach', 'vmPassword', 'vmUnifiedMessagingAccount', 'alternateExtensions', 'callerInput', 'lineAppearances', 'meetMes', 'webAppPasswordSettings', 'form'];
474
- return getSavableData(this, excludedFields);
475
- }
476
- initForm() {
477
- const formBuilder = new FormBuilder();
478
- const formSettings = {
479
- userid: [{ value: this.userid || '', disabled: this.ldapIntegrated }, [Validators.required, Validators.maxLength(128)]],
480
- email: [{ value: this.email || '', disabled: this.ldapIntegrated }, [
481
- Validators.pattern(REGEX_PATTERN.EMAIL),
482
- Validators.required
483
- ]],
484
- firstName: [{ value: this.firstName || '', disabled: this.ldapIntegrated }],
485
- lastName: [{ value: this.lastName || '', disabled: this.ldapIntegrated }, Validators.required],
486
- department: [{ value: this.department || '', disabled: false }],
487
- middleName: [{ value: this.middleName || '', disabled: false }],
488
- title: [{ value: this.title || '', disabled: false }],
489
- telephoneNumber: [{ value: this.telephoneNumber || '', disabled: false }],
490
- homeNumber: [{ value: this.homeNumber || '', disabled: false }],
491
- mobileNumber: [{ value: this.mobileNumber || '', disabled: false }],
492
- pagerNumber: [{ value: this.pagerNumber || '', disabled: false }],
493
- displayName: [{ value: this.displayName || '', disabled: false }],
494
- manager: [{ value: this.manager || '', disabled: false }],
495
- associatedPc: [this.associatedPc || ''],
496
- directoryUri: [this.directoryUri || ''],
497
- userProfile: [this.userProfile],
498
- enableMobileVoiceAccess: [this.enableMobileVoiceAccess],
499
- ldapIntegrated: [this.ldapIntegrated],
500
- userLocale: [this.userLocale || ''],
501
- digestCredentials: [''],
502
- confirmDigestCredentials: ['']
503
- };
504
- this.form = formBuilder.group(formSettings);
505
- }
506
- toggleEditMode() {
507
- this.editMode = !this.editMode;
508
- /*['userid', 'email', 'firstName', 'lastName'].forEach(token => {
509
- if (this.editMode) {
510
- this.form.get(token)?.enable();
511
- } else {
512
- this.form.get(token)?.disable();
513
- }
514
- })*/
515
- }
516
- getSavableData() {
517
- const excludedFields = ['form', 'editMode', 'viewMode', 'token', 'hasModifiedCache', 'confirmDigestCredentials'];
518
- return getSavableData(this, excludedFields);
519
- }
520
- equal(userToCompare) {
521
- if (!userToCompare) {
522
- return false;
523
- }
524
- return JSON.stringify(this.getSavableData()) === JSON.stringify(userToCompare.getSavableData());
525
- }
423
+ class SimplifiedUser {
424
+ constructor(user, isLdap) {
425
+ // isLdap TEMP because of token response issue
426
+ if (user) {
427
+ this.userid = user.userid;
428
+ this.email = user.email;
429
+ this.firstName = user.firstName;
430
+ this.lastName = user.lastName;
431
+ this.siteId = user.siteId;
432
+ this.siteName = user.siteName;
433
+ this.token = user.token;
434
+ this.department = user.department;
435
+ this.manager = user.manager;
436
+ this.associatedPc = user.associatedPc;
437
+ this.digestCredentials = user.digestCredentials;
438
+ this.userProfile = user.userProfile;
439
+ this.enableMobileVoiceAccess = user.enableMobileVoiceAccess;
440
+ this.ldapIntegrated = user.ldapIntegrated || isLdap || false;
441
+ this.userLocale = user.userLocale;
442
+ this.confirmDigestCredentials = user.confirmDigestCredentials;
443
+ this.middleName = user.middleName;
444
+ this.telephoneNumber = user.telephoneNumber;
445
+ this.mobileNumber = user.mobileNumber;
446
+ this.directoryUri = user.directoryUri;
447
+ this.title = user.title;
448
+ this.homeNumber = user.homeNumber;
449
+ this.pagerNumber = user.pagerNumber;
450
+ this.displayName = user.displayName;
451
+ if (user.devices && user.devices.length) {
452
+ this.devices = user.devices.map((device) => new Device(device));
453
+ if (user.lines && user.lines.length) {
454
+ this.devices.forEach(device => {
455
+ if (device && device.lineAssociations && device.lineAssociations.length) {
456
+ device.lineAssociations.forEach(lineAssociation => {
457
+ lineAssociation.callingSearchSpace = this.getLineVal(lineAssociation, user.lines, 'callingSearchSpace');
458
+ lineAssociation.textLabel = lineAssociation.textLabel || this.getLineVal(lineAssociation, user.lines, 'textLabel') || '';
459
+ lineAssociation.alertingName = lineAssociation.alertingName || this.getLineVal(lineAssociation, user.lines, 'alertingName') || '';
460
+ });
461
+ }
462
+ });
463
+ }
464
+ }
465
+ }
466
+ this.initForm();
467
+ }
468
+ getLineVal(lineAssociation, lines, token) {
469
+ const lineForVal = lines.find((line) => line.directoryNumber.directoryNumber === lineAssociation.directoryNumber.directoryNumber);
470
+ return lineForVal && lineForVal[token] || '';
471
+ }
472
+ getUserDetailsSavableData() {
473
+ const excludedFields = ['devices', 'deviceProfiles', 'lines', 'singleNumberReach', 'vmPassword', 'vmUnifiedMessagingAccount', 'alternateExtensions', 'callerInput', 'lineAppearances', 'meetMes', 'webAppPasswordSettings', 'form'];
474
+ return getSavableData(this, excludedFields);
475
+ }
476
+ initForm() {
477
+ const formBuilder = new FormBuilder();
478
+ const formSettings = {
479
+ userid: [{ value: this.userid || '', disabled: this.ldapIntegrated }, [Validators.required, Validators.maxLength(128)]],
480
+ email: [{ value: this.email || '', disabled: this.ldapIntegrated }, [
481
+ Validators.pattern(REGEX_PATTERN.EMAIL),
482
+ Validators.required
483
+ ]],
484
+ firstName: [{ value: this.firstName || '', disabled: this.ldapIntegrated }],
485
+ lastName: [{ value: this.lastName || '', disabled: this.ldapIntegrated }, Validators.required],
486
+ department: [{ value: this.department || '', disabled: false }],
487
+ middleName: [{ value: this.middleName || '', disabled: false }],
488
+ title: [{ value: this.title || '', disabled: false }],
489
+ telephoneNumber: [{ value: this.telephoneNumber || '', disabled: false }],
490
+ homeNumber: [{ value: this.homeNumber || '', disabled: false }],
491
+ mobileNumber: [{ value: this.mobileNumber || '', disabled: false }],
492
+ pagerNumber: [{ value: this.pagerNumber || '', disabled: false }],
493
+ displayName: [{ value: this.displayName || '', disabled: false }],
494
+ manager: [{ value: this.manager || '', disabled: false }],
495
+ associatedPc: [this.associatedPc || ''],
496
+ directoryUri: [this.directoryUri || ''],
497
+ userProfile: [this.userProfile],
498
+ enableMobileVoiceAccess: [this.enableMobileVoiceAccess],
499
+ ldapIntegrated: [this.ldapIntegrated],
500
+ userLocale: [this.userLocale || ''],
501
+ digestCredentials: [''],
502
+ confirmDigestCredentials: ['']
503
+ };
504
+ this.form = formBuilder.group(formSettings);
505
+ }
506
+ toggleEditMode() {
507
+ this.editMode = !this.editMode;
508
+ /*['userid', 'email', 'firstName', 'lastName'].forEach(token => {
509
+ if (this.editMode) {
510
+ this.form.get(token)?.enable();
511
+ } else {
512
+ this.form.get(token)?.disable();
513
+ }
514
+ })*/
515
+ }
516
+ getSavableData() {
517
+ const excludedFields = ['form', 'editMode', 'viewMode', 'token', 'hasModifiedCache', 'confirmDigestCredentials'];
518
+ return getSavableData(this, excludedFields);
519
+ }
520
+ equal(userToCompare) {
521
+ if (!userToCompare) {
522
+ return false;
523
+ }
524
+ return JSON.stringify(this.getSavableData()) === JSON.stringify(userToCompare.getSavableData());
525
+ }
526
526
  }
527
527
 
528
- class UtilsService {
529
- static sortSortArrayByProperty(array, sortBy) {
530
- if (!array) {
531
- return null;
532
- }
533
- return array.sort((a, b) => {
534
- if (!a[sortBy] && !b[sortBy]) {
535
- return 0;
536
- }
537
- if (a[sortBy] && !b[sortBy]) {
538
- return 1;
539
- }
540
- if (!a[sortBy] && b[sortBy]) {
541
- return -1;
542
- }
543
- const positionA = a[sortBy];
544
- const positionB = b[sortBy];
545
- return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
546
- });
547
- }
548
- static diff(origObject, updatedObj, path, keysToIgnore) {
549
- let result = [];
550
- if (Object.is(origObject, updatedObj)) {
551
- return undefined;
552
- }
553
- if (!updatedObj || typeof updatedObj !== 'object') {
554
- return updatedObj;
555
- }
556
- const concat = Array.from(new Set([...Object.keys(origObject || {}), ...Object.keys(updatedObj || {})]));
557
- const filter = keysToIgnore ? concat.filter(key => !keysToIgnore.includes(key)) : concat;
558
- filter
559
- .forEach(key => {
560
- if (typeof updatedObj[key] === 'object' && typeof origObject[key] === 'object') {
561
- if (UtilsService.differs(updatedObj[key], origObject[key])) {
562
- const newPath = `${path}${path ? '.' : ''}${key}`;
563
- const values = UtilsService.diff(origObject[key], updatedObj[key], newPath, keysToIgnore);
564
- if (values !== undefined) {
565
- result = [...result, ...values];
566
- }
567
- }
568
- }
569
- else if (updatedObj && !origObject || updatedObj[key] !== origObject[key] && !Object.is(origObject[key], updatedObj[key])) {
570
- const value = updatedObj ? UtilsService.formatIfEmpty(updatedObj[key]) : null;
571
- result.push(`${path}${path ? '.' : ''}${key}=${value}`);
572
- }
573
- });
574
- return result;
575
- }
576
- static formatIfEmpty(value) {
577
- if (value) {
578
- return value;
579
- }
580
- switch (typeof value) {
581
- case 'boolean':
582
- return value;
583
- case 'string':
584
- return '';
585
- default:
586
- return null;
587
- }
588
- }
589
- static differs(obj1, obj2) {
590
- return JSON.stringify(obj1) !== JSON.stringify(obj2);
591
- }
592
- }
593
- UtilsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
594
- UtilsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService });
595
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService, decorators: [{
596
- type: Injectable
528
+ class UtilsService {
529
+ static sortSortArrayByProperty(array, sortBy) {
530
+ if (!array) {
531
+ return null;
532
+ }
533
+ return array.sort((a, b) => {
534
+ if (!a[sortBy] && !b[sortBy]) {
535
+ return 0;
536
+ }
537
+ if (a[sortBy] && !b[sortBy]) {
538
+ return 1;
539
+ }
540
+ if (!a[sortBy] && b[sortBy]) {
541
+ return -1;
542
+ }
543
+ const positionA = a[sortBy];
544
+ const positionB = b[sortBy];
545
+ return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
546
+ });
547
+ }
548
+ static diff(origObject, updatedObj, path, keysToIgnore) {
549
+ let result = [];
550
+ if (Object.is(origObject, updatedObj)) {
551
+ return undefined;
552
+ }
553
+ if (!updatedObj || typeof updatedObj !== 'object') {
554
+ return updatedObj;
555
+ }
556
+ const concat = Array.from(new Set([...Object.keys(origObject || {}), ...Object.keys(updatedObj || {})]));
557
+ const filter = keysToIgnore ? concat.filter(key => !keysToIgnore.includes(key)) : concat;
558
+ filter
559
+ .forEach(key => {
560
+ if (typeof updatedObj[key] === 'object' && typeof origObject[key] === 'object') {
561
+ if (UtilsService.differs(updatedObj[key], origObject[key])) {
562
+ const newPath = `${path}${path ? '.' : ''}${key}`;
563
+ const values = UtilsService.diff(origObject[key], updatedObj[key], newPath, keysToIgnore);
564
+ if (values !== undefined) {
565
+ result = [...result, ...values];
566
+ }
567
+ }
568
+ }
569
+ else if (updatedObj && !origObject || updatedObj[key] !== origObject[key] && !Object.is(origObject[key], updatedObj[key])) {
570
+ const value = updatedObj ? UtilsService.formatIfEmpty(updatedObj[key]) : null;
571
+ result.push(`${path}${path ? '.' : ''}${key}=${value}`);
572
+ }
573
+ });
574
+ return result;
575
+ }
576
+ static formatIfEmpty(value) {
577
+ if (value) {
578
+ return value;
579
+ }
580
+ switch (typeof value) {
581
+ case 'boolean':
582
+ return value;
583
+ case 'string':
584
+ return '';
585
+ default:
586
+ return null;
587
+ }
588
+ }
589
+ static differs(obj1, obj2) {
590
+ return JSON.stringify(obj1) !== JSON.stringify(obj2);
591
+ }
592
+ }
593
+ UtilsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
594
+ UtilsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService });
595
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService, decorators: [{
596
+ type: Injectable
597
597
  }] });
598
598
 
599
- const string_array = function (original, updated, fullKey) {
600
- if (!updated || !SortingUtilsService.differs(original, updated)) {
601
- return null;
602
- }
603
- return `${fullKey}=${updated.join(',')}`;
604
- };
605
- const line_reference = function (original, updated, fullKey) {
606
- if (!updated || !SortingUtilsService.differs(original, updated)) {
607
- return null;
608
- }
609
- // @ts-ignore
610
- return Object.keys(updated).map(key => `${fullKey}.${key}=${updated[key]}`);
611
- };
612
- const nullable = function (original, updated, fullKey) {
613
- if (!original && updated) {
614
- // @ts-ignore
615
- return Object.keys(updated).map(key => `${fullKey}.${key}=${updated[key]}`);
616
- }
617
- else if (original && !updated) {
618
- return `${fullKey}=null`;
619
- }
620
- else {
621
- return SortingUtilsService.diff(original, updated, fullKey, []);
622
- }
623
- };
624
- class SortingUtilsService {
625
- static sortDevicesByTypeAndName(array) {
626
- if (!array) {
627
- return null;
628
- }
629
- return array.sort((a, b) => {
630
- if (a.deviceType === b.deviceType) {
631
- return (a.name < b.name) ? -1 : (a.name > b.name) ? 1 : 0;
632
- }
633
- else {
634
- return (a.deviceType < b.deviceType) ? -1 : 1;
635
- }
636
- });
637
- }
638
- static sortLinesByDirectoryName(array) {
639
- if (!array) {
640
- return null;
641
- }
642
- return array.sort((a, b) => {
643
- if (!a.directoryNumber && !b.directoryNumber) {
644
- return 0;
645
- }
646
- if (a.directoryNumber && !b.directoryNumber) {
647
- return 1;
648
- }
649
- if (!a.directoryNumber && b.directoryNumber) {
650
- return -1;
651
- }
652
- const directoryNumberA = a.directoryNumber.directoryNumber;
653
- const directoryNumberB = b.directoryNumber.directoryNumber;
654
- return (directoryNumberA < directoryNumberB) ? -1 : (directoryNumberA > directoryNumberB) ? 1 : 0;
655
- });
656
- }
657
- static sortLineAssociationsByPosition(array) {
658
- if (!array) {
659
- return null;
660
- }
661
- return array.sort((a, b) => {
662
- if (!a.position && !b.position) {
663
- return 0;
664
- }
665
- if (a.position && !b.position) {
666
- return 1;
667
- }
668
- if (!a.position && b.position) {
669
- return -1;
670
- }
671
- const positionA = a.position;
672
- const positionB = b.position;
673
- return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
674
- });
675
- }
676
- static sortSortArrayByProperty(array, sortBy) {
677
- if (!array) {
678
- return null;
679
- }
680
- return array.sort((a, b) => {
681
- if (!a[sortBy] && !b[sortBy]) {
682
- return 0;
683
- }
684
- if (a[sortBy] && !b[sortBy]) {
685
- return 1;
686
- }
687
- if (!a[sortBy] && b[sortBy]) {
688
- return -1;
689
- }
690
- const positionA = a[sortBy];
691
- const positionB = b[sortBy];
692
- return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
693
- });
694
- }
695
- static diff(origObject, updatedObj, path, keysToIgnore) {
696
- let result = [];
697
- if (Object.is(origObject, updatedObj)) {
698
- return undefined;
699
- }
700
- if (!updatedObj || typeof updatedObj !== 'object') {
701
- return updatedObj;
702
- }
703
- const concat = Array.from(new Set([...Object.keys(origObject || {}), ...Object.keys(updatedObj || {})]));
704
- const filter = keysToIgnore ? concat.filter(key => !keysToIgnore.includes(key)) : concat;
705
- filter
706
- .forEach(key => {
707
- // @ts-ignore
708
- if (this.dictionary[key]) {
709
- // @ts-ignore
710
- const complexResult = this.dictionary[key](origObject[key], updatedObj[key], `${path}${path ? '.' : ''}${key}`);
711
- if (complexResult) {
712
- if (Array.isArray(complexResult)) {
713
- result = [...result, ...complexResult];
714
- }
715
- else {
716
- result.push(complexResult);
717
- }
718
- }
719
- }
720
- else if (typeof updatedObj[key] === 'object' && typeof origObject[key] === 'object') {
721
- if (SortingUtilsService.differs(updatedObj[key], origObject[key])) {
722
- const newPath = `${path}${path ? '.' : ''}${key}`;
723
- const values = SortingUtilsService.diff(origObject[key], updatedObj[key], newPath, keysToIgnore);
724
- if (values !== undefined) {
725
- result = [...result, ...values];
726
- }
727
- }
728
- }
729
- else if (updatedObj && !origObject || updatedObj[key] !== origObject[key] && !Object.is(origObject[key], updatedObj[key])) {
730
- const value = updatedObj ? SortingUtilsService.formatIfEmpty(updatedObj[key]) : null;
731
- result.push(`${path}${path ? '.' : ''}${key}=${value}`);
732
- }
733
- });
734
- return result;
735
- }
736
- static formatIfEmpty(value) {
737
- if (value) {
738
- return value;
739
- }
740
- switch (typeof value) {
741
- case 'boolean':
742
- return value;
743
- case 'string':
744
- return '';
745
- default:
746
- return null;
747
- }
748
- }
749
- static differs(obj1, obj2) {
750
- return JSON.stringify(obj1) !== JSON.stringify(obj2);
751
- }
752
- }
753
- SortingUtilsService.dictionary = {
754
- features: string_array,
755
- services: string_array,
756
- directoryNumber: line_reference,
757
- primaryLineReference: line_reference,
758
- speedDials: function (original, updated, fullKey) {
759
- if (!updated || !SortingUtilsService.differs(original, updated)) {
760
- return null;
761
- }
762
- // todo only changes, identification
763
- let map = [];
764
- updated.map((speedDial) => {
765
- const currentFullKey = `${fullKey}.${speedDial.index}`; // ${speedDial.type} CHECk ?
766
- map = [...map, Object.keys(speedDial).map(key => `${currentFullKey}.${key}=${speedDial[key]}`)];
767
- });
768
- return map;
769
- },
770
- lineAssociations: function (original, updated, fullKey) {
771
- if (!updated || !SortingUtilsService.differs(original, updated)) {
772
- return null;
773
- }
774
- let map = [];
775
- updated.map((lineAssociation) => {
776
- const currentFullKey = `${fullKey}.${lineAssociation.linePkid ? lineAssociation.linePkid : lineAssociation.lineLocalId}`;
777
- const originalLineAssociation = original.find(line => line.index === lineAssociation.index);
778
- if (SortingUtilsService.differs(originalLineAssociation, lineAssociation)) {
779
- const diff = SortingUtilsService.diff(originalLineAssociation, lineAssociation, currentFullKey, []);
780
- map = [...map, ...diff];
781
- }
782
- });
783
- return map;
784
- },
785
- enterpriseAltNum: nullable,
786
- e164AltNum: nullable
787
- };
788
- SortingUtilsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
789
- SortingUtilsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService });
790
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService, decorators: [{
791
- type: Injectable
599
+ const string_array = function (original, updated, fullKey) {
600
+ if (!updated || !SortingUtilsService.differs(original, updated)) {
601
+ return null;
602
+ }
603
+ return `${fullKey}=${updated.join(',')}`;
604
+ };
605
+ const line_reference = function (original, updated, fullKey) {
606
+ if (!updated || !SortingUtilsService.differs(original, updated)) {
607
+ return null;
608
+ }
609
+ // @ts-ignore
610
+ return Object.keys(updated).map(key => `${fullKey}.${key}=${updated[key]}`);
611
+ };
612
+ const nullable = function (original, updated, fullKey) {
613
+ if (!original && updated) {
614
+ // @ts-ignore
615
+ return Object.keys(updated).map(key => `${fullKey}.${key}=${updated[key]}`);
616
+ }
617
+ else if (original && !updated) {
618
+ return `${fullKey}=null`;
619
+ }
620
+ else {
621
+ return SortingUtilsService.diff(original, updated, fullKey, []);
622
+ }
623
+ };
624
+ class SortingUtilsService {
625
+ static sortDevicesByTypeAndName(array) {
626
+ if (!array) {
627
+ return null;
628
+ }
629
+ return array.sort((a, b) => {
630
+ if (a.deviceType === b.deviceType) {
631
+ return (a.name < b.name) ? -1 : (a.name > b.name) ? 1 : 0;
632
+ }
633
+ else {
634
+ return (a.deviceType < b.deviceType) ? -1 : 1;
635
+ }
636
+ });
637
+ }
638
+ static sortLinesByDirectoryName(array) {
639
+ if (!array) {
640
+ return null;
641
+ }
642
+ return array.sort((a, b) => {
643
+ if (!a.directoryNumber && !b.directoryNumber) {
644
+ return 0;
645
+ }
646
+ if (a.directoryNumber && !b.directoryNumber) {
647
+ return 1;
648
+ }
649
+ if (!a.directoryNumber && b.directoryNumber) {
650
+ return -1;
651
+ }
652
+ const directoryNumberA = a.directoryNumber.directoryNumber;
653
+ const directoryNumberB = b.directoryNumber.directoryNumber;
654
+ return (directoryNumberA < directoryNumberB) ? -1 : (directoryNumberA > directoryNumberB) ? 1 : 0;
655
+ });
656
+ }
657
+ static sortLineAssociationsByPosition(array) {
658
+ if (!array) {
659
+ return null;
660
+ }
661
+ return array.sort((a, b) => {
662
+ if (!a.position && !b.position) {
663
+ return 0;
664
+ }
665
+ if (a.position && !b.position) {
666
+ return 1;
667
+ }
668
+ if (!a.position && b.position) {
669
+ return -1;
670
+ }
671
+ const positionA = a.position;
672
+ const positionB = b.position;
673
+ return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
674
+ });
675
+ }
676
+ static sortSortArrayByProperty(array, sortBy) {
677
+ if (!array) {
678
+ return null;
679
+ }
680
+ return array.sort((a, b) => {
681
+ if (!a[sortBy] && !b[sortBy]) {
682
+ return 0;
683
+ }
684
+ if (a[sortBy] && !b[sortBy]) {
685
+ return 1;
686
+ }
687
+ if (!a[sortBy] && b[sortBy]) {
688
+ return -1;
689
+ }
690
+ const positionA = a[sortBy];
691
+ const positionB = b[sortBy];
692
+ return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
693
+ });
694
+ }
695
+ static diff(origObject, updatedObj, path, keysToIgnore) {
696
+ let result = [];
697
+ if (Object.is(origObject, updatedObj)) {
698
+ return undefined;
699
+ }
700
+ if (!updatedObj || typeof updatedObj !== 'object') {
701
+ return updatedObj;
702
+ }
703
+ const concat = Array.from(new Set([...Object.keys(origObject || {}), ...Object.keys(updatedObj || {})]));
704
+ const filter = keysToIgnore ? concat.filter(key => !keysToIgnore.includes(key)) : concat;
705
+ filter
706
+ .forEach(key => {
707
+ // @ts-ignore
708
+ if (this.dictionary[key]) {
709
+ // @ts-ignore
710
+ const complexResult = this.dictionary[key](origObject[key], updatedObj[key], `${path}${path ? '.' : ''}${key}`);
711
+ if (complexResult) {
712
+ if (Array.isArray(complexResult)) {
713
+ result = [...result, ...complexResult];
714
+ }
715
+ else {
716
+ result.push(complexResult);
717
+ }
718
+ }
719
+ }
720
+ else if (typeof updatedObj[key] === 'object' && typeof origObject[key] === 'object') {
721
+ if (SortingUtilsService.differs(updatedObj[key], origObject[key])) {
722
+ const newPath = `${path}${path ? '.' : ''}${key}`;
723
+ const values = SortingUtilsService.diff(origObject[key], updatedObj[key], newPath, keysToIgnore);
724
+ if (values !== undefined) {
725
+ result = [...result, ...values];
726
+ }
727
+ }
728
+ }
729
+ else if (updatedObj && !origObject || updatedObj[key] !== origObject[key] && !Object.is(origObject[key], updatedObj[key])) {
730
+ const value = updatedObj ? SortingUtilsService.formatIfEmpty(updatedObj[key]) : null;
731
+ result.push(`${path}${path ? '.' : ''}${key}=${value}`);
732
+ }
733
+ });
734
+ return result;
735
+ }
736
+ static formatIfEmpty(value) {
737
+ if (value) {
738
+ return value;
739
+ }
740
+ switch (typeof value) {
741
+ case 'boolean':
742
+ return value;
743
+ case 'string':
744
+ return '';
745
+ default:
746
+ return null;
747
+ }
748
+ }
749
+ static differs(obj1, obj2) {
750
+ return JSON.stringify(obj1) !== JSON.stringify(obj2);
751
+ }
752
+ }
753
+ SortingUtilsService.dictionary = {
754
+ features: string_array,
755
+ services: string_array,
756
+ directoryNumber: line_reference,
757
+ primaryLineReference: line_reference,
758
+ speedDials: function (original, updated, fullKey) {
759
+ if (!updated || !SortingUtilsService.differs(original, updated)) {
760
+ return null;
761
+ }
762
+ // todo only changes, identification
763
+ let map = [];
764
+ updated.map((speedDial) => {
765
+ const currentFullKey = `${fullKey}.${speedDial.index}`; // ${speedDial.type} CHECk ?
766
+ map = [...map, Object.keys(speedDial).map(key => `${currentFullKey}.${key}=${speedDial[key]}`)];
767
+ });
768
+ return map;
769
+ },
770
+ lineAssociations: function (original, updated, fullKey) {
771
+ if (!updated || !SortingUtilsService.differs(original, updated)) {
772
+ return null;
773
+ }
774
+ let map = [];
775
+ updated.map((lineAssociation) => {
776
+ const currentFullKey = `${fullKey}.${lineAssociation.linePkid ? lineAssociation.linePkid : lineAssociation.lineLocalId}`;
777
+ const originalLineAssociation = original.find(line => line.index === lineAssociation.index);
778
+ if (SortingUtilsService.differs(originalLineAssociation, lineAssociation)) {
779
+ const diff = SortingUtilsService.diff(originalLineAssociation, lineAssociation, currentFullKey, []);
780
+ map = [...map, ...diff];
781
+ }
782
+ });
783
+ return map;
784
+ },
785
+ enterpriseAltNum: nullable,
786
+ e164AltNum: nullable
787
+ };
788
+ SortingUtilsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
789
+ SortingUtilsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService });
790
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService, decorators: [{
791
+ type: Injectable
792
792
  }] });
793
793
 
794
- class LineService {
795
- generateLineAssociationFromLine(lineAssociation) {
796
- return {
797
- directoryNumber: lineAssociation ? this.generateLineDirectory(lineAssociation) : null,
798
- didPattern: lineAssociation ? this.generateDidPatternForLineAssociation(lineAssociation) : null,
799
- mappedDids: lineAssociation ? '' : 'null',
800
- index: lineAssociation ? lineAssociation.index : null,
801
- position: lineAssociation ? lineAssociation.position : null,
802
- textLabel: lineAssociation ? lineAssociation.textLabel : null,
803
- // displayLabel: lineAssociation ? lineAssociation.displayLabel : 'null',
804
- alertingName: lineAssociation ? lineAssociation.alertingName : null,
805
- callerNumber: lineAssociation ? '' : 'null'
806
- };
807
- }
808
- generateLineDirectory(lineAssociation) {
809
- return {
810
- directoryNumber: lineAssociation.directoryNumber.directoryNumber,
811
- routePartitionName: lineAssociation.directoryNumber.routePartitionName,
812
- };
813
- }
814
- generateDidPatternForLineAssociation(lineAssociation) {
815
- return {
816
- calledPartyTransformationMask: lineAssociation.directoryNumber && lineAssociation.directoryNumber.directoryNumber
817
- };
818
- }
819
- }
820
- LineService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
821
- LineService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService });
822
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService, decorators: [{
823
- type: Injectable
794
+ class LineService {
795
+ generateLineAssociationFromLine(lineAssociation) {
796
+ return {
797
+ directoryNumber: lineAssociation ? this.generateLineDirectory(lineAssociation) : null,
798
+ didPattern: lineAssociation ? this.generateDidPatternForLineAssociation(lineAssociation) : null,
799
+ mappedDids: lineAssociation ? '' : 'null',
800
+ index: lineAssociation ? lineAssociation.index : null,
801
+ position: lineAssociation ? lineAssociation.position : null,
802
+ textLabel: lineAssociation ? lineAssociation.textLabel : null,
803
+ // displayLabel: lineAssociation ? lineAssociation.displayLabel : 'null',
804
+ alertingName: lineAssociation ? lineAssociation.alertingName : null,
805
+ callerNumber: lineAssociation ? '' : 'null'
806
+ };
807
+ }
808
+ generateLineDirectory(lineAssociation) {
809
+ return {
810
+ directoryNumber: lineAssociation.directoryNumber.directoryNumber,
811
+ routePartitionName: lineAssociation.directoryNumber.routePartitionName,
812
+ };
813
+ }
814
+ generateDidPatternForLineAssociation(lineAssociation) {
815
+ return {
816
+ calledPartyTransformationMask: lineAssociation.directoryNumber && lineAssociation.directoryNumber.directoryNumber
817
+ };
818
+ }
819
+ }
820
+ LineService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
821
+ LineService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService });
822
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService, decorators: [{
823
+ type: Injectable
824
824
  }] });
825
825
 
826
- class UserService {
827
- get lineAssociation() {
828
- return this.user && this.originUser.devices && this.user.devices[0] && this.user.devices[0].lineAssociations && this.user.devices[0].lineAssociations[0];
829
- }
830
- get originLineAssociation() {
831
- return this.originUser && this.originUser.devices && this.originUser.devices[0] && this.originUser.devices[0].lineAssociations && this.originUser.devices[0].lineAssociations[0];
832
- }
833
- constructor(apiService, lineService) {
834
- this.apiService = apiService;
835
- this.lineService = lineService;
836
- this.siteId = -1;
837
- this.userId = '';
838
- this.dataPending = false;
839
- this.userIdExistPending = false;
840
- this.hasExistedUserId = false;
841
- this.onUserLineSaved$ = new Subject();
842
- }
843
- ngOnInit() {
844
- console.log(this.siteId);
845
- }
846
- fetchUserToken(siteId, userId, isLdap, isSetNewTokenOnly) {
847
- // isLdap TEMP because of token response issue
848
- this.siteId = siteId;
849
- this.userId = userId;
850
- return this.apiService.fetch(API.USER_TOKEN.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(userId))))
851
- .pipe(map((result) => {
852
- const user = result && Object.values(result)[0];
853
- const token = Object.keys(result)[0];
854
- if (user) {
855
- if (!isSetNewTokenOnly) {
856
- this.setSimplifiedUser(user);
857
- this.user.token = user.token;
858
- }
859
- this.user.token = user.token || token;
860
- this.originUser.token = user.token || token;
861
- }
862
- }));
863
- // .pipe(this.handleError(false, true));
864
- }
865
- updateUserFields(body) {
866
- if (!this.siteId) {
867
- return;
868
- }
869
- return this.apiService.post(API.UPDATE_USER_FIELDS.replace(':siteId', String(this.siteId)).replace(':token', this.user.token), body);
870
- // .pipe(this.handleError(false, true));
871
- }
872
- fetchUserById(id) {
873
- this.userIdExistPending = true;
874
- return this.apiService.fetch(API.USER_BY_ID.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(id))))
875
- .pipe(map(result => {
876
- this.userIdExistPending = false;
877
- return result;
878
- }));
879
- }
880
- persistCacheChanges() {
881
- /*const params = {
882
- excludeDeviceExtraOptions: true
883
- };*/
884
- return this.processUserChangesToCache()
885
- .pipe(map((result) => {
886
- return this.apiService.post(API.PERSIST_USER_CACHE.replace(':siteId', String(this.siteId)).replace(':token', this.user.token), {})
887
- .subscribe(() => {
888
- });
889
- // .pipe(map((user) => {
890
- // // this.setUser(user, false, this.user.token);
891
- // this.user.hasModifiedCache = false;
892
- // }))
893
- // .pipe(this.handleError(true, true));
894
- }));
895
- }
896
- processUserChangesToCache() {
897
- const calls = [];
898
- const body = UtilsService.diff(this.originUser.getUserDetailsSavableData(), this.user.getUserDetailsSavableData(), 'user');
899
- if (body?.length) {
900
- calls.push(this.updateUserFields(body));
901
- }
902
- if (!calls?.length) {
903
- return of(this.user);
904
- }
905
- return forkJoin(calls)
906
- .pipe(map((responses) => {
907
- // ApiUserResponse
908
- this.handleSaveUserResponse(responses);
909
- }));
910
- // .pipe(this.handleError(false, true));
911
- }
912
- saveNewLine() {
913
- this.dataPending = true;
914
- this.deleteLine(this.user.siteId, this.lineAssociation.linePkid, encodeURIComponent(this.user.token))
915
- .subscribe(() => {
916
- const URL = API.PERSIST_USER_CACHE.replace(':siteId', String(this.siteId)).replace(':token', this.user.token);
917
- this.apiService.post(URL, {})
918
- .subscribe(() => {
919
- this.fetchUserToken(this.siteId, this.user.userid, false, true)
920
- .subscribe(() => {
921
- this.runNewLineCreation();
922
- });
923
- });
924
- });
925
- }
926
- runNewLineCreation() {
927
- // CREATE NEW LINE
928
- const newLineBody = SortingUtilsService.diff(this.lineService.generateLineAssociationFromLine(null), this.lineService.generateLineAssociationFromLine(this.lineAssociation), 'device.lineAssociations', null);
929
- this.associateLineToUserDevice(this.user.siteId, this.user.devices[0].name, newLineBody, null, this.lineAssociation.callingSearchSpace).subscribe((response) => {
930
- if (response && response.currentUpdatedUser) {
931
- const linePkId = this.getLinePkIdFromUser(response?.currentUpdatedUser, 0);
932
- forkJoin([
933
- this.updateLineFields(this.siteId, linePkId, this.user.token, this.lineAssociation.alertingName),
934
- this.updateDeviceFields(this.siteId, this.user.devices[0]?.name, this.user.token)
935
- ]).subscribe((response) => {
936
- this.originUser.devices[0].lineAssociations[0].directoryNumber.directoryNumber = this.lineAssociation.directoryNumber.directoryNumber;
937
- this.onUserLineSaved$.next(true);
938
- });
939
- }
940
- });
941
- // -----
942
- }
943
- getLinePkIdFromUser(user, index) {
944
- if (user.devices && user.devices[index] && user.devices[index].lineAssociations && user.devices[index].lineAssociations[index]) {
945
- return user.devices[index].lineAssociations[index].linePkid || user.devices[index].lineAssociations[index].lineLocalId;
946
- }
947
- }
948
- deleteLine(siteId, pkid, token) {
949
- return this.apiService.delete(API.DELETE_LINE.replace(':siteId', String(siteId)).replace(':pkid', pkid).replace(':token', encodeURIComponent(token)), {});
950
- // .pipe(this.handleError(true, false));
951
- }
952
- disassociateLine(siteId, linePkid, token, deviceName) {
953
- return this.apiService.delete(API.DISASSOCIATE_LINE.replace(':siteId', String(siteId))
954
- .replace(':linePkid', linePkid)
955
- .replace(':deviceName', deviceName)
956
- .replace(':token', encodeURIComponent(token)), {});
957
- // .pipe(this.handleError(true, false));
958
- }
959
- updateLineFields(siteId, pkid, token, alertingName) {
960
- const body = ['line.description=', `line.alertingName=${alertingName}`];
961
- return this.apiService.post(API.UPDATE_LINE_FIELDS.replace(':siteId', String(siteId)).replace(':pkid', encodeURIComponent(pkid)).replace(':token', encodeURIComponent(token)), body);
962
- // .pipe(this.handleError(true, false));
963
- }
964
- updateDeviceFields(siteId, deviceName, token) {
965
- const body = ['device.associatedDNs.0=null'];
966
- return this.apiService.post(API.UPDATE_DEVICE_FIELDS.replace(':siteId', String(siteId)).replace(':deviceName', deviceName).replace(':token', encodeURIComponent(token)), body);
967
- // .pipe(this.handleError(true, false));
968
- }
969
- checkDestinationNumber(siteId, directoryNumber, routePartitionName) {
970
- const params = {
971
- dntype: 'EXTENSION'
972
- };
973
- const body = {
974
- directoryNumber: directoryNumber,
975
- routePartitionName: routePartitionName
976
- };
977
- return this.apiService.post(API.CHECK_DESTINATION_NUMBER.replace(':siteId', siteId), body, params);
978
- }
979
- associateLineToUserDevice(siteId, deviceName, body, pkid, css) {
980
- let params = {};
981
- if (pkid) {
982
- params = { linePkid: pkid };
983
- }
984
- if (css) {
985
- // @ts-ignore
986
- params['css'] = css;
987
- }
988
- return this.apiService.post(API.ASSOCIATE_LINE.replace(':siteId', String(siteId)).replace(':deviceName', deviceName)
989
- .replace(':token', encodeURIComponent(this.user.token)), body, params);
990
- // .pipe(this.handleError(true, true));
991
- }
992
- hasUnsavedChanges() {
993
- if (this.user && this.originUser) {
994
- return !this.user.equal(this.originUser);
995
- }
996
- return false;
997
- }
998
- setSimplifiedUser(user, isLdap) {
999
- // isLdap TEMP because of token response issue
1000
- this.user = new SimplifiedUser(user, isLdap);
1001
- const copiedUser = JSON.parse(JSON.stringify(user));
1002
- this.originUser = new SimplifiedUser(copiedUser, isLdap);
1003
- }
1004
- handleSaveUserResponse(responses) {
1005
- if (!responses?.length) {
1006
- return;
1007
- }
1008
- for (let len = responses.length, i = len - 1; i >= 0; i--) {
1009
- if (responses[i] && responses[i].currentUpdatedUser) {
1010
- // this.setUser(responses[i].currentUpdatedUser, false, this.user.token);
1011
- this.user.hasModifiedCache = true;
1012
- return;
1013
- }
1014
- }
1015
- }
1016
- }
1017
- UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService, deps: [{ token: APIService }, { token: LineService }], target: i0.ɵɵFactoryTarget.Injectable });
1018
- UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService });
1019
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService, decorators: [{
1020
- type: Injectable
826
+ class UserService {
827
+ get lineAssociation() {
828
+ return this.user && this.originUser.devices && this.user.devices[0] && this.user.devices[0].lineAssociations && this.user.devices[0].lineAssociations[0];
829
+ }
830
+ get originLineAssociation() {
831
+ return this.originUser && this.originUser.devices && this.originUser.devices[0] && this.originUser.devices[0].lineAssociations && this.originUser.devices[0].lineAssociations[0];
832
+ }
833
+ constructor(apiService, lineService) {
834
+ this.apiService = apiService;
835
+ this.lineService = lineService;
836
+ this.siteId = -1;
837
+ this.userId = '';
838
+ this.dataPending = false;
839
+ this.userIdExistPending = false;
840
+ this.hasExistedUserId = false;
841
+ this.onUserLineSaved$ = new Subject();
842
+ }
843
+ ngOnInit() {
844
+ console.log(this.siteId);
845
+ }
846
+ fetchUserToken(siteId, userId, isLdap, isSetNewTokenOnly) {
847
+ // isLdap TEMP because of token response issue
848
+ this.siteId = siteId;
849
+ this.userId = userId;
850
+ return this.apiService.fetch(API.USER_TOKEN.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(userId))))
851
+ .pipe(map((result) => {
852
+ const user = result && Object.values(result)[0];
853
+ const token = Object.keys(result)[0];
854
+ if (user) {
855
+ if (!isSetNewTokenOnly) {
856
+ this.setSimplifiedUser(user);
857
+ this.user.token = user.token;
858
+ }
859
+ this.user.token = user.token || token;
860
+ this.originUser.token = user.token || token;
861
+ }
862
+ }));
863
+ // .pipe(this.handleError(false, true));
864
+ }
865
+ updateUserFields(body) {
866
+ if (!this.siteId) {
867
+ return;
868
+ }
869
+ return this.apiService.post(API.UPDATE_USER_FIELDS.replace(':siteId', String(this.siteId)).replace(':token', this.user.token), body);
870
+ // .pipe(this.handleError(false, true));
871
+ }
872
+ fetchUserById(id) {
873
+ this.userIdExistPending = true;
874
+ return this.apiService.fetch(API.USER_BY_ID.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(id))))
875
+ .pipe(map(result => {
876
+ this.userIdExistPending = false;
877
+ return result;
878
+ }));
879
+ }
880
+ persistCacheChanges() {
881
+ /*const params = {
882
+ excludeDeviceExtraOptions: true
883
+ };*/
884
+ return this.processUserChangesToCache()
885
+ .pipe(map((result) => {
886
+ return this.apiService.post(API.PERSIST_USER_CACHE.replace(':siteId', String(this.siteId)).replace(':token', this.user.token), {})
887
+ .subscribe(() => {
888
+ });
889
+ // .pipe(map((user) => {
890
+ // // this.setUser(user, false, this.user.token);
891
+ // this.user.hasModifiedCache = false;
892
+ // }))
893
+ // .pipe(this.handleError(true, true));
894
+ }));
895
+ }
896
+ processUserChangesToCache() {
897
+ const calls = [];
898
+ const body = UtilsService.diff(this.originUser.getUserDetailsSavableData(), this.user.getUserDetailsSavableData(), 'user');
899
+ if (body?.length) {
900
+ calls.push(this.updateUserFields(body));
901
+ }
902
+ if (!calls?.length) {
903
+ return of(this.user);
904
+ }
905
+ return forkJoin(calls)
906
+ .pipe(map((responses) => {
907
+ // ApiUserResponse
908
+ this.handleSaveUserResponse(responses);
909
+ }));
910
+ // .pipe(this.handleError(false, true));
911
+ }
912
+ saveNewLine() {
913
+ this.dataPending = true;
914
+ this.deleteLine(this.user.siteId, this.lineAssociation.linePkid, encodeURIComponent(this.user.token))
915
+ .subscribe(() => {
916
+ const URL = API.PERSIST_USER_CACHE.replace(':siteId', String(this.siteId)).replace(':token', this.user.token);
917
+ this.apiService.post(URL, {})
918
+ .subscribe(() => {
919
+ this.fetchUserToken(this.siteId, this.user.userid, false, true)
920
+ .subscribe(() => {
921
+ this.runNewLineCreation();
922
+ });
923
+ });
924
+ });
925
+ }
926
+ runNewLineCreation() {
927
+ // CREATE NEW LINE
928
+ const newLineBody = SortingUtilsService.diff(this.lineService.generateLineAssociationFromLine(null), this.lineService.generateLineAssociationFromLine(this.lineAssociation), 'device.lineAssociations', null);
929
+ this.associateLineToUserDevice(this.user.siteId, this.user.devices[0].name, newLineBody, null, this.lineAssociation.callingSearchSpace).subscribe((response) => {
930
+ if (response && response.currentUpdatedUser) {
931
+ const linePkId = this.getLinePkIdFromUser(response?.currentUpdatedUser, 0);
932
+ forkJoin([
933
+ this.updateLineFields(this.siteId, linePkId, this.user.token, this.lineAssociation.alertingName),
934
+ this.updateDeviceFields(this.siteId, this.user.devices[0]?.name, this.user.token)
935
+ ]).subscribe((response) => {
936
+ this.originUser.devices[0].lineAssociations[0].directoryNumber.directoryNumber = this.lineAssociation.directoryNumber.directoryNumber;
937
+ this.onUserLineSaved$.next(true);
938
+ });
939
+ }
940
+ });
941
+ // -----
942
+ }
943
+ getLinePkIdFromUser(user, index) {
944
+ if (user.devices && user.devices[index] && user.devices[index].lineAssociations && user.devices[index].lineAssociations[index]) {
945
+ return user.devices[index].lineAssociations[index].linePkid || user.devices[index].lineAssociations[index].lineLocalId;
946
+ }
947
+ }
948
+ deleteLine(siteId, pkid, token) {
949
+ return this.apiService.delete(API.DELETE_LINE.replace(':siteId', String(siteId)).replace(':pkid', pkid).replace(':token', encodeURIComponent(token)), {});
950
+ // .pipe(this.handleError(true, false));
951
+ }
952
+ disassociateLine(siteId, linePkid, token, deviceName) {
953
+ return this.apiService.delete(API.DISASSOCIATE_LINE.replace(':siteId', String(siteId))
954
+ .replace(':linePkid', linePkid)
955
+ .replace(':deviceName', deviceName)
956
+ .replace(':token', encodeURIComponent(token)), {});
957
+ // .pipe(this.handleError(true, false));
958
+ }
959
+ updateLineFields(siteId, pkid, token, alertingName) {
960
+ const body = ['line.description=', `line.alertingName=${alertingName}`];
961
+ return this.apiService.post(API.UPDATE_LINE_FIELDS.replace(':siteId', String(siteId)).replace(':pkid', encodeURIComponent(pkid)).replace(':token', encodeURIComponent(token)), body);
962
+ // .pipe(this.handleError(true, false));
963
+ }
964
+ updateDeviceFields(siteId, deviceName, token) {
965
+ const body = ['device.associatedDNs.0=null'];
966
+ return this.apiService.post(API.UPDATE_DEVICE_FIELDS.replace(':siteId', String(siteId)).replace(':deviceName', deviceName).replace(':token', encodeURIComponent(token)), body);
967
+ // .pipe(this.handleError(true, false));
968
+ }
969
+ checkDestinationNumber(siteId, directoryNumber, routePartitionName) {
970
+ const params = {
971
+ dntype: 'EXTENSION'
972
+ };
973
+ const body = {
974
+ directoryNumber: directoryNumber,
975
+ routePartitionName: routePartitionName
976
+ };
977
+ return this.apiService.post(API.CHECK_DESTINATION_NUMBER.replace(':siteId', siteId), body, params);
978
+ }
979
+ associateLineToUserDevice(siteId, deviceName, body, pkid, css) {
980
+ let params = {};
981
+ if (pkid) {
982
+ params = { linePkid: pkid };
983
+ }
984
+ if (css) {
985
+ // @ts-ignore
986
+ params['css'] = css;
987
+ }
988
+ return this.apiService.post(API.ASSOCIATE_LINE.replace(':siteId', String(siteId)).replace(':deviceName', deviceName)
989
+ .replace(':token', encodeURIComponent(this.user.token)), body, params);
990
+ // .pipe(this.handleError(true, true));
991
+ }
992
+ hasUnsavedChanges() {
993
+ if (this.user && this.originUser) {
994
+ return !this.user.equal(this.originUser);
995
+ }
996
+ return false;
997
+ }
998
+ setSimplifiedUser(user, isLdap) {
999
+ // isLdap TEMP because of token response issue
1000
+ this.user = new SimplifiedUser(user, isLdap);
1001
+ const copiedUser = JSON.parse(JSON.stringify(user));
1002
+ this.originUser = new SimplifiedUser(copiedUser, isLdap);
1003
+ }
1004
+ handleSaveUserResponse(responses) {
1005
+ if (!responses?.length) {
1006
+ return;
1007
+ }
1008
+ for (let len = responses.length, i = len - 1; i >= 0; i--) {
1009
+ if (responses[i] && responses[i].currentUpdatedUser) {
1010
+ // this.setUser(responses[i].currentUpdatedUser, false, this.user.token);
1011
+ this.user.hasModifiedCache = true;
1012
+ return;
1013
+ }
1014
+ }
1015
+ }
1016
+ }
1017
+ UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService, deps: [{ token: APIService }, { token: LineService }], target: i0.ɵɵFactoryTarget.Injectable });
1018
+ UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService });
1019
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService, decorators: [{
1020
+ type: Injectable
1021
1021
  }], ctorParameters: function () { return [{ type: APIService }, { type: LineService }]; } });
1022
1022
 
1023
- class AppLoaderComponent {
1024
- constructor() {
1025
- }
1026
- }
1027
- AppLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1028
- AppLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AppLoaderComponent, selector: "app-loader", ngImport: i0, template: "<div class=\"overlay\">\n <mat-progress-spinner\n class=\"page-spinner\"\n mode=\"indeterminate\"\n [diameter]=\"120\"></mat-progress-spinner>\n</div>\n", styles: [".overlay{position:fixed;width:100%;height:100%;inset:0;background-color:#fff3;z-index:200}\n"], dependencies: [{ kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }], encapsulation: i0.ViewEncapsulation.None });
1029
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, decorators: [{
1030
- type: Component,
1031
- args: [{ selector: 'app-loader', encapsulation: ViewEncapsulation.None, template: "<div class=\"overlay\">\n <mat-progress-spinner\n class=\"page-spinner\"\n mode=\"indeterminate\"\n [diameter]=\"120\"></mat-progress-spinner>\n</div>\n", styles: [".overlay{position:fixed;width:100%;height:100%;inset:0;background-color:#fff3;z-index:200}\n"] }]
1023
+ class AppLoaderComponent {
1024
+ constructor() {
1025
+ }
1026
+ }
1027
+ AppLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1028
+ AppLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AppLoaderComponent, selector: "app-loader", ngImport: i0, template: "<div class=\"overlay\">\r\n <mat-progress-spinner\r\n class=\"page-spinner\"\r\n mode=\"indeterminate\"\r\n [diameter]=\"120\"></mat-progress-spinner>\r\n</div>\r\n", styles: [".overlay{position:fixed;width:100%;height:100%;inset:0;background-color:#fff3;z-index:200}\n"], dependencies: [{ kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }], encapsulation: i0.ViewEncapsulation.None });
1029
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, decorators: [{
1030
+ type: Component,
1031
+ args: [{ selector: 'app-loader', encapsulation: ViewEncapsulation.None, template: "<div class=\"overlay\">\r\n <mat-progress-spinner\r\n class=\"page-spinner\"\r\n mode=\"indeterminate\"\r\n [diameter]=\"120\"></mat-progress-spinner>\r\n</div>\r\n", styles: [".overlay{position:fixed;width:100%;height:100%;inset:0;background-color:#fff3;z-index:200}\n"] }]
1032
1032
  }], ctorParameters: function () { return []; } });
1033
1033
 
1034
- class AuthInterceptor {
1035
- constructor() {
1036
- }
1037
- intercept(request, next) {
1038
- request = request.clone({
1039
- setHeaders: {
1040
- // Authorization: basicAuthHeaderString
1041
- },
1042
- withCredentials: true
1043
- });
1044
- return next.handle(request).pipe(catchError(err => {
1045
- if (err instanceof HttpErrorResponse) {
1046
- if (err.status === 401) {
1047
- if (window.history.length < 3) {
1048
- err.error.message = '';
1049
- }
1050
- else {
1051
- err.error.message = 'SESSION_INACTIVE';
1052
- }
1053
- }
1054
- }
1055
- return throwError(err);
1056
- }));
1057
- }
1058
- }
1059
- AuthInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1060
- AuthInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor });
1061
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor, decorators: [{
1062
- type: Injectable
1034
+ class AuthInterceptor {
1035
+ constructor() {
1036
+ }
1037
+ intercept(request, next) {
1038
+ request = request.clone({
1039
+ setHeaders: {
1040
+ // Authorization: basicAuthHeaderString
1041
+ },
1042
+ withCredentials: true
1043
+ });
1044
+ return next.handle(request).pipe(catchError(err => {
1045
+ if (err instanceof HttpErrorResponse) {
1046
+ if (err.status === 401) {
1047
+ if (window.history.length < 3) {
1048
+ err.error.message = '';
1049
+ }
1050
+ else {
1051
+ err.error.message = 'SESSION_INACTIVE';
1052
+ }
1053
+ }
1054
+ }
1055
+ return throwError(err);
1056
+ }));
1057
+ }
1058
+ }
1059
+ AuthInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1060
+ AuthInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor });
1061
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor, decorators: [{
1062
+ type: Injectable
1063
1063
  }], ctorParameters: function () { return []; } });
1064
1064
 
1065
- class UserInfoComponent {
1066
- }
1067
- UserInfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1068
- UserInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserInfoComponent, selector: "app-user-info", inputs: { name: "name", active: "active", email: "email", position: "position" }, ngImport: i0, template: "<div class=\"info-holder\">\n <div class=\"content-box flex-box\">\n <div class=\"info-holder__user-image\">\n <img src=\"../../../assets/a24749b225874bb3e3a4cb5d2f42e82c.png\" alt=\"\" class=\"avatar\">\n </div>\n <div class=\"info-holder__user-information\">\n <div class=\"info-holder__user-name\">{{name}}</div>\n <div class=\"info-holder__user-breadcrumbs\">\n <div class=\"is-active\" *ngIf=\"active; else notActive\">\n <span class=\"icon-user-status icon-user-status-active\"></span>Active\n </div>\n <div class=\"icon-separator\"></div>\n <div class=\"email\">{{email}}</div>\n <div class=\"icon-separator\"></div>\n <div class=\"position\">{{position}}</div>\n </div>\n </div>\n </div>\n\n</div>\n\n<ng-template #notActive>\n <div class=\"is-active\">\n <svg width=\"8\" height=\"9\" viewBox=\"0 0 8 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4 8.5C6.20914 8.5 8 6.70914 8 4.5C8 2.29086 6.20914 0.5 4 0.5C1.79086 0.5 0 2.29086 0 4.5C0 6.70914 1.79086 8.5 4 8.5Z\" fill=\"grey\"/>\n </svg>\n <div>Not active</div>\n </div>\n</ng-template>\n", styles: [".info-holder{display:flex;gap:16px;align-items:center;font-family:Inter,sans-serif;height:102px;width:100%;background:white;margin:0 0 30px}.info-holder__user-image img{width:40px;border-radius:120px;margin:20px 0 0}.info-holder__user-information{padding:10px;margin:10px;gap:10px;display:flex;flex-direction:column}.info-holder__user-name{font-size:20px;font-weight:500}.info-holder__user-breadcrumbs{display:flex;gap:8px;font-weight:400;font-size:14px;color:#000000b3;align-items:center}.info-holder .icon-separator{height:5px;width:5px;background-color:#000000b3;border-radius:50%}.info-holder .is-active{display:flex;gap:8px;align-items:center}.icon-user-status{width:.5rem;height:.5rem;border-radius:50%;background-color:#707070;margin:0 5px 0 0}.icon-user-status.icon-user-status-active{background-color:#1d805f;display:inline-block}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1069
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserInfoComponent, decorators: [{
1070
- type: Component,
1071
- args: [{ selector: 'app-user-info', template: "<div class=\"info-holder\">\n <div class=\"content-box flex-box\">\n <div class=\"info-holder__user-image\">\n <img src=\"../../../assets/a24749b225874bb3e3a4cb5d2f42e82c.png\" alt=\"\" class=\"avatar\">\n </div>\n <div class=\"info-holder__user-information\">\n <div class=\"info-holder__user-name\">{{name}}</div>\n <div class=\"info-holder__user-breadcrumbs\">\n <div class=\"is-active\" *ngIf=\"active; else notActive\">\n <span class=\"icon-user-status icon-user-status-active\"></span>Active\n </div>\n <div class=\"icon-separator\"></div>\n <div class=\"email\">{{email}}</div>\n <div class=\"icon-separator\"></div>\n <div class=\"position\">{{position}}</div>\n </div>\n </div>\n </div>\n\n</div>\n\n<ng-template #notActive>\n <div class=\"is-active\">\n <svg width=\"8\" height=\"9\" viewBox=\"0 0 8 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4 8.5C6.20914 8.5 8 6.70914 8 4.5C8 2.29086 6.20914 0.5 4 0.5C1.79086 0.5 0 2.29086 0 4.5C0 6.70914 1.79086 8.5 4 8.5Z\" fill=\"grey\"/>\n </svg>\n <div>Not active</div>\n </div>\n</ng-template>\n", styles: [".info-holder{display:flex;gap:16px;align-items:center;font-family:Inter,sans-serif;height:102px;width:100%;background:white;margin:0 0 30px}.info-holder__user-image img{width:40px;border-radius:120px;margin:20px 0 0}.info-holder__user-information{padding:10px;margin:10px;gap:10px;display:flex;flex-direction:column}.info-holder__user-name{font-size:20px;font-weight:500}.info-holder__user-breadcrumbs{display:flex;gap:8px;font-weight:400;font-size:14px;color:#000000b3;align-items:center}.info-holder .icon-separator{height:5px;width:5px;background-color:#000000b3;border-radius:50%}.info-holder .is-active{display:flex;gap:8px;align-items:center}.icon-user-status{width:.5rem;height:.5rem;border-radius:50%;background-color:#707070;margin:0 5px 0 0}.icon-user-status.icon-user-status-active{background-color:#1d805f;display:inline-block}\n"] }]
1072
- }], propDecorators: { name: [{
1073
- type: Input
1074
- }], active: [{
1075
- type: Input
1076
- }], email: [{
1077
- type: Input
1078
- }], position: [{
1079
- type: Input
1065
+ class UserInfoComponent {
1066
+ }
1067
+ UserInfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1068
+ UserInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserInfoComponent, selector: "app-user-info", inputs: { name: "name", active: "active", email: "email", position: "position" }, ngImport: i0, template: "<div class=\"info-holder\">\r\n <div class=\"content-box flex-box\">\r\n <div class=\"info-holder__user-image\">\r\n <img src=\"../../../assets/a24749b225874bb3e3a4cb5d2f42e82c.png\" alt=\"\" class=\"avatar\">\r\n </div>\r\n <div class=\"info-holder__user-information\">\r\n <div class=\"info-holder__user-name\">{{name}}</div>\r\n <div class=\"info-holder__user-breadcrumbs\">\r\n <div class=\"is-active\" *ngIf=\"active; else notActive\">\r\n <span class=\"icon-user-status icon-user-status-active\"></span>Active\r\n </div>\r\n <div class=\"icon-separator\"></div>\r\n <div class=\"email\">{{email}}</div>\r\n <div class=\"icon-separator\"></div>\r\n <div class=\"position\">{{position}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n\r\n<ng-template #notActive>\r\n <div class=\"is-active\">\r\n <svg width=\"8\" height=\"9\" viewBox=\"0 0 8 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4 8.5C6.20914 8.5 8 6.70914 8 4.5C8 2.29086 6.20914 0.5 4 0.5C1.79086 0.5 0 2.29086 0 4.5C0 6.70914 1.79086 8.5 4 8.5Z\" fill=\"grey\"/>\r\n </svg>\r\n <div>Not active</div>\r\n </div>\r\n</ng-template>\r\n", styles: [".info-holder{display:flex;gap:16px;align-items:center;font-family:Inter,sans-serif;height:102px;width:100%;background:white;margin:0 0 30px}.info-holder__user-image img{width:40px;border-radius:120px;margin:20px 0 0}.info-holder__user-information{padding:10px;margin:10px;gap:10px;display:flex;flex-direction:column}.info-holder__user-name{font-size:20px;font-weight:500}.info-holder__user-breadcrumbs{display:flex;gap:8px;font-weight:400;font-size:14px;color:#000000b3;align-items:center}.info-holder .icon-separator{height:5px;width:5px;background-color:#000000b3;border-radius:50%}.info-holder .is-active{display:flex;gap:8px;align-items:center}.icon-user-status{width:.5rem;height:.5rem;border-radius:50%;background-color:#707070;margin:0 5px 0 0}.icon-user-status.icon-user-status-active{background-color:#1d805f;display:inline-block}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1069
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserInfoComponent, decorators: [{
1070
+ type: Component,
1071
+ args: [{ selector: 'app-user-info', template: "<div class=\"info-holder\">\r\n <div class=\"content-box flex-box\">\r\n <div class=\"info-holder__user-image\">\r\n <img src=\"../../../assets/a24749b225874bb3e3a4cb5d2f42e82c.png\" alt=\"\" class=\"avatar\">\r\n </div>\r\n <div class=\"info-holder__user-information\">\r\n <div class=\"info-holder__user-name\">{{name}}</div>\r\n <div class=\"info-holder__user-breadcrumbs\">\r\n <div class=\"is-active\" *ngIf=\"active; else notActive\">\r\n <span class=\"icon-user-status icon-user-status-active\"></span>Active\r\n </div>\r\n <div class=\"icon-separator\"></div>\r\n <div class=\"email\">{{email}}</div>\r\n <div class=\"icon-separator\"></div>\r\n <div class=\"position\">{{position}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n\r\n<ng-template #notActive>\r\n <div class=\"is-active\">\r\n <svg width=\"8\" height=\"9\" viewBox=\"0 0 8 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4 8.5C6.20914 8.5 8 6.70914 8 4.5C8 2.29086 6.20914 0.5 4 0.5C1.79086 0.5 0 2.29086 0 4.5C0 6.70914 1.79086 8.5 4 8.5Z\" fill=\"grey\"/>\r\n </svg>\r\n <div>Not active</div>\r\n </div>\r\n</ng-template>\r\n", styles: [".info-holder{display:flex;gap:16px;align-items:center;font-family:Inter,sans-serif;height:102px;width:100%;background:white;margin:0 0 30px}.info-holder__user-image img{width:40px;border-radius:120px;margin:20px 0 0}.info-holder__user-information{padding:10px;margin:10px;gap:10px;display:flex;flex-direction:column}.info-holder__user-name{font-size:20px;font-weight:500}.info-holder__user-breadcrumbs{display:flex;gap:8px;font-weight:400;font-size:14px;color:#000000b3;align-items:center}.info-holder .icon-separator{height:5px;width:5px;background-color:#000000b3;border-radius:50%}.info-holder .is-active{display:flex;gap:8px;align-items:center}.icon-user-status{width:.5rem;height:.5rem;border-radius:50%;background-color:#707070;margin:0 5px 0 0}.icon-user-status.icon-user-status-active{background-color:#1d805f;display:inline-block}\n"] }]
1072
+ }], propDecorators: { name: [{
1073
+ type: Input
1074
+ }], active: [{
1075
+ type: Input
1076
+ }], email: [{
1077
+ type: Input
1078
+ }], position: [{
1079
+ type: Input
1080
1080
  }] } });
1081
1081
 
1082
- class MaterialModule {
1083
- }
1084
- MaterialModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1085
- MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [DragDropModule,
1086
- MatButtonModule,
1087
- MatListModule,
1088
- MatProgressSpinnerModule,
1089
- MatExpansionModule,
1090
- MatInputModule,
1091
- MatInputModule,
1092
- MatListModule,
1093
- MatTreeModule,
1094
- MatTreeModule,
1095
- MatNativeDateModule,
1096
- MatDatepickerModule,
1097
- MatTooltipModule,
1098
- MatAutocompleteModule,
1099
- MatChipsModule,
1100
- MatSidenavModule,
1101
- MatFormFieldModule,
1102
- MatStepperModule,
1103
- MatTabsModule,
1104
- MatCardModule,
1105
- MatSelectModule,
1106
- MatCheckboxModule,
1107
- MatSlideToggleModule,
1108
- MatTableModule,
1109
- MatPaginatorModule], exports: [DragDropModule,
1110
- MatButtonModule,
1111
- MatListModule,
1112
- MatProgressSpinnerModule,
1113
- MatExpansionModule,
1114
- MatInputModule,
1115
- MatInputModule,
1116
- MatListModule,
1117
- MatTreeModule,
1118
- MatTreeModule,
1119
- MatNativeDateModule,
1120
- MatDatepickerModule,
1121
- MatTooltipModule,
1122
- MatAutocompleteModule,
1123
- MatChipsModule,
1124
- MatSidenavModule,
1125
- MatFormFieldModule,
1126
- MatStepperModule,
1127
- MatTabsModule,
1128
- MatCardModule,
1129
- MatCheckboxModule,
1130
- MatSelectModule,
1131
- MatSlideToggleModule,
1132
- MatProgressSpinnerModule,
1133
- MatTableModule,
1134
- MatPaginatorModule] });
1135
- MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [DragDropModule,
1136
- MatButtonModule,
1137
- MatListModule,
1138
- MatProgressSpinnerModule,
1139
- MatExpansionModule,
1140
- MatInputModule,
1141
- MatInputModule,
1142
- MatListModule,
1143
- MatTreeModule,
1144
- MatTreeModule,
1145
- MatNativeDateModule,
1146
- MatDatepickerModule,
1147
- MatTooltipModule,
1148
- MatAutocompleteModule,
1149
- MatChipsModule,
1150
- MatSidenavModule,
1151
- MatFormFieldModule,
1152
- MatStepperModule,
1153
- MatTabsModule,
1154
- MatCardModule,
1155
- MatSelectModule,
1156
- MatCheckboxModule,
1157
- MatSlideToggleModule,
1158
- MatTableModule,
1159
- MatPaginatorModule, DragDropModule,
1160
- MatButtonModule,
1161
- MatListModule,
1162
- MatProgressSpinnerModule,
1163
- MatExpansionModule,
1164
- MatInputModule,
1165
- MatInputModule,
1166
- MatListModule,
1167
- MatTreeModule,
1168
- MatTreeModule,
1169
- MatNativeDateModule,
1170
- MatDatepickerModule,
1171
- MatTooltipModule,
1172
- MatAutocompleteModule,
1173
- MatChipsModule,
1174
- MatSidenavModule,
1175
- MatFormFieldModule,
1176
- MatStepperModule,
1177
- MatTabsModule,
1178
- MatCardModule,
1179
- MatCheckboxModule,
1180
- MatSelectModule,
1181
- MatSlideToggleModule,
1182
- MatProgressSpinnerModule,
1183
- MatTableModule,
1184
- MatPaginatorModule] });
1185
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, decorators: [{
1186
- type: NgModule,
1187
- args: [{
1188
- imports: [
1189
- DragDropModule,
1190
- MatButtonModule,
1191
- MatListModule,
1192
- MatProgressSpinnerModule,
1193
- MatExpansionModule,
1194
- MatInputModule,
1195
- MatInputModule,
1196
- MatListModule,
1197
- MatTreeModule,
1198
- MatTreeModule,
1199
- MatNativeDateModule,
1200
- MatDatepickerModule,
1201
- MatTooltipModule,
1202
- MatAutocompleteModule,
1203
- MatChipsModule,
1204
- MatSidenavModule,
1205
- MatFormFieldModule,
1206
- MatStepperModule,
1207
- MatTabsModule,
1208
- MatCardModule,
1209
- MatSelectModule,
1210
- MatCheckboxModule,
1211
- MatSlideToggleModule,
1212
- MatTableModule,
1213
- MatPaginatorModule
1214
- ],
1215
- exports: [
1216
- DragDropModule,
1217
- MatButtonModule,
1218
- MatListModule,
1219
- MatProgressSpinnerModule,
1220
- MatExpansionModule,
1221
- MatInputModule,
1222
- MatInputModule,
1223
- MatListModule,
1224
- MatTreeModule,
1225
- MatTreeModule,
1226
- MatNativeDateModule,
1227
- MatDatepickerModule,
1228
- MatTooltipModule,
1229
- MatAutocompleteModule,
1230
- MatChipsModule,
1231
- MatSidenavModule,
1232
- MatFormFieldModule,
1233
- MatStepperModule,
1234
- MatTabsModule,
1235
- MatCardModule,
1236
- MatCheckboxModule,
1237
- MatSelectModule,
1238
- MatSlideToggleModule,
1239
- MatProgressSpinnerModule,
1240
- MatTableModule,
1241
- MatPaginatorModule
1242
- ],
1243
- }]
1082
+ class MaterialModule {
1083
+ }
1084
+ MaterialModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1085
+ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [DragDropModule,
1086
+ MatButtonModule,
1087
+ MatListModule,
1088
+ MatProgressSpinnerModule,
1089
+ MatExpansionModule,
1090
+ MatInputModule,
1091
+ MatInputModule,
1092
+ MatListModule,
1093
+ MatTreeModule,
1094
+ MatTreeModule,
1095
+ MatNativeDateModule,
1096
+ MatDatepickerModule,
1097
+ MatTooltipModule,
1098
+ MatAutocompleteModule,
1099
+ MatChipsModule,
1100
+ MatSidenavModule,
1101
+ MatFormFieldModule,
1102
+ MatStepperModule,
1103
+ MatTabsModule,
1104
+ MatCardModule,
1105
+ MatSelectModule,
1106
+ MatCheckboxModule,
1107
+ MatSlideToggleModule,
1108
+ MatTableModule,
1109
+ MatPaginatorModule], exports: [DragDropModule,
1110
+ MatButtonModule,
1111
+ MatListModule,
1112
+ MatProgressSpinnerModule,
1113
+ MatExpansionModule,
1114
+ MatInputModule,
1115
+ MatInputModule,
1116
+ MatListModule,
1117
+ MatTreeModule,
1118
+ MatTreeModule,
1119
+ MatNativeDateModule,
1120
+ MatDatepickerModule,
1121
+ MatTooltipModule,
1122
+ MatAutocompleteModule,
1123
+ MatChipsModule,
1124
+ MatSidenavModule,
1125
+ MatFormFieldModule,
1126
+ MatStepperModule,
1127
+ MatTabsModule,
1128
+ MatCardModule,
1129
+ MatCheckboxModule,
1130
+ MatSelectModule,
1131
+ MatSlideToggleModule,
1132
+ MatProgressSpinnerModule,
1133
+ MatTableModule,
1134
+ MatPaginatorModule] });
1135
+ MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [DragDropModule,
1136
+ MatButtonModule,
1137
+ MatListModule,
1138
+ MatProgressSpinnerModule,
1139
+ MatExpansionModule,
1140
+ MatInputModule,
1141
+ MatInputModule,
1142
+ MatListModule,
1143
+ MatTreeModule,
1144
+ MatTreeModule,
1145
+ MatNativeDateModule,
1146
+ MatDatepickerModule,
1147
+ MatTooltipModule,
1148
+ MatAutocompleteModule,
1149
+ MatChipsModule,
1150
+ MatSidenavModule,
1151
+ MatFormFieldModule,
1152
+ MatStepperModule,
1153
+ MatTabsModule,
1154
+ MatCardModule,
1155
+ MatSelectModule,
1156
+ MatCheckboxModule,
1157
+ MatSlideToggleModule,
1158
+ MatTableModule,
1159
+ MatPaginatorModule, DragDropModule,
1160
+ MatButtonModule,
1161
+ MatListModule,
1162
+ MatProgressSpinnerModule,
1163
+ MatExpansionModule,
1164
+ MatInputModule,
1165
+ MatInputModule,
1166
+ MatListModule,
1167
+ MatTreeModule,
1168
+ MatTreeModule,
1169
+ MatNativeDateModule,
1170
+ MatDatepickerModule,
1171
+ MatTooltipModule,
1172
+ MatAutocompleteModule,
1173
+ MatChipsModule,
1174
+ MatSidenavModule,
1175
+ MatFormFieldModule,
1176
+ MatStepperModule,
1177
+ MatTabsModule,
1178
+ MatCardModule,
1179
+ MatCheckboxModule,
1180
+ MatSelectModule,
1181
+ MatSlideToggleModule,
1182
+ MatProgressSpinnerModule,
1183
+ MatTableModule,
1184
+ MatPaginatorModule] });
1185
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, decorators: [{
1186
+ type: NgModule,
1187
+ args: [{
1188
+ imports: [
1189
+ DragDropModule,
1190
+ MatButtonModule,
1191
+ MatListModule,
1192
+ MatProgressSpinnerModule,
1193
+ MatExpansionModule,
1194
+ MatInputModule,
1195
+ MatInputModule,
1196
+ MatListModule,
1197
+ MatTreeModule,
1198
+ MatTreeModule,
1199
+ MatNativeDateModule,
1200
+ MatDatepickerModule,
1201
+ MatTooltipModule,
1202
+ MatAutocompleteModule,
1203
+ MatChipsModule,
1204
+ MatSidenavModule,
1205
+ MatFormFieldModule,
1206
+ MatStepperModule,
1207
+ MatTabsModule,
1208
+ MatCardModule,
1209
+ MatSelectModule,
1210
+ MatCheckboxModule,
1211
+ MatSlideToggleModule,
1212
+ MatTableModule,
1213
+ MatPaginatorModule
1214
+ ],
1215
+ exports: [
1216
+ DragDropModule,
1217
+ MatButtonModule,
1218
+ MatListModule,
1219
+ MatProgressSpinnerModule,
1220
+ MatExpansionModule,
1221
+ MatInputModule,
1222
+ MatInputModule,
1223
+ MatListModule,
1224
+ MatTreeModule,
1225
+ MatTreeModule,
1226
+ MatNativeDateModule,
1227
+ MatDatepickerModule,
1228
+ MatTooltipModule,
1229
+ MatAutocompleteModule,
1230
+ MatChipsModule,
1231
+ MatSidenavModule,
1232
+ MatFormFieldModule,
1233
+ MatStepperModule,
1234
+ MatTabsModule,
1235
+ MatCardModule,
1236
+ MatCheckboxModule,
1237
+ MatSelectModule,
1238
+ MatSlideToggleModule,
1239
+ MatProgressSpinnerModule,
1240
+ MatTableModule,
1241
+ MatPaginatorModule
1242
+ ],
1243
+ }]
1244
1244
  }] });
1245
1245
 
1246
- const environment = {
1247
- production: false,
1248
- // apiUrl: 'http://localhost:4200',
1249
- apiUrl: 'http://192.168.0.191:8080',
1250
- notificationsLifetime: 30000,
1251
- longNotificationsLifetime: 45000,
1252
- cashCleanTimer: 900000,
1253
- cashArrayLength: 10000,
1254
- matomoUrl: 'http://192.168.0.136/matomo/',
1246
+ const environment = {
1247
+ production: false,
1248
+ // apiUrl: 'http://localhost:4200',
1249
+ apiUrl: 'http://192.168.0.191:8080',
1250
+ notificationsLifetime: 30000,
1251
+ longNotificationsLifetime: 45000,
1252
+ cashCleanTimer: 900000,
1253
+ cashArrayLength: 10000,
1254
+ matomoUrl: 'http://192.168.0.136/matomo/',
1255
1255
  };
1256
1256
 
1257
- const TTL_DEFAULT = environment.notificationsLifetime;
1258
- const TTL_LONG_DEFAULT = environment.longNotificationsLifetime;
1259
- var NotificationType;
1260
- (function (NotificationType) {
1261
- NotificationType["info"] = "info";
1262
- NotificationType["error"] = "error";
1263
- NotificationType["success"] = "success";
1264
- NotificationType["warning"] = "warning";
1265
- })(NotificationType || (NotificationType = {}));
1266
- class Notification {
1267
- constructor(data) {
1268
- this.ttl = TTL_DEFAULT;
1269
- Object.assign(this, data || {});
1270
- if (this.ttl === undefined) {
1271
- this.ttl = this.message && this.message.length && this.message.length < 80 ? TTL_DEFAULT : TTL_LONG_DEFAULT;
1272
- }
1273
- }
1274
- isInfo() {
1275
- return this.type === NotificationType.info;
1276
- }
1277
- isError() {
1278
- return this.type === NotificationType.error;
1279
- }
1280
- isSuccess() {
1281
- return this.type === NotificationType.success;
1282
- }
1283
- isWarning() {
1284
- return this.type === NotificationType.warning;
1285
- }
1257
+ const TTL_DEFAULT = environment.notificationsLifetime;
1258
+ const TTL_LONG_DEFAULT = environment.longNotificationsLifetime;
1259
+ var NotificationType;
1260
+ (function (NotificationType) {
1261
+ NotificationType["info"] = "info";
1262
+ NotificationType["error"] = "error";
1263
+ NotificationType["success"] = "success";
1264
+ NotificationType["warning"] = "warning";
1265
+ })(NotificationType || (NotificationType = {}));
1266
+ class Notification {
1267
+ constructor(data) {
1268
+ this.ttl = TTL_DEFAULT;
1269
+ Object.assign(this, data || {});
1270
+ if (this.ttl === undefined) {
1271
+ this.ttl = this.message && this.message.length && this.message.length < 80 ? TTL_DEFAULT : TTL_LONG_DEFAULT;
1272
+ }
1273
+ }
1274
+ isInfo() {
1275
+ return this.type === NotificationType.info;
1276
+ }
1277
+ isError() {
1278
+ return this.type === NotificationType.error;
1279
+ }
1280
+ isSuccess() {
1281
+ return this.type === NotificationType.success;
1282
+ }
1283
+ isWarning() {
1284
+ return this.type === NotificationType.warning;
1285
+ }
1286
1286
  }
1287
1287
 
1288
- const SUCCESS_TIME = 5000;
1289
- const INACTIVE_SESSION_MESSAGE = 'Your session was lost due to inactivity. Please login again';
1290
- const INACTIVE_SESSION = 'SESSION_INACTIVE';
1291
- class NotificationService {
1292
- constructor() {
1293
- this.listChange = new Subject();
1294
- this.max = 0;
1295
- this.list = [];
1296
- }
1297
- error(message, ttl) {
1298
- this.notify('error', message, ttl);
1299
- }
1300
- success(message, ttl) {
1301
- this.notify('success', message, (!ttl) ? SUCCESS_TIME : ttl);
1302
- }
1303
- warning(message, ttl) {
1304
- this.notify('warning', message, ttl);
1305
- }
1306
- info(message, ttl) {
1307
- this.notify('info', message, ttl);
1308
- }
1309
- notify(type, message, ttl) {
1310
- const found = this.list.find((n) => n.message === message);
1311
- if (found) {
1312
- this.remove(found);
1313
- }
1314
- const notification = new Notification({
1315
- id: ++this.max,
1316
- type, message, ttl
1317
- });
1318
- if (notification.ttl > 0) {
1319
- notification.timerId = setTimeout(() => this.remove(notification, true), notification.ttl);
1320
- }
1321
- this.list.push(notification);
1322
- this.listChange.next(this.list);
1323
- }
1324
- remove(notification, auto) {
1325
- if (!auto && notification.timerId) {
1326
- // clear timeout in case of manual remove
1327
- clearInterval(notification.timerId);
1328
- }
1329
- this.list = this.list.filter(n => n.id !== notification.id);
1330
- this.listChange.next(this.list);
1331
- }
1332
- removeInactiveSessionError() {
1333
- if (!this.list || !this.list.length) {
1334
- return;
1335
- }
1336
- this.list = this.list.filter(n => n.message !== INACTIVE_SESSION_MESSAGE && n.message !== INACTIVE_SESSION);
1337
- this.listChange.next(this.list);
1338
- }
1339
- }
1340
- NotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1341
- NotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService });
1342
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, decorators: [{
1343
- type: Injectable
1288
+ const SUCCESS_TIME = 5000;
1289
+ const INACTIVE_SESSION_MESSAGE = 'Your session was lost due to inactivity. Please login again';
1290
+ const INACTIVE_SESSION = 'SESSION_INACTIVE';
1291
+ class NotificationService {
1292
+ constructor() {
1293
+ this.listChange = new Subject();
1294
+ this.max = 0;
1295
+ this.list = [];
1296
+ }
1297
+ error(message, ttl) {
1298
+ this.notify('error', message, ttl);
1299
+ }
1300
+ success(message, ttl) {
1301
+ this.notify('success', message, (!ttl) ? SUCCESS_TIME : ttl);
1302
+ }
1303
+ warning(message, ttl) {
1304
+ this.notify('warning', message, ttl);
1305
+ }
1306
+ info(message, ttl) {
1307
+ this.notify('info', message, ttl);
1308
+ }
1309
+ notify(type, message, ttl) {
1310
+ const found = this.list.find((n) => n.message === message);
1311
+ if (found) {
1312
+ this.remove(found);
1313
+ }
1314
+ const notification = new Notification({
1315
+ id: ++this.max,
1316
+ type, message, ttl
1317
+ });
1318
+ if (notification.ttl > 0) {
1319
+ notification.timerId = setTimeout(() => this.remove(notification, true), notification.ttl);
1320
+ }
1321
+ this.list.push(notification);
1322
+ this.listChange.next(this.list);
1323
+ }
1324
+ remove(notification, auto) {
1325
+ if (!auto && notification.timerId) {
1326
+ // clear timeout in case of manual remove
1327
+ clearInterval(notification.timerId);
1328
+ }
1329
+ this.list = this.list.filter(n => n.id !== notification.id);
1330
+ this.listChange.next(this.list);
1331
+ }
1332
+ removeInactiveSessionError() {
1333
+ if (!this.list || !this.list.length) {
1334
+ return;
1335
+ }
1336
+ this.list = this.list.filter(n => n.message !== INACTIVE_SESSION_MESSAGE && n.message !== INACTIVE_SESSION);
1337
+ this.listChange.next(this.list);
1338
+ }
1339
+ }
1340
+ NotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1341
+ NotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService });
1342
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, decorators: [{
1343
+ type: Injectable
1344
1344
  }], ctorParameters: function () { return []; } });
1345
1345
 
1346
- class NotificationsComponent {
1347
- constructor(notificationService, ref) {
1348
- this.notificationService = notificationService;
1349
- this.ref = ref;
1350
- }
1351
- ngOnInit() {
1352
- this.listChangeSubscribe();
1353
- }
1354
- ngOnDestroy() {
1355
- this.listSubscription.unsubscribe();
1356
- }
1357
- readMore() {
1358
- this.isReadMore = !this.isReadMore;
1359
- }
1360
- removeNotification(notification) {
1361
- this.notificationService.remove(notification);
1362
- }
1363
- listChangeSubscribe() {
1364
- this.listSubscription = this.notificationService.listChange
1365
- .subscribe((list) => {
1366
- this.list = list;
1367
- this.ref.detectChanges();
1368
- });
1369
- }
1370
- }
1371
- NotificationsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationsComponent, deps: [{ token: NotificationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1372
- NotificationsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: NotificationsComponent, selector: "app-notification", ngImport: i0, template: "<!--\n\n<div class=\"notification-block\" role=\"alert\" aria-live=\"assertive\">\n <div class=\"notification\"\n *ngFor=\"let notification of list\"\n [ngClass]=\"{'error': notification.isError(), 'success': notification.isSuccess()}\">\n\n <div class=\"flex-box\">\n <div class=\"notification-icons-block\">\n <i *ngIf=\"notification.isError()\" class=\"fa fa-exclamation-triangle\"></i>\n <i *ngIf=\"notification.isWarning()\" class=\"fa fa-hand-paper-o\"></i>\n <i *ngIf=\"notification.isSuccess()\" class=\"fa fa-check\"></i>\n <i *ngIf=\"notification.isInfo()\" class=\"fa fa-info-circle\"></i>\n </div>\n <div *ngIf=\"!isReadMore\" class=\"message-block\">\n {{notification.message | truncate:[93]}}\n </div>\n <div *ngIf=\"isReadMore\" class=\"message-block\">\n {{notification.message}}\n </div>\n </div>\n <div class=\"read-more-error link clickable\" *ngIf=\"notification.message && notification.message.length > 93\"\n (click)=\"readMore()\">{{(isReadMore ? 'BUTTON.COLLAPSE' : 'BUTTON.READ_MORE') | translate}}</div>\n <button\n class=\"close\"\n mat-icon-button\n matTooltip=\"{{'BUTTON.CLOSE' | translate}} {{'NOTIFICATION_MSG.' + notification.type | translate}} {{'NOTIFICATION_MSG.NOTI' | translate}}\"\n (click)=\"removeNotification(notification)\">\n <img class=\"notification-icon-close\" src=\"assets/icons/close_icon_modal.svg\" alt=\"\">\n </button>\n </div>\n</div>\n-->\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.notification-block{right:0;top:110px;position:absolute;width:20%;z-index:100}.notification-block .read-more-error{margin:10px 13px 3px 0;text-align:right}.notification-block .notification{padding:15px 0 10px;margin-bottom:18px;color:#333;border-radius:3px;border-top:1.5px solid #e5e1cd;background:#fcf8e3;box-shadow:0 8px 12px #091e4226,0 0 1px #091e424f;width:368px;position:relative}.notification-block .notification .notification-icons-block{text-align:center;width:56px}.notification-block .notification .message-block{font-size:14px;font-family:Poppins,Poppins,sans-serif!important;word-break:break-word;width:270px}.notification-block .notification .notification-icon-close{height:24px}.notification-block .notification.error{background:#FFE9E9;border-top:1.5px solid #E16D6D}.notification-block .notification.success{background:#e3f4dc;border-top:1.5px solid #b3d692}.notification-block .notification .fa-exclamation-triangle{color:#e16d6d!important}.notification-block .notification .fa-check{color:#a0c37f!important}.notification-block .notification .fa-info-circle,.notification-block .notification .fa-hand-paper-o{color:#bdb89e!important}.notification-block .notification .fa{font-size:20px}.notification-block .notification .close{position:absolute;top:2px;right:-5px}.notification-block .notification .close .fa{font-size:14px}.notification-block .notification .fa{margin:0;color:inherit}@media screen and (max-width: 600px){.notification-block{width:50%;min-width:150px}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1373
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationsComponent, decorators: [{
1374
- type: Component,
1375
- args: [{ selector: 'app-notification', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n\n<div class=\"notification-block\" role=\"alert\" aria-live=\"assertive\">\n <div class=\"notification\"\n *ngFor=\"let notification of list\"\n [ngClass]=\"{'error': notification.isError(), 'success': notification.isSuccess()}\">\n\n <div class=\"flex-box\">\n <div class=\"notification-icons-block\">\n <i *ngIf=\"notification.isError()\" class=\"fa fa-exclamation-triangle\"></i>\n <i *ngIf=\"notification.isWarning()\" class=\"fa fa-hand-paper-o\"></i>\n <i *ngIf=\"notification.isSuccess()\" class=\"fa fa-check\"></i>\n <i *ngIf=\"notification.isInfo()\" class=\"fa fa-info-circle\"></i>\n </div>\n <div *ngIf=\"!isReadMore\" class=\"message-block\">\n {{notification.message | truncate:[93]}}\n </div>\n <div *ngIf=\"isReadMore\" class=\"message-block\">\n {{notification.message}}\n </div>\n </div>\n <div class=\"read-more-error link clickable\" *ngIf=\"notification.message && notification.message.length > 93\"\n (click)=\"readMore()\">{{(isReadMore ? 'BUTTON.COLLAPSE' : 'BUTTON.READ_MORE') | translate}}</div>\n <button\n class=\"close\"\n mat-icon-button\n matTooltip=\"{{'BUTTON.CLOSE' | translate}} {{'NOTIFICATION_MSG.' + notification.type | translate}} {{'NOTIFICATION_MSG.NOTI' | translate}}\"\n (click)=\"removeNotification(notification)\">\n <img class=\"notification-icon-close\" src=\"assets/icons/close_icon_modal.svg\" alt=\"\">\n </button>\n </div>\n</div>\n-->\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.notification-block{right:0;top:110px;position:absolute;width:20%;z-index:100}.notification-block .read-more-error{margin:10px 13px 3px 0;text-align:right}.notification-block .notification{padding:15px 0 10px;margin-bottom:18px;color:#333;border-radius:3px;border-top:1.5px solid #e5e1cd;background:#fcf8e3;box-shadow:0 8px 12px #091e4226,0 0 1px #091e424f;width:368px;position:relative}.notification-block .notification .notification-icons-block{text-align:center;width:56px}.notification-block .notification .message-block{font-size:14px;font-family:Poppins,Poppins,sans-serif!important;word-break:break-word;width:270px}.notification-block .notification .notification-icon-close{height:24px}.notification-block .notification.error{background:#FFE9E9;border-top:1.5px solid #E16D6D}.notification-block .notification.success{background:#e3f4dc;border-top:1.5px solid #b3d692}.notification-block .notification .fa-exclamation-triangle{color:#e16d6d!important}.notification-block .notification .fa-check{color:#a0c37f!important}.notification-block .notification .fa-info-circle,.notification-block .notification .fa-hand-paper-o{color:#bdb89e!important}.notification-block .notification .fa{font-size:20px}.notification-block .notification .close{position:absolute;top:2px;right:-5px}.notification-block .notification .close .fa{font-size:14px}.notification-block .notification .fa{margin:0;color:inherit}@media screen and (max-width: 600px){.notification-block{width:50%;min-width:150px}}\n"] }]
1346
+ class NotificationsComponent {
1347
+ constructor(notificationService, ref) {
1348
+ this.notificationService = notificationService;
1349
+ this.ref = ref;
1350
+ }
1351
+ ngOnInit() {
1352
+ this.listChangeSubscribe();
1353
+ }
1354
+ ngOnDestroy() {
1355
+ this.listSubscription.unsubscribe();
1356
+ }
1357
+ readMore() {
1358
+ this.isReadMore = !this.isReadMore;
1359
+ }
1360
+ removeNotification(notification) {
1361
+ this.notificationService.remove(notification);
1362
+ }
1363
+ listChangeSubscribe() {
1364
+ this.listSubscription = this.notificationService.listChange
1365
+ .subscribe((list) => {
1366
+ this.list = list;
1367
+ this.ref.detectChanges();
1368
+ });
1369
+ }
1370
+ }
1371
+ NotificationsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationsComponent, deps: [{ token: NotificationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1372
+ NotificationsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: NotificationsComponent, selector: "app-notification", ngImport: i0, template: "<!--\r\n\r\n<div class=\"notification-block\" role=\"alert\" aria-live=\"assertive\">\r\n <div class=\"notification\"\r\n *ngFor=\"let notification of list\"\r\n [ngClass]=\"{'error': notification.isError(), 'success': notification.isSuccess()}\">\r\n\r\n <div class=\"flex-box\">\r\n <div class=\"notification-icons-block\">\r\n <i *ngIf=\"notification.isError()\" class=\"fa fa-exclamation-triangle\"></i>\r\n <i *ngIf=\"notification.isWarning()\" class=\"fa fa-hand-paper-o\"></i>\r\n <i *ngIf=\"notification.isSuccess()\" class=\"fa fa-check\"></i>\r\n <i *ngIf=\"notification.isInfo()\" class=\"fa fa-info-circle\"></i>\r\n </div>\r\n <div *ngIf=\"!isReadMore\" class=\"message-block\">\r\n {{notification.message | truncate:[93]}}\r\n </div>\r\n <div *ngIf=\"isReadMore\" class=\"message-block\">\r\n {{notification.message}}\r\n </div>\r\n </div>\r\n <div class=\"read-more-error link clickable\" *ngIf=\"notification.message && notification.message.length > 93\"\r\n (click)=\"readMore()\">{{(isReadMore ? 'BUTTON.COLLAPSE' : 'BUTTON.READ_MORE') | translate}}</div>\r\n <button\r\n class=\"close\"\r\n mat-icon-button\r\n matTooltip=\"{{'BUTTON.CLOSE' | translate}} {{'NOTIFICATION_MSG.' + notification.type | translate}} {{'NOTIFICATION_MSG.NOTI' | translate}}\"\r\n (click)=\"removeNotification(notification)\">\r\n <img class=\"notification-icon-close\" src=\"assets/icons/close_icon_modal.svg\" alt=\"\">\r\n </button>\r\n </div>\r\n</div>\r\n-->\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.notification-block{right:0;top:110px;position:absolute;width:20%;z-index:100}.notification-block .read-more-error{margin:10px 13px 3px 0;text-align:right}.notification-block .notification{padding:15px 0 10px;margin-bottom:18px;color:#333;border-radius:3px;border-top:1.5px solid #e5e1cd;background:#fcf8e3;box-shadow:0 8px 12px #091e4226,0 0 1px #091e424f;width:368px;position:relative}.notification-block .notification .notification-icons-block{text-align:center;width:56px}.notification-block .notification .message-block{font-size:14px;font-family:Poppins,Poppins,sans-serif!important;word-break:break-word;width:270px}.notification-block .notification .notification-icon-close{height:24px}.notification-block .notification.error{background:#FFE9E9;border-top:1.5px solid #E16D6D}.notification-block .notification.success{background:#e3f4dc;border-top:1.5px solid #b3d692}.notification-block .notification .fa-exclamation-triangle{color:#e16d6d!important}.notification-block .notification .fa-check{color:#a0c37f!important}.notification-block .notification .fa-info-circle,.notification-block .notification .fa-hand-paper-o{color:#bdb89e!important}.notification-block .notification .fa{font-size:20px}.notification-block .notification .close{position:absolute;top:2px;right:-5px}.notification-block .notification .close .fa{font-size:14px}.notification-block .notification .fa{margin:0;color:inherit}@media screen and (max-width: 600px){.notification-block{width:50%;min-width:150px}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1373
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationsComponent, decorators: [{
1374
+ type: Component,
1375
+ args: [{ selector: 'app-notification', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\r\n\r\n<div class=\"notification-block\" role=\"alert\" aria-live=\"assertive\">\r\n <div class=\"notification\"\r\n *ngFor=\"let notification of list\"\r\n [ngClass]=\"{'error': notification.isError(), 'success': notification.isSuccess()}\">\r\n\r\n <div class=\"flex-box\">\r\n <div class=\"notification-icons-block\">\r\n <i *ngIf=\"notification.isError()\" class=\"fa fa-exclamation-triangle\"></i>\r\n <i *ngIf=\"notification.isWarning()\" class=\"fa fa-hand-paper-o\"></i>\r\n <i *ngIf=\"notification.isSuccess()\" class=\"fa fa-check\"></i>\r\n <i *ngIf=\"notification.isInfo()\" class=\"fa fa-info-circle\"></i>\r\n </div>\r\n <div *ngIf=\"!isReadMore\" class=\"message-block\">\r\n {{notification.message | truncate:[93]}}\r\n </div>\r\n <div *ngIf=\"isReadMore\" class=\"message-block\">\r\n {{notification.message}}\r\n </div>\r\n </div>\r\n <div class=\"read-more-error link clickable\" *ngIf=\"notification.message && notification.message.length > 93\"\r\n (click)=\"readMore()\">{{(isReadMore ? 'BUTTON.COLLAPSE' : 'BUTTON.READ_MORE') | translate}}</div>\r\n <button\r\n class=\"close\"\r\n mat-icon-button\r\n matTooltip=\"{{'BUTTON.CLOSE' | translate}} {{'NOTIFICATION_MSG.' + notification.type | translate}} {{'NOTIFICATION_MSG.NOTI' | translate}}\"\r\n (click)=\"removeNotification(notification)\">\r\n <img class=\"notification-icon-close\" src=\"assets/icons/close_icon_modal.svg\" alt=\"\">\r\n </button>\r\n </div>\r\n</div>\r\n-->\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.notification-block{right:0;top:110px;position:absolute;width:20%;z-index:100}.notification-block .read-more-error{margin:10px 13px 3px 0;text-align:right}.notification-block .notification{padding:15px 0 10px;margin-bottom:18px;color:#333;border-radius:3px;border-top:1.5px solid #e5e1cd;background:#fcf8e3;box-shadow:0 8px 12px #091e4226,0 0 1px #091e424f;width:368px;position:relative}.notification-block .notification .notification-icons-block{text-align:center;width:56px}.notification-block .notification .message-block{font-size:14px;font-family:Poppins,Poppins,sans-serif!important;word-break:break-word;width:270px}.notification-block .notification .notification-icon-close{height:24px}.notification-block .notification.error{background:#FFE9E9;border-top:1.5px solid #E16D6D}.notification-block .notification.success{background:#e3f4dc;border-top:1.5px solid #b3d692}.notification-block .notification .fa-exclamation-triangle{color:#e16d6d!important}.notification-block .notification .fa-check{color:#a0c37f!important}.notification-block .notification .fa-info-circle,.notification-block .notification .fa-hand-paper-o{color:#bdb89e!important}.notification-block .notification .fa{font-size:20px}.notification-block .notification .close{position:absolute;top:2px;right:-5px}.notification-block .notification .close .fa{font-size:14px}.notification-block .notification .fa{margin:0;color:inherit}@media screen and (max-width: 600px){.notification-block{width:50%;min-width:150px}}\n"] }]
1376
1376
  }], ctorParameters: function () { return [{ type: NotificationService }, { type: i0.ChangeDetectorRef }]; } });
1377
1377
 
1378
- class ListUser {
1379
- constructor(user) {
1380
- this.devices = [];
1381
- this.deviceProfiles = [];
1382
- if (user) {
1383
- Object.assign(this, user);
1384
- }
1385
- }
1378
+ class ListUser {
1379
+ constructor(user) {
1380
+ this.devices = [];
1381
+ this.deviceProfiles = [];
1382
+ if (user) {
1383
+ Object.assign(this, user);
1384
+ }
1385
+ }
1386
1386
  }
1387
1387
 
1388
- let RemoveKynFromIBMService$1 = class RemoveKynFromIBMService {
1389
- constructor() {
1390
- }
1391
- removeCUCMS(date, customerId) {
1392
- if (customerId === 8) {
1393
- return date.filter((val) => !CUCMS_TO_IGNORE.includes(Math.round(val.cucmId)));
1394
- }
1395
- return date;
1396
- }
1397
- removeCUCS(date, customerId) {
1398
- if (customerId === 8) {
1399
- return date.filter((val) => !CUCS_TO_IGNORE.includes(Math.round(val.cucId)));
1400
- }
1401
- return date;
1402
- }
1403
- };
1404
- RemoveKynFromIBMService$1.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService$1, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1405
- RemoveKynFromIBMService$1.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService$1 });
1406
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService$1, decorators: [{
1407
- type: Injectable
1388
+ let RemoveKynFromIBMService$1 = class RemoveKynFromIBMService {
1389
+ constructor() {
1390
+ }
1391
+ removeCUCMS(date, customerId) {
1392
+ if (customerId === 8) {
1393
+ return date.filter((val) => !CUCMS_TO_IGNORE.includes(Math.round(val.cucmId)));
1394
+ }
1395
+ return date;
1396
+ }
1397
+ removeCUCS(date, customerId) {
1398
+ if (customerId === 8) {
1399
+ return date.filter((val) => !CUCS_TO_IGNORE.includes(Math.round(val.cucId)));
1400
+ }
1401
+ return date;
1402
+ }
1403
+ };
1404
+ RemoveKynFromIBMService$1.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService$1, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1405
+ RemoveKynFromIBMService$1.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService$1 });
1406
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService$1, decorators: [{
1407
+ type: Injectable
1408
1408
  }], ctorParameters: function () { return []; } });
1409
1409
 
1410
- class UsersSearchService {
1411
- constructor(apiService, removeKynFromIBMService) {
1412
- this.apiService = apiService;
1413
- this.removeKynFromIBMService = removeKynFromIBMService;
1414
- this.siteId = -1;
1415
- this.userId = '';
1416
- this.userIdExistPending = false;
1417
- this.hasExistedUserId = false;
1418
- this.pageSize = PAGINATION_DEFAULTS.SIZE;
1419
- this.pageIndex = PAGINATION_DEFAULTS.SIZE;
1420
- this.pageSizeOptions = PAGINATION_SIZE_OPTIONS;
1421
- this.foundUsers$ = new BehaviorSubject(null);
1422
- }
1423
- getPagination() {
1424
- return {
1425
- total: this.total,
1426
- pageSizeOptions: this.pageSizeOptions,
1427
- pageSize: this.pageSize,
1428
- pageIndex: this.pageIndex
1429
- };
1430
- }
1431
- quickRegularUsersSearch() {
1432
- this.searchParams = this.searchParams || { customerid: this.customerId };
1433
- return this.apiService.fetchPagination(API.QUICK_USERS_SEARCH, this.pageSize, this.pageIndex, this.searchParams)
1434
- .pipe(map((res) => {
1435
- this.total = res.total;
1436
- // this.totals = this.totals || {};
1437
- // this.totals['users'] = res.total;
1438
- const users = res.pageData && res.pageData.length ? res.pageData.map(user => new ListUser(user)) : [];
1439
- // this.foundUsers$.next(this.removeKynFromIBMService.removeCUCMS(users, this.customerId));
1440
- this.foundUsers$.next(users);
1441
- }));
1442
- // .pipe(this.handleError(true));
1443
- }
1444
- }
1445
- UsersSearchService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersSearchService, deps: [{ token: APIService }, { token: RemoveKynFromIBMService$1 }], target: i0.ɵɵFactoryTarget.Injectable });
1446
- UsersSearchService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersSearchService });
1447
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersSearchService, decorators: [{
1448
- type: Injectable
1410
+ class UsersSearchService {
1411
+ constructor(apiService, removeKynFromIBMService) {
1412
+ this.apiService = apiService;
1413
+ this.removeKynFromIBMService = removeKynFromIBMService;
1414
+ this.siteId = -1;
1415
+ this.userId = '';
1416
+ this.userIdExistPending = false;
1417
+ this.hasExistedUserId = false;
1418
+ this.pageSize = PAGINATION_DEFAULTS.SIZE;
1419
+ this.pageIndex = PAGINATION_DEFAULTS.SIZE;
1420
+ this.pageSizeOptions = PAGINATION_SIZE_OPTIONS;
1421
+ this.foundUsers$ = new BehaviorSubject(null);
1422
+ }
1423
+ getPagination() {
1424
+ return {
1425
+ total: this.total,
1426
+ pageSizeOptions: this.pageSizeOptions,
1427
+ pageSize: this.pageSize,
1428
+ pageIndex: this.pageIndex
1429
+ };
1430
+ }
1431
+ quickRegularUsersSearch() {
1432
+ this.searchParams = this.searchParams || { customerid: this.customerId };
1433
+ return this.apiService.fetchPagination(API.QUICK_USERS_SEARCH, this.pageSize, this.pageIndex, this.searchParams)
1434
+ .pipe(map((res) => {
1435
+ this.total = res.total;
1436
+ // this.totals = this.totals || {};
1437
+ // this.totals['users'] = res.total;
1438
+ const users = res.pageData && res.pageData.length ? res.pageData.map(user => new ListUser(user)) : [];
1439
+ // this.foundUsers$.next(this.removeKynFromIBMService.removeCUCMS(users, this.customerId));
1440
+ this.foundUsers$.next(users);
1441
+ }));
1442
+ // .pipe(this.handleError(true));
1443
+ }
1444
+ }
1445
+ UsersSearchService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersSearchService, deps: [{ token: APIService }, { token: RemoveKynFromIBMService$1 }], target: i0.ɵɵFactoryTarget.Injectable });
1446
+ UsersSearchService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersSearchService });
1447
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersSearchService, decorators: [{
1448
+ type: Injectable
1449
1449
  }], ctorParameters: function () { return [{ type: APIService }, { type: RemoveKynFromIBMService$1 }]; } });
1450
1450
 
1451
- class PaginationComponent {
1452
- constructor() {
1453
- this.pageEmitter = new EventEmitter();
1454
- this.pageNumberChangeEmitter = new EventEmitter();
1455
- this.pageSizeOptions = PAGINATION_SIZE_OPTIONS;
1456
- }
1457
- ngOnInit() {
1458
- }
1459
- pageEvent(event) {
1460
- this.pageEmitter.emit(event);
1461
- }
1462
- changePerPageNumber(event) {
1463
- this.pageNumberChangeEmitter.emit(event.value);
1464
- }
1465
- }
1466
- PaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1467
- PaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PaginationComponent, selector: "app-pagination", inputs: { pagination: "pagination", showPageSizeOptions: "showPageSizeOptions", showRefreshButton: "showRefreshButton", lengthPending: "lengthPending" }, outputs: { pageEmitter: "pageEmitter", pageNumberChangeEmitter: "pageNumberChangeEmitter" }, ngImport: i0, template: "<div class=\"flex-box pagination\">\n <div class=\"page-indexes-box\">\n <mat-paginator\n [id]=\"'commonPagination'\"\n [hidePageSize]=\"true\"\n [length]=\"pagination.total\"\n [pageIndex]=\"pagination.pageIndex\"\n [pageSize]=\"pagination.pageSize\"\n [pageSizeOptions]=\"pagination.pageSizeOptions\"\n (page)=\"pageEvent($event)\">\n </mat-paginator>\n <mat-spinner class=\"length-spinner\" [diameter]=\"20\" mode=\"indeterminate\" *ngIf=\"lengthPending\">\n </mat-spinner>\n </div>\n\n <div class=\"flex-box per-page-block\" *ngIf=\"showPageSizeOptions\">\n <div class=\"item_per_page\">Items per page:</div>\n <div class=\"select-box select-page-size\">\n <mat-select [(ngModel)]=\"pagination.pageSize\" (selectionChange)=\"changePerPageNumber($event)\" #page\n [id]=\"'commonPaginationSelect'\">\n <mat-option *ngFor=\"let option of pageSizeOptions; let i = index;\" [id]=\"'paginationSelectOpt_' + i\" [value]=\"option\">{{option}}</mat-option>\n </mat-select>\n </div>\n\n </div>\n</div>\n", styles: [".search-header-refresh-icon{align-items:center;line-height:54px;margin-left:10px}button[mat-icon-button] i{font-size:18px}mat-spinner.length-spinner{position:absolute;right:120px}h3,.search-header-refresh-icon{float:left}.page-options,.mat-paginator{float:right}.per-page-block mat-form-field{width:70px!important}.per-page-block span{margin-right:20px}.pagination{display:flex;justify-content:flex-end}.select-page-size{width:60px;margin:0 0 0 15px;padding:0 10px}.item_per_page{line-height:35px}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i8.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }] });
1468
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PaginationComponent, decorators: [{
1469
- type: Component,
1470
- 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"] }]
1471
- }], ctorParameters: function () { return []; }, propDecorators: { pagination: [{
1472
- type: Input
1473
- }], showPageSizeOptions: [{
1474
- type: Input
1475
- }], showRefreshButton: [{
1476
- type: Input
1477
- }], lengthPending: [{
1478
- type: Input
1479
- }], pageEmitter: [{
1480
- type: Output
1481
- }], pageNumberChangeEmitter: [{
1482
- type: Output
1451
+ class PaginationComponent {
1452
+ constructor() {
1453
+ this.pageEmitter = new EventEmitter();
1454
+ this.pageNumberChangeEmitter = new EventEmitter();
1455
+ this.pageSizeOptions = PAGINATION_SIZE_OPTIONS;
1456
+ }
1457
+ ngOnInit() {
1458
+ }
1459
+ pageEvent(event) {
1460
+ this.pageEmitter.emit(event);
1461
+ }
1462
+ changePerPageNumber(event) {
1463
+ this.pageNumberChangeEmitter.emit(event.value);
1464
+ }
1465
+ }
1466
+ PaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1467
+ 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\">\r\n <div class=\"page-indexes-box\">\r\n <mat-paginator\r\n [id]=\"'commonPagination'\"\r\n [hidePageSize]=\"true\"\r\n [length]=\"pagination.total\"\r\n [pageIndex]=\"pagination.pageIndex\"\r\n [pageSize]=\"pagination.pageSize\"\r\n [pageSizeOptions]=\"pagination.pageSizeOptions\"\r\n (page)=\"pageEvent($event)\">\r\n </mat-paginator>\r\n <mat-spinner class=\"length-spinner\" [diameter]=\"20\" mode=\"indeterminate\" *ngIf=\"lengthPending\">\r\n </mat-spinner>\r\n </div>\r\n\r\n <div class=\"flex-box per-page-block\" *ngIf=\"showPageSizeOptions\">\r\n <div class=\"item_per_page\">Items per page:</div>\r\n <div class=\"select-box select-page-size\">\r\n <mat-select [(ngModel)]=\"pagination.pageSize\" (selectionChange)=\"changePerPageNumber($event)\" #page\r\n [id]=\"'commonPaginationSelect'\">\r\n <mat-option *ngFor=\"let option of pageSizeOptions; let i = index;\" [id]=\"'paginationSelectOpt_' + i\" [value]=\"option\">{{option}}</mat-option>\r\n </mat-select>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n", styles: [".search-header-refresh-icon{align-items:center;line-height:54px;margin-left:10px}button[mat-icon-button] i{font-size:18px}mat-spinner.length-spinner{position:absolute;right:120px}h3,.search-header-refresh-icon{float:left}.page-options,.mat-paginator{float:right}.per-page-block mat-form-field{width:70px!important}.per-page-block span{margin-right:20px}.pagination{display:flex;justify-content:flex-end}.select-page-size{width:60px;margin:0 0 0 15px;padding:0 10px}.item_per_page{line-height:35px}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i8.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }] });
1468
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PaginationComponent, decorators: [{
1469
+ type: Component,
1470
+ args: [{ selector: 'app-pagination', template: "<div class=\"flex-box pagination\">\r\n <div class=\"page-indexes-box\">\r\n <mat-paginator\r\n [id]=\"'commonPagination'\"\r\n [hidePageSize]=\"true\"\r\n [length]=\"pagination.total\"\r\n [pageIndex]=\"pagination.pageIndex\"\r\n [pageSize]=\"pagination.pageSize\"\r\n [pageSizeOptions]=\"pagination.pageSizeOptions\"\r\n (page)=\"pageEvent($event)\">\r\n </mat-paginator>\r\n <mat-spinner class=\"length-spinner\" [diameter]=\"20\" mode=\"indeterminate\" *ngIf=\"lengthPending\">\r\n </mat-spinner>\r\n </div>\r\n\r\n <div class=\"flex-box per-page-block\" *ngIf=\"showPageSizeOptions\">\r\n <div class=\"item_per_page\">Items per page:</div>\r\n <div class=\"select-box select-page-size\">\r\n <mat-select [(ngModel)]=\"pagination.pageSize\" (selectionChange)=\"changePerPageNumber($event)\" #page\r\n [id]=\"'commonPaginationSelect'\">\r\n <mat-option *ngFor=\"let option of pageSizeOptions; let i = index;\" [id]=\"'paginationSelectOpt_' + i\" [value]=\"option\">{{option}}</mat-option>\r\n </mat-select>\r\n </div>\r\n\r\n </div>\r\n</div>\r\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"] }]
1471
+ }], ctorParameters: function () { return []; }, propDecorators: { pagination: [{
1472
+ type: Input
1473
+ }], showPageSizeOptions: [{
1474
+ type: Input
1475
+ }], showRefreshButton: [{
1476
+ type: Input
1477
+ }], lengthPending: [{
1478
+ type: Input
1479
+ }], pageEmitter: [{
1480
+ type: Output
1481
+ }], pageNumberChangeEmitter: [{
1482
+ type: Output
1483
1483
  }] } });
1484
1484
 
1485
- class RemoveKynFromIBMService {
1486
- constructor() {
1487
- }
1488
- removeCUCMS(date, customerId) {
1489
- if (customerId === 8) {
1490
- return date.filter((val) => !CUCMS_TO_IGNORE.includes(Math.round(val.cucmId)));
1491
- }
1492
- return date;
1493
- }
1494
- removeCUCS(date, customerId) {
1495
- if (customerId === 8) {
1496
- return date.filter((val) => !CUCS_TO_IGNORE.includes(Math.round(val.cucId)));
1497
- }
1498
- return date;
1499
- }
1500
- }
1501
- RemoveKynFromIBMService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1502
- RemoveKynFromIBMService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService });
1503
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService, decorators: [{
1504
- type: Injectable
1485
+ class RemoveKynFromIBMService {
1486
+ constructor() {
1487
+ }
1488
+ removeCUCMS(date, customerId) {
1489
+ if (customerId === 8) {
1490
+ return date.filter((val) => !CUCMS_TO_IGNORE.includes(Math.round(val.cucmId)));
1491
+ }
1492
+ return date;
1493
+ }
1494
+ removeCUCS(date, customerId) {
1495
+ if (customerId === 8) {
1496
+ return date.filter((val) => !CUCS_TO_IGNORE.includes(Math.round(val.cucId)));
1497
+ }
1498
+ return date;
1499
+ }
1500
+ }
1501
+ RemoveKynFromIBMService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1502
+ RemoveKynFromIBMService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService });
1503
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService, decorators: [{
1504
+ type: Injectable
1505
1505
  }], ctorParameters: function () { return []; } });
1506
1506
 
1507
- class LazyLoadingSelectComponent {
1508
- get formControl() {
1509
- return this.form?.get(this.controlName);
1510
- }
1511
- constructor(notificationService, siteSettingsService) {
1512
- this.notificationService = notificationService;
1513
- this.siteSettingsService = siteSettingsService;
1514
- this.standalone = true;
1515
- this.appearance = 'standard';
1516
- this.changeField = new EventEmitter();
1517
- }
1518
- ngAfterContentInit() {
1519
- this.options = [this.form?.get(this.controlName)?.value];
1520
- }
1521
- getOptions() {
1522
- if (!this.siteId && this.options.length > 1) {
1523
- return;
1524
- }
1525
- this.optionsPending = true;
1526
- this.siteSettingsService.getSelectionOptions(this.siteId, this.optionsToken)
1527
- .subscribe(() => {
1528
- this.optionsPending = false;
1529
- // @ts-ignore
1530
- this.options = this.siteSettingsService[this.optionsToken];
1531
- }, () => {
1532
- this.optionsPending = false;
1533
- // this.notificationService.error(this.translate.instant('COMMON.LOAD_SELECT_OPTIONS_FAILED'));
1534
- });
1535
- }
1536
- onFieldChange(token) {
1537
- this.changeField.emit(token);
1538
- }
1539
- }
1540
- LazyLoadingSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LazyLoadingSelectComponent, deps: [{ token: NotificationService }, { token: SiteSettingsService }], target: i0.ɵɵFactoryTarget.Component });
1541
- LazyLoadingSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: LazyLoadingSelectComponent, selector: "app-lazy-loading-select", inputs: { siteId: "siteId", form: "form", standalone: "standalone", placeholder: "placeholder", controlName: "controlName", optionsToken: "optionsToken", appearance: "appearance", errorCode: "errorCode", errorText: "errorText", default: "default", id: "id" }, outputs: { changeField: "changeField" }, ngImport: i0, template: "<ng-container *ngIf=\"standalone\">\n <mat-form-field appearance=\"outline\">\n <mat-select [formControl]=\"formControl\"\n (openedChange)=\"getOptions()\"\n [placeholder]=\"placeholder\"\n (selectionChange)=\"onFieldChange(controlName)\"\n [id]=\"id\">\n <mat-option *ngIf=\"default\" [disabled]=\"default.disabled\" [value]=\"default.key\">{{default.value}}</mat-option>\n <mat-option *ngFor=\"let type of options\" [value]=\"type\">\n {{type}}\n </mat-option>\n <mat-progress-spinner class=\"field-spinner\"\n [diameter]=\"20\"\n mode=\"indeterminate\"\n *ngIf=\"optionsPending\"></mat-progress-spinner>\n </mat-select>\n <mat-error *ngIf=\"form.get(controlName)?.hasError(errorCode)\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n {{errorText}}\n </mat-error>\n </mat-form-field>\n</ng-container>\n\n<!--\nThis duplication is caused by the following bug: https://github.com/angular/components/issues/9411\nWhich doesn't allow projection in mat-form-field\n-->\n\n<ng-container *ngIf=\"!standalone\">\n <mat-select *ngIf=\"form.get(controlName)\"\n [formControl]=\"formControl\"\n (openedChange)=\"getOptions()\"\n [placeholder]=\"placeholder\"\n (selectionChange)=\"onFieldChange(controlName)\"\n [id]=\"id\"\n >\n <mat-option *ngIf=\"default\" [disabled]=\"default.disabled\" [value]=\"default.key\">{{default.value}}</mat-option>\n <mat-option *ngFor=\"let type of options\" [value]=\"type\">\n {{type}}\n </mat-option>\n <mat-progress-spinner class=\"field-spinner\"\n [diameter]=\"20\"\n mode=\"indeterminate\"\n *ngIf=\"optionsPending\"></mat-progress-spinner>\n </mat-select>\n <mat-error *ngIf=\"form.get(controlName)?.hasError(errorCode)\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n {{errorText}}\n </mat-error>\n</ng-container>\n", styles: [".field-spinner{margin-top:-30px}mat-form-field{width:300px;max-width:300px}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: i6$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i8.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }] });
1542
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LazyLoadingSelectComponent, decorators: [{
1543
- type: Component,
1544
- args: [{ selector: 'app-lazy-loading-select', template: "<ng-container *ngIf=\"standalone\">\n <mat-form-field appearance=\"outline\">\n <mat-select [formControl]=\"formControl\"\n (openedChange)=\"getOptions()\"\n [placeholder]=\"placeholder\"\n (selectionChange)=\"onFieldChange(controlName)\"\n [id]=\"id\">\n <mat-option *ngIf=\"default\" [disabled]=\"default.disabled\" [value]=\"default.key\">{{default.value}}</mat-option>\n <mat-option *ngFor=\"let type of options\" [value]=\"type\">\n {{type}}\n </mat-option>\n <mat-progress-spinner class=\"field-spinner\"\n [diameter]=\"20\"\n mode=\"indeterminate\"\n *ngIf=\"optionsPending\"></mat-progress-spinner>\n </mat-select>\n <mat-error *ngIf=\"form.get(controlName)?.hasError(errorCode)\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n {{errorText}}\n </mat-error>\n </mat-form-field>\n</ng-container>\n\n<!--\nThis duplication is caused by the following bug: https://github.com/angular/components/issues/9411\nWhich doesn't allow projection in mat-form-field\n-->\n\n<ng-container *ngIf=\"!standalone\">\n <mat-select *ngIf=\"form.get(controlName)\"\n [formControl]=\"formControl\"\n (openedChange)=\"getOptions()\"\n [placeholder]=\"placeholder\"\n (selectionChange)=\"onFieldChange(controlName)\"\n [id]=\"id\"\n >\n <mat-option *ngIf=\"default\" [disabled]=\"default.disabled\" [value]=\"default.key\">{{default.value}}</mat-option>\n <mat-option *ngFor=\"let type of options\" [value]=\"type\">\n {{type}}\n </mat-option>\n <mat-progress-spinner class=\"field-spinner\"\n [diameter]=\"20\"\n mode=\"indeterminate\"\n *ngIf=\"optionsPending\"></mat-progress-spinner>\n </mat-select>\n <mat-error *ngIf=\"form.get(controlName)?.hasError(errorCode)\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n {{errorText}}\n </mat-error>\n</ng-container>\n", styles: [".field-spinner{margin-top:-30px}mat-form-field{width:300px;max-width:300px}\n"] }]
1545
- }], ctorParameters: function () { return [{ type: NotificationService }, { type: SiteSettingsService }]; }, propDecorators: { siteId: [{
1546
- type: Input
1547
- }], form: [{
1548
- type: Input
1549
- }], standalone: [{
1550
- type: Input
1551
- }], placeholder: [{
1552
- type: Input
1553
- }], controlName: [{
1554
- type: Input
1555
- }], optionsToken: [{
1556
- type: Input
1557
- }], appearance: [{
1558
- type: Input
1559
- }], errorCode: [{
1560
- type: Input
1561
- }], errorText: [{
1562
- type: Input
1563
- }], default: [{
1564
- type: Input
1565
- }], id: [{
1566
- type: Input
1567
- }], changeField: [{
1568
- type: Output
1507
+ class LazyLoadingSelectComponent {
1508
+ get formControl() {
1509
+ return this.form?.get(this.controlName);
1510
+ }
1511
+ constructor(notificationService, siteSettingsService) {
1512
+ this.notificationService = notificationService;
1513
+ this.siteSettingsService = siteSettingsService;
1514
+ this.standalone = true;
1515
+ this.appearance = 'standard';
1516
+ this.changeField = new EventEmitter();
1517
+ }
1518
+ ngAfterContentInit() {
1519
+ this.options = [this.form?.get(this.controlName)?.value];
1520
+ }
1521
+ getOptions() {
1522
+ if (!this.siteId && this.options.length > 1) {
1523
+ return;
1524
+ }
1525
+ this.optionsPending = true;
1526
+ this.siteSettingsService.getSelectionOptions(this.siteId, this.optionsToken)
1527
+ .subscribe(() => {
1528
+ this.optionsPending = false;
1529
+ // @ts-ignore
1530
+ this.options = this.siteSettingsService[this.optionsToken];
1531
+ }, () => {
1532
+ this.optionsPending = false;
1533
+ // this.notificationService.error(this.translate.instant('COMMON.LOAD_SELECT_OPTIONS_FAILED'));
1534
+ });
1535
+ }
1536
+ onFieldChange(token) {
1537
+ this.changeField.emit(token);
1538
+ }
1539
+ }
1540
+ LazyLoadingSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LazyLoadingSelectComponent, deps: [{ token: NotificationService }, { token: SiteSettingsService }], target: i0.ɵɵFactoryTarget.Component });
1541
+ LazyLoadingSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: LazyLoadingSelectComponent, selector: "app-lazy-loading-select", inputs: { siteId: "siteId", form: "form", standalone: "standalone", placeholder: "placeholder", controlName: "controlName", optionsToken: "optionsToken", appearance: "appearance", errorCode: "errorCode", errorText: "errorText", default: "default", id: "id" }, outputs: { changeField: "changeField" }, ngImport: i0, template: "<ng-container *ngIf=\"standalone\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select [formControl]=\"formControl\"\r\n (openedChange)=\"getOptions()\"\r\n [placeholder]=\"placeholder\"\r\n (selectionChange)=\"onFieldChange(controlName)\"\r\n [id]=\"id\">\r\n <mat-option *ngIf=\"default\" [disabled]=\"default.disabled\" [value]=\"default.key\">{{default.value}}</mat-option>\r\n <mat-option *ngFor=\"let type of options\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n <mat-progress-spinner class=\"field-spinner\"\r\n [diameter]=\"20\"\r\n mode=\"indeterminate\"\r\n *ngIf=\"optionsPending\"></mat-progress-spinner>\r\n </mat-select>\r\n <mat-error *ngIf=\"form.get(controlName)?.hasError(errorCode)\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n {{errorText}}\r\n </mat-error>\r\n </mat-form-field>\r\n</ng-container>\r\n\r\n<!--\r\nThis duplication is caused by the following bug: https://github.com/angular/components/issues/9411\r\nWhich doesn't allow projection in mat-form-field\r\n-->\r\n\r\n<ng-container *ngIf=\"!standalone\">\r\n <mat-select *ngIf=\"form.get(controlName)\"\r\n [formControl]=\"formControl\"\r\n (openedChange)=\"getOptions()\"\r\n [placeholder]=\"placeholder\"\r\n (selectionChange)=\"onFieldChange(controlName)\"\r\n [id]=\"id\"\r\n >\r\n <mat-option *ngIf=\"default\" [disabled]=\"default.disabled\" [value]=\"default.key\">{{default.value}}</mat-option>\r\n <mat-option *ngFor=\"let type of options\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n <mat-progress-spinner class=\"field-spinner\"\r\n [diameter]=\"20\"\r\n mode=\"indeterminate\"\r\n *ngIf=\"optionsPending\"></mat-progress-spinner>\r\n </mat-select>\r\n <mat-error *ngIf=\"form.get(controlName)?.hasError(errorCode)\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n {{errorText}}\r\n </mat-error>\r\n</ng-container>\r\n", styles: [".field-spinner{margin-top:-30px}mat-form-field{width:300px;max-width:300px}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: i6$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i8.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }] });
1542
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LazyLoadingSelectComponent, decorators: [{
1543
+ type: Component,
1544
+ args: [{ selector: 'app-lazy-loading-select', template: "<ng-container *ngIf=\"standalone\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select [formControl]=\"formControl\"\r\n (openedChange)=\"getOptions()\"\r\n [placeholder]=\"placeholder\"\r\n (selectionChange)=\"onFieldChange(controlName)\"\r\n [id]=\"id\">\r\n <mat-option *ngIf=\"default\" [disabled]=\"default.disabled\" [value]=\"default.key\">{{default.value}}</mat-option>\r\n <mat-option *ngFor=\"let type of options\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n <mat-progress-spinner class=\"field-spinner\"\r\n [diameter]=\"20\"\r\n mode=\"indeterminate\"\r\n *ngIf=\"optionsPending\"></mat-progress-spinner>\r\n </mat-select>\r\n <mat-error *ngIf=\"form.get(controlName)?.hasError(errorCode)\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n {{errorText}}\r\n </mat-error>\r\n </mat-form-field>\r\n</ng-container>\r\n\r\n<!--\r\nThis duplication is caused by the following bug: https://github.com/angular/components/issues/9411\r\nWhich doesn't allow projection in mat-form-field\r\n-->\r\n\r\n<ng-container *ngIf=\"!standalone\">\r\n <mat-select *ngIf=\"form.get(controlName)\"\r\n [formControl]=\"formControl\"\r\n (openedChange)=\"getOptions()\"\r\n [placeholder]=\"placeholder\"\r\n (selectionChange)=\"onFieldChange(controlName)\"\r\n [id]=\"id\"\r\n >\r\n <mat-option *ngIf=\"default\" [disabled]=\"default.disabled\" [value]=\"default.key\">{{default.value}}</mat-option>\r\n <mat-option *ngFor=\"let type of options\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n <mat-progress-spinner class=\"field-spinner\"\r\n [diameter]=\"20\"\r\n mode=\"indeterminate\"\r\n *ngIf=\"optionsPending\"></mat-progress-spinner>\r\n </mat-select>\r\n <mat-error *ngIf=\"form.get(controlName)?.hasError(errorCode)\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n {{errorText}}\r\n </mat-error>\r\n</ng-container>\r\n", styles: [".field-spinner{margin-top:-30px}mat-form-field{width:300px;max-width:300px}\n"] }]
1545
+ }], ctorParameters: function () { return [{ type: NotificationService }, { type: SiteSettingsService }]; }, propDecorators: { siteId: [{
1546
+ type: Input
1547
+ }], form: [{
1548
+ type: Input
1549
+ }], standalone: [{
1550
+ type: Input
1551
+ }], placeholder: [{
1552
+ type: Input
1553
+ }], controlName: [{
1554
+ type: Input
1555
+ }], optionsToken: [{
1556
+ type: Input
1557
+ }], appearance: [{
1558
+ type: Input
1559
+ }], errorCode: [{
1560
+ type: Input
1561
+ }], errorText: [{
1562
+ type: Input
1563
+ }], default: [{
1564
+ type: Input
1565
+ }], id: [{
1566
+ type: Input
1567
+ }], changeField: [{
1568
+ type: Output
1569
1569
  }] } });
1570
1570
 
1571
- var EntityChangeType;
1572
- (function (EntityChangeType) {
1573
- EntityChangeType["added"] = "added";
1574
- EntityChangeType["updated"] = "updated";
1575
- EntityChangeType["existing"] = "existing";
1576
- EntityChangeType["removed"] = "removed";
1577
- EntityChangeType["unassociated"] = "unassociated";
1578
- })(EntityChangeType || (EntityChangeType = {}));
1579
- var DnRangeType;
1580
- (function (DnRangeType) {
1581
- DnRangeType["extension"] = "EXTENSION";
1582
- DnRangeType["cpg"] = "CPG";
1583
- DnRangeType["callpark"] = "CALLPARK";
1584
- DnRangeType["huntgroup"] = "HUNTGROUP";
1585
- DnRangeType["meetme"] = "MEETME";
1586
- DnRangeType["did"] = "DID";
1571
+ var EntityChangeType;
1572
+ (function (EntityChangeType) {
1573
+ EntityChangeType["added"] = "added";
1574
+ EntityChangeType["updated"] = "updated";
1575
+ EntityChangeType["existing"] = "existing";
1576
+ EntityChangeType["removed"] = "removed";
1577
+ EntityChangeType["unassociated"] = "unassociated";
1578
+ })(EntityChangeType || (EntityChangeType = {}));
1579
+ var DnRangeType;
1580
+ (function (DnRangeType) {
1581
+ DnRangeType["extension"] = "EXTENSION";
1582
+ DnRangeType["cpg"] = "CPG";
1583
+ DnRangeType["callpark"] = "CALLPARK";
1584
+ DnRangeType["huntgroup"] = "HUNTGROUP";
1585
+ DnRangeType["meetme"] = "MEETME";
1586
+ DnRangeType["did"] = "DID";
1587
1587
  })(DnRangeType || (DnRangeType = {}));
1588
1588
 
1589
- // import * as Big from 'big.js';
1590
- class DnsService {
1591
- constructor(apiService) {
1592
- this.apiService = apiService;
1593
- this.availableNumbers = {};
1594
- }
1595
- getNumberRange(siteId, routePartition, withdids, from, pageSize) {
1596
- // @ts-ignore
1597
- if (this.availableNumbers[routePartition] && this.availableNumbers[routePartition].length) {
1598
- return new Observable(observer => {
1599
- // @ts-ignore
1600
- observer.next(this.availableNumbers[routePartition]);
1601
- });
1602
- }
1603
- this.availableDidPatternsMappedToDn = {};
1604
- pageSize = pageSize ? pageSize : 20;
1605
- const params = { dntype: DnRangeType.extension, routepartition: routePartition, size: pageSize, page: 0 };
1606
- if (withdids) {
1607
- // @ts-ignore
1608
- params['withdids'] = 'true';
1609
- }
1610
- if (from) {
1611
- // @ts-ignore
1612
- params['from'] = from;
1613
- }
1614
- // @ts-ignore
1615
- this.availableNumbers[routePartition] = this.availableNumbers[routePartition] || [];
1616
- return this.apiService.fetch(API.AVAILABLE_DN_IN_RANGES.replace(':siteId', siteId), params)
1617
- .pipe(map((res) => {
1618
- res.availableNumberList.forEach((availableNumber) => {
1619
- this.setAvailableDidMappedToDn(availableNumber);
1620
- // @ts-ignore
1621
- this.availableNumbers[routePartition] = [...this.availableNumbers[routePartition], ...this.getUnwrapNumberRange(availableNumber)];
1622
- });
1623
- }));
1624
- // .pipe(this.handleError(true, false));
1625
- }
1626
- setAvailableDidMappedToDn(availableNumber) {
1627
- if (availableNumber.unUsedNumbersWithDids && availableNumber.unUsedNumbersWithDids.length) {
1628
- availableNumber.unUsedNumbersWithDids.forEach((numberWithDids) => {
1629
- const dn = numberWithDids['unUsedNumber'];
1630
- this.availableDidPatternsMappedToDn[dn] = [{}];
1631
- if (numberWithDids['translationPatternList'] && numberWithDids['translationPatternList'].length > 0) {
1632
- this.availableDidPatternsMappedToDn[dn] = numberWithDids['translationPatternList'];
1633
- this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = [{}];
1634
- if (numberWithDids['mappedDids'] && numberWithDids['mappedDids'].length > 0) {
1635
- this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = numberWithDids['mappedDids'];
1636
- }
1637
- }
1638
- this.availableDidPatternsMappedToDn[dn][0]['vm'] = numberWithDids['vm'];
1639
- });
1640
- }
1641
- }
1642
- getUnwrapNumberRange(availableNumber) {
1643
- const unwrapNumberRangeArray = this.unwrapNumberRange(availableNumber.phoneNumberRange.from, availableNumber.phoneNumberRange.to);
1644
- if (unwrapNumberRangeArray?.length) {
1645
- let unwrapNumberRange = unwrapNumberRangeArray.map((unwrappedNumber) => {
1646
- const dn = availableNumber.phoneNumberRange.prefix + unwrappedNumber;
1647
- let str = dn;
1648
- if (this.availableDidPatternsMappedToDn[dn] && this.availableDidPatternsMappedToDn[dn].length > 0) {
1649
- if (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] && this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 0) {
1650
- str += ' DID: ' + (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 1 ? 'multiple' :
1651
- this.availableDidPatternsMappedToDn[dn][0]['mappedDids'][0]);
1652
- }
1653
- if (this.availableDidPatternsMappedToDn[dn][0]['vm']) {
1654
- str += ' In Use - VM';
1655
- }
1656
- }
1657
- return str;
1658
- });
1659
- unwrapNumberRange = unwrapNumberRange.filter((unwrappedNumber) => !availableNumber.usedNumbers.includes(unwrappedNumber));
1660
- return unwrapNumberRange;
1661
- }
1662
- else {
1663
- return [];
1664
- }
1665
- }
1666
- unwrapNumberRange(start, end) {
1667
- const regExp = /(^0+)/;
1668
- let leadingZeros = '';
1669
- const matches = start.match(regExp);
1670
- if (matches) {
1671
- leadingZeros = matches[1];
1672
- }
1673
- const startNumeric = new Big(start);
1674
- const endNumeric = new Big(end);
1675
- // @ts-ignore
1676
- return Array.from({ length: (endNumeric.minus(startNumeric).plus(new Big(1)).toFixed(0)) }, (v, k) => {
1677
- const number = String(startNumeric.plus(new Big(k)).toFixed(0));
1678
- if ((leadingZeros + number).length > start.length) {
1679
- leadingZeros = leadingZeros.substr(1);
1680
- }
1681
- return leadingZeros + number;
1682
- });
1683
- }
1684
- }
1685
- DnsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService, deps: [{ token: APIService }], target: i0.ɵɵFactoryTarget.Injectable });
1686
- DnsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService });
1687
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService, decorators: [{
1688
- type: Injectable
1589
+ // import * as Big from 'big.js';
1590
+ class DnsService {
1591
+ constructor(apiService) {
1592
+ this.apiService = apiService;
1593
+ this.availableNumbers = {};
1594
+ }
1595
+ getNumberRange(siteId, routePartition, withdids, from, pageSize) {
1596
+ // @ts-ignore
1597
+ if (this.availableNumbers[routePartition] && this.availableNumbers[routePartition].length) {
1598
+ return new Observable(observer => {
1599
+ // @ts-ignore
1600
+ observer.next(this.availableNumbers[routePartition]);
1601
+ });
1602
+ }
1603
+ this.availableDidPatternsMappedToDn = {};
1604
+ pageSize = pageSize ? pageSize : 20;
1605
+ const params = { dntype: DnRangeType.extension, routepartition: routePartition, size: pageSize, page: 0 };
1606
+ if (withdids) {
1607
+ // @ts-ignore
1608
+ params['withdids'] = 'true';
1609
+ }
1610
+ if (from) {
1611
+ // @ts-ignore
1612
+ params['from'] = from;
1613
+ }
1614
+ // @ts-ignore
1615
+ this.availableNumbers[routePartition] = this.availableNumbers[routePartition] || [];
1616
+ return this.apiService.fetch(API.AVAILABLE_DN_IN_RANGES.replace(':siteId', siteId), params)
1617
+ .pipe(map((res) => {
1618
+ res.availableNumberList.forEach((availableNumber) => {
1619
+ this.setAvailableDidMappedToDn(availableNumber);
1620
+ // @ts-ignore
1621
+ this.availableNumbers[routePartition] = [...this.availableNumbers[routePartition], ...this.getUnwrapNumberRange(availableNumber)];
1622
+ });
1623
+ }));
1624
+ // .pipe(this.handleError(true, false));
1625
+ }
1626
+ setAvailableDidMappedToDn(availableNumber) {
1627
+ if (availableNumber.unUsedNumbersWithDids && availableNumber.unUsedNumbersWithDids.length) {
1628
+ availableNumber.unUsedNumbersWithDids.forEach((numberWithDids) => {
1629
+ const dn = numberWithDids['unUsedNumber'];
1630
+ this.availableDidPatternsMappedToDn[dn] = [{}];
1631
+ if (numberWithDids['translationPatternList'] && numberWithDids['translationPatternList'].length > 0) {
1632
+ this.availableDidPatternsMappedToDn[dn] = numberWithDids['translationPatternList'];
1633
+ this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = [{}];
1634
+ if (numberWithDids['mappedDids'] && numberWithDids['mappedDids'].length > 0) {
1635
+ this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = numberWithDids['mappedDids'];
1636
+ }
1637
+ }
1638
+ this.availableDidPatternsMappedToDn[dn][0]['vm'] = numberWithDids['vm'];
1639
+ });
1640
+ }
1641
+ }
1642
+ getUnwrapNumberRange(availableNumber) {
1643
+ const unwrapNumberRangeArray = this.unwrapNumberRange(availableNumber.phoneNumberRange.from, availableNumber.phoneNumberRange.to);
1644
+ if (unwrapNumberRangeArray?.length) {
1645
+ let unwrapNumberRange = unwrapNumberRangeArray.map((unwrappedNumber) => {
1646
+ const dn = availableNumber.phoneNumberRange.prefix + unwrappedNumber;
1647
+ let str = dn;
1648
+ if (this.availableDidPatternsMappedToDn[dn] && this.availableDidPatternsMappedToDn[dn].length > 0) {
1649
+ if (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] && this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 0) {
1650
+ str += ' DID: ' + (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 1 ? 'multiple' :
1651
+ this.availableDidPatternsMappedToDn[dn][0]['mappedDids'][0]);
1652
+ }
1653
+ if (this.availableDidPatternsMappedToDn[dn][0]['vm']) {
1654
+ str += ' In Use - VM';
1655
+ }
1656
+ }
1657
+ return str;
1658
+ });
1659
+ unwrapNumberRange = unwrapNumberRange.filter((unwrappedNumber) => !availableNumber.usedNumbers.includes(unwrappedNumber));
1660
+ return unwrapNumberRange;
1661
+ }
1662
+ else {
1663
+ return [];
1664
+ }
1665
+ }
1666
+ unwrapNumberRange(start, end) {
1667
+ const regExp = /(^0+)/;
1668
+ let leadingZeros = '';
1669
+ const matches = start.match(regExp);
1670
+ if (matches) {
1671
+ leadingZeros = matches[1];
1672
+ }
1673
+ const startNumeric = new Big(start);
1674
+ const endNumeric = new Big(end);
1675
+ // @ts-ignore
1676
+ return Array.from({ length: (endNumeric.minus(startNumeric).plus(new Big(1)).toFixed(0)) }, (v, k) => {
1677
+ const number = String(startNumeric.plus(new Big(k)).toFixed(0));
1678
+ if ((leadingZeros + number).length > start.length) {
1679
+ leadingZeros = leadingZeros.substr(1);
1680
+ }
1681
+ return leadingZeros + number;
1682
+ });
1683
+ }
1684
+ }
1685
+ DnsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService, deps: [{ token: APIService }], target: i0.ɵɵFactoryTarget.Injectable });
1686
+ DnsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService });
1687
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService, decorators: [{
1688
+ type: Injectable
1689
1689
  }], ctorParameters: function () { return [{ type: APIService }]; } });
1690
1690
 
1691
- class UserCallingExtensionComponent {
1692
- get user() {
1693
- return this.userService.user;
1694
- }
1695
- get availableNumbers() {
1696
- // @ts-ignore
1697
- return this.routePartition && this.dnsService.availableNumbers ? this.dnsService.availableNumbers[this.routePartition] : null;
1698
- }
1699
- constructor(userService, dnsService) {
1700
- this.userService = userService;
1701
- this.dnsService = dnsService;
1702
- this.onChange = new EventEmitter();
1703
- }
1704
- ngOnInit() {
1705
- this.getData();
1706
- }
1707
- onChangeField(event) {
1708
- // if (!token) {
1709
- // return;
1710
- // }
1711
- // (this.userService.user as any)[token] = this.form?.get(token)?.value;
1712
- this.onChange.emit(event?.value);
1713
- }
1714
- getData() {
1715
- if (!this.siteId || !this.routePartition) {
1716
- return;
1717
- }
1718
- this.dataPending = true;
1719
- this.dnsService.getNumberRange(String(this.siteId), this.routePartition)
1720
- .subscribe(() => {
1721
- if (this.availableNumbers) {
1722
- // @ts-ignore
1723
- this.dnsService.availableNumbers[this.routePartition].push(this.directoryNumber);
1724
- }
1725
- this.dataPending = false;
1726
- });
1727
- }
1728
- }
1729
- UserCallingExtensionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCallingExtensionComponent, deps: [{ token: UserService }, { token: DnsService }], target: i0.ɵɵFactoryTarget.Component });
1730
- UserCallingExtensionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserCallingExtensionComponent, selector: "app-user-calling-extension", inputs: { control: "control", routePartition: "routePartition", directoryNumber: "directoryNumber", siteId: "siteId" }, outputs: { onChange: "onChange" }, ngImport: i0, template: "<div *ngIf=\"this.availableNumbers?.length\" class=\"user-calling-extension\">\n <mat-form-field appearance=\"outline\">\n <mat-select [formControl]=\"control\" name=\"extension\"\n (selectionChange)=\"this.onChangeField($event)\">\n <mat-option *ngFor=\"let option of this.availableNumbers; let i = index;\"[value]=\"option\">{{option}}</mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-spinner *ngIf=\"this.dataPending\" [diameter]=\"50\"></mat-spinner>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.user-calling-extension{max-width:200px;margin:0 0 0 6px}.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-webex-user{background-image:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22a%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 16.67 15.56%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%232c355d%3Bstroke-width%3A1.4px%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath class%3D%22b%22 d%3D%22M4.87%2C3.89c0-1.72%2C1.51-3.19%2C3.47-3.19s3.47%2C1.47%2C3.47%2C3.19-1.51%2C3.19-3.47%2C3.19-3.47-1.47-3.47-3.19ZM.7%2C12.64c0-.37%2C.19-.76%2C.67-1.17%2C.48-.41%2C1.17-.78%2C2-1.09%2C1.66-.62%2C3.66-.93%2C4.97-.93s3.31%2C.31%2C4.97%2C.93c.83%2C.31%2C1.52%2C.68%2C2%2C1.09%2C.47%2C.41%2C.67%2C.8%2C.67%2C1.17v2.22H.7v-2.22Z%22%2F%3E%3C%2Fsvg%3E\")}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:95%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:gray!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.spinner-container{width:100%;display:flex;justify-content:center;align-items:center}.spinner-container ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#000}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}table{border-collapse:collapse;border-spacing:0}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}.mat-divider{margin:12px 0}::ng-deep .mat-form-field-wrapper{height:30px}::ng-deep .mat-form-field-flex{height:30px}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{height:35px}:ng-deep .mat-form-field-outline .mat-form-field-outline-thick{height:35px}::ng-deep .mat-select{line-height:20px}::ng-deep .mat-form-field-infix{border-top:0px!important}::ng-deep .mat-tab-group{font-family:Inter,sans-serif}::ng-deep .mat-tab-label{font-weight:500!important;font-size:16px!important;height:auto!important;min-width:auto!important;padding:0!important;opacity:1!important;color:#000!important}::ng-deep .mat-ink-bar{background-color:#000!important;height:3px!important}::ng-deep .mat-tab-labels{gap:30px}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i8.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }] });
1731
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCallingExtensionComponent, decorators: [{
1732
- type: Component,
1733
- args: [{ selector: 'app-user-calling-extension', template: "<div *ngIf=\"this.availableNumbers?.length\" class=\"user-calling-extension\">\n <mat-form-field appearance=\"outline\">\n <mat-select [formControl]=\"control\" name=\"extension\"\n (selectionChange)=\"this.onChangeField($event)\">\n <mat-option *ngFor=\"let option of this.availableNumbers; let i = index;\"[value]=\"option\">{{option}}</mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-spinner *ngIf=\"this.dataPending\" [diameter]=\"50\"></mat-spinner>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.user-calling-extension{max-width:200px;margin:0 0 0 6px}.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-webex-user{background-image:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22a%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 16.67 15.56%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%232c355d%3Bstroke-width%3A1.4px%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath class%3D%22b%22 d%3D%22M4.87%2C3.89c0-1.72%2C1.51-3.19%2C3.47-3.19s3.47%2C1.47%2C3.47%2C3.19-1.51%2C3.19-3.47%2C3.19-3.47-1.47-3.47-3.19ZM.7%2C12.64c0-.37%2C.19-.76%2C.67-1.17%2C.48-.41%2C1.17-.78%2C2-1.09%2C1.66-.62%2C3.66-.93%2C4.97-.93s3.31%2C.31%2C4.97%2C.93c.83%2C.31%2C1.52%2C.68%2C2%2C1.09%2C.47%2C.41%2C.67%2C.8%2C.67%2C1.17v2.22H.7v-2.22Z%22%2F%3E%3C%2Fsvg%3E\")}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:95%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:gray!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.spinner-container{width:100%;display:flex;justify-content:center;align-items:center}.spinner-container ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#000}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}table{border-collapse:collapse;border-spacing:0}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}.mat-divider{margin:12px 0}::ng-deep .mat-form-field-wrapper{height:30px}::ng-deep .mat-form-field-flex{height:30px}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{height:35px}:ng-deep .mat-form-field-outline .mat-form-field-outline-thick{height:35px}::ng-deep .mat-select{line-height:20px}::ng-deep .mat-form-field-infix{border-top:0px!important}::ng-deep .mat-tab-group{font-family:Inter,sans-serif}::ng-deep .mat-tab-label{font-weight:500!important;font-size:16px!important;height:auto!important;min-width:auto!important;padding:0!important;opacity:1!important;color:#000!important}::ng-deep .mat-ink-bar{background-color:#000!important;height:3px!important}::ng-deep .mat-tab-labels{gap:30px}\n"] }]
1734
- }], ctorParameters: function () { return [{ type: UserService }, { type: DnsService }]; }, propDecorators: { control: [{
1735
- type: Input
1736
- }], routePartition: [{
1737
- type: Input
1738
- }], directoryNumber: [{
1739
- type: Input
1740
- }], siteId: [{
1741
- type: Input
1742
- }], onChange: [{
1743
- type: Output
1691
+ class UserCallingExtensionComponent {
1692
+ get user() {
1693
+ return this.userService.user;
1694
+ }
1695
+ get availableNumbers() {
1696
+ // @ts-ignore
1697
+ return this.routePartition && this.dnsService.availableNumbers ? this.dnsService.availableNumbers[this.routePartition] : null;
1698
+ }
1699
+ constructor(userService, dnsService) {
1700
+ this.userService = userService;
1701
+ this.dnsService = dnsService;
1702
+ this.onChange = new EventEmitter();
1703
+ }
1704
+ ngOnInit() {
1705
+ this.getData();
1706
+ }
1707
+ onChangeField(event) {
1708
+ // if (!token) {
1709
+ // return;
1710
+ // }
1711
+ // (this.userService.user as any)[token] = this.form?.get(token)?.value;
1712
+ this.onChange.emit(event?.value);
1713
+ }
1714
+ getData() {
1715
+ if (!this.siteId || !this.routePartition) {
1716
+ return;
1717
+ }
1718
+ this.dataPending = true;
1719
+ this.dnsService.getNumberRange(String(this.siteId), this.routePartition)
1720
+ .subscribe(() => {
1721
+ if (this.availableNumbers) {
1722
+ // @ts-ignore
1723
+ this.dnsService.availableNumbers[this.routePartition].push(this.directoryNumber);
1724
+ }
1725
+ this.dataPending = false;
1726
+ });
1727
+ }
1728
+ }
1729
+ UserCallingExtensionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCallingExtensionComponent, deps: [{ token: UserService }, { token: DnsService }], target: i0.ɵɵFactoryTarget.Component });
1730
+ UserCallingExtensionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserCallingExtensionComponent, selector: "app-user-calling-extension", inputs: { control: "control", routePartition: "routePartition", directoryNumber: "directoryNumber", siteId: "siteId" }, outputs: { onChange: "onChange" }, ngImport: i0, template: "<div *ngIf=\"this.availableNumbers?.length\" class=\"user-calling-extension\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select [formControl]=\"control\" name=\"extension\"\r\n (selectionChange)=\"this.onChangeField($event)\">\r\n <mat-option *ngFor=\"let option of this.availableNumbers; let i = index;\"[value]=\"option\">{{option}}</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n <mat-spinner *ngIf=\"this.dataPending\" [diameter]=\"50\"></mat-spinner>\r\n</div>\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.user-calling-extension{max-width:200px;margin:0 0 0 6px}.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-webex-user{background-image:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22a%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 16.67 15.56%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%232c355d%3Bstroke-width%3A1.4px%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath class%3D%22b%22 d%3D%22M4.87%2C3.89c0-1.72%2C1.51-3.19%2C3.47-3.19s3.47%2C1.47%2C3.47%2C3.19-1.51%2C3.19-3.47%2C3.19-3.47-1.47-3.47-3.19ZM.7%2C12.64c0-.37%2C.19-.76%2C.67-1.17%2C.48-.41%2C1.17-.78%2C2-1.09%2C1.66-.62%2C3.66-.93%2C4.97-.93s3.31%2C.31%2C4.97%2C.93c.83%2C.31%2C1.52%2C.68%2C2%2C1.09%2C.47%2C.41%2C.67%2C.8%2C.67%2C1.17v2.22H.7v-2.22Z%22%2F%3E%3C%2Fsvg%3E\")}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:95%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:gray!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.spinner-container{width:100%;display:flex;justify-content:center;align-items:center}.spinner-container ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#000}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}table{border-collapse:collapse;border-spacing:0}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}.mat-divider{margin:12px 0}::ng-deep .mat-form-field-wrapper{height:30px}::ng-deep .mat-form-field-flex{height:30px}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{height:35px}:ng-deep .mat-form-field-outline .mat-form-field-outline-thick{height:35px}::ng-deep .mat-select{line-height:20px}::ng-deep .mat-form-field-infix{border-top:0px!important}::ng-deep .mat-tab-group{font-family:Inter,sans-serif}::ng-deep .mat-tab-label{font-weight:500!important;font-size:16px!important;height:auto!important;min-width:auto!important;padding:0!important;opacity:1!important;color:#000!important}::ng-deep .mat-ink-bar{background-color:#000!important;height:3px!important}::ng-deep .mat-tab-labels{gap:30px}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i8.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }] });
1731
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCallingExtensionComponent, decorators: [{
1732
+ type: Component,
1733
+ args: [{ selector: 'app-user-calling-extension', template: "<div *ngIf=\"this.availableNumbers?.length\" class=\"user-calling-extension\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select [formControl]=\"control\" name=\"extension\"\r\n (selectionChange)=\"this.onChangeField($event)\">\r\n <mat-option *ngFor=\"let option of this.availableNumbers; let i = index;\"[value]=\"option\">{{option}}</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n <mat-spinner *ngIf=\"this.dataPending\" [diameter]=\"50\"></mat-spinner>\r\n</div>\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.user-calling-extension{max-width:200px;margin:0 0 0 6px}.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-webex-user{background-image:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22a%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 16.67 15.56%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%232c355d%3Bstroke-width%3A1.4px%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath class%3D%22b%22 d%3D%22M4.87%2C3.89c0-1.72%2C1.51-3.19%2C3.47-3.19s3.47%2C1.47%2C3.47%2C3.19-1.51%2C3.19-3.47%2C3.19-3.47-1.47-3.47-3.19ZM.7%2C12.64c0-.37%2C.19-.76%2C.67-1.17%2C.48-.41%2C1.17-.78%2C2-1.09%2C1.66-.62%2C3.66-.93%2C4.97-.93s3.31%2C.31%2C4.97%2C.93c.83%2C.31%2C1.52%2C.68%2C2%2C1.09%2C.47%2C.41%2C.67%2C.8%2C.67%2C1.17v2.22H.7v-2.22Z%22%2F%3E%3C%2Fsvg%3E\")}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:95%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:gray!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.spinner-container{width:100%;display:flex;justify-content:center;align-items:center}.spinner-container ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#000}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}table{border-collapse:collapse;border-spacing:0}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}.mat-divider{margin:12px 0}::ng-deep .mat-form-field-wrapper{height:30px}::ng-deep .mat-form-field-flex{height:30px}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{height:35px}:ng-deep .mat-form-field-outline .mat-form-field-outline-thick{height:35px}::ng-deep .mat-select{line-height:20px}::ng-deep .mat-form-field-infix{border-top:0px!important}::ng-deep .mat-tab-group{font-family:Inter,sans-serif}::ng-deep .mat-tab-label{font-weight:500!important;font-size:16px!important;height:auto!important;min-width:auto!important;padding:0!important;opacity:1!important;color:#000!important}::ng-deep .mat-ink-bar{background-color:#000!important;height:3px!important}::ng-deep .mat-tab-labels{gap:30px}\n"] }]
1734
+ }], ctorParameters: function () { return [{ type: UserService }, { type: DnsService }]; }, propDecorators: { control: [{
1735
+ type: Input
1736
+ }], routePartition: [{
1737
+ type: Input
1738
+ }], directoryNumber: [{
1739
+ type: Input
1740
+ }], siteId: [{
1741
+ type: Input
1742
+ }], onChange: [{
1743
+ type: Output
1744
1744
  }] } });
1745
1745
 
1746
- class UserCallingComponent {
1747
- get form() {
1748
- return this.userService?.user?.devices[0] && this.userService?.user?.devices[0].lineAssociations[0].form;
1749
- }
1750
- get formControl() {
1751
- const control = this.form?.get('directoryNumber');
1752
- return control;
1753
- }
1754
- get lineAssociation() {
1755
- return this.userService?.user?.devices[0].lineAssociations[0];
1756
- }
1757
- get user() {
1758
- return this.userService.user;
1759
- }
1760
- constructor(userService, dnsService) {
1761
- this.userService = userService;
1762
- this.dnsService = dnsService;
1763
- this.onExtensionChange = new EventEmitter();
1764
- }
1765
- ngOnInit() {
1766
- // this.getData();
1767
- }
1768
- onDirectoryNumberChange(value) {
1769
- if (this.lineAssociation && this.lineAssociation.directoryNumber) {
1770
- // @ts-ignore
1771
- this.userService.user.devices[0].lineAssociations[0].directoryNumber.directoryNumber = value;
1772
- this.onExtensionChange.next(true);
1773
- }
1774
- }
1775
- onChangeField(token) {
1776
- if (!token) {
1777
- return;
1778
- }
1779
- this.userService.user[token] = this.form?.get(token)?.value;
1780
- }
1781
- toggleEditMode() {
1782
- this.userService.user.toggleEditMode();
1783
- }
1784
- isSavingDisabled() {
1785
- return !this.userService.hasUnsavedChanges() || this.userService.hasExistedUserId;
1786
- }
1787
- onChangeExtension(value) {
1788
- if (this.lineAssociation && this.lineAssociation.directoryNumber) {
1789
- // @ts-ignore
1790
- this.userService.user.devices[0].lineAssociations[0].directoryNumber.directoryNumber = value;
1791
- }
1792
- }
1793
- getData() {
1794
- this.dataPending = true;
1795
- this.dnsService.getNumberRange(String(this.siteId), this.userId)
1796
- .subscribe({
1797
- complete: (v) => {
1798
- this.dataPending = false;
1799
- },
1800
- error: (e) => this.dataPending = false,
1801
- });
1802
- }
1803
- }
1804
- UserCallingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCallingComponent, deps: [{ token: UserService }, { token: DnsService }], target: i0.ɵɵFactoryTarget.Component });
1805
- UserCallingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserCallingComponent, selector: "app-user-calling", inputs: { siteId: "siteId", userId: "userId" }, outputs: { onExtensionChange: "onExtensionChange" }, ngImport: i0, template: "<div id=\"user-calling\" class=\"info-boxes-container\" *ngIf=\"siteId && lineAssociation && form\" [formGroup]=\"form\">\n <!-- USER INFO BOX-->\n <div class=\"user-info-box user-details-box\">\n <h3 class=\"user-box-title\">Numbers</h3>\n <div class=\"form-holder__inputs\">\n <h4>Directory Number</h4>\n <table>\n <tr>\n <th>Type</th>\n <th>Number</th>\n <th>Extension</th>\n </tr>\n <tr >\n <td></td>\n <td></td>\n <td>\n <app-user-calling-extension\n *ngIf=\"formControl\"\n [siteId]=\"this.siteId\"\n [control]=\"formControl\"\n [routePartition]=\"this.lineAssociation?.directoryNumber?.routePartitionName\"\n [directoryNumber]=\"this.lineAssociation?.directoryNumber?.directoryNumber\"\n (onChange)=\"onDirectoryNumberChange($event)\">\n </app-user-calling-extension>\n\n </td>\n </tr>\n </table>\n </div>\n\n </div>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";#user-calling{height:calc(100vh - 100px)}#user-calling table{margin:10px 0;width:100%}#user-calling th{color:#000;text-align:left;background:#efefef;font-size:14px;font-weight:500;padding:2px 5px}.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-webex-user{background-image:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22a%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 16.67 15.56%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%232c355d%3Bstroke-width%3A1.4px%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath class%3D%22b%22 d%3D%22M4.87%2C3.89c0-1.72%2C1.51-3.19%2C3.47-3.19s3.47%2C1.47%2C3.47%2C3.19-1.51%2C3.19-3.47%2C3.19-3.47-1.47-3.47-3.19ZM.7%2C12.64c0-.37%2C.19-.76%2C.67-1.17%2C.48-.41%2C1.17-.78%2C2-1.09%2C1.66-.62%2C3.66-.93%2C4.97-.93s3.31%2C.31%2C4.97%2C.93c.83%2C.31%2C1.52%2C.68%2C2%2C1.09%2C.47%2C.41%2C.67%2C.8%2C.67%2C1.17v2.22H.7v-2.22Z%22%2F%3E%3C%2Fsvg%3E\")}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:95%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:gray!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.spinner-container{width:100%;display:flex;justify-content:center;align-items:center}.spinner-container ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#000}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important;line-height:35px!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}table{border-collapse:collapse;border-spacing:0}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}.mat-divider{margin:12px 0}::ng-deep .mat-form-field-wrapper{height:30px}::ng-deep .mat-form-field-flex{height:30px}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{height:35px}:ng-deep .mat-form-field-outline .mat-form-field-outline-thick{height:35px}::ng-deep .mat-select{line-height:20px}::ng-deep .mat-form-field-infix{border-top:0px!important}::ng-deep .mat-tab-group{font-family:Inter,sans-serif}::ng-deep .mat-tab-label{font-weight:500!important;font-size:16px!important;height:auto!important;min-width:auto!important;padding:0!important;opacity:1!important;color:#000!important}::ng-deep .mat-ink-bar{background-color:#000!important;height:3px!important}::ng-deep .mat-tab-labels{gap:30px}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: UserCallingExtensionComponent, selector: "app-user-calling-extension", inputs: ["control", "routePartition", "directoryNumber", "siteId"], outputs: ["onChange"] }] });
1806
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCallingComponent, decorators: [{
1807
- type: Component,
1808
- args: [{ selector: 'app-user-calling', template: "<div id=\"user-calling\" class=\"info-boxes-container\" *ngIf=\"siteId && lineAssociation && form\" [formGroup]=\"form\">\n <!-- USER INFO BOX-->\n <div class=\"user-info-box user-details-box\">\n <h3 class=\"user-box-title\">Numbers</h3>\n <div class=\"form-holder__inputs\">\n <h4>Directory Number</h4>\n <table>\n <tr>\n <th>Type</th>\n <th>Number</th>\n <th>Extension</th>\n </tr>\n <tr >\n <td></td>\n <td></td>\n <td>\n <app-user-calling-extension\n *ngIf=\"formControl\"\n [siteId]=\"this.siteId\"\n [control]=\"formControl\"\n [routePartition]=\"this.lineAssociation?.directoryNumber?.routePartitionName\"\n [directoryNumber]=\"this.lineAssociation?.directoryNumber?.directoryNumber\"\n (onChange)=\"onDirectoryNumberChange($event)\">\n </app-user-calling-extension>\n\n </td>\n </tr>\n </table>\n </div>\n\n </div>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";#user-calling{height:calc(100vh - 100px)}#user-calling table{margin:10px 0;width:100%}#user-calling th{color:#000;text-align:left;background:#efefef;font-size:14px;font-weight:500;padding:2px 5px}.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-webex-user{background-image:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22a%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 16.67 15.56%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%232c355d%3Bstroke-width%3A1.4px%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath class%3D%22b%22 d%3D%22M4.87%2C3.89c0-1.72%2C1.51-3.19%2C3.47-3.19s3.47%2C1.47%2C3.47%2C3.19-1.51%2C3.19-3.47%2C3.19-3.47-1.47-3.47-3.19ZM.7%2C12.64c0-.37%2C.19-.76%2C.67-1.17%2C.48-.41%2C1.17-.78%2C2-1.09%2C1.66-.62%2C3.66-.93%2C4.97-.93s3.31%2C.31%2C4.97%2C.93c.83%2C.31%2C1.52%2C.68%2C2%2C1.09%2C.47%2C.41%2C.67%2C.8%2C.67%2C1.17v2.22H.7v-2.22Z%22%2F%3E%3C%2Fsvg%3E\")}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:95%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:gray!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.spinner-container{width:100%;display:flex;justify-content:center;align-items:center}.spinner-container ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#000}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important;line-height:35px!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}table{border-collapse:collapse;border-spacing:0}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}.mat-divider{margin:12px 0}::ng-deep .mat-form-field-wrapper{height:30px}::ng-deep .mat-form-field-flex{height:30px}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{height:35px}:ng-deep .mat-form-field-outline .mat-form-field-outline-thick{height:35px}::ng-deep .mat-select{line-height:20px}::ng-deep .mat-form-field-infix{border-top:0px!important}::ng-deep .mat-tab-group{font-family:Inter,sans-serif}::ng-deep .mat-tab-label{font-weight:500!important;font-size:16px!important;height:auto!important;min-width:auto!important;padding:0!important;opacity:1!important;color:#000!important}::ng-deep .mat-ink-bar{background-color:#000!important;height:3px!important}::ng-deep .mat-tab-labels{gap:30px}\n"] }]
1809
- }], ctorParameters: function () { return [{ type: UserService }, { type: DnsService }]; }, propDecorators: { siteId: [{
1810
- type: Input
1811
- }], userId: [{
1812
- type: Input
1813
- }], onExtensionChange: [{
1814
- type: Output
1746
+ class UserCallingComponent {
1747
+ get form() {
1748
+ return this.userService?.user?.devices[0] && this.userService?.user?.devices[0].lineAssociations[0].form;
1749
+ }
1750
+ get formControl() {
1751
+ const control = this.form?.get('directoryNumber');
1752
+ return control;
1753
+ }
1754
+ get lineAssociation() {
1755
+ return this.userService?.user?.devices[0].lineAssociations[0];
1756
+ }
1757
+ get user() {
1758
+ return this.userService.user;
1759
+ }
1760
+ constructor(userService, dnsService) {
1761
+ this.userService = userService;
1762
+ this.dnsService = dnsService;
1763
+ this.onExtensionChange = new EventEmitter();
1764
+ }
1765
+ ngOnInit() {
1766
+ // this.getData();
1767
+ }
1768
+ onDirectoryNumberChange(value) {
1769
+ if (this.lineAssociation && this.lineAssociation.directoryNumber) {
1770
+ // @ts-ignore
1771
+ this.userService.user.devices[0].lineAssociations[0].directoryNumber.directoryNumber = value;
1772
+ this.onExtensionChange.next(true);
1773
+ }
1774
+ }
1775
+ onChangeField(token) {
1776
+ if (!token) {
1777
+ return;
1778
+ }
1779
+ this.userService.user[token] = this.form?.get(token)?.value;
1780
+ }
1781
+ toggleEditMode() {
1782
+ this.userService.user.toggleEditMode();
1783
+ }
1784
+ isSavingDisabled() {
1785
+ return !this.userService.hasUnsavedChanges() || this.userService.hasExistedUserId;
1786
+ }
1787
+ onChangeExtension(value) {
1788
+ if (this.lineAssociation && this.lineAssociation.directoryNumber) {
1789
+ // @ts-ignore
1790
+ this.userService.user.devices[0].lineAssociations[0].directoryNumber.directoryNumber = value;
1791
+ }
1792
+ }
1793
+ getData() {
1794
+ this.dataPending = true;
1795
+ this.dnsService.getNumberRange(String(this.siteId), this.userId)
1796
+ .subscribe({
1797
+ complete: (v) => {
1798
+ this.dataPending = false;
1799
+ },
1800
+ error: (e) => this.dataPending = false,
1801
+ });
1802
+ }
1803
+ }
1804
+ UserCallingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCallingComponent, deps: [{ token: UserService }, { token: DnsService }], target: i0.ɵɵFactoryTarget.Component });
1805
+ UserCallingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserCallingComponent, selector: "app-user-calling", inputs: { siteId: "siteId", userId: "userId" }, outputs: { onExtensionChange: "onExtensionChange" }, ngImport: i0, template: "<div id=\"user-calling\" class=\"info-boxes-container\" *ngIf=\"siteId && lineAssociation && form\" [formGroup]=\"form\">\r\n <!-- USER INFO BOX-->\r\n <div class=\"user-info-box user-details-box\">\r\n <h3 class=\"user-box-title\">Numbers</h3>\r\n <div class=\"form-holder__inputs\">\r\n <h4>Directory Number</h4>\r\n <table>\r\n <tr>\r\n <th>Type</th>\r\n <th>Number</th>\r\n <th>Extension</th>\r\n </tr>\r\n <tr >\r\n <td></td>\r\n <td></td>\r\n <td>\r\n <app-user-calling-extension\r\n *ngIf=\"formControl\"\r\n [siteId]=\"this.siteId\"\r\n [control]=\"formControl\"\r\n [routePartition]=\"this.lineAssociation?.directoryNumber?.routePartitionName\"\r\n [directoryNumber]=\"this.lineAssociation?.directoryNumber?.directoryNumber\"\r\n (onChange)=\"onDirectoryNumberChange($event)\">\r\n </app-user-calling-extension>\r\n\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";#user-calling{height:calc(100vh - 100px)}#user-calling table{margin:10px 0;width:100%}#user-calling th{color:#000;text-align:left;background:#efefef;font-size:14px;font-weight:500;padding:2px 5px}.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-webex-user{background-image:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22a%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 16.67 15.56%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%232c355d%3Bstroke-width%3A1.4px%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath class%3D%22b%22 d%3D%22M4.87%2C3.89c0-1.72%2C1.51-3.19%2C3.47-3.19s3.47%2C1.47%2C3.47%2C3.19-1.51%2C3.19-3.47%2C3.19-3.47-1.47-3.47-3.19ZM.7%2C12.64c0-.37%2C.19-.76%2C.67-1.17%2C.48-.41%2C1.17-.78%2C2-1.09%2C1.66-.62%2C3.66-.93%2C4.97-.93s3.31%2C.31%2C4.97%2C.93c.83%2C.31%2C1.52%2C.68%2C2%2C1.09%2C.47%2C.41%2C.67%2C.8%2C.67%2C1.17v2.22H.7v-2.22Z%22%2F%3E%3C%2Fsvg%3E\")}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:95%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:gray!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.spinner-container{width:100%;display:flex;justify-content:center;align-items:center}.spinner-container ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#000}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important;line-height:35px!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}table{border-collapse:collapse;border-spacing:0}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}.mat-divider{margin:12px 0}::ng-deep .mat-form-field-wrapper{height:30px}::ng-deep .mat-form-field-flex{height:30px}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{height:35px}:ng-deep .mat-form-field-outline .mat-form-field-outline-thick{height:35px}::ng-deep .mat-select{line-height:20px}::ng-deep .mat-form-field-infix{border-top:0px!important}::ng-deep .mat-tab-group{font-family:Inter,sans-serif}::ng-deep .mat-tab-label{font-weight:500!important;font-size:16px!important;height:auto!important;min-width:auto!important;padding:0!important;opacity:1!important;color:#000!important}::ng-deep .mat-ink-bar{background-color:#000!important;height:3px!important}::ng-deep .mat-tab-labels{gap:30px}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: UserCallingExtensionComponent, selector: "app-user-calling-extension", inputs: ["control", "routePartition", "directoryNumber", "siteId"], outputs: ["onChange"] }] });
1806
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCallingComponent, decorators: [{
1807
+ type: Component,
1808
+ args: [{ selector: 'app-user-calling', template: "<div id=\"user-calling\" class=\"info-boxes-container\" *ngIf=\"siteId && lineAssociation && form\" [formGroup]=\"form\">\r\n <!-- USER INFO BOX-->\r\n <div class=\"user-info-box user-details-box\">\r\n <h3 class=\"user-box-title\">Numbers</h3>\r\n <div class=\"form-holder__inputs\">\r\n <h4>Directory Number</h4>\r\n <table>\r\n <tr>\r\n <th>Type</th>\r\n <th>Number</th>\r\n <th>Extension</th>\r\n </tr>\r\n <tr >\r\n <td></td>\r\n <td></td>\r\n <td>\r\n <app-user-calling-extension\r\n *ngIf=\"formControl\"\r\n [siteId]=\"this.siteId\"\r\n [control]=\"formControl\"\r\n [routePartition]=\"this.lineAssociation?.directoryNumber?.routePartitionName\"\r\n [directoryNumber]=\"this.lineAssociation?.directoryNumber?.directoryNumber\"\r\n (onChange)=\"onDirectoryNumberChange($event)\">\r\n </app-user-calling-extension>\r\n\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";#user-calling{height:calc(100vh - 100px)}#user-calling table{margin:10px 0;width:100%}#user-calling th{color:#000;text-align:left;background:#efefef;font-size:14px;font-weight:500;padding:2px 5px}.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-webex-user{background-image:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22a%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 16.67 15.56%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%232c355d%3Bstroke-width%3A1.4px%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath class%3D%22b%22 d%3D%22M4.87%2C3.89c0-1.72%2C1.51-3.19%2C3.47-3.19s3.47%2C1.47%2C3.47%2C3.19-1.51%2C3.19-3.47%2C3.19-3.47-1.47-3.47-3.19ZM.7%2C12.64c0-.37%2C.19-.76%2C.67-1.17%2C.48-.41%2C1.17-.78%2C2-1.09%2C1.66-.62%2C3.66-.93%2C4.97-.93s3.31%2C.31%2C4.97%2C.93c.83%2C.31%2C1.52%2C.68%2C2%2C1.09%2C.47%2C.41%2C.67%2C.8%2C.67%2C1.17v2.22H.7v-2.22Z%22%2F%3E%3C%2Fsvg%3E\")}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:95%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:gray!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.spinner-container{width:100%;display:flex;justify-content:center;align-items:center}.spinner-container ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#000}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important;line-height:35px!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}table{border-collapse:collapse;border-spacing:0}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}.mat-divider{margin:12px 0}::ng-deep .mat-form-field-wrapper{height:30px}::ng-deep .mat-form-field-flex{height:30px}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{height:35px}:ng-deep .mat-form-field-outline .mat-form-field-outline-thick{height:35px}::ng-deep .mat-select{line-height:20px}::ng-deep .mat-form-field-infix{border-top:0px!important}::ng-deep .mat-tab-group{font-family:Inter,sans-serif}::ng-deep .mat-tab-label{font-weight:500!important;font-size:16px!important;height:auto!important;min-width:auto!important;padding:0!important;opacity:1!important;color:#000!important}::ng-deep .mat-ink-bar{background-color:#000!important;height:3px!important}::ng-deep .mat-tab-labels{gap:30px}\n"] }]
1809
+ }], ctorParameters: function () { return [{ type: UserService }, { type: DnsService }]; }, propDecorators: { siteId: [{
1810
+ type: Input
1811
+ }], userId: [{
1812
+ type: Input
1813
+ }], onExtensionChange: [{
1814
+ type: Output
1815
1815
  }] } });
1816
1816
 
1817
- class DeviceListComponent {
1818
- constructor() {
1819
- this.onDeviceSelect = new EventEmitter();
1820
- console.log('devices list');
1821
- }
1822
- selectDevice(device) {
1823
- this.onDeviceSelect.emit(device);
1824
- }
1825
- }
1826
- DeviceListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1827
- DeviceListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DeviceListComponent, selector: "app-device-list", inputs: { devices: "devices" }, outputs: { onDeviceSelect: "onDeviceSelect" }, ngImport: i0, template: "<div class=\"webex-list device-list-container\">\n <div class=\"webex-list-header\">\n <div class=\"webex-list-header__hr\">Name</div>\n <div class=\"webex-list-header__hr\">Type</div>\n <div class=\"webex-list-header__hr\">Line</div>\n <div class=\"webex-list-header__hr\">Device description</div>\n <div class=\"webex-list-header__hr\">Plar service</div>\n </div>\n <ng-container *ngFor=\"let device of devices\">\n <div class=\"device-item\" (click)=\"selectDevice(device)\">\n <div class=\"device-item__td\">{{ device.name }}</div>\n <div class=\"device-item__td\">{{ device.deviceType }}</div>\n <div class=\"device-item__td\">\n <span class=\"device-associated-line\" *ngFor=\"let line of device.lineAssociations\">{{line.directoryNumber?.directoryNumber}} | </span>\n </div>\n <div class=\"device-item__td\">{{ device.description }}</div>\n <div class=\"device-item__td\">\n <mat-slide-toggle class=\"device-slide-toggle\" [disabled]=\"true\" [checked]=\"device.plarService\"></mat-slide-toggle>\n </div>\n <div class=\"device-item__actions-menu\" style=\"text-align: right;\">\n <div class=\"device-item__more\">\n<!-- <mat-icon>more_vert</mat-icon>-->\n </div>\n </div>\n </div>\n </ng-container>\n</div>\n", styles: [".info-holder{display:flex;gap:16px;align-items:center;font-family:Inter,sans-serif;height:102px;width:100%;background:white;margin:0 0 30px}.info-holder__user-image img{width:40px;border-radius:120px;margin:20px 0 0}.info-holder__user-information{padding:10px;margin:10px;gap:10px;display:flex;flex-direction:column}.info-holder__user-name{font-size:20px;font-weight:500}.info-holder__user-breadcrumbs{display:flex;gap:8px;font-weight:400;font-size:14px;color:#000000b3;align-items:center}.info-holder .icon-separator{height:5px;width:5px;background-color:#000000b3;border-radius:50%}.info-holder .is-active{display:flex;gap:8px;align-items:center}.icon-user-status{width:.5rem;height:.5rem;border-radius:50%;background-color:#707070;margin:0 5px 0 0}.icon-user-status.icon-user-status-active{background-color:#1d805f;display:inline-block}.webex-list{padding:2.5rem}.webex-list-header{display:flex;align-items:center;padding:1rem}.webex-list-header__hr{width:100%;font-size:12px}.device-item{position:relative;display:flex;align-items:center;justify-content:space-between;background-color:#fff;border-bottom:1px solid #b0b0b0;padding:.8rem;z-index:10;transition:background-color .3s;cursor:pointer}.device-item__td{width:100%}.device-item__actions-menu{position:absolute;margin:0 1rem;right:0}.device-item__more{display:flex;align-items:center;justify-content:center;cursor:pointer;color:#b0b0b0;border-radius:50%;padding:.5rem;transition:background-color .3s ease-in-out}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }] });
1828
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceListComponent, decorators: [{
1829
- type: Component,
1830
- args: [{ selector: 'app-device-list', template: "<div class=\"webex-list device-list-container\">\n <div class=\"webex-list-header\">\n <div class=\"webex-list-header__hr\">Name</div>\n <div class=\"webex-list-header__hr\">Type</div>\n <div class=\"webex-list-header__hr\">Line</div>\n <div class=\"webex-list-header__hr\">Device description</div>\n <div class=\"webex-list-header__hr\">Plar service</div>\n </div>\n <ng-container *ngFor=\"let device of devices\">\n <div class=\"device-item\" (click)=\"selectDevice(device)\">\n <div class=\"device-item__td\">{{ device.name }}</div>\n <div class=\"device-item__td\">{{ device.deviceType }}</div>\n <div class=\"device-item__td\">\n <span class=\"device-associated-line\" *ngFor=\"let line of device.lineAssociations\">{{line.directoryNumber?.directoryNumber}} | </span>\n </div>\n <div class=\"device-item__td\">{{ device.description }}</div>\n <div class=\"device-item__td\">\n <mat-slide-toggle class=\"device-slide-toggle\" [disabled]=\"true\" [checked]=\"device.plarService\"></mat-slide-toggle>\n </div>\n <div class=\"device-item__actions-menu\" style=\"text-align: right;\">\n <div class=\"device-item__more\">\n<!-- <mat-icon>more_vert</mat-icon>-->\n </div>\n </div>\n </div>\n </ng-container>\n</div>\n", styles: [".info-holder{display:flex;gap:16px;align-items:center;font-family:Inter,sans-serif;height:102px;width:100%;background:white;margin:0 0 30px}.info-holder__user-image img{width:40px;border-radius:120px;margin:20px 0 0}.info-holder__user-information{padding:10px;margin:10px;gap:10px;display:flex;flex-direction:column}.info-holder__user-name{font-size:20px;font-weight:500}.info-holder__user-breadcrumbs{display:flex;gap:8px;font-weight:400;font-size:14px;color:#000000b3;align-items:center}.info-holder .icon-separator{height:5px;width:5px;background-color:#000000b3;border-radius:50%}.info-holder .is-active{display:flex;gap:8px;align-items:center}.icon-user-status{width:.5rem;height:.5rem;border-radius:50%;background-color:#707070;margin:0 5px 0 0}.icon-user-status.icon-user-status-active{background-color:#1d805f;display:inline-block}.webex-list{padding:2.5rem}.webex-list-header{display:flex;align-items:center;padding:1rem}.webex-list-header__hr{width:100%;font-size:12px}.device-item{position:relative;display:flex;align-items:center;justify-content:space-between;background-color:#fff;border-bottom:1px solid #b0b0b0;padding:.8rem;z-index:10;transition:background-color .3s;cursor:pointer}.device-item__td{width:100%}.device-item__actions-menu{position:absolute;margin:0 1rem;right:0}.device-item__more{display:flex;align-items:center;justify-content:center;cursor:pointer;color:#b0b0b0;border-radius:50%;padding:.5rem;transition:background-color .3s ease-in-out}\n"] }]
1831
- }], ctorParameters: function () { return []; }, propDecorators: { devices: [{
1832
- type: Input
1833
- }], onDeviceSelect: [{
1834
- type: Output
1817
+ class DeviceListComponent {
1818
+ constructor() {
1819
+ this.onDeviceSelect = new EventEmitter();
1820
+ console.log('devices list');
1821
+ }
1822
+ selectDevice(device) {
1823
+ this.onDeviceSelect.emit(device);
1824
+ }
1825
+ }
1826
+ DeviceListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1827
+ DeviceListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DeviceListComponent, selector: "app-device-list", inputs: { devices: "devices" }, outputs: { onDeviceSelect: "onDeviceSelect" }, ngImport: i0, template: "<div class=\"webex-list device-list-container\">\r\n <div class=\"webex-list-header\">\r\n <div class=\"webex-list-header__hr\">Name</div>\r\n <div class=\"webex-list-header__hr\">Type</div>\r\n <div class=\"webex-list-header__hr\">Line</div>\r\n <div class=\"webex-list-header__hr\">Device description</div>\r\n <div class=\"webex-list-header__hr\">Plar service</div>\r\n </div>\r\n <ng-container *ngFor=\"let device of devices\">\r\n <div class=\"device-item\" (click)=\"selectDevice(device)\">\r\n <div class=\"device-item__td\">{{ device.name }}</div>\r\n <div class=\"device-item__td\">{{ device.deviceType }}</div>\r\n <div class=\"device-item__td\">\r\n <span class=\"device-associated-line\" *ngFor=\"let line of device.lineAssociations\">{{line.directoryNumber?.directoryNumber}} | </span>\r\n </div>\r\n <div class=\"device-item__td\">{{ device.description }}</div>\r\n <div class=\"device-item__td\">\r\n <mat-slide-toggle class=\"device-slide-toggle\" [disabled]=\"true\" [checked]=\"device.plarService\"></mat-slide-toggle>\r\n </div>\r\n <div class=\"device-item__actions-menu\" style=\"text-align: right;\">\r\n <div class=\"device-item__more\">\r\n<!-- <mat-icon>more_vert</mat-icon>-->\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n</div>\r\n", styles: [".info-holder{display:flex;gap:16px;align-items:center;font-family:Inter,sans-serif;height:102px;width:100%;background:white;margin:0 0 30px}.info-holder__user-image img{width:40px;border-radius:120px;margin:20px 0 0}.info-holder__user-information{padding:10px;margin:10px;gap:10px;display:flex;flex-direction:column}.info-holder__user-name{font-size:20px;font-weight:500}.info-holder__user-breadcrumbs{display:flex;gap:8px;font-weight:400;font-size:14px;color:#000000b3;align-items:center}.info-holder .icon-separator{height:5px;width:5px;background-color:#000000b3;border-radius:50%}.info-holder .is-active{display:flex;gap:8px;align-items:center}.icon-user-status{width:.5rem;height:.5rem;border-radius:50%;background-color:#707070;margin:0 5px 0 0}.icon-user-status.icon-user-status-active{background-color:#1d805f;display:inline-block}.webex-list{padding:2.5rem}.webex-list-header{display:flex;align-items:center;padding:1rem}.webex-list-header__hr{width:100%;font-size:12px}.device-item{position:relative;display:flex;align-items:center;justify-content:space-between;background-color:#fff;border-bottom:1px solid #b0b0b0;padding:.8rem;z-index:10;transition:background-color .3s;cursor:pointer}.device-item__td{width:100%}.device-item__actions-menu{position:absolute;margin:0 1rem;right:0}.device-item__more{display:flex;align-items:center;justify-content:center;cursor:pointer;color:#b0b0b0;border-radius:50%;padding:.5rem;transition:background-color .3s ease-in-out}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }] });
1828
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceListComponent, decorators: [{
1829
+ type: Component,
1830
+ args: [{ selector: 'app-device-list', template: "<div class=\"webex-list device-list-container\">\r\n <div class=\"webex-list-header\">\r\n <div class=\"webex-list-header__hr\">Name</div>\r\n <div class=\"webex-list-header__hr\">Type</div>\r\n <div class=\"webex-list-header__hr\">Line</div>\r\n <div class=\"webex-list-header__hr\">Device description</div>\r\n <div class=\"webex-list-header__hr\">Plar service</div>\r\n </div>\r\n <ng-container *ngFor=\"let device of devices\">\r\n <div class=\"device-item\" (click)=\"selectDevice(device)\">\r\n <div class=\"device-item__td\">{{ device.name }}</div>\r\n <div class=\"device-item__td\">{{ device.deviceType }}</div>\r\n <div class=\"device-item__td\">\r\n <span class=\"device-associated-line\" *ngFor=\"let line of device.lineAssociations\">{{line.directoryNumber?.directoryNumber}} | </span>\r\n </div>\r\n <div class=\"device-item__td\">{{ device.description }}</div>\r\n <div class=\"device-item__td\">\r\n <mat-slide-toggle class=\"device-slide-toggle\" [disabled]=\"true\" [checked]=\"device.plarService\"></mat-slide-toggle>\r\n </div>\r\n <div class=\"device-item__actions-menu\" style=\"text-align: right;\">\r\n <div class=\"device-item__more\">\r\n<!-- <mat-icon>more_vert</mat-icon>-->\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n</div>\r\n", styles: [".info-holder{display:flex;gap:16px;align-items:center;font-family:Inter,sans-serif;height:102px;width:100%;background:white;margin:0 0 30px}.info-holder__user-image img{width:40px;border-radius:120px;margin:20px 0 0}.info-holder__user-information{padding:10px;margin:10px;gap:10px;display:flex;flex-direction:column}.info-holder__user-name{font-size:20px;font-weight:500}.info-holder__user-breadcrumbs{display:flex;gap:8px;font-weight:400;font-size:14px;color:#000000b3;align-items:center}.info-holder .icon-separator{height:5px;width:5px;background-color:#000000b3;border-radius:50%}.info-holder .is-active{display:flex;gap:8px;align-items:center}.icon-user-status{width:.5rem;height:.5rem;border-radius:50%;background-color:#707070;margin:0 5px 0 0}.icon-user-status.icon-user-status-active{background-color:#1d805f;display:inline-block}.webex-list{padding:2.5rem}.webex-list-header{display:flex;align-items:center;padding:1rem}.webex-list-header__hr{width:100%;font-size:12px}.device-item{position:relative;display:flex;align-items:center;justify-content:space-between;background-color:#fff;border-bottom:1px solid #b0b0b0;padding:.8rem;z-index:10;transition:background-color .3s;cursor:pointer}.device-item__td{width:100%}.device-item__actions-menu{position:absolute;margin:0 1rem;right:0}.device-item__more{display:flex;align-items:center;justify-content:center;cursor:pointer;color:#b0b0b0;border-radius:50%;padding:.5rem;transition:background-color .3s ease-in-out}\n"] }]
1831
+ }], ctorParameters: function () { return []; }, propDecorators: { devices: [{
1832
+ type: Input
1833
+ }], onDeviceSelect: [{
1834
+ type: Output
1835
1835
  }] } });
1836
1836
 
1837
- class UserManageWidgetComponent {
1838
- get form() {
1839
- return this.userService?.user?.form;
1840
- }
1841
- get user() {
1842
- return this.userService.user;
1843
- }
1844
- get userName() {
1845
- return `${this.user?.firstName || ''} ${this.user?.lastName || ''}`;
1846
- }
1847
- get lineAssociation() {
1848
- return this.userService?.user?.devices[0].lineAssociations[0];
1849
- }
1850
- constructor(userService, apiService) {
1851
- this.userService = userService;
1852
- this.apiService = apiService;
1853
- this.onSave = new EventEmitter();
1854
- this.onChange = new EventEmitter();
1855
- this.selectDevice = new EventEmitter();
1856
- this.goBack = new EventEmitter();
1857
- this.userService.onUserLineSaved$
1858
- .subscribe(() => {
1859
- this.userService.persistCacheChanges()
1860
- .subscribe(() => {
1861
- this.userService.dataPending = false;
1862
- this.onSave.next("saved");
1863
- });
1864
- }, () => this.userService.dataPending = false);
1865
- }
1866
- ngOnInit() {
1867
- this.apiService.token = this.token;
1868
- this.apiService.apiUrl = this.host;
1869
- this.getData();
1870
- }
1871
- onDeviceSelect(device) {
1872
- this.selectDevice.emit(device.name);
1873
- }
1874
- onGoBack() {
1875
- this.goBack.emit();
1876
- }
1877
- onExtensionChange() {
1878
- this.onChange.next("start extension change..");
1879
- }
1880
- onChangeField(token) {
1881
- this.onChange.next("start change..");
1882
- if (!token) {
1883
- return;
1884
- }
1885
- this.userService.user[token] = this.form?.get(token)?.value;
1886
- if (token === 'middleName') {
1887
- this.form?.get(token)?.setValidators([Validators.pattern('[ a-zA-Z-]+')]);
1888
- }
1889
- if (token === 'telephoneNumber' || token === 'mobileNumber' || token === 'pagerNumber' || token === 'homeNumber') {
1890
- this.form?.get(token)?.setValidators([Validators.pattern('[ 0-9-+]+')]);
1891
- }
1892
- this.form?.get(token)?.updateValueAndValidity();
1893
- this.validateUserId();
1894
- }
1895
- saveChanges() {
1896
- if (!this.userService.hasUnsavedChanges() || this.form?.invalid) {
1897
- return;
1898
- }
1899
- if (this.user.devices[0].lineAssociations[0] && !this.user.devices[0].lineAssociations[0].equals(this.userService.originUser.devices[0].lineAssociations[0])) {
1900
- return this.userService.saveNewLine();
1901
- }
1902
- else {
1903
- this.dataPending = true;
1904
- const subscription = this.userService.persistCacheChanges()
1905
- .subscribe(() => {
1906
- this.dataPending = false;
1907
- this.onSave.next("user has been saved successfully..");
1908
- subscription.unsubscribe();
1909
- }, () => this.dataPending = false);
1910
- }
1911
- }
1912
- toggleEditMode() {
1913
- this.userService.user.toggleEditMode();
1914
- }
1915
- isSavingDisabled() {
1916
- return !this.userService.hasUnsavedChanges() || this.userService.hasExistedUserId;
1917
- }
1918
- changeField(token) {
1919
- this.onChange.next("start change..");
1920
- const formField = this.user?.form?.get(token);
1921
- if (token !== 'confirmDigestCredentials') {
1922
- // @ts-ignore
1923
- this.user[token] = formField?.value;
1924
- }
1925
- if (token === 'digestCredentials' || token === 'confirmDigestCredentials') {
1926
- this.digestCredentialsHandler(token, formField);
1927
- }
1928
- }
1929
- digestCredentialsHandler(token, field) {
1930
- const fieldNameToCompare = token === 'digestCredentials' ? 'confirmDigestCredentials' : 'digestCredentials';
1931
- const fieldToCompare = this.userService.user.form.get(fieldNameToCompare);
1932
- if (this.userService.user?.form?.get(token)) {
1933
- this.userService.user?.form?.get(token)?.setErrors(null);
1934
- this.userService.user?.form?.get(fieldNameToCompare)?.setErrors(null);
1935
- /* if (!field.value && !fieldToCompare.value) {
1936
- this.userService.user?.digestCredentials = null;
1937
- return;
1938
- }
1939
-
1940
- if (!field.value && fieldToCompare.value || !fieldToCompare.value && field.value) {
1941
- const requiredFieldName = field.value ? fieldNameToCompare : token;
1942
- this.userService.user.form.get(requiredFieldName).setErrors({required: true});
1943
- return;
1944
- }
1945
- if (field.value && fieldToCompare.value && field.value !== fieldToCompare.value) {
1946
- this.userService.user.form.get(token).setErrors({mismatch: true});
1947
- this.userService.user.form.get(fieldNameToCompare).setErrors({mismatch: true});
1948
- }*/
1949
- }
1950
- }
1951
- getData() {
1952
- this.dataPending = true;
1953
- this.userService.fetchUserToken(this.siteId, this.userId, this.isLdap)
1954
- .subscribe({
1955
- complete: (v) => {
1956
- this.dataPending = false;
1957
- },
1958
- error: (e) => this.dataPending = false,
1959
- });
1960
- }
1961
- setCookie(name, value, days) {
1962
- var expires = "";
1963
- if (days) {
1964
- var date = new Date();
1965
- date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
1966
- expires = "; expires=" + date.toUTCString();
1967
- }
1968
- document.cookie = name + "=" + (value || "") + expires + "; path=/";
1969
- }
1970
- validateUserId() {
1971
- const idControl = this.form.get('userid');
1972
- if (idControl?.value !== '' && idControl?.value !== this.userService.originUser.userid) {
1973
- this.userService.fetchUserById(idControl?.value)
1974
- .subscribe((res) => {
1975
- this.userService.userIdExistPending = false;
1976
- idControl?.setErrors({ exist: true });
1977
- if (this.form?.get('userid')?.hasError('exist')) {
1978
- this.userService.hasExistedUserId = true;
1979
- }
1980
- else {
1981
- this.userService.hasExistedUserId = false;
1982
- }
1983
- }, ((error) => {
1984
- this.userService.userIdExistPending = false;
1985
- if (error.status !== 404) {
1986
- // this.notificationService.warning(this.translate.instant('APP_USER_MSG.CHECK_USER_ID_FAILED'));
1987
- }
1988
- else {
1989
- this.userService.user.newUserId = this.form?.get('userid')?.value;
1990
- }
1991
- }));
1992
- }
1993
- else {
1994
- // delete this.userService?.user?.newUserId;
1995
- }
1996
- }
1997
- save() {
1998
- this.saveChanges();
1999
- }
2000
- }
2001
- UserManageWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageWidgetComponent, deps: [{ token: UserService }, { token: APIService }], target: i0.ɵɵFactoryTarget.Component });
2002
- UserManageWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserManageWidgetComponent, selector: "app-user-manage-widget", inputs: { token: "token", host: "host", siteId: "siteId", userId: "userId", deviceName: "deviceName", isLdap: "isLdap" }, outputs: { onSave: "onSave", onChange: "onChange", selectDevice: "selectDevice", goBack: "goBack" }, ngImport: i0, template: "<app-loader *ngIf=\"dataPending || userService.dataPending\"></app-loader>\n\n<div *ngIf=\"!dataPending\">\n <div class=\"go-back-box\" (click)=\"onGoBack()\">\n <div class=\"go-back-box-container\">\n <span class=\"app-icon icon-webex-left-arrow\"></span>\n <span class=\"go-back-title\">Users</span>\n </div>\n </div>\n\n <app-user-info *ngIf=\"user\" [name]=\"userName\" [email]=\"user.email\" [active]=\"true\"\n [position]=\"'Member of ' + user.siteName\"></app-user-info>\n\n <mat-tab-group disableRipple class=\"content-box\">\n <mat-tab label=\"Profile\">\n <ng-container *ngTemplateOutlet=\"userProfile\">\n </ng-container>\n </mat-tab>\n <mat-tab label=\"Calling\" [disabled]=\"!lineAssociation\">\n <app-user-calling *ngIf=\"lineAssociation\" [siteId]=\"siteId\"\n (onExtensionChange)=\"onExtensionChange()\"></app-user-calling>\n </mat-tab>\n <mat-tab label=\"Devices\">\n dev\n<!-- //[disabled]=\"!user?.devices?.length\"-->\n <app-device-list [devices]=\"user?.devices\" (onDeviceSelect)=\"onDeviceSelect($event)\"></app-device-list>\n </mat-tab>\n <mat-tab label=\"Lines\" [disabled]=\"true\"></mat-tab>\n <mat-tab label=\"Features\" [disabled]=\"true\"></mat-tab>\n </mat-tab-group>\n\n <ng-template #userProfile>\n <form *ngIf=\"user && form\" [formGroup]=\"form\">\n <div class=\"info-boxes-container\">\n <!-- USER INFO BOX-->\n <div class=\"user-info-box user-details-box\">\n <h3 class=\"user-box-title\">User Details</h3>\n <div class=\"form-holder__inputs\">\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">User Id</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"userid\" matInput (input)=\"onChangeField('userid')\">\n <mat-error\n *ngIf=\"form.get('userid').hasError('required')\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n This field is required\n </mat-error>\n <mat-error *ngIf=\"form.get('userid').hasError('exist')\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n User ID already exists\n </mat-error>\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Email</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"email\" matInput (input)=\"onChangeField('email')\">\n <mat-error\n *ngIf=\"form.get('email').touched && form.get('email').hasError('required')\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n This field is required\n </mat-error>\n <mat-error *ngIf=\"form.get('email').touched && form.get('email').hasError('pattern')\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n Please enter valid email\n </mat-error>\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Fisrt Name</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"firstName\" matInput (input)=\"onChangeField('firstName')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Last Name</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"lastName\" matInput (input)=\"onChangeField('lastName')\">\n <mat-error\n *ngIf=\"form.get('lastName').touched && form.get('lastName').hasError('required')\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n This field is required\n </mat-error>\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n </div>\n\n </div>\n\n\n <!-- USER INFO BOX-->\n <div class=\"user-info-box user-details-box\">\n <h3 class=\"user-box-title\">General User Info</h3>\n <div class=\"form-holder__inputs\">\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Department</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"department\" matInput type=\"text\" (input)=\"onChangeField('department')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Manager user ID</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"manager\" matInput type=\"text\" (input)=\"onChangeField('manager')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Associated PC</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"associatedPc\" matInput type=\"text\" (input)=\"onChangeField('associatedPc')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Digest credentials</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"digestCredentials\" matInput type=\"text\"\n (input)=\"onChangeField('digestCredentials')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">User profile</div>\n <div class=\"input-holder__input\">\n <app-lazy-loading-select\n [siteId]=\"siteId\"\n [controlName]=\"'userProfile'\"\n [form]=\"user.form\"\n (changeField)=\"changeField('userProfile')\"\n [optionsToken]=\"'userProfiles'\"\n ></app-lazy-loading-select>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Mobile voice access</div>\n <div class=\"input-holder__input\">\n <mat-slide-toggle\n formControlName=\"enableMobileVoiceAccess\"\n (change)=\"onChangeField('enableMobileVoiceAccess')\"\n [checked]=\"user.enableMobileVoiceAccess\">\n </mat-slide-toggle>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Userlocale</div>\n <div class=\"input-holder__input\">\n <app-lazy-loading-select\n [siteId]=\"siteId\"\n [controlName]=\"'userLocale'\"\n [form]=\"user.form\"\n (changeField)=\"changeField($event)\"\n [optionsToken]=\"'userLocales'\"\n [default]=\"{key: '', value: 'None', disabled: false}\">\n </app-lazy-loading-select>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Confirm digest credentials</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"confirmDigestCredentials\" matInput type=\"text\"\n (input)=\"onChangeField('confirmDigestCredentials')\">\n </mat-form-field>\n </div>\n </div>\n </div>\n </div>\n\n <!-- USER INFO BOX-->\n <div class=\"user-info-box user-details-box\">\n <h3 class=\"user-box-title\">Contact Information</h3>\n <div class=\"form-holder__inputs\">\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Middle Name</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"text\" formControlName=\"middleName\" (input)=\"onChangeField('middleName')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Telephone Number</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"number\" formControlName=\"telephoneNumber\"\n (input)=\"onChangeField('telephoneNumber')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Mobile Number</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"number\" formControlName=\"mobileNumber\" (input)=\"onChangeField('mobileNumber')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Digest credentials</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"text\" formControlName=\"digestCredentials\"\n (input)=\"onChangeField('digestCredentials')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Diractory URI</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"text\" formControlName=\"directoryUri\" (input)=\"onChangeField('directoryUri')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Title</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"text\" formControlName=\"title\" (input)=\"onChangeField('title')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Home Number</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"number\" formControlName=\"homeNumber\" (input)=\"onChangeField('homeNumber')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Pager Number</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"number\" formControlName=\"pagerNumber\" (input)=\"onChangeField('pagerNumber')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Display Name</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"text\" formControlName=\"displayName\" (input)=\"onChangeField('displayName')\">\n </mat-form-field>\n </div>\n </div>\n </div>\n </div>\n\n </div>\n\n </form>\n </ng-template>\n</div>\n\n<!--<mat-progress-spinner *ngIf=\"dataPending\"-->\n<!-- class=\"page-spinner\"-->\n<!-- mode=\"indeterminate\"-->\n<!-- [diameter]=\"120\"></mat-progress-spinner>-->\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-webex-user{background-image:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22a%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 16.67 15.56%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%232c355d%3Bstroke-width%3A1.4px%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath class%3D%22b%22 d%3D%22M4.87%2C3.89c0-1.72%2C1.51-3.19%2C3.47-3.19s3.47%2C1.47%2C3.47%2C3.19-1.51%2C3.19-3.47%2C3.19-3.47-1.47-3.47-3.19ZM.7%2C12.64c0-.37%2C.19-.76%2C.67-1.17%2C.48-.41%2C1.17-.78%2C2-1.09%2C1.66-.62%2C3.66-.93%2C4.97-.93s3.31%2C.31%2C4.97%2C.93c.83%2C.31%2C1.52%2C.68%2C2%2C1.09%2C.47%2C.41%2C.67%2C.8%2C.67%2C1.17v2.22H.7v-2.22Z%22%2F%3E%3C%2Fsvg%3E\")}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:95%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:gray!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.spinner-container{width:100%;display:flex;justify-content:center;align-items:center}.spinner-container ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#000}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}table{border-collapse:collapse;border-spacing:0}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}.mat-divider{margin:12px 0}::ng-deep .mat-form-field-wrapper{height:30px}::ng-deep .mat-form-field-flex{height:30px}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{height:35px}:ng-deep .mat-form-field-outline .mat-form-field-outline-thick{height:35px}::ng-deep .mat-select{line-height:20px}::ng-deep .mat-form-field-infix{border-top:0px!important}::ng-deep .mat-tab-group{font-family:Inter,sans-serif}::ng-deep .mat-tab-label{font-weight:500!important;font-size:16px!important;height:auto!important;min-width:auto!important;padding:0!important;opacity:1!important;color:#000!important}::ng-deep .mat-ink-bar{background-color:#000!important;height:3px!important}::ng-deep .mat-tab-labels{gap:30px}::ng-deep .mat-progress-spinner{position:absolute!important;top:40%;left:45%}.app-icon{height:20px;width:20px;display:inline-block;cursor:pointer;background-repeat:no-repeat;background-position:center}.app-icon{transition:all .15s ease-out}.icon-webex-right-arrow{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2220%22 height%3D%2220%22 viewBox%3D%220 0 20 20%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg id%3D%22arrow-right%22%3E%3Cpath id%3D%22Vector%22 d%3D%22M14.0812 9.66902L6.58119 2.16902C6.53813 2.12351 6.48638 2.0871 6.429 2.06193C6.37162 2.03677 6.30978 2.02336 6.24713 2.0225C6.18448 2.02165 6.1223 2.03336 6.06425 2.05695C6.00621 2.08053 5.95348 2.11552 5.90919 2.15983C5.8649 2.20415 5.82994 2.25689 5.80638 2.31495C5.78282 2.373 5.77113 2.43519 5.77202 2.49784C5.77291 2.56049 5.78634 2.62232 5.81153 2.67969C5.83673 2.73705 5.87316 2.78879 5.91869 2.83183L13.0874 10.0003L5.91869 17.169C5.87316 17.2121 5.83673 17.2638 5.81153 17.3212C5.78634 17.3785 5.77291 17.4404 5.77202 17.503C5.77113 17.5657 5.78282 17.6279 5.80638 17.6859C5.82994 17.744 5.8649 17.7967 5.90919 17.841C5.95348 17.8853 6.00621 17.9203 6.06425 17.9439C6.1223 17.9675 6.18448 17.9792 6.24713 17.9783C6.30978 17.9775 6.37162 17.9641 6.429 17.9389C6.48638 17.9138 6.53813 17.8773 6.58119 17.8318L14.0812 10.3318C14.1691 10.2439 14.2184 10.1247 14.2184 10.0004C14.2184 9.87613 14.1691 9.75692 14.0812 9.66902Z%22 fill%3D%22%230F0F0F%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\")}.icon-webex-left-arrow{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2216%22 height%3D%2216%22 viewBox%3D%220 0 16 16%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg id%3D%22arrow-left%22%3E%3Cpath id%3D%22Vector%22 d%3D%22M5.70746 7.99987L11.3539 2.35352C11.4453 2.25928 11.496 2.13287 11.495 2.00159C11.494 1.8703 11.4414 1.74467 11.3486 1.65183C11.2558 1.55899 11.1301 1.50639 10.9988 1.50539C10.8676 1.50438 10.7411 1.55506 10.6469 1.64647L4.64691 7.64647C4.55316 7.74023 4.50049 7.8674 4.50049 7.99999C4.50049 8.13259 4.55316 8.25975 4.64691 8.35352L10.6469 14.3535C10.6931 14.4011 10.7482 14.439 10.8092 14.4651C10.8702 14.4912 10.9357 14.5049 11.002 14.5054C11.0683 14.5059 11.134 14.4932 11.1954 14.468C11.2567 14.4429 11.3125 14.4058 11.3593 14.3589C11.4062 14.312 11.4433 14.2563 11.4685 14.1949C11.4936 14.1336 11.5063 14.0679 11.5058 14.0016C11.5053 13.9353 11.4916 13.8697 11.4655 13.8088C11.4394 13.7478 11.4015 13.6926 11.3539 13.6465L5.70746 7.99987Z%22 fill%3D%22black%22 fill-opacity%3D%220.95%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\")}.go-back-box{background:white;border-bottom:rgba(0,0,0,.2) 1px solid;height:60px;width:100%;line-height:60px;cursor:pointer}.go-back-box-container{width:95%;margin:auto;display:flex;justify-content:flex-start}.go-back-box-container .icon-webex-left-arrow,.go-back-box-container .go-back-title{display:block;height:60px}.go-back-box-container .go-back-title{line-height:61px}.go-back-title{display:inline-block;margin:0 10px}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i6$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i8$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { kind: "component", type: i8$1.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: i2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { kind: "component", type: AppLoaderComponent, selector: "app-loader" }, { kind: "component", type: UserInfoComponent, selector: "app-user-info", inputs: ["name", "active", "email", "position"] }, { kind: "component", type: LazyLoadingSelectComponent, selector: "app-lazy-loading-select", inputs: ["siteId", "form", "standalone", "placeholder", "controlName", "optionsToken", "appearance", "errorCode", "errorText", "default", "id"], outputs: ["changeField"] }, { kind: "component", type: UserCallingComponent, selector: "app-user-calling", inputs: ["siteId", "userId"], outputs: ["onExtensionChange"] }, { kind: "component", type: DeviceListComponent, selector: "app-device-list", inputs: ["devices"], outputs: ["onDeviceSelect"] }] });
2003
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageWidgetComponent, decorators: [{
2004
- type: Component,
2005
- args: [{ selector: 'app-user-manage-widget', template: "<app-loader *ngIf=\"dataPending || userService.dataPending\"></app-loader>\n\n<div *ngIf=\"!dataPending\">\n <div class=\"go-back-box\" (click)=\"onGoBack()\">\n <div class=\"go-back-box-container\">\n <span class=\"app-icon icon-webex-left-arrow\"></span>\n <span class=\"go-back-title\">Users</span>\n </div>\n </div>\n\n <app-user-info *ngIf=\"user\" [name]=\"userName\" [email]=\"user.email\" [active]=\"true\"\n [position]=\"'Member of ' + user.siteName\"></app-user-info>\n\n <mat-tab-group disableRipple class=\"content-box\">\n <mat-tab label=\"Profile\">\n <ng-container *ngTemplateOutlet=\"userProfile\">\n </ng-container>\n </mat-tab>\n <mat-tab label=\"Calling\" [disabled]=\"!lineAssociation\">\n <app-user-calling *ngIf=\"lineAssociation\" [siteId]=\"siteId\"\n (onExtensionChange)=\"onExtensionChange()\"></app-user-calling>\n </mat-tab>\n <mat-tab label=\"Devices\">\n dev\n<!-- //[disabled]=\"!user?.devices?.length\"-->\n <app-device-list [devices]=\"user?.devices\" (onDeviceSelect)=\"onDeviceSelect($event)\"></app-device-list>\n </mat-tab>\n <mat-tab label=\"Lines\" [disabled]=\"true\"></mat-tab>\n <mat-tab label=\"Features\" [disabled]=\"true\"></mat-tab>\n </mat-tab-group>\n\n <ng-template #userProfile>\n <form *ngIf=\"user && form\" [formGroup]=\"form\">\n <div class=\"info-boxes-container\">\n <!-- USER INFO BOX-->\n <div class=\"user-info-box user-details-box\">\n <h3 class=\"user-box-title\">User Details</h3>\n <div class=\"form-holder__inputs\">\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">User Id</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"userid\" matInput (input)=\"onChangeField('userid')\">\n <mat-error\n *ngIf=\"form.get('userid').hasError('required')\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n This field is required\n </mat-error>\n <mat-error *ngIf=\"form.get('userid').hasError('exist')\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n User ID already exists\n </mat-error>\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Email</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"email\" matInput (input)=\"onChangeField('email')\">\n <mat-error\n *ngIf=\"form.get('email').touched && form.get('email').hasError('required')\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n This field is required\n </mat-error>\n <mat-error *ngIf=\"form.get('email').touched && form.get('email').hasError('pattern')\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n Please enter valid email\n </mat-error>\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Fisrt Name</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"firstName\" matInput (input)=\"onChangeField('firstName')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Last Name</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"lastName\" matInput (input)=\"onChangeField('lastName')\">\n <mat-error\n *ngIf=\"form.get('lastName').touched && form.get('lastName').hasError('required')\">\n <i class=\"fa fa-exclamation-triangle\"></i>\n This field is required\n </mat-error>\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n </div>\n\n </div>\n\n\n <!-- USER INFO BOX-->\n <div class=\"user-info-box user-details-box\">\n <h3 class=\"user-box-title\">General User Info</h3>\n <div class=\"form-holder__inputs\">\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Department</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"department\" matInput type=\"text\" (input)=\"onChangeField('department')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Manager user ID</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"manager\" matInput type=\"text\" (input)=\"onChangeField('manager')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Associated PC</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"associatedPc\" matInput type=\"text\" (input)=\"onChangeField('associatedPc')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Digest credentials</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"digestCredentials\" matInput type=\"text\"\n (input)=\"onChangeField('digestCredentials')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">User profile</div>\n <div class=\"input-holder__input\">\n <app-lazy-loading-select\n [siteId]=\"siteId\"\n [controlName]=\"'userProfile'\"\n [form]=\"user.form\"\n (changeField)=\"changeField('userProfile')\"\n [optionsToken]=\"'userProfiles'\"\n ></app-lazy-loading-select>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Mobile voice access</div>\n <div class=\"input-holder__input\">\n <mat-slide-toggle\n formControlName=\"enableMobileVoiceAccess\"\n (change)=\"onChangeField('enableMobileVoiceAccess')\"\n [checked]=\"user.enableMobileVoiceAccess\">\n </mat-slide-toggle>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Userlocale</div>\n <div class=\"input-holder__input\">\n <app-lazy-loading-select\n [siteId]=\"siteId\"\n [controlName]=\"'userLocale'\"\n [form]=\"user.form\"\n (changeField)=\"changeField($event)\"\n [optionsToken]=\"'userLocales'\"\n [default]=\"{key: '', value: 'None', disabled: false}\">\n </app-lazy-loading-select>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Confirm digest credentials</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input formControlName=\"confirmDigestCredentials\" matInput type=\"text\"\n (input)=\"onChangeField('confirmDigestCredentials')\">\n </mat-form-field>\n </div>\n </div>\n </div>\n </div>\n\n <!-- USER INFO BOX-->\n <div class=\"user-info-box user-details-box\">\n <h3 class=\"user-box-title\">Contact Information</h3>\n <div class=\"form-holder__inputs\">\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Middle Name</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"text\" formControlName=\"middleName\" (input)=\"onChangeField('middleName')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Telephone Number</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"number\" formControlName=\"telephoneNumber\"\n (input)=\"onChangeField('telephoneNumber')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Mobile Number</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"number\" formControlName=\"mobileNumber\" (input)=\"onChangeField('mobileNumber')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Digest credentials</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"text\" formControlName=\"digestCredentials\"\n (input)=\"onChangeField('digestCredentials')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Diractory URI</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"text\" formControlName=\"directoryUri\" (input)=\"onChangeField('directoryUri')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Title</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"text\" formControlName=\"title\" (input)=\"onChangeField('title')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Home Number</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"number\" formControlName=\"homeNumber\" (input)=\"onChangeField('homeNumber')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Pager Number</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"number\" formControlName=\"pagerNumber\" (input)=\"onChangeField('pagerNumber')\">\n </mat-form-field>\n </div>\n </div>\n <mat-divider></mat-divider>\n <div class=\"input-holder\">\n <div class=\"input-holder__name\">Display Name</div>\n <div class=\"input-holder__input\">\n <mat-form-field appearance=\"outline\">\n <input matInput type=\"text\" formControlName=\"displayName\" (input)=\"onChangeField('displayName')\">\n </mat-form-field>\n </div>\n </div>\n </div>\n </div>\n\n </div>\n\n </form>\n </ng-template>\n</div>\n\n<!--<mat-progress-spinner *ngIf=\"dataPending\"-->\n<!-- class=\"page-spinner\"-->\n<!-- mode=\"indeterminate\"-->\n<!-- [diameter]=\"120\"></mat-progress-spinner>-->\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-webex-user{background-image:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22a%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 16.67 15.56%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%232c355d%3Bstroke-width%3A1.4px%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath class%3D%22b%22 d%3D%22M4.87%2C3.89c0-1.72%2C1.51-3.19%2C3.47-3.19s3.47%2C1.47%2C3.47%2C3.19-1.51%2C3.19-3.47%2C3.19-3.47-1.47-3.47-3.19ZM.7%2C12.64c0-.37%2C.19-.76%2C.67-1.17%2C.48-.41%2C1.17-.78%2C2-1.09%2C1.66-.62%2C3.66-.93%2C4.97-.93s3.31%2C.31%2C4.97%2C.93c.83%2C.31%2C1.52%2C.68%2C2%2C1.09%2C.47%2C.41%2C.67%2C.8%2C.67%2C1.17v2.22H.7v-2.22Z%22%2F%3E%3C%2Fsvg%3E\")}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:95%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:gray!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.spinner-container{width:100%;display:flex;justify-content:center;align-items:center}.spinner-container ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#000}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}table{border-collapse:collapse;border-spacing:0}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}.mat-divider{margin:12px 0}::ng-deep .mat-form-field-wrapper{height:30px}::ng-deep .mat-form-field-flex{height:30px}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{height:35px}:ng-deep .mat-form-field-outline .mat-form-field-outline-thick{height:35px}::ng-deep .mat-select{line-height:20px}::ng-deep .mat-form-field-infix{border-top:0px!important}::ng-deep .mat-tab-group{font-family:Inter,sans-serif}::ng-deep .mat-tab-label{font-weight:500!important;font-size:16px!important;height:auto!important;min-width:auto!important;padding:0!important;opacity:1!important;color:#000!important}::ng-deep .mat-ink-bar{background-color:#000!important;height:3px!important}::ng-deep .mat-tab-labels{gap:30px}::ng-deep .mat-progress-spinner{position:absolute!important;top:40%;left:45%}.app-icon{height:20px;width:20px;display:inline-block;cursor:pointer;background-repeat:no-repeat;background-position:center}.app-icon{transition:all .15s ease-out}.icon-webex-right-arrow{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2220%22 height%3D%2220%22 viewBox%3D%220 0 20 20%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg id%3D%22arrow-right%22%3E%3Cpath id%3D%22Vector%22 d%3D%22M14.0812 9.66902L6.58119 2.16902C6.53813 2.12351 6.48638 2.0871 6.429 2.06193C6.37162 2.03677 6.30978 2.02336 6.24713 2.0225C6.18448 2.02165 6.1223 2.03336 6.06425 2.05695C6.00621 2.08053 5.95348 2.11552 5.90919 2.15983C5.8649 2.20415 5.82994 2.25689 5.80638 2.31495C5.78282 2.373 5.77113 2.43519 5.77202 2.49784C5.77291 2.56049 5.78634 2.62232 5.81153 2.67969C5.83673 2.73705 5.87316 2.78879 5.91869 2.83183L13.0874 10.0003L5.91869 17.169C5.87316 17.2121 5.83673 17.2638 5.81153 17.3212C5.78634 17.3785 5.77291 17.4404 5.77202 17.503C5.77113 17.5657 5.78282 17.6279 5.80638 17.6859C5.82994 17.744 5.8649 17.7967 5.90919 17.841C5.95348 17.8853 6.00621 17.9203 6.06425 17.9439C6.1223 17.9675 6.18448 17.9792 6.24713 17.9783C6.30978 17.9775 6.37162 17.9641 6.429 17.9389C6.48638 17.9138 6.53813 17.8773 6.58119 17.8318L14.0812 10.3318C14.1691 10.2439 14.2184 10.1247 14.2184 10.0004C14.2184 9.87613 14.1691 9.75692 14.0812 9.66902Z%22 fill%3D%22%230F0F0F%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\")}.icon-webex-left-arrow{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2216%22 height%3D%2216%22 viewBox%3D%220 0 16 16%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg id%3D%22arrow-left%22%3E%3Cpath id%3D%22Vector%22 d%3D%22M5.70746 7.99987L11.3539 2.35352C11.4453 2.25928 11.496 2.13287 11.495 2.00159C11.494 1.8703 11.4414 1.74467 11.3486 1.65183C11.2558 1.55899 11.1301 1.50639 10.9988 1.50539C10.8676 1.50438 10.7411 1.55506 10.6469 1.64647L4.64691 7.64647C4.55316 7.74023 4.50049 7.8674 4.50049 7.99999C4.50049 8.13259 4.55316 8.25975 4.64691 8.35352L10.6469 14.3535C10.6931 14.4011 10.7482 14.439 10.8092 14.4651C10.8702 14.4912 10.9357 14.5049 11.002 14.5054C11.0683 14.5059 11.134 14.4932 11.1954 14.468C11.2567 14.4429 11.3125 14.4058 11.3593 14.3589C11.4062 14.312 11.4433 14.2563 11.4685 14.1949C11.4936 14.1336 11.5063 14.0679 11.5058 14.0016C11.5053 13.9353 11.4916 13.8697 11.4655 13.8088C11.4394 13.7478 11.4015 13.6926 11.3539 13.6465L5.70746 7.99987Z%22 fill%3D%22black%22 fill-opacity%3D%220.95%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\")}.go-back-box{background:white;border-bottom:rgba(0,0,0,.2) 1px solid;height:60px;width:100%;line-height:60px;cursor:pointer}.go-back-box-container{width:95%;margin:auto;display:flex;justify-content:flex-start}.go-back-box-container .icon-webex-left-arrow,.go-back-box-container .go-back-title{display:block;height:60px}.go-back-box-container .go-back-title{line-height:61px}.go-back-title{display:inline-block;margin:0 10px}\n"] }]
2006
- }], ctorParameters: function () { return [{ type: UserService }, { type: APIService }]; }, propDecorators: { onSave: [{
2007
- type: Output
2008
- }], onChange: [{
2009
- type: Output
2010
- }], selectDevice: [{
2011
- type: Output
2012
- }], goBack: [{
2013
- type: Output
2014
- }], token: [{
2015
- type: Input
2016
- }], host: [{
2017
- type: Input
2018
- }], siteId: [{
2019
- type: Input
2020
- }], userId: [{
2021
- type: Input
2022
- }], deviceName: [{
2023
- type: Input
2024
- }], isLdap: [{
2025
- type: Input
1837
+ class UserManageWidgetComponent {
1838
+ get form() {
1839
+ return this.userService?.user?.form;
1840
+ }
1841
+ get user() {
1842
+ return this.userService.user;
1843
+ }
1844
+ get userName() {
1845
+ return `${this.user?.firstName || ''} ${this.user?.lastName || ''}`;
1846
+ }
1847
+ get lineAssociation() {
1848
+ return this.userService?.user?.devices[0].lineAssociations[0];
1849
+ }
1850
+ constructor(userService, apiService) {
1851
+ this.userService = userService;
1852
+ this.apiService = apiService;
1853
+ this.onSave = new EventEmitter();
1854
+ this.onChange = new EventEmitter();
1855
+ this.selectDevice = new EventEmitter();
1856
+ this.goBack = new EventEmitter();
1857
+ this.userService.onUserLineSaved$
1858
+ .subscribe(() => {
1859
+ this.userService.persistCacheChanges()
1860
+ .subscribe(() => {
1861
+ this.userService.dataPending = false;
1862
+ this.onSave.next("saved");
1863
+ });
1864
+ }, () => this.userService.dataPending = false);
1865
+ }
1866
+ ngOnInit() {
1867
+ this.apiService.token = this.token;
1868
+ this.apiService.apiUrl = this.host;
1869
+ this.getData();
1870
+ }
1871
+ onDeviceSelect(device) {
1872
+ this.selectDevice.emit(device.name);
1873
+ }
1874
+ onGoBack() {
1875
+ this.goBack.emit();
1876
+ }
1877
+ onExtensionChange() {
1878
+ this.onChange.next("start extension change..");
1879
+ }
1880
+ onChangeField(token) {
1881
+ this.onChange.next("start change..");
1882
+ if (!token) {
1883
+ return;
1884
+ }
1885
+ this.userService.user[token] = this.form?.get(token)?.value;
1886
+ if (token === 'middleName') {
1887
+ this.form?.get(token)?.setValidators([Validators.pattern('[ a-zA-Z-]+')]);
1888
+ }
1889
+ if (token === 'telephoneNumber' || token === 'mobileNumber' || token === 'pagerNumber' || token === 'homeNumber') {
1890
+ this.form?.get(token)?.setValidators([Validators.pattern('[ 0-9-+]+')]);
1891
+ }
1892
+ this.form?.get(token)?.updateValueAndValidity();
1893
+ this.validateUserId();
1894
+ }
1895
+ saveChanges() {
1896
+ if (!this.userService.hasUnsavedChanges() || this.form?.invalid) {
1897
+ return;
1898
+ }
1899
+ if (this.user.devices[0].lineAssociations[0] && !this.user.devices[0].lineAssociations[0].equals(this.userService.originUser.devices[0].lineAssociations[0])) {
1900
+ return this.userService.saveNewLine();
1901
+ }
1902
+ else {
1903
+ this.dataPending = true;
1904
+ const subscription = this.userService.persistCacheChanges()
1905
+ .subscribe(() => {
1906
+ this.dataPending = false;
1907
+ this.onSave.next("user has been saved successfully..");
1908
+ subscription.unsubscribe();
1909
+ }, () => this.dataPending = false);
1910
+ }
1911
+ }
1912
+ toggleEditMode() {
1913
+ this.userService.user.toggleEditMode();
1914
+ }
1915
+ isSavingDisabled() {
1916
+ return !this.userService.hasUnsavedChanges() || this.userService.hasExistedUserId;
1917
+ }
1918
+ changeField(token) {
1919
+ this.onChange.next("start change..");
1920
+ const formField = this.user?.form?.get(token);
1921
+ if (token !== 'confirmDigestCredentials') {
1922
+ // @ts-ignore
1923
+ this.user[token] = formField?.value;
1924
+ }
1925
+ if (token === 'digestCredentials' || token === 'confirmDigestCredentials') {
1926
+ this.digestCredentialsHandler(token, formField);
1927
+ }
1928
+ }
1929
+ digestCredentialsHandler(token, field) {
1930
+ const fieldNameToCompare = token === 'digestCredentials' ? 'confirmDigestCredentials' : 'digestCredentials';
1931
+ const fieldToCompare = this.userService.user.form.get(fieldNameToCompare);
1932
+ if (this.userService.user?.form?.get(token)) {
1933
+ this.userService.user?.form?.get(token)?.setErrors(null);
1934
+ this.userService.user?.form?.get(fieldNameToCompare)?.setErrors(null);
1935
+ /* if (!field.value && !fieldToCompare.value) {
1936
+ this.userService.user?.digestCredentials = null;
1937
+ return;
1938
+ }
1939
+
1940
+ if (!field.value && fieldToCompare.value || !fieldToCompare.value && field.value) {
1941
+ const requiredFieldName = field.value ? fieldNameToCompare : token;
1942
+ this.userService.user.form.get(requiredFieldName).setErrors({required: true});
1943
+ return;
1944
+ }
1945
+ if (field.value && fieldToCompare.value && field.value !== fieldToCompare.value) {
1946
+ this.userService.user.form.get(token).setErrors({mismatch: true});
1947
+ this.userService.user.form.get(fieldNameToCompare).setErrors({mismatch: true});
1948
+ }*/
1949
+ }
1950
+ }
1951
+ getData() {
1952
+ this.dataPending = true;
1953
+ this.userService.fetchUserToken(this.siteId, this.userId, this.isLdap)
1954
+ .subscribe({
1955
+ complete: (v) => {
1956
+ this.dataPending = false;
1957
+ },
1958
+ error: (e) => this.dataPending = false,
1959
+ });
1960
+ }
1961
+ setCookie(name, value, days) {
1962
+ var expires = "";
1963
+ if (days) {
1964
+ var date = new Date();
1965
+ date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
1966
+ expires = "; expires=" + date.toUTCString();
1967
+ }
1968
+ document.cookie = name + "=" + (value || "") + expires + "; path=/";
1969
+ }
1970
+ validateUserId() {
1971
+ const idControl = this.form.get('userid');
1972
+ if (idControl?.value !== '' && idControl?.value !== this.userService.originUser.userid) {
1973
+ this.userService.fetchUserById(idControl?.value)
1974
+ .subscribe((res) => {
1975
+ this.userService.userIdExistPending = false;
1976
+ idControl?.setErrors({ exist: true });
1977
+ if (this.form?.get('userid')?.hasError('exist')) {
1978
+ this.userService.hasExistedUserId = true;
1979
+ }
1980
+ else {
1981
+ this.userService.hasExistedUserId = false;
1982
+ }
1983
+ }, ((error) => {
1984
+ this.userService.userIdExistPending = false;
1985
+ if (error.status !== 404) {
1986
+ // this.notificationService.warning(this.translate.instant('APP_USER_MSG.CHECK_USER_ID_FAILED'));
1987
+ }
1988
+ else {
1989
+ this.userService.user.newUserId = this.form?.get('userid')?.value;
1990
+ }
1991
+ }));
1992
+ }
1993
+ else {
1994
+ // delete this.userService?.user?.newUserId;
1995
+ }
1996
+ }
1997
+ save() {
1998
+ this.saveChanges();
1999
+ }
2000
+ }
2001
+ UserManageWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageWidgetComponent, deps: [{ token: UserService }, { token: APIService }], target: i0.ɵɵFactoryTarget.Component });
2002
+ UserManageWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserManageWidgetComponent, selector: "app-user-manage-widget", inputs: { token: "token", host: "host", siteId: "siteId", userId: "userId", deviceName: "deviceName", isLdap: "isLdap" }, outputs: { onSave: "onSave", onChange: "onChange", selectDevice: "selectDevice", goBack: "goBack" }, ngImport: i0, template: "<app-loader *ngIf=\"dataPending || userService.dataPending\"></app-loader>\r\n\r\n<div *ngIf=\"!dataPending\">\r\n <div class=\"go-back-box\" (click)=\"onGoBack()\">\r\n <div class=\"go-back-box-container\">\r\n <span class=\"app-icon icon-webex-left-arrow\"></span>\r\n <span class=\"go-back-title\">Users</span>\r\n </div>\r\n </div>\r\n\r\n <app-user-info *ngIf=\"user\" [name]=\"userName\" [email]=\"user.email\" [active]=\"true\"\r\n [position]=\"'Member of ' + user.siteName\"></app-user-info>\r\n\r\n <mat-tab-group disableRipple class=\"content-box\">\r\n <mat-tab label=\"Profile\">\r\n <ng-container *ngTemplateOutlet=\"userProfile\">\r\n </ng-container>\r\n </mat-tab>\r\n <mat-tab label=\"Calling\" [disabled]=\"!lineAssociation\">\r\n <app-user-calling *ngIf=\"lineAssociation\" [siteId]=\"siteId\"\r\n (onExtensionChange)=\"onExtensionChange()\"></app-user-calling>\r\n </mat-tab>\r\n <mat-tab label=\"Devices\">\r\n <app-device-list [devices]=\"user?.devices\" (onDeviceSelect)=\"onDeviceSelect($event)\"></app-device-list>\r\n </mat-tab>\r\n <mat-tab label=\"Lines\" [disabled]=\"true\"></mat-tab>\r\n <mat-tab label=\"Features\" [disabled]=\"true\"></mat-tab>\r\n </mat-tab-group>\r\n\r\n <ng-template #userProfile>\r\n <form *ngIf=\"user && form\" [formGroup]=\"form\">\r\n <div class=\"info-boxes-container\">\r\n <!-- USER INFO BOX-->\r\n <div class=\"user-info-box user-details-box\">\r\n <h3 class=\"user-box-title\">User Details</h3>\r\n <div class=\"form-holder__inputs\">\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">User Id</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"userid\" matInput (input)=\"onChangeField('userid')\">\r\n <mat-error\r\n *ngIf=\"form.get('userid').hasError('required')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field is required\r\n </mat-error>\r\n <mat-error *ngIf=\"form.get('userid').hasError('exist')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n User ID already exists\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Email</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"email\" matInput (input)=\"onChangeField('email')\">\r\n <mat-error\r\n *ngIf=\"form.get('email').touched && form.get('email').hasError('required')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field is required\r\n </mat-error>\r\n <mat-error *ngIf=\"form.get('email').touched && form.get('email').hasError('pattern')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n Please enter valid email\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Fisrt Name</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"firstName\" matInput (input)=\"onChangeField('firstName')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Last Name</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"lastName\" matInput (input)=\"onChangeField('lastName')\">\r\n <mat-error\r\n *ngIf=\"form.get('lastName').touched && form.get('lastName').hasError('required')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n <!-- USER INFO BOX-->\r\n <div class=\"user-info-box user-details-box\">\r\n <h3 class=\"user-box-title\">General User Info</h3>\r\n <div class=\"form-holder__inputs\">\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Department</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"department\" matInput type=\"text\" (input)=\"onChangeField('department')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Manager user ID</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"manager\" matInput type=\"text\" (input)=\"onChangeField('manager')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Associated PC</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"associatedPc\" matInput type=\"text\" (input)=\"onChangeField('associatedPc')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Digest credentials</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"digestCredentials\" matInput type=\"text\"\r\n (input)=\"onChangeField('digestCredentials')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">User profile</div>\r\n <div class=\"input-holder__input\">\r\n <app-lazy-loading-select\r\n [siteId]=\"siteId\"\r\n [controlName]=\"'userProfile'\"\r\n [form]=\"user.form\"\r\n (changeField)=\"changeField('userProfile')\"\r\n [optionsToken]=\"'userProfiles'\"\r\n ></app-lazy-loading-select>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Mobile voice access</div>\r\n <div class=\"input-holder__input\">\r\n <mat-slide-toggle\r\n formControlName=\"enableMobileVoiceAccess\"\r\n (change)=\"onChangeField('enableMobileVoiceAccess')\"\r\n [checked]=\"user.enableMobileVoiceAccess\">\r\n </mat-slide-toggle>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Userlocale</div>\r\n <div class=\"input-holder__input\">\r\n <app-lazy-loading-select\r\n [siteId]=\"siteId\"\r\n [controlName]=\"'userLocale'\"\r\n [form]=\"user.form\"\r\n (changeField)=\"changeField($event)\"\r\n [optionsToken]=\"'userLocales'\"\r\n [default]=\"{key: '', value: 'None', disabled: false}\">\r\n </app-lazy-loading-select>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Confirm digest credentials</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"confirmDigestCredentials\" matInput type=\"text\"\r\n (input)=\"onChangeField('confirmDigestCredentials')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- USER INFO BOX-->\r\n <div class=\"user-info-box user-details-box\">\r\n <h3 class=\"user-box-title\">Contact Information</h3>\r\n <div class=\"form-holder__inputs\">\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Middle Name</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" formControlName=\"middleName\" (input)=\"onChangeField('middleName')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Telephone Number</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" formControlName=\"telephoneNumber\"\r\n (input)=\"onChangeField('telephoneNumber')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Mobile Number</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" formControlName=\"mobileNumber\" (input)=\"onChangeField('mobileNumber')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Digest credentials</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" formControlName=\"digestCredentials\"\r\n (input)=\"onChangeField('digestCredentials')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Diractory URI</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" formControlName=\"directoryUri\" (input)=\"onChangeField('directoryUri')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Title</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" formControlName=\"title\" (input)=\"onChangeField('title')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Home Number</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" formControlName=\"homeNumber\" (input)=\"onChangeField('homeNumber')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Pager Number</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" formControlName=\"pagerNumber\" (input)=\"onChangeField('pagerNumber')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Display Name</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" formControlName=\"displayName\" (input)=\"onChangeField('displayName')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n </form>\r\n </ng-template>\r\n</div>\r\n\r\n<!--<mat-progress-spinner *ngIf=\"dataPending\"-->\r\n<!-- class=\"page-spinner\"-->\r\n<!-- mode=\"indeterminate\"-->\r\n<!-- [diameter]=\"120\"></mat-progress-spinner>-->\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-webex-user{background-image:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22a%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 16.67 15.56%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%232c355d%3Bstroke-width%3A1.4px%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath class%3D%22b%22 d%3D%22M4.87%2C3.89c0-1.72%2C1.51-3.19%2C3.47-3.19s3.47%2C1.47%2C3.47%2C3.19-1.51%2C3.19-3.47%2C3.19-3.47-1.47-3.47-3.19ZM.7%2C12.64c0-.37%2C.19-.76%2C.67-1.17%2C.48-.41%2C1.17-.78%2C2-1.09%2C1.66-.62%2C3.66-.93%2C4.97-.93s3.31%2C.31%2C4.97%2C.93c.83%2C.31%2C1.52%2C.68%2C2%2C1.09%2C.47%2C.41%2C.67%2C.8%2C.67%2C1.17v2.22H.7v-2.22Z%22%2F%3E%3C%2Fsvg%3E\")}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:95%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:gray!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.spinner-container{width:100%;display:flex;justify-content:center;align-items:center}.spinner-container ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#000}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}table{border-collapse:collapse;border-spacing:0}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}.mat-divider{margin:12px 0}::ng-deep .mat-form-field-wrapper{height:30px}::ng-deep .mat-form-field-flex{height:30px}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{height:35px}:ng-deep .mat-form-field-outline .mat-form-field-outline-thick{height:35px}::ng-deep .mat-select{line-height:20px}::ng-deep .mat-form-field-infix{border-top:0px!important}::ng-deep .mat-tab-group{font-family:Inter,sans-serif}::ng-deep .mat-tab-label{font-weight:500!important;font-size:16px!important;height:auto!important;min-width:auto!important;padding:0!important;opacity:1!important;color:#000!important}::ng-deep .mat-ink-bar{background-color:#000!important;height:3px!important}::ng-deep .mat-tab-labels{gap:30px}::ng-deep .mat-progress-spinner{position:absolute!important;top:40%;left:45%}.app-icon{height:20px;width:20px;display:inline-block;cursor:pointer;background-repeat:no-repeat;background-position:center}.app-icon{transition:all .15s ease-out}.icon-webex-right-arrow{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2220%22 height%3D%2220%22 viewBox%3D%220 0 20 20%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg id%3D%22arrow-right%22%3E%3Cpath id%3D%22Vector%22 d%3D%22M14.0812 9.66902L6.58119 2.16902C6.53813 2.12351 6.48638 2.0871 6.429 2.06193C6.37162 2.03677 6.30978 2.02336 6.24713 2.0225C6.18448 2.02165 6.1223 2.03336 6.06425 2.05695C6.00621 2.08053 5.95348 2.11552 5.90919 2.15983C5.8649 2.20415 5.82994 2.25689 5.80638 2.31495C5.78282 2.373 5.77113 2.43519 5.77202 2.49784C5.77291 2.56049 5.78634 2.62232 5.81153 2.67969C5.83673 2.73705 5.87316 2.78879 5.91869 2.83183L13.0874 10.0003L5.91869 17.169C5.87316 17.2121 5.83673 17.2638 5.81153 17.3212C5.78634 17.3785 5.77291 17.4404 5.77202 17.503C5.77113 17.5657 5.78282 17.6279 5.80638 17.6859C5.82994 17.744 5.8649 17.7967 5.90919 17.841C5.95348 17.8853 6.00621 17.9203 6.06425 17.9439C6.1223 17.9675 6.18448 17.9792 6.24713 17.9783C6.30978 17.9775 6.37162 17.9641 6.429 17.9389C6.48638 17.9138 6.53813 17.8773 6.58119 17.8318L14.0812 10.3318C14.1691 10.2439 14.2184 10.1247 14.2184 10.0004C14.2184 9.87613 14.1691 9.75692 14.0812 9.66902Z%22 fill%3D%22%230F0F0F%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\")}.icon-webex-left-arrow{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2216%22 height%3D%2216%22 viewBox%3D%220 0 16 16%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg id%3D%22arrow-left%22%3E%3Cpath id%3D%22Vector%22 d%3D%22M5.70746 7.99987L11.3539 2.35352C11.4453 2.25928 11.496 2.13287 11.495 2.00159C11.494 1.8703 11.4414 1.74467 11.3486 1.65183C11.2558 1.55899 11.1301 1.50639 10.9988 1.50539C10.8676 1.50438 10.7411 1.55506 10.6469 1.64647L4.64691 7.64647C4.55316 7.74023 4.50049 7.8674 4.50049 7.99999C4.50049 8.13259 4.55316 8.25975 4.64691 8.35352L10.6469 14.3535C10.6931 14.4011 10.7482 14.439 10.8092 14.4651C10.8702 14.4912 10.9357 14.5049 11.002 14.5054C11.0683 14.5059 11.134 14.4932 11.1954 14.468C11.2567 14.4429 11.3125 14.4058 11.3593 14.3589C11.4062 14.312 11.4433 14.2563 11.4685 14.1949C11.4936 14.1336 11.5063 14.0679 11.5058 14.0016C11.5053 13.9353 11.4916 13.8697 11.4655 13.8088C11.4394 13.7478 11.4015 13.6926 11.3539 13.6465L5.70746 7.99987Z%22 fill%3D%22black%22 fill-opacity%3D%220.95%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\")}.go-back-box{background:white;border-bottom:rgba(0,0,0,.2) 1px solid;height:60px;width:100%;line-height:60px;cursor:pointer}.go-back-box-container{width:95%;margin:auto;display:flex;justify-content:flex-start}.go-back-box-container .icon-webex-left-arrow,.go-back-box-container .go-back-title{display:block;height:60px}.go-back-box-container .go-back-title{line-height:61px}.go-back-title{display:inline-block;margin:0 10px}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i6$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i8$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { kind: "component", type: i8$1.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: i2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { kind: "component", type: AppLoaderComponent, selector: "app-loader" }, { kind: "component", type: UserInfoComponent, selector: "app-user-info", inputs: ["name", "active", "email", "position"] }, { kind: "component", type: LazyLoadingSelectComponent, selector: "app-lazy-loading-select", inputs: ["siteId", "form", "standalone", "placeholder", "controlName", "optionsToken", "appearance", "errorCode", "errorText", "default", "id"], outputs: ["changeField"] }, { kind: "component", type: UserCallingComponent, selector: "app-user-calling", inputs: ["siteId", "userId"], outputs: ["onExtensionChange"] }, { kind: "component", type: DeviceListComponent, selector: "app-device-list", inputs: ["devices"], outputs: ["onDeviceSelect"] }] });
2003
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageWidgetComponent, decorators: [{
2004
+ type: Component,
2005
+ args: [{ selector: 'app-user-manage-widget', template: "<app-loader *ngIf=\"dataPending || userService.dataPending\"></app-loader>\r\n\r\n<div *ngIf=\"!dataPending\">\r\n <div class=\"go-back-box\" (click)=\"onGoBack()\">\r\n <div class=\"go-back-box-container\">\r\n <span class=\"app-icon icon-webex-left-arrow\"></span>\r\n <span class=\"go-back-title\">Users</span>\r\n </div>\r\n </div>\r\n\r\n <app-user-info *ngIf=\"user\" [name]=\"userName\" [email]=\"user.email\" [active]=\"true\"\r\n [position]=\"'Member of ' + user.siteName\"></app-user-info>\r\n\r\n <mat-tab-group disableRipple class=\"content-box\">\r\n <mat-tab label=\"Profile\">\r\n <ng-container *ngTemplateOutlet=\"userProfile\">\r\n </ng-container>\r\n </mat-tab>\r\n <mat-tab label=\"Calling\" [disabled]=\"!lineAssociation\">\r\n <app-user-calling *ngIf=\"lineAssociation\" [siteId]=\"siteId\"\r\n (onExtensionChange)=\"onExtensionChange()\"></app-user-calling>\r\n </mat-tab>\r\n <mat-tab label=\"Devices\">\r\n <app-device-list [devices]=\"user?.devices\" (onDeviceSelect)=\"onDeviceSelect($event)\"></app-device-list>\r\n </mat-tab>\r\n <mat-tab label=\"Lines\" [disabled]=\"true\"></mat-tab>\r\n <mat-tab label=\"Features\" [disabled]=\"true\"></mat-tab>\r\n </mat-tab-group>\r\n\r\n <ng-template #userProfile>\r\n <form *ngIf=\"user && form\" [formGroup]=\"form\">\r\n <div class=\"info-boxes-container\">\r\n <!-- USER INFO BOX-->\r\n <div class=\"user-info-box user-details-box\">\r\n <h3 class=\"user-box-title\">User Details</h3>\r\n <div class=\"form-holder__inputs\">\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">User Id</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"userid\" matInput (input)=\"onChangeField('userid')\">\r\n <mat-error\r\n *ngIf=\"form.get('userid').hasError('required')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field is required\r\n </mat-error>\r\n <mat-error *ngIf=\"form.get('userid').hasError('exist')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n User ID already exists\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Email</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"email\" matInput (input)=\"onChangeField('email')\">\r\n <mat-error\r\n *ngIf=\"form.get('email').touched && form.get('email').hasError('required')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field is required\r\n </mat-error>\r\n <mat-error *ngIf=\"form.get('email').touched && form.get('email').hasError('pattern')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n Please enter valid email\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Fisrt Name</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"firstName\" matInput (input)=\"onChangeField('firstName')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Last Name</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"lastName\" matInput (input)=\"onChangeField('lastName')\">\r\n <mat-error\r\n *ngIf=\"form.get('lastName').touched && form.get('lastName').hasError('required')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n <!-- USER INFO BOX-->\r\n <div class=\"user-info-box user-details-box\">\r\n <h3 class=\"user-box-title\">General User Info</h3>\r\n <div class=\"form-holder__inputs\">\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Department</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"department\" matInput type=\"text\" (input)=\"onChangeField('department')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Manager user ID</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"manager\" matInput type=\"text\" (input)=\"onChangeField('manager')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Associated PC</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"associatedPc\" matInput type=\"text\" (input)=\"onChangeField('associatedPc')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Digest credentials</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"digestCredentials\" matInput type=\"text\"\r\n (input)=\"onChangeField('digestCredentials')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">User profile</div>\r\n <div class=\"input-holder__input\">\r\n <app-lazy-loading-select\r\n [siteId]=\"siteId\"\r\n [controlName]=\"'userProfile'\"\r\n [form]=\"user.form\"\r\n (changeField)=\"changeField('userProfile')\"\r\n [optionsToken]=\"'userProfiles'\"\r\n ></app-lazy-loading-select>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Mobile voice access</div>\r\n <div class=\"input-holder__input\">\r\n <mat-slide-toggle\r\n formControlName=\"enableMobileVoiceAccess\"\r\n (change)=\"onChangeField('enableMobileVoiceAccess')\"\r\n [checked]=\"user.enableMobileVoiceAccess\">\r\n </mat-slide-toggle>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Userlocale</div>\r\n <div class=\"input-holder__input\">\r\n <app-lazy-loading-select\r\n [siteId]=\"siteId\"\r\n [controlName]=\"'userLocale'\"\r\n [form]=\"user.form\"\r\n (changeField)=\"changeField($event)\"\r\n [optionsToken]=\"'userLocales'\"\r\n [default]=\"{key: '', value: 'None', disabled: false}\">\r\n </app-lazy-loading-select>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Confirm digest credentials</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"confirmDigestCredentials\" matInput type=\"text\"\r\n (input)=\"onChangeField('confirmDigestCredentials')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- USER INFO BOX-->\r\n <div class=\"user-info-box user-details-box\">\r\n <h3 class=\"user-box-title\">Contact Information</h3>\r\n <div class=\"form-holder__inputs\">\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Middle Name</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" formControlName=\"middleName\" (input)=\"onChangeField('middleName')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Telephone Number</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" formControlName=\"telephoneNumber\"\r\n (input)=\"onChangeField('telephoneNumber')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Mobile Number</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" formControlName=\"mobileNumber\" (input)=\"onChangeField('mobileNumber')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Digest credentials</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" formControlName=\"digestCredentials\"\r\n (input)=\"onChangeField('digestCredentials')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Diractory URI</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" formControlName=\"directoryUri\" (input)=\"onChangeField('directoryUri')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Title</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" formControlName=\"title\" (input)=\"onChangeField('title')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Home Number</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" formControlName=\"homeNumber\" (input)=\"onChangeField('homeNumber')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Pager Number</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" formControlName=\"pagerNumber\" (input)=\"onChangeField('pagerNumber')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Display Name</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" formControlName=\"displayName\" (input)=\"onChangeField('displayName')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n </form>\r\n </ng-template>\r\n</div>\r\n\r\n<!--<mat-progress-spinner *ngIf=\"dataPending\"-->\r\n<!-- class=\"page-spinner\"-->\r\n<!-- mode=\"indeterminate\"-->\r\n<!-- [diameter]=\"120\"></mat-progress-spinner>-->\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-webex-user{background-image:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22a%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 16.67 15.56%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%232c355d%3Bstroke-width%3A1.4px%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath class%3D%22b%22 d%3D%22M4.87%2C3.89c0-1.72%2C1.51-3.19%2C3.47-3.19s3.47%2C1.47%2C3.47%2C3.19-1.51%2C3.19-3.47%2C3.19-3.47-1.47-3.47-3.19ZM.7%2C12.64c0-.37%2C.19-.76%2C.67-1.17%2C.48-.41%2C1.17-.78%2C2-1.09%2C1.66-.62%2C3.66-.93%2C4.97-.93s3.31%2C.31%2C4.97%2C.93c.83%2C.31%2C1.52%2C.68%2C2%2C1.09%2C.47%2C.41%2C.67%2C.8%2C.67%2C1.17v2.22H.7v-2.22Z%22%2F%3E%3C%2Fsvg%3E\")}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:95%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:gray!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.spinner-container{width:100%;display:flex;justify-content:center;align-items:center}.spinner-container ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#000}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}table{border-collapse:collapse;border-spacing:0}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}.mat-divider{margin:12px 0}::ng-deep .mat-form-field-wrapper{height:30px}::ng-deep .mat-form-field-flex{height:30px}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{height:35px}:ng-deep .mat-form-field-outline .mat-form-field-outline-thick{height:35px}::ng-deep .mat-select{line-height:20px}::ng-deep .mat-form-field-infix{border-top:0px!important}::ng-deep .mat-tab-group{font-family:Inter,sans-serif}::ng-deep .mat-tab-label{font-weight:500!important;font-size:16px!important;height:auto!important;min-width:auto!important;padding:0!important;opacity:1!important;color:#000!important}::ng-deep .mat-ink-bar{background-color:#000!important;height:3px!important}::ng-deep .mat-tab-labels{gap:30px}::ng-deep .mat-progress-spinner{position:absolute!important;top:40%;left:45%}.app-icon{height:20px;width:20px;display:inline-block;cursor:pointer;background-repeat:no-repeat;background-position:center}.app-icon{transition:all .15s ease-out}.icon-webex-right-arrow{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2220%22 height%3D%2220%22 viewBox%3D%220 0 20 20%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg id%3D%22arrow-right%22%3E%3Cpath id%3D%22Vector%22 d%3D%22M14.0812 9.66902L6.58119 2.16902C6.53813 2.12351 6.48638 2.0871 6.429 2.06193C6.37162 2.03677 6.30978 2.02336 6.24713 2.0225C6.18448 2.02165 6.1223 2.03336 6.06425 2.05695C6.00621 2.08053 5.95348 2.11552 5.90919 2.15983C5.8649 2.20415 5.82994 2.25689 5.80638 2.31495C5.78282 2.373 5.77113 2.43519 5.77202 2.49784C5.77291 2.56049 5.78634 2.62232 5.81153 2.67969C5.83673 2.73705 5.87316 2.78879 5.91869 2.83183L13.0874 10.0003L5.91869 17.169C5.87316 17.2121 5.83673 17.2638 5.81153 17.3212C5.78634 17.3785 5.77291 17.4404 5.77202 17.503C5.77113 17.5657 5.78282 17.6279 5.80638 17.6859C5.82994 17.744 5.8649 17.7967 5.90919 17.841C5.95348 17.8853 6.00621 17.9203 6.06425 17.9439C6.1223 17.9675 6.18448 17.9792 6.24713 17.9783C6.30978 17.9775 6.37162 17.9641 6.429 17.9389C6.48638 17.9138 6.53813 17.8773 6.58119 17.8318L14.0812 10.3318C14.1691 10.2439 14.2184 10.1247 14.2184 10.0004C14.2184 9.87613 14.1691 9.75692 14.0812 9.66902Z%22 fill%3D%22%230F0F0F%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\")}.icon-webex-left-arrow{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2216%22 height%3D%2216%22 viewBox%3D%220 0 16 16%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg id%3D%22arrow-left%22%3E%3Cpath id%3D%22Vector%22 d%3D%22M5.70746 7.99987L11.3539 2.35352C11.4453 2.25928 11.496 2.13287 11.495 2.00159C11.494 1.8703 11.4414 1.74467 11.3486 1.65183C11.2558 1.55899 11.1301 1.50639 10.9988 1.50539C10.8676 1.50438 10.7411 1.55506 10.6469 1.64647L4.64691 7.64647C4.55316 7.74023 4.50049 7.8674 4.50049 7.99999C4.50049 8.13259 4.55316 8.25975 4.64691 8.35352L10.6469 14.3535C10.6931 14.4011 10.7482 14.439 10.8092 14.4651C10.8702 14.4912 10.9357 14.5049 11.002 14.5054C11.0683 14.5059 11.134 14.4932 11.1954 14.468C11.2567 14.4429 11.3125 14.4058 11.3593 14.3589C11.4062 14.312 11.4433 14.2563 11.4685 14.1949C11.4936 14.1336 11.5063 14.0679 11.5058 14.0016C11.5053 13.9353 11.4916 13.8697 11.4655 13.8088C11.4394 13.7478 11.4015 13.6926 11.3539 13.6465L5.70746 7.99987Z%22 fill%3D%22black%22 fill-opacity%3D%220.95%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\")}.go-back-box{background:white;border-bottom:rgba(0,0,0,.2) 1px solid;height:60px;width:100%;line-height:60px;cursor:pointer}.go-back-box-container{width:95%;margin:auto;display:flex;justify-content:flex-start}.go-back-box-container .icon-webex-left-arrow,.go-back-box-container .go-back-title{display:block;height:60px}.go-back-box-container .go-back-title{line-height:61px}.go-back-title{display:inline-block;margin:0 10px}\n"] }]
2006
+ }], ctorParameters: function () { return [{ type: UserService }, { type: APIService }]; }, propDecorators: { onSave: [{
2007
+ type: Output
2008
+ }], onChange: [{
2009
+ type: Output
2010
+ }], selectDevice: [{
2011
+ type: Output
2012
+ }], goBack: [{
2013
+ type: Output
2014
+ }], token: [{
2015
+ type: Input
2016
+ }], host: [{
2017
+ type: Input
2018
+ }], siteId: [{
2019
+ type: Input
2020
+ }], userId: [{
2021
+ type: Input
2022
+ }], deviceName: [{
2023
+ type: Input
2024
+ }], isLdap: [{
2025
+ type: Input
2026
2026
  }] } });
2027
2027
 
2028
- class UserManageModule {
2029
- }
2030
- UserManageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2031
- UserManageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, declarations: [AppLoaderComponent,
2032
- UserInfoComponent,
2033
- NotificationsComponent,
2034
- PaginationComponent,
2035
- LazyLoadingSelectComponent,
2036
- UserManageWidgetComponent,
2037
- UserCallingComponent,
2038
- UserCallingExtensionComponent,
2039
- DeviceListComponent], imports: [CommonModule,
2040
- BrowserModule,
2041
- BrowserAnimationsModule,
2042
- FormsModule,
2043
- ReactiveFormsModule,
2044
- HttpClientModule,
2045
- MaterialModule], exports: [UserManageWidgetComponent] });
2046
- UserManageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, providers: [
2047
- APIService,
2048
- UserService,
2049
- NotificationService,
2050
- UsersSearchService,
2051
- RemoveKynFromIBMService,
2052
- SiteSettingsService,
2053
- DnsService,
2054
- LineService,
2055
- { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
2056
- ], imports: [CommonModule,
2057
- BrowserModule,
2058
- BrowserAnimationsModule,
2059
- FormsModule,
2060
- ReactiveFormsModule,
2061
- HttpClientModule,
2062
- MaterialModule] });
2063
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, decorators: [{
2064
- type: NgModule,
2065
- args: [{
2066
- declarations: [
2067
- AppLoaderComponent,
2068
- UserInfoComponent,
2069
- NotificationsComponent,
2070
- PaginationComponent,
2071
- LazyLoadingSelectComponent,
2072
- UserManageWidgetComponent,
2073
- UserCallingComponent,
2074
- UserCallingExtensionComponent,
2075
- DeviceListComponent
2076
- ],
2077
- imports: [
2078
- CommonModule,
2079
- BrowserModule,
2080
- BrowserAnimationsModule,
2081
- FormsModule,
2082
- ReactiveFormsModule,
2083
- HttpClientModule,
2084
- MaterialModule,
2085
- ],
2086
- providers: [
2087
- APIService,
2088
- UserService,
2089
- NotificationService,
2090
- UsersSearchService,
2091
- RemoveKynFromIBMService,
2092
- SiteSettingsService,
2093
- DnsService,
2094
- LineService,
2095
- { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
2096
- ],
2097
- exports: [UserManageWidgetComponent]
2098
- }]
2028
+ class UserManageModule {
2029
+ }
2030
+ UserManageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2031
+ UserManageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, declarations: [AppLoaderComponent,
2032
+ UserInfoComponent,
2033
+ NotificationsComponent,
2034
+ PaginationComponent,
2035
+ LazyLoadingSelectComponent,
2036
+ UserManageWidgetComponent,
2037
+ UserCallingComponent,
2038
+ UserCallingExtensionComponent,
2039
+ DeviceListComponent], imports: [CommonModule,
2040
+ BrowserModule,
2041
+ BrowserAnimationsModule,
2042
+ FormsModule,
2043
+ ReactiveFormsModule,
2044
+ HttpClientModule,
2045
+ MaterialModule], exports: [UserManageWidgetComponent] });
2046
+ UserManageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, providers: [
2047
+ APIService,
2048
+ UserService,
2049
+ NotificationService,
2050
+ UsersSearchService,
2051
+ RemoveKynFromIBMService,
2052
+ SiteSettingsService,
2053
+ DnsService,
2054
+ LineService,
2055
+ { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
2056
+ ], imports: [CommonModule,
2057
+ BrowserModule,
2058
+ BrowserAnimationsModule,
2059
+ FormsModule,
2060
+ ReactiveFormsModule,
2061
+ HttpClientModule,
2062
+ MaterialModule] });
2063
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, decorators: [{
2064
+ type: NgModule,
2065
+ args: [{
2066
+ declarations: [
2067
+ AppLoaderComponent,
2068
+ UserInfoComponent,
2069
+ NotificationsComponent,
2070
+ PaginationComponent,
2071
+ LazyLoadingSelectComponent,
2072
+ UserManageWidgetComponent,
2073
+ UserCallingComponent,
2074
+ UserCallingExtensionComponent,
2075
+ DeviceListComponent
2076
+ ],
2077
+ imports: [
2078
+ CommonModule,
2079
+ BrowserModule,
2080
+ BrowserAnimationsModule,
2081
+ FormsModule,
2082
+ ReactiveFormsModule,
2083
+ HttpClientModule,
2084
+ MaterialModule,
2085
+ ],
2086
+ providers: [
2087
+ APIService,
2088
+ UserService,
2089
+ NotificationService,
2090
+ UsersSearchService,
2091
+ RemoveKynFromIBMService,
2092
+ SiteSettingsService,
2093
+ DnsService,
2094
+ LineService,
2095
+ { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
2096
+ ],
2097
+ exports: [UserManageWidgetComponent]
2098
+ }]
2099
2099
  }] });
2100
2100
 
2101
- /**
2102
- * Generated bundle index. Do not edit.
2101
+ /**
2102
+ * Generated bundle index. Do not edit.
2103
2103
  */
2104
2104
 
2105
2105
  export { APIService, SiteSettingsService, UserManageModule, UserManageWidgetComponent, UserService, UtilsService };