@c8y/ngx-components 1022.30.0 → 1022.33.0

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 (460) hide show
  1. package/asset-properties/asset-properties.model.d.ts +12 -3
  2. package/asset-properties/asset-properties.model.d.ts.map +1 -1
  3. package/asset-properties/asset-properties.service.d.ts +20 -2
  4. package/asset-properties/asset-properties.service.d.ts.map +1 -1
  5. package/asset-properties/asset-property-list/asset-property-icon-tooltip.pipe.d.ts +14 -0
  6. package/asset-properties/asset-property-list/asset-property-icon-tooltip.pipe.d.ts.map +1 -0
  7. package/asset-properties/asset-property-list/asset-property-icon.pipe.d.ts.map +1 -1
  8. package/asset-properties/asset-property-list/asset-property-list.component.d.ts +28 -18
  9. package/asset-properties/asset-property-list/asset-property-list.component.d.ts.map +1 -1
  10. package/asset-properties/asset-property-selector-drawer/asset-property-selector-drawer.component.d.ts +2 -2
  11. package/asset-properties/asset-property-selector-drawer/asset-property-selector-drawer.component.d.ts.map +1 -1
  12. package/asset-properties/custom-properties-drawer/custom-properties-drawer.component.d.ts +97 -0
  13. package/asset-properties/custom-properties-drawer/custom-properties-drawer.component.d.ts.map +1 -0
  14. package/asset-properties/custom-properties-drawer.service.d.ts +12 -0
  15. package/asset-properties/custom-properties-drawer.service.d.ts.map +1 -0
  16. package/asset-properties/index.d.ts +1 -0
  17. package/asset-properties/index.d.ts.map +1 -1
  18. package/context-dashboard/dashboard-detail.service.d.ts +2 -2
  19. package/context-dashboard/widget-config-hook/widget-config-hook.model.d.ts +2 -1
  20. package/context-dashboard/widget-config-hook/widget-config-hook.model.d.ts.map +1 -1
  21. package/context-dashboard/widget-config.service.d.ts.map +1 -1
  22. package/core/i18n/pattern-messages.data.d.ts +7 -0
  23. package/core/i18n/pattern-messages.data.d.ts.map +1 -1
  24. package/core/query-param-handler/query-param-handler.service.d.ts +1 -1
  25. package/core/query-param-handler/query-param-handler.service.d.ts.map +1 -1
  26. package/core/query-param-handler/query-param-modal-handler.service.d.ts +16 -5
  27. package/core/query-param-handler/query-param-modal-handler.service.d.ts.map +1 -1
  28. package/datapoints-export-selector/datapoints-export-selector-modal/datapoints-export-selector-file-exporter/data-fetching.service.d.ts.map +1 -1
  29. package/fesm2022/c8y-ngx-components-actility-device-registration.mjs +16 -16
  30. package/fesm2022/c8y-ngx-components-actility-device-registration.mjs.map +1 -1
  31. package/fesm2022/c8y-ngx-components-advanced-software-management.mjs +7 -7
  32. package/fesm2022/c8y-ngx-components-advanced-software-management.mjs.map +1 -1
  33. package/fesm2022/c8y-ngx-components-alarm-event-selector.mjs +34 -34
  34. package/fesm2022/c8y-ngx-components-alarm-event-selector.mjs.map +1 -1
  35. package/fesm2022/c8y-ngx-components-alarms-cockpit.mjs +4 -4
  36. package/fesm2022/c8y-ngx-components-alarms-cockpit.mjs.map +1 -1
  37. package/fesm2022/c8y-ngx-components-alarms-devicemanagement.mjs.map +1 -1
  38. package/fesm2022/c8y-ngx-components-alarms.mjs +73 -73
  39. package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
  40. package/fesm2022/c8y-ngx-components-api.mjs +7 -7
  41. package/fesm2022/c8y-ngx-components-api.mjs.map +1 -1
  42. package/fesm2022/c8y-ngx-components-app-logs.mjs +10 -10
  43. package/fesm2022/c8y-ngx-components-app-logs.mjs.map +1 -1
  44. package/fesm2022/c8y-ngx-components-asset-properties.mjs +427 -66
  45. package/fesm2022/c8y-ngx-components-asset-properties.mjs.map +1 -1
  46. package/fesm2022/{c8y-ngx-components-asset-property-grid.component-WUN1r4fC.mjs → c8y-ngx-components-asset-property-grid.component-CRnyUbyz.mjs} +13 -13
  47. package/fesm2022/{c8y-ngx-components-asset-property-grid.component-WUN1r4fC.mjs.map → c8y-ngx-components-asset-property-grid.component-CRnyUbyz.mjs.map} +1 -1
  48. package/fesm2022/c8y-ngx-components-assets-navigator.mjs +32 -32
  49. package/fesm2022/c8y-ngx-components-assets-navigator.mjs.map +1 -1
  50. package/fesm2022/c8y-ngx-components-auth-configuration.mjs +114 -114
  51. package/fesm2022/c8y-ngx-components-auth-configuration.mjs.map +1 -1
  52. package/fesm2022/c8y-ngx-components-binary-file-download.mjs +7 -7
  53. package/fesm2022/c8y-ngx-components-binary-file-download.mjs.map +1 -1
  54. package/fesm2022/c8y-ngx-components-bookmarks.mjs +13 -13
  55. package/fesm2022/c8y-ngx-components-bookmarks.mjs.map +1 -1
  56. package/fesm2022/c8y-ngx-components-branding-base-branding.mjs +4 -4
  57. package/fesm2022/c8y-ngx-components-branding-dark-theme.mjs +7 -7
  58. package/fesm2022/c8y-ngx-components-branding-dark-theme.mjs.map +1 -1
  59. package/fesm2022/c8y-ngx-components-branding-extra-css-branding-editor.mjs +7 -7
  60. package/fesm2022/c8y-ngx-components-branding-extra-css-branding-editor.mjs.map +1 -1
  61. package/fesm2022/c8y-ngx-components-branding-plain-branding-editor-lazy.mjs +3 -3
  62. package/fesm2022/c8y-ngx-components-branding-plain-branding-editor-lazy.mjs.map +1 -1
  63. package/fesm2022/c8y-ngx-components-branding-plain-branding-editor.mjs +7 -7
  64. package/fesm2022/c8y-ngx-components-branding-plain-branding-editor.mjs.map +1 -1
  65. package/fesm2022/c8y-ngx-components-branding-shared-data.mjs +15 -15
  66. package/fesm2022/c8y-ngx-components-branding-shared-data.mjs.map +1 -1
  67. package/fesm2022/c8y-ngx-components-branding-shared-lazy-add-branding-modal.mjs +6 -6
  68. package/fesm2022/c8y-ngx-components-branding-shared-lazy-add-branding-modal.mjs.map +1 -1
  69. package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs +33 -33
  70. package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs.map +1 -1
  71. package/fesm2022/c8y-ngx-components-branding-shared.mjs +10 -10
  72. package/fesm2022/c8y-ngx-components-branding-shared.mjs.map +1 -1
  73. package/fesm2022/c8y-ngx-components-child-devices.mjs +13 -13
  74. package/fesm2022/c8y-ngx-components-child-devices.mjs.map +1 -1
  75. package/fesm2022/c8y-ngx-components-cockpit-config.mjs +40 -40
  76. package/fesm2022/c8y-ngx-components-cockpit-config.mjs.map +1 -1
  77. package/fesm2022/c8y-ngx-components-connectivity.mjs +53 -53
  78. package/fesm2022/c8y-ngx-components-connectivity.mjs.map +1 -1
  79. package/fesm2022/c8y-ngx-components-context-dashboard-asset-add.mjs +10 -10
  80. package/fesm2022/c8y-ngx-components-context-dashboard-asset-add.mjs.map +1 -1
  81. package/fesm2022/c8y-ngx-components-context-dashboard-asset-view.mjs +7 -7
  82. package/fesm2022/c8y-ngx-components-context-dashboard-asset-view.mjs.map +1 -1
  83. package/fesm2022/c8y-ngx-components-context-dashboard-cockpit-home-dashboard.mjs +11 -11
  84. package/fesm2022/c8y-ngx-components-context-dashboard-cockpit-home-dashboard.mjs.map +1 -1
  85. package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-C-JLbcn5.mjs → c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-BWyhab0H.mjs} +4 -4
  86. package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-C-JLbcn5.mjs.map → c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-BWyhab0H.mjs.map} +1 -1
  87. package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-general-settings.component-RXvOcs04.mjs → c8y-ngx-components-context-dashboard-dashboard-general-settings.component-DjlpSztw.mjs} +10 -10
  88. package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-general-settings.component-RXvOcs04.mjs.map → c8y-ngx-components-context-dashboard-dashboard-general-settings.component-DjlpSztw.mjs.map} +1 -1
  89. package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-version-history.component-DmPIJGXO.mjs → c8y-ngx-components-context-dashboard-dashboard-version-history.component-B2zLhv0X.mjs} +4 -4
  90. package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-version-history.component-DmPIJGXO.mjs.map → c8y-ngx-components-context-dashboard-dashboard-version-history.component-B2zLhv0X.mjs.map} +1 -1
  91. package/fesm2022/c8y-ngx-components-context-dashboard-device-add.mjs +10 -10
  92. package/fesm2022/c8y-ngx-components-context-dashboard-device-add.mjs.map +1 -1
  93. package/fesm2022/c8y-ngx-components-context-dashboard-device-view.mjs +7 -7
  94. package/fesm2022/c8y-ngx-components-context-dashboard-device-view.mjs.map +1 -1
  95. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +107 -102
  96. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  97. package/fesm2022/{c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-DtLAOoFx.mjs → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-CwfVxTSx.mjs} +16 -16
  98. package/fesm2022/{c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-DtLAOoFx.mjs.map → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-CwfVxTSx.mjs.map} +1 -1
  99. package/fesm2022/c8y-ngx-components-dashboard-details-advanced-tab.mjs +12 -12
  100. package/fesm2022/c8y-ngx-components-dashboard-details-advanced-tab.mjs.map +1 -1
  101. package/fesm2022/c8y-ngx-components-dashboard-manager-devicemanagement.mjs.map +1 -1
  102. package/fesm2022/c8y-ngx-components-dashboard-manager.mjs +22 -22
  103. package/fesm2022/c8y-ngx-components-dashboard-manager.mjs.map +1 -1
  104. package/fesm2022/c8y-ngx-components-data-broker.mjs +7 -7
  105. package/fesm2022/c8y-ngx-components-data-broker.mjs.map +1 -1
  106. package/fesm2022/c8y-ngx-components-data-grid-columns-asset-type.mjs +3 -3
  107. package/fesm2022/c8y-ngx-components-data-grid-columns-asset-type.mjs.map +1 -1
  108. package/fesm2022/c8y-ngx-components-data-grid-columns.mjs +3 -3
  109. package/fesm2022/c8y-ngx-components-data-grid-columns.mjs.map +1 -1
  110. package/fesm2022/c8y-ngx-components-datapoint-explorer-devicemanagement.mjs.map +1 -1
  111. package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +24 -24
  112. package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
  113. package/fesm2022/c8y-ngx-components-datapoint-explorer.mjs +7 -7
  114. package/fesm2022/c8y-ngx-components-datapoint-explorer.mjs.map +1 -1
  115. package/fesm2022/c8y-ngx-components-datapoint-library-details.mjs +3 -3
  116. package/fesm2022/c8y-ngx-components-datapoint-library-details.mjs.map +1 -1
  117. package/fesm2022/c8y-ngx-components-datapoint-library-list.mjs +3 -3
  118. package/fesm2022/c8y-ngx-components-datapoint-library-list.mjs.map +1 -1
  119. package/fesm2022/c8y-ngx-components-datapoint-library-services.mjs +3 -3
  120. package/fesm2022/c8y-ngx-components-datapoint-library-services.mjs.map +1 -1
  121. package/fesm2022/c8y-ngx-components-datapoint-library.mjs +4 -4
  122. package/fesm2022/c8y-ngx-components-datapoint-library.mjs.map +1 -1
  123. package/fesm2022/c8y-ngx-components-datapoint-selector.mjs +40 -40
  124. package/fesm2022/c8y-ngx-components-datapoint-selector.mjs.map +1 -1
  125. package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs +41 -40
  126. package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs.map +1 -1
  127. package/fesm2022/c8y-ngx-components-default-subscriptions.mjs +16 -16
  128. package/fesm2022/c8y-ngx-components-default-subscriptions.mjs.map +1 -1
  129. package/fesm2022/c8y-ngx-components-device-grid.mjs +43 -43
  130. package/fesm2022/c8y-ngx-components-device-grid.mjs.map +1 -1
  131. package/fesm2022/c8y-ngx-components-device-list.mjs +22 -22
  132. package/fesm2022/c8y-ngx-components-device-list.mjs.map +1 -1
  133. package/fesm2022/c8y-ngx-components-device-map.mjs +12 -12
  134. package/fesm2022/c8y-ngx-components-device-map.mjs.map +1 -1
  135. package/fesm2022/c8y-ngx-components-device-profile.mjs +34 -34
  136. package/fesm2022/c8y-ngx-components-device-profile.mjs.map +1 -1
  137. package/fesm2022/c8y-ngx-components-device-protocol-object-mappings.mjs +3 -3
  138. package/fesm2022/c8y-ngx-components-device-protocol-object-mappings.mjs.map +1 -1
  139. package/fesm2022/c8y-ngx-components-device-protocols.mjs +16 -16
  140. package/fesm2022/c8y-ngx-components-device-protocols.mjs.map +1 -1
  141. package/fesm2022/c8y-ngx-components-device-provisioned-certificates.mjs +13 -13
  142. package/fesm2022/c8y-ngx-components-device-provisioned-certificates.mjs.map +1 -1
  143. package/fesm2022/c8y-ngx-components-device-shell.mjs +31 -31
  144. package/fesm2022/c8y-ngx-components-device-shell.mjs.map +1 -1
  145. package/fesm2022/c8y-ngx-components-diagnostics.mjs +13 -13
  146. package/fesm2022/c8y-ngx-components-diagnostics.mjs.map +1 -1
  147. package/fesm2022/c8y-ngx-components-echart-models.mjs.map +1 -1
  148. package/fesm2022/c8y-ngx-components-echart.mjs +27 -27
  149. package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
  150. package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs +43 -43
  151. package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
  152. package/fesm2022/c8y-ngx-components-ecosystem-archived-confirm.mjs +7 -7
  153. package/fesm2022/c8y-ngx-components-ecosystem-archived-confirm.mjs.map +1 -1
  154. package/fesm2022/c8y-ngx-components-ecosystem-license-confirm.mjs +10 -10
  155. package/fesm2022/c8y-ngx-components-ecosystem-license-confirm.mjs.map +1 -1
  156. package/fesm2022/c8y-ngx-components-ecosystem-plugin-setup-stepper.mjs +7 -7
  157. package/fesm2022/c8y-ngx-components-ecosystem-plugin-setup-stepper.mjs.map +1 -1
  158. package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs +46 -46
  159. package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs.map +1 -1
  160. package/fesm2022/c8y-ngx-components-ecosystem.mjs +82 -82
  161. package/fesm2022/c8y-ngx-components-ecosystem.mjs.map +1 -1
  162. package/fesm2022/c8y-ngx-components-editor.mjs +6 -6
  163. package/fesm2022/c8y-ngx-components-editor.mjs.map +1 -1
  164. package/fesm2022/c8y-ngx-components-events-events-timeline.mjs +3 -3
  165. package/fesm2022/c8y-ngx-components-events-events-timeline.mjs.map +1 -1
  166. package/fesm2022/c8y-ngx-components-events.mjs +3 -3
  167. package/fesm2022/c8y-ngx-components-events.mjs.map +1 -1
  168. package/fesm2022/c8y-ngx-components-exports-list.mjs +6 -6
  169. package/fesm2022/c8y-ngx-components-exports-list.mjs.map +1 -1
  170. package/fesm2022/c8y-ngx-components-exports.mjs.map +1 -1
  171. package/fesm2022/c8y-ngx-components-file-preview.mjs +7 -7
  172. package/fesm2022/c8y-ngx-components-file-preview.mjs.map +1 -1
  173. package/fesm2022/c8y-ngx-components-files-repository.mjs +19 -19
  174. package/fesm2022/c8y-ngx-components-files-repository.mjs.map +1 -1
  175. package/fesm2022/c8y-ngx-components-icon-selector-icons-arrows.mjs.map +1 -1
  176. package/fesm2022/c8y-ngx-components-icon-selector-icons-city.mjs.map +1 -1
  177. package/fesm2022/c8y-ngx-components-icon-selector-icons-data.mjs.map +1 -1
  178. package/fesm2022/c8y-ngx-components-icon-selector-icons-dateAndTime.mjs.map +1 -1
  179. package/fesm2022/c8y-ngx-components-icon-selector-icons-devicesAndSensors.mjs.map +1 -1
  180. package/fesm2022/c8y-ngx-components-icon-selector-icons-ecommerce.mjs.map +1 -1
  181. package/fesm2022/c8y-ngx-components-icon-selector-icons-editing.mjs.map +1 -1
  182. package/fesm2022/c8y-ngx-components-icon-selector-icons-filesAndFolders.mjs.map +1 -1
  183. package/fesm2022/c8y-ngx-components-icon-selector-icons-finance.mjs.map +1 -1
  184. package/fesm2022/c8y-ngx-components-icon-selector-icons-hands.mjs.map +1 -1
  185. package/fesm2022/c8y-ngx-components-icon-selector-icons-location.mjs.map +1 -1
  186. package/fesm2022/c8y-ngx-components-icon-selector-icons-messaging.mjs.map +1 -1
  187. package/fesm2022/c8y-ngx-components-icon-selector-icons-multimedia.mjs.map +1 -1
  188. package/fesm2022/c8y-ngx-components-icon-selector-icons-network.mjs.map +1 -1
  189. package/fesm2022/c8y-ngx-components-icon-selector-icons-office.mjs.map +1 -1
  190. package/fesm2022/c8y-ngx-components-icon-selector-icons-people.mjs.map +1 -1
  191. package/fesm2022/c8y-ngx-components-icon-selector-icons-platform.mjs +1 -0
  192. package/fesm2022/c8y-ngx-components-icon-selector-icons-platform.mjs.map +1 -1
  193. package/fesm2022/c8y-ngx-components-icon-selector-icons-programming.mjs.map +1 -1
  194. package/fesm2022/c8y-ngx-components-icon-selector-icons-security.mjs.map +1 -1
  195. package/fesm2022/c8y-ngx-components-icon-selector-icons-transport.mjs.map +1 -1
  196. package/fesm2022/c8y-ngx-components-icon-selector-icons-userInterface.mjs.map +1 -1
  197. package/fesm2022/c8y-ngx-components-icon-selector-icons-weather.mjs.map +1 -1
  198. package/fesm2022/c8y-ngx-components-icon-selector-icons.mjs.map +1 -1
  199. package/fesm2022/c8y-ngx-components-icon-selector-model.mjs.map +1 -1
  200. package/fesm2022/c8y-ngx-components-icon-selector.mjs +19 -19
  201. package/fesm2022/c8y-ngx-components-icon-selector.mjs.map +1 -1
  202. package/fesm2022/c8y-ngx-components-interval-picker.mjs +3 -3
  203. package/fesm2022/c8y-ngx-components-interval-picker.mjs.map +1 -1
  204. package/fesm2022/c8y-ngx-components-location.mjs +28 -28
  205. package/fesm2022/c8y-ngx-components-location.mjs.map +1 -1
  206. package/fesm2022/c8y-ngx-components-loriot-device-registration.mjs +16 -16
  207. package/fesm2022/c8y-ngx-components-loriot-device-registration.mjs.map +1 -1
  208. package/fesm2022/c8y-ngx-components-map.mjs +19 -19
  209. package/fesm2022/c8y-ngx-components-map.mjs.map +1 -1
  210. package/fesm2022/c8y-ngx-components-messaging-management.mjs +55 -55
  211. package/fesm2022/c8y-ngx-components-messaging-management.mjs.map +1 -1
  212. package/fesm2022/c8y-ngx-components-operations-bulk-operation-from-single.mjs +7 -7
  213. package/fesm2022/c8y-ngx-components-operations-bulk-operation-from-single.mjs.map +1 -1
  214. package/fesm2022/c8y-ngx-components-operations-bulk-operation-list-item.mjs +19 -19
  215. package/fesm2022/c8y-ngx-components-operations-bulk-operation-list-item.mjs.map +1 -1
  216. package/fesm2022/c8y-ngx-components-operations-bulk-operation-scheduler.mjs +7 -7
  217. package/fesm2022/c8y-ngx-components-operations-bulk-operation-scheduler.mjs.map +1 -1
  218. package/fesm2022/c8y-ngx-components-operations-bulk-operation-stepper.mjs +13 -13
  219. package/fesm2022/c8y-ngx-components-operations-bulk-operation-stepper.mjs.map +1 -1
  220. package/fesm2022/c8y-ngx-components-operations-bulk-operations-list.mjs +13 -13
  221. package/fesm2022/c8y-ngx-components-operations-bulk-operations-list.mjs.map +1 -1
  222. package/fesm2022/c8y-ngx-components-operations-bulk-operations-service.mjs +7 -7
  223. package/fesm2022/c8y-ngx-components-operations-bulk-operations-service.mjs.map +1 -1
  224. package/fesm2022/c8y-ngx-components-operations-bulk-operations-stepper-container.mjs +7 -7
  225. package/fesm2022/c8y-ngx-components-operations-bulk-operations-stepper-container.mjs.map +1 -1
  226. package/fesm2022/c8y-ngx-components-operations-bulk-single-operations-list.mjs +10 -10
  227. package/fesm2022/c8y-ngx-components-operations-bulk-single-operations-list.mjs.map +1 -1
  228. package/fesm2022/c8y-ngx-components-operations-create-bulk-operation-details.mjs +7 -7
  229. package/fesm2022/c8y-ngx-components-operations-create-bulk-operation-details.mjs.map +1 -1
  230. package/fesm2022/c8y-ngx-components-operations-device-selector.mjs +7 -7
  231. package/fesm2022/c8y-ngx-components-operations-device-selector.mjs.map +1 -1
  232. package/fesm2022/c8y-ngx-components-operations-grid-columns.mjs +12 -12
  233. package/fesm2022/c8y-ngx-components-operations-grid-columns.mjs.map +1 -1
  234. package/fesm2022/c8y-ngx-components-operations-operation-details.mjs +13 -13
  235. package/fesm2022/c8y-ngx-components-operations-operation-details.mjs.map +1 -1
  236. package/fesm2022/c8y-ngx-components-operations-operation-summary.mjs +7 -7
  237. package/fesm2022/c8y-ngx-components-operations-operation-summary.mjs.map +1 -1
  238. package/fesm2022/c8y-ngx-components-operations-operations-list-item-details.mjs +10 -10
  239. package/fesm2022/c8y-ngx-components-operations-operations-list-item-details.mjs.map +1 -1
  240. package/fesm2022/c8y-ngx-components-operations-operations-list.mjs +12 -12
  241. package/fesm2022/c8y-ngx-components-operations-operations-list.mjs.map +1 -1
  242. package/fesm2022/c8y-ngx-components-operations-operations-timeline.mjs +7 -7
  243. package/fesm2022/c8y-ngx-components-operations-operations-timeline.mjs.map +1 -1
  244. package/fesm2022/c8y-ngx-components-operations-product-experience.mjs.map +1 -1
  245. package/fesm2022/c8y-ngx-components-operations-shared.mjs +10 -10
  246. package/fesm2022/c8y-ngx-components-operations-shared.mjs.map +1 -1
  247. package/fesm2022/c8y-ngx-components-operations-status-filter.mjs +7 -7
  248. package/fesm2022/c8y-ngx-components-operations-status-filter.mjs.map +1 -1
  249. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-configuration.mjs +7 -7
  250. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-configuration.mjs.map +1 -1
  251. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-device-profile.mjs +13 -13
  252. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-device-profile.mjs.map +1 -1
  253. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-firmware.mjs +13 -13
  254. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-firmware.mjs.map +1 -1
  255. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs +13 -13
  256. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs.map +1 -1
  257. package/fesm2022/c8y-ngx-components-operations-stepper-frames.mjs +13 -13
  258. package/fesm2022/c8y-ngx-components-operations-stepper-frames.mjs.map +1 -1
  259. package/fesm2022/c8y-ngx-components-operations.mjs +7 -7
  260. package/fesm2022/c8y-ngx-components-operations.mjs.map +1 -1
  261. package/fesm2022/c8y-ngx-components-pending-mo-request.mjs +7 -7
  262. package/fesm2022/c8y-ngx-components-pending-mo-request.mjs.map +1 -1
  263. package/fesm2022/c8y-ngx-components-platform-configuration.mjs +10 -10
  264. package/fesm2022/c8y-ngx-components-platform-configuration.mjs.map +1 -1
  265. package/fesm2022/c8y-ngx-components-protocol-lpwan.mjs +38 -38
  266. package/fesm2022/c8y-ngx-components-protocol-lpwan.mjs.map +1 -1
  267. package/fesm2022/c8y-ngx-components-protocol-opcua-mappings.mjs.map +1 -1
  268. package/fesm2022/c8y-ngx-components-protocol-opcua.mjs +58 -58
  269. package/fesm2022/c8y-ngx-components-protocol-opcua.mjs.map +1 -1
  270. package/fesm2022/c8y-ngx-components-register-device.mjs +58 -58
  271. package/fesm2022/c8y-ngx-components-register-device.mjs.map +1 -1
  272. package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs +9 -9
  273. package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs.map +1 -1
  274. package/fesm2022/c8y-ngx-components-remote-access-data.mjs +3 -3
  275. package/fesm2022/c8y-ngx-components-remote-access-data.mjs.map +1 -1
  276. package/fesm2022/c8y-ngx-components-remote-access-passthrough.mjs +3 -3
  277. package/fesm2022/c8y-ngx-components-remote-access-passthrough.mjs.map +1 -1
  278. package/fesm2022/c8y-ngx-components-remote-access-shared.mjs +6 -6
  279. package/fesm2022/c8y-ngx-components-remote-access-shared.mjs.map +1 -1
  280. package/fesm2022/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs +3 -3
  281. package/fesm2022/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs.map +1 -1
  282. package/fesm2022/c8y-ngx-components-remote-access-ssh.mjs +3 -3
  283. package/fesm2022/c8y-ngx-components-remote-access-ssh.mjs.map +1 -1
  284. package/fesm2022/c8y-ngx-components-remote-access-telnet.mjs +3 -3
  285. package/fesm2022/c8y-ngx-components-remote-access-telnet.mjs.map +1 -1
  286. package/fesm2022/c8y-ngx-components-remote-access-terminal-viewer.mjs +3 -3
  287. package/fesm2022/c8y-ngx-components-remote-access-terminal-viewer.mjs.map +1 -1
  288. package/fesm2022/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs +3 -3
  289. package/fesm2022/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs.map +1 -1
  290. package/fesm2022/c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs +6 -6
  291. package/fesm2022/c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs.map +1 -1
  292. package/fesm2022/c8y-ngx-components-remote-access-vnc.mjs +3 -3
  293. package/fesm2022/c8y-ngx-components-remote-access-vnc.mjs.map +1 -1
  294. package/fesm2022/c8y-ngx-components-replace-device-replace-device-wizard.mjs +6 -6
  295. package/fesm2022/c8y-ngx-components-replace-device-replace-device-wizard.mjs.map +1 -1
  296. package/fesm2022/c8y-ngx-components-replace-device.mjs +13 -29
  297. package/fesm2022/c8y-ngx-components-replace-device.mjs.map +1 -1
  298. package/fesm2022/c8y-ngx-components-report-dashboard.mjs +16 -16
  299. package/fesm2022/c8y-ngx-components-report-dashboard.mjs.map +1 -1
  300. package/fesm2022/c8y-ngx-components-reports.mjs +19 -19
  301. package/fesm2022/c8y-ngx-components-reports.mjs.map +1 -1
  302. package/fesm2022/c8y-ngx-components-repository-configuration.mjs +48 -48
  303. package/fesm2022/c8y-ngx-components-repository-configuration.mjs.map +1 -1
  304. package/fesm2022/c8y-ngx-components-repository-firmware.mjs +33 -33
  305. package/fesm2022/c8y-ngx-components-repository-firmware.mjs.map +1 -1
  306. package/fesm2022/c8y-ngx-components-repository-shared.mjs +34 -34
  307. package/fesm2022/c8y-ngx-components-repository-shared.mjs.map +1 -1
  308. package/fesm2022/c8y-ngx-components-repository-software.mjs +42 -42
  309. package/fesm2022/c8y-ngx-components-repository-software.mjs.map +1 -1
  310. package/fesm2022/c8y-ngx-components-repository.mjs +4 -4
  311. package/fesm2022/c8y-ngx-components-repository.mjs.map +1 -1
  312. package/fesm2022/c8y-ngx-components-search.mjs +19 -19
  313. package/fesm2022/c8y-ngx-components-search.mjs.map +1 -1
  314. package/fesm2022/c8y-ngx-components-sensor-phone-sensor-phone-modal.mjs +33 -27
  315. package/fesm2022/c8y-ngx-components-sensor-phone-sensor-phone-modal.mjs.map +1 -1
  316. package/fesm2022/c8y-ngx-components-sensor-phone.mjs +17 -320
  317. package/fesm2022/c8y-ngx-components-sensor-phone.mjs.map +1 -1
  318. package/fesm2022/c8y-ngx-components-services-service-command-tab.mjs +3 -3
  319. package/fesm2022/c8y-ngx-components-services-service-command-tab.mjs.map +1 -1
  320. package/fesm2022/c8y-ngx-components-services-shared.mjs +3 -3
  321. package/fesm2022/c8y-ngx-components-services-shared.mjs.map +1 -1
  322. package/fesm2022/c8y-ngx-components-services.mjs +29 -29
  323. package/fesm2022/c8y-ngx-components-services.mjs.map +1 -1
  324. package/fesm2022/c8y-ngx-components-sigfox-device-registration.mjs +16 -16
  325. package/fesm2022/c8y-ngx-components-sigfox-device-registration.mjs.map +1 -1
  326. package/fesm2022/c8y-ngx-components-sms-gateway.mjs +7 -7
  327. package/fesm2022/c8y-ngx-components-sms-gateway.mjs.map +1 -1
  328. package/fesm2022/c8y-ngx-components-static-assets-data.mjs +3 -3
  329. package/fesm2022/c8y-ngx-components-static-assets-data.mjs.map +1 -1
  330. package/fesm2022/c8y-ngx-components-static-assets-modal.mjs +3 -3
  331. package/fesm2022/c8y-ngx-components-static-assets-modal.mjs.map +1 -1
  332. package/fesm2022/c8y-ngx-components-static-assets.mjs +6 -6
  333. package/fesm2022/c8y-ngx-components-static-assets.mjs.map +1 -1
  334. package/fesm2022/c8y-ngx-components-sub-assets.mjs +60 -60
  335. package/fesm2022/c8y-ngx-components-sub-assets.mjs.map +1 -1
  336. package/fesm2022/c8y-ngx-components-tenants.mjs +40 -40
  337. package/fesm2022/c8y-ngx-components-tenants.mjs.map +1 -1
  338. package/fesm2022/c8y-ngx-components-time-context.mjs +6 -6
  339. package/fesm2022/c8y-ngx-components-time-context.mjs.map +1 -1
  340. package/fesm2022/c8y-ngx-components-tracking.mjs +12 -12
  341. package/fesm2022/c8y-ngx-components-tracking.mjs.map +1 -1
  342. package/fesm2022/c8y-ngx-components-translation-editor-data.mjs +3 -3
  343. package/fesm2022/c8y-ngx-components-translation-editor-data.mjs.map +1 -1
  344. package/fesm2022/c8y-ngx-components-translation-editor-lazy.mjs +12 -12
  345. package/fesm2022/c8y-ngx-components-translation-editor-lazy.mjs.map +1 -1
  346. package/fesm2022/c8y-ngx-components-translation-editor.mjs +6 -6
  347. package/fesm2022/c8y-ngx-components-translation-editor.mjs.map +1 -1
  348. package/fesm2022/c8y-ngx-components-trusted-certificates.mjs +33 -33
  349. package/fesm2022/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
  350. package/fesm2022/c8y-ngx-components-upgrade-upgraded-services.mjs +4 -4
  351. package/fesm2022/c8y-ngx-components-upgrade-upgraded-services.mjs.map +1 -1
  352. package/fesm2022/c8y-ngx-components-upgrade.mjs +41 -41
  353. package/fesm2022/c8y-ngx-components-upgrade.mjs.map +1 -1
  354. package/fesm2022/c8y-ngx-components-user-roles.mjs +10 -10
  355. package/fesm2022/c8y-ngx-components-user-roles.mjs.map +1 -1
  356. package/fesm2022/c8y-ngx-components-widgets-cockpit-exports.mjs.map +1 -1
  357. package/fesm2022/c8y-ngx-components-widgets-cockpit.mjs +4 -4
  358. package/fesm2022/c8y-ngx-components-widgets-cockpit.mjs.map +1 -1
  359. package/fesm2022/c8y-ngx-components-widgets-definitions-alarms-alarm-list.mjs.map +1 -1
  360. package/fesm2022/c8y-ngx-components-widgets-definitions-alarms-all-critical-alarms.mjs.map +1 -1
  361. package/fesm2022/c8y-ngx-components-widgets-definitions-alarms-recent-alarms.mjs.map +1 -1
  362. package/fesm2022/c8y-ngx-components-widgets-definitions-applications.mjs.map +1 -1
  363. package/fesm2022/c8y-ngx-components-widgets-definitions-asset-notes.mjs.map +1 -1
  364. package/fesm2022/c8y-ngx-components-widgets-definitions-cockpit-legacy-welcome.mjs.map +1 -1
  365. package/fesm2022/c8y-ngx-components-widgets-definitions-cockpit-welcome.mjs.map +1 -1
  366. package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-graph.mjs +3 -3
  367. package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-graph.mjs.map +1 -1
  368. package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-table.mjs.map +1 -1
  369. package/fesm2022/c8y-ngx-components-widgets-definitions-device-control-message.mjs.map +1 -1
  370. package/fesm2022/c8y-ngx-components-widgets-definitions-device-management-welcome.mjs.map +1 -1
  371. package/fesm2022/c8y-ngx-components-widgets-definitions-help-and-service.mjs.map +1 -1
  372. package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs +18 -14
  373. package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs.map +1 -1
  374. package/fesm2022/c8y-ngx-components-widgets-definitions-image.mjs +4 -2
  375. package/fesm2022/c8y-ngx-components-widgets-definitions-image.mjs.map +1 -1
  376. package/fesm2022/c8y-ngx-components-widgets-definitions-info-gauge.mjs.map +1 -1
  377. package/fesm2022/c8y-ngx-components-widgets-definitions-kpi.mjs.map +1 -1
  378. package/fesm2022/c8y-ngx-components-widgets-definitions-linear-gauge.mjs.map +1 -1
  379. package/fesm2022/c8y-ngx-components-widgets-definitions-map.mjs.map +1 -1
  380. package/fesm2022/c8y-ngx-components-widgets-definitions-markdown.mjs +4 -2
  381. package/fesm2022/c8y-ngx-components-widgets-definitions-markdown.mjs.map +1 -1
  382. package/fesm2022/c8y-ngx-components-widgets-definitions-quick-links.mjs.map +1 -1
  383. package/fesm2022/c8y-ngx-components-widgets-definitions-radial-gauge.mjs.map +1 -1
  384. package/fesm2022/c8y-ngx-components-widgets-definitions-silo.mjs.map +1 -1
  385. package/fesm2022/c8y-ngx-components-widgets-definitions-three-d-rotation.mjs.map +1 -1
  386. package/fesm2022/c8y-ngx-components-widgets-definitions.mjs.map +1 -1
  387. package/fesm2022/c8y-ngx-components-widgets-device-management.mjs.map +1 -1
  388. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +22 -22
  389. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
  390. package/fesm2022/c8y-ngx-components-widgets-implementations-asset-notes.mjs +3 -3
  391. package/fesm2022/c8y-ngx-components-widgets-implementations-asset-notes.mjs.map +1 -1
  392. package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-legacy-welcome.mjs +3 -3
  393. package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-legacy-welcome.mjs.map +1 -1
  394. package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-welcome.mjs +3 -3
  395. package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-welcome.mjs.map +1 -1
  396. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +6 -6
  397. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
  398. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +50 -36
  399. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs.map +1 -1
  400. package/fesm2022/c8y-ngx-components-widgets-implementations-device-control-message.mjs +3 -3
  401. package/fesm2022/c8y-ngx-components-widgets-implementations-device-control-message.mjs.map +1 -1
  402. package/fesm2022/c8y-ngx-components-widgets-implementations-device-management-welcome.mjs +7 -7
  403. package/fesm2022/c8y-ngx-components-widgets-implementations-device-management-welcome.mjs.map +1 -1
  404. package/fesm2022/c8y-ngx-components-widgets-implementations-help-and-service-widget.mjs +3 -3
  405. package/fesm2022/c8y-ngx-components-widgets-implementations-help-and-service-widget.mjs.map +1 -1
  406. package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs +22 -22
  407. package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs.map +1 -1
  408. package/fesm2022/c8y-ngx-components-widgets-implementations-image.mjs +9 -9
  409. package/fesm2022/c8y-ngx-components-widgets-implementations-image.mjs.map +1 -1
  410. package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs +18 -18
  411. package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs.map +1 -1
  412. package/fesm2022/c8y-ngx-components-widgets-implementations-kpi.mjs +6 -6
  413. package/fesm2022/c8y-ngx-components-widgets-implementations-kpi.mjs.map +1 -1
  414. package/fesm2022/c8y-ngx-components-widgets-implementations-linear-gauge.mjs +6 -6
  415. package/fesm2022/c8y-ngx-components-widgets-implementations-linear-gauge.mjs.map +1 -1
  416. package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs +9 -9
  417. package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs.map +1 -1
  418. package/fesm2022/c8y-ngx-components-widgets-implementations-markdown.mjs +9 -9
  419. package/fesm2022/c8y-ngx-components-widgets-implementations-markdown.mjs.map +1 -1
  420. package/fesm2022/c8y-ngx-components-widgets-implementations-quick-links.mjs +18 -18
  421. package/fesm2022/c8y-ngx-components-widgets-implementations-quick-links.mjs.map +1 -1
  422. package/fesm2022/c8y-ngx-components-widgets-implementations-three-d-rotation.mjs +9 -9
  423. package/fesm2022/c8y-ngx-components-widgets-implementations-three-d-rotation.mjs.map +1 -1
  424. package/fesm2022/c8y-ngx-components-widgets-import-export-config.mjs.map +1 -1
  425. package/fesm2022/c8y-ngx-components-widgets.mjs +4 -4
  426. package/fesm2022/c8y-ngx-components-widgets.mjs.map +1 -1
  427. package/fesm2022/c8y-ngx-components.mjs +1329 -1317
  428. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  429. package/icon-selector/icons/index.d.ts +1 -1
  430. package/icon-selector/icons/platform/index.d.ts +2 -2
  431. package/icon-selector/icons/platform/index.d.ts.map +1 -1
  432. package/locales/de.po +26 -3
  433. package/locales/es.po +26 -3
  434. package/locales/fr.po +26 -3
  435. package/locales/ja_JP.po +25 -3
  436. package/locales/ko.po +26 -3
  437. package/locales/locales.pot +22 -2
  438. package/locales/nl.po +26 -3
  439. package/locales/pl.po +26 -3
  440. package/locales/pt_BR.po +26 -3
  441. package/locales/zh_CN.po +26 -3
  442. package/locales/zh_TW.po +26 -3
  443. package/package.json +1 -1
  444. package/replace-device/replace-device.module.d.ts.map +1 -1
  445. package/sensor-phone/sensor-phone-modal/sensor-phone-modal.component.d.ts +6 -6
  446. package/sensor-phone/sensor-phone-modal/sensor-phone-modal.component.d.ts.map +1 -1
  447. package/sensor-phone/sensor-phone-modal/sensor-phone.model.d.ts +0 -1
  448. package/sensor-phone/sensor-phone-modal/sensor-phone.model.d.ts.map +1 -1
  449. package/sensor-phone/sensor-phone.module.d.ts +2 -3
  450. package/sensor-phone/sensor-phone.module.d.ts.map +1 -1
  451. package/widgets/definitions/datapoints-table/index.d.ts +1 -2
  452. package/widgets/definitions/datapoints-table/index.d.ts.map +1 -1
  453. package/widgets/definitions/html-widget/html-widget-config.factory.d.ts +1 -1
  454. package/widgets/definitions/html-widget/html-widget-config.factory.d.ts.map +1 -1
  455. package/widgets/definitions/image/index.d.ts +1 -1
  456. package/widgets/definitions/image/index.d.ts.map +1 -1
  457. package/widgets/definitions/markdown/index.d.ts +1 -1
  458. package/widgets/definitions/markdown/index.d.ts.map +1 -1
  459. package/widgets/implementations/datapoints-table/datapoints-table-view/datapoints-table-view.component.d.ts.map +1 -1
  460. package/widgets/implementations/three-d-rotation/three-d-rotation-widget-view/three-d-rotation-widget-view.component.d.ts.map +1 -1
