@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,2080 +43,2080 @@ 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
- var _a;
391
- this.lineAssociationsHasChanges = false;
392
- this.plarService = false;
393
- if (device) {
394
- this.name = device.name;
395
- this.pkiid = device.pkiid;
396
- this.deviceType = device.deviceType;
397
- this.protocol = device.protocol;
398
- this.description = device.description;
399
- this.buttonTemplate = device.buttonTemplate;
400
- this.softkeyTemplate = device.softkeyTemplate;
401
- this.devicePoolName = device.devicePoolName;
402
- this.location = device.location;
403
- this.firmwareVersion = device.firmwareVersion;
404
- this.plarService = device.plarService;
405
- this.callingSearchSpaceName = device.callingSearchSpaceName;
406
- this.registrationStatus = 'Unknown'; // TEMP for demo
407
- this.ipAddress = 'None'; // TEMP for demo
408
- this.lineAssociations = ((_a = device.lineAssociations) === null || _a === void 0 ? void 0 : _a.length) ?
409
- device.lineAssociations.map((line) => new LineAssociation(line)) : [];
410
- }
411
- }
412
- getSavableData() {
413
- const excludedFields = ['form'];
414
- return getSavableData(this, excludedFields);
415
- }
416
- }
417
- var RecordingOptions;
418
- (function (RecordingOptions) {
419
- RecordingOptions["disabled"] = "Call Recording Disabled";
420
- RecordingOptions["auto_enabled"] = "Automatic Call Recording Enabled";
421
- RecordingOptions["selective_enabled"] = "Selective Call Recording Enabled";
388
+ class Device {
389
+ constructor(device) {
390
+ var _a;
391
+ this.lineAssociationsHasChanges = false;
392
+ this.plarService = false;
393
+ if (device) {
394
+ this.name = device.name;
395
+ this.pkiid = device.pkiid;
396
+ this.deviceType = device.deviceType;
397
+ this.protocol = device.protocol;
398
+ this.description = device.description;
399
+ this.buttonTemplate = device.buttonTemplate;
400
+ this.softkeyTemplate = device.softkeyTemplate;
401
+ this.devicePoolName = device.devicePoolName;
402
+ this.location = device.location;
403
+ this.firmwareVersion = device.firmwareVersion;
404
+ this.plarService = device.plarService;
405
+ this.callingSearchSpaceName = device.callingSearchSpaceName;
406
+ this.registrationStatus = 'Unknown'; // TEMP for demo
407
+ this.ipAddress = 'None'; // TEMP for demo
408
+ this.lineAssociations = ((_a = device.lineAssociations) === null || _a === void 0 ? void 0 : _a.length) ?
409
+ device.lineAssociations.map((line) => new LineAssociation(line)) : [];
410
+ }
411
+ }
412
+ getSavableData() {
413
+ const excludedFields = ['form'];
414
+ return getSavableData(this, excludedFields);
415
+ }
416
+ }
417
+ var RecordingOptions;
418
+ (function (RecordingOptions) {
419
+ RecordingOptions["disabled"] = "Call Recording Disabled";
420
+ RecordingOptions["auto_enabled"] = "Automatic Call Recording Enabled";
421
+ RecordingOptions["selective_enabled"] = "Selective Call Recording Enabled";
422
422
  })(RecordingOptions || (RecordingOptions = {}));
423
423
 
424
- class SimplifiedUser {
425
- constructor(user, isLdap) {
426
- // isLdap TEMP because of token response issue
427
- if (user) {
428
- this.userid = user.userid;
429
- this.email = user.email;
430
- this.firstName = user.firstName;
431
- this.lastName = user.lastName;
432
- this.siteId = user.siteId;
433
- this.siteName = user.siteName;
434
- this.token = user.token;
435
- this.department = user.department;
436
- this.manager = user.manager;
437
- this.associatedPc = user.associatedPc;
438
- this.digestCredentials = user.digestCredentials;
439
- this.userProfile = user.userProfile;
440
- this.enableMobileVoiceAccess = user.enableMobileVoiceAccess;
441
- this.ldapIntegrated = user.ldapIntegrated || isLdap || false;
442
- this.userLocale = user.userLocale;
443
- this.confirmDigestCredentials = user.confirmDigestCredentials;
444
- this.middleName = user.middleName;
445
- this.telephoneNumber = user.telephoneNumber;
446
- this.mobileNumber = user.mobileNumber;
447
- this.directoryUri = user.directoryUri;
448
- this.title = user.title;
449
- this.homeNumber = user.homeNumber;
450
- this.pagerNumber = user.pagerNumber;
451
- this.displayName = user.displayName;
452
- if (user.devices && user.devices.length) {
453
- this.devices = user.devices.map((device) => new Device(device));
454
- if (user.lines && user.lines.length) {
455
- this.devices.forEach(device => {
456
- if (device && device.lineAssociations && device.lineAssociations.length) {
457
- device.lineAssociations.forEach(lineAssociation => {
458
- lineAssociation.callingSearchSpace = this.getLineVal(lineAssociation, user.lines, 'callingSearchSpace');
459
- lineAssociation.textLabel = lineAssociation.textLabel || this.getLineVal(lineAssociation, user.lines, 'textLabel') || '';
460
- lineAssociation.alertingName = lineAssociation.alertingName || this.getLineVal(lineAssociation, user.lines, 'alertingName') || '';
461
- });
462
- }
463
- });
464
- }
465
- }
466
- }
467
- this.initForm();
468
- }
469
- getLineVal(lineAssociation, lines, token) {
470
- const lineForVal = lines.find((line) => line.directoryNumber.directoryNumber === lineAssociation.directoryNumber.directoryNumber);
471
- return lineForVal && lineForVal[token] || '';
472
- }
473
- getUserDetailsSavableData() {
474
- const excludedFields = ['devices', 'deviceProfiles', 'lines', 'singleNumberReach', 'vmPassword', 'vmUnifiedMessagingAccount', 'alternateExtensions', 'callerInput', 'lineAppearances', 'meetMes', 'webAppPasswordSettings', 'form'];
475
- return getSavableData(this, excludedFields);
476
- }
477
- initForm() {
478
- const formBuilder = new FormBuilder();
479
- const formSettings = {
480
- userid: [{ value: this.userid || '', disabled: this.ldapIntegrated }, [Validators.required, Validators.maxLength(128)]],
481
- email: [{ value: this.email || '', disabled: this.ldapIntegrated }, [
482
- Validators.pattern(REGEX_PATTERN.EMAIL),
483
- Validators.required
484
- ]],
485
- firstName: [{ value: this.firstName || '', disabled: this.ldapIntegrated }],
486
- lastName: [{ value: this.lastName || '', disabled: this.ldapIntegrated }, Validators.required],
487
- department: [{ value: this.department || '', disabled: false }],
488
- middleName: [{ value: this.middleName || '', disabled: false }],
489
- title: [{ value: this.title || '', disabled: false }],
490
- telephoneNumber: [{ value: this.telephoneNumber || '', disabled: false }],
491
- homeNumber: [{ value: this.homeNumber || '', disabled: false }],
492
- mobileNumber: [{ value: this.mobileNumber || '', disabled: false }],
493
- pagerNumber: [{ value: this.pagerNumber || '', disabled: false }],
494
- displayName: [{ value: this.displayName || '', disabled: false }],
495
- manager: [{ value: this.manager || '', disabled: false }],
496
- associatedPc: [this.associatedPc || ''],
497
- directoryUri: [this.directoryUri || ''],
498
- userProfile: [this.userProfile],
499
- enableMobileVoiceAccess: [this.enableMobileVoiceAccess],
500
- ldapIntegrated: [this.ldapIntegrated],
501
- userLocale: [this.userLocale || ''],
502
- digestCredentials: [''],
503
- confirmDigestCredentials: ['']
504
- };
505
- this.form = formBuilder.group(formSettings);
506
- }
507
- toggleEditMode() {
508
- this.editMode = !this.editMode;
509
- /*['userid', 'email', 'firstName', 'lastName'].forEach(token => {
510
- if (this.editMode) {
511
- this.form.get(token)?.enable();
512
- } else {
513
- this.form.get(token)?.disable();
514
- }
515
- })*/
516
- }
517
- getSavableData() {
518
- const excludedFields = ['form', 'editMode', 'viewMode', 'token', 'hasModifiedCache', 'confirmDigestCredentials'];
519
- return getSavableData(this, excludedFields);
520
- }
521
- equal(userToCompare) {
522
- if (!userToCompare) {
523
- return false;
524
- }
525
- return JSON.stringify(this.getSavableData()) === JSON.stringify(userToCompare.getSavableData());
526
- }
424
+ class SimplifiedUser {
425
+ constructor(user, isLdap) {
426
+ // isLdap TEMP because of token response issue
427
+ if (user) {
428
+ this.userid = user.userid;
429
+ this.email = user.email;
430
+ this.firstName = user.firstName;
431
+ this.lastName = user.lastName;
432
+ this.siteId = user.siteId;
433
+ this.siteName = user.siteName;
434
+ this.token = user.token;
435
+ this.department = user.department;
436
+ this.manager = user.manager;
437
+ this.associatedPc = user.associatedPc;
438
+ this.digestCredentials = user.digestCredentials;
439
+ this.userProfile = user.userProfile;
440
+ this.enableMobileVoiceAccess = user.enableMobileVoiceAccess;
441
+ this.ldapIntegrated = user.ldapIntegrated || isLdap || false;
442
+ this.userLocale = user.userLocale;
443
+ this.confirmDigestCredentials = user.confirmDigestCredentials;
444
+ this.middleName = user.middleName;
445
+ this.telephoneNumber = user.telephoneNumber;
446
+ this.mobileNumber = user.mobileNumber;
447
+ this.directoryUri = user.directoryUri;
448
+ this.title = user.title;
449
+ this.homeNumber = user.homeNumber;
450
+ this.pagerNumber = user.pagerNumber;
451
+ this.displayName = user.displayName;
452
+ if (user.devices && user.devices.length) {
453
+ this.devices = user.devices.map((device) => new Device(device));
454
+ if (user.lines && user.lines.length) {
455
+ this.devices.forEach(device => {
456
+ if (device && device.lineAssociations && device.lineAssociations.length) {
457
+ device.lineAssociations.forEach(lineAssociation => {
458
+ lineAssociation.callingSearchSpace = this.getLineVal(lineAssociation, user.lines, 'callingSearchSpace');
459
+ lineAssociation.textLabel = lineAssociation.textLabel || this.getLineVal(lineAssociation, user.lines, 'textLabel') || '';
460
+ lineAssociation.alertingName = lineAssociation.alertingName || this.getLineVal(lineAssociation, user.lines, 'alertingName') || '';
461
+ });
462
+ }
463
+ });
464
+ }
465
+ }
466
+ }
467
+ this.initForm();
468
+ }
469
+ getLineVal(lineAssociation, lines, token) {
470
+ const lineForVal = lines.find((line) => line.directoryNumber.directoryNumber === lineAssociation.directoryNumber.directoryNumber);
471
+ return lineForVal && lineForVal[token] || '';
472
+ }
473
+ getUserDetailsSavableData() {
474
+ const excludedFields = ['devices', 'deviceProfiles', 'lines', 'singleNumberReach', 'vmPassword', 'vmUnifiedMessagingAccount', 'alternateExtensions', 'callerInput', 'lineAppearances', 'meetMes', 'webAppPasswordSettings', 'form'];
475
+ return getSavableData(this, excludedFields);
476
+ }
477
+ initForm() {
478
+ const formBuilder = new FormBuilder();
479
+ const formSettings = {
480
+ userid: [{ value: this.userid || '', disabled: this.ldapIntegrated }, [Validators.required, Validators.maxLength(128)]],
481
+ email: [{ value: this.email || '', disabled: this.ldapIntegrated }, [
482
+ Validators.pattern(REGEX_PATTERN.EMAIL),
483
+ Validators.required
484
+ ]],
485
+ firstName: [{ value: this.firstName || '', disabled: this.ldapIntegrated }],
486
+ lastName: [{ value: this.lastName || '', disabled: this.ldapIntegrated }, Validators.required],
487
+ department: [{ value: this.department || '', disabled: false }],
488
+ middleName: [{ value: this.middleName || '', disabled: false }],
489
+ title: [{ value: this.title || '', disabled: false }],
490
+ telephoneNumber: [{ value: this.telephoneNumber || '', disabled: false }],
491
+ homeNumber: [{ value: this.homeNumber || '', disabled: false }],
492
+ mobileNumber: [{ value: this.mobileNumber || '', disabled: false }],
493
+ pagerNumber: [{ value: this.pagerNumber || '', disabled: false }],
494
+ displayName: [{ value: this.displayName || '', disabled: false }],
495
+ manager: [{ value: this.manager || '', disabled: false }],
496
+ associatedPc: [this.associatedPc || ''],
497
+ directoryUri: [this.directoryUri || ''],
498
+ userProfile: [this.userProfile],
499
+ enableMobileVoiceAccess: [this.enableMobileVoiceAccess],
500
+ ldapIntegrated: [this.ldapIntegrated],
501
+ userLocale: [this.userLocale || ''],
502
+ digestCredentials: [''],
503
+ confirmDigestCredentials: ['']
504
+ };
505
+ this.form = formBuilder.group(formSettings);
506
+ }
507
+ toggleEditMode() {
508
+ this.editMode = !this.editMode;
509
+ /*['userid', 'email', 'firstName', 'lastName'].forEach(token => {
510
+ if (this.editMode) {
511
+ this.form.get(token)?.enable();
512
+ } else {
513
+ this.form.get(token)?.disable();
514
+ }
515
+ })*/
516
+ }
517
+ getSavableData() {
518
+ const excludedFields = ['form', 'editMode', 'viewMode', 'token', 'hasModifiedCache', 'confirmDigestCredentials'];
519
+ return getSavableData(this, excludedFields);
520
+ }
521
+ equal(userToCompare) {
522
+ if (!userToCompare) {
523
+ return false;
524
+ }
525
+ return JSON.stringify(this.getSavableData()) === JSON.stringify(userToCompare.getSavableData());
526
+ }
527
527
  }
528
528
 
529
- class UtilsService {
530
- static sortSortArrayByProperty(array, sortBy) {
531
- if (!array) {
532
- return null;
533
- }
534
- return array.sort((a, b) => {
535
- if (!a[sortBy] && !b[sortBy]) {
536
- return 0;
537
- }
538
- if (a[sortBy] && !b[sortBy]) {
539
- return 1;
540
- }
541
- if (!a[sortBy] && b[sortBy]) {
542
- return -1;
543
- }
544
- const positionA = a[sortBy];
545
- const positionB = b[sortBy];
546
- return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
547
- });
548
- }
549
- static diff(origObject, updatedObj, path, keysToIgnore) {
550
- let result = [];
551
- if (Object.is(origObject, updatedObj)) {
552
- return undefined;
553
- }
554
- if (!updatedObj || typeof updatedObj !== 'object') {
555
- return updatedObj;
556
- }
557
- const concat = Array.from(new Set([...Object.keys(origObject || {}), ...Object.keys(updatedObj || {})]));
558
- const filter = keysToIgnore ? concat.filter(key => !keysToIgnore.includes(key)) : concat;
559
- filter
560
- .forEach(key => {
561
- if (typeof updatedObj[key] === 'object' && typeof origObject[key] === 'object') {
562
- if (UtilsService.differs(updatedObj[key], origObject[key])) {
563
- const newPath = `${path}${path ? '.' : ''}${key}`;
564
- const values = UtilsService.diff(origObject[key], updatedObj[key], newPath, keysToIgnore);
565
- if (values !== undefined) {
566
- result = [...result, ...values];
567
- }
568
- }
569
- }
570
- else if (updatedObj && !origObject || updatedObj[key] !== origObject[key] && !Object.is(origObject[key], updatedObj[key])) {
571
- const value = updatedObj ? UtilsService.formatIfEmpty(updatedObj[key]) : null;
572
- result.push(`${path}${path ? '.' : ''}${key}=${value}`);
573
- }
574
- });
575
- return result;
576
- }
577
- static formatIfEmpty(value) {
578
- if (value) {
579
- return value;
580
- }
581
- switch (typeof value) {
582
- case 'boolean':
583
- return value;
584
- case 'string':
585
- return '';
586
- default:
587
- return null;
588
- }
589
- }
590
- static differs(obj1, obj2) {
591
- return JSON.stringify(obj1) !== JSON.stringify(obj2);
592
- }
593
- }
594
- UtilsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
595
- UtilsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService });
596
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService, decorators: [{
597
- type: Injectable
529
+ class UtilsService {
530
+ static sortSortArrayByProperty(array, sortBy) {
531
+ if (!array) {
532
+ return null;
533
+ }
534
+ return array.sort((a, b) => {
535
+ if (!a[sortBy] && !b[sortBy]) {
536
+ return 0;
537
+ }
538
+ if (a[sortBy] && !b[sortBy]) {
539
+ return 1;
540
+ }
541
+ if (!a[sortBy] && b[sortBy]) {
542
+ return -1;
543
+ }
544
+ const positionA = a[sortBy];
545
+ const positionB = b[sortBy];
546
+ return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
547
+ });
548
+ }
549
+ static diff(origObject, updatedObj, path, keysToIgnore) {
550
+ let result = [];
551
+ if (Object.is(origObject, updatedObj)) {
552
+ return undefined;
553
+ }
554
+ if (!updatedObj || typeof updatedObj !== 'object') {
555
+ return updatedObj;
556
+ }
557
+ const concat = Array.from(new Set([...Object.keys(origObject || {}), ...Object.keys(updatedObj || {})]));
558
+ const filter = keysToIgnore ? concat.filter(key => !keysToIgnore.includes(key)) : concat;
559
+ filter
560
+ .forEach(key => {
561
+ if (typeof updatedObj[key] === 'object' && typeof origObject[key] === 'object') {
562
+ if (UtilsService.differs(updatedObj[key], origObject[key])) {
563
+ const newPath = `${path}${path ? '.' : ''}${key}`;
564
+ const values = UtilsService.diff(origObject[key], updatedObj[key], newPath, keysToIgnore);
565
+ if (values !== undefined) {
566
+ result = [...result, ...values];
567
+ }
568
+ }
569
+ }
570
+ else if (updatedObj && !origObject || updatedObj[key] !== origObject[key] && !Object.is(origObject[key], updatedObj[key])) {
571
+ const value = updatedObj ? UtilsService.formatIfEmpty(updatedObj[key]) : null;
572
+ result.push(`${path}${path ? '.' : ''}${key}=${value}`);
573
+ }
574
+ });
575
+ return result;
576
+ }
577
+ static formatIfEmpty(value) {
578
+ if (value) {
579
+ return value;
580
+ }
581
+ switch (typeof value) {
582
+ case 'boolean':
583
+ return value;
584
+ case 'string':
585
+ return '';
586
+ default:
587
+ return null;
588
+ }
589
+ }
590
+ static differs(obj1, obj2) {
591
+ return JSON.stringify(obj1) !== JSON.stringify(obj2);
592
+ }
593
+ }
594
+ UtilsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
595
+ UtilsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService });
596
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService, decorators: [{
597
+ type: Injectable
598
598
  }] });
