@c8y/ngx-components 1023.0.0 → 1023.4.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 (69) hide show
  1. package/ai/agent-chat/index.d.ts +114 -0
  2. package/ai/agent-chat/index.d.ts.map +1 -0
  3. package/ai/ai-chat/index.d.ts +145 -0
  4. package/ai/ai-chat/index.d.ts.map +1 -0
  5. package/ai/index.d.ts +203 -0
  6. package/ai/index.d.ts.map +1 -0
  7. package/context-dashboard/device/add/index.d.ts +15 -1
  8. package/context-dashboard/device/add/index.d.ts.map +1 -1
  9. package/context-dashboard/device/view/index.d.ts +14 -2
  10. package/context-dashboard/device/view/index.d.ts.map +1 -1
  11. package/context-dashboard/devicemanagement/index.d.ts +10 -0
  12. package/context-dashboard/devicemanagement/index.d.ts.map +1 -0
  13. package/context-dashboard/index.d.ts +6 -30
  14. package/context-dashboard/index.d.ts.map +1 -1
  15. package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs +387 -0
  16. package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs.map +1 -0
  17. package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs +258 -0
  18. package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs.map +1 -0
  19. package/fesm2022/c8y-ngx-components-ai.mjs +291 -0
  20. package/fesm2022/c8y-ngx-components-ai.mjs.map +1 -0
  21. package/fesm2022/c8y-ngx-components-context-dashboard-cockpit-home-dashboard.mjs +1 -1
  22. package/fesm2022/c8y-ngx-components-context-dashboard-cockpit-home-dashboard.mjs.map +1 -1
  23. package/fesm2022/c8y-ngx-components-context-dashboard-device-add.mjs +1 -1
  24. package/fesm2022/c8y-ngx-components-context-dashboard-device-view.mjs +2 -2
  25. package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs +68 -0
  26. package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs.map +1 -0
  27. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +27 -45
  28. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  29. package/fesm2022/c8y-ngx-components-echart.mjs +15 -17
  30. package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
  31. package/fesm2022/c8y-ngx-components-global-context.mjs +10 -10
  32. package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
  33. package/fesm2022/c8y-ngx-components-register-device.mjs +4 -6
  34. package/fesm2022/c8y-ngx-components-register-device.mjs.map +1 -1
  35. package/fesm2022/c8y-ngx-components-sensor-phone-sensor-phone-modal.mjs +2 -2
  36. package/fesm2022/c8y-ngx-components-sensor-phone-sensor-phone-modal.mjs.map +1 -1
  37. package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs +574 -0
  38. package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs.map +1 -0
  39. package/fesm2022/c8y-ngx-components-widgets-exports.mjs +8 -1
  40. package/fesm2022/c8y-ngx-components-widgets-exports.mjs.map +1 -1
  41. package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs +176 -41
  42. package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs.map +1 -1
  43. package/fesm2022/c8y-ngx-components.mjs +96 -44
  44. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  45. package/index.d.ts +25 -4
  46. package/index.d.ts.map +1 -1
  47. package/locales/de.po +49 -52
  48. package/locales/es.po +42 -42
  49. package/locales/fr.po +35 -39
  50. package/locales/ja_JP.po +32 -32
  51. package/locales/ko.po +39 -40
  52. package/locales/locales.pot +144 -9
  53. package/locales/nl.po +37 -37
  54. package/locales/pl.po +51 -54
  55. package/locales/pt_BR.po +38 -39
  56. package/locales/zh_CN.po +36 -36
  57. package/locales/zh_TW.po +45 -45
  58. package/package.json +1 -1
  59. package/register-device/index.d.ts.map +1 -1
  60. package/widgets/cockpit-exports/index.d.ts +6 -0
  61. package/widgets/cockpit-exports/index.d.ts.map +1 -1
  62. package/widgets/definitions/html-widget-ai-config/index.d.ts +6 -0
  63. package/widgets/definitions/html-widget-ai-config/index.d.ts.map +1 -0
  64. package/widgets/device-management-exports/index.d.ts +6 -0
  65. package/widgets/device-management-exports/index.d.ts.map +1 -1
  66. package/widgets/exports/index.d.ts +8 -1
  67. package/widgets/exports/index.d.ts.map +1 -1
  68. package/widgets/implementations/html-widget/index.d.ts +72 -16
  69. package/widgets/implementations/html-widget/index.d.ts.map +1 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, SecurityContext, Input, Component, EventEmitter, inject, Output, ViewChild } from '@angular/core';
