@tuki-io/tuki-widgets 0.0.26 → 0.0.28

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 (374) hide show
  1. package/.editorconfig +16 -0
  2. package/.vscode/extensions.json +4 -0
  3. package/.vscode/launch.json +20 -0
  4. package/.vscode/tasks.json +42 -0
  5. package/README.md +10 -9
  6. package/angular.json +41 -0
  7. package/package.json +40 -43
  8. package/projects/tuki/widgets/README.md +24 -0
  9. package/projects/tuki/widgets/karma.conf.js +44 -0
  10. package/projects/tuki/widgets/ng-package.json +7 -0
  11. package/projects/tuki/widgets/package.json +13 -0
  12. package/projects/tuki/widgets/src/lib/widgets.component.spec.ts +23 -0
  13. package/projects/tuki/widgets/src/lib/widgets.component.ts +20 -0
  14. package/projects/tuki/widgets/src/lib/widgets.module.ts +16 -0
  15. package/projects/tuki/widgets/src/lib/widgets.service.spec.ts +16 -0
  16. package/projects/tuki/widgets/src/lib/widgets.service.ts +9 -0
  17. package/{public-api.d.ts → projects/tuki/widgets/src/public-api.ts} +4 -0
  18. package/projects/tuki/widgets/src/test.ts +27 -0
  19. package/projects/tuki/widgets/tsconfig.lib.json +36 -0
  20. package/projects/tuki/widgets/tsconfig.lib.prod.json +10 -0
  21. package/projects/tuki/widgets/tsconfig.spec.json +17 -0
  22. package/projects/tuki/widgets/user-device-manage/ng-package.json +7 -0
  23. package/projects/tuki/widgets/user-device-manage/public-api.ts +8 -0
  24. package/projects/tuki/widgets/user-device-manage/src/app.constants.ts +96 -0
  25. package/projects/tuki/widgets/user-device-manage/src/assets/icons/arrow-left.svg +5 -0
  26. package/projects/tuki/widgets/user-device-manage/src/assets/icons/arrow-right.svg +5 -0
  27. package/projects/tuki/widgets/user-device-manage/src/assets/icons/close_icon_x.svg +3 -0
  28. package/projects/tuki/widgets/user-device-manage/src/assets/icons/delete_icon.svg +5 -0
  29. package/projects/tuki/widgets/user-device-manage/src/assets/icons/dragger-vertical-icon.svg +3 -0
  30. package/projects/tuki/widgets/user-device-manage/src/assets/icons/icon_user.svg +1 -0
  31. package/projects/tuki/widgets/user-device-manage/src/assets/icons/vartical_divider_icon.svg +3 -0
  32. package/projects/tuki/widgets/user-device-manage/src/classes/device.ts +292 -0
  33. package/projects/tuki/widgets/user-device-manage/src/classes/line-association-interface.ts +50 -0
  34. package/projects/tuki/widgets/user-device-manage/src/classes/line-association.ts +177 -0
  35. package/projects/tuki/widgets/user-device-manage/src/classes/line-call-info-display.ts +21 -0
  36. package/projects/tuki/widgets/user-device-manage/src/classes/line-directory.ts +41 -0
  37. package/projects/tuki/widgets/user-device-manage/src/classes/line.ts +144 -0
  38. package/projects/tuki/widgets/user-device-manage/src/classes/notification.ts +40 -0
  39. package/projects/tuki/widgets/user-device-manage/src/classes/recording-options.ts +6 -0
  40. package/projects/tuki/widgets/user-device-manage/src/classes/simplified-user.ts +169 -0
  41. package/projects/tuki/widgets/user-device-manage/src/classes/site-defaults.ts +167 -0
  42. package/projects/tuki/widgets/user-device-manage/src/classes/translation-pattern.ts +50 -0
  43. package/projects/tuki/widgets/user-device-manage/src/classes/types.ts +19 -0
  44. package/projects/tuki/widgets/user-device-manage/src/classes/user-interface.ts +225 -0
  45. package/projects/tuki/widgets/user-device-manage/src/classes/user.ts +8 -0
  46. package/projects/tuki/widgets/user-device-manage/src/common-functions.ts +16 -0
  47. package/projects/tuki/widgets/user-device-manage/src/confirm-dialog/info-dialog.component.html +14 -0
  48. package/projects/tuki/widgets/user-device-manage/src/confirm-dialog/info-dialog.component.scss +79 -0
  49. package/projects/tuki/widgets/user-device-manage/src/confirm-dialog/info-dialog.component.ts +35 -0
  50. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/associated-line-row/associated-line-row.component.css +97 -0
  51. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/associated-line-row/associated-line-row.component.html +21 -0
  52. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/associated-line-row/associated-line-row.component.ts +28 -0
  53. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/device-associated-line-details-box/device-associated-line-details-box.component.css +20 -0
  54. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/device-associated-line-details-box/device-associated-line-details-box.component.html +6 -0
  55. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/device-associated-line-details-box/device-associated-line-details-box.component.ts +13 -0
  56. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/device-associated-line-extension/device-associated-line-extension.component.html +6 -0
  57. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/device-associated-line-extension/device-associated-line-extension.component.scss +4 -0
  58. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/device-associated-line-extension/device-associated-line-extension.component.ts +63 -0
  59. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/device-associated-line.component.html +241 -0
  60. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/device-associated-line.component.scss +500 -0
  61. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/device-associated-line.component.ts +194 -0
  62. package/projects/tuki/widgets/user-device-manage/src/device-list/device-list.component.html +27 -0
  63. package/projects/tuki/widgets/user-device-manage/src/device-list/device-list.component.scss +131 -0
  64. package/projects/tuki/widgets/user-device-manage/src/device-list/device-list.component.ts +25 -0
  65. package/projects/tuki/widgets/user-device-manage/src/device-manage-widget.component.html +209 -0
  66. package/projects/tuki/widgets/user-device-manage/src/device-manage-widget.component.scss +502 -0
  67. package/projects/tuki/widgets/user-device-manage/src/device-manage-widget.component.ts +354 -0
  68. package/projects/tuki/widgets/user-device-manage/src/environments/environment.prod.ts +9 -0
  69. package/projects/tuki/widgets/user-device-manage/src/environments/environment.ts +10 -0
  70. package/projects/tuki/widgets/user-device-manage/src/interseptors/auth.interceptor.ts +35 -0
  71. package/projects/tuki/widgets/user-device-manage/src/lazy-loading-select/lazy-loading-select.component.html +50 -0
  72. package/projects/tuki/widgets/user-device-manage/src/lazy-loading-select/lazy-loading-select.component.scss +8 -0
  73. package/projects/tuki/widgets/user-device-manage/src/lazy-loading-select/lazy-loading-select.component.ts +81 -0
  74. package/projects/tuki/widgets/user-device-manage/src/material.module.ts +87 -0
  75. package/projects/tuki/widgets/user-device-manage/src/notifications/notification.component.html +33 -0
  76. package/projects/tuki/widgets/user-device-manage/src/notifications/notification.component.scss +84 -0
  77. package/projects/tuki/widgets/user-device-manage/src/notifications/notification.component.ts +46 -0
  78. package/projects/tuki/widgets/user-device-manage/src/removeKynFromIBM.service.ts +25 -0
  79. package/projects/tuki/widgets/user-device-manage/src/services/api.service.ts +87 -0
  80. package/projects/tuki/widgets/user-device-manage/src/services/common-functions.ts +17 -0
  81. package/projects/tuki/widgets/user-device-manage/src/services/device.service.ts +95 -0
  82. package/projects/tuki/widgets/user-device-manage/src/services/dns.service.ts +111 -0
  83. package/projects/tuki/widgets/user-device-manage/src/services/line.service.ts +89 -0
  84. package/projects/tuki/widgets/user-device-manage/src/services/notification.service.ts +68 -0
  85. package/projects/tuki/widgets/user-device-manage/src/services/removeKynFromIBM.service.ts +25 -0
  86. package/projects/tuki/widgets/user-device-manage/src/services/site-settings.service.ts +82 -0
  87. package/projects/tuki/widgets/user-device-manage/src/services/sorting-utils.service.ts +203 -0
  88. package/projects/tuki/widgets/user-device-manage/src/services/user.service.ts +283 -0
  89. package/projects/tuki/widgets/user-device-manage/src/services/utils.service.ts +87 -0
  90. package/projects/tuki/widgets/user-device-manage/src/services/validation.service.ts +829 -0
  91. package/projects/tuki/widgets/user-device-manage/src/styles/_variables.scss +90 -0
  92. package/projects/tuki/widgets/user-device-manage/src/styles/form.scss +231 -0
  93. package/projects/tuki/widgets/user-device-manage/src/styles/icons.scss +32 -0
  94. package/projects/tuki/widgets/user-device-manage/src/styles/styles.scss +110 -0
  95. package/projects/tuki/widgets/user-device-manage/src/styles/tables.scss +30 -0
  96. package/projects/tuki/widgets/user-device-manage/src/user-device-manage.module.ts +73 -0
  97. package/projects/tuki/widgets/user-device-manage/src/utils/app-loader/app-loader.component.html +6 -0
  98. package/projects/tuki/widgets/user-device-manage/src/utils/app-loader/app-loader.component.scss +11 -0
  99. package/projects/tuki/widgets/user-device-manage/src/utils/app-loader/app-loader.ts +13 -0
  100. package/projects/tuki/widgets/user-manage/ng-package.json +7 -0
  101. package/projects/tuki/widgets/user-manage/src/app.constants.ts +50 -0
  102. package/projects/tuki/widgets/user-manage/src/assets/icons/arrow-left.svg +5 -0
  103. package/projects/tuki/widgets/user-manage/src/assets/icons/arrow-right.svg +5 -0
  104. package/projects/tuki/widgets/user-manage/src/assets/icons/delete_icon.svg +5 -0
  105. package/projects/tuki/widgets/user-manage/src/assets/icons/dragger-vertical-icon.svg +3 -0
  106. package/projects/tuki/widgets/user-manage/src/assets/icons/icon_user.svg +1 -0
  107. package/projects/tuki/widgets/user-manage/src/assets/icons/vartical_divider_icon.svg +3 -0
  108. package/projects/tuki/widgets/user-manage/src/classes/device.ts +232 -0
  109. package/projects/tuki/widgets/user-manage/src/classes/line-association-interface.ts +43 -0
  110. package/projects/tuki/widgets/user-manage/src/classes/line-association.ts +161 -0
  111. package/projects/tuki/widgets/user-manage/src/classes/line-call-info-display.ts +21 -0
  112. package/projects/tuki/widgets/user-manage/src/classes/line-directory.ts +42 -0
  113. package/projects/tuki/widgets/user-manage/src/classes/line.ts +144 -0
  114. package/projects/tuki/widgets/user-manage/src/classes/notification.ts +39 -0
  115. package/projects/tuki/widgets/user-manage/src/classes/pagination.ts +18 -0
  116. package/projects/tuki/widgets/user-manage/src/classes/recording-options.ts +6 -0
  117. package/projects/tuki/widgets/user-manage/src/classes/simplified-user.ts +165 -0
  118. package/projects/tuki/widgets/user-manage/src/classes/table-data.ts +6 -0
  119. package/projects/tuki/widgets/user-manage/src/classes/translation-pattern.ts +49 -0
  120. package/projects/tuki/widgets/user-manage/src/classes/user-interface.ts +225 -0
  121. package/projects/tuki/widgets/user-manage/src/classes/user-list.ts +42 -0
  122. package/projects/tuki/widgets/user-manage/src/classes/user.ts +8 -0
  123. package/projects/tuki/widgets/user-manage/src/common-functions.ts +16 -0
  124. package/projects/tuki/widgets/user-manage/src/device-list/device-list.component.html +27 -0
  125. package/projects/tuki/widgets/user-manage/src/device-list/device-list.component.scss +131 -0
  126. package/projects/tuki/widgets/user-manage/src/device-list/device-list.component.ts +25 -0
  127. package/projects/tuki/widgets/user-manage/src/environments/environment.prod.ts +9 -0
  128. package/projects/tuki/widgets/user-manage/src/environments/environment.ts +10 -0
  129. package/projects/tuki/widgets/user-manage/src/interseptors/auth.interceptor.ts +35 -0
  130. package/projects/tuki/widgets/user-manage/src/lazy-loading-select/lazy-loading-select.component.html +50 -0
  131. package/projects/tuki/widgets/user-manage/src/lazy-loading-select/lazy-loading-select.component.scss +8 -0
  132. package/projects/tuki/widgets/user-manage/src/lazy-loading-select/lazy-loading-select.component.ts +81 -0
  133. package/projects/tuki/widgets/user-manage/src/material.module.ts +85 -0
  134. package/projects/tuki/widgets/user-manage/src/notifications/notification.component.html +33 -0
  135. package/projects/tuki/widgets/user-manage/src/notifications/notification.component.scss +84 -0
  136. package/projects/tuki/widgets/user-manage/src/notifications/notification.component.ts +46 -0
  137. package/projects/tuki/widgets/user-manage/src/removeKynFromIBM.service.ts +25 -0
  138. package/projects/tuki/widgets/user-manage/src/services/api.service.ts +90 -0
  139. package/projects/tuki/widgets/user-manage/src/services/dns.service.ts +116 -0
  140. package/projects/tuki/widgets/user-manage/src/services/line.service.ts +31 -0
  141. package/projects/tuki/widgets/user-manage/src/services/notification.service.ts +68 -0
  142. package/projects/tuki/widgets/user-manage/src/services/removeKynFromIBM.service.ts +25 -0
  143. package/projects/tuki/widgets/user-manage/src/services/site-settings.service.ts +35 -0
  144. package/projects/tuki/widgets/user-manage/src/services/sorting-utils.service.ts +203 -0
  145. package/projects/tuki/widgets/user-manage/src/services/user.service.ts +242 -0
  146. package/projects/tuki/widgets/user-manage/src/services/users-search.service.ts +58 -0
  147. package/projects/tuki/widgets/user-manage/src/services/utils.service.ts +71 -0
  148. package/projects/tuki/widgets/user-manage/src/styles/_variables.scss +90 -0
  149. package/projects/tuki/widgets/user-manage/src/styles/form.scss +231 -0
  150. package/projects/tuki/widgets/user-manage/src/styles/icons.scss +32 -0
  151. package/projects/tuki/widgets/user-manage/src/styles/styles.scss +110 -0
  152. package/projects/tuki/widgets/user-manage/src/styles/tables.scss +30 -0
  153. package/projects/tuki/widgets/user-manage/src/user-calling/user-calling-extension/user-calling-extension.component.html +10 -0
  154. package/projects/tuki/widgets/user-manage/src/user-calling/user-calling-extension/user-calling-extension.component.scss +429 -0
  155. package/projects/tuki/widgets/user-manage/src/user-calling/user-calling-extension/user-calling-extension.component.ts +63 -0
  156. package/projects/tuki/widgets/user-manage/src/user-calling/user-calling.component.html +32 -0
  157. package/projects/tuki/widgets/user-manage/src/user-calling/user-calling.component.scss +444 -0
  158. package/projects/tuki/widgets/user-manage/src/user-calling/user-calling.component.ts +89 -0
  159. package/projects/tuki/widgets/user-manage/src/user-details/notification.service.ts +68 -0
  160. package/projects/tuki/widgets/user-manage/src/user-info/user-info.component.html +29 -0
  161. package/projects/tuki/widgets/user-manage/src/user-info/user-info.component.scss +64 -0
  162. package/projects/tuki/widgets/user-manage/src/user-info/user-info.component.ts +19 -0
  163. package/projects/tuki/widgets/user-manage/src/user-manage-widget.component.html +292 -0
  164. package/projects/tuki/widgets/user-manage/src/user-manage-widget.component.scss +463 -0
  165. package/projects/tuki/widgets/user-manage/src/user-manage-widget.component.ts +212 -0
  166. package/projects/tuki/widgets/user-manage/src/user-manage.module.ts +63 -0
  167. package/projects/tuki/widgets/user-manage/src/utils/app-loader/app-loader.component.html +6 -0
  168. package/projects/tuki/widgets/user-manage/src/utils/app-loader/app-loader.component.scss +11 -0
  169. package/projects/tuki/widgets/user-manage/src/utils/app-loader/app-loader.ts +13 -0
  170. package/projects/tuki/widgets/user-manage/src/utils/pagination/pagination.component.html +26 -0
  171. package/projects/tuki/widgets/user-manage/src/utils/pagination/pagination.component.scss +41 -0
  172. package/projects/tuki/widgets/user-manage/src/utils/pagination/pagination.component.ts +41 -0
  173. package/projects/tuki/widgets/users-list/ng-package.json +6 -0
  174. package/projects/tuki/widgets/users-list/src/app.constants.ts +50 -0
  175. package/projects/tuki/widgets/users-list/src/assets/icons/close_icon_modal.svg +3 -0
  176. package/projects/tuki/widgets/users-list/src/assets/icons/icon_user.svg +1 -0
  177. package/projects/tuki/widgets/users-list/src/classes/device.ts +225 -0
  178. package/projects/tuki/widgets/users-list/src/classes/line.ts +144 -0
  179. package/projects/tuki/widgets/users-list/src/classes/notification.ts +38 -0
  180. package/projects/tuki/widgets/users-list/src/classes/pagination.ts +18 -0
  181. package/projects/tuki/widgets/users-list/src/classes/simlified-user.ts +74 -0
  182. package/projects/tuki/widgets/users-list/src/classes/table-data.ts +6 -0
  183. package/projects/tuki/widgets/users-list/src/classes/user-interface.ts +225 -0
  184. package/projects/tuki/widgets/users-list/src/classes/user-list.ts +47 -0
  185. package/projects/tuki/widgets/users-list/src/classes/user.ts +8 -0
  186. package/projects/tuki/widgets/users-list/src/material.module.ts +94 -0
  187. package/projects/tuki/widgets/users-list/src/move-user-wizard/move-user-stepper/move-user-stepper.component.css +183 -0
  188. package/projects/tuki/widgets/users-list/src/move-user-wizard/move-user-stepper/move-user-stepper.component.html +93 -0
  189. package/projects/tuki/widgets/users-list/src/move-user-wizard/move-user-stepper/move-user-stepper.component.ts +95 -0
  190. package/projects/tuki/widgets/users-list/src/move-user-wizard/move-user-wizard.component.css +38 -0
  191. package/projects/tuki/widgets/users-list/src/move-user-wizard/move-user-wizard.component.html +11 -0
  192. package/projects/tuki/widgets/users-list/src/move-user-wizard/move-user-wizard.component.ts +34 -0
  193. package/projects/tuki/widgets/users-list/src/services/api-webex.service.ts +13 -0
  194. package/projects/tuki/widgets/users-list/src/services/api.service.ts +90 -0
  195. package/projects/tuki/widgets/users-list/src/services/dns.service.ts +128 -0
  196. package/projects/tuki/widgets/users-list/src/services/events-communication.service.ts +11 -0
  197. package/projects/tuki/widgets/users-list/src/services/notification.service.ts +68 -0
  198. package/projects/tuki/widgets/users-list/src/services/removeKynFromIBM.service.ts +25 -0
  199. package/projects/tuki/widgets/users-list/src/services/user.service.ts +168 -0
  200. package/projects/tuki/widgets/users-list/src/services/users-search.service.ts +135 -0
  201. package/projects/tuki/widgets/users-list/src/user-list-confirm-dialog/user-list-confirm-dialog.component.html +14 -0
  202. package/projects/tuki/widgets/users-list/src/user-list-confirm-dialog/user-list-confirm-dialog.component.scss +79 -0
  203. package/projects/tuki/widgets/users-list/src/user-list-confirm-dialog/user-list-confirm-dialog.component.ts +35 -0
  204. package/projects/tuki/widgets/users-list/src/users-list.component.css +4 -0
  205. package/projects/tuki/widgets/users-list/src/users-list.component.css.map +1 -0
  206. package/projects/tuki/widgets/users-list/src/users-list.component.html +86 -0
  207. package/projects/tuki/widgets/users-list/src/users-list.component.scss +572 -0
  208. package/projects/tuki/widgets/users-list/src/users-list.component.ts +283 -0
  209. package/projects/tuki/widgets/users-list/src/users-list.module.ts +51 -0
  210. package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.component.css +11 -0
  211. package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.component.css.map +1 -0
  212. package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.component.html +6 -0
  213. package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.component.scss +11 -0
  214. package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.ts +13 -0
  215. package/projects/tuki/widgets/users-list/src/utils/common-functions.ts +16 -0
  216. package/projects/tuki/widgets/users-list/src/utils/notifications/notification.component.html +33 -0
  217. package/projects/tuki/widgets/users-list/src/utils/notifications/notification.component.scss +84 -0
  218. package/projects/tuki/widgets/users-list/src/utils/notifications/notification.component.ts +46 -0
  219. package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.css +45 -0
  220. package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.css.map +1 -0
  221. package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.html +26 -0
  222. package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.scss +41 -0
  223. package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.ts +41 -0
  224. package/projects/tuki/widgets/users-list/src/utils/utils.service.ts +71 -0
  225. package/tsconfig.json +46 -0
  226. package/esm2020/lib/widgets.component.mjs +0 -22
  227. package/esm2020/lib/widgets.module.mjs +0 -21
  228. package/esm2020/lib/widgets.service.mjs +0 -14
  229. package/esm2020/public-api.mjs +0 -7
  230. package/esm2020/tuki-io-tuki-widgets.mjs +0 -5
  231. package/esm2020/user-manage/public-api.mjs +0 -7
  232. package/esm2020/user-manage/src/app.constants.mjs +0 -50
  233. package/esm2020/user-manage/src/classes/device.mjs +0 -24
  234. package/esm2020/user-manage/src/classes/line-association-interface.mjs +0 -2
  235. package/esm2020/user-manage/src/classes/line-association.mjs +0 -110
  236. package/esm2020/user-manage/src/classes/line-call-info-display.mjs +0 -10
  237. package/esm2020/user-manage/src/classes/line-directory.mjs +0 -27
  238. package/esm2020/user-manage/src/classes/line.mjs +0 -18
  239. package/esm2020/user-manage/src/classes/notification.mjs +0 -32
  240. package/esm2020/user-manage/src/classes/pagination.mjs +0 -8
  241. package/esm2020/user-manage/src/classes/recording-options.mjs +0 -7
  242. package/esm2020/user-manage/src/classes/simplified-user.mjs +0 -109
  243. package/esm2020/user-manage/src/classes/table-data.mjs +0 -2
  244. package/esm2020/user-manage/src/classes/translation-pattern.mjs +0 -32
  245. package/esm2020/user-manage/src/classes/user-list.mjs +0 -10
  246. package/esm2020/user-manage/src/common-functions.mjs +0 -19
  247. package/esm2020/user-manage/src/environments/environment.mjs +0 -11
  248. package/esm2020/user-manage/src/interseptors/auth.interceptor.mjs +0 -36
  249. package/esm2020/user-manage/src/lazy-loading-select/lazy-loading-select.component.mjs +0 -74
  250. package/esm2020/user-manage/src/material.module.mjs +0 -188
  251. package/esm2020/user-manage/src/notifications/notification.component.mjs +0 -35
  252. package/esm2020/user-manage/src/removeKynFromIBM.service.mjs +0 -25
  253. package/esm2020/user-manage/src/services/api.service.mjs +0 -79
  254. package/esm2020/user-manage/src/services/dns.service.mjs +0 -110
  255. package/esm2020/user-manage/src/services/line.service.mjs +0 -34
  256. package/esm2020/user-manage/src/services/notification.service.mjs +0 -62
  257. package/esm2020/user-manage/src/services/removeKynFromIBM.service.mjs +0 -25
  258. package/esm2020/user-manage/src/services/site-settings.service.mjs +0 -36
  259. package/esm2020/user-manage/src/services/sorting-utils.service.mjs +0 -197
  260. package/esm2020/user-manage/src/services/user.service.mjs +0 -207
  261. package/esm2020/user-manage/src/services/users-search.service.mjs +0 -49
  262. package/esm2020/user-manage/src/services/utils.service.mjs +0 -73
  263. package/esm2020/user-manage/src/user-calling/user-calling-extension/user-calling-extension.component.mjs +0 -65
  264. package/esm2020/user-manage/src/user-calling/user-calling.component.mjs +0 -78
  265. package/esm2020/user-manage/src/user-info/user-info.component.mjs +0 -20
  266. package/esm2020/user-manage/src/user-manage-widget.component.mjs +0 -193
  267. package/esm2020/user-manage/src/user-manage.module.mjs +0 -96
  268. package/esm2020/user-manage/src/utils/app-loader/app-loader.mjs +0 -14
  269. package/esm2020/user-manage/src/utils/pagination/pagination.component.mjs +0 -43
  270. package/esm2020/user-manage/tuki-io-tuki-widgets-user-manage.mjs +0 -5
  271. package/esm2020/users-list/public-api.mjs +0 -9
  272. package/esm2020/users-list/src/app.constants.mjs +0 -46
  273. package/esm2020/users-list/src/classes/device.mjs +0 -7
  274. package/esm2020/users-list/src/classes/line.mjs +0 -18
  275. package/esm2020/users-list/src/classes/notification.mjs +0 -31
  276. package/esm2020/users-list/src/classes/pagination.mjs +0 -8
  277. package/esm2020/users-list/src/classes/simlified-user.mjs +0 -50
  278. package/esm2020/users-list/src/classes/table-data.mjs +0 -2
  279. package/esm2020/users-list/src/classes/user-list.mjs +0 -13
  280. package/esm2020/users-list/src/material.module.mjs +0 -195
  281. package/esm2020/users-list/src/services/api-webex.service.mjs +0 -17
  282. package/esm2020/users-list/src/services/api.service.mjs +0 -78
  283. package/esm2020/users-list/src/services/events-communication.service.mjs +0 -14
  284. package/esm2020/users-list/src/services/notification.service.mjs +0 -62
  285. package/esm2020/users-list/src/services/removeKynFromIBM.service.mjs +0 -25
  286. package/esm2020/users-list/src/services/user.service.mjs +0 -129
  287. package/esm2020/users-list/src/services/users-search.service.mjs +0 -99
  288. package/esm2020/users-list/src/users-list.component.mjs +0 -187
  289. package/esm2020/users-list/src/users-list.module.mjs +0 -62
  290. package/esm2020/users-list/src/utils/app-loader/app-loader.mjs +0 -14
  291. package/esm2020/users-list/src/utils/common-functions.mjs +0 -19
  292. package/esm2020/users-list/src/utils/pagination/pagination.component.mjs +0 -43
  293. package/esm2020/users-list/src/utils/utils.service.mjs +0 -73
  294. package/esm2020/users-list/tuki-io-tuki-widgets-users-list.mjs +0 -5
  295. package/fesm2015/tuki-io-tuki-widgets-user-manage.mjs +0 -2074
  296. package/fesm2015/tuki-io-tuki-widgets-user-manage.mjs.map +0 -1
  297. package/fesm2015/tuki-io-tuki-widgets-users-list.mjs +0 -1100
  298. package/fesm2015/tuki-io-tuki-widgets-users-list.mjs.map +0 -1
  299. package/fesm2015/tuki-io-tuki-widgets.mjs +0 -63
  300. package/fesm2015/tuki-io-tuki-widgets.mjs.map +0 -1
  301. package/fesm2020/tuki-io-tuki-widgets-user-manage.mjs +0 -2057
  302. package/fesm2020/tuki-io-tuki-widgets-user-manage.mjs.map +0 -1
  303. package/fesm2020/tuki-io-tuki-widgets-users-list.mjs +0 -1093
  304. package/fesm2020/tuki-io-tuki-widgets-users-list.mjs.map +0 -1
  305. package/fesm2020/tuki-io-tuki-widgets.mjs +0 -63
  306. package/fesm2020/tuki-io-tuki-widgets.mjs.map +0 -1
  307. package/index.d.ts +0 -5
  308. package/lib/widgets.component.d.ts +0 -8
  309. package/lib/widgets.module.d.ts +0 -7
  310. package/lib/widgets.service.d.ts +0 -6
  311. package/user-manage/index.d.ts +0 -5
  312. package/user-manage/src/app.constants.d.ts +0 -29
  313. package/user-manage/src/classes/device.d.ts +0 -186
  314. package/user-manage/src/classes/line-association-interface.d.ts +0 -40
  315. package/user-manage/src/classes/line-association.d.ts +0 -55
  316. package/user-manage/src/classes/line-call-info-display.d.ts +0 -11
  317. package/user-manage/src/classes/line-directory.d.ts +0 -16
  318. package/user-manage/src/classes/line.d.ts +0 -140
  319. package/user-manage/src/classes/notification.d.ts +0 -18
  320. package/user-manage/src/classes/pagination.d.ts +0 -13
  321. package/user-manage/src/classes/recording-options.d.ts +0 -5
  322. package/user-manage/src/classes/simplified-user.d.ts +0 -50
  323. package/user-manage/src/classes/table-data.d.ts +0 -5
  324. package/user-manage/src/classes/translation-pattern.d.ts +0 -18
  325. package/user-manage/src/classes/user-list.d.ts +0 -34
  326. package/user-manage/src/common-functions.d.ts +0 -1
  327. package/user-manage/src/environments/environment.d.ts +0 -9
  328. package/user-manage/src/interseptors/auth.interceptor.d.ts +0 -9
  329. package/user-manage/src/lazy-loading-select/lazy-loading-select.component.d.ts +0 -35
  330. package/user-manage/src/material.module.d.ts +0 -28
  331. package/user-manage/src/notifications/notification.component.d.ts +0 -19
  332. package/user-manage/src/removeKynFromIBM.service.d.ts +0 -8
  333. package/user-manage/src/services/api.service.d.ts +0 -21
  334. package/user-manage/src/services/dns.service.d.ts +0 -14
  335. package/user-manage/src/services/line.service.d.ts +0 -17
  336. package/user-manage/src/services/notification.service.d.ts +0 -18
  337. package/user-manage/src/services/removeKynFromIBM.service.d.ts +0 -8
  338. package/user-manage/src/services/site-settings.service.d.ts +0 -9
  339. package/user-manage/src/services/sorting-utils.service.d.ts +0 -26
  340. package/user-manage/src/services/user.service.d.ts +0 -43
  341. package/user-manage/src/services/users-search.service.d.ts +0 -25
  342. package/user-manage/src/services/utils.service.d.ts +0 -9
  343. package/user-manage/src/user-calling/user-calling-extension/user-calling-extension.component.d.ts +0 -24
  344. package/user-manage/src/user-calling/user-calling.component.d.ts +0 -30
  345. package/user-manage/src/user-info/user-info.component.d.ts +0 -9
  346. package/user-manage/src/user-manage-widget.component.d.ts +0 -39
  347. package/user-manage/src/user-manage.module.d.ts +0 -20
  348. package/user-manage/src/utils/app-loader/app-loader.d.ts +0 -6
  349. package/user-manage/src/utils/pagination/pagination.component.d.ts +0 -18
  350. package/users-list/index.d.ts +0 -5
  351. package/users-list/src/app.constants.d.ts +0 -28
  352. package/users-list/src/classes/device.d.ts +0 -224
  353. package/users-list/src/classes/line.d.ts +0 -140
  354. package/users-list/src/classes/notification.d.ts +0 -18
  355. package/users-list/src/classes/pagination.d.ts +0 -13
  356. package/users-list/src/classes/simlified-user.d.ts +0 -25
  357. package/users-list/src/classes/table-data.d.ts +0 -5
  358. package/users-list/src/classes/user-list.d.ts +0 -36
  359. package/users-list/src/material.module.d.ts +0 -29
  360. package/users-list/src/services/api-webex.service.d.ts +0 -8
  361. package/users-list/src/services/api.service.d.ts +0 -21
  362. package/users-list/src/services/events-communication.service.d.ts +0 -8
  363. package/users-list/src/services/notification.service.d.ts +0 -18
  364. package/users-list/src/services/removeKynFromIBM.service.d.ts +0 -8
  365. package/users-list/src/services/user.service.d.ts +0 -32
  366. package/users-list/src/services/users-search.service.d.ts +0 -31
  367. package/users-list/src/users-list.component.d.ts +0 -49
  368. package/users-list/src/users-list.module.d.ts +0 -13
  369. package/users-list/src/utils/app-loader/app-loader.d.ts +0 -6
  370. package/users-list/src/utils/common-functions.d.ts +0 -1
  371. package/users-list/src/utils/pagination/pagination.component.d.ts +0 -18
  372. package/users-list/src/utils/utils.service.d.ts +0 -9
  373. /package/{user-manage/public-api.d.ts → projects/tuki/widgets/user-manage/public-api.ts} +0 -0
  374. /package/{users-list/public-api.d.ts → projects/tuki/widgets/users-list/public-api.ts} +0 -0