@@ -55,10 +55,10 @@ class RemoteAccessConnectButtonComponent {
55
55
  }, { allowSignalWrites: true });
56
56
  return resultSignal.asReadonly();
57
57
  }
58
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: RemoteAccessConnectButtonComponent, deps: [{ token: i1.RemoteAccessService }, { token: i2.CellRendererContext, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
59
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.14", type: RemoteAccessConnectButtonComponent, isStandalone: true, selector: "c8y-remote-access-connect-button", inputs: { deviceId: { classPropertyName: "deviceId", publicName: "deviceId", isSignal: true, isRequired: false, transformFunction: null }, configurationId: { classPropertyName: "configurationId", publicName: "configurationId", isSignal: true, isRequired: false, transformFunction: null }, protocol: { classPropertyName: "protocol", publicName: "protocol", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<a\n *ngIf=\"connectHref() as endpointHref\"\n [title]=\"'Connect' | translate\"\n [routerLink]=\"endpointHref\"\n [attr.data-cy]=\"'remoteAccessConnectButton'\"\n>\n <i [c8yIcon]=\"'connected'\"></i>\n</a>\n", dependencies: [{ kind: "directive", type: RouterLinkWithHref, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
58
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RemoteAccessConnectButtonComponent, deps: [{ token: i1.RemoteAccessService }, { token: i2.CellRendererContext, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
59
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.15", type: RemoteAccessConnectButtonComponent, isStandalone: true, selector: "c8y-remote-access-connect-button", inputs: { deviceId: { classPropertyName: "deviceId", publicName: "deviceId", isSignal: true, isRequired: false, transformFunction: null }, configurationId: { classPropertyName: "configurationId", publicName: "configurationId", isSignal: true, isRequired: false, transformFunction: null }, protocol: { classPropertyName: "protocol", publicName: "protocol", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<a\n *ngIf=\"connectHref() as endpointHref\"\n [title]=\"'Connect' | translate\"\n [routerLink]=\"endpointHref\"\n [attr.data-cy]=\"'remoteAccessConnectButton'\"\n>\n <i [c8yIcon]=\"'connected'\"></i>\n</a>\n", dependencies: [{ kind: "directive", type: RouterLinkWithHref, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
60
60
  }
61
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: RemoteAccessConnectButtonComponent, decorators: [{
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RemoteAccessConnectButtonComponent, decorators: [{
62
62
  type: Component,
63
63
  args: [{ selector: 'c8y-remote-access-connect-button', standalone: true, imports: [RouterLinkWithHref, IconDirective, NgIf, C8yTranslatePipe], template: "<a\n *ngIf=\"connectHref() as endpointHref\"\n [title]=\"'Connect' | translate\"\n [routerLink]=\"endpointHref\"\n [attr.data-cy]=\"'remoteAccessConnectButton'\"\n>\n <i [c8yIcon]=\"'connected'\"></i>\n</a>\n" }]
64
64
  }], ctorParameters: () => [{ type: i1.RemoteAccessService }, { type: i2.CellRendererContext, decorators: [{
@@ -83,10 +83,10 @@ class RemoteAccessPickProtocolModalComponent {
83
83
  this.bsModalRef.hide();
84
84
  this._resolve(protocol);
85
85
  }
86
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: RemoteAccessPickProtocolModalComponent, deps: [{ token: i1$1.BsModalRef }], target: i0.ɵɵFactoryTarget.Component }); }
87
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: RemoteAccessPickProtocolModalComponent, isStandalone: true, selector: "c8y-remote-access-pick-protocol-modal", ngImport: i0, template: "<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n [labels]=\"{ cancel: 'Cancel' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'laptop'\"></span>\n </ng-container>\n <div class=\"p-24\">\n <c8y-li *ngFor=\"let provider of protocolProviders\">\n <c8y-li-icon>\n <i [c8yIcon]=\"provider.protocolIcon\"></i>\n </c8y-li-icon>\n <c8y-li-body>\n <div class=\"d-flex j-c-between\">\n <div>\n <p>{{ provider.protocolLabel | translate }}</p>\n <p>\n <small>{{ provider.protocolDescription | translate }}</small>\n </p>\n </div>\n <div>\n <button\n class=\"btn btn-primary\"\n (click)=\"selectProtocol(provider)\"\n [attr.data-cy]=\"'remoteAccessPickProtocolModal--select-' + provider.protocolName\"\n >\n <span translate>Select</span>\n </button>\n </div>\n </div>\n </c8y-li-body>\n </c8y-li>\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: "component", type: i2.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i2.ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: i2.ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }] }); }
86
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RemoteAccessPickProtocolModalComponent, deps: [{ token: i1$1.BsModalRef }], target: i0.ɵɵFactoryTarget.Component }); }
87
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: RemoteAccessPickProtocolModalComponent, isStandalone: true, selector: "c8y-remote-access-pick-protocol-modal", ngImport: i0, template: "<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n [labels]=\"{ cancel: 'Cancel' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'laptop'\"></span>\n </ng-container>\n <div class=\"p-24\">\n <c8y-li *ngFor=\"let provider of protocolProviders\">\n <c8y-li-icon>\n <i [c8yIcon]=\"provider.protocolIcon\"></i>\n </c8y-li-icon>\n <c8y-li-body>\n <div class=\"d-flex j-c-between\">\n <div>\n <p>{{ provider.protocolLabel | translate }}</p>\n <p>\n <small>{{ provider.protocolDescription | translate }}</small>\n </p>\n </div>\n <div>\n <button\n class=\"btn btn-primary\"\n (click)=\"selectProtocol(provider)\"\n [attr.data-cy]=\"'remoteAccessPickProtocolModal--select-' + provider.protocolName\"\n >\n <span translate>Select</span>\n </button>\n </div>\n </div>\n </c8y-li-body>\n </c8y-li>\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: "component", type: i2.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i2.ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: i2.ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }] }); }
88
88
  }
89
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: RemoteAccessPickProtocolModalComponent, decorators: [{
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RemoteAccessPickProtocolModalComponent, decorators: [{
90
90
  type: Component,
91
91
  args: [{ selector: 'c8y-remote-access-pick-protocol-modal', standalone: true, imports: [CoreModule], template: "<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n [labels]=\"{ cancel: 'Cancel' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'laptop'\"></span>\n </ng-container>\n <div class=\"p-24\">\n <c8y-li *ngFor=\"let provider of protocolProviders\">\n <c8y-li-icon>\n <i [c8yIcon]=\"provider.protocolIcon\"></i>\n </c8y-li-icon>\n <c8y-li-body>\n <div class=\"d-flex j-c-between\">\n <div>\n <p>{{ provider.protocolLabel | translate }}</p>\n <p>\n <small>{{ provider.protocolDescription | translate }}</small>\n </p>\n </div>\n <div>\n <button\n class=\"btn btn-primary\"\n (click)=\"selectProtocol(provider)\"\n [attr.data-cy]=\"'remoteAccessPickProtocolModal--select-' + provider.protocolName\"\n >\n <span translate>Select</span>\n </button>\n </div>\n </div>\n </c8y-li-body>\n </c8y-li>\n </div>\n</c8y-modal>\n" }]
92
92
  }], ctorParameters: () => [{ type: i1$1.BsModalRef }] });
@@ -283,10 +283,10 @@ class RemoteAccessConfigurationListComponent {
283
283
  return null;
284
284
  }
285
285
  }
286
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: RemoteAccessConfigurationListComponent, deps: [{ token: i1.RemoteAccessService }, { token: i2$1.ActivatedRoute }, { token: i2.ModalService }, { token: i2.AlertService }, { token: i1$1.BsModalService }, { token: i5.TranslateService }, { token: i2.ContextRouteService }], target: i0.ɵɵFactoryTarget.Component }); }
287
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: RemoteAccessConfigurationListComponent, isStandalone: true, selector: "c8y-remote-access-configuration-list", ngImport: i0, template: "<c8y-title translate>Remote access</c8y-title>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n (click)=\"addEndpoint()\"\n [disabled]=\"!protocolProviders?.length\"\n [attr.data-cy]=\"'remoteAccessConfigurationList--add-endpoint'\"\n >\n <i [c8yIcon]=\"'plus-circle'\"></i>\n <span translate>Add endpoint</span>\n </button>\n</c8y-action-bar-item>\n\n<div class=\"content-fullpage d-flex d-col border-top\">\n <c8y-data-grid\n [title]=\"gridTitle\"\n [rows]=\"rows\"\n [columns]=\"columns\"\n [pagination]=\"pagination\"\n (onReload)=\"reload()\"\n [actionControls]=\"actionControls\"\n [displayOptions]=\"displayOptions\"\n >\n <c8y-ui-empty-state\n [icon]=\"'window-restore'\"\n [title]=\"'No endpoints configured.' | translate\"\n [subtitle]=\"'Click below to add your first endpoint.' | translate\"\n [horizontal]=\"false\"\n >\n <button\n class=\"btn btn-default\"\n (click)=\"addEndpoint()\"\n translate\n >\n Add endpoint\n </button>\n </c8y-ui-empty-state>\n </c8y-data-grid>\n</div>\n", dependencies: [{ kind: "ngmodule", type: DataGridModule }, { kind: "component", type: i2.DataGridComponent, selector: "c8y-data-grid", inputs: ["title", "loadMoreItemsLabel", "loadingItemsLabel", "showSearch", "refresh", "columns", "rows", "pagination", "childNodePagination", "infiniteScroll", "serverSideDataCallback", "selectable", "singleSelection", "selectionPrimaryKey", "displayOptions", "actionControls", "bulkActionControls", "headerActionControls", "searchText", "configureColumnsEnabled", "showCounterWarning", "activeClassName", "expandableRows", "treeGrid", "hideReload", "childNodesProperty", "parentNodeLabelProperty"], outputs: ["rowMouseOver", "rowMouseLeave", "rowClick", "onConfigChange", "onBeforeFilter", "onBeforeSearch", "onFilter", "itemsSelect", "onReload", "onAddCustomColumn", "onRemoveCustomColumn", "onColumnFilterReset", "onSort", "onPageSizeChange", "onColumnReordered", "onColumnVisibilityChange"] }, { kind: "component", type: TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-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: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
286
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RemoteAccessConfigurationListComponent, deps: [{ token: i1.RemoteAccessService }, { token: i2$1.ActivatedRoute }, { token: i2.ModalService }, { token: i2.AlertService }, { token: i1$1.BsModalService }, { token: i5.TranslateService }, { token: i2.ContextRouteService }], target: i0.ɵɵFactoryTarget.Component }); }
287
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: RemoteAccessConfigurationListComponent, isStandalone: true, selector: "c8y-remote-access-configuration-list", ngImport: i0, template: "<c8y-title translate>Remote access</c8y-title>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n (click)=\"addEndpoint()\"\n [disabled]=\"!protocolProviders?.length\"\n [attr.data-cy]=\"'remoteAccessConfigurationList--add-endpoint'\"\n >\n <i [c8yIcon]=\"'plus-circle'\"></i>\n <span translate>Add endpoint</span>\n </button>\n</c8y-action-bar-item>\n\n<div class=\"content-fullpage d-flex d-col border-top\">\n <c8y-data-grid\n [title]=\"gridTitle\"\n [rows]=\"rows\"\n [columns]=\"columns\"\n [pagination]=\"pagination\"\n (onReload)=\"reload()\"\n [actionControls]=\"actionControls\"\n [displayOptions]=\"displayOptions\"\n >\n <c8y-ui-empty-state\n [icon]=\"'window-restore'\"\n [title]=\"'No endpoints configured.' | translate\"\n [subtitle]=\"'Click below to add your first endpoint.' | translate\"\n [horizontal]=\"false\"\n >\n <button\n class=\"btn btn-default\"\n (click)=\"addEndpoint()\"\n translate\n >\n Add endpoint\n </button>\n </c8y-ui-empty-state>\n </c8y-data-grid>\n</div>\n", dependencies: [{ kind: "ngmodule", type: DataGridModule }, { kind: "component", type: i2.DataGridComponent, selector: "c8y-data-grid", inputs: ["title", "loadMoreItemsLabel", "loadingItemsLabel", "showSearch", "refresh", "columns", "rows", "pagination", "childNodePagination", "infiniteScroll", "serverSideDataCallback", "selectable", "singleSelection", "selectionPrimaryKey", "displayOptions", "actionControls", "bulkActionControls", "headerActionControls", "searchText", "configureColumnsEnabled", "showCounterWarning", "activeClassName", "expandableRows", "treeGrid", "hideReload", "childNodesProperty", "parentNodeLabelProperty"], outputs: ["rowMouseOver", "rowMouseLeave", "rowClick", "onConfigChange", "onBeforeFilter", "onBeforeSearch", "onFilter", "itemsSelect", "onReload", "onAddCustomColumn", "onRemoveCustomColumn", "onColumnFilterReset", "onSort", "onPageSizeChange", "onColumnReordered", "onColumnVisibilityChange"] }, { kind: "component", type: TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-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: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
288
288
  }
289
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: RemoteAccessConfigurationListComponent, decorators: [{
289
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RemoteAccessConfigurationListComponent, decorators: [{
290
290
  type: Component,
291
291
  args: [{ selector: 'c8y-remote-access-configuration-list', standalone: true, imports: [
292
292
  DataGridModule,
@@ -1 +1 @@
1
- {"version":3,"file":"c8y-ngx-components-remote-access-configurations.mjs","sources":["../../remote-access/configurations/remote-access-configuration-list/remote-access-connect-button/remote-access-connect-button.component.ts","../../remote-access/configurations/remote-access-configuration-list/remote-access-connect-button/remote-access-connect-button.component.html","../../remote-access/configurations/remote-access-pick-protocol-modal/remote-access-pick-protocol-modal.component.ts","../../remote-access/configurations/remote-access-pick-protocol-modal/remote-access-pick-protocol-modal.component.html","../../remote-access/configurations/remote-access-configuration-list/remote-access-configuration-list.component.ts","../../remote-access/configurations/remote-access-configuration-list/remote-access-configuration-list.component.html","../../remote-access/configurations/index.ts","../../remote-access/configurations/c8y-ngx-components-remote-access-configurations.ts"],"sourcesContent":["import { NgIf } from '@angular/common';\nimport { Component, effect, input, Optional, signal } from '@angular/core';\nimport { RouterLinkWithHref } from '@angular/router';\nimport { C8yTranslatePipe, CellRendererContext, IconDirective } from '@c8y/ngx-components';\nimport {\n RemoteAccessProtocolProvider,\n RemoteAccessService\n} from '@c8y/ngx-components/remote-access/data';\n\n@Component({\n selector: 'c8y-remote-access-connect-button',\n templateUrl: './remote-access-connect-button.component.html',\n standalone: true,\n imports: [RouterLinkWithHref, IconDirective, NgIf, C8yTranslatePipe]\n})\nexport class RemoteAccessConnectButtonComponent {\n deviceId = input<string>(null);\n configurationId = input<string>(null);\n protocol = input<string>(null);\n\n connectHref: ReturnType<RemoteAccessConnectButtonComponent['getEndpointHref']>;\n\n private protocolProviders: RemoteAccessProtocolProvider[] = [];\n\n constructor(\n private remoteAccess: RemoteAccessService,\n @Optional() private context?: CellRendererContext\n ) {\n this.protocolProviders = this.remoteAccess.getProtocolProviders();\n this.connectHref = this.getEndpointHref();\n }\n\n getEndpointHref() {\n const resultSignal = signal<string>(null);\n\n effect(\n async () => {\n let deviceId = this.deviceId();\n let configurationId = this.configurationId();\n let protocol = this.protocol();\n if (this.context) {\n if (!deviceId) {\n deviceId = (<any>this.context.property)?.target;\n }\n if (!configurationId) {\n configurationId = this.context.item.id;\n }\n if (!protocol) {\n protocol = this.context.item.protocol;\n }\n }\n if (!deviceId || !configurationId || !protocol) {\n resultSignal.set(null);\n return;\n }\n\n const provider = this.protocolProviders.find(p => p.protocolName === protocol);\n if (!provider || !provider.connectEndpointHref) {\n resultSignal.set(null);\n return;\n }\n const href = await provider.connectEndpointHref(\n deviceId,\n this.context.item || { id: configurationId }\n );\n resultSignal.set(href);\n },\n { allowSignalWrites: true }\n );\n\n return resultSignal.asReadonly();\n }\n}\n","<a\n *ngIf=\"connectHref() as endpointHref\"\n [title]=\"'Connect' | translate\"\n [routerLink]=\"endpointHref\"\n [attr.data-cy]=\"'remoteAccessConnectButton'\"\n>\n <i [c8yIcon]=\"'connected'\"></i>\n</a>\n","import { Component } from '@angular/core';\nimport { CoreModule, gettext } from '@c8y/ngx-components';\nimport { RemoteAccessProtocolProvider } from '@c8y/ngx-components/remote-access/data';\nimport { BsModalRef } from 'ngx-bootstrap/modal';\n\n@Component({\n selector: 'c8y-remote-access-pick-protocol-modal',\n templateUrl: './remote-access-pick-protocol-modal.component.html',\n standalone: true,\n imports: [CoreModule]\n})\nexport class RemoteAccessPickProtocolModalComponent {\n title = gettext('Select a protocol');\n result = new Promise<RemoteAccessProtocolProvider>((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n\n // set via initialState\n protocolProviders: RemoteAccessProtocolProvider[] = [];\n\n private _resolve: (value: RemoteAccessProtocolProvider) => void;\n private _reject: (reason?: any) => void;\n\n constructor(private bsModalRef: BsModalRef) {}\n\n cancel() {\n this._reject();\n }\n\n selectProtocol(protocol: RemoteAccessProtocolProvider) {\n this.bsModalRef.hide();\n this._resolve(protocol);\n }\n}\n","<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n [labels]=\"{ cancel: 'Cancel' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'laptop'\"></span>\n </ng-container>\n <div class=\"p-24\">\n <c8y-li *ngFor=\"let provider of protocolProviders\">\n <c8y-li-icon>\n <i [c8yIcon]=\"provider.protocolIcon\"></i>\n </c8y-li-icon>\n <c8y-li-body>\n <div class=\"d-flex j-c-between\">\n <div>\n <p>{{ provider.protocolLabel | translate }}</p>\n <p>\n <small>{{ provider.protocolDescription | translate }}</small>\n </p>\n </div>\n <div>\n <button\n class=\"btn btn-primary\"\n (click)=\"selectProtocol(provider)\"\n [attr.data-cy]=\"'remoteAccessPickProtocolModal--select-' + provider.protocolName\"\n >\n <span translate>Select</span>\n </button>\n </div>\n </div>\n </c8y-li-body>\n </c8y-li>\n </div>\n</c8y-modal>\n","import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport {\n ActionBarItemComponent,\n ActionControl,\n AlertService,\n BuiltInActionType,\n C8yTranslateDirective,\n C8yTranslatePipe,\n Column,\n ContextRouteService,\n DataGridModule,\n DisplayOptions,\n EmptyComponent,\n EmptyStateComponent,\n gettext,\n IconDirective,\n ModalService,\n Pagination,\n Status,\n TitleComponent\n} from '@c8y/ngx-components';\nimport {\n RemoteAccessConfiguration,\n RemoteAccessProtocolProvider,\n RemoteAccessService\n} from '@c8y/ngx-components/remote-access/data';\nimport { RemoteAccessConnectButtonComponent } from './remote-access-connect-button/remote-access-connect-button.component';\nimport { BsModalService } from 'ngx-bootstrap/modal';\nimport { RemoteAccessPickProtocolModalComponent } from '../remote-access-pick-protocol-modal/remote-access-pick-protocol-modal.component';\nimport { IconDeviceGridColumn } from '@c8y/ngx-components/device-grid';\nimport { TranslateService } from '@ngx-translate/core';\nimport { IManagedObject } from '@c8y/client';\n\n@Component({\n selector: 'c8y-remote-access-configuration-list',\n templateUrl: './remote-access-configuration-list.component.html',\n standalone: true,\n imports: [\n DataGridModule,\n TitleComponent,\n C8yTranslateDirective,\n ActionBarItemComponent,\n IconDirective,\n EmptyStateComponent,\n C8yTranslatePipe\n ]\n})\nexport class RemoteAccessConfigurationListComponent implements OnInit {\n rows: RemoteAccessConfiguration[] = [];\n columns: Column[] = [\n new IconDeviceGridColumn(\n {\n headerCellRendererComponent: EmptyComponent\n },\n context => {\n const provider = this.protocolProviders.find(p => p.protocolName === context.item.protocol);\n return provider?.protocolIcon || 'laptop';\n }\n ),\n {\n name: 'name',\n header: gettext('Endpoint'),\n path: 'name'\n },\n {\n name: 'hostname',\n header: gettext('Host'),\n path: 'hostname'\n },\n {\n name: 'port',\n header: gettext('Port'),\n path: 'port'\n },\n {\n name: 'protocol',\n header: gettext('Protocol'),\n path: 'protocol'\n },\n {\n name: 'connect',\n header: gettext('Connect'),\n cellRendererComponent: RemoteAccessConnectButtonComponent\n }\n ];\n actionControls: ActionControl[] = [\n {\n type: BuiltInActionType.Edit,\n callback: async (entry: RemoteAccessConfiguration) => {\n const provider = this.getProtocolProviderForConfiguration(entry);\n\n try {\n let result: RemoteAccessConfiguration;\n if (provider.editEndpoint) {\n result = await provider.editEndpoint(this.deviceId, entry);\n } else {\n result = await this.defaultEditEndpoint(this.deviceId, entry);\n }\n\n if (!result) {\n return;\n }\n\n this.alert.success(gettext('Endpoint saved.'));\n } catch (e) {\n console.warn(e);\n this.alert.danger(gettext('Failed to save endpoint.'), e);\n }\n this.reload();\n }\n },\n {\n type: BuiltInActionType.Delete,\n callback: async (entry: RemoteAccessConfiguration) => {\n const result = await this.modalService.confirm(\n gettext('Delete endpoint'),\n this.translateService.instant(\n gettext(\n `You are about to delete endpoint \"{{ endpointName }}\". Do you want to proceed?`\n ),\n { endpointName: entry.name }\n ),\n Status.DANGER,\n { cancel: gettext('Cancel'), ok: gettext('Delete') }\n );\n if (!result) {\n return;\n }\n\n const provider = this.getProtocolProviderForConfiguration(entry);\n\n try {\n await provider.removeEndpoint(this.deviceId, entry);\n this.alert.success(gettext('Endpoint deleted.'));\n } catch (e) {\n console.warn(e);\n this.alert.danger(gettext('Failed to delete endpoint.'), e);\n }\n this.reload();\n }\n }\n ];\n deviceId: string;\n pagination: Pagination = {\n pageSize: 10,\n currentPage: 1\n };\n displayOptions: DisplayOptions = {\n bordered: false,\n striped: true,\n filter: true,\n gridHeader: true,\n hover: true\n };\n protocolProviders: RemoteAccessProtocolProvider[] = [];\n gridTitle = gettext('Remote access endpoints');\n\n private device: IManagedObject;\n\n constructor(\n private remoteAccess: RemoteAccessService,\n private activatedRoute: ActivatedRoute,\n private modalService: ModalService,\n private alert: AlertService,\n private bsModalService: BsModalService,\n private translateService: TranslateService,\n private ctx: ContextRouteService\n ) {\n this.device = this.ctx.getContextData(this.activatedRoute)?.contextData as IManagedObject;\n this.deviceId = this.device?.id as string;\n this.protocolProviders = this.remoteAccess.getSupportedProtocolProvidersFor(this.device);\n const connectColum = this.columns.find(c => c.name === 'connect');\n if (connectColum) {\n (<any>connectColum).target = this.deviceId;\n }\n }\n\n ngOnInit() {\n this.reload();\n }\n\n async reload() {\n const configurations = await this.remoteAccess.listConfigurations(this.deviceId);\n const supportedProtocols = this.remoteAccess.getSupportedProtocolProvidersFor(this.device);\n const supportedProtocolsNames = supportedProtocols.map(p => p.protocolName);\n this.rows = configurations.filter(c =>\n supportedProtocolsNames.includes(c.protocol.toUpperCase())\n );\n }\n\n async addEndpoint() {\n let provider: RemoteAccessProtocolProvider = null;\n if (this.protocolProviders.length > 1) {\n try {\n const modalRef = this.bsModalService.show(RemoteAccessPickProtocolModalComponent, {\n initialState: { protocolProviders: this.protocolProviders }\n });\n provider = await modalRef.content.result;\n } catch (e) {\n // modal closed\n return;\n }\n } else if (this.protocolProviders.length === 1) {\n provider = this.protocolProviders[0];\n } else {\n return;\n }\n\n try {\n let addModalResult: RemoteAccessConfiguration = null;\n if (provider.addEndpoint) {\n addModalResult = await provider.addEndpoint(this.deviceId);\n } else {\n addModalResult = await this.defaultAddEndpoint(this.deviceId, provider);\n }\n if (!addModalResult) {\n return;\n }\n this.alert.success(gettext('Endpoint added.'));\n } catch (e) {\n console.warn(e);\n this.alert.danger(gettext('Failed to add endpoint.'), e);\n }\n this.reload();\n }\n\n getProtocolProviderForConfiguration(configuration: RemoteAccessConfiguration) {\n return this.protocolProviders.find(p => p.protocolName === configuration.protocol);\n }\n\n async defaultEditEndpoint(deviceId: string, configuration: RemoteAccessConfiguration) {\n const modalResult = await this.openBasicEndpointModal(configuration);\n if (!modalResult) {\n return modalResult;\n }\n\n return this.remoteAccess.updateConfiguration(deviceId, modalResult);\n }\n\n async defaultAddEndpoint(deviceId: string, provider: RemoteAccessProtocolProvider) {\n let defaultConfig = { protocol: provider.protocolName };\n if (provider.getDefaultEndpointConfiguration) {\n const defaultConfigFromProvider = await provider.getDefaultEndpointConfiguration();\n defaultConfig = { ...defaultConfig, ...defaultConfigFromProvider };\n }\n const modalResult = await this.openBasicEndpointModal(defaultConfig);\n if (!modalResult) {\n return modalResult;\n }\n\n return this.remoteAccess.addConfiguration(deviceId, modalResult);\n }\n\n async openBasicEndpointModal(\n currentConfiguration: Partial<RemoteAccessConfiguration>\n ): Promise<RemoteAccessConfiguration | null> {\n const { RemoteAccessBasicEndpointModalComponent } = await import(\n '@c8y/ngx-components/remote-access/shared'\n );\n\n try {\n const modalRef = this.bsModalService.show(RemoteAccessBasicEndpointModalComponent, {\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","<c8y-title translate>Remote access</c8y-title>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n (click)=\"addEndpoint()\"\n [disabled]=\"!protocolProviders?.length\"\n [attr.data-cy]=\"'remoteAccessConfigurationList--add-endpoint'\"\n >\n <i [c8yIcon]=\"'plus-circle'\"></i>\n <span translate>Add endpoint</span>\n </button>\n</c8y-action-bar-item>\n\n<div class=\"content-fullpage d-flex d-col border-top\">\n <c8y-data-grid\n [title]=\"gridTitle\"\n [rows]=\"rows\"\n [columns]=\"columns\"\n [pagination]=\"pagination\"\n (onReload)=\"reload()\"\n [actionControls]=\"actionControls\"\n [displayOptions]=\"displayOptions\"\n >\n <c8y-ui-empty-state\n [icon]=\"'window-restore'\"\n [title]=\"'No endpoints configured.' | translate\"\n [subtitle]=\"'Click below to add your first endpoint.' | translate\"\n [horizontal]=\"false\"\n >\n <button\n class=\"btn btn-default\"\n (click)=\"addEndpoint()\"\n translate\n >\n Add endpoint\n </button>\n </c8y-ui-empty-state>\n </c8y-data-grid>\n</div>\n","import { hookRoute, ViewContext } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { RemoteAccessConfigurationListComponent } from './remote-access-configuration-list/remote-access-configuration-list.component';\nimport { canActivateRemoteAccess } from '@c8y/ngx-components/remote-access/data';\n\nexport * from './remote-access-configuration-list/remote-access-configuration-list.component';\n\nexport const remoteAccessConfigurationListProviders = [\n hookRoute({\n component: RemoteAccessConfigurationListComponent,\n label: gettext('Remote access'),\n path: 'remote_access',\n icon: 'window-restore',\n context: ViewContext.Device,\n canActivate: [canActivateRemoteAccess]\n })\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i3","i4","gettext"],"mappings":";;;;;;;;;;;;;;;MAea,kCAAkC,CAAA;IAS7C,WACU,CAAA,YAAiC,EACrB,OAA6B,EAAA;QADz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AAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,UAAA,EAAA,SAAA,EAAA,iBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,aAAa,EACb,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,mBAAmB,+GACnB,gBAAgB,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAGP,sCAAsC,EAAA,UAAA,EAAA,CAAA;kBAdlD,SAAS;+BACE,sCAAsC,EAAA,UAAA,EAEpC,IAAI,EACP,OAAA,EAAA;wBACP,cAAc;wBACd,cAAc;wBACd,qBAAqB;wBACrB,sBAAsB;wBACtB,aAAa;wBACb,mBAAmB;wBACnB;AACD,qBAAA,EAAA,QAAA,EAAA,8nCAAA,EAAA;;;AEvCU,MAAA,sCAAsC,GAAG;AACpD,IAAA,SAAS,CAAC;AACR,QAAA,SAAS,EAAE,sCAAsC;AACjD,QAAA,KAAK,EAAEE,SAAO,CAAC,eAAe,CAAC;AAC/B,QAAA,IAAI,EAAE,eAAe;AACrB,QAAA,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE,WAAW,CAAC,MAAM;QAC3B,WAAW,EAAE,CAAC,uBAAuB;KACtC;;;ACfH;;AAEG;;;;"}
1
+ {"version":3,"file":"c8y-ngx-components-remote-access-configurations.mjs","sources":["../../remote-access/configurations/remote-access-configuration-list/remote-access-connect-button/remote-access-connect-button.component.ts","../../remote-access/configurations/remote-access-configuration-list/remote-access-connect-button/remote-access-connect-button.component.html","../../remote-access/configurations/remote-access-pick-protocol-modal/remote-access-pick-protocol-modal.component.ts","../../remote-access/configurations/remote-access-pick-protocol-modal/remote-access-pick-protocol-modal.component.html","../../remote-access/configurations/remote-access-configuration-list/remote-access-configuration-list.component.ts","../../remote-access/configurations/remote-access-configuration-list/remote-access-configuration-list.component.html","../../remote-access/configurations/index.ts","../../remote-access/configurations/c8y-ngx-components-remote-access-configurations.ts"],"sourcesContent":["import { NgIf } from '@angular/common';\nimport { Component, effect, input, Optional, signal } from '@angular/core';\nimport { RouterLinkWithHref } from '@angular/router';\nimport { C8yTranslatePipe, CellRendererContext, IconDirective } from '@c8y/ngx-components';\nimport {\n RemoteAccessProtocolProvider,\n RemoteAccessService\n} from '@c8y/ngx-components/remote-access/data';\n\n@Component({\n selector: 'c8y-remote-access-connect-button',\n templateUrl: './remote-access-connect-button.component.html',\n standalone: true,\n imports: [RouterLinkWithHref, IconDirective, NgIf, C8yTranslatePipe]\n})\nexport class RemoteAccessConnectButtonComponent {\n deviceId = input<string>(null);\n configurationId = input<string>(null);\n protocol = input<string>(null);\n\n connectHref: ReturnType<RemoteAccessConnectButtonComponent['getEndpointHref']>;\n\n private protocolProviders: RemoteAccessProtocolProvider[] = [];\n\n constructor(\n private remoteAccess: RemoteAccessService,\n @Optional() private context?: CellRendererContext\n ) {\n this.protocolProviders = this.remoteAccess.getProtocolProviders();\n this.connectHref = this.getEndpointHref();\n }\n\n getEndpointHref() {\n const resultSignal = signal<string>(null);\n\n effect(\n async () => {\n let deviceId = this.deviceId();\n let configurationId = this.configurationId();\n let protocol = this.protocol();\n if (this.context) {\n if (!deviceId) {\n deviceId = (<any>this.context.property)?.target;\n }\n if (!configurationId) {\n configurationId = this.context.item.id;\n }\n if (!protocol) {\n protocol = this.context.item.protocol;\n }\n }\n if (!deviceId || !configurationId || !protocol) {\n resultSignal.set(null);\n return;\n }\n\n const provider = this.protocolProviders.find(p => p.protocolName === protocol);\n if (!provider || !provider.connectEndpointHref) {\n resultSignal.set(null);\n return;\n }\n const href = await provider.connectEndpointHref(\n deviceId,\n this.context.item || { id: configurationId }\n );\n resultSignal.set(href);\n },\n { allowSignalWrites: true }\n );\n\n return resultSignal.asReadonly();\n }\n}\n","<a\n *ngIf=\"connectHref() as endpointHref\"\n [title]=\"'Connect' | translate\"\n [routerLink]=\"endpointHref\"\n [attr.data-cy]=\"'remoteAccessConnectButton'\"\n>\n <i [c8yIcon]=\"'connected'\"></i>\n</a>\n","import { Component } from '@angular/core';\nimport { CoreModule, gettext } from '@c8y/ngx-components';\nimport { RemoteAccessProtocolProvider } from '@c8y/ngx-components/remote-access/data';\nimport { BsModalRef } from 'ngx-bootstrap/modal';\n\n@Component({\n selector: 'c8y-remote-access-pick-protocol-modal',\n templateUrl: './remote-access-pick-protocol-modal.component.html',\n standalone: true,\n imports: [CoreModule]\n})\nexport class RemoteAccessPickProtocolModalComponent {\n title = gettext('Select a protocol');\n result = new Promise<RemoteAccessProtocolProvider>((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n\n // set via initialState\n protocolProviders: RemoteAccessProtocolProvider[] = [];\n\n private _resolve: (value: RemoteAccessProtocolProvider) => void;\n private _reject: (reason?: any) => void;\n\n constructor(private bsModalRef: BsModalRef) {}\n\n cancel() {\n this._reject();\n }\n\n selectProtocol(protocol: RemoteAccessProtocolProvider) {\n this.bsModalRef.hide();\n this._resolve(protocol);\n }\n}\n","<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n [labels]=\"{ cancel: 'Cancel' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'laptop'\"></span>\n </ng-container>\n <div class=\"p-24\">\n <c8y-li *ngFor=\"let provider of protocolProviders\">\n <c8y-li-icon>\n <i [c8yIcon]=\"provider.protocolIcon\"></i>\n </c8y-li-icon>\n <c8y-li-body>\n <div class=\"d-flex j-c-between\">\n <div>\n <p>{{ provider.protocolLabel | translate }}</p>\n <p>\n <small>{{ provider.protocolDescription | translate }}</small>\n </p>\n </div>\n <div>\n <button\n class=\"btn btn-primary\"\n (click)=\"selectProtocol(provider)\"\n [attr.data-cy]=\"'remoteAccessPickProtocolModal--select-' + provider.protocolName\"\n >\n <span translate>Select</span>\n </button>\n </div>\n </div>\n </c8y-li-body>\n </c8y-li>\n </div>\n</c8y-modal>\n","import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport {\n ActionBarItemComponent,\n ActionControl,\n AlertService,\n BuiltInActionType,\n C8yTranslateDirective,\n C8yTranslatePipe,\n Column,\n ContextRouteService,\n DataGridModule,\n DisplayOptions,\n EmptyComponent,\n EmptyStateComponent,\n gettext,\n IconDirective,\n ModalService,\n Pagination,\n Status,\n TitleComponent\n} from '@c8y/ngx-components';\nimport {\n RemoteAccessConfiguration,\n RemoteAccessProtocolProvider,\n RemoteAccessService\n} from '@c8y/ngx-components/remote-access/data';\nimport { RemoteAccessConnectButtonComponent } from './remote-access-connect-button/remote-access-connect-button.component';\nimport { BsModalService } from 'ngx-bootstrap/modal';\nimport { RemoteAccessPickProtocolModalComponent } from '../remote-access-pick-protocol-modal/remote-access-pick-protocol-modal.component';\nimport { IconDeviceGridColumn } from '@c8y/ngx-components/device-grid';\nimport { TranslateService } from '@ngx-translate/core';\nimport { IManagedObject } from '@c8y/client';\n\n@Component({\n selector: 'c8y-remote-access-configuration-list',\n templateUrl: './remote-access-configuration-list.component.html',\n standalone: true,\n imports: [\n DataGridModule,\n TitleComponent,\n C8yTranslateDirective,\n ActionBarItemComponent,\n IconDirective,\n EmptyStateComponent,\n C8yTranslatePipe\n ]\n})\nexport class RemoteAccessConfigurationListComponent implements OnInit {\n rows: RemoteAccessConfiguration[] = [];\n columns: Column[] = [\n new IconDeviceGridColumn(\n {\n headerCellRendererComponent: EmptyComponent\n },\n context => {\n const provider = this.protocolProviders.find(p => p.protocolName === context.item.protocol);\n return provider?.protocolIcon || 'laptop';\n }\n ),\n {\n name: 'name',\n header: gettext('Endpoint'),\n path: 'name'\n },\n {\n name: 'hostname',\n header: gettext('Host'),\n path: 'hostname'\n },\n {\n name: 'port',\n header: gettext('Port'),\n path: 'port'\n },\n {\n name: 'protocol',\n header: gettext('Protocol'),\n path: 'protocol'\n },\n {\n name: 'connect',\n header: gettext('Connect'),\n cellRendererComponent: RemoteAccessConnectButtonComponent\n }\n ];\n actionControls: ActionControl[] = [\n {\n type: BuiltInActionType.Edit,\n callback: async (entry: RemoteAccessConfiguration) => {\n const provider = this.getProtocolProviderForConfiguration(entry);\n\n try {\n let result: RemoteAccessConfiguration;\n if (provider.editEndpoint) {\n result = await provider.editEndpoint(this.deviceId, entry);\n } else {\n result = await this.defaultEditEndpoint(this.deviceId, entry);\n }\n\n if (!result) {\n return;\n }\n\n this.alert.success(gettext('Endpoint saved.'));\n } catch (e) {\n console.warn(e);\n this.alert.danger(gettext('Failed to save endpoint.'), e);\n }\n this.reload();\n }\n },\n {\n type: BuiltInActionType.Delete,\n callback: async (entry: RemoteAccessConfiguration) => {\n const result = await this.modalService.confirm(\n gettext('Delete endpoint'),\n this.translateService.instant(\n gettext(\n `You are about to delete endpoint \"{{ endpointName }}\". Do you want to proceed?`\n ),\n { endpointName: entry.name }\n ),\n Status.DANGER,\n { cancel: gettext('Cancel'), ok: gettext('Delete') }\n );\n if (!result) {\n return;\n }\n\n const provider = this.getProtocolProviderForConfiguration(entry);\n\n try {\n await provider.removeEndpoint(this.deviceId, entry);\n this.alert.success(gettext('Endpoint deleted.'));\n } catch (e) {\n console.warn(e);\n this.alert.danger(gettext('Failed to delete endpoint.'), e);\n }\n this.reload();\n }\n }\n ];\n deviceId: string;\n pagination: Pagination = {\n pageSize: 10,\n currentPage: 1\n };\n displayOptions: DisplayOptions = {\n bordered: false,\n striped: true,\n filter: true,\n gridHeader: true,\n hover: true\n };\n protocolProviders: RemoteAccessProtocolProvider[] = [];\n gridTitle = gettext('Remote access endpoints');\n\n private device: IManagedObject;\n\n constructor(\n private remoteAccess: RemoteAccessService,\n private activatedRoute: ActivatedRoute,\n private modalService: ModalService,\n private alert: AlertService,\n private bsModalService: BsModalService,\n private translateService: TranslateService,\n private ctx: ContextRouteService\n ) {\n this.device = this.ctx.getContextData(this.activatedRoute)?.contextData as IManagedObject;\n this.deviceId = this.device?.id as string;\n this.protocolProviders = this.remoteAccess.getSupportedProtocolProvidersFor(this.device);\n const connectColum = this.columns.find(c => c.name === 'connect');\n if (connectColum) {\n (<any>connectColum).target = this.deviceId;\n }\n }\n\n ngOnInit() {\n this.reload();\n }\n\n async reload() {\n const configurations = await this.remoteAccess.listConfigurations(this.deviceId);\n const supportedProtocols = this.remoteAccess.getSupportedProtocolProvidersFor(this.device);\n const supportedProtocolsNames = supportedProtocols.map(p => p.protocolName);\n this.rows = configurations.filter(c =>\n supportedProtocolsNames.includes(c.protocol.toUpperCase())\n );\n }\n\n async addEndpoint() {\n let provider: RemoteAccessProtocolProvider = null;\n if (this.protocolProviders.length > 1) {\n try {\n const modalRef = this.bsModalService.show(RemoteAccessPickProtocolModalComponent, {\n initialState: { protocolProviders: this.protocolProviders }\n });\n provider = await modalRef.content.result;\n } catch (e) {\n // modal closed\n return;\n }\n } else if (this.protocolProviders.length === 1) {\n provider = this.protocolProviders[0];\n } else {\n return;\n }\n\n try {\n let addModalResult: RemoteAccessConfiguration = null;\n if (provider.addEndpoint) {\n addModalResult = await provider.addEndpoint(this.deviceId);\n } else {\n addModalResult = await this.defaultAddEndpoint(this.deviceId, provider);\n }\n if (!addModalResult) {\n return;\n }\n this.alert.success(gettext('Endpoint added.'));\n } catch (e) {\n console.warn(e);\n this.alert.danger(gettext('Failed to add endpoint.'), e);\n }\n this.reload();\n }\n\n getProtocolProviderForConfiguration(configuration: RemoteAccessConfiguration) {\n return this.protocolProviders.find(p => p.protocolName === configuration.protocol);\n }\n\n async defaultEditEndpoint(deviceId: string, configuration: RemoteAccessConfiguration) {\n const modalResult = await this.openBasicEndpointModal(configuration);\n if (!modalResult) {\n return modalResult;\n }\n\n return this.remoteAccess.updateConfiguration(deviceId, modalResult);\n }\n\n async defaultAddEndpoint(deviceId: string, provider: RemoteAccessProtocolProvider) {\n let defaultConfig = { protocol: provider.protocolName };\n if (provider.getDefaultEndpointConfiguration) {\n const defaultConfigFromProvider = await provider.getDefaultEndpointConfiguration();\n defaultConfig = { ...defaultConfig, ...defaultConfigFromProvider };\n }\n const modalResult = await this.openBasicEndpointModal(defaultConfig);\n if (!modalResult) {\n return modalResult;\n }\n\n return this.remoteAccess.addConfiguration(deviceId, modalResult);\n }\n\n async openBasicEndpointModal(\n currentConfiguration: Partial<RemoteAccessConfiguration>\n ): Promise<RemoteAccessConfiguration | null> {\n const { RemoteAccessBasicEndpointModalComponent } = await import(\n '@c8y/ngx-components/remote-access/shared'\n );\n\n try {\n const modalRef = this.bsModalService.show(RemoteAccessBasicEndpointModalComponent, {\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","<c8y-title translate>Remote access</c8y-title>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n (click)=\"addEndpoint()\"\n [disabled]=\"!protocolProviders?.length\"\n [attr.data-cy]=\"'remoteAccessConfigurationList--add-endpoint'\"\n >\n <i [c8yIcon]=\"'plus-circle'\"></i>\n <span translate>Add endpoint</span>\n </button>\n</c8y-action-bar-item>\n\n<div class=\"content-fullpage d-flex d-col border-top\">\n <c8y-data-grid\n [title]=\"gridTitle\"\n [rows]=\"rows\"\n [columns]=\"columns\"\n [pagination]=\"pagination\"\n (onReload)=\"reload()\"\n [actionControls]=\"actionControls\"\n [displayOptions]=\"displayOptions\"\n >\n <c8y-ui-empty-state\n [icon]=\"'window-restore'\"\n [title]=\"'No endpoints configured.' | translate\"\n [subtitle]=\"'Click below to add your first endpoint.' | translate\"\n [horizontal]=\"false\"\n >\n <button\n class=\"btn btn-default\"\n (click)=\"addEndpoint()\"\n translate\n >\n Add endpoint\n </button>\n </c8y-ui-empty-state>\n </c8y-data-grid>\n</div>\n","import { hookRoute, ViewContext } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { RemoteAccessConfigurationListComponent } from './remote-access-configuration-list/remote-access-configuration-list.component';\nimport { canActivateRemoteAccess } from '@c8y/ngx-components/remote-access/data';\n\nexport * from './remote-access-configuration-list/remote-access-configuration-list.component';\n\nexport const remoteAccessConfigurationListProviders = [\n hookRoute({\n component: RemoteAccessConfigurationListComponent,\n label: gettext('Remote access'),\n path: 'remote_access',\n icon: 'window-restore',\n context: ViewContext.Device,\n canActivate: [canActivateRemoteAccess]\n })\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i3","i4","gettext"],"mappings":";;;;;;;;;;;;;;;MAea,kCAAkC,CAAA;IAS7C,WAAA,CACU,YAAiC,EACrB,OAA6B,EAAA;QADzC,IAAA,CAAA,YAAY,GAAZ,YAAY;QACA,IAAA,CAAA,OAAO,GAAP,OAAO;AAV7B,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,IAAI,CAAC;AAC9B,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAS,IAAI,CAAC;AACrC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,IAAI,CAAC;QAItB,IAAA,CAAA,iBAAiB,GAAmC,EAAE;QAM5D,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,YAAY,CAAC,oBAAoB,EAAE;AACjE,QAAA,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,eAAe,EAAE;IAC3C;IAEA,eAAe,GAAA;AACb,QAAA,MAAM,YAAY,GAAG,MAAM,CAAS,IAAI,CAAC;QAEzC,MAAM,CACJ,YAAW;AACT,YAAA,IAAI,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE;AAC9B,YAAA,IAAI,eAAe,GAAG,IAAI,CAAC,eAAe,EAAE;AAC5C,YAAA,IAAI,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE;AAC9B,YAAA,IAAI,IAAI,CAAC,OAAO,EAAE;gBAChB,IAAI,CAAC,QAAQ,EAAE;oBACb,QAAQ,GAAS,IAAI,CAAC,OAAO,CAAC,QAAS,EAAE,MAAM;gBACjD;gBACA,I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E,sCAAsC;AACjD,QAAA,KAAK,EAAEE,SAAO,CAAC,eAAe,CAAC;AAC/B,QAAA,IAAI,EAAE,eAAe;AACrB,QAAA,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE,WAAW,CAAC,MAAM;QAC3B,WAAW,EAAE,CAAC,uBAAuB;KACtC;;;ACfH;;AAEG;;;;"}
@@ -199,10 +199,10 @@ class RemoteAccessService {
199
199
  return false;
200
200
  }
201
201
  }
202
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: RemoteAccessService, deps: [{ token: i1.FetchClient }, { token: i2.ServiceRegistry }], target: i0.ɵɵFactoryTarget.Injectable }); }
203
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: RemoteAccessService, providedIn: 'root' }); }
202
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RemoteAccessService, deps: [{ token: i1.FetchClient }, { token: i2.ServiceRegistry }], target: i0.ɵɵFactoryTarget.Injectable }); }
203
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RemoteAccessService, providedIn: 'root' }); }
204
204
  }
