@c8y/ngx-components 1023.16.3 → 1023.17.2

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 (53) hide show
  1. package/ai/index.d.ts +4 -2
  2. package/ai/index.d.ts.map +1 -1
  3. package/context-dashboard/index.d.ts +1 -0
  4. package/context-dashboard/index.d.ts.map +1 -1
  5. package/datapoint-explorer/view/index.d.ts.map +1 -1
  6. package/echart/index.d.ts +2 -0
  7. package/echart/index.d.ts.map +1 -1
  8. package/echart/models/index.d.ts +2 -0
  9. package/echart/models/index.d.ts.map +1 -1
  10. package/fesm2022/c8y-ngx-components-ai.mjs +8 -6
  11. package/fesm2022/c8y-ngx-components-ai.mjs.map +1 -1
  12. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +14 -7
  13. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  14. package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +3 -2
  15. package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
  16. package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs +2 -2
  17. package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs.map +1 -1
  18. package/fesm2022/c8y-ngx-components-echart-models.mjs.map +1 -1
  19. package/fesm2022/c8y-ngx-components-echart.mjs +42 -18
  20. package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
  21. package/fesm2022/c8y-ngx-components-icon-selector.mjs +3 -3
  22. package/fesm2022/c8y-ngx-components-icon-selector.mjs.map +1 -1
  23. package/fesm2022/c8y-ngx-components-search.mjs +22 -27
  24. package/fesm2022/c8y-ngx-components-search.mjs.map +1 -1
  25. package/fesm2022/c8y-ngx-components-sub-assets.mjs +7 -5
  26. package/fesm2022/c8y-ngx-components-sub-assets.mjs.map +1 -1
  27. package/fesm2022/c8y-ngx-components-tracking.mjs +5 -5
  28. package/fesm2022/c8y-ngx-components-tracking.mjs.map +1 -1
  29. package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs +1 -1
  30. package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs.map +1 -1
  31. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +4 -2
  32. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
  33. package/fesm2022/c8y-ngx-components.mjs +14957 -14955
  34. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  35. package/index.d.ts +5814 -5814
  36. package/index.d.ts.map +1 -1
  37. package/locales/de.po +14 -11
  38. package/locales/es.po +13 -11
  39. package/locales/fr.po +14 -12
  40. package/locales/ja_JP.po +11 -10
  41. package/locales/ko.po +13 -11
  42. package/locales/locales.pot +11 -8
  43. package/locales/nl.po +14 -12
  44. package/locales/pl.po +14 -12
  45. package/locales/pt_BR.po +13 -11
  46. package/locales/zh_CN.po +12 -11
  47. package/locales/zh_TW.po +14 -11
  48. package/package.json +1 -1
  49. package/search/index.d.ts +5 -5
  50. package/search/index.d.ts.map +1 -1
  51. package/sub-assets/index.d.ts +3 -3
  52. package/sub-assets/index.d.ts.map +1 -1
  53. package/widgets/implementations/datapoints-graph/index.d.ts.map +1 -1
package/ai/index.d.ts CHANGED
@@ -42,8 +42,10 @@ declare enum DataStreamType {
42
42
  MESSAGE_ANNOTATIONS = "message-annotations",
43
43
  SOURCE = "source",
44
44
  FILE = "file",
45
- STEP_START = "step-start",
46
- STEP_FINISH = "step-finish"
45
+ STEP_START = "start-step",
46
+ STEP_FINISH = "finish-step",
47
+ STEP_START_V4 = "step-start",
48
+ STEP_FINISH_V4 = "step-finish"
47
49
  }
