@c8y/ngx-components 1023.71.1 → 1023.75.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/asset-properties/index.d.ts +19 -1
  2. package/asset-properties/index.d.ts.map +1 -1
  3. package/cockpit-config/index.d.ts +4 -3
  4. package/cockpit-config/index.d.ts.map +1 -1
  5. package/context-dashboard/index.d.ts +202 -4
  6. package/context-dashboard/index.d.ts.map +1 -1
  7. package/datapoints-export-selector/index.d.ts +8 -1
  8. package/datapoints-export-selector/index.d.ts.map +1 -1
  9. package/device-profile/index.d.ts +8 -1
  10. package/device-profile/index.d.ts.map +1 -1
  11. package/events/cockpit/index.d.ts +6 -0
  12. package/events/cockpit/index.d.ts.map +1 -0
  13. package/events/devicemanagement/index.d.ts +6 -0
  14. package/events/devicemanagement/index.d.ts.map +1 -0
  15. package/events/events-timeline/index.d.ts +10 -10
  16. package/events/events-timeline/index.d.ts.map +1 -1
  17. package/events/index.d.ts +363 -5
  18. package/events/index.d.ts.map +1 -1
  19. package/fesm2022/c8y-ngx-components-alarm-event-selector.mjs +1 -1
  20. package/fesm2022/c8y-ngx-components-alarm-event-selector.mjs.map +1 -1
  21. package/fesm2022/c8y-ngx-components-alarms.mjs +1 -1
  22. package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
  23. package/fesm2022/c8y-ngx-components-asset-properties.mjs +2 -2
  24. package/fesm2022/c8y-ngx-components-asset-properties.mjs.map +1 -1
  25. package/fesm2022/c8y-ngx-components-auth-configuration.mjs +1 -1
  26. package/fesm2022/c8y-ngx-components-auth-configuration.mjs.map +1 -1
  27. package/fesm2022/c8y-ngx-components-branding-shared-lazy-add-branding-modal.mjs +1 -1
  28. package/fesm2022/c8y-ngx-components-branding-shared-lazy-add-branding-modal.mjs.map +1 -1
  29. package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs +2 -2
  30. package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs.map +1 -1
  31. package/fesm2022/c8y-ngx-components-cockpit-config.mjs +8 -11
  32. package/fesm2022/c8y-ngx-components-cockpit-config.mjs.map +1 -1
  33. package/fesm2022/{c8y-ngx-components-computed-asset-properties-alarm-count-config.component-CPLDClTp.mjs → c8y-ngx-components-computed-asset-properties-alarm-count-config.component-DX9Rgjgl.mjs} +2 -2
  34. package/fesm2022/{c8y-ngx-components-computed-asset-properties-alarm-count-config.component-CPLDClTp.mjs.map → c8y-ngx-components-computed-asset-properties-alarm-count-config.component-DX9Rgjgl.mjs.map} +1 -1
  35. package/fesm2022/{c8y-ngx-components-computed-asset-properties-c8y-ngx-components-computed-asset-properties-9be_iMQg.mjs → c8y-ngx-components-computed-asset-properties-c8y-ngx-components-computed-asset-properties-CRpLJ5H7.mjs} +8 -8
  36. package/fesm2022/{c8y-ngx-components-computed-asset-properties-c8y-ngx-components-computed-asset-properties-9be_iMQg.mjs.map → c8y-ngx-components-computed-asset-properties-c8y-ngx-components-computed-asset-properties-CRpLJ5H7.mjs.map} +1 -1
  37. package/fesm2022/{c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-B2em01_W.mjs → c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-2rDsrxcs.mjs} +2 -2
  38. package/fesm2022/{c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-B2em01_W.mjs.map → c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-2rDsrxcs.mjs.map} +1 -1
  39. package/fesm2022/{c8y-ngx-components-computed-asset-properties-event-count-config.component-CQuGa1RI.mjs → c8y-ngx-components-computed-asset-properties-event-count-config.component-BJNoqWZf.mjs} +2 -2
  40. package/fesm2022/{c8y-ngx-components-computed-asset-properties-event-count-config.component-CQuGa1RI.mjs.map → c8y-ngx-components-computed-asset-properties-event-count-config.component-BJNoqWZf.mjs.map} +1 -1
  41. package/fesm2022/{c8y-ngx-components-computed-asset-properties-fieldbus-item-status-config.component-CkmurxJv.mjs → c8y-ngx-components-computed-asset-properties-fieldbus-item-status-config.component-DYac6foX.mjs} +3 -3
  42. package/fesm2022/{c8y-ngx-components-computed-asset-properties-fieldbus-item-status-config.component-CkmurxJv.mjs.map → c8y-ngx-components-computed-asset-properties-fieldbus-item-status-config.component-DYac6foX.mjs.map} +1 -1
  43. package/fesm2022/{c8y-ngx-components-computed-asset-properties-last-measurement-config.component-CTK9zNUh.mjs → c8y-ngx-components-computed-asset-properties-last-measurement-config.component-3yTe6lIr.mjs} +3 -3
  44. package/fesm2022/{c8y-ngx-components-computed-asset-properties-last-measurement-config.component-CTK9zNUh.mjs.map → c8y-ngx-components-computed-asset-properties-last-measurement-config.component-3yTe6lIr.mjs.map} +1 -1
  45. package/fesm2022/c8y-ngx-components-computed-asset-properties.mjs +1 -1
  46. package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-DsCDppJx.mjs → c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-C7yXSDYC.mjs} +3 -3
  47. package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-DsCDppJx.mjs.map → c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-C7yXSDYC.mjs.map} +1 -1
  48. package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-general-settings.component-RdLW5nde.mjs → c8y-ngx-components-context-dashboard-dashboard-general-settings.component-w8N16Z3t.mjs} +4 -4
  49. package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-general-settings.component-RdLW5nde.mjs.map → c8y-ngx-components-context-dashboard-dashboard-general-settings.component-w8N16Z3t.mjs.map} +1 -1
  50. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +561 -21
  51. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  52. package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +2 -2
  53. package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
  54. package/fesm2022/c8y-ngx-components-datapoint-library-details.mjs +1 -1
  55. package/fesm2022/c8y-ngx-components-datapoint-library-details.mjs.map +1 -1
  56. package/fesm2022/c8y-ngx-components-datapoint-selector.mjs +1 -1
  57. package/fesm2022/c8y-ngx-components-datapoint-selector.mjs.map +1 -1
  58. package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs +41 -8
  59. package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs.map +1 -1
  60. package/fesm2022/c8y-ngx-components-device-profile.mjs +38 -12
  61. package/fesm2022/c8y-ngx-components-device-profile.mjs.map +1 -1
  62. package/fesm2022/c8y-ngx-components-ecosystem-license-confirm.mjs +1 -1
  63. package/fesm2022/c8y-ngx-components-ecosystem-license-confirm.mjs.map +1 -1
  64. package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs +1 -1
  65. package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs.map +1 -1
  66. package/fesm2022/c8y-ngx-components-ecosystem.mjs +1 -1
  67. package/fesm2022/c8y-ngx-components-ecosystem.mjs.map +1 -1
  68. package/fesm2022/c8y-ngx-components-events-cockpit.mjs +54 -0
  69. package/fesm2022/c8y-ngx-components-events-cockpit.mjs.map +1 -0
  70. package/fesm2022/c8y-ngx-components-events-devicemanagement.mjs +79 -0
  71. package/fesm2022/c8y-ngx-components-events-devicemanagement.mjs.map +1 -0
  72. package/fesm2022/c8y-ngx-components-events-events-timeline.mjs +30 -23
  73. package/fesm2022/c8y-ngx-components-events-events-timeline.mjs.map +1 -1
  74. package/fesm2022/c8y-ngx-components-events.mjs +1080 -4
  75. package/fesm2022/c8y-ngx-components-events.mjs.map +1 -1
  76. package/fesm2022/c8y-ngx-components-file-preview.mjs +48 -41
  77. package/fesm2022/c8y-ngx-components-file-preview.mjs.map +1 -1
  78. package/fesm2022/c8y-ngx-components-files-repository.mjs +1 -1
  79. package/fesm2022/c8y-ngx-components-files-repository.mjs.map +1 -1
  80. package/fesm2022/c8y-ngx-components-global-context.mjs +68 -34
  81. package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
  82. package/fesm2022/c8y-ngx-components-interval-picker.mjs +3 -3
  83. package/fesm2022/c8y-ngx-components-interval-picker.mjs.map +1 -1
  84. package/fesm2022/c8y-ngx-components-location.mjs +1 -1
  85. package/fesm2022/c8y-ngx-components-location.mjs.map +1 -1
  86. package/fesm2022/c8y-ngx-components-operation-picker.mjs +1 -1
  87. package/fesm2022/c8y-ngx-components-operation-picker.mjs.map +1 -1
  88. package/fesm2022/c8y-ngx-components-operations-bulk-operation-scheduler.mjs +1 -1
  89. package/fesm2022/c8y-ngx-components-operations-bulk-operation-scheduler.mjs.map +1 -1
  90. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-device-profile.mjs +1 -1
  91. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-device-profile.mjs.map +1 -1
  92. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs +1 -1
  93. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs.map +1 -1
  94. package/fesm2022/c8y-ngx-components-protocol-lpwan.mjs +5 -5
  95. package/fesm2022/c8y-ngx-components-protocol-lpwan.mjs.map +1 -1
  96. package/fesm2022/c8y-ngx-components-protocol-opcua.mjs +2 -2
  97. package/fesm2022/c8y-ngx-components-protocol-opcua.mjs.map +1 -1
  98. package/fesm2022/c8y-ngx-components-remote-access-shared.mjs +1 -1
  99. package/fesm2022/c8y-ngx-components-remote-access-shared.mjs.map +1 -1
  100. package/fesm2022/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs +1 -1
  101. package/fesm2022/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs.map +1 -1
  102. package/fesm2022/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs +1 -1
  103. package/fesm2022/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs.map +1 -1
  104. package/fesm2022/c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs +1 -1
  105. package/fesm2022/c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs.map +1 -1
  106. package/fesm2022/c8y-ngx-components-repository-firmware.mjs +1 -1
  107. package/fesm2022/c8y-ngx-components-repository-firmware.mjs.map +1 -1
  108. package/fesm2022/c8y-ngx-components-static-assets-modal.mjs +1 -1
  109. package/fesm2022/c8y-ngx-components-static-assets-modal.mjs.map +1 -1
  110. package/fesm2022/c8y-ngx-components-time-context.mjs +1 -1
  111. package/fesm2022/c8y-ngx-components-time-context.mjs.map +1 -1
  112. package/fesm2022/c8y-ngx-components-translation-editor-lazy.mjs +1 -1
  113. package/fesm2022/c8y-ngx-components-translation-editor-lazy.mjs.map +1 -1
  114. package/fesm2022/c8y-ngx-components-widgets-definitions-event-list.mjs +39 -1
  115. package/fesm2022/c8y-ngx-components-widgets-definitions-event-list.mjs.map +1 -1
  116. package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs +76 -4
  117. package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs.map +1 -1
  118. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +1 -1
  119. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
  120. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +1 -1
  121. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
  122. package/fesm2022/c8y-ngx-components-widgets-implementations-events.mjs +236 -0
  123. package/fesm2022/c8y-ngx-components-widgets-implementations-events.mjs.map +1 -0
  124. package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs +271 -31
  125. package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs.map +1 -1
  126. package/fesm2022/c8y-ngx-components-widgets-implementations-image.mjs +1 -1
  127. package/fesm2022/c8y-ngx-components-widgets-implementations-image.mjs.map +1 -1
  128. package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs +1 -1
  129. package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs.map +1 -1
  130. package/fesm2022/c8y-ngx-components-widgets-implementations-kpi.mjs +1 -1
  131. package/fesm2022/c8y-ngx-components-widgets-implementations-kpi.mjs.map +1 -1
  132. package/fesm2022/c8y-ngx-components-widgets-implementations-linear-gauge.mjs +1 -1
  133. package/fesm2022/c8y-ngx-components-widgets-implementations-linear-gauge.mjs.map +1 -1
  134. package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs +1 -1
  135. package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs.map +1 -1
  136. package/fesm2022/c8y-ngx-components.mjs +248 -26
  137. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  138. package/file-preview/index.d.ts +7 -6
  139. package/file-preview/index.d.ts.map +1 -1
  140. package/global-context/index.d.ts +3 -0
  141. package/global-context/index.d.ts.map +1 -1
  142. package/index.d.ts +106 -11
  143. package/index.d.ts.map +1 -1
  144. package/locales/de.po +117 -3
  145. package/locales/es.po +117 -3
  146. package/locales/fr.po +117 -3
  147. package/locales/ja_JP.po +117 -3
  148. package/locales/ko.po +117 -3
  149. package/locales/locales.pot +117 -3
  150. package/locales/nl.po +117 -3
  151. package/locales/pl.po +117 -3
  152. package/locales/pt_BR.po +117 -3
  153. package/locales/zh_CN.po +117 -3
  154. package/locales/zh_TW.po +117 -3
  155. package/package.json +1 -1
  156. package/widgets/definitions/event-list/index.d.ts +44 -1
  157. package/widgets/definitions/event-list/index.d.ts.map +1 -1
  158. package/widgets/implementations/alarms/index.d.ts +2 -0
  159. package/widgets/implementations/alarms/index.d.ts.map +1 -1
  160. package/widgets/implementations/events/index.d.ts +89 -0
  161. package/widgets/implementations/events/index.d.ts.map +1 -0
  162. package/widgets/implementations/html-widget/index.d.ts +69 -9
  163. package/widgets/implementations/html-widget/index.d.ts.map +1 -1