599
599
 
600
- const string_array = function (original, updated, fullKey) {
601
- if (!updated || !SortingUtilsService.differs(original, updated)) {
602
- return null;
603
- }
604
- return `${fullKey}=${updated.join(',')}`;
605
- };
606
- const line_reference = function (original, updated, fullKey) {
607
- if (!updated || !SortingUtilsService.differs(original, updated)) {
608
- return null;
609
- }
610
- // @ts-ignore
611
- return Object.keys(updated).map(key => `${fullKey}.${key}=${updated[key]}`);
612
- };
613
- const nullable = function (original, updated, fullKey) {
614
- if (!original && updated) {
615
- // @ts-ignore
616
- return Object.keys(updated).map(key => `${fullKey}.${key}=${updated[key]}`);
617
- }
618
- else if (original && !updated) {
619
- return `${fullKey}=null`;
620
- }
621
- else {
622
- return SortingUtilsService.diff(original, updated, fullKey, []);
623
- }
624
- };
625
- class SortingUtilsService {
626
- static sortDevicesByTypeAndName(array) {
627
- if (!array) {
628
- return null;
629
- }
630
- return array.sort((a, b) => {
631
- if (a.deviceType === b.deviceType) {
632
- return (a.name < b.name) ? -1 : (a.name > b.name) ? 1 : 0;
633
- }
634
- else {
635
- return (a.deviceType < b.deviceType) ? -1 : 1;
636
- }
637
- });
638
- }
639
- static sortLinesByDirectoryName(array) {
640
- if (!array) {
641
- return null;
642
- }
643
- return array.sort((a, b) => {
644
- if (!a.directoryNumber && !b.directoryNumber) {
645
- return 0;
646
- }
647
- if (a.directoryNumber && !b.directoryNumber) {
648
- return 1;
649
- }
650
- if (!a.directoryNumber && b.directoryNumber) {
651
- return -1;
652
- }
653
- const directoryNumberA = a.directoryNumber.directoryNumber;
654
- const directoryNumberB = b.directoryNumber.directoryNumber;
655
- return (directoryNumberA < directoryNumberB) ? -1 : (directoryNumberA > directoryNumberB) ? 1 : 0;
656
- });
657
- }
658
- static sortLineAssociationsByPosition(array) {
659
- if (!array) {
660
- return null;
661
- }
662
- return array.sort((a, b) => {
663
- if (!a.position && !b.position) {
664
- return 0;
665
- }
666
- if (a.position && !b.position) {
667
- return 1;
668
- }
669
- if (!a.position && b.position) {
670
- return -1;
671
- }
672
- const positionA = a.position;
673
- const positionB = b.position;
674
- return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
675
- });
676
- }
677
- static sortSortArrayByProperty(array, sortBy) {
678
- if (!array) {
679
- return null;
680
- }
681
- return array.sort((a, b) => {
682
- if (!a[sortBy] && !b[sortBy]) {
683
- return 0;
684
- }
685
- if (a[sortBy] && !b[sortBy]) {
686
- return 1;
687
- }
688
- if (!a[sortBy] && b[sortBy]) {
689
- return -1;
690
- }
691
- const positionA = a[sortBy];
692
- const positionB = b[sortBy];
693
- return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
694
- });
695
- }
696
- static diff(origObject, updatedObj, path, keysToIgnore) {
697
- let result = [];
698
- if (Object.is(origObject, updatedObj)) {
699
- return undefined;
700
- }
701
- if (!updatedObj || typeof updatedObj !== 'object') {
702
- return updatedObj;
703
- }
704
- const concat = Array.from(new Set([...Object.keys(origObject || {}), ...Object.keys(updatedObj || {})]));
705
- const filter = keysToIgnore ? concat.filter(key => !keysToIgnore.includes(key)) : concat;
706
- filter
707
- .forEach(key => {
708
- // @ts-ignore
709
- if (this.dictionary[key]) {
710
- // @ts-ignore
711
- const complexResult = this.dictionary[key](origObject[key], updatedObj[key], `${path}${path ? '.' : ''}${key}`);
712
- if (complexResult) {
713
- if (Array.isArray(complexResult)) {
714
- result = [...result, ...complexResult];
715
- }
716
- else {
717
- result.push(complexResult);
718
- }
719
- }
720
- }
721
- else if (typeof updatedObj[key] === 'object' && typeof origObject[key] === 'object') {
722
- if (SortingUtilsService.differs(updatedObj[key], origObject[key])) {
723
- const newPath = `${path}${path ? '.' : ''}${key}`;
724
- const values = SortingUtilsService.diff(origObject[key], updatedObj[key], newPath, keysToIgnore);
725
- if (values !== undefined) {
726
- result = [...result, ...values];
727
- }
728
- }
729
- }
730
- else if (updatedObj && !origObject || updatedObj[key] !== origObject[key] && !Object.is(origObject[key], updatedObj[key])) {
731
- const value = updatedObj ? SortingUtilsService.formatIfEmpty(updatedObj[key]) : null;
732
- result.push(`${path}${path ? '.' : ''}${key}=${value}`);
733
- }
734
- });
735
- return result;
736
- }
737
- static formatIfEmpty(value) {
738
- if (value) {
739
- return value;
740
- }
741
- switch (typeof value) {
742
- case 'boolean':
743
- return value;
744
- case 'string':
745
- return '';
746
- default:
747
- return null;
748
- }
749
- }
750
- static differs(obj1, obj2) {
751
- return JSON.stringify(obj1) !== JSON.stringify(obj2);
752
- }
753
- }
754
- SortingUtilsService.dictionary = {
755
- features: string_array,
756
- services: string_array,
757
- directoryNumber: line_reference,
758
- primaryLineReference: line_reference,
759
- speedDials: function (original, updated, fullKey) {
760
- if (!updated || !SortingUtilsService.differs(original, updated)) {
761
- return null;
762
- }
763
- // todo only changes, identification
764
- let map = [];
765
- updated.map((speedDial) => {
766
- const currentFullKey = `${fullKey}.${speedDial.index}`; // ${speedDial.type} CHECk ?
767
- map = [...map, Object.keys(speedDial).map(key => `${currentFullKey}.${key}=${speedDial[key]}`)];
768
- });
769
- return map;
770
- },
771
- lineAssociations: function (original, updated, fullKey) {
772
- if (!updated || !SortingUtilsService.differs(original, updated)) {
773
- return null;
774
- }
775
- let map = [];
776
- updated.map((lineAssociation) => {
777
- const currentFullKey = `${fullKey}.${lineAssociation.linePkid ? lineAssociation.linePkid : lineAssociation.lineLocalId}`;
778
- const originalLineAssociation = original.find(line => line.index === lineAssociation.index);
779
- if (SortingUtilsService.differs(originalLineAssociation, lineAssociation)) {
780
- const diff = SortingUtilsService.diff(originalLineAssociation, lineAssociation, currentFullKey, []);
781
- map = [...map, ...diff];
782
- }
783
- });
784
- return map;
785
- },
786
- enterpriseAltNum: nullable,
787
- e164AltNum: nullable
788
- };
789
- SortingUtilsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
790
- SortingUtilsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService });
791
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService, decorators: [{
792
- type: Injectable
600
+ const string_array = function (original, updated, fullKey) {
601
+ if (!updated || !SortingUtilsService.differs(original, updated)) {
602
+ return null;
603
+ }
604
+ return `${fullKey}=${updated.join(',')}`;
605
+ };
606
+ const line_reference = function (original, updated, fullKey) {
607
+ if (!updated || !SortingUtilsService.differs(original, updated)) {
608
+ return null;
609
+ }
610
+ // @ts-ignore
611
+ return Object.keys(updated).map(key => `${fullKey}.${key}=${updated[key]}`);
612
+ };
613
+ const nullable = function (original, updated, fullKey) {
614
+ if (!original && updated) {
615
+ // @ts-ignore
616
+ return Object.keys(updated).map(key => `${fullKey}.${key}=${updated[key]}`);
617
+ }
618
+ else if (original && !updated) {
619
+ return `${fullKey}=null`;
620
+ }
621
+ else {
622
+ return SortingUtilsService.diff(original, updated, fullKey, []);
623
+ }
624
+ };
625
+ class SortingUtilsService {
626
+ static sortDevicesByTypeAndName(array) {
627
+ if (!array) {
628
+ return null;
629
+ }
630
+ return array.sort((a, b) => {
631
+ if (a.deviceType === b.deviceType) {
632
+ return (a.name < b.name) ? -1 : (a.name > b.name) ? 1 : 0;
633
+ }
634
+ else {
635
+ return (a.deviceType < b.deviceType) ? -1 : 1;
636
+ }
637
+ });
638
+ }
639
+ static sortLinesByDirectoryName(array) {
640
+ if (!array) {
641
+ return null;
642
+ }
643
+ return array.sort((a, b) => {
644
+ if (!a.directoryNumber && !b.directoryNumber) {
645
+ return 0;
646
+ }
647
+ if (a.directoryNumber && !b.directoryNumber) {
648
+ return 1;
649
+ }
650
+ if (!a.directoryNumber && b.directoryNumber) {
651
+ return -1;
652
+ }
653
+ const directoryNumberA = a.directoryNumber.directoryNumber;
654
+ const directoryNumberB = b.directoryNumber.directoryNumber;
655
+ return (directoryNumberA < directoryNumberB) ? -1 : (directoryNumberA > directoryNumberB) ? 1 : 0;
656
+ });
657
+ }
658
+ static sortLineAssociationsByPosition(array) {
659
+ if (!array) {
660
+ return null;
661
+ }
662
+ return array.sort((a, b) => {
663
+ if (!a.position && !b.position) {
664
+ return 0;
665
+ }
666
+ if (a.position && !b.position) {
667
+ return 1;
668
+ }
669
+ if (!a.position && b.position) {
670
+ return -1;
671
+ }
672
+ const positionA = a.position;
673
+ const positionB = b.position;
674
+ return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
675
+ });
676
+ }
677
+ static sortSortArrayByProperty(array, sortBy) {
678
+ if (!array) {
679
+ return null;
680
+ }
681
+ return array.sort((a, b) => {
682
+ if (!a[sortBy] && !b[sortBy]) {
683
+ return 0;
684
+ }
685
+ if (a[sortBy] && !b[sortBy]) {
686
+ return 1;
687
+ }
688
+ if (!a[sortBy] && b[sortBy]) {
689
+ return -1;
690
+ }
691
+ const positionA = a[sortBy];
692
+ const positionB = b[sortBy];
693
+ return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
694
+ });
695
+ }
696
+ static diff(origObject, updatedObj, path, keysToIgnore) {
697
+ let result = [];
698
+ if (Object.is(origObject, updatedObj)) {
699
+ return undefined;
700
+ }
701
+ if (!updatedObj || typeof updatedObj !== 'object') {
702
+ return updatedObj;
703
+ }
704
+ const concat = Array.from(new Set([...Object.keys(origObject || {}), ...Object.keys(updatedObj || {})]));
705
+ const filter = keysToIgnore ? concat.filter(key => !keysToIgnore.includes(key)) : concat;
706
+ filter
707
+ .forEach(key => {
708
+ // @ts-ignore
709
+ if (this.dictionary[key]) {
710
+ // @ts-ignore
711
+ const complexResult = this.dictionary[key](origObject[key], updatedObj[key], `${path}${path ? '.' : ''}${key}`);
712
+ if (complexResult) {
713
+ if (Array.isArray(complexResult)) {
714
+ result = [...result, ...complexResult];
715
+ }
716
+ else {
717
+ result.push(complexResult);
718
+ }
719
+ }
720
+ }
721
+ else if (typeof updatedObj[key] === 'object' && typeof origObject[key] === 'object') {
722
+ if (SortingUtilsService.differs(updatedObj[key], origObject[key])) {
723
+ const newPath = `${path}${path ? '.' : ''}${key}`;
724
+ const values = SortingUtilsService.diff(origObject[key], updatedObj[key], newPath, keysToIgnore);
725
+ if (values !== undefined) {
726
+ result = [...result, ...values];
727
+ }
728
+ }
729
+ }
730
+ else if (updatedObj && !origObject || updatedObj[key] !== origObject[key] && !Object.is(origObject[key], updatedObj[key])) {
731
+ const value = updatedObj ? SortingUtilsService.formatIfEmpty(updatedObj[key]) : null;
732
+ result.push(`${path}${path ? '.' : ''}${key}=${value}`);
733
+ }
734
+ });
735
+ return result;
736
+ }
737
+ static formatIfEmpty(value) {
738
+ if (value) {
739
+ return value;
740
+ }
741
+ switch (typeof value) {
742
+ case 'boolean':
743
+ return value;
744
+ case 'string':
745
+ return '';
746
+ default:
747
+ return null;
748
+ }
749
+ }
750
+ static differs(obj1, obj2) {
751
+ return JSON.stringify(obj1) !== JSON.stringify(obj2);
752
+ }
753
+ }
754
+ SortingUtilsService.dictionary = {
755
+ features: string_array,
756
+ services: string_array,
757
+ directoryNumber: line_reference,
758
+ primaryLineReference: line_reference,
759
+ speedDials: function (original, updated, fullKey) {
760
+ if (!updated || !SortingUtilsService.differs(original, updated)) {
761
+ return null;
762
+ }
763
+ // todo only changes, identification
764
+ let map = [];
765
+ updated.map((speedDial) => {
766
+ const currentFullKey = `${fullKey}.${speedDial.index}`; // ${speedDial.type} CHECk ?
767
+ map = [...map, Object.keys(speedDial).map(key => `${currentFullKey}.${key}=${speedDial[key]}`)];
768
+ });
769
+ return map;
770
+ },
771
+ lineAssociations: function (original, updated, fullKey) {
772
+ if (!updated || !SortingUtilsService.differs(original, updated)) {
773
+ return null;
774
+ }
775
+ let map = [];
776
+ updated.map((lineAssociation) => {
777
+ const currentFullKey = `${fullKey}.${lineAssociation.linePkid ? lineAssociation.linePkid : lineAssociation.lineLocalId}`;
778
+ const originalLineAssociation = original.find(line => line.index === lineAssociation.index);
779
+ if (SortingUtilsService.differs(originalLineAssociation, lineAssociation)) {
780
+ const diff = SortingUtilsService.diff(originalLineAssociation, lineAssociation, currentFullKey, []);
781
+ map = [...map, ...diff];
782
+ }
783
+ });
784
+ return map;
785
+ },
786
+ enterpriseAltNum: nullable,
787
+ e164AltNum: nullable
788
+ };
789
+ SortingUtilsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
790
+ SortingUtilsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService });
791
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService, decorators: [{
792
+ type: Injectable
793
793
  }] });
794
794
 
795
- class LineService {
796
- generateLineAssociationFromLine(lineAssociation) {
797
- return {
798
- directoryNumber: lineAssociation ? this.generateLineDirectory(lineAssociation) : null,
799
- didPattern: lineAssociation ? this.generateDidPatternForLineAssociation(lineAssociation) : null,
800
- mappedDids: lineAssociation ? '' : 'null',
801
- index: lineAssociation ? lineAssociation.index : null,
802
- position: lineAssociation ? lineAssociation.position : null,
803
- textLabel: lineAssociation ? lineAssociation.textLabel : null,
804
- // displayLabel: lineAssociation ? lineAssociation.displayLabel : 'null',
805
- alertingName: lineAssociation ? lineAssociation.alertingName : null,
806
- callerNumber: lineAssociation ? '' : 'null'
807
- };
808
- }
809
- generateLineDirectory(lineAssociation) {
810
- return {
811
- directoryNumber: lineAssociation.directoryNumber.directoryNumber,
812
- routePartitionName: lineAssociation.directoryNumber.routePartitionName,
813
- };
814
- }
815
- generateDidPatternForLineAssociation(lineAssociation) {
816
- return {
817
- calledPartyTransformationMask: lineAssociation.directoryNumber && lineAssociation.directoryNumber.directoryNumber
818
- };
819
- }
820
- }
821
- LineService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
822
- LineService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService });
823
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService, decorators: [{
824
- type: Injectable
795
+ class LineService {
796
+ generateLineAssociationFromLine(lineAssociation) {
797
+ return {
798
+ directoryNumber: lineAssociation ? this.generateLineDirectory(lineAssociation) : null,
799
+ didPattern: lineAssociation ? this.generateDidPatternForLineAssociation(lineAssociation) : null,
800
+ mappedDids: lineAssociation ? '' : 'null',
801
+ index: lineAssociation ? lineAssociation.index : null,
802
+ position: lineAssociation ? lineAssociation.position : null,
803
+ textLabel: lineAssociation ? lineAssociation.textLabel : null,
804
+ // displayLabel: lineAssociation ? lineAssociation.displayLabel : 'null',
805
+ alertingName: lineAssociation ? lineAssociation.alertingName : null,
806
+ callerNumber: lineAssociation ? '' : 'null'
807
+ };
808
+ }
809
+ generateLineDirectory(lineAssociation) {
810
+ return {
811
+ directoryNumber: lineAssociation.directoryNumber.directoryNumber,
812
+ routePartitionName: lineAssociation.directoryNumber.routePartitionName,
813
+ };
814
+ }
815
+ generateDidPatternForLineAssociation(lineAssociation) {
816
+ return {
817
+ calledPartyTransformationMask: lineAssociation.directoryNumber && lineAssociation.directoryNumber.directoryNumber
818
+ };
819
+ }
820
+ }
821
+ LineService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
822
+ LineService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService });
823
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService, decorators: [{
824
+ type: Injectable
825
825
  }] });
