@c8y/ngx-components 1021.38.0 → 1021.49.1

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 (528) hide show
  1. package/api/services.d.ts +1 -1
  2. package/api/services.d.ts.map +1 -1
  3. package/auth-configuration/sso-configuration/template-parts/access-mapping/access-mapping.component.d.ts.map +1 -1
  4. package/connectivity/abstract-connectivity-tab.factory.d.ts +1 -1
  5. package/context-dashboard/add-dashboard.component.d.ts.map +1 -1
  6. package/context-dashboard/context-dashboard.model.d.ts +4 -2
  7. package/context-dashboard/context-dashboard.model.d.ts.map +1 -1
  8. package/context-dashboard/dashboard-detail.component.d.ts.map +1 -1
  9. package/context-dashboard/dashboard-manager/dashboard-manager.model.d.ts +1 -0
  10. package/context-dashboard/dashboard-manager/dashboard-manager.model.d.ts.map +1 -1
  11. package/context-dashboard/dashboard-manager/dashboard-manager.service.d.ts +0 -1
  12. package/context-dashboard/dashboard-manager/dashboard-manager.service.d.ts.map +1 -1
  13. package/context-dashboard/dashboard-manager/type-dashboards-list/type-dashboards-list.component.d.ts.map +1 -1
  14. package/context-dashboard/new-dashboard.guard.d.ts +1 -1
  15. package/context-dashboard/new-dashboard.guard.d.ts.map +1 -1
  16. package/core/action/action.component.d.ts +2 -1
  17. package/core/action/action.component.d.ts.map +1 -1
  18. package/core/action/action.model.d.ts +3 -2
  19. package/core/action/action.model.d.ts.map +1 -1
  20. package/core/breadcrumb/breadcrumb-item.component.d.ts +2 -1
  21. package/core/breadcrumb/breadcrumb-item.component.d.ts.map +1 -1
  22. package/core/breadcrumb/breadcrumb.model.d.ts +2 -1
  23. package/core/breadcrumb/breadcrumb.model.d.ts.map +1 -1
  24. package/core/common/ApplicationOptions.d.ts +1 -0
  25. package/core/common/ApplicationOptions.d.ts.map +1 -1
  26. package/core/common/empty-state/empty-state.component.d.ts +2 -1
  27. package/core/common/empty-state/empty-state.component.d.ts.map +1 -1
  28. package/core/common/get-group-icon.pipe.d.ts +2 -1
  29. package/core/common/get-group-icon.pipe.d.ts.map +1 -1
  30. package/core/common/group.service.d.ts +22 -7
  31. package/core/common/group.service.d.ts.map +1 -1
  32. package/core/common/icon.directive.d.ts +5 -5
  33. package/core/common/icon.directive.d.ts.map +1 -1
  34. package/core/common/service-registry.model.d.ts +2 -1
  35. package/core/common/service-registry.model.d.ts.map +1 -1
  36. package/core/data-grid/data-grid.model.d.ts +2 -1
  37. package/core/data-grid/data-grid.model.d.ts.map +1 -1
  38. package/core/docs/docs.models.d.ts +2 -1
  39. package/core/docs/docs.models.d.ts.map +1 -1
  40. package/core/docs/help-and-support-outlet/help-and-support-outlet.component.d.ts +5 -1
  41. package/core/docs/help-and-support-outlet/help-and-support-outlet.component.d.ts.map +1 -1
  42. package/core/docs/legal-notices-outlet/legal-notices-outlet.component.d.ts +5 -1
  43. package/core/docs/legal-notices-outlet/legal-notices-outlet.component.d.ts.map +1 -1
  44. package/core/docs/support-outlet/support-outlet.component.d.ts +5 -1
  45. package/core/docs/support-outlet/support-outlet.component.d.ts.map +1 -1
  46. package/core/forms/filter-input.component.d.ts +8 -3
  47. package/core/forms/filter-input.component.d.ts.map +1 -1
  48. package/core/list-group/list-item-action.component.d.ts +2 -1
  49. package/core/list-group/list-item-action.component.d.ts.map +1 -1
  50. package/core/list-group/list-item-icon.component.d.ts +2 -1
  51. package/core/list-group/list-item-icon.component.d.ts.map +1 -1
  52. package/core/login/login.service.d.ts.map +1 -1
  53. package/core/navigator/navigator-icon.component.d.ts +1 -1
  54. package/core/navigator/navigator-icon.component.d.ts.map +1 -1
  55. package/core/navigator/navigator-node-data.d.ts +2 -1
  56. package/core/navigator/navigator-node-data.d.ts.map +1 -1
  57. package/core/navigator/navigator-node.component.d.ts.map +1 -1
  58. package/core/navigator/navigator-node.d.ts +2 -1
  59. package/core/navigator/navigator-node.d.ts.map +1 -1
  60. package/core/plugins/plugins.model.d.ts +7 -2
  61. package/core/plugins/plugins.model.d.ts.map +1 -1
  62. package/core/plugins/plugins.service.d.ts.map +1 -1
  63. package/core/properties-list/properties-list.component.d.ts +2 -1
  64. package/core/properties-list/properties-list.component.d.ts.map +1 -1
  65. package/core/provider-configuration/model/dynamic-provider-config.model.d.ts +2 -2
  66. package/core/provider-configuration/model/dynamic-provider-config.model.d.ts.map +1 -1
  67. package/core/router/context-route.service.d.ts.map +1 -1
  68. package/core/router/router.model.d.ts +1 -1
  69. package/core/router/router.model.d.ts.map +1 -1
  70. package/core/router/scoped-context-route.service.d.ts.map +1 -1
  71. package/core/search/search.model.d.ts +2 -1
  72. package/core/search/search.model.d.ts.map +1 -1
  73. package/core/select/select-keyboard.service.d.ts +4 -0
  74. package/core/select/select-keyboard.service.d.ts.map +1 -1
  75. package/core/select/select.component.d.ts +14 -3
  76. package/core/select/select.component.d.ts.map +1 -1
  77. package/core/select-modal/select-modal.component.d.ts +2 -1
  78. package/core/select-modal/select-modal.component.d.ts.map +1 -1
  79. package/core/shared/core.model.d.ts +5 -1
  80. package/core/shared/core.model.d.ts.map +1 -1
  81. package/core/tabs/conditional-tabs-outlet.component.d.ts.map +1 -1
  82. package/core/tabs/tab.component.d.ts +3 -2
  83. package/core/tabs/tab.component.d.ts.map +1 -1
  84. package/core/tabs/tab.model.d.ts +10 -5
  85. package/core/tabs/tab.model.d.ts.map +1 -1
  86. package/core/tabs/tabs-outlet.component.d.ts +7 -4
  87. package/core/tabs/tabs-outlet.component.d.ts.map +1 -1
  88. package/core/user/user-menu-item.component.d.ts +2 -1
  89. package/core/user/user-menu-item.component.d.ts.map +1 -1
  90. package/core/user/user.model.d.ts +2 -1
  91. package/core/user/user.model.d.ts.map +1 -1
  92. package/core/wizard/wizard.model.d.ts +4 -3
  93. package/core/wizard/wizard.model.d.ts.map +1 -1
  94. package/data-grid-columns/asset-type/asset-type.cell-renderer.component.d.ts.map +1 -1
  95. package/datapoint-selector/datapoint-attributes-form/datapoint-attributes-form.component.d.ts +15 -46
  96. package/datapoint-selector/datapoint-attributes-form/datapoint-attributes-form.component.d.ts.map +1 -1
  97. package/datapoint-selector/datapoint-attributes-form/datapoint-attributes.model.d.ts +3 -0
  98. package/datapoint-selector/datapoint-attributes-form/datapoint-attributes.model.d.ts.map +1 -1
  99. package/datapoint-selector/datapoint-selection.model.d.ts +6 -7
  100. package/datapoint-selector/datapoint-selection.model.d.ts.map +1 -1
  101. package/datapoints-export-selector/datapoints-export-selector.model.d.ts +2 -1
  102. package/datapoints-export-selector/datapoints-export-selector.model.d.ts.map +1 -1
  103. package/device-grid/columns/icon.cell-renderer.component.d.ts +14 -0
  104. package/device-grid/columns/icon.cell-renderer.component.d.ts.map +1 -0
  105. package/device-grid/columns/index.d.ts +1 -0
  106. package/device-grid/columns/index.d.ts.map +1 -1
  107. package/device-grid/device-grid.component.d.ts.map +1 -1
  108. package/device-grid/device-grid.service.d.ts +0 -2
  109. package/device-grid/device-grid.service.d.ts.map +1 -1
  110. package/device-provisioned-certificates/c8y-ngx-components-device-provisioned-certificates.d.ts.map +1 -0
  111. package/device-provisioned-certificates/device-provisioned-certificates.guard.d.ts +11 -0
  112. package/device-provisioned-certificates/device-provisioned-certificates.guard.d.ts.map +1 -0
  113. package/device-provisioned-certificates/device-provisioned-certificates.module.d.ts +13 -0
  114. package/device-provisioned-certificates/device-provisioned-certificates.module.d.ts.map +1 -0
  115. package/device-provisioned-certificates/device-provisioned-certificates.service.d.ts +13 -0
  116. package/device-provisioned-certificates/device-provisioned-certificates.service.d.ts.map +1 -0
  117. package/device-provisioned-certificates/device-tab-provisioned-certificates.component.d.ts +57 -0
  118. package/device-provisioned-certificates/device-tab-provisioned-certificates.component.d.ts.map +1 -0
  119. package/device-provisioned-certificates/index.d.ts +2 -0
  120. package/device-provisioned-certificates/index.d.ts.map +1 -0
  121. package/ecosystem/application-plugins/application-plugins.component.d.ts +4 -0
  122. package/ecosystem/application-plugins/application-plugins.component.d.ts.map +1 -1
  123. package/ecosystem/application-plugins/application-plugins.module.d.ts +2 -2
  124. package/ecosystem/application-plugins/application-plugins.module.d.ts.map +1 -1
  125. package/ecosystem/application-plugins/index.d.ts +1 -0
  126. package/ecosystem/application-plugins/index.d.ts.map +1 -1
  127. package/ecosystem/application-plugins/install-plugin.component.d.ts +9 -11
  128. package/ecosystem/application-plugins/install-plugin.component.d.ts.map +1 -1
  129. package/ecosystem/application-plugins/only-latest-filter/only-latest-filter.component.d.ts +12 -0
  130. package/ecosystem/application-plugins/only-latest-filter/only-latest-filter.component.d.ts.map +1 -0
  131. package/ecosystem/application-plugins/plugin-list-item.component.d.ts +8 -3
  132. package/ecosystem/application-plugins/plugin-list-item.component.d.ts.map +1 -1
  133. package/ecosystem/application-plugins/plugin-list.component.d.ts.map +1 -1
  134. package/ecosystem/application-plugins/update-plugin-of-app/update-plugin-of-app.component.d.ts.map +1 -1
  135. package/ecosystem/applications/application-list/application-list.component.d.ts +2 -2
  136. package/ecosystem/applications/application-list/application-list.component.d.ts.map +1 -1
  137. package/ecosystem/applications/install-from-package/install-from-package.component.d.ts.map +1 -1
  138. package/ecosystem/archived-confirm/archived-confirm-modal.component.d.ts +11 -0
  139. package/ecosystem/archived-confirm/archived-confirm-modal.component.d.ts.map +1 -0
  140. package/ecosystem/archived-confirm/archived-confirm.module.d.ts +10 -0
  141. package/ecosystem/archived-confirm/archived-confirm.module.d.ts.map +1 -0
  142. package/ecosystem/archived-confirm/c8y-ngx-components-ecosystem-archived-confirm.d.ts.map +1 -0
  143. package/ecosystem/archived-confirm/index.d.ts +3 -0
  144. package/ecosystem/archived-confirm/index.d.ts.map +1 -0
  145. package/ecosystem/ecosystem.module.d.ts +2 -1
  146. package/ecosystem/ecosystem.module.d.ts.map +1 -1
  147. package/ecosystem/features/feature-list.component.d.ts +2 -2
  148. package/ecosystem/features/feature-list.component.d.ts.map +1 -1
  149. package/ecosystem/microservices/microservice-list.component.d.ts +2 -2
  150. package/ecosystem/microservices/microservice-list.component.d.ts.map +1 -1
  151. package/ecosystem/packages/deploy-application/deploy-application.component.d.ts.map +1 -1
  152. package/ecosystem/packages/package-details/package-details.component.d.ts +7 -2
  153. package/ecosystem/packages/package-details/package-details.component.d.ts.map +1 -1
  154. package/ecosystem/packages/package-list/packages-list.component.d.ts +2 -2
  155. package/ecosystem/packages/package-list/packages-list.component.d.ts.map +1 -1
  156. package/ecosystem/shared/add-application.component.d.ts +2 -1
  157. package/ecosystem/shared/add-application.component.d.ts.map +1 -1
  158. package/ecosystem/shared/application-card.component.d.ts +4 -0
  159. package/ecosystem/shared/application-card.component.d.ts.map +1 -1
  160. package/ecosystem/shared/archived-filter/archived-filter.component.d.ts +12 -0
  161. package/ecosystem/shared/archived-filter/archived-filter.component.d.ts.map +1 -0
  162. package/ecosystem/shared/ecosystem.constants.d.ts +4 -0
  163. package/ecosystem/shared/ecosystem.constants.d.ts.map +1 -1
  164. package/ecosystem/shared/ecosystem.model.d.ts +5 -1
  165. package/ecosystem/shared/ecosystem.model.d.ts.map +1 -1
  166. package/ecosystem/shared/ecosystem.service.d.ts +7 -0
  167. package/ecosystem/shared/ecosystem.service.d.ts.map +1 -1
  168. package/ecosystem/shared/index.d.ts +1 -0
  169. package/ecosystem/shared/index.d.ts.map +1 -1
  170. package/ecosystem/shared/list-filters/list-filters.component.d.ts +14 -4
  171. package/ecosystem/shared/list-filters/list-filters.component.d.ts.map +1 -1
  172. package/ecosystem/shared/list-filters/list-filters.model.d.ts +8 -2
  173. package/ecosystem/shared/list-filters/list-filters.model.d.ts.map +1 -1
  174. package/ecosystem/shared/shared-ecosystem.module.d.ts +9 -8
  175. package/ecosystem/shared/shared-ecosystem.module.d.ts.map +1 -1
  176. package/ecosystem/shared/translate-package-label.pipe.d.ts +1 -1
  177. package/ecosystem/shared/translate-package-label.pipe.d.ts.map +1 -1
  178. package/esm2022/alarms/alarm-info.component.mjs +1 -1
  179. package/esm2022/api/services.mjs +2 -2
  180. package/esm2022/auth-configuration/sso-configuration/template-parts/access-mapping/access-mapping.component.mjs +10 -5
  181. package/esm2022/auth-configuration/sso-configuration/template-parts/user-data-mapping.component.mjs +4 -4
  182. package/esm2022/context-dashboard/add-dashboard.component.mjs +4 -2
  183. package/esm2022/context-dashboard/context-dashboard.model.mjs +3 -2
  184. package/esm2022/context-dashboard/context-dashboard.service.mjs +2 -2
  185. package/esm2022/context-dashboard/dashboard-detail.component.mjs +5 -3
  186. package/esm2022/context-dashboard/dashboard-manager/dashboard-manager.model.mjs +1 -1
  187. package/esm2022/context-dashboard/dashboard-manager/dashboard-manager.service.mjs +5 -15
  188. package/esm2022/context-dashboard/dashboard-manager/type-dashboards-list/type-dashboards-list.component.mjs +2 -2
  189. package/esm2022/context-dashboard/new-dashboard.guard.mjs +1 -1
  190. package/esm2022/core/action/action.component.mjs +1 -1
  191. package/esm2022/core/action/action.model.mjs +1 -1
  192. package/esm2022/core/bootstrap/bootstrap.component.mjs +1 -1
  193. package/esm2022/core/breadcrumb/breadcrumb-item.component.mjs +1 -1
  194. package/esm2022/core/breadcrumb/breadcrumb.model.mjs +1 -1
  195. package/esm2022/core/common/ApplicationOptions.mjs +1 -1
  196. package/esm2022/core/common/empty-state/empty-state.component.mjs +1 -1
  197. package/esm2022/core/common/get-group-icon.pipe.mjs +1 -1
  198. package/esm2022/core/common/group.service.mjs +2 -2
  199. package/esm2022/core/common/icon.directive.mjs +1 -1
  200. package/esm2022/core/common/service-registry.model.mjs +1 -1
  201. package/esm2022/core/data-grid/data-grid.model.mjs +1 -1
  202. package/esm2022/core/docs/docs.models.mjs +1 -1
  203. package/esm2022/core/docs/support-outlet/support-outlet.component.mjs +3 -3
  204. package/esm2022/core/forms/filter-input.component.mjs +22 -7
  205. package/esm2022/core/list-group/list-item-action.component.mjs +1 -1
  206. package/esm2022/core/list-group/list-item-icon.component.mjs +1 -1
  207. package/esm2022/core/login/credentials.component.mjs +2 -2
  208. package/esm2022/core/login/login.service.mjs +18 -7
  209. package/esm2022/core/navigator/navigator-node-data.mjs +1 -1
  210. package/esm2022/core/navigator/navigator-node.component.mjs +11 -2
  211. package/esm2022/core/navigator/navigator-node.mjs +1 -1
  212. package/esm2022/core/plugins/plugins.model.mjs +5 -1
  213. package/esm2022/core/plugins/plugins.service.mjs +6 -2
  214. package/esm2022/core/properties-list/properties-list.component.mjs +1 -1
  215. package/esm2022/core/provider-configuration/model/dynamic-provider-config.model.mjs +1 -1
  216. package/esm2022/core/router/context-route.service.mjs +4 -2
  217. package/esm2022/core/router/router.model.mjs +1 -1
  218. package/esm2022/core/router/scoped-context-route.service.mjs +4 -2
  219. package/esm2022/core/search/search.model.mjs +1 -1
  220. package/esm2022/core/select/select-keyboard.service.mjs +7 -3
  221. package/esm2022/core/select/select.component.mjs +36 -8
  222. package/esm2022/core/select-modal/select-modal.component.mjs +2 -2
  223. package/esm2022/core/shared/core.model.mjs +6 -2
  224. package/esm2022/core/tabs/conditional-tabs-outlet.component.mjs +4 -2
  225. package/esm2022/core/tabs/tab.component.mjs +1 -1
  226. package/esm2022/core/tabs/tab.model.mjs +1 -1
  227. package/esm2022/core/tabs/tabs-outlet.component.mjs +41 -12
  228. package/esm2022/core/user/user-menu-item.component.mjs +1 -1
  229. package/esm2022/core/user/user.model.mjs +1 -1
  230. package/esm2022/core/wizard/wizard.model.mjs +1 -1
  231. package/esm2022/data-grid-columns/asset-type/asset-type.cell-renderer.component.mjs +1 -1
  232. package/esm2022/datapoint-selector/datapoint-attributes-form/datapoint-attributes-form.component.mjs +47 -22
  233. package/esm2022/datapoint-selector/datapoint-attributes-form/datapoint-attributes.model.mjs +1 -1
  234. package/esm2022/datapoint-selector/datapoint-selection.model.mjs +1 -1
  235. package/esm2022/datapoint-selector/datapoint-selector-list-item/datapoint-selector-list-item.component.mjs +3 -3
  236. package/esm2022/datapoints-export-selector/datapoints-export-selector.model.mjs +1 -1
  237. package/esm2022/device-grid/columns/icon.cell-renderer.component.mjs +42 -0
  238. package/esm2022/device-grid/columns/index.mjs +2 -1
  239. package/esm2022/device-grid/device-grid.component.mjs +3 -3
  240. package/esm2022/device-grid/device-grid.service.mjs +7 -25
  241. package/esm2022/device-provisioned-certificates/c8y-ngx-components-device-provisioned-certificates.mjs +5 -0
  242. package/esm2022/device-provisioned-certificates/device-provisioned-certificates.guard.mjs +28 -0
  243. package/esm2022/device-provisioned-certificates/device-provisioned-certificates.module.mjs +51 -0
  244. package/esm2022/device-provisioned-certificates/device-provisioned-certificates.service.mjs +31 -0
  245. package/esm2022/device-provisioned-certificates/device-tab-provisioned-certificates.component.mjs +76 -0
  246. package/esm2022/device-provisioned-certificates/index.mjs +2 -0
  247. package/esm2022/ecosystem/application-plugins/application-plugins.component.mjs +41 -39
  248. package/esm2022/ecosystem/application-plugins/application-plugins.module.mjs +8 -6
  249. package/esm2022/ecosystem/application-plugins/apps-to-update-remotes-select.component.mjs +1 -1
  250. package/esm2022/ecosystem/application-plugins/index.mjs +2 -1
  251. package/esm2022/ecosystem/application-plugins/install-plugin.component.mjs +18 -21
  252. package/esm2022/ecosystem/application-plugins/only-latest-filter/only-latest-filter.component.mjs +26 -0
  253. package/esm2022/ecosystem/application-plugins/plugin-list-item.component.mjs +14 -6
  254. package/esm2022/ecosystem/application-plugins/plugin-list.component.mjs +14 -12
  255. package/esm2022/ecosystem/application-plugins/update-plugin-of-app/update-plugin-of-app.component.mjs +7 -1
  256. package/esm2022/ecosystem/applications/application-list/application-list.component.mjs +1 -1
  257. package/esm2022/ecosystem/applications/install-from-package/install-from-package.component.mjs +6 -1
  258. package/esm2022/ecosystem/archived-confirm/archived-confirm-modal.component.mjs +22 -0
  259. package/esm2022/ecosystem/archived-confirm/archived-confirm.module.mjs +32 -0
  260. package/esm2022/ecosystem/archived-confirm/c8y-ngx-components-ecosystem-archived-confirm.mjs +5 -0
  261. package/esm2022/ecosystem/archived-confirm/index.mjs +3 -0
  262. package/esm2022/ecosystem/ecosystem.module.mjs +20 -16
  263. package/esm2022/ecosystem/features/feature-list.component.mjs +1 -1
  264. package/esm2022/ecosystem/microservices/microservice-list.component.mjs +1 -1
  265. package/esm2022/ecosystem/packages/deploy-application/deploy-application.component.mjs +6 -1
  266. package/esm2022/ecosystem/packages/package-details/package-details.component.mjs +13 -8
  267. package/esm2022/ecosystem/packages/package-list/packages-list.component.mjs +4 -4
  268. package/esm2022/ecosystem/shared/add-application.component.mjs +1 -1
  269. package/esm2022/ecosystem/shared/application-card.component.mjs +3 -3
  270. package/esm2022/ecosystem/shared/archived-filter/archived-filter.component.mjs +27 -0
  271. package/esm2022/ecosystem/shared/ecosystem.constants.mjs +5 -1
  272. package/esm2022/ecosystem/shared/ecosystem.model.mjs +7 -3
  273. package/esm2022/ecosystem/shared/ecosystem.service.mjs +26 -1
  274. package/esm2022/ecosystem/shared/index.mjs +2 -1
  275. package/esm2022/ecosystem/shared/list-filters/list-filters.component.mjs +75 -13
  276. package/esm2022/ecosystem/shared/list-filters/list-filters.model.mjs +1 -1
  277. package/esm2022/ecosystem/shared/shared-ecosystem.module.mjs +10 -5
  278. package/esm2022/ecosystem/shared/translate-package-label.pipe.mjs +3 -3
  279. package/esm2022/files-repository/files-repository.component.mjs +2 -2
  280. package/esm2022/files-repository/files-repository.service.mjs +5 -16
  281. package/esm2022/icon-selector/icon-selector.component.mjs +1 -1
  282. package/esm2022/icon-selector/icons/index.mjs +1 -1
  283. package/esm2022/operations/shared/status-option.model.mjs +1 -1
  284. package/esm2022/protocol-lwm2m/components/configuration/lwm2m-configuration.component.mjs +2 -2
  285. package/esm2022/protocol-opcua/opcua-auto-apply-settings.component.mjs +1 -1
  286. package/esm2022/register-device/bulk/bulk-device-registration-modal.component.mjs +17 -9
  287. package/esm2022/register-device/general/general-device-registration-button.component.mjs +3 -3
  288. package/esm2022/register-device/general/general-device-registration.component.mjs +109 -33
  289. package/esm2022/remote-access/configurations/c8y-ngx-components-remote-access-configurations.mjs +5 -0
  290. package/esm2022/remote-access/configurations/index.mjs +16 -0
  291. package/esm2022/remote-access/configurations/remote-access-configuration-list/remote-access-configuration-list.component.mjs +218 -0
  292. package/esm2022/remote-access/configurations/remote-access-configuration-list/remote-access-connect-button/remote-access-connect-button.component.mjs +60 -0
  293. package/esm2022/remote-access/configurations/remote-access-pick-protocol-modal/remote-access-pick-protocol-modal.component.mjs +36 -0
  294. package/esm2022/remote-access/data/c8y-ngx-components-remote-access-data.mjs +5 -0
  295. package/esm2022/remote-access/data/index.mjs +3 -0
  296. package/esm2022/remote-access/data/remote-access-protocol-provider.mjs +2 -0
  297. package/esm2022/remote-access/data/remote-access.service.mjs +200 -0
  298. package/esm2022/remote-access/passthrough/c8y-ngx-components-remote-access-passthrough.mjs +5 -0
  299. package/esm2022/remote-access/passthrough/index.mjs +36 -0
  300. package/esm2022/remote-access/shared/c8y-ngx-components-remote-access-shared.mjs +5 -0
  301. package/esm2022/remote-access/shared/index.mjs +3 -0
  302. package/esm2022/remote-access/shared/remote-access-basic-endpoint-modal/remote-access-basic-endpoint-modal.component.mjs +49 -0
  303. package/esm2022/remote-access/shared/ssh-key-input/ssh-key-input.component.mjs +87 -0
  304. package/esm2022/remote-access/ssh/c8y-ngx-components-remote-access-ssh.mjs +5 -0
  305. package/esm2022/remote-access/ssh/index.mjs +73 -0
  306. package/esm2022/remote-access/ssh/remote-access-ssh-endpoint-modal/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs +5 -0
  307. package/esm2022/remote-access/ssh/remote-access-ssh-endpoint-modal/index.mjs +2 -0
  308. package/esm2022/remote-access/ssh/remote-access-ssh-endpoint-modal/remote-access-ssh-endpoint-modal.component.mjs +104 -0
  309. package/esm2022/remote-access/telnet/c8y-ngx-components-remote-access-telnet.mjs +5 -0
  310. package/esm2022/remote-access/telnet/index.mjs +43 -0
  311. package/esm2022/remote-access/terminal-viewer/c8y-ngx-components-remote-access-terminal-viewer.mjs +5 -0
  312. package/esm2022/remote-access/terminal-viewer/index.mjs +2 -0
  313. package/esm2022/remote-access/terminal-viewer/shell-adapter.mjs +36 -0
  314. package/esm2022/remote-access/terminal-viewer/telnet-negotiator.mjs +96 -0
  315. package/esm2022/remote-access/terminal-viewer/terminal-viewer.component.mjs +101 -0
  316. package/esm2022/remote-access/vnc/c8y-ngx-components-remote-access-vnc.mjs +5 -0
  317. package/esm2022/remote-access/vnc/index.mjs +73 -0
  318. package/esm2022/remote-access/vnc/remote-access-vnc-endpoint-modal/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs +5 -0
  319. package/esm2022/remote-access/vnc/remote-access-vnc-endpoint-modal/index.mjs +2 -0
  320. package/esm2022/remote-access/vnc/remote-access-vnc-endpoint-modal/remote-access-vnc-endpoint-modal.component.mjs +59 -0
  321. package/esm2022/remote-access/vnc/vnc-viewer/c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs +5 -0
  322. package/esm2022/remote-access/vnc/vnc-viewer/index.mjs +2 -0
  323. package/esm2022/remote-access/vnc/vnc-viewer/vnc-credentials-prompt/vnc-credentials-prompt.component.mjs +57 -0
  324. package/esm2022/remote-access/vnc/vnc-viewer/vnc-viewer.component.mjs +158 -0
  325. package/esm2022/replace-device/replace-device-wizard/replace-device-wizard.model.mjs +1 -1
  326. package/esm2022/report-dashboard/report-dashboard-list.component.mjs +4 -3
  327. package/esm2022/repository/configuration/device-tab/device-configuration-list.component.mjs +1 -1
  328. package/esm2022/repository/shared/repository.model.mjs +1 -1
  329. package/esm2022/repository/shared/repository.service.mjs +3 -3
  330. package/esm2022/services/status-options/status-options.model.mjs +1 -1
  331. package/esm2022/sub-assets/group-info.component.mjs +1 -1
  332. package/esm2022/tenants/custom-properties/custom-properties.service.mjs +6 -2
  333. package/esm2022/translation-editor/data/translation-store.service.mjs +4 -3
  334. package/esm2022/trusted-certificates/list/trusted-certificate-list.component.mjs +35 -9
  335. package/esm2022/upgrade/bridge.service.mjs +16 -2
  336. package/esm2022/widgets/implementations/alarms/severity-icon.pipe.mjs +1 -1
  337. package/esm2022/widgets/implementations/datapoints-table/datapoints-table-config/datapoints-table-config.component.mjs +3 -2
  338. package/esm2022/widgets/implementations/kpi/kpi-widget.model.mjs +1 -1
  339. package/fesm2022/c8y-ngx-components-alarms.mjs +1 -1
  340. package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
  341. package/fesm2022/c8y-ngx-components-api.mjs +3 -2
  342. package/fesm2022/c8y-ngx-components-api.mjs.map +1 -1
  343. package/fesm2022/c8y-ngx-components-auth-configuration.mjs +12 -7
  344. package/fesm2022/c8y-ngx-components-auth-configuration.mjs.map +1 -1
  345. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +15 -20
  346. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  347. package/fesm2022/c8y-ngx-components-data-grid-columns-asset-type.mjs.map +1 -1
  348. package/fesm2022/c8y-ngx-components-data-grid-columns.mjs.map +1 -1
  349. package/fesm2022/c8y-ngx-components-datapoint-selector.mjs +48 -23
  350. package/fesm2022/c8y-ngx-components-datapoint-selector.mjs.map +1 -1
  351. package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs.map +1 -1
  352. package/fesm2022/c8y-ngx-components-device-grid.mjs +48 -28
  353. package/fesm2022/c8y-ngx-components-device-grid.mjs.map +1 -1
  354. package/fesm2022/c8y-ngx-components-device-provisioned-certificates.mjs +174 -0
  355. package/fesm2022/c8y-ngx-components-device-provisioned-certificates.mjs.map +1 -0
  356. package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs +125 -105
  357. package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
  358. package/fesm2022/c8y-ngx-components-ecosystem-archived-confirm.mjs +57 -0
  359. package/fesm2022/c8y-ngx-components-ecosystem-archived-confirm.mjs.map +1 -0
  360. package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs +147 -31
  361. package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs.map +1 -1
  362. package/fesm2022/c8y-ngx-components-ecosystem.mjs +1452 -1414
  363. package/fesm2022/c8y-ngx-components-ecosystem.mjs.map +1 -1
  364. package/fesm2022/c8y-ngx-components-files-repository.mjs +5 -16
  365. package/fesm2022/c8y-ngx-components-files-repository.mjs.map +1 -1
  366. package/fesm2022/c8y-ngx-components-icon-selector-icons.mjs.map +1 -1
  367. package/fesm2022/c8y-ngx-components-icon-selector.mjs.map +1 -1
  368. package/fesm2022/c8y-ngx-components-protocol-lwm2m-components-configuration.mjs +1 -1
  369. package/fesm2022/c8y-ngx-components-protocol-lwm2m-components-configuration.mjs.map +1 -1
  370. package/fesm2022/c8y-ngx-components-protocol-opcua.mjs +1 -1
  371. package/fesm2022/c8y-ngx-components-protocol-opcua.mjs.map +1 -1
  372. package/fesm2022/c8y-ngx-components-register-device.mjs +269 -188
  373. package/fesm2022/c8y-ngx-components-register-device.mjs.map +1 -1
  374. package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs +314 -0
  375. package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs.map +1 -0
  376. package/fesm2022/c8y-ngx-components-remote-access-data.mjs +206 -0
  377. package/fesm2022/c8y-ngx-components-remote-access-data.mjs.map +1 -0
  378. package/fesm2022/c8y-ngx-components-remote-access-passthrough.mjs +42 -0
  379. package/fesm2022/c8y-ngx-components-remote-access-passthrough.mjs.map +1 -0
  380. package/fesm2022/c8y-ngx-components-remote-access-shared.mjs +138 -0
  381. package/fesm2022/c8y-ngx-components-remote-access-shared.mjs.map +1 -0
  382. package/fesm2022/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs +111 -0
  383. package/fesm2022/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs.map +1 -0
  384. package/fesm2022/c8y-ngx-components-remote-access-ssh.mjs +79 -0
  385. package/fesm2022/c8y-ngx-components-remote-access-ssh.mjs.map +1 -0
  386. package/fesm2022/c8y-ngx-components-remote-access-telnet.mjs +50 -0
  387. package/fesm2022/c8y-ngx-components-remote-access-telnet.mjs.map +1 -0
  388. package/fesm2022/c8y-ngx-components-remote-access-terminal-viewer.mjs +235 -0
  389. package/fesm2022/c8y-ngx-components-remote-access-terminal-viewer.mjs.map +1 -0
  390. package/fesm2022/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs +66 -0
  391. package/fesm2022/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs.map +1 -0
  392. package/fesm2022/c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs +211 -0
  393. package/fesm2022/c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs.map +1 -0
  394. package/fesm2022/c8y-ngx-components-remote-access-vnc.mjs +79 -0
  395. package/fesm2022/c8y-ngx-components-remote-access-vnc.mjs.map +1 -0
  396. package/fesm2022/c8y-ngx-components-replace-device-replace-device-wizard.mjs.map +1 -1
  397. package/fesm2022/c8y-ngx-components-report-dashboard.mjs +3 -2
  398. package/fesm2022/c8y-ngx-components-report-dashboard.mjs.map +1 -1
  399. package/fesm2022/c8y-ngx-components-repository-configuration.mjs +1 -1
  400. package/fesm2022/c8y-ngx-components-repository-configuration.mjs.map +1 -1
  401. package/fesm2022/c8y-ngx-components-repository-shared.mjs +2 -2
  402. package/fesm2022/c8y-ngx-components-repository-shared.mjs.map +1 -1
  403. package/fesm2022/c8y-ngx-components-services.mjs.map +1 -1
  404. package/fesm2022/c8y-ngx-components-sub-assets.mjs.map +1 -1
  405. package/fesm2022/c8y-ngx-components-tenants.mjs +5 -1
  406. package/fesm2022/c8y-ngx-components-tenants.mjs.map +1 -1
  407. package/fesm2022/c8y-ngx-components-translation-editor-data.mjs +3 -2
  408. package/fesm2022/c8y-ngx-components-translation-editor-data.mjs.map +1 -1
  409. package/fesm2022/c8y-ngx-components-trusted-certificates.mjs +43 -17
  410. package/fesm2022/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
  411. package/fesm2022/c8y-ngx-components-upgrade.mjs +16 -2
  412. package/fesm2022/c8y-ngx-components-upgrade.mjs.map +1 -1
  413. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
  414. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +2 -1
  415. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs.map +1 -1
  416. package/fesm2022/c8y-ngx-components.mjs +151 -38
  417. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  418. package/files-repository/files-repository.component.d.ts.map +1 -1
  419. package/files-repository/files-repository.service.d.ts +0 -2
  420. package/files-repository/files-repository.service.d.ts.map +1 -1
  421. package/icon-selector/icon-selector.component.d.ts +3 -2
  422. package/icon-selector/icon-selector.component.d.ts.map +1 -1
  423. package/icon-selector/icons/index.d.ts +1 -0
  424. package/icon-selector/icons/index.d.ts.map +1 -1
  425. package/locales/de.po +157 -5
  426. package/locales/es.po +157 -5
  427. package/locales/fr.po +157 -5
  428. package/locales/ja_JP.po +156 -5
  429. package/locales/ko.po +156 -5
  430. package/locales/locales.pot +156 -4
  431. package/locales/nl.po +157 -5
  432. package/locales/pl.po +159 -7
  433. package/locales/pt_BR.po +157 -5
  434. package/locales/zh_CN.po +156 -5
  435. package/locales/zh_TW.po +156 -5
  436. package/operations/shared/status-option.model.d.ts +2 -1
  437. package/operations/shared/status-option.model.d.ts.map +1 -1
  438. package/package.json +1 -1
  439. package/register-device/bulk/bulk-device-registration-modal.component.d.ts +6 -2
  440. package/register-device/bulk/bulk-device-registration-modal.component.d.ts.map +1 -1
  441. package/register-device/general/general-device-registration-button.component.d.ts +1 -1
  442. package/register-device/general/general-device-registration-button.component.d.ts.map +1 -1
  443. package/register-device/general/general-device-registration.component.d.ts +21 -7
  444. package/register-device/general/general-device-registration.component.d.ts.map +1 -1
  445. package/remote-access/configurations/c8y-ngx-components-remote-access-configurations.d.ts.map +1 -0
  446. package/remote-access/configurations/index.d.ts +3 -0
  447. package/remote-access/configurations/index.d.ts.map +1 -0
  448. package/remote-access/configurations/remote-access-configuration-list/remote-access-configuration-list.component.d.ts +34 -0
  449. package/remote-access/configurations/remote-access-configuration-list/remote-access-configuration-list.component.d.ts.map +1 -0
  450. package/remote-access/configurations/remote-access-configuration-list/remote-access-connect-button/remote-access-connect-button.component.d.ts +17 -0
  451. package/remote-access/configurations/remote-access-configuration-list/remote-access-connect-button/remote-access-connect-button.component.d.ts.map +1 -0
  452. package/remote-access/configurations/remote-access-pick-protocol-modal/remote-access-pick-protocol-modal.component.d.ts +18 -0
  453. package/remote-access/configurations/remote-access-pick-protocol-modal/remote-access-pick-protocol-modal.component.d.ts.map +1 -0
  454. package/remote-access/data/c8y-ngx-components-remote-access-data.d.ts.map +1 -0
  455. package/remote-access/data/index.d.ts +3 -0
  456. package/remote-access/data/index.d.ts.map +1 -0
  457. package/remote-access/data/remote-access-protocol-provider.d.ts +21 -0
  458. package/remote-access/data/remote-access-protocol-provider.d.ts.map +1 -0
  459. package/remote-access/data/remote-access.service.d.ts +94 -0
  460. package/remote-access/data/remote-access.service.d.ts.map +1 -0
  461. package/remote-access/passthrough/c8y-ngx-components-remote-access-passthrough.d.ts.map +1 -0
  462. package/remote-access/passthrough/index.d.ts +17 -0
  463. package/remote-access/passthrough/index.d.ts.map +1 -0
  464. package/remote-access/shared/c8y-ngx-components-remote-access-shared.d.ts.map +1 -0
  465. package/remote-access/shared/index.d.ts +3 -0
  466. package/remote-access/shared/index.d.ts.map +1 -0
  467. package/remote-access/shared/remote-access-basic-endpoint-modal/remote-access-basic-endpoint-modal.component.d.ts +37 -0
  468. package/remote-access/shared/remote-access-basic-endpoint-modal/remote-access-basic-endpoint-modal.component.d.ts.map +1 -0
  469. package/remote-access/shared/ssh-key-input/ssh-key-input.component.d.ts +38 -0
  470. package/remote-access/shared/ssh-key-input/ssh-key-input.component.d.ts.map +1 -0
  471. package/remote-access/ssh/c8y-ngx-components-remote-access-ssh.d.ts.map +1 -0
  472. package/remote-access/ssh/index.d.ts +22 -0
  473. package/remote-access/ssh/index.d.ts.map +1 -0
  474. package/remote-access/ssh/remote-access-ssh-endpoint-modal/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.d.ts.map +1 -0
  475. package/remote-access/ssh/remote-access-ssh-endpoint-modal/index.d.ts +2 -0
  476. package/remote-access/ssh/remote-access-ssh-endpoint-modal/index.d.ts.map +1 -0
  477. package/remote-access/ssh/remote-access-ssh-endpoint-modal/remote-access-ssh-endpoint-modal.component.d.ts +64 -0
  478. package/remote-access/ssh/remote-access-ssh-endpoint-modal/remote-access-ssh-endpoint-modal.component.d.ts.map +1 -0
  479. package/remote-access/telnet/c8y-ngx-components-remote-access-telnet.d.ts.map +1 -0
  480. package/remote-access/telnet/index.d.ts +17 -0
  481. package/remote-access/telnet/index.d.ts.map +1 -0
  482. package/remote-access/terminal-viewer/c8y-ngx-components-remote-access-terminal-viewer.d.ts.map +1 -0
  483. package/remote-access/terminal-viewer/index.d.ts +2 -0
  484. package/remote-access/terminal-viewer/index.d.ts.map +1 -0
  485. package/remote-access/terminal-viewer/shell-adapter.d.ts +14 -0
  486. package/remote-access/terminal-viewer/shell-adapter.d.ts.map +1 -0
  487. package/remote-access/terminal-viewer/telnet-negotiator.d.ts +13 -0
  488. package/remote-access/terminal-viewer/telnet-negotiator.d.ts.map +1 -0
  489. package/remote-access/terminal-viewer/terminal-viewer.component.d.ts +25 -0
  490. package/remote-access/terminal-viewer/terminal-viewer.component.d.ts.map +1 -0
  491. package/remote-access/vnc/c8y-ngx-components-remote-access-vnc.d.ts.map +1 -0
  492. package/remote-access/vnc/index.d.ts +22 -0
  493. package/remote-access/vnc/index.d.ts.map +1 -0
  494. package/remote-access/vnc/remote-access-vnc-endpoint-modal/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.d.ts.map +1 -0
  495. package/remote-access/vnc/remote-access-vnc-endpoint-modal/index.d.ts +2 -0
  496. package/remote-access/vnc/remote-access-vnc-endpoint-modal/index.d.ts.map +1 -0
  497. package/remote-access/vnc/remote-access-vnc-endpoint-modal/remote-access-vnc-endpoint-modal.component.d.ts +46 -0
  498. package/remote-access/vnc/remote-access-vnc-endpoint-modal/remote-access-vnc-endpoint-modal.component.d.ts.map +1 -0
  499. package/remote-access/vnc/vnc-viewer/c8y-ngx-components-remote-access-vnc-vnc-viewer.d.ts.map +1 -0
  500. package/remote-access/vnc/vnc-viewer/index.d.ts +2 -0
  501. package/remote-access/vnc/vnc-viewer/index.d.ts.map +1 -0
  502. package/remote-access/vnc/vnc-viewer/vnc-credentials-prompt/vnc-credentials-prompt.component.d.ts +32 -0
  503. package/remote-access/vnc/vnc-viewer/vnc-credentials-prompt/vnc-credentials-prompt.component.d.ts.map +1 -0
  504. package/remote-access/vnc/vnc-viewer/vnc-viewer.component.d.ts +37 -0
  505. package/remote-access/vnc/vnc-viewer/vnc-viewer.component.d.ts.map +1 -0
  506. package/replace-device/replace-device-wizard/replace-device-wizard.model.d.ts +2 -1
  507. package/replace-device/replace-device-wizard/replace-device-wizard.model.d.ts.map +1 -1
  508. package/report-dashboard/report-dashboard-list.component.d.ts +29 -0
  509. package/report-dashboard/report-dashboard-list.component.d.ts.map +1 -1
  510. package/repository/shared/repository.model.d.ts +2 -1
  511. package/repository/shared/repository.model.d.ts.map +1 -1
  512. package/services/status-options/status-options.model.d.ts +2 -1
  513. package/services/status-options/status-options.model.d.ts.map +1 -1
  514. package/sub-assets/group-info.component.d.ts +2 -1
  515. package/sub-assets/group-info.component.d.ts.map +1 -1
  516. package/tenants/custom-properties/custom-properties.service.d.ts.map +1 -1
  517. package/translation-editor/data/translation-store.service.d.ts.map +1 -1
  518. package/trusted-certificates/list/trusted-certificate-list.component.d.ts +7 -2
  519. package/trusted-certificates/list/trusted-certificate-list.component.d.ts.map +1 -1
  520. package/upgrade/bridge.service.d.ts +5 -0
  521. package/upgrade/bridge.service.d.ts.map +1 -1
  522. package/widgets/implementations/alarms/severity-icon.pipe.d.ts.map +1 -1
  523. package/widgets/implementations/datapoints-table/datapoints-table-config/datapoints-table-config.component.d.ts.map +1 -1
  524. package/widgets/implementations/kpi/kpi-widget.model.d.ts +2 -1
  525. package/widgets/implementations/kpi/kpi-widget.model.d.ts.map +1 -1
  526. package/ecosystem/application-plugins/only-latest-plugin-version.pipe.d.ts +0 -10
  527. package/ecosystem/application-plugins/only-latest-plugin-version.pipe.d.ts.map +0 -1
  528. package/esm2022/ecosystem/application-plugins/only-latest-plugin-version.pipe.mjs +0 -20