48
50
  type AgentStep = {
49
51
  type: 'text' | 'reasoning' | string;
package/ai/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sources":["../../ai/ai.model.ts","../../ai/ai.service.ts"],"sourcesContent":[null,null],"names":[],"mappings":";;;;;AAGM;;AAC2B;;AAAgD;AAChF;;AAGC;;;AAGA;AACA;;AAED;;;;AAKC;AAAc;;AACf;AAED;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD;AAEK;AACJ;;;;AAIA;AACA;;;;;AAMA;AACD;AAEK;AACJ;AAAa;;AACd;AAEK;AACJ;AACE;;;AAGC;;AAEJ;;AAGC;;AAEG;;AAEH;;AAEG;;AAEH;;;;;AAKG;AACH;;AAEE;AACA;;AAEE;;;;;AAEgD;AACnD;AACF;;;;;;;;;AAUC;;;;AACD;;AAGC;;;AAGG;;AAEH;;AAEG;;AAEH;;;AAGG;;AAEH;;;AAGG;AACH;AACD;;ACvHD;AAMc;;AAAQ;;AAuBpB;;;;AAIG;;AAkBH;;;;;;AAMG;;AAIY;;AAkBf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCG;;AAIY;;AAyEf;AAiBA;;;AA6ED;;;"}
1
+ {"version":3,"file":"index.d.ts","sources":["../../ai/ai.model.ts","../../ai/ai.service.ts"],"sourcesContent":[null,null],"names":[],"mappings":";;;;;AAGM;;AAC2B;;AAAgD;AAChF;;AAGC;;;AAGA;AACA;;AAED;;;;AAKC;AAAc;;AACf;AAED;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD;AAEK;AACJ;;;;AAIA;AACA;;;;;AAMA;AACD;AAEK;AACJ;AAAa;;AACd;AAEK;AACJ;AACE;;;AAGC;;AAEJ;;AAGC;;AAEG;;AAEH;;AAEG;;AAEH;;;;;AAKG;AACH;;AAEE;AACA;;AAEE;;;;;AAEgD;AACnD;AACF;;;;;;;;;AAUC;;;;AACD;;AAGC;;;AAGG;;AAEH;;AAEG;;AAEH;;;AAGG;;AAEH;;;AAGG;AACH;AACD;;ACzHD;AAMc;;AAAQ;;AAuBpB;;;;AAIG;;AAkBH;;;;;;AAMG;;AAIY;;AAkBf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCG;;AAIY;;AAyEf;AAiBA;;;AA6ED;;;"}
@@ -1424,6 +1424,7 @@ declare class WidgetConfigComponent implements AfterContentInit, OnDestroy {
1424
1424
  private _save;
1425
1425
  private _cancel;
1426
1426
  constructor(widgetService: WidgetService, bottomDrawerRef: BottomDrawerRef<WidgetConfigComponent>, contextDashboardService: ContextDashboardService, widgetConfigService: WidgetConfigService);
1427
+ onEscapePress(event: Event): Promise<void>;
1427
1428
  ngAfterContentInit(): Promise<void>;
1428
1429
  isSaveDisabled(): boolean;
1429
1430
  checkIfDeviceRequired(): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sources":["../../context-dashboard/add-dashboard.component.ts","../../context-dashboard/add-dashboard.factory.ts","../../context-dashboard/context-dashboard.model.ts","../../context-dashboard/context-dashboard.service.ts","../../context-dashboard/dashboard-detail.service.ts","../../context-dashboard/dashboard-detail.component.ts","../../context-dashboard/memento/dashboard-originator.service.ts","../../context-dashboard/memento/dashboard-caretaker.service.ts","../../context-dashboard/memento/dashboard-edit-mode.service.ts","../../context-dashboard/widget.service.ts","../../context-dashboard/context-dashboard.component.ts","../../context-dashboard/widget-config/appearance-settings.component.ts","../../context-dashboard/type-dashboard-info/type-dashboard-info.component.ts","../../context-dashboard/widget-config-hook/widget-config-hook.model.ts","../../context-dashboard/widget-config-hook/widget-config-hook.service.ts","../../context-dashboard/widget-config.service.ts","../../context-dashboard/widget-config/widget-config-root.component.ts","../../context-dashboard/widget-config.component.ts","../../context-dashboard/widget-config/widget-preview.component.ts","../../context-dashboard/widget-config/widget-config-section.component.ts","../../context-dashboard/widget-config/widget-preview-wrapper.component.ts","../../context-dashboard/paste-dashboard-action.component.ts","../../context-dashboard/context-dashboard.module.ts","../../context-dashboard/dashboard-action-bar.factory.ts","../../context-dashboard/device-info-dashboard/device-info-dashboard.component.ts","../../context-dashboard/device-info-dashboard/device-info-dashboard.module.ts","../../context-dashboard/device-management-home-dashboard/device-management-home-dashboard.component.ts","../../context-dashboard/device-management-home-dashboard/device-management-home-dashboard.module.ts","../../context-dashboard/widget-config/widget-config-appearance.component.ts","../../context-dashboard/widget-config/widget-config-general.component.ts","../../context-dashboard/widget-config/widget-asset-selector.component.ts","../../context-dashboard/new-dashboard.guard.ts","../../context-dashboard/widget-config/global-context-section.component.ts","../../context-dashboard/widget-config/widget-config-feedback.component.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAKA;AAQI;AACA;AADQ;;;;AAoBX;;ACpBD;AACE;;;;AAMM;;AAoCP;;ACzCD;AACA;;;;;;;;;;;;;;;;AAiBE;;AAEG;AACH;AACD;;AAGC;;;AAGG;;AAGH;;AAEG;;AAGH;;AAEG;AACH;AACE;;AAEG;AACH;;AAEF;;;AAGG;AACH;AACE;;AAEA;;AAEF;;;;;AAKG;AACH;AACA;;;;;;AAMG;AACH;AAEA;;AAEG;AACH;AACD;AAEK;;;AAGJ;AACD;;AAGC;AACA;AACA;AACA;AACA;AACA;AACA;AAAY;AAAwB;AACpC;AAAkB;AAAwB;AAC1C;AACA;AACA;AACA;AACA;;;AAGG;AACH;AACA;AACE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AAAmB;;AACpB;AACD;;AAEG;;AAED;;AAEG;;AAEH;;AAEG;AACH;AACA;;AAEG;AACH;AACA;;;;;;;;AAQG;AACH;AACE;AACA;AACA;AACA;AACD;AACD;;AAEG;;AAEJ;AAED;;;;;;;AAOA;;;AAGG;AACG;AACJ;;AAEG;;AAEH;;AAEG;AACH;AACA;;;;;;;;;;;;;AAaG;;AAKG;AACD;;AAKP;AACE;AACA;AACA;AACA;AACA;AACD;AAED;AACE;AACA;AACA;AACD;AAEK;;AAE0D;;;;;AAO/D;AAED;;;;;;;;;;;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AEA;;;AAGD;;AC5BD;AAOE;;;;AAUD;;ACPD;AAiCI;AACA;AACA;AACA;AAbF;AACiE;AACjE;;;;;;AAQU;;;;;;;AAkEX;;ACjFD;;;;;;AAMG;AACH;;;;;AAgFC;;AC/GD;AACE;AACA;;;AA0BD;;ACtBD;AAkSI;AACA;AACA;AACA;AA/RF;;AAEA;;;;;;AAOA;AACA;;AAkRU;;;;;AAuEV;;;AAGD;;AC9VD;;;;AAiByC;;ACpCzC;AA0Cc;AApCZ;AACA;;;AAmCoB;;AAUpB;;;AAGD;;ACvDD;;;;AAkBmD;;ACnBnD;AAOE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACoE;;;AACrE;;ACPD;AAOE;;;AAQA;AAOA;;;AAGD;;ACdD;AAmBE;AACA;AACA;AACA;AAEA;;AAEG;AAEH;AAEA;;AAEG;;AAIH;;AAEG;;AAIH;;AAEG;;AAIH;;AAEG;;AAIH;;;AAGG;AACH;AAEA;;AAEG;AACG;AAsCN;;;;AAIG;AACH;AAIA;;;AAGG;AACH;;;;;AAcD;;AC7ID;AAUA;;;;;AAqBC;;ACrBD;AAaE;;AAIA;;AAIA;;;AAOA;;;;AAO+E;;;AAMhF;;ACvDD;AAOE;AACwB;AAExB;;;AAGD;;;"}
1
+ {"version":3,"file":"index.d.ts","sources":["../../context-dashboard/add-dashboard.component.ts","../../context-dashboard/add-dashboard.factory.ts","../../context-dashboard/context-dashboard.model.ts","../../context-dashboard/context-dashboard.service.ts","../../context-dashboard/dashboard-detail.service.ts","../../context-dashboard/dashboard-detail.component.ts","../../context-dashboard/memento/dashboard-originator.service.ts","../../context-dashboard/memento/dashboard-caretaker.service.ts","../../context-dashboard/memento/dashboard-edit-mode.service.ts","../../context-dashboard/widget.service.ts","../../context-dashboard/context-dashboard.component.ts","../../context-dashboard/widget-config/appearance-settings.component.ts","../../context-dashboard/type-dashboard-info/type-dashboard-info.component.ts","../../context-dashboard/widget-config-hook/widget-config-hook.model.ts","../../context-dashboard/widget-config-hook/widget-config-hook.service.ts","../../context-dashboard/widget-config.service.ts","../../context-dashboard/widget-config/widget-config-root.component.ts","../../context-dashboard/widget-config.component.ts","../../context-dashboard/widget-config/widget-preview.component.ts","../../context-dashboard/widget-config/widget-config-section.component.ts","../../context-dashboard/widget-config/widget-preview-wrapper.component.ts","../../context-dashboard/paste-dashboard-action.component.ts","../../context-dashboard/context-dashboard.module.ts","../../context-dashboard/dashboard-action-bar.factory.ts","../../context-dashboard/device-info-dashboard/device-info-dashboard.component.ts","../../context-dashboard/device-info-dashboard/device-info-dashboard.module.ts","../../context-dashboard/device-management-home-dashboard/device-management-home-dashboard.component.ts","../../context-dashboard/device-management-home-dashboard/device-management-home-dashboard.module.ts","../../context-dashboard/widget-config/widget-config-appearance.component.ts","../../context-dashboard/widget-config/widget-config-general.component.ts","../../context-dashboard/widget-config/widget-asset-selector.component.ts","../../context-dashboard/new-dashboard.guard.ts","../../context-dashboard/widget-config/global-context-section.component.ts","../../context-dashboard/widget-config/widget-config-feedback.component.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAKA;AAQI;AACA;AADQ;;;;AAoBX;;ACpBD;AACE;;;;AAMM;;AAoCP;;ACzCD;AACA;;;;;;;;;;;;;;;;AAiBE;;AAEG;AACH;AACD;;AAGC;;;AAGG;;AAGH;;AAEG;;AAGH;;AAEG;AACH;AACE;;AAEG;AACH;;AAEF;;;AAGG;AACH;AACE;;AAEA;;AAEF;;;;;AAKG;AACH;AACA;;;;;;AAMG;AACH;AAEA;;AAEG;AACH;AACD;AAEK;;;AAGJ;AACD;;AAGC;AACA;AACA;AACA;AACA;AACA;AACA;AAAY;AAAwB;AACpC;AAAkB;AAAwB;AAC1C;AACA;AACA;AACA;AACA;;;AAGG;AACH;AACA;AACE;;AAEF;AACA;AACA;AACA;AAC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AAIG;AACH;;;AASD;;ACxXD;AAOE;;;AACD;;ACsBD;AAyEI;AACA;AACO;AACA;;;;AAlDT;AACA;;;;;AAKA;;;;AAIE;;;;AAIA;;;AAGF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACoE;AACpE;;AAKA;;AAEG;AACH;AAEA;;AAQA;;;;AAUU;;AAYJ;AAmBN;;;;;;;;;;AA6IA;AAOA;AAgBA;AAcA;AAsBA;AAcA;;;AAiBD;;AC5WD;AAOE;AACA;AAGA;AAAkB;;;;;AAQnB;;ACfD;;AAgBE;AAEA;;;AAGD;;AC5BD;AAOE;;;;AAUD;;ACPD;AAiCI;AACA;AACA;AACA;AAbF;AACiE;AACjE;;;;;;AAQU;;;;;;;AAkEX;;ACjFD;;;;;;AAMG;AACH;;;;;AAgFC;;AC/GD;AACE;AACA;;;AA0BD;;ACtBD;AAkSI;AACA;AACA;AACA;AA/RF;;AAEA;;;;;;AAOA;AACA;;AAkRU;;;;;AAuEV;;;AAGD;;AC9VD;;;;AAiByC;;ACpCzC;AA0Cc;AApCZ;AACA;;;AAmCoB;;AAUpB;;;AAGD;;ACvDD;;;;AAkBmD;;ACnBnD;AAOE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACoE;;;AACrE;;ACPD;AAOE;;;AAQA;AAOA;;;AAGD;;ACdD;AAmBE;AACA;AACA;AACA;AAEA;;AAEG;AAEH;AAEA;;AAEG;;AAIH;;AAEG;;AAIH;;AAEG;;AAIH;;AAEG;;AAIH;;;AAGG;AACH;AAEA;;AAEG;AACG;AAsCN;;;;AAIG;AACH;AAIA;;;AAGG;AACH;;;;;AAcD;;AC7ID;AAUA;;;;;AAqBC;;ACrBD;AAaE;;AAIA;;AAIA;;;AAOA;;;;AAO+E;;;AAMhF;;ACvDD;AAOE;AACwB;AAExB;;;AAGD;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sources":["../../../datapoint-explorer/view/configuration/name-generator.service.ts","../../../datapoint-explorer/view/configuration/workspace-configuration.model.ts","../../../datapoint-explorer/view/datapoint-explorer.model.ts","../../../datapoint-explorer/view/configuration/workspace-configuration.service.ts","../../../datapoint-explorer/view/datapoint-explorer.component.ts","../../../datapoint-explorer/view/datapoint-explorer.service.ts"],"sourcesContent":[null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;;;;;;AAGA;AAIE;;;AAOD;;;;;;ACRA;;;;;;;;ACGA;;AAGC;AACA;AACA;AACA;AAGA;AACD;;;;AAKC;;AAEE;;;AAIF;AACD;;;;AAMC;;AAEE;;AAGF;;AAEE;;AAEF;AACD;AAED;AAsBA;;;;;;;;;;;;;;;;;AAkBA;;;;AC1EA;AAIE;AACA;;AAGA;;;AAYA;;AAEG;AACH;;;;;;AAyCA;;;;AAIG;AACH;AAYA;;;;;;AAMG;AACH;AAOA;;;;;AAKG;;;AAiBH;;AAeA;AAcA;;AAEG;AACH;AAcA;;AAEG;AACH;;;AAiCD;;ACrJD;;AA4BE;;;;;AAKA;;;AAGA;;;;AAIA;AACA;AACA;AACA;AACA;;;AAGE;;AAEA;;AAEF;AAIA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AA8CA;;;;;AAkHwD;AAA2B;AAsDnF;AAMA;AAMA;AASA;AAIA;AAQM;AAuBA;AA8BA;AAmCN;AAOA;AAIA;AAIA;AAIA;AAUA;AAsBA;AAWA;AAUA;;;AAyBD;;AChjBD;AAIE;AACA;AACA;AACA;AACA;AACA;AACA;;AAWM;AAUA;;;;AAUN;;;;;;AAMG;AACH;AAKA;;;;;;;AAOG;AACH;AAQA;AAWA;AAiBA;;;AAGG;AACH;AAMM;;;;AAuBP;;;"}
1
+ {"version":3,"file":"index.d.ts","sources":["../../../datapoint-explorer/view/configuration/name-generator.service.ts","../../../datapoint-explorer/view/configuration/workspace-configuration.model.ts","../../../datapoint-explorer/view/datapoint-explorer.model.ts","../../../datapoint-explorer/view/configuration/workspace-configuration.service.ts","../../../datapoint-explorer/view/datapoint-explorer.component.ts","../../../datapoint-explorer/view/datapoint-explorer.service.ts"],"sourcesContent":[null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;;;;;;AAGA;AAIE;;;AAOD;;;;;;ACRA;;;;;;;;ACGA;;AAGC;AACA;AACA;AACA;AAGA;AACD;;;;AAKC;;AAEE;;;AAIF;AACD;;;;AAMC;;AAEE;;AAGF;;AAEE;;AAEF;AACD;AAED;AAsBA;;;;;;;;;;;;;;;;;AAkBA;;;;AC1EA;AAIE;AACA;;AAGA;;;AAYA;;AAEG;AACH;;;;;;AAyCA;;;;AAIG;AACH;AAYA;;;;;;AAMG;AACH;AAOA;;;;;AAKG;;;AAiBH;;AAeA;AAcA;;AAEG;AACH;AAcA;;AAEG;AACH;;;AAiCD;;ACrJD;;AA4BE;;;;;AAKA;;;AAGA;;;;AAIA;AACA;AACA;AACA;AACA;;;AAGE;;AAEA;;AAEF;AAIA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AA8CA;;;;;AAkHwD;AAA2B;AAsDnF;AAMA;AAMA;AASA;AAIA;AAQM;AAuBA;AA8BA;AAmCN;AAOA;AAIA;AAIA;AAIA;AAUA;AAsBA;AAWA;AAUA;;;AA0BD;;ACjjBD;AAIE;AACA;AACA;AACA;AACA;AACA;AACA;;AAWM;AAUA;;;;AAUN;;;;;;AAMG;AACH;AAKA;;;;;;;AAOG;AACH;AAQA;AAWA;AAiBA;;;AAGG;AACH;AAMM;;;;AAuBP;;;"}
package/echart/index.d.ts CHANGED
@@ -31,6 +31,7 @@ type DatapointsGraphWidgetConfig = {
31
31
  displayMarkedPoint?: boolean;
32
32
  mergeMatchingDatapoints?: boolean;
33
33
  forceMergeDatapoints?: boolean;
34
+ smoothLines?: boolean;
34
35
  realtime?: boolean | null;
35
36
  showLabelAndUnit?: boolean;
36
37
  showSlider?: boolean | null;
@@ -57,6 +58,7 @@ type GraphDisplayOptions = {
57
58
  showOnlyAlarmsOrEvents?: boolean;
58
59
  numberOfDecimalPlaces?: number;
59
60
  sliderPositionMode?: 'compact' | 'default';
61
+ smoothLines?: boolean;
60
62
  };
61
63
  type AlarmDetailsExtended = AlarmDetails & {
62
64
  __hidden?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sources":["../../echart/models/datapoints-graph-widget.model.ts","../../echart/models/chart.model.ts","../../echart/models/svg-icons.model.ts","../../echart/charts.component.ts","../../echart/services/chart-alarms.service.ts","../../echart/services/chart-events.service.ts","../../echart/services/chart-helpers.service.ts","../../echart/select-aggregated-datapoint/select-aggregated-datapoint.component.ts"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;;;;;;AAmBM;;;;AAKA;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;AAKA;;AAEA;AACA;AACA;AACA;;;AAGA;;;;;;;;AASI;;;;;;;;;AASJ;;AAGI;;AAEJ;AACA;;AAGI;;;AAIN;;AAEG;;AAGG;AAIN;AACE;AACA;AACD;AAED;AACM;;AAEL;AAED;;;;AAIM;;;;;;;AAQL;AAED;;;;;AAUE;;;;;AAGD;;AAGC;;AAEA;;AAEE;;AAEF;;;AACD;;;;;;;AAQC;AACA;AACD;AAEK;AACA;AAEA;AAEA;AAEN;;;;AAKA;;;;;;;;;;;;;AAcM;AACA;AAEA;;;;AAKA;;;;;;;;;;AAWL;AAED;;;;;;;;AAUE;AACA;AACD;;ACzMD;;;;;;AAMG;AACH;AACE;;;;AAIA;;;AACD;;;AAIA;;;AAIA;AAEK;AACA;AACJ;AACE;AACD;AACF;;AAGC;AACA;AACD;AAED;AACE;AACA;AACA;AACD;;AC3CD;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD;AAED;;;;;;;;;;;ACyDA;AA4BE;;AAEA;;;;;;;;;;;;AAYK;AACK;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEV;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAyCA;;;;;AA8GuB;;;AAA4B;AAiDnD;AAOA;AAIA;AAgBA;AA6BA;AAWA;;;AAGG;AACH;AAcA;;;AAGG;AACH;AAmBA;AAeA;AA0BA;;AA8DA;;;AA0MA;AA6CA;AA0CA;AAkBA;AAWA;AAYA;;;AA6BD;;ACh4BD;AAEc;AAAQ;AAEpB;;;;;AAKG;AACG;;;AAqCP;;AC/CD;AAEc;AAAQ;AAEpB;;;;;AAKG;AACG;;;AAuBP;;AChCD;AAEE;;;;AAIG;;;;;;;;;;;AAcH;AAcA;;;AAGD;;ACtBD;;AAqBW;AACC;AAEV;;AAGA;;;AAiBA;;;AAgBD;;;"}
1
+ {"version":3,"file":"index.d.ts","sources":["../../echart/models/datapoints-graph-widget.model.ts","../../echart/models/chart.model.ts","../../echart/models/svg-icons.model.ts","../../echart/charts.component.ts","../../echart/services/chart-alarms.service.ts","../../echart/services/chart-events.service.ts","../../echart/services/chart-helpers.service.ts","../../echart/select-aggregated-datapoint/select-aggregated-datapoint.component.ts"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;;;;;;AAmBM;;;;AAKA;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;AAMA;;AAEA;AACA;AACA;AACA;;;AAGA;;;;;;;;AASI;;;;;;;;;AASJ;;;AAII;;AAEJ;AACA;;AAGI;;;AAIN;;AAEG;;AAGG;AAIN;AACE;AACA;AACD;AAED;AACM;;AAEL;AAED;;;;AAIM;;;;;;;AAQL;AAED;;;;;AAUE;;;;;AAGD;;AAGC;;AAEA;;AAEE;;AAEF;;;AACD;;;;;;;AAQC;AACA;AACD;AAEK;AACA;AAEA;AAEA;AAEN;;;;AAKA;;;;;;;;;;;;;AAcM;AACA;AAEA;;;;AAKA;;;;;;;;;;AAWL;AAED;;;;;;;;AAUE;AACA;AACD;;AC3MD;;;;;;AAMG;AACH;AACE;;;;AAIA;;;AACD;;;AAIA;;;AAIA;AAEK;AACA;AACJ;AACE;AACD;AACF;;AAGC;AACA;AACD;AAED;AACE;AACA;AACA;AACD;;AC3CD;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD;AAED;;;;;;;;;;;ACyDA;AA4BE;;AAEA;;;;;;;;;;;;AAYK;AACK;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEV;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAyCA;;;;;AA0HuB;;;AAA4B;AAiDnD;AAOA;AAIA;AAgBA;AA6BA;AAWA;;;AAGG;AACH;AAcA;;;AAGG;AACH;AAmBA;AAeA;AA0BA;;AA8DA;;;AA6MA;AA6CA;AA0CA;AAkBA;AAWA;AAYA;;;AA6BD;;AC/4BD;AAEc;AAAQ;AAEpB;;;;;AAKG;AACG;;;AAqCP;;AC/CD;AAEc;AAAQ;AAEpB;;;;;AAKG;AACG;;;AAuBP;;AChCD;AAEE;;;;AAIG;;;;;;;;;;;AAcH;AAcA;;;AAGD;;ACtBD;;AAqBW;AACC;AAEV;;AAGA;;;AAiBA;;;AAgBD;;;"}
@@ -25,6 +25,7 @@ type DatapointsGraphWidgetConfig = {
25
25
  displayMarkedPoint?: boolean;
26
26
  mergeMatchingDatapoints?: boolean;
27
27
  forceMergeDatapoints?: boolean;
28
+ smoothLines?: boolean;
28
29
  realtime?: boolean | null;
29
30
  showLabelAndUnit?: boolean;
30
31
  showSlider?: boolean | null;
@@ -51,6 +52,7 @@ type GraphDisplayOptions = {
51
52
  showOnlyAlarmsOrEvents?: boolean;
52
53
  numberOfDecimalPlaces?: number;
53
54
  sliderPositionMode?: 'compact' | 'default';
55
+ smoothLines?: boolean;
54
56
  };
55
57
  type AlarmDetailsExtended = AlarmDetails & {
56
58
  __hidden?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sources":["../../../echart/models/datapoints-graph-widget.model.ts","../../../echart/models/chart.model.ts","../../../echart/models/svg-icons.model.ts"],"sourcesContent":[null,null,null],"names":[],"mappings":";;;;;;;;AAmBM;;;;AAKA;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;AAKA;;AAEA;AACA;AACA;AACA;;;AAGA;;;;;;;;AASI;;;;;;;;;AASJ;;AAGI;;AAEJ;AACA;;AAGI;;;AAIN;;AAEG;;AAGG;AAIN;AACE;AACA;AACD;AAED;AACM;;AAEL;AAED;;;;AAIM;;;;;;;AAQL;AAED;;;;;AAUE;;;;;AAGD;;AAGC;;AAEA;;AAEE;;AAEF;;;AACD;;;;;;;AAQC;AACA;AACD;AAEK;AACA;AAEA;AAEA;AAEN;;;;AAKA;;;;;;;;;;;;;AAcM;AACA;AAEA;;;;AAKA;;;;;;;;;;AAWL;AAED;;;;;;;;AAUE;AACA;AACD;;ACzMD;;;;;;AAMG;AACH;AACE;;;;AAIA;;;AACD;;;AAIA;;;AAIA;AAEK;AACA;AACJ;AACE;AACD;AACF;;AAGC;AACA;AACD;AAED;AACE;AACA;AACA;AACD;;AC3CD;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD;AAED;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.d.ts","sources":["../../../echart/models/datapoints-graph-widget.model.ts","../../../echart/models/chart.model.ts","../../../echart/models/svg-icons.model.ts"],"sourcesContent":[null,null,null],"names":[],"mappings":";;;;;;;;AAmBM;;;;AAKA;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;AAMA;;AAEA;AACA;AACA;AACA;;;AAGA;;;;;;;;AASI;;;;;;;;;AASJ;;;AAII;;AAEJ;AACA;;AAGI;;;AAIN;;AAEG;;AAGG;AAIN;AACE;AACA;AACD;AAED;AACM;;AAEL;AAED;;;;AAIM;;;;;;;AAQL;AAED;;;;;AAUE;;;;;AAGD;;AAGC;;AAEA;;AAEE;;AAEF;;;AACD;;;;;;;AAQC;AACA;AACD;AAEK;AACA;AAEA;AAEA;AAEN;;;;AAKA;;;;;;;;;;;;;AAcM;AACA;AAEA;;;;AAKA;;;;;;;;;;AAWL;AAED;;;;;;;;AAUE;AACA;AACD;;AC3MD;;;;;;AAMG;AACH;AACE;;;;AAIA;;;AACD;;;AAIA;;;AAIA;AAEK;AACA;AACJ;AACE;AACD;AACF;;AAGC;AACA;AACD;AAED;AACE;AACA;AACA;AACD;;AC3CD;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD;AAED;;;;;;;;;;;;"}
@@ -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:
@@ -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,qB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AAEG;;;;"}
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 = '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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CAAA,UAAA,EAAA,CAAA,CAAA;AAAT,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,SAAS,cAFR,MAAM,EAAA,CAAA,CAAA;;4FAEP,SAAS,EAAA,UAAA,EAAA,CAAA;kBAHrB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACZD;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Component, inject, InjectionToken, EventEmitter, Output, Input, TemplateRef, ViewChild, Optional, Inject, input, HostListener, HostBinding, NgModule } from '@angular/core';
2
+ import { Injectable, Component, inject, InjectionToken, EventEmitter, Output, Input, TemplateRef, ViewChild, Optional, Inject, HostListener, input, HostBinding, NgModule } from '@angular/core';
3
3
  import * as i2 from '@c8y/ngx-components';
4
4
  import { IconDirective, C8yTranslatePipe, Permissions, ContextRouteService, Status, NavigatorNode, NEW_DASHBOARD_ROUTER_STATE_PROP, getActivatedRoute, ViewContext, TabsOutletComponent, memoize, hookGeneric, ExtensionPointForPlugins, fromTriggerOnce, getInjectedHooks, stateToFactory, ListGroupModule, C8yComponentOutlet, AlertService, C8yTranslateDirective, DynamicComponentModule, DynamicComponentComponent, sortByPriority, isPromise, CoreModule, WIDGET_CONFIGURATION_GRID_SIZE, HighlightComponent, EmptyStateComponent, FormGroupComponent, RequiredInputPlaceholderDirective, ProductExperienceDirective, ResizableGridComponent, DashboardChildChange, CopyDashboardDisabledReason, TitleComponent, ActionBarItemComponent, HelpComponent, WidgetsDashboardComponent, DatePipe, hookRoute, hookTab, PreviewService, hookNavigator } from '@c8y/ngx-components';
5
5
  import * as i1 from '@angular/router';
@@ -1813,7 +1813,7 @@ class WidgetConfigSectionComponent {
1813
1813
  this.feedbackTemplate = template;
1814
1814
  }
1815
1815
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WidgetConfigSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1816
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: WidgetConfigSectionComponent, isStandalone: true, selector: "c8y-widget-config-section", inputs: { section: "section" }, ngImport: i0, template: "<c8y-li\n class=\"c8y-list__item--no-expand c8y-list__item--sticky-top c8y-list__item--dense full-w-collapse\"\n [collapsed]=\"!section.expanded\"\n #li\n>\n <div class=\"d-flex p-r-16 fit-w\">\n <button\n class=\"btn-clean flex-grow flex-no-shrink\"\n type=\"button\"\n [attr.data-cy]=\"section.label\"\n (click)=\"li.collapsed = !li.collapsed\"\n >\n <i\n class=\"p-r-4\"\n [c8yIcon]=\"li.collapsed ? 'chevron-right' : 'chevron-down'\"\n ></i>\n <span class=\"text-medium\">\n {{ section.label | translate }}\n </span>\n </button>\n <ng-container *ngTemplateOutlet=\"feedbackTemplate\"></ng-container>\n </div>\n <c8y-list-item-collapse>\n <ng-container\n *c8yComponentOutlet=\"\n section.component;\n initialState: section.initialState;\n environmentInjector: section.injector\n \"\n ></ng-container>\n </c8y-list-item-collapse>\n</c8y-li>\n", dependencies: [{ kind: "ngmodule", type: ListGroupModule }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i2.ListItemCollapseComponent, selector: "c8y-list-item-collapse, c8y-li-collapse", inputs: ["collapseWay"] }, { kind: "directive", type: C8yComponentOutlet, selector: "[c8yComponentOutlet]", inputs: ["c8yComponentOutlet", "c8yComponentOutletInjector", "c8yComponentOutletEnvironmentInjector", "c8yComponentOutletProviders", "c8yComponentOutletInitialState"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
1816
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: WidgetConfigSectionComponent, isStandalone: true, selector: "c8y-widget-config-section", inputs: { section: "section" }, ngImport: i0, template: "<c8y-li\n class=\"c8y-list__item--no-expand c8y-list__item--sticky-top c8y-list__item--dense full-w-collapse\"\n [collapsed]=\"!section.expanded\"\n #li\n>\n <div class=\"d-flex p-r-16 fit-w\">\n <button\n class=\"btn-clean flex-no-shrink p-r-8 flex-grow\"\n type=\"button\"\n [attr.data-cy]=\"section.label\"\n (click)=\"li.collapsed = !li.collapsed\"\n >\n <i\n class=\"p-r-4\"\n [c8yIcon]=\"li.collapsed ? 'chevron-right' : 'chevron-down'\"\n ></i>\n <span class=\"text-medium\">\n {{ section.label | translate }}\n </span>\n </button>\n <ng-container *ngTemplateOutlet=\"feedbackTemplate\"></ng-container>\n </div>\n <c8y-list-item-collapse>\n <ng-container\n *c8yComponentOutlet=\"\n section.component;\n initialState: section.initialState;\n environmentInjector: section.injector\n \"\n ></ng-container>\n </c8y-list-item-collapse>\n</c8y-li>\n", dependencies: [{ kind: "ngmodule", type: ListGroupModule }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i2.ListItemCollapseComponent, selector: "c8y-list-item-collapse, c8y-li-collapse", inputs: ["collapseWay"] }, { kind: "directive", type: C8yComponentOutlet, selector: "[c8yComponentOutlet]", inputs: ["c8yComponentOutlet", "c8yComponentOutletInjector", "c8yComponentOutletEnvironmentInjector", "c8yComponentOutletProviders", "c8yComponentOutletInitialState"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
1817
1817
  }
1818
1818
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WidgetConfigSectionComponent, decorators: [{
1819
1819
  type: Component,
@@ -1824,7 +1824,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
1824
1824
  NgTemplateOutlet,
1825
1825
  CommonModule,
1826
1826
  C8yTranslatePipe
1827
- ], template: "<c8y-li\n class=\"c8y-list__item--no-expand c8y-list__item--sticky-top c8y-list__item--dense full-w-collapse\"\n [collapsed]=\"!section.expanded\"\n #li\n>\n <div class=\"d-flex p-r-16 fit-w\">\n <button\n class=\"btn-clean flex-grow flex-no-shrink\"\n type=\"button\"\n [attr.data-cy]=\"section.label\"\n (click)=\"li.collapsed = !li.collapsed\"\n >\n <i\n class=\"p-r-4\"\n [c8yIcon]=\"li.collapsed ? 'chevron-right' : 'chevron-down'\"\n ></i>\n <span class=\"text-medium\">\n {{ section.label | translate }}\n </span>\n </button>\n <ng-container *ngTemplateOutlet=\"feedbackTemplate\"></ng-container>\n </div>\n <c8y-list-item-collapse>\n <ng-container\n *c8yComponentOutlet=\"\n section.component;\n initialState: section.initialState;\n environmentInjector: section.injector\n \"\n ></ng-container>\n </c8y-list-item-collapse>\n</c8y-li>\n" }]
1827
+ ], template: "<c8y-li\n class=\"c8y-list__item--no-expand c8y-list__item--sticky-top c8y-list__item--dense full-w-collapse\"\n [collapsed]=\"!section.expanded\"\n #li\n>\n <div class=\"d-flex p-r-16 fit-w\">\n <button\n class=\"btn-clean flex-no-shrink p-r-8 flex-grow\"\n type=\"button\"\n [attr.data-cy]=\"section.label\"\n (click)=\"li.collapsed = !li.collapsed\"\n >\n <i\n class=\"p-r-4\"\n [c8yIcon]=\"li.collapsed ? 'chevron-right' : 'chevron-down'\"\n ></i>\n <span class=\"text-medium\">\n {{ section.label | translate }}\n </span>\n </button>\n <ng-container *ngTemplateOutlet=\"feedbackTemplate\"></ng-container>\n </div>\n <c8y-list-item-collapse>\n <ng-container\n *c8yComponentOutlet=\"\n section.component;\n initialState: section.initialState;\n environmentInjector: section.injector\n \"\n ></ng-container>\n </c8y-list-item-collapse>\n</c8y-li>\n" }]
1828
1828
  }], propDecorators: { section: [{
1829
1829
  type: Input
1830
1830
  }] } });
@@ -1928,7 +1928,7 @@ class WidgetAssetSelectorComponent {
1928
1928
  this.widgetConfigService.updateConfig({ device });
1929
1929
  }
1930
1930
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WidgetAssetSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1931
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: WidgetAssetSelectorComponent, isStandalone: true, selector: "c8y-widget-asset-selector", inputs: { isRequired: "isRequired", showUnassigned: "showUnassigned", groupsSelectable: "groupsSelectable", assetSelectorConfig: "assetSelectorConfig", selectedDevice: "selectedDevice" }, host: { classAttribute: "bg-level-1" }, ngImport: i0, template: "<div class=\"card borderless\">\n <div\n class=\"card-block p-0 bg-inherit\"\n style=\"height: 315px\"\n >\n <div\n class=\"alert alert-info m-4\"\n *ngIf=\"widgetConfigService.isDeviceTypeDashboard$ | async\"\n >\n <i class=\"fa fa-info-circle m-r-4\"></i>\n <span translate>\n This widget is used within a dashboard template, so the asset selector is unavailable. The\n widget automatically inherits the asset from the context in which the dashboard is\n displayed.\n </span>\n\n <div\n class=\"p-t-8\"\n *ngIf=\"!isRequired\"\n >\n <p translate>Asset selection is optional for this widget.</p>\n <button\n class=\"btn btn-primary btn-sm m-t-8\"\n *ngIf=\"!selectedDevice\"\n (click)=\"selectCurrentContext()\"\n ngNonBindable\n translate\n [translateParams]=\"{\n deviceName:\n (widgetConfigService.currentConfig$ | async)?.settings?.context?.name ||\n (deviceWithIdTpl\n | translate\n : { id: (widgetConfigService.currentConfig$ | async)?.settings?.context?.id })\n }\"\n >\n Use context asset \"{{ deviceName }}\"\n </button>\n <button\n class=\"btn btn-default btn-sm m-t-8\"\n *ngIf=\"selectedDevice\"\n (click)=\"selectedDevice = null; updateConfig(null)\"\n ngNonBindable\n translate\n [translateParams]=\"{\n deviceName:\n selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id })\n }\"\n >\n Use without asset \"{{ deviceName }}\"\n </button>\n </div>\n </div>\n <c8y-asset-selector-miller\n class=\"d-block bg-inherit p-relative\"\n name=\"configAsset\"\n *ngIf=\"!(widgetConfigService.isDeviceTypeDashboard$ | async) && assetSelectorConfig\"\n (onSelected)=\"selectionChanged($event)\"\n [config]=\"assetSelectorConfig\"\n [asset]=\"(widgetConfigService.currentConfig$ | async).settings?.context\"\n [(ngModel)]=\"selectedDevice\"\n [required]=\"isRequired\"\n ></c8y-asset-selector-miller>\n\n <c8y-widget-config-feedback>\n <span\n class=\"tag chip text-12 m-4\"\n [ngClass]=\"{\n 'tag--info': selectedDevice || !isRequired,\n 'tag--danger': !selectedDevice && isRequired\n }\"\n >\n <button\n class=\"btn-clean text-12 m-r-4\"\n title=\"{{ 'Deselect' | translate }}\"\n type=\"button\"\n *ngIf=\"\n selectedDevice &&\n (!(widgetConfigService.isDeviceTypeDashboard$ | async) ||\n (!isRequired && (widgetConfigService.isDeviceTypeDashboard$ | async)))\n \"\n (click)=\"selectedDevice = null; updateConfig(null)\"\n >\n <i c8yIcon=\"times\"></i>\n </button>\n <span\n class=\"text-truncate\"\n title=\"{{\n selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id })\n }}\"\n *ngIf=\"selectedDevice\"\n >\n {{ selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id }) }}\n </span>\n <span\n *ngIf=\"!selectedDevice\"\n translate\n >\n No asset selected\n </span>\n </span>\n </c8y-widget-config-feedback>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: AssetSelectorModule }, { kind: "component", type: i1$2.MillerViewComponent, selector: "c8y-asset-selector-miller", inputs: ["config", "asset", "selectedDevice", "rootNode", "container"], outputs: ["onSelected", "onClearSelected"] }, { kind: "component", type: WidgetConfigFeedbackComponent, selector: "c8y-widget-config-feedback" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }] }); }
1931
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: WidgetAssetSelectorComponent, isStandalone: true, selector: "c8y-widget-asset-selector", inputs: { isRequired: "isRequired", showUnassigned: "showUnassigned", groupsSelectable: "groupsSelectable", assetSelectorConfig: "assetSelectorConfig", selectedDevice: "selectedDevice" }, host: { classAttribute: "bg-level-1" }, ngImport: i0, template: "<div class=\"card borderless\">\n <div\n class=\"card-block p-0 bg-inherit\"\n style=\"height: 315px\"\n >\n @if (widgetConfigService.isDeviceTypeDashboard$ | async) {\n <div class=\"alert alert-info m-4\">\n <span translate>\n This widget is used within a dashboard template, so the asset selector is unavailable. The\n widget automatically inherits the asset from the context in which the dashboard is\n displayed.\n </span>\n\n @if (!isRequired) {\n <div class=\"p-t-8\">\n <p translate>Asset selection is optional for this widget.</p>\n @if (!selectedDevice) {\n <button\n class=\"btn btn-primary btn-sm m-t-8 text-truncate\"\n (click)=\"selectCurrentContext()\"\n ngNonBindable\n translate\n [translateParams]=\"{\n deviceName:\n (widgetConfigService.currentConfig$ | async)?.settings?.context?.name ||\n (deviceWithIdTpl\n | translate\n : {\n id: (widgetConfigService.currentConfig$ | async)?.settings?.context?.id\n })\n }\"\n >\n Use context asset \"{{ deviceName }}\"\n </button>\n }\n @if (selectedDevice) {\n <button\n class=\"btn btn-default btn-sm m-t-8 text-truncate\"\n (click)=\"selectedDevice = null; updateConfig(null)\"\n ngNonBindable\n translate\n [translateParams]=\"{\n deviceName:\n selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id })\n }\"\n >\n Use without asset \"{{ deviceName }}\"\n </button>\n }\n </div>\n }\n </div>\n }\n @if (!(widgetConfigService.isDeviceTypeDashboard$ | async) && assetSelectorConfig) {\n <c8y-asset-selector-miller\n class=\"d-block bg-inherit p-relative\"\n name=\"configAsset\"\n (onSelected)=\"selectionChanged($event)\"\n [config]=\"assetSelectorConfig\"\n [asset]=\"(widgetConfigService.currentConfig$ | async).settings?.context\"\n [(ngModel)]=\"selectedDevice\"\n [required]=\"isRequired\"\n ></c8y-asset-selector-miller>\n }\n\n <c8y-widget-config-feedback>\n <span\n class=\"tag chip text-12 m-4\"\n [ngClass]=\"{\n 'tag--info': selectedDevice || !isRequired,\n 'tag--danger': !selectedDevice && isRequired\n }\"\n >\n @if (\n selectedDevice &&\n (!(widgetConfigService.isDeviceTypeDashboard$ | async) ||\n (!isRequired && (widgetConfigService.isDeviceTypeDashboard$ | async)))\n ) {\n <button\n class=\"btn-clean text-12 m-r-4\"\n title=\"{{ 'Deselect' | translate }}\"\n type=\"button\"\n (click)=\"selectedDevice = null; updateConfig(null)\"\n >\n <i c8yIcon=\"times\"></i>\n </button>\n }\n @if (selectedDevice) {\n <span\n class=\"text-truncate\"\n title=\"{{\n selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id })\n }}\"\n >\n {{ selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id }) }}\n </span>\n }\n @if (!selectedDevice) {\n <span translate>No asset selected</span>\n }\n </span>\n </c8y-widget-config-feedback>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: AssetSelectorModule }, { kind: "component", type: i1$2.MillerViewComponent, selector: "c8y-asset-selector-miller", inputs: ["config", "asset", "selectedDevice", "rootNode", "container"], outputs: ["onSelected", "onClearSelected"] }, { kind: "component", type: WidgetConfigFeedbackComponent, selector: "c8y-widget-config-feedback" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }] }); }
1932
1932
  }
1933
1933
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WidgetAssetSelectorComponent, decorators: [{
1934
1934
  type: Component,
@@ -1942,7 +1942,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
1942
1942
  IconDirective,
1943
1943
  FormsModule,
1944
1944
  C8yTranslateDirective
1945
- ], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], template: "<div class=\"card borderless\">\n <div\n class=\"card-block p-0 bg-inherit\"\n style=\"height: 315px\"\n >\n <div\n class=\"alert alert-info m-4\"\n *ngIf=\"widgetConfigService.isDeviceTypeDashboard$ | async\"\n >\n <i class=\"fa fa-info-circle m-r-4\"></i>\n <span translate>\n This widget is used within a dashboard template, so the asset selector is unavailable. The\n widget automatically inherits the asset from the context in which the dashboard is\n displayed.\n </span>\n\n <div\n class=\"p-t-8\"\n *ngIf=\"!isRequired\"\n >\n <p translate>Asset selection is optional for this widget.</p>\n <button\n class=\"btn btn-primary btn-sm m-t-8\"\n *ngIf=\"!selectedDevice\"\n (click)=\"selectCurrentContext()\"\n ngNonBindable\n translate\n [translateParams]=\"{\n deviceName:\n (widgetConfigService.currentConfig$ | async)?.settings?.context?.name ||\n (deviceWithIdTpl\n | translate\n : { id: (widgetConfigService.currentConfig$ | async)?.settings?.context?.id })\n }\"\n >\n Use context asset \"{{ deviceName }}\"\n </button>\n <button\n class=\"btn btn-default btn-sm m-t-8\"\n *ngIf=\"selectedDevice\"\n (click)=\"selectedDevice = null; updateConfig(null)\"\n ngNonBindable\n translate\n [translateParams]=\"{\n deviceName:\n selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id })\n }\"\n >\n Use without asset \"{{ deviceName }}\"\n </button>\n </div>\n </div>\n <c8y-asset-selector-miller\n class=\"d-block bg-inherit p-relative\"\n name=\"configAsset\"\n *ngIf=\"!(widgetConfigService.isDeviceTypeDashboard$ | async) && assetSelectorConfig\"\n (onSelected)=\"selectionChanged($event)\"\n [config]=\"assetSelectorConfig\"\n [asset]=\"(widgetConfigService.currentConfig$ | async).settings?.context\"\n [(ngModel)]=\"selectedDevice\"\n [required]=\"isRequired\"\n ></c8y-asset-selector-miller>\n\n <c8y-widget-config-feedback>\n <span\n class=\"tag chip text-12 m-4\"\n [ngClass]=\"{\n 'tag--info': selectedDevice || !isRequired,\n 'tag--danger': !selectedDevice && isRequired\n }\"\n >\n <button\n class=\"btn-clean text-12 m-r-4\"\n title=\"{{ 'Deselect' | translate }}\"\n type=\"button\"\n *ngIf=\"\n selectedDevice &&\n (!(widgetConfigService.isDeviceTypeDashboard$ | async) ||\n (!isRequired && (widgetConfigService.isDeviceTypeDashboard$ | async)))\n \"\n (click)=\"selectedDevice = null; updateConfig(null)\"\n >\n <i c8yIcon=\"times\"></i>\n </button>\n <span\n class=\"text-truncate\"\n title=\"{{\n selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id })\n }}\"\n *ngIf=\"selectedDevice\"\n >\n {{ selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id }) }}\n </span>\n <span\n *ngIf=\"!selectedDevice\"\n translate\n >\n No asset selected\n </span>\n </span>\n </c8y-widget-config-feedback>\n </div>\n</div>\n" }]
1945
+ ], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], template: "<div class=\"card borderless\">\n <div\n class=\"card-block p-0 bg-inherit\"\n style=\"height: 315px\"\n >\n @if (widgetConfigService.isDeviceTypeDashboard$ | async) {\n <div class=\"alert alert-info m-4\">\n <span translate>\n This widget is used within a dashboard template, so the asset selector is unavailable. The\n widget automatically inherits the asset from the context in which the dashboard is\n displayed.\n </span>\n\n @if (!isRequired) {\n <div class=\"p-t-8\">\n <p translate>Asset selection is optional for this widget.</p>\n @if (!selectedDevice) {\n <button\n class=\"btn btn-primary btn-sm m-t-8 text-truncate\"\n (click)=\"selectCurrentContext()\"\n ngNonBindable\n translate\n [translateParams]=\"{\n deviceName:\n (widgetConfigService.currentConfig$ | async)?.settings?.context?.name ||\n (deviceWithIdTpl\n | translate\n : {\n id: (widgetConfigService.currentConfig$ | async)?.settings?.context?.id\n })\n }\"\n >\n Use context asset \"{{ deviceName }}\"\n </button>\n }\n @if (selectedDevice) {\n <button\n class=\"btn btn-default btn-sm m-t-8 text-truncate\"\n (click)=\"selectedDevice = null; updateConfig(null)\"\n ngNonBindable\n translate\n [translateParams]=\"{\n deviceName:\n selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id })\n }\"\n >\n Use without asset \"{{ deviceName }}\"\n </button>\n }\n </div>\n }\n </div>\n }\n @if (!(widgetConfigService.isDeviceTypeDashboard$ | async) && assetSelectorConfig) {\n <c8y-asset-selector-miller\n class=\"d-block bg-inherit p-relative\"\n name=\"configAsset\"\n (onSelected)=\"selectionChanged($event)\"\n [config]=\"assetSelectorConfig\"\n [asset]=\"(widgetConfigService.currentConfig$ | async).settings?.context\"\n [(ngModel)]=\"selectedDevice\"\n [required]=\"isRequired\"\n ></c8y-asset-selector-miller>\n }\n\n <c8y-widget-config-feedback>\n <span\n class=\"tag chip text-12 m-4\"\n [ngClass]=\"{\n 'tag--info': selectedDevice || !isRequired,\n 'tag--danger': !selectedDevice && isRequired\n }\"\n >\n @if (\n selectedDevice &&\n (!(widgetConfigService.isDeviceTypeDashboard$ | async) ||\n (!isRequired && (widgetConfigService.isDeviceTypeDashboard$ | async)))\n ) {\n <button\n class=\"btn-clean text-12 m-r-4\"\n title=\"{{ 'Deselect' | translate }}\"\n type=\"button\"\n (click)=\"selectedDevice = null; updateConfig(null)\"\n >\n <i c8yIcon=\"times\"></i>\n </button>\n }\n @if (selectedDevice) {\n <span\n class=\"text-truncate\"\n title=\"{{\n selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id })\n }}\"\n >\n {{ selectedDevice.name || (deviceWithIdTpl | translate: { id: selectedDevice.id }) }}\n </span>\n }\n @if (!selectedDevice) {\n <span translate>No asset selected</span>\n }\n </span>\n </c8y-widget-config-feedback>\n </div>\n</div>\n" }]
1946
1946
  }], propDecorators: { isRequired: [{
1947
1947
  type: Input
1948
1948
  }], showUnassigned: [{
@@ -2460,6 +2460,10 @@ class WidgetConfigComponent {
2460
2460
  this._cancel = reject;
2461
2461
  });
2462
2462
  }
2463
+ async onEscapePress(event) {
2464
+ event.preventDefault();
2465
+ await this.close();
2466
+ }
2463
2467
  async ngAfterContentInit() {
2464
2468
  this.components = this.widgetService.getWidgetDefinitions();
2465
2469
  if (this.selected) {
@@ -2650,7 +2654,7 @@ class WidgetConfigComponent {
2650
2654
  return widgetConfig;
2651
2655
  }
2652
2656
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WidgetConfigComponent, deps: [{ token: WidgetService }, { token: i2.BottomDrawerRef }, { token: ContextDashboardService }, { token: WidgetConfigService }], target: i0.ɵɵFactoryTarget.Component }); }
2653
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: WidgetConfigComponent, isStandalone: true, selector: "c8y-widget-config", host: { classAttribute: "d-contents" }, viewQueries: [{ propertyName: "configForm", first: true, predicate: ["configForm"], descendants: true }], ngImport: i0, template: "<!-- select widget -->\n@if (!(widgetConfigService.selected$ | async)) {\n <div class=\"card-header j-c-center separator\">\n <div\n class=\"h4 text-center\"\n id=\"drawerTitle\"\n >\n {{ 'Select widget' | translate }}\n </div>\n </div>\n <div class=\"card-inner-scroll fit-h bg-level-2\">\n <div\n class=\"bg-level-0 p-l-24 p-r-24 p-t-8 p-b-8 sticky-header-top-0 elevation-md\"\n style=\"z-index: 2\"\n >\n <div class=\"row\">\n <div class=\"col-sm-6 col-sm-offset-3\">\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n [attr.aria-label]=\"'Search' | translate\"\n placeholder=\"{{ 'Search\u2026' | translate }}\"\n type=\"text\"\n data-cy=\"widget-config--Search\"\n [(ngModel)]=\"searchTerm\"\n [ngModelOptions]=\"{ standalone: true }\"\n (keydown)=\"searchChange$.next($event)\"\n />\n <span class=\"input-group-btn\">\n <button\n class=\"btn btn-dot\"\n title=\"{{ 'Search' | translate }}\"\n type=\"button\"\n (click)=\"resetSearch()\"\n >\n <i [c8yIcon]=\"searchTerm.length === 0 ? 'search' : 'close'\"></i>\n </button>\n </span>\n </div>\n </div>\n </div>\n </div>\n <div class=\"card-block\">\n <div class=\"card-group p-l-24 p-r-24 d-grid grid__col--auto-300 gap-24 card-select m-b-0\">\n @for (cmp of searchResult || components; track cmp) {\n <button\n class=\"btn-clean d-col card m-b-0\"\n [title]=\"cmp.description || cmp.label | translate\"\n type=\"button\"\n data-cy=\"widget-config--widget-list\"\n (click)=\"select(cmp)\"\n >\n <div\n class=\"border-bottom\"\n role=\"presentation\"\n >\n @if (!cmp.previewImage) {\n <div class=\"h1\"><i c8yIcon=\"file-image-o\"></i></div>\n <small translate>Preview not available</small>\n } @else {\n <img\n class=\"widget-thumbnail\"\n alt=\"{{ cmp.label | translate }}\"\n [src]=\"cmp.previewImage\"\n />\n }\n </div>\n <div class=\"card-block\">\n <p class=\"card-title text-truncate text-medium\">\n <c8y-highlight\n text=\"{{ cmp.label | translate }}\"\n [pattern]=\"searchTerm\"\n ></c8y-highlight>\n </p>\n <p\n class=\"small text-default\"\n style=\"white-space: wrap\"\n >\n {{ cmp.description | translate }}\n </p>\n </div>\n </button>\n }\n @if (searchResult && searchResult.length === 0) {\n <c8y-ui-empty-state\n class=\"p-24 grid__col--fullspan\"\n [icon]=\"'search'\"\n [title]=\"'No widgets found.' | translate\"\n [subtitle]=\"'Rephrase your search term.' | translate\"\n >\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Reset search' | translate }}\"\n type=\"button\"\n (click)=\"resetSearch()\"\n >\n {{ 'Reset search' | translate }}\n </button>\n </c8y-ui-empty-state>\n }\n </div>\n </div>\n </div>\n <div class=\"card-footer text-center separator flex-no-shrink\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n data-cy=\"widget-config--cancel-widget\"\n (click)=\"close()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n </div>\n}\n\n<!-- widget configuration -->\n@if (!!(widgetConfigService.selected$ | async)) {\n <div class=\"card-header d-block separator-bottom flex-no-shrink\">\n <div\n class=\"h3 p-t-16\"\n title=\"{{ selected?.label | translate }}\"\n >\n <span>{{ selected?.label | translate }}</span>\n <button\n class=\"btn btn-default btn-sm m-l-8\"\n [title]=\"'Change widget' | translate\"\n (click)=\"backToWidgetSelection(); (false)\"\n >\n <i c8yIcon=\"replace\"></i>\n {{ 'Change widget' | translate }}\n </button>\n </div>\n @if (selected) {\n <div class=\"p-t-8\">\n <p>\n {{ selected.description | translate }}\n </p>\n </div>\n }\n </div>\n\n <c8y-resizable-grid\n class=\"min-height-0 flex-grow\"\n [collapsible]=\"false\"\n [trackId]=\"'c8y-widget-resizable-grid-size-' + (widgetConfigService.instanceId$ | async)\"\n [leftColumnWidth]=\"\n (widgetConfigService.currentConfig$ | async)?.settings?.configurationViewGridSize ||\n WIDGET_CONFIGURATION_GRID_SIZE.HALF\n \"\n >\n <div\n class=\"bg-level-1 inner-scroll\"\n left-pane\n >\n <div class=\"p-16 flex-no-shrink separator-bottom bg-level-1\">\n <c8y-form-group>\n <label\n for=\"widgetTitle\"\n translate\n >\n Widget title\n </label>\n <input\n class=\"form-control\"\n id=\"widgetTitle\"\n placeholder=\"{{ 'e.g.' | translate }} {{ componentLabel | translate }}\"\n name=\"widgetTitle\"\n type=\"text\"\n required\n [(ngModel)]=\"widgetTitle\"\n (ngModelChange)=\"onWidgetTitleChange($event)\"\n />\n </c8y-form-group>\n </div>\n\n @if (!(widgetConfigService.hasConfig$ | async)) {\n <c8y-ui-empty-state\n class=\"p-24\"\n [icon]=\"'settings'\"\n [title]=\"'No configuration needed.' | translate\"\n [subtitle]=\"'This widget does not need any specific configuration.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n }\n <div>\n <form\n name=\"form\"\n #configForm=\"ngForm\"\n >\n @if (widgetConfigService.hasConfig$ | async) {\n @if (widgetConfigService.providers$ | async; as providers) {\n <ng-container\n *c8yComponentOutlet=\"widgetConfigRoot; providers: providers\"\n ></ng-container>\n }\n }\n </form>\n </div>\n </div>\n <div\n class=\"inner-scroll p-32 p-t-0\"\n right-pane\n >\n <c8y-widget-preview [previewClasses]=\"getStyle(true)\"></c8y-widget-preview>\n\n <c8y-appearance-settings\n [(themeClass)]=\"styling.contentClass\"\n [(headerClass)]=\"styling.headerClass\"\n [possibleStylingTheme]=\"possibleStyling.WIDGET_CONTENT_CLASSES\"\n [possibleStylingHeader]=\"possibleStyling.WIDGET_HEADER_CLASSES\"\n [defaultThemeClass]=\"defaultStyling.contentClass\"\n [defaultHeaderClass]=\"defaultStyling.headerClass\"\n [columns]=\"2\"\n ></c8y-appearance-settings>\n </div>\n </c8y-resizable-grid>\n <div class=\"card-footer separator text-center\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n data-cy=\"widget-config--cancel-widget\"\n (click)=\"close()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Save' | translate }}\"\n type=\"submit\"\n data-cy=\"widget-config--save-widget\"\n (click)=\"save()\"\n [disabled]=\"(contextDashboardService.formDisabled$ | async) || isSaveDisabled()\"\n c8yProductExperience\n [actionName]=\"current ? 'editWidget' : 'createWidget'\"\n [actionData]=\"{ widgetName: selected && selected.id }\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: HighlightComponent, selector: "c8y-highlight", inputs: ["pattern", "text", "elementClass", "shouldTrimPattern"] }, { kind: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "component", type: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: C8yComponentOutlet, selector: "[c8yComponentOutlet]", inputs: ["c8yComponentOutlet", "c8yComponentOutletInjector", "c8yComponentOutletEnvironmentInjector", "c8yComponentOutletProviders", "c8yComponentOutletInitialState"] }, { kind: "component", type: WidgetPreviewComponent, selector: "c8y-widget-preview", inputs: ["previewClasses"] }, { kind: "component", type: AppearanceSettingsComponent, selector: "c8y-appearance-settings", inputs: ["themeClass", "headerClass", "defaultThemeClass", "defaultHeaderClass", "dashboardSettings", "possibleStylingTheme", "possibleStylingHeader", "columns"], outputs: ["themeClassChange", "headerClassChange", "onChange"] }, { kind: "directive", type: ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "component", type: ResizableGridComponent, selector: "c8y-resizable-grid", inputs: ["leftColumnWidth", "trackId", "collapseThreshold", "collapsible"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
2657
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: WidgetConfigComponent, isStandalone: true, selector: "c8y-widget-config", host: { listeners: { "document:keydown.escape": "onEscapePress($event)" }, classAttribute: "d-contents" }, viewQueries: [{ propertyName: "configForm", first: true, predicate: ["configForm"], descendants: true }], ngImport: i0, template: "<!-- select widget -->\n@if (!(widgetConfigService.selected$ | async)) {\n <div class=\"card-header j-c-center separator\">\n <div\n class=\"h4 text-center\"\n id=\"drawerTitle\"\n >\n {{ 'Select widget' | translate }}\n </div>\n </div>\n <div class=\"card-inner-scroll fit-h bg-level-2\">\n <div\n class=\"bg-level-0 p-l-24 p-r-24 p-t-8 p-b-8 sticky-header-top-0 elevation-md\"\n style=\"z-index: 2\"\n >\n <div class=\"row\">\n <div class=\"col-sm-6 col-sm-offset-3\">\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n [attr.aria-label]=\"'Search' | translate\"\n placeholder=\"{{ 'Search\u2026' | translate }}\"\n type=\"text\"\n data-cy=\"widget-config--Search\"\n [(ngModel)]=\"searchTerm\"\n [ngModelOptions]=\"{ standalone: true }\"\n (keydown)=\"searchChange$.next($event)\"\n />\n <span class=\"input-group-btn\">\n <button\n class=\"btn btn-dot\"\n title=\"{{ 'Search' | translate }}\"\n type=\"button\"\n (click)=\"resetSearch()\"\n >\n <i [c8yIcon]=\"searchTerm.length === 0 ? 'search' : 'close'\"></i>\n </button>\n </span>\n </div>\n </div>\n </div>\n </div>\n <div class=\"card-block\">\n <div class=\"card-group p-l-24 p-r-24 d-grid grid__col--auto-300 gap-24 card-select m-b-0\">\n @for (cmp of searchResult || components; track cmp) {\n <button\n class=\"btn-clean d-col card m-b-0\"\n [title]=\"cmp.description || cmp.label | translate\"\n type=\"button\"\n data-cy=\"widget-config--widget-list\"\n (click)=\"select(cmp)\"\n >\n <div\n class=\"border-bottom\"\n role=\"presentation\"\n >\n @if (!cmp.previewImage) {\n <div class=\"h1\"><i c8yIcon=\"file-image-o\"></i></div>\n <small translate>Preview not available</small>\n } @else {\n <img\n class=\"widget-thumbnail\"\n alt=\"{{ cmp.label | translate }}\"\n [src]=\"cmp.previewImage\"\n />\n }\n </div>\n <div class=\"card-block\">\n <p class=\"card-title text-truncate text-medium\">\n <c8y-highlight\n text=\"{{ cmp.label | translate }}\"\n [pattern]=\"searchTerm\"\n ></c8y-highlight>\n </p>\n <p\n class=\"small text-default\"\n style=\"white-space: wrap\"\n >\n {{ cmp.description | translate }}\n </p>\n </div>\n </button>\n }\n @if (searchResult && searchResult.length === 0) {\n <c8y-ui-empty-state\n class=\"p-24 grid__col--fullspan\"\n [icon]=\"'search'\"\n [title]=\"'No widgets found.' | translate\"\n [subtitle]=\"'Rephrase your search term.' | translate\"\n >\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Reset search' | translate }}\"\n type=\"button\"\n (click)=\"resetSearch()\"\n >\n {{ 'Reset search' | translate }}\n </button>\n </c8y-ui-empty-state>\n }\n </div>\n </div>\n </div>\n <div class=\"card-footer text-center separator flex-no-shrink\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n data-cy=\"widget-config--cancel-widget\"\n (click)=\"close()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n </div>\n}\n\n<!-- widget configuration -->\n@if (!!(widgetConfigService.selected$ | async)) {\n <div class=\"card-header d-block separator-bottom flex-no-shrink\">\n <div\n class=\"h3 p-t-16\"\n title=\"{{ selected?.label | translate }}\"\n >\n <span>{{ selected?.label | translate }}</span>\n <button\n class=\"btn btn-default btn-sm m-l-8\"\n [title]=\"'Change widget' | translate\"\n (click)=\"backToWidgetSelection(); (false)\"\n >\n <i c8yIcon=\"replace\"></i>\n {{ 'Change widget' | translate }}\n </button>\n </div>\n @if (selected) {\n <div class=\"p-t-8\">\n <p>\n {{ selected.description | translate }}\n </p>\n </div>\n }\n </div>\n\n <c8y-resizable-grid\n class=\"min-height-0 flex-grow\"\n [collapsible]=\"false\"\n [trackId]=\"'c8y-widget-resizable-grid-size-' + (widgetConfigService.instanceId$ | async)\"\n [leftColumnWidth]=\"\n (widgetConfigService.currentConfig$ | async)?.settings?.configurationViewGridSize ||\n WIDGET_CONFIGURATION_GRID_SIZE.HALF\n \"\n >\n <div\n class=\"bg-level-1 inner-scroll\"\n left-pane\n >\n <div class=\"p-16 flex-no-shrink separator-bottom bg-level-1\">\n <c8y-form-group>\n <label\n for=\"widgetTitle\"\n translate\n >\n Widget title\n </label>\n <input\n class=\"form-control\"\n id=\"widgetTitle\"\n placeholder=\"{{ 'e.g.' | translate }} {{ componentLabel | translate }}\"\n name=\"widgetTitle\"\n type=\"text\"\n required\n [(ngModel)]=\"widgetTitle\"\n (ngModelChange)=\"onWidgetTitleChange($event)\"\n />\n </c8y-form-group>\n </div>\n\n @if (!(widgetConfigService.hasConfig$ | async)) {\n <c8y-ui-empty-state\n class=\"p-24\"\n [icon]=\"'settings'\"\n [title]=\"'No configuration needed.' | translate\"\n [subtitle]=\"'This widget does not need any specific configuration.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n }\n <div>\n <form\n name=\"form\"\n #configForm=\"ngForm\"\n >\n @if (widgetConfigService.hasConfig$ | async) {\n @if (widgetConfigService.providers$ | async; as providers) {\n <ng-container\n *c8yComponentOutlet=\"widgetConfigRoot; providers: providers\"\n ></ng-container>\n }\n }\n </form>\n </div>\n </div>\n\n <div\n class=\"inner-scroll p-32 p-t-0\"\n right-pane\n >\n <c8y-widget-preview [previewClasses]=\"getStyle(true)\"></c8y-widget-preview>\n\n <c8y-appearance-settings\n [(themeClass)]=\"styling.contentClass\"\n [(headerClass)]=\"styling.headerClass\"\n [possibleStylingTheme]=\"possibleStyling.WIDGET_CONTENT_CLASSES\"\n [possibleStylingHeader]=\"possibleStyling.WIDGET_HEADER_CLASSES\"\n [defaultThemeClass]=\"defaultStyling.contentClass\"\n [defaultHeaderClass]=\"defaultStyling.headerClass\"\n [columns]=\"2\"\n ></c8y-appearance-settings>\n </div>\n </c8y-resizable-grid>\n\n <div class=\"card-footer separator text-center\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n data-cy=\"widget-config--cancel-widget\"\n (click)=\"close()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Save' | translate }}\"\n type=\"submit\"\n data-cy=\"widget-config--save-widget\"\n (click)=\"save()\"\n [disabled]=\"(contextDashboardService.formDisabled$ | async) || isSaveDisabled()\"\n c8yProductExperience\n [actionName]=\"current ? 'editWidget' : 'createWidget'\"\n [actionData]=\"{ widgetName: selected && selected.id }\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: HighlightComponent, selector: "c8y-highlight", inputs: ["pattern", "text", "elementClass", "shouldTrimPattern"] }, { kind: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "component", type: FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: C8yComponentOutlet, selector: "[c8yComponentOutlet]", inputs: ["c8yComponentOutlet", "c8yComponentOutletInjector", "c8yComponentOutletEnvironmentInjector", "c8yComponentOutletProviders", "c8yComponentOutletInitialState"] }, { kind: "component", type: WidgetPreviewComponent, selector: "c8y-widget-preview", inputs: ["previewClasses"] }, { kind: "component", type: AppearanceSettingsComponent, selector: "c8y-appearance-settings", inputs: ["themeClass", "headerClass", "defaultThemeClass", "defaultHeaderClass", "dashboardSettings", "possibleStylingTheme", "possibleStylingHeader", "columns"], outputs: ["themeClassChange", "headerClassChange", "onChange"] }, { kind: "directive", type: ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "component", type: ResizableGridComponent, selector: "c8y-resizable-grid", inputs: ["leftColumnWidth", "trackId", "collapseThreshold", "collapsible"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
2654
2658
  }
