@c8y/ngx-components 1023.14.8 → 1023.14.36

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 (251) hide show
  1. package/ai/index.d.ts +4 -2
  2. package/ai/index.d.ts.map +1 -1
  3. package/auth-configuration/index.d.ts +6 -3
  4. package/auth-configuration/index.d.ts.map +1 -1
  5. package/context-dashboard/index.d.ts +1 -0
  6. package/context-dashboard/index.d.ts.map +1 -1
  7. package/datapoint-explorer/view/index.d.ts +2 -1
  8. package/datapoint-explorer/view/index.d.ts.map +1 -1
  9. package/datapoint-library/details/index.d.ts.map +1 -1
  10. package/datapoint-selector/index.d.ts +6 -3
  11. package/datapoint-selector/index.d.ts.map +1 -1
  12. package/device-grid/index.d.ts.map +1 -1
  13. package/echart/index.d.ts +5 -0
  14. package/echart/index.d.ts.map +1 -1
  15. package/echart/models/index.d.ts +5 -0
  16. package/echart/models/index.d.ts.map +1 -1
  17. package/fesm2022/c8y-ngx-components-actility-device-registration.mjs +16 -16
  18. package/fesm2022/c8y-ngx-components-advanced-software-management.mjs +7 -7
  19. package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs +9 -9
  20. package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs +12 -12
  21. package/fesm2022/c8y-ngx-components-ai.mjs +11 -9
  22. package/fesm2022/c8y-ngx-components-ai.mjs.map +1 -1
  23. package/fesm2022/c8y-ngx-components-alarm-event-selector.mjs +34 -34
  24. package/fesm2022/c8y-ngx-components-alarms-cockpit.mjs +4 -4
  25. package/fesm2022/c8y-ngx-components-alarms.mjs +76 -76
  26. package/fesm2022/c8y-ngx-components-api.mjs +7 -7
  27. package/fesm2022/c8y-ngx-components-app-logs.mjs +10 -10
  28. package/fesm2022/c8y-ngx-components-asset-properties.mjs +39 -39
  29. package/fesm2022/{c8y-ngx-components-asset-property-grid.component-B1q7kXRu.mjs → c8y-ngx-components-asset-property-grid.component-CDjsn5j9.mjs} +13 -13
  30. package/fesm2022/{c8y-ngx-components-asset-property-grid.component-B1q7kXRu.mjs.map → c8y-ngx-components-asset-property-grid.component-CDjsn5j9.mjs.map} +1 -1
  31. package/fesm2022/c8y-ngx-components-assets-navigator.mjs +32 -32
  32. package/fesm2022/c8y-ngx-components-auth-configuration.mjs +244 -170
  33. package/fesm2022/c8y-ngx-components-auth-configuration.mjs.map +1 -1
  34. package/fesm2022/c8y-ngx-components-binary-file-download.mjs +7 -7
  35. package/fesm2022/c8y-ngx-components-bookmarks.mjs +13 -13
  36. package/fesm2022/c8y-ngx-components-branding-base-branding.mjs +4 -4
  37. package/fesm2022/c8y-ngx-components-branding-dark-theme.mjs +7 -7
  38. package/fesm2022/c8y-ngx-components-branding-extra-css-branding-editor.mjs +7 -7
  39. package/fesm2022/c8y-ngx-components-branding-plain-branding-editor-lazy.mjs +3 -3
  40. package/fesm2022/c8y-ngx-components-branding-plain-branding-editor.mjs +7 -7
  41. package/fesm2022/c8y-ngx-components-branding-shared-data.mjs +15 -15
  42. package/fesm2022/c8y-ngx-components-branding-shared-lazy-add-branding-modal.mjs +6 -6
  43. package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs +36 -36
  44. package/fesm2022/c8y-ngx-components-branding-shared.mjs +13 -13
  45. package/fesm2022/c8y-ngx-components-child-devices.mjs +13 -13
  46. package/fesm2022/c8y-ngx-components-cockpit-config.mjs +40 -40
  47. package/fesm2022/{c8y-ngx-components-computed-asset-properties-alarm-count-config.component-Bl18pHcM.mjs → c8y-ngx-components-computed-asset-properties-alarm-count-config.component-SA0syLy7.mjs} +4 -4
  48. package/fesm2022/{c8y-ngx-components-computed-asset-properties-alarm-count-config.component-Bl18pHcM.mjs.map → c8y-ngx-components-computed-asset-properties-alarm-count-config.component-SA0syLy7.mjs.map} +1 -1
  49. package/fesm2022/{c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-C5QMFdX1.mjs → c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-BOmgJI14.mjs} +4 -4
  50. package/fesm2022/{c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-C5QMFdX1.mjs.map → c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-BOmgJI14.mjs.map} +1 -1
  51. package/fesm2022/{c8y-ngx-components-computed-asset-properties-event-count-config.component-C-Lc5Ble.mjs → c8y-ngx-components-computed-asset-properties-event-count-config.component-CaTb9cph.mjs} +4 -4
  52. package/fesm2022/{c8y-ngx-components-computed-asset-properties-event-count-config.component-C-Lc5Ble.mjs.map → c8y-ngx-components-computed-asset-properties-event-count-config.component-CaTb9cph.mjs.map} +1 -1
  53. package/fesm2022/{c8y-ngx-components-computed-asset-properties-last-measurement-config.component-BXfM7hTQ.mjs → c8y-ngx-components-computed-asset-properties-last-measurement-config.component-DkrSvf9F.mjs} +4 -4
  54. package/fesm2022/{c8y-ngx-components-computed-asset-properties-last-measurement-config.component-BXfM7hTQ.mjs.map → c8y-ngx-components-computed-asset-properties-last-measurement-config.component-DkrSvf9F.mjs.map} +1 -1
  55. package/fesm2022/c8y-ngx-components-computed-asset-properties.mjs +6 -6
  56. package/fesm2022/c8y-ngx-components-connectivity.mjs +53 -53
  57. package/fesm2022/c8y-ngx-components-context-dashboard-asset-add.mjs +10 -10
  58. package/fesm2022/c8y-ngx-components-context-dashboard-asset-view.mjs +7 -7
  59. package/fesm2022/c8y-ngx-components-context-dashboard-cockpit-home-dashboard.mjs +11 -11
  60. package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-BuGMpNrA.mjs → c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-DM3hASUP.mjs} +4 -4
  61. package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-BuGMpNrA.mjs.map → c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-DM3hASUP.mjs.map} +1 -1
  62. package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-general-settings.component-DN-f35bA.mjs → c8y-ngx-components-context-dashboard-dashboard-general-settings.component-CC5346kW.mjs} +10 -10
  63. package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-general-settings.component-DN-f35bA.mjs.map → c8y-ngx-components-context-dashboard-dashboard-general-settings.component-CC5346kW.mjs.map} +1 -1
  64. package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-version-history.component-BlIVEV__.mjs → c8y-ngx-components-context-dashboard-dashboard-version-history.component-CHuc--XM.mjs} +4 -4
  65. package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-version-history.component-BlIVEV__.mjs.map → c8y-ngx-components-context-dashboard-dashboard-version-history.component-CHuc--XM.mjs.map} +1 -1
  66. package/fesm2022/c8y-ngx-components-context-dashboard-device-add.mjs +10 -10
  67. package/fesm2022/c8y-ngx-components-context-dashboard-device-view.mjs +7 -7
  68. package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs +3 -3
  69. package/fesm2022/c8y-ngx-components-context-dashboard-state.mjs +3 -3
  70. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +113 -108
  71. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  72. package/fesm2022/{c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-m7YeEj9R.mjs → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-D0C7SH6L.mjs} +16 -16
  73. package/fesm2022/{c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-m7YeEj9R.mjs.map → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-D0C7SH6L.mjs.map} +1 -1
  74. package/fesm2022/c8y-ngx-components-dashboard-details-advanced-tab.mjs +12 -12
  75. package/fesm2022/c8y-ngx-components-dashboard-manager-devicemanagement.mjs +6 -6
  76. package/fesm2022/c8y-ngx-components-dashboard-manager.mjs +22 -22
  77. package/fesm2022/c8y-ngx-components-data-broker.mjs +7 -7
  78. package/fesm2022/c8y-ngx-components-data-grid-columns-asset-type.mjs +3 -3
  79. package/fesm2022/c8y-ngx-components-data-grid-columns.mjs +3 -3
  80. package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +34 -26
  81. package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
  82. package/fesm2022/c8y-ngx-components-datapoint-explorer.mjs +13 -13
  83. package/fesm2022/c8y-ngx-components-datapoint-library-details.mjs +6 -19
  84. package/fesm2022/c8y-ngx-components-datapoint-library-details.mjs.map +1 -1
  85. package/fesm2022/c8y-ngx-components-datapoint-library-list.mjs +3 -3
  86. package/fesm2022/c8y-ngx-components-datapoint-library-services.mjs +3 -3
  87. package/fesm2022/c8y-ngx-components-datapoint-library.mjs +4 -4
  88. package/fesm2022/c8y-ngx-components-datapoint-selector.mjs +56 -57
  89. package/fesm2022/c8y-ngx-components-datapoint-selector.mjs.map +1 -1
  90. package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs +34 -34
  91. package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs.map +1 -1
  92. package/fesm2022/c8y-ngx-components-default-subscriptions.mjs +16 -16
  93. package/fesm2022/c8y-ngx-components-device-grid.mjs +48 -44
  94. package/fesm2022/c8y-ngx-components-device-grid.mjs.map +1 -1
  95. package/fesm2022/c8y-ngx-components-device-list.mjs +22 -22
  96. package/fesm2022/c8y-ngx-components-device-map.mjs +12 -12
  97. package/fesm2022/c8y-ngx-components-device-profile.mjs +34 -34
  98. package/fesm2022/c8y-ngx-components-device-protocol-object-mappings.mjs +3 -3
  99. package/fesm2022/c8y-ngx-components-device-protocols.mjs +16 -16
  100. package/fesm2022/c8y-ngx-components-device-provisioned-certificates.mjs +13 -13
  101. package/fesm2022/c8y-ngx-components-device-shell.mjs +31 -31
  102. package/fesm2022/c8y-ngx-components-diagnostics.mjs +13 -13
  103. package/fesm2022/c8y-ngx-components-echart-models.mjs.map +1 -1
  104. package/fesm2022/c8y-ngx-components-echart.mjs +137 -59
  105. package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
  106. package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs +43 -43
  107. package/fesm2022/c8y-ngx-components-ecosystem-archived-confirm.mjs +7 -7
  108. package/fesm2022/c8y-ngx-components-ecosystem-license-confirm.mjs +10 -10
  109. package/fesm2022/c8y-ngx-components-ecosystem-plugin-setup-stepper.mjs +7 -7
  110. package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs +46 -46
  111. package/fesm2022/c8y-ngx-components-ecosystem.mjs +82 -82
  112. package/fesm2022/c8y-ngx-components-editor.mjs +6 -6
  113. package/fesm2022/c8y-ngx-components-events-events-timeline.mjs +4 -4
  114. package/fesm2022/c8y-ngx-components-events-events-timeline.mjs.map +1 -1
  115. package/fesm2022/c8y-ngx-components-events.mjs +3 -3
  116. package/fesm2022/c8y-ngx-components-exports-list.mjs +6 -6
  117. package/fesm2022/c8y-ngx-components-file-preview.mjs +7 -7
  118. package/fesm2022/c8y-ngx-components-files-repository.mjs +19 -19
  119. package/fesm2022/c8y-ngx-components-global-context.mjs +134 -134
  120. package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
  121. package/fesm2022/c8y-ngx-components-icon-selector.mjs +21 -21
  122. package/fesm2022/c8y-ngx-components-icon-selector.mjs.map +1 -1
  123. package/fesm2022/c8y-ngx-components-interval-picker.mjs +3 -3
  124. package/fesm2022/c8y-ngx-components-location.mjs +28 -28
  125. package/fesm2022/c8y-ngx-components-loriot-device-registration.mjs +16 -16
  126. package/fesm2022/c8y-ngx-components-map.mjs +19 -19
  127. package/fesm2022/c8y-ngx-components-messaging-management.mjs +55 -55
  128. package/fesm2022/c8y-ngx-components-operations-bulk-operation-from-single.mjs +7 -7
  129. package/fesm2022/c8y-ngx-components-operations-bulk-operation-list-item.mjs +19 -19
  130. package/fesm2022/c8y-ngx-components-operations-bulk-operation-scheduler.mjs +7 -7
  131. package/fesm2022/c8y-ngx-components-operations-bulk-operation-stepper.mjs +13 -13
  132. package/fesm2022/c8y-ngx-components-operations-bulk-operations-list.mjs +13 -13
  133. package/fesm2022/c8y-ngx-components-operations-bulk-operations-service.mjs +7 -7
  134. package/fesm2022/c8y-ngx-components-operations-bulk-operations-stepper-container.mjs +7 -7
  135. package/fesm2022/c8y-ngx-components-operations-bulk-single-operations-list.mjs +3 -3
  136. package/fesm2022/c8y-ngx-components-operations-create-bulk-operation-details.mjs +7 -7
  137. package/fesm2022/c8y-ngx-components-operations-device-selector.mjs +7 -7
  138. package/fesm2022/c8y-ngx-components-operations-grid-columns.mjs +12 -12
  139. package/fesm2022/c8y-ngx-components-operations-operation-details.mjs +13 -13
  140. package/fesm2022/c8y-ngx-components-operations-operation-summary.mjs +7 -7
  141. package/fesm2022/c8y-ngx-components-operations-operations-list-item-details.mjs +10 -10
  142. package/fesm2022/c8y-ngx-components-operations-operations-list.mjs +12 -12
  143. package/fesm2022/c8y-ngx-components-operations-operations-timeline.mjs +10 -12
  144. package/fesm2022/c8y-ngx-components-operations-operations-timeline.mjs.map +1 -1
  145. package/fesm2022/c8y-ngx-components-operations-shared.mjs +10 -10
  146. package/fesm2022/c8y-ngx-components-operations-status-filter.mjs +7 -7
  147. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-configuration.mjs +7 -7
  148. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-device-profile.mjs +13 -13
  149. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-firmware.mjs +13 -13
  150. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs +13 -13
  151. package/fesm2022/c8y-ngx-components-operations-stepper-frames.mjs +13 -13
  152. package/fesm2022/c8y-ngx-components-operations.mjs +7 -7
  153. package/fesm2022/c8y-ngx-components-pending-mo-request.mjs +7 -7
  154. package/fesm2022/c8y-ngx-components-platform-configuration.mjs +10 -10
  155. package/fesm2022/c8y-ngx-components-protocol-lpwan.mjs +38 -38
  156. package/fesm2022/c8y-ngx-components-protocol-opcua.mjs +58 -58
  157. package/fesm2022/c8y-ngx-components-register-device.mjs +58 -58
  158. package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs +9 -9
  159. package/fesm2022/c8y-ngx-components-remote-access-data.mjs +3 -3
  160. package/fesm2022/c8y-ngx-components-remote-access-passthrough.mjs +3 -3
  161. package/fesm2022/c8y-ngx-components-remote-access-shared.mjs +6 -6
  162. package/fesm2022/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs +3 -3
  163. package/fesm2022/c8y-ngx-components-remote-access-ssh.mjs +3 -3
  164. package/fesm2022/c8y-ngx-components-remote-access-telnet.mjs +3 -3
  165. package/fesm2022/c8y-ngx-components-remote-access-terminal-viewer.mjs +3 -3
  166. package/fesm2022/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs +3 -3
  167. package/fesm2022/c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs +6 -6
  168. package/fesm2022/c8y-ngx-components-remote-access-vnc.mjs +3 -3
  169. package/fesm2022/c8y-ngx-components-replace-device-replace-device-wizard.mjs +6 -6
  170. package/fesm2022/c8y-ngx-components-replace-device.mjs +10 -10
  171. package/fesm2022/c8y-ngx-components-report-dashboard.mjs +16 -16
  172. package/fesm2022/c8y-ngx-components-reports.mjs +19 -19
  173. package/fesm2022/c8y-ngx-components-repository-configuration.mjs +48 -48
  174. package/fesm2022/c8y-ngx-components-repository-firmware.mjs +33 -33
  175. package/fesm2022/c8y-ngx-components-repository-shared.mjs +34 -34
  176. package/fesm2022/c8y-ngx-components-repository-software.mjs +42 -42
  177. package/fesm2022/c8y-ngx-components-repository.mjs +4 -4
  178. package/fesm2022/c8y-ngx-components-search.mjs +48 -45
  179. package/fesm2022/c8y-ngx-components-search.mjs.map +1 -1
  180. package/fesm2022/c8y-ngx-components-sensor-phone-sensor-phone-modal.mjs +6 -6
  181. package/fesm2022/c8y-ngx-components-sensor-phone.mjs +7 -7
  182. package/fesm2022/c8y-ngx-components-services-service-command-tab.mjs +3 -3
  183. package/fesm2022/c8y-ngx-components-services-shared.mjs +3 -3
  184. package/fesm2022/c8y-ngx-components-services.mjs +29 -29
  185. package/fesm2022/c8y-ngx-components-sigfox-device-registration.mjs +16 -16
  186. package/fesm2022/c8y-ngx-components-sms-gateway.mjs +7 -7
  187. package/fesm2022/c8y-ngx-components-static-assets-data.mjs +3 -3
  188. package/fesm2022/c8y-ngx-components-static-assets-modal.mjs +9 -9
  189. package/fesm2022/c8y-ngx-components-static-assets.mjs +6 -6
  190. package/fesm2022/c8y-ngx-components-sub-assets.mjs +76 -66
  191. package/fesm2022/c8y-ngx-components-sub-assets.mjs.map +1 -1
  192. package/fesm2022/c8y-ngx-components-tenants.mjs +40 -40
  193. package/fesm2022/c8y-ngx-components-time-context.mjs +14 -7
  194. package/fesm2022/c8y-ngx-components-time-context.mjs.map +1 -1
  195. package/fesm2022/c8y-ngx-components-tracking.mjs +15 -15
  196. package/fesm2022/c8y-ngx-components-tracking.mjs.map +1 -1
  197. package/fesm2022/c8y-ngx-components-translation-editor-data.mjs +3 -3
  198. package/fesm2022/c8y-ngx-components-translation-editor-lazy.mjs +12 -12
  199. package/fesm2022/c8y-ngx-components-translation-editor.mjs +6 -6
  200. package/fesm2022/c8y-ngx-components-trusted-certificates.mjs +33 -33
  201. package/fesm2022/c8y-ngx-components-upgrade-upgraded-services.mjs +4 -4
  202. package/fesm2022/c8y-ngx-components-upgrade.mjs +41 -41
  203. package/fesm2022/c8y-ngx-components-user-roles.mjs +10 -10
  204. package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-graph.mjs +3 -3
  205. package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs +4 -4
  206. package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs.map +1 -1
  207. package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs +6 -6
  208. package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +19 -19
  209. package/fesm2022/c8y-ngx-components-widgets-implementations-asset-notes.mjs +3 -3
  210. package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-legacy-welcome.mjs +3 -3
  211. package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-welcome.mjs +3 -3
  212. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +13 -9
  213. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
  214. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +27 -27
  215. package/fesm2022/c8y-ngx-components-widgets-implementations-device-control-message.mjs +3 -3
  216. package/fesm2022/c8y-ngx-components-widgets-implementations-device-management-welcome.mjs +7 -7
  217. package/fesm2022/c8y-ngx-components-widgets-implementations-help-and-service-widget.mjs +3 -3
  218. package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs +24 -24
  219. package/fesm2022/c8y-ngx-components-widgets-implementations-image.mjs +9 -9
  220. package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs +18 -18
  221. package/fesm2022/c8y-ngx-components-widgets-implementations-kpi.mjs +6 -6
  222. package/fesm2022/c8y-ngx-components-widgets-implementations-linear-gauge.mjs +6 -6
  223. package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs +9 -9
  224. package/fesm2022/c8y-ngx-components-widgets-implementations-markdown.mjs +9 -9
  225. package/fesm2022/c8y-ngx-components-widgets-implementations-quick-links.mjs +18 -18
  226. package/fesm2022/c8y-ngx-components-widgets-implementations-three-d-rotation.mjs +9 -9
  227. package/fesm2022/c8y-ngx-components.mjs +9428 -9410
  228. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  229. package/global-context/index.d.ts.map +1 -1
  230. package/index.d.ts +5815 -5815
  231. package/index.d.ts.map +1 -1
  232. package/locales/de.po +79 -94
  233. package/locales/es.po +13 -11
  234. package/locales/fr.po +14 -12
  235. package/locales/ja_JP.po +11 -10
  236. package/locales/ko.po +13 -11
  237. package/locales/locales.pot +17 -8
  238. package/locales/nl.po +14 -12
  239. package/locales/pl.po +14 -12
  240. package/locales/pt_BR.po +13 -11
  241. package/locales/zh_CN.po +12 -11
  242. package/locales/zh_TW.po +15 -12
  243. package/operations/operations-timeline/index.d.ts.map +1 -1
  244. package/package.json +1 -1
  245. package/search/index.d.ts +5 -5
  246. package/search/index.d.ts.map +1 -1
  247. package/sub-assets/index.d.ts +3 -3
  248. package/sub-assets/index.d.ts.map +1 -1
  249. package/time-context/index.d.ts +3 -2
  250. package/time-context/index.d.ts.map +1 -1
  251. package/widgets/implementations/datapoints-graph/index.d.ts.map +1 -1
