@tuki-io/tuki-widgets 0.0.75 → 0.0.77

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 (664) hide show
  1. package/README.md +9 -10
  2. package/di2mt/api/api.endpoints.d.ts +26 -0
  3. package/di2mt/index.d.ts +5 -0
  4. package/{projects/tuki/widgets/di2mt/public-api.ts → di2mt/public-api.d.ts} +0 -14
  5. package/di2mt/shared/components/card/card.component.d.ts +6 -0
  6. package/di2mt/shared/components/chart-card/chart-card.component.d.ts +22 -0
  7. package/di2mt/shared/components/stat-card/stat-card.component.d.ts +14 -0
  8. package/di2mt/shared/components/status-list-card/status-list-card.component.d.ts +7 -0
  9. package/di2mt/shared/components/summary-card/summary-card.component.d.ts +9 -0
  10. package/di2mt/shared/components/table-filters/table-filters.component.d.ts +14 -0
  11. package/di2mt/shared/constants/app.constants.d.ts +74 -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 +8 -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/progress-bar/progress-bar.component.d.ts +13 -0
  19. package/di2mt/widgets/site-upgrade/site-upgrade-data-table/site-upgrade-data-table.component.d.ts +62 -0
  20. package/di2mt/widgets/site-upgrade/site-upgrade.module.d.ts +15 -0
  21. package/di2mt/widgets/site-upgrade/site-upgrade.service.d.ts +34 -0
  22. package/di2mt/widgets/site-upgrade/types/user-upgrade.d.ts +21 -0
  23. package/di2mt/widgets/upgrade-overview/cards/already-upgraded-sites/already-upgraded-sites-card.component.d.ts +19 -0
  24. package/di2mt/widgets/upgrade-overview/cards/already-upgraded-users/already-upgraded-users-card.component.d.ts +19 -0
  25. package/di2mt/widgets/upgrade-overview/cards/preconditions-status-list/preconditions-status-list-card.component.d.ts +18 -0
  26. package/di2mt/widgets/upgrade-overview/cards/ready-to-upgrade-sites/ready-to-upgrade-sites-card.component.d.ts +19 -0
  27. package/di2mt/widgets/upgrade-overview/cards/ready-to-upgrade-users/ready-to-upgrade-users-card.component.d.ts +19 -0
  28. package/di2mt/widgets/upgrade-overview/cards/site-infrastructure-status-list/site-infrastructure-status-list-card.component.d.ts +15 -0
  29. package/di2mt/widgets/upgrade-overview/cards/upgrade-state-comparison-chart/upgrade-state-comparison-chart-card.component.d.ts +18 -0
  30. package/{projects/tuki/widgets/di2mt/widgets/upgrade-overview/types/upgrade-overview.ts → di2mt/widgets/upgrade-overview/types/upgrade-overview.d.ts} +18 -20
  31. package/di2mt/widgets/upgrade-overview/upgrade-overview.module.d.ts +15 -0
  32. package/di2mt/widgets/upgrade-overview/upgrade-overview.service.d.ts +17 -0
  33. package/{projects/tuki/widgets/di2mt/widgets/user-upgrade/types/user-upgrade.ts → di2mt/widgets/user-upgrade/types/user-upgrade.d.ts} +1 -3
  34. package/di2mt/widgets/user-upgrade/user-upgrade-data-table/user-upgrade-data-table.component.d.ts +71 -0
  35. package/di2mt/widgets/user-upgrade/user-upgrade.module.d.ts +16 -0
  36. package/di2mt/widgets/user-upgrade/user-upgrade.service.d.ts +25 -0
  37. package/esm2020/di2mt/api/api.endpoints.mjs +27 -0
  38. package/esm2020/di2mt/public-api.mjs +24 -0
  39. package/esm2020/di2mt/shared/components/card/card.component.mjs +13 -0
  40. package/esm2020/di2mt/shared/components/chart-card/chart-card.component.mjs +62 -0
  41. package/esm2020/di2mt/shared/components/stat-card/stat-card.component.mjs +47 -0
  42. package/esm2020/di2mt/shared/components/status-list-card/status-list-card.component.mjs +17 -0
  43. package/esm2020/di2mt/shared/components/summary-card/summary-card.component.mjs +36 -0
  44. package/esm2020/di2mt/shared/components/table-filters/table-filters.component.mjs +37 -0
  45. package/esm2020/di2mt/shared/constants/app.constants.mjs +95 -0
  46. package/esm2020/di2mt/shared/material.module.mjs +76 -0
  47. package/esm2020/di2mt/shared/services/api.service.mjs +86 -0
  48. package/esm2020/di2mt/shared/shared.module.mjs +61 -0
  49. package/esm2020/di2mt/shared/types/constants.mjs +12 -0
  50. package/esm2020/di2mt/shared/types/data-table.mjs +2 -0
  51. package/esm2020/di2mt/shared/types/table/filter.mjs +2 -0
  52. package/esm2020/di2mt/tuki-io-tuki-widgets-di2mt.mjs +5 -0
  53. package/esm2020/di2mt/widgets/site-upgrade/progress-bar/progress-bar.component.mjs +44 -0
  54. package/esm2020/di2mt/widgets/site-upgrade/site-upgrade-data-table/site-upgrade-data-table.component.mjs +317 -0
  55. package/esm2020/di2mt/widgets/site-upgrade/site-upgrade.module.mjs +53 -0
  56. package/esm2020/di2mt/widgets/site-upgrade/site-upgrade.service.mjs +78 -0
  57. package/esm2020/di2mt/widgets/site-upgrade/types/user-upgrade.mjs +3 -0
  58. package/esm2020/di2mt/widgets/upgrade-overview/cards/already-upgraded-sites/already-upgraded-sites-card.component.mjs +64 -0
  59. package/esm2020/di2mt/widgets/upgrade-overview/cards/already-upgraded-users/already-upgraded-users-card.component.mjs +64 -0
  60. package/esm2020/di2mt/widgets/upgrade-overview/cards/preconditions-status-list/preconditions-status-list-card.component.mjs +68 -0
  61. package/esm2020/di2mt/widgets/upgrade-overview/cards/ready-to-upgrade-sites/ready-to-upgrade-sites-card.component.mjs +45 -0
  62. package/esm2020/di2mt/widgets/upgrade-overview/cards/ready-to-upgrade-users/ready-to-upgrade-users-card.component.mjs +45 -0
  63. package/esm2020/di2mt/widgets/upgrade-overview/cards/site-infrastructure-status-list/site-infrastructure-status-list-card.component.mjs +64 -0
  64. package/esm2020/di2mt/widgets/upgrade-overview/cards/upgrade-state-comparison-chart/upgrade-state-comparison-chart-card.component.mjs +74 -0
  65. package/esm2020/di2mt/widgets/upgrade-overview/types/upgrade-overview.mjs +2 -0
  66. package/esm2020/di2mt/widgets/upgrade-overview/upgrade-overview.module.mjs +59 -0
  67. package/esm2020/di2mt/widgets/upgrade-overview/upgrade-overview.service.mjs +82 -0
  68. package/esm2020/di2mt/widgets/user-upgrade/types/user-upgrade.mjs +3 -0
  69. package/esm2020/di2mt/widgets/user-upgrade/user-upgrade-data-table/user-upgrade-data-table.component.mjs +272 -0
  70. package/esm2020/di2mt/widgets/user-upgrade/user-upgrade.module.mjs +59 -0
  71. package/esm2020/di2mt/widgets/user-upgrade/user-upgrade.service.mjs +50 -0
  72. package/esm2020/lib/widgets.component.mjs +22 -0
  73. package/esm2020/lib/widgets.module.mjs +21 -0
  74. package/esm2020/lib/widgets.service.mjs +14 -0
  75. package/esm2020/public-api.mjs +7 -0
  76. package/esm2020/tuki-io-tuki-widgets.mjs +5 -0
  77. package/esm2020/user-device-manage/public-api.mjs +9 -0
  78. package/esm2020/user-device-manage/src/app.constants.mjs +95 -0
  79. package/esm2020/user-device-manage/src/classes/device.mjs +85 -0
  80. package/esm2020/user-device-manage/src/classes/line-association-interface.mjs +2 -0
  81. package/esm2020/user-device-manage/src/classes/line-association.mjs +121 -0
  82. package/esm2020/user-device-manage/src/classes/line-call-info-display.mjs +10 -0
  83. package/esm2020/user-device-manage/src/classes/line-directory.mjs +27 -0
  84. package/esm2020/user-device-manage/src/classes/line.mjs +18 -0
  85. package/esm2020/user-device-manage/src/classes/notification.mjs +32 -0
  86. package/esm2020/user-device-manage/src/classes/recording-options.mjs +7 -0
  87. package/esm2020/user-device-manage/src/classes/simplified-user.mjs +111 -0
  88. package/esm2020/user-device-manage/src/classes/site-defaults.mjs +21 -0
  89. package/esm2020/user-device-manage/src/classes/translation-pattern.mjs +32 -0
  90. package/esm2020/user-device-manage/src/classes/types.mjs +24 -0
  91. package/esm2020/user-device-manage/src/common-functions.mjs +19 -0
  92. package/esm2020/user-device-manage/src/confirm-dialog/info-dialog.component.mjs +34 -0
  93. package/esm2020/user-device-manage/src/device-associated-line/associated-line-row/associated-line-row.component.mjs +31 -0
  94. package/esm2020/user-device-manage/src/device-associated-line/device-associated-line-details-box/device-associated-line-details-box.component.mjs +16 -0
  95. package/esm2020/user-device-manage/src/device-associated-line/device-associated-line-extension/device-associated-line-extension.component.mjs +64 -0
  96. package/esm2020/user-device-manage/src/device-associated-line/device-associated-line.component.mjs +179 -0
  97. package/esm2020/user-device-manage/src/device-list/device-list.component.mjs +24 -0
  98. package/esm2020/user-device-manage/src/device-manage-widget.component.mjs +335 -0
  99. package/esm2020/user-device-manage/src/environments/environment.mjs +11 -0
  100. package/esm2020/user-device-manage/src/interseptors/auth.interceptor.mjs +36 -0
  101. package/esm2020/user-device-manage/src/lazy-loading-select/lazy-loading-select.component.mjs +74 -0
  102. package/esm2020/user-device-manage/src/material.module.mjs +192 -0
  103. package/esm2020/user-device-manage/src/notifications/notification.component.mjs +35 -0
  104. package/esm2020/user-device-manage/src/services/api.service.mjs +79 -0
  105. package/esm2020/user-device-manage/src/services/device.service.mjs +83 -0
  106. package/esm2020/user-device-manage/src/services/dns.service.mjs +104 -0
  107. package/esm2020/user-device-manage/src/services/line.service.mjs +76 -0
  108. package/esm2020/user-device-manage/src/services/notification.service.mjs +62 -0
  109. package/esm2020/user-device-manage/src/services/removeKynFromIBM.service.mjs +25 -0
  110. package/esm2020/user-device-manage/src/services/site-settings.service.mjs +70 -0
  111. package/esm2020/user-device-manage/src/services/sorting-utils.service.mjs +197 -0
  112. package/esm2020/user-device-manage/src/services/user.service.mjs +243 -0
  113. package/esm2020/user-device-manage/src/services/utils.service.mjs +87 -0
  114. package/esm2020/user-device-manage/src/services/validation.service.mjs +760 -0
  115. package/esm2020/user-device-manage/src/user-device-manage.module.mjs +107 -0
  116. package/esm2020/user-device-manage/src/utils/app-loader/app-loader.mjs +14 -0
  117. package/esm2020/user-device-manage/tuki-io-tuki-widgets-user-device-manage.mjs +5 -0
  118. package/esm2020/user-manage/public-api.mjs +7 -0
  119. package/esm2020/user-manage/src/app.constants.mjs +50 -0
  120. package/esm2020/user-manage/src/classes/device.mjs +37 -0
  121. package/esm2020/user-manage/src/classes/line-association-interface.mjs +2 -0
  122. package/esm2020/user-manage/src/classes/line-association.mjs +110 -0
  123. package/esm2020/user-manage/src/classes/line-call-info-display.mjs +10 -0
  124. package/esm2020/user-manage/src/classes/line-directory.mjs +27 -0
  125. package/esm2020/user-manage/src/classes/line.mjs +18 -0
  126. package/esm2020/user-manage/src/classes/notification.mjs +32 -0
  127. package/esm2020/user-manage/src/classes/pagination.mjs +8 -0
  128. package/esm2020/user-manage/src/classes/recording-options.mjs +7 -0
  129. package/esm2020/user-manage/src/classes/simplified-user.mjs +109 -0
  130. package/esm2020/user-manage/src/classes/table-data.mjs +2 -0
  131. package/esm2020/user-manage/src/classes/translation-pattern.mjs +32 -0
  132. package/esm2020/user-manage/src/classes/user-list.mjs +10 -0
  133. package/esm2020/user-manage/src/common-functions.mjs +19 -0
  134. package/esm2020/user-manage/src/device-list/device-list.component.mjs +24 -0
  135. package/esm2020/user-manage/src/environments/environment.mjs +11 -0
  136. package/esm2020/user-manage/src/interseptors/auth.interceptor.mjs +36 -0
  137. package/esm2020/user-manage/src/lazy-loading-select/lazy-loading-select.component.mjs +74 -0
  138. package/esm2020/user-manage/src/material.module.mjs +188 -0
  139. package/esm2020/user-manage/src/notifications/notification.component.mjs +35 -0
  140. package/esm2020/user-manage/src/removeKynFromIBM.service.mjs +25 -0
  141. package/esm2020/user-manage/src/services/api.service.mjs +79 -0
  142. package/esm2020/user-manage/src/services/dns.service.mjs +110 -0
  143. package/esm2020/user-manage/src/services/line.service.mjs +34 -0
  144. package/esm2020/user-manage/src/services/notification.service.mjs +62 -0
  145. package/esm2020/user-manage/src/services/removeKynFromIBM.service.mjs +25 -0
  146. package/esm2020/user-manage/src/services/site-settings.service.mjs +36 -0
  147. package/esm2020/user-manage/src/services/sorting-utils.service.mjs +197 -0
  148. package/esm2020/user-manage/src/services/user.service.mjs +207 -0
  149. package/esm2020/user-manage/src/services/users-search.service.mjs +50 -0
  150. package/esm2020/user-manage/src/services/utils.service.mjs +73 -0
  151. package/esm2020/user-manage/src/user-calling/user-calling-extension/user-calling-extension.component.mjs +65 -0
  152. package/esm2020/user-manage/src/user-calling/user-calling.component.mjs +78 -0
  153. package/esm2020/user-manage/src/user-info/user-info.component.mjs +20 -0
  154. package/esm2020/user-manage/src/user-manage-widget.component.mjs +208 -0
  155. package/esm2020/user-manage/src/user-manage.module.mjs +99 -0
  156. package/esm2020/user-manage/src/utils/app-loader/app-loader.mjs +14 -0
  157. package/esm2020/user-manage/src/utils/pagination/pagination.component.mjs +43 -0
  158. package/esm2020/user-manage/tuki-io-tuki-widgets-user-manage.mjs +5 -0
  159. package/esm2020/users-list/public-api.mjs +9 -0
  160. package/esm2020/users-list/src/app.constants.mjs +54 -0
  161. package/esm2020/users-list/src/classes/app-location.mjs +32 -0
  162. package/esm2020/users-list/src/classes/device.mjs +7 -0
  163. package/esm2020/users-list/src/classes/line.mjs +18 -0
  164. package/esm2020/users-list/src/classes/move-user.mjs +178 -0
  165. package/esm2020/users-list/src/classes/notification.mjs +31 -0
  166. package/esm2020/users-list/src/classes/pagination.mjs +8 -0
  167. package/esm2020/users-list/src/classes/simlified-user.mjs +50 -0
  168. package/esm2020/users-list/src/classes/table-data.mjs +2 -0
  169. package/esm2020/users-list/src/classes/user-list.mjs +14 -0
  170. package/esm2020/users-list/src/material.module.mjs +209 -0
  171. package/esm2020/users-list/src/move-user-wizard/move-user-stepper/device-move-user/device-move-user-wizard.component.mjs +38 -0
  172. package/esm2020/users-list/src/move-user-wizard/move-user-stepper/device-move-user-tab/devices-move-user-wizard-tab.component.mjs +23 -0
  173. package/esm2020/users-list/src/move-user-wizard/move-user-stepper/move-user-stepper.component.mjs +189 -0
  174. package/esm2020/users-list/src/move-user-wizard/move-user-wizard.component.mjs +38 -0
  175. package/esm2020/users-list/src/services/api-webex.service.mjs +18 -0
  176. package/esm2020/users-list/src/services/api.service.mjs +78 -0
  177. package/esm2020/users-list/src/services/dns.service.mjs +120 -0
  178. package/esm2020/users-list/src/services/events-communication.service.mjs +14 -0
  179. package/esm2020/users-list/src/services/move-user.service.mjs +53 -0
  180. package/esm2020/users-list/src/services/notification.service.mjs +62 -0
  181. package/esm2020/users-list/src/services/removeKynFromIBM.service.mjs +25 -0
  182. package/esm2020/users-list/src/services/site-settings.service.mjs +27 -0
  183. package/esm2020/users-list/src/services/user.service.mjs +142 -0
  184. package/esm2020/users-list/src/services/users-search.service.mjs +124 -0
  185. package/esm2020/users-list/src/user-list-confirm-dialog/user-list-confirm-dialog.component.mjs +34 -0
  186. package/esm2020/users-list/src/users-list.component.mjs +287 -0
  187. package/esm2020/users-list/src/users-list.module.mjs +92 -0
  188. package/esm2020/users-list/src/utils/app-loader/app-loader.mjs +14 -0
  189. package/esm2020/users-list/src/utils/common-functions.mjs +32 -0
  190. package/esm2020/users-list/src/utils/pagination/pagination.component.mjs +43 -0
  191. package/esm2020/users-list/src/utils/utils.service.mjs +73 -0
  192. package/esm2020/users-list/tuki-io-tuki-widgets-users-list.mjs +5 -0
  193. package/fesm2015/tuki-io-tuki-widgets-di2mt.mjs +1874 -0
  194. package/fesm2015/tuki-io-tuki-widgets-di2mt.mjs.map +1 -0
  195. package/fesm2015/tuki-io-tuki-widgets-user-device-manage.mjs +3402 -0
  196. package/fesm2015/tuki-io-tuki-widgets-user-device-manage.mjs.map +1 -0
  197. package/fesm2015/tuki-io-tuki-widgets-user-manage.mjs +2124 -0
  198. package/fesm2015/tuki-io-tuki-widgets-user-manage.mjs.map +1 -0
  199. package/fesm2015/tuki-io-tuki-widgets-users-list.mjs +1996 -0
  200. package/fesm2015/tuki-io-tuki-widgets-users-list.mjs.map +1 -0
  201. package/fesm2015/tuki-io-tuki-widgets.mjs +63 -0
  202. package/fesm2015/tuki-io-tuki-widgets.mjs.map +1 -0
  203. package/fesm2020/tuki-io-tuki-widgets-di2mt.mjs +1865 -0
  204. package/fesm2020/tuki-io-tuki-widgets-di2mt.mjs.map +1 -0
  205. package/fesm2020/tuki-io-tuki-widgets-user-device-manage.mjs +3364 -0
  206. package/fesm2020/tuki-io-tuki-widgets-user-device-manage.mjs.map +1 -0
  207. package/fesm2020/tuki-io-tuki-widgets-user-manage.mjs +2107 -0
  208. package/fesm2020/tuki-io-tuki-widgets-user-manage.mjs.map +1 -0
  209. package/fesm2020/tuki-io-tuki-widgets-users-list.mjs +1975 -0
  210. package/fesm2020/tuki-io-tuki-widgets-users-list.mjs.map +1 -0
  211. package/fesm2020/tuki-io-tuki-widgets.mjs +63 -0
  212. package/fesm2020/tuki-io-tuki-widgets.mjs.map +1 -0
  213. package/index.d.ts +5 -0
  214. package/lib/widgets.component.d.ts +8 -0
  215. package/lib/widgets.module.d.ts +7 -0
  216. package/lib/widgets.service.d.ts +6 -0
  217. package/package.json +65 -48
  218. package/{projects/tuki/widgets/src/public-api.ts → public-api.d.ts} +0 -4
  219. package/user-device-manage/index.d.ts +5 -0
  220. package/user-device-manage/src/app.constants.d.ts +74 -0
  221. package/user-device-manage/src/classes/device.d.ts +233 -0
  222. package/user-device-manage/src/classes/line-association-interface.d.ts +45 -0
  223. package/user-device-manage/src/classes/line-association.d.ts +62 -0
  224. package/user-device-manage/src/classes/line-call-info-display.d.ts +11 -0
  225. package/user-device-manage/src/classes/line-directory.d.ts +15 -0
  226. package/user-device-manage/src/classes/line.d.ts +140 -0
  227. package/user-device-manage/src/classes/notification.d.ts +18 -0
  228. package/user-device-manage/src/classes/recording-options.d.ts +5 -0
  229. package/user-device-manage/src/classes/simplified-user.d.ts +52 -0
  230. package/user-device-manage/src/classes/site-defaults.d.ts +146 -0
  231. package/user-device-manage/src/classes/translation-pattern.d.ts +19 -0
  232. package/user-device-manage/src/classes/types.d.ts +19 -0
  233. package/user-device-manage/src/common-functions.d.ts +1 -0
  234. package/user-device-manage/src/confirm-dialog/info-dialog.component.d.ts +20 -0
  235. package/user-device-manage/src/device-associated-line/associated-line-row/associated-line-row.component.d.ts +15 -0
  236. package/user-device-manage/src/device-associated-line/device-associated-line-details-box/device-associated-line-details-box.component.d.ts +7 -0
  237. package/user-device-manage/src/device-associated-line/device-associated-line-extension/device-associated-line-extension.component.d.ts +24 -0
  238. package/user-device-manage/src/device-associated-line/device-associated-line.component.d.ts +89 -0
  239. package/user-device-manage/src/device-list/device-list.component.d.ts +11 -0
  240. package/user-device-manage/src/device-manage-widget.component.d.ts +71 -0
  241. package/user-device-manage/src/environments/environment.d.ts +9 -0
  242. package/user-device-manage/src/interseptors/auth.interceptor.d.ts +9 -0
  243. package/user-device-manage/src/lazy-loading-select/lazy-loading-select.component.d.ts +35 -0
  244. package/user-device-manage/src/material.module.d.ts +29 -0
  245. package/user-device-manage/src/notifications/notification.component.d.ts +19 -0
  246. package/user-device-manage/src/services/api.service.d.ts +20 -0
  247. package/user-device-manage/src/services/device.service.d.ts +21 -0
  248. package/user-device-manage/src/services/dns.service.d.ts +14 -0
  249. package/user-device-manage/src/services/line.service.d.ts +33 -0
  250. package/user-device-manage/src/services/notification.service.d.ts +18 -0
  251. package/user-device-manage/src/services/removeKynFromIBM.service.d.ts +8 -0
  252. package/user-device-manage/src/services/site-settings.service.d.ts +25 -0
  253. package/user-device-manage/src/services/sorting-utils.service.d.ts +26 -0
  254. package/user-device-manage/src/services/user.service.d.ts +51 -0
  255. package/user-device-manage/src/services/utils.service.d.ts +10 -0
  256. package/user-device-manage/src/services/validation.service.d.ts +165 -0
  257. package/user-device-manage/src/user-device-manage.module.d.ts +22 -0
  258. package/user-device-manage/src/utils/app-loader/app-loader.d.ts +6 -0
  259. package/user-manage/index.d.ts +5 -0
  260. package/user-manage/src/app.constants.d.ts +29 -0
  261. package/user-manage/src/classes/device.d.ts +203 -0
  262. package/user-manage/src/classes/line-association-interface.d.ts +40 -0
  263. package/user-manage/src/classes/line-association.d.ts +55 -0
  264. package/user-manage/src/classes/line-call-info-display.d.ts +11 -0
  265. package/user-manage/src/classes/line-directory.d.ts +16 -0
  266. package/user-manage/src/classes/line.d.ts +140 -0
  267. package/user-manage/src/classes/notification.d.ts +18 -0
  268. package/user-manage/src/classes/pagination.d.ts +13 -0
  269. package/user-manage/src/classes/recording-options.d.ts +5 -0
  270. package/user-manage/src/classes/simplified-user.d.ts +50 -0
  271. package/user-manage/src/classes/table-data.d.ts +5 -0
  272. package/user-manage/src/classes/translation-pattern.d.ts +18 -0
  273. package/user-manage/src/classes/user-list.d.ts +34 -0
  274. package/user-manage/src/common-functions.d.ts +1 -0
  275. package/user-manage/src/device-list/device-list.component.d.ts +11 -0
  276. package/user-manage/src/environments/environment.d.ts +9 -0
  277. package/user-manage/src/interseptors/auth.interceptor.d.ts +9 -0
  278. package/user-manage/src/lazy-loading-select/lazy-loading-select.component.d.ts +35 -0
  279. package/user-manage/src/material.module.d.ts +28 -0
  280. package/user-manage/src/notifications/notification.component.d.ts +19 -0
  281. package/user-manage/src/removeKynFromIBM.service.d.ts +8 -0
  282. package/user-manage/src/services/api.service.d.ts +21 -0
  283. package/user-manage/src/services/dns.service.d.ts +14 -0
  284. package/user-manage/src/services/line.service.d.ts +17 -0
  285. package/user-manage/src/services/notification.service.d.ts +18 -0
  286. package/user-manage/src/services/removeKynFromIBM.service.d.ts +8 -0
  287. package/user-manage/src/services/site-settings.service.d.ts +9 -0
  288. package/user-manage/src/services/sorting-utils.service.d.ts +26 -0
  289. package/user-manage/src/services/user.service.d.ts +43 -0
  290. package/user-manage/src/services/users-search.service.d.ts +25 -0
  291. package/user-manage/src/services/utils.service.d.ts +9 -0
  292. package/user-manage/src/user-calling/user-calling-extension/user-calling-extension.component.d.ts +24 -0
  293. package/user-manage/src/user-calling/user-calling.component.d.ts +30 -0
  294. package/user-manage/src/user-info/user-info.component.d.ts +9 -0
  295. package/user-manage/src/user-manage-widget.component.d.ts +44 -0
  296. package/user-manage/src/user-manage.module.d.ts +21 -0
  297. package/user-manage/src/utils/app-loader/app-loader.d.ts +6 -0
  298. package/user-manage/src/utils/pagination/pagination.component.d.ts +18 -0
  299. package/users-list/index.d.ts +5 -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
  332. package/.editorconfig +0 -16
  333. package/.hintrc +0 -14
  334. package/.vscode/extensions.json +0 -4
  335. package/.vscode/launch.json +0 -20
  336. package/.vscode/tasks.json +0 -42
  337. package/angular.json +0 -141
  338. package/projects/tuki/widgets/README.md +0 -24
  339. package/projects/tuki/widgets/di2mt/api/api.endpoints.ts +0 -26
  340. package/projects/tuki/widgets/di2mt/assets/icons/already_upgraded.png +0 -0
  341. package/projects/tuki/widgets/di2mt/assets/icons/check2_icon.png +0 -0
  342. package/projects/tuki/widgets/di2mt/assets/icons/check_icon.png +0 -0
  343. package/projects/tuki/widgets/di2mt/assets/icons/details_d_icon.svg +0 -3
  344. package/projects/tuki/widgets/di2mt/assets/icons/expand_icon.png +0 -0
  345. package/projects/tuki/widgets/di2mt/assets/icons/issue_icon.png +0 -0
  346. package/projects/tuki/widgets/di2mt/assets/icons/menu_icon.png +0 -0
  347. package/projects/tuki/widgets/di2mt/assets/icons/ready_to_upgrade.png +0 -0
  348. package/projects/tuki/widgets/di2mt/assets/icons/search_icon.png +0 -0
  349. package/projects/tuki/widgets/di2mt/assets/icons/site.png +0 -0
  350. package/projects/tuki/widgets/di2mt/assets/icons/user.png +0 -0
  351. package/projects/tuki/widgets/di2mt/assets/icons/warning_icon.png +0 -0
  352. package/projects/tuki/widgets/di2mt/ng-package.json +0 -7
  353. package/projects/tuki/widgets/di2mt/shared/components/card/card.component.html +0 -11
  354. package/projects/tuki/widgets/di2mt/shared/components/card/card.component.scss +0 -48
  355. package/projects/tuki/widgets/di2mt/shared/components/card/card.component.ts +0 -10
  356. package/projects/tuki/widgets/di2mt/shared/components/chart-card/chart-card.component.html +0 -15
  357. package/projects/tuki/widgets/di2mt/shared/components/chart-card/chart-card.component.scss +0 -38
  358. package/projects/tuki/widgets/di2mt/shared/components/chart-card/chart-card.component.ts +0 -71
  359. package/projects/tuki/widgets/di2mt/shared/components/index.ts +0 -6
  360. package/projects/tuki/widgets/di2mt/shared/components/stat-card/stat-card.component.html +0 -57
  361. package/projects/tuki/widgets/di2mt/shared/components/stat-card/stat-card.component.scss +0 -74
  362. package/projects/tuki/widgets/di2mt/shared/components/stat-card/stat-card.component.ts +0 -44
  363. package/projects/tuki/widgets/di2mt/shared/components/status-list-card/status-list-card.component.html +0 -28
  364. package/projects/tuki/widgets/di2mt/shared/components/status-list-card/status-list-card.component.scss +0 -55
  365. package/projects/tuki/widgets/di2mt/shared/components/status-list-card/status-list-card.component.ts +0 -11
  366. package/projects/tuki/widgets/di2mt/shared/components/summary-card/summary-card.component.html +0 -12
  367. package/projects/tuki/widgets/di2mt/shared/components/summary-card/summary-card.component.scss +0 -79
  368. package/projects/tuki/widgets/di2mt/shared/components/summary-card/summary-card.component.ts +0 -27
  369. package/projects/tuki/widgets/di2mt/shared/components/table-filters/table-filters.component.html +0 -28
  370. package/projects/tuki/widgets/di2mt/shared/components/table-filters/table-filters.component.scss +0 -244
  371. package/projects/tuki/widgets/di2mt/shared/components/table-filters/table-filters.component.ts +0 -28
  372. package/projects/tuki/widgets/di2mt/shared/constants/app.constants.ts +0 -96
  373. package/projects/tuki/widgets/di2mt/shared/material.module.ts +0 -36
  374. package/projects/tuki/widgets/di2mt/shared/services/api.service.ts +0 -92
  375. package/projects/tuki/widgets/di2mt/shared/shared.module.ts +0 -38
  376. package/projects/tuki/widgets/di2mt/shared/types/constants.ts +0 -15
  377. package/projects/tuki/widgets/di2mt/shared/types/data-table.ts +0 -5
  378. package/projects/tuki/widgets/di2mt/shared/types/table/filter.ts +0 -14
  379. package/projects/tuki/widgets/di2mt/styles/tuki-widgets-theme.scss +0 -13
  380. package/projects/tuki/widgets/di2mt/styles/variables.scss +0 -92
  381. package/projects/tuki/widgets/di2mt/widgets/site-upgrade/progress-bar/progress-bar.component.html +0 -3
  382. package/projects/tuki/widgets/di2mt/widgets/site-upgrade/progress-bar/progress-bar.component.scss +0 -37
  383. package/projects/tuki/widgets/di2mt/widgets/site-upgrade/progress-bar/progress-bar.component.ts +0 -40
  384. package/projects/tuki/widgets/di2mt/widgets/site-upgrade/site-upgrade-data-table/site-upgrade-data-table.component.html +0 -158
  385. package/projects/tuki/widgets/di2mt/widgets/site-upgrade/site-upgrade-data-table/site-upgrade-data-table.component.scss +0 -430
  386. package/projects/tuki/widgets/di2mt/widgets/site-upgrade/site-upgrade-data-table/site-upgrade-data-table.component.ts +0 -362
  387. package/projects/tuki/widgets/di2mt/widgets/site-upgrade/site-upgrade.module.ts +0 -33
  388. package/projects/tuki/widgets/di2mt/widgets/site-upgrade/site-upgrade.service.ts +0 -102
  389. package/projects/tuki/widgets/di2mt/widgets/site-upgrade/types/user-upgrade.ts +0 -22
  390. package/projects/tuki/widgets/di2mt/widgets/upgrade-overview/cards/already-upgraded-sites/already-upgraded-sites-card.component.ts +0 -52
  391. package/projects/tuki/widgets/di2mt/widgets/upgrade-overview/cards/already-upgraded-users/already-upgraded-users-card.component.ts +0 -53
  392. package/projects/tuki/widgets/di2mt/widgets/upgrade-overview/cards/preconditions-status-list/preconditions-status-list-card.component.ts +0 -67
  393. package/projects/tuki/widgets/di2mt/widgets/upgrade-overview/cards/ready-to-upgrade-sites/ready-to-upgrade-sites-card.component.html +0 -7
  394. package/projects/tuki/widgets/di2mt/widgets/upgrade-overview/cards/ready-to-upgrade-sites/ready-to-upgrade-sites-card.component.scss +0 -0
  395. package/projects/tuki/widgets/di2mt/widgets/upgrade-overview/cards/ready-to-upgrade-sites/ready-to-upgrade-sites-card.component.ts +0 -45
  396. package/projects/tuki/widgets/di2mt/widgets/upgrade-overview/cards/ready-to-upgrade-users/ready-to-upgrade-users-card.component.html +0 -7
  397. package/projects/tuki/widgets/di2mt/widgets/upgrade-overview/cards/ready-to-upgrade-users/ready-to-upgrade-users-card.component.scss +0 -0
  398. package/projects/tuki/widgets/di2mt/widgets/upgrade-overview/cards/ready-to-upgrade-users/ready-to-upgrade-users-card.component.ts +0 -45
  399. package/projects/tuki/widgets/di2mt/widgets/upgrade-overview/cards/site-infrastructure-status-list/site-infrastructure-status-list-card.component.ts +0 -59
  400. package/projects/tuki/widgets/di2mt/widgets/upgrade-overview/cards/upgrade-state-comparison-chart/upgrade-state-comparison-chart-card.component.ts +0 -70
  401. package/projects/tuki/widgets/di2mt/widgets/upgrade-overview/upgrade-overview.module.ts +0 -42
  402. package/projects/tuki/widgets/di2mt/widgets/upgrade-overview/upgrade-overview.service.ts +0 -95
  403. package/projects/tuki/widgets/di2mt/widgets/user-upgrade/user-upgrade-data-table/user-upgrade-data-table.component.html +0 -186
  404. package/projects/tuki/widgets/di2mt/widgets/user-upgrade/user-upgrade-data-table/user-upgrade-data-table.component.scss +0 -345
  405. package/projects/tuki/widgets/di2mt/widgets/user-upgrade/user-upgrade-data-table/user-upgrade-data-table.component.ts +0 -313
  406. package/projects/tuki/widgets/di2mt/widgets/user-upgrade/user-upgrade.module.ts +0 -34
  407. package/projects/tuki/widgets/di2mt/widgets/user-upgrade/user-upgrade.service.ts +0 -79
  408. package/projects/tuki/widgets/karma.conf.js +0 -44
  409. package/projects/tuki/widgets/ng-package.json +0 -10
  410. package/projects/tuki/widgets/package.json +0 -13
  411. package/projects/tuki/widgets/src/lib/widgets.component.spec.ts +0 -23
  412. package/projects/tuki/widgets/src/lib/widgets.component.ts +0 -20
  413. package/projects/tuki/widgets/src/lib/widgets.module.ts +0 -16
  414. package/projects/tuki/widgets/src/lib/widgets.service.spec.ts +0 -16
  415. package/projects/tuki/widgets/src/lib/widgets.service.ts +0 -9
  416. package/projects/tuki/widgets/src/test.ts +0 -27
  417. package/projects/tuki/widgets/styles.scss +0 -572
  418. package/projects/tuki/widgets/tsconfig.lib.json +0 -36
  419. package/projects/tuki/widgets/tsconfig.lib.prod.json +0 -10
  420. package/projects/tuki/widgets/tsconfig.spec.json +0 -17
  421. package/projects/tuki/widgets/user-device-manage/ng-package.json +0 -7
  422. package/projects/tuki/widgets/user-device-manage/src/app.constants.ts +0 -96
  423. package/projects/tuki/widgets/user-device-manage/src/assets/icons/arrow-left.svg +0 -5
  424. package/projects/tuki/widgets/user-device-manage/src/assets/icons/arrow-right.svg +0 -5
  425. package/projects/tuki/widgets/user-device-manage/src/assets/icons/close_icon_x.svg +0 -3
  426. package/projects/tuki/widgets/user-device-manage/src/assets/icons/delete_icon.svg +0 -5
  427. package/projects/tuki/widgets/user-device-manage/src/assets/icons/dragger-vertical-icon.svg +0 -3
  428. package/projects/tuki/widgets/user-device-manage/src/assets/icons/icon_user.svg +0 -1
  429. package/projects/tuki/widgets/user-device-manage/src/assets/icons/vartical_divider_icon.svg +0 -3
  430. package/projects/tuki/widgets/user-device-manage/src/classes/device.ts +0 -292
  431. package/projects/tuki/widgets/user-device-manage/src/classes/line-association-interface.ts +0 -50
  432. package/projects/tuki/widgets/user-device-manage/src/classes/line-association.ts +0 -177
  433. package/projects/tuki/widgets/user-device-manage/src/classes/line-call-info-display.ts +0 -21
  434. package/projects/tuki/widgets/user-device-manage/src/classes/line-directory.ts +0 -41
  435. package/projects/tuki/widgets/user-device-manage/src/classes/line.ts +0 -144
  436. package/projects/tuki/widgets/user-device-manage/src/classes/notification.ts +0 -40
  437. package/projects/tuki/widgets/user-device-manage/src/classes/recording-options.ts +0 -6
  438. package/projects/tuki/widgets/user-device-manage/src/classes/simplified-user.ts +0 -169
  439. package/projects/tuki/widgets/user-device-manage/src/classes/site-defaults.ts +0 -167
  440. package/projects/tuki/widgets/user-device-manage/src/classes/translation-pattern.ts +0 -50
  441. package/projects/tuki/widgets/user-device-manage/src/classes/types.ts +0 -19
  442. package/projects/tuki/widgets/user-device-manage/src/classes/user-interface.ts +0 -225
  443. package/projects/tuki/widgets/user-device-manage/src/classes/user.ts +0 -8
  444. package/projects/tuki/widgets/user-device-manage/src/common-functions.ts +0 -16
  445. package/projects/tuki/widgets/user-device-manage/src/confirm-dialog/info-dialog.component.html +0 -14
  446. package/projects/tuki/widgets/user-device-manage/src/confirm-dialog/info-dialog.component.scss +0 -80
  447. package/projects/tuki/widgets/user-device-manage/src/confirm-dialog/info-dialog.component.ts +0 -35
  448. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/associated-line-row/associated-line-row.component.html +0 -21
  449. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/associated-line-row/associated-line-row.component.scss +0 -97
  450. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/associated-line-row/associated-line-row.component.ts +0 -28
  451. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/device-associated-line-details-box/device-associated-line-details-box.component.html +0 -6
  452. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/device-associated-line-details-box/device-associated-line-details-box.component.scss +0 -20
  453. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/device-associated-line-details-box/device-associated-line-details-box.component.ts +0 -13
  454. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/device-associated-line-extension/device-associated-line-extension.component.html +0 -6
  455. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/device-associated-line-extension/device-associated-line-extension.component.scss +0 -4
  456. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/device-associated-line-extension/device-associated-line-extension.component.ts +0 -63
  457. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/device-associated-line.component.html +0 -241
  458. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/device-associated-line.component.scss +0 -500
  459. package/projects/tuki/widgets/user-device-manage/src/device-associated-line/device-associated-line.component.ts +0 -194
  460. package/projects/tuki/widgets/user-device-manage/src/device-list/device-list.component.html +0 -27
  461. package/projects/tuki/widgets/user-device-manage/src/device-list/device-list.component.scss +0 -131
  462. package/projects/tuki/widgets/user-device-manage/src/device-list/device-list.component.ts +0 -25
  463. package/projects/tuki/widgets/user-device-manage/src/device-manage-widget.component.html +0 -209
  464. package/projects/tuki/widgets/user-device-manage/src/device-manage-widget.component.scss +0 -502
  465. package/projects/tuki/widgets/user-device-manage/src/device-manage-widget.component.ts +0 -354
  466. package/projects/tuki/widgets/user-device-manage/src/environments/environment.prod.ts +0 -9
  467. package/projects/tuki/widgets/user-device-manage/src/environments/environment.ts +0 -10
  468. package/projects/tuki/widgets/user-device-manage/src/interseptors/auth.interceptor.ts +0 -35
  469. package/projects/tuki/widgets/user-device-manage/src/lazy-loading-select/lazy-loading-select.component.html +0 -50
  470. package/projects/tuki/widgets/user-device-manage/src/lazy-loading-select/lazy-loading-select.component.scss +0 -8
  471. package/projects/tuki/widgets/user-device-manage/src/lazy-loading-select/lazy-loading-select.component.ts +0 -81
  472. package/projects/tuki/widgets/user-device-manage/src/material.module.ts +0 -87
  473. package/projects/tuki/widgets/user-device-manage/src/notifications/notification.component.html +0 -33
  474. package/projects/tuki/widgets/user-device-manage/src/notifications/notification.component.scss +0 -84
  475. package/projects/tuki/widgets/user-device-manage/src/notifications/notification.component.ts +0 -46
  476. package/projects/tuki/widgets/user-device-manage/src/removeKynFromIBM.service.ts +0 -25
  477. package/projects/tuki/widgets/user-device-manage/src/services/api.service.ts +0 -87
  478. package/projects/tuki/widgets/user-device-manage/src/services/common-functions.ts +0 -17
  479. package/projects/tuki/widgets/user-device-manage/src/services/device.service.ts +0 -95
  480. package/projects/tuki/widgets/user-device-manage/src/services/dns.service.ts +0 -111
  481. package/projects/tuki/widgets/user-device-manage/src/services/line.service.ts +0 -89
  482. package/projects/tuki/widgets/user-device-manage/src/services/notification.service.ts +0 -68
  483. package/projects/tuki/widgets/user-device-manage/src/services/removeKynFromIBM.service.ts +0 -25
  484. package/projects/tuki/widgets/user-device-manage/src/services/site-settings.service.ts +0 -82
  485. package/projects/tuki/widgets/user-device-manage/src/services/sorting-utils.service.ts +0 -203
  486. package/projects/tuki/widgets/user-device-manage/src/services/user.service.ts +0 -283
  487. package/projects/tuki/widgets/user-device-manage/src/services/utils.service.ts +0 -87
  488. package/projects/tuki/widgets/user-device-manage/src/services/validation.service.ts +0 -829
  489. package/projects/tuki/widgets/user-device-manage/src/styles/_variables.scss +0 -90
  490. package/projects/tuki/widgets/user-device-manage/src/styles/form.scss +0 -231
  491. package/projects/tuki/widgets/user-device-manage/src/styles/icons.scss +0 -32
  492. package/projects/tuki/widgets/user-device-manage/src/styles/styles.scss +0 -110
  493. package/projects/tuki/widgets/user-device-manage/src/styles/tables.scss +0 -30
  494. package/projects/tuki/widgets/user-device-manage/src/user-device-manage.module.ts +0 -73
  495. package/projects/tuki/widgets/user-device-manage/src/utils/app-loader/app-loader.component.html +0 -6
  496. package/projects/tuki/widgets/user-device-manage/src/utils/app-loader/app-loader.component.scss +0 -11
  497. package/projects/tuki/widgets/user-device-manage/src/utils/app-loader/app-loader.ts +0 -13
  498. package/projects/tuki/widgets/user-manage/ng-package.json +0 -7
  499. package/projects/tuki/widgets/user-manage/src/app.constants.ts +0 -50
  500. package/projects/tuki/widgets/user-manage/src/assets/icons/arrow-left.svg +0 -5
  501. package/projects/tuki/widgets/user-manage/src/assets/icons/arrow-right.svg +0 -5
  502. package/projects/tuki/widgets/user-manage/src/assets/icons/delete_icon.svg +0 -5
  503. package/projects/tuki/widgets/user-manage/src/assets/icons/dragger-vertical-icon.svg +0 -3
  504. package/projects/tuki/widgets/user-manage/src/assets/icons/icon_user.svg +0 -1
  505. package/projects/tuki/widgets/user-manage/src/assets/icons/vartical_divider_icon.svg +0 -3
  506. package/projects/tuki/widgets/user-manage/src/classes/device.ts +0 -232
  507. package/projects/tuki/widgets/user-manage/src/classes/line-association-interface.ts +0 -43
  508. package/projects/tuki/widgets/user-manage/src/classes/line-association.ts +0 -161
  509. package/projects/tuki/widgets/user-manage/src/classes/line-call-info-display.ts +0 -21
  510. package/projects/tuki/widgets/user-manage/src/classes/line-directory.ts +0 -42
  511. package/projects/tuki/widgets/user-manage/src/classes/line.ts +0 -144
  512. package/projects/tuki/widgets/user-manage/src/classes/notification.ts +0 -39
  513. package/projects/tuki/widgets/user-manage/src/classes/pagination.ts +0 -18
  514. package/projects/tuki/widgets/user-manage/src/classes/recording-options.ts +0 -6
  515. package/projects/tuki/widgets/user-manage/src/classes/simplified-user.ts +0 -165
  516. package/projects/tuki/widgets/user-manage/src/classes/table-data.ts +0 -6
  517. package/projects/tuki/widgets/user-manage/src/classes/translation-pattern.ts +0 -49
  518. package/projects/tuki/widgets/user-manage/src/classes/user-interface.ts +0 -225
  519. package/projects/tuki/widgets/user-manage/src/classes/user-list.ts +0 -42
  520. package/projects/tuki/widgets/user-manage/src/classes/user.ts +0 -8
  521. package/projects/tuki/widgets/user-manage/src/common-functions.ts +0 -16
  522. package/projects/tuki/widgets/user-manage/src/device-list/device-list.component.html +0 -27
  523. package/projects/tuki/widgets/user-manage/src/device-list/device-list.component.scss +0 -131
  524. package/projects/tuki/widgets/user-manage/src/device-list/device-list.component.ts +0 -25
  525. package/projects/tuki/widgets/user-manage/src/environments/environment.prod.ts +0 -9
  526. package/projects/tuki/widgets/user-manage/src/environments/environment.ts +0 -10
  527. package/projects/tuki/widgets/user-manage/src/interseptors/auth.interceptor.ts +0 -35
  528. package/projects/tuki/widgets/user-manage/src/lazy-loading-select/lazy-loading-select.component.html +0 -50
  529. package/projects/tuki/widgets/user-manage/src/lazy-loading-select/lazy-loading-select.component.scss +0 -8
  530. package/projects/tuki/widgets/user-manage/src/lazy-loading-select/lazy-loading-select.component.ts +0 -81
  531. package/projects/tuki/widgets/user-manage/src/material.module.ts +0 -85
  532. package/projects/tuki/widgets/user-manage/src/notifications/notification.component.html +0 -33
  533. package/projects/tuki/widgets/user-manage/src/notifications/notification.component.scss +0 -84
  534. package/projects/tuki/widgets/user-manage/src/notifications/notification.component.ts +0 -46
  535. package/projects/tuki/widgets/user-manage/src/removeKynFromIBM.service.ts +0 -25
  536. package/projects/tuki/widgets/user-manage/src/services/api.service.ts +0 -90
  537. package/projects/tuki/widgets/user-manage/src/services/dns.service.ts +0 -116
  538. package/projects/tuki/widgets/user-manage/src/services/line.service.ts +0 -31
  539. package/projects/tuki/widgets/user-manage/src/services/notification.service.ts +0 -68
  540. package/projects/tuki/widgets/user-manage/src/services/removeKynFromIBM.service.ts +0 -25
  541. package/projects/tuki/widgets/user-manage/src/services/site-settings.service.ts +0 -35
  542. package/projects/tuki/widgets/user-manage/src/services/sorting-utils.service.ts +0 -203
  543. package/projects/tuki/widgets/user-manage/src/services/user.service.ts +0 -242
  544. package/projects/tuki/widgets/user-manage/src/services/users-search.service.ts +0 -59
  545. package/projects/tuki/widgets/user-manage/src/services/utils.service.ts +0 -71
  546. package/projects/tuki/widgets/user-manage/src/styles/_variables.scss +0 -90
  547. package/projects/tuki/widgets/user-manage/src/styles/form.scss +0 -231
  548. package/projects/tuki/widgets/user-manage/src/styles/icons.scss +0 -32
  549. package/projects/tuki/widgets/user-manage/src/styles/styles.scss +0 -110
  550. package/projects/tuki/widgets/user-manage/src/styles/tables.scss +0 -30
  551. package/projects/tuki/widgets/user-manage/src/user-calling/user-calling-extension/user-calling-extension.component.html +0 -10
  552. package/projects/tuki/widgets/user-manage/src/user-calling/user-calling-extension/user-calling-extension.component.scss +0 -429
  553. package/projects/tuki/widgets/user-manage/src/user-calling/user-calling-extension/user-calling-extension.component.ts +0 -63
  554. package/projects/tuki/widgets/user-manage/src/user-calling/user-calling.component.html +0 -32
  555. package/projects/tuki/widgets/user-manage/src/user-calling/user-calling.component.scss +0 -444
  556. package/projects/tuki/widgets/user-manage/src/user-calling/user-calling.component.ts +0 -89
  557. package/projects/tuki/widgets/user-manage/src/user-details/notification.service.ts +0 -68
  558. package/projects/tuki/widgets/user-manage/src/user-info/user-info.component.html +0 -29
  559. package/projects/tuki/widgets/user-manage/src/user-info/user-info.component.scss +0 -64
  560. package/projects/tuki/widgets/user-manage/src/user-info/user-info.component.ts +0 -19
  561. package/projects/tuki/widgets/user-manage/src/user-manage-widget.component.html +0 -290
  562. package/projects/tuki/widgets/user-manage/src/user-manage-widget.component.scss +0 -463
  563. package/projects/tuki/widgets/user-manage/src/user-manage-widget.component.ts +0 -212
  564. package/projects/tuki/widgets/user-manage/src/user-manage.module.ts +0 -63
  565. package/projects/tuki/widgets/user-manage/src/utils/app-loader/app-loader.component.html +0 -6
  566. package/projects/tuki/widgets/user-manage/src/utils/app-loader/app-loader.component.scss +0 -11
  567. package/projects/tuki/widgets/user-manage/src/utils/app-loader/app-loader.ts +0 -13
  568. package/projects/tuki/widgets/user-manage/src/utils/pagination/pagination.component.html +0 -26
  569. package/projects/tuki/widgets/user-manage/src/utils/pagination/pagination.component.scss +0 -41
  570. package/projects/tuki/widgets/user-manage/src/utils/pagination/pagination.component.ts +0 -41
  571. package/projects/tuki/widgets/users-list/ng-package.json +0 -7
  572. package/projects/tuki/widgets/users-list/src/app.constants.ts +0 -54
  573. package/projects/tuki/widgets/users-list/src/assets/icons/close_icon_modal.svg +0 -3
  574. package/projects/tuki/widgets/users-list/src/assets/icons/icon_user.svg +0 -1
  575. package/projects/tuki/widgets/users-list/src/assets/icons/move_user_to_another_location.svg +0 -14
  576. package/projects/tuki/widgets/users-list/src/assets/icons/white-close-icon.svg +0 -3
  577. package/projects/tuki/widgets/users-list/src/classes/app-location.ts +0 -36
  578. package/projects/tuki/widgets/users-list/src/classes/device.ts +0 -225
  579. package/projects/tuki/widgets/users-list/src/classes/line.ts +0 -144
  580. package/projects/tuki/widgets/users-list/src/classes/move-user.ts +0 -225
  581. package/projects/tuki/widgets/users-list/src/classes/notification.ts +0 -38
  582. package/projects/tuki/widgets/users-list/src/classes/pagination.ts +0 -18
  583. package/projects/tuki/widgets/users-list/src/classes/simlified-user.ts +0 -74
  584. package/projects/tuki/widgets/users-list/src/classes/table-data.ts +0 -6
  585. package/projects/tuki/widgets/users-list/src/classes/user-interface.ts +0 -225
  586. package/projects/tuki/widgets/users-list/src/classes/user-list.ts +0 -47
  587. package/projects/tuki/widgets/users-list/src/classes/user.ts +0 -8
  588. package/projects/tuki/widgets/users-list/src/material.module.ts +0 -94
  589. package/projects/tuki/widgets/users-list/src/move-user-wizard/move-user-stepper/device-move-user/device-move-user-wizard.component.html +0 -37
  590. package/projects/tuki/widgets/users-list/src/move-user-wizard/move-user-stepper/device-move-user/device-move-user-wizard.component.scss +0 -129
  591. package/projects/tuki/widgets/users-list/src/move-user-wizard/move-user-stepper/device-move-user/device-move-user-wizard.component.ts +0 -46
  592. package/projects/tuki/widgets/users-list/src/move-user-wizard/move-user-stepper/device-move-user-tab/devices-move-user-wizard-tab.component.html +0 -31
  593. package/projects/tuki/widgets/users-list/src/move-user-wizard/move-user-stepper/device-move-user-tab/devices-move-user-wizard-tab.component.scss +0 -20
  594. package/projects/tuki/widgets/users-list/src/move-user-wizard/move-user-stepper/device-move-user-tab/devices-move-user-wizard-tab.component.ts +0 -26
  595. package/projects/tuki/widgets/users-list/src/move-user-wizard/move-user-stepper/move-user-stepper.component.html +0 -222
  596. package/projects/tuki/widgets/users-list/src/move-user-wizard/move-user-stepper/move-user-stepper.component.scss +0 -239
  597. package/projects/tuki/widgets/users-list/src/move-user-wizard/move-user-stepper/move-user-stepper.component.ts +0 -206
  598. package/projects/tuki/widgets/users-list/src/move-user-wizard/move-user-wizard.component.html +0 -12
  599. package/projects/tuki/widgets/users-list/src/move-user-wizard/move-user-wizard.component.scss +0 -41
  600. package/projects/tuki/widgets/users-list/src/move-user-wizard/move-user-wizard.component.ts +0 -36
  601. package/projects/tuki/widgets/users-list/src/services/api-webex.service.ts +0 -14
  602. package/projects/tuki/widgets/users-list/src/services/api.service.ts +0 -90
  603. package/projects/tuki/widgets/users-list/src/services/dns.service.ts +0 -128
  604. package/projects/tuki/widgets/users-list/src/services/events-communication.service.ts +0 -11
  605. package/projects/tuki/widgets/users-list/src/services/move-user.service.ts +0 -59
  606. package/projects/tuki/widgets/users-list/src/services/notification.service.ts +0 -68
  607. package/projects/tuki/widgets/users-list/src/services/removeKynFromIBM.service.ts +0 -25
  608. package/projects/tuki/widgets/users-list/src/services/site-settings.service.ts +0 -26
  609. package/projects/tuki/widgets/users-list/src/services/user.service.ts +0 -159
  610. package/projects/tuki/widgets/users-list/src/services/users-search.service.ts +0 -139
  611. package/projects/tuki/widgets/users-list/src/styles/styles.scss +0 -572
  612. package/projects/tuki/widgets/users-list/src/user-list-confirm-dialog/user-list-confirm-dialog.component.html +0 -15
  613. package/projects/tuki/widgets/users-list/src/user-list-confirm-dialog/user-list-confirm-dialog.component.scss +0 -103
  614. package/projects/tuki/widgets/users-list/src/user-list-confirm-dialog/user-list-confirm-dialog.component.ts +0 -35
  615. package/projects/tuki/widgets/users-list/src/users-list.component.css +0 -4
  616. package/projects/tuki/widgets/users-list/src/users-list.component.css.map +0 -1
  617. package/projects/tuki/widgets/users-list/src/users-list.component.html +0 -86
  618. package/projects/tuki/widgets/users-list/src/users-list.component.scss +0 -572
  619. package/projects/tuki/widgets/users-list/src/users-list.component.ts +0 -312
  620. package/projects/tuki/widgets/users-list/src/users-list.module.ts +0 -63
  621. package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.component.css +0 -11
  622. package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.component.css.map +0 -1
  623. package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.component.html +0 -6
  624. package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.component.scss +0 -11
  625. package/projects/tuki/widgets/users-list/src/utils/app-loader/app-loader.ts +0 -13
  626. package/projects/tuki/widgets/users-list/src/utils/common-functions.ts +0 -32
  627. package/projects/tuki/widgets/users-list/src/utils/notifications/notification.component.html +0 -33
  628. package/projects/tuki/widgets/users-list/src/utils/notifications/notification.component.scss +0 -84
  629. package/projects/tuki/widgets/users-list/src/utils/notifications/notification.component.ts +0 -46
  630. package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.css +0 -45
  631. package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.css.map +0 -1
  632. package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.html +0 -26
  633. package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.scss +0 -41
  634. package/projects/tuki/widgets/users-list/src/utils/pagination/pagination.component.ts +0 -41
  635. package/projects/tuki/widgets/users-list/src/utils/utils.service.ts +0 -71
  636. package/projects/widgets-playground/src/app/app.component.html +0 -109
  637. package/projects/widgets-playground/src/app/app.component.scss +0 -15
  638. package/projects/widgets-playground/src/app/app.component.spec.ts +0 -31
  639. package/projects/widgets-playground/src/app/app.component.ts +0 -31
  640. package/projects/widgets-playground/src/app/app.module.ts +0 -43
  641. package/projects/widgets-playground/src/assets/.gitkeep +0 -0
  642. package/projects/widgets-playground/src/assets/icons/already_upgraded.png +0 -0
  643. package/projects/widgets-playground/src/assets/icons/check2_icon.png +0 -0
  644. package/projects/widgets-playground/src/assets/icons/check_icon.png +0 -0
  645. package/projects/widgets-playground/src/assets/icons/expand_icon.png +0 -0
  646. package/projects/widgets-playground/src/assets/icons/issue_icon.png +0 -0
  647. package/projects/widgets-playground/src/assets/icons/menu_icon.png +0 -0
  648. package/projects/widgets-playground/src/assets/icons/ready_to_upgrade.png +0 -0
  649. package/projects/widgets-playground/src/assets/icons/search_icon.png +0 -0
  650. package/projects/widgets-playground/src/assets/icons/site.png +0 -0
  651. package/projects/widgets-playground/src/assets/icons/user.png +0 -0
  652. package/projects/widgets-playground/src/assets/icons/warning_icon.png +0 -0
  653. package/projects/widgets-playground/src/favicon.ico +0 -0
  654. package/projects/widgets-playground/src/index.html +0 -13
  655. package/projects/widgets-playground/src/main.ts +0 -7
  656. package/projects/widgets-playground/src/styles.scss +0 -23
  657. package/projects/widgets-playground/tsconfig.app.json +0 -14
  658. package/projects/widgets-playground/tsconfig.spec.json +0 -14
  659. package/proxy.conf.js +0 -23
  660. package/tsconfig.json +0 -46
  661. /package/{projects/tuki/widgets/di2mt → di2mt}/README.md +0 -0
  662. /package/{projects/tuki/widgets/user-device-manage/public-api.ts → user-device-manage/public-api.d.ts} +0 -0
  663. /package/{projects/tuki/widgets/user-manage/public-api.ts → user-manage/public-api.d.ts} +0 -0
  664. /package/{projects/tuki/widgets/users-list/public-api.ts → users-list/public-api.d.ts} +0 -0