2655
2659
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WidgetConfigComponent, decorators: [{
2656
2660
  type: Component,
@@ -2669,10 +2673,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
2669
2673
  C8yTranslatePipe,
2670
2674
  AsyncPipe,
2671
2675
  ResizableGridComponent
2672
- ], standalone: true, template: "<!-- select widget -->\n@if (!(widgetConfigService.selected$ | async)) {\n <div class=\"card-header j-c-center separator\">\n <div\n class=\"h4 text-center\"\n id=\"drawerTitle\"\n >\n {{ 'Select widget' | translate }}\n </div>\n </div>\n <div class=\"card-inner-scroll fit-h bg-level-2\">\n <div\n class=\"bg-level-0 p-l-24 p-r-24 p-t-8 p-b-8 sticky-header-top-0 elevation-md\"\n style=\"z-index: 2\"\n >\n <div class=\"row\">\n <div class=\"col-sm-6 col-sm-offset-3\">\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n [attr.aria-label]=\"'Search' | translate\"\n placeholder=\"{{ 'Search\u2026' | translate }}\"\n type=\"text\"\n data-cy=\"widget-config--Search\"\n [(ngModel)]=\"searchTerm\"\n [ngModelOptions]=\"{ standalone: true }\"\n (keydown)=\"searchChange$.next($event)\"\n />\n <span class=\"input-group-btn\">\n <button\n class=\"btn btn-dot\"\n title=\"{{ 'Search' | translate }}\"\n type=\"button\"\n (click)=\"resetSearch()\"\n >\n <i [c8yIcon]=\"searchTerm.length === 0 ? 'search' : 'close'\"></i>\n </button>\n </span>\n </div>\n </div>\n </div>\n </div>\n <div class=\"card-block\">\n <div class=\"card-group p-l-24 p-r-24 d-grid grid__col--auto-300 gap-24 card-select m-b-0\">\n @for (cmp of searchResult || components; track cmp) {\n <button\n class=\"btn-clean d-col card m-b-0\"\n [title]=\"cmp.description || cmp.label | translate\"\n type=\"button\"\n data-cy=\"widget-config--widget-list\"\n (click)=\"select(cmp)\"\n >\n <div\n class=\"border-bottom\"\n role=\"presentation\"\n >\n @if (!cmp.previewImage) {\n <div class=\"h1\"><i c8yIcon=\"file-image-o\"></i></div>\n <small translate>Preview not available</small>\n } @else {\n <img\n class=\"widget-thumbnail\"\n alt=\"{{ cmp.label | translate }}\"\n [src]=\"cmp.previewImage\"\n />\n }\n </div>\n <div class=\"card-block\">\n <p class=\"card-title text-truncate text-medium\">\n <c8y-highlight\n text=\"{{ cmp.label | translate }}\"\n [pattern]=\"searchTerm\"\n ></c8y-highlight>\n </p>\n <p\n class=\"small text-default\"\n style=\"white-space: wrap\"\n >\n {{ cmp.description | translate }}\n </p>\n </div>\n </button>\n }\n @if (searchResult && searchResult.length === 0) {\n <c8y-ui-empty-state\n class=\"p-24 grid__col--fullspan\"\n [icon]=\"'search'\"\n [title]=\"'No widgets found.' | translate\"\n [subtitle]=\"'Rephrase your search term.' | translate\"\n >\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Reset search' | translate }}\"\n type=\"button\"\n (click)=\"resetSearch()\"\n >\n {{ 'Reset search' | translate }}\n </button>\n </c8y-ui-empty-state>\n }\n </div>\n </div>\n </div>\n <div class=\"card-footer text-center separator flex-no-shrink\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n data-cy=\"widget-config--cancel-widget\"\n (click)=\"close()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n </div>\n}\n\n<!-- widget configuration -->\n@if (!!(widgetConfigService.selected$ | async)) {\n <div class=\"card-header d-block separator-bottom flex-no-shrink\">\n <div\n class=\"h3 p-t-16\"\n title=\"{{ selected?.label | translate }}\"\n >\n <span>{{ selected?.label | translate }}</span>\n <button\n class=\"btn btn-default btn-sm m-l-8\"\n [title]=\"'Change widget' | translate\"\n (click)=\"backToWidgetSelection(); (false)\"\n >\n <i c8yIcon=\"replace\"></i>\n {{ 'Change widget' | translate }}\n </button>\n </div>\n @if (selected) {\n <div class=\"p-t-8\">\n <p>\n {{ selected.description | translate }}\n </p>\n </div>\n }\n </div>\n\n <c8y-resizable-grid\n class=\"min-height-0 flex-grow\"\n [collapsible]=\"false\"\n [trackId]=\"'c8y-widget-resizable-grid-size-' + (widgetConfigService.instanceId$ | async)\"\n [leftColumnWidth]=\"\n (widgetConfigService.currentConfig$ | async)?.settings?.configurationViewGridSize ||\n WIDGET_CONFIGURATION_GRID_SIZE.HALF\n \"\n >\n <div\n class=\"bg-level-1 inner-scroll\"\n left-pane\n >\n <div class=\"p-16 flex-no-shrink separator-bottom bg-level-1\">\n <c8y-form-group>\n <label\n for=\"widgetTitle\"\n translate\n >\n Widget title\n </label>\n <input\n class=\"form-control\"\n id=\"widgetTitle\"\n placeholder=\"{{ 'e.g.' | translate }} {{ componentLabel | translate }}\"\n name=\"widgetTitle\"\n type=\"text\"\n required\n [(ngModel)]=\"widgetTitle\"\n (ngModelChange)=\"onWidgetTitleChange($event)\"\n />\n </c8y-form-group>\n </div>\n\n @if (!(widgetConfigService.hasConfig$ | async)) {\n <c8y-ui-empty-state\n class=\"p-24\"\n [icon]=\"'settings'\"\n [title]=\"'No configuration needed.' | translate\"\n [subtitle]=\"'This widget does not need any specific configuration.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n }\n <div>\n <form\n name=\"form\"\n #configForm=\"ngForm\"\n >\n @if (widgetConfigService.hasConfig$ | async) {\n @if (widgetConfigService.providers$ | async; as providers) {\n <ng-container\n *c8yComponentOutlet=\"widgetConfigRoot; providers: providers\"\n ></ng-container>\n }\n }\n </form>\n </div>\n </div>\n <div\n class=\"inner-scroll p-32 p-t-0\"\n right-pane\n >\n <c8y-widget-preview [previewClasses]=\"getStyle(true)\"></c8y-widget-preview>\n\n <c8y-appearance-settings\n [(themeClass)]=\"styling.contentClass\"\n [(headerClass)]=\"styling.headerClass\"\n [possibleStylingTheme]=\"possibleStyling.WIDGET_CONTENT_CLASSES\"\n [possibleStylingHeader]=\"possibleStyling.WIDGET_HEADER_CLASSES\"\n [defaultThemeClass]=\"defaultStyling.contentClass\"\n [defaultHeaderClass]=\"defaultStyling.headerClass\"\n [columns]=\"2\"\n ></c8y-appearance-settings>\n </div>\n </c8y-resizable-grid>\n <div class=\"card-footer separator text-center\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n data-cy=\"widget-config--cancel-widget\"\n (click)=\"close()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Save' | translate }}\"\n type=\"submit\"\n data-cy=\"widget-config--save-widget\"\n (click)=\"save()\"\n [disabled]=\"(contextDashboardService.formDisabled$ | async) || isSaveDisabled()\"\n c8yProductExperience\n [actionName]=\"current ? 'editWidget' : 'createWidget'\"\n [actionData]=\"{ widgetName: selected && selected.id }\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n}\n" }]
2676
+ ], standalone: true, template: "<!-- select widget -->\n@if (!(widgetConfigService.selected$ | async)) {\n <div class=\"card-header j-c-center separator\">\n <div\n class=\"h4 text-center\"\n id=\"drawerTitle\"\n >\n {{ 'Select widget' | translate }}\n </div>\n </div>\n <div class=\"card-inner-scroll fit-h bg-level-2\">\n <div\n class=\"bg-level-0 p-l-24 p-r-24 p-t-8 p-b-8 sticky-header-top-0 elevation-md\"\n style=\"z-index: 2\"\n >\n <div class=\"row\">\n <div class=\"col-sm-6 col-sm-offset-3\">\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n [attr.aria-label]=\"'Search' | translate\"\n placeholder=\"{{ 'Search\u2026' | translate }}\"\n type=\"text\"\n data-cy=\"widget-config--Search\"\n [(ngModel)]=\"searchTerm\"\n [ngModelOptions]=\"{ standalone: true }\"\n (keydown)=\"searchChange$.next($event)\"\n />\n <span class=\"input-group-btn\">\n <button\n class=\"btn btn-dot\"\n title=\"{{ 'Search' | translate }}\"\n type=\"button\"\n (click)=\"resetSearch()\"\n >\n <i [c8yIcon]=\"searchTerm.length === 0 ? 'search' : 'close'\"></i>\n </button>\n </span>\n </div>\n </div>\n </div>\n </div>\n <div class=\"card-block\">\n <div class=\"card-group p-l-24 p-r-24 d-grid grid__col--auto-300 gap-24 card-select m-b-0\">\n @for (cmp of searchResult || components; track cmp) {\n <button\n class=\"btn-clean d-col card m-b-0\"\n [title]=\"cmp.description || cmp.label | translate\"\n type=\"button\"\n data-cy=\"widget-config--widget-list\"\n (click)=\"select(cmp)\"\n >\n <div\n class=\"border-bottom\"\n role=\"presentation\"\n >\n @if (!cmp.previewImage) {\n <div class=\"h1\"><i c8yIcon=\"file-image-o\"></i></div>\n <small translate>Preview not available</small>\n } @else {\n <img\n class=\"widget-thumbnail\"\n alt=\"{{ cmp.label | translate }}\"\n [src]=\"cmp.previewImage\"\n />\n }\n </div>\n <div class=\"card-block\">\n <p class=\"card-title text-truncate text-medium\">\n <c8y-highlight\n text=\"{{ cmp.label | translate }}\"\n [pattern]=\"searchTerm\"\n ></c8y-highlight>\n </p>\n <p\n class=\"small text-default\"\n style=\"white-space: wrap\"\n >\n {{ cmp.description | translate }}\n </p>\n </div>\n </button>\n }\n @if (searchResult && searchResult.length === 0) {\n <c8y-ui-empty-state\n class=\"p-24 grid__col--fullspan\"\n [icon]=\"'search'\"\n [title]=\"'No widgets found.' | translate\"\n [subtitle]=\"'Rephrase your search term.' | translate\"\n >\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Reset search' | translate }}\"\n type=\"button\"\n (click)=\"resetSearch()\"\n >\n {{ 'Reset search' | translate }}\n </button>\n </c8y-ui-empty-state>\n }\n </div>\n </div>\n </div>\n <div class=\"card-footer text-center separator flex-no-shrink\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n data-cy=\"widget-config--cancel-widget\"\n (click)=\"close()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n </div>\n}\n\n<!-- widget configuration -->\n@if (!!(widgetConfigService.selected$ | async)) {\n <div class=\"card-header d-block separator-bottom flex-no-shrink\">\n <div\n class=\"h3 p-t-16\"\n title=\"{{ selected?.label | translate }}\"\n >\n <span>{{ selected?.label | translate }}</span>\n <button\n class=\"btn btn-default btn-sm m-l-8\"\n [title]=\"'Change widget' | translate\"\n (click)=\"backToWidgetSelection(); (false)\"\n >\n <i c8yIcon=\"replace\"></i>\n {{ 'Change widget' | translate }}\n </button>\n </div>\n @if (selected) {\n <div class=\"p-t-8\">\n <p>\n {{ selected.description | translate }}\n </p>\n </div>\n }\n </div>\n\n <c8y-resizable-grid\n class=\"min-height-0 flex-grow\"\n [collapsible]=\"false\"\n [trackId]=\"'c8y-widget-resizable-grid-size-' + (widgetConfigService.instanceId$ | async)\"\n [leftColumnWidth]=\"\n (widgetConfigService.currentConfig$ | async)?.settings?.configurationViewGridSize ||\n WIDGET_CONFIGURATION_GRID_SIZE.HALF\n \"\n >\n <div\n class=\"bg-level-1 inner-scroll\"\n left-pane\n >\n <div class=\"p-16 flex-no-shrink separator-bottom bg-level-1\">\n <c8y-form-group>\n <label\n for=\"widgetTitle\"\n translate\n >\n Widget title\n </label>\n <input\n class=\"form-control\"\n id=\"widgetTitle\"\n placeholder=\"{{ 'e.g.' | translate }} {{ componentLabel | translate }}\"\n name=\"widgetTitle\"\n type=\"text\"\n required\n [(ngModel)]=\"widgetTitle\"\n (ngModelChange)=\"onWidgetTitleChange($event)\"\n />\n </c8y-form-group>\n </div>\n\n @if (!(widgetConfigService.hasConfig$ | async)) {\n <c8y-ui-empty-state\n class=\"p-24\"\n [icon]=\"'settings'\"\n [title]=\"'No configuration needed.' | translate\"\n [subtitle]=\"'This widget does not need any specific configuration.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n }\n <div>\n <form\n name=\"form\"\n #configForm=\"ngForm\"\n >\n @if (widgetConfigService.hasConfig$ | async) {\n @if (widgetConfigService.providers$ | async; as providers) {\n <ng-container\n *c8yComponentOutlet=\"widgetConfigRoot; providers: providers\"\n ></ng-container>\n }\n }\n </form>\n </div>\n </div>\n\n <div\n class=\"inner-scroll p-32 p-t-0\"\n right-pane\n >\n <c8y-widget-preview [previewClasses]=\"getStyle(true)\"></c8y-widget-preview>\n\n <c8y-appearance-settings\n [(themeClass)]=\"styling.contentClass\"\n [(headerClass)]=\"styling.headerClass\"\n [possibleStylingTheme]=\"possibleStyling.WIDGET_CONTENT_CLASSES\"\n [possibleStylingHeader]=\"possibleStyling.WIDGET_HEADER_CLASSES\"\n [defaultThemeClass]=\"defaultStyling.contentClass\"\n [defaultHeaderClass]=\"defaultStyling.headerClass\"\n [columns]=\"2\"\n ></c8y-appearance-settings>\n </div>\n </c8y-resizable-grid>\n\n <div class=\"card-footer separator text-center\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n data-cy=\"widget-config--cancel-widget\"\n (click)=\"close()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Save' | translate }}\"\n type=\"submit\"\n data-cy=\"widget-config--save-widget\"\n (click)=\"save()\"\n [disabled]=\"(contextDashboardService.formDisabled$ | async) || isSaveDisabled()\"\n c8yProductExperience\n [actionName]=\"current ? 'editWidget' : 'createWidget'\"\n [actionData]=\"{ widgetName: selected && selected.id }\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n}\n" }]
2673
2677
  }], ctorParameters: () => [{ type: WidgetService }, { type: i2.BottomDrawerRef }, { type: ContextDashboardService }, { type: WidgetConfigService }], propDecorators: { configForm: [{
2674
2678
  type: ViewChild,
2675
2679
  args: ['configForm', { static: false }]
2680
+ }], onEscapePress: [{
2681
+ type: HostListener,
2682
+ args: ['document:keydown.escape', ['$event']]
2676
2683
  }] } });
2677
2684
 
2678
2685
  /**