@@ -43,7 +43,7 @@ class RemoteAccessBasicEndpointModalComponent {
43
43
  this._resolve(this.form.value);
44
44
  }
45
45
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: RemoteAccessBasicEndpointModalComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
46
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", 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: "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"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
46
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", 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: "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", "additionalMessages"] }, { 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"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
47
47
  }
48
48
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: RemoteAccessBasicEndpointModalComponent, decorators: [{
49
49
  type: Component,
@@ -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 { gettext } from '@c8y/ngx-components/gettext';\nimport { CoreModule } 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":";;;;;;;;;MAYa,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,E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B,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FASf,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAbhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,EAAA,UAAA,EAEjB,IAAI,EAAA,OAAA,EACP,CAAC,gBAAgB,EAAE,IAAI,EAAE,iBAAiB,EAAE,WAAW,CAAC,EAAA,SAAA,EACtD;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,0BAA0B,CAAC;AACnD,4BAAA,KAAK,EAAE;AACR;AACF,qBAAA,EAAA,QAAA,EAAA,2oBAAA,EAAA;;sBAGA;;;AEtCH;;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 { gettext } from '@c8y/ngx-components/gettext';\nimport { CoreModule } 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":";;;;;;;;;MAYa,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,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AA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,iBAAiB,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,OAAA,EAAA,SAAA,EAAA,MAAA,EAAA,gBAAA,EAAA,eAAA,EAAA,YAAA,EAAA,aAAA,EAAA,SAAA,EAAA,UAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,wBAAA,EAAA,QAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,WAAW,0mBAAtD,gBAAgB,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FASf,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAbhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,EAAA,UAAA,EAEjB,IAAI,EAAA,OAAA,EACP,CAAC,gBAAgB,EAAE,IAAI,EAAE,iBAAiB,EAAE,WAAW,CAAC,EAAA,SAAA,EACtD;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,0BAA0B,CAAC;AACnD,4BAAA,KAAK,EAAE;AACR;AACF,qBAAA,EAAA,QAAA,EAAA,2oBAAA,EAAA;;sBAGA;;;AEtCH;;AAEG;;;;"}
@@ -96,7 +96,7 @@ class RemoteAccessSshEndpointModalComponent {
96
96
  this._resolve(this.form.value);
97
97
  }
98
98
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: RemoteAccessSshEndpointModalComponent, deps: [{ token: i1.FormBuilder }, { token: i2.RemoteAccessService }], target: i0.ɵɵFactoryTarget.Component }); }
99
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: RemoteAccessSshEndpointModalComponent, isStandalone: true, selector: "c8y-remote-access-ssh-endpoint-modal", ngImport: i0, template: "<ng-template #keyPairPopoverContent>\n <small translate>Supported formats: OpenSSHv1, OpenSSHv2, PEM, SSH2.<br />Supported algorithms: RSA, DSA, ECDSA, ED25519.</small>\n</ng-template>\n\n<ng-template #certificatePopoverContent>\n <small translate>Supported formats: OpenSSHv1, OpenSSHv2, PEM, SSH2.<br />Supported algorithms: RSA, DSA.</small>\n</ng-template>\n\n<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'laptop'\"></span>\n </ng-container>\n <div\n class=\"p-24\"\n [formGroup]=\"form\"\n >\n <c8y-form-group>\n <label\n for=\"name\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"name\"\n name=\"name\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'My remote access endpoint' }\"\n formControlName=\"name\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--name'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"protocol\"\n translate\n >\n Protocol\n </label>\n <input\n class=\"form-control\"\n id=\"protocol\"\n name=\"protocol\"\n type=\"text\"\n readonly\n formControlName=\"protocol\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"hostname\"\n translate\n >\n Host\n </label>\n <input\n class=\"form-control\"\n id=\"hostname\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '127.0.0.1' } }}\"\n name=\"hostname\"\n type=\"text\"\n formControlName=\"hostname\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--hostname'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"port\"\n translate\n >\n Port\n </label>\n <input\n class=\"form-control\"\n id=\"port\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '22' } }}\"\n name=\"port\"\n type=\"number\"\n formControlName=\"port\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--port'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <div>\n <c8y-form-group>\n <label\n for=\"credentialsType\"\n translate\n >\n Sign-in method\n </label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n id=\"credentialsType\"\n formControlName=\"credentialsType\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--credentials-type'\"\n >\n <option\n *ngFor=\"let type of credentialTypes\"\n [value]=\"type.value\"\n >\n {{ type.label | translate }}\n </option>\n </select>\n </div>\n </c8y-form-group>\n\n <div\n class=\"tight-grid\"\n >\n <div class=\"col-md-6\">\n <c8y-form-group>\n <label\n for=\"username\"\n translate\n >\n Username\n </label>\n <input\n class=\"form-control\"\n id=\"username\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_username' } }}\"\n name=\"username\"\n type=\"username\"\n autocomplete=\"off\"\n formControlName=\"username\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n <div class=\"col-md-6\" *ngIf=\"form.value.credentialsType === 'USER_PASS'\">\n <c8y-form-group>\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_password' } }}\"\n name=\"password\"\n type=\"password\"\n autocomplete=\"off\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n\n <div *ngIf=\"form.value.credentialsType === 'KEY_PAIR'\">\n <div class=\"form-group\" ng-if=\"!vm.keyPairAvailable() || vm.changingKeyPair\">\n <button\n class=\"btn btn-default p-l-16\"\n type=\"button\"\n [title]=\"'Generate public and private keys' | translate\"\n [ngClass]=\"{ 'btn-pending': generating }\"\n ng-disabled=\"vm.generating\"\n (click)=\"generateKeys()\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--generate-keys'\"\n >\n <i [c8yIcon]=\"'key'\"></i>\n {{ 'Generate public and private keys' | translate }}\n </button>\n </div>\n\n <c8y-form-group>\n <label for=\"privateKey\">\n {{ 'Private key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"privateKey\"\n formControlName=\"privateKey\"\n [keyType]=\"'private'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"publicKey\">\n {{ 'Public key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n <button\n class=\"m-l-16 btn-link interact\"\n type=\"button\"\n [title]=\"'Download key' | translate\"\n (click)=\"downloadPublicKey()\"\n *ngIf=\"form.value.publicKey\"\n >\n <i [c8yIcon]=\"'download'\"></i>\n {{ 'Download key' | translate }}\n </button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"publicKey\"\n formControlName=\"publicKey\"\n [keyType]=\"'public'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n </div>\n\n <div *ngIf=\"form.value.credentialsType === 'CERTIFICATE'\">\n <c8y-form-group>\n <label for=\"privateKey\">\n {{ 'Private key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"certificatePopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"privateKey\"\n formControlName=\"privateKey\"\n [keyType]=\"'private'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"certificate\">\n {{ 'Certificate' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"certificatePopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"certificate\"\n formControlName=\"certificate\"\n [keyType]=\"'certificate'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n </div>\n\n <div>\n <c8y-form-group>\n <label\n for=\"hostKey\"\n >\n {{ 'Host key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"hostKey\"\n formControlName=\"hostKey\"\n [keyType]=\"'public'\"\n ></c8y-ssh-key-input>\n </div>\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n </div>\n</c8y-modal>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i3.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i3.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i3.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: i3.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: i3.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: SshKeyInputComponent, selector: "c8y-ssh-key-input", inputs: ["keyType"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i5.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "pipe", type: i3.C8yTranslatePipe, name: "translate" }] }); }
99
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: RemoteAccessSshEndpointModalComponent, isStandalone: true, selector: "c8y-remote-access-ssh-endpoint-modal", ngImport: i0, template: "<ng-template #keyPairPopoverContent>\n <small translate>Supported formats: OpenSSHv1, OpenSSHv2, PEM, SSH2.<br />Supported algorithms: RSA, DSA, ECDSA, ED25519.</small>\n</ng-template>\n\n<ng-template #certificatePopoverContent>\n <small translate>Supported formats: OpenSSHv1, OpenSSHv2, PEM, SSH2.<br />Supported algorithms: RSA, DSA.</small>\n</ng-template>\n\n<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'laptop'\"></span>\n </ng-container>\n <div\n class=\"p-24\"\n [formGroup]=\"form\"\n >\n <c8y-form-group>\n <label\n for=\"name\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"name\"\n name=\"name\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'My remote access endpoint' }\"\n formControlName=\"name\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--name'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"protocol\"\n translate\n >\n Protocol\n </label>\n <input\n class=\"form-control\"\n id=\"protocol\"\n name=\"protocol\"\n type=\"text\"\n readonly\n formControlName=\"protocol\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"hostname\"\n translate\n >\n Host\n </label>\n <input\n class=\"form-control\"\n id=\"hostname\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '127.0.0.1' } }}\"\n name=\"hostname\"\n type=\"text\"\n formControlName=\"hostname\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--hostname'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"port\"\n translate\n >\n Port\n </label>\n <input\n class=\"form-control\"\n id=\"port\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '22' } }}\"\n name=\"port\"\n type=\"number\"\n formControlName=\"port\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--port'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <div>\n <c8y-form-group>\n <label\n for=\"credentialsType\"\n translate\n >\n Sign-in method\n </label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n id=\"credentialsType\"\n formControlName=\"credentialsType\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--credentials-type'\"\n >\n <option\n *ngFor=\"let type of credentialTypes\"\n [value]=\"type.value\"\n >\n {{ type.label | translate }}\n </option>\n </select>\n </div>\n </c8y-form-group>\n\n <div\n class=\"tight-grid\"\n >\n <div class=\"col-md-6\">\n <c8y-form-group>\n <label\n for=\"username\"\n translate\n >\n Username\n </label>\n <input\n class=\"form-control\"\n id=\"username\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_username' } }}\"\n name=\"username\"\n type=\"username\"\n autocomplete=\"off\"\n formControlName=\"username\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n <div class=\"col-md-6\" *ngIf=\"form.value.credentialsType === 'USER_PASS'\">\n <c8y-form-group>\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_password' } }}\"\n name=\"password\"\n type=\"password\"\n autocomplete=\"off\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n\n <div *ngIf=\"form.value.credentialsType === 'KEY_PAIR'\">\n <div class=\"form-group\" ng-if=\"!vm.keyPairAvailable() || vm.changingKeyPair\">\n <button\n class=\"btn btn-default p-l-16\"\n type=\"button\"\n [title]=\"'Generate public and private keys' | translate\"\n [ngClass]=\"{ 'btn-pending': generating }\"\n ng-disabled=\"vm.generating\"\n (click)=\"generateKeys()\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--generate-keys'\"\n >\n <i [c8yIcon]=\"'key'\"></i>\n {{ 'Generate public and private keys' | translate }}\n </button>\n </div>\n\n <c8y-form-group>\n <label for=\"privateKey\">\n {{ 'Private key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"privateKey\"\n formControlName=\"privateKey\"\n [keyType]=\"'private'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"publicKey\">\n {{ 'Public key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n <button\n class=\"m-l-16 btn-link interact\"\n type=\"button\"\n [title]=\"'Download key' | translate\"\n (click)=\"downloadPublicKey()\"\n *ngIf=\"form.value.publicKey\"\n >\n <i [c8yIcon]=\"'download'\"></i>\n {{ 'Download key' | translate }}\n </button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"publicKey\"\n formControlName=\"publicKey\"\n [keyType]=\"'public'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n </div>\n\n <div *ngIf=\"form.value.credentialsType === 'CERTIFICATE'\">\n <c8y-form-group>\n <label for=\"privateKey\">\n {{ 'Private key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"certificatePopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"privateKey\"\n formControlName=\"privateKey\"\n [keyType]=\"'private'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"certificate\">\n {{ 'Certificate' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"certificatePopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"certificate\"\n formControlName=\"certificate\"\n [keyType]=\"'certificate'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n </div>\n\n <div>\n <c8y-form-group>\n <label\n for=\"hostKey\"\n >\n {{ 'Host key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"hostKey\"\n formControlName=\"hostKey\"\n [keyType]=\"'public'\"\n ></c8y-ssh-key-input>\n </div>\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n </div>\n</c8y-modal>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i3.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i3.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i3.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: i3.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage", "additionalMessages"] }, { kind: "directive", type: i3.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: SshKeyInputComponent, selector: "c8y-ssh-key-input", inputs: ["keyType"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i5.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "pipe", type: i3.C8yTranslatePipe, name: "translate" }] }); }
100
100
  }