826
826
 
827
- class UserService {
828
- get lineAssociation() {
829
- return this.user && this.originUser.devices && this.user.devices[0] && this.user.devices[0].lineAssociations && this.user.devices[0].lineAssociations[0];
830
- }
831
- get originLineAssociation() {
832
- return this.originUser && this.originUser.devices && this.originUser.devices[0] && this.originUser.devices[0].lineAssociations && this.originUser.devices[0].lineAssociations[0];
833
- }
834
- constructor(apiService, lineService) {
835
- this.apiService = apiService;
836
- this.lineService = lineService;
837
- this.siteId = -1;
838
- this.userId = '';
839
- this.dataPending = false;
840
- this.userIdExistPending = false;
841
- this.hasExistedUserId = false;
842
- this.onUserLineSaved$ = new Subject();
843
- }
844
- ngOnInit() {
845
- console.log(this.siteId);
846
- }
847
- fetchUserToken(siteId, userId, isLdap, isSetNewTokenOnly) {
848
- // isLdap TEMP because of token response issue
849
- this.siteId = siteId;
850
- this.userId = userId;
851
- return this.apiService.fetch(API.USER_TOKEN.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(userId))))
852
- .pipe(map((result) => {
853
- const user = result && Object.values(result)[0];
854
- const token = Object.keys(result)[0];
855
- if (user) {
856
- if (!isSetNewTokenOnly) {
857
- this.setSimplifiedUser(user);
858
- this.user.token = user.token;
859
- }
860
- this.user.token = user.token || token;
861
- this.originUser.token = user.token || token;
862
- }
863
- }));
864
- // .pipe(this.handleError(false, true));
865
- }
866
- updateUserFields(body) {
867
- if (!this.siteId) {
868
- return;
869
- }
870
- return this.apiService.post(API.UPDATE_USER_FIELDS.replace(':siteId', String(this.siteId)).replace(':token', this.user.token), body);
871
- // .pipe(this.handleError(false, true));
872
- }
873
- fetchUserById(id) {
874
- this.userIdExistPending = true;
875
- return this.apiService.fetch(API.USER_BY_ID.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(id))))
876
- .pipe(map(result => {
877
- this.userIdExistPending = false;
878
- return result;
879
- }));
880
- }
881
- persistCacheChanges() {
882
- /*const params = {
883
- excludeDeviceExtraOptions: true
884
- };*/
885
- return this.processUserChangesToCache()
886
- .pipe(map((result) => {
887
- return this.apiService.post(API.PERSIST_USER_CACHE.replace(':siteId', String(this.siteId)).replace(':token', this.user.token), {})
888
- .subscribe(() => {
889
- });
890
- // .pipe(map((user) => {
891
- // // this.setUser(user, false, this.user.token);
892
- // this.user.hasModifiedCache = false;
893
- // }))
894
- // .pipe(this.handleError(true, true));
895
- }));
896
- }
897
- processUserChangesToCache() {
898
- const calls = [];
899
- const body = UtilsService.diff(this.originUser.getUserDetailsSavableData(), this.user.getUserDetailsSavableData(), 'user');
900
- if (body === null || body === void 0 ? void 0 : body.length) {
901
- calls.push(this.updateUserFields(body));
902
- }
903
- if (!(calls === null || calls === void 0 ? void 0 : calls.length)) {
904
- return of(this.user);
905
- }
906
- return forkJoin(calls)
907
- .pipe(map((responses) => {
908
- // ApiUserResponse
909
- this.handleSaveUserResponse(responses);
910
- }));
911
- // .pipe(this.handleError(false, true));
912
- }
913
- saveNewLine() {
914
- this.dataPending = true;
915
- this.deleteLine(this.user.siteId, this.lineAssociation.linePkid, encodeURIComponent(this.user.token))
916
- .subscribe(() => {
917
- const URL = API.PERSIST_USER_CACHE.replace(':siteId', String(this.siteId)).replace(':token', this.user.token);
918
- this.apiService.post(URL, {})
919
- .subscribe(() => {
920
- this.fetchUserToken(this.siteId, this.user.userid, false, true)
921
- .subscribe(() => {
922
- this.runNewLineCreation();
923
- });
924
- });
925
- });
926
- }
927
- runNewLineCreation() {
928
- // CREATE NEW LINE
929
- const newLineBody = SortingUtilsService.diff(this.lineService.generateLineAssociationFromLine(null), this.lineService.generateLineAssociationFromLine(this.lineAssociation), 'device.lineAssociations', null);
930
- this.associateLineToUserDevice(this.user.siteId, this.user.devices[0].name, newLineBody, null, this.lineAssociation.callingSearchSpace).subscribe((response) => {
931
- var _a;
932
- if (response && response.currentUpdatedUser) {
933
- const linePkId = this.getLinePkIdFromUser(response === null || response === void 0 ? void 0 : response.currentUpdatedUser, 0);
934
- forkJoin([
935
- this.updateLineFields(this.siteId, linePkId, this.user.token, this.lineAssociation.alertingName),
936
- this.updateDeviceFields(this.siteId, (_a = this.user.devices[0]) === null || _a === void 0 ? void 0 : _a.name, this.user.token)
937
- ]).subscribe((response) => {
938
- this.originUser.devices[0].lineAssociations[0].directoryNumber.directoryNumber = this.lineAssociation.directoryNumber.directoryNumber;
939
- this.onUserLineSaved$.next(true);
940
- });
941
- }
942
- });
943
- // -----
944
- }
945
- getLinePkIdFromUser(user, index) {
946
- if (user.devices && user.devices[index] && user.devices[index].lineAssociations && user.devices[index].lineAssociations[index]) {
947
- return user.devices[index].lineAssociations[index].linePkid || user.devices[index].lineAssociations[index].lineLocalId;
948
- }
949
- }
950
- deleteLine(siteId, pkid, token) {
951
- return this.apiService.delete(API.DELETE_LINE.replace(':siteId', String(siteId)).replace(':pkid', pkid).replace(':token', encodeURIComponent(token)), {});
952
- // .pipe(this.handleError(true, false));
953
- }
954
- disassociateLine(siteId, linePkid, token, deviceName) {
955
- return this.apiService.delete(API.DISASSOCIATE_LINE.replace(':siteId', String(siteId))
956
- .replace(':linePkid', linePkid)
957
- .replace(':deviceName', deviceName)
958
- .replace(':token', encodeURIComponent(token)), {});
959
- // .pipe(this.handleError(true, false));
960
- }
961
- updateLineFields(siteId, pkid, token, alertingName) {
962
- const body = ['line.description=', `line.alertingName=${alertingName}`];
963
- return this.apiService.post(API.UPDATE_LINE_FIELDS.replace(':siteId', String(siteId)).replace(':pkid', encodeURIComponent(pkid)).replace(':token', encodeURIComponent(token)), body);
964
- // .pipe(this.handleError(true, false));
965
- }
966
- updateDeviceFields(siteId, deviceName, token) {
967
- const body = ['device.associatedDNs.0=null'];
968
- return this.apiService.post(API.UPDATE_DEVICE_FIELDS.replace(':siteId', String(siteId)).replace(':deviceName', deviceName).replace(':token', encodeURIComponent(token)), body);
969
- // .pipe(this.handleError(true, false));
970
- }
971
- checkDestinationNumber(siteId, directoryNumber, routePartitionName) {
972
- const params = {
973
- dntype: 'EXTENSION'
974
- };
975
- const body = {
976
- directoryNumber: directoryNumber,
977
- routePartitionName: routePartitionName
978
- };
979
- return this.apiService.post(API.CHECK_DESTINATION_NUMBER.replace(':siteId', siteId), body, params);
980
- }
981
- associateLineToUserDevice(siteId, deviceName, body, pkid, css) {
982
- let params = {};
983
- if (pkid) {
984
- params = { linePkid: pkid };
985
- }
986
- if (css) {
987
- // @ts-ignore
988
- params['css'] = css;
989
- }
990
- return this.apiService.post(API.ASSOCIATE_LINE.replace(':siteId', String(siteId)).replace(':deviceName', deviceName)
991
- .replace(':token', encodeURIComponent(this.user.token)), body, params);
992
- // .pipe(this.handleError(true, true));
993
- }
994
- hasUnsavedChanges() {
995
- if (this.user && this.originUser) {
996
- return !this.user.equal(this.originUser);
997
- }
998
- return false;
999
- }
1000
- setSimplifiedUser(user, isLdap) {
1001
- // isLdap TEMP because of token response issue
1002
- this.user = new SimplifiedUser(user, isLdap);
1003
- const copiedUser = JSON.parse(JSON.stringify(user));
1004
- this.originUser = new SimplifiedUser(copiedUser, isLdap);
1005
- }
1006
- handleSaveUserResponse(responses) {
1007
- if (!(responses === null || responses === void 0 ? void 0 : responses.length)) {
1008
- return;
1009
- }
1010
- for (let len = responses.length, i = len - 1; i >= 0; i--) {
1011
- if (responses[i] && responses[i].currentUpdatedUser) {
1012
- // this.setUser(responses[i].currentUpdatedUser, false, this.user.token);
1013
- this.user.hasModifiedCache = true;
1014
- return;
1015
- }
1016
- }
1017
- }
1018
- }
1019
- 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 });
1020
- UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService });
1021
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService, decorators: [{
1022
- type: Injectable
827
+ class UserService {
828
+ get lineAssociation() {
829
+ return this.user && this.originUser.devices && this.user.devices[0] && this.user.devices[0].lineAssociations && this.user.devices[0].lineAssociations[0];
830
+ }
831
+ get originLineAssociation() {
832
+ return this.originUser && this.originUser.devices && this.originUser.devices[0] && this.originUser.devices[0].lineAssociations && this.originUser.devices[0].lineAssociations[0];
833
+ }
834
+ constructor(apiService, lineService) {
835
+ this.apiService = apiService;
836
+ this.lineService = lineService;
837
+ this.siteId = -1;
838
+ this.userId = '';
839
+ this.dataPending = false;
840
+ this.userIdExistPending = false;
841
+ this.hasExistedUserId = false;
842
+ this.onUserLineSaved$ = new Subject();
843
+ }
844
+ ngOnInit() {
845
+ console.log(this.siteId);
846
+ }
847
+ fetchUserToken(siteId, userId, isLdap, isSetNewTokenOnly) {
848
+ // isLdap TEMP because of token response issue
849
+ this.siteId = siteId;
850
+ this.userId = userId;
851
+ return this.apiService.fetch(API.USER_TOKEN.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(userId))))
852
+ .pipe(map((result) => {
853
+ const user = result && Object.values(result)[0];
854
+ const token = Object.keys(result)[0];
855
+ if (user) {
856
+ if (!isSetNewTokenOnly) {
857
+ this.setSimplifiedUser(user);
858
+ this.user.token = user.token;
859
+ }
860
+ this.user.token = user.token || token;
861
+ this.originUser.token = user.token || token;
862
+ }
863
+ }));
864
+ // .pipe(this.handleError(false, true));
865
+ }
866
+ updateUserFields(body) {
867
+ if (!this.siteId) {
868
+ return;
869
+ }
870
+ return this.apiService.post(API.UPDATE_USER_FIELDS.replace(':siteId', String(this.siteId)).replace(':token', this.user.token), body);
871
+ // .pipe(this.handleError(false, true));
872
+ }
873
+ fetchUserById(id) {
874
+ this.userIdExistPending = true;
875
+ return this.apiService.fetch(API.USER_BY_ID.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(id))))
876
+ .pipe(map(result => {
877
+ this.userIdExistPending = false;
878
+ return result;
879
+ }));
880
+ }
881
+ persistCacheChanges() {
882
+ /*const params = {
883
+ excludeDeviceExtraOptions: true
884
+ };*/
885
+ return this.processUserChangesToCache()
886
+ .pipe(map((result) => {
887
+ return this.apiService.post(API.PERSIST_USER_CACHE.replace(':siteId', String(this.siteId)).replace(':token', this.user.token), {})
888
+ .subscribe(() => {
889
+ });
890
+ // .pipe(map((user) => {
891
+ // // this.setUser(user, false, this.user.token);
892
+ // this.user.hasModifiedCache = false;
893
+ // }))
894
+ // .pipe(this.handleError(true, true));
895
+ }));
896
+ }
897
+ processUserChangesToCache() {
898
+ const calls = [];
899
+ const body = UtilsService.diff(this.originUser.getUserDetailsSavableData(), this.user.getUserDetailsSavableData(), 'user');
900
+ if (body === null || body === void 0 ? void 0 : body.length) {
901
+ calls.push(this.updateUserFields(body));
902
+ }
903
+ if (!(calls === null || calls === void 0 ? void 0 : calls.length)) {
904
+ return of(this.user);
905
+ }
906
+ return forkJoin(calls)
907
+ .pipe(map((responses) => {
908
+ // ApiUserResponse
909
+ this.handleSaveUserResponse(responses);
910
+ }));
911
+ // .pipe(this.handleError(false, true));
912
+ }
913
+ saveNewLine() {
914
+ this.dataPending = true;
915
+ this.deleteLine(this.user.siteId, this.lineAssociation.linePkid, encodeURIComponent(this.user.token))
916
+ .subscribe(() => {
917
+ const URL = API.PERSIST_USER_CACHE.replace(':siteId', String(this.siteId)).replace(':token', this.user.token);
918
+ this.apiService.post(URL, {})
919
+ .subscribe(() => {
920
+ this.fetchUserToken(this.siteId, this.user.userid, false, true)
921
+ .subscribe(() => {
922
+ this.runNewLineCreation();
923
+ });
924
+ });
925
+ });
926
+ }
927
+ runNewLineCreation() {
928
+ // CREATE NEW LINE
929
+ const newLineBody = SortingUtilsService.diff(this.lineService.generateLineAssociationFromLine(null), this.lineService.generateLineAssociationFromLine(this.lineAssociation), 'device.lineAssociations', null);
930
+ this.associateLineToUserDevice(this.user.siteId, this.user.devices[0].name, newLineBody, null, this.lineAssociation.callingSearchSpace).subscribe((response) => {
931
+ var _a;
932
+ if (response && response.currentUpdatedUser) {
933
+ const linePkId = this.getLinePkIdFromUser(response === null || response === void 0 ? void 0 : response.currentUpdatedUser, 0);
934
+ forkJoin([
935
+ this.updateLineFields(this.siteId, linePkId, this.user.token, this.lineAssociation.alertingName),
936
+ this.updateDeviceFields(this.siteId, (_a = this.user.devices[0]) === null || _a === void 0 ? void 0 : _a.name, this.user.token)
937
+ ]).subscribe((response) => {
938
+ this.originUser.devices[0].lineAssociations[0].directoryNumber.directoryNumber = this.lineAssociation.directoryNumber.directoryNumber;
939
+ this.onUserLineSaved$.next(true);
940
+ });
941
+ }
942
+ });
943
+ // -----
944
+ }
945
+ getLinePkIdFromUser(user, index) {
946
+ if (user.devices && user.devices[index] && user.devices[index].lineAssociations && user.devices[index].lineAssociations[index]) {
947
+ return user.devices[index].lineAssociations[index].linePkid || user.devices[index].lineAssociations[index].lineLocalId;
948
+ }
949
+ }
950
+ deleteLine(siteId, pkid, token) {
951
+ return this.apiService.delete(API.DELETE_LINE.replace(':siteId', String(siteId)).replace(':pkid', pkid).replace(':token', encodeURIComponent(token)), {});
952
+ // .pipe(this.handleError(true, false));
953
+ }
954
+ disassociateLine(siteId, linePkid, token, deviceName) {
955
+ return this.apiService.delete(API.DISASSOCIATE_LINE.replace(':siteId', String(siteId))
956
+ .replace(':linePkid', linePkid)
957
+ .replace(':deviceName', deviceName)
958
+ .replace(':token', encodeURIComponent(token)), {});
959
+ // .pipe(this.handleError(true, false));
960
+ }
961
+ updateLineFields(siteId, pkid, token, alertingName) {
962
+ const body = ['line.description=', `line.alertingName=${alertingName}`];
963
+ return this.apiService.post(API.UPDATE_LINE_FIELDS.replace(':siteId', String(siteId)).replace(':pkid', encodeURIComponent(pkid)).replace(':token', encodeURIComponent(token)), body);
964
+ // .pipe(this.handleError(true, false));
965
+ }
966
+ updateDeviceFields(siteId, deviceName, token) {
967
+ const body = ['device.associatedDNs.0=null'];
968
+ return this.apiService.post(API.UPDATE_DEVICE_FIELDS.replace(':siteId', String(siteId)).replace(':deviceName', deviceName).replace(':token', encodeURIComponent(token)), body);
969
+ // .pipe(this.handleError(true, false));
970
+ }
971
+ checkDestinationNumber(siteId, directoryNumber, routePartitionName) {
972
+ const params = {
973
+ dntype: 'EXTENSION'
974
+ };
975
+ const body = {
976
+ directoryNumber: directoryNumber,
977
+ routePartitionName: routePartitionName
978
+ };
979
+ return this.apiService.post(API.CHECK_DESTINATION_NUMBER.replace(':siteId', siteId), body, params);
980
+ }
981
+ associateLineToUserDevice(siteId, deviceName, body, pkid, css) {
982
+ let params = {};
983
+ if (pkid) {
984
+ params = { linePkid: pkid };
985
+ }
986
+ if (css) {
987
+ // @ts-ignore
988
+ params['css'] = css;
989
+ }
990
+ return this.apiService.post(API.ASSOCIATE_LINE.replace(':siteId', String(siteId)).replace(':deviceName', deviceName)
991
+ .replace(':token', encodeURIComponent(this.user.token)), body, params);
992
+ // .pipe(this.handleError(true, true));
993
+ }
994
+ hasUnsavedChanges() {
995
+ if (this.user && this.originUser) {
996
+ return !this.user.equal(this.originUser);
997
+ }
998
+ return false;
999
+ }
1000
+ setSimplifiedUser(user, isLdap) {
1001
+ // isLdap TEMP because of token response issue
1002
+ this.user = new SimplifiedUser(user, isLdap);
1003
+ const copiedUser = JSON.parse(JSON.stringify(user));
1004
+ this.originUser = new SimplifiedUser(copiedUser, isLdap);
1005
+ }
1006
+ handleSaveUserResponse(responses) {
1007
+ if (!(responses === null || responses === void 0 ? void 0 : responses.length)) {
1008
+ return;
1009
+ }
1010
+ for (let len = responses.length, i = len - 1; i >= 0; i--) {
1011
+ if (responses[i] && responses[i].currentUpdatedUser) {
1012
+ // this.setUser(responses[i].currentUpdatedUser, false, this.user.token);
1013
+ this.user.hasModifiedCache = true;
1014
+ return;
1015
+ }
1016
+ }
1017
+ }
1018
+ }
1019
+ 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 });
1020
+ UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService });
1021
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService, decorators: [{
1022
+ type: Injectable
1023
1023
  }], ctorParameters: function () { return [{ type: APIService }, { type: LineService }]; } });
