@c8y/ngx-components 1023.68.6 → 1023.70.0
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/ai/agent-chat/index.d.ts +235 -75
- package/ai/agent-chat/index.d.ts.map +1 -1
- package/ai/ai-chat/index.d.ts +176 -26
- package/ai/ai-chat/index.d.ts.map +1 -1
- package/ai/index.d.ts +309 -75
- package/ai/index.d.ts.map +1 -1
- package/asset-properties/index.d.ts.map +1 -1
- package/echart/index.d.ts +4 -0
- package/echart/index.d.ts.map +1 -1
- package/echart/models/index.d.ts +2 -0
- package/echart/models/index.d.ts.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs +680 -242
- package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs +343 -44
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai.mjs +187 -75
- package/fesm2022/c8y-ngx-components-ai.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-asset-properties.mjs +11 -5
- package/fesm2022/c8y-ngx-components-asset-properties.mjs.map +1 -1
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-alarm-count-config.component-B2cy8gI7.mjs → c8y-ngx-components-computed-asset-properties-alarm-count-config.component-CPLDClTp.mjs} +3 -3
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-alarm-count-config.component-B2cy8gI7.mjs.map → c8y-ngx-components-computed-asset-properties-alarm-count-config.component-CPLDClTp.mjs.map} +1 -1
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-c8y-ngx-components-computed-asset-properties-BYHnA-5R.mjs → c8y-ngx-components-computed-asset-properties-c8y-ngx-components-computed-asset-properties-9be_iMQg.mjs} +30 -13
- package/fesm2022/c8y-ngx-components-computed-asset-properties-c8y-ngx-components-computed-asset-properties-9be_iMQg.mjs.map +1 -0
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-C4oL39m8.mjs → c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-B2em01_W.mjs} +3 -3
- package/fesm2022/c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-B2em01_W.mjs.map +1 -0
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-event-count-config.component-DGwm6_C9.mjs → c8y-ngx-components-computed-asset-properties-event-count-config.component-CQuGa1RI.mjs} +3 -3
- package/fesm2022/c8y-ngx-components-computed-asset-properties-event-count-config.component-CQuGa1RI.mjs.map +1 -0
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-fieldbus-item-status-config.component-BxfCjbYY.mjs → c8y-ngx-components-computed-asset-properties-fieldbus-item-status-config.component-CkmurxJv.mjs} +5 -5
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-fieldbus-item-status-config.component-BxfCjbYY.mjs.map → c8y-ngx-components-computed-asset-properties-fieldbus-item-status-config.component-CkmurxJv.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-computed-asset-properties-last-measurement-config.component-CTK9zNUh.mjs +86 -0
- package/fesm2022/c8y-ngx-components-computed-asset-properties-last-measurement-config.component-CTK9zNUh.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-computed-asset-properties.mjs +1 -1
- package/fesm2022/c8y-ngx-components-echart-models.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +39 -18
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs +106 -4
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs +14 -122
- package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +15 -13
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/index.d.ts.map +1 -1
- package/locales/de.po +3 -0
- package/locales/es.po +3 -0
- package/locales/fr.po +3 -0
- package/locales/ja_JP.po +3 -0
- package/locales/ko.po +3 -0
- package/locales/locales.pot +83 -30
- package/locales/nl.po +3 -0
- package/locales/pl.po +3 -0
- package/locales/pt_BR.po +3 -0
- package/locales/zh_CN.po +3 -0
- package/locales/zh_TW.po +3 -0
- package/package.json +1 -1
- package/widgets/implementations/html-widget/index.d.ts +11 -50
- package/widgets/implementations/html-widget/index.d.ts.map +1 -1
- package/fesm2022/c8y-ngx-components-computed-asset-properties-c8y-ngx-components-computed-asset-properties-BYHnA-5R.mjs.map +0 -1
- package/fesm2022/c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-C4oL39m8.mjs.map +0 -1
- package/fesm2022/c8y-ngx-components-computed-asset-properties-event-count-config.component-DGwm6_C9.mjs.map +0 -1
- package/fesm2022/c8y-ngx-components-computed-asset-properties-last-measurement-config.component-C1cuxN3L.mjs +0 -92
- package/fesm2022/c8y-ngx-components-computed-asset-properties-last-measurement-config.component-C1cuxN3L.mjs.map +0 -1
package/ai/index.d.ts
CHANGED
|
@@ -1,86 +1,100 @@
|
|
|
1
|
+
import { SupportedIconsSuggestions } from '@c8y/ngx-components/icon-selector/icons';
|
|
1
2
|
import * as i0 from '@angular/core';
|
|
2
3
|
import { Type } from '@angular/core';
|
|
4
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
5
|
+
import { FetchClient } from '@c8y/client';
|
|
3
6
|
import { Observable } from 'rxjs';
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
8
|
+
/**
|
|
9
|
+
* A message exchanged between the user and the AI assistant.
|
|
10
|
+
*
|
|
11
|
+
* This API is a "preview" and may change in future.
|
|
12
|
+
*/
|
|
11
13
|
interface AIMessage {
|
|
12
|
-
|
|
14
|
+
/** Indicates whether the message came from the user or AI assistant.
|
|
15
|
+
*
|
|
16
|
+
* Also possible is a hidden "system" message (like a system prompt, but later in the message stream).
|
|
17
|
+
*/
|
|
18
|
+
role: 'user' | 'assistant' | 'system';
|
|
19
|
+
/** The content if this is a user or system message. For assistant messages, instead you should use the text
|
|
20
|
+
* parts returned in `steps`, especially the last non-empty one which contains the final answer.
|
|
21
|
+
*/
|
|
13
22
|
content: string;
|
|
14
|
-
|
|
23
|
+
timestamp?: string;
|
|
15
24
|
steps?: Array<AgentStep>;
|
|
16
25
|
finishReason?: 'stop' | 'error' | 'tool_use';
|
|
17
|
-
timestamp?: string;
|
|
18
26
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
27
|
+
/** The values returned by the observer for an AI response stream.
|
|
28
|
+
*
|
|
29
|
+
* This can be either an updated assistant message, or response metadata that isn't part of the AIMessage.
|
|
30
|
+
*/
|
|
31
|
+
type AIStreamResponse = {
|
|
32
|
+
message: AIMessage;
|
|
33
|
+
/**
|
|
34
|
+
* Specifies which message part was changed.
|
|
35
|
+
*
|
|
36
|
+
* Some part types will be repeatedly modified as results stream in (e.g. executing tool calls) but for others
|
|
37
|
+
* (e.g. tool results) the changedPart will be sent just one, allowing this to be used for invoking callbacks etc.
|
|
38
|
+
*
|
|
39
|
+
* This is also used for metadata updates (that do not affect AIMessage).
|
|
40
|
+
*/
|
|
41
|
+
changedPart?: ToolCallPart | ResponseMetadataPart;
|
|
42
|
+
};
|
|
43
|
+
/** The part of an AI message representing a call to a tool (which may or may not have completed and a result is available). */
|
|
44
|
+
interface ToolCallPart<TInput extends Record<string, any> = Record<string, unknown>, TOutput = unknown> {
|
|
45
|
+
/** The status of the tool call - whether it is currently streaming its input, in progress, or has completed and a result (output or error) is available */
|
|
46
|
+
type: 'tool-input-streaming' | 'tool-executing' | 'tool-result';
|
|
47
|
+
/** Unique identifier for the tool, as specified in the MCP server and agent definition. */
|
|
48
|
+
toolName: string;
|
|
49
|
+
/** Unique identifier for this invocation of the tool, used to match calls with results. */
|
|
50
|
+
toolCallId: string;
|
|
51
|
+
/**
|
|
52
|
+
* An object representing the input arguments given to the tool.
|
|
53
|
+
* This field is set once it is available, and is complete once the type changes to `tool-executing`.
|
|
54
|
+
*/
|
|
55
|
+
input?: TInput;
|
|
56
|
+
/**
|
|
57
|
+
* The output generated by the tool. This field is set once the type is `tool-result`. It can also be updated by the UI client.
|
|
58
|
+
*/
|
|
59
|
+
output?: TOutput;
|
|
60
|
+
/** Set to true for a tool-result where an error occurred. The error message or JSON is in the output field. */
|
|
61
|
+
error?: boolean;
|
|
50
62
|
}
|
|
63
|
+
/** Parts that make up the content of an assistant message. */
|
|
64
|
+
type AIMessagePart = {
|
|
65
|
+
type: 'text';
|
|
66
|
+
text: string;
|
|
67
|
+
} | {
|
|
68
|
+
type: 'reasoning';
|
|
69
|
+
text: string;
|
|
70
|
+
} | {
|
|
71
|
+
type: 'step-start';
|
|
72
|
+
} | ToolCallPart;
|
|
73
|
+
/** Additional data received while streaming a response that is not part of AIMessage itself. */
|
|
74
|
+
type ResponseMetadataPart = {
|
|
75
|
+
type: 'response-metadata';
|
|
76
|
+
/** The identifier of the model being used. */
|
|
77
|
+
model?: string;
|
|
78
|
+
/** The system prompt(s) in use. */
|
|
79
|
+
systemPrompt?: Array<{
|
|
80
|
+
text: string;
|
|
81
|
+
type: string;
|
|
82
|
+
}>;
|
|
83
|
+
};
|
|
51
84
|
type AgentStep = {
|
|
52
85
|
type: 'text' | 'reasoning' | string;
|
|
53
86
|
text: string;
|
|
54
87
|
reasoning?: string;
|
|
55
88
|
textDelta?: string;
|
|
56
|
-
toolCalls?: Array<
|
|
57
|
-
toolResults?: Array<
|
|
89
|
+
toolCalls?: Array<ToolCallPart>;
|
|
90
|
+
toolResults?: Array<ToolCallPart>;
|
|
58
91
|
aborted?: boolean;
|
|
59
92
|
};
|
|
60
|
-
interface Tool {
|
|
61
|
-
toolName: string;
|
|
62
|
-
toolCallId: string;
|
|
63
|
-
type: 'tool-call' | 'tool-result';
|
|
64
|
-
}
|
|
65
|
-
interface ToolCall extends Tool {
|
|
66
|
-
arguments: {
|
|
67
|
-
[key: string]: any;
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
interface ToolResult extends Tool {
|
|
71
|
-
input: any;
|
|
72
|
-
output: {
|
|
73
|
-
content: {
|
|
74
|
-
text: string;
|
|
75
|
-
type: string;
|
|
76
|
-
}[];
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
93
|
interface ClientAgentDefinition {
|
|
80
94
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* privileges.
|
|
95
|
+
* Usually this is false (production mode).
|
|
96
|
+
* If set to true, the agent will use the test endpoint to generate responses (requires admin permissions for the agent manager).
|
|
97
|
+
* This is useful for development and testing purposes, but requires agent admin privileges.
|
|
84
98
|
*/
|
|
85
99
|
snapshot: boolean;
|
|
86
100
|
/**
|
|
@@ -92,24 +106,48 @@ interface ClientAgentDefinition {
|
|
|
92
106
|
*/
|
|
93
107
|
definition: AgentDefinition;
|
|
94
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* Configuration for creating/updating an AI agent including its unique name, the system prompt,
|
|
111
|
+
* and the tools and MCP servers available to it.
|
|
112
|
+
*/
|
|
95
113
|
interface AgentDefinition {
|
|
114
|
+
/** The unique identifier for this agent. Always include an application/plugin-specific prefix, for example "my-plugin-name". */
|
|
96
115
|
name: string;
|
|
116
|
+
/**
|
|
117
|
+
* Specifies the agent's interaction type.
|
|
118
|
+
* `'text'` indicates this is a text-based conversational agent. You can use a `object` agent to build a agent that only returns structural data such as JSON.
|
|
119
|
+
*/
|
|
97
120
|
type: 'object' | 'text';
|
|
98
121
|
agent: {
|
|
122
|
+
/** The system prompt */
|
|
99
123
|
system: string;
|
|
124
|
+
/** Custom provider-specific configuration properties. */
|
|
100
125
|
[key: string]: any;
|
|
101
126
|
};
|
|
127
|
+
/** The tools this agent can use from the configured MCP servers. */
|
|
102
128
|
mcp: Array<{
|
|
103
129
|
serverName: string;
|
|
104
130
|
tools: string[];
|
|
105
131
|
}>;
|
|
106
132
|
}
|
|
133
|
+
/** Configuration for the `ai-chat` component. */
|
|
107
134
|
interface ChatConfig {
|
|
135
|
+
/** A small title to display under the headline */
|
|
108
136
|
title: string;
|
|
137
|
+
/** Text to display in a heading at the top of the welcome message, and to use for ARIA */
|
|
109
138
|
headline: string;
|
|
139
|
+
/** Welcome text, in markdown format */
|
|
110
140
|
welcomeText: string;
|
|
141
|
+
/** The position of the welcome area in the chat window */
|
|
142
|
+
welcomePosition: 'top' | 'bottom' | 'center';
|
|
143
|
+
/** The message displayed in the input box before the user types their message */
|
|
111
144
|
placeholder: string;
|
|
112
|
-
|
|
145
|
+
/** Default is horizontal */
|
|
146
|
+
suggestionsLayout?: 'vertical' | 'horizontal';
|
|
147
|
+
/** Hide scrollbar except when hovering over the chat conversation (default: false) */
|
|
148
|
+
scrollbarOnlyOnHover?: boolean;
|
|
149
|
+
/** By default a framed appearance is used; use this to choose a flat appearance with no shading instead. */
|
|
150
|
+
appearance?: 'framed' | 'flat';
|
|
113
151
|
sendButtonText: string;
|
|
114
152
|
cancelButtonText: string;
|
|
115
153
|
disclaimerText: string;
|
|
@@ -118,7 +156,135 @@ interface ChatConfig {
|
|
|
118
156
|
cancel: string;
|
|
119
157
|
};
|
|
120
158
|
}
|
|
159
|
+
/** Configuration for how the `<ai-chat-assistant-message>` displays a calls for a specific tool name to the user. */
|
|
160
|
+
type ToolCallConfig = {
|
|
161
|
+
/**
|
|
162
|
+
* Whether this tool should be promoted to a more prominent positions alongside the main answer
|
|
163
|
+
* rather than kept in the thinking area with tool calls that are of less interest.
|
|
164
|
+
* For example a tool that produces user-visible artifacts/outputs would be shown by the main answer
|
|
165
|
+
* so that the user can look at the change, whereas a tool that just looks up some information for the
|
|
166
|
+
* AI agent would be displayed in its normal position.
|
|
167
|
+
*/
|
|
168
|
+
isShownWithMainAnswer?: boolean;
|
|
169
|
+
} & ({
|
|
170
|
+
/** The label to use when the tool has completed e.g. "Read the documentation". */
|
|
171
|
+
completedLabel?: string;
|
|
172
|
+
/** The label to use while the tool is in progress e.g. "Reading documentation". */
|
|
173
|
+
executingLabel?: string;
|
|
174
|
+
/** Dynamically provides a translated label for the tool based on its current state. Return undefined for a default label.
|
|
175
|
+
* The returned string can either be a `gettext` that will be passed through the translate pipe, or a fully translated string (in case interpolation is required).
|
|
176
|
+
*/
|
|
177
|
+
labelProvider?: (toolCallPart: ToolCallPart, translateService: TranslateService) => string | undefined;
|
|
178
|
+
/** Whether this tool should be hidden from the UI entirely (e.g. because it's only used for internal purposes). */
|
|
179
|
+
isHidden?: boolean;
|
|
180
|
+
component?: never;
|
|
181
|
+
} | {
|
|
182
|
+
/**
|
|
183
|
+
* A custom Angular component to render the details of this tool call.
|
|
184
|
+
*
|
|
185
|
+
* This allows you to provide rich rendering for "artifact" tools that produce some kind of user-visible output (e.g. a code diff), or for error cases where there is some useful content to display.
|
|
186
|
+
*/
|
|
187
|
+
component: Type<unknown>;
|
|
188
|
+
completedLabel?: never;
|
|
189
|
+
executingLabel?: never;
|
|
190
|
+
labelProvider?: never;
|
|
191
|
+
isHidden?: never;
|
|
192
|
+
});
|
|
193
|
+
/** Configuration for how the `<ai-chat-assistant-message>` displays messages from the AI assistant. */
|
|
194
|
+
interface AssistantMessageDisplayConfig {
|
|
195
|
+
/**
|
|
196
|
+
* Optional configuration that controls how tool calls are displayed.
|
|
197
|
+
* It can be used to provide localized display names, and to identify tools that should be hidden,
|
|
198
|
+
* and tools that require additional prominence in the user interface because they produce user-visible
|
|
199
|
+
* artifacts/outputs such as code changes.
|
|
200
|
+
*
|
|
201
|
+
* It is recommended to define your `toolCallConfig` in the same place you define `ClientAgentDefinition`,
|
|
202
|
+
* and to use the keys from toolCallConfig in the `ClientAgentDefinition` tools list.
|
|
203
|
+
*/
|
|
204
|
+
toolCallConfig?: Record<string, ToolCallConfig>;
|
|
205
|
+
/**
|
|
206
|
+
* Provides an Angular component to display details about a tool call, which can be rendered in a collapsible panel in the UI.
|
|
207
|
+
*
|
|
208
|
+
* This function allows you to provide rendering for "artifact" tools that produce some kind of user-visible output
|
|
209
|
+
* (e.g. a code diff) that you wish to display,or for error cases where there is some useful content to display.
|
|
210
|
+
*
|
|
211
|
+
* Often tools with a custom rendering component will also be have the `ToolCallConfig.isShownWithMainAnswer`
|
|
212
|
+
* flag set to ensure they are prominently displayed alongside the main answer.
|
|
213
|
+
*
|
|
214
|
+
* Return undefined for tools where there is no detail to show; you may also wish to return undefined if the
|
|
215
|
+
* tool has not yet finished and returned a result.
|
|
216
|
+
*/
|
|
217
|
+
toolDetailsComponent?: (toolCallPart: ToolCallPart) => Type<any> | undefined;
|
|
218
|
+
/**
|
|
219
|
+
* Controls whether a JSON representation of the tool details (inputs and outputs) is shown,
|
|
220
|
+
* for tools that do not have a dedicated `toolDetailsComponent`.
|
|
221
|
+
*/
|
|
222
|
+
showDefaultToolDetails?: 'none' | 'all';
|
|
223
|
+
/**
|
|
224
|
+
* The text in the last step that contains the main answer from the agent; this configuration
|
|
225
|
+
* parameter decides how content from intermediate steps while the agent was thinking gets displayed.
|
|
226
|
+
*
|
|
227
|
+
* Options are:
|
|
228
|
+
* - 'collapsible-thinking-block': intermediate steps are shown in a separate collapsible "thinking" block,
|
|
229
|
+
* which is visually separated from the main answer text.
|
|
230
|
+
* This helps the user focus on the final answer and not get distracted by the agent's internal thought process,
|
|
231
|
+
* which can be long and not so relevant to the user.
|
|
232
|
+
* It also makes it clearer what the final answer is, especially if the agent goes through a long thought process with many steps.
|
|
233
|
+
*
|
|
234
|
+
* - 'main-answer': intermediate step text is shown as part of the main answer.
|
|
235
|
+
* This can be useful if the intermediate step text is actually important for the user to see and you don't want it to be hidden in a collapsible block.
|
|
236
|
+
* However, it can also make it harder for the user to identify the final answer, especially if there are many steps.
|
|
237
|
+
*
|
|
238
|
+
* - 'muted-main-answer': same as 'main-answer', but with muted styling (e.g. lighter color).
|
|
239
|
+
* This is a middle ground between the other two options, where the intermediate step text is still shown as part of the main answer, but with less visual emphasis than the final step text.
|
|
240
|
+
* This can help the user distinguish between the final answer and the intermediate steps, while still keeping all the information visible.
|
|
241
|
+
*/
|
|
242
|
+
experimental_nonFinalStepTextDisplay?: 'collapsible-thinking-block' | 'main-answer' | 'muted-main-answer';
|
|
243
|
+
/**
|
|
244
|
+
* By default we assume that most responses will require one round of tool calls which means we expect `2` steps.
|
|
245
|
+
* Therefore as the first step streams in we render it as "thinking" content rather than as the main answer from the agent.
|
|
246
|
+
*
|
|
247
|
+
* For applications where it's likely most answers are a single step (no tool calls), set this flag to `1` to treat the
|
|
248
|
+
* initial step as the main answer (unless other step content comes in).
|
|
249
|
+
*
|
|
250
|
+
* Setting this expectation for your application heuristically minimizes the need to transition text between the
|
|
251
|
+
* main answer and step thinking styles.
|
|
252
|
+
*/
|
|
253
|
+
experimental_expectedStepCount?: number;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Configuration for the widget agent chat component.
|
|
257
|
+
* These correspond to inputs of the same name on `AgentChatComponent`.
|
|
258
|
+
*/
|
|
259
|
+
interface WidgetAiChatSectionComponentConfig {
|
|
260
|
+
assistantMessageDisplayConfig?: AssistantMessageDisplayConfig;
|
|
261
|
+
preprocessAgentMessage?: (message: AIMessage, changedPart: AIStreamResponse['changedPart']) => AIMessage;
|
|
262
|
+
pruneMessagesForAgent?: (messages: AIMessage[]) => AIMessage[];
|
|
263
|
+
}
|
|
264
|
+
type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
265
|
+
[key: string]: JsonValue;
|
|
266
|
+
};
|
|
267
|
+
/** Opaque snapshot of chat history that can be safely serialized to JSON. */
|
|
268
|
+
type ChatHistory = JsonValue;
|
|
269
|
+
/** Configuration for controlling what gets saved in chat history by the `agent-chat`. */
|
|
270
|
+
interface ChatHistoryConfig {
|
|
271
|
+
/** Maximum total number of recent messages to keep when saving. Default: unlimited */
|
|
272
|
+
maxMessages?: number;
|
|
273
|
+
/** A list of tool names whose results should never be persisted to the history (due to being low value, or excessively large). */
|
|
274
|
+
transientToolNames?: string[];
|
|
275
|
+
}
|
|
276
|
+
/** Suggested prompts that can be selected by the user. */
|
|
277
|
+
type Suggestion = {
|
|
278
|
+
label?: string;
|
|
279
|
+
prompt: string;
|
|
280
|
+
icon?: SupportedIconsSuggestions;
|
|
281
|
+
};
|
|
121
282
|
interface AgentHealthCheckResponse {
|
|
283
|
+
/** This field indicates summarizes the most serious current health problem with the agent, or "ok" if none.
|
|
284
|
+
* This can be used to generate useful error messages in the front-end.
|
|
285
|
+
*
|
|
286
|
+
*/
|
|
287
|
+
status?: 'missing-microservice' | 'missing-permissions' | 'missing-provider' | 'missing-agent' | 'ready';
|
|
122
288
|
/**
|
|
123
289
|
* Indicates if the agent exists and can be used.
|
|
124
290
|
* If false, the agent was not found.
|
|
@@ -134,22 +300,50 @@ interface AgentHealthCheckResponse {
|
|
|
134
300
|
*/
|
|
135
301
|
isProviderConfigured: boolean;
|
|
136
302
|
/**
|
|
137
|
-
* If canCreate or exist is false, this array contains messages
|
|
303
|
+
* If canCreate or exist is false, this array contains messages from the backend
|
|
138
304
|
* that explain why the agent cannot be used or created.
|
|
305
|
+
* These messages may not be translated.
|
|
139
306
|
*/
|
|
140
307
|
messages?: string[];
|
|
141
308
|
}
|
|
142
309
|
|
|
310
|
+
declare enum DataStreamType {
|
|
311
|
+
TEXT_DELTA = "text-delta",
|
|
312
|
+
TOOL_CALL = "tool-call",
|
|
313
|
+
TOOL_INPUT_START = "tool-input-start",
|
|
314
|
+
TOOL_INPUT_DELTA = "tool-input-delta",
|
|
315
|
+
TOOL_CALL_STREAMING = "tool-call-streaming",
|
|
316
|
+
TOOL_CALL_DELTA = "tool-call-delta",
|
|
317
|
+
TOOL_RESULT = "tool-result",
|
|
318
|
+
REASONING = "reasoning",
|
|
319
|
+
REASONING_DELTA = "reasoning-delta",
|
|
320
|
+
REDACTED_REASONING = "redacted-reasoning",
|
|
321
|
+
REASONING_SIGNATURE = "reasoning-signature",
|
|
322
|
+
FINISH_REASONING = "finish-reasoning",
|
|
323
|
+
FINISH = "finish",
|
|
324
|
+
FINISH_STEP = "finish-step",
|
|
325
|
+
ERROR = "error",
|
|
326
|
+
DATA = "data",
|
|
327
|
+
MESSAGE_ANNOTATIONS = "message-annotations",
|
|
328
|
+
SOURCE = "source",
|
|
329
|
+
FILE = "file",
|
|
330
|
+
STEP_START = "start-step",
|
|
331
|
+
STEP_FINISH = "finish-step"
|
|
332
|
+
}
|
|
333
|
+
/** This service manages communication with the AI Agent Manager microservice, supporting
|
|
334
|
+
* management of agents, and sending requests to the agents.
|
|
335
|
+
*/
|
|
143
336
|
declare class AIService {
|
|
144
337
|
private baseUrl;
|
|
145
338
|
private client;
|
|
339
|
+
constructor(client?: FetchClient);
|
|
146
340
|
/**
|
|
147
341
|
* Creates or updates an agent.
|
|
148
342
|
* @param def The agent definition
|
|
149
343
|
*/
|
|
150
344
|
createOrUpdateAgent(def: AgentDefinition): Promise<void>;
|
|
151
345
|
/**
|
|
152
|
-
* Check if an agent exists.
|
|
346
|
+
* Check if an agent exists and is ready for use.
|
|
153
347
|
* @param name Agent name (optional)
|
|
154
348
|
* @param fromApp The app context path to check for an agent. This can be used, if the agent should get distributed by the plugin (optional).
|
|
155
349
|
* @returns Agent health check response.
|
|
@@ -158,7 +352,9 @@ declare class AIService {
|
|
|
158
352
|
/**
|
|
159
353
|
* Send a text message to the agent.
|
|
160
354
|
* @param name Agent name
|
|
161
|
-
* @param messages
|
|
355
|
+
* @param messages The message to send, including any previous message history.
|
|
356
|
+
* Typically you should use `defaultPruneMessagesForAgent` or a custom function to prepare the message history
|
|
357
|
+
* by removing unnecessary content such as large/old tool inputs/outputs.
|
|
162
358
|
* @param variables Variables to include
|
|
163
359
|
* @param fromApp The app context path to check for an agent. This can be used, if the agent should get distributed by the plugin (optional).
|
|
164
360
|
* @returns Text response from the agent.
|
|
@@ -169,11 +365,15 @@ declare class AIService {
|
|
|
169
365
|
/**
|
|
170
366
|
* Stream a text message to the agent.
|
|
171
367
|
* @param agent Agent name or an agent definition.
|
|
172
|
-
* @param messages
|
|
368
|
+
* @param messages The message to send, including any previous message history.
|
|
369
|
+
* Typically you should use `defaultPruneMessagesForAgent` or a custom function to prepare the message history
|
|
370
|
+
* by removing unnecessary content such as large/old tool inputs/outputs.
|
|
173
371
|
* @param variables Variables to include
|
|
174
372
|
* @param abortController An AbortController to cancel the request.
|
|
175
373
|
* @param fromApp The app context path to check for an agent. This can be used, if the agent should get distributed by the plugin (optional).
|
|
176
|
-
* @returns An observable that emits partial AIMessage objects as they are received.
|
|
374
|
+
* @returns An observable that emits AIStreamResponse including partial `AIMessage` objects as they are received.
|
|
375
|
+
* When additional useful metadata is available, this will be streamed with type indicating it is metadata.
|
|
376
|
+
* The observable can be cancelled using the provided AbortController.
|
|
177
377
|
* The observable will emit an error if the request fails or is aborted.
|
|
178
378
|
* The observable will complete when the stream is finished.
|
|
179
379
|
*
|
|
@@ -191,7 +391,7 @@ declare class AIService {
|
|
|
191
391
|
* ];
|
|
192
392
|
* const observable = aiService.stream$('my-agent', messages, {}, abortController);
|
|
193
393
|
* const subscription = observable.subscribe({
|
|
194
|
-
* next: (
|
|
394
|
+
* next: (response) => { console.log('Received message update:', response.message); },
|
|
195
395
|
* error: (err) => console.error('Error:', err),
|
|
196
396
|
* complete: () => console.log('Stream complete')
|
|
197
397
|
* });
|
|
@@ -203,13 +403,47 @@ declare class AIService {
|
|
|
203
403
|
*/
|
|
204
404
|
stream$(agent: string | ClientAgentDefinition, messages: AIMessage[], variables: {
|
|
205
405
|
[key: string]: any;
|
|
206
|
-
}, abortController: AbortController, fromApp?: string): Promise<Observable<
|
|
207
|
-
|
|
406
|
+
}, abortController: AbortController, fromApp?: string): Promise<Observable<AIStreamResponse>>;
|
|
407
|
+
protected convertToAgentMessageFormat(messages: AIMessage[]): object[];
|
|
408
|
+
/**
|
|
409
|
+
* Convert a tool output from the wire format (which is different/more compact than LanguageModelV3ToolResultOutput)
|
|
410
|
+
* into our own standard representation.
|
|
411
|
+
*/
|
|
412
|
+
protected convertStreamingToolOutputToToolCallPart(output: any, target: ToolCallPart): void;
|
|
413
|
+
/** Add the specified tool call info to the current step. If this toolCallId is already known,
|
|
414
|
+
* updates it rather than adding a new one, since for UI rendering and compactness of data it's
|
|
415
|
+
* easiest to just have one item per tool call.
|
|
416
|
+
*/
|
|
417
|
+
private addToolCallInfo;
|
|
418
|
+
/** Unpacks data from the Vercel Data Stream Protocol (sent by the Agent Manager over SSE) to update the message
|
|
419
|
+
*
|
|
420
|
+
* See streamText().fullStream() from https://ai-sdk.dev/docs/ai-sdk-ui/stream-protocol#data-stream-protocol
|
|
421
|
+
*
|
|
422
|
+
* This is similar to what the Vercel `toUIMessageStreamResponse` API does (though it'd need the agent manager to publish the
|
|
423
|
+
* UIMessageStream which has a bit more - useful - data than what is included here).
|
|
424
|
+
*
|
|
425
|
+
* We always use the same steps (or in future, parts) object, to make it easier for consumers (eg. agent-chat)
|
|
426
|
+
* to add items to the list and have them still there on the next update from this service.
|
|
427
|
+
*/
|
|
208
428
|
private processLine;
|
|
209
429
|
static ɵfac: i0.ɵɵFactoryDeclaration<AIService, never>;
|
|
210
430
|
static ɵprov: i0.ɵɵInjectableDeclaration<AIService>;
|
|
211
431
|
}
|
|
432
|
+
/**
|
|
433
|
+
* The default method for reducing the size of the message history so it is ready to be sent to the LLM agent.
|
|
434
|
+
*
|
|
435
|
+
* This is important since old tool inputs and outputs can be very large and fill up the agent's context window.
|
|
436
|
+
*
|
|
437
|
+
* When sending an AI request you can provide your own function instead of using this one,
|
|
438
|
+
* or you can write your own function that calls this and adds extra logic,
|
|
439
|
+
* for example to suppress specific tools from the AIMessage, or
|
|
440
|
+
* retain only the final step text in multi-step responses, etc.
|
|
441
|
+
*
|
|
442
|
+
* The current default implementation preserves text content, but does not include any tool calls.
|
|
443
|
+
* This may change in future releases.
|
|
444
|
+
*/
|
|
445
|
+
declare function defaultPruneMessagesForAgent(messages: AIMessage[]): AIMessage[];
|
|
212
446
|
|
|
213
|
-
export { AIService, DataStreamType };
|
|
214
|
-
export type { AIMessage,
|
|
447
|
+
export { AIService, DataStreamType, defaultPruneMessagesForAgent };
|
|
448
|
+
export type { AIMessage, AIMessagePart, AIStreamResponse, AgentDefinition, AgentHealthCheckResponse, AgentStep, AssistantMessageDisplayConfig, ChatConfig, ChatHistory, ChatHistoryConfig, ClientAgentDefinition, ResponseMetadataPart, Suggestion, ToolCallConfig, ToolCallPart, WidgetAiChatSectionComponentConfig };
|
|
215
449
|
//# sourceMappingURL=index.d.ts.map
|
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":";;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../../ai/ai.model.ts","../../ai/ai.service.ts"],"sourcesContent":[null,null],"names":[],"mappings":";;;;;;;AAIA;;;;AAIG;;AAED;;;AAGG;AACH;AAEA;;AAEG;;;AAKH;AAEA;AACD;AAKD;;;AAGG;AACG;;AAEJ;;;;;;;AAOG;AACH;;AAGF;AACM;;AAKJ;;;;;AAKA;;;AAGG;;AAEH;;AAEG;;;;AAKJ;AAED;AACM;;;;;;;;AAGoB;AAG1B;AACM;;;;;;;;AAO+C;;AAI/C;AACJ;;;;AAIA;AACA;;;;AAKA;;;;AAIG;;AAEH;;AAEG;;AAEH;;AAEG;;AAEJ;AAED;;;AAGG;;;;AAKD;;;AAGG;AACH;AAEA;;;;AAIE;;;;;;AAIgD;AACnD;AAED;;;;;;;;;AASE;;;;AAIA;;;;AAIA;;;;AAKA;;;;AACD;AAED;AACM;AACJ;;;;;;AAMG;;AAEJ;;;;;AAMK;;AAEG;AACH;;;;;AASA;;;;AAIG;AACH;;;;;AAKD;AAGL;;AAEE;;;;;;;;AAQG;;AAGH;;;;;;;;;;;AAWG;AACH;AAEA;;;AAGG;AACH;AAKA;;;;;;;;;;;;;;;;;;AAkBG;AACH;AAKA;;;;;;;;;AASG;;AAEJ;AAED;;;AAGG;;;AAID;;AAMD;AAGD;AAAoE;;AAEpE;AACM;AAEN;;;;;AAKE;AACD;AAED;AACM;;;;;;AAGJ;;;AAGG;;AAQH;;;AAGG;;AAEH;;AAEG;;AAEH;;;AAGG;;AAEH;;;;AAIG;AACH;AACD;;AC7UD;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD;AAED;;AAEG;AACH;;;;AAYE;;;AAGG;;AAoBH;;;;;AAKG;AACG;AA6BN;;;;;;;;;AASG;;AAIY;;AAsBf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCG;AACG;AAGS;AAAoB;;AA+GnC;;;AAGG;;AAUH;;;AAGG;AACH;AAmCA;;;;;;;;;AASG;AACH;;;AAuGD;AAED;;;;;;;;;;;;AAYG;AACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sources":["../../asset-properties/asset-properties.model.ts","../../asset-properties/asset-properties.service.ts","../../asset-properties/custom-properties-drawer.service.ts","../../asset-properties/asset-property-list/tree-data-source.ts","../../asset-properties/asset-property-list/asset-property-action.directive.ts","../../asset-properties/asset-property-list/asset-property-list.component.ts","../../asset-properties/asset-property-selector-drawer/asset-property-selector-drawer.component.ts","../../asset-properties/computed-properties.service.ts","../../asset-properties/asset-property-tabs/asset-property-tabs.component.ts","../../asset-properties/asset-property-selector/asset-property-selector.component.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;;;;;AAMA;AACE;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AACD;AAEK;AACJ;;;;AAIG;AACH;AACA;;;;;AAKG;AACH;;AAGI;AACA;AAGN;;;;;;AAaI;;;;;AAME;;;;AAUE;;;;;AAMD;AAGD;AACJ;;;AAGG;;AAEH;;AAEG;;;AAIC;AACJ;;AAEG;AACH;AACA;;;AAGG;;AAEH;;;;;;AAMG;;AAEH;;;;;AAKG;AACH;AACA;;;AAGG;;AAEH;;AAEG;;AAEH;;;AAGG;;AAEH;;;;AAIG;AACH;AACA;;AAEG;;AAEH;;;;;AAKG;AACH;AACA;;AAEG;;AAEH;;AAEG;;AAEH;;AAEG;;;AAIL;AAaA;AAwnBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBE;AACD;AAEK;;;;AAIL;;AAIK;;;;;AAEA;;AC9yBN;;AAEG;AACH;AAIE;AAgBA;;;;;;;;AAUA;;;;;;AAMG;AACG;AA6BN;;;;;;AAMG;;AAkCH;;;;AAIG;;AAcH;;;;AAIG;;AAKH;;;;AAIG;;AAKH;;;;AAIG;;AAoBH;;;;AAIG;AACH;;;;AAIC;AAwBD;;;;AAIG;AACH;AAOA;;;;;AAKG;AACG;AAcN;;;;;;AAMG;AACH;AAgBA;;;;AAIG;AACG;;;;;AA2CN;AAYA;AAoCA;AAIA;AAqCA;AASA;AAaA;;;;AAIG;AACH;;;AAuCD;;ACtdD;;AAEG;AACH;;AAMQ;;AAEiC;;;AAiBxC;;;;;;;;ACxBC;;AAEG;;AAEJ;AAED;;;AAOE;AAIA;AAIA;AAIA;AAGD;;ACpCD;AAMW;AACA;AACA;AAFA;;;AAIV;;ACqCD;;AAEG;AACH;AAyBE;;AAEG;AACH;AACA;;AAEG;;AAEH;;AAEG;;AAEH;;AAEG;;AAEH;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AAEG;AACH;AAKA;;AAEG;AACH;AAKA;;;AAGG;AACH;;;AAKD;;ACtFD;AAIA;AAOA;AAQI;;;AAOF;;;;AAIG;AACH;;;;AA0CA;AAoBA;;;AAOD;;AChGD;;;AAGG;AACH;AAkBE;;AAEG;;AAEH;;AAEG;;AAUH;;AAEG;;AAEH;;AAEG;;AAEH;;AAEG;AACM;AACT;;AAEG;AACM;AAET;;AAEG;AACO;AAEV;AAKA;AACA;;AAGA;AAGA;;AAKA;AAGA;;AAKA;AAGA;;;AAMA;AACA;AACA;;;;;;;;AAsBA;AACA;;;;;;;AAwDA;;;AAGG;AACH;;;AAgCA;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../../asset-properties/asset-properties.model.ts","../../asset-properties/asset-properties.service.ts","../../asset-properties/custom-properties-drawer.service.ts","../../asset-properties/asset-property-list/tree-data-source.ts","../../asset-properties/asset-property-list/asset-property-action.directive.ts","../../asset-properties/asset-property-list/asset-property-list.component.ts","../../asset-properties/asset-property-selector-drawer/asset-property-selector-drawer.component.ts","../../asset-properties/computed-properties.service.ts","../../asset-properties/asset-property-tabs/asset-property-tabs.component.ts","../../asset-properties/asset-property-selector/asset-property-selector.component.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;;;;;AAMA;AACE;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AACD;AAEK;AACJ;;;;AAIG;AACH;AACA;;;;;AAKG;AACH;;AAGI;AACA;AAGN;;;;;;AAaI;;;;;AAME;;;;AAUE;;;;;AAMD;AAGD;AACJ;;;AAGG;;AAEH;;AAEG;;;AAIC;AACJ;;AAEG;AACH;AACA;;;AAGG;;AAEH;;;;;;AAMG;;AAEH;;;;;AAKG;AACH;AACA;;;AAGG;;AAEH;;AAEG;;AAEH;;;AAGG;;AAEH;;;;AAIG;AACH;AACA;;AAEG;;AAEH;;;;;AAKG;AACH;AACA;;AAEG;;AAEH;;AAEG;;AAEH;;AAEG;;;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G;;AAEH;;AAEG;AACM;AACT;;AAEG;AACM;AACT;;AAEG;AACM;AACT;;AAEG;AACM;AAET;;AAEG;;AAEH;;AAEG;AACH;;;;;;;;AAWA;AAUA;;AAEG;AACH;AAIA;;AAEG;;AAKH;;AAEG;AACH;AAIA;;;AAGG;;AAcH;;;AAGG;AACH;AASA;;;AAGG;AACH;AAMA;;;AAGG;;AAaH;;;AAGG;AACH;AAOA;;AAEG;AACH;AAKA;;AAEG;AACH;AAMA;;AAEG;AACH;AAOA;;;;AAIG;;AAoFH;;;;;AAKG;AACH;AAmBA;;;;;AAKG;;;;AAaJ;;;"}
|
package/echart/index.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ type GraphDisplayOptions = {
|
|
|
68
68
|
numberOfDecimalPlaces?: number;
|
|
69
69
|
sliderPositionMode?: 'compact' | 'default';
|
|
70
70
|
smoothLines?: boolean;
|
|
71
|
+
axisColor?: string;
|
|
71
72
|
};
|
|
72
73
|
declare const CHART_DISPLAY_OPTION_DEFAULTS: Required<Pick<GraphDisplayOptions, 'displayMarkedLine' | 'displayMarkedPoint' | 'mergeMatchingDatapoints' | 'forceMergeDatapoints' | 'setYaxisStartToZero' | 'showLabelAndUnit' | 'showSlider' | 'smoothLines' | 'numberOfDecimalPlaces'>>;
|
|
73
74
|
type AlarmDetailsExtended = AlarmDetails & {
|
|
@@ -167,6 +168,7 @@ type YAxisOptions = {
|
|
|
167
168
|
forceMergeDatapoints: boolean;
|
|
168
169
|
setYaxisStartToZero: boolean;
|
|
169
170
|
showLabelAndUnit: boolean;
|
|
171
|
+
axisColor: string;
|
|
170
172
|
};
|
|
171
173
|
interface SeriesDatapointInfo {
|
|
172
174
|
datapointId?: string;
|
|
@@ -271,6 +273,7 @@ declare class ChartsComponent implements OnChanges, OnInit, OnDestroy {
|
|
|
271
273
|
updateAggregatedSliderDatapoint: EventEmitter<SelectedDatapoint>;
|
|
272
274
|
chart: ElementRef;
|
|
273
275
|
CHART_VIEW_CONTEXT: typeof CHART_VIEW_CONTEXT;
|
|
276
|
+
get axisColor(): string;
|
|
274
277
|
readonly AGGREGATION_INTERVAL_MAP: Record<aggregationType, string>;
|
|
275
278
|
private configChangedSubject;
|
|
276
279
|
private destroyRef;
|
|
@@ -281,6 +284,7 @@ declare class ChartsComponent implements OnChanges, OnInit, OnDestroy {
|
|
|
281
284
|
private readonly chartAlarmsService;
|
|
282
285
|
private readonly mediator;
|
|
283
286
|
private readonly widgetTimeContextDateRangeService;
|
|
287
|
+
private readonly themeSwitcherService;
|
|
284
288
|
private loadedTimeRange;
|
|
285
289
|
/** Tracks if the last data fetch returned truncated data */
|
|
286
290
|
private dataWasTruncated;
|
package/echart/index.d.ts.map
CHANGED
|
@@ -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/chart-alerts/chart-alerts.component.ts","../../echart/select-aggregated-datapoint/select-aggregated-datapoint.component.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;;;;;;;AAoBM;;;;AAKA;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;AASA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;;;;;;;;;AAWI;;;;;;;;;;AAUJ
|
|
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/chart-alerts/chart-alerts.component.ts","../../echart/select-aggregated-datapoint/select-aggregated-datapoint.component.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null],"names":[],"mappings":";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AAEjC;;;;AAQD;;ACVD;;AAqBW;AACC;AAEV;;AAGA;;;AAiBA;;;AAgBD;;;"}
|
package/echart/models/index.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ type GraphDisplayOptions = {
|
|
|
62
62
|
numberOfDecimalPlaces?: number;
|
|
63
63
|
sliderPositionMode?: 'compact' | 'default';
|
|
64
64
|
smoothLines?: boolean;
|
|
65
|
+
axisColor?: string;
|
|
65
66
|
};
|
|
66
67
|
declare const CHART_DISPLAY_OPTION_DEFAULTS: Required<Pick<GraphDisplayOptions, 'displayMarkedLine' | 'displayMarkedPoint' | 'mergeMatchingDatapoints' | 'forceMergeDatapoints' | 'setYaxisStartToZero' | 'showLabelAndUnit' | 'showSlider' | 'smoothLines' | 'numberOfDecimalPlaces'>>;
|
|
67
68
|
type AlarmDetailsExtended = AlarmDetails & {
|
|
@@ -161,6 +162,7 @@ type YAxisOptions = {
|
|
|
161
162
|
forceMergeDatapoints: boolean;
|
|
162
163
|
setYaxisStartToZero: boolean;
|
|
163
164
|
showLabelAndUnit: boolean;
|
|
165
|
+
axisColor: string;
|
|
164
166
|
};
|
|
165
167
|
interface SeriesDatapointInfo {
|
|
166
168
|
datapointId?: string;
|
|
@@ -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":";;;;;;;;;AAoBM;;;;AAKA;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;AASA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;;;;;;;;;AAWI;;;;;;;;;;AAUJ
|
|
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":";;;;;;;;;AAoBM;;;;AAKA;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;AASA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;;;;;;;;;AAWI;;;;;;;;;;AAUJ;;;;AAKF;AAyBM;;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;;;;;;;;;;;;AAaL;AAED;;;;;;;;AAUE;AACA;AACD;;AChPD;;;;;;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;;;;;;;;;;;;"}
|