@@ -0,0 +1,211 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, Input } from '@angular/core';
3
+ import * as i3 from '@c8y/ngx-components';
4
+ import { CoreModule, gettext as gettext$1, C8yTranslatePipe, TitleComponent, ActionBarItemComponent, C8yTranslateDirective, IconDirective, LoadingComponent } from '@c8y/ngx-components';
5
+ import * as i1$1 from '@c8y/ngx-components/remote-access/data';
6
+ import * as i2$1 from '@angular/router';
7
+ import * as i4 from '@angular/common';
8
+ import { NgIf, NgClass } from '@angular/common';
9
+ import { saveAs } from 'file-saver';
10
+ import * as i2 from 'ngx-bootstrap/modal';
11
+ import * as i1 from '@angular/forms';
12
+ import { Validators } from '@angular/forms';
13
+ import { gettext } from '@c8y/ngx-components/gettext';
14
+ import { BehaviorSubject, combineLatest, defer } from 'rxjs';
15
+ import { filter, map, distinctUntilChanged } from 'rxjs/operators';
16
+
17
+ class VncCredentialsPromptComponent {
18
+ constructor(formBuilder, modalRef) {
19
+ this.formBuilder = formBuilder;
20
+ this.modalRef = modalRef;
21
+ this.title = gettext('VNC credentials');
22
+ this.types = [];
23
+ this.result = new Promise((resolve, reject) => {
24
+ this._resolve = resolve;
25
+ this._reject = reject;
26
+ });
27
+ this.showUsername = false;
28
+ this.form = this.initForm();
29
+ }
30
+ ngOnInit() {
31
+ this.showUsername = this.types.includes('username');
32
+ this.form = this.initForm();
33
+ }
34
+ initForm() {
35
+ return this.formBuilder.group({
36
+ username: [undefined, this.showUsername ? [Validators.required] : []],
37
+ password: [undefined, [Validators.required]]
38
+ });
39
+ }
40
+ cancel() {
41
+ this._reject();
42
+ }
43
+ save() {
44
+ this._resolve(this.form.value);
45
+ }
46
+ submit() {
47
+ if (!this.form.valid) {
48
+ return;
49
+ }
50
+ this.modalRef.hide();
51
+ this.save();
52
+ }
53
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: VncCredentialsPromptComponent, deps: [{ token: i1.FormBuilder }, { token: i2.BsModalRef }], target: i0.ɵɵFactoryTarget.Component }); }
54
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: VncCredentialsPromptComponent, isStandalone: true, selector: "c8y-vnc-credentials-prompt", inputs: { types: "types" }, ngImport: i0, template: "<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'key'\"></span>\n </ng-container>\n <form\n class=\"p-24\"\n [formGroup]=\"form\"\n (submit)=\"submit()\"\n >\n <c8y-form-group *ngIf=\"showUsername\">\n <label\n for=\"username\"\n translate\n >\n Username\n </label>\n <input\n class=\"form-control\"\n id=\"username\"\n name=\"username\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'admin' }\"\n formControlName=\"username\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n name=\"password\"\n type=\"password\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <button type=\"submit\" class=\"hidden\">hidden submit</button>\n </form>\n</c8y-modal>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i3.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: i3.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i3.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i3.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: i3.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: i3.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
55
+ }
56
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: VncCredentialsPromptComponent, decorators: [{
57
+ type: Component,
58
+ args: [{ selector: 'c8y-vnc-credentials-prompt', standalone: true, imports: [CoreModule, NgIf], template: "<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'key'\"></span>\n </ng-container>\n <form\n class=\"p-24\"\n [formGroup]=\"form\"\n (submit)=\"submit()\"\n >\n <c8y-form-group *ngIf=\"showUsername\">\n <label\n for=\"username\"\n translate\n >\n Username\n </label>\n <input\n class=\"form-control\"\n id=\"username\"\n name=\"username\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'admin' }\"\n formControlName=\"username\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n name=\"password\"\n type=\"password\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <button type=\"submit\" class=\"hidden\">hidden submit</button>\n </form>\n</c8y-modal>\n" }]
59
+ }], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i2.BsModalRef }], propDecorators: { types: [{
60
+ type: Input
61
+ }] } });
62
+
63
+ class VncViewerComponent {
64
+ constructor(remoteAccess, activatedRoute, modalService) {
65
+ this.remoteAccess = remoteAccess;
66
+ this.activatedRoute = activatedRoute;
67
+ this.modalService = modalService;
68
+ this.titlePrefix = gettext$1('VNC viewer');
69
+ this.title = '';
70
+ this.container = null;
71
+ this.powerCapability = false;
72
+ this.status = 'connecting';
73
+ this.container$ = new BehaviorSubject(null);
74
+ const container$ = this.container$.pipe(filter(Boolean));
75
+ const configurationId$ = this.activatedRoute.params.pipe(map(params => params.configurationId), filter(Boolean), distinctUntilChanged());
76
+ const deviceId$ = this.activatedRoute.parent.params.pipe(map(params => params.id), filter(Boolean), distinctUntilChanged());
77
+ this.connectionSubscription = combineLatest([
78
+ container$,
79
+ deviceId$,
80
+ configurationId$,
81
+ defer(() => this.getNoVNCClient())
82
+ ]).subscribe(([container, deviceId, configurationId, noVNC]) => {
83
+ this.disconnectFromOldSession();
84
+ this.connect(container, deviceId, configurationId, noVNC);
85
+ });
86
+ }
87
+ ngOnDestroy() {
88
+ this.connectionSubscription?.unsubscribe();
89
+ this.disconnectFromOldSession();
90
+ }
91
+ ngAfterViewInit() {
92
+ this.container$.next(document.getElementById('vnc-screen'));
93
+ }
94
+ disconnectFromOldSession() {
95
+ this.powerCapability = false;
96
+ this.title = '';
97
+ if (!this.noVNCClient) {
98
+ return;
99
+ }
100
+ this.noVNCClient.disconnect();
101
+ delete this.noVNCClient;
102
+ }
103
+ connect(container, deviceId, configId, noVNC) {
104
+ this.container = container;
105
+ this.changeStatus('connecting');
106
+ const options = {
107
+ wsProtocols: ['binary']
108
+ };
109
+ const uri = this.remoteAccess.getWebSocketUri(deviceId, configId);
110
+ this.noVNCClient = new noVNC(container, uri, options);
111
+ this.noVNCClient.resizeSession = true;
112
+ this.noVNCClient.scaleViewport = true;
113
+ this.noVNCClient.showDotCursor = true;
114
+ this.noVNCClient.viewOnly = false;
115
+ this.noVNCClient.qualityLevel = 6;
116
+ // need to set compressionLevel to something different than the default 2 as 2 seems to be causing issues..
117
+ this.noVNCClient.compressionLevel = 9;
118
+ this.noVNCClient.addEventListener('connect', _e => {
119
+ this.changeStatus('connected');
120
+ this.noVNCClient.focus();
121
+ });
122
+ this.noVNCClient.addEventListener('credentialsrequired', e => {
123
+ this.requestCredentials(e.detail.types);
124
+ });
125
+ this.noVNCClient.addEventListener('desktopname', e => {
126
+ this.title = e.detail.name;
127
+ });
128
+ this.noVNCClient.addEventListener('disconnect', () => {
129
+ this.changeStatus('disconnected');
130
+ });
131
+ this.noVNCClient.addEventListener('capabilities', e => {
132
+ this.powerCapability = e.detail.capabilities.power;
133
+ });
134
+ }
135
+ downloadScreenshot() {
136
+ this.noVNCClient.toBlob(blob => {
137
+ const date = new Date().toISOString();
138
+ saveAs(blob, `screenshot-${this.title}-${date}.png`);
139
+ }, 'image/png', 1);
140
+ }
141
+ changeStatus(status) {
142
+ this.status = status;
143
+ }
144
+ toggleFullscreen() {
145
+ if (document.fullscreenElement) {
146
+ document.exitFullscreen();
147
+ }
148
+ else {
149
+ this.container.requestFullscreen();
150
+ }
151
+ }
152
+ sendCtrlAltDel() {
153
+ this.noVNCClient.sendCtrlAltDel();
154
+ }
155
+ sendShutDown() {
156
+ this.noVNCClient.machineShutdown();
157
+ }
158
+ sendReset() {
159
+ this.noVNCClient.machineReset();
160
+ }
161
+ sendReboot() {
162
+ this.noVNCClient.machineReboot();
163
+ }
164
+ async getNoVNCClient() {
165
+ const lib = await import('@novnc/novnc/lib/rfb');
166
+ if (typeof lib.default === 'function') {
167
+ return lib.default;
168
+ }
169
+ const libDefault = lib.default;
170
+ if (typeof libDefault.default === 'function') {
171
+ return libDefault.default;
172
+ }
173
+ throw new Error('NoVNC library not found');
174
+ }
175
+ async requestCredentials(types) {
176
+ const modalRef = this.modalService.show(VncCredentialsPromptComponent, {
177
+ ignoreBackdropClick: true,
178
+ keyboard: false,
179
+ initialState: { types: types }
180
+ });
181
+ try {
182
+ const { username, password } = await modalRef.content.result;
183
+ this.noVNCClient.sendCredentials({ username, password, target: undefined });
184
+ }
185
+ catch (e) {
186
+ this.noVNCClient.disconnect();
187
+ }
188
+ }
189
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: VncViewerComponent, deps: [{ token: i1$1.RemoteAccessService }, { token: i2$1.ActivatedRoute }, { token: i2.BsModalService }], target: i0.ɵɵFactoryTarget.Component }); }
190
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: VncViewerComponent, isStandalone: true, selector: "c8y-vnc-viewer", ngImport: i0, template: "<c8y-title>{{ titlePrefix | translate }}: {{ title | translate }}</c8y-title>\n\n<ng-container *ngIf=\"status === 'connected'\">\n <c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n (click)=\"toggleFullscreen()\"\n >\n <i [c8yIcon]=\"'expand'\"></i>\n <span translate>Fullscreen</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n (click)=\"downloadScreenshot()\"\n >\n <i [c8yIcon]=\"'download'\"></i>\n <span translate>Screenshot</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item [placement]=\"'more'\">\n <button\n class=\"btn btn-link\"\n (click)=\"sendCtrlAltDel()\"\n >\n <i [c8yIcon]=\"'keyboard'\"></i>\n <span translate>Send Ctrl+Alt+Del</span>\n </button>\n </c8y-action-bar-item>\n</ng-container>\n\n<ng-container *ngIf=\"powerCapability && status === 'connected'\">\n <c8y-action-bar-item [placement]=\"'more'\">\n <button\n class=\"btn btn-link\"\n (click)=\"sendShutDown()\"\n >\n <i [c8yIcon]=\"'shutdown'\"></i>\n <span translate>Shutdown</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item [placement]=\"'more'\">\n <button\n class=\"btn btn-link\"\n (click)=\"sendReboot()\"\n >\n <i [c8yIcon]=\"'reset'\"></i>\n <span translate>Reboot</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item [placement]=\"'more'\">\n <button\n class=\"btn btn-link\"\n (click)=\"sendReset()\"\n >\n <i [c8yIcon]=\"'reset'\"></i>\n <span translate>Reset</span>\n </button>\n </c8y-action-bar-item>\n</ng-container>\n\n<c8y-loading *ngIf=\"status === 'connecting'\"></c8y-loading>\n\n<div\n class=\"content-fullpage\"\n [ngClass]=\"{ hidden: status !== 'connected' }\"\n>\n <div\n class=\"inner-scroll\"\n id=\"vnc-screen\"\n ></div>\n</div>\n", dependencies: [{ kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "component", type: TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "component", type: ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: LoadingComponent, selector: "c8y-loading", inputs: ["layout", "progress", "message"] }] }); }
191
+ }
192
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: VncViewerComponent, decorators: [{
193
+ type: Component,
194
+ args: [{ selector: 'c8y-vnc-viewer', standalone: true, imports: [
195
+ C8yTranslatePipe,
196
+ TitleComponent,
197
+ ActionBarItemComponent,
198
+ C8yTranslateDirective,
199
+ IconDirective,
200
+ NgIf,
201
+ NgClass,
202
+ LoadingComponent
203
+ ], template: "<c8y-title>{{ titlePrefix | translate }}: {{ title | translate }}</c8y-title>\n\n<ng-container *ngIf=\"status === 'connected'\">\n <c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n (click)=\"toggleFullscreen()\"\n >\n <i [c8yIcon]=\"'expand'\"></i>\n <span translate>Fullscreen</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n (click)=\"downloadScreenshot()\"\n >\n <i [c8yIcon]=\"'download'\"></i>\n <span translate>Screenshot</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item [placement]=\"'more'\">\n <button\n class=\"btn btn-link\"\n (click)=\"sendCtrlAltDel()\"\n >\n <i [c8yIcon]=\"'keyboard'\"></i>\n <span translate>Send Ctrl+Alt+Del</span>\n </button>\n </c8y-action-bar-item>\n</ng-container>\n\n<ng-container *ngIf=\"powerCapability && status === 'connected'\">\n <c8y-action-bar-item [placement]=\"'more'\">\n <button\n class=\"btn btn-link\"\n (click)=\"sendShutDown()\"\n >\n <i [c8yIcon]=\"'shutdown'\"></i>\n <span translate>Shutdown</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item [placement]=\"'more'\">\n <button\n class=\"btn btn-link\"\n (click)=\"sendReboot()\"\n >\n <i [c8yIcon]=\"'reset'\"></i>\n <span translate>Reboot</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item [placement]=\"'more'\">\n <button\n class=\"btn btn-link\"\n (click)=\"sendReset()\"\n >\n <i [c8yIcon]=\"'reset'\"></i>\n <span translate>Reset</span>\n </button>\n </c8y-action-bar-item>\n</ng-container>\n\n<c8y-loading *ngIf=\"status === 'connecting'\"></c8y-loading>\n\n<div\n class=\"content-fullpage\"\n [ngClass]=\"{ hidden: status !== 'connected' }\"\n>\n <div\n class=\"inner-scroll\"\n id=\"vnc-screen\"\n ></div>\n</div>\n" }]
204
+ }], ctorParameters: () => [{ type: i1$1.RemoteAccessService }, { type: i2$1.ActivatedRoute }, { type: i2.BsModalService }] });
205
+
206
+ /**
207
+ * Generated bundle index. Do not edit.
208
+ */
209
+
210
+ export { VncViewerComponent };
211
+ //# sourceMappingURL=c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs","sources":["../../remote-access/vnc/vnc-viewer/vnc-credentials-prompt/vnc-credentials-prompt.component.ts","../../remote-access/vnc/vnc-viewer/vnc-credentials-prompt/vnc-credentials-prompt.component.html","../../remote-access/vnc/vnc-viewer/vnc-viewer.component.ts","../../remote-access/vnc/vnc-viewer/vnc-viewer.component.html","../../remote-access/vnc/vnc-viewer/c8y-ngx-components-remote-access-vnc-vnc-viewer.ts"],"sourcesContent":["import { NgIf } from '@angular/common';\nimport { Component, Input, OnInit } from '@angular/core';\nimport { FormBuilder, Validators } from '@angular/forms';\nimport { CoreModule } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport type { NoVncCredentials } from '@novnc/novnc/lib/rfb';\nimport { BsModalRef } from 'ngx-bootstrap/modal';\n\n@Component({\n selector: 'c8y-vnc-credentials-prompt',\n templateUrl: './vnc-credentials-prompt.component.html',\n standalone: true,\n imports: [CoreModule, NgIf]\n})\nexport class VncCredentialsPromptComponent implements OnInit {\n title = gettext('VNC credentials');\n @Input() types: Array<keyof NoVncCredentials> = [];\n result = new Promise<ReturnType<typeof this.initForm>['value']>((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n selectedType: string;\n showUsername = false;\n\n form: ReturnType<typeof this.initForm>;\n\n private _resolve: (value: ReturnType<typeof this.initForm>['value']) => void;\n private _reject: (reason?: any) => void;\n\n constructor(\n private formBuilder: FormBuilder,\n private modalRef: BsModalRef\n ) {\n this.form = this.initForm();\n }\n\n ngOnInit() {\n this.showUsername = this.types.includes('username');\n this.form = this.initForm();\n }\n\n initForm() {\n return this.formBuilder.group({\n username: [undefined as string, this.showUsername ? [Validators.required] : []],\n password: [undefined as string, [Validators.required]]\n });\n }\n\n cancel() {\n this._reject();\n }\n\n save() {\n this._resolve(this.form.value);\n }\n\n submit() {\n if (!this.form.valid) {\n return;\n }\n this.modalRef.hide();\n this.save();\n }\n}\n","<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'key'\"></span>\n </ng-container>\n <form\n class=\"p-24\"\n [formGroup]=\"form\"\n (submit)=\"submit()\"\n >\n <c8y-form-group *ngIf=\"showUsername\">\n <label\n for=\"username\"\n translate\n >\n Username\n </label>\n <input\n class=\"form-control\"\n id=\"username\"\n name=\"username\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'admin' }\"\n formControlName=\"username\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n name=\"password\"\n type=\"password\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <button type=\"submit\" class=\"hidden\">hidden submit</button>\n </form>\n</c8y-modal>\n","import { AfterViewInit, Component, OnDestroy } from '@angular/core';\nimport {\n ActionBarItemComponent,\n C8yTranslateDirective,\n C8yTranslatePipe,\n IconDirective,\n LoadingComponent,\n TitleComponent\n} from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components';\nimport type { NoVncCredentials, NoVncOptions, default as NoVncClient } from '@novnc/novnc/lib/rfb';\nimport { RemoteAccessService } from '@c8y/ngx-components/remote-access/data';\nimport { ActivatedRoute } from '@angular/router';\nimport { NgClass, NgIf } from '@angular/common';\nimport { saveAs } from 'file-saver';\nimport { BsModalService } from 'ngx-bootstrap/modal';\nimport { VncCredentialsPromptComponent } from './vnc-credentials-prompt/vnc-credentials-prompt.component';\nimport { BehaviorSubject, combineLatest, defer, Subscription } from 'rxjs';\nimport { distinctUntilChanged, filter, map } from 'rxjs/operators';\n\n@Component({\n selector: 'c8y-vnc-viewer',\n templateUrl: './vnc-viewer.component.html',\n standalone: true,\n imports: [\n C8yTranslatePipe,\n TitleComponent,\n ActionBarItemComponent,\n C8yTranslateDirective,\n IconDirective,\n NgIf,\n NgClass,\n LoadingComponent\n ]\n})\nexport class VncViewerComponent implements AfterViewInit, OnDestroy {\n titlePrefix = gettext('VNC viewer');\n title = '';\n container: HTMLElement | null = null;\n noVNCClient: NoVncClient;\n powerCapability = false;\n\n status: 'connecting' | 'connected' | 'disconnected' = 'connecting';\n container$ = new BehaviorSubject<HTMLElement | null>(null);\n\n connectionSubscription: Subscription;\n\n constructor(\n private remoteAccess: RemoteAccessService,\n private activatedRoute: ActivatedRoute,\n private modalService: BsModalService\n ) {\n const container$ = this.container$.pipe(filter(Boolean));\n const configurationId$ = this.activatedRoute.params.pipe(\n map(params => params.configurationId),\n filter(Boolean),\n distinctUntilChanged()\n );\n const deviceId$ = this.activatedRoute.parent.params.pipe(\n map(params => params.id),\n filter(Boolean),\n distinctUntilChanged()\n );\n\n this.connectionSubscription = combineLatest([\n container$,\n deviceId$,\n configurationId$,\n defer(() => this.getNoVNCClient())\n ]).subscribe(([container, deviceId, configurationId, noVNC]) => {\n this.disconnectFromOldSession();\n this.connect(container, deviceId, configurationId, noVNC);\n });\n }\n\n ngOnDestroy(): void {\n this.connectionSubscription?.unsubscribe();\n this.disconnectFromOldSession();\n }\n\n ngAfterViewInit(): void {\n this.container$.next(document.getElementById('vnc-screen'));\n }\n\n disconnectFromOldSession() {\n this.powerCapability = false;\n this.title = '';\n if (!this.noVNCClient) {\n return;\n }\n\n this.noVNCClient.disconnect();\n delete this.noVNCClient;\n }\n\n connect(container: HTMLElement, deviceId: string, configId: string, noVNC: typeof NoVncClient) {\n this.container = container;\n this.changeStatus('connecting');\n const options: NoVncOptions = {\n wsProtocols: ['binary']\n };\n const uri = this.remoteAccess.getWebSocketUri(deviceId, configId);\n this.noVNCClient = new noVNC(container, uri, options);\n this.noVNCClient.resizeSession = true;\n this.noVNCClient.scaleViewport = true;\n this.noVNCClient.showDotCursor = true;\n this.noVNCClient.viewOnly = false;\n this.noVNCClient.qualityLevel = 6;\n // need to set compressionLevel to something different than the default 2 as 2 seems to be causing issues..\n this.noVNCClient.compressionLevel = 9;\n this.noVNCClient.addEventListener('connect', _e => {\n this.changeStatus('connected');\n this.noVNCClient.focus();\n });\n this.noVNCClient.addEventListener('credentialsrequired', e => {\n this.requestCredentials(e.detail.types);\n });\n this.noVNCClient.addEventListener('desktopname', e => {\n this.title = e.detail.name;\n });\n this.noVNCClient.addEventListener('disconnect', () => {\n this.changeStatus('disconnected');\n });\n this.noVNCClient.addEventListener('capabilities', e => {\n this.powerCapability = e.detail.capabilities.power;\n });\n }\n\n downloadScreenshot() {\n this.noVNCClient.toBlob(\n blob => {\n const date = new Date().toISOString();\n saveAs(blob, `screenshot-${this.title}-${date}.png`);\n },\n 'image/png',\n 1\n );\n }\n\n changeStatus(status: 'connecting' | 'connected' | 'disconnected') {\n this.status = status;\n }\n\n toggleFullscreen() {\n if (document.fullscreenElement) {\n document.exitFullscreen();\n } else {\n this.container.requestFullscreen();\n }\n }\n\n sendCtrlAltDel() {\n this.noVNCClient.sendCtrlAltDel();\n }\n\n sendShutDown() {\n this.noVNCClient.machineShutdown();\n }\n\n sendReset() {\n this.noVNCClient.machineReset();\n }\n\n sendReboot() {\n this.noVNCClient.machineReboot();\n }\n\n async getNoVNCClient(): Promise<typeof NoVncClient> {\n const lib = await import('@novnc/novnc/lib/rfb');\n if (typeof lib.default === 'function') {\n return lib.default;\n }\n const libDefault = lib.default as unknown as { default: typeof NoVncClient };\n if (typeof libDefault.default === 'function') {\n return libDefault.default;\n }\n\n throw new Error('NoVNC library not found');\n }\n\n protected async requestCredentials(types: Array<keyof NoVncCredentials>) {\n const modalRef = this.modalService.show(VncCredentialsPromptComponent, {\n ignoreBackdropClick: true,\n keyboard: false,\n initialState: { types: types }\n });\n\n try {\n const { username, password } = await modalRef.content.result;\n this.noVNCClient.sendCredentials({ username, password, target: undefined });\n } catch (e) {\n this.noVNCClient.disconnect();\n }\n }\n}\n","<c8y-title>{{ titlePrefix | translate }}: {{ title | translate }}</c8y-title>\n\n<ng-container *ngIf=\"status === 'connected'\">\n <c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n (click)=\"toggleFullscreen()\"\n >\n <i [c8yIcon]=\"'expand'\"></i>\n <span translate>Fullscreen</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n (click)=\"downloadScreenshot()\"\n >\n <i [c8yIcon]=\"'download'\"></i>\n <span translate>Screenshot</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item [placement]=\"'more'\">\n <button\n class=\"btn btn-link\"\n (click)=\"sendCtrlAltDel()\"\n >\n <i [c8yIcon]=\"'keyboard'\"></i>\n <span translate>Send Ctrl+Alt+Del</span>\n </button>\n </c8y-action-bar-item>\n</ng-container>\n\n<ng-container *ngIf=\"powerCapability && status === 'connected'\">\n <c8y-action-bar-item [placement]=\"'more'\">\n <button\n class=\"btn btn-link\"\n (click)=\"sendShutDown()\"\n >\n <i [c8yIcon]=\"'shutdown'\"></i>\n <span translate>Shutdown</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item [placement]=\"'more'\">\n <button\n class=\"btn btn-link\"\n (click)=\"sendReboot()\"\n >\n <i [c8yIcon]=\"'reset'\"></i>\n <span translate>Reboot</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item [placement]=\"'more'\">\n <button\n class=\"btn btn-link\"\n (click)=\"sendReset()\"\n >\n <i [c8yIcon]=\"'reset'\"></i>\n <span translate>Reset</span>\n </button>\n </c8y-action-bar-item>\n</ng-container>\n\n<c8y-loading *ngIf=\"status === 'connecting'\"></c8y-loading>\n\n<div\n class=\"content-fullpage\"\n [ngClass]=\"{ hidden: status !== 'connected' }\"\n>\n <div\n class=\"inner-scroll\"\n id=\"vnc-screen\"\n ></div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["gettext","i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;;MAca,6BAA6B,CAAA;IAexC,WACU,CAAA,WAAwB,EACxB,QAAoB,EAAA;QADpB,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;QACxB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAY;AAhB9B,QAAA,IAAA,CAAA,KAAK,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;QAC1B,IAAK,CAAA,KAAA,GAAkC,EAAE,CAAC;QACnD,IAAM,CAAA,MAAA,GAAG,IAAI,OAAO,CAA4C,CAAC,OAAO,EAAE,MAAM,KAAI;AAClF,YAAA,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;AACxB,YAAA,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;AACxB,SAAC,CAAC,CAAC;QAEH,IAAY,CAAA,YAAA,GAAG,KAAK,CAAC;AAWnB,Q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A,CAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,UAAA,EAAA,SAAA,EAAA,iBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,qBAAqB,wEACrB,aAAa,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACb,IAAI,EACJ,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,OAAO,oFACP,gBAAgB,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGP,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAf9B,SAAS;+BACE,gBAAgB,EAAA,UAAA,EAEd,IAAI,EACP,OAAA,EAAA;wBACP,gBAAgB;wBAChB,cAAc;wBACd,sBAAsB;wBACtB,qBAAqB;wBACrB,aAAa;wBACb,IAAI;wBACJ,OAAO;wBACP,gBAAgB;AACjB,qBAAA,EAAA,QAAA,EAAA,i9DAAA,EAAA,CAAA;;;AEjCH;;AAEG;;;;"}
@@ -0,0 +1,79 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable } from '@angular/core';
3
+ import { gettext, hookRoute, ViewContext, hookService } from '@c8y/ngx-components';
4
+ import * as i1 from '@c8y/ngx-components/remote-access/data';
5
+ import { canActivateRemoteAccess } from '@c8y/ngx-components/remote-access/data';
6
+ import * as i2 from 'ngx-bootstrap/modal';
7
+
8
+ class VNCRemoteAccessProtocolProviderService {
9
+ constructor(remoteAccess, bsModalService) {
10
+ this.remoteAccess = remoteAccess;
11
+ this.bsModalService = bsModalService;
12
+ this.protocolName = 'VNC';
13
+ this.protocolLabel = gettext('VNC');
14
+ this.protocolDescription = gettext('Allows to connect to a VNC service.');
15
+ this.protocolIcon = 'laptop';
16
+ }
17
+ async addEndpoint(deviceId) {
18
+ const modalResult = await this.openVNCEndpointModal({});
19
+ if (!modalResult) {
20
+ return modalResult;
21
+ }
22
+ return this.remoteAccess.addConfiguration(deviceId, modalResult);
23
+ }
24
+ removeEndpoint(deviceId, currentEndpointConfig) {
25
+ return this.remoteAccess.deleteConfiguration(deviceId, currentEndpointConfig.id);
26
+ }
27
+ async editEndpoint(deviceId, currentEndpointConfig) {
28
+ const modalResult = await this.openVNCEndpointModal(currentEndpointConfig);
29
+ if (!modalResult) {
30
+ return modalResult;
31
+ }
32
+ return this.remoteAccess.updateConfiguration(deviceId, modalResult);
33
+ }
34
+ async connectEndpointHref(deviceId, configuration) {
35
+ return `/device/${deviceId}/vnc/${configuration.id}`;
36
+ }
37
+ async getDefaultEndpointConfiguration() {
38
+ return {
39
+ hostname: '127.0.0.1',
40
+ port: 5900
41
+ };
42
+ }
43
+ async openVNCEndpointModal(currentConfiguration) {
44
+ const { RemoteAccessVncEndpointModalComponent } = await import('@c8y/ngx-components/remote-access/vnc/remote-access-vnc-endpoint-modal');
45
+ try {
46
+ const modalRef = this.bsModalService.show(RemoteAccessVncEndpointModalComponent, {
47
+ initialState: { currentValue: currentConfiguration }
48
+ });
49
+ return (await modalRef.content.result);
50
+ }
51
+ catch (e) {
52
+ // modal closed
53
+ return null;
54
+ }
55
+ }
56
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: VNCRemoteAccessProtocolProviderService, deps: [{ token: i1.RemoteAccessService }, { token: i2.BsModalService }], target: i0.ɵɵFactoryTarget.Injectable }); }
57
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: VNCRemoteAccessProtocolProviderService, providedIn: 'root' }); }
58
+ }
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: VNCRemoteAccessProtocolProviderService, decorators: [{
60
+ type: Injectable,
61
+ args: [{ providedIn: 'root' }]
62
+ }], ctorParameters: () => [{ type: i1.RemoteAccessService }, { type: i2.BsModalService }] });
63
+ const remoteAccessVNCProviders = [
64
+ hookRoute({
65
+ loadComponent: () => import('@c8y/ngx-components/remote-access/vnc/vnc-viewer').then(m => m.VncViewerComponent),
66
+ path: 'vnc/:configurationId',
67
+ context: ViewContext.Device,
68
+ tabs: [],
69
+ canActivate: [canActivateRemoteAccess]
70
+ }),
71
+ hookService('remoteAccessProtocolHook', VNCRemoteAccessProtocolProviderService)
72
+ ];
73
+
74
+ /**
75
+ * Generated bundle index. Do not edit.
76
+ */
77
+
78
+ export { VNCRemoteAccessProtocolProviderService, remoteAccessVNCProviders };
79
+ //# sourceMappingURL=c8y-ngx-components-remote-access-vnc.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"c8y-ngx-components-remote-access-vnc.mjs","sources":["../../remote-access/vnc/index.ts","../../remote-access/vnc/c8y-ngx-components-remote-access-vnc.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { gettext, hookRoute, hookService, ViewContext } from '@c8y/ngx-components';\nimport {\n canActivateRemoteAccess,\n RemoteAccessConfiguration,\n RemoteAccessProtocolProvider,\n RemoteAccessService\n} from '@c8y/ngx-components/remote-access/data';\nimport { BsModalService } from 'ngx-bootstrap/modal';\n\n@Injectable({ providedIn: 'root' })\nexport class VNCRemoteAccessProtocolProviderService implements RemoteAccessProtocolProvider {\n protocolName = 'VNC';\n protocolLabel = gettext('VNC');\n protocolDescription = gettext('Allows to connect to a VNC service.');\n protocolIcon = 'laptop' as const;\n\n constructor(\n protected remoteAccess: RemoteAccessService,\n protected bsModalService: BsModalService\n ) {}\n\n async addEndpoint(deviceId: string): Promise<RemoteAccessConfiguration> {\n const modalResult = await this.openVNCEndpointModal({});\n if (!modalResult) {\n return modalResult;\n }\n\n return this.remoteAccess.addConfiguration(deviceId, modalResult);\n }\n\n removeEndpoint(\n deviceId: string,\n currentEndpointConfig: RemoteAccessConfiguration\n ): Promise<void> {\n return this.remoteAccess.deleteConfiguration(deviceId, currentEndpointConfig.id);\n }\n\n async editEndpoint(\n deviceId: string,\n currentEndpointConfig: RemoteAccessConfiguration\n ): Promise<RemoteAccessConfiguration> {\n const modalResult = await this.openVNCEndpointModal(currentEndpointConfig);\n if (!modalResult) {\n return modalResult;\n }\n\n return this.remoteAccess.updateConfiguration(deviceId, modalResult);\n }\n\n async connectEndpointHref(\n deviceId: string,\n configuration: RemoteAccessConfiguration\n ): Promise<string> {\n return `/device/${deviceId}/vnc/${configuration.id}`;\n }\n\n async getDefaultEndpointConfiguration(): Promise<Partial<RemoteAccessConfiguration>> {\n return {\n hostname: '127.0.0.1',\n port: 5900\n };\n }\n\n protected async openVNCEndpointModal(\n currentConfiguration: Partial<RemoteAccessConfiguration>\n ): Promise<RemoteAccessConfiguration | null> {\n const { RemoteAccessVncEndpointModalComponent } = await import(\n '@c8y/ngx-components/remote-access/vnc/remote-access-vnc-endpoint-modal'\n );\n try {\n const modalRef = this.bsModalService.show(RemoteAccessVncEndpointModalComponent, {\n initialState: { currentValue: currentConfiguration }\n });\n return (await modalRef.content.result) as RemoteAccessConfiguration;\n } catch (e) {\n // modal closed\n return null;\n }\n }\n}\n\nexport const remoteAccessVNCProviders = [\n hookRoute({\n loadComponent: () =>\n import('@c8y/ngx-components/remote-access/vnc/vnc-viewer').then(m => m.VncViewerComponent),\n path: 'vnc/:configurationId',\n context: ViewContext.Device,\n tabs: [],\n canActivate: [canActivateRemoteAccess]\n }),\n hookService('remoteAccessProtocolHook', VNCRemoteAccessProtocolProviderService)\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAWa,sCAAsC,CAAA;IAMjD,WACY,CAAA,YAAiC,EACjC,cAA8B,EAAA;QAD9B,IAAY,CAAA,YAAA,GAAZ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