@c8y/ngx-components 1024.8.3 → 1024.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/fesm2022/c8y-ngx-components-ai-agents-scada.mjs +5 -12
  2. package/fesm2022/c8y-ngx-components-ai-agents-scada.mjs.map +1 -1
  3. package/fesm2022/c8y-ngx-components-application-select.mjs +86 -0
  4. package/fesm2022/c8y-ngx-components-application-select.mjs.map +1 -0
  5. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +55 -7
  6. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  7. package/fesm2022/c8y-ngx-components-dashboard-manager-devicemanagement.mjs +2 -1
  8. package/fesm2022/c8y-ngx-components-dashboard-manager-devicemanagement.mjs.map +1 -1
  9. package/fesm2022/c8y-ngx-components-dashboard-manager.mjs +281 -37
  10. package/fesm2022/c8y-ngx-components-dashboard-manager.mjs.map +1 -1
  11. package/fesm2022/c8y-ngx-components-platform-configuration.mjs +2 -2
  12. package/fesm2022/c8y-ngx-components-platform-configuration.mjs.map +1 -1
  13. package/fesm2022/c8y-ngx-components-reports.mjs +3 -5
  14. package/fesm2022/c8y-ngx-components-reports.mjs.map +1 -1
  15. package/fesm2022/c8y-ngx-components-widgets-implementations-scada.mjs +16 -2
  16. package/fesm2022/c8y-ngx-components-widgets-implementations-scada.mjs.map +1 -1
  17. package/locales/de.po +36 -12
  18. package/locales/es.po +36 -12
  19. package/locales/fr.po +36 -12
  20. package/locales/ja_JP.po +34 -12
  21. package/locales/ko.po +36 -12
  22. package/locales/locales.pot +61 -7
  23. package/locales/nl.po +36 -12
  24. package/locales/pl.po +36 -12
  25. package/locales/pt_BR.po +36 -12
  26. package/locales/zh_CN.po +36 -12
  27. package/locales/zh_TW.po +36 -12
  28. package/package.json +1 -1
  29. package/types/c8y-ngx-components-ai-agents-scada.d.ts +3 -7
  30. package/types/c8y-ngx-components-ai-agents-scada.d.ts.map +1 -1
  31. package/types/c8y-ngx-components-application-select.d.ts +31 -0
  32. package/types/c8y-ngx-components-application-select.d.ts.map +1 -0
  33. package/types/c8y-ngx-components-context-dashboard.d.ts +30 -6
  34. package/types/c8y-ngx-components-context-dashboard.d.ts.map +1 -1
  35. package/types/c8y-ngx-components-dashboard-manager.d.ts +76 -9
  36. package/types/c8y-ngx-components-dashboard-manager.d.ts.map +1 -1
  37. package/types/c8y-ngx-components-platform-configuration.d.ts +2 -2
  38. package/types/c8y-ngx-components-reports.d.ts.map +1 -1
  39. package/types/c8y-ngx-components-widgets-implementations-scada.d.ts +4 -1
  40. package/types/c8y-ngx-components-widgets-implementations-scada.d.ts.map +1 -1
@@ -11,7 +11,6 @@ import { ComputedPropertiesService } from '@c8y/ngx-components/asset-properties'
11
11
  import { FieldbusService } from '@c8y/ngx-components/computed-asset-properties';
12
12
  import { WidgetConfigMigrationService, GLOBAL_CONTEXT_DISPLAY_MODE, PRESET_NAME, GlobalContextConnectorComponent, LocalControlsComponent } from '@c8y/ngx-components/global-context';
13
13
  import { merge, camelCase } from 'lodash-es';
14
- import { SVG_EXTRACT_TAG_NAME, MAPPING_EXTRACT_TAG_NAME, SCADA_SVG_AGENT_DEFINITION, SCADA_OUTPUT_TAG_NAME } from '@c8y/ngx-components/ai/agents/scada';
15
14
  import * as i1 from '@angular/forms';
16
15
  import { FormBuilder, FormsModule, ReactiveFormsModule, Validators } from '@angular/forms';
17
16
  import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
@@ -20,11 +19,18 @@ import { AIService } from '@c8y/ngx-components/ai';
20
19
  import { AgentChatComponent } from '@c8y/ngx-components/ai/agent-chat';
21
20
  import { DomSanitizer } from '@angular/platform-browser';
22
21
  import { TooltipDirective } from 'ngx-bootstrap/tooltip';
22
+ import { SCADA_SVG_AGENT } from '@c8y/ngx-components/ai/agents/scada';
23
23
  import { BsModalService } from 'ngx-bootstrap/modal';