2
+ import { Injectable, Input, Component, EventEmitter, inject, Output, ViewChild } from '@angular/core';
3
3
  import { gettext } from '@c8y/ngx-components/gettext';
4
4
  import { from, merge, interval, BehaviorSubject, of, lastValueFrom, defer, forkJoin } from 'rxjs';
5
5
  import { mergeMap, map, tap, throttleTime, buffer, switchMap } from 'rxjs/operators';
@@ -13,7 +13,6 @@ import * as i4 from '@c8y/ngx-components/alarms';
13
13
  import { AlarmsModule, AlarmSeverityToIconPipe, AlarmSeverityToLabelPipe } from '@c8y/ngx-components/alarms';
14
14
  import { INTERVALS } from '@c8y/ngx-components/interval-picker';
15
15
  import * as i5 from '@ngx-translate/core';
16
- import * as i7 from '@angular/platform-browser';
17
16
  import * as i1$1 from '@angular/common';
18
17
  import { NgIf, NgForOf, CommonModule as CommonModule$1 } from '@angular/common';
19
18
  import * as i3$1 from 'ngx-echarts';
@@ -367,7 +366,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
367
366
  /* eslint-disable @typescript-eslint/no-explicit-any */
368
367
  const INDEX_HTML = '/index.html';
369
368
  class EchartsOptionsService {
370
- constructor(datePipe, yAxisService, chartTypesService, severityIconPipe, severityLabelPipe, translate, router, sanitizer) {
369
+ constructor(datePipe, yAxisService, chartTypesService, severityIconPipe, severityLabelPipe, translate, router) {
371
370
  this.datePipe = datePipe;
372
371
  this.yAxisService = yAxisService;
373
372
  this.chartTypesService = chartTypesService;
@@ -375,7 +374,6 @@ class EchartsOptionsService {
375
374
  this.severityLabelPipe = severityLabelPipe;
376
375
  this.translate = translate;
377
376
  this.router = router;
378
- this.sanitizer = sanitizer;
379
377
  this.TOOLTIP_WIDTH = 300;
380
378
  }
381
379
  getChartOptions(datapointsWithValues, timeRange, showSplitLines, events, alarms, displayOptions, selectedTimeRange, aggregatedDatapoint, sliderZoomUsed = false) {
@@ -985,11 +983,11 @@ class EchartsOptionsService {
985
983
  */
986
984
  processEvent(event, XAxisValue) {
987
985
  let value = `<ul class="list-unstyled small separator-top text-default">`;
988
- value += `<li class="p-t-4 p-b-4 d-flex separator-bottom text-no-wrap"><label class="small m-b-0 m-r-8">${this.translate.instant(gettext('Event type'))}</label><code class="m-l-auto" style="display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; word-break: break-word; white-space: normal; max-width: 200px; -webkit-line-clamp: 2;" title="${echarts.format.encodeHTML(event.type)}">${echarts.format.encodeHTML(event.type)}</code></li>`;
989
- value += `<li class="p-t-4 p-b-4 d-flex separator-bottom text-no-wrap"><label class="small m-b-0 m-r-8">${this.translate.instant(gettext('Event text'))}</label><span class="m-l-auto" style="display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; word-break: break-word; white-space: normal; max-width: 200px; -webkit-line-clamp: 5;" title="${echarts.format.encodeHTML(event.text)}">${echarts.format.encodeHTML(event.text)}</span></li>`;
990
- value += `<li class="p-t-4 p-b-4 d-flex separator-bottom text-no-wrap"><label class="small m-b-0 m-r-8">${this.translate.instant(gettext('Event time'))}</label><span class="m-l-auto">${echarts.format.encodeHTML(this.datePipe.transform(XAxisValue))}<span></li>`;
986
+ value += `<li class="p-t-4 p-b-4 d-flex separator-bottom text-no-wrap"><label class="small m-b-0 m-r-8">${echarts.format.encodeHTML(this.translate.instant(gettext('Event type')))}</label><code class="m-l-auto" style="display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; word-break: break-word; white-space: normal; max-width: 200px; -webkit-line-clamp: 2;" title="${echarts.format.encodeHTML(event.type)}">${echarts.format.encodeHTML(event.type)}</code></li>`;
987
+ value += `<li class="p-t-4 p-b-4 d-flex separator-bottom text-no-wrap"><label class="small m-b-0 m-r-8">${echarts.format.encodeHTML(this.translate.instant(gettext('Event text')))}</label><span class="m-l-auto" style="display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; word-break: break-word; white-space: normal; max-width: 200px; -webkit-line-clamp: 5;" title="${echarts.format.encodeHTML(event.text)}">${echarts.format.encodeHTML(event.text)}</span></li>`;
988
+ value += `<li class="p-t-4 p-b-4 d-flex separator-bottom text-no-wrap"><label class="small m-b-0 m-r-8">${echarts.format.encodeHTML(this.translate.instant(gettext('Event time')))}</label><span class="m-l-auto">${echarts.format.encodeHTML(this.datePipe.transform(XAxisValue))}<span></li>`;
991
989
  value += `</ul>`;
992
- return this.sanitizer.sanitize(SecurityContext.HTML, value);
990
+ return value;
993
991
  }
994
992
  /**
995
993
  * This method is used to process the alarm tooltip.
@@ -998,21 +996,21 @@ class EchartsOptionsService {
998
996
  */
999
997
  async processAlarm(alarm) {
1000
998
  let value = `<ul class="list-unstyled small separator-top text-default m-0">`;
1001
- value += `<li class="p-t-4 p-b-4 d-flex a-i-center separator-bottom text-no-wrap"><label class="text-label-small m-b-0 m-r-8">${this.translate.instant(gettext('Alarm severity'))}</label>`;
999
+ value += `<li class="p-t-4 p-b-4 d-flex a-i-center separator-bottom text-no-wrap"><label class="text-label-small m-b-0 m-r-8">${echarts.format.encodeHTML(this.translate.instant(gettext('Alarm severity')))}</label>`;
1002
1000
  value += `<span class="small d-inline-flex a-i-center gap-4 m-l-auto"><i class="stroked-icon icon-14 status dlt-c8y-icon-${echarts.format.encodeHTML(this.severityIconPipe.transform(alarm.severity))} ${alarm.severity.toLowerCase()}" > </i> ${this.severityLabelPipe.transform(alarm.severity)} </span></li>`;
1003
- value += `<li class="p-t-4 p-b-4 d-flex separator-bottom text-no-wrap"><label class="text-label-small m-b-0 m-r-8">${this.translate.instant(gettext('Alarm type'))}</label><span class="small m-l-auto"><code>${echarts.format.encodeHTML(alarm.type)}</code></span></li>`;
1004
- value += `<li class="p-t-4 p-b-4 d-flex separator-bottom text-no-wrap"><label class="text-label-small m-b-0 m-r-8">${this.translate.instant(gettext('Message'))}</label><span class="small m-l-auto" style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; text-overflow: ellipsis; word-break: break-word; white-space: normal; max-width: 200px;" title="${echarts.format.encodeHTML(this.translate.instant(alarm.text))}">${echarts.format.encodeHTML(this.translate.instant(alarm.text))}</span></li>`;
1005
- value += `<li class="p-t-4 p-b-4 d-flex separator-bottom text-no-wrap"><label class="text-label-small m-b-0 m-r-8">${this.translate.instant(gettext('Last updated'))}</label><span class="small m-l-auto">${echarts.format.encodeHTML(this.datePipe.transform(alarm['lastUpdated']))}</span></li>`;
1001
+ value += `<li class="p-t-4 p-b-4 d-flex separator-bottom text-no-wrap"><label class="text-label-small m-b-0 m-r-8">${echarts.format.encodeHTML(this.translate.instant(gettext('Alarm type')))}</label><span class="small m-l-auto"><code>${echarts.format.encodeHTML(alarm.type)}</code></span></li>`;
1002
+ value += `<li class="p-t-4 p-b-4 d-flex separator-bottom text-no-wrap"><label class="text-label-small m-b-0 m-r-8">${echarts.format.encodeHTML(this.translate.instant(gettext('Message')))}</label><span class="small m-l-auto" style="display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; text-overflow: ellipsis; word-break: break-word; white-space: normal; max-width: 200px;" title="${echarts.format.encodeHTML(this.translate.instant(alarm.text))}">${echarts.format.encodeHTML(this.translate.instant(alarm.text))}</span></li>`;
1003
+ value += `<li class="p-t-4 p-b-4 d-flex separator-bottom text-no-wrap"><label class="text-label-small m-b-0 m-r-8">${echarts.format.encodeHTML(this.translate.instant(gettext('Last updated')))}</label><span class="small m-l-auto">${echarts.format.encodeHTML(this.datePipe.transform(alarm['lastUpdated']))}</span></li>`;
1006
1004
  const exists = await this.alarmRouteExists();
1007
1005
  if (exists) {
1008
1006
  const currentUrl = window.location.href;
1009
1007
  const baseUrlIndex = currentUrl.indexOf(INDEX_HTML);
1010
1008
  const baseUrl = currentUrl.substring(0, baseUrlIndex + INDEX_HTML.length);
1011
- value += `<li class="p-t-4 p-b-4 d-flex separator-bottom text-no-wrap"><label class="text-label-small m-b-0 m-r-8">${this.translate.instant(gettext('Open details'))}</label><span class="small m-l-auto"><a href="${baseUrl}#/alarms/${alarm.id}/details?showCleared=true">${this.translate.instant(gettext('Alarm details'))}</a></span></li>`;
1009
+ value += `<li class="p-t-4 p-b-4 d-flex separator-bottom text-no-wrap"><label class="text-label-small m-b-0 m-r-8">${echarts.format.encodeHTML(this.translate.instant(gettext('Open details')))}</label><span class="small m-l-auto"><a href="${baseUrl}#/alarms/${alarm.id}/details?showCleared=true">${echarts.format.encodeHTML(this.translate.instant(gettext('Alarm details')))}</a></span></li>`;
1012
1010
  }
1013
- value += `<li class="p-t-4 p-b-4 d-flex text-no-wrap"><label class="text-label-small m-b-0 m-r-8">${this.translate.instant(gettext('Alarm count'))}</label><span class="small m-l-auto"><span class="badge badge-info">${alarm.count}</span></span></li>`;
1011
+ value += `<li class="p-t-4 p-b-4 d-flex text-no-wrap"><label class="text-label-small m-b-0 m-r-8">${echarts.format.encodeHTML(this.translate.instant(gettext('Alarm count')))}</label><span class="small m-l-auto"><span class="badge badge-info">${alarm.count}</span></span></li>`;
1014
1012
  value += `</ul>`;
1015
- return this.sanitizer.sanitize(SecurityContext.HTML, value);
1013
+ return value;
1016
1014
  }
1017
1015
  async alarmRouteExists() {
1018
1016
  const exists = this.router.config.some(route => {
@@ -1407,12 +1405,12 @@ class EchartsOptionsService {
1407
1405
  return acc;
1408
1406
  }, null);
1409
1407
  }
1410
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: EchartsOptionsService, deps: [{ token: i1.DatePipe }, { token: YAxisService }, { token: ChartTypesService }, { token: i4.AlarmSeverityToIconPipe }, { token: i4.AlarmSeverityToLabelPipe }, { token: i5.TranslateService }, { token: i6.Router }, { token: i7.DomSanitizer }], target: i0.ɵɵFactoryTarget.Injectable }); }
1408
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: EchartsOptionsService, deps: [{ token: i1.DatePipe }, { token: YAxisService }, { token: ChartTypesService }, { token: i4.AlarmSeverityToIconPipe }, { token: i4.AlarmSeverityToLabelPipe }, { token: i5.TranslateService }, { token: i6.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
1411
1409
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: EchartsOptionsService }); }
1412
1410
  }
1413
1411
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: EchartsOptionsService, decorators: [{
1414
1412
  type: Injectable
1415
- }], ctorParameters: () => [{ type: i1.DatePipe }, { type: YAxisService }, { type: ChartTypesService }, { type: i4.AlarmSeverityToIconPipe }, { type: i4.AlarmSeverityToLabelPipe }, { type: i5.TranslateService }, { type: i6.Router }, { type: i7.DomSanitizer }] });
1413
+ }], ctorParameters: () => [{ type: i1.DatePipe }, { type: YAxisService }, { type: ChartTypesService }, { type: i4.AlarmSeverityToIconPipe }, { type: i4.AlarmSeverityToLabelPipe }, { type: i5.TranslateService }, { type: i6.Router }] });
1416
1414
 
1417
1415
  class ChartRealtimeService {
1418
1416
  constructor(measurementRealtime, alarmRealtimeService, eventRealtimeService, echartsOptionsService) {