@tuki-io/tuki-widgets 0.0.0-watch

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 (331) hide show
  1. package/README.md +24 -0
  2. package/di2mt/README.md +42 -0
  3. package/di2mt/api/api.endpoints.d.ts +20 -0
  4. package/di2mt/index.d.ts +5 -0
  5. package/di2mt/public-api.d.ts +12 -0
  6. package/di2mt/shared/components/card/card.component.d.ts +6 -0
  7. package/di2mt/shared/components/chart-card/chart-card.component.d.ts +22 -0
  8. package/di2mt/shared/components/stat-card/stat-card.component.d.ts +14 -0
  9. package/di2mt/shared/components/status-list-card/status-list-card.component.d.ts +7 -0
  10. package/di2mt/shared/components/summary-card/summary-card.component.d.ts +9 -0
  11. package/di2mt/shared/components/table-filters/table-filters.component.d.ts +14 -0
  12. package/di2mt/shared/material.module.d.ts +15 -0
  13. package/di2mt/shared/services/api.service.d.ts +20 -0
  14. package/di2mt/shared/shared.module.d.ts +16 -0
  15. package/di2mt/shared/types/constants.d.ts +7 -0
  16. package/di2mt/shared/types/data-table.d.ts +5 -0
  17. package/di2mt/shared/types/table/filter.d.ts +16 -0
  18. package/di2mt/widgets/site-upgrade/site-upgrade-data-table/site-upgrade-data-table.component.d.ts +48 -0
  19. package/di2mt/widgets/site-upgrade/site-upgrade.module.d.ts +12 -0
  20. package/di2mt/widgets/site-upgrade/site-upgrade.service.d.ts +12 -0
  21. package/di2mt/widgets/site-upgrade/types/user-upgrade.d.ts +14 -0
  22. package/di2mt/widgets/upgrade-overview/cards/already-upgraded-sites/already-upgraded-sites-card.component.d.ts +19 -0
  23. package/di2mt/widgets/upgrade-overview/cards/already-upgraded-users/already-upgraded-users-card.component.d.ts +19 -0
  24. package/di2mt/widgets/upgrade-overview/cards/preconditions-status-list/preconditions-status-list-card.component.d.ts +18 -0
  25. package/di2mt/widgets/upgrade-overview/cards/ready-to-upgrade-sites/ready-to-upgrade-sites-card.component.d.ts +19 -0
  26. package/di2mt/widgets/upgrade-overview/cards/ready-to-upgrade-users/ready-to-upgrade-users-card.component.d.ts +19 -0
  27. package/di2mt/widgets/upgrade-overview/cards/site-infrastructure-status-list/site-infrastructure-status-list-card.component.d.ts +15 -0
  28. package/di2mt/widgets/upgrade-overview/cards/upgrade-state-comparison-chart/upgrade-state-comparison-chart-card.component.d.ts +18 -0
  29. package/di2mt/widgets/upgrade-overview/types/upgrade-overview.d.ts +56 -0
  30. package/di2mt/widgets/upgrade-overview/upgrade-overview.module.d.ts +15 -0
  31. package/di2mt/widgets/upgrade-overview/upgrade-overview.service.d.ts +17 -0
  32. package/di2mt/widgets/user-upgrade/types/user-upgrade.d.ts +16 -0
  33. package/di2mt/widgets/user-upgrade/user-upgrade-data-table/user-upgrade-data-table.component.d.ts +49 -0
  34. package/di2mt/widgets/user-upgrade/user-upgrade.module.d.ts +12 -0
  35. package/di2mt/widgets/user-upgrade/user-upgrade.service.d.ts +14 -0
  36. package/esm2020/di2mt/api/api.endpoints.mjs +21 -0
  37. package/esm2020/di2mt/public-api.mjs +23 -0
  38. package/esm2020/di2mt/shared/components/card/card.component.mjs +13 -0
  39. package/esm2020/di2mt/shared/components/chart-card/chart-card.component.mjs +62 -0
  40. package/esm2020/di2mt/shared/components/stat-card/stat-card.component.mjs +47 -0
  41. package/esm2020/di2mt/shared/components/status-list-card/status-list-card.component.mjs +17 -0
  42. package/esm2020/di2mt/shared/components/summary-card/summary-card.component.mjs +36 -0
  43. package/esm2020/di2mt/shared/components/table-filters/table-filters.component.mjs +37 -0
  44. package/esm2020/di2mt/shared/material.module.mjs +76 -0
  45. package/esm2020/di2mt/shared/services/api.service.mjs +86 -0
  46. package/esm2020/di2mt/shared/shared.module.mjs +61 -0
  47. package/esm2020/di2mt/shared/types/constants.mjs +12 -0
  48. package/esm2020/di2mt/shared/types/data-table.mjs +2 -0
  49. package/esm2020/di2mt/shared/types/table/filter.mjs +2 -0
  50. package/esm2020/di2mt/tuki-io-tuki-widgets-di2mt.mjs +5 -0
  51. package/esm2020/di2mt/widgets/site-upgrade/site-upgrade-data-table/site-upgrade-data-table.component.mjs +182 -0
  52. package/esm2020/di2mt/widgets/site-upgrade/site-upgrade.module.mjs +40 -0
  53. package/esm2020/di2mt/widgets/site-upgrade/site-upgrade.service.mjs +43 -0
  54. package/esm2020/di2mt/widgets/site-upgrade/types/user-upgrade.mjs +3 -0
  55. package/esm2020/di2mt/widgets/upgrade-overview/cards/already-upgraded-sites/already-upgraded-sites-card.component.mjs +64 -0
  56. package/esm2020/di2mt/widgets/upgrade-overview/cards/already-upgraded-users/already-upgraded-users-card.component.mjs +64 -0
  57. package/esm2020/di2mt/widgets/upgrade-overview/cards/preconditions-status-list/preconditions-status-list-card.component.mjs +68 -0
  58. package/esm2020/di2mt/widgets/upgrade-overview/cards/ready-to-upgrade-sites/ready-to-upgrade-sites-card.component.mjs +45 -0
  59. package/esm2020/di2mt/widgets/upgrade-overview/cards/ready-to-upgrade-users/ready-to-upgrade-users-card.component.mjs +45 -0
  60. package/esm2020/di2mt/widgets/upgrade-overview/cards/site-infrastructure-status-list/site-infrastructure-status-list-card.component.mjs +64 -0
  61. package/esm2020/di2mt/widgets/upgrade-overview/cards/upgrade-state-comparison-chart/upgrade-state-comparison-chart-card.component.mjs +74 -0
  62. package/esm2020/di2mt/widgets/upgrade-overview/types/upgrade-overview.mjs +2 -0
  63. package/esm2020/di2mt/widgets/upgrade-overview/upgrade-overview.module.mjs +59 -0
  64. package/esm2020/di2mt/widgets/upgrade-overview/upgrade-overview.service.mjs +82 -0
  65. package/esm2020/di2mt/widgets/user-upgrade/types/user-upgrade.mjs +3 -0
  66. package/esm2020/di2mt/widgets/user-upgrade/user-upgrade-data-table/user-upgrade-data-table.component.mjs +197 -0
  67. package/esm2020/di2mt/widgets/user-upgrade/user-upgrade.module.mjs +40 -0
  68. package/esm2020/di2mt/widgets/user-upgrade/user-upgrade.service.mjs +58 -0
  69. package/esm2020/lib/widgets.component.mjs +22 -0
  70. package/esm2020/lib/widgets.module.mjs +21 -0
  71. package/esm2020/lib/widgets.service.mjs +14 -0
  72. package/esm2020/public-api.mjs +7 -0
  73. package/esm2020/tuki-io-tuki-widgets.mjs +5 -0
  74. package/esm2020/user-device-manage/public-api.mjs +9 -0
  75. package/esm2020/user-device-manage/src/app.constants.mjs +95 -0
  76. package/esm2020/user-device-manage/src/classes/device.mjs +85 -0
  77. package/esm2020/user-device-manage/src/classes/line-association-interface.mjs +2 -0
  78. package/esm2020/user-device-manage/src/classes/line-association.mjs +121 -0
  79. package/esm2020/user-device-manage/src/classes/line-call-info-display.mjs +10 -0
  80. package/esm2020/user-device-manage/src/classes/line-directory.mjs +27 -0
  81. package/esm2020/user-device-manage/src/classes/line.mjs +18 -0
  82. package/esm2020/user-device-manage/src/classes/notification.mjs +32 -0
  83. package/esm2020/user-device-manage/src/classes/recording-options.mjs +7 -0
  84. package/esm2020/user-device-manage/src/classes/simplified-user.mjs +111 -0
  85. package/esm2020/user-device-manage/src/classes/site-defaults.mjs +21 -0
  86. package/esm2020/user-device-manage/src/classes/translation-pattern.mjs +32 -0
  87. package/esm2020/user-device-manage/src/classes/types.mjs +24 -0
  88. package/esm2020/user-device-manage/src/common-functions.mjs +19 -0
  89. package/esm2020/user-device-manage/src/confirm-dialog/info-dialog.component.mjs +34 -0
  90. package/esm2020/user-device-manage/src/device-associated-line/associated-line-row/associated-line-row.component.mjs +31 -0
  91. package/esm2020/user-device-manage/src/device-associated-line/device-associated-line-details-box/device-associated-line-details-box.component.mjs +16 -0
  92. package/esm2020/user-device-manage/src/device-associated-line/device-associated-line-extension/device-associated-line-extension.component.mjs +64 -0
  93. package/esm2020/user-device-manage/src/device-associated-line/device-associated-line.component.mjs +179 -0
  94. package/esm2020/user-device-manage/src/device-list/device-list.component.mjs +24 -0
  95. package/esm2020/user-device-manage/src/device-manage-widget.component.mjs +335 -0
  96. package/esm2020/user-device-manage/src/environments/environment.mjs +11 -0
  97. package/esm2020/user-device-manage/src/interseptors/auth.interceptor.mjs +36 -0
  98. package/esm2020/user-device-manage/src/lazy-loading-select/lazy-loading-select.component.mjs +74 -0
  99. package/esm2020/user-device-manage/src/material.module.mjs +192 -0
  100. package/esm2020/user-device-manage/src/notifications/notification.component.mjs +35 -0
  101. package/esm2020/user-device-manage/src/services/api.service.mjs +79 -0
  102. package/esm2020/user-device-manage/src/services/device.service.mjs +83 -0
  103. package/esm2020/user-device-manage/src/services/dns.service.mjs +104 -0
  104. package/esm2020/user-device-manage/src/services/line.service.mjs +76 -0
  105. package/esm2020/user-device-manage/src/services/notification.service.mjs +62 -0
  106. package/esm2020/user-device-manage/src/services/removeKynFromIBM.service.mjs +25 -0
  107. package/esm2020/user-device-manage/src/services/site-settings.service.mjs +70 -0
  108. package/esm2020/user-device-manage/src/services/sorting-utils.service.mjs +197 -0
  109. package/esm2020/user-device-manage/src/services/user.service.mjs +243 -0
  110. package/esm2020/user-device-manage/src/services/utils.service.mjs +87 -0
  111. package/esm2020/user-device-manage/src/services/validation.service.mjs +760 -0
  112. package/esm2020/user-device-manage/src/user-device-manage.module.mjs +107 -0
  113. package/esm2020/user-device-manage/src/utils/app-loader/app-loader.mjs +14 -0
  114. package/esm2020/user-device-manage/tuki-io-tuki-widgets-user-device-manage.mjs +5 -0
  115. package/esm2020/user-manage/public-api.mjs +7 -0
  116. package/esm2020/user-manage/src/app.constants.mjs +50 -0
  117. package/esm2020/user-manage/src/classes/device.mjs +37 -0
  118. package/esm2020/user-manage/src/classes/line-association-interface.mjs +2 -0
  119. package/esm2020/user-manage/src/classes/line-association.mjs +110 -0
  120. package/esm2020/user-manage/src/classes/line-call-info-display.mjs +10 -0
  121. package/esm2020/user-manage/src/classes/line-directory.mjs +27 -0
  122. package/esm2020/user-manage/src/classes/line.mjs +18 -0
  123. package/esm2020/user-manage/src/classes/notification.mjs +32 -0
  124. package/esm2020/user-manage/src/classes/pagination.mjs +8 -0
  125. package/esm2020/user-manage/src/classes/recording-options.mjs +7 -0
  126. package/esm2020/user-manage/src/classes/simplified-user.mjs +109 -0
  127. package/esm2020/user-manage/src/classes/table-data.mjs +2 -0
  128. package/esm2020/user-manage/src/classes/translation-pattern.mjs +32 -0
  129. package/esm2020/user-manage/src/classes/user-list.mjs +10 -0
  130. package/esm2020/user-manage/src/common-functions.mjs +19 -0
  131. package/esm2020/user-manage/src/device-list/device-list.component.mjs +24 -0
  132. package/esm2020/user-manage/src/environments/environment.mjs +11 -0
  133. package/esm2020/user-manage/src/interseptors/auth.interceptor.mjs +36 -0
  134. package/esm2020/user-manage/src/lazy-loading-select/lazy-loading-select.component.mjs +74 -0
  135. package/esm2020/user-manage/src/material.module.mjs +188 -0
  136. package/esm2020/user-manage/src/notifications/notification.component.mjs +35 -0
  137. package/esm2020/user-manage/src/removeKynFromIBM.service.mjs +25 -0
  138. package/esm2020/user-manage/src/services/api.service.mjs +79 -0
  139. package/esm2020/user-manage/src/services/dns.service.mjs +110 -0
  140. package/esm2020/user-manage/src/services/line.service.mjs +34 -0
  141. package/esm2020/user-manage/src/services/notification.service.mjs +62 -0
  142. package/esm2020/user-manage/src/services/removeKynFromIBM.service.mjs +25 -0
  143. package/esm2020/user-manage/src/services/site-settings.service.mjs +36 -0
  144. package/esm2020/user-manage/src/services/sorting-utils.service.mjs +197 -0
  145. package/esm2020/user-manage/src/services/user.service.mjs +207 -0
  146. package/esm2020/user-manage/src/services/users-search.service.mjs +50 -0
  147. package/esm2020/user-manage/src/services/utils.service.mjs +73 -0
  148. package/esm2020/user-manage/src/user-calling/user-calling-extension/user-calling-extension.component.mjs +65 -0
  149. package/esm2020/user-manage/src/user-calling/user-calling.component.mjs +78 -0
  150. package/esm2020/user-manage/src/user-info/user-info.component.mjs +20 -0
  151. package/esm2020/user-manage/src/user-manage-widget.component.mjs +208 -0
  152. package/esm2020/user-manage/src/user-manage.module.mjs +99 -0
  153. package/esm2020/user-manage/src/utils/app-loader/app-loader.mjs +14 -0
  154. package/esm2020/user-manage/src/utils/pagination/pagination.component.mjs +43 -0
  155. package/esm2020/user-manage/tuki-io-tuki-widgets-user-manage.mjs +5 -0
  156. package/esm2020/users-list/public-api.mjs +9 -0
  157. package/esm2020/users-list/src/app.constants.mjs +54 -0
  158. package/esm2020/users-list/src/classes/app-location.mjs +32 -0
  159. package/esm2020/users-list/src/classes/device.mjs +7 -0
  160. package/esm2020/users-list/src/classes/line.mjs +18 -0
  161. package/esm2020/users-list/src/classes/move-user.mjs +178 -0
  162. package/esm2020/users-list/src/classes/notification.mjs +31 -0
  163. package/esm2020/users-list/src/classes/pagination.mjs +8 -0
  164. package/esm2020/users-list/src/classes/simlified-user.mjs +50 -0
  165. package/esm2020/users-list/src/classes/table-data.mjs +2 -0
  166. package/esm2020/users-list/src/classes/user-list.mjs +14 -0
  167. package/esm2020/users-list/src/material.module.mjs +209 -0
  168. package/esm2020/users-list/src/move-user-wizard/move-user-stepper/device-move-user/device-move-user-wizard.component.mjs +38 -0
  169. package/esm2020/users-list/src/move-user-wizard/move-user-stepper/device-move-user-tab/devices-move-user-wizard-tab.component.mjs +23 -0
  170. package/esm2020/users-list/src/move-user-wizard/move-user-stepper/move-user-stepper.component.mjs +189 -0
  171. package/esm2020/users-list/src/move-user-wizard/move-user-wizard.component.mjs +38 -0
  172. package/esm2020/users-list/src/services/api-webex.service.mjs +18 -0
  173. package/esm2020/users-list/src/services/api.service.mjs +78 -0
  174. package/esm2020/users-list/src/services/dns.service.mjs +120 -0
  175. package/esm2020/users-list/src/services/events-communication.service.mjs +14 -0
  176. package/esm2020/users-list/src/services/move-user.service.mjs +53 -0
  177. package/esm2020/users-list/src/services/notification.service.mjs +62 -0
  178. package/esm2020/users-list/src/services/removeKynFromIBM.service.mjs +25 -0
  179. package/esm2020/users-list/src/services/site-settings.service.mjs +27 -0
  180. package/esm2020/users-list/src/services/user.service.mjs +142 -0
  181. package/esm2020/users-list/src/services/users-search.service.mjs +122 -0
  182. package/esm2020/users-list/src/user-list-confirm-dialog/user-list-confirm-dialog.component.mjs +34 -0
  183. package/esm2020/users-list/src/users-list.component.mjs +287 -0
  184. package/esm2020/users-list/src/users-list.module.mjs +92 -0
  185. package/esm2020/users-list/src/utils/app-loader/app-loader.mjs +14 -0
  186. package/esm2020/users-list/src/utils/common-functions.mjs +32 -0
  187. package/esm2020/users-list/src/utils/pagination/pagination.component.mjs +43 -0
  188. package/esm2020/users-list/src/utils/utils.service.mjs +73 -0
  189. package/esm2020/users-list/tuki-io-tuki-widgets-users-list.mjs +5 -0
  190. package/fesm2015/tuki-io-tuki-widgets-di2mt.mjs +1469 -0
  191. package/fesm2015/tuki-io-tuki-widgets-di2mt.mjs.map +1 -0
  192. package/fesm2015/tuki-io-tuki-widgets-user-device-manage.mjs +3402 -0
  193. package/fesm2015/tuki-io-tuki-widgets-user-device-manage.mjs.map +1 -0
  194. package/fesm2015/tuki-io-tuki-widgets-user-manage.mjs +2124 -0
  195. package/fesm2015/tuki-io-tuki-widgets-user-manage.mjs.map +1 -0
  196. package/fesm2015/tuki-io-tuki-widgets-users-list.mjs +1994 -0
  197. package/fesm2015/tuki-io-tuki-widgets-users-list.mjs.map +1 -0
  198. package/fesm2015/tuki-io-tuki-widgets.mjs +63 -0
  199. package/fesm2015/tuki-io-tuki-widgets.mjs.map +1 -0
  200. package/fesm2020/tuki-io-tuki-widgets-di2mt.mjs +1460 -0
  201. package/fesm2020/tuki-io-tuki-widgets-di2mt.mjs.map +1 -0
  202. package/fesm2020/tuki-io-tuki-widgets-user-device-manage.mjs +3364 -0
  203. package/fesm2020/tuki-io-tuki-widgets-user-device-manage.mjs.map +1 -0
  204. package/fesm2020/tuki-io-tuki-widgets-user-manage.mjs +2107 -0
  205. package/fesm2020/tuki-io-tuki-widgets-user-manage.mjs.map +1 -0
  206. package/fesm2020/tuki-io-tuki-widgets-users-list.mjs +1973 -0
  207. package/fesm2020/tuki-io-tuki-widgets-users-list.mjs.map +1 -0
  208. package/fesm2020/tuki-io-tuki-widgets.mjs +63 -0
  209. package/fesm2020/tuki-io-tuki-widgets.mjs.map +1 -0
  210. package/index.d.ts +5 -0
  211. package/lib/widgets.component.d.ts +8 -0
  212. package/lib/widgets.module.d.ts +7 -0
  213. package/lib/widgets.service.d.ts +6 -0
  214. package/package.json +65 -0
  215. package/public-api.d.ts +3 -0
  216. package/user-device-manage/index.d.ts +5 -0
  217. package/user-device-manage/public-api.d.ts +8 -0
  218. package/user-device-manage/src/app.constants.d.ts +74 -0
  219. package/user-device-manage/src/classes/device.d.ts +233 -0
  220. package/user-device-manage/src/classes/line-association-interface.d.ts +45 -0
  221. package/user-device-manage/src/classes/line-association.d.ts +62 -0
  222. package/user-device-manage/src/classes/line-call-info-display.d.ts +11 -0
  223. package/user-device-manage/src/classes/line-directory.d.ts +15 -0
  224. package/user-device-manage/src/classes/line.d.ts +140 -0
  225. package/user-device-manage/src/classes/notification.d.ts +18 -0
  226. package/user-device-manage/src/classes/recording-options.d.ts +5 -0
  227. package/user-device-manage/src/classes/simplified-user.d.ts +52 -0
  228. package/user-device-manage/src/classes/site-defaults.d.ts +146 -0
  229. package/user-device-manage/src/classes/translation-pattern.d.ts +19 -0
  230. package/user-device-manage/src/classes/types.d.ts +19 -0
  231. package/user-device-manage/src/common-functions.d.ts +1 -0
  232. package/user-device-manage/src/confirm-dialog/info-dialog.component.d.ts +20 -0
  233. package/user-device-manage/src/device-associated-line/associated-line-row/associated-line-row.component.d.ts +15 -0
  234. package/user-device-manage/src/device-associated-line/device-associated-line-details-box/device-associated-line-details-box.component.d.ts +7 -0
  235. package/user-device-manage/src/device-associated-line/device-associated-line-extension/device-associated-line-extension.component.d.ts +24 -0
  236. package/user-device-manage/src/device-associated-line/device-associated-line.component.d.ts +89 -0
  237. package/user-device-manage/src/device-list/device-list.component.d.ts +11 -0
  238. package/user-device-manage/src/device-manage-widget.component.d.ts +71 -0
  239. package/user-device-manage/src/environments/environment.d.ts +9 -0
  240. package/user-device-manage/src/interseptors/auth.interceptor.d.ts +9 -0
  241. package/user-device-manage/src/lazy-loading-select/lazy-loading-select.component.d.ts +35 -0
  242. package/user-device-manage/src/material.module.d.ts +29 -0
  243. package/user-device-manage/src/notifications/notification.component.d.ts +19 -0
  244. package/user-device-manage/src/services/api.service.d.ts +20 -0
  245. package/user-device-manage/src/services/device.service.d.ts +21 -0
  246. package/user-device-manage/src/services/dns.service.d.ts +14 -0
  247. package/user-device-manage/src/services/line.service.d.ts +33 -0
  248. package/user-device-manage/src/services/notification.service.d.ts +18 -0
  249. package/user-device-manage/src/services/removeKynFromIBM.service.d.ts +8 -0
  250. package/user-device-manage/src/services/site-settings.service.d.ts +25 -0
  251. package/user-device-manage/src/services/sorting-utils.service.d.ts +26 -0
  252. package/user-device-manage/src/services/user.service.d.ts +51 -0
  253. package/user-device-manage/src/services/utils.service.d.ts +10 -0
  254. package/user-device-manage/src/services/validation.service.d.ts +165 -0
  255. package/user-device-manage/src/user-device-manage.module.d.ts +22 -0
  256. package/user-device-manage/src/utils/app-loader/app-loader.d.ts +6 -0
  257. package/user-manage/index.d.ts +5 -0
  258. package/user-manage/public-api.d.ts +6 -0
  259. package/user-manage/src/app.constants.d.ts +29 -0
  260. package/user-manage/src/classes/device.d.ts +203 -0
  261. package/user-manage/src/classes/line-association-interface.d.ts +40 -0
  262. package/user-manage/src/classes/line-association.d.ts +55 -0
  263. package/user-manage/src/classes/line-call-info-display.d.ts +11 -0
  264. package/user-manage/src/classes/line-directory.d.ts +16 -0
  265. package/user-manage/src/classes/line.d.ts +140 -0
  266. package/user-manage/src/classes/notification.d.ts +18 -0
  267. package/user-manage/src/classes/pagination.d.ts +13 -0
  268. package/user-manage/src/classes/recording-options.d.ts +5 -0
  269. package/user-manage/src/classes/simplified-user.d.ts +50 -0
  270. package/user-manage/src/classes/table-data.d.ts +5 -0
  271. package/user-manage/src/classes/translation-pattern.d.ts +18 -0
  272. package/user-manage/src/classes/user-list.d.ts +34 -0
  273. package/user-manage/src/common-functions.d.ts +1 -0
  274. package/user-manage/src/device-list/device-list.component.d.ts +11 -0
  275. package/user-manage/src/environments/environment.d.ts +9 -0
  276. package/user-manage/src/interseptors/auth.interceptor.d.ts +9 -0
  277. package/user-manage/src/lazy-loading-select/lazy-loading-select.component.d.ts +35 -0
  278. package/user-manage/src/material.module.d.ts +28 -0
  279. package/user-manage/src/notifications/notification.component.d.ts +19 -0
  280. package/user-manage/src/removeKynFromIBM.service.d.ts +8 -0
  281. package/user-manage/src/services/api.service.d.ts +21 -0
  282. package/user-manage/src/services/dns.service.d.ts +14 -0
  283. package/user-manage/src/services/line.service.d.ts +17 -0
  284. package/user-manage/src/services/notification.service.d.ts +18 -0
  285. package/user-manage/src/services/removeKynFromIBM.service.d.ts +8 -0
  286. package/user-manage/src/services/site-settings.service.d.ts +9 -0
  287. package/user-manage/src/services/sorting-utils.service.d.ts +26 -0
  288. package/user-manage/src/services/user.service.d.ts +43 -0
  289. package/user-manage/src/services/users-search.service.d.ts +25 -0
  290. package/user-manage/src/services/utils.service.d.ts +9 -0
  291. package/user-manage/src/user-calling/user-calling-extension/user-calling-extension.component.d.ts +24 -0
  292. package/user-manage/src/user-calling/user-calling.component.d.ts +30 -0
  293. package/user-manage/src/user-info/user-info.component.d.ts +9 -0
  294. package/user-manage/src/user-manage-widget.component.d.ts +45 -0
  295. package/user-manage/src/user-manage.module.d.ts +21 -0
  296. package/user-manage/src/utils/app-loader/app-loader.d.ts +6 -0
  297. package/user-manage/src/utils/pagination/pagination.component.d.ts +18 -0
  298. package/users-list/index.d.ts +5 -0
  299. package/users-list/public-api.d.ts +8 -0
  300. package/users-list/src/app.constants.d.ts +36 -0
  301. package/users-list/src/classes/app-location.d.ts +17 -0
  302. package/users-list/src/classes/device.d.ts +224 -0
  303. package/users-list/src/classes/line.d.ts +140 -0
  304. package/users-list/src/classes/move-user.d.ts +85 -0
  305. package/users-list/src/classes/notification.d.ts +18 -0
  306. package/users-list/src/classes/pagination.d.ts +13 -0
  307. package/users-list/src/classes/simlified-user.d.ts +25 -0
  308. package/users-list/src/classes/table-data.d.ts +5 -0
  309. package/users-list/src/classes/user-list.d.ts +36 -0
  310. package/users-list/src/material.module.d.ts +31 -0
  311. package/users-list/src/move-user-wizard/move-user-stepper/device-move-user/device-move-user-wizard.component.d.ts +21 -0
  312. package/users-list/src/move-user-wizard/move-user-stepper/device-move-user-tab/devices-move-user-wizard-tab.component.d.ts +12 -0
  313. package/users-list/src/move-user-wizard/move-user-stepper/move-user-stepper.component.d.ts +55 -0
  314. package/users-list/src/move-user-wizard/move-user-wizard.component.d.ts +17 -0
  315. package/users-list/src/services/api-webex.service.d.ts +8 -0
  316. package/users-list/src/services/api.service.d.ts +21 -0
  317. package/users-list/src/services/dns.service.d.ts +18 -0
  318. package/users-list/src/services/events-communication.service.d.ts +8 -0
  319. package/users-list/src/services/move-user.service.d.ts +17 -0
  320. package/users-list/src/services/notification.service.d.ts +18 -0
  321. package/users-list/src/services/removeKynFromIBM.service.d.ts +8 -0
  322. package/users-list/src/services/site-settings.service.d.ts +11 -0
  323. package/users-list/src/services/user.service.d.ts +35 -0
  324. package/users-list/src/services/users-search.service.d.ts +34 -0
  325. package/users-list/src/user-list-confirm-dialog/user-list-confirm-dialog.component.d.ts +20 -0
  326. package/users-list/src/users-list.component.d.ts +60 -0
  327. package/users-list/src/users-list.module.d.ts +18 -0
  328. package/users-list/src/utils/app-loader/app-loader.d.ts +6 -0
  329. package/users-list/src/utils/common-functions.d.ts +2 -0
  330. package/users-list/src/utils/pagination/pagination.component.d.ts +18 -0
  331. package/users-list/src/utils/utils.service.d.ts +9 -0