101
101
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: RemoteAccessSshEndpointModalComponent, decorators: [{
102
102
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs","sources":["../../remote-access/ssh/remote-access-ssh-endpoint-modal/remote-access-ssh-endpoint-modal.component.ts","../../remote-access/ssh/remote-access-ssh-endpoint-modal/remote-access-ssh-endpoint-modal.component.html","../../remote-access/ssh/remote-access-ssh-endpoint-modal/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.ts"],"sourcesContent":["import { NgClass, NgForOf } from '@angular/common';\nimport { Component, OnInit } from '@angular/core';\nimport { FormBuilder, Validators } from '@angular/forms';\nimport { CoreModule } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n CREDENTIALS_TYPES,\n RemoteAccessConfiguration,\n RemoteAccessService\n} from '@c8y/ngx-components/remote-access/data';\nimport { SshKeyInputComponent } from '@c8y/ngx-components/remote-access/shared';\nimport { PopoverModule } from 'ngx-bootstrap/popover';\nimport { saveAs } from 'file-saver';\n\n@Component({\n selector: 'c8y-remote-access-ssh-endpoint-modal',\n templateUrl: './remote-access-ssh-endpoint-modal.component.html',\n standalone: true,\n imports: [CoreModule, NgForOf, NgClass, SshKeyInputComponent, PopoverModule]\n})\nexport class RemoteAccessSshEndpointModalComponent implements OnInit {\n credentialTypes = [\n CREDENTIALS_TYPES.USER_PASS,\n CREDENTIALS_TYPES.CERTIFICATE,\n CREDENTIALS_TYPES.KEY_PAIR\n ];\n title = gettext('Remote access endpoint');\n form: ReturnType<typeof this.initForm>;\n generating = false;\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(\n private formBuilder: FormBuilder,\n private remoteAccess: RemoteAccessService\n ) {\n this.form = this.initForm();\n }\n\n ngOnInit() {\n if (this.currentValue) {\n const { credentials, ...rest } = this.currentValue;\n const credentialsType = credentials?.type || CREDENTIALS_TYPES.USER_PASS.value;\n const attributesToAdd = { credentialsType };\n if (credentials) {\n const { username, password, publicKey, privateKey, certificate, hostKey } = credentials;\n Object.assign(attributesToAdd, {\n username,\n password,\n publicKey,\n privateKey,\n certificate,\n hostKey\n });\n }\n const patchedValue = { ...rest, ...attributesToAdd };\n this.form.patchValue(patchedValue);\n }\n }\n\n initForm() {\n return this.formBuilder.group({\n id: ['', []],\n name: ['', [Validators.required, Validators.minLength(1)]],\n hostname: ['127.0.0.1', [Validators.required, Validators.minLength(1)]],\n port: [22, [Validators.required, Validators.min(1), Validators.max(65535)]],\n protocol: ['SSH', [Validators.required, Validators.minLength(1)]],\n username: [undefined as string, [Validators.required, Validators.minLength(1)]],\n password: [undefined as string, []],\n credentialsType: [\n CREDENTIALS_TYPES.USER_PASS.value as 'USER_PASS' | 'KEY_PAIR' | 'CERTIFICATE',\n [Validators.required]\n ],\n hostKey: [undefined as string, []],\n publicKey: [undefined as string, []],\n privateKey: [undefined as string, []],\n certificate: [undefined as string, []]\n });\n }\n\n downloadPublicKey() {\n const publicKey = this.form.value.publicKey;\n const blob = new Blob([publicKey], { type: 'text/plain' });\n saveAs(blob, `key.pub`);\n }\n\n async generateKeys() {\n this.generating = true;\n try {\n const pair = await this.remoteAccess.generateKeyPair(this.form.value.hostname || undefined);\n this.form.patchValue({\n publicKey: pair.publicKey,\n privateKey: pair.privateKey\n });\n } catch (e) {\n console.log(e);\n }\n this.generating = false;\n }\n\n cancel() {\n this._reject();\n }\n\n save() {\n this._resolve(this.form.value);\n }\n}\n","<ng-template #keyPairPopoverContent>\n <small translate>Supported formats: OpenSSHv1, OpenSSHv2, PEM, SSH2.<br />Supported algorithms: RSA, DSA, ECDSA, ED25519.</small>\n</ng-template>\n\n<ng-template #certificatePopoverContent>\n <small translate>Supported formats: OpenSSHv1, OpenSSHv2, PEM, SSH2.<br />Supported algorithms: RSA, DSA.</small>\n</ng-template>\n\n<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'laptop'\"></span>\n </ng-container>\n <div\n class=\"p-24\"\n [formGroup]=\"form\"\n >\n <c8y-form-group>\n <label\n for=\"name\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"name\"\n name=\"name\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'My remote access endpoint' }\"\n formControlName=\"name\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--name'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"protocol\"\n translate\n >\n Protocol\n </label>\n <input\n class=\"form-control\"\n id=\"protocol\"\n name=\"protocol\"\n type=\"text\"\n readonly\n formControlName=\"protocol\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"hostname\"\n translate\n >\n Host\n </label>\n <input\n class=\"form-control\"\n id=\"hostname\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '127.0.0.1' } }}\"\n name=\"hostname\"\n type=\"text\"\n formControlName=\"hostname\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--hostname'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"port\"\n translate\n >\n Port\n </label>\n <input\n class=\"form-control\"\n id=\"port\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '22' } }}\"\n name=\"port\"\n type=\"number\"\n formControlName=\"port\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--port'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <div>\n <c8y-form-group>\n <label\n for=\"credentialsType\"\n translate\n >\n Sign-in method\n </label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n id=\"credentialsType\"\n formControlName=\"credentialsType\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--credentials-type'\"\n >\n <option\n *ngFor=\"let type of credentialTypes\"\n [value]=\"type.value\"\n >\n {{ type.label | translate }}\n </option>\n </select>\n </div>\n </c8y-form-group>\n\n <div\n class=\"tight-grid\"\n >\n <div class=\"col-md-6\">\n <c8y-form-group>\n <label\n for=\"username\"\n translate\n >\n Username\n </label>\n <input\n class=\"form-control\"\n id=\"username\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_username' } }}\"\n name=\"username\"\n type=\"username\"\n autocomplete=\"off\"\n formControlName=\"username\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n <div class=\"col-md-6\" *ngIf=\"form.value.credentialsType === 'USER_PASS'\">\n <c8y-form-group>\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_password' } }}\"\n name=\"password\"\n type=\"password\"\n autocomplete=\"off\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n\n <div *ngIf=\"form.value.credentialsType === 'KEY_PAIR'\">\n <div class=\"form-group\" ng-if=\"!vm.keyPairAvailable() || vm.changingKeyPair\">\n <button\n class=\"btn btn-default p-l-16\"\n type=\"button\"\n [title]=\"'Generate public and private keys' | translate\"\n [ngClass]=\"{ 'btn-pending': generating }\"\n ng-disabled=\"vm.generating\"\n (click)=\"generateKeys()\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--generate-keys'\"\n >\n <i [c8yIcon]=\"'key'\"></i>\n {{ 'Generate public and private keys' | translate }}\n </button>\n </div>\n\n <c8y-form-group>\n <label for=\"privateKey\">\n {{ 'Private key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"privateKey\"\n formControlName=\"privateKey\"\n [keyType]=\"'private'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"publicKey\">\n {{ 'Public key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n <button\n class=\"m-l-16 btn-link interact\"\n type=\"button\"\n [title]=\"'Download key' | translate\"\n (click)=\"downloadPublicKey()\"\n *ngIf=\"form.value.publicKey\"\n >\n <i [c8yIcon]=\"'download'\"></i>\n {{ 'Download key' | translate }}\n </button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"publicKey\"\n formControlName=\"publicKey\"\n [keyType]=\"'public'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n </div>\n\n <div *ngIf=\"form.value.credentialsType === 'CERTIFICATE'\">\n <c8y-form-group>\n <label for=\"privateKey\">\n {{ 'Private key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"certificatePopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"privateKey\"\n formControlName=\"privateKey\"\n [keyType]=\"'private'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"certificate\">\n {{ 'Certificate' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"certificatePopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"certificate\"\n formControlName=\"certificate\"\n [keyType]=\"'certificate'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n </div>\n\n <div>\n <c8y-form-group>\n <label\n for=\"hostKey\"\n >\n {{ 'Host key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"hostKey\"\n formControlName=\"hostKey\"\n [keyType]=\"'public'\"\n ></c8y-ssh-key-input>\n </div>\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n </div>\n</c8y-modal>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAoBa,qCAAqC,CAAA;IAoBhD,WAAA,CACU,WAAwB,EACxB,YAAiC,EAAA;QADjC,IAAA,CAAA,WAAW,GAAX,WAAW;QACX,IAAA,CAAA,YAAY,GAAZ,YAAY;AArBtB,QAAA,IAAA,CAAA,eAAe,GAAG;AAChB,YAAA,iBAAiB,CAA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CAAA,iBAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAoB,oBAAoB,kFAAE,aAAa,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,kBAAA,EAAA,mBAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,cAAA,EAAA,WAAA,EAAA,cAAA,EAAA,UAAA,EAAA,WAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,OAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAEhE,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBANjD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sCAAsC,EAAA,UAAA,EAEpC,IAAI,EAAA,OAAA,EACP,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,83SAAA,EAAA;;;AElB9E;;AAEG;;;;"}
1
+ {"version":3,"file":"c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs","sources":["../../remote-access/ssh/remote-access-ssh-endpoint-modal/remote-access-ssh-endpoint-modal.component.ts","../../remote-access/ssh/remote-access-ssh-endpoint-modal/remote-access-ssh-endpoint-modal.component.html","../../remote-access/ssh/remote-access-ssh-endpoint-modal/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.ts"],"sourcesContent":["import { NgClass, NgForOf } from '@angular/common';\nimport { Component, OnInit } from '@angular/core';\nimport { FormBuilder, Validators } from '@angular/forms';\nimport { CoreModule } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n CREDENTIALS_TYPES,\n RemoteAccessConfiguration,\n RemoteAccessService\n} from '@c8y/ngx-components/remote-access/data';\nimport { SshKeyInputComponent } from '@c8y/ngx-components/remote-access/shared';\nimport { PopoverModule } from 'ngx-bootstrap/popover';\nimport { saveAs } from 'file-saver';\n\n@Component({\n selector: 'c8y-remote-access-ssh-endpoint-modal',\n templateUrl: './remote-access-ssh-endpoint-modal.component.html',\n standalone: true,\n imports: [CoreModule, NgForOf, NgClass, SshKeyInputComponent, PopoverModule]\n})\nexport class RemoteAccessSshEndpointModalComponent implements OnInit {\n credentialTypes = [\n CREDENTIALS_TYPES.USER_PASS,\n CREDENTIALS_TYPES.CERTIFICATE,\n CREDENTIALS_TYPES.KEY_PAIR\n ];\n title = gettext('Remote access endpoint');\n form: ReturnType<typeof this.initForm>;\n generating = false;\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(\n private formBuilder: FormBuilder,\n private remoteAccess: RemoteAccessService\n ) {\n this.form = this.initForm();\n }\n\n ngOnInit() {\n if (this.currentValue) {\n const { credentials, ...rest } = this.currentValue;\n const credentialsType = credentials?.type || CREDENTIALS_TYPES.USER_PASS.value;\n const attributesToAdd = { credentialsType };\n if (credentials) {\n const { username, password, publicKey, privateKey, certificate, hostKey } = credentials;\n Object.assign(attributesToAdd, {\n username,\n password,\n publicKey,\n privateKey,\n certificate,\n hostKey\n });\n }\n const patchedValue = { ...rest, ...attributesToAdd };\n this.form.patchValue(patchedValue);\n }\n }\n\n initForm() {\n return this.formBuilder.group({\n id: ['', []],\n name: ['', [Validators.required, Validators.minLength(1)]],\n hostname: ['127.0.0.1', [Validators.required, Validators.minLength(1)]],\n port: [22, [Validators.required, Validators.min(1), Validators.max(65535)]],\n protocol: ['SSH', [Validators.required, Validators.minLength(1)]],\n username: [undefined as string, [Validators.required, Validators.minLength(1)]],\n password: [undefined as string, []],\n credentialsType: [\n CREDENTIALS_TYPES.USER_PASS.value as 'USER_PASS' | 'KEY_PAIR' | 'CERTIFICATE',\n [Validators.required]\n ],\n hostKey: [undefined as string, []],\n publicKey: [undefined as string, []],\n privateKey: [undefined as string, []],\n certificate: [undefined as string, []]\n });\n }\n\n downloadPublicKey() {\n const publicKey = this.form.value.publicKey;\n const blob = new Blob([publicKey], { type: 'text/plain' });\n saveAs(blob, `key.pub`);\n }\n\n async generateKeys() {\n this.generating = true;\n try {\n const pair = await this.remoteAccess.generateKeyPair(this.form.value.hostname || undefined);\n this.form.patchValue({\n publicKey: pair.publicKey,\n privateKey: pair.privateKey\n });\n } catch (e) {\n console.log(e);\n }\n this.generating = false;\n }\n\n cancel() {\n this._reject();\n }\n\n save() {\n this._resolve(this.form.value);\n }\n}\n","<ng-template #keyPairPopoverContent>\n <small translate>Supported formats: OpenSSHv1, OpenSSHv2, PEM, SSH2.<br />Supported algorithms: RSA, DSA, ECDSA, ED25519.</small>\n</ng-template>\n\n<ng-template #certificatePopoverContent>\n <small translate>Supported formats: OpenSSHv1, OpenSSHv2, PEM, SSH2.<br />Supported algorithms: RSA, DSA.</small>\n</ng-template>\n\n<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'laptop'\"></span>\n </ng-container>\n <div\n class=\"p-24\"\n [formGroup]=\"form\"\n >\n <c8y-form-group>\n <label\n for=\"name\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"name\"\n name=\"name\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'My remote access endpoint' }\"\n formControlName=\"name\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--name'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"protocol\"\n translate\n >\n Protocol\n </label>\n <input\n class=\"form-control\"\n id=\"protocol\"\n name=\"protocol\"\n type=\"text\"\n readonly\n formControlName=\"protocol\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"hostname\"\n translate\n >\n Host\n </label>\n <input\n class=\"form-control\"\n id=\"hostname\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '127.0.0.1' } }}\"\n name=\"hostname\"\n type=\"text\"\n formControlName=\"hostname\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--hostname'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"port\"\n translate\n >\n Port\n </label>\n <input\n class=\"form-control\"\n id=\"port\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '22' } }}\"\n name=\"port\"\n type=\"number\"\n formControlName=\"port\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--port'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <div>\n <c8y-form-group>\n <label\n for=\"credentialsType\"\n translate\n >\n Sign-in method\n </label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n id=\"credentialsType\"\n formControlName=\"credentialsType\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--credentials-type'\"\n >\n <option\n *ngFor=\"let type of credentialTypes\"\n [value]=\"type.value\"\n >\n {{ type.label | translate }}\n </option>\n </select>\n </div>\n </c8y-form-group>\n\n <div\n class=\"tight-grid\"\n >\n <div class=\"col-md-6\">\n <c8y-form-group>\n <label\n for=\"username\"\n translate\n >\n Username\n </label>\n <input\n class=\"form-control\"\n id=\"username\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_username' } }}\"\n name=\"username\"\n type=\"username\"\n autocomplete=\"off\"\n formControlName=\"username\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n <div class=\"col-md-6\" *ngIf=\"form.value.credentialsType === 'USER_PASS'\">\n <c8y-form-group>\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_password' } }}\"\n name=\"password\"\n type=\"password\"\n autocomplete=\"off\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n\n <div *ngIf=\"form.value.credentialsType === 'KEY_PAIR'\">\n <div class=\"form-group\" ng-if=\"!vm.keyPairAvailable() || vm.changingKeyPair\">\n <button\n class=\"btn btn-default p-l-16\"\n type=\"button\"\n [title]=\"'Generate public and private keys' | translate\"\n [ngClass]=\"{ 'btn-pending': generating }\"\n ng-disabled=\"vm.generating\"\n (click)=\"generateKeys()\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--generate-keys'\"\n >\n <i [c8yIcon]=\"'key'\"></i>\n {{ 'Generate public and private keys' | translate }}\n </button>\n </div>\n\n <c8y-form-group>\n <label for=\"privateKey\">\n {{ 'Private key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"privateKey\"\n formControlName=\"privateKey\"\n [keyType]=\"'private'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"publicKey\">\n {{ 'Public key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n <button\n class=\"m-l-16 btn-link interact\"\n type=\"button\"\n [title]=\"'Download key' | translate\"\n (click)=\"downloadPublicKey()\"\n *ngIf=\"form.value.publicKey\"\n >\n <i [c8yIcon]=\"'download'\"></i>\n {{ 'Download key' | translate }}\n </button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"publicKey\"\n formControlName=\"publicKey\"\n [keyType]=\"'public'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n </div>\n\n <div *ngIf=\"form.value.credentialsType === 'CERTIFICATE'\">\n <c8y-form-group>\n <label for=\"privateKey\">\n {{ 'Private key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"certificatePopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"privateKey\"\n formControlName=\"privateKey\"\n [keyType]=\"'private'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"certificate\">\n {{ 'Certificate' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"certificatePopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"certificate\"\n formControlName=\"certificate\"\n [keyType]=\"'certificate'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n </div>\n\n <div>\n <c8y-form-group>\n <label\n for=\"hostKey\"\n >\n {{ 'Host key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"hostKey\"\n formControlName=\"hostKey\"\n [keyType]=\"'public'\"\n ></c8y-ssh-key-input>\n </div>\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n </div>\n</c8y-modal>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAoBa,qCAAqC,CAAA;IAoBhD,WAAA,CACU,WAAwB,EACxB,YAAiC,EAAA;QADjC,IAAA,CAAA,WAAW,GAAX,WAAW;QACX,IAAA,CAAA,YAAY,GAAZ,YAAY;AArBtB,QAAA,IAAA,CAAA,eAAe,GAAG;AAChB,YAAA,iBAAiB,CAAC,SAAS;AAC3B,YAAA,iBAAiB,CAAC,WAAW;AAC7B,YAAA,iBAAiB,CAAC;SACnB;AACD,QAAA,IAAA,CAAA,KAAK,GAAG,OAAO,CAAC,wBAAwB,CAAC;QAEzC,IAAA,CAAA,UAAU,GAAG,KAAK;QAIlB,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;AASA,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;YAClD,MAAM,eAAe,GAAG,WAAW,EAAE,IAAI,IAAI,iBAAiB,CAAC,SAAS,CAAC,KAAK;AAC9E,YAAA,MAAM,eAAe,GAAG,EAAE,eAAe,EAAE;YAC3C,IAAI,WAAW,EAAE;AACf,gBAAA,MAAM,EAAE,QAAQ,E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A,sCAAsC,EAAA,UAAA,EAEpC,IAAI,EAAA,OAAA,EACP,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,83SAAA,EAAA;;;AElB9E;;AAEG;;;;"}
@@ -51,7 +51,7 @@ class RemoteAccessVncEndpointModalComponent {
51
51
  this._resolve(this.form.value);
52
52
  }
53
53
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: RemoteAccessVncEndpointModalComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
54
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: RemoteAccessVncEndpointModalComponent, isStandalone: true, selector: "c8y-remote-access-vnc-endpoint-modal", ngImport: i0, template: "<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'laptop'\"></span>\n </ng-container>\n <div\n class=\"p-24\"\n [formGroup]=\"form\"\n >\n <c8y-form-group>\n <label\n for=\"name\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"name\"\n name=\"name\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'My remote access endpoint' }\"\n formControlName=\"name\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--name'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"protocol\"\n translate\n >\n Protocol\n </label>\n <input\n class=\"form-control\"\n id=\"protocol\"\n name=\"protocol\"\n type=\"text\"\n readonly\n formControlName=\"protocol\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"hostname\"\n translate\n >\n Host\n </label>\n <input\n class=\"form-control\"\n id=\"hostname\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '127.0.0.1' } }}\"\n name=\"hostname\"\n type=\"text\"\n formControlName=\"hostname\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--hostname'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"port\"\n translate\n >\n Port\n </label>\n <input\n class=\"form-control\"\n id=\"port\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '5900' } }}\"\n name=\"port\"\n type=\"number\"\n formControlName=\"port\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--port'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <div>\n <c8y-form-group>\n <label\n for=\"credentialsType\"\n translate\n >\n Sign-in method\n </label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n id=\"credentialsType\"\n formControlName=\"credentialsType\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--credentials-type'\"\n >\n <option\n *ngFor=\"let type of credentialTypes\"\n [value]=\"type.value\"\n >\n {{ type.label | translate }}\n </option>\n </select>\n </div>\n </c8y-form-group>\n\n <c8y-form-group *ngIf=\"form.value.credentialsType === 'PASS_ONLY'\">\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_password' } }}\"\n name=\"password\"\n type=\"password\"\n autocomplete=\"off\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n</c8y-modal>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i2.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: i2.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
54
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: RemoteAccessVncEndpointModalComponent, isStandalone: true, selector: "c8y-remote-access-vnc-endpoint-modal", ngImport: i0, template: "<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'laptop'\"></span>\n </ng-container>\n <div\n class=\"p-24\"\n [formGroup]=\"form\"\n >\n <c8y-form-group>\n <label\n for=\"name\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"name\"\n name=\"name\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'My remote access endpoint' }\"\n formControlName=\"name\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--name'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"protocol\"\n translate\n >\n Protocol\n </label>\n <input\n class=\"form-control\"\n id=\"protocol\"\n name=\"protocol\"\n type=\"text\"\n readonly\n formControlName=\"protocol\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"hostname\"\n translate\n >\n Host\n </label>\n <input\n class=\"form-control\"\n id=\"hostname\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '127.0.0.1' } }}\"\n name=\"hostname\"\n type=\"text\"\n formControlName=\"hostname\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--hostname'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"port\"\n translate\n >\n Port\n </label>\n <input\n class=\"form-control\"\n id=\"port\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '5900' } }}\"\n name=\"port\"\n type=\"number\"\n formControlName=\"port\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--port'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <div>\n <c8y-form-group>\n <label\n for=\"credentialsType\"\n translate\n >\n Sign-in method\n </label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n id=\"credentialsType\"\n formControlName=\"credentialsType\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--credentials-type'\"\n >\n <option\n *ngFor=\"let type of credentialTypes\"\n [value]=\"type.value\"\n >\n {{ type.label | translate }}\n </option>\n </select>\n </div>\n </c8y-form-group>\n\n <c8y-form-group *ngIf=\"form.value.credentialsType === 'PASS_ONLY'\">\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_password' } }}\"\n name=\"password\"\n type=\"password\"\n autocomplete=\"off\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n</c8y-modal>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i2.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: i2.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage", "additionalMessages"] }, { 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"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
55
55
  }