@@ -0,0 +1,3402 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Component, ViewEncapsulation, NgModule, ChangeDetectionStrategy, EventEmitter, Input, Output, Inject, ViewChild } 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, Observable } from 'rxjs';
7
+ import * as i9 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 i8 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 * as i12 from '@angular/material/autocomplete';
18
+ import { MatAutocompleteModule } from '@angular/material/autocomplete';
19
+ import { MatChipsModule } from '@angular/material/chips';
20
+ import { MatListModule } from '@angular/material/list';
21
+ import { MatSidenavModule } from '@angular/material/sidenav';
22
+ import { MatTreeModule } from '@angular/material/tree';
23
+ import { DragDropModule } from '@angular/cdk/drag-drop';
24
+ import { MatButtonModule } from '@angular/material/button';
25
+ import * as i11 from '@angular/material/input';
26
+ import { MatInputModule } from '@angular/material/input';
27
+ import * as i13 from '@angular/material/core';
28
+ import { MatNativeDateModule } from '@angular/material/core';
29
+ import { MatTooltipModule } from '@angular/material/tooltip';
30
+ import * as i6 from '@angular/material/form-field';
31
+ import { MatFormFieldModule } from '@angular/material/form-field';
32
+ import { MatStepperModule } from '@angular/material/stepper';
33
+ import * as i14 from '@angular/material/tabs';
34
+ import { MatTabsModule } from '@angular/material/tabs';
35
+ import { MatCardModule } from '@angular/material/card';
36
+ import * as i8$1 from '@angular/material/select';
37
+ import { MatSelectModule } from '@angular/material/select';
38
+ import { MatCheckboxModule } from '@angular/material/checkbox';
39
+ import * as i2 from '@angular/material/slide-toggle';
40
+ import { MatSlideToggleModule } from '@angular/material/slide-toggle';
41
+ import { MatTableModule } from '@angular/material/table';
42
+ import { MatPaginatorModule } from '@angular/material/paginator';
43
+ import * as i1$1 from '@angular/material/dialog';
44
+ import { MatDialogModule, MAT_DIALOG_DATA } from '@angular/material/dialog';
45
+ import * as Big from 'big.js';
46
+ import * as i10 from '@angular/material/divider';
47
+
48
+ class APIService {
49
+ constructor(httpClient) {
50
+ this.httpClient = httpClient;
51
+ this.apiUrl = window.location.protocol + '//' + window.location.hostname + '/dcp';
52
+ }
53
+ fetch(url, params, cache) {
54
+ const headers = this.getHeaders(cache);
55
+ params = params || {};
56
+ return this.httpClient.get(this.apiUrl + url, { params: this.prepareEncodedParams(params), headers });
57
+ }
58
+ post(url, body, params = {}) {
59
+ body = body || null;
60
+ const headers = this.getHeaders();
61
+ return this.httpClient.post(this.apiUrl + url, body, { params: this.prepareEncodedParams(params), headers });
62
+ }
63
+ // use when response extended data is necessary:
64
+ postExtended(url, body = null, params = {}, headers = {}) {
65
+ headers = headers || this.getHeaders();
66
+ return this.httpClient.post(this.apiUrl + url, body, {
67
+ headers,
68
+ observe: 'response',
69
+ params: this.prepareEncodedParams(params)
70
+ });
71
+ }
72
+ put(url, body = null, params = {}) {
73
+ const headers = this.getHeaders();
74
+ return this.httpClient.put(this.apiUrl + url, body, { headers, params: this.prepareEncodedParams(params) });
75
+ }
76
+ delete(url, params = {}) {
77
+ const headers = this.getHeaders();
78
+ return this.httpClient.delete(this.apiUrl + url, { headers, params: this.prepareEncodedParams(params) });
79
+ }
80
+ fetchPagination(url, pageSize, pageNumber, additionalParams = {}, cache) {
81
+ const copyAdditionalParams = JSON.parse(JSON.stringify(additionalParams));
82
+ const params = Object.assign(copyAdditionalParams, { size: pageSize.toString(), page: pageNumber.toString() });
83
+ return this.fetch(url, params, cache);
84
+ }
85
+ prepareEncodedParams(params) {
86
+ const result = {};
87
+ if (!params) {
88
+ return {};
89
+ }
90
+ for (const key of Object.keys(params)) {
91
+ if (params[key]) {
92
+ const stringParam = params[key].toString();
93
+ result[key] = stringParam.includes('+') ? encodeURIComponent(stringParam) : stringParam;
94
+ }
95
+ }
96
+ return result;
97
+ }
98
+ getHeaders(cache) {
99
+ let headers = new HttpHeaders();
100
+ if (cache) {
101
+ headers = headers.append('_Cache', 'true ');
102
+ }
103
+ const token = this.token || this.getParameterByName('token');
104
+ headers = headers.append('Authorization', 'Bearer ' + token);
105
+ return headers;
106
+ }
107
+ getParameterByName(name, url = window.location.href) {
108
+ name = name.replace(/[\[\]]/g, '\\$&');
109
+ var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), results = regex.exec(url);
110
+ if (!results)
111
+ return null;
112
+ if (!results[2])
113
+ return '';
114
+ return decodeURIComponent(results[2].replace(/\+/g, ' '));
115
+ }
116
+ }
117
+ APIService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: APIService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
118
+ APIService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: APIService });
119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: APIService, decorators: [{
120
+ type: Injectable
121
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
122
+
123
+ const API = {
124
+ USER_TOKEN: '/api/provision/:siteId/users/:userId/token',
125
+ UPDATE_USER_FIELDS: '/api/provision/:siteId/userFields/:token',
126
+ PERSIST_USER_CACHE: '/api/provision/:siteId/saveUser/:token',
127
+ USER_BY_ID: '/api/provision/:siteId/users/:userId',
128
+ QUICK_USERS_SEARCH: "/api/search/quickusers",
129
+ LOCATION: "/api/provision/options/:siteId/locations",
130
+ USER_LOCALES: "/api/provision/options/:siteId/userlocales",
131
+ USER_PROFILES: "/api/provision/options/:siteId/userprofiles",
132
+ RECORDING_PROFILE: "/api/provision/options/:siteId/recordingprofiles",
133
+ AVAILABLE_DN_IN_RANGES: "/api/sites/:siteId/available-dn-in-ranges",
134
+ DELETE_LINE: "/api/provision/:siteId/deleteLine/:pkid/:token",
135
+ DISASSOCIATE_LINE: "/api/provision/:siteId/:deviceName/deleteLineAssociation/:linePkid/:token",
136
+ CHECK_DELETE_LINE: "/api/provision/:siteId/checklinedeletion",
137
+ ASSOCIATE_LINE: "/api/provision/:siteId/:deviceName/createLineAssociation/:token",
138
+ CHECK_DESTINATION_NUMBER: "/api/provision/:siteId/check-dn",
139
+ UPDATE_LINE_FIELDS: "/api/provision/:siteId/lineFields/:pkid/:token",
140
+ UPDATE_DEVICE_FIELDS: "/api/provision/:siteId/deviceFields/:deviceName/:token",
141
+ SOFTKEY_TEMPLATES: "/api/provision/options/:siteId/softkeytemplates",
142
+ SITE_SETTINGS: "/api/sites/:siteId/settings",
143
+ LINE_SLOTS: "/api/provision/:siteId/buttontemplate",
144
+ LEAN_USER_CONVERSATION_START: "/api/provision/:siteId/leanUsers/:userId/leanUserDetailsToken",
145
+ LEAN_USER_DEVICES_CONVERSATION_START: "/api/provision/:siteId/leanUsers/:userId/leanUserDevicesToken",
146
+ LEAN_USER_LINES_CONVERSATION_START: "/api/provision/:siteId/leanUsers/:userId/:leanUserDevicesToken/leanUserLinesToken",
147
+ LEAN_USER_SNR_CONVERSATION_START: "/api/provision/:siteId/leanUsers/:userId/leanUserSNRToken",
148
+ DEVICE_LINE_MONITOR_CSS: "/api/provision/options/:siteId/callingSearchSpace"
149
+ };
150
+ const REGEX_PATTERN = {
151
+ EMAIL: '^(([^<>()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))' +
152
+ '@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,62}[a-zA-Z0-9])' +
153
+ '?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,62}[a-zA-Z0-9])?)*$'
154
+ };
155
+ const PAGINATION_DEFAULTS = {
156
+ SIZE: 10,
157
+ INDEX: 0
158
+ };
159
+ const PAGINATION_SIZE_OPTIONS = [
160
+ 10,
161
+ 50,
162
+ 100,
163
+ 500
164
+ ];
165
+ const CUCS_TO_IGNORE = [
166
+ 189,
167
+ 194,
168
+ 191,
169
+ 190
170
+ ];
171
+ const CUCMS_TO_IGNORE = [
172
+ 249,
173
+ 255,
174
+ 251,
175
+ 250
176
+ ];
177
+ const RECORDING_MEDIA_SOURCE = [
178
+ "Gateway Preferred",
179
+ "Phone Preferred"
180
+ ];
181
+ const STATIC_OPTIONS = {
182
+ CALL_PICKUP_GROUP_AUDIO_SETTING_PHONE_ACTIVE: ['Use System Default', 'Disable', 'Beep Only'],
183
+ CALL_PICKUP_GROUP_AUDIO_SETTING_PHONE_IDLE: ['Use System Default', 'Disable', 'Ring Once'],
184
+ CONF_ACCESS_MODE: ['Fixed', 'Variable'],
185
+ DEFAULT_ON_OFF: ['Default', 'On', 'Off'],
186
+ DEFAULT_EN_DIS: ['Default', 'Enabled', 'Disabled'],
187
+ DND: ['Use Common Phone Profile Setting', 'Call Reject', 'Ringer Off'],
188
+ DND_INCOMING_CALL_ALLERT: ['Disable', 'Flash Only', 'Beep Only'],
189
+ LATENT_CAPABILITY: ['Gateway Controlled', 'Modem Relay', 'Modem Passthrough', 'Modem Relay and Passthrough', 'None'],
190
+ LINE_MODE: ['Session Line mode', 'Enhanced Line mode'],
191
+ ACTIONABLE_ALERT: ['Disabled', 'Show for all Incoming Call', 'Show for Invisible Incoming Call'],
192
+ MLPP_PREEMPTION: ['Default', 'Forceful', 'Disabled'],
193
+ PACKET_CAPTURE_MODE: ['None', 'Batch Processing Mode'],
194
+ RING_VOLUME: ['0-Silent', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15'],
195
+ PORT_DIRECTION: ['Bothways', 'Inbound', 'Outbound'],
196
+ RING_SETTING_IDLE: ['Use System Default', 'Disable', 'Flash Only', 'Ring Once', 'Ring'],
197
+ RING_SETTING_ACTIVE: ['Use System Default', 'Disable', 'Flash Only', 'Ring Once', 'Ring', 'Beep Only'],
198
+ SERVICE_PROVISIONING: ['Default', 'Internal', 'External URL', 'Both'],
199
+ SETTINGS_ACCES: ['Enabled', 'Disabled', 'Restricted'],
200
+ VISUAL_MWI: ['Use System Policy', 'Light and Prompt', 'Prompt Only', 'Light Only', 'None'],
201
+ WEEKDAYS: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
202
+ BUILD_BRIDGE: ['None', 'On', 'Off', 'Default'],
203
+ TRANSFER_TYPES: ['Release to Switch', 'Supervise Transfer'],
204
+ EXTENSION_IS_BUSY_TYPES: ['Send Callers to Voicemail', 'Put Callers on Hold Without Asking', 'Ask Callers to Hold'],
205
+ CALL_ACTIONS: ['Hang Up', 'Restart Greeting', 'Route From Next Call Routing Rule', 'Take Message'],
206
+ AUTHENTICATION_802: ['User controlled', 'Disabled', 'Enabled'],
207
+ CERTIFICATE_OPERATION: ['No Pending Operation', 'Install/Upgrade', 'Delete', 'Troubleshoot'],
208
+ AUTHENTICATION_MODE: ['By Authentication String', 'By Null String', 'By Existing Certificate (precedence to LSC)', 'By Existing Certificate (precedence to MIC)'],
209
+ KEY_ORDER: ['RSA Only', 'EC Only', 'EC Preferred, RSA Backup'],
210
+ RSA_KEY_SIZE: ['512', '1024', '2048'],
211
+ RSA_KEY_SIZE_SPECIFIC_DEVICE: ['512', '1024', '2048', '3072', '4096']
212
+ };
213
+ const TOGGLE_TYPES = {
214
+ TABS: 'TABS',
215
+ ASSOCIATED_LINE_ONLY: 'ASSOCIATED_LINE_ONLY'
216
+ };
217
+
218
+ class SiteDefaults {
219
+ constructor(siteDefaults, isSharedLineSite) {
220
+ var _a, _b, _c, _d;
221
+ this.routePartitionFilter = [];
222
+ this.devicePoolFilter = [];
223
+ this.cssFilter = [];
224
+ this.voicemailProfileFilter = [];
225
+ if (siteDefaults) {
226
+ Object.assign(this, siteDefaults);
227
+ this.enableEm = siteDefaults.enableEm === 'true';
228
+ (_a = this.routePartitionFilter) === null || _a === void 0 ? void 0 : _a.sort();
229
+ (_b = this.devicePoolFilter) === null || _b === void 0 ? void 0 : _b.sort();
230
+ (_c = this.cssFilter) === null || _c === void 0 ? void 0 : _c.sort();
231
+ (_d = this.voicemailProfileFilter) === null || _d === void 0 ? void 0 : _d.sort();
232
+ }
233
+ /*if (isSharedLineSite && siteDefaults) {
234
+ this.cssFilter = siteDefaults?.sharedSitesCssFilter;
235
+ this.routePartitionFilter = siteDefaults?.sharedSitesRPFilter;
236
+ }*/
237
+ }
238
+ }
239
+
240
+ const urlMap = {
241
+ locations: API.LOCATION,
242
+ userLocales: API.USER_LOCALES,
243
+ userProfiles: API.USER_PROFILES,
244
+ recordingProfile: API.RECORDING_PROFILE,
245
+ };
246
+ class SiteSettingsService {
247
+ get callingSearchSpaceTypes() {
248
+ var _a;
249
+ return ((_a = this.siteDefaults) === null || _a === void 0 ? void 0 : _a.cssFilter) || [];
250
+ }
251
+ get devicePools() {
252
+ var _a;
253
+ return ((_a = this.siteDefaults) === null || _a === void 0 ? void 0 : _a.devicePoolFilter) || [];
254
+ }
255
+ constructor(apiService) {
256
+ this.apiService = apiService;
257
+ this.options = {};
258
+ }
259
+ getSelectionOptions(siteId, token) {
260
+ if (!siteId) {
261
+ return;
262
+ }
263
+ // @ts-ignore
264
+ const URL = urlMap[token];
265
+ return this.apiService.fetch(URL.replace(':siteId', String(siteId)))
266
+ .pipe(map((res) => {
267
+ this.options[token] = res;
268
+ return this.options;
269
+ }));
270
+ }
271
+ getDeviceSoftkeyTemplates(siteId) {
272
+ // @ts-ignore
273
+ return this.apiService.fetch(API.SOFTKEY_TEMPLATES.replace(':siteId', String(siteId)), null, false)
274
+ .pipe(map((templates) => this.deviceSoftkeyTemplates = templates));
275
+ // .pipe(this.handleError(false, true));
276
+ }
277
+ getSiteDefaults(siteId, directAccess, sharedLineSiteIds) {
278
+ /*const params = {directAccess: directAccess};
279
+ if (sharedLineSiteIds) {
280
+ // @ts-ignore
281
+ params['sharedLineSiteIds'] = sharedLineSiteIds;
282
+ }*/
283
+ return this.apiService.fetch(API.SITE_SETTINGS.replace(':siteId', String(siteId)), {})
284
+ .pipe(map((siteDefaults) => {
285
+ this.siteDefaults = new SiteDefaults(siteDefaults, !!sharedLineSiteIds);
286
+ const copiedSiteDefaults = JSON.parse(JSON.stringify(siteDefaults));
287
+ this.originalSiteDefaults = new SiteDefaults(copiedSiteDefaults, !!sharedLineSiteIds);
288
+ }));
289
+ // .pipe(this.handleError(true, true));
290
+ }
291
+ getMonitorCss(siteId) {
292
+ return this.apiService.fetch(API.DEVICE_LINE_MONITOR_CSS.replace(':siteId', String(siteId)), null);
293
+ // .pipe(this.handleError(false, true));
294
+ }
295
+ getRecordingProfile(siteId) {
296
+ return this.apiService.fetch(API.RECORDING_PROFILE.replace(':siteId', String(siteId)), null);
297
+ // .pipe(this.handleError(false, true));
298
+ }
299
+ }
300
+ SiteSettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SiteSettingsService, deps: [{ token: APIService }], target: i0.ɵɵFactoryTarget.Injectable });
301
+ SiteSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SiteSettingsService });
302
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SiteSettingsService, decorators: [{
303
+ type: Injectable
304
+ }], ctorParameters: function () { return [{ type: APIService }]; } });
305
+
306
+ const getSavableData = (model, exclude) => {
307
+ let result = Object.keys(model);
308
+ if (exclude && exclude.length) {
309
+ result = result.filter(key => !exclude.some(item => item === key));
310
+ }
311
+ return result.reduce((result, key) => {
312
+ if (model[key] instanceof Array && model[key].length && model[key][0].getSavableData) {
313
+ result[key] = model[key].map((item) => item.getSavableData());
314
+ }
315
+ else if (model[key] instanceof Object && model[key].getSavableData) {
316
+ result[key] = model[key].getSavableData();
317
+ }
318
+ else {
319
+ result[key] = model[key];
320
+ }
321
+ return result;
322
+ }, {});
323
+ };
324
+
325
+ class LineDirectory {
326
+ constructor(lineDirectory) {
327
+ Object.assign(this, lineDirectory || {});
328
+ // @ts-ignore
329
+ if (this.directoryNumber && this.routePartitionName) {
330
+ this.displayValue = `${this.directoryNumber}/${this.routePartitionName}`;
331
+ }
332
+ this.initForm();
333
+ }
334
+ getSavableData() {
335
+ return getSavableData(this, ['form', 'displayValue', 'templateDirectoryNumber']);
336
+ }
337
+ equal(itemToCompare) {
338
+ return JSON.stringify(this.getSavableData()) === JSON.stringify(itemToCompare.getSavableData());
339
+ }
340
+ initForm() {
341
+ const formBuilder = new FormBuilder();
342
+ const formSettings = {
343
+ directoryNumber: [{ value: this.directoryNumber || '', disabled: true }, [Validators.required]],
344
+ routePartitionName: [{ value: this.routePartitionName || '', disabled: true }]
345
+ };
346
+ this.form = formBuilder.group(formSettings);
347
+ }
348
+ }
349
+
350
+ class LineCallInfoDisplay {
351
+ constructor(lineCallInfoDisplay) {
352
+ Object.assign(this, lineCallInfoDisplay || {});
353
+ }
354
+ getSavableData() {
355
+ return getSavableData(this, ['form']);
356
+ }
357
+ }
358
+
359
+ class TranslationPattern {
360
+ constructor(translationPattern) {
361
+ Object.assign(this, translationPattern || {});
362
+ this.initForm();
363
+ }
364
+ getSavableData() {
365
+ return getSavableData(this, ['form', 'isNewForExistingLine']);
366
+ }
367
+ initForm() {
368
+ const formBuilder = new FormBuilder();
369
+ const formSettings = {
370
+ pattern: [{ value: this.pattern || '' }],
371
+ calledPartyTransformationMask: [{ value: this.calledPartyTransformationMask || '' }]
372
+ };
373
+ this.form = formBuilder.group(formSettings);
374
+ }
375
+ getSiteId() {
376
+ if (this.site && this.site.id != null) {
377
+ return this.site.id;
378
+ }
379
+ if (this.hasMultipleSiteIds()) {
380
+ return this.multipleSitesId.split(',')[0];
381
+ }
382
+ return null;
383
+ }
384
+ hasMultipleSiteIds() {
385
+ return this.hasMultipleSites && !!this.multipleSitesId && this.multipleSitesId.length > 0;
386
+ }
387
+ }
388
+
389
+ class LineAssociation {
390
+ constructor(lineAssociation, appValidators) {
391
+ this.sharedUsers = [];
392
+ this.sharedDevices = [];
393
+ this.active = false;
394
+ this.hasChanges = false;
395
+ Object.assign(this, lineAssociation || {});
396
+ if (lineAssociation) {
397
+ this.index = lineAssociation.index || null;
398
+ this.position = lineAssociation.position || null;
399
+ this.e164Mask = lineAssociation.e164Mask || '';
400
+ this.textLabel = lineAssociation.textLabel || '';
401
+ this.displayLabel = lineAssociation.displayLabel || '';
402
+ this.displayLabelAscii = lineAssociation.displayLabelAscii || '';
403
+ this.linePkid = lineAssociation.linePkid || lineAssociation.pkid || '';
404
+ this.maxNumberOfCalls = lineAssociation.maxNumberOfCalls || null;
405
+ this.busyTrigger = lineAssociation.busyTrigger || null;
406
+ this.directoryNumber = new LineDirectory(lineAssociation.directoryNumber);
407
+ this.didPattern = new TranslationPattern(lineAssociation.didPattern);
408
+ this.recordingOption = lineAssociation.recordingOption || RecordingOptions.disabled;
409
+ this.recordingProfile = lineAssociation.recordingProfile || '';
410
+ this.recordingMediaSource = lineAssociation.recordingMediaSource || RECORDING_MEDIA_SOURCE[0];
411
+ this.visualMWI = lineAssociation.visualMWI || '';
412
+ this.audibleMWI = lineAssociation.audibleMWI || '';
413
+ this.ringSetting_idle = lineAssociation.ringSetting_idle || '';
414
+ this.ringSetting_active = lineAssociation.ringSetting_active || '';
415
+ this.pickupAAS_idle = lineAssociation.pickupAAS_idle || '';
416
+ this.pickupAAS_active = lineAssociation.pickupAAS_active || '';
417
+ this.monitorCSS = lineAssociation.monitorCSS || '';
418
+ this.logMissedCall = lineAssociation.logMissedCall || true;
419
+ this.callInfoDisplay = new LineCallInfoDisplay(lineAssociation.callInfoDisplay);
420
+ this.lineLocalId = lineAssociation.lineLocalId || lineAssociation.localId || '';
421
+ this.callingSearchSpace = lineAssociation.callingSearchSpace || '';
422
+ this.ownerUserId = lineAssociation.ownerUserId;
423
+ this.associated = lineAssociation.associated;
424
+ this.alertingName = lineAssociation.alertingName;
425
+ this.description = lineAssociation.description;
426
+ this.patternUsage = lineAssociation.patternUsage;
427
+ this.plarDestinationNumber = lineAssociation.plarDestinationNumber;
428
+ this.prefixDigits = lineAssociation.prefixDigits;
429
+ this.plarDescription = lineAssociation.plarDescription;
430
+ this.plarEnabled = lineAssociation.plarEnabled;
431
+ this.populateWithDid = lineAssociation.populateWithDid;
432
+ }
433
+ this.initForm(appValidators);
434
+ }
435
+ getSavableData() {
436
+ const excludedFields = ['viewMode', 'form', 'callingSearchSpace', 'plarDestinationNumber', 'prefixDigits', 'plarDescription', 'plarEnabled', 'hasChanges', 'active'];
437
+ return getSavableData(this, excludedFields);
438
+ }
439
+ getFullData() {
440
+ return getSavableData(this, ['form', 'hasChanges', 'active']);
441
+ }
442
+ getDnSavableData() {
443
+ }
444
+ /*initForm() {
445
+ // TEMP simplified line form
446
+ const formBuilder = new FormBuilder();
447
+ const formSettings = {
448
+ directoryNumber: [this.directoryNumber.directoryNumber || ''],
449
+ textLabel: [this.textLabel || ''],
450
+ };
451
+ this.form = formBuilder.group(formSettings);
452
+ }*/
453
+ initForm(appValidators) {
454
+ const formBuilder = new FormBuilder();
455
+ const formSettings = {
456
+ displayLabel: [this.displayLabel || '', [Validators.maxLength(30), Validators.pattern('[^%&\\[{}|"<>\\]]*')]],
457
+ e164Mask: [this.e164Mask || '', [appValidators.e164MaskLabel]],
458
+ textLabel: [this.textLabel || '', [Validators.maxLength(30), Validators.pattern('[^"]*')]],
459
+ maxNumberOfCalls: [this.maxNumberOfCalls || '', [Validators.min(0)]],
460
+ busyTrigger: [this.busyTrigger || '', [Validators.min(0), Validators.max(this.maxNumberOfCalls || 200)]],
461
+ recordingOption: [this.recordingOption || ''],
462
+ recordingProfile: [this.recordingProfile || '', [appValidators.conditionalRequired('recordingOption', [RecordingOptions.auto_enabled, RecordingOptions.selective_enabled])]],
463
+ recordingMediaSource: [this.recordingMediaSource || ''],
464
+ visualMWI: [this.visualMWI || ''],
465
+ audibleMWI: [this.audibleMWI || ''],
466
+ ringSetting_idle: [this.ringSetting_idle || ''],
467
+ ringSetting_active: [this.ringSetting_active || ''],
468
+ pickupAAS_idle: [this.pickupAAS_idle || ''],
469
+ pickupAAS_active: [this.pickupAAS_active || ''],
470
+ monitorCSS: [this.monitorCSS || ''],
471
+ logMissedCall: [this.logMissedCall === 'true'],
472
+ callerName: [this.callInfoDisplay && this.callInfoDisplay.callerName === 'true'],
473
+ callerNumber: [this.callInfoDisplay && this.callInfoDisplay.callerNumber === 'true'],
474
+ redirectedNumber: [this.callInfoDisplay && this.callInfoDisplay.redirectedNumber === 'true'],
475
+ dialedNumber: [this.callInfoDisplay && this.callInfoDisplay.dialedNumber === 'true'],
476
+ // alertingName: [this.alertingName || ''],
477
+ // description: [this.description || ''],
478
+ // displayLabelAscii: [this.displayLabelAscii || '', [appValidators.displayLabelAscii]]
479
+ };
480
+ this.form = formBuilder.group(formSettings);
481
+ if (this.directoryNumber) {
482
+ this.form.addControl('directoryNumber', this.directoryNumber.form);
483
+ }
484
+ if (this.didPattern) {
485
+ this.form.addControl('didPattern', this.didPattern.form);
486
+ }
487
+ }
488
+ equals(line) {
489
+ if (!line) {
490
+ return false;
491
+ }
492
+ return this.directoryNumber.directoryNumber === line.directoryNumber.directoryNumber &&
493
+ this.directoryNumber.routePartitionName === line.directoryNumber.routePartitionName;
494
+ }
495
+ fullEqual(line) {
496
+ if (!line) {
497
+ return false;
498
+ }
499
+ return JSON.stringify(this.getFullData()) === JSON.stringify(line.getFullData());
500
+ }
501
+ }
502
+
503
+ class Device {
504
+ constructor(device, validationService) {
505
+ var _a;
506
+ this.lineAssociationsHasChanges = false;
507
+ this.plarService = false;
508
+ if (device) {
509
+ this.name = device.name;
510
+ this.pkiid = device.pkiid;
511
+ this.deviceType = device.deviceType;
512
+ this.protocol = device.protocol;
513
+ this.description = device.description;
514
+ this.buttonTemplate = device.buttonTemplate;
515
+ this.softkeyTemplate = device.softkeyTemplate;
516
+ this.devicePoolName = device.devicePoolName;
517
+ this.location = device.location;
518
+ this.firmwareVersion = device.firmwareVersion;
519
+ this.plarService = device.plarService;
520
+ this.callingSearchSpaceName = device.callingSearchSpaceName;
521
+ this.registrationStatus = 'Unknown'; // TEMP for demo
522
+ this.ipAddress = 'None'; // TEMP for demo
523
+ this.lineAssociations = ((_a = device.lineAssociations) === null || _a === void 0 ? void 0 : _a.length) ?
524
+ device.lineAssociations.map((line) => new LineAssociation(line, validationService)) : [];
525
+ }
526
+ this.initForm();
527
+ }
528
+ initForm() {
529
+ const formBuilder = new FormBuilder();
530
+ const formSettings = {
531
+ ipAddress: [{ value: this.ipAddress || '', disabled: true }],
532
+ registrationStatus: [{ value: this.registrationStatus || '', disabled: true }],
533
+ description: [{ value: this.description || '', disabled: false }],
534
+ protocol: [{ value: this.protocol || '', disabled: true }],
535
+ softkeyTemplate: [{ value: this.softkeyTemplate || '', disabled: false }],
536
+ buttonTemplate: [{ value: this.buttonTemplate || '', disabled: true }],
537
+ location: [{ value: this.location || '', disabled: true }],
538
+ devicePoolName: [{ value: this.devicePoolName || '', disabled: false }],
539
+ callingSearchSpaceName: [{ value: this.callingSearchSpaceName || '', disabled: false }],
540
+ firmwareVersion: [{ value: this.firmwareVersion || '', disabled: true }],
541
+ plarService: [{ value: this.plarService || '', disabled: true }],
542
+ };
543
+ this.form = formBuilder.group(formSettings);
544
+ }
545
+ getSavableData() {
546
+ const excludedFields = ['form', 'ipAddress', 'registrationStatus', 'isCtiRoutePoint', 'deviceKind', 'alreadyUsedName', 'lineAssociationsHasChanges'];
547
+ return getSavableData(this, excludedFields);
548
+ }
549
+ getNoLinesFullData() {
550
+ const excludedFields = ['form', 'lineAssociations', 'lineAssociationsHasChanges'];
551
+ return getSavableData(this, excludedFields);
552
+ }
553
+ getDeviceInfoSavableData() {
554
+ const excludedFields = ['form', 'ipAddress', 'registrationStatus', 'lineAssociations', 'lineAssociationsHasChanges'];
555
+ return getSavableData(this, excludedFields);
556
+ }
557
+ }
558
+ var RecordingOptions;
559
+ (function (RecordingOptions) {
560
+ RecordingOptions["disabled"] = "Call Recording Disabled";
561
+ RecordingOptions["auto_enabled"] = "Automatic Call Recording Enabled";
562
+ RecordingOptions["selective_enabled"] = "Selective Call Recording Enabled";
563
+ })(RecordingOptions || (RecordingOptions = {}));
564
+ class Buttontemplate {
565
+ constructor() { }
566
+ }
567
+ var DeviceViewType;
568
+ (function (DeviceViewType) {
569
+ DeviceViewType[DeviceViewType["INFO"] = 0] = "INFO";
570
+ DeviceViewType[DeviceViewType["LINES"] = 1] = "LINES";
571
+ DeviceViewType[DeviceViewType["DIALS"] = 2] = "DIALS";
572
+ DeviceViewType[DeviceViewType["BLF"] = 3] = "BLF";
573
+ })(DeviceViewType || (DeviceViewType = {}));
574
+ var DeviceKind;
575
+ (function (DeviceKind) {
576
+ DeviceKind["device"] = "devices";
577
+ DeviceKind["deviceProfile"] = "deviceProfiles";
578
+ })(DeviceKind || (DeviceKind = {}));
579
+ var DeviceTypes$1;
580
+ (function (DeviceTypes) {
581
+ DeviceTypes["CTI_ROUTE_POINT"] = "CTI Route Point";
582
+ DeviceTypes["CTI_PORT"] = "CTI Port";
583
+ DeviceTypes["CTI_REMOTE"] = "CTI Remote Device";
584
+ })(DeviceTypes$1 || (DeviceTypes$1 = {}));
585
+
586
+ class SimplifiedUser {
587
+ constructor(user, validationService) {
588
+ var _a, _b;
589
+ if (user) {
590
+ this.userid = user.userid;
591
+ this.email = user.email;
592
+ this.firstName = user.firstName;
593
+ this.lastName = user.lastName;
594
+ this.token = user.token;
595
+ this.siteId = user.siteId;
596
+ this.siteName = user.siteName;
597
+ this.department = user.department;
598
+ this.manager = user.manager;
599
+ this.associatedPc = user.associatedPc;
600
+ this.digestCredentials = user.digestCredentials;
601
+ this.userProfile = user.userProfile;
602
+ this.enableMobileVoiceAccess = user.enableMobileVoiceAccess;
603
+ this.userLocale = user.userLocale;
604
+ this.confirmDigestCredentials = user.confirmDigestCredentials;
605
+ this.middleName = user.middleName;
606
+ this.telephoneNumber = user.telephoneNumber;
607
+ this.mobileNumber = user.mobileNumber;
608
+ this.directoryUri = user.directoryUri;
609
+ this.title = user.title;
610
+ this.homeNumber = user.homeNumber;
611
+ this.pagerNumber = user.pagerNumber;
612
+ this.displayName = user.displayName;
613
+ if ((_a = user.devices) === null || _a === void 0 ? void 0 : _a.length) {
614
+ this.devices = user.devices.map((device) => new Device(device, validationService));
615
+ if ((_b = user.lines) === null || _b === void 0 ? void 0 : _b.length) {
616
+ this.devices.forEach(device => {
617
+ var _a;
618
+ if ((_a = device === null || device === void 0 ? void 0 : device.lineAssociations) === null || _a === void 0 ? void 0 : _a.length) {
619
+ device.lineAssociations.forEach(lineAssociation => {
620
+ lineAssociation.callingSearchSpace = this.getLineVal(lineAssociation, user.lines, 'callingSearchSpace');
621
+ lineAssociation.textLabel = lineAssociation.textLabel || this.getLineVal(lineAssociation, user.lines, 'textLabel') || '';
622
+ lineAssociation.alertingName = lineAssociation.alertingName || this.getLineVal(lineAssociation, user.lines, 'alertingName') || '';
623
+ });
624
+ }
625
+ });
626
+ }
627
+ }
628
+ }
629
+ this.initForm();
630
+ }
631
+ getLineVal(lineAssociation, lines, token) {
632
+ const lineForVal = lines.find((line) => line.directoryNumber.directoryNumber === lineAssociation.directoryNumber.directoryNumber);
633
+ return lineForVal && lineForVal[token] || '';
634
+ }
635
+ initForm() {
636
+ const formBuilder = new FormBuilder();
637
+ const formSettings = {
638
+ userid: [{ value: this.userid || '', disabled: false }, [Validators.required, Validators.maxLength(128)]],
639
+ email: [{ value: this.email || '', disabled: false }, [
640
+ Validators.pattern(REGEX_PATTERN.EMAIL),
641
+ Validators.required
642
+ ]],
643
+ firstName: [{ value: this.firstName || '', disabled: false }],
644
+ lastName: [{ value: this.lastName || '', disabled: false }, Validators.required],
645
+ department: [{ value: this.department || '', disabled: false }],
646
+ middleName: [{ value: this.middleName || '', disabled: false }],
647
+ title: [{ value: this.title || '', disabled: false }],
648
+ telephoneNumber: [{ value: this.telephoneNumber || '', disabled: false }],
649
+ homeNumber: [{ value: this.homeNumber || '', disabled: false }],
650
+ mobileNumber: [{ value: this.mobileNumber || '', disabled: false }],
651
+ pagerNumber: [{ value: this.pagerNumber || '', disabled: false }],
652
+ displayName: [{ value: this.displayName || '', disabled: false }],
653
+ manager: [{ value: this.manager || '', disabled: false }],
654
+ associatedPc: [this.associatedPc || ''],
655
+ directoryUri: [this.directoryUri || ''],
656
+ userProfile: [this.userProfile],
657
+ enableMobileVoiceAccess: [this.enableMobileVoiceAccess],
658
+ userLocale: [this.userLocale || ''],
659
+ digestCredentials: [''],
660
+ confirmDigestCredentials: ['']
661
+ };
662
+ this.form = formBuilder.group(formSettings);
663
+ }
664
+ toggleEditMode() {
665
+ this.editMode = !this.editMode;
666
+ ['userid', 'email', 'firstName', 'lastName'].forEach(token => {
667
+ var _a, _b;
668
+ if (this.editMode) {
669
+ (_a = this.form.get(token)) === null || _a === void 0 ? void 0 : _a.enable();
670
+ }
671
+ else {
672
+ (_b = this.form.get(token)) === null || _b === void 0 ? void 0 : _b.disable();
673
+ }
674
+ });
675
+ }
676
+ getSavableData() {
677
+ const excludedFields = ['form', 'editMode', 'viewMode', 'token', 'hasModifiedCache', 'confirmDigestCredentials'];
678
+ return getSavableData(this, excludedFields);
679
+ }
680
+ getFullData() {
681
+ const excludedFields = ['form'];
682
+ return getSavableData(this, excludedFields);
683
+ }
684
+ getUserDetailsSavableData() {
685
+ const excludedFields = ['devices', 'deviceProfiles', 'lines', 'singleNumberReach', 'vmPassword', 'vmUnifiedMessagingAccount', 'alternateExtensions', 'callerInput', 'lineAppearances', 'meetMes', 'webAppPasswordSettings', 'form'];
686
+ return getSavableData(this, excludedFields);
687
+ }
688
+ equal(userToCompare) {
689
+ if (!userToCompare) {
690
+ return false;
691
+ }
692
+ return JSON.stringify(this.getSavableData()) === JSON.stringify(userToCompare.getSavableData());
693
+ }
694
+ }
695
+
696
+ class UtilsService {
697
+ static filterOptions(options, query, shownValue, field) {
698
+ if (!options) {
699
+ return [];
700
+ }
701
+ if (!query) {
702
+ return options;
703
+ }
704
+ return options.filter(option => {
705
+ return (field ? String(option[field]).toLowerCase().includes(String(query).toLowerCase()) :
706
+ String(option).toLowerCase().includes(String(query).toLowerCase()) ||
707
+ (shownValue && shownValue === option));
708
+ });
709
+ }
710
+ ;
711
+ static sortSortArrayByProperty(array, sortBy) {
712
+ if (!array) {
713
+ return null;
714
+ }
715
+ return array.sort((a, b) => {
716
+ if (!a[sortBy] && !b[sortBy]) {
717
+ return 0;
718
+ }
719
+ if (a[sortBy] && !b[sortBy]) {
720
+ return 1;
721
+ }
722
+ if (!a[sortBy] && b[sortBy]) {
723
+ return -1;
724
+ }
725
+ const positionA = a[sortBy];
726
+ const positionB = b[sortBy];
727
+ return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
728
+ });
729
+ }
730
+ static diff(origObject, updatedObj, path, keysToIgnore) {
731
+ let result = [];
732
+ if (Object.is(origObject, updatedObj)) {
733
+ return undefined;
734
+ }
735
+ if (!updatedObj || typeof updatedObj !== 'object') {
736
+ return updatedObj;
737
+ }
738
+ const concat = Array.from(new Set([...Object.keys(origObject || {}), ...Object.keys(updatedObj || {})]));
739
+ const filter = keysToIgnore ? concat.filter(key => !keysToIgnore.includes(key)) : concat;
740
+ filter
741
+ .forEach(key => {
742
+ if (typeof updatedObj[key] === 'object' && typeof origObject[key] === 'object') {
743
+ if (UtilsService.differs(updatedObj[key], origObject[key])) {
744
+ const newPath = `${path}${path ? '.' : ''}${key}`;
745
+ const values = UtilsService.diff(origObject[key], updatedObj[key], newPath, keysToIgnore);
746
+ if (values !== undefined) {
747
+ result = [...result, ...values];
748
+ }
749
+ }
750
+ }
751
+ else if (updatedObj && !origObject || updatedObj[key] !== origObject[key] && !Object.is(origObject[key], updatedObj[key])) {
752
+ const value = updatedObj ? UtilsService.formatIfEmpty(updatedObj[key]) : null;
753
+ result.push(`${path}${path ? '.' : ''}${key}=${value}`);
754
+ }
755
+ });
756
+ return result;
757
+ }
758
+ static formatIfEmpty(value) {
759
+ if (value) {
760
+ return value;
761
+ }
762
+ switch (typeof value) {
763
+ case 'boolean':
764
+ return value;
765
+ case 'string':
766
+ return '';
767
+ default:
768
+ return null;
769
+ }
770
+ }
771
+ static differs(obj1, obj2) {
772
+ return JSON.stringify(obj1) !== JSON.stringify(obj2);
773
+ }
774
+ }
775
+ UtilsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
776
+ UtilsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService });
777
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService, decorators: [{
778
+ type: Injectable
779
+ }] });
780
+
781
+ const string_array = function (original, updated, fullKey) {
782
+ if (!updated || !SortingUtilsService.differs(original, updated)) {
783
+ return null;
784
+ }
785
+ return `${fullKey}=${updated.join(',')}`;
786
+ };
787
+ const line_reference = function (original, updated, fullKey) {
788
+ if (!updated || !SortingUtilsService.differs(original, updated)) {
789
+ return null;
790
+ }
791
+ // @ts-ignore
792
+ return Object.keys(updated).map(key => `${fullKey}.${key}=${updated[key]}`);
793
+ };
794
+ const nullable = function (original, updated, fullKey) {
795
+ if (!original && updated) {
796
+ // @ts-ignore
797
+ return Object.keys(updated).map(key => `${fullKey}.${key}=${updated[key]}`);
798
+ }
799
+ else if (original && !updated) {
800
+ return `${fullKey}=null`;
801
+ }
802
+ else {
803
+ return SortingUtilsService.diff(original, updated, fullKey, []);
804
+ }
805
+ };
806
+ class SortingUtilsService {
807
+ static sortDevicesByTypeAndName(array) {
808
+ if (!array) {
809
+ return null;
810
+ }
811
+ return array.sort((a, b) => {
812
+ if (a.deviceType === b.deviceType) {
813
+ return (a.name < b.name) ? -1 : (a.name > b.name) ? 1 : 0;
814
+ }
815
+ else {
816
+ return (a.deviceType < b.deviceType) ? -1 : 1;
817
+ }
818
+ });
819
+ }
820
+ static sortLinesByDirectoryName(array) {
821
+ if (!array) {
822
+ return null;
823
+ }
824
+ return array.sort((a, b) => {
825
+ if (!a.directoryNumber && !b.directoryNumber) {
826
+ return 0;
827
+ }
828
+ if (a.directoryNumber && !b.directoryNumber) {
829
+ return 1;
830
+ }
831
+ if (!a.directoryNumber && b.directoryNumber) {
832
+ return -1;
833
+ }
834
+ const directoryNumberA = a.directoryNumber.directoryNumber;
835
+ const directoryNumberB = b.directoryNumber.directoryNumber;
836
+ return (directoryNumberA < directoryNumberB) ? -1 : (directoryNumberA > directoryNumberB) ? 1 : 0;
837
+ });
838
+ }
839
+ static sortLineAssociationsByPosition(array) {
840
+ if (!array) {
841
+ return null;
842
+ }
843
+ return array.sort((a, b) => {
844
+ if (!a.position && !b.position) {
845
+ return 0;
846
+ }
847
+ if (a.position && !b.position) {
848
+ return 1;
849
+ }
850
+ if (!a.position && b.position) {
851
+ return -1;
852
+ }
853
+ const positionA = a.position;
854
+ const positionB = b.position;
855
+ return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
856
+ });
857
+ }
858
+ static sortSortArrayByProperty(array, sortBy) {
859
+ if (!array) {
860
+ return null;
861
+ }
862
+ return array.sort((a, b) => {
863
+ if (!a[sortBy] && !b[sortBy]) {
864
+ return 0;
865
+ }
866
+ if (a[sortBy] && !b[sortBy]) {
867
+ return 1;
868
+ }
869
+ if (!a[sortBy] && b[sortBy]) {
870
+ return -1;
871
+ }
872
+ const positionA = a[sortBy];
873
+ const positionB = b[sortBy];
874
+ return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
875
+ });
876
+ }
877
+ static diff(origObject, updatedObj, path, keysToIgnore) {
878
+ let result = [];
879
+ if (Object.is(origObject, updatedObj)) {
880
+ return undefined;
881
+ }
882
+ if (!updatedObj || typeof updatedObj !== 'object') {
883
+ return updatedObj;
884
+ }
885
+ const concat = Array.from(new Set([...Object.keys(origObject || {}), ...Object.keys(updatedObj || {})]));
886
+ const filter = keysToIgnore ? concat.filter(key => !keysToIgnore.includes(key)) : concat;
887
+ filter
888
+ .forEach(key => {
889
+ // @ts-ignore
890
+ if (this.dictionary[key]) {
891
+ // @ts-ignore
892
+ const complexResult = this.dictionary[key](origObject[key], updatedObj[key], `${path}${path ? '.' : ''}${key}`);
893
+ if (complexResult) {
894
+ if (Array.isArray(complexResult)) {
895
+ result = [...result, ...complexResult];
896
+ }
897
+ else {
898
+ result.push(complexResult);
899
+ }
900
+ }
901
+ }
902
+ else if (typeof updatedObj[key] === 'object' && typeof origObject[key] === 'object') {
903
+ if (SortingUtilsService.differs(updatedObj[key], origObject[key])) {
904
+ const newPath = `${path}${path ? '.' : ''}${key}`;
905
+ const values = SortingUtilsService.diff(origObject[key], updatedObj[key], newPath, keysToIgnore);
906
+ if (values !== undefined) {
907
+ result = [...result, ...values];
908
+ }
909
+ }
910
+ }
911
+ else if (updatedObj && !origObject || updatedObj[key] !== origObject[key] && !Object.is(origObject[key], updatedObj[key])) {
912
+ const value = updatedObj ? SortingUtilsService.formatIfEmpty(updatedObj[key]) : null;
913
+ result.push(`${path}${path ? '.' : ''}${key}=${value}`);
914
+ }
915
+ });
916
+ return result;
917
+ }
918
+ static formatIfEmpty(value) {
919
+ if (value) {
920
+ return value;
921
+ }
922
+ switch (typeof value) {
923
+ case 'boolean':
924
+ return value;
925
+ case 'string':
926
+ return '';
927
+ default:
928
+ return null;
929
+ }
930
+ }
931
+ static differs(obj1, obj2) {
932
+ return JSON.stringify(obj1) !== JSON.stringify(obj2);
933
+ }
934
+ }
935
+ SortingUtilsService.dictionary = {
936
+ features: string_array,
937
+ services: string_array,
938
+ directoryNumber: line_reference,
939
+ primaryLineReference: line_reference,
940
+ speedDials: function (original, updated, fullKey) {
941
+ if (!updated || !SortingUtilsService.differs(original, updated)) {
942
+ return null;
943
+ }
944
+ // todo only changes, identification
945
+ let map = [];
946
+ updated.map((speedDial) => {
947
+ const currentFullKey = `${fullKey}.${speedDial.index}`; // ${speedDial.type} CHECk ?
948
+ map = [...map, Object.keys(speedDial).map(key => `${currentFullKey}.${key}=${speedDial[key]}`)];
949
+ });
950
+ return map;
951
+ },
952
+ lineAssociations: function (original, updated, fullKey) {
953
+ if (!updated || !SortingUtilsService.differs(original, updated)) {
954
+ return null;
955
+ }
956
+ let map = [];
957
+ updated.map((lineAssociation) => {
958
+ const currentFullKey = `${fullKey}.${lineAssociation.linePkid ? lineAssociation.linePkid : lineAssociation.lineLocalId}`;
959
+ const originalLineAssociation = original.find(line => line.index === lineAssociation.index);
960
+ if (SortingUtilsService.differs(originalLineAssociation, lineAssociation)) {
961
+ const diff = SortingUtilsService.diff(originalLineAssociation, lineAssociation, currentFullKey, []);
962
+ map = [...map, ...diff];
963
+ }
964
+ });
965
+ return map;
966
+ },
967
+ enterpriseAltNum: nullable,
968
+ e164AltNum: nullable
969
+ };
970
+ SortingUtilsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
971
+ SortingUtilsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService });
972
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService, decorators: [{
973
+ type: Injectable
974
+ }] });
975
+
976
+ class LineService {
977
+ constructor(apiService) {
978
+ this.apiService = apiService;
979
+ this.onSaveLineAssociationEvent = new Subject();
980
+ }
981
+ generateLineAssociationFromLine(lineAssociation) {
982
+ return {
983
+ directoryNumber: lineAssociation ? this.generateLineDirectory(lineAssociation) : null,
984
+ didPattern: lineAssociation ? this.generateDidPatternForLineAssociation(lineAssociation) : null,
985
+ mappedDids: lineAssociation ? '' : 'null',
986
+ index: lineAssociation ? lineAssociation.index : null,
987
+ position: lineAssociation ? lineAssociation.position : null,
988
+ textLabel: lineAssociation ? lineAssociation.textLabel : null,
989
+ // displayLabel: lineAssociation ? lineAssociation.displayLabel : 'null',
990
+ alertingName: lineAssociation ? lineAssociation.alertingName : null,
991
+ callerNumber: lineAssociation ? '' : 'null'
992
+ };
993
+ }
994
+ hasUnsavedChanges() {
995
+ if (this.line && this.originLine) {
996
+ return JSON.stringify(this.line.getSavableData()) !== JSON.stringify(this.originLine.getSavableData());
997
+ }
998
+ return false;
999
+ }
1000
+ generateLineDirectory(lineAssociation) {
1001
+ return {
1002
+ directoryNumber: lineAssociation.directoryNumber.directoryNumber,
1003
+ routePartitionName: lineAssociation.directoryNumber.routePartitionName,
1004
+ };
1005
+ }
1006
+ generateDidPatternForLineAssociation(lineAssociation) {
1007
+ return {
1008
+ calledPartyTransformationMask: lineAssociation.directoryNumber.directoryNumber
1009
+ };
1010
+ }
1011
+ checkLineDeletion(line, siteId) {
1012
+ const params = {
1013
+ extension: line.directoryNumber.directoryNumber,
1014
+ routePartition: line.directoryNumber.routePartitionName,
1015
+ };
1016
+ return this.apiService.fetch(API.CHECK_DELETE_LINE.replace(':siteId', String(siteId)), params);
1017
+ // .pipe(this.handleError(true, true));
1018
+ }
1019
+ deleteLine(siteId, pkid, token) {
1020
+ return this.apiService.delete(API.DELETE_LINE.replace(':siteId', String(siteId)).replace(':pkid', pkid).replace(':token', encodeURIComponent(token)), {});
1021
+ // .pipe(this.handleError(true, false));
1022
+ }
1023
+ disassociateLine(siteId, linePkid, token, deviceName) {
1024
+ return this.apiService.delete(API.DISASSOCIATE_LINE.replace(':siteId', String(siteId))
1025
+ .replace(':linePkid', linePkid)
1026
+ .replace(':deviceName', deviceName)
1027
+ .replace(':token', encodeURIComponent(token)), {});
1028
+ // .pipe(this.handleError(true, false));
1029
+ }
1030
+ updateLineFields(siteId, pkid, token, alertingName) {
1031
+ const body = ['line.description=', `line.alertingName=${alertingName}`];
1032
+ return this.apiService.post(API.UPDATE_LINE_FIELDS.replace(':siteId', String(siteId)).replace(':pkid', encodeURIComponent(pkid)).replace(':token', encodeURIComponent(token)), body);
1033
+ // .pipe(this.handleError(true, false));
1034
+ }
1035
+ getLineAssociationBody(originLineAssociation, lineAssociation) {
1036
+ const body = SortingUtilsService.diff(originLineAssociation.getSavableData(), lineAssociation.getSavableData(), `device.lineAssociations.${lineAssociation.linePkid}`, null);
1037
+ return body;
1038
+ }
1039
+ }
1040
+ LineService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService, deps: [{ token: APIService }], target: i0.ɵɵFactoryTarget.Injectable });
1041
+ LineService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService });
1042
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService, decorators: [{
1043
+ type: Injectable
1044
+ }], ctorParameters: function () { return [{ type: APIService }]; } });
1045
+
1046
+ class UserService {
1047
+ get lineAssociation() {
1048
+ var _a;
1049
+ return (_a = this.user) === null || _a === void 0 ? void 0 : _a.devices[0].lineAssociations[0];
1050
+ }
1051
+ get originLineAssociation() {
1052
+ var _a;
1053
+ return (_a = this.originUser) === null || _a === void 0 ? void 0 : _a.devices[0].lineAssociations[0];
1054
+ }
1055
+ constructor(apiService, lineService) {
1056
+ this.apiService = apiService;
1057
+ this.lineService = lineService;
1058
+ this.siteId = -1;
1059
+ this.userId = '';
1060
+ this.userIdExistPending = false;
1061
+ this.hasExistedUserId = false;
1062
+ this.onUserLineSaved$ = new Subject();
1063
+ this.onFetchUserToken$ = new Subject();
1064
+ }
1065
+ ngOnInit() {
1066
+ console.log(this.siteId);
1067
+ }
1068
+ resetLineAssociation(deviceIndex, lineIndex, validationService) {
1069
+ var _a, _b, _c, _d;
1070
+ const originLine = (_b = (_a = this.originUser) === null || _a === void 0 ? void 0 : _a.devices[deviceIndex]) === null || _b === void 0 ? void 0 : _b.lineAssociations[lineIndex];
1071
+ if (((_d = (_c = this.user) === null || _c === void 0 ? void 0 : _c.devices[deviceIndex]) === null || _d === void 0 ? void 0 : _d.lineAssociations[lineIndex]) && originLine) {
1072
+ this.user.devices[deviceIndex].lineAssociations[lineIndex] = new LineAssociation(JSON.parse(JSON.stringify(originLine.getFullData())), validationService);
1073
+ }
1074
+ }
1075
+ resetDevice(currentDevice, validationService) {
1076
+ const originDevice = this.originUser.devices.find(device => device.name === currentDevice.name);
1077
+ const deviceInd = this.user.devices.findIndex(device => device.name === currentDevice.name);
1078
+ if (originDevice && deviceInd > -1) {
1079
+ const lineAssociations = this.user.devices[deviceInd].lineAssociations;
1080
+ this.user.devices[deviceInd] = new Device(JSON.parse(JSON.stringify(originDevice.getNoLinesFullData())), validationService);
1081
+ this.user.devices[deviceInd].lineAssociations = lineAssociations;
1082
+ console.log('device after reset = ', this.user.devices[deviceInd]);
1083
+ }
1084
+ }
1085
+ fetchUserToken(siteId, userId, validationService, isSetNewTokenOnly) {
1086
+ /*if (this.siteId === siteId && this.userId === userId && this.user) {
1087
+ return of(this.user);
1088
+ }*/
1089
+ this.siteId = siteId;
1090
+ this.userId = userId;
1091
+ return this.apiService.fetch(API.USER_TOKEN.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(userId))))
1092
+ .pipe(map((result) => {
1093
+ const user = result && Object.values(result)[0];
1094
+ const userToken = result && Object.keys(result)[0];
1095
+ if (user) {
1096
+ if (!isSetNewTokenOnly) {
1097
+ this.setSimplifiedUser(user, validationService, userToken);
1098
+ }
1099
+ else {
1100
+ this.user.token = user.token;
1101
+ this.originUser.token = user.token;
1102
+ }
1103
+ this.onFetchUserToken$.next(true);
1104
+ }
1105
+ }));
1106
+ // .pipe(this.handleError(false, true));
1107
+ }
1108
+ updateUserFields(body) {
1109
+ var _a;
1110
+ if (!this.userId || !this.siteId || !((_a = this.user) === null || _a === void 0 ? void 0 : _a.token)) {
1111
+ return;
1112
+ }
1113
+ return this.apiService.post(API.UPDATE_USER_FIELDS.replace(':siteId', String(this.siteId)).replace(':token', this.user.token), body);
1114
+ // .pipe(this.handleError(false, true));
1115
+ }
1116
+ fetchUserById(id) {
1117
+ this.userIdExistPending = true;
1118
+ return this.apiService.fetch(API.USER_BY_ID.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(id))))
1119
+ .pipe(map(result => {
1120
+ this.userIdExistPending = false;
1121
+ return result;
1122
+ }));
1123
+ }
1124
+ fetchLeanUserConversationById(id) {
1125
+ return this.apiService.fetch(API.LEAN_USER_CONVERSATION_START.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(id))));
1126
+ }
1127
+ fetchLeanUserDevicesConversationById(id) {
1128
+ return this.apiService.fetch(API.LEAN_USER_DEVICES_CONVERSATION_START.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(id))));
1129
+ }
1130
+ fetchLeanUserLinesConversationById(id, leanUserDevicesToken) {
1131
+ return this.apiService.fetch(API.LEAN_USER_LINES_CONVERSATION_START.replace(':siteId', String(this.siteId))
1132
+ .replace(':userId', encodeURIComponent(encodeURIComponent(id))).replace(':leanUserDevicesToken', leanUserDevicesToken));
1133
+ }
1134
+ fetchLeanUserSNRConversationById(id) {
1135
+ return this.apiService.fetch(API.LEAN_USER_SNR_CONVERSATION_START.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(id))));
1136
+ }
1137
+ persistCacheChanges() {
1138
+ /*const params = {
1139
+ excludeDeviceExtraOptions: true
1140
+ };*/
1141
+ return this.processUserChangesToCache()
1142
+ .pipe(map((result) => {
1143
+ return this.apiService.post(API.PERSIST_USER_CACHE.replace(':siteId', String(this.siteId)).replace(':token', this.user.token), {}, {})
1144
+ .subscribe(() => {
1145
+ });
1146
+ // .pipe(map((user) => {
1147
+ // // this.setUser(user, false, this.user.token);
1148
+ // this.user.hasModifiedCache = false;
1149
+ // }))
1150
+ // .pipe(this.handleError(true, true));
1151
+ }));
1152
+ }
1153
+ processUserChangesToCache() {
1154
+ const calls = [];
1155
+ const body = UtilsService.diff(this.originUser.getUserDetailsSavableData(), this.user.getUserDetailsSavableData(), 'user');
1156
+ if (body === null || body === void 0 ? void 0 : body.length) {
1157
+ calls.push(this.updateUserFields(body));
1158
+ }
1159
+ if (!(calls === null || calls === void 0 ? void 0 : calls.length)) {
1160
+ return of(this.user);
1161
+ }
1162
+ return forkJoin(calls)
1163
+ .pipe(map((responses) => {
1164
+ // ApiUserResponse
1165
+ this.handleSaveUserResponse(responses);
1166
+ }));
1167
+ // .pipe(this.handleError(false, true));
1168
+ }
1169
+ saveNewLine(validationService) {
1170
+ this.deleteLine(this.user.siteId, this.lineAssociation.linePkid, encodeURIComponent(this.user.token))
1171
+ .subscribe(() => {
1172
+ const URL = API.PERSIST_USER_CACHE.replace(':siteId', String(this.siteId)).replace(':token', this.user.token);
1173
+ this.apiService.post(URL, {})
1174
+ .subscribe(() => {
1175
+ this.fetchUserToken(this.siteId, this.user.userid, validationService, true)
1176
+ .subscribe(() => {
1177
+ this.runNewLineCreation();
1178
+ });
1179
+ });
1180
+ });
1181
+ }
1182
+ persistUserCache() {
1183
+ const URL = API.PERSIST_USER_CACHE.replace(':siteId', String(this.siteId)).replace(':token', this.user.token);
1184
+ return this.apiService.post(URL, {});
1185
+ }
1186
+ runNewLineCreation() {
1187
+ // CREATE NEW LINE
1188
+ const newLineBody = SortingUtilsService.diff(this.lineService.generateLineAssociationFromLine(null), this.lineService.generateLineAssociationFromLine(this.lineAssociation), 'device.lineAssociations', null);
1189
+ this.associateLineToUserDevice(this.user.siteId, this.user.devices[0].name, newLineBody, null, this.lineAssociation.callingSearchSpace).subscribe((response) => {
1190
+ var _a, _b, _c, _d, _e;
1191
+ if (response === null || response === void 0 ? void 0 : response.currentUpdatedUser) {
1192
+ const linePkId = ((_b = (_a = response.currentUpdatedUser.devices[0]) === null || _a === void 0 ? void 0 : _a.lineAssociations[0]) === null || _b === void 0 ? void 0 : _b.linePkid) || ((_d = (_c = response.currentUpdatedUser.devices[0]) === null || _c === void 0 ? void 0 : _c.lineAssociations[0]) === null || _d === void 0 ? void 0 : _d.lineLocalId);
1193
+ forkJoin([
1194
+ this.updateLineFields(this.siteId, linePkId, this.user.token, this.lineAssociation.alertingName),
1195
+ this.updateDeviceFields(this.siteId, (_e = this.user.devices[0]) === null || _e === void 0 ? void 0 : _e.name, this.user.token)
1196
+ ]).subscribe((response) => {
1197
+ this.originUser.devices[0].lineAssociations[0].directoryNumber.directoryNumber = this.lineAssociation.directoryNumber.directoryNumber;
1198
+ this.onUserLineSaved$.next(true);
1199
+ });
1200
+ }
1201
+ });
1202
+ // -----
1203
+ }
1204
+ deleteLine(siteId, pkid, token) {
1205
+ return this.apiService.delete(API.DELETE_LINE.replace(':siteId', String(siteId)).replace(':pkid', pkid).replace(':token', encodeURIComponent(token)), {});
1206
+ // .pipe(this.handleError(true, false));
1207
+ }
1208
+ disassociateLine(siteId, linePkid, token, deviceName) {
1209
+ return this.apiService.delete(API.DISASSOCIATE_LINE.replace(':siteId', String(siteId))
1210
+ .replace(':linePkid', linePkid)
1211
+ .replace(':deviceName', deviceName)
1212
+ .replace(':token', encodeURIComponent(token)), {});
1213
+ // .pipe(this.handleError(true, false));
1214
+ }
1215
+ updateLineFields(siteId, pkid, token, alertingName) {
1216
+ const body = ['line.description=', `line.alertingName=${alertingName}`];
1217
+ return this.apiService.post(API.UPDATE_LINE_FIELDS.replace(':siteId', String(siteId)).replace(':pkid', encodeURIComponent(pkid)).replace(':token', encodeURIComponent(token)), body);
1218
+ // .pipe(this.handleError(true, false));
1219
+ }
1220
+ updateDeviceFields(siteId, deviceName, token) {
1221
+ const body = ['device.associatedDNs.0=null'];
1222
+ return this.apiService.post(API.UPDATE_DEVICE_FIELDS.replace(':siteId', String(siteId)).replace(':deviceName', deviceName).replace(':token', encodeURIComponent(token)), body);
1223
+ // .pipe(this.handleError(true, false));
1224
+ }
1225
+ checkDestinationNumber(siteId, directoryNumber, routePartitionName) {
1226
+ const params = {
1227
+ dntype: 'EXTENSION'
1228
+ };
1229
+ const body = {
1230
+ directoryNumber: directoryNumber,
1231
+ routePartitionName: routePartitionName
1232
+ };
1233
+ return this.apiService.post(API.CHECK_DESTINATION_NUMBER.replace(':siteId', siteId), body, params);
1234
+ }
1235
+ associateLineToUserDevice(siteId, deviceName, body, pkid, css) {
1236
+ let params = {};
1237
+ if (pkid) {
1238
+ params = { linePkid: pkid };
1239
+ }
1240
+ if (css) {
1241
+ // @ts-ignore
1242
+ params['css'] = css;
1243
+ }
1244
+ return this.apiService.post(API.ASSOCIATE_LINE.replace(':siteId', String(siteId)).replace(':deviceName', deviceName)
1245
+ .replace(':token', encodeURIComponent(this.user.token)), body, params);
1246
+ // .pipe(this.handleError(true, true));
1247
+ }
1248
+ hasUnsavedChanges() {
1249
+ if (this.user && this.originUser) {
1250
+ return !this.user.equal(this.originUser);
1251
+ }
1252
+ return false;
1253
+ }
1254
+ setSimplifiedUser(user, validationService, userToken) {
1255
+ this.user = new SimplifiedUser(user, validationService);
1256
+ const copiedUser = JSON.parse(JSON.stringify(user));
1257
+ this.originUser = new SimplifiedUser(copiedUser, validationService);
1258
+ if (!this.user.token && userToken) {
1259
+ this.user.token = userToken;
1260
+ this.originUser.token = userToken;
1261
+ }
1262
+ }
1263
+ handleSaveUserResponse(responses) {
1264
+ if (!(responses === null || responses === void 0 ? void 0 : responses.length)) {
1265
+ return;
1266
+ }
1267
+ for (let len = responses.length, i = len - 1; i >= 0; i--) {
1268
+ if (responses[i] && responses[i].currentUpdatedUser) {
1269
+ // this.setUser(responses[i].currentUpdatedUser, false, this.user.token);
1270
+ this.user.hasModifiedCache = true;
1271
+ return;
1272
+ }
1273
+ }
1274
+ }
1275
+ }
1276
+ 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 });
1277
+ UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService });
1278
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService, decorators: [{
1279
+ type: Injectable
1280
+ }], ctorParameters: function () { return [{ type: APIService }, { type: LineService }]; } });
1281
+
1282
+ class DeviceService {
1283
+ constructor(apiService) {
1284
+ this.apiService = apiService;
1285
+ this.dataPending = false;
1286
+ }
1287
+ hasUnsavedChanges(device, originDevice) {
1288
+ if (device === null || device === void 0 ? void 0 : device.lineAssociationsHasChanges) {
1289
+ return true;
1290
+ }
1291
+ if (device && originDevice) {
1292
+ return JSON.stringify(device.getSavableData()) !== JSON.stringify(originDevice.getSavableData());
1293
+ }
1294
+ return false;
1295
+ }
1296
+ hasDeviceInfoUnsavedChanges(device, originDevice) {
1297
+ if (device && originDevice) {
1298
+ return JSON.stringify(device.getDeviceInfoSavableData()) !== JSON.stringify(originDevice.getDeviceInfoSavableData());
1299
+ }
1300
+ return false;
1301
+ }
1302
+ getDataToUpdateDevice(device, originalDevice) {
1303
+ // --- to exclude newLines from update
1304
+ // const devToUpdate = new Device(device, this.validationService);
1305
+ // const originalDevToUpdate = new Device(originalDevice, this.validationService);
1306
+ // // @ts-ignore
1307
+ // devToUpdate.lineAssociations = devToUpdate.lineAssociations?.filter(line => line.linePkid);
1308
+ // // @ts-ignore
1309
+ // originalDevToUpdate.lineAssociations = originalDevToUpdate.lineAssociations?.filter(line => line.linePkid);
1310
+ const body = SortingUtilsService.diff(originalDevice.getDeviceInfoSavableData(), device.getDeviceInfoSavableData(), 'device', ['speedDials', 'busyLampFields']);
1311
+ return body;
1312
+ }
1313
+ fetchLeanUserDevicesConversationById(userId, siteId) {
1314
+ return this.apiService.fetch(API.LEAN_USER_DEVICES_CONVERSATION_START.replace(':siteId', String(siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(userId))));
1315
+ }
1316
+ getSlotsByButtonTemplate(siteId, buttonTemplateName) {
1317
+ return this.apiService.fetch(API.LINE_SLOTS.replace(':siteId', String(siteId)), { name: buttonTemplateName }, true);
1318
+ // .pipe(this.handleError(true, true));
1319
+ }
1320
+ putDeviceFields(siteId, deviceName, token, body) {
1321
+ console.log('userToken = ', token);
1322
+ const URL = API.UPDATE_DEVICE_FIELDS
1323
+ .replace(':siteId', String(siteId))
1324
+ .replace(':deviceName', deviceName)
1325
+ .replace(':token', token);
1326
+ console.log('url = ', URL);
1327
+ return this.apiService.post(URL, body);
1328
+ // .pipe(this.handleError(true, true));
1329
+ }
1330
+ updateAvailableSlots(siteId, device) {
1331
+ if (!device) {
1332
+ throw throwError(() => new Error('test'));
1333
+ }
1334
+ if (!device.buttonTemplate) {
1335
+ throw throwError(() => new Error('test'));
1336
+ }
1337
+ if (device.buttonTemplate === '') {
1338
+ device.availableSlots = [];
1339
+ return of(device);
1340
+ }
1341
+ const existingPositions = device.lineAssociations.map((lineAssociation) => lineAssociation.position);
1342
+ return this.getSlotsByButtonTemplate(siteId, device.buttonTemplate)
1343
+ .pipe(map((buttonTemplate) => {
1344
+ this.lineSlotsList = buttonTemplate.lineSlots;
1345
+ device.availableSlots = this.lineSlotsList.filter((position) => !existingPositions.includes(position));
1346
+ this.availableLineSlotsList = device.availableSlots.slice();
1347
+ return device;
1348
+ }));
1349
+ // .pipe(this.handleError(true, true));
1350
+ }
1351
+ }
1352
+ DeviceService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceService, deps: [{ token: APIService }], target: i0.ɵɵFactoryTarget.Injectable });
1353
+ DeviceService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceService });
1354
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceService, decorators: [{
1355
+ type: Injectable
1356
+ }], ctorParameters: function () { return [{ type: APIService }]; } });
1357
+
1358
+ class AppLoaderComponent {
1359
+ constructor() {
1360
+ }
1361
+ }
1362
+ AppLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1363
+ 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 });
1364
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, decorators: [{
1365
+ type: Component,
1366
+ 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"] }]
1367
+ }], ctorParameters: function () { return []; } });
1368
+
1369
+ class AuthInterceptor {
1370
+ constructor() {
1371
+ }
1372
+ intercept(request, next) {
1373
+ request = request.clone({
1374
+ setHeaders: {
1375
+ // Authorization: basicAuthHeaderString
1376
+ },
1377
+ withCredentials: true
1378
+ });
1379
+ return next.handle(request).pipe(catchError(err => {
1380
+ if (err instanceof HttpErrorResponse) {
1381
+ if (err.status === 401) {
1382
+ if (window.history.length < 3) {
1383
+ err.error.message = '';
1384
+ }
1385
+ else {
1386
+ err.error.message = 'SESSION_INACTIVE';
1387
+ }
1388
+ }
1389
+ }
1390
+ return throwError(err);
1391
+ }));
1392
+ }
1393
+ }
1394
+ AuthInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1395
+ AuthInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor });
1396
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor, decorators: [{
1397
+ type: Injectable
1398
+ }], ctorParameters: function () { return []; } });
1399
+
1400
+ class MaterialModule {
1401
+ }
1402
+ MaterialModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1403
+ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [DragDropModule,
1404
+ MatButtonModule,
1405
+ MatListModule,
1406
+ MatProgressSpinnerModule,
1407
+ MatExpansionModule,
1408
+ MatInputModule,
1409
+ MatInputModule,
1410
+ MatListModule,
1411
+ MatTreeModule,
1412
+ MatTreeModule,
1413
+ MatNativeDateModule,
1414
+ MatDatepickerModule,
1415
+ MatTooltipModule,
1416
+ MatAutocompleteModule,
1417
+ MatChipsModule,
1418
+ MatSidenavModule,
1419
+ MatFormFieldModule,
1420
+ MatStepperModule,
1421
+ MatTabsModule,
1422
+ MatCardModule,
1423
+ MatSelectModule,
1424
+ MatCheckboxModule,
1425
+ MatSlideToggleModule,
1426
+ MatTableModule,
1427
+ MatPaginatorModule,
1428
+ MatDialogModule], exports: [DragDropModule,
1429
+ MatButtonModule,
1430
+ MatListModule,
1431
+ MatProgressSpinnerModule,
1432
+ MatExpansionModule,
1433
+ MatInputModule,
1434
+ MatInputModule,
1435
+ MatListModule,
1436
+ MatTreeModule,
1437
+ MatTreeModule,
1438
+ MatNativeDateModule,
1439
+ MatDatepickerModule,
1440
+ MatTooltipModule,
1441
+ MatAutocompleteModule,
1442
+ MatChipsModule,
1443
+ MatSidenavModule,
1444
+ MatFormFieldModule,
1445
+ MatStepperModule,
1446
+ MatTabsModule,
1447
+ MatCardModule,
1448
+ MatCheckboxModule,
1449
+ MatSelectModule,
1450
+ MatSlideToggleModule,
1451
+ MatProgressSpinnerModule,
1452
+ MatTableModule,
1453
+ MatPaginatorModule] });
1454
+ MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [DragDropModule,
1455
+ MatButtonModule,
1456
+ MatListModule,
1457
+ MatProgressSpinnerModule,
1458
+ MatExpansionModule,
1459
+ MatInputModule,
1460
+ MatInputModule,
1461
+ MatListModule,
1462
+ MatTreeModule,
1463
+ MatTreeModule,
1464
+ MatNativeDateModule,
1465
+ MatDatepickerModule,
1466
+ MatTooltipModule,
1467
+ MatAutocompleteModule,
1468
+ MatChipsModule,
1469
+ MatSidenavModule,
1470
+ MatFormFieldModule,
1471
+ MatStepperModule,
1472
+ MatTabsModule,
1473
+ MatCardModule,
1474
+ MatSelectModule,
1475
+ MatCheckboxModule,
1476
+ MatSlideToggleModule,
1477
+ MatTableModule,
1478
+ MatPaginatorModule,
1479
+ MatDialogModule, DragDropModule,
1480
+ MatButtonModule,
1481
+ MatListModule,
1482
+ MatProgressSpinnerModule,
1483
+ MatExpansionModule,
1484
+ MatInputModule,
1485
+ MatInputModule,
1486
+ MatListModule,
1487
+ MatTreeModule,
1488
+ MatTreeModule,
1489
+ MatNativeDateModule,
1490
+ MatDatepickerModule,
1491
+ MatTooltipModule,
1492
+ MatAutocompleteModule,
1493
+ MatChipsModule,
1494
+ MatSidenavModule,
1495
+ MatFormFieldModule,
1496
+ MatStepperModule,
1497
+ MatTabsModule,
1498
+ MatCardModule,
1499
+ MatCheckboxModule,
1500
+ MatSelectModule,
1501
+ MatSlideToggleModule,
1502
+ MatProgressSpinnerModule,
1503
+ MatTableModule,
1504
+ MatPaginatorModule] });
1505
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, decorators: [{
1506
+ type: NgModule,
1507
+ args: [{
1508
+ imports: [
1509
+ DragDropModule,
1510
+ MatButtonModule,
1511
+ MatListModule,
1512
+ MatProgressSpinnerModule,
1513
+ MatExpansionModule,
1514
+ MatInputModule,
1515
+ MatInputModule,
1516
+ MatListModule,
1517
+ MatTreeModule,
1518
+ MatTreeModule,
1519
+ MatNativeDateModule,
1520
+ MatDatepickerModule,
1521
+ MatTooltipModule,
1522
+ MatAutocompleteModule,
1523
+ MatChipsModule,
1524
+ MatSidenavModule,
1525
+ MatFormFieldModule,
1526
+ MatStepperModule,
1527
+ MatTabsModule,
1528
+ MatCardModule,
1529
+ MatSelectModule,
1530
+ MatCheckboxModule,
1531
+ MatSlideToggleModule,
1532
+ MatTableModule,
1533
+ MatPaginatorModule,
1534
+ MatDialogModule
1535
+ ],
1536
+ exports: [
1537
+ DragDropModule,
1538
+ MatButtonModule,
1539
+ MatListModule,
1540
+ MatProgressSpinnerModule,
1541
+ MatExpansionModule,
1542
+ MatInputModule,
1543
+ MatInputModule,
1544
+ MatListModule,
1545
+ MatTreeModule,
1546
+ MatTreeModule,
1547
+ MatNativeDateModule,
1548
+ MatDatepickerModule,
1549
+ MatTooltipModule,
1550
+ MatAutocompleteModule,
1551
+ MatChipsModule,
1552
+ MatSidenavModule,
1553
+ MatFormFieldModule,
1554
+ MatStepperModule,
1555
+ MatTabsModule,
1556
+ MatCardModule,
1557
+ MatCheckboxModule,
1558
+ MatSelectModule,
1559
+ MatSlideToggleModule,
1560
+ MatProgressSpinnerModule,
1561
+ MatTableModule,
1562
+ MatPaginatorModule
1563
+ ],
1564
+ }]
1565
+ }] });
1566
+
1567
+ const environment = {
1568
+ production: false,
1569
+ // apiUrl: 'http://localhost:4200',
1570
+ apiUrl: 'http://192.168.0.191:8080',
1571
+ notificationsLifetime: 30000,
1572
+ longNotificationsLifetime: 45000,
1573
+ cashCleanTimer: 900000,
1574
+ cashArrayLength: 10000,
1575
+ matomoUrl: 'http://192.168.0.136/matomo/',
1576
+ };
1577
+
1578
+ const TTL_DEFAULT = environment.notificationsLifetime;
1579
+ const TTL_LONG_DEFAULT = environment.longNotificationsLifetime;
1580
+ var NotificationType;
1581
+ (function (NotificationType) {
1582
+ NotificationType["info"] = "info";
1583
+ NotificationType["error"] = "error";
1584
+ NotificationType["success"] = "success";
1585
+ NotificationType["warning"] = "warning";
1586
+ })(NotificationType || (NotificationType = {}));
1587
+ class Notification {
1588
+ constructor(data) {
1589
+ this.ttl = TTL_DEFAULT;
1590
+ Object.assign(this, data || {});
1591
+ if (this.ttl === undefined) {
1592
+ this.ttl = this.message && this.message.length && this.message.length < 80 ? TTL_DEFAULT : TTL_LONG_DEFAULT;
1593
+ }
1594
+ }
1595
+ isInfo() {
1596
+ return this.type === NotificationType.info;
1597
+ }
1598
+ isError() {
1599
+ return this.type === NotificationType.error;
1600
+ }
1601
+ isSuccess() {
1602
+ return this.type === NotificationType.success;
1603
+ }
1604
+ isWarning() {
1605
+ return this.type === NotificationType.warning;
1606
+ }
1607
+ }
1608
+
1609
+ const SUCCESS_TIME = 5000;
1610
+ const INACTIVE_SESSION_MESSAGE = 'Your session was lost due to inactivity. Please login again';
1611
+ const INACTIVE_SESSION = 'SESSION_INACTIVE';
1612
+ class NotificationService {
1613
+ constructor() {
1614
+ this.listChange = new Subject();
1615
+ this.max = 0;
1616
+ this.list = [];
1617
+ }
1618
+ error(message, ttl) {
1619
+ this.notify('error', message, ttl);
1620
+ }
1621
+ success(message, ttl) {
1622
+ this.notify('success', message, (!ttl) ? SUCCESS_TIME : ttl);
1623
+ }
1624
+ warning(message, ttl) {
1625
+ this.notify('warning', message, ttl);
1626
+ }
1627
+ info(message, ttl) {
1628
+ this.notify('info', message, ttl);
1629
+ }
1630
+ notify(type, message, ttl) {
1631
+ const found = this.list.find((n) => n.message === message);
1632
+ if (found) {
1633
+ this.remove(found);
1634
+ }
1635
+ const notification = new Notification({
1636
+ id: ++this.max,
1637
+ type, message, ttl
1638
+ });
1639
+ if (notification.ttl > 0) {
1640
+ notification.timerId = setTimeout(() => this.remove(notification, true), notification.ttl);
1641
+ }
1642
+ this.list.push(notification);
1643
+ this.listChange.next(this.list);
1644
+ }
1645
+ remove(notification, auto) {
1646
+ if (!auto && notification.timerId) {
1647
+ // clear timeout in case of manual remove
1648
+ clearInterval(notification.timerId);
1649
+ }
1650
+ this.list = this.list.filter(n => n.id !== notification.id);
1651
+ this.listChange.next(this.list);
1652
+ }
1653
+ removeInactiveSessionError() {
1654
+ if (!this.list || !this.list.length) {
1655
+ return;
1656
+ }
1657
+ this.list = this.list.filter(n => n.message !== INACTIVE_SESSION_MESSAGE && n.message !== INACTIVE_SESSION);
1658
+ this.listChange.next(this.list);
1659
+ }
1660
+ }
1661
+ NotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1662
+ NotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService });
1663
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, decorators: [{
1664
+ type: Injectable
1665
+ }], ctorParameters: function () { return []; } });
1666
+
1667
+ class NotificationsComponent {
1668
+ constructor(notificationService, ref) {
1669
+ this.notificationService = notificationService;
1670
+ this.ref = ref;
1671
+ }
1672
+ ngOnInit() {
1673
+ this.listChangeSubscribe();
1674
+ }
1675
+ ngOnDestroy() {
1676
+ this.listSubscription.unsubscribe();
1677
+ }
1678
+ readMore() {
1679
+ this.isReadMore = !this.isReadMore;
1680
+ }
1681
+ removeNotification(notification) {
1682
+ this.notificationService.remove(notification);
1683
+ }
1684
+ listChangeSubscribe() {
1685
+ this.listSubscription = this.notificationService.listChange
1686
+ .subscribe((list) => {
1687
+ this.list = list;
1688
+ this.ref.detectChanges();
1689
+ });
1690
+ }
1691
+ }
1692
+ 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 });
1693
+ 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 });
1694
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationsComponent, decorators: [{
1695
+ type: Component,
1696
+ 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"] }]
1697
+ }], ctorParameters: function () { return [{ type: NotificationService }, { type: i0.ChangeDetectorRef }]; } });
1698
+
1699
+ class RemoveKynFromIBMService {
1700
+ constructor() {
1701
+ }
1702
+ removeCUCMS(date, customerId) {
1703
+ if (customerId === 8) {
1704
+ return date.filter((val) => !CUCMS_TO_IGNORE.includes(Math.round(val.cucmId)));
1705
+ }
1706
+ return date;
1707
+ }
1708
+ removeCUCS(date, customerId) {
1709
+ if (customerId === 8) {
1710
+ return date.filter((val) => !CUCS_TO_IGNORE.includes(Math.round(val.cucId)));
1711
+ }
1712
+ return date;
1713
+ }
1714
+ }
1715
+ RemoveKynFromIBMService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1716
+ RemoveKynFromIBMService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService });
1717
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService, decorators: [{
1718
+ type: Injectable
1719
+ }], ctorParameters: function () { return []; } });
1720
+
1721
+ class LazyLoadingSelectComponent {
1722
+ get formControl() {
1723
+ var _a;
1724
+ return (_a = this.form) === null || _a === void 0 ? void 0 : _a.get(this.controlName);
1725
+ }
1726
+ constructor(notificationService, siteSettingsService) {
1727
+ this.notificationService = notificationService;
1728
+ this.siteSettingsService = siteSettingsService;
1729
+ this.standalone = true;
1730
+ this.appearance = 'standard';
1731
+ this.changeField = new EventEmitter();
1732
+ }
1733
+ ngAfterContentInit() {
1734
+ var _a, _b;
1735
+ this.options = [(_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.get(this.controlName)) === null || _b === void 0 ? void 0 : _b.value];
1736
+ }
1737
+ getOptions() {
1738
+ if (!this.siteId && this.options.length > 1) {
1739
+ return;
1740
+ }
1741
+ this.optionsPending = true;
1742
+ this.siteSettingsService.getSelectionOptions(this.siteId, this.optionsToken)
1743
+ .subscribe(() => {
1744
+ this.optionsPending = false;
1745
+ // @ts-ignore
1746
+ this.options = this.siteSettingsService[this.optionsToken];
1747
+ }, () => {
1748
+ this.optionsPending = false;
1749
+ // this.notificationService.error(this.translate.instant('COMMON.LOAD_SELECT_OPTIONS_FAILED'));
1750
+ });
1751
+ }
1752
+ onFieldChange(token) {
1753
+ this.changeField.emit(token);
1754
+ }
1755
+ }
1756
+ 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 });
1757
+ 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: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9.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.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i13.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i8$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }] });
1758
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LazyLoadingSelectComponent, decorators: [{
1759
+ type: Component,
1760
+ 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"] }]
1761
+ }], ctorParameters: function () { return [{ type: NotificationService }, { type: SiteSettingsService }]; }, propDecorators: { siteId: [{
1762
+ type: Input
1763
+ }], form: [{
1764
+ type: Input
1765
+ }], standalone: [{
1766
+ type: Input
1767
+ }], placeholder: [{
1768
+ type: Input
1769
+ }], controlName: [{
1770
+ type: Input
1771
+ }], optionsToken: [{
1772
+ type: Input
1773
+ }], appearance: [{
1774
+ type: Input
1775
+ }], errorCode: [{
1776
+ type: Input
1777
+ }], errorText: [{
1778
+ type: Input
1779
+ }], default: [{
1780
+ type: Input
1781
+ }], id: [{
1782
+ type: Input
1783
+ }], changeField: [{
1784
+ type: Output
1785
+ }] } });
1786
+
1787
+ var EntityChangeType;
1788
+ (function (EntityChangeType) {
1789
+ EntityChangeType["added"] = "added";
1790
+ EntityChangeType["updated"] = "updated";
1791
+ EntityChangeType["existing"] = "existing";
1792
+ EntityChangeType["removed"] = "removed";
1793
+ EntityChangeType["unassociated"] = "unassociated";
1794
+ })(EntityChangeType || (EntityChangeType = {}));
1795
+ var DnRangeType;
1796
+ (function (DnRangeType) {
1797
+ DnRangeType["extension"] = "EXTENSION";
1798
+ DnRangeType["cpg"] = "CPG";
1799
+ DnRangeType["callpark"] = "CALLPARK";
1800
+ DnRangeType["huntgroup"] = "HUNTGROUP";
1801
+ DnRangeType["meetme"] = "MEETME";
1802
+ DnRangeType["did"] = "DID";
1803
+ })(DnRangeType || (DnRangeType = {}));
1804
+
1805
+ class DnsService {
1806
+ constructor(apiService) {
1807
+ this.apiService = apiService;
1808
+ this.availableNumbers = {};
1809
+ }
1810
+ getNumberRange(siteId, routePartition, withdids, from, pageSize) {
1811
+ var _a;
1812
+ // @ts-ignore
1813
+ if ((_a = this.availableNumbers[routePartition]) === null || _a === void 0 ? void 0 : _a.length) {
1814
+ return new Observable(observer => {
1815
+ // @ts-ignore
1816
+ observer.next(this.availableNumbers[routePartition]);
1817
+ });
1818
+ }
1819
+ this.availableDidPatternsMappedToDn = {};
1820
+ pageSize = pageSize ? pageSize : 20;
1821
+ const params = { dntype: DnRangeType.extension, routepartition: routePartition, size: pageSize, page: 0 };
1822
+ if (withdids) {
1823
+ // @ts-ignore
1824
+ params['withdids'] = 'true';
1825
+ }
1826
+ if (from) {
1827
+ // @ts-ignore
1828
+ params['from'] = from;
1829
+ }
1830
+ // @ts-ignore
1831
+ this.availableNumbers[routePartition] = this.availableNumbers[routePartition] || [];
1832
+ return this.apiService.fetch(API.AVAILABLE_DN_IN_RANGES.replace(':siteId', siteId), params)
1833
+ .pipe(map((res) => {
1834
+ res.availableNumberList.forEach((availableNumber) => {
1835
+ this.setAvailableDidMappedToDn(availableNumber);
1836
+ // @ts-ignore
1837
+ this.availableNumbers[routePartition] = [...this.availableNumbers[routePartition], ...this.getUnwrapNumberRange(availableNumber)];
1838
+ });
1839
+ }));
1840
+ // .pipe(this.handleError(true, false));
1841
+ }
1842
+ setAvailableDidMappedToDn(availableNumber) {
1843
+ if (availableNumber.unUsedNumbersWithDids && availableNumber.unUsedNumbersWithDids.length) {
1844
+ availableNumber.unUsedNumbersWithDids.forEach((numberWithDids) => {
1845
+ const dn = numberWithDids['unUsedNumber'];
1846
+ this.availableDidPatternsMappedToDn[dn] = [{}];
1847
+ if (numberWithDids['translationPatternList'] && numberWithDids['translationPatternList'].length > 0) {
1848
+ this.availableDidPatternsMappedToDn[dn] = numberWithDids['translationPatternList'];
1849
+ this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = [{}];
1850
+ if (numberWithDids['mappedDids'] && numberWithDids['mappedDids'].length > 0) {
1851
+ this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = numberWithDids['mappedDids'];
1852
+ }
1853
+ }
1854
+ this.availableDidPatternsMappedToDn[dn][0]['vm'] = numberWithDids['vm'];
1855
+ });
1856
+ }
1857
+ }
1858
+ getUnwrapNumberRange(availableNumber) {
1859
+ let unwrapNumberRange = this.unwrapNumberRange(availableNumber.phoneNumberRange.from, availableNumber.phoneNumberRange.to)
1860
+ .map((unwrappedNumber) => {
1861
+ const dn = availableNumber.phoneNumberRange.prefix + unwrappedNumber;
1862
+ let str = dn;
1863
+ if (this.availableDidPatternsMappedToDn[dn] && this.availableDidPatternsMappedToDn[dn].length > 0) {
1864
+ if (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] && this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 0) {
1865
+ str += ' DID: ' + (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 1 ? 'multiple' :
1866
+ this.availableDidPatternsMappedToDn[dn][0]['mappedDids'][0]);
1867
+ }
1868
+ if (this.availableDidPatternsMappedToDn[dn][0]['vm']) {
1869
+ str += ' In Use - VM';
1870
+ }
1871
+ }
1872
+ return str;
1873
+ });
1874
+ unwrapNumberRange = unwrapNumberRange.filter((unwrappedNumber) => !availableNumber.usedNumbers.includes(unwrappedNumber));
1875
+ return unwrapNumberRange;
1876
+ }
1877
+ unwrapNumberRange(start, end) {
1878
+ const regExp = /(^0+)/;
1879
+ let leadingZeros = '';
1880
+ const matches = start.match(regExp);
1881
+ if (matches) {
1882
+ leadingZeros = matches[1];
1883
+ }
1884
+ const startNumeric = new Big(start);
1885
+ const endNumeric = new Big(end);
1886
+ // @ts-ignore
1887
+ return Array.from({ length: (endNumeric.minus(startNumeric).plus(new Big(1)).toFixed(0)) }, (v, k) => {
1888
+ const number = String(startNumeric.plus(new Big(k)).toFixed(0));
1889
+ if ((leadingZeros + number).length > start.length) {
1890
+ leadingZeros = leadingZeros.substr(1);
1891
+ }
1892
+ return leadingZeros + number;
1893
+ });
1894
+ }
1895
+ }
1896
+ DnsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService, deps: [{ token: APIService }], target: i0.ɵɵFactoryTarget.Injectable });
1897
+ DnsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService });
1898
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService, decorators: [{
1899
+ type: Injectable
1900
+ }], ctorParameters: function () { return [{ type: APIService }]; } });
1901
+
1902
+ class DeviceListComponent {
1903
+ constructor() {
1904
+ this.onDeviceSelect = new EventEmitter();
1905
+ console.log('devices list');
1906
+ }
1907
+ selectDevice(device) {
1908
+ this.onDeviceSelect.emit(device);
1909
+ }
1910
+ }
1911
+ DeviceListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1912
+ 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\" *ngIf=\"device.lineAssociations?.length\">\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: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }] });
1913
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceListComponent, decorators: [{
1914
+ type: Component,
1915
+ 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\" *ngIf=\"device.lineAssociations?.length\">\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"] }]
1916
+ }], ctorParameters: function () { return []; }, propDecorators: { devices: [{
1917
+ type: Input
1918
+ }], onDeviceSelect: [{
1919
+ type: Output
1920
+ }] } });
1921
+
1922
+ class InfoDialogComponent {
1923
+ constructor(dialogRef, data) {
1924
+ this.dialogRef = dialogRef;
1925
+ this.data = data;
1926
+ this.confirmButtonText = 'OK';
1927
+ this.message = '';
1928
+ this.title = '';
1929
+ }
1930
+ ngOnInit() {
1931
+ this.confirmButtonText = this.data.confirmButtonText || '';
1932
+ this.message = this.data.message || '';
1933
+ this.title = this.data.title || '';
1934
+ }
1935
+ onClose(val) {
1936
+ this.dialogRef.close(val);
1937
+ }
1938
+ }
1939
+ InfoDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InfoDialogComponent, deps: [{ token: i1$1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
1940
+ InfoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: InfoDialogComponent, selector: "app-info-dialog", ngImport: i0, template: "<div id=\"info-dialog\" class=\"app-dialog\" aria-labelledby=\"info-dialog-label\" role=\"dialog\">\r\n <h3 *ngIf=\"title\" class=\"app-dialog-title\">{{title}}</h3>\r\n <div mat-dialog-content *ngIf=\"message\" class=\"app-dialog-content\">\r\n <div [innerHTML]=\"message\"></div>\r\n </div>\r\n <div mat-dialog-actions class=\"flex-gap-container\">\r\n <button class=\"app-dialog-button app-dialog-cancel-button\" (click)=\"onClose(false)\">\r\n Cancel\r\n </button>\r\n <button class=\"app-dialog-button app-dialog-confirm-button\" (click)=\"onClose(true)\">\r\n {{confirmButtonText}}\r\n </button>\r\n </div>\r\n</div>\r\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap\";#info-dialog{min-height:150px;width:400px;box-sizing:border-box;position:relative}#info-dialog .fa{font-size:35px;margin:0 auto 20px;display:block;text-align:center;color:#009fdb;cursor:default}.scroll-content{overflow-y:auto;margin:auto;max-height:150px;width:100%}.app-dialog{font-family:Inter,Inter,sans-serif}.app-dialog .app-dialog-title{text-align:center;font-weight:600;font-size:16px;font-family:Inter,Inter,sans-serif;margin:0 0 24px}.app-dialog .flex-gap-container{gap:16px;position:absolute;right:0;bottom:0;gap:15px;display:flex}.app-dialog .app-dialog-content{color:#000000b3;font-size:14px}.app-dialog-button{height:32px;padding:10px 12px;text-align:center;border-radius:50px;box-shadow:none;line-height:11px;border:none;font-size:14px;font-family:Inter,Inter,sans-serif;cursor:pointer}.app-dialog-cancel-button{border:1px solid rgba(0,0,0,.5);color:#000;background:white}.app-dialog-confirm-button{background:black;color:#fff}\n"], dependencies: [{ kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
1941
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InfoDialogComponent, decorators: [{
1942
+ type: Component,
1943
+ args: [{ selector: 'app-info-dialog', encapsulation: ViewEncapsulation.None, template: "<div id=\"info-dialog\" class=\"app-dialog\" aria-labelledby=\"info-dialog-label\" role=\"dialog\">\r\n <h3 *ngIf=\"title\" class=\"app-dialog-title\">{{title}}</h3>\r\n <div mat-dialog-content *ngIf=\"message\" class=\"app-dialog-content\">\r\n <div [innerHTML]=\"message\"></div>\r\n </div>\r\n <div mat-dialog-actions class=\"flex-gap-container\">\r\n <button class=\"app-dialog-button app-dialog-cancel-button\" (click)=\"onClose(false)\">\r\n Cancel\r\n </button>\r\n <button class=\"app-dialog-button app-dialog-confirm-button\" (click)=\"onClose(true)\">\r\n {{confirmButtonText}}\r\n </button>\r\n </div>\r\n</div>\r\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap\";#info-dialog{min-height:150px;width:400px;box-sizing:border-box;position:relative}#info-dialog .fa{font-size:35px;margin:0 auto 20px;display:block;text-align:center;color:#009fdb;cursor:default}.scroll-content{overflow-y:auto;margin:auto;max-height:150px;width:100%}.app-dialog{font-family:Inter,Inter,sans-serif}.app-dialog .app-dialog-title{text-align:center;font-weight:600;font-size:16px;font-family:Inter,Inter,sans-serif;margin:0 0 24px}.app-dialog .flex-gap-container{gap:16px;position:absolute;right:0;bottom:0;gap:15px;display:flex}.app-dialog .app-dialog-content{color:#000000b3;font-size:14px}.app-dialog-button{height:32px;padding:10px 12px;text-align:center;border-radius:50px;box-shadow:none;line-height:11px;border:none;font-size:14px;font-family:Inter,Inter,sans-serif;cursor:pointer}.app-dialog-cancel-button{border:1px solid rgba(0,0,0,.5);color:#000;background:white}.app-dialog-confirm-button{background:black;color:#fff}\n"] }]
1944
+ }], ctorParameters: function () {
1945
+ return [{ type: i1$1.MatDialogRef }, { type: InfoDialogConfig, decorators: [{
1946
+ type: Inject,
1947
+ args: [MAT_DIALOG_DATA]
1948
+ }] }];
1949
+ } });
1950
+ class InfoDialogConfig {
1951
+ }
1952
+
1953
+ var SpeedDialType;
1954
+ (function (SpeedDialType) {
1955
+ SpeedDialType["slotBasic"] = "slotBasic";
1956
+ SpeedDialType["abbreviated"] = "abbreviated";
1957
+ })(SpeedDialType || (SpeedDialType = {}));
1958
+ var MailboxQuotasType;
1959
+ (function (MailboxQuotasType) {
1960
+ MailboxQuotasType["system"] = "system";
1961
+ MailboxQuotasType["custom"] = "custom";
1962
+ })(MailboxQuotasType || (MailboxQuotasType = {}));
1963
+ var VMNotificationsTypes;
1964
+ (function (VMNotificationsTypes) {
1965
+ VMNotificationsTypes["Pager Device"] = "Pager Device";
1966
+ VMNotificationsTypes["Phone Device"] = "Phone Device";
1967
+ VMNotificationsTypes["SMTP Device"] = "SMTP Device";
1968
+ VMNotificationsTypes["HTML Device"] = "HTML Device";
1969
+ })(VMNotificationsTypes || (VMNotificationsTypes = {}));
1970
+ var DeviceTypes;
1971
+ (function (DeviceTypes) {
1972
+ DeviceTypes["CTI_ROUTE_POINT"] = "CTI Route Point";
1973
+ DeviceTypes["CTI_PORT"] = "CTI Port";
1974
+ DeviceTypes["CTI_REMOTE"] = "CTI Remote Device";
1975
+ })(DeviceTypes || (DeviceTypes = {}));
1976
+
1977
+ const speedDialRegex = new RegExp('^[^"]*$');
1978
+ const BLFRegex = new RegExp('^[^"><&%]*$');
1979
+ const timeRegex = new RegExp('^([0-1][0-9]|[2][0-3]):([0-5][0-9])$');
1980
+ class ValidationService {
1981
+ constructor(siteSettingsService) {
1982
+ this.siteSettingsService = siteSettingsService;
1983
+ this.matchControl = (fieldName) => {
1984
+ return (control) => {
1985
+ if (!(control === null || control === void 0 ? void 0 : control.parent)) {
1986
+ return null;
1987
+ }
1988
+ const matchingControl = control.parent.get(fieldName);
1989
+ if (matchingControl.value && matchingControl.value !== control.value) {
1990
+ return {
1991
+ matchControl: true
1992
+ };
1993
+ }
1994
+ return null;
1995
+ };
1996
+ };
1997
+ this.matchLength = (fieldName) => {
1998
+ return (control) => {
1999
+ if (!control.parent || !control.value) {
2000
+ return null;
2001
+ }
2002
+ const matchingControl = control.parent.get(fieldName);
2003
+ if (((!control.value.startsWith('+') && !matchingControl.value.startsWith('+')) ||
2004
+ (control.value.startsWith('+') && matchingControl.value.startsWith('+'))) &&
2005
+ ((!control.value.startsWith('\\+') && !matchingControl.value.startsWith('\\+')) ||
2006
+ (control.value.startsWith('\\+') && matchingControl.value.startsWith('\\+'))) &&
2007
+ matchingControl.value.length !== control.value.length) {
2008
+ return {
2009
+ matchLength: true
2010
+ };
2011
+ }
2012
+ return null;
2013
+ };
2014
+ };
2015
+ this.dynamicMaxLength = (length1, length2) => {
2016
+ return (control) => {
2017
+ if (!control.parent || !control.value) {
2018
+ return null;
2019
+ }
2020
+ const maxLength = String(control.value).includes('[') ? length1 : length2;
2021
+ if (control.value.length > maxLength) {
2022
+ return {
2023
+ maxLength: true
2024
+ };
2025
+ }
2026
+ return null;
2027
+ };
2028
+ };
2029
+ this.biggerThan = (fieldName) => {
2030
+ return (control) => {
2031
+ if (!control.parent || !control.value) {
2032
+ return null;
2033
+ }
2034
+ const matchingControl = control.parent.get(fieldName);
2035
+ if (matchingControl.value.length === control.value.length && matchingControl.value && matchingControl.value > control.value) {
2036
+ return {
2037
+ biggerThan: true
2038
+ };
2039
+ }
2040
+ return null;
2041
+ };
2042
+ };
2043
+ this.requiredByType = (fieldName, type) => {
2044
+ return (control) => {
2045
+ if (fieldName === 'phoneSystem' && (type === VMNotificationsTypes['Phone Device'] || type === VMNotificationsTypes['Pager Device']) ||
2046
+ fieldName === 'htmlTemplate' && type === VMNotificationsTypes['HTML Device']) {
2047
+ return {
2048
+ required: true
2049
+ };
2050
+ }
2051
+ return null;
2052
+ };
2053
+ };
2054
+ this.smallerThanQuota = (fieldName, quotaType, secondQuotaType) => {
2055
+ return (control) => {
2056
+ if (!control.parent) {
2057
+ return null;
2058
+ }
2059
+ const matchingControl = control.parent.get(fieldName);
2060
+ const quotaTypeControl = control.parent.get(quotaType);
2061
+ const secondQuotaTypeControl = control.parent.get(secondQuotaType);
2062
+ if (quotaTypeControl && secondQuotaTypeControl && secondQuotaTypeControl.value === MailboxQuotasType.system) {
2063
+ return null;
2064
+ }
2065
+ if (quotaTypeControl && quotaTypeControl.value === MailboxQuotasType.system || matchingControl && matchingControl.value && parseInt(matchingControl.value) < parseInt(control.value)) {
2066
+ return {
2067
+ smallerThan: true
2068
+ };
2069
+ }
2070
+ return null;
2071
+ };
2072
+ };
2073
+ this.biggerThanQuota = (fieldName, quotaType) => {
2074
+ return (control) => {
2075
+ if (!(control === null || control === void 0 ? void 0 : control.parent)) {
2076
+ return null;
2077
+ }
2078
+ const matchingControl = control.parent.get(fieldName);
2079
+ const quotaTypeControl = control.parent.get(quotaType);
2080
+ if (quotaTypeControl && quotaTypeControl.value === MailboxQuotasType.custom && matchingControl.value && parseInt(matchingControl.value) > parseInt(control.value)) {
2081
+ return {
2082
+ biggerThan: true
2083
+ };
2084
+ }
2085
+ return null;
2086
+ };
2087
+ };
2088
+ this.rangeLimit = (fieldName) => {
2089
+ return (control) => {
2090
+ if (!(control === null || control === void 0 ? void 0 : control.parent) || !control.value) {
2091
+ return null;
2092
+ }
2093
+ const matchingControl = control.parent.get(fieldName);
2094
+ if ((control.value - matchingControl.value) > 50000) {
2095
+ return {
2096
+ rangeLimit: true
2097
+ };
2098
+ }
2099
+ return null;
2100
+ };
2101
+ };
2102
+ this.comparepatternParts = (fieldName) => {
2103
+ return (control) => {
2104
+ if (!(control === null || control === void 0 ? void 0 : control.value)) {
2105
+ return null;
2106
+ }
2107
+ const matches = control.value.match(/\[(.*?)\]/);
2108
+ if (matches) {
2109
+ const submatch = matches[1];
2110
+ const submatchsplit = submatch.split('-');
2111
+ for (let i = 0; i < submatchsplit.length; i++) {
2112
+ if (submatchsplit[i] >= submatchsplit[i + 1]) {
2113
+ return {
2114
+ comparepatternParts: true
2115
+ };
2116
+ }
2117
+ }
2118
+ }
2119
+ return null;
2120
+ };
2121
+ };
2122
+ this.matchPrefix = (fieldName) => {
2123
+ return (control) => {
2124
+ if (!(control === null || control === void 0 ? void 0 : control.parent) || !control.value) {
2125
+ return null;
2126
+ }
2127
+ const matchingControl = control.parent.get(fieldName);
2128
+ if ((matchingControl.value.startsWith('+') || control.value.startsWith('+') || matchingControl.value.startsWith('\\+') || control.value.startsWith('\\+')) && (control.value.charAt(0) !== matchingControl.value.charAt(0))) {
2129
+ return {
2130
+ matchPrefix: true
2131
+ };
2132
+ }
2133
+ return null;
2134
+ };
2135
+ };
2136
+ this.deviceNameValidator = (device) => {
2137
+ return (control) => {
2138
+ var _a;
2139
+ if (!control.value || device.deviceKind === DeviceKind.deviceProfile) {
2140
+ return;
2141
+ }
2142
+ if (device.isCtiRoutePoint) {
2143
+ let err = '';
2144
+ if (!control.value.match(/^[a-zA-Z0-9-_.]+$/)) {
2145
+ err = 'pattern';
2146
+ }
2147
+ if (control.value.trim().length > 15) {
2148
+ err = 'maxLength';
2149
+ }
2150
+ return err ? { nameRule: err } : null;
2151
+ }
2152
+ if (device.deviceDefaults && !device.isCtiRoutePoint) {
2153
+ const ruleText = device.deviceDefaults.deviceNameRegex;
2154
+ const rule = new RegExp(ruleText, 'g');
2155
+ const caption = (_a = device.deviceDefaults) === null || _a === void 0 ? void 0 : _a.deviceNameExplained;
2156
+ const match = (control.value || '').match(rule) || [];
2157
+ const exactMatch = match && control.value === match[0];
2158
+ if (rule && !exactMatch) {
2159
+ return { nameRule: { caption } };
2160
+ }
2161
+ }
2162
+ return null;
2163
+ };
2164
+ };
2165
+ this.deviceNameValueValidator = (device, deviceName) => {
2166
+ return (control) => {
2167
+ if (!control.value || device.deviceKind === DeviceKind.deviceProfile) {
2168
+ return;
2169
+ }
2170
+ if (device.name && device.alreadyUsedName && device.name === device.alreadyUsedName) {
2171
+ return { nameRule: 'alreadyUsedName' };
2172
+ }
2173
+ if (device.isCtiRoutePoint) {
2174
+ let err = '';
2175
+ if (!deviceName.match(/^[a-zA-Z0-9-_.]+$/)) {
2176
+ err = 'pattern';
2177
+ }
2178
+ if (deviceName.trim().length > 15) {
2179
+ err = 'maxLength';
2180
+ }
2181
+ return err ? { nameRule: err } : null;
2182
+ }
2183
+ if (device.deviceDefaults && !device.isCtiRoutePoint) {
2184
+ const ruleText = device.deviceDefaults.deviceNameRegex;
2185
+ // console.log('Dev name rule - ', ruleText);
2186
+ const rule = new RegExp(ruleText, 'g');
2187
+ let caption = device.deviceDefaults.deviceNameExplained;
2188
+ if (!caption) {
2189
+ caption = ruleText;
2190
+ }
2191
+ const match = (deviceName || '').match(rule) || [];
2192
+ const exactMatch = match && deviceName === match[0];
2193
+ if (rule && !exactMatch) {
2194
+ return { nameRule: { caption } };
2195
+ }
2196
+ }
2197
+ return null;
2198
+ };
2199
+ };
2200
+ this.deviceDuplicatingNameValidator = (user, pkid, prefix) => {
2201
+ return (control) => {
2202
+ if (!control.value || !user || !user.devices || user.devices.length === 0) {
2203
+ return;
2204
+ }
2205
+ const deviceName = prefix ? `${prefix}${control.value}` : control.value;
2206
+ const devicesWithTheSameName = user.devices.filter((device) => device.name === deviceName);
2207
+ if (devicesWithTheSameName.length > 0) {
2208
+ if (!pkid) { // For new device
2209
+ return { duplicateNameRule: true };
2210
+ }
2211
+ else if (pkid !== devicesWithTheSameName[0].pkid) { // For updating device, avoid validating with itself
2212
+ return { duplicateNameRule: true };
2213
+ }
2214
+ }
2215
+ return null;
2216
+ };
2217
+ };
2218
+ this.conditionalRequired = (fieldName, requiredConditionValues) => {
2219
+ return (control) => {
2220
+ const parent1 = control.parent;
2221
+ if (!parent1 || !parent1.get(fieldName) || !parent1.get(fieldName).value) {
2222
+ return;
2223
+ }
2224
+ if (requiredConditionValues.includes(parent1.get(fieldName).value) && !control.value) {
2225
+ return {
2226
+ required: true
2227
+ };
2228
+ }
2229
+ return null;
2230
+ };
2231
+ };
2232
+ this.conditionalRequiredForGroupAdmin = (fieldName, requiredConditionValues) => {
2233
+ return (control) => {
2234
+ const parent1 = control.parent;
2235
+ if (!parent1 || !parent1.get(fieldName) || !parent1.get(fieldName).value || !parent1.get(fieldName).value.type) {
2236
+ return;
2237
+ }
2238
+ if (requiredConditionValues.includes(parent1.get(fieldName).value.type) && !control.value) {
2239
+ return {
2240
+ required: true
2241
+ };
2242
+ }
2243
+ return null;
2244
+ };
2245
+ };
2246
+ this.conditionalSiteGroupCheckForGroupAdmin = (fieldName, requiredConditionValues) => {
2247
+ return (control) => {
2248
+ const parent1 = control.parent;
2249
+ if (!parent1 || !parent1.get(fieldName) || !parent1.get(fieldName).value || !parent1.get(fieldName).value.type) {
2250
+ return;
2251
+ }
2252
+ if (parent1.get(fieldName).value && requiredConditionValues.includes(parent1.get(fieldName).value.type) &&
2253
+ parent1.get('siteGroup') && parent1.get('siteGroup').value &&
2254
+ parent1.get('siteGroup').value.siteGroupMembers && parent1.get('siteGroup').value.siteGroupMembers.length < 1) {
2255
+ return {
2256
+ hasSiteGroupError: true
2257
+ };
2258
+ }
2259
+ return null;
2260
+ };
2261
+ };
2262
+ this.requiredIfFieldIsEmptyForBLF = (fieldName) => {
2263
+ const DATE_PATTERN = '^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.](19|20)\d\d$';
2264
+ return (control) => {
2265
+ const parent = control.parent;
2266
+ if (!parent || !parent.get(fieldName)) {
2267
+ return null;
2268
+ }
2269
+ if (!parent.get(fieldName).value && !control.value) {
2270
+ return {
2271
+ requiredEither: true,
2272
+ requiredBLFDN: true
2273
+ };
2274
+ }
2275
+ return null;
2276
+ };
2277
+ };
2278
+ this.validDate = (fieldName) => {
2279
+ return (control) => {
2280
+ const parent = control.parent;
2281
+ const ruleText = '^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.](19|20)\d\d$';
2282
+ const rule = new RegExp(ruleText, 'g');
2283
+ const val = control.value && control.value.getDate();
2284
+ if (rule && !rule.test(val)) {
2285
+ return { pattern: true };
2286
+ }
2287
+ return null;
2288
+ };
2289
+ };
2290
+ this.matchOption = (optionType, list, isFullList) => {
2291
+ return (control) => {
2292
+ if (!control.value || control.value === DeviceTypes.CTI_ROUTE_POINT) {
2293
+ return null;
2294
+ }
2295
+ let optionList = list || this.getOptionsList(optionType);
2296
+ if (optionList && optionList.length) {
2297
+ if (!isFullList && optionType === 'directoryNumbers') {
2298
+ optionList = optionList.map((str) => str.indexOf(' ') > -1 ? str.substring(0, str.indexOf(' ')) : str);
2299
+ }
2300
+ if (!optionList.includes(control.value)) {
2301
+ return {
2302
+ matchOptions: true
2303
+ };
2304
+ }
2305
+ }
2306
+ return null;
2307
+ };
2308
+ };
2309
+ this.confidentialAccessLevel = (confidentialAccessMode) => {
2310
+ return (control) => {
2311
+ if (!control.value && !confidentialAccessMode) {
2312
+ return null;
2313
+ }
2314
+ if (!control.value) {
2315
+ return {
2316
+ required: true
2317
+ };
2318
+ }
2319
+ return null;
2320
+ };
2321
+ };
2322
+ this.noResultDN = (optionType, list) => {
2323
+ return (control) => {
2324
+ if (!control.value || list === null) {
2325
+ return null;
2326
+ }
2327
+ if (list && list.length === 0) {
2328
+ return {
2329
+ noResultDNs: true
2330
+ };
2331
+ }
2332
+ return null;
2333
+ };
2334
+ };
2335
+ this.matchExtensionOption = (optionType, optionList) => {
2336
+ return (control) => {
2337
+ if (!control.value) {
2338
+ return control.value;
2339
+ }
2340
+ // @ts-ignore
2341
+ const newList = [];
2342
+ if (optionList && optionList.length) {
2343
+ optionList.forEach((list) => {
2344
+ const newOptionList = this.getMatchExistingVmLineValue(list);
2345
+ newList.push(newOptionList);
2346
+ });
2347
+ // @ts-ignore
2348
+ if (newList && !newList.includes(control.value)) {
2349
+ return {
2350
+ matchOptions: true
2351
+ };
2352
+ }
2353
+ }
2354
+ else if (!optionList || !optionList.length) {
2355
+ return {
2356
+ matchOptions: true
2357
+ };
2358
+ }
2359
+ return null;
2360
+ };
2361
+ };
2362
+ this.requiredEitherForVmExtension = (fieldName1, fieldName2) => {
2363
+ return (control) => {
2364
+ if (!control.parent) {
2365
+ return null;
2366
+ }
2367
+ const matchControl1 = control.parent.get(fieldName1).value;
2368
+ const matchControl2 = control.parent.get(fieldName2).value;
2369
+ if (!matchControl1 && !matchControl2) {
2370
+ return {
2371
+ requiredEitherForVmExtension: true
2372
+ };
2373
+ }
2374
+ return null;
2375
+ };
2376
+ };
2377
+ this.requiredEitherOne = (fieldName1, fieldName2) => {
2378
+ return (control) => {
2379
+ if (!control.parent) {
2380
+ return null;
2381
+ }
2382
+ const matchControl1 = control.parent.get(fieldName1) && control.parent.get(fieldName1).value;
2383
+ const matchControl2 = control.parent.get(fieldName2) && control.parent.get(fieldName2).value;
2384
+ if (!matchControl1 && !matchControl2) {
2385
+ return {
2386
+ requiredEitherOne: true
2387
+ };
2388
+ }
2389
+ return null;
2390
+ };
2391
+ };
2392
+ this.requiredByValue = (fieldName, requestedFieldVal) => {
2393
+ return (control) => {
2394
+ if (!control || !control.parent) {
2395
+ return null;
2396
+ }
2397
+ const fieldVal = control.parent.get(fieldName) && control.parent.get(fieldName).value;
2398
+ if (fieldVal && fieldVal === requestedFieldVal && !control.value) {
2399
+ return {
2400
+ required: true
2401
+ };
2402
+ }
2403
+ return null;
2404
+ };
2405
+ };
2406
+ this.OneExtensionEmpty = (fieldName1, fieldName2) => {
2407
+ return (control) => {
2408
+ if (!control.parent) {
2409
+ return null;
2410
+ }
2411
+ const matchControl1 = control.parent.get(fieldName1).value;
2412
+ const matchControl2 = control.parent.get(fieldName2).value;
2413
+ if (matchControl1 && matchControl2) {
2414
+ return {
2415
+ OneExtensionIsEmpty: true
2416
+ };
2417
+ }
2418
+ return null;
2419
+ };
2420
+ };
2421
+ this.requiredByCondition = (requiredBy, fieldName) => {
2422
+ return (control) => {
2423
+ if (!control.parent) {
2424
+ return null;
2425
+ }
2426
+ const requiredByControl = control.parent.get(requiredBy).value;
2427
+ const requiredControl = control.parent.get(fieldName).value;
2428
+ if (requiredByControl && !requiredControl) {
2429
+ return {
2430
+ required: true
2431
+ };
2432
+ }
2433
+ return null;
2434
+ };
2435
+ };
2436
+ this.pinMultiCharacterCheck = (fieldName) => {
2437
+ // @ts-ignore
2438
+ return (control) => {
2439
+ if (!control.parent) {
2440
+ return null;
2441
+ }
2442
+ const matchingControl = control.parent.get(fieldName);
2443
+ const ruleMultiCharacter = new RegExp('([0-9])\\1{2}');
2444
+ if (matchingControl.value) {
2445
+ const hasMultiCharacter = ruleMultiCharacter.test(matchingControl.value);
2446
+ if (hasMultiCharacter) {
2447
+ return {
2448
+ multiCharacter: true
2449
+ };
2450
+ }
2451
+ }
2452
+ };
2453
+ };
2454
+ this.pinConsecutiveNumberCheck = (fieldName) => {
2455
+ // @ts-ignore
2456
+ return (control) => {
2457
+ if (!control.parent) {
2458
+ return null;
2459
+ }
2460
+ const matchingControl = control.parent.get(fieldName);
2461
+ const strToCheck = matchingControl.value;
2462
+ if (strToCheck && strToCheck.length > 1) {
2463
+ const resAsc = this.pinOrderCheck(strToCheck);
2464
+ if (resAsc === true) {
2465
+ return {
2466
+ consecutiveNumbers: true
2467
+ };
2468
+ }
2469
+ }
2470
+ };
2471
+ };
2472
+ this.pinMailboxExtensionCheck = (fieldName, extension) => {
2473
+ return (control) => {
2474
+ if (!control.parent) {
2475
+ return null;
2476
+ }
2477
+ const matchingControl = control.parent.get(fieldName);
2478
+ const strToCheck = matchingControl.value;
2479
+ if (strToCheck === extension || strToCheck.includes(extension)) {
2480
+ return {
2481
+ mailboxExtension: true
2482
+ };
2483
+ }
2484
+ return null;
2485
+ };
2486
+ };
2487
+ }
2488
+ e164MaskLabel(control) {
2489
+ const ruleText = `^[0-9*#+X]{0,24}$`;
2490
+ const rule = new RegExp(ruleText, 'g');
2491
+ if (control.value && rule && !rule.test(control.value)) {
2492
+ return { e164MaskRule: { rule: ruleText } };
2493
+ }
2494
+ return null;
2495
+ }
2496
+ index(control) {
2497
+ const value = parseInt(control.value);
2498
+ if (!value) {
2499
+ return null;
2500
+ }
2501
+ const pattern = '^[+0-9]*$';
2502
+ if (value && !Number.isInteger(value) || value < 1 || value > 199) {
2503
+ return { indexRule: true };
2504
+ }
2505
+ return null;
2506
+ }
2507
+ displayLabel(control) {
2508
+ const ruleText = `^[^""""%&<>]{0,30}$`;
2509
+ const rule = new RegExp(ruleText, 'g');
2510
+ if (rule && !rule.test(control.value)) {
2511
+ return { labelRule: { rule: ruleText, count: 30 } };
2512
+ }
2513
+ return null;
2514
+ }
2515
+ displayLabelAscii(control) {
2516
+ const ruleText = '^[a-zA-Z0-9 !#$\'()*+,./:;=?@\\^_`}~-]{0,30}$';
2517
+ const rule = new RegExp(ruleText, 'g');
2518
+ if (rule && !rule.test(control.value)) {
2519
+ return { labelRule: { rule: ruleText, count: 30 } };
2520
+ }
2521
+ return null;
2522
+ }
2523
+ requiredForSpeedDialPosition(type) {
2524
+ return (control) => {
2525
+ const parent = control.parent;
2526
+ if (type === SpeedDialType.slotBasic || !parent) {
2527
+ return null;
2528
+ }
2529
+ if (!control.value) {
2530
+ return { required: true };
2531
+ }
2532
+ return null;
2533
+ };
2534
+ }
2535
+ speedDialDestination() {
2536
+ return (control) => {
2537
+ if (!control || !control.value) {
2538
+ return null;
2539
+ }
2540
+ const numberOrHostNameIP = '' +
2541
+ '^([0-9\\*#+PpCcFf,]+)$' +
2542
+ '|' +
2543
+ '^(' +
2544
+ '([a-zA-Z0-9]){1,47}@' +
2545
+ '(' +
2546
+ '((?:[0-9]{1,3}\\.){3}[0-9]{1,3})' +
2547
+ '|' +
2548
+ '([a-zA-Z0-9][a-zA-Z0-9\\-]{1,61}[a-zA-Z0-9]\\.[a-zA-Z]{2,})' +
2549
+ ')' +
2550
+ ')$';
2551
+ const rule = new RegExp(numberOrHostNameIP, 'g');
2552
+ if (rule && !rule.test(control.value)) {
2553
+ return { pattern: true };
2554
+ }
2555
+ return null;
2556
+ };
2557
+ }
2558
+ requiredForSpeedDialDestination(type) {
2559
+ return (control) => {
2560
+ const parent = control.parent;
2561
+ if ((!parent || !parent.get('label')) || (type === SpeedDialType.slotBasic && !control.value && !parent.get('label').value)) {
2562
+ return null;
2563
+ }
2564
+ return null;
2565
+ };
2566
+ }
2567
+ labelPatternDependingOnType(control) {
2568
+ const parent = control === null || control === void 0 ? void 0 : control.parent;
2569
+ if (!parent || !parent.get('type') || !control.value) {
2570
+ return null;
2571
+ }
2572
+ const type = parent.get('type').value;
2573
+ if (!type && !speedDialRegex.test(control.value)) {
2574
+ return { labelRule: { wrong: '"' } };
2575
+ }
2576
+ if (type && !BLFRegex.test(control.value)) {
2577
+ return { labelRule: { wrong: '"><&%' } };
2578
+ }
2579
+ return null;
2580
+ }
2581
+ labelPatternBLF(control) {
2582
+ if (control.value && !BLFRegex.test(control.value)) {
2583
+ return { labelRule: { wrong: '"><&%' } };
2584
+ }
2585
+ return null;
2586
+ }
2587
+ labelPatternSpeedDial(control) {
2588
+ if ((control === null || control === void 0 ? void 0 : control.value) && !speedDialRegex.test(control.value)) {
2589
+ return { labelRule: { wrong: '"' } };
2590
+ }
2591
+ return null;
2592
+ }
2593
+ getMatchExistingVmLineValue(dnWithType) {
2594
+ const ind = dnWithType.indexOf('Type:');
2595
+ let dn = dnWithType;
2596
+ if (ind > -1) {
2597
+ dn = dnWithType.slice(0, ind);
2598
+ dn = dn.trim();
2599
+ }
2600
+ return dn;
2601
+ }
2602
+ getOptionsList(token) {
2603
+ switch (token) {
2604
+ case 'css':
2605
+ case 'rerouteCss':
2606
+ case 'callingSearchSpace':
2607
+ return this.siteSettingsService.callingSearchSpaceTypes;
2608
+ case 'reroutingCss':
2609
+ return this.siteSettingsService.siteDefaults && this.siteSettingsService.siteDefaults.cssFilter;
2610
+ case 'deviceType':
2611
+ return this.siteSettingsService.deviceTypes;
2612
+ case 'routePartition':
2613
+ return this.siteSettingsService.routePartitionNames;
2614
+ case 'routePartitionFiltered':
2615
+ return this.siteSettingsService.filteredRoutePartitionNames;
2616
+ case 'devicePools':
2617
+ return this.siteSettingsService.devicePools;
2618
+ case 'allRoutePartitions':
2619
+ return this.siteSettingsService.allRoutePartitionNames;
2620
+ case 'directoryNumbers':
2621
+ return this.siteSettingsService.directoryNumbers;
2622
+ default:
2623
+ return [];
2624
+ }
2625
+ }
2626
+ autocompleteType(control) {
2627
+ if (!control.value) {
2628
+ return null;
2629
+ }
2630
+ if (typeof control.value !== 'object' && control.value !== '') {
2631
+ return {
2632
+ stringEntered: true
2633
+ };
2634
+ }
2635
+ return null;
2636
+ }
2637
+ password(control) {
2638
+ const ruleNumeric = new RegExp(/\d+/, 'g');
2639
+ const ruleCapitals = new RegExp(/[A-Z]+/, 'g');
2640
+ const ruleSmall = new RegExp(/[a-z]+/, 'g');
2641
+ const ruleSpecial = new RegExp(/[!@#$%&\/=\?_\.,:;\-\\+]+/, 'g');
2642
+ const hasNumeric = +ruleNumeric.test(control.value);
2643
+ const hasCapitals = +ruleCapitals.test(control.value);
2644
+ const hasSmall = +ruleSmall.test(control.value);
2645
+ const hasSpecial = +ruleSpecial.test(control.value);
2646
+ if (hasNumeric + hasCapitals + hasSmall + hasSpecial < 3) {
2647
+ return {
2648
+ weakPassword: true
2649
+ };
2650
+ }
2651
+ return null;
2652
+ }
2653
+ verifyAutoAnswer(control) {
2654
+ if (!(control === null || control === void 0 ? void 0 : control.value) || control.value.length === 0) {
2655
+ return null;
2656
+ }
2657
+ let autoAnswerErrorLine = null;
2658
+ if (control.parent && control.parent.parent && control.parent.parent.parent && control.parent.parent.parent.parent) {
2659
+ const controlSNR = control.parent;
2660
+ const controlUser = control.parent.parent.parent.parent;
2661
+ const lineAssociations = controlSNR.get('lineAssociations');
2662
+ const lines = controlUser.get('lines');
2663
+ if (lines) {
2664
+ lineAssociations.value.forEach((lineAssociation) => {
2665
+ const autoAnswerLine = lines.controls.find((line) => line.get('directoryNumber').value.directoryNumber === lineAssociation.directoryNumber && line.get('directoryNumber').value.routePartitionName === lineAssociation.routePartitionName
2666
+ && line.get('autoAnswer').value !== 'Auto Answer Off');
2667
+ if (autoAnswerLine) {
2668
+ autoAnswerErrorLine = {
2669
+ autoAnswerErrorLine: lineAssociation.directoryNumber
2670
+ };
2671
+ }
2672
+ });
2673
+ }
2674
+ }
2675
+ return autoAnswerErrorLine;
2676
+ }
2677
+ verifyBeginEndTime(control) {
2678
+ const parent = control.parent;
2679
+ if (!parent || !parent.get('isActive') || !parent.get('allDay') || !parent.get('from') || !parent.get('to')) {
2680
+ return null;
2681
+ }
2682
+ if (parent.get('isActive').value) {
2683
+ if (!parent.get('allDay').value) {
2684
+ if (!parent.get('from').value || parent.get('from').value === 'No Office Hours'
2685
+ || !parent.get('to').value || parent.get('to').value === 'No Office Hours'
2686
+ || parent.get('from').value > parent.get('to').value) {
2687
+ return {
2688
+ fromGreaterThanTo: true
2689
+ };
2690
+ }
2691
+ }
2692
+ }
2693
+ return null;
2694
+ }
2695
+ time(control) {
2696
+ if (control.value && !timeRegex.test(control.value)) {
2697
+ return { timeFormat: true };
2698
+ }
2699
+ return null;
2700
+ }
2701
+ pinOrderCheck(str) {
2702
+ if (str) {
2703
+ const arr_num = ('' + str).split('');
2704
+ for (let i = 0; i < arr_num.length - 2; i++) {
2705
+ const num1 = parseInt(arr_num[i]);
2706
+ const num2 = parseInt(arr_num[i + 1]);
2707
+ const num3 = parseInt(arr_num[i + 2]);
2708
+ if ((num2 - num1) === 1 && (num3 - num2 === num2 - num1)) {
2709
+ return true;
2710
+ }
2711
+ }
2712
+ return false;
2713
+ }
2714
+ }
2715
+ isItemAlreadyInList(item, list) {
2716
+ if (!item || !list || !list.length) {
2717
+ return false;
2718
+ }
2719
+ for (const listItem of list) {
2720
+ if (item.equals(listItem)) {
2721
+ return true;
2722
+ }
2723
+ }
2724
+ return false;
2725
+ }
2726
+ }
2727
+ ValidationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ValidationService, deps: [{ token: SiteSettingsService }], target: i0.ɵɵFactoryTarget.Injectable });
2728
+ ValidationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ValidationService });
2729
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ValidationService, decorators: [{
2730
+ type: Injectable
2731
+ }], ctorParameters: function () { return [{ type: SiteSettingsService }]; } });
2732
+
2733
+ class DeviceAssociatedLineDetailsBoxComponent {
2734
+ constructor() {
2735
+ this.title = '';
2736
+ }
2737
+ }
2738
+ DeviceAssociatedLineDetailsBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceAssociatedLineDetailsBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2739
+ DeviceAssociatedLineDetailsBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DeviceAssociatedLineDetailsBoxComponent, selector: "app-line-details-block", inputs: { title: "title" }, ngImport: i0, template: "<div class=\"line-details-block\">\r\n <div class=\"line-details-block__title\">{{ title }}</div>\r\n <div class=\"line-details-block__content\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>", styles: [".line-details-block{display:flex;padding:1rem 1.5rem}.line-details-block__title{width:150px;max-width:150px;font-weight:500}.line-details-block__content{display:flex;flex-direction:column;width:100%;margin-left:2.5rem}\n"] });
2740
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceAssociatedLineDetailsBoxComponent, decorators: [{
2741
+ type: Component,
2742
+ args: [{ selector: "app-line-details-block", template: "<div class=\"line-details-block\">\r\n <div class=\"line-details-block__title\">{{ title }}</div>\r\n <div class=\"line-details-block__content\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>", styles: [".line-details-block{display:flex;padding:1rem 1.5rem}.line-details-block__title{width:150px;max-width:150px;font-weight:500}.line-details-block__content{display:flex;flex-direction:column;width:100%;margin-left:2.5rem}\n"] }]
2743
+ }], ctorParameters: function () { return []; }, propDecorators: { title: [{
2744
+ type: Input
2745
+ }] } });
2746
+
2747
+ class DeviceAssociatedLineComponent {
2748
+ get form() {
2749
+ var _a, _b, _c, _d;
2750
+ return ((_b = (_a = this.userService) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.devices[this.deviceIndex]) && ((_d = (_c = this.userService) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.devices[this.deviceIndex].lineAssociations[this.lineIndex].form);
2751
+ }
2752
+ get lineAssociation() {
2753
+ var _a, _b;
2754
+ return (_b = (_a = this.userService) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.devices[this.deviceIndex].lineAssociations[this.lineIndex];
2755
+ }
2756
+ get originLineAssociation() {
2757
+ var _a, _b;
2758
+ return (_b = (_a = this.userService) === null || _a === void 0 ? void 0 : _a.originUser) === null || _b === void 0 ? void 0 : _b.devices[this.deviceIndex].lineAssociations[this.lineIndex];
2759
+ }
2760
+ get user() {
2761
+ return this.userService.user;
2762
+ }
2763
+ constructor(userService, apiService, siteSettingsService, lineService, deviceService, dialog, validationService) {
2764
+ this.userService = userService;
2765
+ this.apiService = apiService;
2766
+ this.siteSettingsService = siteSettingsService;
2767
+ this.lineService = lineService;
2768
+ this.deviceService = deviceService;
2769
+ this.dialog = dialog;
2770
+ this.validationService = validationService;
2771
+ this.updatedLineAssociationEvent = new EventEmitter();
2772
+ this.onChange = new EventEmitter();
2773
+ this.recordingOptions = RecordingOptions;
2774
+ this.recordingMediaSources = RECORDING_MEDIA_SOURCE;
2775
+ this.staticOptions = STATIC_OPTIONS;
2776
+ this.subscriptions = [];
2777
+ }
2778
+ ngOnInit() {
2779
+ this.getData();
2780
+ this.lineService.onSaveLineAssociationEvent
2781
+ .subscribe(() => {
2782
+ this.updateLine(this.lineAssociation);
2783
+ });
2784
+ }
2785
+ ngOnDestroy() {
2786
+ var _a;
2787
+ if ((_a = this.subscriptions) === null || _a === void 0 ? void 0 : _a.length) {
2788
+ this.subscriptions.forEach((subscription) => subscription.unsubscribe());
2789
+ }
2790
+ }
2791
+ onChangeField(token) {
2792
+ var _a, _b;
2793
+ if (!token) {
2794
+ return;
2795
+ }
2796
+ this.userService.user.devices[this.deviceIndex].lineAssociations[this.lineIndex][token] = (_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.get(token)) === null || _b === void 0 ? void 0 : _b.value;
2797
+ this.setHasChangesToLine();
2798
+ this.onChange.emit();
2799
+ }
2800
+ onAutocomplete(token) {
2801
+ var _a, _b;
2802
+ const value = (_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.get(token)) === null || _b === void 0 ? void 0 : _b.value;
2803
+ this.filteredMonitorCssList = UtilsService.filterOptions(this.monitorCssList, value);
2804
+ }
2805
+ recordingOptionChanged(token) {
2806
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2807
+ const value = (_a = this.form.get(token)) === null || _a === void 0 ? void 0 : _a.value;
2808
+ this.onChangeField(token);
2809
+ if (value === RecordingOptions.auto_enabled || value === RecordingOptions.selective_enabled) {
2810
+ if (!((_c = (_b = this.form) === null || _b === void 0 ? void 0 : _b.get('recordingProfile')) === null || _c === void 0 ? void 0 : _c.touched)) {
2811
+ (_d = this.form.get('recordingProfile')) === null || _d === void 0 ? void 0 : _d.markAsTouched();
2812
+ }
2813
+ (_e = this.form.get('recordingProfile')) === null || _e === void 0 ? void 0 : _e.enable();
2814
+ (_f = this.form.get('recordingMediaSource')) === null || _f === void 0 ? void 0 : _f.enable();
2815
+ }
2816
+ else {
2817
+ (_g = this.form.get('recordingProfile')) === null || _g === void 0 ? void 0 : _g.disable();
2818
+ (_h = this.form.get('recordingProfile')) === null || _h === void 0 ? void 0 : _h.setValue('');
2819
+ this.onChangeField('recordingProfile');
2820
+ /* if (!this.authService.hasRole('SUPER_USER')) {
2821
+ recordingMediaSource.disable();
2822
+ recordingMediaSource.setValue(this.recordingMediaSources[0]);
2823
+ this.changeField('recordingMediaSource');
2824
+ }*/
2825
+ }
2826
+ }
2827
+ getRule() {
2828
+ var _a, _b, _c;
2829
+ // @ts-ignore
2830
+ if (((_a = this.form.get('e164Mask')) === null || _a === void 0 ? void 0 : _a.errors) && ((_b = this.form.get('e164Mask')) === null || _b === void 0 ? void 0 : _b.errors['e164MaskRule'])) {
2831
+ // @ts-ignore
2832
+ return (_c = this.form.get('e164Mask')) === null || _c === void 0 ? void 0 : _c.errors['e164MaskRule']['rule'];
2833
+ }
2834
+ return '';
2835
+ }
2836
+ toggleEditMode() {
2837
+ this.userService.user.toggleEditMode();
2838
+ }
2839
+ isSavingDisabled() {
2840
+ return !this.userService.hasUnsavedChanges() || this.userService.hasExistedUserId;
2841
+ }
2842
+ onChangeExtension(value) {
2843
+ if (this.lineAssociation && this.lineAssociation.directoryNumber) {
2844
+ this.userService.user.devices[0].lineAssociations[0].directoryNumber.directoryNumber = value;
2845
+ }
2846
+ }
2847
+ onLineRemove() {
2848
+ }
2849
+ getData() {
2850
+ this.dataPending = true;
2851
+ const subscription = this.siteSettingsService.getMonitorCss(this.siteId)
2852
+ .subscribe((res) => {
2853
+ this.monitorCssList = (res === null || res === void 0 ? void 0 : res.length) ? res.slice() : [];
2854
+ this.filteredMonitorCssList = (res === null || res === void 0 ? void 0 : res.length) ? res.slice() : [];
2855
+ });
2856
+ this.subscriptions.push(subscription);
2857
+ }
2858
+ updateLine(line) {
2859
+ const body = this.lineService.getLineAssociationBody(this.originLineAssociation, this.lineAssociation);
2860
+ console.log('update line', body);
2861
+ this.deviceService.dataPending = true;
2862
+ this.deviceService.putDeviceFields(this.siteId, this.deviceName, this.userService.user.token, body)
2863
+ .subscribe(() => {
2864
+ this.userService.persistUserCache()
2865
+ .subscribe(() => {
2866
+ this.userService.fetchUserToken(this.siteId, this.userService.user.userid, this.validationService)
2867
+ .subscribe(() => {
2868
+ this.updatedLineAssociationEvent.emit();
2869
+ this.deviceService.dataPending = false;
2870
+ }, () => this.deviceService.dataPending = false);
2871
+ }, () => this.deviceService.dataPending = true);
2872
+ }, () => this.deviceService.dataPending = true);
2873
+ }
2874
+ deleteLine(line) {
2875
+ this.lineService.deleteLine(this.siteId, line.linePkid, this.userService.user.token)
2876
+ .subscribe(() => {
2877
+ this.userService.persistUserCache()
2878
+ .subscribe(() => {
2879
+ this.userService.fetchUserToken(this.siteId, this.userService.user.userid, this.validationService)
2880
+ .subscribe(() => {
2881
+ this.updatedLineAssociationEvent.emit();
2882
+ });
2883
+ });
2884
+ });
2885
+ }
2886
+ setHasChangesToLine() {
2887
+ if (this.lineAssociation) {
2888
+ this.userService.user.devices[this.deviceIndex].lineAssociations[this.lineIndex].hasChanges = !this.lineAssociation.fullEqual(this.originLineAssociation);
2889
+ this.userService.user.devices[this.deviceIndex].lineAssociationsHasChanges = !this.lineAssociation.fullEqual(this.originLineAssociation);
2890
+ }
2891
+ }
2892
+ }
2893
+ DeviceAssociatedLineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceAssociatedLineComponent, deps: [{ token: UserService }, { token: APIService }, { token: SiteSettingsService }, { token: LineService }, { token: DeviceService }, { token: i1$1.MatDialog }, { token: ValidationService }], target: i0.ɵɵFactoryTarget.Component });
2894
+ DeviceAssociatedLineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DeviceAssociatedLineComponent, selector: "app-device-associated-line", inputs: { lineIndex: "lineIndex", deviceIndex: "deviceIndex", deviceName: "deviceName", siteId: "siteId" }, outputs: { updatedLineAssociationEvent: "updatedLineAssociationEvent", onChange: "onChange" }, ngImport: i0, template: "<div id=\"device-associated-line\" *ngIf=\"lineAssociation && form\" [formGroup]=\"form\">\r\n <ng-container class=\"line-details__container\">\r\n <app-line-details-block [title]=\"'Line setting on the device'\">\r\n <div class=\"form-group\">\r\n <label>Display Caller ID</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" name=\"displayLabel\" formControlName=\"displayLabel\"\r\n (input)=\"onChangeField('displayLabel')\">\r\n <mat-error *ngIf=\"form.get('displayLabel')?.hasError('maxlength')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field can\u2019t have more than 30 characters\r\n </mat-error>\r\n <mat-error *ngIf=\"form.get('displayLabel')?.hasError('pattern')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n Invalid symbols are used\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Text Label</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"textLabel\" name=\"textLabel\"\r\n matInput (input)=\"onChangeField('textLabel')\">\r\n <mat-error *ngIf=\"form.get('textLabel')?.hasError('maxlength')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field can\u2019t have more than 30 characters\r\n </mat-error>\r\n <mat-error *ngIf=\"form.get('textLabel')?.hasError('pattern')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n Invalid symbols are used\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>External Phone Number Mask</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" name=\"e164Mask\" formControlName=\"e164Mask\"\r\n (input)=\"onChangeField('e164Mask')\">\r\n <mat-error *ngIf=\"form.get('e164Mask')?.hasError('e164MaskRule')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n e164Mask does not match the rule {{getRule()}}\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </app-line-details-block>\r\n <div class=\"form-group__separator_2px\"></div>\r\n <app-line-details-block [title]=\"'Multiple Call/Call Waiting Settings'\">\r\n <div class=\"form-group\">\r\n <label>Max Calls</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" name=\"maxNumberOfCalls\" formControlName=\"maxNumberOfCalls\"\r\n (input)=\"onChangeField('maxNumberOfCalls')\">\r\n <mat-error *ngIf=\"form.get('maxNumberOfCalls')?.hasError('max')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n Value is too big\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Busy Trigger</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" name=\"busyTrigger\" formControlName=\"busyTrigger\"\r\n (input)=\"onChangeField('busyTrigger')\">\r\n <mat-error *ngIf=\"form.get('busyTrigger')?.hasError('max')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n Value can't be bigger than Max Calls\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </app-line-details-block>\r\n <div class=\"form-group__separator_2px\"></div>\r\n <app-line-details-block [title]=\"'Call Recording'\">\r\n <div class=\"form-group\">\r\n <label>Recording Option</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n (selectionChange)=\"recordingOptionChanged('recordingOption')\"\r\n formControlName=\"recordingOption\"\r\n [id]=\"'associatedLineRecordingOptionField'\">\r\n <mat-option [value]=recordingOptions.disabled>Call Recording Disabled</mat-option>\r\n <mat-option [value]=recordingOptions.auto_enabled>Automatic Call Recording Enabled</mat-option>\r\n <mat-option [value]=recordingOptions.selective_enabled>Selective Call Recording Enabled</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Recording Media Source</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n (selectionChange)=\"onChangeField('recordingMediaSource')\" formControlName=\"recordingMediaSource\"\r\n [id]=\"'associatedLineRecordingMediaSourceField'\">\r\n <mat-option *ngFor=\"let source of recordingMediaSources\" [value]=\"source\">{{source}}</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Recording Profile</label>\r\n <app-lazy-loading-select\r\n [siteId]=\"siteId\"\r\n [controlName]=\"'recordingProfile'\"\r\n [form]=\"form\"\r\n (changeField)=\"onChangeField('recordingProfile')\"\r\n [optionsToken]=\"'recordingProfile'\"></app-lazy-loading-select>\r\n </div>\r\n </app-line-details-block>\r\n <div class=\"form-group__separator_2px\"></div>\r\n <app-line-details-block [title]=\"'Additional line settings on the device'\">\r\n <div class=\"form-group\">\r\n <label>Visual Message Waiting Indicator Policy</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n formControlName=\"visualMWI\"\r\n (selectionChange)=\"onChangeField('visualMWI')\">\r\n <mat-option\r\n *ngFor=\"let option of staticOptions.VISUAL_MWI\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Ring Setting (Phone Idle)</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n formControlName=\"ringSetting_idle\"\r\n (selectionChange)=\"onChangeField('ringSetting_idle')\">\r\n <mat-option *ngFor=\"let option of staticOptions.RING_SETTING_IDLE\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Call Pickup Audio Alert Setting (Phone Idle)</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select name=\"pickupAAS_idle\"\r\n formControlName=\"pickupAAS_idle\"\r\n (selectionChange)=\"onChangeField('pickupAAS_idle')\">\r\n <mat-option *ngFor=\"let option of staticOptions.CALL_PICKUP_GROUP_AUDIO_SETTING_PHONE_IDLE\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Monitoring Calling Search Space</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input\r\n [matAutocomplete]=\"auto\"\r\n matInput\r\n (input)=\"onAutocomplete('monitorCSS')\"\r\n formControlName=\"monitorCSS\">\r\n <mat-autocomplete\r\n #auto=\"matAutocomplete\"\r\n (optionSelected)=\"onChangeField('monitorCSS')\">\r\n <mat-option *ngFor=\"let option of filteredMonitorCssList\" [value]=\"option\" >\r\n {{option}}\r\n </mat-option>\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Audible Message Waiting Indicator Policy</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n formControlName=\"audibleMWI\"\r\n (selectionChange)=\"onChangeField('audibleMWI')\">\r\n <mat-option *ngFor=\"let option of staticOptions.DEFAULT_ON_OFF\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Ring Setting (Phone Active)</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n formControlName=\"ringSetting_active\"\r\n (selectionChange)=\"onChangeField('ringSetting_active')\">\r\n <mat-option *ngFor=\"let option of staticOptions.RING_SETTING_ACTIVE\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Call Pickup Audio Alert Setting (Phone Active)</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n formControlName=\"pickupAAS_active\"\r\n (selectionChange)=\"onChangeField('pickupAAS_active')\">\r\n <mat-option\r\n *ngFor=\"let option of staticOptions.CALL_PICKUP_GROUP_AUDIO_SETTING_PHONE_ACTIVE\"\r\n [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Log Missed Calls</label>\r\n <mat-slide-toggle name=\"logMissedCalls\" formControlName=\"logMissedCall\"></mat-slide-toggle>\r\n </div>\r\n </app-line-details-block>\r\n <div class=\"form-group__separator_2px\"></div>\r\n <app-line-details-block [title]=\"'Forwardred call information display'\">\r\n <div class=\"form-group\">\r\n <label>Caller Name</label>\r\n <mat-slide-toggle name=\"callerName\" formControlName=\"callerName\" (change)=\"onChangeField('callerName')\"></mat-slide-toggle>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Redirected Number</label>\r\n <mat-slide-toggle name=\"redirectedNumber\" formControlName=\"redirectedNumber\" (change)=\"onChangeField('redirectedNumber')\"></mat-slide-toggle>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Caller Number</label>\r\n <mat-slide-toggle name=\"callerNumber\" formControlName=\"callerNumber\" (change)=\"onChangeField('callerNumber')\"></mat-slide-toggle>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Dialed Number</label>\r\n <mat-slide-toggle name=\"dialedNumber\" formControlName=\"dialedNumber\" (change)=\"onChangeField('dialedNumber')\"></mat-slide-toggle>\r\n </div>\r\n </app-line-details-block>\r\n </ng-container>\r\n\r\n</div>\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-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}.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%}table{border-collapse:collapse;border-spacing:0}.line-row{background:#ececec;cursor:pointer;width:100%;padding:5px;box-sizing:border-box}.line-row.disabled-line-row{cursor:default;color:silver}.user-details-box__info{grid-template-columns:100%}.form-holder__blocks{margin-top:1rem}.user-box-block{padding:1rem 0;gap:4rem;display:flex}.user-box-block-item__title{margin-bottom:.5rem}.user-box-block-item__tag{font-size:14px;color:#6d6d6d}#device-associated-line{background-color:#fff;padding:1rem;position:relative;border-left:3px solid #737480}.form-group{display:flex;align-items:center}.form-group__separator,.form-group__separator_2px{width:100%;height:1px;background-color:#cccccc80;margin:1rem 0}.form-group__separator_2px{height:2px}.form-group label{width:200px;max-width:200px;font-size:14px;color:#666}.form-group input{width:300px}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb{background-color:#009dff!important}.mat-slide-toggle.mat-checked .mat-slide-toggle-bar{background-color:#fff!important}.form-group .mat-form-field{max-width:300px}\n"], dependencies: [{ kind: "directive", type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.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: i9.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i9.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i9.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i6.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i11.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: i12.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i12.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i13.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i8$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { 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: DeviceAssociatedLineDetailsBoxComponent, selector: "app-line-details-block", inputs: ["title"] }] });
2895
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceAssociatedLineComponent, decorators: [{
2896
+ type: Component,
2897
+ args: [{ selector: 'app-device-associated-line', template: "<div id=\"device-associated-line\" *ngIf=\"lineAssociation && form\" [formGroup]=\"form\">\r\n <ng-container class=\"line-details__container\">\r\n <app-line-details-block [title]=\"'Line setting on the device'\">\r\n <div class=\"form-group\">\r\n <label>Display Caller ID</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" name=\"displayLabel\" formControlName=\"displayLabel\"\r\n (input)=\"onChangeField('displayLabel')\">\r\n <mat-error *ngIf=\"form.get('displayLabel')?.hasError('maxlength')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field can\u2019t have more than 30 characters\r\n </mat-error>\r\n <mat-error *ngIf=\"form.get('displayLabel')?.hasError('pattern')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n Invalid symbols are used\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Text Label</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"textLabel\" name=\"textLabel\"\r\n matInput (input)=\"onChangeField('textLabel')\">\r\n <mat-error *ngIf=\"form.get('textLabel')?.hasError('maxlength')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field can\u2019t have more than 30 characters\r\n </mat-error>\r\n <mat-error *ngIf=\"form.get('textLabel')?.hasError('pattern')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n Invalid symbols are used\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>External Phone Number Mask</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" name=\"e164Mask\" formControlName=\"e164Mask\"\r\n (input)=\"onChangeField('e164Mask')\">\r\n <mat-error *ngIf=\"form.get('e164Mask')?.hasError('e164MaskRule')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n e164Mask does not match the rule {{getRule()}}\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </app-line-details-block>\r\n <div class=\"form-group__separator_2px\"></div>\r\n <app-line-details-block [title]=\"'Multiple Call/Call Waiting Settings'\">\r\n <div class=\"form-group\">\r\n <label>Max Calls</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" name=\"maxNumberOfCalls\" formControlName=\"maxNumberOfCalls\"\r\n (input)=\"onChangeField('maxNumberOfCalls')\">\r\n <mat-error *ngIf=\"form.get('maxNumberOfCalls')?.hasError('max')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n Value is too big\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Busy Trigger</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" name=\"busyTrigger\" formControlName=\"busyTrigger\"\r\n (input)=\"onChangeField('busyTrigger')\">\r\n <mat-error *ngIf=\"form.get('busyTrigger')?.hasError('max')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n Value can't be bigger than Max Calls\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </app-line-details-block>\r\n <div class=\"form-group__separator_2px\"></div>\r\n <app-line-details-block [title]=\"'Call Recording'\">\r\n <div class=\"form-group\">\r\n <label>Recording Option</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n (selectionChange)=\"recordingOptionChanged('recordingOption')\"\r\n formControlName=\"recordingOption\"\r\n [id]=\"'associatedLineRecordingOptionField'\">\r\n <mat-option [value]=recordingOptions.disabled>Call Recording Disabled</mat-option>\r\n <mat-option [value]=recordingOptions.auto_enabled>Automatic Call Recording Enabled</mat-option>\r\n <mat-option [value]=recordingOptions.selective_enabled>Selective Call Recording Enabled</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Recording Media Source</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n (selectionChange)=\"onChangeField('recordingMediaSource')\" formControlName=\"recordingMediaSource\"\r\n [id]=\"'associatedLineRecordingMediaSourceField'\">\r\n <mat-option *ngFor=\"let source of recordingMediaSources\" [value]=\"source\">{{source}}</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Recording Profile</label>\r\n <app-lazy-loading-select\r\n [siteId]=\"siteId\"\r\n [controlName]=\"'recordingProfile'\"\r\n [form]=\"form\"\r\n (changeField)=\"onChangeField('recordingProfile')\"\r\n [optionsToken]=\"'recordingProfile'\"></app-lazy-loading-select>\r\n </div>\r\n </app-line-details-block>\r\n <div class=\"form-group__separator_2px\"></div>\r\n <app-line-details-block [title]=\"'Additional line settings on the device'\">\r\n <div class=\"form-group\">\r\n <label>Visual Message Waiting Indicator Policy</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n formControlName=\"visualMWI\"\r\n (selectionChange)=\"onChangeField('visualMWI')\">\r\n <mat-option\r\n *ngFor=\"let option of staticOptions.VISUAL_MWI\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Ring Setting (Phone Idle)</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n formControlName=\"ringSetting_idle\"\r\n (selectionChange)=\"onChangeField('ringSetting_idle')\">\r\n <mat-option *ngFor=\"let option of staticOptions.RING_SETTING_IDLE\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Call Pickup Audio Alert Setting (Phone Idle)</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select name=\"pickupAAS_idle\"\r\n formControlName=\"pickupAAS_idle\"\r\n (selectionChange)=\"onChangeField('pickupAAS_idle')\">\r\n <mat-option *ngFor=\"let option of staticOptions.CALL_PICKUP_GROUP_AUDIO_SETTING_PHONE_IDLE\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Monitoring Calling Search Space</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input\r\n [matAutocomplete]=\"auto\"\r\n matInput\r\n (input)=\"onAutocomplete('monitorCSS')\"\r\n formControlName=\"monitorCSS\">\r\n <mat-autocomplete\r\n #auto=\"matAutocomplete\"\r\n (optionSelected)=\"onChangeField('monitorCSS')\">\r\n <mat-option *ngFor=\"let option of filteredMonitorCssList\" [value]=\"option\" >\r\n {{option}}\r\n </mat-option>\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Audible Message Waiting Indicator Policy</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n formControlName=\"audibleMWI\"\r\n (selectionChange)=\"onChangeField('audibleMWI')\">\r\n <mat-option *ngFor=\"let option of staticOptions.DEFAULT_ON_OFF\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Ring Setting (Phone Active)</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n formControlName=\"ringSetting_active\"\r\n (selectionChange)=\"onChangeField('ringSetting_active')\">\r\n <mat-option *ngFor=\"let option of staticOptions.RING_SETTING_ACTIVE\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Call Pickup Audio Alert Setting (Phone Active)</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n formControlName=\"pickupAAS_active\"\r\n (selectionChange)=\"onChangeField('pickupAAS_active')\">\r\n <mat-option\r\n *ngFor=\"let option of staticOptions.CALL_PICKUP_GROUP_AUDIO_SETTING_PHONE_ACTIVE\"\r\n [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Log Missed Calls</label>\r\n <mat-slide-toggle name=\"logMissedCalls\" formControlName=\"logMissedCall\"></mat-slide-toggle>\r\n </div>\r\n </app-line-details-block>\r\n <div class=\"form-group__separator_2px\"></div>\r\n <app-line-details-block [title]=\"'Forwardred call information display'\">\r\n <div class=\"form-group\">\r\n <label>Caller Name</label>\r\n <mat-slide-toggle name=\"callerName\" formControlName=\"callerName\" (change)=\"onChangeField('callerName')\"></mat-slide-toggle>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Redirected Number</label>\r\n <mat-slide-toggle name=\"redirectedNumber\" formControlName=\"redirectedNumber\" (change)=\"onChangeField('redirectedNumber')\"></mat-slide-toggle>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Caller Number</label>\r\n <mat-slide-toggle name=\"callerNumber\" formControlName=\"callerNumber\" (change)=\"onChangeField('callerNumber')\"></mat-slide-toggle>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Dialed Number</label>\r\n <mat-slide-toggle name=\"dialedNumber\" formControlName=\"dialedNumber\" (change)=\"onChangeField('dialedNumber')\"></mat-slide-toggle>\r\n </div>\r\n </app-line-details-block>\r\n </ng-container>\r\n\r\n</div>\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-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}.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%}table{border-collapse:collapse;border-spacing:0}.line-row{background:#ececec;cursor:pointer;width:100%;padding:5px;box-sizing:border-box}.line-row.disabled-line-row{cursor:default;color:silver}.user-details-box__info{grid-template-columns:100%}.form-holder__blocks{margin-top:1rem}.user-box-block{padding:1rem 0;gap:4rem;display:flex}.user-box-block-item__title{margin-bottom:.5rem}.user-box-block-item__tag{font-size:14px;color:#6d6d6d}#device-associated-line{background-color:#fff;padding:1rem;position:relative;border-left:3px solid #737480}.form-group{display:flex;align-items:center}.form-group__separator,.form-group__separator_2px{width:100%;height:1px;background-color:#cccccc80;margin:1rem 0}.form-group__separator_2px{height:2px}.form-group label{width:200px;max-width:200px;font-size:14px;color:#666}.form-group input{width:300px}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb{background-color:#009dff!important}.mat-slide-toggle.mat-checked .mat-slide-toggle-bar{background-color:#fff!important}.form-group .mat-form-field{max-width:300px}\n"] }]
2898
+ }], ctorParameters: function () { return [{ type: UserService }, { type: APIService }, { type: SiteSettingsService }, { type: LineService }, { type: DeviceService }, { type: i1$1.MatDialog }, { type: ValidationService }]; }, propDecorators: { lineIndex: [{
2899
+ type: Input
2900
+ }], deviceIndex: [{
2901
+ type: Input
2902
+ }], deviceName: [{
2903
+ type: Input
2904
+ }], siteId: [{
2905
+ type: Input
2906
+ }], updatedLineAssociationEvent: [{
2907
+ type: Output
2908
+ }], onChange: [{
2909
+ type: Output
2910
+ }] } });
2911
+
2912
+ class AssociatedLineRowComponent {
2913
+ constructor() {
2914
+ this.toggled = false;
2915
+ this.toggleAssociatedLine = new EventEmitter();
2916
+ this.removeAssociatedLine = new EventEmitter();
2917
+ }
2918
+ onToggleDetails() {
2919
+ this.toggled = !this.toggled;
2920
+ this.toggleAssociatedLine.emit(this.toggled ? this.line.displayLabel : '');
2921
+ }
2922
+ onLineRemove() {
2923
+ this.removeAssociatedLine.emit();
2924
+ }
2925
+ }
2926
+ AssociatedLineRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AssociatedLineRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2927
+ AssociatedLineRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AssociatedLineRowComponent, selector: "app-associated-line-row", inputs: { line: "line", toggled: "toggled" }, outputs: { toggleAssociatedLine: "toggleAssociatedLine", removeAssociatedLine: "removeAssociatedLine" }, ngImport: i0, template: "<div class=\"line-item\">\r\n <div class=\"line-informations\">\r\n <div class=\"line-drag\">\r\n <i class=\"app-icon icon-dragger-vertical\"></i>\r\n </div>\r\n <div class=\"line-label\">Button Position {{ line.position }}</div>\r\n <div class=\"line-sep flex-box\">\r\n <div class=\"app-icon icon-vertical-divider\"></div>\r\n <div class=\"line-dn-box\">Line {{line.directoryNumber.directoryNumber}}</div>\r\n </div>\r\n <div class=\"line-name\">{{ line.displayLabel }}</div>\r\n </div>\r\n <div class=\"line-actions\">\r\n <div class=\"line-delete\">\r\n <i class=\"app-icon icon-delete\" (click)=\"onLineRemove()\"></i>\r\n </div>\r\n <div class=\"line-toggle-details\" (click)=\"onToggleDetails()\">\r\n <i class=\"app-icon icon-arrow-right\"></i>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".line-item{position:relative;display:flex;align-items:center;justify-content:space-between;background-color:#fff;border-radius:.5rem;border:1px solid #cfcfcf;padding:1rem;margin:1rem 0 0;z-index:10}.line-informations,.line-actions{display:inherit;align-items:inherit;gap:.5rem;padding:0 .5rem}.line-actions{cursor:pointer}.line-drag,.line-toggle-details,.line-delete{display:inherit;align-items:inherit;justify-content:center;font-size:1rem;color:#969696;width:36px;height:36px;border-radius:50%;transition:all .25s ease-out}.line-delete :hover{color:red!important}.line-drag{cursor:grab}.line-label{margin-right:2.5rem}.flex-box{display:flex;justify-content:flex-start}.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}.toggled{transform:rotate(-90deg)}.line-dn-box{line-height:20px}.icon-dragger-vertical{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%3Cpath d%3D%22M13.125 5C12.7935 5 12.4755 4.8683 12.2411 4.63388C12.0067 4.39946 11.875 4.08152 11.875 3.75C11.875 3.41848 12.0067 3.10054 12.2411 2.86612C12.4755 2.6317 12.7935 2.5 13.125 2.5C13.4565 2.5 13.7745 2.6317 14.0089 2.86612C14.2433 3.10054 14.375 3.41848 14.375 3.75C14.375 4.08152 14.2433 4.39946 14.0089 4.63388C13.7745 4.8683 13.4565 5 13.125 5ZM6.875 5C6.54348 5 6.22554 4.8683 5.99112 4.63388C5.7567 4.39946 5.625 4.08152 5.625 3.75C5.625 3.41848 5.7567 3.10054 5.99112 2.86612C6.22554 2.6317 6.54348 2.5 6.875 2.5C7.20652 2.5 7.52446 2.6317 7.75888 2.86612C7.9933 3.10054 8.125 3.41848 8.125 3.75C8.125 4.08152 7.9933 4.39946 7.75888 4.63388C7.52446 4.8683 7.20652 5 6.875 5ZM13.125 11.25C12.7935 11.25 12.4755 11.1183 12.2411 10.8839C12.0067 10.6495 11.875 10.3315 11.875 10C11.875 9.66848 12.0067 9.35054 12.2411 9.11612C12.4755 8.8817 12.7935 8.75 13.125 8.75C13.4565 8.75 13.7745 8.8817 14.0089 9.11612C14.2433 9.35054 14.375 9.66848 14.375 10C14.375 10.3315 14.2433 10.6495 14.0089 10.8839C13.7745 11.1183 13.4565 11.25 13.125 11.25ZM6.875 11.25C6.54348 11.25 6.22554 11.1183 5.99112 10.8839C5.7567 10.6495 5.625 10.3315 5.625 10C5.625 9.66848 5.7567 9.35054 5.99112 9.11612C6.22554 8.8817 6.54348 8.75 6.875 8.75C7.20652 8.75 7.52446 8.8817 7.75888 9.11612C7.9933 9.35054 8.125 9.66848 8.125 10C8.125 10.3315 7.9933 10.6495 7.75888 10.8839C7.52446 11.1183 7.20652 11.25 6.875 11.25ZM13.125 17.5C12.7935 17.5 12.4755 17.3683 12.2411 17.1339C12.0067 16.8995 11.875 16.5815 11.875 16.25C11.875 15.9185 12.0067 15.6005 12.2411 15.3661C12.4755 15.1317 12.7935 15 13.125 15C13.4565 15 13.7745 15.1317 14.0089 15.3661C14.2433 15.6005 14.375 15.9185 14.375 16.25C14.375 16.5815 14.2433 16.8995 14.0089 17.1339C13.7745 17.3683 13.4565 17.5 13.125 17.5ZM6.875 17.5C6.54348 17.5 6.22554 17.3683 5.99112 17.1339C5.7567 16.8995 5.625 16.5815 5.625 16.25C5.625 15.9185 5.7567 15.6005 5.99112 15.3661C6.22554 15.1317 6.54348 15 6.875 15C7.20652 15 7.52446 15.1317 7.75888 15.3661C7.9933 15.6005 8.125 15.9185 8.125 16.25C8.125 16.5815 7.9933 16.8995 7.75888 17.1339C7.52446 17.3683 7.20652 17.5 6.875 17.5Z%22 fill%3D%22black%22 fill-opacity%3D%220.95%22%2F%3E%0D%3C%2Fsvg%3E%0D\");width:1px;margin:0 10px 0 0}.icon-delete{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%22Icon%2FDelete%22%3E%0D%3Cpath id%3D%22Remove all%22 d%3D%22M9.5835 1.96973C10.9439 1.96973 12.0528 3.09413 12.1036 4.50119L12.1054 4.60217H15.2853C15.588 4.60217 15.8335 4.85838 15.8335 5.17444C15.8335 5.47074 15.6178 5.71444 15.3413 5.74375L15.2853 5.7467H14.8067L14.0597 16.0795C13.9864 17.0944 13.176 17.8788 12.201 17.8788H6.966C5.99094 17.8788 5.18064 17.0944 5.10725 16.0795L4.35981 5.7467H3.88174C3.59788 5.7467 3.3644 5.52152 3.33633 5.23295L3.3335 5.17444C3.3335 4.87813 3.54923 4.63443 3.82569 4.60512L3.88174 4.60217H7.06157C7.06157 3.14831 8.19067 1.96973 9.5835 1.96973ZM13.7072 5.7467L5.45977 5.7467L6.20064 15.9934C6.23085 16.4113 6.56451 16.7343 6.966 16.7343H12.201C12.6025 16.7343 12.9361 16.4113 12.9664 15.9934L13.7072 5.7467ZM11.0089 8.15024C11.2928 8.15024 11.5263 8.37542 11.5543 8.66399L11.5572 8.72251V13.7585C11.5572 14.0745 11.3117 14.3307 11.0089 14.3307C10.7251 14.3307 10.4916 14.1056 10.4635 13.817L10.4607 13.7585L10.4607 8.72251C10.4607 8.40645 10.7061 8.15024 11.0089 8.15024ZM8.15806 8.15024C8.44192 8.15024 8.6754 8.37542 8.70347 8.66399L8.7063 8.72251L8.7063 13.7585C8.7063 14.0745 8.46084 14.3307 8.15806 14.3307C7.87419 14.3307 7.64072 14.1056 7.61264 13.817L7.60981 13.7585L7.60981 8.72251C7.60981 8.40645 7.85527 8.15024 8.15806 8.15024ZM9.5835 3.11427C8.82339 3.11427 8.20225 3.73527 8.16031 4.51773L8.15806 4.60217L11.0089 4.60217C11.0089 3.78042 10.3707 3.11427 9.5835 3.11427Z%22 fill%3D%22%23737480%22%2F%3E%0D%3C%2Fg%3E%0D%3C%2Fsvg%3E%0D\")}.icon-arrow-right{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-vertical-divider{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%221%22 height%3D%2218%22 viewBox%3D%220 0 1 18%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cline x1%3D%220.5%22 y1%3D%222.18557e-08%22 x2%3D%220.499999%22 y2%3D%2218%22 stroke%3D%22%23333333%22%2F%3E%0D%3C%2Fsvg%3E%0D\");height:20px}.line-item:hover{background-color:#d6d6d680}\n"] });
2928
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AssociatedLineRowComponent, decorators: [{
2929
+ type: Component,
2930
+ args: [{ selector: "app-associated-line-row", template: "<div class=\"line-item\">\r\n <div class=\"line-informations\">\r\n <div class=\"line-drag\">\r\n <i class=\"app-icon icon-dragger-vertical\"></i>\r\n </div>\r\n <div class=\"line-label\">Button Position {{ line.position }}</div>\r\n <div class=\"line-sep flex-box\">\r\n <div class=\"app-icon icon-vertical-divider\"></div>\r\n <div class=\"line-dn-box\">Line {{line.directoryNumber.directoryNumber}}</div>\r\n </div>\r\n <div class=\"line-name\">{{ line.displayLabel }}</div>\r\n </div>\r\n <div class=\"line-actions\">\r\n <div class=\"line-delete\">\r\n <i class=\"app-icon icon-delete\" (click)=\"onLineRemove()\"></i>\r\n </div>\r\n <div class=\"line-toggle-details\" (click)=\"onToggleDetails()\">\r\n <i class=\"app-icon icon-arrow-right\"></i>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".line-item{position:relative;display:flex;align-items:center;justify-content:space-between;background-color:#fff;border-radius:.5rem;border:1px solid #cfcfcf;padding:1rem;margin:1rem 0 0;z-index:10}.line-informations,.line-actions{display:inherit;align-items:inherit;gap:.5rem;padding:0 .5rem}.line-actions{cursor:pointer}.line-drag,.line-toggle-details,.line-delete{display:inherit;align-items:inherit;justify-content:center;font-size:1rem;color:#969696;width:36px;height:36px;border-radius:50%;transition:all .25s ease-out}.line-delete :hover{color:red!important}.line-drag{cursor:grab}.line-label{margin-right:2.5rem}.flex-box{display:flex;justify-content:flex-start}.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}.toggled{transform:rotate(-90deg)}.line-dn-box{line-height:20px}.icon-dragger-vertical{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%3Cpath d%3D%22M13.125 5C12.7935 5 12.4755 4.8683 12.2411 4.63388C12.0067 4.39946 11.875 4.08152 11.875 3.75C11.875 3.41848 12.0067 3.10054 12.2411 2.86612C12.4755 2.6317 12.7935 2.5 13.125 2.5C13.4565 2.5 13.7745 2.6317 14.0089 2.86612C14.2433 3.10054 14.375 3.41848 14.375 3.75C14.375 4.08152 14.2433 4.39946 14.0089 4.63388C13.7745 4.8683 13.4565 5 13.125 5ZM6.875 5C6.54348 5 6.22554 4.8683 5.99112 4.63388C5.7567 4.39946 5.625 4.08152 5.625 3.75C5.625 3.41848 5.7567 3.10054 5.99112 2.86612C6.22554 2.6317 6.54348 2.5 6.875 2.5C7.20652 2.5 7.52446 2.6317 7.75888 2.86612C7.9933 3.10054 8.125 3.41848 8.125 3.75C8.125 4.08152 7.9933 4.39946 7.75888 4.63388C7.52446 4.8683 7.20652 5 6.875 5ZM13.125 11.25C12.7935 11.25 12.4755 11.1183 12.2411 10.8839C12.0067 10.6495 11.875 10.3315 11.875 10C11.875 9.66848 12.0067 9.35054 12.2411 9.11612C12.4755 8.8817 12.7935 8.75 13.125 8.75C13.4565 8.75 13.7745 8.8817 14.0089 9.11612C14.2433 9.35054 14.375 9.66848 14.375 10C14.375 10.3315 14.2433 10.6495 14.0089 10.8839C13.7745 11.1183 13.4565 11.25 13.125 11.25ZM6.875 11.25C6.54348 11.25 6.22554 11.1183 5.99112 10.8839C5.7567 10.6495 5.625 10.3315 5.625 10C5.625 9.66848 5.7567 9.35054 5.99112 9.11612C6.22554 8.8817 6.54348 8.75 6.875 8.75C7.20652 8.75 7.52446 8.8817 7.75888 9.11612C7.9933 9.35054 8.125 9.66848 8.125 10C8.125 10.3315 7.9933 10.6495 7.75888 10.8839C7.52446 11.1183 7.20652 11.25 6.875 11.25ZM13.125 17.5C12.7935 17.5 12.4755 17.3683 12.2411 17.1339C12.0067 16.8995 11.875 16.5815 11.875 16.25C11.875 15.9185 12.0067 15.6005 12.2411 15.3661C12.4755 15.1317 12.7935 15 13.125 15C13.4565 15 13.7745 15.1317 14.0089 15.3661C14.2433 15.6005 14.375 15.9185 14.375 16.25C14.375 16.5815 14.2433 16.8995 14.0089 17.1339C13.7745 17.3683 13.4565 17.5 13.125 17.5ZM6.875 17.5C6.54348 17.5 6.22554 17.3683 5.99112 17.1339C5.7567 16.8995 5.625 16.5815 5.625 16.25C5.625 15.9185 5.7567 15.6005 5.99112 15.3661C6.22554 15.1317 6.54348 15 6.875 15C7.20652 15 7.52446 15.1317 7.75888 15.3661C7.9933 15.6005 8.125 15.9185 8.125 16.25C8.125 16.5815 7.9933 16.8995 7.75888 17.1339C7.52446 17.3683 7.20652 17.5 6.875 17.5Z%22 fill%3D%22black%22 fill-opacity%3D%220.95%22%2F%3E%0D%3C%2Fsvg%3E%0D\");width:1px;margin:0 10px 0 0}.icon-delete{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%22Icon%2FDelete%22%3E%0D%3Cpath id%3D%22Remove all%22 d%3D%22M9.5835 1.96973C10.9439 1.96973 12.0528 3.09413 12.1036 4.50119L12.1054 4.60217H15.2853C15.588 4.60217 15.8335 4.85838 15.8335 5.17444C15.8335 5.47074 15.6178 5.71444 15.3413 5.74375L15.2853 5.7467H14.8067L14.0597 16.0795C13.9864 17.0944 13.176 17.8788 12.201 17.8788H6.966C5.99094 17.8788 5.18064 17.0944 5.10725 16.0795L4.35981 5.7467H3.88174C3.59788 5.7467 3.3644 5.52152 3.33633 5.23295L3.3335 5.17444C3.3335 4.87813 3.54923 4.63443 3.82569 4.60512L3.88174 4.60217H7.06157C7.06157 3.14831 8.19067 1.96973 9.5835 1.96973ZM13.7072 5.7467L5.45977 5.7467L6.20064 15.9934C6.23085 16.4113 6.56451 16.7343 6.966 16.7343H12.201C12.6025 16.7343 12.9361 16.4113 12.9664 15.9934L13.7072 5.7467ZM11.0089 8.15024C11.2928 8.15024 11.5263 8.37542 11.5543 8.66399L11.5572 8.72251V13.7585C11.5572 14.0745 11.3117 14.3307 11.0089 14.3307C10.7251 14.3307 10.4916 14.1056 10.4635 13.817L10.4607 13.7585L10.4607 8.72251C10.4607 8.40645 10.7061 8.15024 11.0089 8.15024ZM8.15806 8.15024C8.44192 8.15024 8.6754 8.37542 8.70347 8.66399L8.7063 8.72251L8.7063 13.7585C8.7063 14.0745 8.46084 14.3307 8.15806 14.3307C7.87419 14.3307 7.64072 14.1056 7.61264 13.817L7.60981 13.7585L7.60981 8.72251C7.60981 8.40645 7.85527 8.15024 8.15806 8.15024ZM9.5835 3.11427C8.82339 3.11427 8.20225 3.73527 8.16031 4.51773L8.15806 4.60217L11.0089 4.60217C11.0089 3.78042 10.3707 3.11427 9.5835 3.11427Z%22 fill%3D%22%23737480%22%2F%3E%0D%3C%2Fg%3E%0D%3C%2Fsvg%3E%0D\")}.icon-arrow-right{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-vertical-divider{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%221%22 height%3D%2218%22 viewBox%3D%220 0 1 18%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cline x1%3D%220.5%22 y1%3D%222.18557e-08%22 x2%3D%220.499999%22 y2%3D%2218%22 stroke%3D%22%23333333%22%2F%3E%0D%3C%2Fsvg%3E%0D\");height:20px}.line-item:hover{background-color:#d6d6d680}\n"] }]
2931
+ }], ctorParameters: function () { return []; }, propDecorators: { line: [{
2932
+ type: Input
2933
+ }], toggled: [{
2934
+ type: Input
2935
+ }], toggleAssociatedLine: [{
2936
+ type: Output
2937
+ }], removeAssociatedLine: [{
2938
+ type: Output
2939
+ }] } });
2940
+
2941
+ class DeviceManageWidgetComponent {
2942
+ get form() {
2943
+ var _a;
2944
+ return (_a = this.device) === null || _a === void 0 ? void 0 : _a.form;
2945
+ }
2946
+ get lineAssociations() {
2947
+ var _a;
2948
+ return (_a = this.device) === null || _a === void 0 ? void 0 : _a.lineAssociations;
2949
+ }
2950
+ get device() {
2951
+ // @ts-ignore
2952
+ return this.deviceIndex !== undefined && this.deviceIndex > -1 ? this.userService.user.devices[this.deviceIndex] : null;
2953
+ }
2954
+ get originDevice() {
2955
+ var _a;
2956
+ // @ts-ignore
2957
+ return this.deviceIndex !== undefined && this.deviceIndex > -1 ? (_a = this.userService) === null || _a === void 0 ? void 0 : _a.originUser.devices[this.deviceIndex] : null;
2958
+ }
2959
+ get userToken() {
2960
+ var _a;
2961
+ return (_a = this.userService.user) === null || _a === void 0 ? void 0 : _a.token;
2962
+ }
2963
+ get user() {
2964
+ return this.userService.user;
2965
+ }
2966
+ get hasDeviceUnsavedChanges() {
2967
+ return this.deviceService.hasUnsavedChanges(this.device, this.originDevice);
2968
+ }
2969
+ constructor(userService, deviceService, apiService, lineService, siteSettingsService, validationService, dialog) {
2970
+ this.userService = userService;
2971
+ this.deviceService = deviceService;
2972
+ this.apiService = apiService;
2973
+ this.lineService = lineService;
2974
+ this.siteSettingsService = siteSettingsService;
2975
+ this.validationService = validationService;
2976
+ this.dialog = dialog;
2977
+ this.onSave = new EventEmitter();
2978
+ this.onChange = new EventEmitter();
2979
+ this.discardChanges = new EventEmitter();
2980
+ this.goBack = new EventEmitter();
2981
+ this.tabIndex = 0;
2982
+ this.tabInit = false;
2983
+ }
2984
+ ngOnInit() {
2985
+ this.apiService.token = this.token;
2986
+ this.apiService.apiUrl = this.host;
2987
+ console.log('this.apiService.apiUrl = ', this.apiService.apiUrl);
2988
+ // this.setData(true);
2989
+ this.getData();
2990
+ this.userService.onFetchUserToken$
2991
+ .subscribe(() => {
2992
+ this.setData();
2993
+ });
2994
+ }
2995
+ ngAfterViewInit() {
2996
+ console.log('TABS = ', this.tabs);
2997
+ if (this.tabs && !this.tabInit) {
2998
+ const handleTabClick = this.tabs._handleClick;
2999
+ this.tabInit = true;
3000
+ // 2. Replace the click handler with our custom function
3001
+ this.tabs._handleClick = (tab, header, index) => {
3002
+ // 3. Implement your conditional logic in canDeactivateTab()
3003
+ // (return the boolean here)
3004
+ if (this.hasDeviceUnsavedChanges) {
3005
+ this.openUnsavedChangesDialog(TOGGLE_TYPES.TABS, { handleTabClick, tab, header, index });
3006
+ // 4. If the tab *should* be changed, call the 'old' click handler
3007
+ // handleTabClick.apply(this.tabs, [tab, header, index]);
3008
+ }
3009
+ else {
3010
+ handleTabClick.apply(this.tabs, [tab, header, index]);
3011
+ this.tabIndex = index;
3012
+ }
3013
+ };
3014
+ }
3015
+ }
3016
+ ngOnDestroy() {
3017
+ }
3018
+ onGoBack() {
3019
+ this.goBack.emit();
3020
+ }
3021
+ toggleAssociatedLine(lineIndex, lineAssociation) {
3022
+ if (!this.lineService.currentActiveLinePkid) {
3023
+ lineAssociation.active = true;
3024
+ this.lineService.currentActiveLinePkid = lineAssociation.linePkid;
3025
+ return;
3026
+ }
3027
+ if (!lineAssociation.hasChanges && lineAssociation.active) {
3028
+ lineAssociation.active = false;
3029
+ this.lineService.currentActiveLinePkid = null;
3030
+ return;
3031
+ }
3032
+ if (this.device.lineAssociationsHasChanges) {
3033
+ this.openUnsavedChangesDialog(TOGGLE_TYPES.ASSOCIATED_LINE_ONLY);
3034
+ }
3035
+ else {
3036
+ this.setLineActive(lineIndex);
3037
+ }
3038
+ }
3039
+ openUnsavedChangesDialog(toggleType, handleTabClick) {
3040
+ const dialogRef = this.dialog.open(InfoDialogComponent, {
3041
+ data: {
3042
+ title: 'Discard unsaved edits?',
3043
+ message: 'You\'re about to leave this page and discard all unsaved app edits',
3044
+ confirmButtonText: 'Discard'
3045
+ }
3046
+ });
3047
+ dialogRef.beforeClosed().subscribe(result => {
3048
+ if (result) {
3049
+ switch (toggleType) {
3050
+ case TOGGLE_TYPES.TABS:
3051
+ this.resetByTabToggle(handleTabClick);
3052
+ break;
3053
+ case TOGGLE_TYPES.ASSOCIATED_LINE_ONLY:
3054
+ this.resetLine(handleTabClick);
3055
+ break;
3056
+ }
3057
+ this.tabIndex = handleTabClick.index;
3058
+ }
3059
+ });
3060
+ }
3061
+ resetByTabToggle(handleTabClick) {
3062
+ switch (this.tabIndex) {
3063
+ case 0:
3064
+ this.userService.resetDevice(this.device, this.validationService);
3065
+ break;
3066
+ case 1:
3067
+ this.resetLine();
3068
+ break;
3069
+ }
3070
+ this.discardChanges.emit();
3071
+ if (handleTabClick) {
3072
+ handleTabClick.handleTabClick.apply(this.tabs, [handleTabClick.tab, handleTabClick.header, handleTabClick.index]);
3073
+ }
3074
+ }
3075
+ resetLine(lineIndex, handleTabClick) {
3076
+ const lineIndToReset = this.lineAssociations.findIndex((line) => line.active && line.hasChanges);
3077
+ if (lineIndToReset > -1) {
3078
+ this.resetAssociatedLine(lineIndToReset);
3079
+ }
3080
+ if (lineIndex !== undefined && lineIndex > -1) {
3081
+ this.setLineActive(lineIndex);
3082
+ }
3083
+ this.discardChanges.emit();
3084
+ if (handleTabClick) {
3085
+ handleTabClick.handleTabClick.apply(this.tabs, [handleTabClick.tab, handleTabClick.header, handleTabClick.index]);
3086
+ }
3087
+ }
3088
+ onRemoveLine(lineIndex) {
3089
+ var _a;
3090
+ if (!this.lineAssociations || !this.lineAssociations[lineIndex]) {
3091
+ return;
3092
+ }
3093
+ const dialogRef = this.dialog.open(InfoDialogComponent, {
3094
+ data: {
3095
+ title: 'Remove device associated line?',
3096
+ message: `You\'re sure that you want to delete ${(_a = this.lineAssociations[lineIndex].directoryNumber) === null || _a === void 0 ? void 0 : _a.directoryNumber} associated line`,
3097
+ confirmButtonText: 'Delete Line'
3098
+ }
3099
+ });
3100
+ dialogRef.beforeClosed().subscribe(result => {
3101
+ if (result) {
3102
+ this.dataPending = true;
3103
+ this.deleteLine(this.lineAssociations[lineIndex]);
3104
+ }
3105
+ });
3106
+ }
3107
+ resetAssociatedLine(lineIndex) {
3108
+ var _a, _b, _c;
3109
+ if ((_b = (_a = this.userService.user) === null || _a === void 0 ? void 0 : _a.devices) === null || _b === void 0 ? void 0 : _b.length) {
3110
+ const deviceInd = (_c = this.userService.user) === null || _c === void 0 ? void 0 : _c.devices.findIndex((device) => device.name === this.device.name);
3111
+ if (deviceInd > -1) {
3112
+ this.userService.resetLineAssociation(deviceInd, lineIndex, this.validationService);
3113
+ this.userService.user.devices[this.deviceIndex].lineAssociationsHasChanges = false;
3114
+ }
3115
+ }
3116
+ }
3117
+ setLineActive(index) {
3118
+ var _a;
3119
+ if ((_a = this.lineAssociations) === null || _a === void 0 ? void 0 : _a.length) {
3120
+ this.device.lineAssociations.forEach(line => line.active = false);
3121
+ }
3122
+ if (this.lineAssociations[index]) {
3123
+ this.lineService.currentActiveLinePkid = this.device.lineAssociations[index].linePkid;
3124
+ this.device.lineAssociations[index].active = true;
3125
+ }
3126
+ }
3127
+ onDeviceSave() {
3128
+ var _a;
3129
+ switch (this.tabIndex) {
3130
+ case DeviceViewType.INFO:
3131
+ this.updateDevice(this.siteId, (_a = this.device) === null || _a === void 0 ? void 0 : _a.name, this.userToken);
3132
+ break;
3133
+ case DeviceViewType.LINES:
3134
+ this.onUpdateLine();
3135
+ break;
3136
+ }
3137
+ }
3138
+ save() {
3139
+ this.onDeviceSave();
3140
+ }
3141
+ onUpdateDevice() {
3142
+ var _a;
3143
+ this.updateDevice(this.siteId, (_a = this.device) === null || _a === void 0 ? void 0 : _a.name, this.userToken);
3144
+ }
3145
+ onUpdateLine() {
3146
+ this.lineService.onSaveLineAssociationEvent.next(true);
3147
+ }
3148
+ afterLineUpdate() {
3149
+ this.onSave.emit('associated line is updated');
3150
+ }
3151
+ updateDevice(siteId, deviceName, token) {
3152
+ if (this.deviceService.hasUnsavedChanges(this.device, this.originDevice) && !this.dataPending) {
3153
+ this.dataPending = true;
3154
+ const calls = [];
3155
+ if (this.deviceService.hasDeviceInfoUnsavedChanges(this.device, this.originDevice)) {
3156
+ const body = this.deviceService.getDataToUpdateDevice(this.device, this.originDevice);
3157
+ calls.push(this.deviceService.putDeviceFields(siteId, deviceName, token, body));
3158
+ }
3159
+ if (calls === null || calls === void 0 ? void 0 : calls.length) {
3160
+ forkJoin(calls).subscribe((results) => {
3161
+ this.userService.persistUserCache()
3162
+ .subscribe(() => {
3163
+ this.userService.fetchUserToken(this.siteId, this.userService.user.userid, this.validationService)
3164
+ .subscribe(() => {
3165
+ this.dataPending = false;
3166
+ this.onSave.emit('device updated');
3167
+ }, () => this.dataPending = false);
3168
+ });
3169
+ }, () => this.dataPending = false);
3170
+ }
3171
+ }
3172
+ }
3173
+ onChangeField(token) {
3174
+ var _a, _b;
3175
+ if (!token) {
3176
+ return;
3177
+ }
3178
+ if (this.device) {
3179
+ this.userService.user.devices[this.deviceIndex][token] = (_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.get(token)) === null || _b === void 0 ? void 0 : _b.value;
3180
+ this.onChange.emit();
3181
+ }
3182
+ }
3183
+ getData() {
3184
+ this.dataPending = true;
3185
+ forkJoin([
3186
+ this.userService.fetchUserToken(this.siteId, this.userId, this.validationService),
3187
+ this.siteSettingsService.getDeviceSoftkeyTemplates(this.siteId),
3188
+ this.siteSettingsService.getSiteDefaults(this.siteId)
3189
+ ]).subscribe(() => {
3190
+ var _a, _b, _c;
3191
+ console.log('device widget user', this.user);
3192
+ if (((_a = this.originDevice) === null || _a === void 0 ? void 0 : _a.callingSearchSpaceName) && ((_c = (_b = this.siteSettingsService) === null || _b === void 0 ? void 0 : _b.siteDefaults) === null || _c === void 0 ? void 0 : _c.cssFilter)) {
3193
+ this.siteSettingsService.siteDefaults.cssFilter.push(this.originDevice.callingSearchSpaceName);
3194
+ }
3195
+ this.setData();
3196
+ this.ngAfterViewInit();
3197
+ this.dataPending = false;
3198
+ }, () => this.dataPending = false);
3199
+ }
3200
+ setCookie(name, value, days) {
3201
+ var expires = "";
3202
+ if (days) {
3203
+ var date = new Date();
3204
+ date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
3205
+ expires = "; expires=" + date.toUTCString();
3206
+ }
3207
+ document.cookie = name + "=" + (value || "") + expires + "; path=/";
3208
+ }
3209
+ setData(isInit) {
3210
+ var _a, _b;
3211
+ /*if (isInit) {
3212
+ this.userService.user = new SimplifiedUser(JSON.parse(JSON.stringify(this.user.getFullData())), this.validationService);
3213
+ this.userService.originUser = new SimplifiedUser(JSON.parse(JSON.stringify(this.user.getFullData())), this.validationService);
3214
+ }*/
3215
+ if (this.deviceName && ((_b = (_a = this.userService.user) === null || _a === void 0 ? void 0 : _a.devices) === null || _b === void 0 ? void 0 : _b.length)) {
3216
+ this.deviceIndex = this.userService.user.devices.findIndex((device) => device.name === this.deviceName);
3217
+ }
3218
+ }
3219
+ deleteLine(line) {
3220
+ this.lineService.deleteLine(this.siteId, line.linePkid, this.userService.user.token)
3221
+ .subscribe(() => {
3222
+ this.userService.persistUserCache()
3223
+ .subscribe(() => {
3224
+ this.userService.fetchUserToken(this.siteId, this.userService.user.userid, this.validationService)
3225
+ .subscribe(() => {
3226
+ // this.updatedLineAssociationEvent.emit();
3227
+ this.dataPending = false;
3228
+ });
3229
+ });
3230
+ });
3231
+ }
3232
+ }
3233
+ DeviceManageWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceManageWidgetComponent, deps: [{ token: UserService }, { token: DeviceService }, { token: APIService }, { token: LineService }, { token: SiteSettingsService }, { token: ValidationService }, { token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
3234
+ DeviceManageWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DeviceManageWidgetComponent, selector: "app-device-manage-widget", inputs: { token: "token", host: "host", siteId: "siteId", userId: "userId", isLdap: "isLdap", deviceName: "deviceName" }, outputs: { onSave: "onSave", onChange: "onChange", discardChanges: "discardChanges", goBack: "goBack" }, viewQueries: [{ propertyName: "tabs", first: true, predicate: ["tabs"], descendants: true }], ngImport: i0, template: "<app-loader *ngIf=\"dataPending || deviceService.dataPending\"></app-loader>\r\n<div id=\"device-manage-widget\">\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\">User Devices</span>\r\n </div>\r\n </div>\r\n <mat-tab-group #tabs animationDuration=\"0\" mat-align-tabs=\"start\"\r\n class=\"content-box\">\r\n <mat-tab label=\"Device\">\r\n <div *ngIf=\"user\">\r\n <ng-container *ngTemplateOutlet=\"editDevice\">\r\n </ng-container>\r\n </div>\r\n </mat-tab>\r\n <mat-tab label=\"Associated Lines\">\r\n <ng-container *ngIf=\"user\">\r\n <div *ngFor=\"let lineAssociation of lineAssociations, let i = index\">\r\n <app-associated-line-row\r\n [line]=\"lineAssociation\"\r\n (removeAssociatedLine)=\"onRemoveLine(i)\"\r\n (toggleAssociatedLine)=\"toggleAssociatedLine(i, lineAssociation)\"></app-associated-line-row>\r\n <app-device-associated-line *ngIf=\"lineAssociation.active\"\r\n [deviceIndex]=\"deviceIndex\"\r\n [deviceName]=\"deviceName\"\r\n [siteId]=\"siteId\"\r\n (onChange)=\"onChange.emit()\"\r\n (updatedLineAssociationEvent)=\"afterLineUpdate()\"\r\n [lineIndex]=\"i\"></app-device-associated-line>\r\n </div>\r\n </ng-container>\r\n </mat-tab>\r\n <mat-tab ></mat-tab>\r\n <mat-tab ></mat-tab>\r\n </mat-tab-group>\r\n\r\n <ng-template #editDevice>\r\n <form *ngIf=\"device && form\" [formGroup]=\"form\">\r\n <div class=\"info-boxes-container\">\r\n <div class=\"user-info-box user-details-box__info\">\r\n <h3 class=\"user-box-title\">Details</h3>\r\n <div class=\"form-holder__blocks\">\r\n <div class=\"user-box-block\">\r\n <div class=\"user-box-block-item\">\r\n <div class=\"user-box-block-item__title\">{{user.firstName}} {{user.lastName}}</div>\r\n <div class=\"user-box-block-item__tag\">Name</div>\r\n </div>\r\n <div class=\"user-box-block-item\">\r\n <div class=\"user-box-block-item__title\">Cisco dual mode for andorid</div>\r\n <div class=\"user-box-block-item__tag\">Type</div>\r\n </div>\r\n <div class=\"user-box-block-item\">\r\n <div class=\"user-box-block-item__title\">David Alexander 1545545154554</div>\r\n <div class=\"user-box-block-item__tag\">Device Description</div>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"user-box-block\">\r\n <div class=\"user-box-block-item\">\r\n <div class=\"user-box-block-item__title\">1545415455545 | 5545544485454 | 998989454</div>\r\n <div class=\"user-box-block-item__tag\">Line</div>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"user-box-block\">\r\n <div class=\"user-box-block-item\">\r\n <div class=\"user-box-block-item__title\">PLAR Service</div>\r\n <mat-slide-toggle name=\"plarService\" formControlName=\"plarService\"></mat-slide-toggle>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- DEVICE INFO BOX-->\r\n <div class=\"user-info-box user-details-box\">\r\n <h3 class=\"user-box-title\">Device Info</h3>\r\n <div class=\"form-holder__inputs\">\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Registration Status</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.registrationStatus}}</span>\r\n <!--<mat-form-field appearance=\"outline\">\r\n <input formControlName=\"registrationStatus\"\r\n matInput (input)=\"onChangeField('registrationStatus')\">\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\">IP Address</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.ipAddress}}</span>\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\">Description</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"description\"\r\n matInput (input)=\"onChangeField('description')\">\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\">Protocol</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.protocol}}</span>\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\">Softkey Template</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select formControlName=\"softkeyTemplate\"\r\n (selectionChange)=\"onChangeField('softkeyTemplate')\">\r\n <mat-option *ngFor=\"let type of siteSettingsService.deviceSoftkeyTemplates\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n </mat-select>\r\n <mat-error\r\n *ngIf=\"form.get('softkeyTemplate')?.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 class=\"input-holder\">\r\n <div class=\"input-holder__name\">Button Template</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.buttonTemplate}}</span>\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\">Location</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.location}}</span>\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\">Device Pool</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select formControlName=\"devicePoolName\"\r\n (selectionChange)=\"onChangeField('devicePoolName')\">\r\n <mat-option *ngFor=\"let type of siteSettingsService.devicePools\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n </mat-select>\r\n <mat-error\r\n *ngIf=\"form.get('devicePoolName')?.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 class=\"input-holder\">\r\n <div class=\"input-holder__name\">Device CSS</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select formControlName=\"callingSearchSpaceName\"\r\n (selectionChange)=\"onChangeField('callingSearchSpaceName')\">\r\n <mat-option *ngFor=\"let type of siteSettingsService.callingSearchSpaceTypes\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n </mat-select>\r\n <mat-error\r\n *ngIf=\"form.get('callingSearchSpaceName')?.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 class=\"input-holder\">\r\n <div class=\"input-holder__name\">Firmware version</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.firmwareVersion}}</span>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n </form>\r\n </ng-template>\r\n\r\n</div>\r\n\r\n\r\n\r\n\r\n\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}.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%}table{border-collapse:collapse;border-spacing:0}.line-row{background:#ececec;cursor:pointer;width:100%;padding:5px;box-sizing:border-box}.line-row.disabled-line-row{cursor:default;color:silver}.user-details-box__info{grid-template-columns:100%}.form-holder__blocks{margin-top:1rem}.user-box-block{padding:1rem 0;gap:4rem;display:flex}.user-box-block-item__title{margin-bottom:.5rem}.user-box-block-item__tag{font-size:14px;color:#6d6d6d}.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;margin:0 0 30px;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: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i8.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i9.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i9.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: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i9.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i9.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i10.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i6.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i11.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: i13.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i14.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { kind: "component", type: i14.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: i8$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { 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: DeviceAssociatedLineComponent, selector: "app-device-associated-line", inputs: ["lineIndex", "deviceIndex", "deviceName", "siteId"], outputs: ["updatedLineAssociationEvent", "onChange"] }, { kind: "component", type: AssociatedLineRowComponent, selector: "app-associated-line-row", inputs: ["line", "toggled"], outputs: ["toggleAssociatedLine", "removeAssociatedLine"] }] });
3235
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceManageWidgetComponent, decorators: [{
3236
+ type: Component,
3237
+ args: [{ selector: 'app-device-manage-widget', template: "<app-loader *ngIf=\"dataPending || deviceService.dataPending\"></app-loader>\r\n<div id=\"device-manage-widget\">\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\">User Devices</span>\r\n </div>\r\n </div>\r\n <mat-tab-group #tabs animationDuration=\"0\" mat-align-tabs=\"start\"\r\n class=\"content-box\">\r\n <mat-tab label=\"Device\">\r\n <div *ngIf=\"user\">\r\n <ng-container *ngTemplateOutlet=\"editDevice\">\r\n </ng-container>\r\n </div>\r\n </mat-tab>\r\n <mat-tab label=\"Associated Lines\">\r\n <ng-container *ngIf=\"user\">\r\n <div *ngFor=\"let lineAssociation of lineAssociations, let i = index\">\r\n <app-associated-line-row\r\n [line]=\"lineAssociation\"\r\n (removeAssociatedLine)=\"onRemoveLine(i)\"\r\n (toggleAssociatedLine)=\"toggleAssociatedLine(i, lineAssociation)\"></app-associated-line-row>\r\n <app-device-associated-line *ngIf=\"lineAssociation.active\"\r\n [deviceIndex]=\"deviceIndex\"\r\n [deviceName]=\"deviceName\"\r\n [siteId]=\"siteId\"\r\n (onChange)=\"onChange.emit()\"\r\n (updatedLineAssociationEvent)=\"afterLineUpdate()\"\r\n [lineIndex]=\"i\"></app-device-associated-line>\r\n </div>\r\n </ng-container>\r\n </mat-tab>\r\n <mat-tab ></mat-tab>\r\n <mat-tab ></mat-tab>\r\n </mat-tab-group>\r\n\r\n <ng-template #editDevice>\r\n <form *ngIf=\"device && form\" [formGroup]=\"form\">\r\n <div class=\"info-boxes-container\">\r\n <div class=\"user-info-box user-details-box__info\">\r\n <h3 class=\"user-box-title\">Details</h3>\r\n <div class=\"form-holder__blocks\">\r\n <div class=\"user-box-block\">\r\n <div class=\"user-box-block-item\">\r\n <div class=\"user-box-block-item__title\">{{user.firstName}} {{user.lastName}}</div>\r\n <div class=\"user-box-block-item__tag\">Name</div>\r\n </div>\r\n <div class=\"user-box-block-item\">\r\n <div class=\"user-box-block-item__title\">Cisco dual mode for andorid</div>\r\n <div class=\"user-box-block-item__tag\">Type</div>\r\n </div>\r\n <div class=\"user-box-block-item\">\r\n <div class=\"user-box-block-item__title\">David Alexander 1545545154554</div>\r\n <div class=\"user-box-block-item__tag\">Device Description</div>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"user-box-block\">\r\n <div class=\"user-box-block-item\">\r\n <div class=\"user-box-block-item__title\">1545415455545 | 5545544485454 | 998989454</div>\r\n <div class=\"user-box-block-item__tag\">Line</div>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"user-box-block\">\r\n <div class=\"user-box-block-item\">\r\n <div class=\"user-box-block-item__title\">PLAR Service</div>\r\n <mat-slide-toggle name=\"plarService\" formControlName=\"plarService\"></mat-slide-toggle>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- DEVICE INFO BOX-->\r\n <div class=\"user-info-box user-details-box\">\r\n <h3 class=\"user-box-title\">Device Info</h3>\r\n <div class=\"form-holder__inputs\">\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Registration Status</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.registrationStatus}}</span>\r\n <!--<mat-form-field appearance=\"outline\">\r\n <input formControlName=\"registrationStatus\"\r\n matInput (input)=\"onChangeField('registrationStatus')\">\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\">IP Address</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.ipAddress}}</span>\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\">Description</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"description\"\r\n matInput (input)=\"onChangeField('description')\">\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\">Protocol</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.protocol}}</span>\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\">Softkey Template</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select formControlName=\"softkeyTemplate\"\r\n (selectionChange)=\"onChangeField('softkeyTemplate')\">\r\n <mat-option *ngFor=\"let type of siteSettingsService.deviceSoftkeyTemplates\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n </mat-select>\r\n <mat-error\r\n *ngIf=\"form.get('softkeyTemplate')?.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 class=\"input-holder\">\r\n <div class=\"input-holder__name\">Button Template</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.buttonTemplate}}</span>\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\">Location</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.location}}</span>\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\">Device Pool</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select formControlName=\"devicePoolName\"\r\n (selectionChange)=\"onChangeField('devicePoolName')\">\r\n <mat-option *ngFor=\"let type of siteSettingsService.devicePools\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n </mat-select>\r\n <mat-error\r\n *ngIf=\"form.get('devicePoolName')?.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 class=\"input-holder\">\r\n <div class=\"input-holder__name\">Device CSS</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select formControlName=\"callingSearchSpaceName\"\r\n (selectionChange)=\"onChangeField('callingSearchSpaceName')\">\r\n <mat-option *ngFor=\"let type of siteSettingsService.callingSearchSpaceTypes\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n </mat-select>\r\n <mat-error\r\n *ngIf=\"form.get('callingSearchSpaceName')?.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 class=\"input-holder\">\r\n <div class=\"input-holder__name\">Firmware version</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.firmwareVersion}}</span>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n </form>\r\n </ng-template>\r\n\r\n</div>\r\n\r\n\r\n\r\n\r\n\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}.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%}table{border-collapse:collapse;border-spacing:0}.line-row{background:#ececec;cursor:pointer;width:100%;padding:5px;box-sizing:border-box}.line-row.disabled-line-row{cursor:default;color:silver}.user-details-box__info{grid-template-columns:100%}.form-holder__blocks{margin-top:1rem}.user-box-block{padding:1rem 0;gap:4rem;display:flex}.user-box-block-item__title{margin-bottom:.5rem}.user-box-block-item__tag{font-size:14px;color:#6d6d6d}.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;margin:0 0 30px;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"] }]
3238
+ }], ctorParameters: function () { return [{ type: UserService }, { type: DeviceService }, { type: APIService }, { type: LineService }, { type: SiteSettingsService }, { type: ValidationService }, { type: i1$1.MatDialog }]; }, propDecorators: { tabs: [{
3239
+ type: ViewChild,
3240
+ args: ["tabs", { static: false }]
3241
+ }], onSave: [{
3242
+ type: Output
3243
+ }], onChange: [{
3244
+ type: Output
3245
+ }], discardChanges: [{
3246
+ type: Output
3247
+ }], goBack: [{
3248
+ type: Output
3249
+ }], token: [{
3250
+ type: Input
3251
+ }], host: [{
3252
+ type: Input
3253
+ }], siteId: [{
3254
+ type: Input
3255
+ }], userId: [{
3256
+ type: Input
3257
+ }], isLdap: [{
3258
+ type: Input
3259
+ }], deviceName: [{
3260
+ type: Input
3261
+ }] } });
3262
+
3263
+ class DeviceAssociatedLineExtensionComponent {
3264
+ get user() {
3265
+ return this.userService.user;
3266
+ }
3267
+ get availableNumbers() {
3268
+ // @ts-ignore
3269
+ return this.routePartition && this.dnsService.availableNumbers ? this.dnsService.availableNumbers[this.routePartition] : null;
3270
+ }
3271
+ constructor(userService, dnsService) {
3272
+ this.userService = userService;
3273
+ this.dnsService = dnsService;
3274
+ this.onChange = new EventEmitter();
3275
+ }
3276
+ ngOnInit() {
3277
+ this.getData();
3278
+ }
3279
+ onChangeField(event) {
3280
+ // if (!token) {
3281
+ // return;
3282
+ // }
3283
+ // (this.userService.user as any)[token] = this.form?.get(token)?.value;
3284
+ this.onChange.emit(event === null || event === void 0 ? void 0 : event.value);
3285
+ }
3286
+ getData() {
3287
+ if (!this.siteId || !this.routePartition) {
3288
+ return;
3289
+ }
3290
+ this.dataPending = true;
3291
+ this.dnsService.getNumberRange(String(this.siteId), this.routePartition)
3292
+ .subscribe(() => {
3293
+ if (this.availableNumbers) {
3294
+ // @ts-ignore
3295
+ this.dnsService.availableNumbers[this.routePartition].push(this.directoryNumber);
3296
+ }
3297
+ this.dataPending = false;
3298
+ });
3299
+ }
3300
+ }
3301
+ DeviceAssociatedLineExtensionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceAssociatedLineExtensionComponent, deps: [{ token: UserService }, { token: DnsService }], target: i0.ɵɵFactoryTarget.Component });
3302
+ DeviceAssociatedLineExtensionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DeviceAssociatedLineExtensionComponent, selector: "app-device-associated-line-extension", inputs: { formControl: "formControl", routePartition: "routePartition", directoryNumber: "directoryNumber", siteId: "siteId" }, outputs: { onChange: "onChange" }, ngImport: i0, template: "<div *ngIf=\"this.availableNumbers?.length\" class=\"user-calling-extension\">\r\n <mat-select [formControl]=\"formControl\" (selectionChange)=\"this.onChangeField($event)\" #page>\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-spinner *ngIf=\"this.dataPending\" [diameter]=\"50\"></mat-spinner>\r\n</div>\r\n", styles: ["table{border-collapse:collapse;border-spacing:0}\n"], dependencies: [{ kind: "directive", type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9.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: i13.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i8$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }] });
3303
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceAssociatedLineExtensionComponent, decorators: [{
3304
+ type: Component,
3305
+ args: [{ selector: 'app-device-associated-line-extension', template: "<div *ngIf=\"this.availableNumbers?.length\" class=\"user-calling-extension\">\r\n <mat-select [formControl]=\"formControl\" (selectionChange)=\"this.onChangeField($event)\" #page>\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-spinner *ngIf=\"this.dataPending\" [diameter]=\"50\"></mat-spinner>\r\n</div>\r\n", styles: ["table{border-collapse:collapse;border-spacing:0}\n"] }]
3306
+ }], ctorParameters: function () { return [{ type: UserService }, { type: DnsService }]; }, propDecorators: { formControl: [{
3307
+ type: Input
3308
+ }], routePartition: [{
3309
+ type: Input
3310
+ }], directoryNumber: [{
3311
+ type: Input
3312
+ }], siteId: [{
3313
+ type: Input
3314
+ }], onChange: [{
3315
+ type: Output
3316
+ }] } });
3317
+
3318
+ class UserDeviceManageModule {
3319
+ }
3320
+ UserDeviceManageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserDeviceManageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3321
+ UserDeviceManageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: UserDeviceManageModule, declarations: [AppLoaderComponent,
3322
+ NotificationsComponent,
3323
+ LazyLoadingSelectComponent,
3324
+ DeviceListComponent,
3325
+ DeviceManageWidgetComponent,
3326
+ DeviceAssociatedLineComponent,
3327
+ DeviceAssociatedLineExtensionComponent,
3328
+ DeviceAssociatedLineDetailsBoxComponent,
3329
+ AssociatedLineRowComponent,
3330
+ InfoDialogComponent], imports: [CommonModule,
3331
+ BrowserModule,
3332
+ BrowserAnimationsModule,
3333
+ FormsModule,
3334
+ ReactiveFormsModule,
3335
+ HttpClientModule,
3336
+ MaterialModule], exports: [DeviceManageWidgetComponent] });
3337
+ UserDeviceManageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserDeviceManageModule, providers: [
3338
+ APIService,
3339
+ UserService,
3340
+ NotificationService,
3341
+ RemoveKynFromIBMService,
3342
+ SiteSettingsService,
3343
+ DnsService,
3344
+ LineService,
3345
+ DeviceService,
3346
+ ValidationService,
3347
+ { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
3348
+ ], imports: [CommonModule,
3349
+ BrowserModule,
3350
+ BrowserAnimationsModule,
3351
+ FormsModule,
3352
+ ReactiveFormsModule,
3353
+ HttpClientModule,
3354
+ MaterialModule] });
3355
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserDeviceManageModule, decorators: [{
3356
+ type: NgModule,
3357
+ args: [{
3358
+ declarations: [
3359
+ AppLoaderComponent,
3360
+ NotificationsComponent,
3361
+ LazyLoadingSelectComponent,
3362
+ DeviceListComponent,
3363
+ DeviceManageWidgetComponent,
3364
+ DeviceAssociatedLineComponent,
3365
+ DeviceAssociatedLineExtensionComponent,
3366
+ DeviceAssociatedLineDetailsBoxComponent,
3367
+ AssociatedLineRowComponent,
3368
+ InfoDialogComponent
3369
+ ],
3370
+ imports: [
3371
+ CommonModule,
3372
+ BrowserModule,
3373
+ BrowserAnimationsModule,
3374
+ FormsModule,
3375
+ ReactiveFormsModule,
3376
+ HttpClientModule,
3377
+ MaterialModule,
3378
+ ],
3379
+ providers: [
3380
+ APIService,
3381
+ UserService,
3382
+ NotificationService,
3383
+ RemoveKynFromIBMService,
3384
+ SiteSettingsService,
3385
+ DnsService,
3386
+ LineService,
3387
+ DeviceService,
3388
+ ValidationService,
3389
+ { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
3390
+ ],
3391
+ exports: [
3392
+ DeviceManageWidgetComponent
3393
+ ]
3394
+ }]
3395
+ }] });
3396
+
3397
+ /**
3398
+ * Generated bundle index. Do not edit.
3399
+ */
3400
+
3401
+ export { APIService, DeviceManageWidgetComponent, DeviceService, LineService, SiteSettingsService, UserDeviceManageModule, UserService, UtilsService };
3402
+ //# sourceMappingURL=tuki-io-tuki-widgets-user-device-manage.mjs.map