@@ -1,2057 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable, Component, ViewEncapsulation, Input, NgModule, ChangeDetectionStrategy, EventEmitter, Output } from '@angular/core';
3
- import * as i1 from '@angular/common/http';
4
- import { HttpHeaders, HttpErrorResponse, HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
5
- import { map, catchError } from 'rxjs/operators';
6
- import { Subject, of, forkJoin, throwError, BehaviorSubject, Observable } from 'rxjs';
7
- import * as i4 from '@angular/forms';
8
- import { FormBuilder, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
9
- import { BrowserModule } from '@angular/platform-browser';
10
- import * as i5 from '@angular/material/progress-spinner';
11
- import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
12
- import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
13
- import * as i3 from '@angular/common';
14
- import { CommonModule } from '@angular/common';
15
- import { MatExpansionModule } from '@angular/material/expansion';
16
- import { MatDatepickerModule } from '@angular/material/datepicker';
17
- import { MatAutocompleteModule } from '@angular/material/autocomplete';
18
- import { MatChipsModule } from '@angular/material/chips';
19
- import { MatListModule } from '@angular/material/list';
20
- import { MatSidenavModule } from '@angular/material/sidenav';
21
- import { MatTreeModule } from '@angular/material/tree';
22
- import { DragDropModule } from '@angular/cdk/drag-drop';
23
- import { MatButtonModule } from '@angular/material/button';
24
- import * as i7$1 from '@angular/material/input';
25
- import { MatInputModule } from '@angular/material/input';
26
- import * as i7 from '@angular/material/core';
27
- import { MatNativeDateModule } from '@angular/material/core';
28
- import { MatTooltipModule } from '@angular/material/tooltip';
29
- import * as i6$1 from '@angular/material/form-field';
30
- import { MatFormFieldModule } from '@angular/material/form-field';
31
- import { MatStepperModule } from '@angular/material/stepper';
32
- import * as i8$1 from '@angular/material/tabs';
33
- import { MatTabsModule } from '@angular/material/tabs';
34
- import { MatCardModule } from '@angular/material/card';
35
- import * as i8 from '@angular/material/select';
36
- import { MatSelectModule } from '@angular/material/select';
37
- import { MatCheckboxModule } from '@angular/material/checkbox';
38
- import * as i9 from '@angular/material/slide-toggle';
39
- import { MatSlideToggleModule } from '@angular/material/slide-toggle';
40
- import { MatTableModule } from '@angular/material/table';
41
- import * as i6 from '@angular/material/paginator';
42
- import { MatPaginatorModule } from '@angular/material/paginator';
43
- import * as i5$1 from '@angular/material/divider';
44
- import { Big } from 'big.js';
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
119
- }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
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"
169
- ];
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
200
- }], ctorParameters: function () { return [{ type: APIService }]; } });
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
- }, {});
219
- };
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
- }
244
- }
245
-
246
- class LineCallInfoDisplay {
247
- constructor(lineCallInfoDisplay) {
248
- Object.assign(this, lineCallInfoDisplay || {});
249
- }
250
- getSavableData() {
251
- return getSavableData(this, ['form']);
252
- }
253
- }
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
- }
283
- }
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
- }
386
- }
387
-
388
- class Device {
389
- constructor(device) {
390
- if (device) {
391
- this.name = device.name;
392
- this.deviceType = device.deviceType;
393
- this.pkiid = device.pkiid;
394
- this.lineAssociations = device.lineAssociations?.length ?
395
- device.lineAssociations.map((line) => new LineAssociation(line)) : [];
396
- }
397
- }
398
- getSavableData() {
399
- const excludedFields = ['form'];
400
- return getSavableData(this, excludedFields);
401
- }
402
- }
403
- var RecordingOptions;
404
- (function (RecordingOptions) {
405
- RecordingOptions["disabled"] = "Call Recording Disabled";
406
- RecordingOptions["auto_enabled"] = "Automatic Call Recording Enabled";
407
- RecordingOptions["selective_enabled"] = "Selective Call Recording Enabled";
408
- })(RecordingOptions || (RecordingOptions = {}));
409
-
410
- class SimplifiedUser {
411
- constructor(user, isLdap) {
412
- // isLdap TEMP because of token response issue
413
- if (user) {
414
- this.userid = user.userid;
415
- this.email = user.email;
416
- this.firstName = user.firstName;
417
- this.lastName = user.lastName;
418
- this.siteId = user.siteId;
419
- this.siteName = user.siteName;
420
- this.token = user.token;
421
- this.department = user.department;
422
- this.manager = user.manager;
423
- this.associatedPc = user.associatedPc;
424
- this.digestCredentials = user.digestCredentials;
425
- this.userProfile = user.userProfile;
426
- this.enableMobileVoiceAccess = user.enableMobileVoiceAccess;
427
- this.ldapIntegrated = user.ldapIntegrated || isLdap || false;
428
- this.userLocale = user.userLocale;
429
- this.confirmDigestCredentials = user.confirmDigestCredentials;
430
- this.middleName = user.middleName;
431
- this.telephoneNumber = user.telephoneNumber;
432
- this.mobileNumber = user.mobileNumber;
433
- this.directoryUri = user.directoryUri;
434
- this.title = user.title;
435
- this.homeNumber = user.homeNumber;
436
- this.pagerNumber = user.pagerNumber;
437
- this.displayName = user.displayName;
438
- if (user.devices && user.devices.length) {
439
- this.devices = user.devices.map((device) => new Device(device));
440
- if (user.lines && user.lines.length) {
441
- this.devices.forEach(device => {
442
- if (device && device.lineAssociations && device.lineAssociations.length) {
443
- device.lineAssociations.forEach(lineAssociation => {
444
- lineAssociation.callingSearchSpace = this.getLineVal(lineAssociation, user.lines, 'callingSearchSpace');
445
- lineAssociation.textLabel = lineAssociation.textLabel || this.getLineVal(lineAssociation, user.lines, 'textLabel') || '';
446
- lineAssociation.alertingName = lineAssociation.alertingName || this.getLineVal(lineAssociation, user.lines, 'alertingName') || '';
447
- });
448
- }
449
- });
450
- }
451
- }
452
- }
453
- this.initForm();
454
- }
455
- getLineVal(lineAssociation, lines, token) {
456
- const lineForVal = lines.find((line) => line.directoryNumber.directoryNumber === lineAssociation.directoryNumber.directoryNumber);
457
- return lineForVal && lineForVal[token] || '';
458
- }
459
- getUserDetailsSavableData() {
460
- const excludedFields = ['devices', 'deviceProfiles', 'lines', 'singleNumberReach', 'vmPassword', 'vmUnifiedMessagingAccount', 'alternateExtensions', 'callerInput', 'lineAppearances', 'meetMes', 'webAppPasswordSettings', 'form'];
461
- return getSavableData(this, excludedFields);
462
- }
463
- initForm() {
464
- const formBuilder = new FormBuilder();
465
- const formSettings = {
466
- userid: [{ value: this.userid || '', disabled: this.ldapIntegrated }, [Validators.required, Validators.maxLength(128)]],
467
- email: [{ value: this.email || '', disabled: this.ldapIntegrated }, [
468
- Validators.pattern(REGEX_PATTERN.EMAIL),
469
- Validators.required
470
- ]],
471
- firstName: [{ value: this.firstName || '', disabled: this.ldapIntegrated }],
472
- lastName: [{ value: this.lastName || '', disabled: this.ldapIntegrated }, Validators.required],
473
- department: [{ value: this.department || '', disabled: false }],
474
- middleName: [{ value: this.middleName || '', disabled: false }],
475
- title: [{ value: this.title || '', disabled: false }],
476
- telephoneNumber: [{ value: this.telephoneNumber || '', disabled: false }],
477
- homeNumber: [{ value: this.homeNumber || '', disabled: false }],
478
- mobileNumber: [{ value: this.mobileNumber || '', disabled: false }],
479
- pagerNumber: [{ value: this.pagerNumber || '', disabled: false }],
480
- displayName: [{ value: this.displayName || '', disabled: false }],
481
- manager: [{ value: this.manager || '', disabled: false }],
482
- associatedPc: [this.associatedPc || ''],
483
- directoryUri: [this.directoryUri || ''],
484
- userProfile: [this.userProfile],
485
- enableMobileVoiceAccess: [this.enableMobileVoiceAccess],
486
- ldapIntegrated: [this.ldapIntegrated],
487
- userLocale: [this.userLocale || ''],
488
- digestCredentials: [''],
489
- confirmDigestCredentials: ['']
490
- };
491
- this.form = formBuilder.group(formSettings);
492
- }
493
- toggleEditMode() {
494
- this.editMode = !this.editMode;
495
- /*['userid', 'email', 'firstName', 'lastName'].forEach(token => {
496
- if (this.editMode) {
497
- this.form.get(token)?.enable();
498
- } else {
499
- this.form.get(token)?.disable();
500
- }
501
- })*/
502
- }
503
- getSavableData() {
504
- const excludedFields = ['form', 'editMode', 'viewMode', 'token', 'hasModifiedCache', 'confirmDigestCredentials'];
505
- return getSavableData(this, excludedFields);
506
- }
507
- equal(userToCompare) {
508
- if (!userToCompare) {
509
- return false;
510
- }
511
- return JSON.stringify(this.getSavableData()) === JSON.stringify(userToCompare.getSavableData());
512
- }
513
- }
514
-
515
- class UtilsService {
516
- static sortSortArrayByProperty(array, sortBy) {
517
- if (!array) {
518
- return null;
519
- }
520
- return array.sort((a, b) => {
521
- if (!a[sortBy] && !b[sortBy]) {
522
- return 0;
523
- }
524
- if (a[sortBy] && !b[sortBy]) {
525
- return 1;
526
- }
527
- if (!a[sortBy] && b[sortBy]) {
528
- return -1;
529
- }
530
- const positionA = a[sortBy];
531
- const positionB = b[sortBy];
532
- return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
533
- });
534
- }
535
- static diff(origObject, updatedObj, path, keysToIgnore) {
536
- let result = [];
537
- if (Object.is(origObject, updatedObj)) {
538
- return undefined;
539
- }
540
- if (!updatedObj || typeof updatedObj !== 'object') {
541
- return updatedObj;
542
- }
543
- const concat = Array.from(new Set([...Object.keys(origObject || {}), ...Object.keys(updatedObj || {})]));
544
- const filter = keysToIgnore ? concat.filter(key => !keysToIgnore.includes(key)) : concat;
545
- filter
546
- .forEach(key => {
547
- if (typeof updatedObj[key] === 'object' && typeof origObject[key] === 'object') {
548
- if (UtilsService.differs(updatedObj[key], origObject[key])) {
549
- const newPath = `${path}${path ? '.' : ''}${key}`;
550
- const values = UtilsService.diff(origObject[key], updatedObj[key], newPath, keysToIgnore);
551
- if (values !== undefined) {
552
- result = [...result, ...values];
553
- }
554
- }
555
- }
556
- else if (updatedObj && !origObject || updatedObj[key] !== origObject[key] && !Object.is(origObject[key], updatedObj[key])) {
557
- const value = updatedObj ? UtilsService.formatIfEmpty(updatedObj[key]) : null;
558
- result.push(`${path}${path ? '.' : ''}${key}=${value}`);
559
- }
560
- });
561
- return result;
562
- }
563
- static formatIfEmpty(value) {
564
- if (value) {
565
- return value;
566
- }
567
- switch (typeof value) {
568
- case 'boolean':
569
- return value;
570
- case 'string':
571
- return '';
572
- default:
573
- return null;
574
- }
575
- }
576
- static differs(obj1, obj2) {
577
- return JSON.stringify(obj1) !== JSON.stringify(obj2);
578
- }
579
- }
580
- UtilsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
581
- UtilsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService });
582
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService, decorators: [{
583
- type: Injectable
584
- }] });
585
-
586
- const string_array = function (original, updated, fullKey) {
587
- if (!updated || !SortingUtilsService.differs(original, updated)) {
588
- return null;
589
- }
590
- return `${fullKey}=${updated.join(',')}`;
591
- };
592
- const line_reference = function (original, updated, fullKey) {
593
- if (!updated || !SortingUtilsService.differs(original, updated)) {
594
- return null;
595
- }
596
- // @ts-ignore
597
- return Object.keys(updated).map(key => `${fullKey}.${key}=${updated[key]}`);
598
- };
599
- const nullable = function (original, updated, fullKey) {
600
- if (!original && updated) {
601
- // @ts-ignore
602
- return Object.keys(updated).map(key => `${fullKey}.${key}=${updated[key]}`);
603
- }
604
- else if (original && !updated) {
605
- return `${fullKey}=null`;
606
- }
607
- else {
608
- return SortingUtilsService.diff(original, updated, fullKey, []);
609
- }
610
- };
611
- class SortingUtilsService {
612
- static sortDevicesByTypeAndName(array) {
613
- if (!array) {
614
- return null;
615
- }
616
- return array.sort((a, b) => {
617
- if (a.deviceType === b.deviceType) {
618
- return (a.name < b.name) ? -1 : (a.name > b.name) ? 1 : 0;
619
- }
620
- else {
621
- return (a.deviceType < b.deviceType) ? -1 : 1;
622
- }
623
- });
624
- }
625
- static sortLinesByDirectoryName(array) {
626
- if (!array) {
627
- return null;
628
- }
629
- return array.sort((a, b) => {
630
- if (!a.directoryNumber && !b.directoryNumber) {
631
- return 0;
632
- }
633
- if (a.directoryNumber && !b.directoryNumber) {
634
- return 1;
635
- }
636
- if (!a.directoryNumber && b.directoryNumber) {
637
- return -1;
638
- }
639
- const directoryNumberA = a.directoryNumber.directoryNumber;
640
- const directoryNumberB = b.directoryNumber.directoryNumber;
641
- return (directoryNumberA < directoryNumberB) ? -1 : (directoryNumberA > directoryNumberB) ? 1 : 0;
642
- });
643
- }
644
- static sortLineAssociationsByPosition(array) {
645
- if (!array) {
646
- return null;
647
- }
648
- return array.sort((a, b) => {
649
- if (!a.position && !b.position) {
650
- return 0;
651
- }
652
- if (a.position && !b.position) {
653
- return 1;
654
- }
655
- if (!a.position && b.position) {
656
- return -1;
657
- }
658
- const positionA = a.position;
659
- const positionB = b.position;
660
- return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
661
- });
662
- }
663
- static sortSortArrayByProperty(array, sortBy) {
664
- if (!array) {
665
- return null;
666
- }
667
- return array.sort((a, b) => {
668
- if (!a[sortBy] && !b[sortBy]) {
669
- return 0;
670
- }
671
- if (a[sortBy] && !b[sortBy]) {
672
- return 1;
673
- }
674
- if (!a[sortBy] && b[sortBy]) {
675
- return -1;
676
- }
677
- const positionA = a[sortBy];
678
- const positionB = b[sortBy];
679
- return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
680
- });
681
- }
682
- static diff(origObject, updatedObj, path, keysToIgnore) {
683
- let result = [];
684
- if (Object.is(origObject, updatedObj)) {
685
- return undefined;
686
- }
687
- if (!updatedObj || typeof updatedObj !== 'object') {
688
- return updatedObj;
689
- }
690
- const concat = Array.from(new Set([...Object.keys(origObject || {}), ...Object.keys(updatedObj || {})]));
691
- const filter = keysToIgnore ? concat.filter(key => !keysToIgnore.includes(key)) : concat;
692
- filter
693
- .forEach(key => {
694
- // @ts-ignore
695
- if (this.dictionary[key]) {
696
- // @ts-ignore
697
- const complexResult = this.dictionary[key](origObject[key], updatedObj[key], `${path}${path ? '.' : ''}${key}`);
698
- if (complexResult) {
699
- if (Array.isArray(complexResult)) {
700
- result = [...result, ...complexResult];
701
- }
702
- else {
703
- result.push(complexResult);
704
- }
705
- }
706
- }
707
- else if (typeof updatedObj[key] === 'object' && typeof origObject[key] === 'object') {
708
- if (SortingUtilsService.differs(updatedObj[key], origObject[key])) {
709
- const newPath = `${path}${path ? '.' : ''}${key}`;
710
- const values = SortingUtilsService.diff(origObject[key], updatedObj[key], newPath, keysToIgnore);
711
- if (values !== undefined) {
712
- result = [...result, ...values];
713
- }
714
- }
715
- }
716
- else if (updatedObj && !origObject || updatedObj[key] !== origObject[key] && !Object.is(origObject[key], updatedObj[key])) {
717
- const value = updatedObj ? SortingUtilsService.formatIfEmpty(updatedObj[key]) : null;
718
- result.push(`${path}${path ? '.' : ''}${key}=${value}`);
719
- }
720
- });
721
- return result;
722
- }
723
- static formatIfEmpty(value) {
724
- if (value) {
725
- return value;
726
- }
727
- switch (typeof value) {
728
- case 'boolean':
729
- return value;
730
- case 'string':
731
- return '';
732
- default:
733
- return null;
734
- }
735
- }
736
- static differs(obj1, obj2) {
737
- return JSON.stringify(obj1) !== JSON.stringify(obj2);
738
- }
739
- }
740
- SortingUtilsService.dictionary = {
741
- features: string_array,
742
- services: string_array,
743
- directoryNumber: line_reference,
744
- primaryLineReference: line_reference,
745
- speedDials: function (original, updated, fullKey) {
746
- if (!updated || !SortingUtilsService.differs(original, updated)) {
747
- return null;
748
- }
749
- // todo only changes, identification
750
- let map = [];
751
- updated.map((speedDial) => {
752
- const currentFullKey = `${fullKey}.${speedDial.index}`; // ${speedDial.type} CHECk ?
753
- map = [...map, Object.keys(speedDial).map(key => `${currentFullKey}.${key}=${speedDial[key]}`)];
754
- });
755
- return map;
756
- },
757
- lineAssociations: function (original, updated, fullKey) {
758
- if (!updated || !SortingUtilsService.differs(original, updated)) {
759
- return null;
760
- }
761
- let map = [];
762
- updated.map((lineAssociation) => {
763
- const currentFullKey = `${fullKey}.${lineAssociation.linePkid ? lineAssociation.linePkid : lineAssociation.lineLocalId}`;
764
- const originalLineAssociation = original.find(line => line.index === lineAssociation.index);
765
- if (SortingUtilsService.differs(originalLineAssociation, lineAssociation)) {
766
- const diff = SortingUtilsService.diff(originalLineAssociation, lineAssociation, currentFullKey, []);
767
- map = [...map, ...diff];
768
- }
769
- });
770
- return map;
771
- },
772
- enterpriseAltNum: nullable,
773
- e164AltNum: nullable
774
- };
775
- SortingUtilsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
776
- SortingUtilsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService });
777
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService, decorators: [{
778
- type: Injectable
779
- }] });
780
-
781
- class LineService {
782
- generateLineAssociationFromLine(lineAssociation) {
783
- return {
784
- directoryNumber: lineAssociation ? this.generateLineDirectory(lineAssociation) : null,
785
- didPattern: lineAssociation ? this.generateDidPatternForLineAssociation(lineAssociation) : null,
786
- mappedDids: lineAssociation ? '' : 'null',
787
- index: lineAssociation ? lineAssociation.index : null,
788
- position: lineAssociation ? lineAssociation.position : null,
789
- textLabel: lineAssociation ? lineAssociation.textLabel : null,
790
- // displayLabel: lineAssociation ? lineAssociation.displayLabel : 'null',
791
- alertingName: lineAssociation ? lineAssociation.alertingName : null,
792
- callerNumber: lineAssociation ? '' : 'null'
793
- };
794
- }
795
- generateLineDirectory(lineAssociation) {
796
- return {
797
- directoryNumber: lineAssociation.directoryNumber.directoryNumber,
798
- routePartitionName: lineAssociation.directoryNumber.routePartitionName,
799
- };
800
- }
801
- generateDidPatternForLineAssociation(lineAssociation) {
802
- return {
803
- calledPartyTransformationMask: lineAssociation.directoryNumber && lineAssociation.directoryNumber.directoryNumber
804
- };
805
- }
806
- }
807
- LineService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
808
- LineService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService });
809
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService, decorators: [{
810
- type: Injectable
811
- }] });
812
-
813
- class UserService {
814
- get lineAssociation() {
815
- return this.user && this.originUser.devices && this.user.devices[0] && this.user.devices[0].lineAssociations && this.user.devices[0].lineAssociations[0];
816
- }
817
- get originLineAssociation() {
818
- return this.originUser && this.originUser.devices && this.originUser.devices[0] && this.originUser.devices[0].lineAssociations && this.originUser.devices[0].lineAssociations[0];
819
- }
820
- constructor(apiService, lineService) {
821
- this.apiService = apiService;
822
- this.lineService = lineService;
823
- this.siteId = -1;
824
- this.userId = '';
825
- this.dataPending = false;
826
- this.userIdExistPending = false;
827
- this.hasExistedUserId = false;
828
- this.onUserLineSaved$ = new Subject();
829
- }
830
- ngOnInit() {
831
- console.log(this.siteId);
832
- }
833
- fetchUserToken(siteId, userId, isLdap, isSetNewTokenOnly) {
834
- // isLdap TEMP because of token response issue
835
- this.siteId = siteId;
836
- this.userId = userId;
837
- return this.apiService.fetch(API.USER_TOKEN.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(userId))))
838
- .pipe(map((result) => {
839
- const user = result && Object.values(result)[0];
840
- const token = Object.keys(result)[0];
841
- if (user) {
842
- if (!isSetNewTokenOnly) {
843
- this.setSimplifiedUser(user);
844
- this.user.token = user.token;
845
- }
846
- this.user.token = user.token || token;
847
- this.originUser.token = user.token || token;
848
- }
849
- }));
850
- // .pipe(this.handleError(false, true));
851
- }
852
- updateUserFields(body) {
853
- if (!this.siteId) {
854
- return;
855
- }
856
- return this.apiService.post(API.UPDATE_USER_FIELDS.replace(':siteId', String(this.siteId)).replace(':token', this.user.token), body);
857
- // .pipe(this.handleError(false, true));
858
- }
859
- fetchUserById(id) {
860
- this.userIdExistPending = true;
861
- return this.apiService.fetch(API.USER_BY_ID.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(id))))
862
- .pipe(map(result => {
863
- this.userIdExistPending = false;
864
- return result;
865
- }));
866
- }
867
- persistCacheChanges() {
868
- /*const params = {
869
- excludeDeviceExtraOptions: true
870
- };*/
871
- return this.processUserChangesToCache()
872
- .pipe(map((result) => {
873
- return this.apiService.post(API.PERSIST_USER_CACHE.replace(':siteId', String(this.siteId)).replace(':token', this.user.token), {})
874
- .subscribe(() => {
875
- });
876
- // .pipe(map((user) => {
877
- // // this.setUser(user, false, this.user.token);
878
- // this.user.hasModifiedCache = false;
879
- // }))
880
- // .pipe(this.handleError(true, true));
881
- }));
882
- }
883
- processUserChangesToCache() {
884
- const calls = [];
885
- const body = UtilsService.diff(this.originUser.getUserDetailsSavableData(), this.user.getUserDetailsSavableData(), 'user');
886
- if (body?.length) {
887
- calls.push(this.updateUserFields(body));
888
- }
889
- if (!calls?.length) {
890
- return of(this.user);
891
- }
892
- return forkJoin(calls)
893
- .pipe(map((responses) => {
894
- // ApiUserResponse
895
- this.handleSaveUserResponse(responses);
896
- }));
897
- // .pipe(this.handleError(false, true));
898
- }
899
- saveNewLine() {
900
- this.dataPending = true;
901
- this.deleteLine(this.user.siteId, this.lineAssociation.linePkid, encodeURIComponent(this.user.token))
902
- .subscribe(() => {
903
- const URL = API.PERSIST_USER_CACHE.replace(':siteId', String(this.siteId)).replace(':token', this.user.token);
904
- this.apiService.post(URL, {})
905
- .subscribe(() => {
906
- this.fetchUserToken(this.siteId, this.user.userid, false, true)
907
- .subscribe(() => {
908
- this.runNewLineCreation();
909
- });
910
- });
911
- });
912
- }
913
- runNewLineCreation() {
914
- // CREATE NEW LINE
915
- const newLineBody = SortingUtilsService.diff(this.lineService.generateLineAssociationFromLine(null), this.lineService.generateLineAssociationFromLine(this.lineAssociation), 'device.lineAssociations', null);
916
- this.associateLineToUserDevice(this.user.siteId, this.user.devices[0].name, newLineBody, null, this.lineAssociation.callingSearchSpace).subscribe((response) => {
917
- if (response && response.currentUpdatedUser) {
918
- const linePkId = this.getLinePkIdFromUser(response?.currentUpdatedUser, 0);
919
- forkJoin([
920
- this.updateLineFields(this.siteId, linePkId, this.user.token, this.lineAssociation.alertingName),
921
- this.updateDeviceFields(this.siteId, this.user.devices[0]?.name, this.user.token)
922
- ]).subscribe((response) => {
923
- this.originUser.devices[0].lineAssociations[0].directoryNumber.directoryNumber = this.lineAssociation.directoryNumber.directoryNumber;
924
- this.onUserLineSaved$.next(true);
925
- });
926
- }
927
- });
928
- // -----
929
- }
930
- getLinePkIdFromUser(user, index) {
931
- if (user.devices && user.devices[index] && user.devices[index].lineAssociations && user.devices[index].lineAssociations[index]) {
932
- return user.devices[index].lineAssociations[index].linePkid || user.devices[index].lineAssociations[index].lineLocalId;
933
- }
934
- }
935
- deleteLine(siteId, pkid, token) {
936
- return this.apiService.delete(API.DELETE_LINE.replace(':siteId', String(siteId)).replace(':pkid', pkid).replace(':token', encodeURIComponent(token)), {});
937
- // .pipe(this.handleError(true, false));
938
- }
939
- disassociateLine(siteId, linePkid, token, deviceName) {
940
- return this.apiService.delete(API.DISASSOCIATE_LINE.replace(':siteId', String(siteId))
941
- .replace(':linePkid', linePkid)
942
- .replace(':deviceName', deviceName)
943
- .replace(':token', encodeURIComponent(token)), {});
944
- // .pipe(this.handleError(true, false));
945
- }
946
- updateLineFields(siteId, pkid, token, alertingName) {
947
- const body = ['line.description=', `line.alertingName=${alertingName}`];
948
- return this.apiService.post(API.UPDATE_LINE_FIELDS.replace(':siteId', String(siteId)).replace(':pkid', encodeURIComponent(pkid)).replace(':token', encodeURIComponent(token)), body);
949
- // .pipe(this.handleError(true, false));
950
- }
951
- updateDeviceFields(siteId, deviceName, token) {
952
- const body = ['device.associatedDNs.0=null'];
953
- return this.apiService.post(API.UPDATE_DEVICE_FIELDS.replace(':siteId', String(siteId)).replace(':deviceName', deviceName).replace(':token', encodeURIComponent(token)), body);
954
- // .pipe(this.handleError(true, false));
955
- }
956
- checkDestinationNumber(siteId, directoryNumber, routePartitionName) {
957
- const params = {
958
- dntype: 'EXTENSION'
959
- };
960
- const body = {
961
- directoryNumber: directoryNumber,
962
- routePartitionName: routePartitionName
963
- };
964
- return this.apiService.post(API.CHECK_DESTINATION_NUMBER.replace(':siteId', siteId), body, params);
965
- }
966
- associateLineToUserDevice(siteId, deviceName, body, pkid, css) {
967
- let params = {};
968
- if (pkid) {
969
- params = { linePkid: pkid };
970
- }
971
- if (css) {
972
- // @ts-ignore
973
- params['css'] = css;
974
- }
975
- return this.apiService.post(API.ASSOCIATE_LINE.replace(':siteId', String(siteId)).replace(':deviceName', deviceName)
976
- .replace(':token', encodeURIComponent(this.user.token)), body, params);
977
- // .pipe(this.handleError(true, true));
978
- }
979
- hasUnsavedChanges() {
980
- if (this.user && this.originUser) {
981
- return !this.user.equal(this.originUser);
982
- }
983
- return false;
984
- }
985
- setSimplifiedUser(user, isLdap) {
986
- // isLdap TEMP because of token response issue
987
- this.user = new SimplifiedUser(user, isLdap);
988
- const copiedUser = JSON.parse(JSON.stringify(user));
989
- this.originUser = new SimplifiedUser(copiedUser, isLdap);
990
- }
991
- handleSaveUserResponse(responses) {
992
- if (!responses?.length) {
993
- return;
994
- }
995
- for (let len = responses.length, i = len - 1; i >= 0; i--) {
996
- if (responses[i] && responses[i].currentUpdatedUser) {
997
- // this.setUser(responses[i].currentUpdatedUser, false, this.user.token);
998
- this.user.hasModifiedCache = true;
999
- return;
1000
- }
1001
- }
1002
- }
1003
- }
1004
- 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 });
1005
- UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService });
1006
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService, decorators: [{
1007
- type: Injectable
1008
- }], ctorParameters: function () { return [{ type: APIService }, { type: LineService }]; } });
1009
-
1010
- class AppLoaderComponent {
1011
- constructor() {
1012
- }
1013
- }
1014
- AppLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1015
- 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 });
1016
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, decorators: [{
1017
- type: Component,
1018
- 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"] }]
1019
- }], ctorParameters: function () { return []; } });
1020
-
1021
- class AuthInterceptor {
1022
- constructor() {
1023
- }
1024
- intercept(request, next) {
1025
- request = request.clone({
1026
- setHeaders: {
1027
- // Authorization: basicAuthHeaderString
1028
- },
1029
- withCredentials: true
1030
- });
1031
- return next.handle(request).pipe(catchError(err => {
1032
- if (err instanceof HttpErrorResponse) {
1033
- if (err.status === 401) {
1034
- if (window.history.length < 3) {
1035
- err.error.message = '';
1036
- }
1037
- else {
1038
- err.error.message = 'SESSION_INACTIVE';
1039
- }
1040
- }
1041
- }
1042
- return throwError(err);
1043
- }));
1044
- }
1045
- }
1046
- AuthInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1047
- AuthInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor });
1048
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor, decorators: [{
1049
- type: Injectable
1050
- }], ctorParameters: function () { return []; } });
1051
-
1052
- class UserInfoComponent {
1053
- }
1054
- UserInfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1055
- 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"] }] });
1056
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserInfoComponent, decorators: [{
1057
- type: Component,
1058
- 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"] }]
1059
- }], propDecorators: { name: [{
1060
- type: Input
1061
- }], active: [{
1062
- type: Input
1063
- }], email: [{
1064
- type: Input
1065
- }], position: [{
1066
- type: Input
1067
- }] } });
1068
-
1069
- class MaterialModule {
1070
- }
1071
- MaterialModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1072
- MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [DragDropModule,
1073
- MatButtonModule,
1074
- MatListModule,
1075
- MatProgressSpinnerModule,
1076
- MatExpansionModule,
1077
- MatInputModule,
1078
- MatInputModule,
1079
- MatListModule,
1080
- MatTreeModule,
1081
- MatTreeModule,
1082
- MatNativeDateModule,
1083
- MatDatepickerModule,
1084
- MatTooltipModule,
1085
- MatAutocompleteModule,
1086
- MatChipsModule,
1087
- MatSidenavModule,
1088
- MatFormFieldModule,
1089
- MatStepperModule,
1090
- MatTabsModule,
1091
- MatCardModule,
1092
- MatSelectModule,
1093
- MatCheckboxModule,
1094
- MatSlideToggleModule,
1095
- MatTableModule,
1096
- MatPaginatorModule], exports: [DragDropModule,
1097
- MatButtonModule,
1098
- MatListModule,
1099
- MatProgressSpinnerModule,
1100
- MatExpansionModule,
1101
- MatInputModule,
1102
- MatInputModule,
1103
- MatListModule,
1104
- MatTreeModule,
1105
- MatTreeModule,
1106
- MatNativeDateModule,
1107
- MatDatepickerModule,
1108
- MatTooltipModule,
1109
- MatAutocompleteModule,
1110
- MatChipsModule,
1111
- MatSidenavModule,
1112
- MatFormFieldModule,
1113
- MatStepperModule,
1114
- MatTabsModule,
1115
- MatCardModule,
1116
- MatCheckboxModule,
1117
- MatSelectModule,
1118
- MatSlideToggleModule,
1119
- MatProgressSpinnerModule,
1120
- MatTableModule,
1121
- MatPaginatorModule] });
1122
- MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [DragDropModule,
1123
- MatButtonModule,
1124
- MatListModule,
1125
- MatProgressSpinnerModule,
1126
- MatExpansionModule,
1127
- MatInputModule,
1128
- MatInputModule,
1129
- MatListModule,
1130
- MatTreeModule,
1131
- MatTreeModule,
1132
- MatNativeDateModule,
1133
- MatDatepickerModule,
1134
- MatTooltipModule,
1135
- MatAutocompleteModule,
1136
- MatChipsModule,
1137
- MatSidenavModule,
1138
- MatFormFieldModule,
1139
- MatStepperModule,
1140
- MatTabsModule,
1141
- MatCardModule,
1142
- MatSelectModule,
1143
- MatCheckboxModule,
1144
- MatSlideToggleModule,
1145
- MatTableModule,
1146
- MatPaginatorModule, DragDropModule,
1147
- MatButtonModule,
1148
- MatListModule,
1149
- MatProgressSpinnerModule,
1150
- MatExpansionModule,
1151
- MatInputModule,
1152
- MatInputModule,
1153
- MatListModule,
1154
- MatTreeModule,
1155
- MatTreeModule,
1156
- MatNativeDateModule,
1157
- MatDatepickerModule,
1158
- MatTooltipModule,
1159
- MatAutocompleteModule,
1160
- MatChipsModule,
1161
- MatSidenavModule,
1162
- MatFormFieldModule,
1163
- MatStepperModule,
1164
- MatTabsModule,
1165
- MatCardModule,
1166
- MatCheckboxModule,
1167
- MatSelectModule,
1168
- MatSlideToggleModule,
1169
- MatProgressSpinnerModule,
1170
- MatTableModule,
1171
- MatPaginatorModule] });
1172
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, decorators: [{
1173
- type: NgModule,
1174
- args: [{
1175
- imports: [
1176
- DragDropModule,
1177
- MatButtonModule,
1178
- MatListModule,
1179
- MatProgressSpinnerModule,
1180
- MatExpansionModule,
1181
- MatInputModule,
1182
- MatInputModule,
1183
- MatListModule,
1184
- MatTreeModule,
1185
- MatTreeModule,
1186
- MatNativeDateModule,
1187
- MatDatepickerModule,
1188
- MatTooltipModule,
1189
- MatAutocompleteModule,
1190
- MatChipsModule,
1191
- MatSidenavModule,
1192
- MatFormFieldModule,
1193
- MatStepperModule,
1194
- MatTabsModule,
1195
- MatCardModule,
1196
- MatSelectModule,
1197
- MatCheckboxModule,
1198
- MatSlideToggleModule,
1199
- MatTableModule,
1200
- MatPaginatorModule
1201
- ],
1202
- exports: [
1203
- DragDropModule,
1204
- MatButtonModule,
1205
- MatListModule,
1206
- MatProgressSpinnerModule,
1207
- MatExpansionModule,
1208
- MatInputModule,
1209
- MatInputModule,
1210
- MatListModule,
1211
- MatTreeModule,
1212
- MatTreeModule,
1213
- MatNativeDateModule,
1214
- MatDatepickerModule,
1215
- MatTooltipModule,
1216
- MatAutocompleteModule,
1217
- MatChipsModule,
1218
- MatSidenavModule,
1219
- MatFormFieldModule,
1220
- MatStepperModule,
1221
- MatTabsModule,
1222
- MatCardModule,
1223
- MatCheckboxModule,
1224
- MatSelectModule,
1225
- MatSlideToggleModule,
1226
- MatProgressSpinnerModule,
1227
- MatTableModule,
1228
- MatPaginatorModule
1229
- ],
1230
- }]
1231
- }] });
1232
-
1233
- const environment = {
1234
- production: false,
1235
- // apiUrl: 'http://localhost:4200',
1236
- apiUrl: 'http://192.168.0.191:8080',
1237
- notificationsLifetime: 30000,
1238
- longNotificationsLifetime: 45000,
1239
- cashCleanTimer: 900000,
1240
- cashArrayLength: 10000,
1241
- matomoUrl: 'http://192.168.0.136/matomo/',
1242
- };
1243
-
1244
- const TTL_DEFAULT = environment.notificationsLifetime;
1245
- const TTL_LONG_DEFAULT = environment.longNotificationsLifetime;
1246
- var NotificationType;
1247
- (function (NotificationType) {
1248
- NotificationType["info"] = "info";
1249
- NotificationType["error"] = "error";
1250
- NotificationType["success"] = "success";
1251
- NotificationType["warning"] = "warning";
1252
- })(NotificationType || (NotificationType = {}));
1253
- class Notification {
1254
- constructor(data) {
1255
- this.ttl = TTL_DEFAULT;
1256
- Object.assign(this, data || {});
1257
- if (this.ttl === undefined) {
1258
- this.ttl = this.message && this.message.length && this.message.length < 80 ? TTL_DEFAULT : TTL_LONG_DEFAULT;
1259
- }
1260
- }
1261
- isInfo() {
1262
- return this.type === NotificationType.info;
1263
- }
1264
- isError() {
1265
- return this.type === NotificationType.error;
1266
- }
1267
- isSuccess() {
1268
- return this.type === NotificationType.success;
1269
- }
1270
- isWarning() {
1271
- return this.type === NotificationType.warning;
1272
- }
1273
- }
1274
-
1275
- const SUCCESS_TIME = 5000;
1276
- const INACTIVE_SESSION_MESSAGE = 'Your session was lost due to inactivity. Please login again';
1277
- const INACTIVE_SESSION = 'SESSION_INACTIVE';
1278
- class NotificationService {
1279
- constructor() {
1280
- this.listChange = new Subject();
1281
- this.max = 0;
1282
- this.list = [];
1283
- }
1284
- error(message, ttl) {
1285
- this.notify('error', message, ttl);
1286
- }
1287
- success(message, ttl) {
1288
- this.notify('success', message, (!ttl) ? SUCCESS_TIME : ttl);
1289
- }
1290
- warning(message, ttl) {
1291
- this.notify('warning', message, ttl);
1292
- }
1293
- info(message, ttl) {
1294
- this.notify('info', message, ttl);
1295
- }
1296
- notify(type, message, ttl) {
1297
- const found = this.list.find((n) => n.message === message);
1298
- if (found) {
1299
- this.remove(found);
1300
- }
1301
- const notification = new Notification({
1302
- id: ++this.max,
1303
- type, message, ttl
1304
- });
1305
- if (notification.ttl > 0) {
1306
- notification.timerId = setTimeout(() => this.remove(notification, true), notification.ttl);
1307
- }
1308
- this.list.push(notification);
1309
- this.listChange.next(this.list);
1310
- }
1311
- remove(notification, auto) {
1312
- if (!auto && notification.timerId) {
1313
- // clear timeout in case of manual remove
1314
- clearInterval(notification.timerId);
1315
- }
1316
- this.list = this.list.filter(n => n.id !== notification.id);
1317
- this.listChange.next(this.list);
1318
- }
1319
- removeInactiveSessionError() {
1320
- if (!this.list || !this.list.length) {
1321
- return;
1322
- }
1323
- this.list = this.list.filter(n => n.message !== INACTIVE_SESSION_MESSAGE && n.message !== INACTIVE_SESSION);
1324
- this.listChange.next(this.list);
1325
- }
1326
- }
1327
- NotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1328
- NotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService });
1329
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, decorators: [{
1330
- type: Injectable
1331
- }], ctorParameters: function () { return []; } });
1332
-
1333
- class NotificationsComponent {
1334
- constructor(notificationService, ref) {
1335
- this.notificationService = notificationService;
1336
- this.ref = ref;
1337
- }
1338
- ngOnInit() {
1339
- this.listChangeSubscribe();
1340
- }
1341
- ngOnDestroy() {
1342
- this.listSubscription.unsubscribe();
1343
- }
1344
- readMore() {
1345
- this.isReadMore = !this.isReadMore;
1346
- }
1347
- removeNotification(notification) {
1348
- this.notificationService.remove(notification);
1349
- }
1350
- listChangeSubscribe() {
1351
- this.listSubscription = this.notificationService.listChange
1352
- .subscribe((list) => {
1353
- this.list = list;
1354
- this.ref.detectChanges();
1355
- });
1356
- }
1357
- }
1358
- 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 });
1359
- 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 });
1360
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationsComponent, decorators: [{
1361
- type: Component,
1362
- 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"] }]
1363
- }], ctorParameters: function () { return [{ type: NotificationService }, { type: i0.ChangeDetectorRef }]; } });
1364
-
1365
- class ListUser {
1366
- constructor(user) {
1367
- this.devices = [];
1368
- this.deviceProfiles = [];
1369
- if (user) {
1370
- Object.assign(this, user);
1371
- }
1372
- }
1373
- }
1374
-
1375
- let RemoveKynFromIBMService$1 = class RemoveKynFromIBMService {
1376
- constructor() {
1377
- }
1378
- removeCUCMS(date, customerId) {
1379
- if (customerId === 8) {
1380
- return date.filter((val) => !CUCMS_TO_IGNORE.includes(Math.round(val.cucmId)));
1381
- }
1382
- return date;
1383
- }
1384
- removeCUCS(date, customerId) {
1385
- if (customerId === 8) {
1386
- return date.filter((val) => !CUCS_TO_IGNORE.includes(Math.round(val.cucId)));
1387
- }
1388
- return date;
1389
- }
1390
- };
1391
- RemoveKynFromIBMService$1.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService$1, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1392
- RemoveKynFromIBMService$1.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService$1 });
1393
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService$1, decorators: [{
1394
- type: Injectable
1395
- }], ctorParameters: function () { return []; } });
1396
-
1397
- class UsersSearchService {
1398
- constructor(apiService, removeKynFromIBMService) {
1399
- this.apiService = apiService;
1400
- this.removeKynFromIBMService = removeKynFromIBMService;
1401
- this.siteId = -1;
1402
- this.userId = '';
1403
- this.userIdExistPending = false;
1404
- this.hasExistedUserId = false;
1405
- this.pageSize = PAGINATION_DEFAULTS.SIZE;
1406
- this.pageIndex = PAGINATION_DEFAULTS.SIZE;
1407
- this.pageSizeOptions = PAGINATION_SIZE_OPTIONS;
1408
- this.foundUsers$ = new BehaviorSubject(null);
1409
- }
1410
- getPagination() {
1411
- return {
1412
- total: this.total,
1413
- pageSizeOptions: this.pageSizeOptions,
1414
- pageSize: this.pageSize,
1415
- pageIndex: this.pageIndex
1416
- };
1417
- }
1418
- quickRegularUsersSearch() {
1419
- this.searchParams = this.searchParams || { customerid: this.customerId };
1420
- return this.apiService.fetchPagination(API.QUICK_USERS_SEARCH, this.pageSize, this.pageIndex, this.searchParams)
1421
- .pipe(map((res) => {
1422
- this.total = res.total;
1423
- // this.totals = this.totals || {};
1424
- // this.totals['users'] = res.total;
1425
- const users = res.pageData && res.pageData.length ? res.pageData.map(user => new ListUser(user)) : [];
1426
- // this.foundUsers$.next(this.removeKynFromIBMService.removeCUCMS(users, this.customerId));
1427
- this.foundUsers$.next(users);
1428
- }));
1429
- // .pipe(this.handleError(true));
1430
- }
1431
- }
1432
- 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 });
1433
- UsersSearchService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersSearchService });
1434
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersSearchService, decorators: [{
1435
- type: Injectable
1436
- }], ctorParameters: function () { return [{ type: APIService }, { type: RemoveKynFromIBMService$1 }]; } });
1437
-
1438
- class PaginationComponent {
1439
- constructor() {
1440
- this.pageEmitter = new EventEmitter();
1441
- this.pageNumberChangeEmitter = new EventEmitter();
1442
- this.pageSizeOptions = PAGINATION_SIZE_OPTIONS;
1443
- }
1444
- ngOnInit() {
1445
- }
1446
- pageEvent(event) {
1447
- this.pageEmitter.emit(event);
1448
- }
1449
- changePerPageNumber(event) {
1450
- this.pageNumberChangeEmitter.emit(event.value);
1451
- }
1452
- }
1453
- PaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1454
- 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"] }] });
1455
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PaginationComponent, decorators: [{
1456
- type: Component,
1457
- 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"] }]
1458
- }], ctorParameters: function () { return []; }, propDecorators: { pagination: [{
1459
- type: Input
1460
- }], showPageSizeOptions: [{
1461
- type: Input
1462
- }], showRefreshButton: [{
1463
- type: Input
1464
- }], lengthPending: [{
1465
- type: Input
1466
- }], pageEmitter: [{
1467
- type: Output
1468
- }], pageNumberChangeEmitter: [{
1469
- type: Output
1470
- }] } });
1471
-
1472
- class RemoveKynFromIBMService {
1473
- constructor() {
1474
- }
1475
- removeCUCMS(date, customerId) {
1476
- if (customerId === 8) {
1477
- return date.filter((val) => !CUCMS_TO_IGNORE.includes(Math.round(val.cucmId)));
1478
- }
1479
- return date;
1480
- }
1481
- removeCUCS(date, customerId) {
1482
- if (customerId === 8) {
1483
- return date.filter((val) => !CUCS_TO_IGNORE.includes(Math.round(val.cucId)));
1484
- }
1485
- return date;
1486
- }
1487
- }
1488
- RemoveKynFromIBMService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1489
- RemoveKynFromIBMService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService });
1490
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService, decorators: [{
1491
- type: Injectable
1492
- }], ctorParameters: function () { return []; } });
1493
-
1494
- class LazyLoadingSelectComponent {
1495
- get formControl() {
1496
- return this.form?.get(this.controlName);
1497
- }
1498
- constructor(notificationService, siteSettingsService) {
1499
- this.notificationService = notificationService;
1500
- this.siteSettingsService = siteSettingsService;
1501
- this.standalone = true;
1502
- this.appearance = 'standard';
1503
- this.changeField = new EventEmitter();
1504
- }
1505
- ngAfterContentInit() {
1506
- this.options = [this.form?.get(this.controlName)?.value];
1507
- }
1508
- getOptions() {
1509
- if (!this.siteId && this.options.length > 1) {
1510
- return;
1511
- }
1512
- this.optionsPending = true;
1513
- this.siteSettingsService.getSelectionOptions(this.siteId, this.optionsToken)
1514
- .subscribe(() => {
1515
- this.optionsPending = false;
1516
- // @ts-ignore
1517
- this.options = this.siteSettingsService[this.optionsToken];
1518
- }, () => {
1519
- this.optionsPending = false;
1520
- // this.notificationService.error(this.translate.instant('COMMON.LOAD_SELECT_OPTIONS_FAILED'));
1521
- });
1522
- }
1523
- onFieldChange(token) {
1524
- this.changeField.emit(token);
1525
- }
1526
- }
1527
- 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 });
1528
- 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"] }] });
1529
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LazyLoadingSelectComponent, decorators: [{
1530
- type: Component,
1531
- 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"] }]
1532
- }], ctorParameters: function () { return [{ type: NotificationService }, { type: SiteSettingsService }]; }, propDecorators: { siteId: [{
1533
- type: Input
1534
- }], form: [{
1535
- type: Input
1536
- }], standalone: [{
1537
- type: Input
1538
- }], placeholder: [{
1539
- type: Input
1540
- }], controlName: [{
1541
- type: Input
1542
- }], optionsToken: [{
1543
- type: Input
1544
- }], appearance: [{
1545
- type: Input
1546
- }], errorCode: [{
1547
- type: Input
1548
- }], errorText: [{
1549
- type: Input
1550
- }], default: [{
1551
- type: Input
1552
- }], id: [{
1553
- type: Input
1554
- }], changeField: [{
1555
- type: Output
1556
- }] } });
1557
-
1558
- var EntityChangeType;
1559
- (function (EntityChangeType) {
1560
- EntityChangeType["added"] = "added";
1561
- EntityChangeType["updated"] = "updated";
1562
- EntityChangeType["existing"] = "existing";
1563
- EntityChangeType["removed"] = "removed";
1564
- EntityChangeType["unassociated"] = "unassociated";
1565
- })(EntityChangeType || (EntityChangeType = {}));
1566
- var DnRangeType;
1567
- (function (DnRangeType) {
1568
- DnRangeType["extension"] = "EXTENSION";
1569
- DnRangeType["cpg"] = "CPG";
1570
- DnRangeType["callpark"] = "CALLPARK";
1571
- DnRangeType["huntgroup"] = "HUNTGROUP";
1572
- DnRangeType["meetme"] = "MEETME";
1573
- DnRangeType["did"] = "DID";
1574
- })(DnRangeType || (DnRangeType = {}));
1575
-
1576
- // import * as Big from 'big.js';
1577
- class DnsService {
1578
- constructor(apiService) {
1579
- this.apiService = apiService;
1580
- this.availableNumbers = {};
1581
- }
1582
- getNumberRange(siteId, routePartition, withdids, from, pageSize) {
1583
- // @ts-ignore
1584
- if (this.availableNumbers[routePartition] && this.availableNumbers[routePartition].length) {
1585
- return new Observable(observer => {
1586
- // @ts-ignore
1587
- observer.next(this.availableNumbers[routePartition]);
1588
- });
1589
- }
1590
- this.availableDidPatternsMappedToDn = {};
1591
- pageSize = pageSize ? pageSize : 20;
1592
- const params = { dntype: DnRangeType.extension, routepartition: routePartition, size: pageSize, page: 0 };
1593
- if (withdids) {
1594
- // @ts-ignore
1595
- params['withdids'] = 'true';
1596
- }
1597
- if (from) {
1598
- // @ts-ignore
1599
- params['from'] = from;
1600
- }
1601
- // @ts-ignore
1602
- this.availableNumbers[routePartition] = this.availableNumbers[routePartition] || [];
1603
- return this.apiService.fetch(API.AVAILABLE_DN_IN_RANGES.replace(':siteId', siteId), params)
1604
- .pipe(map((res) => {
1605
- res.availableNumberList.forEach((availableNumber) => {
1606
- this.setAvailableDidMappedToDn(availableNumber);
1607
- // @ts-ignore
1608
- this.availableNumbers[routePartition] = [...this.availableNumbers[routePartition], ...this.getUnwrapNumberRange(availableNumber)];
1609
- });
1610
- }));
1611
- // .pipe(this.handleError(true, false));
1612
- }
1613
- setAvailableDidMappedToDn(availableNumber) {
1614
- if (availableNumber.unUsedNumbersWithDids && availableNumber.unUsedNumbersWithDids.length) {
1615
- availableNumber.unUsedNumbersWithDids.forEach((numberWithDids) => {
1616
- const dn = numberWithDids['unUsedNumber'];
1617
- this.availableDidPatternsMappedToDn[dn] = [{}];
1618
- if (numberWithDids['translationPatternList'] && numberWithDids['translationPatternList'].length > 0) {
1619
- this.availableDidPatternsMappedToDn[dn] = numberWithDids['translationPatternList'];
1620
- this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = [{}];
1621
- if (numberWithDids['mappedDids'] && numberWithDids['mappedDids'].length > 0) {
1622
- this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = numberWithDids['mappedDids'];
1623
- }
1624
- }
1625
- this.availableDidPatternsMappedToDn[dn][0]['vm'] = numberWithDids['vm'];
1626
- });
1627
- }
1628
- }
1629
- getUnwrapNumberRange(availableNumber) {
1630
- const unwrapNumberRangeArray = this.unwrapNumberRange(availableNumber.phoneNumberRange.from, availableNumber.phoneNumberRange.to);
1631
- if (unwrapNumberRangeArray?.length) {
1632
- let unwrapNumberRange = unwrapNumberRangeArray.map((unwrappedNumber) => {
1633
- const dn = availableNumber.phoneNumberRange.prefix + unwrappedNumber;
1634
- let str = dn;
1635
- if (this.availableDidPatternsMappedToDn[dn] && this.availableDidPatternsMappedToDn[dn].length > 0) {
1636
- if (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] && this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 0) {
1637
- str += ' DID: ' + (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 1 ? 'multiple' :
1638
- this.availableDidPatternsMappedToDn[dn][0]['mappedDids'][0]);
1639
- }
1640
- if (this.availableDidPatternsMappedToDn[dn][0]['vm']) {
1641
- str += ' In Use - VM';
1642
- }
1643
- }
1644
- return str;
1645
- });
1646
- unwrapNumberRange = unwrapNumberRange.filter((unwrappedNumber) => !availableNumber.usedNumbers.includes(unwrappedNumber));
1647
- return unwrapNumberRange;
1648
- }
1649
- else {
1650
- return [];
1651
- }
1652
- }
1653
- unwrapNumberRange(start, end) {
1654
- const regExp = /(^0+)/;
1655
- let leadingZeros = '';
1656
- const matches = start.match(regExp);
1657
- if (matches) {
1658
- leadingZeros = matches[1];
1659
- }
1660
- const startNumeric = new Big(start);
1661
- const endNumeric = new Big(end);
1662
- // @ts-ignore
1663
- return Array.from({ length: (endNumeric.minus(startNumeric).plus(new Big(1)).toFixed(0)) }, (v, k) => {
1664
- const number = String(startNumeric.plus(new Big(k)).toFixed(0));
1665
- if ((leadingZeros + number).length > start.length) {
1666
- leadingZeros = leadingZeros.substr(1);
1667
- }
1668
- return leadingZeros + number;
1669
- });
1670
- }
1671
- }
1672
- DnsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService, deps: [{ token: APIService }], target: i0.ɵɵFactoryTarget.Injectable });
1673
- DnsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService });
1674
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService, decorators: [{
1675
- type: Injectable
1676
- }], ctorParameters: function () { return [{ type: APIService }]; } });
1677
-
1678
- class UserCallingExtensionComponent {
1679
- get user() {
1680
- return this.userService.user;
1681
- }
1682
- get availableNumbers() {
1683
- // @ts-ignore
1684
- return this.routePartition && this.dnsService.availableNumbers ? this.dnsService.availableNumbers[this.routePartition] : null;
1685
- }
1686
- constructor(userService, dnsService) {
1687
- this.userService = userService;
1688
- this.dnsService = dnsService;
1689
- this.onChange = new EventEmitter();
1690
- }
1691
- ngOnInit() {
1692
- this.getData();
1693
- }
1694
- onChangeField(event) {
1695
- // if (!token) {
1696
- // return;
1697
- // }
1698
- // (this.userService.user as any)[token] = this.form?.get(token)?.value;
1699
- this.onChange.emit(event?.value);
1700
- }
1701
- getData() {
1702
- if (!this.siteId || !this.routePartition) {
1703
- return;
1704
- }
1705
- this.dataPending = true;
1706
- this.dnsService.getNumberRange(String(this.siteId), this.routePartition)
1707
- .subscribe(() => {
1708
- if (this.availableNumbers) {
1709
- // @ts-ignore
1710
- this.dnsService.availableNumbers[this.routePartition].push(this.directoryNumber);
1711
- }
1712
- this.dataPending = false;
1713
- });
1714
- }
1715
- }
1716
- 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 });
1717
- 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(../assets/icons/icon_user.svg)}.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"] }] });
1718
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCallingExtensionComponent, decorators: [{
1719
- type: Component,
1720
- 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(../assets/icons/icon_user.svg)}.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"] }]
1721
- }], ctorParameters: function () { return [{ type: UserService }, { type: DnsService }]; }, propDecorators: { control: [{
1722
- type: Input
1723
- }], routePartition: [{
1724
- type: Input
1725
- }], directoryNumber: [{
1726
- type: Input
1727
- }], siteId: [{
1728
- type: Input
1729
- }], onChange: [{
1730
- type: Output
1731
- }] } });
1732
-
1733
- class UserCallingComponent {
1734
- get form() {
1735
- return this.userService?.user?.devices[0] && this.userService?.user?.devices[0].lineAssociations[0].form;
1736
- }
1737
- get formControl() {
1738
- const control = this.form?.get('directoryNumber');
1739
- return control;
1740
- }
1741
- get lineAssociation() {
1742
- return this.userService?.user?.devices[0].lineAssociations[0];
1743
- }
1744
- get user() {
1745
- return this.userService.user;
1746
- }
1747
- constructor(userService, dnsService) {
1748
- this.userService = userService;
1749
- this.dnsService = dnsService;
1750
- this.onExtensionChange = new EventEmitter();
1751
- }
1752
- ngOnInit() {
1753
- // this.getData();
1754
- }
1755
- onDirectoryNumberChange(value) {
1756
- if (this.lineAssociation && this.lineAssociation.directoryNumber) {
1757
- // @ts-ignore
1758
- this.userService.user.devices[0].lineAssociations[0].directoryNumber.directoryNumber = value;
1759
- this.onExtensionChange.next(true);
1760
- }
1761
- }
1762
- onChangeField(token) {
1763
- if (!token) {
1764
- return;
1765
- }
1766
- this.userService.user[token] = this.form?.get(token)?.value;
1767
- }
1768
- toggleEditMode() {
1769
- this.userService.user.toggleEditMode();
1770
- }
1771
- isSavingDisabled() {
1772
- return !this.userService.hasUnsavedChanges() || this.userService.hasExistedUserId;
1773
- }
1774
- onChangeExtension(value) {
1775
- if (this.lineAssociation && this.lineAssociation.directoryNumber) {
1776
- // @ts-ignore
1777
- this.userService.user.devices[0].lineAssociations[0].directoryNumber.directoryNumber = value;
1778
- }
1779
- }
1780
- getData() {
1781
- this.dataPending = true;
1782
- this.dnsService.getNumberRange(String(this.siteId), this.userId)
1783
- .subscribe({
1784
- complete: (v) => {
1785
- this.dataPending = false;
1786
- },
1787
- error: (e) => this.dataPending = false,
1788
- });
1789
- }
1790
- }
1791
- 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 });
1792
- 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 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(../assets/icons/icon_user.svg)}.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"] }] });
1793
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCallingComponent, decorators: [{
1794
- type: Component,
1795
- 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 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(../assets/icons/icon_user.svg)}.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"] }]
1796
- }], ctorParameters: function () { return [{ type: UserService }, { type: DnsService }]; }, propDecorators: { siteId: [{
1797
- type: Input
1798
- }], userId: [{
1799
- type: Input
1800
- }], onExtensionChange: [{
1801
- type: Output
1802
- }] } });
1803
-
1804
- class UserManageWidgetComponent {
1805
- get form() {
1806
- return this.userService?.user?.form;
1807
- }
1808
- get user() {
1809
- return this.userService.user;
1810
- }
1811
- get userName() {
1812
- return `${this.user?.firstName || ''} ${this.user?.lastName || ''}`;
1813
- }
1814
- get lineAssociation() {
1815
- return this.userService?.user?.devices[0].lineAssociations[0];
1816
- }
1817
- constructor(userService, apiService) {
1818
- this.userService = userService;
1819
- this.apiService = apiService;
1820
- this.onSave = new EventEmitter();
1821
- this.onChange = new EventEmitter();
1822
- this.userService.onUserLineSaved$
1823
- .subscribe(() => {
1824
- this.userService.persistCacheChanges()
1825
- .subscribe(() => {
1826
- this.userService.dataPending = false;
1827
- this.onSave.next("saved");
1828
- });
1829
- }, () => this.userService.dataPending = false);
1830
- }
1831
- ngOnInit() {
1832
- this.apiService.token = this.token;
1833
- this.apiService.apiUrl = this.host;
1834
- this.getData();
1835
- }
1836
- onExtensionChange() {
1837
- this.onChange.next("start extension change..");
1838
- }
1839
- onChangeField(token) {
1840
- this.onChange.next("start change..");
1841
- if (!token) {
1842
- return;
1843
- }
1844
- this.userService.user[token] = this.form?.get(token)?.value;
1845
- if (token === 'middleName') {
1846
- this.form?.get(token)?.setValidators([Validators.pattern('[ a-zA-Z-]+')]);
1847
- }
1848
- if (token === 'telephoneNumber' || token === 'mobileNumber' || token === 'pagerNumber' || token === 'homeNumber') {
1849
- this.form?.get(token)?.setValidators([Validators.pattern('[ 0-9-+]+')]);
1850
- }
1851
- this.form?.get(token)?.updateValueAndValidity();
1852
- this.validateUserId();
1853
- }
1854
- saveChanges() {
1855
- if (!this.userService.hasUnsavedChanges() || this.form?.invalid) {
1856
- return;
1857
- }
1858
- if (this.user.devices[0].lineAssociations[0] && !this.user.devices[0].lineAssociations[0].equals(this.userService.originUser.devices[0].lineAssociations[0])) {
1859
- return this.userService.saveNewLine();
1860
- }
1861
- else {
1862
- this.dataPending = true;
1863
- const subscription = this.userService.persistCacheChanges()
1864
- .subscribe(() => {
1865
- this.dataPending = false;
1866
- this.onSave.next("user has been saved successfully..");
1867
- subscription.unsubscribe();
1868
- }, () => this.dataPending = false);
1869
- }
1870
- }
1871
- toggleEditMode() {
1872
- this.userService.user.toggleEditMode();
1873
- }
1874
- isSavingDisabled() {
1875
- return !this.userService.hasUnsavedChanges() || this.userService.hasExistedUserId;
1876
- }
1877
- changeField(token) {
1878
- this.onChange.next("start change..");
1879
- const formField = this.user?.form?.get(token);
1880
- if (token !== 'confirmDigestCredentials') {
1881
- // @ts-ignore
1882
- this.user[token] = formField?.value;
1883
- }
1884
- if (token === 'digestCredentials' || token === 'confirmDigestCredentials') {
1885
- this.digestCredentialsHandler(token, formField);
1886
- }
1887
- }
1888
- digestCredentialsHandler(token, field) {
1889
- const fieldNameToCompare = token === 'digestCredentials' ? 'confirmDigestCredentials' : 'digestCredentials';
1890
- const fieldToCompare = this.userService.user.form.get(fieldNameToCompare);
1891
- if (this.userService.user?.form?.get(token)) {
1892
- this.userService.user?.form?.get(token)?.setErrors(null);
1893
- this.userService.user?.form?.get(fieldNameToCompare)?.setErrors(null);
1894
- /* if (!field.value && !fieldToCompare.value) {
1895
- this.userService.user?.digestCredentials = null;
1896
- return;
1897
- }
1898
-
1899
- if (!field.value && fieldToCompare.value || !fieldToCompare.value && field.value) {
1900
- const requiredFieldName = field.value ? fieldNameToCompare : token;
1901
- this.userService.user.form.get(requiredFieldName).setErrors({required: true});
1902
- return;
1903
- }
1904
- if (field.value && fieldToCompare.value && field.value !== fieldToCompare.value) {
1905
- this.userService.user.form.get(token).setErrors({mismatch: true});
1906
- this.userService.user.form.get(fieldNameToCompare).setErrors({mismatch: true});
1907
- }*/
1908
- }
1909
- }
1910
- getData() {
1911
- this.dataPending = true;
1912
- this.userService.fetchUserToken(this.siteId, this.userId, this.isLdap)
1913
- .subscribe({
1914
- complete: (v) => {
1915
- this.dataPending = false;
1916
- },
1917
- error: (e) => this.dataPending = false,
1918
- });
1919
- }
1920
- setCookie(name, value, days) {
1921
- var expires = "";
1922
- if (days) {
1923
- var date = new Date();
1924
- date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
1925
- expires = "; expires=" + date.toUTCString();
1926
- }
1927
- document.cookie = name + "=" + (value || "") + expires + "; path=/";
1928
- }
1929
- validateUserId() {
1930
- const idControl = this.form.get('userid');
1931
- if (idControl?.value !== '' && idControl?.value !== this.userService.originUser.userid) {
1932
- this.userService.fetchUserById(idControl?.value)
1933
- .subscribe((res) => {
1934
- this.userService.userIdExistPending = false;
1935
- idControl?.setErrors({ exist: true });
1936
- if (this.form?.get('userid')?.hasError('exist')) {
1937
- this.userService.hasExistedUserId = true;
1938
- }
1939
- else {
1940
- this.userService.hasExistedUserId = false;
1941
- }
1942
- }, ((error) => {
1943
- this.userService.userIdExistPending = false;
1944
- if (error.status !== 404) {
1945
- // this.notificationService.warning(this.translate.instant('APP_USER_MSG.CHECK_USER_ID_FAILED'));
1946
- }
1947
- else {
1948
- this.userService.user.newUserId = this.form?.get('userid')?.value;
1949
- }
1950
- }));
1951
- }
1952
- else {
1953
- // delete this.userService?.user?.newUserId;
1954
- }
1955
- }
1956
- save() {
1957
- this.saveChanges();
1958
- }
1959
- }
1960
- 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 });
1961
- 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", isLdap: "isLdap" }, outputs: { onSave: "onSave", onChange: "onChange" }, ngImport: i0, template: "<app-loader *ngIf=\"dataPending || userService.dataPending\"></app-loader>\n\n<div *ngIf=\"!dataPending\">\n <div class=\"header-box\">\n <div class=\"content-box\">\n <div class=\"header-back-block\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M5.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\"\n fill=\"black\" fill-opacity=\"0.95\"/>\n </svg>\n Users\n </div>\n </div>\n </div>\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\" [disabled]=\"true\"></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(../assets/icons/icon_user.svg)}.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%}\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: i9.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"] }] });
1962
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageWidgetComponent, decorators: [{
1963
- type: Component,
1964
- args: [{ selector: 'app-user-manage-widget', template: "<app-loader *ngIf=\"dataPending || userService.dataPending\"></app-loader>\n\n<div *ngIf=\"!dataPending\">\n <div class=\"header-box\">\n <div class=\"content-box\">\n <div class=\"header-back-block\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M5.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\"\n fill=\"black\" fill-opacity=\"0.95\"/>\n </svg>\n Users\n </div>\n </div>\n </div>\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\" [disabled]=\"true\"></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(../assets/icons/icon_user.svg)}.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%}\n"] }]
1965
- }], ctorParameters: function () { return [{ type: UserService }, { type: APIService }]; }, propDecorators: { onSave: [{
1966
- type: Output
1967
- }], onChange: [{
1968
- type: Output
1969
- }], token: [{
1970
- type: Input
1971
- }], host: [{
1972
- type: Input
1973
- }], siteId: [{
1974
- type: Input
1975
- }], userId: [{
1976
- type: Input
1977
- }], isLdap: [{
1978
- type: Input
1979
- }] } });
1980
-
1981
- class UserManageModule {
1982
- }
1983
- UserManageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1984
- UserManageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, declarations: [AppLoaderComponent,
1985
- UserInfoComponent,
1986
- NotificationsComponent,
1987
- PaginationComponent,
1988
- LazyLoadingSelectComponent,
1989
- UserManageWidgetComponent,
1990
- UserCallingComponent,
1991
- UserCallingExtensionComponent], imports: [CommonModule,
1992
- BrowserModule,
1993
- BrowserAnimationsModule,
1994
- FormsModule,
1995
- ReactiveFormsModule,
1996
- HttpClientModule,
1997
- MaterialModule], exports: [UserManageWidgetComponent] });
1998
- UserManageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, providers: [
1999
- APIService,
2000
- UserService,
2001
- NotificationService,
2002
- UsersSearchService,
2003
- RemoveKynFromIBMService,
2004
- SiteSettingsService,
2005
- DnsService,
2006
- LineService,
2007
- { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
2008
- ], imports: [CommonModule,
2009
- BrowserModule,
2010
- BrowserAnimationsModule,
2011
- FormsModule,
2012
- ReactiveFormsModule,
2013
- HttpClientModule,
2014
- MaterialModule] });
2015
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, decorators: [{
2016
- type: NgModule,
2017
- args: [{
2018
- declarations: [
2019
- AppLoaderComponent,
2020
- UserInfoComponent,
2021
- NotificationsComponent,
2022
- PaginationComponent,
2023
- LazyLoadingSelectComponent,
2024
- UserManageWidgetComponent,
2025
- UserCallingComponent,
2026
- UserCallingExtensionComponent
2027
- ],
2028
- imports: [
2029
- CommonModule,
2030
- BrowserModule,
2031
- BrowserAnimationsModule,
2032
- FormsModule,
2033
- ReactiveFormsModule,
2034
- HttpClientModule,
2035
- MaterialModule,
2036
- ],
2037
- providers: [
2038
- APIService,
2039
- UserService,
2040
- NotificationService,
2041
- UsersSearchService,
2042
- RemoveKynFromIBMService,
2043
- SiteSettingsService,
2044
- DnsService,
2045
- LineService,
2046
- { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
2047
- ],
2048
- exports: [UserManageWidgetComponent]
2049
- }]
2050
- }] });
2051
-
2052
- /**
2053
- * Generated bundle index. Do not edit.
2054
- */
2055
-
2056
- export { APIService, SiteSettingsService, UserManageModule, UserManageWidgetComponent, UserService, UtilsService };
2057
- //# sourceMappingURL=tuki-io-tuki-widgets-user-manage.mjs.map