205
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: RemoteAccessService, decorators: [{
205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RemoteAccessService, decorators: [{
206
206
  type: Injectable,
207
207
  args: [{
208
208
  providedIn: 'root'
@@ -1 +1 @@
1
- {"version":3,"file":"c8y-ngx-components-remote-access-data.mjs","sources":["../../remote-access/data/remote-access.service.ts","../../remote-access/data/c8y-ngx-components-remote-access-data.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivateFn } from '@angular/router';\nimport { FetchClient, IManagedObject } from '@c8y/client';\nimport {\n ContextRouteService,\n Permissions,\n ServiceRegistry,\n ViewContext\n} from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { Observable, defer, shareReplay } from 'rxjs';\nimport { RemoteAccessProtocolProvider } from './remote-access-protocol-provider';\nimport { uniqWith, intersectionWith, isEqual } from 'lodash';\n\nexport interface RemoteAccessConfiguration {\n id: string;\n name: string;\n hostname: string;\n port: number;\n protocol: string;\n attrs?: any;\n credentials?: any;\n credentialsType?: string;\n}\n\nexport const CREDENTIALS_TYPES = {\n NONE: {\n name: 'NONE',\n value: 'NONE',\n label: gettext('No password')\n },\n USER_PASS: {\n name: 'USER_PASS',\n value: 'USER_PASS',\n label: gettext('Username and password')\n },\n PASS_ONLY: {\n name: 'PASS_ONLY',\n value: 'PASS_ONLY',\n label: gettext('Password only')\n },\n KEY_PAIR: {\n name: 'KEY_PAIR',\n value: 'KEY_PAIR',\n label: gettext('Public/private keys')\n },\n CERTIFICATE: {\n name: 'CERTIFICATE',\n value: 'CERTIFICATE',\n label: gettext('Certificate')\n }\n} as const;\n\nexport const canActivateRemoteAccess: CanActivateFn = (route: ActivatedRouteSnapshot) => {\n const permissions = inject(Permissions);\n const remoteAccessService = inject(RemoteAccessService);\n const contextRouteService = inject(ContextRouteService);\n if (!permissions.hasRole(Permissions.ROLE_REMOTE_ACCESS_ADMIN)) {\n return false;\n }\n\n const contextDetails = contextRouteService.getContextData(route);\n if (contextDetails.context !== ViewContext.Device) {\n return false;\n }\n\n const device = contextDetails.contextData as IManagedObject;\n if (!device || !Array.isArray(device.c8y_SupportedOperations)) {\n return false;\n }\n const supportedOperations: string[] = device.c8y_SupportedOperations;\n if (!supportedOperations.includes('c8y_RemoteAccessConnect')) {\n return false;\n }\n return remoteAccessService.isAvailable$();\n};\n\n@Injectable({\n providedIn: 'root'\n})\nexport class RemoteAccessService {\n private cachedIsAvailable$: Observable<boolean>;\n readonly baseUrl = '/service/remoteaccess';\n constructor(\n private fetchClient: FetchClient,\n private serviceRegistry: ServiceRegistry\n ) {}\n\n /**\n * Verifies if the remote access service is available by sending a HEAD request to is's health endpoint.\n * @returns cached Observable that emits true if the service is available, false otherwise.\n */\n isAvailable$(): Observable<boolean> {\n if (!this.cachedIsAvailable$) {\n this.cachedIsAvailable$ = defer(() => this.healthEndpointAvailable()).pipe(shareReplay(1));\n }\n\n return this.cachedIsAvailable$;\n }\n\n /**\n * misses the leading ? for the query params\n */\n getAuthQueryParamsForWebsocketConnection() {\n const { headers } = this.fetchClient.getFetchOptions();\n const params = new URLSearchParams();\n\n if (headers) {\n const xsrfToken = headers['X-XSRF-TOKEN'];\n const auth = headers['Authorization'];\n\n if (xsrfToken) {\n params.append('XSRF-TOKEN', xsrfToken);\n }\n if (auth) {\n params.append('token', auth.replace('Bearer ', '').replace('Basic ', ''));\n }\n }\n\n const paramsString = params.toString();\n return paramsString;\n }\n\n /**\n * Returns the URI for the websocket connection to the remote access service.\n */\n getWebSocketUri<K extends string, I extends string>(deviceId: K, configurationId: I) {\n const authQueryParams = this.getAuthQueryParamsForWebsocketConnection();\n const protocol = window.location.protocol === 'http:' ? 'ws' : 'wss';\n const pathName =\n `${protocol}://${window.location.host}${this.baseUrl}/client/${deviceId}/configurations/${configurationId}` as const;\n return authQueryParams ? (`${pathName}?${authQueryParams}` as const) : pathName;\n }\n\n /**\n * Retrieves all configurations for a given device.\n */\n async listConfigurations(deviceId: string): Promise<RemoteAccessConfiguration[]> {\n const response = await this.fetchClient.fetch(\n `${this.baseUrl}/devices/${deviceId}/configurations`\n );\n if (response.ok) {\n return response.json();\n }\n\n throw new Error(`Failed to fetch configurations for device ${deviceId}`);\n }\n\n /**\n * Deletes a configuration for a given device.\n */\n async deleteConfiguration(deviceId: string, configurationId: string) {\n const response = await this.fetchClient.fetch(\n `${this.baseUrl}/devices/${deviceId}/configurations/${configurationId}`,\n { method: 'DELETE' }\n );\n\n if (response.ok) {\n return;\n }\n\n throw new Error(`Failed to delete configuration for device ${deviceId}`);\n }\n\n /**\n * Retrieves all available remote access protocol providers.\n */\n getProtocolProviders() {\n return this.serviceRegistry.get('remoteAccessProtocolHook');\n }\n\n /**\n * Retrieves all supported protocol providers for a given device.\n * Based on the declarations in the fragment c8y_RemoteAccessSupportedProtocols of the device managed object.\n */\n getSupportedProtocolProvidersFor(device: IManagedObject): RemoteAccessProtocolProvider[] {\n const { c8y_RemoteAccessSupportedProtocols = [] } = device;\n const uniqueInput = uniqWith(\n c8y_RemoteAccessSupportedProtocols.map(p => p.toUpperCase()),\n isEqual\n );\n const supportedProviders = intersectionWith(\n this.getProtocolProviders(),\n uniqueInput,\n ({ protocolName }, protocol) => protocolName?.toUpperCase() === protocol\n );\n return supportedProviders?.length > 0 ? supportedProviders : this.getProtocolProviders();\n }\n\n /**\n * Creates a new configuration for a given device.\n */\n async addConfiguration(\n deviceId: string,\n configuration: Omit<RemoteAccessConfiguration, 'id'>\n ): Promise<RemoteAccessConfiguration> {\n const response = await this.fetchClient.fetch(\n `${this.baseUrl}/devices/${deviceId}/configurations`,\n {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(configuration)\n }\n );\n\n if (response.ok) {\n return response.json();\n }\n\n throw new Error(`Failed to add configuration for device ${configuration.attrs.deviceId}`);\n }\n\n /**\n * Updates a configuration for a given device.\n */\n async updateConfiguration(\n deviceId: string,\n configuration: RemoteAccessConfiguration\n ): Promise<RemoteAccessConfiguration> {\n const response = await this.fetchClient.fetch(\n `${this.baseUrl}/devices/${deviceId}/configurations/${configuration.id}`,\n {\n method: 'PUT',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(configuration)\n }\n );\n\n if (response.ok) {\n return response.json();\n }\n\n throw new Error(`Failed to update configuration for device ${configuration.attrs.deviceId}`);\n }\n\n /**\n * Generates a SSH key pair for a given hostname.\n */\n async generateKeyPair(hostname: string): Promise<{ publicKey: string; privateKey: string }> {\n const response = await this.fetchClient.fetch(`${this.baseUrl}/keypair/generate`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({ hostname })\n });\n\n if (response.ok) {\n return response.json();\n }\n\n throw new Error(`Failed to generate key pair for ${hostname}`);\n }\n\n private async healthEndpointAvailable(): Promise<boolean> {\n try {\n const response = await this.fetchClient.fetch(`${this.baseUrl}/health`, {\n method: 'HEAD',\n headers: {\n 'Content-Type': 'application/json'\n }\n });\n\n if (response.ok) {\n return !!response.ok;\n }\n } catch (e) {\n return false;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAyBa,MAAA,iBAAiB,GAAG;AAC/B,IAAA,IAAI,EAAE;AACJ,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,KAAK,EAAE,MAAM;AACb,QAAA,KAAK,EAAE,OAAO,CAAC,aAAa;AAC7B,KAAA;AACD,IAAA,SAAS,EAAE;AACT,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,KAAK,EAAE,WAAW;AAClB,QAAA,KAAK,EAAE,OAAO,CAAC,uBAAuB;AACvC,KAAA;AACD,IAAA,SAAS,EAAE;AACT,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,KAAK,EAAE,WAAW;AAClB,QAAA,KAAK,EAAE,OAAO,CAAC,eAAe;AAC/B,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE,UAAU;AAChB,QAAA,KAAK,EAAE,UAAU;AACjB,QAAA,KAAK,EAAE,OAAO,CAAC,qBAAqB;AACrC,KAAA;AACD,IAAA,WAAW,EAAE;AACX,QAAA,IAAI,EAAE,aAAa;AACnB,QAAA,KAAK,EAAE,aAAa;AACpB,QAAA,KAAK,EAAE,OAAO,CAAC,aAAa;AAC7B;;AAGU,MAAA,uBAAuB,GAAkB,CAAC,KAA6B,KAAI;AACtF,IAAA,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AACvC,IAAA,MA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EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;AC/ED;;AAEG;;;;"}
1
+ {"version":3,"file":"c8y-ngx-components-remote-access-data.mjs","sources":["../../remote-access/data/remote-access.service.ts","../../remote-access/data/c8y-ngx-components-remote-access-data.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivateFn } from '@angular/router';\nimport { FetchClient, IManagedObject } from '@c8y/client';\nimport {\n ContextRouteService,\n Permissions,\n ServiceRegistry,\n ViewContext\n} from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { Observable, defer, shareReplay } from 'rxjs';\nimport { RemoteAccessProtocolProvider } from './remote-access-protocol-provider';\nimport { uniqWith, intersectionWith, isEqual } from 'lodash';\n\nexport interface RemoteAccessConfiguration {\n id: string;\n name: string;\n hostname: string;\n port: number;\n protocol: string;\n attrs?: any;\n credentials?: any;\n credentialsType?: string;\n}\n\nexport const CREDENTIALS_TYPES = {\n NONE: {\n name: 'NONE',\n value: 'NONE',\n label: gettext('No password')\n },\n USER_PASS: {\n name: 'USER_PASS',\n value: 'USER_PASS',\n label: gettext('Username and password')\n },\n PASS_ONLY: {\n name: 'PASS_ONLY',\n value: 'PASS_ONLY',\n label: gettext('Password only')\n },\n KEY_PAIR: {\n name: 'KEY_PAIR',\n value: 'KEY_PAIR',\n label: gettext('Public/private keys')\n },\n CERTIFICATE: {\n name: 'CERTIFICATE',\n value: 'CERTIFICATE',\n label: gettext('Certificate')\n }\n} as const;\n\nexport const canActivateRemoteAccess: CanActivateFn = (route: ActivatedRouteSnapshot) => {\n const permissions = inject(Permissions);\n const remoteAccessService = inject(RemoteAccessService);\n const contextRouteService = inject(ContextRouteService);\n if (!permissions.hasRole(Permissions.ROLE_REMOTE_ACCESS_ADMIN)) {\n return false;\n }\n\n const contextDetails = contextRouteService.getContextData(route);\n if (contextDetails.context !== ViewContext.Device) {\n return false;\n }\n\n const device = contextDetails.contextData as IManagedObject;\n if (!device || !Array.isArray(device.c8y_SupportedOperations)) {\n return false;\n }\n const supportedOperations: string[] = device.c8y_SupportedOperations;\n if (!supportedOperations.includes('c8y_RemoteAccessConnect')) {\n return false;\n }\n return remoteAccessService.isAvailable$();\n};\n\n@Injectable({\n providedIn: 'root'\n})\nexport class RemoteAccessService {\n private cachedIsAvailable$: Observable<boolean>;\n readonly baseUrl = '/service/remoteaccess';\n constructor(\n private fetchClient: FetchClient,\n private serviceRegistry: ServiceRegistry\n ) {}\n\n /**\n * Verifies if the remote access service is available by sending a HEAD request to is's health endpoint.\n * @returns cached Observable that emits true if the service is available, false otherwise.\n */\n isAvailable$(): Observable<boolean> {\n if (!this.cachedIsAvailable$) {\n this.cachedIsAvailable$ = defer(() => this.healthEndpointAvailable()).pipe(shareReplay(1));\n }\n\n return this.cachedIsAvailable$;\n }\n\n /**\n * misses the leading ? for the query params\n */\n getAuthQueryParamsForWebsocketConnection() {\n const { headers } = this.fetchClient.getFetchOptions();\n const params = new URLSearchParams();\n\n if (headers) {\n const xsrfToken = headers['X-XSRF-TOKEN'];\n const auth = headers['Authorization'];\n\n if (xsrfToken) {\n params.append('XSRF-TOKEN', xsrfToken);\n }\n if (auth) {\n params.append('token', auth.replace('Bearer ', '').replace('Basic ', ''));\n }\n }\n\n const paramsString = params.toString();\n return paramsString;\n }\n\n /**\n * Returns the URI for the websocket connection to the remote access service.\n */\n getWebSocketUri<K extends string, I extends string>(deviceId: K, configurationId: I) {\n const authQueryParams = this.getAuthQueryParamsForWebsocketConnection();\n const protocol = window.location.protocol === 'http:' ? 'ws' : 'wss';\n const pathName =\n `${protocol}://${window.location.host}${this.baseUrl}/client/${deviceId}/configurations/${configurationId}` as const;\n return authQueryParams ? (`${pathName}?${authQueryParams}` as const) : pathName;\n }\n\n /**\n * Retrieves all configurations for a given device.\n */\n async listConfigurations(deviceId: string): Promise<RemoteAccessConfiguration[]> {\n const response = await this.fetchClient.fetch(\n `${this.baseUrl}/devices/${deviceId}/configurations`\n );\n if (response.ok) {\n return response.json();\n }\n\n throw new Error(`Failed to fetch configurations for device ${deviceId}`);\n }\n\n /**\n * Deletes a configuration for a given device.\n */\n async deleteConfiguration(deviceId: string, configurationId: string) {\n const response = await this.fetchClient.fetch(\n `${this.baseUrl}/devices/${deviceId}/configurations/${configurationId}`,\n { method: 'DELETE' }\n );\n\n if (response.ok) {\n return;\n }\n\n throw new Error(`Failed to delete configuration for device ${deviceId}`);\n }\n\n /**\n * Retrieves all available remote access protocol providers.\n */\n getProtocolProviders() {\n return this.serviceRegistry.get('remoteAccessProtocolHook');\n }\n\n /**\n * Retrieves all supported protocol providers for a given device.\n * Based on the declarations in the fragment c8y_RemoteAccessSupportedProtocols of the device managed object.\n */\n getSupportedProtocolProvidersFor(device: IManagedObject): RemoteAccessProtocolProvider[] {\n const { c8y_RemoteAccessSupportedProtocols = [] } = device;\n const uniqueInput = uniqWith(\n c8y_RemoteAccessSupportedProtocols.map(p => p.toUpperCase()),\n isEqual\n );\n const supportedProviders = intersectionWith(\n this.getProtocolProviders(),\n uniqueInput,\n ({ protocolName }, protocol) => protocolName?.toUpperCase() === protocol\n );\n return supportedProviders?.length > 0 ? supportedProviders : this.getProtocolProviders();\n }\n\n /**\n * Creates a new configuration for a given device.\n */\n async addConfiguration(\n deviceId: string,\n configuration: Omit<RemoteAccessConfiguration, 'id'>\n ): Promise<RemoteAccessConfiguration> {\n const response = await this.fetchClient.fetch(\n `${this.baseUrl}/devices/${deviceId}/configurations`,\n {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(configuration)\n }\n );\n\n if (response.ok) {\n return response.json();\n }\n\n throw new Error(`Failed to add configuration for device ${configuration.attrs.deviceId}`);\n }\n\n /**\n * Updates a configuration for a given device.\n */\n async updateConfiguration(\n deviceId: string,\n configuration: RemoteAccessConfiguration\n ): Promise<RemoteAccessConfiguration> {\n const response = await this.fetchClient.fetch(\n `${this.baseUrl}/devices/${deviceId}/configurations/${configuration.id}`,\n {\n method: 'PUT',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(configuration)\n }\n );\n\n if (response.ok) {\n return response.json();\n }\n\n throw new Error(`Failed to update configuration for device ${configuration.attrs.deviceId}`);\n }\n\n /**\n * Generates a SSH key pair for a given hostname.\n */\n async generateKeyPair(hostname: string): Promise<{ publicKey: string; privateKey: string }> {\n const response = await this.fetchClient.fetch(`${this.baseUrl}/keypair/generate`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({ hostname })\n });\n\n if (response.ok) {\n return response.json();\n }\n\n throw new Error(`Failed to generate key pair for ${hostname}`);\n }\n\n private async healthEndpointAvailable(): Promise<boolean> {\n try {\n const response = await this.fetchClient.fetch(`${this.baseUrl}/health`, {\n method: 'HEAD',\n headers: {\n 'Content-Type': 'application/json'\n }\n });\n\n if (response.ok) {\n return !!response.ok;\n }\n } catch (e) {\n return false;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAyBO,MAAM,iBAAiB,GAAG;AAC/B,IAAA,IAAI,EAAE;AACJ,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,KAAK,EAAE,MAAM;AACb,QAAA,KAAK,EAAE,OAAO,CAAC,aAAa;AAC7B,KAAA;AACD,IAAA,SAAS,EAAE;AACT,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,KAAK,EAAE,WAAW;AAClB,QAAA,KAAK,EAAE,OAAO,CAAC,uBAAuB;AACvC,KAAA;AACD,IAAA,SAAS,EAAE;AACT,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,KAAK,EAAE,WAAW;AAClB,QAAA,KAAK,EAAE,OAAO,CAAC,eAAe;AAC/B,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE,UAAU;AAChB,QAAA,KAAK,EAAE,UAAU;AACjB,QAAA,KAAK,EAAE,OAAO,CAAC,qBAAqB;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A,EAAA,CAAA,eAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,cAFlB,MAAM,EAAA,CAAA,CAAA;;4FAEP,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;AC/ED;;AAEG;;;;"}
@@ -23,10 +23,10 @@ class PassthroughRemoteAccessProtocolProviderService {
23
23
  port: 22
24
24
  };
25
25
  }
26
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PassthroughRemoteAccessProtocolProviderService, deps: [{ token: i1.RemoteAccessService }], target: i0.ɵɵFactoryTarget.Injectable }); }
27
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PassthroughRemoteAccessProtocolProviderService, providedIn: 'root' }); }
26
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: PassthroughRemoteAccessProtocolProviderService, deps: [{ token: i1.RemoteAccessService }], target: i0.ɵɵFactoryTarget.Injectable }); }
27
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: PassthroughRemoteAccessProtocolProviderService, providedIn: 'root' }); }
28
28
  }
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PassthroughRemoteAccessProtocolProviderService, decorators: [{
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: PassthroughRemoteAccessProtocolProviderService, decorators: [{
30
30
  type: Injectable,
31
31
  args: [{ providedIn: 'root' }]
32
32
  }], ctorParameters: () => [{ type: i1.RemoteAccessService }] });