@@ -0,0 +1,2107 @@
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 i2 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
+ this.lineAssociationsHasChanges = false;
391
+ this.plarService = false;
392
+ if (device) {
393
+ this.name = device.name;
394
+ this.pkiid = device.pkiid;
395
+ this.deviceType = device.deviceType;
396
+ this.protocol = device.protocol;
397
+ this.description = device.description;
398
+ this.buttonTemplate = device.buttonTemplate;
399
+ this.softkeyTemplate = device.softkeyTemplate;
400
+ this.devicePoolName = device.devicePoolName;
401
+ this.location = device.location;
402
+ this.firmwareVersion = device.firmwareVersion;
403
+ this.plarService = device.plarService;
404
+ this.callingSearchSpaceName = device.callingSearchSpaceName;
405
+ this.registrationStatus = 'Unknown'; // TEMP for demo
406
+ this.ipAddress = 'None'; // TEMP for demo
407
+ this.lineAssociations = device.lineAssociations?.length ?
408
+ device.lineAssociations.map((line) => new LineAssociation(line)) : [];
409
+ }
410
+ }
411
+ getSavableData() {
412
+ const excludedFields = ['form'];
413
+ return getSavableData(this, excludedFields);
414
+ }
415
+ }
416
+ var RecordingOptions;
417
+ (function (RecordingOptions) {
418
+ RecordingOptions["disabled"] = "Call Recording Disabled";
419
+ RecordingOptions["auto_enabled"] = "Automatic Call Recording Enabled";
420
+ RecordingOptions["selective_enabled"] = "Selective Call Recording Enabled";
421
+ })(RecordingOptions || (RecordingOptions = {}));
422
+
423
+ class SimplifiedUser {
424
+ constructor(user, isLdap) {
425
+ // isLdap TEMP because of token response issue
426
+ if (user) {
427
+ this.userid = user.userid;
428
+ this.email = user.email;
429
+ this.firstName = user.firstName;
430
+ this.lastName = user.lastName;
431
+ this.siteId = user.siteId;
432
+ this.siteName = user.siteName;
433
+ this.token = user.token;
434
+ this.department = user.department;
435
+ this.manager = user.manager;
436
+ this.associatedPc = user.associatedPc;
437
+ this.digestCredentials = user.digestCredentials;
438
+ this.userProfile = user.userProfile;
439
+ this.enableMobileVoiceAccess = user.enableMobileVoiceAccess;
440
+ this.ldapIntegrated = user.ldapIntegrated || isLdap || false;
441
+ this.userLocale = user.userLocale;
442
+ this.confirmDigestCredentials = user.confirmDigestCredentials;
443
+ this.middleName = user.middleName;
444
+ this.telephoneNumber = user.telephoneNumber;
445
+ this.mobileNumber = user.mobileNumber;
446
+ this.directoryUri = user.directoryUri;
447
+ this.title = user.title;
448
+ this.homeNumber = user.homeNumber;
449
+ this.pagerNumber = user.pagerNumber;
450
+ this.displayName = user.displayName;
451
+ if (user.devices && user.devices.length) {
452
+ this.devices = user.devices.map((device) => new Device(device));
453
+ if (user.lines && user.lines.length) {
454
+ this.devices.forEach(device => {
455
+ if (device && device.lineAssociations && device.lineAssociations.length) {
456
+ device.lineAssociations.forEach(lineAssociation => {
457
+ lineAssociation.callingSearchSpace = this.getLineVal(lineAssociation, user.lines, 'callingSearchSpace');
458
+ lineAssociation.textLabel = lineAssociation.textLabel || this.getLineVal(lineAssociation, user.lines, 'textLabel') || '';
459
+ lineAssociation.alertingName = lineAssociation.alertingName || this.getLineVal(lineAssociation, user.lines, 'alertingName') || '';
460
+ });
461
+ }
462
+ });
463
+ }
464
+ }
465
+ }
466
+ this.initForm();
467
+ }
468
+ getLineVal(lineAssociation, lines, token) {
469
+ const lineForVal = lines.find((line) => line.directoryNumber.directoryNumber === lineAssociation.directoryNumber.directoryNumber);
470
+ return lineForVal && lineForVal[token] || '';
471
+ }
472
+ getUserDetailsSavableData() {
473
+ const excludedFields = ['devices', 'deviceProfiles', 'lines', 'singleNumberReach', 'vmPassword', 'vmUnifiedMessagingAccount', 'alternateExtensions', 'callerInput', 'lineAppearances', 'meetMes', 'webAppPasswordSettings', 'form'];
474
+ return getSavableData(this, excludedFields);
475
+ }
476
+ initForm() {
477
+ const formBuilder = new FormBuilder();
478
+ const formSettings = {
479
+ userid: [{ value: this.userid || '', disabled: this.ldapIntegrated }, [Validators.required, Validators.maxLength(128)]],
480
+ email: [{ value: this.email || '', disabled: this.ldapIntegrated }, [
481
+ Validators.pattern(REGEX_PATTERN.EMAIL),
482
+ Validators.required
483
+ ]],
484
+ firstName: [{ value: this.firstName || '', disabled: this.ldapIntegrated }],
485
+ lastName: [{ value: this.lastName || '', disabled: this.ldapIntegrated }, Validators.required],
486
+ department: [{ value: this.department || '', disabled: false }],
487
+ middleName: [{ value: this.middleName || '', disabled: false }],
488
+ title: [{ value: this.title || '', disabled: false }],
489
+ telephoneNumber: [{ value: this.telephoneNumber || '', disabled: false }],
490
+ homeNumber: [{ value: this.homeNumber || '', disabled: false }],
491
+ mobileNumber: [{ value: this.mobileNumber || '', disabled: false }],
492
+ pagerNumber: [{ value: this.pagerNumber || '', disabled: false }],
493
+ displayName: [{ value: this.displayName || '', disabled: false }],
494
+ manager: [{ value: this.manager || '', disabled: false }],
495
+ associatedPc: [this.associatedPc || ''],
496
+ directoryUri: [this.directoryUri || ''],
497
+ userProfile: [this.userProfile],
498
+ enableMobileVoiceAccess: [this.enableMobileVoiceAccess],
499
+ ldapIntegrated: [this.ldapIntegrated],
500
+ userLocale: [this.userLocale || ''],
501
+ digestCredentials: [''],
502
+ confirmDigestCredentials: ['']
503
+ };
504
+ this.form = formBuilder.group(formSettings);
505
+ }
506
+ toggleEditMode() {
507
+ this.editMode = !this.editMode;
508
+ /*['userid', 'email', 'firstName', 'lastName'].forEach(token => {
509
+ if (this.editMode) {
510
+ this.form.get(token)?.enable();
511
+ } else {
512
+ this.form.get(token)?.disable();
513
+ }
514
+ })*/
515
+ }
516
+ getSavableData() {
517
+ const excludedFields = ['form', 'editMode', 'viewMode', 'token', 'hasModifiedCache', 'confirmDigestCredentials'];
518
+ return getSavableData(this, excludedFields);
519
+ }
520
+ equal(userToCompare) {
521
+ if (!userToCompare) {
522
+ return false;
523
+ }
524
+ return JSON.stringify(this.getSavableData()) === JSON.stringify(userToCompare.getSavableData());
525
+ }
526
+ }
527
+
528
+ class UtilsService {
529
+ static sortSortArrayByProperty(array, sortBy) {
530
+ if (!array) {
531
+ return null;
532
+ }
533
+ return array.sort((a, b) => {
534
+ if (!a[sortBy] && !b[sortBy]) {
535
+ return 0;
536
+ }
537
+ if (a[sortBy] && !b[sortBy]) {
538
+ return 1;
539
+ }
540
+ if (!a[sortBy] && b[sortBy]) {
541
+ return -1;
542
+ }
543
+ const positionA = a[sortBy];
544
+ const positionB = b[sortBy];
545
+ return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
546
+ });
547
+ }
548
+ static diff(origObject, updatedObj, path, keysToIgnore) {
549
+ let result = [];
550
+ if (Object.is(origObject, updatedObj)) {
551
+ return undefined;
552
+ }
553
+ if (!updatedObj || typeof updatedObj !== 'object') {
554
+ return updatedObj;
555
+ }
556
+ const concat = Array.from(new Set([...Object.keys(origObject || {}), ...Object.keys(updatedObj || {})]));
557
+ const filter = keysToIgnore ? concat.filter(key => !keysToIgnore.includes(key)) : concat;
558
+ filter
559
+ .forEach(key => {
560
+ if (typeof updatedObj[key] === 'object' && typeof origObject[key] === 'object') {
561
+ if (UtilsService.differs(updatedObj[key], origObject[key])) {
562
+ const newPath = `${path}${path ? '.' : ''}${key}`;
563
+ const values = UtilsService.diff(origObject[key], updatedObj[key], newPath, keysToIgnore);
564
+ if (values !== undefined) {
565
+ result = [...result, ...values];
566
+ }
567
+ }
568
+ }
569
+ else if (updatedObj && !origObject || updatedObj[key] !== origObject[key] && !Object.is(origObject[key], updatedObj[key])) {
570
+ const value = updatedObj ? UtilsService.formatIfEmpty(updatedObj[key]) : null;
571
+ result.push(`${path}${path ? '.' : ''}${key}=${value}`);
572
+ }
573
+ });
574
+ return result;
575
+ }
576
+ static formatIfEmpty(value) {
577
+ if (value) {
578
+ return value;
579
+ }
580
+ switch (typeof value) {
581
+ case 'boolean':
582
+ return value;
583
+ case 'string':
584
+ return '';
585
+ default:
586
+ return null;
587
+ }
588
+ }
589
+ static differs(obj1, obj2) {
590
+ return JSON.stringify(obj1) !== JSON.stringify(obj2);
591
+ }
592
+ }
593
+ UtilsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
594
+ UtilsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService });
595
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService, decorators: [{
596
+ type: Injectable
597
+ }] });
598
+
599
+ const string_array = function (original, updated, fullKey) {
600
+ if (!updated || !SortingUtilsService.differs(original, updated)) {
601
+ return null;
602
+ }
603
+ return `${fullKey}=${updated.join(',')}`;
604
+ };
605
+ const line_reference = function (original, updated, fullKey) {
606
+ if (!updated || !SortingUtilsService.differs(original, updated)) {
607
+ return null;
608
+ }
609
+ // @ts-ignore
610
+ return Object.keys(updated).map(key => `${fullKey}.${key}=${updated[key]}`);
611
+ };
612
+ const nullable = function (original, updated, fullKey) {
613
+ if (!original && updated) {
614
+ // @ts-ignore
615
+ return Object.keys(updated).map(key => `${fullKey}.${key}=${updated[key]}`);
616
+ }
617
+ else if (original && !updated) {
618
+ return `${fullKey}=null`;
619
+ }
620
+ else {
621
+ return SortingUtilsService.diff(original, updated, fullKey, []);
622
+ }
623
+ };
624
+ class SortingUtilsService {
625
+ static sortDevicesByTypeAndName(array) {
626
+ if (!array) {
627
+ return null;
628
+ }
629
+ return array.sort((a, b) => {
630
+ if (a.deviceType === b.deviceType) {
631
+ return (a.name < b.name) ? -1 : (a.name > b.name) ? 1 : 0;
632
+ }
633
+ else {
634
+ return (a.deviceType < b.deviceType) ? -1 : 1;
635
+ }
636
+ });
637
+ }
638
+ static sortLinesByDirectoryName(array) {
639
+ if (!array) {
640
+ return null;
641
+ }
642
+ return array.sort((a, b) => {
643
+ if (!a.directoryNumber && !b.directoryNumber) {
644
+ return 0;
645
+ }
646
+ if (a.directoryNumber && !b.directoryNumber) {
647
+ return 1;
648
+ }
649
+ if (!a.directoryNumber && b.directoryNumber) {
650
+ return -1;
651
+ }
652
+ const directoryNumberA = a.directoryNumber.directoryNumber;
653
+ const directoryNumberB = b.directoryNumber.directoryNumber;
654
+ return (directoryNumberA < directoryNumberB) ? -1 : (directoryNumberA > directoryNumberB) ? 1 : 0;
655
+ });
656
+ }
657
+ static sortLineAssociationsByPosition(array) {
658
+ if (!array) {
659
+ return null;
660
+ }
661
+ return array.sort((a, b) => {
662
+ if (!a.position && !b.position) {
663
+ return 0;
664
+ }
665
+ if (a.position && !b.position) {
666
+ return 1;
667
+ }
668
+ if (!a.position && b.position) {
669
+ return -1;
670
+ }
671
+ const positionA = a.position;
672
+ const positionB = b.position;
673
+ return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
674
+ });
675
+ }
676
+ static sortSortArrayByProperty(array, sortBy) {
677
+ if (!array) {
678
+ return null;
679
+ }
680
+ return array.sort((a, b) => {
681
+ if (!a[sortBy] && !b[sortBy]) {
682
+ return 0;
683
+ }
684
+ if (a[sortBy] && !b[sortBy]) {
685
+ return 1;
686
+ }
687
+ if (!a[sortBy] && b[sortBy]) {
688
+ return -1;
689
+ }
690
+ const positionA = a[sortBy];
691
+ const positionB = b[sortBy];
692
+ return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
693
+ });
694
+ }
695
+ static diff(origObject, updatedObj, path, keysToIgnore) {
696
+ let result = [];
697
+ if (Object.is(origObject, updatedObj)) {
698
+ return undefined;
699
+ }
700
+ if (!updatedObj || typeof updatedObj !== 'object') {
701
+ return updatedObj;
702
+ }
703
+ const concat = Array.from(new Set([...Object.keys(origObject || {}), ...Object.keys(updatedObj || {})]));
704
+ const filter = keysToIgnore ? concat.filter(key => !keysToIgnore.includes(key)) : concat;
705
+ filter
706
+ .forEach(key => {
707
+ // @ts-ignore
708
+ if (this.dictionary[key]) {
709
+ // @ts-ignore
710
+ const complexResult = this.dictionary[key](origObject[key], updatedObj[key], `${path}${path ? '.' : ''}${key}`);
711
+ if (complexResult) {
712
+ if (Array.isArray(complexResult)) {
713
+ result = [...result, ...complexResult];
714
+ }
715
+ else {
716
+ result.push(complexResult);
717
+ }
718
+ }
719
+ }
720
+ else if (typeof updatedObj[key] === 'object' && typeof origObject[key] === 'object') {
721
+ if (SortingUtilsService.differs(updatedObj[key], origObject[key])) {
722
+ const newPath = `${path}${path ? '.' : ''}${key}`;
723
+ const values = SortingUtilsService.diff(origObject[key], updatedObj[key], newPath, keysToIgnore);
724
+ if (values !== undefined) {
725
+ result = [...result, ...values];
726
+ }
727
+ }
728
+ }
729
+ else if (updatedObj && !origObject || updatedObj[key] !== origObject[key] && !Object.is(origObject[key], updatedObj[key])) {
730
+ const value = updatedObj ? SortingUtilsService.formatIfEmpty(updatedObj[key]) : null;
731
+ result.push(`${path}${path ? '.' : ''}${key}=${value}`);
732
+ }
733
+ });
734
+ return result;
735
+ }
736
+ static formatIfEmpty(value) {
737
+ if (value) {
738
+ return value;
739
+ }
740
+ switch (typeof value) {
741
+ case 'boolean':
742
+ return value;
743
+ case 'string':
744
+ return '';
745
+ default:
746
+ return null;
747
+ }
748
+ }
749
+ static differs(obj1, obj2) {
750
+ return JSON.stringify(obj1) !== JSON.stringify(obj2);
751
+ }
752
+ }
753
+ SortingUtilsService.dictionary = {
754
+ features: string_array,
755
+ services: string_array,
756
+ directoryNumber: line_reference,
757
+ primaryLineReference: line_reference,
758
+ speedDials: function (original, updated, fullKey) {
759
+ if (!updated || !SortingUtilsService.differs(original, updated)) {
760
+ return null;
761
+ }
762
+ // todo only changes, identification
763
+ let map = [];
764
+ updated.map((speedDial) => {
765
+ const currentFullKey = `${fullKey}.${speedDial.index}`; // ${speedDial.type} CHECk ?
766
+ map = [...map, Object.keys(speedDial).map(key => `${currentFullKey}.${key}=${speedDial[key]}`)];
767
+ });
768
+ return map;
769
+ },
770
+ lineAssociations: function (original, updated, fullKey) {
771
+ if (!updated || !SortingUtilsService.differs(original, updated)) {
772
+ return null;
773
+ }
774
+ let map = [];
775
+ updated.map((lineAssociation) => {
776
+ const currentFullKey = `${fullKey}.${lineAssociation.linePkid ? lineAssociation.linePkid : lineAssociation.lineLocalId}`;
777
+ const originalLineAssociation = original.find(line => line.index === lineAssociation.index);
778
+ if (SortingUtilsService.differs(originalLineAssociation, lineAssociation)) {
779
+ const diff = SortingUtilsService.diff(originalLineAssociation, lineAssociation, currentFullKey, []);
780
+ map = [...map, ...diff];
781
+ }
782
+ });
783
+ return map;
784
+ },
785
+ enterpriseAltNum: nullable,
786
+ e164AltNum: nullable
787
+ };
788
+ SortingUtilsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
789
+ SortingUtilsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService });
790
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService, decorators: [{
791
+ type: Injectable
792
+ }] });
793
+
794
+ class LineService {
795
+ generateLineAssociationFromLine(lineAssociation) {
796
+ return {
797
+ directoryNumber: lineAssociation ? this.generateLineDirectory(lineAssociation) : null,
798
+ didPattern: lineAssociation ? this.generateDidPatternForLineAssociation(lineAssociation) : null,
799
+ mappedDids: lineAssociation ? '' : 'null',
800
+ index: lineAssociation ? lineAssociation.index : null,
801
+ position: lineAssociation ? lineAssociation.position : null,
802
+ textLabel: lineAssociation ? lineAssociation.textLabel : null,
803
+ // displayLabel: lineAssociation ? lineAssociation.displayLabel : 'null',
804
+ alertingName: lineAssociation ? lineAssociation.alertingName : null,
805
+ callerNumber: lineAssociation ? '' : 'null'
806
+ };
807
+ }
808
+ generateLineDirectory(lineAssociation) {
809
+ return {
810
+ directoryNumber: lineAssociation.directoryNumber.directoryNumber,
811
+ routePartitionName: lineAssociation.directoryNumber.routePartitionName,
812
+ };
813
+ }
814
+ generateDidPatternForLineAssociation(lineAssociation) {
815
+ return {
816
+ calledPartyTransformationMask: lineAssociation.directoryNumber && lineAssociation.directoryNumber.directoryNumber
817
+ };
818
+ }
819
+ }
820
+ LineService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
821
+ LineService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService });
822
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService, decorators: [{
823
+ type: Injectable
824
+ }] });
825
+
826
+ class UserService {
827
+ get lineAssociation() {
828
+ return this.user && this.originUser.devices && this.user.devices[0] && this.user.devices[0].lineAssociations && this.user.devices[0].lineAssociations[0];
829
+ }
830
+ get originLineAssociation() {
831
+ return this.originUser && this.originUser.devices && this.originUser.devices[0] && this.originUser.devices[0].lineAssociations && this.originUser.devices[0].lineAssociations[0];
832
+ }
833
+ constructor(apiService, lineService) {
834
+ this.apiService = apiService;
835
+ this.lineService = lineService;
836
+ this.siteId = -1;
837
+ this.userId = '';
838
+ this.dataPending = false;
839
+ this.userIdExistPending = false;
840
+ this.hasExistedUserId = false;
841
+ this.onUserLineSaved$ = new Subject();
842
+ }
843
+ ngOnInit() {
844
+ console.log(this.siteId);
845
+ }
846
+ fetchUserToken(siteId, userId, isLdap, isSetNewTokenOnly) {
847
+ // isLdap TEMP because of token response issue
848
+ this.siteId = siteId;
849
+ this.userId = userId;
850
+ return this.apiService.fetch(API.USER_TOKEN.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(userId))))
851
+ .pipe(map((result) => {
852
+ const user = result && Object.values(result)[0];
853
+ const token = Object.keys(result)[0];
854
+ if (user) {
855
+ if (!isSetNewTokenOnly) {
856
+ this.setSimplifiedUser(user);
857
+ this.user.token = user.token;
858
+ }
859
+ this.user.token = user.token || token;
860
+ this.originUser.token = user.token || token;
861
+ }
862
+ }));
863
+ // .pipe(this.handleError(false, true));
864
+ }
865
+ updateUserFields(body) {
866
+ if (!this.siteId) {
867
+ return;
868
+ }
869
+ return this.apiService.post(API.UPDATE_USER_FIELDS.replace(':siteId', String(this.siteId)).replace(':token', this.user.token), body);
870
+ // .pipe(this.handleError(false, true));
871
+ }
872
+ fetchUserById(id) {
873
+ this.userIdExistPending = true;
874
+ return this.apiService.fetch(API.USER_BY_ID.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(id))))
875
+ .pipe(map(result => {
876
+ this.userIdExistPending = false;
877
+ return result;
878
+ }));
879
+ }
880
+ persistCacheChanges() {
881
+ /*const params = {
882
+ excludeDeviceExtraOptions: true
883
+ };*/
884
+ return this.processUserChangesToCache()
885
+ .pipe(map((result) => {
886
+ return this.apiService.post(API.PERSIST_USER_CACHE.replace(':siteId', String(this.siteId)).replace(':token', this.user.token), {})
887
+ .subscribe(() => {
888
+ });
889
+ // .pipe(map((user) => {
890
+ // // this.setUser(user, false, this.user.token);
891
+ // this.user.hasModifiedCache = false;
892
+ // }))
893
+ // .pipe(this.handleError(true, true));
894
+ }));
895
+ }
896
+ processUserChangesToCache() {
897
+ const calls = [];
898
+ const body = UtilsService.diff(this.originUser.getUserDetailsSavableData(), this.user.getUserDetailsSavableData(), 'user');
899
+ if (body?.length) {
900
+ calls.push(this.updateUserFields(body));
901
+ }
902
+ if (!calls?.length) {
903
+ return of(this.user);
904
+ }
905
+ return forkJoin(calls)
906
+ .pipe(map((responses) => {
907
+ // ApiUserResponse
908
+ this.handleSaveUserResponse(responses);
909
+ }));
910
+ // .pipe(this.handleError(false, true));
911
+ }
912
+ saveNewLine() {
913
+ this.dataPending = true;
914
+ this.deleteLine(this.user.siteId, this.lineAssociation.linePkid, encodeURIComponent(this.user.token))
915
+ .subscribe(() => {
916
+ const URL = API.PERSIST_USER_CACHE.replace(':siteId', String(this.siteId)).replace(':token', this.user.token);
917
+ this.apiService.post(URL, {})
918
+ .subscribe(() => {
919
+ this.fetchUserToken(this.siteId, this.user.userid, false, true)
920
+ .subscribe(() => {
921
+ this.runNewLineCreation();
922
+ });
923
+ });
924
+ });
925
+ }
926
+ runNewLineCreation() {
927
+ // CREATE NEW LINE
928
+ const newLineBody = SortingUtilsService.diff(this.lineService.generateLineAssociationFromLine(null), this.lineService.generateLineAssociationFromLine(this.lineAssociation), 'device.lineAssociations', null);
929
+ this.associateLineToUserDevice(this.user.siteId, this.user.devices[0].name, newLineBody, null, this.lineAssociation.callingSearchSpace).subscribe((response) => {
930
+ if (response && response.currentUpdatedUser) {
931
+ const linePkId = this.getLinePkIdFromUser(response?.currentUpdatedUser, 0);
932
+ forkJoin([
933
+ this.updateLineFields(this.siteId, linePkId, this.user.token, this.lineAssociation.alertingName),
934
+ this.updateDeviceFields(this.siteId, this.user.devices[0]?.name, this.user.token)
935
+ ]).subscribe((response) => {
936
+ this.originUser.devices[0].lineAssociations[0].directoryNumber.directoryNumber = this.lineAssociation.directoryNumber.directoryNumber;
937
+ this.onUserLineSaved$.next(true);
938
+ });
939
+ }
940
+ });
941
+ // -----
942
+ }
943
+ getLinePkIdFromUser(user, index) {
944
+ if (user.devices && user.devices[index] && user.devices[index].lineAssociations && user.devices[index].lineAssociations[index]) {
945
+ return user.devices[index].lineAssociations[index].linePkid || user.devices[index].lineAssociations[index].lineLocalId;
946
+ }
947
+ }
948
+ deleteLine(siteId, pkid, token) {
949
+ return this.apiService.delete(API.DELETE_LINE.replace(':siteId', String(siteId)).replace(':pkid', pkid).replace(':token', encodeURIComponent(token)), {});
950
+ // .pipe(this.handleError(true, false));
951
+ }
952
+ disassociateLine(siteId, linePkid, token, deviceName) {
953
+ return this.apiService.delete(API.DISASSOCIATE_LINE.replace(':siteId', String(siteId))
954
+ .replace(':linePkid', linePkid)
955
+ .replace(':deviceName', deviceName)
956
+ .replace(':token', encodeURIComponent(token)), {});
957
+ // .pipe(this.handleError(true, false));
958
+ }
959
+ updateLineFields(siteId, pkid, token, alertingName) {
960
+ const body = ['line.description=', `line.alertingName=${alertingName}`];
961
+ return this.apiService.post(API.UPDATE_LINE_FIELDS.replace(':siteId', String(siteId)).replace(':pkid', encodeURIComponent(pkid)).replace(':token', encodeURIComponent(token)), body);
962
+ // .pipe(this.handleError(true, false));
963
+ }
964
+ updateDeviceFields(siteId, deviceName, token) {
965
+ const body = ['device.associatedDNs.0=null'];
966
+ return this.apiService.post(API.UPDATE_DEVICE_FIELDS.replace(':siteId', String(siteId)).replace(':deviceName', deviceName).replace(':token', encodeURIComponent(token)), body);
967
+ // .pipe(this.handleError(true, false));
968
+ }
969
+ checkDestinationNumber(siteId, directoryNumber, routePartitionName) {
970
+ const params = {
971
+ dntype: 'EXTENSION'
972
+ };
973
+ const body = {
974
+ directoryNumber: directoryNumber,
975
+ routePartitionName: routePartitionName
976
+ };
977
+ return this.apiService.post(API.CHECK_DESTINATION_NUMBER.replace(':siteId', siteId), body, params);
978
+ }
979
+ associateLineToUserDevice(siteId, deviceName, body, pkid, css) {
980
+ let params = {};
981
+ if (pkid) {
982
+ params = { linePkid: pkid };
983
+ }
984
+ if (css) {
985
+ // @ts-ignore
986
+ params['css'] = css;
987
+ }
988
+ return this.apiService.post(API.ASSOCIATE_LINE.replace(':siteId', String(siteId)).replace(':deviceName', deviceName)
989
+ .replace(':token', encodeURIComponent(this.user.token)), body, params);
990
+ // .pipe(this.handleError(true, true));
991
+ }
992
+ hasUnsavedChanges() {
993
+ if (this.user && this.originUser) {
994
+ return !this.user.equal(this.originUser);
995
+ }
996
+ return false;
997
+ }
998
+ setSimplifiedUser(user, isLdap) {
999
+ // isLdap TEMP because of token response issue
1000
+ this.user = new SimplifiedUser(user, isLdap);
1001
+ const copiedUser = JSON.parse(JSON.stringify(user));
1002
+ this.originUser = new SimplifiedUser(copiedUser, isLdap);
1003
+ }
1004
+ handleSaveUserResponse(responses) {
1005
+ if (!responses?.length) {
1006
+ return;
1007
+ }
1008
+ for (let len = responses.length, i = len - 1; i >= 0; i--) {
1009
+ if (responses[i] && responses[i].currentUpdatedUser) {
1010
+ // this.setUser(responses[i].currentUpdatedUser, false, this.user.token);
1011
+ this.user.hasModifiedCache = true;
1012
+ return;
1013
+ }
1014
+ }
1015
+ }
1016
+ }
1017
+ UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService, deps: [{ token: APIService }, { token: LineService }], target: i0.ɵɵFactoryTarget.Injectable });
1018
+ UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService });
1019
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService, decorators: [{
1020
+ type: Injectable
1021
+ }], ctorParameters: function () { return [{ type: APIService }, { type: LineService }]; } });
1022
+
1023
+ class AppLoaderComponent {
1024
+ constructor() {
1025
+ }
1026
+ }
1027
+ AppLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1028
+ AppLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AppLoaderComponent, selector: "app-loader", ngImport: i0, template: "<div class=\"overlay\">\r\n <mat-progress-spinner\r\n class=\"page-spinner\"\r\n mode=\"indeterminate\"\r\n [diameter]=\"120\"></mat-progress-spinner>\r\n</div>\r\n", styles: [".overlay{position:fixed;width:100%;height:100%;inset:0;background-color:#fff3;z-index:200}\n"], dependencies: [{ kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }], encapsulation: i0.ViewEncapsulation.None });
1029
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, decorators: [{
1030
+ type: Component,
1031
+ args: [{ selector: 'app-loader', encapsulation: ViewEncapsulation.None, template: "<div class=\"overlay\">\r\n <mat-progress-spinner\r\n class=\"page-spinner\"\r\n mode=\"indeterminate\"\r\n [diameter]=\"120\"></mat-progress-spinner>\r\n</div>\r\n", styles: [".overlay{position:fixed;width:100%;height:100%;inset:0;background-color:#fff3;z-index:200}\n"] }]
1032
+ }], ctorParameters: function () { return []; } });
1033
+
1034
+ class AuthInterceptor {
1035
+ constructor() {
1036
+ }
1037
+ intercept(request, next) {
1038
+ request = request.clone({
1039
+ setHeaders: {
1040
+ // Authorization: basicAuthHeaderString
1041
+ },
1042
+ withCredentials: true
1043
+ });
1044
+ return next.handle(request).pipe(catchError(err => {
1045
+ if (err instanceof HttpErrorResponse) {
1046
+ if (err.status === 401) {
1047
+ if (window.history.length < 3) {
1048
+ err.error.message = '';
1049
+ }
1050
+ else {
1051
+ err.error.message = 'SESSION_INACTIVE';
1052
+ }
1053
+ }
1054
+ }
1055
+ return throwError(err);
1056
+ }));
1057
+ }
1058
+ }
1059
+ AuthInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1060
+ AuthInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor });
1061
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor, decorators: [{
1062
+ type: Injectable
1063
+ }], ctorParameters: function () { return []; } });
1064
+
1065
+ class UserInfoComponent {
1066
+ }
1067
+ UserInfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1068
+ UserInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserInfoComponent, selector: "app-user-info", inputs: { name: "name", active: "active", email: "email", position: "position" }, ngImport: i0, template: "<div class=\"info-holder\">\r\n <div class=\"content-box flex-box\">\r\n <div class=\"info-holder__user-image\">\r\n <img src=\"../../../assets/a24749b225874bb3e3a4cb5d2f42e82c.png\" alt=\"\" class=\"avatar\">\r\n </div>\r\n <div class=\"info-holder__user-information\">\r\n <div class=\"info-holder__user-name\">{{name}}</div>\r\n <div class=\"info-holder__user-breadcrumbs\">\r\n <div class=\"is-active\" *ngIf=\"active; else notActive\">\r\n <span class=\"icon-user-status icon-user-status-active\"></span>Active\r\n </div>\r\n <div class=\"icon-separator\"></div>\r\n <div class=\"email\">{{email}}</div>\r\n <div class=\"icon-separator\"></div>\r\n <div class=\"position\">{{position}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n\r\n<ng-template #notActive>\r\n <div class=\"is-active\">\r\n <svg width=\"8\" height=\"9\" viewBox=\"0 0 8 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4 8.5C6.20914 8.5 8 6.70914 8 4.5C8 2.29086 6.20914 0.5 4 0.5C1.79086 0.5 0 2.29086 0 4.5C0 6.70914 1.79086 8.5 4 8.5Z\" fill=\"grey\"/>\r\n </svg>\r\n <div>Not active</div>\r\n </div>\r\n</ng-template>\r\n", styles: [".info-holder{display:flex;gap:16px;align-items:center;font-family:Inter,sans-serif;height:102px;width:100%;background:white;margin:0 0 30px}.info-holder__user-image img{width:40px;border-radius:120px;margin:20px 0 0}.info-holder__user-information{padding:10px;margin:10px;gap:10px;display:flex;flex-direction:column}.info-holder__user-name{font-size:20px;font-weight:500}.info-holder__user-breadcrumbs{display:flex;gap:8px;font-weight:400;font-size:14px;color:#000000b3;align-items:center}.info-holder .icon-separator{height:5px;width:5px;background-color:#000000b3;border-radius:50%}.info-holder .is-active{display:flex;gap:8px;align-items:center}.icon-user-status{width:.5rem;height:.5rem;border-radius:50%;background-color:#707070;margin:0 5px 0 0}.icon-user-status.icon-user-status-active{background-color:#1d805f;display:inline-block}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1069
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserInfoComponent, decorators: [{
1070
+ type: Component,
1071
+ args: [{ selector: 'app-user-info', template: "<div class=\"info-holder\">\r\n <div class=\"content-box flex-box\">\r\n <div class=\"info-holder__user-image\">\r\n <img src=\"../../../assets/a24749b225874bb3e3a4cb5d2f42e82c.png\" alt=\"\" class=\"avatar\">\r\n </div>\r\n <div class=\"info-holder__user-information\">\r\n <div class=\"info-holder__user-name\">{{name}}</div>\r\n <div class=\"info-holder__user-breadcrumbs\">\r\n <div class=\"is-active\" *ngIf=\"active; else notActive\">\r\n <span class=\"icon-user-status icon-user-status-active\"></span>Active\r\n </div>\r\n <div class=\"icon-separator\"></div>\r\n <div class=\"email\">{{email}}</div>\r\n <div class=\"icon-separator\"></div>\r\n <div class=\"position\">{{position}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n\r\n<ng-template #notActive>\r\n <div class=\"is-active\">\r\n <svg width=\"8\" height=\"9\" viewBox=\"0 0 8 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4 8.5C6.20914 8.5 8 6.70914 8 4.5C8 2.29086 6.20914 0.5 4 0.5C1.79086 0.5 0 2.29086 0 4.5C0 6.70914 1.79086 8.5 4 8.5Z\" fill=\"grey\"/>\r\n </svg>\r\n <div>Not active</div>\r\n </div>\r\n</ng-template>\r\n", styles: [".info-holder{display:flex;gap:16px;align-items:center;font-family:Inter,sans-serif;height:102px;width:100%;background:white;margin:0 0 30px}.info-holder__user-image img{width:40px;border-radius:120px;margin:20px 0 0}.info-holder__user-information{padding:10px;margin:10px;gap:10px;display:flex;flex-direction:column}.info-holder__user-name{font-size:20px;font-weight:500}.info-holder__user-breadcrumbs{display:flex;gap:8px;font-weight:400;font-size:14px;color:#000000b3;align-items:center}.info-holder .icon-separator{height:5px;width:5px;background-color:#000000b3;border-radius:50%}.info-holder .is-active{display:flex;gap:8px;align-items:center}.icon-user-status{width:.5rem;height:.5rem;border-radius:50%;background-color:#707070;margin:0 5px 0 0}.icon-user-status.icon-user-status-active{background-color:#1d805f;display:inline-block}\n"] }]
1072
+ }], propDecorators: { name: [{
1073
+ type: Input
1074
+ }], active: [{
1075
+ type: Input
1076
+ }], email: [{
1077
+ type: Input
1078
+ }], position: [{
1079
+ type: Input
1080
+ }] } });
1081
+
1082
+ class MaterialModule {
1083
+ }
1084
+ MaterialModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1085
+ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [DragDropModule,
1086
+ MatButtonModule,
1087
+ MatListModule,
1088
+ MatProgressSpinnerModule,
1089
+ MatExpansionModule,
1090
+ MatInputModule,
1091
+ MatInputModule,
1092
+ MatListModule,
1093
+ MatTreeModule,
1094
+ MatTreeModule,
1095
+ MatNativeDateModule,
1096
+ MatDatepickerModule,
1097
+ MatTooltipModule,
1098
+ MatAutocompleteModule,
1099
+ MatChipsModule,
1100
+ MatSidenavModule,
1101
+ MatFormFieldModule,
1102
+ MatStepperModule,
1103
+ MatTabsModule,
1104
+ MatCardModule,
1105
+ MatSelectModule,
1106
+ MatCheckboxModule,
1107
+ MatSlideToggleModule,
1108
+ MatTableModule,
1109
+ MatPaginatorModule], exports: [DragDropModule,
1110
+ MatButtonModule,
1111
+ MatListModule,
1112
+ MatProgressSpinnerModule,
1113
+ MatExpansionModule,
1114
+ MatInputModule,
1115
+ MatInputModule,
1116
+ MatListModule,
1117
+ MatTreeModule,
1118
+ MatTreeModule,
1119
+ MatNativeDateModule,
1120
+ MatDatepickerModule,
1121
+ MatTooltipModule,
1122
+ MatAutocompleteModule,
1123
+ MatChipsModule,
1124
+ MatSidenavModule,
1125
+ MatFormFieldModule,
1126
+ MatStepperModule,
1127
+ MatTabsModule,
1128
+ MatCardModule,
1129
+ MatCheckboxModule,
1130
+ MatSelectModule,
1131
+ MatSlideToggleModule,
1132
+ MatProgressSpinnerModule,
1133
+ MatTableModule,
1134
+ MatPaginatorModule] });
1135
+ MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [DragDropModule,
1136
+ MatButtonModule,
1137
+ MatListModule,
1138
+ MatProgressSpinnerModule,
1139
+ MatExpansionModule,
1140
+ MatInputModule,
1141
+ MatInputModule,
1142
+ MatListModule,
1143
+ MatTreeModule,
1144
+ MatTreeModule,
1145
+ MatNativeDateModule,
1146
+ MatDatepickerModule,
1147
+ MatTooltipModule,
1148
+ MatAutocompleteModule,
1149
+ MatChipsModule,
1150
+ MatSidenavModule,
1151
+ MatFormFieldModule,
1152
+ MatStepperModule,
1153
+ MatTabsModule,
1154
+ MatCardModule,
1155
+ MatSelectModule,
1156
+ MatCheckboxModule,
1157
+ MatSlideToggleModule,
1158
+ MatTableModule,
1159
+ MatPaginatorModule, DragDropModule,
1160
+ MatButtonModule,
1161
+ MatListModule,
1162
+ MatProgressSpinnerModule,
1163
+ MatExpansionModule,
1164
+ MatInputModule,
1165
+ MatInputModule,
1166
+ MatListModule,
1167
+ MatTreeModule,
1168
+ MatTreeModule,
1169
+ MatNativeDateModule,
1170
+ MatDatepickerModule,
1171
+ MatTooltipModule,
1172
+ MatAutocompleteModule,
1173
+ MatChipsModule,
1174
+ MatSidenavModule,
1175
+ MatFormFieldModule,
1176
+ MatStepperModule,
1177
+ MatTabsModule,
1178
+ MatCardModule,
1179
+ MatCheckboxModule,
1180
+ MatSelectModule,
1181
+ MatSlideToggleModule,
1182
+ MatProgressSpinnerModule,
1183
+ MatTableModule,
1184
+ MatPaginatorModule] });
1185
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, decorators: [{
1186
+ type: NgModule,
1187
+ args: [{
1188
+ imports: [
1189
+ DragDropModule,
1190
+ MatButtonModule,
1191
+ MatListModule,
1192
+ MatProgressSpinnerModule,
1193
+ MatExpansionModule,
1194
+ MatInputModule,
1195
+ MatInputModule,
1196
+ MatListModule,
1197
+ MatTreeModule,
1198
+ MatTreeModule,
1199
+ MatNativeDateModule,
1200
+ MatDatepickerModule,
1201
+ MatTooltipModule,
1202
+ MatAutocompleteModule,
1203
+ MatChipsModule,
1204
+ MatSidenavModule,
1205
+ MatFormFieldModule,
1206
+ MatStepperModule,
1207
+ MatTabsModule,
1208
+ MatCardModule,
1209
+ MatSelectModule,
1210
+ MatCheckboxModule,
1211
+ MatSlideToggleModule,
1212
+ MatTableModule,
1213
+ MatPaginatorModule
1214
+ ],
1215
+ exports: [
1216
+ DragDropModule,
1217
+ MatButtonModule,
1218
+ MatListModule,
1219
+ MatProgressSpinnerModule,
1220
+ MatExpansionModule,
1221
+ MatInputModule,
1222
+ MatInputModule,
1223
+ MatListModule,
1224
+ MatTreeModule,
1225
+ MatTreeModule,
1226
+ MatNativeDateModule,
1227
+ MatDatepickerModule,
1228
+ MatTooltipModule,
1229
+ MatAutocompleteModule,
1230
+ MatChipsModule,
1231
+ MatSidenavModule,
1232
+ MatFormFieldModule,
1233
+ MatStepperModule,
1234
+ MatTabsModule,
1235
+ MatCardModule,
1236
+ MatCheckboxModule,
1237
+ MatSelectModule,
1238
+ MatSlideToggleModule,
1239
+ MatProgressSpinnerModule,
1240
+ MatTableModule,
1241
+ MatPaginatorModule
1242
+ ],
1243
+ }]
1244
+ }] });
1245
+
1246
+ const environment = {
1247
+ production: false,
1248
+ // apiUrl: 'http://localhost:4200',
1249
+ apiUrl: 'http://192.168.0.191:8080',
1250
+ notificationsLifetime: 30000,
1251
+ longNotificationsLifetime: 45000,
1252
+ cashCleanTimer: 900000,
1253
+ cashArrayLength: 10000,
1254
+ matomoUrl: 'http://192.168.0.136/matomo/',
1255
+ };
1256
+
1257
+ const TTL_DEFAULT = environment.notificationsLifetime;
1258
+ const TTL_LONG_DEFAULT = environment.longNotificationsLifetime;
1259
+ var NotificationType;
1260
+ (function (NotificationType) {
1261
+ NotificationType["info"] = "info";
1262
+ NotificationType["error"] = "error";
1263
+ NotificationType["success"] = "success";
1264
+ NotificationType["warning"] = "warning";
1265
+ })(NotificationType || (NotificationType = {}));
1266
+ class Notification {
1267
+ constructor(data) {
1268
+ this.ttl = TTL_DEFAULT;
1269
+ Object.assign(this, data || {});
1270
+ if (this.ttl === undefined) {
1271
+ this.ttl = this.message && this.message.length && this.message.length < 80 ? TTL_DEFAULT : TTL_LONG_DEFAULT;
1272
+ }
1273
+ }
1274
+ isInfo() {
1275
+ return this.type === NotificationType.info;
1276
+ }
1277
+ isError() {
1278
+ return this.type === NotificationType.error;
1279
+ }
1280
+ isSuccess() {
1281
+ return this.type === NotificationType.success;
1282
+ }
1283
+ isWarning() {
1284
+ return this.type === NotificationType.warning;
1285
+ }
1286
+ }
1287
+
1288
+ const SUCCESS_TIME = 5000;
1289
+ const INACTIVE_SESSION_MESSAGE = 'Your session was lost due to inactivity. Please login again';
1290
+ const INACTIVE_SESSION = 'SESSION_INACTIVE';
1291
+ class NotificationService {
1292
+ constructor() {
1293
+ this.listChange = new Subject();
1294
+ this.max = 0;
1295
+ this.list = [];
1296
+ }
1297
+ error(message, ttl) {
1298
+ this.notify('error', message, ttl);
1299
+ }
1300
+ success(message, ttl) {
1301
+ this.notify('success', message, (!ttl) ? SUCCESS_TIME : ttl);
1302
+ }
1303
+ warning(message, ttl) {
1304
+ this.notify('warning', message, ttl);
1305
+ }
1306
+ info(message, ttl) {
1307
+ this.notify('info', message, ttl);
1308
+ }
1309
+ notify(type, message, ttl) {
1310
+ const found = this.list.find((n) => n.message === message);
1311
+ if (found) {
1312
+ this.remove(found);
1313
+ }
1314
+ const notification = new Notification({
1315
+ id: ++this.max,
1316
+ type, message, ttl
1317
+ });
1318
+ if (notification.ttl > 0) {
1319
+ notification.timerId = setTimeout(() => this.remove(notification, true), notification.ttl);
1320
+ }
1321
+ this.list.push(notification);
1322
+ this.listChange.next(this.list);
1323
+ }
1324
+ remove(notification, auto) {
1325
+ if (!auto && notification.timerId) {
1326
+ // clear timeout in case of manual remove
1327
+ clearInterval(notification.timerId);
1328
+ }
1329
+ this.list = this.list.filter(n => n.id !== notification.id);
1330
+ this.listChange.next(this.list);
1331
+ }
1332
+ removeInactiveSessionError() {
1333
+ if (!this.list || !this.list.length) {
1334
+ return;
1335
+ }
1336
+ this.list = this.list.filter(n => n.message !== INACTIVE_SESSION_MESSAGE && n.message !== INACTIVE_SESSION);
1337
+ this.listChange.next(this.list);
1338
+ }
1339
+ }
1340
+ NotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1341
+ NotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService });
1342
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, decorators: [{
1343
+ type: Injectable
1344
+ }], ctorParameters: function () { return []; } });
1345
+
1346
+ class NotificationsComponent {
1347
+ constructor(notificationService, ref) {
1348
+ this.notificationService = notificationService;
1349
+ this.ref = ref;
1350
+ }
1351
+ ngOnInit() {
1352
+ this.listChangeSubscribe();
1353
+ }
1354
+ ngOnDestroy() {
1355
+ this.listSubscription.unsubscribe();
1356
+ }
1357
+ readMore() {
1358
+ this.isReadMore = !this.isReadMore;
1359
+ }
1360
+ removeNotification(notification) {
1361
+ this.notificationService.remove(notification);
1362
+ }
1363
+ listChangeSubscribe() {
1364
+ this.listSubscription = this.notificationService.listChange
1365
+ .subscribe((list) => {
1366
+ this.list = list;
1367
+ this.ref.detectChanges();
1368
+ });
1369
+ }
1370
+ }
1371
+ NotificationsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationsComponent, deps: [{ token: NotificationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1372
+ NotificationsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: NotificationsComponent, selector: "app-notification", ngImport: i0, template: "<!--\r\n\r\n<div class=\"notification-block\" role=\"alert\" aria-live=\"assertive\">\r\n <div class=\"notification\"\r\n *ngFor=\"let notification of list\"\r\n [ngClass]=\"{'error': notification.isError(), 'success': notification.isSuccess()}\">\r\n\r\n <div class=\"flex-box\">\r\n <div class=\"notification-icons-block\">\r\n <i *ngIf=\"notification.isError()\" class=\"fa fa-exclamation-triangle\"></i>\r\n <i *ngIf=\"notification.isWarning()\" class=\"fa fa-hand-paper-o\"></i>\r\n <i *ngIf=\"notification.isSuccess()\" class=\"fa fa-check\"></i>\r\n <i *ngIf=\"notification.isInfo()\" class=\"fa fa-info-circle\"></i>\r\n </div>\r\n <div *ngIf=\"!isReadMore\" class=\"message-block\">\r\n {{notification.message | truncate:[93]}}\r\n </div>\r\n <div *ngIf=\"isReadMore\" class=\"message-block\">\r\n {{notification.message}}\r\n </div>\r\n </div>\r\n <div class=\"read-more-error link clickable\" *ngIf=\"notification.message && notification.message.length > 93\"\r\n (click)=\"readMore()\">{{(isReadMore ? 'BUTTON.COLLAPSE' : 'BUTTON.READ_MORE') | translate}}</div>\r\n <button\r\n class=\"close\"\r\n mat-icon-button\r\n matTooltip=\"{{'BUTTON.CLOSE' | translate}} {{'NOTIFICATION_MSG.' + notification.type | translate}} {{'NOTIFICATION_MSG.NOTI' | translate}}\"\r\n (click)=\"removeNotification(notification)\">\r\n <img class=\"notification-icon-close\" src=\"assets/icons/close_icon_modal.svg\" alt=\"\">\r\n </button>\r\n </div>\r\n</div>\r\n-->\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.notification-block{right:0;top:110px;position:absolute;width:20%;z-index:100}.notification-block .read-more-error{margin:10px 13px 3px 0;text-align:right}.notification-block .notification{padding:15px 0 10px;margin-bottom:18px;color:#333;border-radius:3px;border-top:1.5px solid #e5e1cd;background:#fcf8e3;box-shadow:0 8px 12px #091e4226,0 0 1px #091e424f;width:368px;position:relative}.notification-block .notification .notification-icons-block{text-align:center;width:56px}.notification-block .notification .message-block{font-size:14px;font-family:Poppins,Poppins,sans-serif!important;word-break:break-word;width:270px}.notification-block .notification .notification-icon-close{height:24px}.notification-block .notification.error{background:#FFE9E9;border-top:1.5px solid #E16D6D}.notification-block .notification.success{background:#e3f4dc;border-top:1.5px solid #b3d692}.notification-block .notification .fa-exclamation-triangle{color:#e16d6d!important}.notification-block .notification .fa-check{color:#a0c37f!important}.notification-block .notification .fa-info-circle,.notification-block .notification .fa-hand-paper-o{color:#bdb89e!important}.notification-block .notification .fa{font-size:20px}.notification-block .notification .close{position:absolute;top:2px;right:-5px}.notification-block .notification .close .fa{font-size:14px}.notification-block .notification .fa{margin:0;color:inherit}@media screen and (max-width: 600px){.notification-block{width:50%;min-width:150px}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1373
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationsComponent, decorators: [{
1374
+ type: Component,
1375
+ args: [{ selector: 'app-notification', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\r\n\r\n<div class=\"notification-block\" role=\"alert\" aria-live=\"assertive\">\r\n <div class=\"notification\"\r\n *ngFor=\"let notification of list\"\r\n [ngClass]=\"{'error': notification.isError(), 'success': notification.isSuccess()}\">\r\n\r\n <div class=\"flex-box\">\r\n <div class=\"notification-icons-block\">\r\n <i *ngIf=\"notification.isError()\" class=\"fa fa-exclamation-triangle\"></i>\r\n <i *ngIf=\"notification.isWarning()\" class=\"fa fa-hand-paper-o\"></i>\r\n <i *ngIf=\"notification.isSuccess()\" class=\"fa fa-check\"></i>\r\n <i *ngIf=\"notification.isInfo()\" class=\"fa fa-info-circle\"></i>\r\n </div>\r\n <div *ngIf=\"!isReadMore\" class=\"message-block\">\r\n {{notification.message | truncate:[93]}}\r\n </div>\r\n <div *ngIf=\"isReadMore\" class=\"message-block\">\r\n {{notification.message}}\r\n </div>\r\n </div>\r\n <div class=\"read-more-error link clickable\" *ngIf=\"notification.message && notification.message.length > 93\"\r\n (click)=\"readMore()\">{{(isReadMore ? 'BUTTON.COLLAPSE' : 'BUTTON.READ_MORE') | translate}}</div>\r\n <button\r\n class=\"close\"\r\n mat-icon-button\r\n matTooltip=\"{{'BUTTON.CLOSE' | translate}} {{'NOTIFICATION_MSG.' + notification.type | translate}} {{'NOTIFICATION_MSG.NOTI' | translate}}\"\r\n (click)=\"removeNotification(notification)\">\r\n <img class=\"notification-icon-close\" src=\"assets/icons/close_icon_modal.svg\" alt=\"\">\r\n </button>\r\n </div>\r\n</div>\r\n-->\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.notification-block{right:0;top:110px;position:absolute;width:20%;z-index:100}.notification-block .read-more-error{margin:10px 13px 3px 0;text-align:right}.notification-block .notification{padding:15px 0 10px;margin-bottom:18px;color:#333;border-radius:3px;border-top:1.5px solid #e5e1cd;background:#fcf8e3;box-shadow:0 8px 12px #091e4226,0 0 1px #091e424f;width:368px;position:relative}.notification-block .notification .notification-icons-block{text-align:center;width:56px}.notification-block .notification .message-block{font-size:14px;font-family:Poppins,Poppins,sans-serif!important;word-break:break-word;width:270px}.notification-block .notification .notification-icon-close{height:24px}.notification-block .notification.error{background:#FFE9E9;border-top:1.5px solid #E16D6D}.notification-block .notification.success{background:#e3f4dc;border-top:1.5px solid #b3d692}.notification-block .notification .fa-exclamation-triangle{color:#e16d6d!important}.notification-block .notification .fa-check{color:#a0c37f!important}.notification-block .notification .fa-info-circle,.notification-block .notification .fa-hand-paper-o{color:#bdb89e!important}.notification-block .notification .fa{font-size:20px}.notification-block .notification .close{position:absolute;top:2px;right:-5px}.notification-block .notification .close .fa{font-size:14px}.notification-block .notification .fa{margin:0;color:inherit}@media screen and (max-width: 600px){.notification-block{width:50%;min-width:150px}}\n"] }]
1376
+ }], ctorParameters: function () { return [{ type: NotificationService }, { type: i0.ChangeDetectorRef }]; } });
1377
+
1378
+ class ListUser {
1379
+ constructor(user) {
1380
+ this.devices = [];
1381
+ this.deviceProfiles = [];
1382
+ if (user) {
1383
+ Object.assign(this, user);
1384
+ }
1385
+ }
1386
+ }
1387
+
1388
+ let RemoveKynFromIBMService$1 = class RemoveKynFromIBMService {
1389
+ constructor() {
1390
+ }
1391
+ removeCUCMS(date, customerId) {
1392
+ if (customerId === 8) {
1393
+ return date.filter((val) => !CUCMS_TO_IGNORE.includes(Math.round(val.cucmId)));
1394
+ }
1395
+ return date;
1396
+ }
1397
+ removeCUCS(date, customerId) {
1398
+ if (customerId === 8) {
1399
+ return date.filter((val) => !CUCS_TO_IGNORE.includes(Math.round(val.cucId)));
1400
+ }
1401
+ return date;
1402
+ }
1403
+ };
1404
+ RemoveKynFromIBMService$1.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService$1, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1405
+ RemoveKynFromIBMService$1.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService$1 });
1406
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService$1, decorators: [{
1407
+ type: Injectable
1408
+ }], ctorParameters: function () { return []; } });
1409
+
1410
+ class UsersSearchService {
1411
+ constructor(apiService, removeKynFromIBMService) {
1412
+ this.apiService = apiService;
1413
+ this.removeKynFromIBMService = removeKynFromIBMService;
1414
+ this.siteId = -1;
1415
+ this.userId = '';
1416
+ this.userIdExistPending = false;
1417
+ this.hasExistedUserId = false;
1418
+ this.pageSize = PAGINATION_DEFAULTS.SIZE;
1419
+ this.pageIndex = PAGINATION_DEFAULTS.SIZE;
1420
+ this.pageSizeOptions = PAGINATION_SIZE_OPTIONS;
1421
+ this.foundUsers$ = new BehaviorSubject(null);
1422
+ }
1423
+ getPagination() {
1424
+ return {
1425
+ total: this.total,
1426
+ pageSizeOptions: this.pageSizeOptions,
1427
+ pageSize: this.pageSize,
1428
+ pageIndex: this.pageIndex
1429
+ };
1430
+ }
1431
+ quickRegularUsersSearch() {
1432
+ this.searchParams = this.searchParams || { customerid: this.customerId };
1433
+ this.searchParams['provisionType'] = 'CUCM';
1434
+ return this.apiService.fetchPagination(API.QUICK_USERS_SEARCH, this.pageSize, this.pageIndex, this.searchParams)
1435
+ .pipe(map((res) => {
1436
+ this.total = res.total;
1437
+ // this.totals = this.totals || {};
1438
+ // this.totals['users'] = res.total;
1439
+ const users = res.pageData && res.pageData.length ? res.pageData.map(user => new ListUser(user)) : [];
1440
+ // this.foundUsers$.next(this.removeKynFromIBMService.removeCUCMS(users, this.customerId));
1441
+ this.foundUsers$.next(users);
1442
+ }));
1443
+ // .pipe(this.handleError(true));
1444
+ }
1445
+ }
1446
+ 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 });
1447
+ UsersSearchService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersSearchService });
1448
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UsersSearchService, decorators: [{
1449
+ type: Injectable
1450
+ }], ctorParameters: function () { return [{ type: APIService }, { type: RemoveKynFromIBMService$1 }]; } });
1451
+
1452
+ class PaginationComponent {
1453
+ constructor() {
1454
+ this.pageEmitter = new EventEmitter();
1455
+ this.pageNumberChangeEmitter = new EventEmitter();
1456
+ this.pageSizeOptions = PAGINATION_SIZE_OPTIONS;
1457
+ }
1458
+ ngOnInit() {
1459
+ }
1460
+ pageEvent(event) {
1461
+ this.pageEmitter.emit(event);
1462
+ }
1463
+ changePerPageNumber(event) {
1464
+ this.pageNumberChangeEmitter.emit(event.value);
1465
+ }
1466
+ }
1467
+ PaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1468
+ PaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PaginationComponent, selector: "app-pagination", inputs: { pagination: "pagination", showPageSizeOptions: "showPageSizeOptions", showRefreshButton: "showRefreshButton", lengthPending: "lengthPending" }, outputs: { pageEmitter: "pageEmitter", pageNumberChangeEmitter: "pageNumberChangeEmitter" }, ngImport: i0, template: "<div class=\"flex-box pagination\">\r\n <div class=\"page-indexes-box\">\r\n <mat-paginator\r\n [id]=\"'commonPagination'\"\r\n [hidePageSize]=\"true\"\r\n [length]=\"pagination.total\"\r\n [pageIndex]=\"pagination.pageIndex\"\r\n [pageSize]=\"pagination.pageSize\"\r\n [pageSizeOptions]=\"pagination.pageSizeOptions\"\r\n (page)=\"pageEvent($event)\">\r\n </mat-paginator>\r\n <mat-spinner class=\"length-spinner\" [diameter]=\"20\" mode=\"indeterminate\" *ngIf=\"lengthPending\">\r\n </mat-spinner>\r\n </div>\r\n\r\n <div class=\"flex-box per-page-block\" *ngIf=\"showPageSizeOptions\">\r\n <div class=\"item_per_page\">Items per page:</div>\r\n <div class=\"select-box select-page-size\">\r\n <mat-select [(ngModel)]=\"pagination.pageSize\" (selectionChange)=\"changePerPageNumber($event)\" #page\r\n [id]=\"'commonPaginationSelect'\">\r\n <mat-option *ngFor=\"let option of pageSizeOptions; let i = index;\" [id]=\"'paginationSelectOpt_' + i\" [value]=\"option\">{{option}}</mat-option>\r\n </mat-select>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n", styles: [".search-header-refresh-icon{align-items:center;line-height:54px;margin-left:10px}button[mat-icon-button] i{font-size:18px}mat-spinner.length-spinner{position:absolute;right:120px}h3,.search-header-refresh-icon{float:left}.page-options,.mat-paginator{float:right}.per-page-block mat-form-field{width:70px!important}.per-page-block span{margin-right:20px}.pagination{display:flex;justify-content:flex-end}.select-page-size{width:60px;margin:0 0 0 15px;padding:0 10px}.item_per_page{line-height:35px}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i8.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }] });
1469
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PaginationComponent, decorators: [{
1470
+ type: Component,
1471
+ args: [{ selector: 'app-pagination', template: "<div class=\"flex-box pagination\">\r\n <div class=\"page-indexes-box\">\r\n <mat-paginator\r\n [id]=\"'commonPagination'\"\r\n [hidePageSize]=\"true\"\r\n [length]=\"pagination.total\"\r\n [pageIndex]=\"pagination.pageIndex\"\r\n [pageSize]=\"pagination.pageSize\"\r\n [pageSizeOptions]=\"pagination.pageSizeOptions\"\r\n (page)=\"pageEvent($event)\">\r\n </mat-paginator>\r\n <mat-spinner class=\"length-spinner\" [diameter]=\"20\" mode=\"indeterminate\" *ngIf=\"lengthPending\">\r\n </mat-spinner>\r\n </div>\r\n\r\n <div class=\"flex-box per-page-block\" *ngIf=\"showPageSizeOptions\">\r\n <div class=\"item_per_page\">Items per page:</div>\r\n <div class=\"select-box select-page-size\">\r\n <mat-select [(ngModel)]=\"pagination.pageSize\" (selectionChange)=\"changePerPageNumber($event)\" #page\r\n [id]=\"'commonPaginationSelect'\">\r\n <mat-option *ngFor=\"let option of pageSizeOptions; let i = index;\" [id]=\"'paginationSelectOpt_' + i\" [value]=\"option\">{{option}}</mat-option>\r\n </mat-select>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n", styles: [".search-header-refresh-icon{align-items:center;line-height:54px;margin-left:10px}button[mat-icon-button] i{font-size:18px}mat-spinner.length-spinner{position:absolute;right:120px}h3,.search-header-refresh-icon{float:left}.page-options,.mat-paginator{float:right}.per-page-block mat-form-field{width:70px!important}.per-page-block span{margin-right:20px}.pagination{display:flex;justify-content:flex-end}.select-page-size{width:60px;margin:0 0 0 15px;padding:0 10px}.item_per_page{line-height:35px}\n"] }]
1472
+ }], ctorParameters: function () { return []; }, propDecorators: { pagination: [{
1473
+ type: Input
1474
+ }], showPageSizeOptions: [{
1475
+ type: Input
1476
+ }], showRefreshButton: [{
1477
+ type: Input
1478
+ }], lengthPending: [{
1479
+ type: Input
1480
+ }], pageEmitter: [{
1481
+ type: Output
1482
+ }], pageNumberChangeEmitter: [{
1483
+ type: Output
1484
+ }] } });
1485
+
1486
+ class RemoveKynFromIBMService {
1487
+ constructor() {
1488
+ }
1489
+ removeCUCMS(date, customerId) {
1490
+ if (customerId === 8) {
1491
+ return date.filter((val) => !CUCMS_TO_IGNORE.includes(Math.round(val.cucmId)));
1492
+ }
1493
+ return date;
1494
+ }
1495
+ removeCUCS(date, customerId) {
1496
+ if (customerId === 8) {
1497
+ return date.filter((val) => !CUCS_TO_IGNORE.includes(Math.round(val.cucId)));
1498
+ }
1499
+ return date;
1500
+ }
1501
+ }
1502
+ RemoveKynFromIBMService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1503
+ RemoveKynFromIBMService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService });
1504
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService, decorators: [{
1505
+ type: Injectable
1506
+ }], ctorParameters: function () { return []; } });
1507
+
1508
+ class LazyLoadingSelectComponent {
1509
+ get formControl() {
1510
+ return this.form?.get(this.controlName);
1511
+ }
1512
+ constructor(notificationService, siteSettingsService) {
1513
+ this.notificationService = notificationService;
1514
+ this.siteSettingsService = siteSettingsService;
1515
+ this.standalone = true;
1516
+ this.appearance = 'standard';
1517
+ this.changeField = new EventEmitter();
1518
+ }
1519
+ ngAfterContentInit() {
1520
+ this.options = [this.form?.get(this.controlName)?.value];
1521
+ }
1522
+ getOptions() {
1523
+ if (!this.siteId && this.options.length > 1) {
1524
+ return;
1525
+ }
1526
+ this.optionsPending = true;
1527
+ this.siteSettingsService.getSelectionOptions(this.siteId, this.optionsToken)
1528
+ .subscribe(() => {
1529
+ this.optionsPending = false;
1530
+ // @ts-ignore
1531
+ this.options = this.siteSettingsService[this.optionsToken];
1532
+ }, () => {
1533
+ this.optionsPending = false;
1534
+ // this.notificationService.error(this.translate.instant('COMMON.LOAD_SELECT_OPTIONS_FAILED'));
1535
+ });
1536
+ }
1537
+ onFieldChange(token) {
1538
+ this.changeField.emit(token);
1539
+ }
1540
+ }
1541
+ 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 });
1542
+ LazyLoadingSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: LazyLoadingSelectComponent, selector: "app-lazy-loading-select", inputs: { siteId: "siteId", form: "form", standalone: "standalone", placeholder: "placeholder", controlName: "controlName", optionsToken: "optionsToken", appearance: "appearance", errorCode: "errorCode", errorText: "errorText", default: "default", id: "id" }, outputs: { changeField: "changeField" }, ngImport: i0, template: "<ng-container *ngIf=\"standalone\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select [formControl]=\"formControl\"\r\n (openedChange)=\"getOptions()\"\r\n [placeholder]=\"placeholder\"\r\n (selectionChange)=\"onFieldChange(controlName)\"\r\n [id]=\"id\">\r\n <mat-option *ngIf=\"default\" [disabled]=\"default.disabled\" [value]=\"default.key\">{{default.value}}</mat-option>\r\n <mat-option *ngFor=\"let type of options\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n <mat-progress-spinner class=\"field-spinner\"\r\n [diameter]=\"20\"\r\n mode=\"indeterminate\"\r\n *ngIf=\"optionsPending\"></mat-progress-spinner>\r\n </mat-select>\r\n <mat-error *ngIf=\"form.get(controlName)?.hasError(errorCode)\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n {{errorText}}\r\n </mat-error>\r\n </mat-form-field>\r\n</ng-container>\r\n\r\n<!--\r\nThis duplication is caused by the following bug: https://github.com/angular/components/issues/9411\r\nWhich doesn't allow projection in mat-form-field\r\n-->\r\n\r\n<ng-container *ngIf=\"!standalone\">\r\n <mat-select *ngIf=\"form.get(controlName)\"\r\n [formControl]=\"formControl\"\r\n (openedChange)=\"getOptions()\"\r\n [placeholder]=\"placeholder\"\r\n (selectionChange)=\"onFieldChange(controlName)\"\r\n [id]=\"id\"\r\n >\r\n <mat-option *ngIf=\"default\" [disabled]=\"default.disabled\" [value]=\"default.key\">{{default.value}}</mat-option>\r\n <mat-option *ngFor=\"let type of options\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n <mat-progress-spinner class=\"field-spinner\"\r\n [diameter]=\"20\"\r\n mode=\"indeterminate\"\r\n *ngIf=\"optionsPending\"></mat-progress-spinner>\r\n </mat-select>\r\n <mat-error *ngIf=\"form.get(controlName)?.hasError(errorCode)\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n {{errorText}}\r\n </mat-error>\r\n</ng-container>\r\n", styles: [".field-spinner{margin-top:-30px}mat-form-field{width:300px;max-width:300px}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: i6$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i8.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }] });
1543
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LazyLoadingSelectComponent, decorators: [{
1544
+ type: Component,
1545
+ args: [{ selector: 'app-lazy-loading-select', template: "<ng-container *ngIf=\"standalone\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select [formControl]=\"formControl\"\r\n (openedChange)=\"getOptions()\"\r\n [placeholder]=\"placeholder\"\r\n (selectionChange)=\"onFieldChange(controlName)\"\r\n [id]=\"id\">\r\n <mat-option *ngIf=\"default\" [disabled]=\"default.disabled\" [value]=\"default.key\">{{default.value}}</mat-option>\r\n <mat-option *ngFor=\"let type of options\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n <mat-progress-spinner class=\"field-spinner\"\r\n [diameter]=\"20\"\r\n mode=\"indeterminate\"\r\n *ngIf=\"optionsPending\"></mat-progress-spinner>\r\n </mat-select>\r\n <mat-error *ngIf=\"form.get(controlName)?.hasError(errorCode)\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n {{errorText}}\r\n </mat-error>\r\n </mat-form-field>\r\n</ng-container>\r\n\r\n<!--\r\nThis duplication is caused by the following bug: https://github.com/angular/components/issues/9411\r\nWhich doesn't allow projection in mat-form-field\r\n-->\r\n\r\n<ng-container *ngIf=\"!standalone\">\r\n <mat-select *ngIf=\"form.get(controlName)\"\r\n [formControl]=\"formControl\"\r\n (openedChange)=\"getOptions()\"\r\n [placeholder]=\"placeholder\"\r\n (selectionChange)=\"onFieldChange(controlName)\"\r\n [id]=\"id\"\r\n >\r\n <mat-option *ngIf=\"default\" [disabled]=\"default.disabled\" [value]=\"default.key\">{{default.value}}</mat-option>\r\n <mat-option *ngFor=\"let type of options\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n <mat-progress-spinner class=\"field-spinner\"\r\n [diameter]=\"20\"\r\n mode=\"indeterminate\"\r\n *ngIf=\"optionsPending\"></mat-progress-spinner>\r\n </mat-select>\r\n <mat-error *ngIf=\"form.get(controlName)?.hasError(errorCode)\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n {{errorText}}\r\n </mat-error>\r\n</ng-container>\r\n", styles: [".field-spinner{margin-top:-30px}mat-form-field{width:300px;max-width:300px}\n"] }]
1546
+ }], ctorParameters: function () { return [{ type: NotificationService }, { type: SiteSettingsService }]; }, propDecorators: { siteId: [{
1547
+ type: Input
1548
+ }], form: [{
1549
+ type: Input
1550
+ }], standalone: [{
1551
+ type: Input
1552
+ }], placeholder: [{
1553
+ type: Input
1554
+ }], controlName: [{
1555
+ type: Input
1556
+ }], optionsToken: [{
1557
+ type: Input
1558
+ }], appearance: [{
1559
+ type: Input
1560
+ }], errorCode: [{
1561
+ type: Input
1562
+ }], errorText: [{
1563
+ type: Input
1564
+ }], default: [{
1565
+ type: Input
1566
+ }], id: [{
1567
+ type: Input
1568
+ }], changeField: [{
1569
+ type: Output
1570
+ }] } });
1571
+
1572
+ var EntityChangeType;
1573
+ (function (EntityChangeType) {
1574
+ EntityChangeType["added"] = "added";
1575
+ EntityChangeType["updated"] = "updated";
1576
+ EntityChangeType["existing"] = "existing";
1577
+ EntityChangeType["removed"] = "removed";
1578
+ EntityChangeType["unassociated"] = "unassociated";
1579
+ })(EntityChangeType || (EntityChangeType = {}));
1580
+ var DnRangeType;
1581
+ (function (DnRangeType) {
1582
+ DnRangeType["extension"] = "EXTENSION";
1583
+ DnRangeType["cpg"] = "CPG";
1584
+ DnRangeType["callpark"] = "CALLPARK";
1585
+ DnRangeType["huntgroup"] = "HUNTGROUP";
1586
+ DnRangeType["meetme"] = "MEETME";
1587
+ DnRangeType["did"] = "DID";
1588
+ })(DnRangeType || (DnRangeType = {}));
1589
+
1590
+ // import * as Big from 'big.js';
1591
+ class DnsService {
1592
+ constructor(apiService) {
1593
+ this.apiService = apiService;
1594
+ this.availableNumbers = {};
1595
+ }
1596
+ getNumberRange(siteId, routePartition, withdids, from, pageSize) {
1597
+ // @ts-ignore
1598
+ if (this.availableNumbers[routePartition] && this.availableNumbers[routePartition].length) {
1599
+ return new Observable(observer => {
1600
+ // @ts-ignore
1601
+ observer.next(this.availableNumbers[routePartition]);
1602
+ });
1603
+ }
1604
+ this.availableDidPatternsMappedToDn = {};
1605
+ pageSize = pageSize ? pageSize : 20;
1606
+ const params = { dntype: DnRangeType.extension, routepartition: routePartition, size: pageSize, page: 0 };
1607
+ if (withdids) {
1608
+ // @ts-ignore
1609
+ params['withdids'] = 'true';
1610
+ }
1611
+ if (from) {
1612
+ // @ts-ignore
1613
+ params['from'] = from;
1614
+ }
1615
+ // @ts-ignore
1616
+ this.availableNumbers[routePartition] = this.availableNumbers[routePartition] || [];
1617
+ return this.apiService.fetch(API.AVAILABLE_DN_IN_RANGES.replace(':siteId', siteId), params)
1618
+ .pipe(map((res) => {
1619
+ res.availableNumberList.forEach((availableNumber) => {
1620
+ this.setAvailableDidMappedToDn(availableNumber);
1621
+ // @ts-ignore
1622
+ this.availableNumbers[routePartition] = [...this.availableNumbers[routePartition], ...this.getUnwrapNumberRange(availableNumber)];
1623
+ });
1624
+ }));
1625
+ // .pipe(this.handleError(true, false));
1626
+ }
1627
+ setAvailableDidMappedToDn(availableNumber) {
1628
+ if (availableNumber.unUsedNumbersWithDids && availableNumber.unUsedNumbersWithDids.length) {
1629
+ availableNumber.unUsedNumbersWithDids.forEach((numberWithDids) => {
1630
+ const dn = numberWithDids['unUsedNumber'];
1631
+ this.availableDidPatternsMappedToDn[dn] = [{}];
1632
+ if (numberWithDids['translationPatternList'] && numberWithDids['translationPatternList'].length > 0) {
1633
+ this.availableDidPatternsMappedToDn[dn] = numberWithDids['translationPatternList'];
1634
+ this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = [{}];
1635
+ if (numberWithDids['mappedDids'] && numberWithDids['mappedDids'].length > 0) {
1636
+ this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = numberWithDids['mappedDids'];
1637
+ }
1638
+ }
1639
+ this.availableDidPatternsMappedToDn[dn][0]['vm'] = numberWithDids['vm'];
1640
+ });
1641
+ }
1642
+ }
1643
+ getUnwrapNumberRange(availableNumber) {
1644
+ const unwrapNumberRangeArray = this.unwrapNumberRange(availableNumber.phoneNumberRange.from, availableNumber.phoneNumberRange.to);
1645
+ if (unwrapNumberRangeArray?.length) {
1646
+ let unwrapNumberRange = unwrapNumberRangeArray.map((unwrappedNumber) => {
1647
+ const dn = availableNumber.phoneNumberRange.prefix + unwrappedNumber;
1648
+ let str = dn;
1649
+ if (this.availableDidPatternsMappedToDn[dn] && this.availableDidPatternsMappedToDn[dn].length > 0) {
1650
+ if (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] && this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 0) {
1651
+ str += ' DID: ' + (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 1 ? 'multiple' :
1652
+ this.availableDidPatternsMappedToDn[dn][0]['mappedDids'][0]);
1653
+ }
1654
+ if (this.availableDidPatternsMappedToDn[dn][0]['vm']) {
1655
+ str += ' In Use - VM';
1656
+ }
1657
+ }
1658
+ return str;
1659
+ });
1660
+ unwrapNumberRange = unwrapNumberRange.filter((unwrappedNumber) => !availableNumber.usedNumbers.includes(unwrappedNumber));
1661
+ return unwrapNumberRange;
1662
+ }
1663
+ else {
1664
+ return [];
1665
+ }
1666
+ }
1667
+ unwrapNumberRange(start, end) {
1668
+ const regExp = /(^0+)/;
1669
+ let leadingZeros = '';
1670
+ const matches = start.match(regExp);
1671
+ if (matches) {
1672
+ leadingZeros = matches[1];
1673
+ }
1674
+ const startNumeric = new Big(start);
1675
+ const endNumeric = new Big(end);
1676
+ // @ts-ignore
1677
+ return Array.from({ length: (endNumeric.minus(startNumeric).plus(new Big(1)).toFixed(0)) }, (v, k) => {
1678
+ const number = String(startNumeric.plus(new Big(k)).toFixed(0));
1679
+ if ((leadingZeros + number).length > start.length) {
1680
+ leadingZeros = leadingZeros.substr(1);
1681
+ }
1682
+ return leadingZeros + number;
1683
+ });
1684
+ }
1685
+ }
1686
+ DnsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService, deps: [{ token: APIService }], target: i0.ɵɵFactoryTarget.Injectable });
1687
+ DnsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService });
1688
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService, decorators: [{
1689
+ type: Injectable
1690
+ }], ctorParameters: function () { return [{ type: APIService }]; } });
1691
+
1692
+ class UserCallingExtensionComponent {
1693
+ get user() {
1694
+ return this.userService.user;
1695
+ }
1696
+ get availableNumbers() {
1697
+ // @ts-ignore
1698
+ return this.routePartition && this.dnsService.availableNumbers ? this.dnsService.availableNumbers[this.routePartition] : null;
1699
+ }
1700
+ constructor(userService, dnsService) {
1701
+ this.userService = userService;
1702
+ this.dnsService = dnsService;
1703
+ this.onChange = new EventEmitter();
1704
+ }
1705
+ ngOnInit() {
1706
+ this.getData();
1707
+ }
1708
+ onChangeField(event) {
1709
+ // if (!token) {
1710
+ // return;
1711
+ // }
1712
+ // (this.userService.user as any)[token] = this.form?.get(token)?.value;
1713
+ this.onChange.emit(event?.value);
1714
+ }
1715
+ getData() {
1716
+ if (!this.siteId || !this.routePartition) {
1717
+ return;
1718
+ }
1719
+ this.dataPending = true;
1720
+ this.dnsService.getNumberRange(String(this.siteId), this.routePartition)
1721
+ .subscribe(() => {
1722
+ if (this.availableNumbers) {
1723
+ // @ts-ignore
1724
+ this.dnsService.availableNumbers[this.routePartition].push(this.directoryNumber);
1725
+ }
1726
+ this.dataPending = false;
1727
+ });
1728
+ }
1729
+ }
1730
+ 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 });
1731
+ UserCallingExtensionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserCallingExtensionComponent, selector: "app-user-calling-extension", inputs: { control: "control", routePartition: "routePartition", directoryNumber: "directoryNumber", siteId: "siteId" }, outputs: { onChange: "onChange" }, ngImport: i0, template: "<div *ngIf=\"this.availableNumbers?.length\" class=\"user-calling-extension\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select [formControl]=\"control\" name=\"extension\"\r\n (selectionChange)=\"this.onChangeField($event)\">\r\n <mat-option *ngFor=\"let option of this.availableNumbers; let i = index;\"[value]=\"option\">{{option}}</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n <mat-spinner *ngIf=\"this.dataPending\" [diameter]=\"50\"></mat-spinner>\r\n</div>\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.user-calling-extension{max-width:200px;margin:0 0 0 6px}.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-webex-user{background-image:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22a%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 16.67 15.56%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%232c355d%3Bstroke-width%3A1.4px%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath class%3D%22b%22 d%3D%22M4.87%2C3.89c0-1.72%2C1.51-3.19%2C3.47-3.19s3.47%2C1.47%2C3.47%2C3.19-1.51%2C3.19-3.47%2C3.19-3.47-1.47-3.47-3.19ZM.7%2C12.64c0-.37%2C.19-.76%2C.67-1.17%2C.48-.41%2C1.17-.78%2C2-1.09%2C1.66-.62%2C3.66-.93%2C4.97-.93s3.31%2C.31%2C4.97%2C.93c.83%2C.31%2C1.52%2C.68%2C2%2C1.09%2C.47%2C.41%2C.67%2C.8%2C.67%2C1.17v2.22H.7v-2.22Z%22%2F%3E%3C%2Fsvg%3E\")}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:95%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:gray!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.spinner-container{width:100%;display:flex;justify-content:center;align-items:center}.spinner-container ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#000}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}table{border-collapse:collapse;border-spacing:0}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}.mat-divider{margin:12px 0}::ng-deep .mat-form-field-wrapper{height:30px}::ng-deep .mat-form-field-flex{height:30px}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{height:35px}:ng-deep .mat-form-field-outline .mat-form-field-outline-thick{height:35px}::ng-deep .mat-select{line-height:20px}::ng-deep .mat-form-field-infix{border-top:0px!important}::ng-deep .mat-tab-group{font-family:Inter,sans-serif}::ng-deep .mat-tab-label{font-weight:500!important;font-size:16px!important;height:auto!important;min-width:auto!important;padding:0!important;opacity:1!important;color:#000!important}::ng-deep .mat-ink-bar{background-color:#000!important;height:3px!important}::ng-deep .mat-tab-labels{gap:30px}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i8.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }] });
1732
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCallingExtensionComponent, decorators: [{
1733
+ type: Component,
1734
+ args: [{ selector: 'app-user-calling-extension', template: "<div *ngIf=\"this.availableNumbers?.length\" class=\"user-calling-extension\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select [formControl]=\"control\" name=\"extension\"\r\n (selectionChange)=\"this.onChangeField($event)\">\r\n <mat-option *ngFor=\"let option of this.availableNumbers; let i = index;\"[value]=\"option\">{{option}}</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n <mat-spinner *ngIf=\"this.dataPending\" [diameter]=\"50\"></mat-spinner>\r\n</div>\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.user-calling-extension{max-width:200px;margin:0 0 0 6px}.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-webex-user{background-image:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22a%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 16.67 15.56%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%232c355d%3Bstroke-width%3A1.4px%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath class%3D%22b%22 d%3D%22M4.87%2C3.89c0-1.72%2C1.51-3.19%2C3.47-3.19s3.47%2C1.47%2C3.47%2C3.19-1.51%2C3.19-3.47%2C3.19-3.47-1.47-3.47-3.19ZM.7%2C12.64c0-.37%2C.19-.76%2C.67-1.17%2C.48-.41%2C1.17-.78%2C2-1.09%2C1.66-.62%2C3.66-.93%2C4.97-.93s3.31%2C.31%2C4.97%2C.93c.83%2C.31%2C1.52%2C.68%2C2%2C1.09%2C.47%2C.41%2C.67%2C.8%2C.67%2C1.17v2.22H.7v-2.22Z%22%2F%3E%3C%2Fsvg%3E\")}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:95%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:gray!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.spinner-container{width:100%;display:flex;justify-content:center;align-items:center}.spinner-container ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#000}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}table{border-collapse:collapse;border-spacing:0}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}.mat-divider{margin:12px 0}::ng-deep .mat-form-field-wrapper{height:30px}::ng-deep .mat-form-field-flex{height:30px}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{height:35px}:ng-deep .mat-form-field-outline .mat-form-field-outline-thick{height:35px}::ng-deep .mat-select{line-height:20px}::ng-deep .mat-form-field-infix{border-top:0px!important}::ng-deep .mat-tab-group{font-family:Inter,sans-serif}::ng-deep .mat-tab-label{font-weight:500!important;font-size:16px!important;height:auto!important;min-width:auto!important;padding:0!important;opacity:1!important;color:#000!important}::ng-deep .mat-ink-bar{background-color:#000!important;height:3px!important}::ng-deep .mat-tab-labels{gap:30px}\n"] }]
1735
+ }], ctorParameters: function () { return [{ type: UserService }, { type: DnsService }]; }, propDecorators: { control: [{
1736
+ type: Input
1737
+ }], routePartition: [{
1738
+ type: Input
1739
+ }], directoryNumber: [{
1740
+ type: Input
1741
+ }], siteId: [{
1742
+ type: Input
1743
+ }], onChange: [{
1744
+ type: Output
1745
+ }] } });
1746
+
1747
+ class UserCallingComponent {
1748
+ get form() {
1749
+ return this.userService?.user?.devices[0] && this.userService?.user?.devices[0].lineAssociations[0].form;
1750
+ }
1751
+ get formControl() {
1752
+ const control = this.form?.get('directoryNumber');
1753
+ return control;
1754
+ }
1755
+ get lineAssociation() {
1756
+ return this.userService?.user?.devices[0].lineAssociations[0];
1757
+ }
1758
+ get user() {
1759
+ return this.userService.user;
1760
+ }
1761
+ constructor(userService, dnsService) {
1762
+ this.userService = userService;
1763
+ this.dnsService = dnsService;
1764
+ this.onExtensionChange = new EventEmitter();
1765
+ }
1766
+ ngOnInit() {
1767
+ // this.getData();
1768
+ }
1769
+ onDirectoryNumberChange(value) {
1770
+ if (this.lineAssociation && this.lineAssociation.directoryNumber) {
1771
+ // @ts-ignore
1772
+ this.userService.user.devices[0].lineAssociations[0].directoryNumber.directoryNumber = value;
1773
+ this.onExtensionChange.next(true);
1774
+ }
1775
+ }
1776
+ onChangeField(token) {
1777
+ if (!token) {
1778
+ return;
1779
+ }
1780
+ this.userService.user[token] = this.form?.get(token)?.value;
1781
+ }
1782
+ toggleEditMode() {
1783
+ this.userService.user.toggleEditMode();
1784
+ }
1785
+ isSavingDisabled() {
1786
+ return !this.userService.hasUnsavedChanges() || this.userService.hasExistedUserId;
1787
+ }
1788
+ onChangeExtension(value) {
1789
+ if (this.lineAssociation && this.lineAssociation.directoryNumber) {
1790
+ // @ts-ignore
1791
+ this.userService.user.devices[0].lineAssociations[0].directoryNumber.directoryNumber = value;
1792
+ }
1793
+ }
1794
+ getData() {
1795
+ this.dataPending = true;
1796
+ this.dnsService.getNumberRange(String(this.siteId), this.userId)
1797
+ .subscribe({
1798
+ complete: (v) => {
1799
+ this.dataPending = false;
1800
+ },
1801
+ error: (e) => this.dataPending = false,
1802
+ });
1803
+ }
1804
+ }
1805
+ 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 });
1806
+ UserCallingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserCallingComponent, selector: "app-user-calling", inputs: { siteId: "siteId", userId: "userId" }, outputs: { onExtensionChange: "onExtensionChange" }, ngImport: i0, template: "<div id=\"user-calling\" class=\"info-boxes-container\" *ngIf=\"siteId && lineAssociation && form\" [formGroup]=\"form\">\r\n <!-- USER INFO BOX-->\r\n <div class=\"user-info-box user-details-box\">\r\n <h3 class=\"user-box-title\">Numbers</h3>\r\n <div class=\"form-holder__inputs\">\r\n <h4>Directory Number</h4>\r\n <table>\r\n <tr>\r\n <th>Type</th>\r\n <th>Number</th>\r\n <th>Extension</th>\r\n </tr>\r\n <tr >\r\n <td></td>\r\n <td></td>\r\n <td>\r\n <app-user-calling-extension\r\n *ngIf=\"formControl\"\r\n [siteId]=\"this.siteId\"\r\n [control]=\"formControl\"\r\n [routePartition]=\"this.lineAssociation?.directoryNumber?.routePartitionName\"\r\n [directoryNumber]=\"this.lineAssociation?.directoryNumber?.directoryNumber\"\r\n (onChange)=\"onDirectoryNumberChange($event)\">\r\n </app-user-calling-extension>\r\n\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";#user-calling{height:calc(100vh - 100px)}#user-calling table{margin:10px 0;width:100%}#user-calling th{color:#000;text-align:left;background:#efefef;font-size:14px;font-weight:500;padding:2px 5px}.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-webex-user{background-image:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22a%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 16.67 15.56%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%232c355d%3Bstroke-width%3A1.4px%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath class%3D%22b%22 d%3D%22M4.87%2C3.89c0-1.72%2C1.51-3.19%2C3.47-3.19s3.47%2C1.47%2C3.47%2C3.19-1.51%2C3.19-3.47%2C3.19-3.47-1.47-3.47-3.19ZM.7%2C12.64c0-.37%2C.19-.76%2C.67-1.17%2C.48-.41%2C1.17-.78%2C2-1.09%2C1.66-.62%2C3.66-.93%2C4.97-.93s3.31%2C.31%2C4.97%2C.93c.83%2C.31%2C1.52%2C.68%2C2%2C1.09%2C.47%2C.41%2C.67%2C.8%2C.67%2C1.17v2.22H.7v-2.22Z%22%2F%3E%3C%2Fsvg%3E\")}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:95%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:gray!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.spinner-container{width:100%;display:flex;justify-content:center;align-items:center}.spinner-container ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#000}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important;line-height:35px!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}table{border-collapse:collapse;border-spacing:0}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}.mat-divider{margin:12px 0}::ng-deep .mat-form-field-wrapper{height:30px}::ng-deep .mat-form-field-flex{height:30px}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{height:35px}:ng-deep .mat-form-field-outline .mat-form-field-outline-thick{height:35px}::ng-deep .mat-select{line-height:20px}::ng-deep .mat-form-field-infix{border-top:0px!important}::ng-deep .mat-tab-group{font-family:Inter,sans-serif}::ng-deep .mat-tab-label{font-weight:500!important;font-size:16px!important;height:auto!important;min-width:auto!important;padding:0!important;opacity:1!important;color:#000!important}::ng-deep .mat-ink-bar{background-color:#000!important;height:3px!important}::ng-deep .mat-tab-labels{gap:30px}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: UserCallingExtensionComponent, selector: "app-user-calling-extension", inputs: ["control", "routePartition", "directoryNumber", "siteId"], outputs: ["onChange"] }] });
1807
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserCallingComponent, decorators: [{
1808
+ type: Component,
1809
+ args: [{ selector: 'app-user-calling', template: "<div id=\"user-calling\" class=\"info-boxes-container\" *ngIf=\"siteId && lineAssociation && form\" [formGroup]=\"form\">\r\n <!-- USER INFO BOX-->\r\n <div class=\"user-info-box user-details-box\">\r\n <h3 class=\"user-box-title\">Numbers</h3>\r\n <div class=\"form-holder__inputs\">\r\n <h4>Directory Number</h4>\r\n <table>\r\n <tr>\r\n <th>Type</th>\r\n <th>Number</th>\r\n <th>Extension</th>\r\n </tr>\r\n <tr >\r\n <td></td>\r\n <td></td>\r\n <td>\r\n <app-user-calling-extension\r\n *ngIf=\"formControl\"\r\n [siteId]=\"this.siteId\"\r\n [control]=\"formControl\"\r\n [routePartition]=\"this.lineAssociation?.directoryNumber?.routePartitionName\"\r\n [directoryNumber]=\"this.lineAssociation?.directoryNumber?.directoryNumber\"\r\n (onChange)=\"onDirectoryNumberChange($event)\">\r\n </app-user-calling-extension>\r\n\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";#user-calling{height:calc(100vh - 100px)}#user-calling table{margin:10px 0;width:100%}#user-calling th{color:#000;text-align:left;background:#efefef;font-size:14px;font-weight:500;padding:2px 5px}.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-webex-user{background-image:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22a%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 16.67 15.56%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%232c355d%3Bstroke-width%3A1.4px%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath class%3D%22b%22 d%3D%22M4.87%2C3.89c0-1.72%2C1.51-3.19%2C3.47-3.19s3.47%2C1.47%2C3.47%2C3.19-1.51%2C3.19-3.47%2C3.19-3.47-1.47-3.47-3.19ZM.7%2C12.64c0-.37%2C.19-.76%2C.67-1.17%2C.48-.41%2C1.17-.78%2C2-1.09%2C1.66-.62%2C3.66-.93%2C4.97-.93s3.31%2C.31%2C4.97%2C.93c.83%2C.31%2C1.52%2C.68%2C2%2C1.09%2C.47%2C.41%2C.67%2C.8%2C.67%2C1.17v2.22H.7v-2.22Z%22%2F%3E%3C%2Fsvg%3E\")}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:95%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:gray!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.spinner-container{width:100%;display:flex;justify-content:center;align-items:center}.spinner-container ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#000}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important;line-height:35px!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}table{border-collapse:collapse;border-spacing:0}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}.mat-divider{margin:12px 0}::ng-deep .mat-form-field-wrapper{height:30px}::ng-deep .mat-form-field-flex{height:30px}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{height:35px}:ng-deep .mat-form-field-outline .mat-form-field-outline-thick{height:35px}::ng-deep .mat-select{line-height:20px}::ng-deep .mat-form-field-infix{border-top:0px!important}::ng-deep .mat-tab-group{font-family:Inter,sans-serif}::ng-deep .mat-tab-label{font-weight:500!important;font-size:16px!important;height:auto!important;min-width:auto!important;padding:0!important;opacity:1!important;color:#000!important}::ng-deep .mat-ink-bar{background-color:#000!important;height:3px!important}::ng-deep .mat-tab-labels{gap:30px}\n"] }]
1810
+ }], ctorParameters: function () { return [{ type: UserService }, { type: DnsService }]; }, propDecorators: { siteId: [{
1811
+ type: Input
1812
+ }], userId: [{
1813
+ type: Input
1814
+ }], onExtensionChange: [{
1815
+ type: Output
1816
+ }] } });
1817
+
1818
+ class DeviceListComponent {
1819
+ constructor() {
1820
+ this.onDeviceSelect = new EventEmitter();
1821
+ console.log('devices list');
1822
+ }
1823
+ selectDevice(device) {
1824
+ this.onDeviceSelect.emit(device);
1825
+ }
1826
+ }
1827
+ DeviceListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1828
+ DeviceListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DeviceListComponent, selector: "app-device-list", inputs: { devices: "devices" }, outputs: { onDeviceSelect: "onDeviceSelect" }, ngImport: i0, template: "<div class=\"webex-list device-list-container\">\r\n <div class=\"webex-list-header\">\r\n <div class=\"webex-list-header__hr\">Name</div>\r\n <div class=\"webex-list-header__hr\">Type</div>\r\n <div class=\"webex-list-header__hr\">Line</div>\r\n <div class=\"webex-list-header__hr\">Device description</div>\r\n <div class=\"webex-list-header__hr\">Plar service</div>\r\n </div>\r\n <ng-container *ngFor=\"let device of devices\">\r\n <div class=\"device-item\" (click)=\"selectDevice(device)\">\r\n <div class=\"device-item__td\">{{ device.name }}</div>\r\n <div class=\"device-item__td\">{{ device.deviceType }}</div>\r\n <div class=\"device-item__td\">\r\n <span class=\"device-associated-line\" *ngFor=\"let line of device.lineAssociations\">{{line.directoryNumber?.directoryNumber}} | </span>\r\n </div>\r\n <div class=\"device-item__td\">{{ device.description }}</div>\r\n <div class=\"device-item__td\">\r\n <mat-slide-toggle class=\"device-slide-toggle\" [disabled]=\"true\" [checked]=\"device.plarService\"></mat-slide-toggle>\r\n </div>\r\n <div class=\"device-item__actions-menu\" style=\"text-align: right;\">\r\n <div class=\"device-item__more\">\r\n<!-- <mat-icon>more_vert</mat-icon>-->\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n</div>\r\n", styles: [".info-holder{display:flex;gap:16px;align-items:center;font-family:Inter,sans-serif;height:102px;width:100%;background:white;margin:0 0 30px}.info-holder__user-image img{width:40px;border-radius:120px;margin:20px 0 0}.info-holder__user-information{padding:10px;margin:10px;gap:10px;display:flex;flex-direction:column}.info-holder__user-name{font-size:20px;font-weight:500}.info-holder__user-breadcrumbs{display:flex;gap:8px;font-weight:400;font-size:14px;color:#000000b3;align-items:center}.info-holder .icon-separator{height:5px;width:5px;background-color:#000000b3;border-radius:50%}.info-holder .is-active{display:flex;gap:8px;align-items:center}.icon-user-status{width:.5rem;height:.5rem;border-radius:50%;background-color:#707070;margin:0 5px 0 0}.icon-user-status.icon-user-status-active{background-color:#1d805f;display:inline-block}.webex-list{padding:2.5rem}.webex-list-header{display:flex;align-items:center;padding:1rem}.webex-list-header__hr{width:100%;font-size:12px}.device-item{position:relative;display:flex;align-items:center;justify-content:space-between;background-color:#fff;border-bottom:1px solid #b0b0b0;padding:.8rem;z-index:10;transition:background-color .3s;cursor:pointer}.device-item__td{width:100%}.device-item__actions-menu{position:absolute;margin:0 1rem;right:0}.device-item__more{display:flex;align-items:center;justify-content:center;cursor:pointer;color:#b0b0b0;border-radius:50%;padding:.5rem;transition:background-color .3s ease-in-out}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }] });
1829
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceListComponent, decorators: [{
1830
+ type: Component,
1831
+ args: [{ selector: 'app-device-list', template: "<div class=\"webex-list device-list-container\">\r\n <div class=\"webex-list-header\">\r\n <div class=\"webex-list-header__hr\">Name</div>\r\n <div class=\"webex-list-header__hr\">Type</div>\r\n <div class=\"webex-list-header__hr\">Line</div>\r\n <div class=\"webex-list-header__hr\">Device description</div>\r\n <div class=\"webex-list-header__hr\">Plar service</div>\r\n </div>\r\n <ng-container *ngFor=\"let device of devices\">\r\n <div class=\"device-item\" (click)=\"selectDevice(device)\">\r\n <div class=\"device-item__td\">{{ device.name }}</div>\r\n <div class=\"device-item__td\">{{ device.deviceType }}</div>\r\n <div class=\"device-item__td\">\r\n <span class=\"device-associated-line\" *ngFor=\"let line of device.lineAssociations\">{{line.directoryNumber?.directoryNumber}} | </span>\r\n </div>\r\n <div class=\"device-item__td\">{{ device.description }}</div>\r\n <div class=\"device-item__td\">\r\n <mat-slide-toggle class=\"device-slide-toggle\" [disabled]=\"true\" [checked]=\"device.plarService\"></mat-slide-toggle>\r\n </div>\r\n <div class=\"device-item__actions-menu\" style=\"text-align: right;\">\r\n <div class=\"device-item__more\">\r\n<!-- <mat-icon>more_vert</mat-icon>-->\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n</div>\r\n", styles: [".info-holder{display:flex;gap:16px;align-items:center;font-family:Inter,sans-serif;height:102px;width:100%;background:white;margin:0 0 30px}.info-holder__user-image img{width:40px;border-radius:120px;margin:20px 0 0}.info-holder__user-information{padding:10px;margin:10px;gap:10px;display:flex;flex-direction:column}.info-holder__user-name{font-size:20px;font-weight:500}.info-holder__user-breadcrumbs{display:flex;gap:8px;font-weight:400;font-size:14px;color:#000000b3;align-items:center}.info-holder .icon-separator{height:5px;width:5px;background-color:#000000b3;border-radius:50%}.info-holder .is-active{display:flex;gap:8px;align-items:center}.icon-user-status{width:.5rem;height:.5rem;border-radius:50%;background-color:#707070;margin:0 5px 0 0}.icon-user-status.icon-user-status-active{background-color:#1d805f;display:inline-block}.webex-list{padding:2.5rem}.webex-list-header{display:flex;align-items:center;padding:1rem}.webex-list-header__hr{width:100%;font-size:12px}.device-item{position:relative;display:flex;align-items:center;justify-content:space-between;background-color:#fff;border-bottom:1px solid #b0b0b0;padding:.8rem;z-index:10;transition:background-color .3s;cursor:pointer}.device-item__td{width:100%}.device-item__actions-menu{position:absolute;margin:0 1rem;right:0}.device-item__more{display:flex;align-items:center;justify-content:center;cursor:pointer;color:#b0b0b0;border-radius:50%;padding:.5rem;transition:background-color .3s ease-in-out}\n"] }]
1832
+ }], ctorParameters: function () { return []; }, propDecorators: { devices: [{
1833
+ type: Input
1834
+ }], onDeviceSelect: [{
1835
+ type: Output
1836
+ }] } });
1837
+
1838
+ class UserManageWidgetComponent {
1839
+ get form() {
1840
+ return this.userService?.user?.form;
1841
+ }
1842
+ get user() {
1843
+ return this.userService.user;
1844
+ }
1845
+ get userName() {
1846
+ return `${this.user?.firstName || ''} ${this.user?.lastName || ''}`;
1847
+ }
1848
+ get lineAssociation() {
1849
+ return this.userService?.user?.devices[0].lineAssociations[0];
1850
+ }
1851
+ constructor(userService, apiService) {
1852
+ this.userService = userService;
1853
+ this.apiService = apiService;
1854
+ this.onSave = new EventEmitter();
1855
+ this.onChange = new EventEmitter();
1856
+ this.selectDevice = new EventEmitter();
1857
+ this.goBack = new EventEmitter();
1858
+ this.userService.onUserLineSaved$
1859
+ .subscribe(() => {
1860
+ this.userService.persistCacheChanges()
1861
+ .subscribe(() => {
1862
+ this.userService.dataPending = false;
1863
+ this.onSave.next("saved");
1864
+ });
1865
+ }, () => this.userService.dataPending = false);
1866
+ }
1867
+ ngOnInit() {
1868
+ this.apiService.token = this.token;
1869
+ this.apiService.apiUrl = this.host;
1870
+ this.getData();
1871
+ }
1872
+ onDeviceSelect(device) {
1873
+ this.selectDevice.emit(device.name);
1874
+ }
1875
+ onGoBack() {
1876
+ this.goBack.emit();
1877
+ }
1878
+ onExtensionChange() {
1879
+ this.onChange.next("start extension change..");
1880
+ }
1881
+ onChangeField(token) {
1882
+ this.onChange.next("start change..");
1883
+ if (!token) {
1884
+ return;
1885
+ }
1886
+ this.userService.user[token] = this.form?.get(token)?.value;
1887
+ if (token === 'middleName') {
1888
+ this.form?.get(token)?.setValidators([Validators.pattern('[ a-zA-Z-]+')]);
1889
+ }
1890
+ if (token === 'telephoneNumber' || token === 'mobileNumber' || token === 'pagerNumber' || token === 'homeNumber') {
1891
+ this.form?.get(token)?.setValidators([Validators.pattern('[ 0-9-+]+')]);
1892
+ }
1893
+ this.form?.get(token)?.updateValueAndValidity();
1894
+ this.validateUserId();
1895
+ }
1896
+ saveChanges() {
1897
+ if (!this.userService.hasUnsavedChanges() || this.form?.invalid) {
1898
+ return;
1899
+ }
1900
+ if (this.user.devices[0].lineAssociations[0] && !this.user.devices[0].lineAssociations[0].equals(this.userService.originUser.devices[0].lineAssociations[0])) {
1901
+ return this.userService.saveNewLine();
1902
+ }
1903
+ else {
1904
+ this.dataPending = true;
1905
+ const subscription = this.userService.persistCacheChanges()
1906
+ .subscribe(() => {
1907
+ this.dataPending = false;
1908
+ this.onSave.next("user has been saved successfully..");
1909
+ subscription.unsubscribe();
1910
+ }, () => this.dataPending = false);
1911
+ }
1912
+ }
1913
+ toggleEditMode() {
1914
+ this.userService.user.toggleEditMode();
1915
+ }
1916
+ isSavingDisabled() {
1917
+ return !this.userService.hasUnsavedChanges() || this.userService.hasExistedUserId;
1918
+ }
1919
+ changeField(token) {
1920
+ this.onChange.next("start change..");
1921
+ const formField = this.user?.form?.get(token);
1922
+ if (token !== 'confirmDigestCredentials') {
1923
+ // @ts-ignore
1924
+ this.user[token] = formField?.value;
1925
+ }
1926
+ if (token === 'digestCredentials' || token === 'confirmDigestCredentials') {
1927
+ this.digestCredentialsHandler(token, formField);
1928
+ }
1929
+ }
1930
+ digestCredentialsHandler(token, field) {
1931
+ const fieldNameToCompare = token === 'digestCredentials' ? 'confirmDigestCredentials' : 'digestCredentials';
1932
+ const fieldToCompare = this.userService.user.form.get(fieldNameToCompare);
1933
+ if (this.userService.user?.form?.get(token)) {
1934
+ this.userService.user?.form?.get(token)?.setErrors(null);
1935
+ this.userService.user?.form?.get(fieldNameToCompare)?.setErrors(null);
1936
+ /* if (!field.value && !fieldToCompare.value) {
1937
+ this.userService.user?.digestCredentials = null;
1938
+ return;
1939
+ }
1940
+
1941
+ if (!field.value && fieldToCompare.value || !fieldToCompare.value && field.value) {
1942
+ const requiredFieldName = field.value ? fieldNameToCompare : token;
1943
+ this.userService.user.form.get(requiredFieldName).setErrors({required: true});
1944
+ return;
1945
+ }
1946
+ if (field.value && fieldToCompare.value && field.value !== fieldToCompare.value) {
1947
+ this.userService.user.form.get(token).setErrors({mismatch: true});
1948
+ this.userService.user.form.get(fieldNameToCompare).setErrors({mismatch: true});
1949
+ }*/
1950
+ }
1951
+ }
1952
+ getData() {
1953
+ this.dataPending = true;
1954
+ this.userService.fetchUserToken(this.siteId, this.userId, this.isLdap)
1955
+ .subscribe({
1956
+ complete: (v) => {
1957
+ this.dataPending = false;
1958
+ },
1959
+ error: (e) => this.dataPending = false,
1960
+ });
1961
+ }
1962
+ setCookie(name, value, days) {
1963
+ var expires = "";
1964
+ if (days) {
1965
+ var date = new Date();
1966
+ date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
1967
+ expires = "; expires=" + date.toUTCString();
1968
+ }
1969
+ document.cookie = name + "=" + (value || "") + expires + "; path=/";
1970
+ }
1971
+ validateUserId() {
1972
+ const idControl = this.form.get('userid');
1973
+ if (idControl?.value !== '' && idControl?.value !== this.userService.originUser.userid) {
1974
+ this.userService.fetchUserById(idControl?.value)
1975
+ .subscribe((res) => {
1976
+ this.userService.userIdExistPending = false;
1977
+ idControl?.setErrors({ exist: true });
1978
+ if (this.form?.get('userid')?.hasError('exist')) {
1979
+ this.userService.hasExistedUserId = true;
1980
+ }
1981
+ else {
1982
+ this.userService.hasExistedUserId = false;
1983
+ }
1984
+ }, ((error) => {
1985
+ this.userService.userIdExistPending = false;
1986
+ if (error.status !== 404) {
1987
+ // this.notificationService.warning(this.translate.instant('APP_USER_MSG.CHECK_USER_ID_FAILED'));
1988
+ }
1989
+ else {
1990
+ this.userService.user.newUserId = this.form?.get('userid')?.value;
1991
+ }
1992
+ }));
1993
+ }
1994
+ else {
1995
+ // delete this.userService?.user?.newUserId;
1996
+ }
1997
+ }
1998
+ save() {
1999
+ this.saveChanges();
2000
+ }
2001
+ }
2002
+ 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 });
2003
+ UserManageWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UserManageWidgetComponent, selector: "app-user-manage-widget", inputs: { token: "token", host: "host", siteId: "siteId", userId: "userId", deviceName: "deviceName", isLdap: "isLdap" }, outputs: { onSave: "onSave", onChange: "onChange", selectDevice: "selectDevice", goBack: "goBack" }, ngImport: i0, template: "<app-loader *ngIf=\"dataPending || userService.dataPending\"></app-loader>\r\n\r\n<div *ngIf=\"!dataPending\">\r\n <div class=\"go-back-box\" (click)=\"onGoBack()\">\r\n <div class=\"go-back-box-container\">\r\n <span class=\"app-icon icon-webex-left-arrow\"></span>\r\n <span class=\"go-back-title\">Users</span>\r\n </div>\r\n </div>\r\n\r\n <app-user-info *ngIf=\"user\" [name]=\"userName\" [email]=\"user.email\" [active]=\"true\"\r\n [position]=\"'Member of ' + user.siteName\"></app-user-info>\r\n\r\n <mat-tab-group disableRipple class=\"content-box\">\r\n <mat-tab label=\"Profile\">\r\n <ng-container *ngTemplateOutlet=\"userProfile\">\r\n </ng-container>\r\n </mat-tab>\r\n <mat-tab label=\"Calling\" [disabled]=\"!lineAssociation\">\r\n <app-user-calling *ngIf=\"lineAssociation\" [siteId]=\"siteId\"\r\n (onExtensionChange)=\"onExtensionChange()\"></app-user-calling>\r\n </mat-tab>\r\n <mat-tab label=\"Devices\">\r\n <app-device-list [devices]=\"user?.devices\" (onDeviceSelect)=\"onDeviceSelect($event)\"></app-device-list>\r\n </mat-tab>\r\n <mat-tab label=\"Lines\" [disabled]=\"true\"></mat-tab>\r\n <mat-tab label=\"Features\" [disabled]=\"true\"></mat-tab>\r\n </mat-tab-group>\r\n\r\n <ng-template #userProfile>\r\n <form *ngIf=\"user && form\" [formGroup]=\"form\">\r\n <div class=\"info-boxes-container\">\r\n <!-- USER INFO BOX-->\r\n <div class=\"user-info-box user-details-box\">\r\n <h3 class=\"user-box-title\">User Details</h3>\r\n <div class=\"form-holder__inputs\">\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">User Id</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"userid\" matInput (input)=\"onChangeField('userid')\">\r\n <mat-error\r\n *ngIf=\"form.get('userid').hasError('required')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field is required\r\n </mat-error>\r\n <mat-error *ngIf=\"form.get('userid').hasError('exist')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n User ID already exists\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Email</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"email\" matInput (input)=\"onChangeField('email')\">\r\n <mat-error\r\n *ngIf=\"form.get('email').touched && form.get('email').hasError('required')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field is required\r\n </mat-error>\r\n <mat-error *ngIf=\"form.get('email').touched && form.get('email').hasError('pattern')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n Please enter valid email\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Fisrt Name</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"firstName\" matInput (input)=\"onChangeField('firstName')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Last Name</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"lastName\" matInput (input)=\"onChangeField('lastName')\">\r\n <mat-error\r\n *ngIf=\"form.get('lastName').touched && form.get('lastName').hasError('required')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n <!-- USER INFO BOX-->\r\n <div class=\"user-info-box user-details-box\">\r\n <h3 class=\"user-box-title\">General User Info</h3>\r\n <div class=\"form-holder__inputs\">\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Department</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"department\" matInput type=\"text\" (input)=\"onChangeField('department')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Manager user ID</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"manager\" matInput type=\"text\" (input)=\"onChangeField('manager')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Associated PC</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"associatedPc\" matInput type=\"text\" (input)=\"onChangeField('associatedPc')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Digest credentials</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"digestCredentials\" matInput type=\"text\"\r\n (input)=\"onChangeField('digestCredentials')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">User profile</div>\r\n <div class=\"input-holder__input\">\r\n <app-lazy-loading-select\r\n [siteId]=\"siteId\"\r\n [controlName]=\"'userProfile'\"\r\n [form]=\"user.form\"\r\n (changeField)=\"changeField('userProfile')\"\r\n [optionsToken]=\"'userProfiles'\"\r\n ></app-lazy-loading-select>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Mobile voice access</div>\r\n <div class=\"input-holder__input\">\r\n <mat-slide-toggle\r\n formControlName=\"enableMobileVoiceAccess\"\r\n (change)=\"onChangeField('enableMobileVoiceAccess')\"\r\n [checked]=\"user.enableMobileVoiceAccess\">\r\n </mat-slide-toggle>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Userlocale</div>\r\n <div class=\"input-holder__input\">\r\n <app-lazy-loading-select\r\n [siteId]=\"siteId\"\r\n [controlName]=\"'userLocale'\"\r\n [form]=\"user.form\"\r\n (changeField)=\"changeField($event)\"\r\n [optionsToken]=\"'userLocales'\"\r\n [default]=\"{key: '', value: 'None', disabled: false}\">\r\n </app-lazy-loading-select>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Confirm digest credentials</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"confirmDigestCredentials\" matInput type=\"text\"\r\n (input)=\"onChangeField('confirmDigestCredentials')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- USER INFO BOX-->\r\n <div class=\"user-info-box user-details-box\">\r\n <h3 class=\"user-box-title\">Contact Information</h3>\r\n <div class=\"form-holder__inputs\">\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Middle Name</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" formControlName=\"middleName\" (input)=\"onChangeField('middleName')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Telephone Number</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" formControlName=\"telephoneNumber\"\r\n (input)=\"onChangeField('telephoneNumber')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Mobile Number</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" formControlName=\"mobileNumber\" (input)=\"onChangeField('mobileNumber')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Digest credentials</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" formControlName=\"digestCredentials\"\r\n (input)=\"onChangeField('digestCredentials')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Diractory URI</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" formControlName=\"directoryUri\" (input)=\"onChangeField('directoryUri')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Title</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" formControlName=\"title\" (input)=\"onChangeField('title')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Home Number</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" formControlName=\"homeNumber\" (input)=\"onChangeField('homeNumber')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Pager Number</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" formControlName=\"pagerNumber\" (input)=\"onChangeField('pagerNumber')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Display Name</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" formControlName=\"displayName\" (input)=\"onChangeField('displayName')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n </form>\r\n </ng-template>\r\n</div>\r\n\r\n<!--<mat-progress-spinner *ngIf=\"dataPending\"-->\r\n<!-- class=\"page-spinner\"-->\r\n<!-- mode=\"indeterminate\"-->\r\n<!-- [diameter]=\"120\"></mat-progress-spinner>-->\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-webex-user{background-image:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22a%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 16.67 15.56%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%232c355d%3Bstroke-width%3A1.4px%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath class%3D%22b%22 d%3D%22M4.87%2C3.89c0-1.72%2C1.51-3.19%2C3.47-3.19s3.47%2C1.47%2C3.47%2C3.19-1.51%2C3.19-3.47%2C3.19-3.47-1.47-3.47-3.19ZM.7%2C12.64c0-.37%2C.19-.76%2C.67-1.17%2C.48-.41%2C1.17-.78%2C2-1.09%2C1.66-.62%2C3.66-.93%2C4.97-.93s3.31%2C.31%2C4.97%2C.93c.83%2C.31%2C1.52%2C.68%2C2%2C1.09%2C.47%2C.41%2C.67%2C.8%2C.67%2C1.17v2.22H.7v-2.22Z%22%2F%3E%3C%2Fsvg%3E\")}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:95%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:gray!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.spinner-container{width:100%;display:flex;justify-content:center;align-items:center}.spinner-container ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#000}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}table{border-collapse:collapse;border-spacing:0}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}.mat-divider{margin:12px 0}::ng-deep .mat-form-field-wrapper{height:30px}::ng-deep .mat-form-field-flex{height:30px}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{height:35px}:ng-deep .mat-form-field-outline .mat-form-field-outline-thick{height:35px}::ng-deep .mat-select{line-height:20px}::ng-deep .mat-form-field-infix{border-top:0px!important}::ng-deep .mat-tab-group{font-family:Inter,sans-serif}::ng-deep .mat-tab-label{font-weight:500!important;font-size:16px!important;height:auto!important;min-width:auto!important;padding:0!important;opacity:1!important;color:#000!important}::ng-deep .mat-ink-bar{background-color:#000!important;height:3px!important}::ng-deep .mat-tab-labels{gap:30px}::ng-deep .mat-progress-spinner{position:absolute!important;top:40%;left:45%}.app-icon{height:20px;width:20px;display:inline-block;cursor:pointer;background-repeat:no-repeat;background-position:center}.app-icon{transition:all .15s ease-out}.icon-webex-right-arrow{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2220%22 height%3D%2220%22 viewBox%3D%220 0 20 20%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cg id%3D%22arrow-right%22%3E%0D%3Cpath id%3D%22Vector%22 d%3D%22M14.0812 9.66902L6.58119 2.16902C6.53813 2.12351 6.48638 2.0871 6.429 2.06193C6.37162 2.03677 6.30978 2.02336 6.24713 2.0225C6.18448 2.02165 6.1223 2.03336 6.06425 2.05695C6.00621 2.08053 5.95348 2.11552 5.90919 2.15983C5.8649 2.20415 5.82994 2.25689 5.80638 2.31495C5.78282 2.373 5.77113 2.43519 5.77202 2.49784C5.77291 2.56049 5.78634 2.62232 5.81153 2.67969C5.83673 2.73705 5.87316 2.78879 5.91869 2.83183L13.0874 10.0003L5.91869 17.169C5.87316 17.2121 5.83673 17.2638 5.81153 17.3212C5.78634 17.3785 5.77291 17.4404 5.77202 17.503C5.77113 17.5657 5.78282 17.6279 5.80638 17.6859C5.82994 17.744 5.8649 17.7967 5.90919 17.841C5.95348 17.8853 6.00621 17.9203 6.06425 17.9439C6.1223 17.9675 6.18448 17.9792 6.24713 17.9783C6.30978 17.9775 6.37162 17.9641 6.429 17.9389C6.48638 17.9138 6.53813 17.8773 6.58119 17.8318L14.0812 10.3318C14.1691 10.2439 14.2184 10.1247 14.2184 10.0004C14.2184 9.87613 14.1691 9.75692 14.0812 9.66902Z%22 fill%3D%22%230F0F0F%22%2F%3E%0D%3C%2Fg%3E%0D%3C%2Fsvg%3E%0D\")}.icon-webex-left-arrow{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2216%22 height%3D%2216%22 viewBox%3D%220 0 16 16%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cg id%3D%22arrow-left%22%3E%0D%3Cpath id%3D%22Vector%22 d%3D%22M5.70746 7.99987L11.3539 2.35352C11.4453 2.25928 11.496 2.13287 11.495 2.00159C11.494 1.8703 11.4414 1.74467 11.3486 1.65183C11.2558 1.55899 11.1301 1.50639 10.9988 1.50539C10.8676 1.50438 10.7411 1.55506 10.6469 1.64647L4.64691 7.64647C4.55316 7.74023 4.50049 7.8674 4.50049 7.99999C4.50049 8.13259 4.55316 8.25975 4.64691 8.35352L10.6469 14.3535C10.6931 14.4011 10.7482 14.439 10.8092 14.4651C10.8702 14.4912 10.9357 14.5049 11.002 14.5054C11.0683 14.5059 11.134 14.4932 11.1954 14.468C11.2567 14.4429 11.3125 14.4058 11.3593 14.3589C11.4062 14.312 11.4433 14.2563 11.4685 14.1949C11.4936 14.1336 11.5063 14.0679 11.5058 14.0016C11.5053 13.9353 11.4916 13.8697 11.4655 13.8088C11.4394 13.7478 11.4015 13.6926 11.3539 13.6465L5.70746 7.99987Z%22 fill%3D%22black%22 fill-opacity%3D%220.95%22%2F%3E%0D%3C%2Fg%3E%0D%3C%2Fsvg%3E%0D\")}.go-back-box{background:white;border-bottom:rgba(0,0,0,.2) 1px solid;height:60px;width:100%;line-height:60px;cursor:pointer}.go-back-box-container{width:95%;margin:auto;display:flex;justify-content:flex-start}.go-back-box-container .icon-webex-left-arrow,.go-back-box-container .go-back-title{display:block;height:60px}.go-back-box-container .go-back-title{line-height:61px}.go-back-title{display:inline-block;margin:0 10px}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i6$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i8$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { kind: "component", type: i8$1.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: i2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { kind: "component", type: AppLoaderComponent, selector: "app-loader" }, { kind: "component", type: UserInfoComponent, selector: "app-user-info", inputs: ["name", "active", "email", "position"] }, { kind: "component", type: LazyLoadingSelectComponent, selector: "app-lazy-loading-select", inputs: ["siteId", "form", "standalone", "placeholder", "controlName", "optionsToken", "appearance", "errorCode", "errorText", "default", "id"], outputs: ["changeField"] }, { kind: "component", type: UserCallingComponent, selector: "app-user-calling", inputs: ["siteId", "userId"], outputs: ["onExtensionChange"] }, { kind: "component", type: DeviceListComponent, selector: "app-device-list", inputs: ["devices"], outputs: ["onDeviceSelect"] }] });
2004
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageWidgetComponent, decorators: [{
2005
+ type: Component,
2006
+ args: [{ selector: 'app-user-manage-widget', template: "<app-loader *ngIf=\"dataPending || userService.dataPending\"></app-loader>\r\n\r\n<div *ngIf=\"!dataPending\">\r\n <div class=\"go-back-box\" (click)=\"onGoBack()\">\r\n <div class=\"go-back-box-container\">\r\n <span class=\"app-icon icon-webex-left-arrow\"></span>\r\n <span class=\"go-back-title\">Users</span>\r\n </div>\r\n </div>\r\n\r\n <app-user-info *ngIf=\"user\" [name]=\"userName\" [email]=\"user.email\" [active]=\"true\"\r\n [position]=\"'Member of ' + user.siteName\"></app-user-info>\r\n\r\n <mat-tab-group disableRipple class=\"content-box\">\r\n <mat-tab label=\"Profile\">\r\n <ng-container *ngTemplateOutlet=\"userProfile\">\r\n </ng-container>\r\n </mat-tab>\r\n <mat-tab label=\"Calling\" [disabled]=\"!lineAssociation\">\r\n <app-user-calling *ngIf=\"lineAssociation\" [siteId]=\"siteId\"\r\n (onExtensionChange)=\"onExtensionChange()\"></app-user-calling>\r\n </mat-tab>\r\n <mat-tab label=\"Devices\">\r\n <app-device-list [devices]=\"user?.devices\" (onDeviceSelect)=\"onDeviceSelect($event)\"></app-device-list>\r\n </mat-tab>\r\n <mat-tab label=\"Lines\" [disabled]=\"true\"></mat-tab>\r\n <mat-tab label=\"Features\" [disabled]=\"true\"></mat-tab>\r\n </mat-tab-group>\r\n\r\n <ng-template #userProfile>\r\n <form *ngIf=\"user && form\" [formGroup]=\"form\">\r\n <div class=\"info-boxes-container\">\r\n <!-- USER INFO BOX-->\r\n <div class=\"user-info-box user-details-box\">\r\n <h3 class=\"user-box-title\">User Details</h3>\r\n <div class=\"form-holder__inputs\">\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">User Id</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"userid\" matInput (input)=\"onChangeField('userid')\">\r\n <mat-error\r\n *ngIf=\"form.get('userid').hasError('required')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field is required\r\n </mat-error>\r\n <mat-error *ngIf=\"form.get('userid').hasError('exist')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n User ID already exists\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Email</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"email\" matInput (input)=\"onChangeField('email')\">\r\n <mat-error\r\n *ngIf=\"form.get('email').touched && form.get('email').hasError('required')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field is required\r\n </mat-error>\r\n <mat-error *ngIf=\"form.get('email').touched && form.get('email').hasError('pattern')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n Please enter valid email\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Fisrt Name</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"firstName\" matInput (input)=\"onChangeField('firstName')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Last Name</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"lastName\" matInput (input)=\"onChangeField('lastName')\">\r\n <mat-error\r\n *ngIf=\"form.get('lastName').touched && form.get('lastName').hasError('required')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n <!-- USER INFO BOX-->\r\n <div class=\"user-info-box user-details-box\">\r\n <h3 class=\"user-box-title\">General User Info</h3>\r\n <div class=\"form-holder__inputs\">\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Department</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"department\" matInput type=\"text\" (input)=\"onChangeField('department')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Manager user ID</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"manager\" matInput type=\"text\" (input)=\"onChangeField('manager')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Associated PC</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"associatedPc\" matInput type=\"text\" (input)=\"onChangeField('associatedPc')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Digest credentials</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"digestCredentials\" matInput type=\"text\"\r\n (input)=\"onChangeField('digestCredentials')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">User profile</div>\r\n <div class=\"input-holder__input\">\r\n <app-lazy-loading-select\r\n [siteId]=\"siteId\"\r\n [controlName]=\"'userProfile'\"\r\n [form]=\"user.form\"\r\n (changeField)=\"changeField('userProfile')\"\r\n [optionsToken]=\"'userProfiles'\"\r\n ></app-lazy-loading-select>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Mobile voice access</div>\r\n <div class=\"input-holder__input\">\r\n <mat-slide-toggle\r\n formControlName=\"enableMobileVoiceAccess\"\r\n (change)=\"onChangeField('enableMobileVoiceAccess')\"\r\n [checked]=\"user.enableMobileVoiceAccess\">\r\n </mat-slide-toggle>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Userlocale</div>\r\n <div class=\"input-holder__input\">\r\n <app-lazy-loading-select\r\n [siteId]=\"siteId\"\r\n [controlName]=\"'userLocale'\"\r\n [form]=\"user.form\"\r\n (changeField)=\"changeField($event)\"\r\n [optionsToken]=\"'userLocales'\"\r\n [default]=\"{key: '', value: 'None', disabled: false}\">\r\n </app-lazy-loading-select>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Confirm digest credentials</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"confirmDigestCredentials\" matInput type=\"text\"\r\n (input)=\"onChangeField('confirmDigestCredentials')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- USER INFO BOX-->\r\n <div class=\"user-info-box user-details-box\">\r\n <h3 class=\"user-box-title\">Contact Information</h3>\r\n <div class=\"form-holder__inputs\">\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Middle Name</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" formControlName=\"middleName\" (input)=\"onChangeField('middleName')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Telephone Number</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" formControlName=\"telephoneNumber\"\r\n (input)=\"onChangeField('telephoneNumber')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Mobile Number</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" formControlName=\"mobileNumber\" (input)=\"onChangeField('mobileNumber')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Digest credentials</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" formControlName=\"digestCredentials\"\r\n (input)=\"onChangeField('digestCredentials')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Diractory URI</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" formControlName=\"directoryUri\" (input)=\"onChangeField('directoryUri')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Title</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" formControlName=\"title\" (input)=\"onChangeField('title')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Home Number</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" formControlName=\"homeNumber\" (input)=\"onChangeField('homeNumber')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Pager Number</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" formControlName=\"pagerNumber\" (input)=\"onChangeField('pagerNumber')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Display Name</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" formControlName=\"displayName\" (input)=\"onChangeField('displayName')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n </form>\r\n </ng-template>\r\n</div>\r\n\r\n<!--<mat-progress-spinner *ngIf=\"dataPending\"-->\r\n<!-- class=\"page-spinner\"-->\r\n<!-- mode=\"indeterminate\"-->\r\n<!-- [diameter]=\"120\"></mat-progress-spinner>-->\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-webex-user{background-image:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22a%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 16.67 15.56%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%232c355d%3Bstroke-width%3A1.4px%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath class%3D%22b%22 d%3D%22M4.87%2C3.89c0-1.72%2C1.51-3.19%2C3.47-3.19s3.47%2C1.47%2C3.47%2C3.19-1.51%2C3.19-3.47%2C3.19-3.47-1.47-3.47-3.19ZM.7%2C12.64c0-.37%2C.19-.76%2C.67-1.17%2C.48-.41%2C1.17-.78%2C2-1.09%2C1.66-.62%2C3.66-.93%2C4.97-.93s3.31%2C.31%2C4.97%2C.93c.83%2C.31%2C1.52%2C.68%2C2%2C1.09%2C.47%2C.41%2C.67%2C.8%2C.67%2C1.17v2.22H.7v-2.22Z%22%2F%3E%3C%2Fsvg%3E\")}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:95%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:gray!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.spinner-container{width:100%;display:flex;justify-content:center;align-items:center}.spinner-container ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#000}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}table{border-collapse:collapse;border-spacing:0}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}.mat-divider{margin:12px 0}::ng-deep .mat-form-field-wrapper{height:30px}::ng-deep .mat-form-field-flex{height:30px}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{height:35px}:ng-deep .mat-form-field-outline .mat-form-field-outline-thick{height:35px}::ng-deep .mat-select{line-height:20px}::ng-deep .mat-form-field-infix{border-top:0px!important}::ng-deep .mat-tab-group{font-family:Inter,sans-serif}::ng-deep .mat-tab-label{font-weight:500!important;font-size:16px!important;height:auto!important;min-width:auto!important;padding:0!important;opacity:1!important;color:#000!important}::ng-deep .mat-ink-bar{background-color:#000!important;height:3px!important}::ng-deep .mat-tab-labels{gap:30px}::ng-deep .mat-progress-spinner{position:absolute!important;top:40%;left:45%}.app-icon{height:20px;width:20px;display:inline-block;cursor:pointer;background-repeat:no-repeat;background-position:center}.app-icon{transition:all .15s ease-out}.icon-webex-right-arrow{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2220%22 height%3D%2220%22 viewBox%3D%220 0 20 20%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cg id%3D%22arrow-right%22%3E%0D%3Cpath id%3D%22Vector%22 d%3D%22M14.0812 9.66902L6.58119 2.16902C6.53813 2.12351 6.48638 2.0871 6.429 2.06193C6.37162 2.03677 6.30978 2.02336 6.24713 2.0225C6.18448 2.02165 6.1223 2.03336 6.06425 2.05695C6.00621 2.08053 5.95348 2.11552 5.90919 2.15983C5.8649 2.20415 5.82994 2.25689 5.80638 2.31495C5.78282 2.373 5.77113 2.43519 5.77202 2.49784C5.77291 2.56049 5.78634 2.62232 5.81153 2.67969C5.83673 2.73705 5.87316 2.78879 5.91869 2.83183L13.0874 10.0003L5.91869 17.169C5.87316 17.2121 5.83673 17.2638 5.81153 17.3212C5.78634 17.3785 5.77291 17.4404 5.77202 17.503C5.77113 17.5657 5.78282 17.6279 5.80638 17.6859C5.82994 17.744 5.8649 17.7967 5.90919 17.841C5.95348 17.8853 6.00621 17.9203 6.06425 17.9439C6.1223 17.9675 6.18448 17.9792 6.24713 17.9783C6.30978 17.9775 6.37162 17.9641 6.429 17.9389C6.48638 17.9138 6.53813 17.8773 6.58119 17.8318L14.0812 10.3318C14.1691 10.2439 14.2184 10.1247 14.2184 10.0004C14.2184 9.87613 14.1691 9.75692 14.0812 9.66902Z%22 fill%3D%22%230F0F0F%22%2F%3E%0D%3C%2Fg%3E%0D%3C%2Fsvg%3E%0D\")}.icon-webex-left-arrow{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2216%22 height%3D%2216%22 viewBox%3D%220 0 16 16%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cg id%3D%22arrow-left%22%3E%0D%3Cpath id%3D%22Vector%22 d%3D%22M5.70746 7.99987L11.3539 2.35352C11.4453 2.25928 11.496 2.13287 11.495 2.00159C11.494 1.8703 11.4414 1.74467 11.3486 1.65183C11.2558 1.55899 11.1301 1.50639 10.9988 1.50539C10.8676 1.50438 10.7411 1.55506 10.6469 1.64647L4.64691 7.64647C4.55316 7.74023 4.50049 7.8674 4.50049 7.99999C4.50049 8.13259 4.55316 8.25975 4.64691 8.35352L10.6469 14.3535C10.6931 14.4011 10.7482 14.439 10.8092 14.4651C10.8702 14.4912 10.9357 14.5049 11.002 14.5054C11.0683 14.5059 11.134 14.4932 11.1954 14.468C11.2567 14.4429 11.3125 14.4058 11.3593 14.3589C11.4062 14.312 11.4433 14.2563 11.4685 14.1949C11.4936 14.1336 11.5063 14.0679 11.5058 14.0016C11.5053 13.9353 11.4916 13.8697 11.4655 13.8088C11.4394 13.7478 11.4015 13.6926 11.3539 13.6465L5.70746 7.99987Z%22 fill%3D%22black%22 fill-opacity%3D%220.95%22%2F%3E%0D%3C%2Fg%3E%0D%3C%2Fsvg%3E%0D\")}.go-back-box{background:white;border-bottom:rgba(0,0,0,.2) 1px solid;height:60px;width:100%;line-height:60px;cursor:pointer}.go-back-box-container{width:95%;margin:auto;display:flex;justify-content:flex-start}.go-back-box-container .icon-webex-left-arrow,.go-back-box-container .go-back-title{display:block;height:60px}.go-back-box-container .go-back-title{line-height:61px}.go-back-title{display:inline-block;margin:0 10px}\n"] }]
2007
+ }], ctorParameters: function () { return [{ type: UserService }, { type: APIService }]; }, propDecorators: { onSave: [{
2008
+ type: Output
2009
+ }], onChange: [{
2010
+ type: Output
2011
+ }], selectDevice: [{
2012
+ type: Output
2013
+ }], goBack: [{
2014
+ type: Output
2015
+ }], token: [{
2016
+ type: Input
2017
+ }], host: [{
2018
+ type: Input
2019
+ }], siteId: [{
2020
+ type: Input
2021
+ }], userId: [{
2022
+ type: Input
2023
+ }], deviceName: [{
2024
+ type: Input
2025
+ }], isLdap: [{
2026
+ type: Input
2027
+ }] } });
2028
+
2029
+ class UserManageModule {
2030
+ }
2031
+ UserManageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2032
+ UserManageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, declarations: [AppLoaderComponent,
2033
+ UserInfoComponent,
2034
+ NotificationsComponent,
2035
+ PaginationComponent,
2036
+ LazyLoadingSelectComponent,
2037
+ UserManageWidgetComponent,
2038
+ UserCallingComponent,
2039
+ UserCallingExtensionComponent,
2040
+ DeviceListComponent], imports: [CommonModule,
2041
+ BrowserModule,
2042
+ BrowserAnimationsModule,
2043
+ FormsModule,
2044
+ ReactiveFormsModule,
2045
+ HttpClientModule,
2046
+ MaterialModule], exports: [UserManageWidgetComponent] });
2047
+ UserManageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, providers: [
2048
+ APIService,
2049
+ UserService,
2050
+ NotificationService,
2051
+ UsersSearchService,
2052
+ RemoveKynFromIBMService,
2053
+ SiteSettingsService,
2054
+ DnsService,
2055
+ LineService,
2056
+ { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
2057
+ ], imports: [CommonModule,
2058
+ BrowserModule,
2059
+ BrowserAnimationsModule,
2060
+ FormsModule,
2061
+ ReactiveFormsModule,
2062
+ HttpClientModule,
2063
+ MaterialModule] });
2064
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserManageModule, decorators: [{
2065
+ type: NgModule,
2066
+ args: [{
2067
+ declarations: [
2068
+ AppLoaderComponent,
2069
+ UserInfoComponent,
2070
+ NotificationsComponent,
2071
+ PaginationComponent,
2072
+ LazyLoadingSelectComponent,
2073
+ UserManageWidgetComponent,
2074
+ UserCallingComponent,
2075
+ UserCallingExtensionComponent,
2076
+ DeviceListComponent
2077
+ ],
2078
+ imports: [
2079
+ CommonModule,
2080
+ BrowserModule,
2081
+ BrowserAnimationsModule,
2082
+ FormsModule,
2083
+ ReactiveFormsModule,
2084
+ HttpClientModule,
2085
+ MaterialModule,
2086
+ ],
2087
+ providers: [
2088
+ APIService,
2089
+ UserService,
2090
+ NotificationService,
2091
+ UsersSearchService,
2092
+ RemoveKynFromIBMService,
2093
+ SiteSettingsService,
2094
+ DnsService,
2095
+ LineService,
2096
+ { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
2097
+ ],
2098
+ exports: [UserManageWidgetComponent]
2099
+ }]
2100
+ }] });
2101
+
2102
+ /**
2103
+ * Generated bundle index. Do not edit.
2104
+ */
2105
+
2106
+ export { APIService, SiteSettingsService, UserManageModule, UserManageWidgetComponent, UserService, UtilsService };
2107
+ //# sourceMappingURL=tuki-io-tuki-widgets-user-manage.mjs.map