56
56
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: RemoteAccessVncEndpointModalComponent, decorators: [{
57
57
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs","sources":["../../remote-access/vnc/remote-access-vnc-endpoint-modal/remote-access-vnc-endpoint-modal.component.ts","../../remote-access/vnc/remote-access-vnc-endpoint-modal/remote-access-vnc-endpoint-modal.component.html","../../remote-access/vnc/remote-access-vnc-endpoint-modal/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.ts"],"sourcesContent":["import { NgForOf } from '@angular/common';\nimport { Component, OnInit } from '@angular/core';\nimport { FormBuilder, Validators } from '@angular/forms';\nimport { CoreModule } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n CREDENTIALS_TYPES,\n RemoteAccessConfiguration\n} from '@c8y/ngx-components/remote-access/data';\n\n@Component({\n selector: 'c8y-remote-access-vnc-endpoint-modal',\n templateUrl: './remote-access-vnc-endpoint-modal.component.html',\n standalone: true,\n imports: [CoreModule, NgForOf]\n})\nexport class RemoteAccessVncEndpointModalComponent implements OnInit {\n credentialTypes = [CREDENTIALS_TYPES.NONE, CREDENTIALS_TYPES.PASS_ONLY];\n title = gettext('Remote access endpoint');\n form: ReturnType<typeof this.initForm>;\n\n currentValue: Partial<RemoteAccessConfiguration>;\n\n result = new Promise<ReturnType<typeof this.initForm>['value']>((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n\n private _resolve: (value: ReturnType<typeof this.initForm>['value']) => void;\n private _reject: (reason?: any) => void;\n\n constructor(private formBuilder: FormBuilder) {\n this.form = this.initForm();\n }\n\n ngOnInit() {\n if (this.currentValue) {\n const { credentials, ...rest } = this.currentValue;\n const credentialsType = credentials?.type || 'NONE';\n const attributesToAdd = { credentialsType };\n if (credentials) {\n const { username, password } = credentials;\n Object.assign(attributesToAdd, { username, password });\n }\n const patchedValue = { ...rest, ...attributesToAdd };\n this.form.patchValue(patchedValue);\n }\n }\n\n initForm() {\n return this.formBuilder.group({\n id: ['', []],\n name: ['', [Validators.required, Validators.minLength(1)]],\n hostname: ['127.0.0.1', [Validators.required, Validators.minLength(1)]],\n port: [5900, [Validators.required, Validators.min(1), Validators.max(65535)]],\n protocol: ['VNC', [Validators.required, Validators.minLength(1)]],\n password: [undefined as string, []],\n credentialsType: ['NONE' as 'NONE' | 'PASS_ONLY', [Validators.required]]\n });\n }\n\n cancel() {\n this._reject();\n }\n\n save() {\n this._resolve(this.form.value);\n }\n}\n","<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'laptop'\"></span>\n </ng-container>\n <div\n class=\"p-24\"\n [formGroup]=\"form\"\n >\n <c8y-form-group>\n <label\n for=\"name\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"name\"\n name=\"name\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'My remote access endpoint' }\"\n formControlName=\"name\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--name'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"protocol\"\n translate\n >\n Protocol\n </label>\n <input\n class=\"form-control\"\n id=\"protocol\"\n name=\"protocol\"\n type=\"text\"\n readonly\n formControlName=\"protocol\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"hostname\"\n translate\n >\n Host\n </label>\n <input\n class=\"form-control\"\n id=\"hostname\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '127.0.0.1' } }}\"\n name=\"hostname\"\n type=\"text\"\n formControlName=\"hostname\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--hostname'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"port\"\n translate\n >\n Port\n </label>\n <input\n class=\"form-control\"\n id=\"port\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '5900' } }}\"\n name=\"port\"\n type=\"number\"\n formControlName=\"port\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--port'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <div>\n <c8y-form-group>\n <label\n for=\"credentialsType\"\n translate\n >\n Sign-in method\n </label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n id=\"credentialsType\"\n formControlName=\"credentialsType\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--credentials-type'\"\n >\n <option\n *ngFor=\"let type of credentialTypes\"\n [value]=\"type.value\"\n >\n {{ type.label | translate }}\n </option>\n </select>\n </div>\n </c8y-form-group>\n\n <c8y-form-group *ngIf=\"form.value.credentialsType === 'PASS_ONLY'\">\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_password' } }}\"\n name=\"password\"\n type=\"password\"\n autocomplete=\"off\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n</c8y-modal>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAgBa,qCAAqC,CAAA;AAehD,IAAA,WAAA,CAAoB,WAAwB,EAAA;QAAxB,IAAA,CAAA,WAAW,GAAX,WAAW;QAd/B,IAAA,CAAA,eAAe,GAAG,CAAC,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,CAAC,SAAS,CAAC;AACvE,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;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,EAAA,QAAA,EAAA,yCAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,WAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,CAAA,iBAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAET,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBANjD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sCAAsC,cAEpC,IAAI,EAAA,OAAA,EACP,CAAC,UAAU,EAAE,OAAO,CAAC,EAAA,QAAA,EAAA,s8GAAA,EAAA;;;AEdhC;;AAEG;;;;"}
1
+ {"version":3,"file":"c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs","sources":["../../remote-access/vnc/remote-access-vnc-endpoint-modal/remote-access-vnc-endpoint-modal.component.ts","../../remote-access/vnc/remote-access-vnc-endpoint-modal/remote-access-vnc-endpoint-modal.component.html","../../remote-access/vnc/remote-access-vnc-endpoint-modal/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.ts"],"sourcesContent":["import { NgForOf } from '@angular/common';\nimport { Component, OnInit } from '@angular/core';\nimport { FormBuilder, Validators } from '@angular/forms';\nimport { CoreModule } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n CREDENTIALS_TYPES,\n RemoteAccessConfiguration\n} from '@c8y/ngx-components/remote-access/data';\n\n@Component({\n selector: 'c8y-remote-access-vnc-endpoint-modal',\n templateUrl: './remote-access-vnc-endpoint-modal.component.html',\n standalone: true,\n imports: [CoreModule, NgForOf]\n})\nexport class RemoteAccessVncEndpointModalComponent implements OnInit {\n credentialTypes = [CREDENTIALS_TYPES.NONE, CREDENTIALS_TYPES.PASS_ONLY];\n title = gettext('Remote access endpoint');\n form: ReturnType<typeof this.initForm>;\n\n currentValue: Partial<RemoteAccessConfiguration>;\n\n result = new Promise<ReturnType<typeof this.initForm>['value']>((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n\n private _resolve: (value: ReturnType<typeof this.initForm>['value']) => void;\n private _reject: (reason?: any) => void;\n\n constructor(private formBuilder: FormBuilder) {\n this.form = this.initForm();\n }\n\n ngOnInit() {\n if (this.currentValue) {\n const { credentials, ...rest } = this.currentValue;\n const credentialsType = credentials?.type || 'NONE';\n const attributesToAdd = { credentialsType };\n if (credentials) {\n const { username, password } = credentials;\n Object.assign(attributesToAdd, { username, password });\n }\n const patchedValue = { ...rest, ...attributesToAdd };\n this.form.patchValue(patchedValue);\n }\n }\n\n initForm() {\n return this.formBuilder.group({\n id: ['', []],\n name: ['', [Validators.required, Validators.minLength(1)]],\n hostname: ['127.0.0.1', [Validators.required, Validators.minLength(1)]],\n port: [5900, [Validators.required, Validators.min(1), Validators.max(65535)]],\n protocol: ['VNC', [Validators.required, Validators.minLength(1)]],\n password: [undefined as string, []],\n credentialsType: ['NONE' as 'NONE' | 'PASS_ONLY', [Validators.required]]\n });\n }\n\n cancel() {\n this._reject();\n }\n\n save() {\n this._resolve(this.form.value);\n }\n}\n","<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'laptop'\"></span>\n </ng-container>\n <div\n class=\"p-24\"\n [formGroup]=\"form\"\n >\n <c8y-form-group>\n <label\n for=\"name\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"name\"\n name=\"name\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'My remote access endpoint' }\"\n formControlName=\"name\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--name'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"protocol\"\n translate\n >\n Protocol\n </label>\n <input\n class=\"form-control\"\n id=\"protocol\"\n name=\"protocol\"\n type=\"text\"\n readonly\n formControlName=\"protocol\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"hostname\"\n translate\n >\n Host\n </label>\n <input\n class=\"form-control\"\n id=\"hostname\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '127.0.0.1' } }}\"\n name=\"hostname\"\n type=\"text\"\n formControlName=\"hostname\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--hostname'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"port\"\n translate\n >\n Port\n </label>\n <input\n class=\"form-control\"\n id=\"port\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '5900' } }}\"\n name=\"port\"\n type=\"number\"\n formControlName=\"port\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--port'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <div>\n <c8y-form-group>\n <label\n for=\"credentialsType\"\n translate\n >\n Sign-in method\n </label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n id=\"credentialsType\"\n formControlName=\"credentialsType\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--credentials-type'\"\n >\n <option\n *ngFor=\"let type of credentialTypes\"\n [value]=\"type.value\"\n >\n {{ type.label | translate }}\n </option>\n </select>\n </div>\n </c8y-form-group>\n\n <c8y-form-group *ngIf=\"form.value.credentialsType === 'PASS_ONLY'\">\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_password' } }}\"\n name=\"password\"\n type=\"password\"\n autocomplete=\"off\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n</c8y-modal>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAgBa,qCAAqC,CAAA;AAehD,IAAA,WAAA,CAAoB,WAAwB,EAAA;QAAxB,IAAA,CAAA,WAAW,GAAX,WAAW;QAd/B,IAAA,CAAA,eAAe,GAAG,CAAC,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,CAAC,SAAS,CAAC;AACvE,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;AACnD,YAAA,MAAM,eAAe,GAAG,EAAE,eAAe,EAAE;YAC3C,IAAI,WAAW,EAAE;AACf,gBAAA,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,WAAW;gBAC1C,MAAM,CAAC,MA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A,WAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,CAAA,iBAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAET,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBANjD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sCAAsC,cAEpC,IAAI,EAAA,OAAA,EACP,CAAC,UAAU,EAAE,OAAO,CAAC,EAAA,QAAA,EAAA,s8GAAA,EAAA;;;AEdhC;;AAEG;;;;"}
@@ -51,7 +51,7 @@ class VncCredentialsPromptComponent {
51
51
  this.save();
52
52
  }
53
53
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: VncCredentialsPromptComponent, deps: [{ token: i1.FormBuilder }, { token: i2.BsModalRef }], target: i0.ɵɵFactoryTarget.Component }); }
54
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: VncCredentialsPromptComponent, isStandalone: true, selector: "c8y-vnc-credentials-prompt", inputs: { types: "types" }, ngImport: i0, template: "<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'key'\"></span>\n </ng-container>\n <form\n class=\"p-24\"\n [formGroup]=\"form\"\n (submit)=\"submit()\"\n >\n <c8y-form-group *ngIf=\"showUsername\">\n <label\n for=\"username\"\n translate\n >\n Username\n </label>\n <input\n class=\"form-control\"\n id=\"username\"\n name=\"username\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'admin' }\"\n formControlName=\"username\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n name=\"password\"\n type=\"password\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <button type=\"submit\" class=\"hidden\">hidden submit</button>\n </form>\n</c8y-modal>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i3.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i3.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i3.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: i3.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: i3.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i3.C8yTranslatePipe, name: "translate" }] }); }
54
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: VncCredentialsPromptComponent, isStandalone: true, selector: "c8y-vnc-credentials-prompt", inputs: { types: "types" }, ngImport: i0, template: "<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'key'\"></span>\n </ng-container>\n <form\n class=\"p-24\"\n [formGroup]=\"form\"\n (submit)=\"submit()\"\n >\n <c8y-form-group *ngIf=\"showUsername\">\n <label\n for=\"username\"\n translate\n >\n Username\n </label>\n <input\n class=\"form-control\"\n id=\"username\"\n name=\"username\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'admin' }\"\n formControlName=\"username\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n name=\"password\"\n type=\"password\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <button type=\"submit\" class=\"hidden\">hidden submit</button>\n </form>\n</c8y-modal>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i3.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i3.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i3.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: i3.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage", "additionalMessages"] }, { kind: "directive", type: i3.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i3.C8yTranslatePipe, name: "translate" }] }); }
55
55
  }
