@c8y/ngx-components 1021.38.1 → 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 (524) 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/translation-editor/data/translation-store.service.mjs +4 -3
  333. package/esm2022/trusted-certificates/list/trusted-certificate-list.component.mjs +35 -9
  334. package/esm2022/upgrade/bridge.service.mjs +16 -2
  335. package/esm2022/widgets/implementations/alarms/severity-icon.pipe.mjs +1 -1
  336. package/esm2022/widgets/implementations/datapoints-table/datapoints-table-config/datapoints-table-config.component.mjs +3 -2
  337. package/esm2022/widgets/implementations/kpi/kpi-widget.model.mjs +1 -1
  338. package/fesm2022/c8y-ngx-components-alarms.mjs +1 -1
  339. package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
  340. package/fesm2022/c8y-ngx-components-api.mjs +3 -2
  341. package/fesm2022/c8y-ngx-components-api.mjs.map +1 -1
  342. package/fesm2022/c8y-ngx-components-auth-configuration.mjs +12 -7
  343. package/fesm2022/c8y-ngx-components-auth-configuration.mjs.map +1 -1
  344. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +15 -20
  345. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  346. package/fesm2022/c8y-ngx-components-data-grid-columns-asset-type.mjs.map +1 -1
  347. package/fesm2022/c8y-ngx-components-data-grid-columns.mjs.map +1 -1
  348. package/fesm2022/c8y-ngx-components-datapoint-selector.mjs +48 -23
  349. package/fesm2022/c8y-ngx-components-datapoint-selector.mjs.map +1 -1
  350. package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs.map +1 -1
  351. package/fesm2022/c8y-ngx-components-device-grid.mjs +48 -28
  352. package/fesm2022/c8y-ngx-components-device-grid.mjs.map +1 -1
  353. package/fesm2022/c8y-ngx-components-device-provisioned-certificates.mjs +174 -0
  354. package/fesm2022/c8y-ngx-components-device-provisioned-certificates.mjs.map +1 -0
  355. package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs +125 -105
  356. package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
  357. package/fesm2022/c8y-ngx-components-ecosystem-archived-confirm.mjs +57 -0
  358. package/fesm2022/c8y-ngx-components-ecosystem-archived-confirm.mjs.map +1 -0
  359. package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs +147 -31
  360. package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs.map +1 -1
  361. package/fesm2022/c8y-ngx-components-ecosystem.mjs +1452 -1414
  362. package/fesm2022/c8y-ngx-components-ecosystem.mjs.map +1 -1
  363. package/fesm2022/c8y-ngx-components-files-repository.mjs +5 -16
  364. package/fesm2022/c8y-ngx-components-files-repository.mjs.map +1 -1
  365. package/fesm2022/c8y-ngx-components-icon-selector-icons.mjs.map +1 -1
  366. package/fesm2022/c8y-ngx-components-icon-selector.mjs.map +1 -1
  367. package/fesm2022/c8y-ngx-components-protocol-lwm2m-components-configuration.mjs +1 -1
  368. package/fesm2022/c8y-ngx-components-protocol-lwm2m-components-configuration.mjs.map +1 -1
  369. package/fesm2022/c8y-ngx-components-protocol-opcua.mjs +1 -1
  370. package/fesm2022/c8y-ngx-components-protocol-opcua.mjs.map +1 -1
  371. package/fesm2022/c8y-ngx-components-register-device.mjs +269 -188
  372. package/fesm2022/c8y-ngx-components-register-device.mjs.map +1 -1
  373. package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs +314 -0
  374. package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs.map +1 -0
  375. package/fesm2022/c8y-ngx-components-remote-access-data.mjs +206 -0
  376. package/fesm2022/c8y-ngx-components-remote-access-data.mjs.map +1 -0
  377. package/fesm2022/c8y-ngx-components-remote-access-passthrough.mjs +42 -0
  378. package/fesm2022/c8y-ngx-components-remote-access-passthrough.mjs.map +1 -0
  379. package/fesm2022/c8y-ngx-components-remote-access-shared.mjs +138 -0
  380. package/fesm2022/c8y-ngx-components-remote-access-shared.mjs.map +1 -0
  381. package/fesm2022/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs +111 -0
  382. package/fesm2022/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs.map +1 -0
  383. package/fesm2022/c8y-ngx-components-remote-access-ssh.mjs +79 -0
  384. package/fesm2022/c8y-ngx-components-remote-access-ssh.mjs.map +1 -0
  385. package/fesm2022/c8y-ngx-components-remote-access-telnet.mjs +50 -0
  386. package/fesm2022/c8y-ngx-components-remote-access-telnet.mjs.map +1 -0
  387. package/fesm2022/c8y-ngx-components-remote-access-terminal-viewer.mjs +235 -0
  388. package/fesm2022/c8y-ngx-components-remote-access-terminal-viewer.mjs.map +1 -0
  389. package/fesm2022/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs +66 -0
  390. package/fesm2022/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs.map +1 -0
  391. package/fesm2022/c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs +211 -0
  392. package/fesm2022/c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs.map +1 -0
  393. package/fesm2022/c8y-ngx-components-remote-access-vnc.mjs +79 -0
  394. package/fesm2022/c8y-ngx-components-remote-access-vnc.mjs.map +1 -0
  395. package/fesm2022/c8y-ngx-components-replace-device-replace-device-wizard.mjs.map +1 -1
  396. package/fesm2022/c8y-ngx-components-report-dashboard.mjs +3 -2
  397. package/fesm2022/c8y-ngx-components-report-dashboard.mjs.map +1 -1
  398. package/fesm2022/c8y-ngx-components-repository-configuration.mjs +1 -1
  399. package/fesm2022/c8y-ngx-components-repository-configuration.mjs.map +1 -1
  400. package/fesm2022/c8y-ngx-components-repository-shared.mjs +2 -2
  401. package/fesm2022/c8y-ngx-components-repository-shared.mjs.map +1 -1
  402. package/fesm2022/c8y-ngx-components-services.mjs.map +1 -1
  403. package/fesm2022/c8y-ngx-components-sub-assets.mjs.map +1 -1
  404. package/fesm2022/c8y-ngx-components-translation-editor-data.mjs +3 -2
  405. package/fesm2022/c8y-ngx-components-translation-editor-data.mjs.map +1 -1
  406. package/fesm2022/c8y-ngx-components-trusted-certificates.mjs +43 -17
  407. package/fesm2022/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
  408. package/fesm2022/c8y-ngx-components-upgrade.mjs +16 -2
  409. package/fesm2022/c8y-ngx-components-upgrade.mjs.map +1 -1
  410. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
  411. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +2 -1
  412. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs.map +1 -1
  413. package/fesm2022/c8y-ngx-components.mjs +151 -38
  414. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  415. package/files-repository/files-repository.component.d.ts.map +1 -1
  416. package/files-repository/files-repository.service.d.ts +0 -2
  417. package/files-repository/files-repository.service.d.ts.map +1 -1
  418. package/icon-selector/icon-selector.component.d.ts +3 -2
  419. package/icon-selector/icon-selector.component.d.ts.map +1 -1
  420. package/icon-selector/icons/index.d.ts +1 -0
  421. package/icon-selector/icons/index.d.ts.map +1 -1
  422. package/locales/de.po +157 -5
  423. package/locales/es.po +157 -5
  424. package/locales/fr.po +157 -5
  425. package/locales/ja_JP.po +156 -5
  426. package/locales/ko.po +156 -5
  427. package/locales/locales.pot +156 -4
  428. package/locales/nl.po +157 -5
  429. package/locales/pl.po +157 -5
  430. package/locales/pt_BR.po +157 -5
  431. package/locales/zh_CN.po +156 -5
  432. package/locales/zh_TW.po +156 -5
  433. package/operations/shared/status-option.model.d.ts +2 -1
  434. package/operations/shared/status-option.model.d.ts.map +1 -1
  435. package/package.json +1 -1
  436. package/register-device/bulk/bulk-device-registration-modal.component.d.ts +6 -2
  437. package/register-device/bulk/bulk-device-registration-modal.component.d.ts.map +1 -1
  438. package/register-device/general/general-device-registration-button.component.d.ts +1 -1
  439. package/register-device/general/general-device-registration-button.component.d.ts.map +1 -1
  440. package/register-device/general/general-device-registration.component.d.ts +21 -7
  441. package/register-device/general/general-device-registration.component.d.ts.map +1 -1
  442. package/remote-access/configurations/c8y-ngx-components-remote-access-configurations.d.ts.map +1 -0
  443. package/remote-access/configurations/index.d.ts +3 -0
  444. package/remote-access/configurations/index.d.ts.map +1 -0
  445. package/remote-access/configurations/remote-access-configuration-list/remote-access-configuration-list.component.d.ts +34 -0
  446. package/remote-access/configurations/remote-access-configuration-list/remote-access-configuration-list.component.d.ts.map +1 -0
  447. package/remote-access/configurations/remote-access-configuration-list/remote-access-connect-button/remote-access-connect-button.component.d.ts +17 -0
  448. package/remote-access/configurations/remote-access-configuration-list/remote-access-connect-button/remote-access-connect-button.component.d.ts.map +1 -0
  449. package/remote-access/configurations/remote-access-pick-protocol-modal/remote-access-pick-protocol-modal.component.d.ts +18 -0
  450. package/remote-access/configurations/remote-access-pick-protocol-modal/remote-access-pick-protocol-modal.component.d.ts.map +1 -0
  451. package/remote-access/data/c8y-ngx-components-remote-access-data.d.ts.map +1 -0
  452. package/remote-access/data/index.d.ts +3 -0
  453. package/remote-access/data/index.d.ts.map +1 -0
  454. package/remote-access/data/remote-access-protocol-provider.d.ts +21 -0
  455. package/remote-access/data/remote-access-protocol-provider.d.ts.map +1 -0
  456. package/remote-access/data/remote-access.service.d.ts +94 -0
  457. package/remote-access/data/remote-access.service.d.ts.map +1 -0
  458. package/remote-access/passthrough/c8y-ngx-components-remote-access-passthrough.d.ts.map +1 -0
  459. package/remote-access/passthrough/index.d.ts +17 -0
  460. package/remote-access/passthrough/index.d.ts.map +1 -0
  461. package/remote-access/shared/c8y-ngx-components-remote-access-shared.d.ts.map +1 -0
  462. package/remote-access/shared/index.d.ts +3 -0
  463. package/remote-access/shared/index.d.ts.map +1 -0
  464. package/remote-access/shared/remote-access-basic-endpoint-modal/remote-access-basic-endpoint-modal.component.d.ts +37 -0
  465. package/remote-access/shared/remote-access-basic-endpoint-modal/remote-access-basic-endpoint-modal.component.d.ts.map +1 -0
  466. package/remote-access/shared/ssh-key-input/ssh-key-input.component.d.ts +38 -0
  467. package/remote-access/shared/ssh-key-input/ssh-key-input.component.d.ts.map +1 -0
  468. package/remote-access/ssh/c8y-ngx-components-remote-access-ssh.d.ts.map +1 -0
  469. package/remote-access/ssh/index.d.ts +22 -0
  470. package/remote-access/ssh/index.d.ts.map +1 -0
  471. 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
  472. package/remote-access/ssh/remote-access-ssh-endpoint-modal/index.d.ts +2 -0
  473. package/remote-access/ssh/remote-access-ssh-endpoint-modal/index.d.ts.map +1 -0
  474. package/remote-access/ssh/remote-access-ssh-endpoint-modal/remote-access-ssh-endpoint-modal.component.d.ts +64 -0
  475. package/remote-access/ssh/remote-access-ssh-endpoint-modal/remote-access-ssh-endpoint-modal.component.d.ts.map +1 -0
  476. package/remote-access/telnet/c8y-ngx-components-remote-access-telnet.d.ts.map +1 -0
  477. package/remote-access/telnet/index.d.ts +17 -0
  478. package/remote-access/telnet/index.d.ts.map +1 -0
  479. package/remote-access/terminal-viewer/c8y-ngx-components-remote-access-terminal-viewer.d.ts.map +1 -0
  480. package/remote-access/terminal-viewer/index.d.ts +2 -0
  481. package/remote-access/terminal-viewer/index.d.ts.map +1 -0
  482. package/remote-access/terminal-viewer/shell-adapter.d.ts +14 -0
  483. package/remote-access/terminal-viewer/shell-adapter.d.ts.map +1 -0
  484. package/remote-access/terminal-viewer/telnet-negotiator.d.ts +13 -0
  485. package/remote-access/terminal-viewer/telnet-negotiator.d.ts.map +1 -0
  486. package/remote-access/terminal-viewer/terminal-viewer.component.d.ts +25 -0
  487. package/remote-access/terminal-viewer/terminal-viewer.component.d.ts.map +1 -0
  488. package/remote-access/vnc/c8y-ngx-components-remote-access-vnc.d.ts.map +1 -0
  489. package/remote-access/vnc/index.d.ts +22 -0
  490. package/remote-access/vnc/index.d.ts.map +1 -0
  491. 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
  492. package/remote-access/vnc/remote-access-vnc-endpoint-modal/index.d.ts +2 -0
  493. package/remote-access/vnc/remote-access-vnc-endpoint-modal/index.d.ts.map +1 -0
  494. package/remote-access/vnc/remote-access-vnc-endpoint-modal/remote-access-vnc-endpoint-modal.component.d.ts +46 -0
  495. package/remote-access/vnc/remote-access-vnc-endpoint-modal/remote-access-vnc-endpoint-modal.component.d.ts.map +1 -0
  496. package/remote-access/vnc/vnc-viewer/c8y-ngx-components-remote-access-vnc-vnc-viewer.d.ts.map +1 -0
  497. package/remote-access/vnc/vnc-viewer/index.d.ts +2 -0
  498. package/remote-access/vnc/vnc-viewer/index.d.ts.map +1 -0
  499. package/remote-access/vnc/vnc-viewer/vnc-credentials-prompt/vnc-credentials-prompt.component.d.ts +32 -0
  500. package/remote-access/vnc/vnc-viewer/vnc-credentials-prompt/vnc-credentials-prompt.component.d.ts.map +1 -0
  501. package/remote-access/vnc/vnc-viewer/vnc-viewer.component.d.ts +37 -0
  502. package/remote-access/vnc/vnc-viewer/vnc-viewer.component.d.ts.map +1 -0
  503. package/replace-device/replace-device-wizard/replace-device-wizard.model.d.ts +2 -1
  504. package/replace-device/replace-device-wizard/replace-device-wizard.model.d.ts.map +1 -1
  505. package/report-dashboard/report-dashboard-list.component.d.ts +29 -0
  506. package/report-dashboard/report-dashboard-list.component.d.ts.map +1 -1
  507. package/repository/shared/repository.model.d.ts +2 -1
  508. package/repository/shared/repository.model.d.ts.map +1 -1
  509. package/services/status-options/status-options.model.d.ts +2 -1
  510. package/services/status-options/status-options.model.d.ts.map +1 -1
  511. package/sub-assets/group-info.component.d.ts +2 -1
  512. package/sub-assets/group-info.component.d.ts.map +1 -1
  513. package/translation-editor/data/translation-store.service.d.ts.map +1 -1
  514. package/trusted-certificates/list/trusted-certificate-list.component.d.ts +7 -2
  515. package/trusted-certificates/list/trusted-certificate-list.component.d.ts.map +1 -1
  516. package/upgrade/bridge.service.d.ts +5 -0
  517. package/upgrade/bridge.service.d.ts.map +1 -1
  518. package/widgets/implementations/alarms/severity-icon.pipe.d.ts.map +1 -1
  519. package/widgets/implementations/datapoints-table/datapoints-table-config/datapoints-table-config.component.d.ts.map +1 -1
  520. package/widgets/implementations/kpi/kpi-widget.model.d.ts +2 -1
  521. package/widgets/implementations/kpi/kpi-widget.model.d.ts.map +1 -1
  522. package/ecosystem/application-plugins/only-latest-plugin-version.pipe.d.ts +0 -10
  523. package/ecosystem/application-plugins/only-latest-plugin-version.pipe.d.ts.map +0 -1
  524. package/esm2022/ecosystem/application-plugins/only-latest-plugin-version.pipe.mjs +0 -20