24
24
  import { HtmlFrameComponent, WidgetCodeEditorComponent, HtmlWidgetConfigService } from '@c8y/ngx-components/widgets/implementations/html-widget';
25
25
  import { AsyncPipe } from '@angular/common';
26
26
 
27
27
  const SCADA_WIDGET_FEATURE_FLAG_NAME = 'ui.scada-widget.v2';
28
+ // Tag names used to delimit the SCADA AI agent's output. Kept in sync with the literal
29
+ // copies in ai/agents/scada/scada-svg.agent.c8y.ts, which cannot import them (see that
30
+ // file's header comment on supported import kinds for webpack-loader-processed agent files).
31
+ const SCADA_OUTPUT_TAG_NAME = 'c8y-scada-output';
32
+ const SVG_EXTRACT_TAG_NAME = 'c8y-svg-extract';
33
+ const MAPPING_EXTRACT_TAG_NAME = 'c8y-mapping-extract';
28
34
  const defaultDisplayOption = 'full-width';
29
35
  const defaultAlignment = 'center';
30
36
  const INITIAL_SVG_CODE = `<?xml version="1.0" encoding="utf-8"?>
@@ -1016,6 +1022,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
1016
1022
  args: [{ selector: 'c8y-scada-ai-chat-tool-details', host: { style: 'display: block' }, imports: [TooltipDirective, C8yTranslatePipe, IconDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (svgContent()) {\n <div\n class=\"m-b-8\"\n style=\"max-height: 320px; overflow: auto\"\n [innerHTML]=\"previewSvg()\"\n ></div>\n}\n@if (mappingRows(); as rows) {\n <div\n class=\"m-b-8\"\n style=\"max-height: 160px; overflow: auto\"\n >\n <table class=\"table table-condensed m-b-0\">\n <thead>\n <tr>\n <th>{{ 'Placeholder' | translate }}</th>\n <th>{{ 'Asset' | translate }}</th>\n <th>{{ 'Property' | translate }}</th>\n </tr>\n </thead>\n <tbody>\n @for (row of rows; track row.placeholder) {\n <tr>\n <td>\n <code>{{ row.placeholder }}</code>\n </td>\n <td>{{ row.asset }}</td>\n <td>{{ row.property }}</td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n} @else if (mappingContent()) {\n <pre\n class=\"m-b-8\"\n style=\"max-height: 160px\"\n >{{ mappingContent() }}</pre\n >\n}\n@if (!isExecuting()) {\n <div class=\"d-flex j-c-end\">\n <button\n class=\"btn btn-default btn-sm\"\n [attr.aria-label]=\"'Apply' | translate\"\n [tooltip]=\"'Apply' | translate\"\n container=\"body\"\n (click)=\"apply()\"\n >\n <i c8yIcon=\"check\"></i>\n </button>\n </div>\n}\n" }]
1017
1023
  }], propDecorators: { tool: [{ type: i0.Input, args: [{ isSignal: true, alias: "tool", required: true }] }] } });
1018
1024
 
1025
+ // Treat as "production" when run from Jest
1026
+ const mode = (typeof __MODE__ !== 'undefined' ? __MODE__ : 'production');
1027
+ const SCADA_SVG_AGENT_DEFINITION = {
1028
+ snapshot: mode === 'development',
1029
+ label: gettext('SCADA SVG agent'),
1030
+ definition: SCADA_SVG_AGENT
1031
+ };
1032
+
1019
1033
  class ScadaWidgetSvgSelectorComponent {
1020
1034
  constructor() {
1021
1035
  this.widgetConfigService = inject(WidgetConfigService);
@@ -1694,5 +1708,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
1694
1708
  * Generated bundle index. Do not edit.
1695
1709
  */
1696
1710
 
1697
- export { INITIAL_SVG_CODE, SCADA_WIDGET_FEATURE_FLAG_NAME, ScadaWidgetAdvancedEditorComponent, ScadaWidgetConfigService, ScadaWidgetService, ScadaWidgetSvgSelectorComponent, ScadaWidgetViewComponent, defaultAlignment, defaultDisplayOption };
1711
+ export { INITIAL_SVG_CODE, MAPPING_EXTRACT_TAG_NAME, SCADA_OUTPUT_TAG_NAME, SCADA_WIDGET_FEATURE_FLAG_NAME, SVG_EXTRACT_TAG_NAME, ScadaWidgetAdvancedEditorComponent, ScadaWidgetConfigService, ScadaWidgetService, ScadaWidgetSvgSelectorComponent, ScadaWidgetViewComponent, defaultAlignment, defaultDisplayOption };
1698
1712
  //# sourceMappingURL=c8y-ngx-components-widgets-implementations-scada.mjs.map