56
56
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: VncCredentialsPromptComponent, decorators: [{
57
57
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs","sources":["../../remote-access/vnc/vnc-viewer/vnc-credentials-prompt/vnc-credentials-prompt.component.ts","../../remote-access/vnc/vnc-viewer/vnc-credentials-prompt/vnc-credentials-prompt.component.html","../../remote-access/vnc/vnc-viewer/vnc-viewer.component.ts","../../remote-access/vnc/vnc-viewer/vnc-viewer.component.html","../../remote-access/vnc/vnc-viewer/c8y-ngx-components-remote-access-vnc-vnc-viewer.ts"],"sourcesContent":["import { NgIf } from '@angular/common';\nimport { Component, Input, OnInit } from '@angular/core';\nimport { FormBuilder, Validators } from '@angular/forms';\nimport { CoreModule } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport type { NoVncCredentials } from '@novnc/novnc/lib/rfb';\nimport { BsModalRef } from 'ngx-bootstrap/modal';\n\n@Component({\n selector: 'c8y-vnc-credentials-prompt',\n templateUrl: './vnc-credentials-prompt.component.html',\n standalone: true,\n imports: [CoreModule, NgIf]\n})\nexport class VncCredentialsPromptComponent implements OnInit {\n title = gettext('VNC credentials');\n @Input() types: Array<keyof NoVncCredentials> = [];\n result = new Promise<ReturnType<typeof this.initForm>['value']>((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n selectedType: string;\n showUsername = false;\n\n form: ReturnType<typeof this.initForm>;\n\n private _resolve: (value: ReturnType<typeof this.initForm>['value']) => void;\n private _reject: (reason?: any) => void;\n\n constructor(\n private formBuilder: FormBuilder,\n private modalRef: BsModalRef\n ) {\n this.form = this.initForm();\n }\n\n ngOnInit() {\n this.showUsername = this.types.includes('username');\n this.form = this.initForm();\n }\n\n initForm() {\n return this.formBuilder.group({\n username: [undefined as string, this.showUsername ? [Validators.required] : []],\n password: [undefined as string, [Validators.required]]\n });\n }\n\n cancel() {\n this._reject();\n }\n\n save() {\n this._resolve(this.form.value);\n }\n\n submit() {\n if (!this.form.valid) {\n return;\n }\n this.modalRef.hide();\n this.save();\n }\n}\n","<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'key'\"></span>\n </ng-container>\n <form\n class=\"p-24\"\n [formGroup]=\"form\"\n (submit)=\"submit()\"\n >\n <c8y-form-group *ngIf=\"showUsername\">\n <label\n for=\"username\"\n translate\n >\n Username\n </label>\n <input\n class=\"form-control\"\n id=\"username\"\n name=\"username\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'admin' }\"\n formControlName=\"username\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n name=\"password\"\n type=\"password\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <button type=\"submit\" class=\"hidden\">hidden submit</button>\n </form>\n</c8y-modal>\n","import { AfterViewInit, Component, OnDestroy } from '@angular/core';\nimport {\n ActionBarItemComponent,\n C8yTranslateDirective,\n C8yTranslatePipe,\n IconDirective,\n LoadingComponent,\n TitleComponent\n} from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport type { NoVncCredentials, NoVncOptions, default as NoVncClient } from '@novnc/novnc/lib/rfb';\nimport { RemoteAccessService } from '@c8y/ngx-components/remote-access/data';\nimport { ActivatedRoute } from '@angular/router';\nimport { NgClass, NgIf } from '@angular/common';\nimport { saveAs } from 'file-saver';\nimport { BsModalService } from 'ngx-bootstrap/modal';\nimport { VncCredentialsPromptComponent } from './vnc-credentials-prompt/vnc-credentials-prompt.component';\nimport { BehaviorSubject, combineLatest, defer, Subscription } from 'rxjs';\nimport { distinctUntilChanged, filter, map } from 'rxjs/operators';\n\n@Component({\n selector: 'c8y-vnc-viewer',\n templateUrl: './vnc-viewer.component.html',\n standalone: true,\n imports: [\n C8yTranslatePipe,\n TitleComponent,\n ActionBarItemComponent,\n C8yTranslateDirective,\n IconDirective,\n NgIf,\n NgClass,\n LoadingComponent\n ]\n})\nexport class VncViewerComponent implements AfterViewInit, OnDestroy {\n titlePrefix = gettext('VNC viewer');\n title = '';\n container: HTMLElement | null = null;\n noVNCClient: NoVncClient;\n powerCapability = false;\n\n status: 'connecting' | 'connected' | 'disconnected' = 'connecting';\n container$ = new BehaviorSubject<HTMLElement | null>(null);\n\n connectionSubscription: Subscription;\n\n constructor(\n private remoteAccess: RemoteAccessService,\n private activatedRoute: ActivatedRoute,\n private modalService: BsModalService\n ) {\n const container$ = this.container$.pipe(filter(Boolean));\n const configurationId$ = this.activatedRoute.params.pipe(\n map(params => params.configurationId),\n filter(Boolean),\n distinctUntilChanged()\n );\n const deviceId$ = this.activatedRoute.parent.params.pipe(\n map(params => params.id),\n filter(Boolean),\n distinctUntilChanged()\n );\n\n this.connectionSubscription = combineLatest([\n container$,\n deviceId$,\n configurationId$,\n defer(() => this.getNoVNCClient())\n ]).subscribe(([container, deviceId, configurationId, noVNC]) => {\n this.disconnectFromOldSession();\n this.connect(container, deviceId, configurationId, noVNC);\n });\n }\n\n ngOnDestroy(): void {\n this.connectionSubscription?.unsubscribe();\n this.disconnectFromOldSession();\n }\n\n ngAfterViewInit(): void {\n this.container$.next(document.getElementById('vnc-screen'));\n }\n\n disconnectFromOldSession() {\n this.powerCapability = false;\n this.title = '';\n if (!this.noVNCClient) {\n return;\n }\n\n this.noVNCClient.disconnect();\n delete this.noVNCClient;\n }\n\n connect(container: HTMLElement, deviceId: string, configId: string, noVNC: typeof NoVncClient) {\n this.container = container;\n this.changeStatus('connecting');\n const options: NoVncOptions = {\n wsProtocols: ['binary']\n };\n const uri = this.remoteAccess.getWebSocketUri(deviceId, configId);\n this.noVNCClient = new noVNC(container, uri, options);\n this.noVNCClient.resizeSession = true;\n this.noVNCClient.scaleViewport = true;\n this.noVNCClient.showDotCursor = true;\n this.noVNCClient.viewOnly = false;\n this.noVNCClient.qualityLevel = 6;\n // need to set compressionLevel to something different than the default 2 as 2 seems to be causing issues..\n this.noVNCClient.compressionLevel = 9;\n this.noVNCClient.addEventListener('connect', _e => {\n this.changeStatus('connected');\n this.noVNCClient.focus();\n });\n this.noVNCClient.addEventListener('credentialsrequired', e => {\n this.requestCredentials(e.detail.types);\n });\n this.noVNCClient.addEventListener('desktopname', e => {\n this.title = e.detail.name;\n });\n this.noVNCClient.addEventListener('disconnect', () => {\n this.changeStatus('disconnected');\n });\n this.noVNCClient.addEventListener('capabilities', e => {\n this.powerCapability = e.detail.capabilities.power;\n });\n }\n\n downloadScreenshot() {\n this.noVNCClient.toBlob(\n blob => {\n const date = new Date().toISOString();\n saveAs(blob, `screenshot-${this.title}-${date}.png`);\n },\n 'image/png',\n 1\n );\n }\n\n changeStatus(status: 'connecting' | 'connected' | 'disconnected') {\n this.status = status;\n }\n\n toggleFullscreen() {\n if (document.fullscreenElement) {\n document.exitFullscreen();\n } else {\n this.container.requestFullscreen();\n }\n }\n\n sendCtrlAltDel() {\n this.noVNCClient.sendCtrlAltDel();\n }\n\n sendShutDown() {\n this.noVNCClient.machineShutdown();\n }\n\n sendReset() {\n this.noVNCClient.machineReset();\n }\n\n sendReboot() {\n this.noVNCClient.machineReboot();\n }\n\n async getNoVNCClient(): Promise<typeof NoVncClient> {\n const lib = await import('@novnc/novnc/lib/rfb');\n if (typeof lib.default === 'function') {\n return lib.default;\n }\n const libDefault = lib.default as unknown as { default: typeof NoVncClient };\n if (typeof libDefault.default === 'function') {\n return libDefault.default;\n }\n\n throw new Error('NoVNC library not found');\n }\n\n protected async requestCredentials(types: Array<keyof NoVncCredentials>) {\n const modalRef = this.modalService.show(VncCredentialsPromptComponent, {\n ignoreBackdropClick: true,\n keyboard: false,\n initialState: { types: types }\n });\n\n try {\n const { username, password } = await modalRef.content.result;\n this.noVNCClient.sendCredentials({ username, password, target: undefined });\n } catch (e) {\n this.noVNCClient.disconnect();\n }\n }\n}\n","<c8y-title>{{ titlePrefix | translate }}: {{ title | translate }}</c8y-title>\n\n<ng-container *ngIf=\"status === 'connected'\">\n <c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n (click)=\"toggleFullscreen()\"\n >\n <i [c8yIcon]=\"'expand'\"></i>\n <span translate>Fullscreen</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n (click)=\"downloadScreenshot()\"\n >\n <i [c8yIcon]=\"'download'\"></i>\n <span translate>Screenshot</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item [placement]=\"'more'\">\n <button\n class=\"btn btn-link\"\n (click)=\"sendCtrlAltDel()\"\n >\n <i [c8yIcon]=\"'keyboard'\"></i>\n <span translate>Send Ctrl+Alt+Del</span>\n </button>\n </c8y-action-bar-item>\n</ng-container>\n\n<ng-container *ngIf=\"powerCapability && status === 'connected'\">\n <c8y-action-bar-item [placement]=\"'more'\">\n <button\n class=\"btn btn-link\"\n (click)=\"sendShutDown()\"\n >\n <i [c8yIcon]=\"'shutdown'\"></i>\n <span translate>Shutdown</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item [placement]=\"'more'\">\n <button\n class=\"btn btn-link\"\n (click)=\"sendReboot()\"\n >\n <i [c8yIcon]=\"'reset'\"></i>\n <span translate>Reboot</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item [placement]=\"'more'\">\n <button\n class=\"btn btn-link\"\n (click)=\"sendReset()\"\n >\n <i [c8yIcon]=\"'reset'\"></i>\n <span translate>Reset</span>\n </button>\n </c8y-action-bar-item>\n</ng-container>\n\n<c8y-loading *ngIf=\"status === 'connecting'\"></c8y-loading>\n\n<div\n class=\"content-fullpage\"\n [ngClass]=\"{ hidden: status !== 'connected' }\"\n>\n <div\n class=\"inner-scroll\"\n id=\"vnc-screen\"\n ></div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i3"],"mapp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,EAAA,SAAA,EAAA,iBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACtB,qBAAqB,EAAA,QAAA,EAAA,6BAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACrB,aAAa,2EACb,IAAI,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACJ,OAAO,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACP,gBAAgB,8FAPhB,gBAAgB,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAUP,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAf9B,SAAS;+BACE,gBAAgB,EAAA,UAAA,EAEd,IAAI,EAAA,OAAA,EACP;wBACP,gBAAgB;wBAChB,cAAc;wBACd,sBAAsB;wBACtB,qBAAqB;wBACrB,aAAa;wBACb,IAAI;wBACJ,OAAO;wBACP;AACD,qBAAA,EAAA,QAAA,EAAA,i9DAAA,EAAA;;;AEjCH;;AAEG;;;;"}
1
+ {"version":3,"file":"c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs","sources":["../../remote-access/vnc/vnc-viewer/vnc-credentials-prompt/vnc-credentials-prompt.component.ts","../../remote-access/vnc/vnc-viewer/vnc-credentials-prompt/vnc-credentials-prompt.component.html","../../remote-access/vnc/vnc-viewer/vnc-viewer.component.ts","../../remote-access/vnc/vnc-viewer/vnc-viewer.component.html","../../remote-access/vnc/vnc-viewer/c8y-ngx-components-remote-access-vnc-vnc-viewer.ts"],"sourcesContent":["import { NgIf } from '@angular/common';\nimport { Component, Input, OnInit } from '@angular/core';\nimport { FormBuilder, Validators } from '@angular/forms';\nimport { CoreModule } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport type { NoVncCredentials } from '@novnc/novnc/lib/rfb';\nimport { BsModalRef } from 'ngx-bootstrap/modal';\n\n@Component({\n selector: 'c8y-vnc-credentials-prompt',\n templateUrl: './vnc-credentials-prompt.component.html',\n standalone: true,\n imports: [CoreModule, NgIf]\n})\nexport class VncCredentialsPromptComponent implements OnInit {\n title = gettext('VNC credentials');\n @Input() types: Array<keyof NoVncCredentials> = [];\n result = new Promise<ReturnType<typeof this.initForm>['value']>((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n selectedType: string;\n showUsername = false;\n\n form: ReturnType<typeof this.initForm>;\n\n private _resolve: (value: ReturnType<typeof this.initForm>['value']) => void;\n private _reject: (reason?: any) => void;\n\n constructor(\n private formBuilder: FormBuilder,\n private modalRef: BsModalRef\n ) {\n this.form = this.initForm();\n }\n\n ngOnInit() {\n this.showUsername = this.types.includes('username');\n this.form = this.initForm();\n }\n\n initForm() {\n return this.formBuilder.group({\n username: [undefined as string, this.showUsername ? [Validators.required] : []],\n password: [undefined as string, [Validators.required]]\n });\n }\n\n cancel() {\n this._reject();\n }\n\n save() {\n this._resolve(this.form.value);\n }\n\n submit() {\n if (!this.form.valid) {\n return;\n }\n this.modalRef.hide();\n this.save();\n }\n}\n","<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'key'\"></span>\n </ng-container>\n <form\n class=\"p-24\"\n [formGroup]=\"form\"\n (submit)=\"submit()\"\n >\n <c8y-form-group *ngIf=\"showUsername\">\n <label\n for=\"username\"\n translate\n >\n Username\n </label>\n <input\n class=\"form-control\"\n id=\"username\"\n name=\"username\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'admin' }\"\n formControlName=\"username\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n name=\"password\"\n type=\"password\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <button type=\"submit\" class=\"hidden\">hidden submit</button>\n </form>\n</c8y-modal>\n","import { AfterViewInit, Component, OnDestroy } from '@angular/core';\nimport {\n ActionBarItemComponent,\n C8yTranslateDirective,\n C8yTranslatePipe,\n IconDirective,\n LoadingComponent,\n TitleComponent\n} from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport type { NoVncCredentials, NoVncOptions, default as NoVncClient } from '@novnc/novnc/lib/rfb';\nimport { RemoteAccessService } from '@c8y/ngx-components/remote-access/data';\nimport { ActivatedRoute } from '@angular/router';\nimport { NgClass, NgIf } from '@angular/common';\nimport { saveAs } from 'file-saver';\nimport { BsModalService } from 'ngx-bootstrap/modal';\nimport { VncCredentialsPromptComponent } from './vnc-credentials-prompt/vnc-credentials-prompt.component';\nimport { BehaviorSubject, combineLatest, defer, Subscription } from 'rxjs';\nimport { distinctUntilChanged, filter, map } from 'rxjs/operators';\n\n@Component({\n selector: 'c8y-vnc-viewer',\n templateUrl: './vnc-viewer.component.html',\n standalone: true,\n imports: [\n C8yTranslatePipe,\n TitleComponent,\n ActionBarItemComponent,\n C8yTranslateDirective,\n IconDirective,\n NgIf,\n NgClass,\n LoadingComponent\n ]\n})\nexport class VncViewerComponent implements AfterViewInit, OnDestroy {\n titlePrefix = gettext('VNC viewer');\n title = '';\n container: HTMLElement | null = null;\n noVNCClient: NoVncClient;\n powerCapability = false;\n\n status: 'connecting' | 'connected' | 'disconnected' = 'connecting';\n container$ = new BehaviorSubject<HTMLElement | null>(null);\n\n connectionSubscription: Subscription;\n\n constructor(\n private remoteAccess: RemoteAccessService,\n private activatedRoute: ActivatedRoute,\n private modalService: BsModalService\n ) {\n const container$ = this.container$.pipe(filter(Boolean));\n const configurationId$ = this.activatedRoute.params.pipe(\n map(params => params.configurationId),\n filter(Boolean),\n distinctUntilChanged()\n );\n const deviceId$ = this.activatedRoute.parent.params.pipe(\n map(params => params.id),\n filter(Boolean),\n distinctUntilChanged()\n );\n\n this.connectionSubscription = combineLatest([\n container$,\n deviceId$,\n configurationId$,\n defer(() => this.getNoVNCClient())\n ]).subscribe(([container, deviceId, configurationId, noVNC]) => {\n this.disconnectFromOldSession();\n this.connect(container, deviceId, configurationId, noVNC);\n });\n }\n\n ngOnDestroy(): void {\n this.connectionSubscription?.unsubscribe();\n this.disconnectFromOldSession();\n }\n\n ngAfterViewInit(): void {\n this.container$.next(document.getElementById('vnc-screen'));\n }\n\n disconnectFromOldSession() {\n this.powerCapability = false;\n this.title = '';\n if (!this.noVNCClient) {\n return;\n }\n\n this.noVNCClient.disconnect();\n delete this.noVNCClient;\n }\n\n connect(container: HTMLElement, deviceId: string, configId: string, noVNC: typeof NoVncClient) {\n this.container = container;\n this.changeStatus('connecting');\n const options: NoVncOptions = {\n wsProtocols: ['binary']\n };\n const uri = this.remoteAccess.getWebSocketUri(deviceId, configId);\n this.noVNCClient = new noVNC(container, uri, options);\n this.noVNCClient.resizeSession = true;\n this.noVNCClient.scaleViewport = true;\n this.noVNCClient.showDotCursor = true;\n this.noVNCClient.viewOnly = false;\n this.noVNCClient.qualityLevel = 6;\n // need to set compressionLevel to something different than the default 2 as 2 seems to be causing issues..\n this.noVNCClient.compressionLevel = 9;\n this.noVNCClient.addEventListener('connect', _e => {\n this.changeStatus('connected');\n this.noVNCClient.focus();\n });\n this.noVNCClient.addEventListener('credentialsrequired', e => {\n this.requestCredentials(e.detail.types);\n });\n this.noVNCClient.addEventListener('desktopname', e => {\n this.title = e.detail.name;\n });\n this.noVNCClient.addEventListener('disconnect', () => {\n this.changeStatus('disconnected');\n });\n this.noVNCClient.addEventListener('capabilities', e => {\n this.powerCapability = e.detail.capabilities.power;\n });\n }\n\n downloadScreenshot() {\n this.noVNCClient.toBlob(\n blob => {\n const date = new Date().toISOString();\n saveAs(blob, `screenshot-${this.title}-${date}.png`);\n },\n 'image/png',\n 1\n );\n }\n\n changeStatus(status: 'connecting' | 'connected' | 'disconnected') {\n this.status = status;\n }\n\n toggleFullscreen() {\n if (document.fullscreenElement) {\n document.exitFullscreen();\n } else {\n this.container.requestFullscreen();\n }\n }\n\n sendCtrlAltDel() {\n this.noVNCClient.sendCtrlAltDel();\n }\n\n sendShutDown() {\n this.noVNCClient.machineShutdown();\n }\n\n sendReset() {\n this.noVNCClient.machineReset();\n }\n\n sendReboot() {\n this.noVNCClient.machineReboot();\n }\n\n async getNoVNCClient(): Promise<typeof NoVncClient> {\n const lib = await import('@novnc/novnc/lib/rfb');\n if (typeof lib.default === 'function') {\n return lib.default;\n }\n const libDefault = lib.default as unknown as { default: typeof NoVncClient };\n if (typeof libDefault.default === 'function') {\n return libDefault.default;\n }\n\n throw new Error('NoVNC library not found');\n }\n\n protected async requestCredentials(types: Array<keyof NoVncCredentials>) {\n const modalRef = this.modalService.show(VncCredentialsPromptComponent, {\n ignoreBackdropClick: true,\n keyboard: false,\n initialState: { types: types }\n });\n\n try {\n const { username, password } = await modalRef.content.result;\n this.noVNCClient.sendCredentials({ username, password, target: undefined });\n } catch (e) {\n this.noVNCClient.disconnect();\n }\n }\n}\n","<c8y-title>{{ titlePrefix | translate }}: {{ title | translate }}</c8y-title>\n\n<ng-container *ngIf=\"status === 'connected'\">\n <c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n (click)=\"toggleFullscreen()\"\n >\n <i [c8yIcon]=\"'expand'\"></i>\n <span translate>Fullscreen</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n (click)=\"downloadScreenshot()\"\n >\n <i [c8yIcon]=\"'download'\"></i>\n <span translate>Screenshot</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item [placement]=\"'more'\">\n <button\n class=\"btn btn-link\"\n (click)=\"sendCtrlAltDel()\"\n >\n <i [c8yIcon]=\"'keyboard'\"></i>\n <span translate>Send Ctrl+Alt+Del</span>\n </button>\n </c8y-action-bar-item>\n</ng-container>\n\n<ng-container *ngIf=\"powerCapability && status === 'connected'\">\n <c8y-action-bar-item [placement]=\"'more'\">\n <button\n class=\"btn btn-link\"\n (click)=\"sendShutDown()\"\n >\n <i [c8yIcon]=\"'shutdown'\"></i>\n <span translate>Shutdown</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item [placement]=\"'more'\">\n <button\n class=\"btn btn-link\"\n (click)=\"sendReboot()\"\n >\n <i [c8yIcon]=\"'reset'\"></i>\n <span translate>Reboot</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item [placement]=\"'more'\">\n <button\n class=\"btn btn-link\"\n (click)=\"sendReset()\"\n >\n <i [c8yIcon]=\"'reset'\"></i>\n <span translate>Reset</span>\n </button>\n </c8y-action-bar-item>\n</ng-container>\n\n<c8y-loading *ngIf=\"status === 'connecting'\"></c8y-loading>\n\n<div\n class=\"content-fullpage\"\n [ngClass]=\"{ hidden: status !== 'connected' }\"\n>\n <div\n class=\"inner-scroll\"\n id=\"vnc-screen\"\n ></div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;;MAca,6BAA6B,CAAA;IAexC,WAAA,CACU,WAAwB,EACxB,QAAoB,EAAA;QADpB,IAAA,CAAA,WAAW,GAAX,WAAW;QACX,IAAA,CAAA,QAAQ,GAAR,QAAQ;AAhBlB,QAAA,IAAA,CAAA,KAAK,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACzB,IAAA,CAAA,KAAK,GAAkC,EAAE;QAClD,IAAA,CAAA,MAAM,GAAG,IAAI,OAAO,CAA4C,CAAC,OAAO,EAAE,MAAM,KA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