@c8y/ngx-components 1024.20.8 → 1024.21.5
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.
- package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs +527 -12
- package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-agents-scada.mjs +82 -19
- package/fesm2022/c8y-ngx-components-ai-agents-scada.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs +31 -9
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai.mjs +503 -62
- package/fesm2022/c8y-ngx-components-ai.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-alarm-event-selector.mjs +2 -2
- package/fesm2022/c8y-ngx-components-alarm-event-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-alarms.mjs +3 -3
- package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-application-access-list.mjs +1 -1
- package/fesm2022/c8y-ngx-components-application-access-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-auth-configuration.mjs +1 -1
- package/fesm2022/c8y-ngx-components-auth-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-bookmarks.mjs +1 -1
- package/fesm2022/c8y-ngx-components-bookmarks.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs +5 -5
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs.map +1 -1
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-c8y-ngx-components-computed-asset-properties-1WsTSnO_.mjs → c8y-ngx-components-computed-asset-properties-c8y-ngx-components-computed-asset-properties-B0EYpohd.mjs} +31 -17
- package/fesm2022/c8y-ngx-components-computed-asset-properties-c8y-ngx-components-computed-asset-properties-B0EYpohd.mjs.map +1 -0
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-fieldbus-item-status-config.component-C3KZGqlc.mjs → c8y-ngx-components-computed-asset-properties-fieldbus-item-status-config.component-BqbzREl7.mjs} +2 -2
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-fieldbus-item-status-config.component-C3KZGqlc.mjs.map → c8y-ngx-components-computed-asset-properties-fieldbus-item-status-config.component-BqbzREl7.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-computed-asset-properties-last-measurement-config.component-d3JeKEr4.mjs +108 -0
- package/fesm2022/c8y-ngx-components-computed-asset-properties-last-measurement-config.component-d3JeKEr4.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-computed-asset-properties.mjs +1 -1
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-version-history.component-Jyjkv4JT.mjs → c8y-ngx-components-context-dashboard-dashboard-version-history.component-CP1afwVe.mjs} +2 -2
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-version-history.component-Jyjkv4JT.mjs.map → c8y-ngx-components-context-dashboard-dashboard-version-history.component-CP1afwVe.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs +3 -3
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2022/{c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-UEUYsXBv.mjs → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-CRvgIgri.mjs} +2 -2
- package/fesm2022/{c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-UEUYsXBv.mjs.map → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-CRvgIgri.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-dashboard-details-advanced-tab.mjs +2 -2
- package/fesm2022/c8y-ngx-components-dashboard-manager.mjs +1 -1
- package/fesm2022/c8y-ngx-components-dashboard-manager.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +3 -3
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs +2 -2
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-profile.mjs +2 -2
- package/fesm2022/c8y-ngx-components-device-profile.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-diagnostics.mjs +1 -1
- package/fesm2022/c8y-ngx-components-diagnostics.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +101 -45
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs +2 -2
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem.mjs +4 -4
- package/fesm2022/c8y-ngx-components-ecosystem.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-events-events-timeline.mjs +1 -1
- package/fesm2022/c8y-ngx-components-events-events-timeline.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-events.mjs +2 -2
- package/fesm2022/c8y-ngx-components-events.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector.mjs +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-list-item.mjs +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-list-item.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-list.mjs +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-timeline.mjs +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-timeline.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-configuration.mjs +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-device-profile.mjs +2 -2
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-device-profile.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-firmware.mjs +2 -2
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-firmware.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs +2 -2
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-protocol-lpwan.mjs +5 -5
- package/fesm2022/c8y-ngx-components-protocol-lpwan.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-protocol-opcua.mjs +1 -1
- package/fesm2022/c8y-ngx-components-protocol-opcua.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-register-device.mjs +3 -3
- package/fesm2022/c8y-ngx-components-register-device.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-replace-device-replace-device-wizard.mjs +1 -1
- package/fesm2022/c8y-ngx-components-replace-device-replace-device-wizard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-report-dashboard.mjs +1 -1
- package/fesm2022/c8y-ngx-components-report-dashboard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-configuration.mjs +1 -1
- package/fesm2022/c8y-ngx-components-repository-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-firmware.mjs +4 -4
- package/fesm2022/c8y-ngx-components-repository-firmware.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-shared.mjs +2 -2
- package/fesm2022/c8y-ngx-components-repository-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-software.mjs +3 -3
- package/fesm2022/c8y-ngx-components-repository-software.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-static-assets-modal.mjs +1 -1
- package/fesm2022/c8y-ngx-components-static-assets-modal.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-tracking.mjs +1 -1
- package/fesm2022/c8y-ngx-components-tracking.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs +1 -1
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-list.mjs +2 -2
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-image.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-image.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-quick-links.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-quick-links.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-scada.mjs +94 -10
- package/fesm2022/c8y-ngx-components-widgets-implementations-scada.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +306 -22
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/locales/de.po +72 -3
- package/locales/es.po +72 -3
- package/locales/fr.po +72 -3
- package/locales/ja_JP.po +72 -3
- package/locales/ko.po +72 -3
- package/locales/locales.pot +81 -3
- package/locales/nl.po +72 -3
- package/locales/pl.po +73 -4
- package/locales/pt_BR.po +72 -3
- package/locales/zh_CN.po +72 -3
- package/locales/zh_TW.po +72 -3
- package/package.json +1 -1
- package/types/c8y-ngx-components-ai-agent-chat.d.ts +201 -3
- package/types/c8y-ngx-components-ai-agent-chat.d.ts.map +1 -1
- package/types/c8y-ngx-components-ai-agents-scada.d.ts.map +1 -1
- package/types/c8y-ngx-components-ai-ai-chat.d.ts +14 -4
- package/types/c8y-ngx-components-ai-ai-chat.d.ts.map +1 -1
- package/types/c8y-ngx-components-ai.d.ts +157 -2
- package/types/c8y-ngx-components-ai.d.ts.map +1 -1
- package/types/c8y-ngx-components-echart.d.ts +6 -0
- package/types/c8y-ngx-components-echart.d.ts.map +1 -1
- package/types/c8y-ngx-components-widgets-implementations-scada.d.ts +28 -2
- package/types/c8y-ngx-components-widgets-implementations-scada.d.ts.map +1 -1
- package/types/c8y-ngx-components.d.ts +170 -9
- package/types/c8y-ngx-components.d.ts.map +1 -1
- package/fesm2022/c8y-ngx-components-computed-asset-properties-c8y-ngx-components-computed-asset-properties-1WsTSnO_.mjs.map +0 -1
- package/fesm2022/c8y-ngx-components-computed-asset-properties-last-measurement-config.component-DOmwNU6m.mjs +0 -86
- package/fesm2022/c8y-ngx-components-computed-asset-properties-last-measurement-config.component-DOmwNU6m.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-ai-agent-chat.d.ts","sources":["../../ai/agent-chat/agent-chat.component.ts","../../ai/agent-chat/agent-chat-tool-approval-mode.component.ts","../../ai/agent-chat/widget-ai-chat-section.component.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-ai-agent-chat.d.ts","sources":["../../ai/agent-chat/conversation.model.ts","../../ai/agent-chat/agent-chat.component.ts","../../ai/agent-chat/agent-chat-tool-approval-mode.component.ts","../../ai/agent-chat/conversation-picker.component.ts","../../ai/agent-chat/conversation.service.ts","../../ai/agent-chat/widget-ai-chat-section.component.ts"],"mappings":";;;;;;;;UAEiB,mBAAm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oDAvFzB,4BAA4B;sDAA5B,4BAA4B;AA0GxC;;;;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-ai-agents-scada.d.ts","sources":["../../ai/agents/scada/scada-svg.agent.c8y.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-ai-agents-scada.d.ts","sources":["../../ai/agents/scada/scada-svg.agent.c8y.ts"],"mappings":";;AAy3BA,cAAa,eAAe,EA4DvB,eAAe;;;;","names":[]}
|
|
@@ -162,9 +162,17 @@ declare class AiChatMessageActionComponent {
|
|
|
162
162
|
*/
|
|
163
163
|
disabled: boolean;
|
|
164
164
|
/**
|
|
165
|
-
* Tooltip text displayed when hovering over the action button.
|
|
165
|
+
* Tooltip text displayed when hovering over the action button, also used as its accessible name.
|
|
166
|
+
* Not named `tooltip`, as that attribute would also attach ngx-bootstrap's tooltip directive to
|
|
167
|
+
* this component wherever `TooltipModule` is imported, showing the tooltip twice.
|
|
166
168
|
*/
|
|
167
|
-
|
|
169
|
+
tooltipText: string;
|
|
170
|
+
/**
|
|
171
|
+
* @deprecated Use `tooltipText` instead. Binding `tooltip` on this component also attaches
|
|
172
|
+
* ngx-bootstrap's tooltip directive wherever `TooltipModule` is imported, showing the tooltip twice.
|
|
173
|
+
*/
|
|
174
|
+
set tooltip(value: string);
|
|
175
|
+
get tooltip(): string;
|
|
168
176
|
/**
|
|
169
177
|
* Icon to display in the action button.
|
|
170
178
|
*/
|
|
@@ -174,7 +182,7 @@ declare class AiChatMessageActionComponent {
|
|
|
174
182
|
*/
|
|
175
183
|
actionClicked: EventEmitter<void>;
|
|
176
184
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AiChatMessageActionComponent, never>;
|
|
177
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AiChatMessageActionComponent, "c8y-ai-chat-message-action", never, { "custom": { "alias": "custom"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; }, { "actionClicked": "actionClicked"; }, never, ["*"], true, never>;
|
|
185
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AiChatMessageActionComponent, "c8y-ai-chat-message-action", never, { "custom": { "alias": "custom"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tooltipText": { "alias": "tooltipText"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; }, { "actionClicked": "actionClicked"; }, never, ["*"], true, never>;
|
|
178
186
|
}
|
|
179
187
|
|
|
180
188
|
/**
|
|
@@ -186,6 +194,8 @@ declare class AiChatMessageActionComponent {
|
|
|
186
194
|
declare class AiChatMessageComponent {
|
|
187
195
|
readonly role: _angular_core.InputSignal<"user" | "assistant" | "system">;
|
|
188
196
|
readonly message: _angular_core.InputSignal<AIMessage>;
|
|
197
|
+
/** Name of the agent to show above the message; nothing is shown when undefined. */
|
|
198
|
+
readonly agentLabel: _angular_core.InputSignal<string>;
|
|
189
199
|
private readonly translateService;
|
|
190
200
|
private readonly roleResolved;
|
|
191
201
|
/**
|
|
@@ -205,7 +215,7 @@ declare class AiChatMessageComponent {
|
|
|
205
215
|
*/
|
|
206
216
|
readonly messageContentAriaLabel: _angular_core.Signal<any>;
|
|
207
217
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AiChatMessageComponent, never>;
|
|
208
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AiChatMessageComponent, "c8y-ai-chat-message", never, { "role": { "alias": "role"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; }, {}, never, [":not(c8y-ai-chat-message-action)", "c8y-ai-chat-message-action"], true, never>;
|
|
218
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AiChatMessageComponent, "c8y-ai-chat-message", never, { "role": { "alias": "role"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "agentLabel": { "alias": "agentLabel"; "required": false; "isSignal": true; }; }, {}, never, [":not(c8y-ai-chat-message-action)", "c8y-ai-chat-message-action"], true, never>;
|
|
209
219
|
}
|
|
210
220
|
|
|
211
221
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-ai-ai-chat.d.ts","sources":["../../ai/ai-chat/ai-chat-action.component.ts","../../ai/ai-chat/ai-chat-assistant-message.component.ts","../../ai/ai-chat/ai-chat-assistant-part.component.ts","../../ai/ai-chat/ai-chat-message-action.component.ts","../../ai/ai-chat/ai-chat-message.component.ts","../../ai/ai-chat/ai-chat-speech-to-text.component.ts","../../ai/ai-chat/ai-chat-suggestion.component.ts","../../ai/ai-chat/speech-recognition.service.ts","../../ai/ai-chat/ai-chat-tool-call.component.ts","../../ai/ai-chat/ai-chat.component.ts"],"mappings":";;;;;;;AAEA;;;;;;;;;;;;;AAaG;AACH,cAMa,qBAAqB;AAChC;;;AAGG;wBACe,aAAA,CAAA,WAAA;;uBAGD,aAAA,CAAA,MAAA,CAAA,WAAA;oDARN,qBAAqB;sDAArB,qBAAqB;AASjC;;ACTD;;;AAGG;UACc,uBAAuB;aAC7B,kBAAkB;YACnB,6BAA6B;;;;;AAQrC;;;AAGG;AACH,oCAAgC,YAAY,YAAY,oBAAoB;AAE5E;;;;;AAKG;qCAC8B,YAAY;AAC9C;AAED;;;AAGG;AACH,cAaa,+BAA+B;AAC1C;;;AAGG;sCAC6B,aAAA,CAAA,WAAA,CAAA,uBAAA;AAEhC;;AAEG;mCAC0B,aAAA,CAAA,WAAA;AAE7B;;;AAGG;AACH,yCAAmC,aAAA,CAAA,cAAA;AAEnC;;AAEG;AACH,qDAA+C,aAAA,CAAA,cAAA,CAAA,GAAA;AAE/C;mDAE6C,aAAA,CAAA,MAAA;AAyG5B,uBAAA,aAAa;AACX,yBAAA,aAAa;AAxG9B;;AAYF;;;AAGG;AACH;AAIA;;;;AAIG;AACH,uBAAmB,YAAY;AA8B/B;AAYA;;;;;AAKG;AACH,oCAAgC,uBAAuB;gCAQ3B,aAAa;wDAKlC,uBAAuB,GAC3B,6BAA6B;AAKhC;;;;;;;;;AASG;AACH,yDAAqD,uBAAuB;uBAC3D,aAAa;yBACX,aAAa;AAC/B;AAyDD;;;;;;AAMG;AACH;oDApMW,+BAA+B;sDAA/B,+BAA+B;AA8N3C;;ACpRD;AACA,cAiBa,4BAA4B;mBAC1B,aAAA,CAAA,WAAA,CAAA,aAAA;;wCAGqB,aAAA,CAAA,WAAA;AAElC;;;AAGG;sCAC6B,aAAA,CAAA,WAAA,CAAA,uBAAA;;AAGhC,iCAA2B,aAAA,CAAA,cAAA;;oDAbhB,4BAA4B;sDAA5B,4BAA4B;AAkBxC;;AC7CD;;;AAGG;AACH,cAOa,4BAA4B;AACvC;;AAEG;AAEH;AAEA;;AAEG;AAEH;AAEA
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-ai-ai-chat.d.ts","sources":["../../ai/ai-chat/ai-chat-action.component.ts","../../ai/ai-chat/ai-chat-assistant-message.component.ts","../../ai/ai-chat/ai-chat-assistant-part.component.ts","../../ai/ai-chat/ai-chat-message-action.component.ts","../../ai/ai-chat/ai-chat-message.component.ts","../../ai/ai-chat/ai-chat-speech-to-text.component.ts","../../ai/ai-chat/ai-chat-suggestion.component.ts","../../ai/ai-chat/speech-recognition.service.ts","../../ai/ai-chat/ai-chat-tool-call.component.ts","../../ai/ai-chat/ai-chat.component.ts"],"mappings":";;;;;;;AAEA;;;;;;;;;;;;;AAaG;AACH,cAMa,qBAAqB;AAChC;;;AAGG;wBACe,aAAA,CAAA,WAAA;;uBAGD,aAAA,CAAA,MAAA,CAAA,WAAA;oDARN,qBAAqB;sDAArB,qBAAqB;AASjC;;ACTD;;;AAGG;UACc,uBAAuB;aAC7B,kBAAkB;YACnB,6BAA6B;;;;;AAQrC;;;AAGG;AACH,oCAAgC,YAAY,YAAY,oBAAoB;AAE5E;;;;;AAKG;qCAC8B,YAAY;AAC9C;AAED;;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K;AAWzB;;;AAGG;AACH;AAIA;;;AAGG;AACH;oDA7LW,eAAe;sDAAf,eAAe;AAgM3B;;;;","names":[]}
|
|
@@ -28,6 +28,11 @@ interface AIAssistantMessage {
|
|
|
28
28
|
role: 'assistant';
|
|
29
29
|
content: AIMessagePart[];
|
|
30
30
|
timestamp?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Name of the agent that produced this message. The agent can change within one conversation,
|
|
33
|
+
* so it is recorded per message; it may refer to an agent that no longer exists.
|
|
34
|
+
*/
|
|
35
|
+
agentName?: string;
|
|
31
36
|
finishReason?: string;
|
|
32
37
|
usage?: {
|
|
33
38
|
inputTokens: number | undefined;
|
|
@@ -262,6 +267,15 @@ interface AgentChatConfig extends ChatConfig {
|
|
|
262
267
|
* Per-message tool approval prompts are unaffected. Default: true.
|
|
263
268
|
*/
|
|
264
269
|
showGlobalToolApprovalToggle?: boolean;
|
|
270
|
+
/** When enabled, conversation is persisted. */
|
|
271
|
+
conversationPersistence?: 'enabled' | 'disabled';
|
|
272
|
+
/**
|
|
273
|
+
* Label of the feature hosting the chat, e.g. a widget type or instance — decided by the host.
|
|
274
|
+
* When persistence is enabled, the conversation list is filtered by it, new conversations get it,
|
|
275
|
+
* and it is added to a continued conversation that lacks it. Must match
|
|
276
|
+
* `^[a-z0-9][a-z0-9._:-]{0,63}$`. When not set, all of the user's conversations are listed.
|
|
277
|
+
*/
|
|
278
|
+
conversationLabel?: string;
|
|
265
279
|
}
|
|
266
280
|
/** Configuration for how the `<ai-chat-assistant-message>` displays a calls for a specific tool name to the user. */
|
|
267
281
|
type ToolCallConfig = {
|
|
@@ -602,6 +616,147 @@ declare class AIService {
|
|
|
602
616
|
* This may change in future releases.
|
|
603
617
|
*/
|
|
604
618
|
declare function defaultPruneMessagesForAgent(messages: AIMessage[]): AIMessage[];
|
|
619
|
+
/**
|
|
620
|
+
* The default implementation for preparing messages for conversation persistence.
|
|
621
|
+
*
|
|
622
|
+
* Unlike `defaultPruneMessagesForAgent` (which strips tool calls for token efficiency),
|
|
623
|
+
* this preserves tool call history so stored conversations can be fully restored in the UI.
|
|
624
|
+
*
|
|
625
|
+
* Strips only transient streaming states that should never be persisted:
|
|
626
|
+
* reasoning blocks, in-progress tool-input-streaming, and tool-executing parts.
|
|
627
|
+
*
|
|
628
|
+
* Tool outputs longer than 10,000 characters are truncated, as the storage service rejects
|
|
629
|
+
* conversations of about 1 MB and above. `defaultPruneMessagesForAgent` never sends these outputs
|
|
630
|
+
* back to the agent, so the truncation only shows in the UI once the conversation is reopened.
|
|
631
|
+
* The results of tool calls that went through an approval are the exception: the agent does get
|
|
632
|
+
* them back, so they are kept whole for a reopened conversation to send it the same history.
|
|
633
|
+
*
|
|
634
|
+
* Step boundaries are kept because `toConversationMessages`, which converts the result into the
|
|
635
|
+
* format the storage service accepts, needs them to split a multi-step turn into one message per step.
|
|
636
|
+
*
|
|
637
|
+
* Implements `pruneMessagesFunction`.
|
|
638
|
+
*/
|
|
639
|
+
declare function defaultPruneMessagesForPersistence(messages: AIMessage[]): AIMessage[];
|
|
640
|
+
|
|
641
|
+
/** A compact summary of the format required by Vercel for passing tool outputs in
|
|
642
|
+
* ModelMessage, based on LanguageModelV*ToolResultOutput. */
|
|
643
|
+
type ModelMessageToolResultOutput = {
|
|
644
|
+
type: 'text';
|
|
645
|
+
value: string;
|
|
646
|
+
} | {
|
|
647
|
+
type: 'json';
|
|
648
|
+
value: unknown;
|
|
649
|
+
} | {
|
|
650
|
+
type: 'error-text';
|
|
651
|
+
value: string;
|
|
652
|
+
} | {
|
|
653
|
+
type: 'error-json';
|
|
654
|
+
value: any;
|
|
655
|
+
} | {
|
|
656
|
+
type: 'content';
|
|
657
|
+
value: any[];
|
|
658
|
+
}
|
|
659
|
+
/** A tool call the user refused to approve, so it never ran and has no value. */
|
|
660
|
+
| {
|
|
661
|
+
type: 'execution-denied';
|
|
662
|
+
reason?: string;
|
|
663
|
+
} | {
|
|
664
|
+
type: string;
|
|
665
|
+
};
|
|
666
|
+
type AssistantMessageContent = {
|
|
667
|
+
type: 'text';
|
|
668
|
+
text: string;
|
|
669
|
+
} | {
|
|
670
|
+
type: 'tool-call';
|
|
671
|
+
toolCallId: string;
|
|
672
|
+
toolName: string;
|
|
673
|
+
input: unknown;
|
|
674
|
+
} | {
|
|
675
|
+
type: 'tool-approval-request';
|
|
676
|
+
approvalId: string;
|
|
677
|
+
toolCallId: string;
|
|
678
|
+
};
|
|
679
|
+
type ToolResultContent = {
|
|
680
|
+
type: 'tool-result';
|
|
681
|
+
toolCallId: string;
|
|
682
|
+
toolName: string;
|
|
683
|
+
output: ModelMessageToolResultOutput;
|
|
684
|
+
};
|
|
685
|
+
/** The user's decision on a tool call that required approval, paired with its request by `approvalId`. */
|
|
686
|
+
type ToolApprovalResponseContent = {
|
|
687
|
+
type: 'tool-approval-response';
|
|
688
|
+
approvalId: string;
|
|
689
|
+
approved: boolean;
|
|
690
|
+
reason?: string;
|
|
691
|
+
};
|
|
692
|
+
/**
|
|
693
|
+
* The small subset needed by us from the format accepted by Vercel v6.
|
|
694
|
+
* Note that each message corresponds to one "step" - so having text after tools calls would be an error. */
|
|
695
|
+
type ModelMessage = {
|
|
696
|
+
role: 'user' | 'system';
|
|
697
|
+
content: string;
|
|
698
|
+
} | {
|
|
699
|
+
role: 'assistant';
|
|
700
|
+
content: AssistantMessageContent[];
|
|
701
|
+
} | {
|
|
702
|
+
role: 'tool';
|
|
703
|
+
content: (ToolResultContent | ToolApprovalResponseContent)[];
|
|
704
|
+
};
|
|
705
|
+
|
|
706
|
+
/**
|
|
707
|
+
* A message as stored by the conversation storage API (`/service/ai/conversation`).
|
|
708
|
+
*
|
|
709
|
+
* The service validates every message against the Vercel AI SDK's `ModelMessage` schema, so the
|
|
710
|
+
* UI-only parts of `AIMessage` — `step-start` boundaries above all — cannot be sent as-is. The
|
|
711
|
+
* display metadata below is carried as extra properties, which the schema tolerates.
|
|
712
|
+
*/
|
|
713
|
+
type ConversationMessage = ModelMessage & {
|
|
714
|
+
timestamp?: string;
|
|
715
|
+
usage?: AIAssistantMessage['usage'];
|
|
716
|
+
/** Agent that produced the message. Accepted by the service on assistant messages only. */
|
|
717
|
+
agentName?: string;
|
|
718
|
+
};
|
|
719
|
+
/**
|
|
720
|
+
* Converts chat messages into the format accepted by the conversation storage API.
|
|
721
|
+
*
|
|
722
|
+
* Unlike the history sent to the agent, tool calls are preserved so a stored conversation can be
|
|
723
|
+
* restored with its full transcript by `fromConversationMessages`. Note that:
|
|
724
|
+
* - each step of a multi-step assistant turn becomes its own message, since the wire format has no
|
|
725
|
+
* `step-start` part — `fromConversationMessages` rebuilds the boundaries from the message split;
|
|
726
|
+
* - a tool call that required approval keeps its full exchange: the `tool-approval-request` beside
|
|
727
|
+
* the call, and the user's `tool-approval-response` beside the outcome, which for a refused call
|
|
728
|
+
* is an `execution-denied` result;
|
|
729
|
+
* - the agent that produced an assistant turn is recorded on every assistant message of that turn,
|
|
730
|
+
* so it survives pruning of individual steps;
|
|
731
|
+
* - `object` parts are stored as text, as the wire format has no structured-object equivalent;
|
|
732
|
+
* - `system` messages are dropped, as the service rejects them: a conversation's system prompt
|
|
733
|
+
* comes from the agent's server-side configuration, never from stored history;
|
|
734
|
+
* - reasoning and in-progress tool calls are dropped, as they are not worth persisting.
|
|
735
|
+
*
|
|
736
|
+
* @param messages The chat messages to store, typically already pruned for persistence.
|
|
737
|
+
*/
|
|
738
|
+
declare function toConversationMessages(messages: AIMessage[]): ConversationMessage[];
|
|
739
|
+
/**
|
|
740
|
+
* Restores stored messages into the format the chat renders, inverting `toConversationMessages`.
|
|
741
|
+
*
|
|
742
|
+
* The consecutive assistant and tool messages that one assistant turn was split into are merged
|
|
743
|
+
* back into a single message, with a `step-start` part marking each boundary, and each tool call
|
|
744
|
+
* is reunited with its result and, where it needed one, with the user's approval decision.
|
|
745
|
+
*
|
|
746
|
+
* A restored approved call carries its result on the approval part itself, rather than in the
|
|
747
|
+
* following message where it originally streamed in. The chat renders that identically, and a
|
|
748
|
+
* restored decision is never re-actionable: the approval buttons only appear on the latest message.
|
|
749
|
+
*
|
|
750
|
+
* Note that the wire format marks where a step ended but not where a turn did, so assistant
|
|
751
|
+
* messages that followed one another without the user speaking in between — an approval and the
|
|
752
|
+
* response resumed from it, for example — come back merged into a single turn. Every part and its
|
|
753
|
+
* order is preserved; only the split into separate messages is not. The merged turn carries the
|
|
754
|
+
* sum of their token usage and the timestamp of the last one. Messages recorded as coming from
|
|
755
|
+
* different agents are never merged.
|
|
756
|
+
*
|
|
757
|
+
* @param messages The messages of a stored conversation.
|
|
758
|
+
*/
|
|
759
|
+
declare function fromConversationMessages(messages: ConversationMessage[]): AIMessage[];
|
|
605
760
|
|
|
606
761
|
/**
|
|
607
762
|
* Remembers the user's "always approve" decisions for tool calls that require human approval.
|
|
@@ -669,6 +824,6 @@ declare class AiToolApprovalMemoryService {
|
|
|
669
824
|
*/
|
|
670
825
|
declare function cumulocityApiRequestLabelProvider(tool: ToolCallPart, translateService: TranslateService): string | undefined;
|
|
671
826
|
|
|
672
|
-
export { AIService, AiToolApprovalMemoryService, DataStreamType, cumulocityApiRequestLabelProvider, defaultPruneMessagesForAgent };
|
|
673
|
-
export type { AIAssistantMessage, AIMessage, AIMessagePart, AIStreamResponse, AISystemMessage, AIUserMessage, AgentChatConfig, AgentDefinition, AgentHealthCheckResponse, AssistantMessageDisplayConfig, ChatConfig, ChatHistory, ChatHistoryConfig, ClientAgentDefinition, McpToolApprovalPolicy, McpToolConfig, ObjectAgentResponse, ResponseMetadataPart, Suggestion, ToolApprovalDecision, ToolCallConfig, ToolCallPart, WidgetAiChatSectionComponentConfig, pruneMessagesFunction };
|
|
827
|
+
export { AIService, AiToolApprovalMemoryService, DataStreamType, cumulocityApiRequestLabelProvider, defaultPruneMessagesForAgent, defaultPruneMessagesForPersistence, fromConversationMessages, toConversationMessages };
|
|
828
|
+
export type { AIAssistantMessage, AIMessage, AIMessagePart, AIStreamResponse, AISystemMessage, AIUserMessage, AgentChatConfig, AgentDefinition, AgentHealthCheckResponse, AssistantMessageDisplayConfig, ChatConfig, ChatHistory, ChatHistoryConfig, ClientAgentDefinition, ConversationMessage, McpToolApprovalPolicy, McpToolConfig, ObjectAgentResponse, ResponseMetadataPart, Suggestion, ToolApprovalDecision, ToolCallConfig, ToolCallPart, WidgetAiChatSectionComponentConfig, pruneMessagesFunction };
|
|
674
829
|
//# sourceMappingURL=c8y-ngx-components-ai.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-ai.d.ts","sources":["../../ai/ai.model.ts","../../ai/ai.service.ts","../../ai/ai-tool-approval-memory.service.ts","../../ai/cumulocity-api-request-label.ts"],"mappings":";;;;;;;AAIA;;AAEG;AACG,KAAM,SAAS,GAAG,kBAAkB,GAAG,aAAa,GAAG,eAAe;AAE5E;;AAEG;AACG,KAAM,aAAa;;;;;AAMzB;AACM,KAAM,eAAe;;;;;AAM3B;UACiB,kBAAkB;;aAGxB,aAAa;;;
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-ai.d.ts","sources":["../../ai/ai.model.ts","../../ai/ai.service.ts","../../ai/ai-service-agent-message-converter.ts","../../ai/conversation-message-converter.ts","../../ai/ai-tool-approval-memory.service.ts","../../ai/cumulocity-api-request-label.ts"],"mappings":";;;;;;;AAIA;;AAEG;AACG,KAAM,SAAS,GAAG,kBAAkB,GAAG,aAAa,GAAG,eAAe;AAE5E;;AAEG;AACG,KAAM,aAAa;;;;;AAMzB;AACM,KAAM,eAAe;;;;;AAM3B;UACiB,kBAAkB;;aAGxB,aAAa;;AAItB;;;AAGG;;;AAIH;AACE;AACA;AACA;;AAEH;AAKD;AACM,UAAW,YAAY,gBACZ,MAAM,gBAAgB,MAAM;AAG3C;AAC6G;;;;;;AAW7G;;;AAGG;;AAEH;;;;AAIG;;AAGH;;;;AAIG;AACH;;;AAKA;;;AAGG;AACH;;;;;;;;AAQD;AAED;;AAEG;UACc,oBAAoB;;;AAGnC;;;;;;AAMG;AACH;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;;;;;;;;;AAmBG;AACH,iBAAgB,kCAAkC,WAAW,SAAS,KAAK,SAAS;;ACpyBpF;AAC6D;AACvD,KAAM,4BAA4B;;;;;;;;;;;;;;;AAKH;AACnC;AACE;;;;;;AAGE,KAAM,uBAAuB;;;;;;;;;;;;;AAiB7B,KAAM,iBAAiB;;;;YAKnB,4BAA4B;;AAGtC;AACM,KAAM,2BAA2B;;;;;;AAOvC;;AAE4G;AACtG,KAAM,YAAY;AAElB;;;;aAKS,uBAAuB;;;AAIhC,cAAU,iBAAiB,GAAG,2BAA2B;;;ACxD/D;;;;;;AAMG;AACG,KAAM,mBAAmB,GAAG,YAAY;;AAE5C,YAAQ,kBAAkB;;;;AAK5B;;;;;;;;;;;;;;;;;;AAkBG;AACH,iBAAgB,sBAAsB,WAAW,SAAS,KAAK,mBAAmB;AAgHlF;;;;;;;;;;;;;;;;;;;AAmBG;AACH,iBAAgB,wBAAwB,WAAW,mBAAmB,KAAK,SAAS;;ACxKpF;;;;;;;;;;;;;;;;AAgBG;AACH,cACa,2BAA2B;;AAEtC;;AAGA;;;AAGG;AACH;;;AASA;;;AAGG;AACH;;;;AAUA;;AAKA;;AAKA;AAIA;yCA9CW,2BAA2B;6CAA3B,2BAA2B;AAsDvC;;AC3DD;;;;;;;;;;;;;;;;;AAiBG;AACH,iBAAgB,iCAAiC,OACzC,YAAY,oBACA,gBAAgB;;;;","names":[]}
|
|
@@ -329,6 +329,7 @@ declare class ChartsComponent implements OnChanges, OnInit, OnDestroy {
|
|
|
329
329
|
* the chart renders with (see `EchartsOptionsService.getSingleSeries`).
|
|
330
330
|
*/
|
|
331
331
|
readonly AGGREGATION_INTERVAL_MAP: Record<aggregationType, string>;
|
|
332
|
+
private readonly AGGREGATION_TYPE_MS;
|
|
332
333
|
private configChangedSubject;
|
|
333
334
|
/**
|
|
334
335
|
* Deep copy of the config the last reload ran with; content-identical rebuilds are skipped.
|
|
@@ -456,6 +457,11 @@ declare class ChartsComponent implements OnChanges, OnInit, OnDestroy {
|
|
|
456
457
|
private fetchSeriesForDatapoints$;
|
|
457
458
|
private fetchAggregatedSeriesForSelectedDatapoint$;
|
|
458
459
|
private getAggregationTypeForTimeRange;
|
|
460
|
+
/**
|
|
461
|
+
* Resolves the aggregation query params for the slider's series request and the bucket size (ms)
|
|
462
|
+
*/
|
|
463
|
+
private resolveSliderAggregation;
|
|
464
|
+
private intervalStringToMs;
|
|
459
465
|
private getSliderPositionMode;
|
|
460
466
|
private addTruncatedDataAlert;
|
|
461
467
|
private getTimeRange;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-echart.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/chart-alerts/chart-alerts.component.ts","../../echart/select-aggregated-datapoint/select-aggregated-datapoint.component.ts"],"mappings":";;;;;;;;;;;;AA0BM,KAAM,yBAAyB,GAAG,UAAU;eACrC,iBAAiB;iBACf,wBAAwB;;AAErC,kBAAc,wBAAwB;;uBAEnB,MAAM;;AAGrB,KAAM,2BAA2B;AACrC;AACA;AACA,0BAAsB,yBAAyB;AAC/C,0BAAsB,oBAAoB;AAC1C,iBAAa,yBAAyB;AACtC;WACO,eAAe;AACtB,eAAW,IAAI;AACf,aAAS,IAAI;AACb;AACA;;;sBAGkB,qBAAqB;;;;;;AAMvC;;AAEA;AACA;AACA;AACA;AACA;eACW,YAAY;sBACL,eAAe;AACjC,kBAAc,eAAe;oBACb,aAAa;;;kBAGf,wBAAwB;;;;;AAKtC;;;;AAIG;AACH;;;AAA2C;AAC3C;;;;AAIG;AACH,0BAAsB,mBAAmB;AACzC;;;;AAIG;AACH,sBAAkB,qBAAqB;;AAGnC,KAAM,mBAAmB;;;;;;;;;;AAU7B;;;;AAIA,qBAAiB,GAAG;;;;AAKtB,cAAa,6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;;AAMG;AACH,UAAU,2BAA4B,SAAQ,aAAa;AACzD;;;UAGM,WAAW;AACjB;;;AACD;UAEgB,wBAAwB;UACjC,YAAY;AACnB;UAEgB,yBAAyB;UAClC,aAAa;AACpB;AAEK,KAAM,mBAAmB,GAAG,IAAI,CAAC,2BAA2B;AAC5D,UAAW,oBAAqB,SAAQ,iBAAiB;AAC7D;AACE,mBAAW,iCAAiC,CAAC,uCAAuC;AACrF;AACF;UAEgB,iBAAiB;AAChC;AACA;AACD;AAED,aAAY,kBAAkB;AAC5B;AACA;AACA;AACD;;AC/CD,aAAK,KAAK;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD;AAED,cAAa,SAAS;;;;;;;;;;;AC8EtB,cA6Ba,eAAgB,YAAW,SAAS,EAAE,MAAM,EAAE,SAAS;AAClE,kBAAc,UAAU,CAAC,aAAa;qBACpB,OAAO;AACzB;YACQ,MAAM;YACN,MAAM;sBACI,yBAAyB;YACzB,2BAA2B;YAC3B,+BAA+B;sBACrB,kBAAkB;yBAC3B,eAAA;;;2BAKY,YAAA;kBACnB,IAAI;gBACN,IAAI;mBACD,QAAQ;;AAEhB;AACK,+BAAyB,YAAA,CAAA,IAAA,CAAA,2BAAA;AAGzB,wBAAkB,YAAA,CAAA,yBAAA;AAClB,yBAAmB,YAAA,CAAA,yBAAA;AACnB,2BAAqB,YAAA,CAAA,oBAAA;AACrB,yBAAmB,YAAA;AACnB,mBAAa,YAAA;AACb,4BAAsB,YAAA,CAAA,yBAAA;AAChC;;;AAGG;oBACqB,YAAA;;;AAA+D;AAC7E,qCAA+B,YAAA,CAAA,iBAAA;AACzC;;;;;AAKG;AACO,mCAA6B,YAAA,CAAA,GAAA;WACZ,UAAU;AACrC,+BAAkB,kBAAA;;AAQlB;;;;;AAKG;uCACgC,MAAM,CAAC,eAAe;;
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-echart.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/chart-alerts/chart-alerts.component.ts","../../echart/select-aggregated-datapoint/select-aggregated-datapoint.component.ts"],"mappings":";;;;;;;;;;;;AA0BM,KAAM,yBAAyB,GAAG,UAAU;eACrC,iBAAiB;iBACf,wBAAwB;;AAErC,kBAAc,wBAAwB;;uBAEnB,MAAM;;AAGrB,KAAM,2BAA2B;AACrC;AACA;AACA,0BAAsB,yBAAyB;AAC/C,0BAAsB,oBAAoB;AAC1C,iBAAa,yBAAyB;AACtC;WACO,eAAe;AACtB,eAAW,IAAI;AACf,aAAS,IAAI;AACb;AACA;;;sBAGkB,qBAAqB;;;;;;AAMvC;;AAEA;AACA;AACA;AACA;AACA;eACW,YAAY;sBACL,eAAe;AACjC,kBAAc,eAAe;oBACb,aAAa;;;kBAGf,wBAAwB;;;;;AAKtC;;;;AAIG;AACH;;;AAA2C;AAC3C;;;;AAIG;AACH,0BAAsB,mBAAmB;AACzC;;;;AAIG;AACH,sBAAkB,qBAAqB;;AAGnC,KAAM,mBAAmB;;;;;;;;;;AAU7B;;;;AAIA,qBAAiB,GAAG;;;;AAKtB,cAAa,6BAA6B,EAAE,QAAQ,CAClD,IAAI,CACF,mBAAmB;AAuBjB,KAAM,oBAAoB,GAAG,YAAY;;AAE7C,iBAAa,YAAY;AACzB,eAAW,eAAe;;AAGtB,KAAM,oBAAoB,GAAG,YAAY;;;AAI/C;;AAEG;KACS,oBAAoB,GAAG,oBAAoB,GAAG,oBAAoB;AAExE,KAAM,8BAA8B,GAAG,OAAO,CAClD,IAAI,CAAC,2BAA2B;AAGlC,aAAY,uBAAuB;AACjC;AACA;AACD;AAED,KAAK,kBAAkB,GAAG,OAAO;AAC3B,UAAW,YAAa,SAAQ,yBAAyB;YACrD,kBAAkB;AAC3B;AAED,KAAK,eAAe;;;;AAId,KAAM,YAAY;;YAEd,eAAe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":[]}
|
|
@@ -62,7 +62,7 @@ interface ScadaWidgetConfigLegacy {
|
|
|
62
62
|
[placeholderName: string]: string;
|
|
63
63
|
};
|
|
64
64
|
mapping: {
|
|
65
|
-
[placeholderName: string]: LegacyMapping;
|
|
65
|
+
[placeholderName: string]: LegacyMapping | null;
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
type LegacyMapping = LegacyMappingBase | LegacyMappingComputed | LegacyMappingFieldbus;
|
|
@@ -92,7 +92,7 @@ interface ActiveAlarmsStatus {
|
|
|
92
92
|
minor: number;
|
|
93
93
|
warning: number;
|
|
94
94
|
}
|
|
95
|
-
declare const INITIAL_SVG_CODE = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg width=\"600px\" height=\"1350px\" viewBox=\"0 0 600 1350\" xmlns=\"http://www.w3.org/2000/svg\">\n <style>\n /* Typography */\n .header {\n font-family: var(--c8y-font-family-base);\n font-size: 28px;\n font-weight: bold;\n fill: var(--text-color, var(--c8y-component-color-default, var(--c8y-root-component-color-default)));\n }\n .branded {\n fill: var(--brand-primary,var(--c8y-brand-primary));\n }\n .step-number {\n font-family: var(--c8y-font-family-base);\n font-size: 18px;\n font-weight: bold;\n fill: var(--c8y-component-background-default, var(--c8y-root-component-background-default));\n }\n .step-title {\n font-family: var(--c8y-font-family-base);\n font-size: 16px;\n font-weight: bold;\n fill: var(--text-color, var(--c8y-component-color-default, var(--c8y-root-component-color-default)));\n }\n .description {\n font-family: var(--c8y-font-family-base);\n font-size: 14px;\n }\n .placeholder {\n font-family: var(--c8y-font-family-base);\n font-size: 14px;\n fill: var(--brand-primary,var(--c8y-brand-primary));\n font-weight: bold;\n }\n .code {\n font-family: var(--c8y-font-family-mono-spaced);\n font-size: 12px;\n fill: var(--c8y-code-color);\n }\n .label {\n font-family: var(--c8y-font-family-base);\n font-size: 13px;\n fill: var(--text-color, var(--c8y-component-color-default, var(--c8y-root-component-color-default)));\n }\n \n /* Components */\n .section-bg {\n fill: var(--c8y-pre-background);\n stroke: var(--c8y-pre-border-color);\n stroke-width: 1px;\n rx: 4px;\n }\n .step-circle {\n fill: var(--brand-primary,var(--c8y-brand-primary));\n }\n .code-bg {\n fill: #0000000d;\n stroke: transparent;\n stroke-width: 1px;\n rx: 13px;\n }\n .button{\n cursor: pointer;\n }\n .button-bg {\n fill: var(--brand-primary,var(--c8y-brand-primary));\n rx: var(--c8y-btn-border-radius-base);\n stroke: var(--brand-primary,var(--c8y-brand-primary));\n stroke-width: 1px;\n }\n .button-text {\n font-family: inherit;\n font-size: 14px;\n fill: var(--c8y-component-background-default, var(--c8y-root-component-background-default));\n text-anchor: middle;\n }\n .button:hover .button-bg {\n fill: var(--c8y-component-background-default, var(--c8y-root-component-background-default));\n }\n .button:hover .button-text {\n fill: var(--brand-primary,var(--c8y-brand-primary));\n }\n .divider {\n stroke: var(--c8y-component-border-color, var(--c8y-root-component-border-color));\n stroke-width: 2px;\n }\n \n /* Alarm status indicators */\n .alarm-none {\n fill: var(--c8y-palette-status-success);\n }\n .alarm-warning {\n fill: var(--c8y-palette-status-info);\n }\n .alarm-minor {\n fill: var(--c8y-palette-status-warning-high);\n }\n .alarm-major {\n fill: var(--c8y-palette-status-warning);\n }\n .alarm-critical {\n fill: var(--c8y-palette-status-danger);\n }\n \n /* Conditional text colors */\n .temp-ok {\n fill: var(--c8y-palette-status-success);\n }\n .temp-warning {\n fill:var(--c8y-palette-status-danger);\n }\n </style>\n \n <!-- Background -->\n <rect width=\"600\" height=\"1400\" fill=\"var(--c8y-component-background-default, var(--c8y-root-component-background-default))\" />\n \n <!-- Header -->\n <text x=\"40\" y=\"50\" class=\"header\">SCADA widget example</text>\n \n <text x=\"40\" y=\"90\" class=\"description\">Follow these steps to customize your visualization</text>\n \n <!-- Divider -->\n <line x1=\"40\" y1=\"110\" x2=\"560\" y2=\"110\" class=\"divider\" />\n \n <!-- STEP 1: SVG configuration -->\n <circle cx=\"55\" cy=\"150\" r=\"15\" class=\"step-circle\" />\n <text x=\"55\" y=\"157\" class=\"step-number\" text-anchor=\"middle\">1</text>\n <text x=\"85\" y=\"155\" class=\"step-title\">SVG configuration</text>\n \n <text x=\"85\" y=\"180\" class=\"description\">Use \"SVG configuration\" section to upload a file, paste code, or generate with AI.</text>\n \n <!-- STEP 2: Add Placeholders -->\n <circle cx=\"55\" cy=\"230\" r=\"15\" class=\"step-circle\" />\n <text x=\"55\" y=\"237\" class=\"step-number\" text-anchor=\"middle\">2</text>\n <text x=\"85\" y=\"235\" class=\"step-title\">Add placeholders</text>\n \n <text x=\"85\" y=\"260\" class=\"description\">Click on a text or tspan element in the preview to convert it into a placeholder.</text>\n \n <rect x=\"85\" y=\"280\" width=\"475\" height=\"80\" class=\"section-bg\" />\n <text x=\"100\" y=\"305\" class=\"label\">Example - click text below to make it dynamic:</text>\n <text x=\"100\" y=\"330\" class=\"placeholder\"><tspan>Device name</tspan> (<tspan>Device ID</tspan>)</text>\n \n <!-- STEP 3: Configure Data Binding -->\n <circle cx=\"55\" cy=\"395\" r=\"15\" class=\"step-circle\" />\n <text x=\"55\" y=\"402\" class=\"step-number\" text-anchor=\"middle\">3</text>\n <text x=\"85\" y=\"400\" class=\"step-title\">Configure data binding</text>\n \n <text x=\"85\" y=\"425\" class=\"description\">Assign asset properties to placeholders in the \"Placeholder mappings\" section</text>\n <text x=\"85\" y=\"445\" class=\"description\">to see their values in the preview.</text>\n \n <!-- Example with actual placeholders -->\n <rect x=\"40\" y=\"470\" width=\"520\" height=\"120\" class=\"section-bg\" />\n <text x=\"60\" y=\"495\" class=\"label\">Examples:</text>\n \n <text x=\"60\" y=\"525\" class=\"label\">Device name:</text>\n <text x=\"180\" y=\"525\" class=\"placeholder\">${this.c8yScadaValues?.deviceName || '-'}</text>\n\n <text x=\"60\" y=\"550\" class=\"label\">Temperature:</text>\n <text x=\"180\" y=\"550\" class=\"placeholder\">${this.c8yScadaValues?.temperature || '-'} \u00B0C</text>\n\n <text x=\"60\" y=\"575\" class=\"label\">Status:</text>\n <text x=\"180\" y=\"575\" class=\"placeholder\">${this.c8yScadaValues?.status || '-'}</text>\n\n <!-- STEP 4: Advanced Customization -->\n <circle cx=\"55\" cy=\"630\" r=\"15\" class=\"step-circle\" />\n <text x=\"55\" y=\"637\" class=\"step-number\" text-anchor=\"middle\">4</text>\n <text x=\"85\" y=\"635\" class=\"step-title\">Advanced: Edit component code</text>\n\n <text x=\"85\" y=\"660\" class=\"description\">Open \"Advanced editor\" section to customize the web component directly.</text>\n \n <!-- Advanced Examples -->\n <rect x=\"40\" y=\"690\" width=\"520\" height=\"630\" class=\"section-bg\" />\n <text x=\"60\" y=\"715\" class=\"label\">Advanced examples (see implementation in the editor):</text>\n \n <!-- Example 1a: Interactive Button - Device Details -->\n <text x=\"60\" y=\"745\" class=\"description\">\u2022 Button navigating to device details:</text>\n <g class=\"button\" @click=${() => this.c8yScadaFunctions?.goToDeviceDetails(this.c8yScadaValues?.deviceId)}>\n <rect x=\"70\" y=\"755\" width=\"200\" height=\"35\" class=\"button-bg\" />\n <text x=\"170\" y=\"777\" class=\"button-text\">Go to device details</text>\n </g>\n\n <!-- Example 1b: Interactive Button - Group Details -->\n <text x=\"60\" y=\"820\" class=\"description\">\u2022 Button navigating to group details:</text>\n <g class=\"button\" @click=${() => this.c8yScadaFunctions?.goToGroupDetails(this.c8yScadaValues?.groupId)}>\n <rect x=\"70\" y=\"830\" width=\"200\" height=\"35\" class=\"button-bg\" />\n <text x=\"170\" y=\"852\" class=\"button-text\">Go to group details</text>\n </g>\n\n <!-- Example 2: Conditional Styling -->\n <text x=\"60\" y=\"895\" class=\"description\">\u2022 Conditional styling based on temperature range:</text>\n <text x=\"70\" y=\"920\" \n class=\"${(this.c8yScadaValues?.temperature >= 20 && this.c8yScadaValues?.temperature <= 30) ? 'temp-ok' : 'temp-warning'}\"\n font-size=\"14px\"\n font-weight=\"bold\">\n Green if temperature is between 20 and 30 \u00B0C, otherwise red.\n </text>\n \n <!-- Example 3: Dynamic Width Progress Bar -->\n <text x=\"60\" y=\"975\" class=\"description\">\u2022 Dynamic calculations (progress bar):</text>\n <rect x=\"70\" y=\"985\" width=\"400\" height=\"25\" class=\"code-bg\" />\n <rect x=\"70\" y=\"985\" \n width=\"${Math.min((this.c8yScadaValues?.progress || 0) * 4, 400)}\" \n height=\"25\" \n fill=\"var(--brand-primary,var(--c8y-brand-primary))\" \n rx=\"13\" />\n <text x=\"480\" y=\"1000\" class=\"label\">${this.c8yScadaValues?.progress || 0}%</text>\n \n <!-- Example 4: Alarm Status Circle -->\n <text x=\"60\" y=\"1040\" class=\"description\">\u2022 Alarm status indicator using getActiveAlarmsStatusClass():</text>\n <circle cx=\"80\" cy=\"1065\" r=\"12\" \n class=\"${this.c8yScadaFunctions?.getActiveAlarmsStatusClass ? 'alarm-' + this.c8yScadaFunctions.getActiveAlarmsStatusClass(this.c8yScadaValues?.alarmsStatus) : 'alarm-none'}\" />\n <text x=\"100\" y=\"1070\" class=\"label\">\n Alarm status:\n ${this.c8yScadaValues?.alarmsStatus?.critical > 0 ? 'CRITICAL' : this.c8yScadaValues?.alarmsStatus?.major > 0 ? 'MAJOR' : this.c8yScadaValues?.alarmsStatus?.minor > 0 ? 'MINOR' : this.c8yScadaValues?.alarmsStatus?.warning > 0 ? 'WARNING' : 'OK'}\n </text>\n \n <!-- Legend for alarm colors -->\n <text x=\"70\" y=\"1110\" class=\"label\">Alarm color legend:</text>\n <circle cx=\"80\" cy=\"1130\" r=\"8\" class=\"alarm-none\" />\n <text x=\"95\" y=\"1135\" class=\"description\">OK</text>\n \n <circle cx=\"150\" cy=\"1130\" r=\"8\" class=\"alarm-warning\" />\n <text x=\"165\" y=\"1135\" class=\"description\">Warning</text>\n \n <circle cx=\"240\" cy=\"1130\" r=\"8\" class=\"alarm-minor\" />\n <text x=\"255\" y=\"1135\" class=\"description\">Minor</text>\n \n <circle cx=\"320\" cy=\"1130\" r=\"8\" class=\"alarm-major\" />\n <text x=\"335\" y=\"1135\" class=\"description\">Major</text>\n \n <circle cx=\"400\" cy=\"1130\" r=\"8\" class=\"alarm-critical\" />\n <text x=\"415\" y=\"1135\" class=\"description\">Critical</text>\n \n <!-- Additional examples info -->\n <rect x=\"70\" y=\"1170\" width=\"460\" height=\"130\" fill=\"var(--c8y-palette-status-info-light)\" stroke=\"var(--c8y-palette-status-info)\" stroke-width=\"1\" rx=\"4\" />\n <text x=\"85\" y=\"1195\" class=\"label\" font-weight=\"bold\">\uD83D\uDCA1 Tips for advanced usage:</text>\n <text x=\"85\" y=\"1220\" class=\"description\">\u2022 Use this.c8yScadaValues to access placeholder values</text>\n <text x=\"85\" y=\"1240\" class=\"description\">\u2022 Use this.c8yScadaFunctions for navigation and utilities</text>\n <text x=\"85\" y=\"1260\" class=\"description\">\u2022 Combine template literals \\${ } with conditional logic</text>\n <text x=\"85\" y=\"1280\" class=\"description\">\u2022 Apply CSS classes dynamically for styling</text>\n</svg>\n";
|
|
95
|
+
declare const INITIAL_SVG_CODE = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg width=\"600px\" height=\"1350px\" viewBox=\"0 0 600 1350\" xmlns=\"http://www.w3.org/2000/svg\">\n <style>\n /* Typography */\n .header {\n font-family: var(--c8y-font-family-base);\n font-size: 28px;\n font-weight: bold;\n fill: var(--text-color, var(--c8y-component-color-default, var(--c8y-root-component-color-default)));\n }\n .branded {\n fill: var(--brand-primary,var(--c8y-brand-primary));\n }\n .step-number {\n font-family: var(--c8y-font-family-base);\n font-size: 18px;\n font-weight: bold;\n fill: var(--c8y-component-background-default, var(--c8y-root-component-background-default));\n }\n .step-title {\n font-family: var(--c8y-font-family-base);\n font-size: 16px;\n font-weight: bold;\n fill: var(--text-color, var(--c8y-component-color-default, var(--c8y-root-component-color-default)));\n }\n .description {\n font-family: var(--c8y-font-family-base);\n font-size: 14px;\n }\n .placeholder {\n font-family: var(--c8y-font-family-base);\n font-size: 14px;\n fill: var(--brand-primary,var(--c8y-brand-primary));\n font-weight: bold;\n }\n .code {\n font-family: var(--c8y-font-family-mono-spaced);\n font-size: 12px;\n fill: var(--c8y-code-color);\n }\n .label {\n font-family: var(--c8y-font-family-base);\n font-size: 13px;\n fill: var(--text-color, var(--c8y-component-color-default, var(--c8y-root-component-color-default)));\n }\n \n /* Components */\n .section-bg {\n fill: var(--c8y-pre-background);\n stroke: var(--c8y-pre-border-color);\n stroke-width: 1px;\n rx: 4px;\n }\n .step-circle {\n fill: var(--brand-primary,var(--c8y-brand-primary));\n }\n .code-bg {\n fill: #0000000d;\n stroke: transparent;\n stroke-width: 1px;\n rx: 13px;\n }\n .button{\n cursor: pointer;\n }\n .button-bg {\n fill: var(--brand-primary,var(--c8y-brand-primary));\n rx: var(--c8y-btn-border-radius-base);\n stroke: var(--brand-primary,var(--c8y-brand-primary));\n stroke-width: 1px;\n }\n .button-text {\n font-family: inherit;\n font-size: 14px;\n fill: var(--c8y-component-background-default, var(--c8y-root-component-background-default));\n text-anchor: middle;\n }\n .button:hover .button-bg {\n fill: var(--c8y-component-background-default, var(--c8y-root-component-background-default));\n }\n .button:hover .button-text {\n fill: var(--brand-primary,var(--c8y-brand-primary));\n }\n .divider {\n stroke: var(--c8y-component-border-color, var(--c8y-root-component-border-color));\n stroke-width: 2px;\n }\n \n /* Alarm status indicators */\n .alarm-none {\n fill: var(--c8y-palette-status-success);\n }\n .alarm-warning {\n fill: var(--c8y-palette-status-info);\n }\n .alarm-minor {\n fill: var(--c8y-palette-status-warning-high);\n }\n .alarm-major {\n fill: var(--c8y-palette-status-warning);\n }\n .alarm-critical {\n fill: var(--c8y-palette-status-danger);\n }\n \n /* Conditional text colors */\n .temp-ok {\n fill: var(--c8y-palette-status-success);\n }\n .temp-warning {\n fill:var(--c8y-palette-status-danger);\n }\n </style>\n \n <!-- Background -->\n <rect width=\"600\" height=\"1400\" fill=\"var(--c8y-component-background-default, var(--c8y-root-component-background-default))\" />\n \n <!-- Header -->\n <text x=\"40\" y=\"50\" class=\"header\">SCADA widget example</text>\n \n <text x=\"40\" y=\"90\" class=\"description\">Follow these steps to customize your visualization</text>\n \n <!-- Divider -->\n <line x1=\"40\" y1=\"110\" x2=\"560\" y2=\"110\" class=\"divider\" />\n \n <!-- STEP 1: SVG configuration -->\n <circle cx=\"55\" cy=\"150\" r=\"15\" class=\"step-circle\" />\n <text x=\"55\" y=\"157\" class=\"step-number\" text-anchor=\"middle\">1</text>\n <text x=\"85\" y=\"155\" class=\"step-title\">SVG configuration</text>\n \n <text x=\"85\" y=\"180\" class=\"description\">Use \"SVG configuration\" section to upload a file, paste code, or generate with AI.</text>\n \n <!-- STEP 2: Add Placeholders -->\n <circle cx=\"55\" cy=\"230\" r=\"15\" class=\"step-circle\" />\n <text x=\"55\" y=\"237\" class=\"step-number\" text-anchor=\"middle\">2</text>\n <text x=\"85\" y=\"235\" class=\"step-title\">Add placeholders</text>\n \n <text x=\"85\" y=\"260\" class=\"description\">Click on a text or tspan element in the preview to convert it into a placeholder.</text>\n \n <rect x=\"85\" y=\"280\" width=\"475\" height=\"80\" class=\"section-bg\" />\n <text x=\"100\" y=\"305\" class=\"label\">Example - click text below to make it dynamic:</text>\n <text x=\"100\" y=\"330\" class=\"placeholder\"><tspan>Device name</tspan> (<tspan>Device ID</tspan>)</text>\n \n <!-- STEP 3: Configure Data Binding -->\n <circle cx=\"55\" cy=\"395\" r=\"15\" class=\"step-circle\" />\n <text x=\"55\" y=\"402\" class=\"step-number\" text-anchor=\"middle\">3</text>\n <text x=\"85\" y=\"400\" class=\"step-title\">Configure data binding</text>\n \n <text x=\"85\" y=\"425\" class=\"description\">Assign asset properties to placeholders in the \"Placeholder mappings\" section</text>\n <text x=\"85\" y=\"445\" class=\"description\">to see their values in the preview.</text>\n \n <!-- Example with actual placeholders -->\n <rect x=\"40\" y=\"470\" width=\"520\" height=\"120\" class=\"section-bg\" />\n <text x=\"60\" y=\"495\" class=\"label\">Examples:</text>\n \n <text x=\"60\" y=\"525\" class=\"label\">Device name:</text>\n <text x=\"180\" y=\"525\" class=\"placeholder\">${this.c8yScadaValues?.deviceName ?? '-'}</text>\n\n <text x=\"60\" y=\"550\" class=\"label\">Temperature:</text>\n <text x=\"180\" y=\"550\" class=\"placeholder\">${this.c8yScadaValues?.temperature ?? '-'} \u00B0C</text>\n\n <text x=\"60\" y=\"575\" class=\"label\">Status:</text>\n <text x=\"180\" y=\"575\" class=\"placeholder\">${this.c8yScadaValues?.status ?? '-'}</text>\n\n <!-- STEP 4: Advanced Customization -->\n <circle cx=\"55\" cy=\"630\" r=\"15\" class=\"step-circle\" />\n <text x=\"55\" y=\"637\" class=\"step-number\" text-anchor=\"middle\">4</text>\n <text x=\"85\" y=\"635\" class=\"step-title\">Advanced: Edit component code</text>\n\n <text x=\"85\" y=\"660\" class=\"description\">Open \"Advanced editor\" section to customize the web component directly.</text>\n \n <!-- Advanced Examples -->\n <rect x=\"40\" y=\"690\" width=\"520\" height=\"630\" class=\"section-bg\" />\n <text x=\"60\" y=\"715\" class=\"label\">Advanced examples (see implementation in the editor):</text>\n \n <!-- Example 1a: Interactive Button - Device Details -->\n <text x=\"60\" y=\"745\" class=\"description\">\u2022 Button navigating to device details:</text>\n <g class=\"button\" @click=${() => this.c8yScadaFunctions?.goToDeviceDetails(this.c8yScadaValues?.deviceId)}>\n <rect x=\"70\" y=\"755\" width=\"200\" height=\"35\" class=\"button-bg\" />\n <text x=\"170\" y=\"777\" class=\"button-text\">Go to device details</text>\n </g>\n\n <!-- Example 1b: Interactive Button - Group Details -->\n <text x=\"60\" y=\"820\" class=\"description\">\u2022 Button navigating to group details:</text>\n <g class=\"button\" @click=${() => this.c8yScadaFunctions?.goToGroupDetails(this.c8yScadaValues?.groupId)}>\n <rect x=\"70\" y=\"830\" width=\"200\" height=\"35\" class=\"button-bg\" />\n <text x=\"170\" y=\"852\" class=\"button-text\">Go to group details</text>\n </g>\n\n <!-- Example 2: Conditional Styling -->\n <text x=\"60\" y=\"895\" class=\"description\">\u2022 Conditional styling based on temperature range:</text>\n <text x=\"70\" y=\"920\" \n class=\"${(this.c8yScadaValues?.temperature >= 20 && this.c8yScadaValues?.temperature <= 30) ? 'temp-ok' : 'temp-warning'}\"\n font-size=\"14px\"\n font-weight=\"bold\">\n Green if temperature is between 20 and 30 \u00B0C, otherwise red.\n </text>\n \n <!-- Example 3: Dynamic Width Progress Bar -->\n <text x=\"60\" y=\"975\" class=\"description\">\u2022 Dynamic calculations (progress bar):</text>\n <rect x=\"70\" y=\"985\" width=\"400\" height=\"25\" class=\"code-bg\" />\n <rect x=\"70\" y=\"985\" \n width=\"${Math.min((this.c8yScadaValues?.progress || 0) * 4, 400)}\" \n height=\"25\" \n fill=\"var(--brand-primary,var(--c8y-brand-primary))\" \n rx=\"13\" />\n <text x=\"480\" y=\"1000\" class=\"label\">${this.c8yScadaValues?.progress || 0}%</text>\n \n <!-- Example 4: Alarm Status Circle -->\n <text x=\"60\" y=\"1040\" class=\"description\">\u2022 Alarm status indicator using getActiveAlarmsStatusClass():</text>\n <circle cx=\"80\" cy=\"1065\" r=\"12\" \n class=\"${this.c8yScadaFunctions?.getActiveAlarmsStatusClass ? 'alarm-' + this.c8yScadaFunctions.getActiveAlarmsStatusClass(this.c8yScadaValues?.alarmsStatus) : 'alarm-none'}\" />\n <text x=\"100\" y=\"1070\" class=\"label\">\n Alarm status:\n ${this.c8yScadaValues?.alarmsStatus?.critical > 0 ? 'CRITICAL' : this.c8yScadaValues?.alarmsStatus?.major > 0 ? 'MAJOR' : this.c8yScadaValues?.alarmsStatus?.minor > 0 ? 'MINOR' : this.c8yScadaValues?.alarmsStatus?.warning > 0 ? 'WARNING' : 'OK'}\n </text>\n \n <!-- Legend for alarm colors -->\n <text x=\"70\" y=\"1110\" class=\"label\">Alarm color legend:</text>\n <circle cx=\"80\" cy=\"1130\" r=\"8\" class=\"alarm-none\" />\n <text x=\"95\" y=\"1135\" class=\"description\">OK</text>\n \n <circle cx=\"150\" cy=\"1130\" r=\"8\" class=\"alarm-warning\" />\n <text x=\"165\" y=\"1135\" class=\"description\">Warning</text>\n \n <circle cx=\"240\" cy=\"1130\" r=\"8\" class=\"alarm-minor\" />\n <text x=\"255\" y=\"1135\" class=\"description\">Minor</text>\n \n <circle cx=\"320\" cy=\"1130\" r=\"8\" class=\"alarm-major\" />\n <text x=\"335\" y=\"1135\" class=\"description\">Major</text>\n \n <circle cx=\"400\" cy=\"1130\" r=\"8\" class=\"alarm-critical\" />\n <text x=\"415\" y=\"1135\" class=\"description\">Critical</text>\n \n <!-- Additional examples info -->\n <rect x=\"70\" y=\"1170\" width=\"460\" height=\"130\" fill=\"var(--c8y-palette-status-info-light)\" stroke=\"var(--c8y-palette-status-info)\" stroke-width=\"1\" rx=\"4\" />\n <text x=\"85\" y=\"1195\" class=\"label\" font-weight=\"bold\">\uD83D\uDCA1 Tips for advanced usage:</text>\n <text x=\"85\" y=\"1220\" class=\"description\">\u2022 Use this.c8yScadaValues to access placeholder values</text>\n <text x=\"85\" y=\"1240\" class=\"description\">\u2022 Use this.c8yScadaFunctions for navigation and utilities</text>\n <text x=\"85\" y=\"1260\" class=\"description\">\u2022 Combine template literals \\${ } with conditional logic</text>\n <text x=\"85\" y=\"1280\" class=\"description\">\u2022 Apply CSS classes dynamically for styling</text>\n</svg>\n";
|
|
96
96
|
|
|
97
97
|
declare class ScadaWidgetService {
|
|
98
98
|
getScadaFunctions(): {
|
|
@@ -134,6 +134,27 @@ declare class ScadaWidgetConfigService {
|
|
|
134
134
|
*/
|
|
135
135
|
editSafelySvgWithLitExpressions(svg: string, editFn: (doc: Document) => Promise<void>): Promise<string>;
|
|
136
136
|
updateMappings(config: ScadaWidgetConfig): void;
|
|
137
|
+
/**
|
|
138
|
+
* A widget migrated and saved before the migration set `keyPath` is never migrated again, so
|
|
139
|
+
* its nested property mappings get it on load. It comes from the stored 1.0 mapping, or from
|
|
140
|
+
* splitting the dotted `name` the migration built from it.
|
|
141
|
+
*/
|
|
142
|
+
private addKeyPathToSavedLegacyMappings;
|
|
143
|
+
/**
|
|
144
|
+
* A widget migrated and saved before the migration set `rawValue` is never migrated again,
|
|
145
|
+
* so its "Last measurement" mappings get it on load.
|
|
146
|
+
*/
|
|
147
|
+
private addRawValueToSavedLegacyLastMeasurements;
|
|
148
|
+
/**
|
|
149
|
+
* True while the mapping still holds the "Last measurement" it was migrated from, and nobody
|
|
150
|
+
* has chosen its formatting since.
|
|
151
|
+
*/
|
|
152
|
+
private isUnchangedMigratedLastMeasurement;
|
|
153
|
+
/**
|
|
154
|
+
* SCADA 1.0 drawings compare the measured value as the device sent it. A rounded string
|
|
155
|
+
* reads differently: `"0.00"` is truthy in `ng-if="LangHL"`, where `0` is not.
|
|
156
|
+
*/
|
|
157
|
+
private withRawValueForLastMeasurement;
|
|
137
158
|
/**
|
|
138
159
|
* Removes hardcoded width and height attributes from the root SVG element.
|
|
139
160
|
*
|
|
@@ -411,6 +432,11 @@ declare class ScadaWidgetViewComponent implements DynamicComponent {
|
|
|
411
432
|
private initializeHtmlWidget;
|
|
412
433
|
private applyLegacySvgStyling;
|
|
413
434
|
private setupRealtimeSubscription;
|
|
435
|
+
/**
|
|
436
|
+
* SCADA 1.0 resolved a placeholder without a value to `''`, and its drawings rely on it:
|
|
437
|
+
* `ng-if="state==0"` matches `''` but not `undefined`. Lit drawings keep `undefined`.
|
|
438
|
+
*/
|
|
439
|
+
private withEmptyStringForMissingValues;
|
|
414
440
|
private handleFetchError;
|
|
415
441
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScadaWidgetViewComponent, never>;
|
|
416
442
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ScadaWidgetViewComponent, "c8y-scada-widget-view", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; "enablePotentialPlaceholders": { "alias": "enablePotentialPlaceholders"; "required": false; "isSignal": true; }; "preview": { "alias": "preview"; "required": false; "isSignal": true; }; }, { "potentialPlaceholderClick": "potentialPlaceholderClick"; }, never, never, true, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-widgets-implementations-scada.d.ts","sources":["../../widgets/implementations/scada/scada-widget-config/scada.model.ts","../../widgets/implementations/scada/scada-widget.service.ts","../../widgets/implementations/scada/scada-widget-config/scada-widget-config.service.ts","../../widgets/implementations/scada/scada-widget-config/scada-widget-svg-selector.component.ts","../../widgets/implementations/scada/scada-widget-config/scada-widget-advanced-editor.component.ts","../../widgets/implementations/scada/scada-widget-view/scada-widget-view.component.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAKA,cAAa,8BAA8B;AAK3C,cAAa,qBAAqB;AAClC,cAAa,oBAAoB;AACjC,cAAa,wBAAwB;AAE/B,UAAW,iBAAkB,SAAQ,mBAAmB;AAC5D;0BACoB,gBAAgB;kBACxB,qBAAqB;6BACV,kBAAkB;;AAE1C;KAEW,aAAa;AACnB,KAAM,mBAAmB;AACzB,KAAM,iBAAiB;UAEZ,kBAAkB;mBAClB,aAAa;yBACP,mBAAmB;uBACrB,iBAAiB;AACrC;UAEgB,kBAAkB;;;;;;AAMjC;;;;;;;AAOD;AAED,cAAa,oBAAoB,EAAE,aAA4B;AAC/D,cAAa,gBAAgB;UAIZ,uBAAuB;;AAEtC;YACQ,IAAI,CAAC,WAAW;AACxB;AAAa;;
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-widgets-implementations-scada.d.ts","sources":["../../widgets/implementations/scada/scada-widget-config/scada.model.ts","../../widgets/implementations/scada/scada-widget.service.ts","../../widgets/implementations/scada/scada-widget-config/scada-widget-config.service.ts","../../widgets/implementations/scada/scada-widget-config/scada-widget-svg-selector.component.ts","../../widgets/implementations/scada/scada-widget-config/scada-widget-advanced-editor.component.ts","../../widgets/implementations/scada/scada-widget-view/scada-widget-view.component.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAKA,cAAa,8BAA8B;AAK3C,cAAa,qBAAqB;AAClC,cAAa,oBAAoB;AACjC,cAAa,wBAAwB;AAE/B,UAAW,iBAAkB,SAAQ,mBAAmB;AAC5D;0BACoB,gBAAgB;kBACxB,qBAAqB;6BACV,kBAAkB;;AAE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