@@ -0,0 +1 @@
1
+ {"version":3,"file":"c8y-ngx-components-remote-access-telnet.mjs","sources":["../../remote-access/telnet/index.ts","../../remote-access/telnet/c8y-ngx-components-remote-access-telnet.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';\n\n@Injectable({ providedIn: 'root' })\nexport class TelnetRemoteAccessProtocolProviderService implements RemoteAccessProtocolProvider {\n protocolName = 'TELNET';\n protocolLabel = gettext('Telnet');\n protocolDescription = gettext('Allows to connect to a Telnet service.');\n protocolIcon = 'laptop' as const;\n\n constructor(private remoteAccess: RemoteAccessService) {}\n\n async getDefaultEndpointConfiguration(): Promise<Partial<RemoteAccessConfiguration>> {\n return {\n hostname: '127.0.0.1',\n port: 23\n };\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 connectEndpointHref(\n deviceId: string,\n configuration: RemoteAccessConfiguration\n ): Promise<string> {\n return `/device/${deviceId}/telnet/${configuration.id}`;\n }\n}\n\nexport const remoteAccessTelnetProviders = [\n hookRoute({\n loadComponent: () =>\n import('@c8y/ngx-components/remote-access/terminal-viewer').then(\n m => m.TerminalViewerComponent\n ),\n path: 'telnet/:configurationId',\n context: ViewContext.Device,\n tabs: [],\n canActivate: [canActivateRemoteAccess]\n }),\n hookService('remoteAccessProtocolHook', TelnetRemoteAccessProtocolProviderService)\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAUa,yCAAyC,CAAA;AAMpD,IAAA,WAAA,CAAoB,YAAiC,EAAA;QAAjC,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAqB;QALrD,IAAY,CAAA,YAAA,GAAG,QAAQ,CAAC;AACxB,QAAA,IAAA,CAAA,aAAa,GAAG,OAAO,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AO,EAAE,WAAW,CAAC,MAAM;AAC3B,QAAA,IAAI,EAAE,EAAE;QACR,WAAW,EAAE,CAAC,uBAAuB,CAAC;KACvC,CAAC;AACF,IAAA,WAAW,CAAC,0BAA0B,EAAE,yCAAyC,CAAC;;;ACnDpF;;AAEG;;;;"}
@@ -0,0 +1,235 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, ViewEncapsulation } from '@angular/core';
3
+ import { TitleComponent, C8yTranslatePipe, ActionBarItemComponent, IconDirective } from '@c8y/ngx-components';
4
+ import { Terminal } from '@xterm/xterm';
5
+ import { FitAddon } from '@xterm/addon-fit';
6
+ import * as i1 from '@c8y/ngx-components/remote-access/data';
7
+ import * as i2 from '@angular/router';
8
+ import '@xterm/xterm/css/xterm.css';
9
+ import { NgIf } from '@angular/common';
10
+
11
+ class TelnetNegotiator {
12
+ constructor(terminal, termType) {
13
+ this.terminal = terminal;
14
+ this.termType = termType;
15
+ }
16
+ setTermType(type) {
17
+ this.termType = type;
18
+ }
19
+ pushStr(str, arr) {
20
+ for (let i = 0; i < str.length; i++) {
21
+ arr.push(str.charCodeAt(i));
22
+ }
23
+ }
24
+ negotiate(data) {
25
+ const arrUint8 = new Uint8Array(data);
26
+ const arr = [...arrUint8.values()];
27
+ const sendQueue = [];
28
+ let stringToDisplay = '';
29
+ let chr;
30
+ let code;
31
+ let value;
32
+ while (arr.length > 0) {
33
+ chr = arr.shift();
34
+ switch (chr) {
35
+ case 255: // IAC
36
+ code = arr.shift();
37
+ value = arr.shift();
38
+ switch (code) {
39
+ case 253: // DO
40
+ if (value === 24) {
41
+ // Terminal type
42
+ sendQueue.push(255, 251, value);
43
+ }
44
+ else if (value === 31) {
45
+ // NAWS (Negotiate About Window Size)
46
+ // client answers WILL NAWS
47
+ sendQueue.push(255, 251, 31);
48
+ // client sends IAC SB NAWS 0 terminalSize.cols 0 terminalSize.rows IAC SE
49
+ sendQueue.push(255, 250, 31, 0, this.terminal.cols, 0, this.terminal.rows, 255, 240);
50
+ }
51
+ else {
52
+ // Refuse other DO requests with a WONT
53
+ sendQueue.push(255, 252, value);
54
+ }
55
+ break;
56
+ case 251: // WILL
57
+ if (value === 1) {
58
+ // Affirm echo with DO
59
+ sendQueue.push(255, 253, value);
60
+ }
61
+ else {
62
+ // Reject other WILL offers with a DONT
63
+ sendQueue.push(255, 254, value);
64
+ }
65
+ break;
66
+ case 250: // SB (subnegotiation)
67
+ if (value === 24) {
68
+ // TERM-TYPE subnegotiation
69
+ if (arr[0] === 1 && arr[1] === 255 && arr[2] === 240) {
70
+ arr.shift();
71
+ arr.shift();
72
+ arr.shift();
73
+ sendQueue.push(255, 250, 24, 0);
74
+ this.pushStr(this.termType, sendQueue);
75
+ sendQueue.push(255, 240);
76
+ }
77
+ else {
78
+ console.warn('Invalid subnegotiation received' + arr);
79
+ }
80
+ }
81
+ else {
82
+ console.warn('Ignoring SB ' + value);
83
+ }
84
+ break;
85
+ case 254: // DONT
86
+ case 252: // WONT
87
+ default:
88
+ break;
89
+ }
90
+ break;
91
+ case 242: // Data Mark (Synch)
92
+ code = arr.shift();
93
+ value = arr.shift();
94
+ break;
95
+ default: // everything else
96
+ stringToDisplay += String.fromCharCode(chr);
97
+ break;
98
+ }
99
+ }
100
+ return {
101
+ dataToSend: sendQueue.length ? new Uint8Array(sendQueue) : '',
102
+ isOutput: !!stringToDisplay.length
103
+ };
104
+ }
105
+ }
106
+
107
+ class ShellAdapter {
108
+ constructor(terminal, termType = 'xterm-256color') {
109
+ this.terminal = terminal;
110
+ this.termType = termType;
111
+ }
112
+ filterNonPrintable(str) {
113
+ // get rid of �
114
+ const helpArr = str.split('�');
115
+ str = helpArr.join('');
116
+ return str;
117
+ }
118
+ setTermType(type) {
119
+ this.termType = type;
120
+ }
121
+ filterReceiveData(data) {
122
+ // negotiate telnet signals, if any
123
+ const telnet = new TelnetNegotiator(this.terminal, this.termType);
124
+ const telnetData = telnet.negotiate(data);
125
+ // decode text for display
126
+ const textDecoder = new TextDecoder();
127
+ const decodedToDisplay = textDecoder.decode(data);
128
+ return {
129
+ dataToSend: telnetData.dataToSend,
130
+ dataToDisplay: telnetData.isOutput ? this.filterNonPrintable(decodedToDisplay) : ''
131
+ };
132
+ }
133
+ filterSendData(data) {
134
+ const sendQueue = [];
135
+ for (let i = 0; i < data.length; i++) {
136
+ sendQueue.push(data.charCodeAt(i));
137
+ }
138
+ return sendQueue.length ? new Uint8Array(sendQueue) : '';
139
+ }
140
+ }
141
+
142
+ class TerminalViewerComponent {
143
+ constructor(remoteAccess, activatedRoute) {
144
+ this.remoteAccess = remoteAccess;
145
+ this.activatedRoute = activatedRoute;
146
+ this.title = '';
147
+ this.container = null;
148
+ this.terminal = null;
149
+ this.socket = null;
150
+ this.firstDeviceMessageReceived = false;
151
+ this.configurationId = this.activatedRoute.snapshot.params.configurationId;
152
+ this.deviceId = this.activatedRoute.parent.snapshot.params.id;
153
+ }
154
+ ngOnDestroy() {
155
+ this.observer?.disconnect();
156
+ const stringToSend = 'exit\n';
157
+ const sendQueue = [];
158
+ for (let i = 0; i < stringToSend.length; i++) {
159
+ sendQueue.push(stringToSend.charCodeAt(i));
160
+ }
161
+ this.socket?.send(new Uint8Array(sendQueue));
162
+ this.socket?.close();
163
+ }
164
+ ngAfterViewInit() {
165
+ this.container = document.getElementById('terminal-screen');
166
+ this.terminal = new Terminal({
167
+ fontSize: 18,
168
+ fontFamily: 'consolas, monospace',
169
+ cursorBlink: true
170
+ });
171
+ const fitAddon = new FitAddon();
172
+ this.socket = new WebSocket(this.remoteAccess.getWebSocketUri(this.deviceId, this.configurationId), 'binary');
173
+ this.socket.binaryType = 'arraybuffer';
174
+ this.terminal.loadAddon(fitAddon);
175
+ this.terminal.open(this.container);
176
+ fitAddon.fit();
177
+ const shellAdapter = new ShellAdapter(this.terminal);
178
+ this.observer = new ResizeObserver(() => {
179
+ fitAddon.fit();
180
+ });
181
+ this.observer.observe(this.container);
182
+ this.terminal.writeln('\u001b[92mEstablishing Websocket connection... \u001b[39m \r\n');
183
+ this.terminal.focus();
184
+ this.socket.onopen = () => {
185
+ this.terminal.writeln('\u001b[92mWebsocket connection was established successfully, waiting for device... \u001b[39m \r\n');
186
+ };
187
+ this.socket.onclose = () => {
188
+ this.terminal.writeln('');
189
+ this.terminal.writeln('\r\n\u001b[91mDevice disconnected. \u001b[39m \r\n');
190
+ this.terminal.writeln('\r\n\u001b[91mWebsocket connection was closed. \u001b[39m \r\n');
191
+ };
192
+ this.socket.onmessage = message => {
193
+ if (!this.firstDeviceMessageReceived) {
194
+ this.firstDeviceMessageReceived = true;
195
+ this.terminal.writeln('\u001b[92mDevice connection was established successfully. \u001b[39m \r\n');
196
+ }
197
+ const filteredData = shellAdapter.filterReceiveData(message.data);
198
+ if (filteredData.dataToSend.length) {
199
+ this.socket.send(filteredData.dataToSend);
200
+ }
201
+ if (filteredData.dataToDisplay.length) {
202
+ this.terminal.write(filteredData.dataToDisplay);
203
+ }
204
+ };
205
+ this.terminal.onData(data => {
206
+ if (this.firstDeviceMessageReceived) {
207
+ const encodedToSend = shellAdapter.filterSendData(data);
208
+ if (encodedToSend.length) {
209
+ this.socket.send(encodedToSend);
210
+ }
211
+ }
212
+ });
213
+ }
214
+ toggleFullscreen() {
215
+ if (document.fullscreenElement) {
216
+ document.exitFullscreen();
217
+ }
218
+ else {
219
+ this.container.requestFullscreen();
220
+ }
221
+ }
222
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: TerminalViewerComponent, deps: [{ token: i1.RemoteAccessService }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
223
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: TerminalViewerComponent, isStandalone: true, selector: "c8y-terminal-viewer", ngImport: i0, template: "<c8y-title>Terminal Viewer: {{ title | translate }}</c8y-title>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"firstDeviceMessageReceived\">\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<div class=\"content-fullpage\" >\n <div id=\"terminal-screen\" class=\"inner-scroll\"></div>\n</div>", dependencies: [{ kind: "component", type: TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "component", type: ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None }); }
224
+ }
225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: TerminalViewerComponent, decorators: [{
226
+ type: Component,
227
+ args: [{ selector: 'c8y-terminal-viewer', encapsulation: ViewEncapsulation.None, standalone: true, imports: [TitleComponent, C8yTranslatePipe, ActionBarItemComponent, IconDirective, NgIf], template: "<c8y-title>Terminal Viewer: {{ title | translate }}</c8y-title>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"firstDeviceMessageReceived\">\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<div class=\"content-fullpage\" >\n <div id=\"terminal-screen\" class=\"inner-scroll\"></div>\n</div>" }]
228
+ }], ctorParameters: () => [{ type: i1.RemoteAccessService }, { type: i2.ActivatedRoute }] });
229
+
230
+ /**
231
+ * Generated bundle index. Do not edit.
232
+ */
233
+
234
+ export { TerminalViewerComponent };
235
+ //# sourceMappingURL=c8y-ngx-components-remote-access-terminal-viewer.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"c8y-ngx-components-remote-access-terminal-viewer.mjs","sources":["../../remote-access/terminal-viewer/telnet-negotiator.ts","../../remote-access/terminal-viewer/shell-adapter.ts","../../remote-access/terminal-viewer/terminal-viewer.component.ts","../../remote-access/terminal-viewer/terminal-viewer.component.html","../../remote-access/terminal-viewer/c8y-ngx-components-remote-access-terminal-viewer.ts"],"sourcesContent":["import type { Terminal } from '@xterm/xterm';\n\nexport class TelnetNegotiator {\n constructor(\n private terminal: Terminal,\n private termType: string\n ) {}\n\n setTermType(type) {\n this.termType = type;\n }\n\n pushStr(str, arr) {\n for (let i = 0; i < str.length; i++) {\n arr.push(str.charCodeAt(i));\n }\n }\n\n negotiate(data) {\n const arrUint8 = new Uint8Array(data);\n const arr = [...arrUint8.values()];\n\n const sendQueue = [];\n let stringToDisplay = '';\n let chr: number;\n let code: number;\n let value: number;\n\n while (arr.length > 0) {\n chr = arr.shift();\n switch (chr) {\n case 255: // IAC\n code = arr.shift();\n value = arr.shift();\n switch (code) {\n case 253: // DO\n if (value === 24) {\n // Terminal type\n sendQueue.push(255, 251, value);\n } else if (value === 31) {\n // NAWS (Negotiate About Window Size)\n // client answers WILL NAWS\n sendQueue.push(255, 251, 31);\n // client sends IAC SB NAWS 0 terminalSize.cols 0 terminalSize.rows IAC SE\n sendQueue.push(\n 255,\n 250,\n 31,\n 0,\n this.terminal.cols,\n 0,\n this.terminal.rows,\n 255,\n 240\n );\n } else {\n // Refuse other DO requests with a WONT\n sendQueue.push(255, 252, value);\n }\n break;\n case 251: // WILL\n if (value === 1) {\n // Affirm echo with DO\n sendQueue.push(255, 253, value);\n } else {\n // Reject other WILL offers with a DONT\n sendQueue.push(255, 254, value);\n }\n break;\n case 250: // SB (subnegotiation)\n if (value === 24) {\n // TERM-TYPE subnegotiation\n if (arr[0] === 1 && arr[1] === 255 && arr[2] === 240) {\n arr.shift();\n arr.shift();\n arr.shift();\n sendQueue.push(255, 250, 24, 0);\n this.pushStr(this.termType, sendQueue);\n sendQueue.push(255, 240);\n } else {\n console.warn('Invalid subnegotiation received' + arr);\n }\n } else {\n console.warn('Ignoring SB ' + value);\n }\n break;\n case 254: // DONT\n case 252: // WONT\n default:\n break;\n }\n break;\n case 242: // Data Mark (Synch)\n code = arr.shift();\n value = arr.shift();\n break;\n default: // everything else\n stringToDisplay += String.fromCharCode(chr);\n break;\n }\n }\n\n return {\n dataToSend: sendQueue.length ? new Uint8Array(sendQueue) : '',\n isOutput: !!stringToDisplay.length\n };\n }\n}\n","import { TelnetNegotiator } from './telnet-negotiator';\nimport type { Terminal } from '@xterm/xterm';\n\nexport class ShellAdapter {\n constructor(\n private terminal: Terminal,\n private termType = 'xterm-256color'\n ) {}\n\n filterNonPrintable(str: string) {\n // get rid of �\n const helpArr = str.split('�');\n str = helpArr.join('');\n\n return str;\n }\n\n setTermType(type) {\n this.termType = type;\n }\n\n filterReceiveData(data) {\n // negotiate telnet signals, if any\n const telnet = new TelnetNegotiator(this.terminal, this.termType);\n const telnetData = telnet.negotiate(data);\n\n // decode text for display\n const textDecoder = new TextDecoder();\n const decodedToDisplay = textDecoder.decode(data);\n\n return {\n dataToSend: telnetData.dataToSend,\n dataToDisplay: telnetData.isOutput ? this.filterNonPrintable(decodedToDisplay) : ''\n };\n }\n\n filterSendData(data) {\n const sendQueue = [];\n for (let i = 0; i < data.length; i++) {\n sendQueue.push(data.charCodeAt(i));\n }\n\n return sendQueue.length ? new Uint8Array(sendQueue) : '';\n }\n}\n","import { AfterViewInit, Component, OnDestroy, ViewEncapsulation } from '@angular/core';\nimport {\n ActionBarItemComponent,\n C8yTranslatePipe,\n IconDirective,\n TitleComponent\n} from '@c8y/ngx-components';\nimport { Terminal } from '@xterm/xterm';\nimport { FitAddon } from '@xterm/addon-fit';\nimport { ShellAdapter } from './shell-adapter';\nimport { RemoteAccessService } from '@c8y/ngx-components/remote-access/data';\nimport { ActivatedRoute } from '@angular/router';\n// workaround as we were unable to import this in component styles\nimport '@xterm/xterm/css/xterm.css';\nimport { NgIf } from '@angular/common';\n\n@Component({\n selector: 'c8y-terminal-viewer',\n templateUrl: './terminal-viewer.component.html',\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n imports: [TitleComponent, C8yTranslatePipe, ActionBarItemComponent, IconDirective, NgIf]\n})\nexport class TerminalViewerComponent implements AfterViewInit, OnDestroy {\n title = '';\n container: HTMLElement | null = null;\n terminal: Terminal | null = null;\n socket: WebSocket | null = null;\n firstDeviceMessageReceived = false;\n readonly configurationId: string;\n readonly deviceId: string;\n protected observer: ResizeObserver;\n\n constructor(\n private remoteAccess: RemoteAccessService,\n private activatedRoute: ActivatedRoute\n ) {\n this.configurationId = this.activatedRoute.snapshot.params.configurationId;\n this.deviceId = this.activatedRoute.parent.snapshot.params.id;\n }\n\n ngOnDestroy(): void {\n this.observer?.disconnect();\n const stringToSend = 'exit\\n';\n const sendQueue = [];\n for (let i = 0; i < stringToSend.length; i++) {\n sendQueue.push(stringToSend.charCodeAt(i));\n }\n this.socket?.send(new Uint8Array(sendQueue));\n this.socket?.close();\n }\n\n ngAfterViewInit(): void {\n this.container = document.getElementById('terminal-screen');\n this.terminal = new Terminal({\n fontSize: 18,\n fontFamily: 'consolas, monospace',\n cursorBlink: true\n });\n const fitAddon = new FitAddon();\n this.socket = new WebSocket(\n this.remoteAccess.getWebSocketUri(this.deviceId, this.configurationId),\n 'binary'\n );\n this.socket.binaryType = 'arraybuffer';\n this.terminal.loadAddon(fitAddon);\n this.terminal.open(this.container);\n fitAddon.fit();\n const shellAdapter = new ShellAdapter(this.terminal);\n this.observer = new ResizeObserver(() => {\n fitAddon.fit();\n });\n this.observer.observe(this.container);\n\n this.terminal.writeln('\\u001b[92mEstablishing Websocket connection... \\u001b[39m \\r\\n');\n this.terminal.focus();\n this.socket.onopen = () => {\n this.terminal.writeln(\n '\\u001b[92mWebsocket connection was established successfully, waiting for device... \\u001b[39m \\r\\n'\n );\n };\n\n this.socket.onclose = () => {\n this.terminal.writeln('');\n this.terminal.writeln('\\r\\n\\u001b[91mDevice disconnected. \\u001b[39m \\r\\n');\n this.terminal.writeln('\\r\\n\\u001b[91mWebsocket connection was closed. \\u001b[39m \\r\\n');\n };\n\n this.socket.onmessage = message => {\n if (!this.firstDeviceMessageReceived) {\n this.firstDeviceMessageReceived = true;\n this.terminal.writeln(\n '\\u001b[92mDevice connection was established successfully. \\u001b[39m \\r\\n'\n );\n }\n const filteredData = shellAdapter.filterReceiveData(message.data);\n if (filteredData.dataToSend.length) {\n this.socket.send(filteredData.dataToSend);\n }\n if (filteredData.dataToDisplay.length) {\n this.terminal.write(filteredData.dataToDisplay);\n }\n };\n\n this.terminal.onData(data => {\n if (this.firstDeviceMessageReceived) {\n const encodedToSend = shellAdapter.filterSendData(data);\n\n if (encodedToSend.length) {\n this.socket.send(encodedToSend);\n }\n }\n });\n }\n\n toggleFullscreen() {\n if (document.fullscreenElement) {\n document.exitFullscreen();\n } else {\n this.container.requestFullscreen();\n }\n }\n}\n","<c8y-title>Terminal Viewer: {{ title | translate }}</c8y-title>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"firstDeviceMessageReceived\">\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<div class=\"content-fullpage\" >\n <div id=\"terminal-screen\" class=\"inner-scroll\"></div>\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAEa,gBAAgB,CAAA;IAC3B,WACU,CAAA,QAAkB,EAClB,QAAgB,EAAA;QADhB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;QAClB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAQ;KACtB;AAEJ,IAAA,WAAW,CAAC,IAAI,EAAA;AACd,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;KACtB;IAED,OAAO,CAAC,GAAG,EAAE,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AA,UAAA,EAAA,SAAA,EAAA,iBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,aAAa,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,IAAI,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAE5E,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,iBAEhB,iBAAiB,CAAC,IAAI,EAAA,UAAA,EACzB,IAAI,EACP,OAAA,EAAA,CAAC,cAAc,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,aAAa,EAAE,IAAI,CAAC,EAAA,QAAA,EAAA,mdAAA,EAAA,CAAA;;;AErB1F;;AAEG;;;;"}
@@ -0,0 +1,66 @@
1
+ import * as i3 from '@angular/common';
2
+ import { NgForOf } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { Component } from '@angular/core';
5
+ import * as i1 from '@angular/forms';
6
+ import { Validators } from '@angular/forms';
7
+ import * as i2 from '@c8y/ngx-components';
8
+ import { CoreModule } from '@c8y/ngx-components';
9
+ import { gettext } from '@c8y/ngx-components/gettext';
10
+ import { CREDENTIALS_TYPES } from '@c8y/ngx-components/remote-access/data';
11
+
12
+ class RemoteAccessVncEndpointModalComponent {
13
+ constructor(formBuilder) {
14
+ this.formBuilder = formBuilder;
15
+ this.credentialTypes = [CREDENTIALS_TYPES.NONE, CREDENTIALS_TYPES.PASS_ONLY];
16
+ this.title = gettext('Remote access endpoint');
17
+ this.result = new Promise((resolve, reject) => {
18
+ this._resolve = resolve;
19
+ this._reject = reject;
20
+ });
21
+ this.form = this.initForm();
22
+ }
23
+ ngOnInit() {
24
+ if (this.currentValue) {
25
+ const { credentials, ...rest } = this.currentValue;
26
+ const credentialsType = credentials?.type || 'NONE';
27
+ const attributesToAdd = { credentialsType };
28
+ if (credentials) {
29
+ const { username, password } = credentials;
30
+ Object.assign(attributesToAdd, { username, password });
31
+ }
32
+ const patchedValue = { ...rest, ...attributesToAdd };
33
+ this.form.patchValue(patchedValue);
34
+ }
35
+ }
36
+ initForm() {
37
+ return this.formBuilder.group({
38
+ id: ['', []],
39
+ name: ['', [Validators.required, Validators.minLength(1)]],
40
+ hostname: ['127.0.0.1', [Validators.required, Validators.minLength(1)]],
41
+ port: [5900, [Validators.required, Validators.min(1), Validators.max(65535)]],
42
+ protocol: ['VNC', [Validators.required, Validators.minLength(1)]],
43
+ password: [undefined, []],
44
+ credentialsType: ['NONE', [Validators.required]]
45
+ });
46
+ }
47
+ cancel() {
48
+ this._reject();
49
+ }
50
+ save() {
51
+ this._resolve(this.form.value);
52
+ }
53
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: RemoteAccessVncEndpointModalComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
54
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: RemoteAccessVncEndpointModalComponent, isStandalone: true, selector: "c8y-remote-access-vnc-endpoint-modal", 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]=\"'laptop'\"></span>\n </ng-container>\n <div\n class=\"p-24\"\n [formGroup]=\"form\"\n >\n <c8y-form-group>\n <label\n for=\"name\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"name\"\n name=\"name\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'My remote access endpoint' }\"\n formControlName=\"name\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--name'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"protocol\"\n translate\n >\n Protocol\n </label>\n <input\n class=\"form-control\"\n id=\"protocol\"\n name=\"protocol\"\n type=\"text\"\n readonly\n formControlName=\"protocol\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"hostname\"\n translate\n >\n Host\n </label>\n <input\n class=\"form-control\"\n id=\"hostname\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '127.0.0.1' } }}\"\n name=\"hostname\"\n type=\"text\"\n formControlName=\"hostname\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--hostname'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"port\"\n translate\n >\n Port\n </label>\n <input\n class=\"form-control\"\n id=\"port\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '5900' } }}\"\n name=\"port\"\n type=\"number\"\n formControlName=\"port\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--port'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <div>\n <c8y-form-group>\n <label\n for=\"credentialsType\"\n translate\n >\n Sign-in method\n </label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n id=\"credentialsType\"\n formControlName=\"credentialsType\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--credentials-type'\"\n >\n <option\n *ngFor=\"let type of credentialTypes\"\n [value]=\"type.value\"\n >\n {{ type.label | translate }}\n </option>\n </select>\n </div>\n </c8y-form-group>\n\n <c8y-form-group *ngIf=\"form.value.credentialsType === 'PASS_ONLY'\">\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_password' } }}\"\n name=\"password\"\n type=\"password\"\n autocomplete=\"off\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n</c8y-modal>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { 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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { 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: i2.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: i2.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: i2.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: RemoteAccessVncEndpointModalComponent, decorators: [{
57
+ type: Component,
58
+ args: [{ selector: 'c8y-remote-access-vnc-endpoint-modal', standalone: true, imports: [CoreModule, NgForOf], 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]=\"'laptop'\"></span>\n </ng-container>\n <div\n class=\"p-24\"\n [formGroup]=\"form\"\n >\n <c8y-form-group>\n <label\n for=\"name\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"name\"\n name=\"name\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'My remote access endpoint' }\"\n formControlName=\"name\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--name'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"protocol\"\n translate\n >\n Protocol\n </label>\n <input\n class=\"form-control\"\n id=\"protocol\"\n name=\"protocol\"\n type=\"text\"\n readonly\n formControlName=\"protocol\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"hostname\"\n translate\n >\n Host\n </label>\n <input\n class=\"form-control\"\n id=\"hostname\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '127.0.0.1' } }}\"\n name=\"hostname\"\n type=\"text\"\n formControlName=\"hostname\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--hostname'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"port\"\n translate\n >\n Port\n </label>\n <input\n class=\"form-control\"\n id=\"port\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '5900' } }}\"\n name=\"port\"\n type=\"number\"\n formControlName=\"port\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--port'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <div>\n <c8y-form-group>\n <label\n for=\"credentialsType\"\n translate\n >\n Sign-in method\n </label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n id=\"credentialsType\"\n formControlName=\"credentialsType\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--credentials-type'\"\n >\n <option\n *ngFor=\"let type of credentialTypes\"\n [value]=\"type.value\"\n >\n {{ type.label | translate }}\n </option>\n </select>\n </div>\n </c8y-form-group>\n\n <c8y-form-group *ngIf=\"form.value.credentialsType === 'PASS_ONLY'\">\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_password' } }}\"\n name=\"password\"\n type=\"password\"\n autocomplete=\"off\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n</c8y-modal>\n" }]
59
+ }], ctorParameters: () => [{ type: i1.FormBuilder }] });
60
+
61
+ /**
62
+ * Generated bundle index. Do not edit.
63
+ */
64
+
65
+ export { RemoteAccessVncEndpointModalComponent };
66
+ //# sourceMappingURL=c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs","sources":["../../remote-access/vnc/remote-access-vnc-endpoint-modal/remote-access-vnc-endpoint-modal.component.ts","../../remote-access/vnc/remote-access-vnc-endpoint-modal/remote-access-vnc-endpoint-modal.component.html","../../remote-access/vnc/remote-access-vnc-endpoint-modal/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.ts"],"sourcesContent":["import { NgForOf } from '@angular/common';\nimport { Component, OnInit } from '@angular/core';\nimport { FormBuilder, Validators } from '@angular/forms';\nimport { CoreModule } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n CREDENTIALS_TYPES,\n RemoteAccessConfiguration\n} from '@c8y/ngx-components/remote-access/data';\n\n@Component({\n selector: 'c8y-remote-access-vnc-endpoint-modal',\n templateUrl: './remote-access-vnc-endpoint-modal.component.html',\n standalone: true,\n imports: [CoreModule, NgForOf]\n})\nexport class RemoteAccessVncEndpointModalComponent implements OnInit {\n credentialTypes = [CREDENTIALS_TYPES.NONE, CREDENTIALS_TYPES.PASS_ONLY];\n title = gettext('Remote access endpoint');\n form: ReturnType<typeof this.initForm>;\n\n currentValue: Partial<RemoteAccessConfiguration>;\n\n result = new Promise<ReturnType<typeof this.initForm>['value']>((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n\n private _resolve: (value: ReturnType<typeof this.initForm>['value']) => void;\n private _reject: (reason?: any) => void;\n\n constructor(private formBuilder: FormBuilder) {\n this.form = this.initForm();\n }\n\n ngOnInit() {\n if (this.currentValue) {\n const { credentials, ...rest } = this.currentValue;\n const credentialsType = credentials?.type || 'NONE';\n const attributesToAdd = { credentialsType };\n if (credentials) {\n const { username, password } = credentials;\n Object.assign(attributesToAdd, { username, password });\n }\n const patchedValue = { ...rest, ...attributesToAdd };\n this.form.patchValue(patchedValue);\n }\n }\n\n initForm() {\n return this.formBuilder.group({\n id: ['', []],\n name: ['', [Validators.required, Validators.minLength(1)]],\n hostname: ['127.0.0.1', [Validators.required, Validators.minLength(1)]],\n port: [5900, [Validators.required, Validators.min(1), Validators.max(65535)]],\n protocol: ['VNC', [Validators.required, Validators.minLength(1)]],\n password: [undefined as string, []],\n credentialsType: ['NONE' as 'NONE' | 'PASS_ONLY', [Validators.required]]\n });\n }\n\n cancel() {\n this._reject();\n }\n\n save() {\n this._resolve(this.form.value);\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]=\"'laptop'\"></span>\n </ng-container>\n <div\n class=\"p-24\"\n [formGroup]=\"form\"\n >\n <c8y-form-group>\n <label\n for=\"name\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"name\"\n name=\"name\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'My remote access endpoint' }\"\n formControlName=\"name\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--name'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"protocol\"\n translate\n >\n Protocol\n </label>\n <input\n class=\"form-control\"\n id=\"protocol\"\n name=\"protocol\"\n type=\"text\"\n readonly\n formControlName=\"protocol\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"hostname\"\n translate\n >\n Host\n </label>\n <input\n class=\"form-control\"\n id=\"hostname\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '127.0.0.1' } }}\"\n name=\"hostname\"\n type=\"text\"\n formControlName=\"hostname\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--hostname'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"port\"\n translate\n >\n Port\n </label>\n <input\n class=\"form-control\"\n id=\"port\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '5900' } }}\"\n name=\"port\"\n type=\"number\"\n formControlName=\"port\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--port'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <div>\n <c8y-form-group>\n <label\n for=\"credentialsType\"\n translate\n >\n Sign-in method\n </label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n id=\"credentialsType\"\n formControlName=\"credentialsType\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--credentials-type'\"\n >\n <option\n *ngFor=\"let type of credentialTypes\"\n [value]=\"type.value\"\n >\n {{ type.label | translate }}\n </option>\n </select>\n </div>\n </c8y-form-group>\n\n <c8y-form-group *ngIf=\"form.value.credentialsType === 'PASS_ONLY'\">\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_password' } }}\"\n name=\"password\"\n type=\"password\"\n autocomplete=\"off\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n</c8y-modal>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAgBa,qCAAqC,CAAA;AAehD,IAAA,WAAA,CAAoB,WAAwB,EAAA;QAAxB,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;QAd5C,IAAe,CAAA,eAAA,GAAG,CAAC,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;AACxE,QAAA,IAAA,CAAA,KAAK,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;QAK1C,IAAM,CAAA,MAAA,GAAG,IAAI,OAAO,CAA4C,CAAC,OAAO,EAAE,MAAM,KAAI;AAClF,YAAA,IAAI,CAAC,QAAQ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