@@ -1 +1 @@
1
- {"version":3,"file":"c8y-ngx-components-remote-access-passthrough.mjs","sources":["../../remote-access/passthrough/index.ts","../../remote-access/passthrough/c8y-ngx-components-remote-access-passthrough.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { gettext, hookService } from '@c8y/ngx-components';\nimport {\n RemoteAccessConfiguration,\n RemoteAccessProtocolProvider,\n RemoteAccessService\n} from '@c8y/ngx-components/remote-access/data';\n\n@Injectable({ providedIn: 'root' })\nexport class PassthroughRemoteAccessProtocolProviderService\n implements RemoteAccessProtocolProvider\n{\n protocolName = 'PASSTHROUGH';\n protocolLabel = gettext('Passthrough');\n protocolDescription = gettext('Allows to passthrough a TCP connction.');\n protocolIcon = 'globe' as const;\n\n constructor(private remoteAccess: RemoteAccessService) {}\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 | null> {\n return null;\n }\n\n async getDefaultEndpointConfiguration(): Promise<Partial<RemoteAccessConfiguration>> {\n return {\n hostname: '127.0.0.1',\n port: 22\n };\n }\n}\n\nexport const remoteAccessPassthroughProviders = [\n hookService('remoteAccessProtocolHook', PassthroughRemoteAccessProtocolProviderService)\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MASa,8CAA8C,CAAA;AAQzD,IAAA,WAAA,CAAoB,YAAiC,EAAA;QAAjC,IAAY,CAAA,YAAA,GAAZ,YAAY;QALhC,IAAY,CAAA,YAAA,GAAG,aAAa;AAC5B,QAAA,IAAA,CAAA,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;AACtC,QAAA,IAAA,CAAA,mBAAmB,GAAG,OAAO,CAAC,wCAAwC,CAAC;QACvE,IAAY,CAAA,YAAA,GAAG,OAAgB;;IAI/B,cAAc,CACZ,QAAgB,EAChB,qBAAgD,EAAA;AAEhD,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,mBAAmB,CAAC,QAAQ,EAAE,qBAAqB,CAAC,EAAE,CAAC;;AAGlF,IAAA,MAAM,mBAAmB,CACvB,SAAiB,EACjB,cAAyC,EAAA;AAEzC,QAAA,OAAO,IAAI;;AAGb,IAAA,MAAM,+BAA+B,GAAA;QACnC,OAAO;AACL,YAAA,QAAQ,EAAE,WAAW;AACrB,YAAA,IAAI,EAAE;SACP;;+GA5BQ,8CAA8C,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA9C,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,8CAA8C,cADjC,MAAM,EAAA,CAAA,CAAA;;4FACnB,8CAA8C,EAAA,UAAA,EAAA,CAAA;kBAD1D,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;AAiCrB,MAAA,gCAAgC,GAAG;AAC9C,IAAA,WAAW,CAAC,0BAA0B,EAAE,8CAA8C;;;AC1CxF;;AAEG;;;;"}
1
+ {"version":3,"file":"c8y-ngx-components-remote-access-passthrough.mjs","sources":["../../remote-access/passthrough/index.ts","../../remote-access/passthrough/c8y-ngx-components-remote-access-passthrough.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { gettext, hookService } from '@c8y/ngx-components';\nimport {\n RemoteAccessConfiguration,\n RemoteAccessProtocolProvider,\n RemoteAccessService\n} from '@c8y/ngx-components/remote-access/data';\n\n@Injectable({ providedIn: 'root' })\nexport class PassthroughRemoteAccessProtocolProviderService\n implements RemoteAccessProtocolProvider\n{\n protocolName = 'PASSTHROUGH';\n protocolLabel = gettext('Passthrough');\n protocolDescription = gettext('Allows to passthrough a TCP connction.');\n protocolIcon = 'globe' as const;\n\n constructor(private remoteAccess: RemoteAccessService) {}\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 | null> {\n return null;\n }\n\n async getDefaultEndpointConfiguration(): Promise<Partial<RemoteAccessConfiguration>> {\n return {\n hostname: '127.0.0.1',\n port: 22\n };\n }\n}\n\nexport const remoteAccessPassthroughProviders = [\n hookService('remoteAccessProtocolHook', PassthroughRemoteAccessProtocolProviderService)\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MASa,8CAA8C,CAAA;AAQzD,IAAA,WAAA,CAAoB,YAAiC,EAAA;QAAjC,IAAA,CAAA,YAAY,GAAZ,YAAY;QALhC,IAAA,CAAA,YAAY,GAAG,aAAa;AAC5B,QAAA,IAAA,CAAA,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;AACtC,QAAA,IAAA,CAAA,mBAAmB,GAAG,OAAO,CAAC,wCAAwC,CAAC;QACvE,IAAA,CAAA,YAAY,GAAG,OAAgB;IAEyB;IAExD,cAAc,CACZ,QAAgB,EAChB,qBAAgD,EAAA;AAEhD,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,mBAAmB,CAAC,QAAQ,EAAE,qBAAqB,CAAC,EAAE,CAAC;IAClF;AAEA,IAAA,MAAM,mBAAmB,CACvB,SAAiB,EACjB,cAAyC,EAAA;AAEzC,QAAA,OAAO,IAAI;IACb;AAEA,IAAA,MAAM,+BAA+B,GAAA;QACnC,OAAO;AACL,YAAA,QAAQ,EAAE,WAAW;AACrB,YAAA,IAAI,EAAE;SACP;IACH;+GA7BW,8CAA8C,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA9C,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,8CAA8C,cADjC,MAAM,EAAA,CAAA,CAAA;;4FACnB,8CAA8C,EAAA,UAAA,EAAA,CAAA;kBAD1D,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;AAiC3B,MAAM,gCAAgC,GAAG;AAC9C,IAAA,WAAW,CAAC,0BAA0B,EAAE,8CAA8C;;;AC1CxF;;AAEG;;;;"}
@@ -41,10 +41,10 @@ class RemoteAccessBasicEndpointModalComponent {
41
41
  save() {
42
42
  this._resolve(this.form.value);
43
43
  }
44
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: RemoteAccessBasicEndpointModalComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
45
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: RemoteAccessBasicEndpointModalComponent, isStandalone: true, selector: "c8y-remote-access-basic-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 [placeholder]=\"'e.g. {{ example }}' | translate : { example: 'My remote access endpoint' }\"\n name=\"name\"\n type=\"text\"\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 readonly\n name=\"protocol\"\n type=\"text\"\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: '8080' } }}\"\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 </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: "component", type: i2.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { 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.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"] }] }); }
44
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RemoteAccessBasicEndpointModalComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
45
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: RemoteAccessBasicEndpointModalComponent, isStandalone: true, selector: "c8y-remote-access-basic-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 [placeholder]=\"'e.g. {{ example }}' | translate : { example: 'My remote access endpoint' }\"\n name=\"name\"\n type=\"text\"\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 readonly\n name=\"protocol\"\n type=\"text\"\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: '8080' } }}\"\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 </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: "component", type: i2.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { 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.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"] }] }); }
46
46
  }