@@ -32,10 +32,10 @@ class AiChatMessageActionComponent {
32
32
  */
33
33
  this.click = new EventEmitter();
34
34
  }
35
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AiChatMessageActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
36
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: AiChatMessageActionComponent, isStandalone: true, selector: "c8y-ai-chat-message-action", inputs: { disabled: "disabled", tooltip: "tooltip", icon: "icon" }, outputs: { click: "click" }, ngImport: i0, template: "<button\n class=\"btn btn-dot text-muted\"\n [attr.aria-label]=\"tooltip | translate\"\n [tooltip]=\"tooltip | translate\"\n [adaptivePosition]=\"true\"\n [delay]=\"500\"\n (click)=\"click.emit()\"\n [disabled]=\"disabled\"\n>\n <i\n class=\"text-12\"\n [c8yIcon]=\"icon\"\n ></i>\n</button>\n", dependencies: [{ kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i1.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
35
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AiChatMessageActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
36
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: AiChatMessageActionComponent, isStandalone: true, selector: "c8y-ai-chat-message-action", inputs: { disabled: "disabled", tooltip: "tooltip", icon: "icon" }, outputs: { click: "click" }, ngImport: i0, template: "<button\n class=\"btn btn-dot text-muted\"\n [attr.aria-label]=\"tooltip | translate\"\n [tooltip]=\"tooltip | translate\"\n [adaptivePosition]=\"true\"\n [delay]=\"500\"\n (click)=\"click.emit()\"\n [disabled]=\"disabled\"\n>\n <i\n class=\"text-12\"\n [c8yIcon]=\"icon\"\n ></i>\n</button>\n", dependencies: [{ kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i1.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
37
37
  }
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AiChatMessageActionComponent, decorators: [{
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AiChatMessageActionComponent, decorators: [{
39
39
  type: Component,
40
40
  args: [{ selector: 'c8y-ai-chat-message-action', standalone: true, imports: [TooltipModule, C8yTranslatePipe, IconDirective], template: "<button\n class=\"btn btn-dot text-muted\"\n [attr.aria-label]=\"tooltip | translate\"\n [tooltip]=\"tooltip | translate\"\n [adaptivePosition]=\"true\"\n [delay]=\"500\"\n (click)=\"click.emit()\"\n [disabled]=\"disabled\"\n>\n <i\n class=\"text-12\"\n [c8yIcon]=\"icon\"\n ></i>\n</button>\n" }]
41
41
  }], propDecorators: { disabled: [{
@@ -89,10 +89,10 @@ class AiChatMessageComponent {
89
89
  return this.translateService.instant(tpl, { time });
90
90
  }, ...(ngDevMode ? [{ debugName: "messageContentAriaLabel" }] : []));
91
91
  }
92
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AiChatMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
93
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AiChatMessageComponent, isStandalone: true, selector: "c8y-ai-chat-message", inputs: { role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"d-col p-t-16\"\n [attr.aria-label]=\"ariaLabel()\"\n role=\"article\"\n>\n <div\n class=\"chat-message text-break-word\"\n [ngClass]=\"{\n 'user-message': message()?.role === 'user' || role() === 'user',\n 'agent-message': message()?.role === 'assistant' || role() === 'assistant'\n }\"\n >\n <div\n class=\"message-content\"\n [attr.aria-label]=\"messageContentAriaLabel()\"\n [innerHTML]=\"message()?.content | markdownToHtml | async\"\n ></div>\n <ng-content select=\":not(c8y-ai-chat-message-action)\"></ng-content>\n @if (message()?.timestamp) {\n <div class=\"message-timestamp\">\n <span [tooltip]=\"message()?.timestamp | c8yDate\">\n {{ message()?.timestamp | c8yDate: 'adaptiveDate' }}\n </span>\n </div>\n }\n </div>\n <div\n class=\"message-action\"\n [attr.aria-label]=\"'Message actions' | translate\"\n role=\"toolbar\"\n [ngClass]=\"{\n 'user-action showOnHover': message()?.role === 'user' || role() === 'user',\n 'agent-action p-l-16': message()?.role === 'assistant' || role() === 'assistant'\n }\"\n >\n <ng-content select=\"c8y-ai-chat-message-action\"></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i1.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "pipe", type: MarkdownToHtmlPipe, name: "markdownToHtml" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: DatePipe, name: "c8yDate" }] }); }
92
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AiChatMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
93
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AiChatMessageComponent, isStandalone: true, selector: "c8y-ai-chat-message", inputs: { role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"d-col p-t-16\"\n [attr.aria-label]=\"ariaLabel()\"\n role=\"article\"\n>\n <div\n class=\"chat-message text-break-word\"\n [ngClass]=\"{\n 'user-message': message()?.role === 'user' || role() === 'user',\n 'agent-message': message()?.role === 'assistant' || role() === 'assistant'\n }\"\n >\n <div\n class=\"message-content\"\n [attr.aria-label]=\"messageContentAriaLabel()\"\n [innerHTML]=\"message()?.content | markdownToHtml | async\"\n ></div>\n <ng-content select=\":not(c8y-ai-chat-message-action)\"></ng-content>\n @if (message()?.timestamp) {\n <div class=\"message-timestamp\">\n <span [tooltip]=\"message()?.timestamp | c8yDate\">\n {{ message()?.timestamp | c8yDate: 'adaptiveDate' }}\n </span>\n </div>\n }\n </div>\n <div\n class=\"message-action\"\n [attr.aria-label]=\"'Message actions' | translate\"\n role=\"toolbar\"\n [ngClass]=\"{\n 'user-action showOnHover': message()?.role === 'user' || role() === 'user',\n 'agent-action p-l-16': message()?.role === 'assistant' || role() === 'assistant'\n }\"\n >\n <ng-content select=\"c8y-ai-chat-message-action\"></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i1.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "pipe", type: MarkdownToHtmlPipe, name: "markdownToHtml" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: DatePipe, name: "c8yDate" }] }); }
94
94
  }
95
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AiChatMessageComponent, decorators: [{
95
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AiChatMessageComponent, decorators: [{
96
96
  type: Component,
97
97
  args: [{ selector: 'c8y-ai-chat-message', standalone: true, imports: [MarkdownToHtmlPipe, AsyncPipe, NgClass, TooltipModule, C8yTranslatePipe, DatePipe], template: "<div\n class=\"d-col p-t-16\"\n [attr.aria-label]=\"ariaLabel()\"\n role=\"article\"\n>\n <div\n class=\"chat-message text-break-word\"\n [ngClass]=\"{\n 'user-message': message()?.role === 'user' || role() === 'user',\n 'agent-message': message()?.role === 'assistant' || role() === 'assistant'\n }\"\n >\n <div\n class=\"message-content\"\n [attr.aria-label]=\"messageContentAriaLabel()\"\n [innerHTML]=\"message()?.content | markdownToHtml | async\"\n ></div>\n <ng-content select=\":not(c8y-ai-chat-message-action)\"></ng-content>\n @if (message()?.timestamp) {\n <div class=\"message-timestamp\">\n <span [tooltip]=\"message()?.timestamp | c8yDate\">\n {{ message()?.timestamp | c8yDate: 'adaptiveDate' }}\n </span>\n </div>\n }\n </div>\n <div\n class=\"message-action\"\n [attr.aria-label]=\"'Message actions' | translate\"\n role=\"toolbar\"\n [ngClass]=\"{\n 'user-action showOnHover': message()?.role === 'user' || role() === 'user',\n 'agent-action p-l-16': message()?.role === 'assistant' || role() === 'assistant'\n }\"\n >\n <ng-content select=\"c8y-ai-chat-message-action\"></ng-content>\n </div>\n</div>\n" }]
98
98
  }], propDecorators: { role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }] } });
@@ -130,10 +130,10 @@ class AiChatSuggestionComponent {
130
130
  timestamp: new Date().toISOString()
131
131
  });
132
132
  }
133
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AiChatSuggestionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
134
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AiChatSuggestionComponent, isStandalone: true, selector: "c8y-ai-chat-suggestion", inputs: { label: "label", prompt: "prompt", icon: "icon", useAiButtons: "useAiButtons", disabled: "disabled" }, outputs: { suggestionClicked: "suggestionClicked" }, ngImport: i0, template: "@if (!useAiButtons) {\n <button\n class=\"btn btn-default btn-sm\"\n [title]=\"prompt | translate\"\n (click)=\"suggest()\"\n [disabled]=\"disabled\"\n >\n <i [c8yIcon]=\"icon\"></i>\n {{ label | translate }}\n </button>\n} @else {\n <button\n class=\"btn btn-sm btn-ai\"\n [title]=\"prompt | translate\"\n (click)=\"suggest()\"\n [disabled]=\"disabled\"\n >\n <span>{{ label | translate }}</span>\n </button>\n}\n", dependencies: [{ kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
133
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AiChatSuggestionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
134
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AiChatSuggestionComponent, isStandalone: true, selector: "c8y-ai-chat-suggestion", inputs: { label: "label", prompt: "prompt", icon: "icon", useAiButtons: "useAiButtons", disabled: "disabled" }, outputs: { suggestionClicked: "suggestionClicked" }, ngImport: i0, template: "@if (!useAiButtons) {\n <button\n class=\"btn btn-default btn-sm\"\n [title]=\"prompt | translate\"\n (click)=\"suggest()\"\n [disabled]=\"disabled\"\n >\n <i [c8yIcon]=\"icon\"></i>\n {{ label | translate }}\n </button>\n} @else {\n <button\n class=\"btn btn-sm btn-ai\"\n [title]=\"prompt | translate\"\n (click)=\"suggest()\"\n [disabled]=\"disabled\"\n >\n <span>{{ label | translate }}</span>\n </button>\n}\n", dependencies: [{ kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
135
135
  }
136
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AiChatSuggestionComponent, decorators: [{
136
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AiChatSuggestionComponent, decorators: [{
137
137
  type: Component,
138
138
  args: [{ selector: 'c8y-ai-chat-suggestion', standalone: true, imports: [IconDirective, C8yTranslatePipe], template: "@if (!useAiButtons) {\n <button\n class=\"btn btn-default btn-sm\"\n [title]=\"prompt | translate\"\n (click)=\"suggest()\"\n [disabled]=\"disabled\"\n >\n <i [c8yIcon]=\"icon\"></i>\n {{ label | translate }}\n </button>\n} @else {\n <button\n class=\"btn btn-sm btn-ai\"\n [title]=\"prompt | translate\"\n (click)=\"suggest()\"\n [disabled]=\"disabled\"\n >\n <span>{{ label | translate }}</span>\n </button>\n}\n" }]
139
139
  }], propDecorators: { label: [{
@@ -227,10 +227,10 @@ class AiChatComponent {
227
227
  cancel() {
228
228
  this.onCancel.emit();
229
229
  }
230
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AiChatComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
231
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AiChatComponent, isStandalone: true, selector: "c8y-ai-chat", inputs: { isLoading: "isLoading", disabled: "disabled", prompt: "prompt", config: "config" }, outputs: { onMessage: "onMessage", onCancel: "onCancel" }, host: { classAttribute: "d-contents" }, queries: [{ propertyName: "messages", predicate: AiChatMessageComponent }], ngImport: i0, template: "<div\n class=\"d-col fit-h fit-w flex-grow\"\n [attr.aria-label]=\"config.headline | translate\"\n role=\"region\"\n>\n @if (messages.length > 0) {\n <div\n class=\"inner-scroll flex-grow d-col-reverse min-height-0 bg-level-0\"\n [attr.aria-label]=\"'Chat conversation' | translate\"\n aria-live=\"polite\"\n aria-atomic=\"false\"\n role=\"log\"\n >\n <div class=\"d-col p-l-16 p-r-16\">\n <ng-content select=\"c8y-ai-chat-message\"></ng-content>\n <ng-content></ng-content>\n </div>\n </div>\n }\n <div [ngClass]=\"{ 'd-col fit-h': messages.length === 0 }\">\n @if (messages.length === 0) {\n <div\n class=\"p-24\"\n aria-live=\"polite\"\n role=\"status\"\n >\n <h4 class=\"m-b-16 text-medium\">{{ config.headline | translate }}</h4>\n <p class=\"p-b-8 text-balance\">{{ config.title | translate }}</p>\n <p class=\"text-muted text-balance\">{{ config.welcomeText | translate }}</p>\n </div>\n }\n <div class=\"chat-input bg-level-1\">\n <div class=\"d-flex inner-scroll a-i-center gap-8 p-l-16 p-r-16 p-b-8\">\n <ng-content select=\"c8y-ai-chat-suggestion\"></ng-content>\n </div>\n <div class=\"chat-input-group\">\n <label\n class=\"sr-only\"\n for=\"chat-input-{{ componentId }}\"\n >\n {{ config.placeholder | translate }}\n </label>\n <textarea\n class=\"form-control no-resize\"\n style=\"max-height: 200px !important\"\n [attr.aria-label]=\"config.placeholder | translate\"\n id=\"chat-input-{{ componentId }}\"\n placeholder=\"{{ config.placeholder | translate }}\"\n [attr.aria-describedby]=\"config.disclaimerText ? 'chat-disclaimer-' + componentId : null\"\n [attr.aria-busy]=\"isLoading\"\n [(ngModel)]=\"prompt\"\n (keydown.enter)=\"sendMessage($event)\"\n [disabled]=\"isLoading || disabled\"\n c8y-textarea-autoresize\n ></textarea>\n <div class=\"chat-input-group-btn\">\n @if (!isLoading) {\n <button\n class=\"btn btn-dot\"\n [attr.title]=\"config.sendButtonText | translate\"\n [attr.aria-label]=\"config.sendButtonText | translate\"\n type=\"button\"\n (click)=\"sendMessage($event)\"\n [disabled]=\"disabled || prompt.trim().length === 0\"\n >\n <i [c8yIcon]=\"config.userInterfaceIcons?.send || 'arrow-circle-right'\"></i>\n </button>\n } @else {\n <button\n class=\"btn btn-dot btn-dot--danger\"\n [attr.title]=\"config.cancelButtonText | translate\"\n [attr.aria-label]=\"config.cancelButtonText | translate\"\n type=\"button\"\n (click)=\"cancel()\"\n >\n <i [c8yIcon]=\"config.userInterfaceIcons?.cancel || 'stop'\"></i>\n </button>\n }\n </div>\n </div>\n @if (config.disclaimerText) {\n <div\n class=\"text-muted m-b-8 text-10 p-l-16\"\n id=\"chat-disclaimer-{{ componentId }}\"\n role=\"note\"\n >\n {{ config.disclaimerText | translate }}\n </div>\n }\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TextareaAutoresizeDirective, selector: "[c8y-textarea-autoresize]" }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
230
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AiChatComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
231
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AiChatComponent, isStandalone: true, selector: "c8y-ai-chat", inputs: { isLoading: "isLoading", disabled: "disabled", prompt: "prompt", config: "config" }, outputs: { onMessage: "onMessage", onCancel: "onCancel" }, host: { classAttribute: "d-contents" }, queries: [{ propertyName: "messages", predicate: AiChatMessageComponent }], ngImport: i0, template: "<div\n class=\"d-col fit-h fit-w flex-grow\"\n [attr.aria-label]=\"config.headline | translate\"\n role=\"region\"\n>\n @if (messages.length > 0) {\n <div\n class=\"inner-scroll flex-grow d-col-reverse min-height-0 bg-level-0\"\n [attr.aria-label]=\"'Chat conversation' | translate\"\n aria-live=\"polite\"\n aria-atomic=\"false\"\n role=\"log\"\n >\n <div class=\"d-col p-l-16 p-r-16\">\n <ng-content select=\"c8y-ai-chat-message\"></ng-content>\n <ng-content></ng-content>\n </div>\n </div>\n }\n <div [ngClass]=\"{ 'd-col fit-h': messages.length === 0 }\">\n @if (messages.length === 0) {\n <div\n class=\"p-24\"\n aria-live=\"polite\"\n role=\"status\"\n >\n <h4 class=\"m-b-16 text-medium\">{{ config.headline | translate }}</h4>\n <p class=\"p-b-8 text-balance\">{{ config.title | translate }}</p>\n <p class=\"text-muted text-balance\">{{ config.welcomeText | translate }}</p>\n </div>\n }\n <div class=\"chat-input bg-level-1\">\n <div class=\"d-flex inner-scroll a-i-center gap-8 p-l-16 p-r-16 p-b-8\">\n <ng-content select=\"c8y-ai-chat-suggestion\"></ng-content>\n </div>\n <div class=\"chat-input-group\">\n <label\n class=\"sr-only\"\n for=\"chat-input-{{ componentId }}\"\n >\n {{ config.placeholder | translate }}\n </label>\n <textarea\n class=\"form-control no-resize\"\n style=\"max-height: 200px !important\"\n [attr.aria-label]=\"config.placeholder | translate\"\n id=\"chat-input-{{ componentId }}\"\n placeholder=\"{{ config.placeholder | translate }}\"\n [attr.aria-describedby]=\"config.disclaimerText ? 'chat-disclaimer-' + componentId : null\"\n [attr.aria-busy]=\"isLoading\"\n [(ngModel)]=\"prompt\"\n (keydown.enter)=\"sendMessage($event)\"\n [disabled]=\"isLoading || disabled\"\n c8y-textarea-autoresize\n ></textarea>\n <div class=\"chat-input-group-btn\">\n @if (!isLoading) {\n <button\n class=\"btn btn-dot\"\n [attr.title]=\"config.sendButtonText | translate\"\n [attr.aria-label]=\"config.sendButtonText | translate\"\n type=\"button\"\n (click)=\"sendMessage($event)\"\n [disabled]=\"disabled || prompt.trim().length === 0\"\n >\n <i [c8yIcon]=\"config.userInterfaceIcons?.send || 'arrow-circle-right'\"></i>\n </button>\n } @else {\n <button\n class=\"btn btn-dot btn-dot--danger\"\n [attr.title]=\"config.cancelButtonText | translate\"\n [attr.aria-label]=\"config.cancelButtonText | translate\"\n type=\"button\"\n (click)=\"cancel()\"\n >\n <i [c8yIcon]=\"config.userInterfaceIcons?.cancel || 'stop'\"></i>\n </button>\n }\n </div>\n </div>\n @if (config.disclaimerText) {\n <div\n class=\"text-muted m-b-8 text-10 p-l-16\"\n id=\"chat-disclaimer-{{ componentId }}\"\n role=\"note\"\n >\n {{ config.disclaimerText | translate }}\n </div>\n }\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TextareaAutoresizeDirective, selector: "[c8y-textarea-autoresize]" }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
232
232
  }
233
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AiChatComponent, decorators: [{
233
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AiChatComponent, decorators: [{
234
234
  type: Component,
235
235
  args: [{ selector: 'c8y-ai-chat', imports: [C8yTranslatePipe, FormsModule, TextareaAutoresizeDirective, IconDirective, NgClass], standalone: true, host: { class: 'd-contents' }, template: "<div\n class=\"d-col fit-h fit-w flex-grow\"\n [attr.aria-label]=\"config.headline | translate\"\n role=\"region\"\n>\n @if (messages.length > 0) {\n <div\n class=\"inner-scroll flex-grow d-col-reverse min-height-0 bg-level-0\"\n [attr.aria-label]=\"'Chat conversation' | translate\"\n aria-live=\"polite\"\n aria-atomic=\"false\"\n role=\"log\"\n >\n <div class=\"d-col p-l-16 p-r-16\">\n <ng-content select=\"c8y-ai-chat-message\"></ng-content>\n <ng-content></ng-content>\n </div>\n </div>\n }\n <div [ngClass]=\"{ 'd-col fit-h': messages.length === 0 }\">\n @if (messages.length === 0) {\n <div\n class=\"p-24\"\n aria-live=\"polite\"\n role=\"status\"\n >\n <h4 class=\"m-b-16 text-medium\">{{ config.headline | translate }}</h4>\n <p class=\"p-b-8 text-balance\">{{ config.title | translate }}</p>\n <p class=\"text-muted text-balance\">{{ config.welcomeText | translate }}</p>\n </div>\n }\n <div class=\"chat-input bg-level-1\">\n <div class=\"d-flex inner-scroll a-i-center gap-8 p-l-16 p-r-16 p-b-8\">\n <ng-content select=\"c8y-ai-chat-suggestion\"></ng-content>\n </div>\n <div class=\"chat-input-group\">\n <label\n class=\"sr-only\"\n for=\"chat-input-{{ componentId }}\"\n >\n {{ config.placeholder | translate }}\n </label>\n <textarea\n class=\"form-control no-resize\"\n style=\"max-height: 200px !important\"\n [attr.aria-label]=\"config.placeholder | translate\"\n id=\"chat-input-{{ componentId }}\"\n placeholder=\"{{ config.placeholder | translate }}\"\n [attr.aria-describedby]=\"config.disclaimerText ? 'chat-disclaimer-' + componentId : null\"\n [attr.aria-busy]=\"isLoading\"\n [(ngModel)]=\"prompt\"\n (keydown.enter)=\"sendMessage($event)\"\n [disabled]=\"isLoading || disabled\"\n c8y-textarea-autoresize\n ></textarea>\n <div class=\"chat-input-group-btn\">\n @if (!isLoading) {\n <button\n class=\"btn btn-dot\"\n [attr.title]=\"config.sendButtonText | translate\"\n [attr.aria-label]=\"config.sendButtonText | translate\"\n type=\"button\"\n (click)=\"sendMessage($event)\"\n [disabled]=\"disabled || prompt.trim().length === 0\"\n >\n <i [c8yIcon]=\"config.userInterfaceIcons?.send || 'arrow-circle-right'\"></i>\n </button>\n } @else {\n <button\n class=\"btn btn-dot btn-dot--danger\"\n [attr.title]=\"config.cancelButtonText | translate\"\n [attr.aria-label]=\"config.cancelButtonText | translate\"\n type=\"button\"\n (click)=\"cancel()\"\n >\n <i [c8yIcon]=\"config.userInterfaceIcons?.cancel || 'stop'\"></i>\n </button>\n }\n </div>\n </div>\n @if (config.disclaimerText) {\n <div\n class=\"text-muted m-b-8 text-10 p-l-16\"\n id=\"chat-disclaimer-{{ componentId }}\"\n role=\"note\"\n >\n {{ config.disclaimerText | translate }}\n </div>\n }\n </div>\n </div>\n</div>\n" }]
236
236
  }], propDecorators: { isLoading: [{
@@ -22,8 +22,10 @@ var DataStreamType;
22
22
  DataStreamType["MESSAGE_ANNOTATIONS"] = "message-annotations";
23
23
  DataStreamType["SOURCE"] = "source";
24
24
  DataStreamType["FILE"] = "file";
25
- DataStreamType["STEP_START"] = "step-start";
26
- DataStreamType["STEP_FINISH"] = "step-finish";
25
+ DataStreamType["STEP_START"] = "start-step";
26
+ DataStreamType["STEP_FINISH"] = "finish-step";
27
+ DataStreamType["STEP_START_V4"] = "step-start";
28
+ DataStreamType["STEP_FINISH_V4"] = "step-finish";
27
29
  })(DataStreamType || (DataStreamType = {}));
28
30
 
29
31
  class AIService {
@@ -218,7 +220,7 @@ class AIService {
218
220
  return;
219
221
  }
220
222
  switch (type) {
221
- case DataStreamType.STEP_START:
223
+ case DataStreamType.STEP_START || DataStreamType.STEP_START_V4:
222
224
  message.steps = message.steps || [];
223
225
  message.steps.push({
224
226
  type: 'text',
@@ -231,12 +233,12 @@ class AIService {
231
233
  if (lastStep.reasoning === undefined) {
232
234
  lastStep.reasoning = '';
233
235
  }
234
- lastStep.reasoning += data.textDelta;
236
+ lastStep.reasoning += data.text || data.textDelta;
235
237
  observer.next(message);
236
238
  return;
237
239
  case DataStreamType.TEXT_DELTA:
238
- lastStep.text += data.textDelta;
239
- message.content += data.textDelta;
240
+ lastStep.text += data.text || data.textDelta;
241
+ message.content += data.text || data.textDelta;
240
242
  observer.next(message);
241
243
  return;
242
244
  case DataStreamType.TOOL_CALL:
@@ -273,10 +275,10 @@ class AIService {
273
275
  observer.error(e);
274
276
  }
275
277
  }
276
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AIService, deps: [{ token: i1.FetchClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
277
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AIService, providedIn: 'root' }); }
278
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AIService, deps: [{ token: i1.FetchClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
279
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AIService, providedIn: 'root' }); }
278
280
  }
279
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AIService, decorators: [{
281
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AIService, decorators: [{
280
282
  type: Injectable,
281
283
  args: [{
282
284
  providedIn: 'root'
@@ -1 +1 @@
1
- {"version":3,"file":"c8y-ngx-components-ai.mjs","sources":["../../ai/ai.model.ts","../../ai/ai.service.ts","../../ai/c8y-ngx-components-ai.ts"],"sourcesContent":["import { Type } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nexport interface AIMessageStreamSteps extends AIMessage {\n componentSteps$?: Observable<{ content: Type<any> | string; origin: AgentStep }[]>;\n}\n\nexport interface AIMessage {\n role: 'user' | 'assistant';\n content: string;\n options?: AIMessageOptions;\n steps?: Array<AgentStep>;\n finishReason?: 'stop' | 'error' | 'tool_use';\n timestamp?: string;\n}\n\nexport interface AIMessageOptions {\n skipToLLM?: boolean;\n hiddenContent?: string;\n variables?: { [key: string]: any };\n}\n\nexport enum DataStreamType {\n TEXT_DELTA = 'text-delta',\n TOOL_CALL = 'tool-call',\n TOOL_CALL_STREAMING = 'tool-call-streaming',\n TOOL_CALL_DELTA = 'tool-call-delta',\n TOOL_RESULT = 'tool-result',\n REASONING = 'reasoning',\n REASONING_DELTA = 'reasoning-delta',\n REDACTED_REASONING = 'redacted-reasoning',\n REASONING_SIGNATURE = 'reasoning-signature',\n FINISH_REASONING = 'finish-reasoning',\n FINISH = 'finish',\n FINISH_STEP = 'finish-step',\n ERROR = 'error',\n DATA = 'data',\n MESSAGE_ANNOTATIONS = 'message-annotations',\n SOURCE = 'source',\n FILE = 'file',\n STEP_START = 'step-start',\n STEP_FINISH = 'step-finish'\n}\n\nexport type AgentStep = {\n type: 'text' | 'reasoning' | string;\n text: string;\n reasoning?: string;\n textDelta?: string;\n toolCalls?: Array<ToolCall>;\n toolResults?: Array<ToolResult>;\n};\n\nexport interface Tool {\n toolName: string;\n toolId: string;\n type: 'tool-call' | 'tool-result';\n}\n\nexport interface ToolCall extends Tool {\n arguments: { [key: string]: any };\n}\n\nexport interface ToolResult extends Tool {\n result: {\n content: {\n text: string;\n type: string;\n }[];\n };\n}\n\nexport interface ClientAgentDefinition {\n /**\n * If set to true, the agent will be created each time. This is useful for development.\n */\n snapshot: boolean;\n /**\n * The label of the agent that is shown to the user.\n */\n label: string;\n /**\n * The definitions of the agent.\n *\n * You can use multiple definitions that can be used in an agent-2-agent scenario\n * The first definition is the entry point.\n */\n definitions: {\n name: string;\n type: 'object' | 'text';\n agent: {\n system: string;\n [key: string]: any;\n };\n mcp: Array<{ serverName: string; tools: string[] }>;\n }[];\n}\n\nexport interface ChatConfig {\n title: string;\n headline: string;\n welcomeText: string;\n placeholder: string;\n sendButtonText: string;\n cancelButtonText: string;\n disclaimerText: string;\n userInterfaceIcons: { send: string; cancel: string };\n}\n\nexport interface AgentHealthCheckResponse {\n /**\n * Indicates if the agent exists and can be used.\n * If false, the agent was not found.\n */\n exists: boolean;\n /**\n * Indicates if the user can create the agent, and if a global provider is configured.\n */\n canCreate: boolean;\n /**\n * Indicates if the provider is configured.\n * If false, the agent cannot be created as the provider is not configured.\n */\n isProviderConfigured: boolean;\n /**\n * If canCreate or exist is false, this array contains messages\n * that explain why the agent cannot be used or created.\n */\n messages?: string[];\n}\n","import { Injectable } from '@angular/core';\nimport {\n AgentHealthCheckResponse,\n AIMessage,\n ClientAgentDefinition,\n DataStreamType\n} from './ai.model';\nimport { FetchClient } from '@c8y/client';\nimport { Observable } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AIService {\n private baseUrl = '/service/ai';\n\n constructor(private client: FetchClient) {}\n\n async createOrUpdateAgent(agentsDef: ClientAgentDefinition): Promise<void> {\n for (const def of agentsDef.definitions) {\n const health = await this.getAgentHealth(def.name);\n let resource = `${this.baseUrl}/agent/${def.type}`;\n let method = 'POST';\n if (health.exists) {\n resource = `${this.baseUrl}/agent/${def.type}/${def.name}`;\n method = 'PUT';\n }\n const response = await this.client.fetch(resource, {\n body: JSON.stringify(def),\n method,\n headers: { 'Content-Type': 'application/json' }\n });\n\n if (!response.ok) {\n throw new Error(`Failed to create agent: ${response.statusText}`);\n }\n }\n }\n\n /**\n * Check if an agent exists.\n * @param name Agent name\n * @returns Agent health check response.\n */\n async getAgentHealth(name: string): Promise<AgentHealthCheckResponse> {\n const response = await this.client.fetch(`${this.baseUrl}/agent/test/${name}`, {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n });\n\n if (!response.ok) {\n return {\n exists: false,\n canCreate: false,\n isProviderConfigured: false\n };\n }\n const json = await response.json();\n return json;\n }\n\n /**\n * Send a text message to the agent.\n * @param name Agent name\n * @param messages Messages to send\n * @param variables Variables to include\n * @returns Text response from the agent.\n */\n async text(\n name: string,\n messages: AIMessage[],\n variables: { [key: string]: any }\n ): Promise<string> {\n const parsedMessages = this.parseMessages(messages);\n\n const data = this.client.fetch(`${this.baseUrl}/agent/text/${name}`, {\n body: JSON.stringify({ messages: parsedMessages, variables }),\n method: 'POST',\n headers: { 'Content-Type': 'application/json' }\n });\n\n const response = await data;\n if (!response.ok) {\n throw new Error(`Failed to talk with agent: ${response.statusText}`);\n }\n const text = await response.text();\n return text;\n }\n\n /**\n * Stream a text message to the agent.\n * @param agentName Agent name\n * @param messages Messages to send\n * @param variables Variables to include\n * @param abortController An AbortController to cancel the request.\n * @returns An observable that emits partial AIMessage objects as they are received. The observable can be cancelled using the provided AbortController.\n * The observable will emit an error if the request fails or is aborted.\n * The observable will complete when the stream is finished.\n *\n * The messages sent to the agent can include special options:\n * - `hiddenContent`: If set, this content will be sent to the agent instead of the `content` field.\n * - `skipToLLM`: If set to true, this message will be skipped when sending to the agent.\n *\n * Example usage:\n * ```typescript\n * const abortController = new AbortController();\n * const messages: AIMessage[] = [\n * { role: 'user', content: 'Hello' },\n * { role: 'assistant', content: 'Hi there!' },\n * { role: 'user', content: 'Tell me a joke.', options: { hiddenContent: 'Tell me a joke about cats.' } }\n * ];\n * const observable = aiService.stream$('my-agent', messages, {}, abortController);\n * const subscription = observable.subscribe({\n * next: (message) => console.log('Received message part:', message),\n * error: (err) => console.error('Error:', err),\n * complete: () => console.log('Stream complete')\n * });\n *\n * // To cancel the request:\n * abortController.abort();\n * subscription.unsubscribe();\n * ```\n */\n async stream$(\n agentName: string,\n messages: AIMessage[],\n variables: { [key: string]: any },\n abortController: AbortController\n ): Promise<Observable<AIMessage>> {\n const parsedMessages = this.parseMessages(messages);\n const response = await this.client.fetch(\n `${this.baseUrl}/agent/text/${agentName}?fullResponse=true`,\n {\n method: 'POST',\n body: JSON.stringify({ messages: parsedMessages, variables }),\n headers: {\n ...this.client.defaultHeaders,\n 'content-type': 'application/json',\n accept: 'text/event-stream'\n },\n signal: abortController.signal\n }\n );\n\n if (response.status > 300) {\n const data = await response.json();\n throw new Error(JSON.stringify(data, null, 2));\n }\n\n const stream = response.body;\n const decoder = new TextDecoder();\n\n return new Observable<AIMessage>(observer => {\n if (!stream) {\n observer.error('No response body');\n throw 'No response body';\n }\n\n const reader = stream.getReader();\n const message: AIMessage = {\n role: 'assistant',\n content: '',\n steps: []\n };\n\n const abortHandler = () => {\n reader.cancel();\n observer.error(new DOMException('Aborted', 'AbortError'));\n };\n\n abortController.signal.addEventListener('abort', abortHandler);\n\n let buffer = '';\n\n const read = () => {\n reader.read().then(({ done, value }) => {\n if (done) {\n if (buffer.trim()) this.processLine(buffer, observer, message); // process any remaining data\n observer.complete();\n return;\n }\n buffer += decoder.decode(value, { stream: true });\n const lines = buffer.split('\\n\\n');\n buffer = lines.pop() || '';\n for (const line of lines) {\n if (line.trim()) this.processLine(line, observer, message);\n }\n read();\n });\n };\n\n read();\n return () => {\n abortController.signal.removeEventListener('abort', abortHandler);\n reader.cancel();\n };\n });\n }\n\n private parseMessages(messages: AIMessage[]) {\n return messages\n .filter(message => !message.options?.skipToLLM)\n .map(message => {\n if (message.options?.hiddenContent) {\n return {\n role: message.role,\n content: message.options.hiddenContent\n };\n }\n return {\n role: message.role,\n content: message.content\n };\n });\n }\n\n private processLine(line: string, observer: any, message: AIMessage) {\n if (!line.trim()) {\n return;\n }\n const lastStep = message.steps?.[message.steps.length - 1];\n try {\n let data: any = {};\n let type = '';\n try {\n data = JSON.parse(line.replace('data: ', ''));\n type = data.type;\n } catch (e) {\n console.error('Error parsing line', line, e);\n return;\n }\n\n switch (type) {\n case DataStreamType.STEP_START:\n message.steps = message.steps || [];\n message.steps.push({\n type: 'text',\n toolCalls: [],\n toolResults: [],\n text: ''\n });\n return;\n\n case DataStreamType.REASONING:\n if (lastStep!.reasoning === undefined) {\n lastStep!.reasoning = '';\n }\n lastStep!.reasoning += data.textDelta;\n observer.next(message);\n return;\n\n case DataStreamType.TEXT_DELTA:\n lastStep!.text += data.textDelta;\n message.content += data.textDelta;\n observer.next(message);\n return;\n\n case DataStreamType.TOOL_CALL:\n lastStep!.toolCalls = [data];\n observer.next(message);\n return;\n\n case DataStreamType.TOOL_RESULT:\n lastStep!.toolResults = [data];\n observer.next(message);\n return;\n\n case DataStreamType.FINISH:\n message.finishReason = data.finishReason;\n observer.next(message);\n observer.complete();\n return;\n\n case DataStreamType.ERROR:\n message.finishReason = 'error';\n const errorMessage = `<div\n class=\"alert alert-danger\"\n role=\"alert\"\n >\n <strong>Error</strong>\n ${data.message || 'An unknown error occurred'}\n </div>`;\n message.content += errorMessage;\n lastStep!.text += errorMessage;\n observer.next(message);\n observer.error(data);\n observer.complete();\n return;\n }\n } catch (e) {\n observer.error(e);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;IAsBY;AAAZ,CAAA,UAAY,cAAc,EAAA;AACxB,IAAA,cAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AACzB,IAAA,cAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvB,IAAA,cAAA,CAAA,qBAAA,CAAA,GAAA,qBAA2C;AAC3C,IAAA,cAAA,CAAA,iBAAA,CAAA,GAAA,iBAAmC;AACnC,IAAA,cAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3B,IAAA,cAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvB,IAAA,cAAA,CAAA,iBAAA,CAAA,GAAA,iBAAmC;AACnC,IAAA,cAAA,CAAA,oBAAA,CAAA,GAAA,oBAAyC;AACzC,IAAA,cAAA,CAAA,qBAAA,CAAA,GAAA,qBAA2C;AAC3C,IAAA,cAAA,CAAA,kBAAA,CAAA,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.mjs","sources":["../../ai/ai.model.ts","../../ai/ai.service.ts","../../ai/c8y-ngx-components-ai.ts"],"sourcesContent":["import { Type } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nexport interface AIMessageStreamSteps extends AIMessage {\n componentSteps$?: Observable<{ content: Type<any> | string; origin: AgentStep }[]>;\n}\n\nexport interface AIMessage {\n role: 'user' | 'assistant';\n content: string;\n options?: AIMessageOptions;\n steps?: Array<AgentStep>;\n finishReason?: 'stop' | 'error' | 'tool_use';\n timestamp?: string;\n}\n\nexport interface AIMessageOptions {\n skipToLLM?: boolean;\n hiddenContent?: string;\n variables?: { [key: string]: any };\n}\n\nexport enum DataStreamType {\n TEXT_DELTA = 'text-delta',\n TOOL_CALL = 'tool-call',\n TOOL_CALL_STREAMING = 'tool-call-streaming',\n TOOL_CALL_DELTA = 'tool-call-delta',\n TOOL_RESULT = 'tool-result',\n REASONING = 'reasoning',\n REASONING_DELTA = 'reasoning-delta',\n REDACTED_REASONING = 'redacted-reasoning',\n REASONING_SIGNATURE = 'reasoning-signature',\n FINISH_REASONING = 'finish-reasoning',\n FINISH = 'finish',\n FINISH_STEP = 'finish-step',\n ERROR = 'error',\n DATA = 'data',\n MESSAGE_ANNOTATIONS = 'message-annotations',\n SOURCE = 'source',\n FILE = 'file',\n STEP_START = 'start-step',\n STEP_FINISH = 'finish-step',\n STEP_START_V4 = 'step-start',\n STEP_FINISH_V4 = 'step-finish'\n}\n\nexport type AgentStep = {\n type: 'text' | 'reasoning' | string;\n text: string;\n reasoning?: string;\n textDelta?: string;\n toolCalls?: Array<ToolCall>;\n toolResults?: Array<ToolResult>;\n};\n\nexport interface Tool {\n toolName: string;\n toolId: string;\n type: 'tool-call' | 'tool-result';\n}\n\nexport interface ToolCall extends Tool {\n arguments: { [key: string]: any };\n}\n\nexport interface ToolResult extends Tool {\n result: {\n content: {\n text: string;\n type: string;\n }[];\n };\n}\n\nexport interface ClientAgentDefinition {\n /**\n * If set to true, the agent will be created each time. This is useful for development.\n */\n snapshot: boolean;\n /**\n * The label of the agent that is shown to the user.\n */\n label: string;\n /**\n * The definitions of the agent.\n *\n * You can use multiple definitions that can be used in an agent-2-agent scenario\n * The first definition is the entry point.\n */\n definitions: {\n name: string;\n type: 'object' | 'text';\n agent: {\n system: string;\n [key: string]: any;\n };\n mcp: Array<{ serverName: string; tools: string[] }>;\n }[];\n}\n\nexport interface ChatConfig {\n title: string;\n headline: string;\n welcomeText: string;\n placeholder: string;\n sendButtonText: string;\n cancelButtonText: string;\n disclaimerText: string;\n userInterfaceIcons: { send: string; cancel: string };\n}\n\nexport interface AgentHealthCheckResponse {\n /**\n * Indicates if the agent exists and can be used.\n * If false, the agent was not found.\n */\n exists: boolean;\n /**\n * Indicates if the user can create the agent, and if a global provider is configured.\n */\n canCreate: boolean;\n /**\n * Indicates if the provider is configured.\n * If false, the agent cannot be created as the provider is not configured.\n */\n isProviderConfigured: boolean;\n /**\n * If canCreate or exist is false, this array contains messages\n * that explain why the agent cannot be used or created.\n */\n messages?: string[];\n}\n","import { Injectable } from '@angular/core';\nimport {\n AgentHealthCheckResponse,\n AIMessage,\n ClientAgentDefinition,\n DataStreamType\n} from './ai.model';\nimport { FetchClient } from '@c8y/client';\nimport { Observable } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AIService {\n private baseUrl = '/service/ai';\n\n constructor(private client: FetchClient) {}\n\n async createOrUpdateAgent(agentsDef: ClientAgentDefinition): Promise<void> {\n for (const def of agentsDef.definitions) {\n const health = await this.getAgentHealth(def.name);\n let resource = `${this.baseUrl}/agent/${def.type}`;\n let method = 'POST';\n if (health.exists) {\n resource = `${this.baseUrl}/agent/${def.type}/${def.name}`;\n method = 'PUT';\n }\n const response = await this.client.fetch(resource, {\n body: JSON.stringify(def),\n method,\n headers: { 'Content-Type': 'application/json' }\n });\n\n if (!response.ok) {\n throw new Error(`Failed to create agent: ${response.statusText}`);\n }\n }\n }\n\n /**\n * Check if an agent exists.\n * @param name Agent name\n * @returns Agent health check response.\n */\n async getAgentHealth(name: string): Promise<AgentHealthCheckResponse> {\n const response = await this.client.fetch(`${this.baseUrl}/agent/test/${name}`, {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n });\n\n if (!response.ok) {\n return {\n exists: false,\n canCreate: false,\n isProviderConfigured: false\n };\n }\n const json = await response.json();\n return json;\n }\n\n /**\n * Send a text message to the agent.\n * @param name Agent name\n * @param messages Messages to send\n * @param variables Variables to include\n * @returns Text response from the agent.\n */\n async text(\n name: string,\n messages: AIMessage[],\n variables: { [key: string]: any }\n ): Promise<string> {\n const parsedMessages = this.parseMessages(messages);\n\n const data = this.client.fetch(`${this.baseUrl}/agent/text/${name}`, {\n body: JSON.stringify({ messages: parsedMessages, variables }),\n method: 'POST',\n headers: { 'Content-Type': 'application/json' }\n });\n\n const response = await data;\n if (!response.ok) {\n throw new Error(`Failed to talk with agent: ${response.statusText}`);\n }\n const text = await response.text();\n return text;\n }\n\n /**\n * Stream a text message to the agent.\n * @param agentName Agent name\n * @param messages Messages to send\n * @param variables Variables to include\n * @param abortController An AbortController to cancel the request.\n * @returns An observable that emits partial AIMessage objects as they are received. The observable can be cancelled using the provided AbortController.\n * The observable will emit an error if the request fails or is aborted.\n * The observable will complete when the stream is finished.\n *\n * The messages sent to the agent can include special options:\n * - `hiddenContent`: If set, this content will be sent to the agent instead of the `content` field.\n * - `skipToLLM`: If set to true, this message will be skipped when sending to the agent.\n *\n * Example usage:\n * ```typescript\n * const abortController = new AbortController();\n * const messages: AIMessage[] = [\n * { role: 'user', content: 'Hello' },\n * { role: 'assistant', content: 'Hi there!' },\n * { role: 'user', content: 'Tell me a joke.', options: { hiddenContent: 'Tell me a joke about cats.' } }\n * ];\n * const observable = aiService.stream$('my-agent', messages, {}, abortController);\n * const subscription = observable.subscribe({\n * next: (message) => console.log('Received message part:', message),\n * error: (err) => console.error('Error:', err),\n * complete: () => console.log('Stream complete')\n * });\n *\n * // To cancel the request:\n * abortController.abort();\n * subscription.unsubscribe();\n * ```\n */\n async stream$(\n agentName: string,\n messages: AIMessage[],\n variables: { [key: string]: any },\n abortController: AbortController\n ): Promise<Observable<AIMessage>> {\n const parsedMessages = this.parseMessages(messages);\n const response = await this.client.fetch(\n `${this.baseUrl}/agent/text/${agentName}?fullResponse=true`,\n {\n method: 'POST',\n body: JSON.stringify({ messages: parsedMessages, variables }),\n headers: {\n ...this.client.defaultHeaders,\n 'content-type': 'application/json',\n accept: 'text/event-stream'\n },\n signal: abortController.signal\n }\n );\n\n if (response.status > 300) {\n const data = await response.json();\n throw new Error(JSON.stringify(data, null, 2));\n }\n\n const stream = response.body;\n const decoder = new TextDecoder();\n\n return new Observable<AIMessage>(observer => {\n if (!stream) {\n observer.error('No response body');\n throw 'No response body';\n }\n\n const reader = stream.getReader();\n const message: AIMessage = {\n role: 'assistant',\n content: '',\n steps: []\n };\n\n const abortHandler = () => {\n reader.cancel();\n observer.error(new DOMException('Aborted', 'AbortError'));\n };\n\n abortController.signal.addEventListener('abort', abortHandler);\n\n let buffer = '';\n\n const read = () => {\n reader.read().then(({ done, value }) => {\n if (done) {\n if (buffer.trim()) this.processLine(buffer, observer, message); // process any remaining data\n observer.complete();\n return;\n }\n buffer += decoder.decode(value, { stream: true });\n const lines = buffer.split('\\n\\n');\n buffer = lines.pop() || '';\n for (const line of lines) {\n if (line.trim()) this.processLine(line, observer, message);\n }\n read();\n });\n };\n\n read();\n return () => {\n abortController.signal.removeEventListener('abort', abortHandler);\n reader.cancel();\n };\n });\n }\n\n private parseMessages(messages: AIMessage[]) {\n return messages\n .filter(message => !message.options?.skipToLLM)\n .map(message => {\n if (message.options?.hiddenContent) {\n return {\n role: message.role,\n content: message.options.hiddenContent\n };\n }\n return {\n role: message.role,\n content: message.content\n };\n });\n }\n\n private processLine(line: string, observer: any, message: AIMessage) {\n if (!line.trim()) {\n return;\n }\n const lastStep = message.steps?.[message.steps.length - 1];\n try {\n let data: any = {};\n let type = '';\n try {\n data = JSON.parse(line.replace('data: ', ''));\n type = data.type;\n } catch (e) {\n console.error('Error parsing line', line, e);\n return;\n }\n\n switch (type) {\n case DataStreamType.STEP_START || DataStreamType.STEP_START_V4:\n message.steps = message.steps || [];\n message.steps.push({\n type: 'text',\n toolCalls: [],\n toolResults: [],\n text: ''\n });\n return;\n\n case DataStreamType.REASONING:\n if (lastStep!.reasoning === undefined) {\n lastStep!.reasoning = '';\n }\n lastStep!.reasoning += data.text || data.textDelta;\n observer.next(message);\n return;\n\n case DataStreamType.TEXT_DELTA:\n lastStep!.text += data.text || data.textDelta;\n message.content += data.text || data.textDelta;\n observer.next(message);\n return;\n\n case DataStreamType.TOOL_CALL:\n lastStep!.toolCalls = [data];\n observer.next(message);\n return;\n\n case DataStreamType.TOOL_RESULT:\n lastStep!.toolResults = [data];\n observer.next(message);\n return;\n\n case DataStreamType.FINISH:\n message.finishReason = data.finishReason;\n observer.next(message);\n observer.complete();\n return;\n\n case DataStreamType.ERROR:\n message.finishReason = 'error';\n const errorMessage = `<div\n class=\"alert alert-danger\"\n role=\"alert\"\n >\n <strong>Error</strong>\n ${data.message || 'An unknown error occurred'}\n </div>`;\n message.content += errorMessage;\n lastStep!.text += errorMessage;\n observer.next(message);\n observer.error(data);\n observer.complete();\n return;\n }\n } catch (e) {\n observer.error(e);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;IAsBY;AAAZ,CAAA,UAAY,cAAc,EAAA;AACxB,IAAA,cAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AACzB,IAAA,cAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvB,IAAA,cAAA,CAAA,qBAAA,CAAA,GAAA,qBAA2C;AAC3C,IAAA,cAAA,CAAA,iBAAA,CAAA,GAAA,iBAAmC;AACnC,IAAA,cAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3B,IAAA,cAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvB,IAAA,cAAA,CAAA,iBAAA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