@c8y/ngx-components 1023.0.0 → 1023.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/agent-chat/index.d.ts +114 -0
- package/ai/agent-chat/index.d.ts.map +1 -0
- package/ai/ai-chat/index.d.ts +145 -0
- package/ai/ai-chat/index.d.ts.map +1 -0
- package/ai/index.d.ts +203 -0
- package/ai/index.d.ts.map +1 -0
- package/context-dashboard/device/add/index.d.ts +15 -1
- package/context-dashboard/device/add/index.d.ts.map +1 -1
- package/context-dashboard/device/view/index.d.ts +14 -2
- package/context-dashboard/device/view/index.d.ts.map +1 -1
- package/context-dashboard/devicemanagement/index.d.ts +10 -0
- package/context-dashboard/devicemanagement/index.d.ts.map +1 -0
- package/context-dashboard/index.d.ts +6 -30
- package/context-dashboard/index.d.ts.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs +387 -0
- package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs +258 -0
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-ai.mjs +291 -0
- package/fesm2022/c8y-ngx-components-ai.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-context-dashboard-cockpit-home-dashboard.mjs +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-cockpit-home-dashboard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-device-add.mjs +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-device-view.mjs +2 -2
- package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs +68 -0
- package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs +27 -45
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +15 -17
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-global-context.mjs +10 -10
- package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-register-device.mjs +4 -6
- package/fesm2022/c8y-ngx-components-register-device.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-sensor-phone-sensor-phone-modal.mjs +2 -2
- package/fesm2022/c8y-ngx-components-sensor-phone-sensor-phone-modal.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs +574 -0
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-widgets-exports.mjs +8 -1
- package/fesm2022/c8y-ngx-components-widgets-exports.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs +176 -41
- package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +96 -44
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/index.d.ts +25 -4
- package/index.d.ts.map +1 -1
- package/locales/de.po +49 -52
- package/locales/es.po +42 -42
- package/locales/fr.po +35 -39
- package/locales/ja_JP.po +32 -32
- package/locales/ko.po +39 -40
- package/locales/locales.pot +144 -9
- package/locales/nl.po +37 -37
- package/locales/pl.po +51 -54
- package/locales/pt_BR.po +38 -39
- package/locales/zh_CN.po +36 -36
- package/locales/zh_TW.po +45 -45
- package/package.json +1 -1
- package/register-device/index.d.ts.map +1 -1
- package/widgets/cockpit-exports/index.d.ts +6 -0
- package/widgets/cockpit-exports/index.d.ts.map +1 -1
- package/widgets/definitions/html-widget-ai-config/index.d.ts +6 -0
- package/widgets/definitions/html-widget-ai-config/index.d.ts.map +1 -0
- package/widgets/device-management-exports/index.d.ts +6 -0
- package/widgets/device-management-exports/index.d.ts.map +1 -1
- package/widgets/exports/index.d.ts +8 -1
- package/widgets/exports/index.d.ts.map +1 -1
- package/widgets/implementations/html-widget/index.d.ts +72 -16
- package/widgets/implementations/html-widget/index.d.ts.map +1 -1
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnInit, OnDestroy, Type, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
3
|
+
import { ClientAgentDefinition, ToolResult, AIMessageStreamSteps, AgentStep, AIMessage } from '@c8y/ngx-components/ai';
|
|
4
|
+
import { BehaviorSubject, OperatorFunction } from 'rxjs';
|
|
5
|
+
|
|
6
|
+
declare class AgentChatComponent implements OnInit, OnDestroy {
|
|
7
|
+
agent: string | ClientAgentDefinition;
|
|
8
|
+
suggestions: {
|
|
9
|
+
label: string;
|
|
10
|
+
prompt: string;
|
|
11
|
+
icon?: string;
|
|
12
|
+
}[];
|
|
13
|
+
title: string;
|
|
14
|
+
headline: string;
|
|
15
|
+
welcomeText: string;
|
|
16
|
+
autoInstallAgents: boolean;
|
|
17
|
+
variables: {};
|
|
18
|
+
stepRenderComponent: Type<any>;
|
|
19
|
+
onMessageDelta: EventEmitter<string>;
|
|
20
|
+
onMessageText: EventEmitter<string>;
|
|
21
|
+
onMessageFinish: EventEmitter<string>;
|
|
22
|
+
onToolResult: EventEmitter<ToolResult>;
|
|
23
|
+
isLoading: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* A stream of AI messages representing the conversation.
|
|
26
|
+
*/
|
|
27
|
+
messages$: BehaviorSubject<AIMessageStreamSteps[]>;
|
|
28
|
+
agentName: string;
|
|
29
|
+
hasError: boolean;
|
|
30
|
+
canCreate: boolean;
|
|
31
|
+
errorMsg: string;
|
|
32
|
+
prompt: string;
|
|
33
|
+
private aiService;
|
|
34
|
+
private gainsightService;
|
|
35
|
+
private alertService;
|
|
36
|
+
private abortController;
|
|
37
|
+
private assistantSubscription;
|
|
38
|
+
defaultAgentStepRendererPipe: OperatorFunction<AgentStep[], {
|
|
39
|
+
content: Type<any> | string;
|
|
40
|
+
origin: AgentStep;
|
|
41
|
+
}[]>;
|
|
42
|
+
ngOnInit(): Promise<void>;
|
|
43
|
+
sendMessage(message: AIMessage): Promise<void>;
|
|
44
|
+
ngOnDestroy(): void;
|
|
45
|
+
reprompt(userMessage: AIMessageStreamSteps): void;
|
|
46
|
+
rate(assistantMessage: AIMessageStreamSteps, positive: any): void;
|
|
47
|
+
reload(assistantMessage: AIMessageStreamSteps): void;
|
|
48
|
+
cancel(): void;
|
|
49
|
+
createAgent(): Promise<void>;
|
|
50
|
+
private composeErrorMessage;
|
|
51
|
+
private processAgentMessage;
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AgentChatComponent, never>;
|
|
53
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AgentChatComponent, "c8y-agent-chat", never, { "agent": { "alias": "agent"; "required": true; }; "suggestions": { "alias": "suggestions"; "required": false; }; "title": { "alias": "title"; "required": false; }; "headline": { "alias": "headline"; "required": false; }; "welcomeText": { "alias": "welcomeText"; "required": false; }; "autoInstallAgents": { "alias": "autoInstallAgents"; "required": false; }; "variables": { "alias": "variables"; "required": false; }; "stepRenderComponent": { "alias": "stepRenderComponent"; "required": false; }; }, { "onMessageDelta": "onMessageDelta"; "onMessageText": "onMessageText"; "onMessageFinish": "onMessageFinish"; "onToolResult": "onToolResult"; }, never, never, true, never>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
declare class AgentStepFeedbackComponent implements OnInit, OnChanges {
|
|
57
|
+
step: AgentStep;
|
|
58
|
+
label: string;
|
|
59
|
+
loading: boolean;
|
|
60
|
+
collapsed: boolean;
|
|
61
|
+
canCollapse: boolean;
|
|
62
|
+
ngOnInit(): void;
|
|
63
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
64
|
+
parseDefaultAgentStep(step: AgentStep): void;
|
|
65
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AgentStepFeedbackComponent, never>;
|
|
66
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AgentStepFeedbackComponent, "c8y-agent-step-feedback", never, { "step": { "alias": "step"; "required": true; }; "label": { "alias": "label"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "collapsed": { "alias": "collapsed"; "required": false; }; "canCollapse": { "alias": "canCollapse"; "required": false; }; }, {}, never, never, true, never>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
declare class WidgetAiChatSectionComponent implements OnInit {
|
|
70
|
+
suggestions: Array<{
|
|
71
|
+
label: string;
|
|
72
|
+
prompt: string;
|
|
73
|
+
}>;
|
|
74
|
+
agent: string | ClientAgentDefinition;
|
|
75
|
+
headline: "Welcome!";
|
|
76
|
+
title: string;
|
|
77
|
+
welcomeText: any;
|
|
78
|
+
variables: {
|
|
79
|
+
[key: string]: any;
|
|
80
|
+
};
|
|
81
|
+
useContextAsVariable: boolean;
|
|
82
|
+
contextVariableName: string;
|
|
83
|
+
_renderStepComponent: Type<any>;
|
|
84
|
+
private readonly widgetConfigService;
|
|
85
|
+
private readonly alertService;
|
|
86
|
+
private readonly contextRouteService;
|
|
87
|
+
/**
|
|
88
|
+
* A component that is used to render each step in the chat. By default, it uses the `AgentStepFeedbackComponent`.
|
|
89
|
+
* You can provide your own component by returning it from this callback.
|
|
90
|
+
*
|
|
91
|
+
* @returns A promise that resolves to a component type.
|
|
92
|
+
*/
|
|
93
|
+
loadRenderStepComponent: () => Promise<Type<any>>;
|
|
94
|
+
/**
|
|
95
|
+
* A callback that is invoked when a tool result is returned. The function can return either:
|
|
96
|
+
* - `undefined` or `void`: No action is taken.
|
|
97
|
+
* - an object which is stored to the widget configuration.
|
|
98
|
+
*/
|
|
99
|
+
onToolResult: (step: ToolResult) => undefined | any;
|
|
100
|
+
/**
|
|
101
|
+
* @ignore
|
|
102
|
+
*/
|
|
103
|
+
ngOnInit(): Promise<void>;
|
|
104
|
+
/**
|
|
105
|
+
* Handles the tool result returned from the AI agent.
|
|
106
|
+
* @param tool The tool result returned from the AI agent.
|
|
107
|
+
*/
|
|
108
|
+
toolResultHandler(tool: ToolResult): void;
|
|
109
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WidgetAiChatSectionComponent, never>;
|
|
110
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WidgetAiChatSectionComponent, "c8y-widget-ai-chat-section", never, { "suggestions": { "alias": "suggestions"; "required": false; }; "agent": { "alias": "agent"; "required": false; }; "headline": { "alias": "headline"; "required": false; }; "title": { "alias": "title"; "required": false; }; "welcomeText": { "alias": "welcomeText"; "required": false; }; "variables": { "alias": "variables"; "required": false; }; "useContextAsVariable": { "alias": "useContextAsVariable"; "required": false; }; "contextVariableName": { "alias": "contextVariableName"; "required": false; }; "loadRenderStepComponent": { "alias": "loadRenderStepComponent"; "required": false; }; }, {}, never, never, true, never>;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export { AgentChatComponent, AgentStepFeedbackComponent, WidgetAiChatSectionComponent };
|
|
114
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../../../ai/agent-chat/agent-chat.component.ts","../../../ai/agent-chat/agent-step-feedback.component.ts","../../../ai/agent-chat/widget-ai-chat-section.component.ts"],"sourcesContent":[null,null,null],"names":[],"mappings":";;;;;AAsCA,cAAA,kBAAA,YAAA,MAAA,EAAA,SAAA;AAiB6B,oBAAA,qBAAA;AAClB;;;;AAA6D;;;;AAI7D;AACA;AACA,yBAAA,IAAA;AAEC,oBAAA,YAAA;AACA,mBAAA,YAAA;AACA,qBAAA,YAAA;AACA,kBAAA,YAAA,CAAA,UAAA;AAEV;AAEA;;AAEG;AACH,eAAA,eAAA,CAAA,oBAAA;;AAIA;AACA;AACA;AACA;;;;;;AAQA,kCAAA,gBAAA,CAAA,SAAA;AAEI,iBAAA,IAAA;;AAAgD;AAc9C,gBAAA,OAAA;;AAgDN;;AAYA,2BAAA,oBAAA;;;;AA6CA;AAoCA;;;AAyCD;;ACjRD,cAAA,0BAAA,YAAA,MAAA,EAAA,SAAA;;;AAsBW;AACA;AACA;AAET;AAMA,yBAAA,aAAA;AAMA,gCAAA,SAAA;;;AAoBD;;AC5DD,cAAA,4BAAA,YAAA,MAAA;;;;AAQsD;AAEpD,oBAAA,qBAAA;AAEA;;AAIA;AAEA;AAAa;;AAEb;AAEA;AACA,0BAAA,IAAA;AAEA;AACA;AACA;AAEA;;;;;AAKG;;AAKH;;;;AAIG;;AAGH;;AAEG;AACG,gBAAA,OAAA;AAWN;;;AAGG;;;;AAoBJ;;;;"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, QueryList } from '@angular/core';
|
|
3
|
+
import { SupportedIconsSuggestions } from '@c8y/ngx-components/icon-selector/icons';
|
|
4
|
+
import { AIMessage, ChatConfig } from '@c8y/ngx-components/ai';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* An action button that can be added to chat messages.
|
|
8
|
+
* Typically used for actions like copying, regenerating, or providing feedback on messages.
|
|
9
|
+
*/
|
|
10
|
+
declare class AiChatMessageActionComponent {
|
|
11
|
+
/**
|
|
12
|
+
* Disables the action button when true.
|
|
13
|
+
*/
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Tooltip text displayed when hovering over the action button.
|
|
17
|
+
*/
|
|
18
|
+
tooltip: string;
|
|
19
|
+
/**
|
|
20
|
+
* Icon to display in the action button.
|
|
21
|
+
*/
|
|
22
|
+
icon: SupportedIconsSuggestions;
|
|
23
|
+
/**
|
|
24
|
+
* Emitted when the action button is clicked.
|
|
25
|
+
*/
|
|
26
|
+
click: EventEmitter<void>;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AiChatMessageActionComponent, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AiChatMessageActionComponent, "c8y-ai-chat-message-action", never, { "disabled": { "alias": "disabled"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; }, { "click": "click"; }, never, never, true, never>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare class AiChatMessageComponent {
|
|
32
|
+
readonly role: i0.InputSignal<"user" | "assistant">;
|
|
33
|
+
readonly message: i0.InputSignal<AIMessage>;
|
|
34
|
+
private readonly translateService;
|
|
35
|
+
private readonly roleResolved;
|
|
36
|
+
/**
|
|
37
|
+
* Generates an accessible label for the message container.
|
|
38
|
+
* Includes the role (user or assistant) and timestamp if available.
|
|
39
|
+
* @returns The aria-label string for screen readers
|
|
40
|
+
*/
|
|
41
|
+
readonly ariaLabel: i0.Signal<any>;
|
|
42
|
+
/**
|
|
43
|
+
* Generates an accessible label for the message content.
|
|
44
|
+
* Prefixes the content with contextual information about who sent it.
|
|
45
|
+
* @returns The aria-label string with prefixed role information
|
|
46
|
+
*/
|
|
47
|
+
readonly messageContentAriaLabel: i0.Signal<any>;
|
|
48
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AiChatMessageComponent, never>;
|
|
49
|
+
static ɵcmp: i0.ɵɵ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>;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* A suggestion chip that can be displayed in the chat interface.
|
|
54
|
+
* When clicked, it automatically populates and sends a predefined prompt.
|
|
55
|
+
*/
|
|
56
|
+
declare class AiChatSuggestionComponent {
|
|
57
|
+
/**
|
|
58
|
+
* The visible label text displayed on the suggestion chip.
|
|
59
|
+
*/
|
|
60
|
+
label: string;
|
|
61
|
+
/**
|
|
62
|
+
* The prompt text that will be sent when the suggestion is clicked.
|
|
63
|
+
*/
|
|
64
|
+
prompt: string;
|
|
65
|
+
/**
|
|
66
|
+
* Icon to display alongside the suggestion label.
|
|
67
|
+
*/
|
|
68
|
+
icon: SupportedIconsSuggestions;
|
|
69
|
+
/**
|
|
70
|
+
* When true, uses AI-styled buttons instead of default styling.
|
|
71
|
+
*/
|
|
72
|
+
useAiButtons: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Disables the suggestion chip when true.
|
|
75
|
+
*/
|
|
76
|
+
disabled: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Emitted when the suggestion is clicked, providing the prompt as an AIMessage.
|
|
79
|
+
*/
|
|
80
|
+
suggestionClicked: EventEmitter<AIMessage>;
|
|
81
|
+
/**
|
|
82
|
+
* Handles suggestion click and emits the prompt as a user message.
|
|
83
|
+
*/
|
|
84
|
+
suggest(): void;
|
|
85
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AiChatSuggestionComponent, never>;
|
|
86
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AiChatSuggestionComponent, "c8y-ai-chat-suggestion", never, { "label": { "alias": "label"; "required": false; }; "prompt": { "alias": "prompt"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "useAiButtons": { "alias": "useAiButtons"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "suggestionClicked": "suggestionClicked"; }, never, never, true, never>;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* An interactive chat interface component for AI-powered conversations.
|
|
91
|
+
* Displays messages in a conversation format with support for loading states,
|
|
92
|
+
* custom configuration, and markdown formatting.
|
|
93
|
+
*/
|
|
94
|
+
declare class AiChatComponent {
|
|
95
|
+
/**
|
|
96
|
+
* Indicates whether the chat is currently processing a request.
|
|
97
|
+
* When true, displays a cancel button instead of send button and disables the input.
|
|
98
|
+
*/
|
|
99
|
+
isLoading: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Disables the chat input and send button when true.
|
|
102
|
+
*/
|
|
103
|
+
disabled: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* The current text in the chat input field. Supports two-way binding.
|
|
106
|
+
*/
|
|
107
|
+
prompt: string;
|
|
108
|
+
/**
|
|
109
|
+
* Emitted when the user sends a message.
|
|
110
|
+
* Provides an AIMessage object with role, content, and timestamp.
|
|
111
|
+
*/
|
|
112
|
+
onMessage: EventEmitter<AIMessage>;
|
|
113
|
+
/**
|
|
114
|
+
* Emitted when the user cancels an ongoing operation during loading state.
|
|
115
|
+
*/
|
|
116
|
+
onCancel: EventEmitter<void>;
|
|
117
|
+
/**
|
|
118
|
+
* Child message components displayed in the chat.
|
|
119
|
+
*/
|
|
120
|
+
messages: QueryList<AiChatMessageComponent>;
|
|
121
|
+
readonly componentId: string;
|
|
122
|
+
private _config;
|
|
123
|
+
/**
|
|
124
|
+
* Configuration object for customizing labels, placeholders, and icons.
|
|
125
|
+
* Accepts partial configuration to override defaults.
|
|
126
|
+
*/
|
|
127
|
+
set config(value: Partial<ChatConfig>);
|
|
128
|
+
get config(): Partial<ChatConfig>;
|
|
129
|
+
/**
|
|
130
|
+
* Handles message submission when the user sends a message.
|
|
131
|
+
* Emits the onMessage event and clears the input.
|
|
132
|
+
* @param $event - The event object from the form submission
|
|
133
|
+
*/
|
|
134
|
+
sendMessage($event: Event): void;
|
|
135
|
+
/**
|
|
136
|
+
* Handles cancellation of ongoing operations during loading state.
|
|
137
|
+
* Emits the onCancel event.
|
|
138
|
+
*/
|
|
139
|
+
cancel(): void;
|
|
140
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AiChatComponent, never>;
|
|
141
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AiChatComponent, "c8y-ai-chat", never, { "isLoading": { "alias": "isLoading"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "prompt": { "alias": "prompt"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, { "onMessage": "onMessage"; "onCancel": "onCancel"; }, ["messages"], ["c8y-ai-chat-message", "*", "c8y-ai-chat-suggestion"], true, never>;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export { AiChatComponent, AiChatMessageActionComponent, AiChatMessageComponent, AiChatSuggestionComponent };
|
|
145
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../../../ai/ai-chat/ai-chat-message-action.component.ts","../../../ai/ai-chat/ai-chat-message.component.ts","../../../ai/ai-chat/ai-chat-suggestion.component.ts","../../../ai/ai-chat/ai-chat.component.ts"],"sourcesContent":[null,null,null,null],"names":["_angular_core"],"mappings":";;;;;AAKA;;;AAGG;AACH,cAAA,4BAAA;AAOE;;AAEG;AAEH;AAEA;;AAEG;AAEH;AAEA;;AAEG;;AAIH;;AAEG;AAEH,WAAA,YAAA;;;AACD;;AC/BD,cAAA,sBAAA;mBAOeA,EAAA,CAAA,WAAA;sBACGA,EAAA,CAAA,WAAA,CAAA,SAAA;AAChB;AAEA;AAIA;;;;AAIG;wBACeA,EAAA,CAAA,MAAA;AASlB;;;;AAIG;sCAC6BA,EAAA,CAAA,MAAA;;;AAcjC;;ACnDD;;;AAGG;AACH,cAAA,yBAAA;AAOE;;AAEG;;AAIH;;AAEG;;AAIH;;AAEG;;AAIH;;AAEG;AAEH;AAEA;;AAEG;AAEH;AAEA;;AAEG;AAEH,uBAAA,YAAA,CAAA,SAAA;AAEA;;AAEG;;;;AAQJ;;ACtDD;;;;AAIG;AACH,cAAA,eAAA;AAQE;;;AAGG;AAEH;AAEA;;AAEG;AAEH;AAEA;;AAEG;AAEH;AAEA;;;AAGG;AAEH,eAAA,YAAA,CAAA,SAAA;AAEA;;AAEG;AAEH,cAAA,YAAA;AAEA;;AAEG;AACsC,cAAA,SAAA,CAAA,sBAAA;;;AAoBzC;;;AAGG;;AAKH,kBAAA,OAAA,CAAA,UAAA;AAIA;;;;AAIG;AACH,wBAAA,KAAA;AAWA;;;AAGG;AACH;;;AAGD;;;;"}
|
package/ai/index.d.ts
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Type } from '@angular/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { FetchClient } from '@c8y/client';
|
|
5
|
+
|
|
6
|
+
interface AIMessageStreamSteps extends AIMessage {
|
|
7
|
+
componentSteps$?: Observable<{
|
|
8
|
+
content: Type<any> | string;
|
|
9
|
+
origin: AgentStep;
|
|
10
|
+
}[]>;
|
|
11
|
+
}
|
|
12
|
+
interface AIMessage {
|
|
13
|
+
role: 'user' | 'assistant';
|
|
14
|
+
content: string;
|
|
15
|
+
options?: AIMessageOptions;
|
|
16
|
+
steps?: Array<AgentStep>;
|
|
17
|
+
finishReason?: 'stop' | 'error' | 'tool_use';
|
|
18
|
+
timestamp?: string;
|
|
19
|
+
}
|
|
20
|
+
interface AIMessageOptions {
|
|
21
|
+
skipToLLM?: boolean;
|
|
22
|
+
hiddenContent?: string;
|
|
23
|
+
variables?: {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
declare enum DataStreamType {
|
|
28
|
+
TEXT_DELTA = "text-delta",
|
|
29
|
+
TOOL_CALL = "tool-call",
|
|
30
|
+
TOOL_CALL_STREAMING = "tool-call-streaming",
|
|
31
|
+
TOOL_CALL_DELTA = "tool-call-delta",
|
|
32
|
+
TOOL_RESULT = "tool-result",
|
|
33
|
+
REASONING = "reasoning",
|
|
34
|
+
REASONING_DELTA = "reasoning-delta",
|
|
35
|
+
REDACTED_REASONING = "redacted-reasoning",
|
|
36
|
+
REASONING_SIGNATURE = "reasoning-signature",
|
|
37
|
+
FINISH_REASONING = "finish-reasoning",
|
|
38
|
+
FINISH = "finish",
|
|
39
|
+
FINISH_STEP = "finish-step",
|
|
40
|
+
ERROR = "error",
|
|
41
|
+
DATA = "data",
|
|
42
|
+
MESSAGE_ANNOTATIONS = "message-annotations",
|
|
43
|
+
SOURCE = "source",
|
|
44
|
+
FILE = "file",
|
|
45
|
+
STEP_START = "step-start",
|
|
46
|
+
STEP_FINISH = "step-finish"
|
|
47
|
+
}
|
|
48
|
+
type AgentStep = {
|
|
49
|
+
type: 'text' | 'reasoning' | string;
|
|
50
|
+
text: string;
|
|
51
|
+
reasoning?: string;
|
|
52
|
+
textDelta?: string;
|
|
53
|
+
toolCalls?: Array<ToolCall>;
|
|
54
|
+
toolResults?: Array<ToolResult>;
|
|
55
|
+
};
|
|
56
|
+
interface Tool {
|
|
57
|
+
toolName: string;
|
|
58
|
+
toolId: string;
|
|
59
|
+
type: 'tool-call' | 'tool-result';
|
|
60
|
+
}
|
|
61
|
+
interface ToolCall extends Tool {
|
|
62
|
+
arguments: {
|
|
63
|
+
[key: string]: any;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
interface ToolResult extends Tool {
|
|
67
|
+
result: {
|
|
68
|
+
content: {
|
|
69
|
+
text: string;
|
|
70
|
+
type: string;
|
|
71
|
+
}[];
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
interface ClientAgentDefinition {
|
|
75
|
+
/**
|
|
76
|
+
* If set to true, the agent will be created each time. This is useful for development.
|
|
77
|
+
*/
|
|
78
|
+
snapshot: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* The label of the agent that is shown to the user.
|
|
81
|
+
*/
|
|
82
|
+
label: string;
|
|
83
|
+
/**
|
|
84
|
+
* The definitions of the agent.
|
|
85
|
+
*
|
|
86
|
+
* You can use multiple definitions that can be used in an agent-2-agent scenario
|
|
87
|
+
* The first definition is the entry point.
|
|
88
|
+
*/
|
|
89
|
+
definitions: {
|
|
90
|
+
name: string;
|
|
91
|
+
type: 'object' | 'text';
|
|
92
|
+
agent: {
|
|
93
|
+
system: string;
|
|
94
|
+
[key: string]: any;
|
|
95
|
+
};
|
|
96
|
+
mcp: Array<{
|
|
97
|
+
serverName: string;
|
|
98
|
+
tools: string[];
|
|
99
|
+
}>;
|
|
100
|
+
}[];
|
|
101
|
+
}
|
|
102
|
+
interface ChatConfig {
|
|
103
|
+
title: string;
|
|
104
|
+
headline: string;
|
|
105
|
+
welcomeText: string;
|
|
106
|
+
placeholder: string;
|
|
107
|
+
sendButtonText: string;
|
|
108
|
+
cancelButtonText: string;
|
|
109
|
+
disclaimerText: string;
|
|
110
|
+
userInterfaceIcons: {
|
|
111
|
+
send: string;
|
|
112
|
+
cancel: string;
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
interface AgentHealthCheckResponse {
|
|
116
|
+
/**
|
|
117
|
+
* Indicates if the agent exists and can be used.
|
|
118
|
+
* If false, the agent was not found.
|
|
119
|
+
*/
|
|
120
|
+
exists: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Indicates if the user can create the agent, and if a global provider is configured.
|
|
123
|
+
*/
|
|
124
|
+
canCreate: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Indicates if the provider is configured.
|
|
127
|
+
* If false, the agent cannot be created as the provider is not configured.
|
|
128
|
+
*/
|
|
129
|
+
isProviderConfigured: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* If canCreate or exist is false, this array contains messages
|
|
132
|
+
* that explain why the agent cannot be used or created.
|
|
133
|
+
*/
|
|
134
|
+
messages?: string[];
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
declare class AIService {
|
|
138
|
+
private client;
|
|
139
|
+
private baseUrl;
|
|
140
|
+
constructor(client: FetchClient);
|
|
141
|
+
createOrUpdateAgent(agentsDef: ClientAgentDefinition): Promise<void>;
|
|
142
|
+
/**
|
|
143
|
+
* Check if an agent exists.
|
|
144
|
+
* @param name Agent name
|
|
145
|
+
* @returns Agent health check response.
|
|
146
|
+
*/
|
|
147
|
+
getAgentHealth(name: string): Promise<AgentHealthCheckResponse>;
|
|
148
|
+
/**
|
|
149
|
+
* Send a text message to the agent.
|
|
150
|
+
* @param name Agent name
|
|
151
|
+
* @param messages Messages to send
|
|
152
|
+
* @param variables Variables to include
|
|
153
|
+
* @returns Text response from the agent.
|
|
154
|
+
*/
|
|
155
|
+
text(name: string, messages: AIMessage[], variables: {
|
|
156
|
+
[key: string]: any;
|
|
157
|
+
}): Promise<string>;
|
|
158
|
+
/**
|
|
159
|
+
* Stream a text message to the agent.
|
|
160
|
+
* @param agentName Agent name
|
|
161
|
+
* @param messages Messages to send
|
|
162
|
+
* @param variables Variables to include
|
|
163
|
+
* @param abortController An AbortController to cancel the request.
|
|
164
|
+
* @returns An observable that emits partial AIMessage objects as they are received. The observable can be cancelled using the provided AbortController.
|
|
165
|
+
* The observable will emit an error if the request fails or is aborted.
|
|
166
|
+
* The observable will complete when the stream is finished.
|
|
167
|
+
*
|
|
168
|
+
* The messages sent to the agent can include special options:
|
|
169
|
+
* - `hiddenContent`: If set, this content will be sent to the agent instead of the `content` field.
|
|
170
|
+
* - `skipToLLM`: If set to true, this message will be skipped when sending to the agent.
|
|
171
|
+
*
|
|
172
|
+
* Example usage:
|
|
173
|
+
* ```typescript
|
|
174
|
+
* const abortController = new AbortController();
|
|
175
|
+
* const messages: AIMessage[] = [
|
|
176
|
+
* { role: 'user', content: 'Hello' },
|
|
177
|
+
* { role: 'assistant', content: 'Hi there!' },
|
|
178
|
+
* { role: 'user', content: 'Tell me a joke.', options: { hiddenContent: 'Tell me a joke about cats.' } }
|
|
179
|
+
* ];
|
|
180
|
+
* const observable = aiService.stream$('my-agent', messages, {}, abortController);
|
|
181
|
+
* const subscription = observable.subscribe({
|
|
182
|
+
* next: (message) => console.log('Received message part:', message),
|
|
183
|
+
* error: (err) => console.error('Error:', err),
|
|
184
|
+
* complete: () => console.log('Stream complete')
|
|
185
|
+
* });
|
|
186
|
+
*
|
|
187
|
+
* // To cancel the request:
|
|
188
|
+
* abortController.abort();
|
|
189
|
+
* subscription.unsubscribe();
|
|
190
|
+
* ```
|
|
191
|
+
*/
|
|
192
|
+
stream$(agentName: string, messages: AIMessage[], variables: {
|
|
193
|
+
[key: string]: any;
|
|
194
|
+
}, abortController: AbortController): Promise<Observable<AIMessage>>;
|
|
195
|
+
private parseMessages;
|
|
196
|
+
private processLine;
|
|
197
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AIService, never>;
|
|
198
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AIService>;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export { AIService, DataStreamType };
|
|
202
|
+
export type { AIMessage, AIMessageOptions, AIMessageStreamSteps, AgentHealthCheckResponse, AgentStep, ChatConfig, ClientAgentDefinition, Tool, ToolCall, ToolResult };
|
|
203
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../../ai/ai.model.ts","../../ai/ai.service.ts"],"sourcesContent":[null,null],"names":[],"mappings":";;;;;AAGM;;AAC2B;;AAAgD;AAChF;;AAGC;;;AAGA;AACA;;AAED;;;;AAKC;AAAc;;AACf;AAED;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD;AAEK;AACJ;;;;AAIA;AACA;;;;;AAMA;AACD;AAEK;AACJ;AAAa;;AACd;AAEK;AACJ;AACE;;;AAGC;;AAEJ;;AAGC;;AAEG;;AAEH;;AAEG;;AAEH;;;;;AAKG;AACH;;AAEE;AACA;;AAEE;;;;;AAEgD;AACnD;AACF;;;;;;;;;AAUC;;;;AACD;;AAGC;;;AAGG;;AAEH;;AAEG;;AAEH;;;AAGG;;AAEH;;;AAGG;AACH;AACD;;ACvHD;AAMc;;AAAQ;;AAuBpB;;;;AAIG;;AAkBH;;;;;;AAMG;;AAIY;;AAkBf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCG;;AAIY;;AAyEf;AAiBA;;;AA6ED;;;"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import * as i1 from '@c8y/ngx-components/context-dashboard';
|
|
3
|
+
import { AddDashboardFactory, DashboardActionBarFactory } from '@c8y/ngx-components/context-dashboard';
|
|
4
|
+
import { ViewContext } from '@c8y/ngx-components';
|
|
3
5
|
|
|
4
6
|
declare class AddDeviceContextDashboardModule {
|
|
5
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<AddDeviceContextDashboardModule, never>;
|
|
@@ -7,5 +9,17 @@ declare class AddDeviceContextDashboardModule {
|
|
|
7
9
|
static ɵinj: i0.ɵɵInjectorDeclaration<AddDeviceContextDashboardModule>;
|
|
8
10
|
}
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
declare class AddDeviceDashboardFactory extends AddDashboardFactory {
|
|
13
|
+
protected targetContext: ViewContext.Device | ViewContext.Group;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AddDeviceDashboardFactory, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AddDeviceDashboardFactory>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare class DeviceDashboardActionBarFactory extends DashboardActionBarFactory {
|
|
19
|
+
protected targetContext: ViewContext.Device | ViewContext.Group;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DeviceDashboardActionBarFactory, never>;
|
|
21
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DeviceDashboardActionBarFactory>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { AddDeviceContextDashboardModule, AddDeviceDashboardFactory, DeviceDashboardActionBarFactory };
|
|
11
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sources":["../../../../context-dashboard/device/add/add-device-context-dashboard.module.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../../../../context-dashboard/device/add/add-device-context-dashboard.module.ts","../../../../context-dashboard/device/add/add-device-dashboard.factory.ts","../../../../context-dashboard/device/add/device-dashboard-action-bar.factory.ts"],"sourcesContent":[null,null,null],"names":[],"mappings":";;;;;AAkBA,cAAA,+BAAA;;;;AAkB+C;;AChC/C,cAAA,yBAAA,SAAA,mBAAA;;;;AAKC;;ACLD,cAAA,+BAAA,SAAA,yBAAA;;;;AAKC;;;;"}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ActivatedRouteSnapshot } from '@angular/router';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { Tab } from '@c8y/ngx-components';
|
|
2
4
|
import * as i1 from '@c8y/ngx-components/context-dashboard';
|
|
5
|
+
import { ContextDashboardService } from '@c8y/ngx-components/context-dashboard';
|
|
6
|
+
import * as i0 from '@angular/core';
|
|
7
|
+
|
|
8
|
+
declare class DeviceDashboardGuard {
|
|
9
|
+
private contextDashboardService;
|
|
10
|
+
constructor(contextDashboardService: ContextDashboardService);
|
|
11
|
+
canActivate(route: ActivatedRouteSnapshot): Observable<boolean | Tab[]>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DeviceDashboardGuard, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DeviceDashboardGuard>;
|
|
14
|
+
}
|
|
3
15
|
|
|
4
16
|
declare class ViewDeviceContextDashboardModule {
|
|
5
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<ViewDeviceContextDashboardModule, never>;
|
|
@@ -7,5 +19,5 @@ declare class ViewDeviceContextDashboardModule {
|
|
|
7
19
|
static ɵinj: i0.ɵɵInjectorDeclaration<ViewDeviceContextDashboardModule>;
|
|
8
20
|
}
|
|
9
21
|
|
|
10
|
-
export { ViewDeviceContextDashboardModule };
|
|
22
|
+
export { DeviceDashboardGuard, ViewDeviceContextDashboardModule };
|
|
11
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sources":["../../../../context-dashboard/device/view/view-device-context-dashboard.module.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../../../../context-dashboard/device/view/device-dashboard.guard.ts","../../../../context-dashboard/device/view/view-device-context-dashboard.module.ts"],"sourcesContent":[null,null],"names":[],"mappings":";;;;;;;AASA,cAAA,oBAAA;AAEc;AAAQ,yCAAA,uBAAA;;;;AAQrB;;ACVD,cAAA,gCAAA;;;;AAegD;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
|
|
4
|
+
declare const DM_DASHBOARD_MANAGER_PREVIEW_KEY = "ui.dm-dashboard-manager";
|
|
5
|
+
declare function canActivateDashboardManager(): Observable<boolean>;
|
|
6
|
+
declare const addDeviceContextDashboardFeatureProvider: (_angular_core.EnvironmentProviders | _angular_core.ValueProvider | _angular_core.ClassProvider | _angular_core.ExistingProvider)[];
|
|
7
|
+
declare const viewDeviceContextDashboardFeatureProvider: (_angular_core.EnvironmentProviders | _angular_core.ValueProvider | _angular_core.ClassProvider | _angular_core.ExistingProvider)[];
|
|
8
|
+
|
|
9
|
+
export { DM_DASHBOARD_MANAGER_PREVIEW_KEY, addDeviceContextDashboardFeatureProvider, canActivateDashboardManager, viewDeviceContextDashboardFeatureProvider };
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../../../context-dashboard/devicemanagement/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAqBA,cAAA,gCAAA;AAEA,iBAAA,2BAAA,IAAA,UAAA;AAKA,cAAA,wCAAA,GAAqD,aAAA,CAAA,oBAAA,GAAA,aAAA,CAAA,aAAA,GAAA,aAAA,iBAAA,aAAA,CAAA,gBAAA;AAiBrD,cAAA,yCAAA,GAAsD,aAAA,CAAA,oBAAA,GAAA,aAAA,CAAA,aAAA,GAAA,aAAA,iBAAA,aAAA,CAAA,gBAAA;;;;"}
|
|
@@ -63,22 +63,6 @@ interface ContextDashboardConfig {
|
|
|
63
63
|
*/
|
|
64
64
|
routes?: Route[];
|
|
65
65
|
}
|
|
66
|
-
/**
|
|
67
|
-
* Defines how the widget configuration is changed.
|
|
68
|
-
*/
|
|
69
|
-
declare const WidgetConfigChangeMode: {
|
|
70
|
-
/**
|
|
71
|
-
* The properties are assigned, the config object instance remains the same.
|
|
72
|
-
* This is used for legacy widgets, which are using the config object to exchange data.
|
|
73
|
-
* You should use `EMIT` for new widgets and listen to the `currentConfig$` observable.
|
|
74
|
-
*/
|
|
75
|
-
readonly ASSIGN: "ASSIGN";
|
|
76
|
-
/**
|
|
77
|
-
* A new config object is emitted on each change.
|
|
78
|
-
*/
|
|
79
|
-
readonly EMIT: "EMIT";
|
|
80
|
-
};
|
|
81
|
-
type WidgetConfigChangeMode = (typeof WidgetConfigChangeMode)[keyof typeof WidgetConfigChangeMode];
|
|
82
66
|
interface ContextWidgetConfig {
|
|
83
67
|
/**
|
|
84
68
|
* Settings that define how the default config component is
|
|
@@ -393,6 +377,7 @@ declare class ContextDashboardService {
|
|
|
393
377
|
private groupService;
|
|
394
378
|
private optionsService;
|
|
395
379
|
private appStateService;
|
|
380
|
+
private contextRouteService;
|
|
396
381
|
dashboardTabs$: Observable$1<Tab[]>;
|
|
397
382
|
formDisabled$: Observable$1<boolean>;
|
|
398
383
|
readonly REPORT_PARTIAL_NAME = "report_";
|
|
@@ -414,7 +399,7 @@ declare class ContextDashboardService {
|
|
|
414
399
|
private readonly HIDE_TYPE_DASHBOARD_FOR_ASSETS;
|
|
415
400
|
get formDisabled(): boolean;
|
|
416
401
|
set formDisabled(value: boolean);
|
|
417
|
-
constructor(inventory: InventoryService, tabs: TabsService, modal: ModalService, translateService: TranslateService, router: Router, navigator: NavigatorService, permissions: Permissions, alert: AlertService, dynamicComponent: DynamicComponentService, groupService: GroupService, optionsService: OptionsService, appStateService: AppStateService);
|
|
402
|
+
constructor(inventory: InventoryService, tabs: TabsService, modal: ModalService, translateService: TranslateService, router: Router, navigator: NavigatorService, permissions: Permissions, alert: AlertService, dynamicComponent: DynamicComponentService, groupService: GroupService, optionsService: OptionsService, appStateService: AppStateService, contextRouteService: ContextRouteService);
|
|
418
403
|
create(dashboardCfg: ContextDashboard, context?: ContextData, name?: string): Promise<ContextDashboardManagedObject>;
|
|
419
404
|
detail(dashboardMO: ContextDashboardManagedObject): Promise<IManagedObject>;
|
|
420
405
|
update(dashboard: ContextDashboardManagedObject, context?: ContextData): Promise<ContextDashboardManagedObject>;
|
|
@@ -906,6 +891,8 @@ declare class ContextDashboardComponent implements OnInit, OnDestroy, CanDeactiv
|
|
|
906
891
|
* Hides dashboard availability selection.
|
|
907
892
|
*/
|
|
908
893
|
hideAvailability: boolean;
|
|
894
|
+
/** Explicitly set the dashboard in `disabled` state, e.g. to create read-only dashboard */
|
|
895
|
+
isDisabled: i0.InputSignal<boolean>;
|
|
909
896
|
class: string;
|
|
910
897
|
dashboardDetails: DashboardDetailComponent;
|
|
911
898
|
widgetsDashboard: WidgetsDashboardComponent;
|
|
@@ -1032,7 +1019,7 @@ declare class ContextDashboardComponent implements OnInit, OnDestroy, CanDeactiv
|
|
|
1032
1019
|
private extractDefaultDashboardName;
|
|
1033
1020
|
private convertStringToHash;
|
|
1034
1021
|
static ɵfac: i0.ɵɵFactoryDeclaration<ContextDashboardComponent, never>;
|
|
1035
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ContextDashboardComponent, "c8y-context-dashboard", never, { "name": { "alias": "name"; "required": false; }; "childrenClasses": { "alias": "childrenClasses"; "required": false; }; "context": { "alias": "context"; "required": false; }; "setTitle": { "alias": "setTitle"; "required": false; }; "defaultWidgets": { "alias": "defaultWidgets"; "required": false; }; "_canCopy": { "alias": "canCopy"; "required": false; }; "canDelete": { "alias": "canDelete"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "breadcrumbSettings": { "alias": "breadcrumbSettings"; "required": false; }; "showContextHelpButton": { "alias": "showContextHelpButton"; "required": false; }; "translateWidgetTitle": { "alias": "translateWidgetTitle"; "required": false; }; "translateDashboardTitle": { "alias": "translateDashboardTitle"; "required": false; }; "hideAvailability": { "alias": "hideAvailability"; "required": false; }; }, {}, never, never, true, never>;
|
|
1022
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ContextDashboardComponent, "c8y-context-dashboard", never, { "name": { "alias": "name"; "required": false; }; "childrenClasses": { "alias": "childrenClasses"; "required": false; }; "context": { "alias": "context"; "required": false; }; "setTitle": { "alias": "setTitle"; "required": false; }; "defaultWidgets": { "alias": "defaultWidgets"; "required": false; }; "_canCopy": { "alias": "canCopy"; "required": false; }; "canDelete": { "alias": "canDelete"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "breadcrumbSettings": { "alias": "breadcrumbSettings"; "required": false; }; "showContextHelpButton": { "alias": "showContextHelpButton"; "required": false; }; "translateWidgetTitle": { "alias": "translateWidgetTitle"; "required": false; }; "translateDashboardTitle": { "alias": "translateDashboardTitle"; "required": false; }; "hideAvailability": { "alias": "hideAvailability"; "required": false; }; "isDisabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1036
1023
|
}
|
|
1037
1024
|
|
|
1038
1025
|
declare class AppearanceSettingsComponent {
|
|
@@ -1199,7 +1186,6 @@ interface WidgetConfigSectionBase<T> {
|
|
|
1199
1186
|
declare class WidgetConfigSectionService extends ExtensionPointForPlugins<WidgetConfigSectionDefinition> {
|
|
1200
1187
|
private router;
|
|
1201
1188
|
private plugins;
|
|
1202
|
-
private readonly DEFAULT_WAIT_TIME;
|
|
1203
1189
|
constructor(rootInjector: Injector, router: Router, plugins: PluginsResolveService);
|
|
1204
1190
|
get state(): Set<WidgetConfigSectionDefinition<any>>;
|
|
1205
1191
|
add(component: WidgetConfigSectionDefinition): void;
|
|
@@ -1232,16 +1218,6 @@ declare class WidgetConfigService {
|
|
|
1232
1218
|
* The currently selected widget component.
|
|
1233
1219
|
*/
|
|
1234
1220
|
selectedComponent$: BehaviorSubject<DynamicComponentComponent>;
|
|
1235
|
-
/**
|
|
1236
|
-
* The mode of handling changes in the widget configuration.
|
|
1237
|
-
* - `ASSIGN`: The configuration changes are assigned to the current configuration object.
|
|
1238
|
-
* - `EMIT`: The configuration changes are emitted via the `updateConfig` method.
|
|
1239
|
-
*
|
|
1240
|
-
* Default is `EMIT`. The `ASSIGN` mode should be used for old widgets using the
|
|
1241
|
-
* `@Input config` property to get the configuration. New widgets should use the
|
|
1242
|
-
* `updateConfig` and `currentConfig$` observable to set or get the configuration.
|
|
1243
|
-
*/
|
|
1244
|
-
changeMode$: BehaviorSubject<WidgetConfigChangeMode>;
|
|
1245
1221
|
/**
|
|
1246
1222
|
* The current configuration of the selected widget.
|
|
1247
1223
|
* Only to read the value. Use `updateConfig` to update the configuration.
|
|
@@ -1717,6 +1693,6 @@ declare class WidgetConfigFeedbackComponent implements AfterViewInit {
|
|
|
1717
1693
|
static ɵcmp: i0.ɵɵComponentDeclaration<WidgetConfigFeedbackComponent, "c8y-widget-config-feedback", never, {}, {}, never, ["*"], true, never>;
|
|
1718
1694
|
}
|
|
1719
1695
|
|
|
1720
|
-
export { ALL_GLOBAL_ROLES_SELECTED, AddDashboardComponent, AddDashboardFactory, AppearanceSettingsComponent, CONTEXT_DASHBOARD_CONFIG, ContextDashboardComponent, ContextDashboardModule, ContextDashboardService, ContextDashboardType, DASHBOARD_CHILDREN_STATE_NAME, DASHBOARD_DETAILS_OUTLET, DASHBOARD_DETAILS_TABS_OUTLET_NAME, DASHBOARD_SETTINGS_CHANGES, DASHBOARD_THEME_CLASSES, DashboardActionBarFactory, DashboardDetailComponent, DashboardDetailService, DashboardDetailsTabId, DeviceInfoDashboardComponent, DeviceInfoDashboardModule, DeviceManagementHomeDashboardComponent, DeviceManagementHomeDashboardModule, GlobalContextSectionComponent, HOOK_WIDGET_CONFIG, NewDashboardGuard, PRODUCT_EXPERIENCE, PasteDashboardActionComponent, REPORT_DEFAULT_NAVIGATION_NODE_PRIORITY, STYLING_CLASS_PREFIXES, TypeDashboardInfoComponent, WIDGET_CONTENT_CLASSES, WIDGET_HEADER_CLASSES, WidgetAssetSelectorComponent, WidgetConfigAppearanceComponent,
|
|
1696
|
+
export { ALL_GLOBAL_ROLES_SELECTED, AddDashboardComponent, AddDashboardFactory, AppearanceSettingsComponent, CONTEXT_DASHBOARD_CONFIG, ContextDashboardComponent, ContextDashboardModule, ContextDashboardService, ContextDashboardType, DASHBOARD_CHILDREN_STATE_NAME, DASHBOARD_DETAILS_OUTLET, DASHBOARD_DETAILS_TABS_OUTLET_NAME, DASHBOARD_SETTINGS_CHANGES, DASHBOARD_THEME_CLASSES, DashboardActionBarFactory, DashboardDetailComponent, DashboardDetailService, DashboardDetailsTabId, DeviceInfoDashboardComponent, DeviceInfoDashboardModule, DeviceManagementHomeDashboardComponent, DeviceManagementHomeDashboardModule, GlobalContextSectionComponent, HOOK_WIDGET_CONFIG, NewDashboardGuard, PRODUCT_EXPERIENCE, PasteDashboardActionComponent, REPORT_DEFAULT_NAVIGATION_NODE_PRIORITY, STYLING_CLASS_PREFIXES, TypeDashboardInfoComponent, WIDGET_CONTENT_CLASSES, WIDGET_HEADER_CLASSES, WidgetAssetSelectorComponent, WidgetConfigAppearanceComponent, WidgetConfigComponent, WidgetConfigFeedbackComponent, WidgetConfigGeneralComponent, WidgetConfigSectionComponent, WidgetConfigSectionService, WidgetConfigService, WidgetPreviewComponent, WidgetPreviewWrapperComponent, WidgetService, hookWidgetConfig, newDashboardTab };
|
|
1721
1697
|
export type { AllowTypeDashboard, CanDeactivateComponent, ContextDashboard, ContextDashboardConfig, ContextDashboardManagedObject, ContextWidgetConfig, DashboardAndWidgetThemeDefinition, DashboardChildrenState, DashboardContext, DashboardCopyClipboard, DashboardDetailsTabs, DashboardGlobalRoles, DashboardHistoryDescription, DashboardMetadata, WidgetConfigSection, WidgetConfigSectionBase, WidgetConfigSectionDefinition, WidgetConfigSectionExtension };
|
|
1722
1698
|
//# sourceMappingURL=index.d.ts.map
|