1024
1024
 
1025
- class AppLoaderComponent {
1026
- constructor() {
1027
- }
1028
- }
1029
- AppLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1030
- 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 });
1031
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, decorators: [{
1032
- type: Component,
1033
- 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"] }]
1025
+ class AppLoaderComponent {
1026
+ constructor() {
1027
+ }
1028
+ }
1029
+ AppLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1030
+ 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 });
1031
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, decorators: [{
1032
+ type: Component,
1033
+ 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"] }]
1034
1034
  }], ctorParameters: function () { return []; } });
1035
1035
 
1036
- class AuthInterceptor {
1037
- constructor() {
1038
- }
1039
- intercept(request, next) {
1040
- request = request.clone({
1041
- setHeaders: {
1042
- // Authorization: basicAuthHeaderString
1043
- },
1044
- withCredentials: true
1045
- });
1046
- return next.handle(request).pipe(catchError(err => {
1047
- if (err instanceof HttpErrorResponse) {
1048
- if (err.status === 401) {
1049
- if (window.history.length < 3) {
1050
- err.error.message = '';
1051
- }
1052
- else {
1053
- err.error.message = 'SESSION_INACTIVE';
1054
- }
1055
- }
1056
- }
1057
- return throwError(err);
1058
- }));
1059
- }
1060
- }
1061
- AuthInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1062
- AuthInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor });
1063
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor, decorators: [{
1064
- type: Injectable
1036
+ class AuthInterceptor {
1037
+ constructor() {
1038
+ }
1039
+ intercept(request, next) {
1040
+ request = request.clone({
1041
+ setHeaders: {
1042
+ // Authorization: basicAuthHeaderString
1043
+ },
1044
+ withCredentials: true
1045
+ });
1046
+ return next.handle(request).pipe(catchError(err => {
1047
+ if (err instanceof HttpErrorResponse) {
1048
+ if (err.status === 401) {
1049
+ if (window.history.length < 3) {
1050
+ err.error.message = '';
1051
+ }
1052
+ else {
1053
+ err.error.message = 'SESSION_INACTIVE';
1054
+ }
1055
+ }
1056
+ }
1057
+ return throwError(err);
1058
+ }));
1059
+ }
1060
+ }
1061
+ AuthInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1062
+ AuthInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor });
1063
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor, decorators: [{
1064
+ type: Injectable
1065
1065
  }], ctorParameters: function () { return []; } });
1066
1066
 
1067
- class UserInfoComponent {
1068
- }
1069
- UserInfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1070
- 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"] }] });
1071
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserInfoComponent, decorators: [{
1072
- type: Component,
1073
- 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"] }]
1074
- }], propDecorators: { name: [{
1075
- type: Input
1076
- }], active: [{
1077
- type: Input
1078
- }], email: [{
1079
- type: Input
1080
- }], position: [{
1081
- type: Input
1067
+ class UserInfoComponent {
1068
+ }
1069
+ UserInfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1070
+ 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"] }] });
1071
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserInfoComponent, decorators: [{
1072
+ type: Component,
1073
+ 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"] }]
1074
+ }], propDecorators: { name: [{
1075
+ type: Input
1076
+ }], active: [{
1077
+ type: Input
1078
+ }], email: [{
1079
+ type: Input
1080
+ }], position: [{
1081
+ type: Input
1082
1082
  }] } });
1083
1083
 
1084
- class MaterialModule {
1085
- }
1086
- MaterialModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1087
- MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [DragDropModule,
1088
- MatButtonModule,
1089
- MatListModule,
1090
- MatProgressSpinnerModule,
1091
- MatExpansionModule,
1092
- MatInputModule,
1093
- MatInputModule,
1094
- MatListModule,
1095
- MatTreeModule,
1096
- MatTreeModule,
1097
- MatNativeDateModule,
1098
- MatDatepickerModule,
1099
- MatTooltipModule,
1100
- MatAutocompleteModule,
1101
- MatChipsModule,
1102
- MatSidenavModule,
1103
- MatFormFieldModule,
1104
- MatStepperModule,
1105
- MatTabsModule,
1106
- MatCardModule,
1107
- MatSelectModule,
1108
- MatCheckboxModule,
1109
- MatSlideToggleModule,
1110
- MatTableModule,
1111
- MatPaginatorModule], exports: [DragDropModule,
1112
- MatButtonModule,
1113
- MatListModule,
1114
- MatProgressSpinnerModule,
1115
- MatExpansionModule,
1116
- MatInputModule,
1117
- MatInputModule,
1118
- MatListModule,
1119
- MatTreeModule,
1120
- MatTreeModule,
1121
- MatNativeDateModule,
1122
- MatDatepickerModule,
1123
- MatTooltipModule,
1124
- MatAutocompleteModule,
1125
- MatChipsModule,
1126
- MatSidenavModule,
1127
- MatFormFieldModule,
1128
- MatStepperModule,
1129
- MatTabsModule,
1130
- MatCardModule,
1131
- MatCheckboxModule,
1132
- MatSelectModule,
1133
- MatSlideToggleModule,
1134
- MatProgressSpinnerModule,
1135
- MatTableModule,
1136
- MatPaginatorModule] });
1137
- MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [DragDropModule,
1138
- MatButtonModule,
1139
- MatListModule,
1140
- MatProgressSpinnerModule,
1141
- MatExpansionModule,
1142
- MatInputModule,
1143
- MatInputModule,
1144
- MatListModule,
1145
- MatTreeModule,
1146
- MatTreeModule,
1147
- MatNativeDateModule,
1148
- MatDatepickerModule,
1149
- MatTooltipModule,
1150
- MatAutocompleteModule,
1151
- MatChipsModule,
1152
- MatSidenavModule,
1153
- MatFormFieldModule,
1154
- MatStepperModule,
1155
- MatTabsModule,
1156
- MatCardModule,
1157
- MatSelectModule,
1158
- MatCheckboxModule,
1159
- MatSlideToggleModule,
1160
- MatTableModule,
1161
- MatPaginatorModule, DragDropModule,
1162
- MatButtonModule,
1163
- MatListModule,
1164
- MatProgressSpinnerModule,
1165
- MatExpansionModule,
1166
- MatInputModule,
1167
- MatInputModule,
1168
- MatListModule,
1169
- MatTreeModule,
1170
- MatTreeModule,
1171
- MatNativeDateModule,
1172
- MatDatepickerModule,
1173
- MatTooltipModule,
1174
- MatAutocompleteModule,
1175
- MatChipsModule,
1176
- MatSidenavModule,
1177
- MatFormFieldModule,
1178
- MatStepperModule,
1179
- MatTabsModule,
1180
- MatCardModule,
1181
- MatCheckboxModule,
1182
- MatSelectModule,
1183
- MatSlideToggleModule,
1184
- MatProgressSpinnerModule,
1185
- MatTableModule,
1186
- MatPaginatorModule] });
1187
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, decorators: [{
1188
- type: NgModule,
1189
- args: [{
1190
- imports: [
1191
- DragDropModule,
1192
- MatButtonModule,
1193
- MatListModule,
1194
- MatProgressSpinnerModule,
1195
- MatExpansionModule,
1196
- MatInputModule,
1197
- MatInputModule,
1198
- MatListModule,
1199
- MatTreeModule,
1200
- MatTreeModule,
1201
- MatNativeDateModule,
1202
- MatDatepickerModule,
1203
- MatTooltipModule,
1204
- MatAutocompleteModule,
1205
- MatChipsModule,
1206
- MatSidenavModule,
1207
- MatFormFieldModule,
1208
- MatStepperModule,
1209
- MatTabsModule,
1210
- MatCardModule,
1211
- MatSelectModule,
1212
- MatCheckboxModule,
1213
- MatSlideToggleModule,
1214
- MatTableModule,
1215
- MatPaginatorModule
1216
- ],
1217
- exports: [
1218
- DragDropModule,
1219
- MatButtonModule,
1220
- MatListModule,
1221
- MatProgressSpinnerModule,
1222
- MatExpansionModule,
1223
- MatInputModule,
1224
- MatInputModule,
1225
- MatListModule,
1226
- MatTreeModule,
1227
- MatTreeModule,
1228
- MatNativeDateModule,
1229
- MatDatepickerModule,
1230
- MatTooltipModule,
1231
- MatAutocompleteModule,
1232
- MatChipsModule,
1233
- MatSidenavModule,
1234
- MatFormFieldModule,
1235
- MatStepperModule,
1236
- MatTabsModule,
1237
- MatCardModule,
1238
- MatCheckboxModule,
1239
- MatSelectModule,
1240
- MatSlideToggleModule,
1241
- MatProgressSpinnerModule,
1242
- MatTableModule,
1243
- MatPaginatorModule
1244
- ],
1245
- }]
1084
+ class MaterialModule {
1085
+ }
1086
+ MaterialModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1087
+ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [DragDropModule,
1088
+ MatButtonModule,
1089
+ MatListModule,
1090
+ MatProgressSpinnerModule,
1091
+ MatExpansionModule,
1092
+ MatInputModule,
1093
+ MatInputModule,
1094
+ MatListModule,
1095
+ MatTreeModule,
1096
+ MatTreeModule,
1097
+ MatNativeDateModule,
1098
+ MatDatepickerModule,
1099
+ MatTooltipModule,
1100
+ MatAutocompleteModule,
1101
+ MatChipsModule,
1102
+ MatSidenavModule,
1103
+ MatFormFieldModule,
1104
+ MatStepperModule,
1105
+ MatTabsModule,
1106
+ MatCardModule,
1107
+ MatSelectModule,
1108
+ MatCheckboxModule,
1109
+ MatSlideToggleModule,
1110
+ MatTableModule,
1111
+ MatPaginatorModule], exports: [DragDropModule,
1112
+ MatButtonModule,
1113
+ MatListModule,
1114
+ MatProgressSpinnerModule,
1115
+ MatExpansionModule,
1116
+ MatInputModule,
1117
+ MatInputModule,
1118
+ MatListModule,
1119
+ MatTreeModule,
1120
+ MatTreeModule,
1121
+ MatNativeDateModule,
1122
+ MatDatepickerModule,
1123
+ MatTooltipModule,
1124
+ MatAutocompleteModule,
1125
+ MatChipsModule,
1126
+ MatSidenavModule,
1127
+ MatFormFieldModule,
1128
+ MatStepperModule,
1129
+ MatTabsModule,
1130
+ MatCardModule,
1131
+ MatCheckboxModule,
1132
+ MatSelectModule,
1133
+ MatSlideToggleModule,
1134
+ MatProgressSpinnerModule,
1135
+ MatTableModule,
1136
+ MatPaginatorModule] });
1137
+ MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [DragDropModule,
1138
+ MatButtonModule,
1139
+ MatListModule,
1140
+ MatProgressSpinnerModule,
1141
+ MatExpansionModule,
1142
+ MatInputModule,
1143
+ MatInputModule,
1144
+ MatListModule,
1145
+ MatTreeModule,
1146
+ MatTreeModule,
1147
+ MatNativeDateModule,
1148
+ MatDatepickerModule,
1149
+ MatTooltipModule,
1150
+ MatAutocompleteModule,
1151
+ MatChipsModule,
1152
+ MatSidenavModule,
1153
+ MatFormFieldModule,
1154
+ MatStepperModule,
1155
+ MatTabsModule,
1156
+ MatCardModule,
1157
+ MatSelectModule,
1158
+ MatCheckboxModule,
1159
+ MatSlideToggleModule,
1160
+ MatTableModule,
1161
+ MatPaginatorModule, DragDropModule,
1162
+ MatButtonModule,
1163
+ MatListModule,
1164
+ MatProgressSpinnerModule,
1165
+ MatExpansionModule,
1166
+ MatInputModule,
1167
+ MatInputModule,
1168
+ MatListModule,
1169
+ MatTreeModule,
1170
+ MatTreeModule,
1171
+ MatNativeDateModule,
1172
+ MatDatepickerModule,
1173
+ MatTooltipModule,
1174
+ MatAutocompleteModule,
1175
+ MatChipsModule,
1176
+ MatSidenavModule,
1177
+ MatFormFieldModule,
1178
+ MatStepperModule,
1179
+ MatTabsModule,
1180
+ MatCardModule,
1181
+ MatCheckboxModule,
1182
+ MatSelectModule,
1183
+ MatSlideToggleModule,
1184
+ MatProgressSpinnerModule,
1185
+ MatTableModule,
1186
+ MatPaginatorModule] });
1187
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, decorators: [{
1188
+ type: NgModule,
1189
+ args: [{
1190
+ imports: [
1191
+ DragDropModule,
1192
+ MatButtonModule,
1193
+ MatListModule,
1194
+ MatProgressSpinnerModule,
1195
+ MatExpansionModule,
1196
+ MatInputModule,
1197
+ MatInputModule,
1198
+ MatListModule,
1199
+ MatTreeModule,
1200
+ MatTreeModule,
1201
+ MatNativeDateModule,
1202
+ MatDatepickerModule,
1203
+ MatTooltipModule,
1204
+ MatAutocompleteModule,
1205
+ MatChipsModule,
1206
+ MatSidenavModule,
1207
+ MatFormFieldModule,
1208
+ MatStepperModule,
1209
+ MatTabsModule,
1210
+ MatCardModule,
1211
+ MatSelectModule,
1212
+ MatCheckboxModule,
1213
+ MatSlideToggleModule,
1214
+ MatTableModule,
1215
+ MatPaginatorModule
1216
+ ],
1217
+ exports: [
1218
+ DragDropModule,
1219
+ MatButtonModule,
1220
+ MatListModule,
1221
+ MatProgressSpinnerModule,
1222
+ MatExpansionModule,
1223
+ MatInputModule,
1224
+ MatInputModule,
1225
+ MatListModule,
1226
+ MatTreeModule,
1227
+ MatTreeModule,
1228
+ MatNativeDateModule,
1229
+ MatDatepickerModule,
1230
+ MatTooltipModule,
1231
+ MatAutocompleteModule,
1232
+ MatChipsModule,
1233
+ MatSidenavModule,
1234
+ MatFormFieldModule,
1235
+ MatStepperModule,
1236
+ MatTabsModule,
1237
+ MatCardModule,
1238
+ MatCheckboxModule,
1239
+ MatSelectModule,
1240
+ MatSlideToggleModule,
1241
+ MatProgressSpinnerModule,
1242
+ MatTableModule,
1243
+ MatPaginatorModule
1244
+ ],
1245
+ }]
1246
1246
  }] });
1247
1247
 