47
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: RemoteAccessBasicEndpointModalComponent, decorators: [{
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RemoteAccessBasicEndpointModalComponent, decorators: [{
48
48
  type: Component,
49
49
  args: [{ selector: 'c8y-remote-access-basic-endpoint-modal', standalone: true, imports: [CoreModule], 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 [placeholder]=\"'e.g. {{ example }}' | translate : { example: 'My remote access endpoint' }\"\n name=\"name\"\n type=\"text\"\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 readonly\n name=\"protocol\"\n type=\"text\"\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: '8080' } }}\"\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 </div>\n</c8y-modal>\n" }]
50
50
  }], ctorParameters: () => [{ type: i1.FormBuilder }] });
@@ -108,8 +108,8 @@ class SshKeyInputComponent {
108
108
  this.placeholder = type.placeholder;
109
109
  }
110
110
  }
111
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SshKeyInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
112
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SshKeyInputComponent, isStandalone: true, selector: "c8y-ssh-key-input", inputs: { keyType: "keyType" }, providers: [
111
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SshKeyInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
112
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: SshKeyInputComponent, isStandalone: true, selector: "c8y-ssh-key-input", inputs: { keyType: "keyType" }, providers: [
113
113
  {
114
114
  provide: NG_VALUE_ACCESSOR,
115
115
  useExisting: forwardRef(() => SshKeyInputComponent),
@@ -117,7 +117,7 @@ class SshKeyInputComponent {
117
117
  }
118
118
  ], usesOnChanges: true, ngImport: i0, template: "<div class=\"form-group\">\n <div class=\"tight-grid\">\n <div class=\"col-xs-8\">\n <input\n [placeholder]=\"'e.g. {{ example }}' | translate : { example: placeholder }\"\n type=\"text\"\n class=\"form-control\"\n [ngModel]=\"value\"\n (ngModelChange)=\"newValue($event)\"\n [readonly]=\"readonly\"\n [ngModelOptions]=\"{standalone: true}\"\n />\n </div>\n <div class=\"col-xs-4\" *ngIf=\"!readonly\">\n <c8y-drop-area class=\"drop-area-sm\" (dropped)=\"onKeyFileSelected($event)\" [maxAllowedFiles]=\"1\" [icon]=\"'upload'\"></c8y-drop-area>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DropAreaComponent, selector: "c8y-drop-area", inputs: ["formControl", "title", "message", "icon", "loadingMessage", "forceHideList", "alwaysShow", "clickToOpen", "loading", "progress", "maxAllowedFiles", "files", "maxFileSizeInMegaBytes", "accept"], outputs: ["dropped"] }, { kind: "ngmodule", type: FormsModule }, { 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
119
119
  }
120
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SshKeyInputComponent, decorators: [{
120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SshKeyInputComponent, decorators: [{
121
121
  type: Component,
122
122
  args: [{ selector: 'c8y-ssh-key-input', standalone: true, imports: [C8yTranslatePipe, NgIf, DropAreaComponent, FormsModule], providers: [
123
123
  {
@@ -1 +1 @@
1
- {"version":3,"file":"c8y-ngx-components-remote-access-shared.mjs","sources":["../../remote-access/shared/remote-access-basic-endpoint-modal/remote-access-basic-endpoint-modal.component.ts","../../remote-access/shared/remote-access-basic-endpoint-modal/remote-access-basic-endpoint-modal.component.html","../../remote-access/shared/ssh-key-input/ssh-key-input.component.ts","../../remote-access/shared/ssh-key-input/ssh-key-input.component.html","../../remote-access/shared/c8y-ngx-components-remote-access-shared.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\nimport { FormBuilder, Validators } from '@angular/forms';\nimport { CoreModule, gettext } from '@c8y/ngx-components';\nimport { RemoteAccessConfiguration } from '@c8y/ngx-components/remote-access/data';\n\n@Component({\n selector: 'c8y-remote-access-basic-endpoint-modal',\n templateUrl: './remote-access-basic-endpoint-modal.component.html',\n standalone: true,\n imports: [CoreModule]\n})\nexport class RemoteAccessBasicEndpointModalComponent implements OnInit {\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 patchedValue = { ...rest, credentialsType };\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: ['', [Validators.required, Validators.minLength(1)]],\n port: [undefined as number, [Validators.required, Validators.min(1), Validators.max(65535)]],\n protocol: ['', [Validators.required, Validators.minLength(1)]],\n credentialsType: ['NONE' as 'NONE' | 'PASS_ONLY', [Validators.required]],\n attrs: [undefined]\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 [placeholder]=\"'e.g. {{ example }}' | translate : { example: 'My remote access endpoint' }\"\n name=\"name\"\n type=\"text\"\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 readonly\n name=\"protocol\"\n type=\"text\"\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: '8080' } }}\"\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 </div>\n</c8y-modal>\n","import { NgIf } from '@angular/common';\nimport { Component, forwardRef, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { C8yTranslatePipe, DropAreaComponent, DroppedFile } from '@c8y/ngx-components';\n\nconst types = [\n {\n name: 'PRIVATE',\n value: 'private',\n placeholder:\n '-----BEGIN RSA PRIVATE KEY----- MIIEpAIBAAK...VQvopm2xw==----- END RSA PRIVATE KEY-----'\n },\n {\n name: 'PUBLIC',\n value: 'public',\n placeholder: 'ssh-rsa AAAAB3NzaC...1kc3MAAACB== user@example.com'\n },\n {\n name: 'CERTIFICATE',\n value: 'certificate',\n placeholder: 'ssh-rsa-cert-v01@openssh.com AAAAHHNz...Y9gBU= user@example.com'\n }\n] as const;\n\n@Component({\n selector: 'c8y-ssh-key-input',\n templateUrl: './ssh-key-input.component.html',\n standalone: true,\n imports: [C8yTranslatePipe, NgIf, DropAreaComponent, FormsModule],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SshKeyInputComponent),\n multi: true\n }\n ]\n})\nexport class SshKeyInputComponent implements OnInit, OnChanges, ControlValueAccessor {\n @Input() keyType: (typeof types)[number]['value'] = types[0].value;\n readonly = false;\n\n placeholder: string;\n\n value = '';\n\n onChange: (value: string) => void;\n onTouch: () => void;\n\n writeValue(obj: string): void {\n this.value = obj;\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouch = fn;\n }\n\n setDisabledState?(isDisabled: boolean): void {\n this.readonly = isDisabled;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.keyType) {\n this.reassignPlaceholder();\n }\n }\n\n ngOnInit() {\n this.reassignPlaceholder();\n }\n\n async onKeyFileSelected(event: DroppedFile[]) {\n const file = event[0];\n const content = await file.readAsText();\n this.newValue(content);\n }\n\n newValue(value: string) {\n this.value = value;\n this.onChange(value);\n this.onTouch();\n }\n\n private reassignPlaceholder() {\n const type = types.find(t => t.value === this.keyType);\n if (type) {\n this.placeholder = type.placeholder;\n }\n }\n}\n","<div class=\"form-group\">\n <div class=\"tight-grid\">\n <div class=\"col-xs-8\">\n <input\n [placeholder]=\"'e.g. {{ example }}' | translate : { example: placeholder }\"\n type=\"text\"\n class=\"form-control\"\n [ngModel]=\"value\"\n (ngModelChange)=\"newValue($event)\"\n [readonly]=\"readonly\"\n [ngModelOptions]=\"{standalone: true}\"\n />\n </div>\n <div class=\"col-xs-4\" *ngIf=\"!readonly\">\n <c8y-drop-area class=\"drop-area-sm\" (dropped)=\"onKeyFileSelected($event)\" [maxAllowedFiles]=\"1\" [icon]=\"'upload'\"></c8y-drop-area>\n </div>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAWa,uCAAuC,CAAA;AAclD,IAAA,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;;AAEG;;;;"}
1
+ {"version":3,"file":"c8y-ngx-components-remote-access-shared.mjs","sources":["../../remote-access/shared/remote-access-basic-endpoint-modal/remote-access-basic-endpoint-modal.component.ts","../../remote-access/shared/remote-access-basic-endpoint-modal/remote-access-basic-endpoint-modal.component.html","../../remote-access/shared/ssh-key-input/ssh-key-input.component.ts","../../remote-access/shared/ssh-key-input/ssh-key-input.component.html","../../remote-access/shared/c8y-ngx-components-remote-access-shared.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\nimport { FormBuilder, Validators } from '@angular/forms';\nimport { CoreModule, gettext } from '@c8y/ngx-components';\nimport { RemoteAccessConfiguration } from '@c8y/ngx-components/remote-access/data';\n\n@Component({\n selector: 'c8y-remote-access-basic-endpoint-modal',\n templateUrl: './remote-access-basic-endpoint-modal.component.html',\n standalone: true,\n imports: [CoreModule]\n})\nexport class RemoteAccessBasicEndpointModalComponent implements OnInit {\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 patchedValue = { ...rest, credentialsType };\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: ['', [Validators.required, Validators.minLength(1)]],\n port: [undefined as number, [Validators.required, Validators.min(1), Validators.max(65535)]],\n protocol: ['', [Validators.required, Validators.minLength(1)]],\n credentialsType: ['NONE' as 'NONE' | 'PASS_ONLY', [Validators.required]],\n attrs: [undefined]\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 [placeholder]=\"'e.g. {{ example }}' | translate : { example: 'My remote access endpoint' }\"\n name=\"name\"\n type=\"text\"\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 readonly\n name=\"protocol\"\n type=\"text\"\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: '8080' } }}\"\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 </div>\n</c8y-modal>\n","import { NgIf } from '@angular/common';\nimport { Component, forwardRef, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { C8yTranslatePipe, DropAreaComponent, DroppedFile } from '@c8y/ngx-components';\n\nconst types = [\n {\n name: 'PRIVATE',\n value: 'private',\n placeholder:\n '-----BEGIN RSA PRIVATE KEY----- MIIEpAIBAAK...VQvopm2xw==----- END RSA PRIVATE KEY-----'\n },\n {\n name: 'PUBLIC',\n value: 'public',\n placeholder: 'ssh-rsa AAAAB3NzaC...1kc3MAAACB== user@example.com'\n },\n {\n name: 'CERTIFICATE',\n value: 'certificate',\n placeholder: 'ssh-rsa-cert-v01@openssh.com AAAAHHNz...Y9gBU= user@example.com'\n }\n] as const;\n\n@Component({\n selector: 'c8y-ssh-key-input',\n templateUrl: './ssh-key-input.component.html',\n standalone: true,\n imports: [C8yTranslatePipe, NgIf, DropAreaComponent, FormsModule],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SshKeyInputComponent),\n multi: true\n }\n ]\n})\nexport class SshKeyInputComponent implements OnInit, OnChanges, ControlValueAccessor {\n @Input() keyType: (typeof types)[number]['value'] = types[0].value;\n readonly = false;\n\n placeholder: string;\n\n value = '';\n\n onChange: (value: string) => void;\n onTouch: () => void;\n\n writeValue(obj: string): void {\n this.value = obj;\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouch = fn;\n }\n\n setDisabledState?(isDisabled: boolean): void {\n this.readonly = isDisabled;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.keyType) {\n this.reassignPlaceholder();\n }\n }\n\n ngOnInit() {\n this.reassignPlaceholder();\n }\n\n async onKeyFileSelected(event: DroppedFile[]) {\n const file = event[0];\n const content = await file.readAsText();\n this.newValue(content);\n }\n\n newValue(value: string) {\n this.value = value;\n this.onChange(value);\n this.onTouch();\n }\n\n private reassignPlaceholder() {\n const type = types.find(t => t.value === this.keyType);\n if (type) {\n this.placeholder = type.placeholder;\n }\n }\n}\n","<div class=\"form-group\">\n <div class=\"tight-grid\">\n <div class=\"col-xs-8\">\n <input\n [placeholder]=\"'e.g. {{ example }}' | translate : { example: placeholder }\"\n type=\"text\"\n class=\"form-control\"\n [ngModel]=\"value\"\n (ngModelChange)=\"newValue($event)\"\n [readonly]=\"readonly\"\n [ngModelOptions]=\"{standalone: true}\"\n />\n </div>\n <div class=\"col-xs-4\" *ngIf=\"!readonly\">\n <c8y-drop-area class=\"drop-area-sm\" (dropped)=\"onKeyFileSelected($event)\" [maxAllowedFiles]=\"1\" [icon]=\"'upload'\"></c8y-drop-area>\n </div>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAWa,uCAAuC,CAAA;AAclD,IAAA,WAAA,CAAoB,WAAwB,EAAA;QAAxB,IAAA,CAAA,WAAW,GAAX,WAAW;AAb/B,QAAA,IAAA,CAAA,KAAK,GAAG,OAAO,CAAC,wBAAwB,CAAC;QAKzC,IAAA,CAAA,MAAM,GAAG,IAAI,OAAO,CAA4C,CAAC,OAAO,EAAE,MAAM,KAAI;AAClF,YAAA,IAAI,CAAC,QAAQ,GAAG,OAAO;AACvB,YAAA,IAAI,CAAC,OAAO,GAAG,MAAM;AACvB,QAAA,CAAC,CAAC;AAMA,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE;IAC7B;IAEA,QAAQ,GAAA;AACN,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;YACrB,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,YAAY;AAClD,YAAA,MAAM,eAAe,GAAG,WAAW,EAAE,IAAI,IAAI,MAAM;YACnD,MAAM,YAAY,GAAG,EAAE,GAAG,IAAI,EAAE,eAAe,EAAE;AACjD,YAAA,IAAI,CAAC,IAAI,CAA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