1248
- const environment = {
1249
- production: false,
1250
- // apiUrl: 'http://localhost:4200',
1251
- apiUrl: 'http://192.168.0.191:8080',
1252
- notificationsLifetime: 30000,
1253
- longNotificationsLifetime: 45000,
1254
- cashCleanTimer: 900000,
1255
- cashArrayLength: 10000,
1256
- matomoUrl: 'http://192.168.0.136/matomo/',
1248
+ const environment = {
1249
+ production: false,
1250
+ // apiUrl: 'http://localhost:4200',
1251
+ apiUrl: 'http://192.168.0.191:8080',
1252
+ notificationsLifetime: 30000,
1253
+ longNotificationsLifetime: 45000,
1254
+ cashCleanTimer: 900000,
1255
+ cashArrayLength: 10000,
1256
+ matomoUrl: 'http://192.168.0.136/matomo/',
1257
1257
  };
1258
1258
 
1259
- const TTL_DEFAULT = environment.notificationsLifetime;
1260
- const TTL_LONG_DEFAULT = environment.longNotificationsLifetime;
1261
- var NotificationType;
1262
- (function (NotificationType) {
1263
- NotificationType["info"] = "info";
1264
- NotificationType["error"] = "error";
1265
- NotificationType["success"] = "success";
1266
- NotificationType["warning"] = "warning";
1267
- })(NotificationType || (NotificationType = {}));
1268
- class Notification {
1269
- constructor(data) {
1270
- this.ttl = TTL_DEFAULT;
1271
- Object.assign(this, data || {});
1272
- if (this.ttl === undefined) {
1273
- this.ttl = this.message && this.message.length && this.message.length < 80 ? TTL_DEFAULT : TTL_LONG_DEFAULT;
1274
- }
1275
- }
1276
- isInfo() {
1277
- return this.type === NotificationType.info;
1278
- }
1279
- isError() {
1280
- return this.type === NotificationType.error;
1281
- }
1282
- isSuccess() {
1283
- return this.type === NotificationType.success;
1284
- }
1285
- isWarning() {
1286
- return this.type === NotificationType.warning;
1287
- }
1259
+ const TTL_DEFAULT = environment.notificationsLifetime;
1260
+ const TTL_LONG_DEFAULT = environment.longNotificationsLifetime;
1261
+ var NotificationType;
1262
+ (function (NotificationType) {
1263
+ NotificationType["info"] = "info";
1264
+ NotificationType["error"] = "error";
1265
+ NotificationType["success"] = "success";
1266
+ NotificationType["warning"] = "warning";
1267
+ })(NotificationType || (NotificationType = {}));
1268
+ class Notification {
1269
+ constructor(data) {
1270
+ this.ttl = TTL_DEFAULT;
1271
+ Object.assign(this, data || {});
1272
+ if (this.ttl === undefined) {
1273
+ this.ttl = this.message && this.message.length && this.message.length < 80 ? TTL_DEFAULT : TTL_LONG_DEFAULT;
1274
+ }
1275
+ }
1276
+ isInfo() {
1277
+ return this.type === NotificationType.info;
1278
+ }
1279
+ isError() {
1280
+ return this.type === NotificationType.error;
1281
+ }
1282
+ isSuccess() {
1283
+ return this.type === NotificationType.success;
1284
+ }
1285
+ isWarning() {
1286
+ return this.type === NotificationType.warning;
1287
+ }
1288
1288
  }
1289
1289
 
1290
- const SUCCESS_TIME = 5000;
1291
- const INACTIVE_SESSION_MESSAGE = 'Your session was lost due to inactivity. Please login again';
1292
- const INACTIVE_SESSION = 'SESSION_INACTIVE';
1293
- class NotificationService {
1294
- constructor() {
1295
- this.listChange = new Subject();
1296
- this.max = 0;
1297
- this.list = [];
1298
- }
1299
- error(message, ttl) {
1300
- this.notify('error', message, ttl);
1301
- }
1302
- success(message, ttl) {
1303
- this.notify('success', message, (!ttl) ? SUCCESS_TIME : ttl);
1304
- }
1305
- warning(message, ttl) {
1306
- this.notify('warning', message, ttl);
1307
- }
1308
- info(message, ttl) {
1309
- this.notify('info', message, ttl);
1310
- }
1311
- notify(type, message, ttl) {
1312
- const found = this.list.find((n) => n.message === message);
1313
- if (found) {
1314
- this.remove(found);
1315
- }
1316
- const notification = new Notification({
1317
- id: ++this.max,
1318
- type, message, ttl
1319
- });
1320
- if (notification.ttl > 0) {
1321
- notification.timerId = setTimeout(() => this.remove(notification, true), notification.ttl);
1322
- }
1323
- this.list.push(notification);
1324
- this.listChange.next(this.list);
1325
- }
1326
- remove(notification, auto) {
1327
- if (!auto && notification.timerId) {
1328
- // clear timeout in case of manual remove
1329
- clearInterval(notification.timerId);
1330
- }
1331
- this.list = this.list.filter(n => n.id !== notification.id);
1332
- this.listChange.next(this.list);
1333
- }
1334
- removeInactiveSessionError() {
1335
- if (!this.list || !this.list.length) {
1336
- return;
1337
- }
1338
- this.list = this.list.filter(n => n.message !== INACTIVE_SESSION_MESSAGE && n.message !== INACTIVE_SESSION);
1339
- this.listChange.next(this.list);
1340
- }
1341
- }
1342
- NotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1343
- NotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService });
1344
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, decorators: [{
1345
- type: Injectable
1290
+ const SUCCESS_TIME = 5000;
1291
+ const INACTIVE_SESSION_MESSAGE = 'Your session was lost due to inactivity. Please login again';
1292
+ const INACTIVE_SESSION = 'SESSION_INACTIVE';
1293
+ class NotificationService {
1294
+ constructor() {
1295
+ this.listChange = new Subject();
1296
+ this.max = 0;
1297
+ this.list = [];
1298
+ }
1299
+ error(message, ttl) {
1300
+ this.notify('error', message, ttl);
1301
+ }
1302
+ success(message, ttl) {
1303
+ this.notify('success', message, (!ttl) ? SUCCESS_TIME : ttl);
1304
+ }
1305
+ warning(message, ttl) {
1306
+ this.notify('warning', message, ttl);
1307
+ }
1308
+ info(message, ttl) {
1309
+ this.notify('info', message, ttl);
1310
+ }
1311
+ notify(type, message, ttl) {
1312
+ const found = this.list.find((n) => n.message === message);
1313
+ if (found) {
1314
+ this.remove(found);
1315
+ }
1316
+ const notification = new Notification({
1317
+ id: ++this.max,
1318
+ type, message, ttl
1319
+ });
1320
+ if (notification.ttl > 0) {
1321
+ notification.timerId = setTimeout(() => this.remove(notification, true), notification.ttl);
1322
+ }
1323
+ this.list.push(notification);
1324
+ this.listChange.next(this.list);
1325
+ }
1326
+ remove(notification, auto) {
1327
+ if (!auto && notification.timerId) {
1328
+ // clear timeout in case of manual remove
1329
+ clearInterval(notification.timerId);
1330
+ }
1331
+ this.list = this.list.filter(n => n.id !== notification.id);
1332
+ this.listChange.next(this.list);
1333
+ }
1334
+ removeInactiveSessionError() {
1335
+ if (!this.list || !this.list.length) {
1336
+ return;
1337
+ }
1338
+ this.list = this.list.filter(n => n.message !== INACTIVE_SESSION_MESSAGE && n.message !== INACTIVE_SESSION);
1339
+ this.listChange.next(this.list);
1340
+ }
1341
+ }
1342
+ NotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1343
+ NotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService });
1344
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, decorators: [{
1345
+ type: Injectable
1346
1346
  }], ctorParameters: function () { return []; } });
1347
1347
 
1348
- class NotificationsComponent {
1349
- constructor(notificationService, ref) {
1350
- this.notificationService = notificationService;
1351
- this.ref = ref;
1352
- }
1353
- ngOnInit() {
1354
- this.listChangeSubscribe();
1355
- }
1356
- ngOnDestroy() {
1357
- this.listSubscription.unsubscribe();
1358
- }
1359
- readMore() {
1360
- this.isReadMore = !this.isReadMore;
1361
- }
1362
- removeNotification(notification) {
1363
- this.notificationService.remove(notification);
1364
- }
1365
- listChangeSubscribe() {
1366
- this.listSubscription = this.notificationService.listChange
1367
- .subscribe((list) => {
1368
- this.list = list;
1369
- this.ref.detectChanges();
1370
- });
1371
- }
1372
- }
1373
- 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 });
1374
- 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 });
1375
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationsComponent, decorators: [{
1376
- type: Component,
1377
- 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"] }]
1348
+ class NotificationsComponent {
1349
+ constructor(notificationService, ref) {
1350
+ this.notificationService = notificationService;
1351
+ this.ref = ref;
1352
+ }
1353
+ ngOnInit() {
1354
+ this.listChangeSubscribe();
1355
+ }
1356
+ ngOnDestroy() {
1357
+ this.listSubscription.unsubscribe();
1358
+ }
1359
+ readMore() {
1360
+ this.isReadMore = !this.isReadMore;
1361
+ }
1362
+ removeNotification(notification) {
1363
+ this.notificationService.remove(notification);
1364
+ }
1365
+ listChangeSubscribe() {
1366
+ this.listSubscription = this.notificationService.listChange
1367
+ .subscribe((list) => {
1368
+ this.list = list;
1369
+ this.ref.detectChanges();
1370
+ });
1371
+ }
1372
+ }
1373
+ 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 });
1374
+ 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 });
1375
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationsComponent, decorators: [{
1376
+ type: Component,
1377
+ 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"] }]
1378
1378
  }], ctorParameters: function () { return [{ type: NotificationService }, { type: i0.ChangeDetectorRef }]; } });
1379
1379
 
1380
- class ListUser {
1381
- constructor(user) {
1382
- this.devices = [];
1383
- this.deviceProfiles = [];
1384
- if (user) {
1385
- Object.assign(this, user);
1386
- }
1387
- }
1380
+ class ListUser {
1381
+ constructor(user) {
1382
+ this.devices = [];
1383
+ this.deviceProfiles = [];
1384
+ if (user) {
1385
+ Object.assign(this, user);
1386
+ }
1387
+ }
1388
1388
  }
1389
1389
 
1390
- let RemoveKynFromIBMService$1 = class RemoveKynFromIBMService {
1391
- constructor() {
1392
- }
1393
- removeCUCMS(date, customerId) {
1394
- if (customerId === 8) {
1395
- return date.filter((val) => !CUCMS_TO_IGNORE.includes(Math.round(val.cucmId)));
1396
- }
1397
- return date;
1398
- }
1399
- removeCUCS(date, customerId) {
1400
- if (customerId === 8) {
1401
- return date.filter((val) => !CUCS_TO_IGNORE.includes(Math.round(val.cucId)));
1402
- }
1403
- return date;
1404
- }
1405
- };
1406
- RemoveKynFromIBMService$1.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService$1, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1407
- RemoveKynFromIBMService$1.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService$1 });
1408
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService$1, decorators: [{
1409
- type: Injectable
1390
+ let RemoveKynFromIBMService$1 = class RemoveKynFromIBMService {
1391
+ constructor() {
1392
+ }
1393
+ removeCUCMS(date, customerId) {
1394
+ if (customerId === 8) {
1395
+ return date.filter((val) => !CUCMS_TO_IGNORE.includes(Math.round(val.cucmId)));
1396
+ }
1397
+ return date;
1398
+ }
1399
+ removeCUCS(date, customerId) {
1400
+ if (customerId === 8) {
1401
+ return date.filter((val) => !CUCS_TO_IGNORE.includes(Math.round(val.cucId)));
1402
+ }
1403
+ return date;
1404
+ }
1405
+ };
1406
+ RemoveKynFromIBMService$1.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService$1, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1407
+ RemoveKynFromIBMService$1.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService$1 });
1408
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService$1, decorators: [{
1409
+ type: Injectable
1410
1410
  }], ctorParameters: function () { return []; } });
1411
1411
 
1412
- class UsersSearchService {
1413
- constructor(apiService, removeKynFromIBMService) {
1414
- this.apiService = apiService;
1415
- this.removeKynFromIBMService = removeKynFromIBMService;
1416
- this.siteId = -1;
1417
- this.userId = '';
1418
- this.userIdExistPending = false;
1419
- this.hasExistedUserId = false;
1420
- this.pageSize = PAGINATION_DEFAULTS.SIZE;
1421
- this.pageIndex = PAGINATION_DEFAULTS.SIZE;
1422
- this.pageSizeOptions = PAGINATION_SIZE_OPTIONS;
1423
- this.foundUsers$ = new BehaviorSubject(null);
1424
- }
1425
- getPagination() {
1426
- return {
1427
- total: this.total,
1428
- pageSizeOptions: this.pageSizeOptions,
1429
- pageSize: this.pageSize,
1430
- pageIndex: this.pageIndex
1431
- };
1432
- }
1433
- quickRegularUsersSearch() {
1434
- this.searchParams = this.searchParams || { customerid: this.customerId };
1435
- return this.apiService.fetchPagination(API.QUICK_USERS_SEARCH, this.pageSize, this.pageIndex, this.searchParams)
1436
- .pipe(map((res) => {
1437
- this.total = res.total;
1438
- // this.totals = this.totals || {};
1439
- // this.totals['users'] = res.total;
1440
- const users = res.pageData && res.pageData.length ? res.pageData.map(user => new ListUser(user)) : [];
1441
- // this.foundUsers$.next(this.removeKynFromIBMService.removeCUCMS(users, this.customerId));
1442
- this.foundUsers$.next(users);
1443
- }));
1444
- // .pipe(this.handleError(true));
1445
- }
1446
- }
1447
- 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 });
1448
- UsersSearchService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersSearchService });
1449
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersSearchService, decorators: [{
1450
- type: Injectable
1412
+ class UsersSearchService {
1413
+ constructor(apiService, removeKynFromIBMService) {
1414
+ this.apiService = apiService;
1415
+ this.removeKynFromIBMService = removeKynFromIBMService;
1416
+ this.siteId = -1;
1417
+ this.userId = '';
1418
+ this.userIdExistPending = false;
1419
+ this.hasExistedUserId = false;
1420
+ this.pageSize = PAGINATION_DEFAULTS.SIZE;
1421
+ this.pageIndex = PAGINATION_DEFAULTS.SIZE;
1422
+ this.pageSizeOptions = PAGINATION_SIZE_OPTIONS;
1423
+ this.foundUsers$ = new BehaviorSubject(null);
1424
+ }
1425
+ getPagination() {
1426
+ return {
1427
+ total: this.total,
1428
+ pageSizeOptions: this.pageSizeOptions,
1429
+ pageSize: this.pageSize,
1430
+ pageIndex: this.pageIndex
1431
+ };
1432
+ }
1433
+ quickRegularUsersSearch() {
1434
+ this.searchParams = this.searchParams || { customerid: this.customerId };
1435
+ return this.apiService.fetchPagination(API.QUICK_USERS_SEARCH, this.pageSize, this.pageIndex, this.searchParams)
1436
+ .pipe(map((res) => {
1437
+ this.total = res.total;
1438
+ // this.totals = this.totals || {};
1439
+ // this.totals['users'] = res.total;
1440
+ const users = res.pageData && res.pageData.length ? res.pageData.map(user => new ListUser(user)) : [];
1441
+ // this.foundUsers$.next(this.removeKynFromIBMService.removeCUCMS(users, this.customerId));
1442
+ this.foundUsers$.next(users);
1443
+ }));
1444
+ // .pipe(this.handleError(true));
1445
+ }
1446
+ }
1447
+ 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 });
1448
+ UsersSearchService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersSearchService });
1449
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersSearchService, decorators: [{
1450
+ type: Injectable
1451
1451
  }], ctorParameters: function () { return [{ type: APIService }, { type: RemoveKynFromIBMService$1 }]; } });
1452
1452
 
1453
- class PaginationComponent {
1454
- constructor() {
1455
- this.pageEmitter = new EventEmitter();
1456
- this.pageNumberChangeEmitter = new EventEmitter();
1457
- this.pageSizeOptions = PAGINATION_SIZE_OPTIONS;
1458
- }
1459
- ngOnInit() {
1460
- }
1461
- pageEvent(event) {
1462
- this.pageEmitter.emit(event);
1463
- }
1464
- changePerPageNumber(event) {
1465
- this.pageNumberChangeEmitter.emit(event.value);
1466
- }
1467
- }
1468
- PaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1469
- 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"] }] });
1470
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PaginationComponent, decorators: [{
1471
- type: Component,
1472
- 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"] }]
1473
- }], ctorParameters: function () { return []; }, propDecorators: { pagination: [{
1474
- type: Input
1475
- }], showPageSizeOptions: [{
1476
- type: Input
1477
- }], showRefreshButton: [{
1478
- type: Input
1479
- }], lengthPending: [{
1480
- type: Input
1481
- }], pageEmitter: [{
1482
- type: Output
1483
- }], pageNumberChangeEmitter: [{
1484
- type: Output
1453
+ class PaginationComponent {
1454
+ constructor() {
1455
+ this.pageEmitter = new EventEmitter();
1456
+ this.pageNumberChangeEmitter = new EventEmitter();
1457
+ this.pageSizeOptions = PAGINATION_SIZE_OPTIONS;
1458
+ }
1459
+ ngOnInit() {
1460
+ }
1461
+ pageEvent(event) {
1462
+ this.pageEmitter.emit(event);
1463
+ }
1464
+ changePerPageNumber(event) {
1465
+ this.pageNumberChangeEmitter.emit(event.value);
1466
+ }
1467
+ }
1468
+ PaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1469
+ 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"] }] });
1470
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PaginationComponent, decorators: [{
1471
+ type: Component,
1472
+ 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"] }]
1473
+ }], ctorParameters: function () { return []; }, propDecorators: { pagination: [{
1474
+ type: Input
1475
+ }], showPageSizeOptions: [{
1476
+ type: Input
1477
+ }], showRefreshButton: [{
1478
+ type: Input
1479
+ }], lengthPending: [{
1480
+ type: Input
1481
+ }], pageEmitter: [{
1482
+ type: Output
1483
+ }], pageNumberChangeEmitter: [{
1484
+ type: Output
1485
1485
  }] } });
1486
1486
 
1487
- class RemoveKynFromIBMService {
1488
- constructor() {
1489
- }
1490
- removeCUCMS(date, customerId) {
1491
- if (customerId === 8) {
1492
- return date.filter((val) => !CUCMS_TO_IGNORE.includes(Math.round(val.cucmId)));
1493
- }
1494
- return date;
1495
- }
1496
- removeCUCS(date, customerId) {
1497
- if (customerId === 8) {
1498
- return date.filter((val) => !CUCS_TO_IGNORE.includes(Math.round(val.cucId)));
1499
- }
1500
- return date;
1501
- }
1502
- }
1503
- RemoveKynFromIBMService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1504
- RemoveKynFromIBMService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService });
1505
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService, decorators: [{
1506
- type: Injectable
1487
+ class RemoveKynFromIBMService {
1488
+ constructor() {
1489
+ }
1490
+ removeCUCMS(date, customerId) {
1491
+ if (customerId === 8) {
1492
+ return date.filter((val) => !CUCMS_TO_IGNORE.includes(Math.round(val.cucmId)));
1493
+ }
1494
+ return date;
1495
+ }
1496
+ removeCUCS(date, customerId) {
1497
+ if (customerId === 8) {
1498
+ return date.filter((val) => !CUCS_TO_IGNORE.includes(Math.round(val.cucId)));
1499
+ }
1500
+ return date;
1501
+ }
1502
+ }
1503
+ RemoveKynFromIBMService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1504
+ RemoveKynFromIBMService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService });
1505
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService, decorators: [{
1506
+ type: Injectable
1507
1507
  }], ctorParameters: function () { return []; } });
1508
1508
 
1509
- class LazyLoadingSelectComponent {
1510
- get formControl() {
1511
- var _a;
1512
- return (_a = this.form) === null || _a === void 0 ? void 0 : _a.get(this.controlName);
1513
- }
1514
- constructor(notificationService, siteSettingsService) {
1515
- this.notificationService = notificationService;
1516
- this.siteSettingsService = siteSettingsService;
1517
- this.standalone = true;
1518
- this.appearance = 'standard';
1519
- this.changeField = new EventEmitter();
1520
- }
1521
- ngAfterContentInit() {
1522
- var _a, _b;
1523
- this.options = [(_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.get(this.controlName)) === null || _b === void 0 ? void 0 : _b.value];
1524
- }
1525
- getOptions() {
1526
- if (!this.siteId && this.options.length > 1) {
1527
- return;
1528
- }
1529
- this.optionsPending = true;
1530
- this.siteSettingsService.getSelectionOptions(this.siteId, this.optionsToken)
1531
- .subscribe(() => {
1532
- this.optionsPending = false;
1533
- // @ts-ignore
1534
- this.options = this.siteSettingsService[this.optionsToken];
1535
- }, () => {
1536
- this.optionsPending = false;
1537
- // this.notificationService.error(this.translate.instant('COMMON.LOAD_SELECT_OPTIONS_FAILED'));
1538
- });
1539
- }
1540
- onFieldChange(token) {
1541
- this.changeField.emit(token);
1542
- }
1543
- }
1544
- 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 });
1545
- 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"] }] });
1546
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LazyLoadingSelectComponent, decorators: [{
1547
- type: Component,
1548
- 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"] }]
1549
- }], ctorParameters: function () { return [{ type: NotificationService }, { type: SiteSettingsService }]; }, propDecorators: { siteId: [{
1550
- type: Input
1551
- }], form: [{
1552
- type: Input
1553
- }], standalone: [{
1554
- type: Input
1555
- }], placeholder: [{
1556
- type: Input
1557
- }], controlName: [{
1558
- type: Input
1559
- }], optionsToken: [{
1560
- type: Input
1561
- }], appearance: [{
1562
- type: Input
1563
- }], errorCode: [{
1564
- type: Input
1565
- }], errorText: [{
1566
- type: Input
1567
- }], default: [{
1568
- type: Input
1569
- }], id: [{
1570
- type: Input
1571
- }], changeField: [{
1572
- type: Output
1509
+ class LazyLoadingSelectComponent {
1510
+ get formControl() {
1511
+ var _a;
1512
+ return (_a = this.form) === null || _a === void 0 ? void 0 : _a.get(this.controlName);
1513
+ }
1514
+ constructor(notificationService, siteSettingsService) {
1515
+ this.notificationService = notificationService;
1516
+ this.siteSettingsService = siteSettingsService;
1517
+ this.standalone = true;
1518
+ this.appearance = 'standard';
1519
+ this.changeField = new EventEmitter();
1520
+ }
1521
+ ngAfterContentInit() {
1522
+ var _a, _b;
1523
+ this.options = [(_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.get(this.controlName)) === null || _b === void 0 ? void 0 : _b.value];
1524
+ }
1525
+ getOptions() {
1526
+ if (!this.siteId && this.options.length > 1) {
1527
+ return;
1528
+ }
1529
+ this.optionsPending = true;
1530
+ this.siteSettingsService.getSelectionOptions(this.siteId, this.optionsToken)
1531
+ .subscribe(() => {
1532
+ this.optionsPending = false;
1533
+ // @ts-ignore
1534
+ this.options = this.siteSettingsService[this.optionsToken];
1535
+ }, () => {
1536
+ this.optionsPending = false;
1537
+ // this.notificationService.error(this.translate.instant('COMMON.LOAD_SELECT_OPTIONS_FAILED'));
1538
+ });
1539
+ }
1540
+ onFieldChange(token) {
1541
+ this.changeField.emit(token);
1542
+ }
1543
+ }
1544
+ 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 });
1545
+ 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"] }] });
1546
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LazyLoadingSelectComponent, decorators: [{
1547
+ type: Component,
1548
+ 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"] }]
1549
+ }], ctorParameters: function () { return [{ type: NotificationService }, { type: SiteSettingsService }]; }, propDecorators: { siteId: [{
1550
+ type: Input
1551
+ }], form: [{
1552
+ type: Input
1553
+ }], standalone: [{
1554
+ type: Input
1555
+ }], placeholder: [{
1556
+ type: Input
1557
+ }], controlName: [{
1558
+ type: Input
1559
+ }], optionsToken: [{
1560
+ type: Input
1561
+ }], appearance: [{
1562
+ type: Input
1563
+ }], errorCode: [{
1564
+ type: Input
1565
+ }], errorText: [{
1566
+ type: Input
1567
+ }], default: [{
1568
+ type: Input
1569
+ }], id: [{
1570
+ type: Input
1571
+ }], changeField: [{
1572
+ type: Output
1573
1573
  }] } });
1574
1574
 
1575
- var EntityChangeType;
1576
- (function (EntityChangeType) {
1577
- EntityChangeType["added"] = "added";
1578
- EntityChangeType["updated"] = "updated";
1579
- EntityChangeType["existing"] = "existing";
1580
- EntityChangeType["removed"] = "removed";
1581
- EntityChangeType["unassociated"] = "unassociated";
1582
- })(EntityChangeType || (EntityChangeType = {}));
1583
- var DnRangeType;
1584
- (function (DnRangeType) {
1585
- DnRangeType["extension"] = "EXTENSION";
1586
- DnRangeType["cpg"] = "CPG";
1587
- DnRangeType["callpark"] = "CALLPARK";
1588
- DnRangeType["huntgroup"] = "HUNTGROUP";
1589
- DnRangeType["meetme"] = "MEETME";
1590
- DnRangeType["did"] = "DID";
1575
+ var EntityChangeType;
1576
+ (function (EntityChangeType) {
1577
+ EntityChangeType["added"] = "added";
1578
+ EntityChangeType["updated"] = "updated";
1579
+ EntityChangeType["existing"] = "existing";
1580
+ EntityChangeType["removed"] = "removed";
1581
+ EntityChangeType["unassociated"] = "unassociated";
1582
+ })(EntityChangeType || (EntityChangeType = {}));
1583
+ var DnRangeType;
1584
+ (function (DnRangeType) {
1585
+ DnRangeType["extension"] = "EXTENSION";
1586
+ DnRangeType["cpg"] = "CPG";
1587
+ DnRangeType["callpark"] = "CALLPARK";
1588
+ DnRangeType["huntgroup"] = "HUNTGROUP";
1589
+ DnRangeType["meetme"] = "MEETME";
1590
+ DnRangeType["did"] = "DID";
1591
1591
  })(DnRangeType || (DnRangeType = {}));
1592
1592
 
1593
- // import * as Big from 'big.js';
1594
- class DnsService {
1595
- constructor(apiService) {
1596
- this.apiService = apiService;
1597
- this.availableNumbers = {};
1598
- }
1599
- getNumberRange(siteId, routePartition, withdids, from, pageSize) {
1600
- // @ts-ignore
1601
- if (this.availableNumbers[routePartition] && this.availableNumbers[routePartition].length) {
1602
- return new Observable(observer => {
1603
- // @ts-ignore
1604
- observer.next(this.availableNumbers[routePartition]);
1605
- });
1606
- }
1607
- this.availableDidPatternsMappedToDn = {};
1608
- pageSize = pageSize ? pageSize : 20;
1609
- const params = { dntype: DnRangeType.extension, routepartition: routePartition, size: pageSize, page: 0 };
1610
- if (withdids) {
1611
- // @ts-ignore
1612
- params['withdids'] = 'true';
1613
- }
1614
- if (from) {
1615
- // @ts-ignore
1616
- params['from'] = from;
1617
- }
1618
- // @ts-ignore
1619
- this.availableNumbers[routePartition] = this.availableNumbers[routePartition] || [];
1620
- return this.apiService.fetch(API.AVAILABLE_DN_IN_RANGES.replace(':siteId', siteId), params)
1621
- .pipe(map((res) => {
1622
- res.availableNumberList.forEach((availableNumber) => {
1623
- this.setAvailableDidMappedToDn(availableNumber);
1624
- // @ts-ignore
1625
- this.availableNumbers[routePartition] = [...this.availableNumbers[routePartition], ...this.getUnwrapNumberRange(availableNumber)];
1626
- });
1627
- }));
1628
- // .pipe(this.handleError(true, false));
1629
- }
1630
- setAvailableDidMappedToDn(availableNumber) {
1631
- if (availableNumber.unUsedNumbersWithDids && availableNumber.unUsedNumbersWithDids.length) {
1632
- availableNumber.unUsedNumbersWithDids.forEach((numberWithDids) => {
1633
- const dn = numberWithDids['unUsedNumber'];
1634
- this.availableDidPatternsMappedToDn[dn] = [{}];
1635
- if (numberWithDids['translationPatternList'] && numberWithDids['translationPatternList'].length > 0) {
1636
- this.availableDidPatternsMappedToDn[dn] = numberWithDids['translationPatternList'];
1637
- this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = [{}];
1638
- if (numberWithDids['mappedDids'] && numberWithDids['mappedDids'].length > 0) {
1639
- this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = numberWithDids['mappedDids'];
1640
- }
1641
- }
1642
- this.availableDidPatternsMappedToDn[dn][0]['vm'] = numberWithDids['vm'];
1643
- });
1644
- }
1645
- }
1646
- getUnwrapNumberRange(availableNumber) {
1647
- const unwrapNumberRangeArray = this.unwrapNumberRange(availableNumber.phoneNumberRange.from, availableNumber.phoneNumberRange.to);
1648
- if (unwrapNumberRangeArray === null || unwrapNumberRangeArray === void 0 ? void 0 : unwrapNumberRangeArray.length) {
1649
- let unwrapNumberRange = unwrapNumberRangeArray.map((unwrappedNumber) => {
1650
- const dn = availableNumber.phoneNumberRange.prefix + unwrappedNumber;
1651
- let str = dn;
1652
- if (this.availableDidPatternsMappedToDn[dn] && this.availableDidPatternsMappedToDn[dn].length > 0) {
1653
- if (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] && this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 0) {
1654
- str += ' DID: ' + (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 1 ? 'multiple' :
1655
- this.availableDidPatternsMappedToDn[dn][0]['mappedDids'][0]);
1656
- }
1657
- if (this.availableDidPatternsMappedToDn[dn][0]['vm']) {
1658
- str += ' In Use - VM';
1659
- }
1660
- }
1661
- return str;
1662
- });
1663
- unwrapNumberRange = unwrapNumberRange.filter((unwrappedNumber) => !availableNumber.usedNumbers.includes(unwrappedNumber));
1664
- return unwrapNumberRange;
1665
- }
1666
- else {
1667
- return [];
1668
- }
1669
- }
1670
- unwrapNumberRange(start, end) {
1671
- const regExp = /(^0+)/;
1672
- let leadingZeros = '';
1673
- const matches = start.match(regExp);
1674
- if (matches) {
1675
- leadingZeros = matches[1];
1676
- }
1677
- const startNumeric = new Big(start);
1678
- const endNumeric = new Big(end);
1679
- // @ts-ignore
1680
- return Array.from({ length: (endNumeric.minus(startNumeric).plus(new Big(1)).toFixed(0)) }, (v, k) => {
1681
- const number = String(startNumeric.plus(new Big(k)).toFixed(0));
1682
- if ((leadingZeros + number).length > start.length) {
1683
- leadingZeros = leadingZeros.substr(1);
1684
- }
1685
- return leadingZeros + number;
1686
- });
1687
- }
1688
- }
1689
- DnsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService, deps: [{ token: APIService }], target: i0.ɵɵFactoryTarget.Injectable });
1690
- DnsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService });
1691
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService, decorators: [{
1692
- type: Injectable
1593
+ // import * as Big from 'big.js';
1594
+ class DnsService {
1595
+ constructor(apiService) {
1596
+ this.apiService = apiService;
1597
+ this.availableNumbers = {};
1598
+ }
1599
+ getNumberRange(siteId, routePartition, withdids, from, pageSize) {
1600
+ // @ts-ignore
1601
+ if (this.availableNumbers[routePartition] && this.availableNumbers[routePartition].length) {
1602
+ return new Observable(observer => {
1603
+ // @ts-ignore
1604
+ observer.next(this.availableNumbers[routePartition]);
1605
+ });
1606
+ }
1607
+ this.availableDidPatternsMappedToDn = {};
1608
+ pageSize = pageSize ? pageSize : 20;
1609
+ const params = { dntype: DnRangeType.extension, routepartition: routePartition, size: pageSize, page: 0 };
1610
+ if (withdids) {
1611
+ // @ts-ignore
1612
+ params['withdids'] = 'true';
1613
+ }
1614
+ if (from) {
1615
+ // @ts-ignore
1616
+ params['from'] = from;
1617
+ }
1618
+ // @ts-ignore
1619
+ this.availableNumbers[routePartition] = this.availableNumbers[routePartition] || [];
1620
+ return this.apiService.fetch(API.AVAILABLE_DN_IN_RANGES.replace(':siteId', siteId), params)
1621
+ .pipe(map((res) => {
1622
+ res.availableNumberList.forEach((availableNumber) => {
1623
+ this.setAvailableDidMappedToDn(availableNumber);
1624
+ // @ts-ignore
1625
+ this.availableNumbers[routePartition] = [...this.availableNumbers[routePartition], ...this.getUnwrapNumberRange(availableNumber)];
1626
+ });
1627
+ }));
1628
+ // .pipe(this.handleError(true, false));
1629
+ }
1630
+ setAvailableDidMappedToDn(availableNumber) {
1631
+ if (availableNumber.unUsedNumbersWithDids && availableNumber.unUsedNumbersWithDids.length) {
1632
+ availableNumber.unUsedNumbersWithDids.forEach((numberWithDids) => {
1633
+ const dn = numberWithDids['unUsedNumber'];
1634
+ this.availableDidPatternsMappedToDn[dn] = [{}];
1635
+ if (numberWithDids['translationPatternList'] && numberWithDids['translationPatternList'].length > 0) {
1636
+ this.availableDidPatternsMappedToDn[dn] = numberWithDids['translationPatternList'];
1637
+ this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = [{}];
1638
+ if (numberWithDids['mappedDids'] && numberWithDids['mappedDids'].length > 0) {
1639
+ this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = numberWithDids['mappedDids'];
1640
+ }
1641
+ }
1642
+ this.availableDidPatternsMappedToDn[dn][0]['vm'] = numberWithDids['vm'];
1643
+ });
1644
+ }
1645
+ }
1646
+ getUnwrapNumberRange(availableNumber) {
1647
+ const unwrapNumberRangeArray = this.unwrapNumberRange(availableNumber.phoneNumberRange.from, availableNumber.phoneNumberRange.to);
1648
+ if (unwrapNumberRangeArray === null || unwrapNumberRangeArray === void 0 ? void 0 : unwrapNumberRangeArray.length) {
1649
+ let unwrapNumberRange = unwrapNumberRangeArray.map((unwrappedNumber) => {
1650
+ const dn = availableNumber.phoneNumberRange.prefix + unwrappedNumber;
1651
+ let str = dn;
1652
+ if (this.availableDidPatternsMappedToDn[dn] && this.availableDidPatternsMappedToDn[dn].length > 0) {
1653
+ if (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] && this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 0) {
1654
+ str += ' DID: ' + (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 1 ? 'multiple' :
1655
+ this.availableDidPatternsMappedToDn[dn][0]['mappedDids'][0]);
1656
+ }
1657
+ if (this.availableDidPatternsMappedToDn[dn][0]['vm']) {
1658
+ str += ' In Use - VM';
1659
+ }
1660
+ }
1661
+ return str;
1662
+ });
1663
+ unwrapNumberRange = unwrapNumberRange.filter((unwrappedNumber) => !availableNumber.usedNumbers.includes(unwrappedNumber));
1664
+ return unwrapNumberRange;
1665
+ }
1666
+ else {
1667
+ return [];
1668
+ }
1669
+ }
1670
+ unwrapNumberRange(start, end) {
1671
+ const regExp = /(^0+)/;
1672
+ let leadingZeros = '';
1673
+ const matches = start.match(regExp);
1674
+ if (matches) {
1675
+ leadingZeros = matches[1];
1676
+ }
1677
+ const startNumeric = new Big(start);
1678
+ const endNumeric = new Big(end);
1679
+ // @ts-ignore
1680
+ return Array.from({ length: (endNumeric.minus(startNumeric).plus(new Big(1)).toFixed(0)) }, (v, k) => {
1681
+ const number = String(startNumeric.plus(new Big(k)).toFixed(0));
1682
+ if ((leadingZeros + number).length > start.length) {
1683
+ leadingZeros = leadingZeros.substr(1);
1684
+ }
1685
+ return leadingZeros + number;
1686
+ });
1687
+ }
1688
+ }
1689
+ DnsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService, deps: [{ token: APIService }], target: i0.ɵɵFactoryTarget.Injectable });
1690
+ DnsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService });
1691
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService, decorators: [{
1692
+ type: Injectable
1693
1693
  }], ctorParameters: function () { return [{ type: APIService }]; } });
1694
1694
 
1695
- class UserCallingExtensionComponent {
1696
- get user() {
1697
- return this.userService.user;
1698
- }
1699
- get availableNumbers() {
1700
- // @ts-ignore
1701
- return this.routePartition && this.dnsService.availableNumbers ? this.dnsService.availableNumbers[this.routePartition] : null;
1702
- }
1703
- constructor(userService, dnsService) {
1704
- this.userService = userService;
1705
- this.dnsService = dnsService;
1706
- this.onChange = new EventEmitter();
1707
- }
1708
- ngOnInit() {
1709
- this.getData();
1710
- }
1711
- onChangeField(event) {
1712
- // if (!token) {
1713
- // return;
1714
- // }
1715
- // (this.userService.user as any)[token] = this.form?.get(token)?.value;
1716
- this.onChange.emit(event === null || event === void 0 ? void 0 : event.value);
1717
- }
1718
- getData() {
1719
- if (!this.siteId || !this.routePartition) {
1720
- return;
1721
- }
1722
- this.dataPending = true;
1723
- this.dnsService.getNumberRange(String(this.siteId), this.routePartition)
1724
- .subscribe(() => {
1725
- if (this.availableNumbers) {
1726
- // @ts-ignore
1727
- this.dnsService.availableNumbers[this.routePartition].push(this.directoryNumber);
1728
- }
1729
- this.dataPending = false;
1730
- });
1731
- }
1732
- }
1733
- 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 });
1734
- 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"] }] });
1735
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCallingExtensionComponent, decorators: [{
1736
- type: Component,
1737
- 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"] }]
1738
- }], ctorParameters: function () { return [{ type: UserService }, { type: DnsService }]; }, propDecorators: { control: [{
1739
- type: Input
1740
- }], routePartition: [{
1741
- type: Input
1742
- }], directoryNumber: [{
1743
- type: Input
1744
- }], siteId: [{
1745
- type: Input
1746
- }], onChange: [{
1747
- type: Output
1695
+ class UserCallingExtensionComponent {
1696
+ get user() {
1697
+ return this.userService.user;
1698
+ }
1699
+ get availableNumbers() {
1700
+ // @ts-ignore
1701
+ return this.routePartition && this.dnsService.availableNumbers ? this.dnsService.availableNumbers[this.routePartition] : null;
1702
+ }
1703
+ constructor(userService, dnsService) {
1704
+ this.userService = userService;
1705
+ this.dnsService = dnsService;
1706
+ this.onChange = new EventEmitter();
1707
+ }
1708
+ ngOnInit() {
1709
+ this.getData();
1710
+ }
1711
+ onChangeField(event) {
1712
+ // if (!token) {
1713
+ // return;
1714
+ // }
1715
+ // (this.userService.user as any)[token] = this.form?.get(token)?.value;
1716
+ this.onChange.emit(event === null || event === void 0 ? void 0 : event.value);
1717
+ }
1718
+ getData() {
1719
+ if (!this.siteId || !this.routePartition) {
1720
+ return;
1721
+ }
1722
+ this.dataPending = true;
1723
+ this.dnsService.getNumberRange(String(this.siteId), this.routePartition)
1724
+ .subscribe(() => {
1725
+ if (this.availableNumbers) {
1726
+ // @ts-ignore
1727
+ this.dnsService.availableNumbers[this.routePartition].push(this.directoryNumber);
1728
+ }
1729
+ this.dataPending = false;
1730
+ });
1731
+ }
1732
+ }
1733
+ 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 });
1734
+ 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"] }] });
1735
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCallingExtensionComponent, decorators: [{
1736
+ type: Component,
1737
+ 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"] }]
1738
+ }], ctorParameters: function () { return [{ type: UserService }, { type: DnsService }]; }, propDecorators: { control: [{
1739
+ type: Input
1740
+ }], routePartition: [{
1741
+ type: Input
1742
+ }], directoryNumber: [{
1743
+ type: Input
1744
+ }], siteId: [{
1745
+ type: Input
1746
+ }], onChange: [{
1747
+ type: Output
1748
1748
  }] } });
1749
1749
 
1750
- class UserCallingComponent {
1751
- get form() {
1752
- var _a, _b, _c, _d;
1753
- return ((_b = (_a = this.userService) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.devices[0]) && ((_d = (_c = this.userService) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.devices[0].lineAssociations[0].form);
1754
- }
1755
- get formControl() {
1756
- var _a;
1757
- const control = (_a = this.form) === null || _a === void 0 ? void 0 : _a.get('directoryNumber');
1758
- return control;
1759
- }
1760
- get lineAssociation() {
1761
- var _a, _b;
1762
- return (_b = (_a = this.userService) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.devices[0].lineAssociations[0];
1763
- }
1764
- get user() {
1765
- return this.userService.user;
1766
- }
1767
- constructor(userService, dnsService) {
1768
- this.userService = userService;
1769
- this.dnsService = dnsService;
1770
- this.onExtensionChange = new EventEmitter();
1771
- }
1772
- ngOnInit() {
1773
- // this.getData();
1774
- }
1775
- onDirectoryNumberChange(value) {
1776
- if (this.lineAssociation && this.lineAssociation.directoryNumber) {
1777
- // @ts-ignore
1778
- this.userService.user.devices[0].lineAssociations[0].directoryNumber.directoryNumber = value;
1779
- this.onExtensionChange.next(true);
1780
- }
1781
- }
1782
- onChangeField(token) {
1783
- var _a, _b;
1784
- if (!token) {
1785
- return;
1786
- }
1787
- this.userService.user[token] = (_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.get(token)) === null || _b === void 0 ? void 0 : _b.value;
1788
- }
1789
- toggleEditMode() {
1790
- this.userService.user.toggleEditMode();
1791
- }
1792
- isSavingDisabled() {
1793
- return !this.userService.hasUnsavedChanges() || this.userService.hasExistedUserId;
1794
- }
1795
- onChangeExtension(value) {
1796
- if (this.lineAssociation && this.lineAssociation.directoryNumber) {
1797
- // @ts-ignore
1798
- this.userService.user.devices[0].lineAssociations[0].directoryNumber.directoryNumber = value;
1799
- }
1800
- }
1801
- getData() {
1802
- this.dataPending = true;
1803
- this.dnsService.getNumberRange(String(this.siteId), this.userId)
1804
- .subscribe({
1805
- complete: (v) => {
1806
- this.dataPending = false;
1807
- },
1808
- error: (e) => this.dataPending = false,
1809
- });
1810
- }
1811
- }
1812
- 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 });
1813
- 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"] }] });
1814
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCallingComponent, decorators: [{
1815
- type: Component,
1816
- 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"] }]
1817
- }], ctorParameters: function () { return [{ type: UserService }, { type: DnsService }]; }, propDecorators: { siteId: [{
1818
- type: Input
1819
- }], userId: [{
1820
- type: Input
1821
- }], onExtensionChange: [{
1822
- type: Output
1750
+ class UserCallingComponent {
1751
+ get form() {
1752
+ var _a, _b, _c, _d;
1753
+ return ((_b = (_a = this.userService) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.devices[0]) && ((_d = (_c = this.userService) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.devices[0].lineAssociations[0].form);
1754
+ }
1755
+ get formControl() {
1756
+ var _a;
1757
+ const control = (_a = this.form) === null || _a === void 0 ? void 0 : _a.get('directoryNumber');
1758
+ return control;
1759
+ }
1760
+ get lineAssociation() {
1761
+ var _a, _b;
1762
+ return (_b = (_a = this.userService) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.devices[0].lineAssociations[0];
1763
+ }
1764
+ get user() {
1765
+ return this.userService.user;
1766
+ }
1767
+ constructor(userService, dnsService) {
1768
+ this.userService = userService;
1769
+ this.dnsService = dnsService;
1770
+ this.onExtensionChange = new EventEmitter();
1771
+ }
1772
+ ngOnInit() {
1773
+ // this.getData();
1774
+ }
1775
+ onDirectoryNumberChange(value) {
1776
+ if (this.lineAssociation && this.lineAssociation.directoryNumber) {
1777
+ // @ts-ignore
1778
+ this.userService.user.devices[0].lineAssociations[0].directoryNumber.directoryNumber = value;
1779
+ this.onExtensionChange.next(true);
1780
+ }
1781
+ }
1782
+ onChangeField(token) {
1783
+ var _a, _b;
1784
+ if (!token) {
1785
+ return;
1786
+ }
1787
+ this.userService.user[token] = (_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.get(token)) === null || _b === void 0 ? void 0 : _b.value;
1788
+ }
1789
+ toggleEditMode() {
1790
+ this.userService.user.toggleEditMode();
1791
+ }
1792
+ isSavingDisabled() {
1793
+ return !this.userService.hasUnsavedChanges() || this.userService.hasExistedUserId;
1794
+ }
1795
+ onChangeExtension(value) {
1796
+ if (this.lineAssociation && this.lineAssociation.directoryNumber) {
1797
+ // @ts-ignore
1798
+ this.userService.user.devices[0].lineAssociations[0].directoryNumber.directoryNumber = value;
1799
+ }
1800
+ }
1801
+ getData() {
1802
+ this.dataPending = true;
1803
+ this.dnsService.getNumberRange(String(this.siteId), this.userId)
1804
+ .subscribe({
1805
+ complete: (v) => {
1806
+ this.dataPending = false;
1807
+ },
1808
+ error: (e) => this.dataPending = false,
1809
+ });
1810
+ }
1811
+ }
1812
+ 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 });
1813
+ 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"] }] });
1814
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCallingComponent, decorators: [{
1815
+ type: Component,
1816
+ 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"] }]
1817
+ }], ctorParameters: function () { return [{ type: UserService }, { type: DnsService }]; }, propDecorators: { siteId: [{
1818
+ type: Input
1819
+ }], userId: [{
1820
+ type: Input
1821
+ }], onExtensionChange: [{
1822
+ type: Output
1823
1823
  }] } });
1824
1824
 
1825
- class DeviceListComponent {
1826
- constructor() {
1827
- this.onDeviceSelect = new EventEmitter();
1828
- console.log('devices list');
1829
- }
1830
- selectDevice(device) {
1831
- this.onDeviceSelect.emit(device);
1832
- }
1833
- }
1834
- DeviceListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1835
- 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"] }] });
1836
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceListComponent, decorators: [{
1837
- type: Component,
1838
- 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"] }]
1839
- }], ctorParameters: function () { return []; }, propDecorators: { devices: [{
1840
- type: Input
1841
- }], onDeviceSelect: [{
1842
- type: Output
1825
+ class DeviceListComponent {
1826
+ constructor() {
1827
+ this.onDeviceSelect = new EventEmitter();
1828
+ console.log('devices list');
1829
+ }
1830
+ selectDevice(device) {
1831
+ this.onDeviceSelect.emit(device);
1832
+ }
1833
+ }
1834
+ DeviceListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1835
+ 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"] }] });
1836
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceListComponent, decorators: [{
1837
+ type: Component,
1838
+ 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"] }]
1839
+ }], ctorParameters: function () { return []; }, propDecorators: { devices: [{
1840
+ type: Input
1841
+ }], onDeviceSelect: [{
1842
+ type: Output
1843
1843
  }] } });
1844
1844
 
1845
- class UserManageWidgetComponent {
1846
- get form() {
1847
- var _a, _b;
1848
- return (_b = (_a = this.userService) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.form;
1849
- }
1850
- get user() {
1851
- return this.userService.user;
1852
- }
1853
- get userName() {
1854
- var _a, _b;
1855
- return `${((_a = this.user) === null || _a === void 0 ? void 0 : _a.firstName) || ''} ${((_b = this.user) === null || _b === void 0 ? void 0 : _b.lastName) || ''}`;
1856
- }
1857
- get lineAssociation() {
1858
- var _a, _b;
1859
- return (_b = (_a = this.userService) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.devices[0].lineAssociations[0];
1860
- }
1861
- constructor(userService, apiService) {
1862
- this.userService = userService;
1863
- this.apiService = apiService;
1864
- this.onSave = new EventEmitter();
1865
- this.onChange = new EventEmitter();
1866
- this.selectDevice = new EventEmitter();
1867
- this.goBack = new EventEmitter();
1868
- this.userService.onUserLineSaved$
1869
- .subscribe(() => {
1870
- this.userService.persistCacheChanges()
1871
- .subscribe(() => {
1872
- this.userService.dataPending = false;
1873
- this.onSave.next("saved");
1874
- });
1875
- }, () => this.userService.dataPending = false);
1876
- }
1877
- ngOnInit() {
1878
- this.apiService.token = this.token;
1879
- this.apiService.apiUrl = this.host;
1880
- this.getData();
1881
- }
1882
- onDeviceSelect(device) {
1883
- this.selectDevice.emit(device.name);
1884
- }
1885
- onGoBack() {
1886
- this.goBack.emit();
1887
- }
1888
- onExtensionChange() {
1889
- this.onChange.next("start extension change..");
1890
- }
1891
- onChangeField(token) {
1892
- var _a, _b, _c, _d, _e, _f, _g, _h;
1893
- this.onChange.next("start change..");
1894
- if (!token) {
1895
- return;
1896
- }
1897
- this.userService.user[token] = (_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.get(token)) === null || _b === void 0 ? void 0 : _b.value;
1898
- if (token === 'middleName') {
1899
- (_d = (_c = this.form) === null || _c === void 0 ? void 0 : _c.get(token)) === null || _d === void 0 ? void 0 : _d.setValidators([Validators.pattern('[ a-zA-Z-]+')]);
1900
- }
1901
- if (token === 'telephoneNumber' || token === 'mobileNumber' || token === 'pagerNumber' || token === 'homeNumber') {
1902
- (_f = (_e = this.form) === null || _e === void 0 ? void 0 : _e.get(token)) === null || _f === void 0 ? void 0 : _f.setValidators([Validators.pattern('[ 0-9-+]+')]);
1903
- }
1904
- (_h = (_g = this.form) === null || _g === void 0 ? void 0 : _g.get(token)) === null || _h === void 0 ? void 0 : _h.updateValueAndValidity();
1905
- this.validateUserId();
1906
- }
1907
- saveChanges() {
1908
- var _a;
1909
- if (!this.userService.hasUnsavedChanges() || ((_a = this.form) === null || _a === void 0 ? void 0 : _a.invalid)) {
1910
- return;
1911
- }
1912
- if (this.user.devices[0].lineAssociations[0] && !this.user.devices[0].lineAssociations[0].equals(this.userService.originUser.devices[0].lineAssociations[0])) {
1913
- return this.userService.saveNewLine();
1914
- }
1915
- else {
1916
- this.dataPending = true;
1917
- const subscription = this.userService.persistCacheChanges()
1918
- .subscribe(() => {
1919
- this.dataPending = false;
1920
- this.onSave.next("user has been saved successfully..");
1921
- subscription.unsubscribe();
1922
- }, () => this.dataPending = false);
1923
- }
1924
- }
1925
- toggleEditMode() {
1926
- this.userService.user.toggleEditMode();
1927
- }
1928
- isSavingDisabled() {
1929
- return !this.userService.hasUnsavedChanges() || this.userService.hasExistedUserId;
1930
- }
1931
- changeField(token) {
1932
- var _a, _b;
1933
- this.onChange.next("start change..");
1934
- const formField = (_b = (_a = this.user) === null || _a === void 0 ? void 0 : _a.form) === null || _b === void 0 ? void 0 : _b.get(token);
1935
- if (token !== 'confirmDigestCredentials') {
1936
- // @ts-ignore
1937
- this.user[token] = formField === null || formField === void 0 ? void 0 : formField.value;
1938
- }
1939
- if (token === 'digestCredentials' || token === 'confirmDigestCredentials') {
1940
- this.digestCredentialsHandler(token, formField);
1941
- }
1942
- }
1943
- digestCredentialsHandler(token, field) {
1944
- var _a, _b, _c, _d, _e, _f, _g, _h;
1945
- const fieldNameToCompare = token === 'digestCredentials' ? 'confirmDigestCredentials' : 'digestCredentials';
1946
- const fieldToCompare = this.userService.user.form.get(fieldNameToCompare);
1947
- if ((_b = (_a = this.userService.user) === null || _a === void 0 ? void 0 : _a.form) === null || _b === void 0 ? void 0 : _b.get(token)) {
1948
- (_e = (_d = (_c = this.userService.user) === null || _c === void 0 ? void 0 : _c.form) === null || _d === void 0 ? void 0 : _d.get(token)) === null || _e === void 0 ? void 0 : _e.setErrors(null);
1949
- (_h = (_g = (_f = this.userService.user) === null || _f === void 0 ? void 0 : _f.form) === null || _g === void 0 ? void 0 : _g.get(fieldNameToCompare)) === null || _h === void 0 ? void 0 : _h.setErrors(null);
1950
- /* if (!field.value && !fieldToCompare.value) {
1951
- this.userService.user?.digestCredentials = null;
1952
- return;
1953
- }
1954
-
1955
- if (!field.value && fieldToCompare.value || !fieldToCompare.value && field.value) {
1956
- const requiredFieldName = field.value ? fieldNameToCompare : token;
1957
- this.userService.user.form.get(requiredFieldName).setErrors({required: true});
1958
- return;
1959
- }
1960
- if (field.value && fieldToCompare.value && field.value !== fieldToCompare.value) {
1961
- this.userService.user.form.get(token).setErrors({mismatch: true});
1962
- this.userService.user.form.get(fieldNameToCompare).setErrors({mismatch: true});
1963
- }*/
1964
- }
1965
- }
1966
- getData() {
1967
- this.dataPending = true;
1968
- this.userService.fetchUserToken(this.siteId, this.userId, this.isLdap)
1969
- .subscribe({
1970
- complete: (v) => {
1971
- this.dataPending = false;
1972
- },
1973
- error: (e) => this.dataPending = false,
1974
- });
1975
- }
1976
- setCookie(name, value, days) {
1977
- var expires = "";
1978
- if (days) {
1979
- var date = new Date();
1980
- date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
1981
- expires = "; expires=" + date.toUTCString();
1982
- }
1983
- document.cookie = name + "=" + (value || "") + expires + "; path=/";
1984
- }
1985
- validateUserId() {
1986
- const idControl = this.form.get('userid');
1987
- if ((idControl === null || idControl === void 0 ? void 0 : idControl.value) !== '' && (idControl === null || idControl === void 0 ? void 0 : idControl.value) !== this.userService.originUser.userid) {
1988
- this.userService.fetchUserById(idControl === null || idControl === void 0 ? void 0 : idControl.value)
1989
- .subscribe((res) => {
1990
- var _a, _b;
1991
- this.userService.userIdExistPending = false;
1992
- idControl === null || idControl === void 0 ? void 0 : idControl.setErrors({ exist: true });
1993
- if ((_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.get('userid')) === null || _b === void 0 ? void 0 : _b.hasError('exist')) {
1994
- this.userService.hasExistedUserId = true;
1995
- }
1996
- else {
1997
- this.userService.hasExistedUserId = false;
1998
- }
1999
- }, ((error) => {
2000
- var _a, _b;
2001
- this.userService.userIdExistPending = false;
2002
- if (error.status !== 404) {
2003
- // this.notificationService.warning(this.translate.instant('APP_USER_MSG.CHECK_USER_ID_FAILED'));
2004
- }
2005
- else {
2006
- this.userService.user.newUserId = (_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.get('userid')) === null || _b === void 0 ? void 0 : _b.value;
2007
- }
2008
- }));
2009
- }
2010
- else {
2011
- // delete this.userService?.user?.newUserId;
2012
- }
2013
- }
2014
- save() {
2015
- this.saveChanges();
2016
- }
2017
- }
2018
- 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 });
2019
- 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"] }] });
2020
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageWidgetComponent, decorators: [{
2021
- type: Component,
2022
- 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"] }]
2023
- }], ctorParameters: function () { return [{ type: UserService }, { type: APIService }]; }, propDecorators: { onSave: [{
2024
- type: Output
2025
- }], onChange: [{
2026
- type: Output
2027
- }], selectDevice: [{
2028
- type: Output
2029
- }], goBack: [{
2030
- type: Output
2031
- }], token: [{
2032
- type: Input
2033
- }], host: [{
2034
- type: Input
2035
- }], siteId: [{
2036
- type: Input
2037
- }], userId: [{
2038
- type: Input
2039
- }], deviceName: [{
2040
- type: Input
2041
- }], isLdap: [{
2042
- type: Input
1845
+ class UserManageWidgetComponent {
1846
+ get form() {
1847
+ var _a, _b;
1848
+ return (_b = (_a = this.userService) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.form;
1849
+ }
1850
+ get user() {
1851
+ return this.userService.user;
1852
+ }
1853
+ get userName() {
1854
+ var _a, _b;
1855
+ return `${((_a = this.user) === null || _a === void 0 ? void 0 : _a.firstName) || ''} ${((_b = this.user) === null || _b === void 0 ? void 0 : _b.lastName) || ''}`;
1856
+ }
1857
+ get lineAssociation() {
1858
+ var _a, _b;
1859
+ return (_b = (_a = this.userService) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.devices[0].lineAssociations[0];
1860
+ }
1861
+ constructor(userService, apiService) {
1862
+ this.userService = userService;
1863
+ this.apiService = apiService;
1864
+ this.onSave = new EventEmitter();
1865
+ this.onChange = new EventEmitter();
1866
+ this.selectDevice = new EventEmitter();
1867
+ this.goBack = new EventEmitter();
1868
+ this.userService.onUserLineSaved$
1869
+ .subscribe(() => {
1870
+ this.userService.persistCacheChanges()
1871
+ .subscribe(() => {
1872
+ this.userService.dataPending = false;
1873
+ this.onSave.next("saved");
1874
+ });
1875
+ }, () => this.userService.dataPending = false);
1876
+ }
1877
+ ngOnInit() {
1878
+ this.apiService.token = this.token;
1879
+ this.apiService.apiUrl = this.host;
1880
+ this.getData();
1881
+ }
1882
+ onDeviceSelect(device) {
1883
+ this.selectDevice.emit(device.name);
1884
+ }
1885
+ onGoBack() {
1886
+ this.goBack.emit();
1887
+ }
1888
+ onExtensionChange() {
1889
+ this.onChange.next("start extension change..");
1890
+ }
1891
+ onChangeField(token) {
1892
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1893
+ this.onChange.next("start change..");
1894
+ if (!token) {
1895
+ return;
1896
+ }
1897
+ this.userService.user[token] = (_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.get(token)) === null || _b === void 0 ? void 0 : _b.value;
1898
+ if (token === 'middleName') {
1899
+ (_d = (_c = this.form) === null || _c === void 0 ? void 0 : _c.get(token)) === null || _d === void 0 ? void 0 : _d.setValidators([Validators.pattern('[ a-zA-Z-]+')]);
1900
+ }
1901
+ if (token === 'telephoneNumber' || token === 'mobileNumber' || token === 'pagerNumber' || token === 'homeNumber') {
1902
+ (_f = (_e = this.form) === null || _e === void 0 ? void 0 : _e.get(token)) === null || _f === void 0 ? void 0 : _f.setValidators([Validators.pattern('[ 0-9-+]+')]);
1903
+ }
1904
+ (_h = (_g = this.form) === null || _g === void 0 ? void 0 : _g.get(token)) === null || _h === void 0 ? void 0 : _h.updateValueAndValidity();
1905
+ this.validateUserId();
1906
+ }
1907
+ saveChanges() {
1908
+ var _a;
1909
+ if (!this.userService.hasUnsavedChanges() || ((_a = this.form) === null || _a === void 0 ? void 0 : _a.invalid)) {
1910
+ return;
1911
+ }
1912
+ if (this.user.devices[0].lineAssociations[0] && !this.user.devices[0].lineAssociations[0].equals(this.userService.originUser.devices[0].lineAssociations[0])) {
1913
+ return this.userService.saveNewLine();
1914
+ }
1915
+ else {
1916
+ this.dataPending = true;
1917
+ const subscription = this.userService.persistCacheChanges()
1918
+ .subscribe(() => {
1919
+ this.dataPending = false;
1920
+ this.onSave.next("user has been saved successfully..");
1921
+ subscription.unsubscribe();
1922
+ }, () => this.dataPending = false);
1923
+ }
1924
+ }
1925
+ toggleEditMode() {
1926
+ this.userService.user.toggleEditMode();
1927
+ }
1928
+ isSavingDisabled() {
1929
+ return !this.userService.hasUnsavedChanges() || this.userService.hasExistedUserId;
1930
+ }
1931
+ changeField(token) {
1932
+ var _a, _b;
1933
+ this.onChange.next("start change..");
1934
+ const formField = (_b = (_a = this.user) === null || _a === void 0 ? void 0 : _a.form) === null || _b === void 0 ? void 0 : _b.get(token);
1935
+ if (token !== 'confirmDigestCredentials') {
1936
+ // @ts-ignore
1937
+ this.user[token] = formField === null || formField === void 0 ? void 0 : formField.value;
1938
+ }
1939
+ if (token === 'digestCredentials' || token === 'confirmDigestCredentials') {
1940
+ this.digestCredentialsHandler(token, formField);
1941
+ }
1942
+ }
1943
+ digestCredentialsHandler(token, field) {
1944
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1945
+ const fieldNameToCompare = token === 'digestCredentials' ? 'confirmDigestCredentials' : 'digestCredentials';
1946
+ const fieldToCompare = this.userService.user.form.get(fieldNameToCompare);
1947
+ if ((_b = (_a = this.userService.user) === null || _a === void 0 ? void 0 : _a.form) === null || _b === void 0 ? void 0 : _b.get(token)) {
1948
+ (_e = (_d = (_c = this.userService.user) === null || _c === void 0 ? void 0 : _c.form) === null || _d === void 0 ? void 0 : _d.get(token)) === null || _e === void 0 ? void 0 : _e.setErrors(null);
1949
+ (_h = (_g = (_f = this.userService.user) === null || _f === void 0 ? void 0 : _f.form) === null || _g === void 0 ? void 0 : _g.get(fieldNameToCompare)) === null || _h === void 0 ? void 0 : _h.setErrors(null);
1950
+ /* if (!field.value && !fieldToCompare.value) {
1951
+ this.userService.user?.digestCredentials = null;
1952
+ return;
1953
+ }
1954
+
1955
+ if (!field.value && fieldToCompare.value || !fieldToCompare.value && field.value) {
1956
+ const requiredFieldName = field.value ? fieldNameToCompare : token;
1957
+ this.userService.user.form.get(requiredFieldName).setErrors({required: true});
1958
+ return;
1959
+ }
1960
+ if (field.value && fieldToCompare.value && field.value !== fieldToCompare.value) {
1961
+ this.userService.user.form.get(token).setErrors({mismatch: true});
1962
+ this.userService.user.form.get(fieldNameToCompare).setErrors({mismatch: true});
1963
+ }*/
1964
+ }
1965
+ }
1966
+ getData() {
1967
+ this.dataPending = true;
1968
+ this.userService.fetchUserToken(this.siteId, this.userId, this.isLdap)
1969
+ .subscribe({
1970
+ complete: (v) => {
1971
+ this.dataPending = false;
1972
+ },
1973
+ error: (e) => this.dataPending = false,
1974
+ });
1975
+ }
1976
+ setCookie(name, value, days) {
1977
+ var expires = "";
1978
+ if (days) {
1979
+ var date = new Date();
1980
+ date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
1981
+ expires = "; expires=" + date.toUTCString();
1982
+ }
1983
+ document.cookie = name + "=" + (value || "") + expires + "; path=/";
1984
+ }
1985
+ validateUserId() {
1986
+ const idControl = this.form.get('userid');
1987
+ if ((idControl === null || idControl === void 0 ? void 0 : idControl.value) !== '' && (idControl === null || idControl === void 0 ? void 0 : idControl.value) !== this.userService.originUser.userid) {
1988
+ this.userService.fetchUserById(idControl === null || idControl === void 0 ? void 0 : idControl.value)
1989
+ .subscribe((res) => {
1990
+ var _a, _b;
1991
+ this.userService.userIdExistPending = false;
1992
+ idControl === null || idControl === void 0 ? void 0 : idControl.setErrors({ exist: true });
1993
+ if ((_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.get('userid')) === null || _b === void 0 ? void 0 : _b.hasError('exist')) {
1994
+ this.userService.hasExistedUserId = true;
1995
+ }
1996
+ else {
1997
+ this.userService.hasExistedUserId = false;
1998
+ }
1999
+ }, ((error) => {
2000
+ var _a, _b;
2001
+ this.userService.userIdExistPending = false;
2002
+ if (error.status !== 404) {
2003
+ // this.notificationService.warning(this.translate.instant('APP_USER_MSG.CHECK_USER_ID_FAILED'));
2004
+ }
2005
+ else {
2006
+ this.userService.user.newUserId = (_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.get('userid')) === null || _b === void 0 ? void 0 : _b.value;
2007
+ }
2008
+ }));
2009
+ }
2010
+ else {
2011
+ // delete this.userService?.user?.newUserId;
2012
+ }
2013
+ }
2014
+ save() {
2015
+ this.saveChanges();
2016
+ }
2017
+ }
2018
+ 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 });
2019
+ 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"] }] });
2020
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageWidgetComponent, decorators: [{
2021
+ type: Component,
2022
+ 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"] }]
2023
+ }], ctorParameters: function () { return [{ type: UserService }, { type: APIService }]; }, propDecorators: { onSave: [{
2024
+ type: Output
2025
+ }], onChange: [{
2026
+ type: Output
2027
+ }], selectDevice: [{
2028
+ type: Output
2029
+ }], goBack: [{
2030
+ type: Output
2031
+ }], token: [{
2032
+ type: Input
2033
+ }], host: [{
2034
+ type: Input
2035
+ }], siteId: [{
2036
+ type: Input
2037
+ }], userId: [{
2038
+ type: Input
2039
+ }], deviceName: [{
2040
+ type: Input
2041
+ }], isLdap: [{
2042
+ type: Input
2043
2043
  }] } });
2044
2044
 
2045
- class UserManageModule {
2046
- }
2047
- UserManageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2048
- UserManageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, declarations: [AppLoaderComponent,
2049
- UserInfoComponent,
2050
- NotificationsComponent,
2051
- PaginationComponent,
2052
- LazyLoadingSelectComponent,
2053
- UserManageWidgetComponent,
2054
- UserCallingComponent,
2055
- UserCallingExtensionComponent,
2056
- DeviceListComponent], imports: [CommonModule,
2057
- BrowserModule,
2058
- BrowserAnimationsModule,
2059
- FormsModule,
2060
- ReactiveFormsModule,
2061
- HttpClientModule,
2062
- MaterialModule], exports: [UserManageWidgetComponent] });
2063
- UserManageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, providers: [
2064
- APIService,
2065
- UserService,
2066
- NotificationService,
2067
- UsersSearchService,
2068
- RemoveKynFromIBMService,
2069
- SiteSettingsService,
2070
- DnsService,
2071
- LineService,
2072
- { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
2073
- ], imports: [CommonModule,
2074
- BrowserModule,
2075
- BrowserAnimationsModule,
2076
- FormsModule,
2077
- ReactiveFormsModule,
2078
- HttpClientModule,
2079
- MaterialModule] });
2080
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, decorators: [{
2081
- type: NgModule,
2082
- args: [{
2083
- declarations: [
2084
- AppLoaderComponent,
2085
- UserInfoComponent,
2086
- NotificationsComponent,
2087
- PaginationComponent,
2088
- LazyLoadingSelectComponent,
2089
- UserManageWidgetComponent,
2090
- UserCallingComponent,
2091
- UserCallingExtensionComponent,
2092
- DeviceListComponent
2093
- ],
2094
- imports: [
2095
- CommonModule,
2096
- BrowserModule,
2097
- BrowserAnimationsModule,
2098
- FormsModule,
2099
- ReactiveFormsModule,
2100
- HttpClientModule,
2101
- MaterialModule,
2102
- ],
2103
- providers: [
2104
- APIService,
2105
- UserService,
2106
- NotificationService,
2107
- UsersSearchService,
2108
- RemoveKynFromIBMService,
2109
- SiteSettingsService,
2110
- DnsService,
2111
- LineService,
2112
- { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
2113
- ],
2114
- exports: [UserManageWidgetComponent]
2115
- }]
2045
+ class UserManageModule {
2046
+ }
2047
+ UserManageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2048
+ UserManageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, declarations: [AppLoaderComponent,
2049
+ UserInfoComponent,
2050
+ NotificationsComponent,
2051
+ PaginationComponent,
2052
+ LazyLoadingSelectComponent,
2053
+ UserManageWidgetComponent,
2054
+ UserCallingComponent,
2055
+ UserCallingExtensionComponent,
2056
+ DeviceListComponent], imports: [CommonModule,
2057
+ BrowserModule,
2058
+ BrowserAnimationsModule,
2059
+ FormsModule,
2060
+ ReactiveFormsModule,
2061
+ HttpClientModule,
2062
+ MaterialModule], exports: [UserManageWidgetComponent] });
2063
+ UserManageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, providers: [
2064
+ APIService,
2065
+ UserService,
2066
+ NotificationService,
2067
+ UsersSearchService,
2068
+ RemoveKynFromIBMService,
2069
+ SiteSettingsService,
2070
+ DnsService,
2071
+ LineService,
2072
+ { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
2073
+ ], imports: [CommonModule,
2074
+ BrowserModule,
2075
+ BrowserAnimationsModule,
2076
+ FormsModule,
2077
+ ReactiveFormsModule,
2078
+ HttpClientModule,
2079
+ MaterialModule] });
2080
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, decorators: [{
2081
+ type: NgModule,
2082
+ args: [{
2083
+ declarations: [
2084
+ AppLoaderComponent,
2085
+ UserInfoComponent,
2086
+ NotificationsComponent,
2087
+ PaginationComponent,
2088
+ LazyLoadingSelectComponent,
2089
+ UserManageWidgetComponent,
2090
+ UserCallingComponent,
2091
+ UserCallingExtensionComponent,
2092
+ DeviceListComponent
2093
+ ],
2094
+ imports: [
2095
+ CommonModule,
2096
+ BrowserModule,
2097
+ BrowserAnimationsModule,
2098
+ FormsModule,
2099
+ ReactiveFormsModule,
2100
+ HttpClientModule,
2101
+ MaterialModule,
2102
+ ],
2103
+ providers: [
2104
+ APIService,
2105
+ UserService,
2106
+ NotificationService,
2107
+ UsersSearchService,
2108
+ RemoveKynFromIBMService,
2109
+ SiteSettingsService,
2110
+ DnsService,
2111
+ LineService,
2112
+ { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
2113
+ ],
2114
+ exports: [UserManageWidgetComponent]
2115
+ }]
2116
2116
  }] });
2117
2117
 
2118
- /**
2119
- * Generated bundle index. Do not edit.
2118
+ /**
2119
+ * Generated bundle index. Do not edit.
2120
2120
  */
2121
2121
 
2122
2122
  export { APIService, SiteSettingsService, UserManageModule, UserManageWidgetComponent, UserService, UtilsService };