@siemens/element-ng 48.3.0 → 48.5.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/accordion/index.d.ts +0 -1
- package/chat-messages/index.d.ts +176 -156
- package/dashboard/index.d.ts +2 -3
- package/fesm2022/siemens-element-ng-accordion.mjs +2 -3
- package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-chat-messages.mjs +291 -168
- package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-dashboard.mjs +7 -11
- package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datepicker.mjs +5 -3
- package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filtered-search.mjs +4 -8
- package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-loading-spinner.mjs +2 -2
- package/fesm2022/siemens-element-ng-loading-spinner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs +21 -24
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-select.mjs +4 -0
- package/fesm2022/siemens-element-ng-select.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-side-panel.mjs +3 -5
- package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-bar.mjs +3 -4
- package/fesm2022/siemens-element-ng-status-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tour.mjs +58 -21
- package/fesm2022/siemens-element-ng-tour.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tree-view.mjs +4 -4
- package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
- package/filtered-search/index.d.ts +6 -7
- package/navbar-vertical/index.d.ts +3 -4
- package/package.json +15 -15
- package/schematics/migrations/action-modal-migration/action-modal-migration.js +45 -4
- package/schematics/migrations/data/output-names.js +0 -1
- package/schematics/migrations/data/symbol-removals.js +0 -9
- package/schematics/migrations/element-migration/element-migration.js +1 -9
- package/schematics/migrations/wizard-migration/index.js +2 -10
- package/schematics/ts-import-to-siemens-migration/index.js +130 -25
- package/schematics/ts-import-to-siemens-migration/mappings/charts-ng-mappings.js +2 -1
- package/schematics/ts-import-to-siemens-migration/mappings/dashboards-ng-mappings.js +3 -1
- package/schematics/ts-import-to-siemens-migration/mappings/element-ng-mappings.js +54 -0
- package/schematics/ts-import-to-siemens-migration/mappings/element-translate-ng-mappings.js +1 -1
- package/schematics/ts-import-to-siemens-migration/mappings/index.js +1 -0
- package/schematics/ts-import-to-siemens-migration/mappings/maps-ng-mappings.js +2 -1
- package/schematics/ts-import-to-siemens-migration/mappings/native-charts-ng-mappings.js +33 -0
- package/schematics/utils/project-utils.js +1 -1
- package/schematics/utils/schematics-file-system.js +1 -1
- package/schematics/utils/template-utils.js +5 -5
- package/schematics/utils/ts-utils.js +1 -1
- package/select/index.d.ts +5 -0
- package/status-bar/index.d.ts +0 -1
- package/template-i18n.json +1 -0
- package/tour/index.d.ts +4 -2
- package/translate/index.d.ts +1 -0
package/accordion/index.d.ts
CHANGED
|
@@ -69,7 +69,6 @@ declare class SiCollapsiblePanelComponent {
|
|
|
69
69
|
protected headerId: string;
|
|
70
70
|
protected isHCollapsible: boolean;
|
|
71
71
|
protected readonly icons: Record<"elementDown2", string>;
|
|
72
|
-
private readonly destroyRef;
|
|
73
72
|
private readonly accordionService;
|
|
74
73
|
private readonly accordionHCollapseService;
|
|
75
74
|
private enableAnimation;
|
package/chat-messages/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _siemens_element_translate_ng_translate_types from '@siemens/element-translate-ng/translate-types';
|
|
2
2
|
import { TranslatableString } from '@siemens/element-translate-ng/translate-types';
|
|
3
3
|
import * as _angular_core from '@angular/core';
|
|
4
|
-
import { ElementRef, TemplateRef, AfterViewInit } from '@angular/core';
|
|
4
|
+
import { ElementRef, TemplateRef, AfterContentInit, OnDestroy, AfterViewInit } from '@angular/core';
|
|
5
5
|
import { MenuItem } from '@siemens/element-ng/menu';
|
|
6
6
|
import { SiModalService } from '@siemens/element-ng/modal';
|
|
7
7
|
import { FileUploadError, UploadFile } from '@siemens/element-ng/file-uploader';
|
|
@@ -14,8 +14,12 @@ import * as i1 from '@siemens/element-ng/resize-observer';
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* Actions for messages representing an action with icon, label (for accessibility), and handler.
|
|
17
|
+
* Actions for messages representing an action with icon, label (for accessibility), and handler, for use within {@link SiAiMessageComponent} and {@link SiUserMessageComponent}.
|
|
18
18
|
* Only the icon will be displayed.
|
|
19
|
+
*
|
|
20
|
+
* @see {@link SiAiMessageComponent} for the AI message
|
|
21
|
+
* @see {@link SiUserMessageComponent} for thee user message
|
|
22
|
+
*
|
|
19
23
|
* @experimental
|
|
20
24
|
*/
|
|
21
25
|
interface MessageAction {
|
|
@@ -39,63 +43,18 @@ interface MessageAction {
|
|
|
39
43
|
* The AI message component renders AI-generated content in chat interfaces,
|
|
40
44
|
* supporting text formatting, markdown, loading states, and contextual actions.
|
|
41
45
|
* It appears as text (no bubble) aligned to the left side without any avatar/icon slot.
|
|
42
|
-
*
|
|
43
|
-
* @remarks
|
|
44
|
-
* This component is designed for use in:
|
|
45
|
-
* - AI chat interfaces where model responses need to be displayed
|
|
46
|
-
* - Chatbot implementations
|
|
47
|
-
* - Conversational AI applications
|
|
48
|
-
* - AI assistant interfaces
|
|
46
|
+
* Can be used within {@link SiChatContainerComponent}.
|
|
49
47
|
*
|
|
50
48
|
* The component automatically handles:
|
|
51
|
-
* -
|
|
49
|
+
* - Styling for AI messages distinct from user or generic chat messages
|
|
50
|
+
* - Option to render markdown content, provide via `contentFormatter` input with a markdown renderer function (e.g., from {@link getMarkdownRenderer})
|
|
52
51
|
* - Showing loading states with skeleton UI during generation
|
|
53
|
-
* - Displaying primary and secondary actions
|
|
54
|
-
* - Proper alignment and styling for AI messages
|
|
55
|
-
* - Content sanitization for security
|
|
56
|
-
*
|
|
57
|
-
* @example
|
|
58
|
-
* Basic usage with content only:
|
|
59
|
-
* ```html
|
|
60
|
-
* <si-ai-message [content]="'I can help you with that.'" />
|
|
61
|
-
* ```
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* With loading state and actions:
|
|
65
|
-
* ```typescript
|
|
66
|
-
* import { Component } from '@angular/core';
|
|
67
|
-
* import { SiAiMessageComponent } from '@siemens/element-ng/chat-messages';
|
|
68
|
-
*
|
|
69
|
-
* @Component({
|
|
70
|
-
* selector: 'app-chat',
|
|
71
|
-
* imports: [SiAiMessageComponent],
|
|
72
|
-
* template: `
|
|
73
|
-
* <si-ai-message
|
|
74
|
-
* [content]="message.text"
|
|
75
|
-
* [loading]="message.isGenerating"
|
|
76
|
-
* [actions]="messageActions"
|
|
77
|
-
* [secondaryActions]="menuActions"
|
|
78
|
-
* [actionParam]="message"
|
|
79
|
-
* />
|
|
80
|
-
* `
|
|
81
|
-
* })
|
|
82
|
-
* export class ChatComponent {
|
|
83
|
-
* messageActions = [
|
|
84
|
-
* { icon: 'thumbs-up', label: 'Good response', action: (id) => this.ratePositive(id) },
|
|
85
|
-
* { icon: 'thumbs-down', label: 'Bad response', action: (id) => this.rateNegative(id) },
|
|
86
|
-
* { icon: 'copy', label: 'Copy', action: (id) => this.copyMessage(id) }
|
|
87
|
-
* ];
|
|
88
|
-
*
|
|
89
|
-
* menuActions = [
|
|
90
|
-
* { label: 'Regenerate', action: (id) => this.regenerate(id) },
|
|
91
|
-
* { label: 'Report', action: (id) => this.reportMessage(id) }
|
|
92
|
-
* ];
|
|
93
|
-
* }
|
|
94
|
-
* ```
|
|
52
|
+
* - Displaying primary and secondary actions
|
|
95
53
|
*
|
|
96
54
|
* @see {@link SiChatMessageComponent} for the base message wrapper component
|
|
97
|
-
* @see {@link SiUserMessageComponent} for the
|
|
55
|
+
* @see {@link SiUserMessageComponent} for the user message component
|
|
98
56
|
* @see {@link getMarkdownRenderer} for markdown formatting support
|
|
57
|
+
* @see {@link SiChatContainerComponent} for the chat container to use this within
|
|
99
58
|
*
|
|
100
59
|
* @experimental
|
|
101
60
|
*/
|
|
@@ -153,7 +112,11 @@ declare class SiAiMessageComponent {
|
|
|
153
112
|
}
|
|
154
113
|
|
|
155
114
|
/**
|
|
156
|
-
* Attachment item interface for file attachments in chat messages.
|
|
115
|
+
* Attachment item interface for file attachments in chat messages, used by {@link SiAttachmentListComponent} and inside {@link SiUserMessageComponent} as well as {@link SiChatInputComponent}.
|
|
116
|
+
*
|
|
117
|
+
* @see {@link SiAttachmentListComponent} for the attachment list component
|
|
118
|
+
* @see {@link SiUserMessageComponent} for the user message
|
|
119
|
+
* @see {@link SiChatInputComponent} for the chat input component
|
|
157
120
|
*
|
|
158
121
|
* @experimental
|
|
159
122
|
*/
|
|
@@ -170,55 +133,17 @@ interface Attachment {
|
|
|
170
133
|
* preview and remove functionality. It's designed to work with chat message components
|
|
171
134
|
* to show files that have been uploaded or shared in conversations.
|
|
172
135
|
*
|
|
173
|
-
* @remarks
|
|
174
136
|
* This component provides:
|
|
175
|
-
* -
|
|
137
|
+
* - A list of pills showing each attachment's name and an icon
|
|
176
138
|
* - Optional preview modal for attachments
|
|
177
139
|
* - Optional remove functionality for editable messages
|
|
178
|
-
* - Flexible alignment (start/end) to match message alignment
|
|
179
|
-
* - Support for various file types (images, videos, audio, documents, archives)
|
|
180
140
|
*
|
|
181
|
-
* The component is
|
|
182
|
-
* to display uploaded files, but can also be used standalone.
|
|
183
|
-
*
|
|
184
|
-
* @example
|
|
185
|
-
* Basic usage with attachments:
|
|
186
|
-
* ```html
|
|
187
|
-
* <si-attachment-list [attachments]="files" />
|
|
188
|
-
* ```
|
|
189
|
-
*
|
|
190
|
-
* @example
|
|
191
|
-
* With remove functionality and custom alignment:
|
|
192
|
-
* ```typescript
|
|
193
|
-
* import { Component } from '@angular/core';
|
|
194
|
-
* import { SiAttachmentListComponent, Attachment } from '@siemens/element-ng/chat-messages';
|
|
195
|
-
*
|
|
196
|
-
* @Component({
|
|
197
|
-
* selector: 'app-chat',
|
|
198
|
-
* imports: [SiAttachmentListComponent],
|
|
199
|
-
* template: `
|
|
200
|
-
* <si-attachment-list
|
|
201
|
-
* [attachments]="attachments"
|
|
202
|
-
* [alignment]="'end'"
|
|
203
|
-
* [removable]="true"
|
|
204
|
-
* (remove)="handleRemove($event)"
|
|
205
|
-
* />
|
|
206
|
-
* `
|
|
207
|
-
* })
|
|
208
|
-
* export class ChatComponent {
|
|
209
|
-
* attachments: Attachment[] = [
|
|
210
|
-
* { id: '1', name: 'report.pdf' },
|
|
211
|
-
* { id: '2', name: 'image.png', previewTemplate: this.imagePreview }
|
|
212
|
-
* ];
|
|
213
|
-
*
|
|
214
|
-
* handleRemove(attachment: Attachment) {
|
|
215
|
-
* this.attachments = this.attachments.filter(a => a !== attachment);
|
|
216
|
-
* }
|
|
217
|
-
* }
|
|
218
|
-
* ```
|
|
141
|
+
* The component is included within {@link SiUserMessageComponent}, {@link SiAiMessageComponent} and {@link SiChatInputComponent} but can also be used inside custom chat messages with {@link SiChatMessageComponent}
|
|
219
142
|
*
|
|
220
143
|
* @see {@link SiUserMessageComponent} for user message display
|
|
221
144
|
* @see {@link SiAiMessageComponent} for AI message display
|
|
145
|
+
* @see {@link SiChatMessageComponent} for custom chat message display
|
|
146
|
+
* @see {@link SiChatInputComponent} for chat input with attachment support
|
|
222
147
|
* @see {@link Attachment} for attachment data structure
|
|
223
148
|
*
|
|
224
149
|
* @experimental
|
|
@@ -260,6 +185,98 @@ declare class SiAttachmentListComponent {
|
|
|
260
185
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiAttachmentListComponent, "si-attachment-list", never, { "attachments": { "alias": "attachments"; "required": false; "isSignal": true; }; "alignment": { "alias": "alignment"; "required": false; "isSignal": true; }; "removable": { "alias": "removable"; "required": false; "isSignal": true; }; "removeLabel": { "alias": "removeLabel"; "required": false; "isSignal": true; }; }, { "remove": "remove"; }, never, never, true, never>;
|
|
261
186
|
}
|
|
262
187
|
|
|
188
|
+
/**
|
|
189
|
+
* A declarative container component for displaying a chat interface with automatic scroll-to-bottom behavior.
|
|
190
|
+
*
|
|
191
|
+
* This component provides the layout and styling for a chat interface, managing scrolling behavior
|
|
192
|
+
* to keep the newest messages visible while respecting user scrolling actions. It automatically
|
|
193
|
+
* scrolls to the bottom when new content is added, unless the user has scrolled up to view older messages.
|
|
194
|
+
*
|
|
195
|
+
* Use via content projection:
|
|
196
|
+
* - Default content: Chat messages displayed in the scrollable messages container or something like an empty state.
|
|
197
|
+
* - `si-inline-notification` selector: Notification component displayed above the input area
|
|
198
|
+
* - `si-chat-input` or `[siChatContainerInput]` selector: Input controls for composing messages
|
|
199
|
+
*
|
|
200
|
+
* @see {@link SiChatInputComponent} for the chat input wrapper component
|
|
201
|
+
* @see {@link SiChatContainerInputDirective} for other input controls to slot in
|
|
202
|
+
* @see {@link SiAiMessageComponent} for AI messages to slot in
|
|
203
|
+
* @see {@link SiUserMessageComponent} for user messages (in AI chats) to slot in
|
|
204
|
+
* @see {@link SiChatMessageComponent} for the chat message wrapper component to slot in other messages
|
|
205
|
+
*
|
|
206
|
+
* @experimental
|
|
207
|
+
*/
|
|
208
|
+
declare class SiChatContainerComponent implements AfterContentInit, OnDestroy {
|
|
209
|
+
private readonly messagesContainer;
|
|
210
|
+
private readonly platformId;
|
|
211
|
+
private isUserAtBottom;
|
|
212
|
+
private scrollTimeout;
|
|
213
|
+
private resizeObserver;
|
|
214
|
+
private contentObserver;
|
|
215
|
+
/**
|
|
216
|
+
* The color variant to apply to the container.
|
|
217
|
+
* @defaultValue 'base-0'
|
|
218
|
+
*/
|
|
219
|
+
readonly colorVariant: _angular_core.InputSignal<string>;
|
|
220
|
+
/**
|
|
221
|
+
* Disables automatic scrolling to the bottom when new content is added.
|
|
222
|
+
* @defaultValue false
|
|
223
|
+
*/
|
|
224
|
+
readonly noAutoScroll: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
|
|
225
|
+
constructor();
|
|
226
|
+
ngAfterContentInit(): void;
|
|
227
|
+
ngOnDestroy(): void;
|
|
228
|
+
private scrollToBottom;
|
|
229
|
+
private debouncedScrollToBottom;
|
|
230
|
+
private setupResizeObserver;
|
|
231
|
+
private setupContentObserver;
|
|
232
|
+
private checkIfUserAtBottom;
|
|
233
|
+
protected onScroll(): void;
|
|
234
|
+
/**
|
|
235
|
+
* Focuses the messages container element.
|
|
236
|
+
*/
|
|
237
|
+
focus(): void;
|
|
238
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiChatContainerComponent, never>;
|
|
239
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiChatContainerComponent, "si-chat-container", never, { "colorVariant": { "alias": "colorVariant"; "required": false; "isSignal": true; }; "noAutoScroll": { "alias": "noAutoScroll"; "required": false; "isSignal": true; }; }, {}, never, ["*", "si-inline-notification", "si-chat-input,[siChatContainerInput]"], true, never>;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* A directive to mark elements as input controls within a {@link SiChatContainerComponent}.
|
|
244
|
+
*
|
|
245
|
+
* This directive is used to identify and style input elements that belong to
|
|
246
|
+
* the chat container component, typically applied to form inputs or textareas
|
|
247
|
+
* used for composing chat messages.
|
|
248
|
+
*
|
|
249
|
+
* @example
|
|
250
|
+
* ```html
|
|
251
|
+
* <si-chat-container>
|
|
252
|
+
* <si-chat-message>Hello!</si-chat-message>
|
|
253
|
+
* <si-chat-message>How are you?</si-chat-message>
|
|
254
|
+
*
|
|
255
|
+
* <input siChatContainerInput type="text" placeholder="Type a message..." />
|
|
256
|
+
* </si-chat-container>
|
|
257
|
+
* ```
|
|
258
|
+
*
|
|
259
|
+
* @see {@link SiChatContainerComponent} for the chat container wrapper component
|
|
260
|
+
*
|
|
261
|
+
* @experimental
|
|
262
|
+
*/
|
|
263
|
+
declare class SiChatContainerInputDirective {
|
|
264
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiChatContainerInputDirective, never>;
|
|
265
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SiChatContainerInputDirective, "[siChatContainerInput]", never, {}, {}, never, never, true, never>;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Attachment item interface for file attachments in chat messages, extension of {@link Attachment} for {@link SiAttachmentListComponent} to use within {@link SiChatInputComponent}.
|
|
270
|
+
* Adds the action file information.
|
|
271
|
+
* Can be used within {@link SiChatContainerComponent}.
|
|
272
|
+
*
|
|
273
|
+
* @see {@link Attachment} for base attachment interface
|
|
274
|
+
* @see {@link SiAttachmentListComponent} for the attachment list component
|
|
275
|
+
* @see {@link SiChatInputComponent} for the chat input component
|
|
276
|
+
* @see {@link SiChatContainerComponent} for the chat container component
|
|
277
|
+
*
|
|
278
|
+
* @experimental
|
|
279
|
+
*/
|
|
263
280
|
interface ChatInputAttachment extends Attachment {
|
|
264
281
|
/** File object */
|
|
265
282
|
file: File;
|
|
@@ -268,10 +285,33 @@ interface ChatInputAttachment extends Attachment {
|
|
|
268
285
|
/** MIME type */
|
|
269
286
|
type: string;
|
|
270
287
|
}
|
|
288
|
+
/**
|
|
289
|
+
* Chat input component for composing and sending messages in conversational interfaces.
|
|
290
|
+
*
|
|
291
|
+
* The chat input component provides a text area for users to compose messages,
|
|
292
|
+
* supporting text, attachments, and contextual actions. It appears as a textarea
|
|
293
|
+
* with buttons for adding attachments and sending messages, as well as an optional disclaimer.
|
|
294
|
+
*
|
|
295
|
+
* The component automatically handles:
|
|
296
|
+
* - Styling for chat input and actions.
|
|
297
|
+
* - Dynamic resizing of the textarea based on content.
|
|
298
|
+
* - Uploading of and displaying of attachments above the input area.
|
|
299
|
+
* - Displaying primary and secondary actions.
|
|
300
|
+
*
|
|
301
|
+
* Additionally to the inputs and outputs documented here, the component supports content projection via the following slots:
|
|
302
|
+
* - Default content: Custom action buttons to display inline, prefer using the `actions` input for buttons, can be used in addition.
|
|
303
|
+
* - `siChatInputDisclaimer` selector: Custom disclaimer content to display below the input area, prefer using the `disclaimer` input for simple text disclaimers.
|
|
304
|
+
*
|
|
305
|
+
* @see {@link SiAttachmentListComponent} for the base attachment component
|
|
306
|
+
* @see {@link SiChatInputDisclaimerDirective} to slot in custom disclaimer content
|
|
307
|
+
*
|
|
308
|
+
* @experimental
|
|
309
|
+
*/
|
|
271
310
|
declare class SiChatInputComponent implements AfterViewInit {
|
|
272
311
|
private static idCounter;
|
|
273
312
|
private readonly textInput;
|
|
274
313
|
private readonly projectedContent;
|
|
314
|
+
private readonly fileUploadDirective;
|
|
275
315
|
/**
|
|
276
316
|
* Current input value
|
|
277
317
|
* @defaultValue ''
|
|
@@ -436,6 +476,7 @@ declare class SiChatInputComponent implements AfterViewInit {
|
|
|
436
476
|
protected readonly buttonDisabled: _angular_core.Signal<boolean>;
|
|
437
477
|
protected readonly buttonIcon: _angular_core.Signal<string>;
|
|
438
478
|
protected readonly buttonLabel: _angular_core.Signal<TranslatableString$1>;
|
|
479
|
+
protected dragOver: boolean;
|
|
439
480
|
protected get attachmentList(): Attachment[];
|
|
440
481
|
protected onInputChange(value: string): void;
|
|
441
482
|
protected onSend(): void;
|
|
@@ -451,13 +492,15 @@ declare class SiChatInputComponent implements AfterViewInit {
|
|
|
451
492
|
* Focus the textarea input
|
|
452
493
|
*/
|
|
453
494
|
focus(): void;
|
|
495
|
+
protected dropHandler(event: DragEvent): void;
|
|
496
|
+
protected dragOverHandler(event: DragEvent): void;
|
|
454
497
|
private setTextareaHeight;
|
|
455
498
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiChatInputComponent, never>;
|
|
456
499
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiChatInputComponent, "si-chat-input", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "sending": { "alias": "sending"; "required": false; "isSignal": true; }; "interruptible": { "alias": "interruptible"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "disclaimer": { "alias": "disclaimer"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "secondaryActions": { "alias": "secondaryActions"; "required": false; "isSignal": true; }; "allowAttachments": { "alias": "allowAttachments"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; "isSignal": true; }; "attachments": { "alias": "attachments"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "actionParam": { "alias": "actionParam"; "required": false; "isSignal": true; }; "sendButtonLabel": { "alias": "sendButtonLabel"; "required": false; "isSignal": true; }; "sendButtonIcon": { "alias": "sendButtonIcon"; "required": false; "isSignal": true; }; "interruptButtonLabel": { "alias": "interruptButtonLabel"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "attachFileLabel": { "alias": "attachFileLabel"; "required": false; "isSignal": true; }; "removeAttachmentLabel": { "alias": "removeAttachmentLabel"; "required": false; "isSignal": true; }; "secondaryActionsLabel": { "alias": "secondaryActionsLabel"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "attachments": "attachmentsChange"; "send": "send"; "interrupt": "interrupt"; "fileError": "fileError"; }, never, ["*", "[siChatInputDisclaimer]"], true, never>;
|
|
457
500
|
}
|
|
458
501
|
|
|
459
502
|
/**
|
|
460
|
-
* Directive to mark content as chat input disclaimer.
|
|
503
|
+
* Directive to mark content as chat input disclaimer into {@link SiChatInputComponent}.
|
|
461
504
|
* Apply this directive to content that should be slotted into the disclaimer area.
|
|
462
505
|
*
|
|
463
506
|
* @example
|
|
@@ -468,6 +511,10 @@ declare class SiChatInputComponent implements AfterViewInit {
|
|
|
468
511
|
* </div>
|
|
469
512
|
* </si-chat-input>
|
|
470
513
|
* ```
|
|
514
|
+
*
|
|
515
|
+
* @see {@link SiChatInputComponent} for the chat input wrapper component
|
|
516
|
+
*
|
|
517
|
+
* @experimental
|
|
471
518
|
*/
|
|
472
519
|
declare class SiChatInputDisclaimerDirective {
|
|
473
520
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiChatInputDisclaimerDirective, never>;
|
|
@@ -475,10 +522,9 @@ declare class SiChatInputDisclaimerDirective {
|
|
|
475
522
|
}
|
|
476
523
|
|
|
477
524
|
/**
|
|
478
|
-
* Directive to mark content as chat message actions.
|
|
525
|
+
* Directive to mark content as chat message actions into {@link SiChatMessageComponent}.
|
|
479
526
|
* Apply this directive to e.g. buttons that should be slotted into the message actions area.
|
|
480
527
|
*
|
|
481
|
-
* @experimental
|
|
482
528
|
* @example
|
|
483
529
|
* ```html
|
|
484
530
|
* <si-chat-message>
|
|
@@ -487,6 +533,10 @@ declare class SiChatInputDisclaimerDirective {
|
|
|
487
533
|
* <button siChatMessageAction>Share</button>
|
|
488
534
|
* </si-chat-message>
|
|
489
535
|
* ```
|
|
536
|
+
*
|
|
537
|
+
* @see {@link SiChatMessageComponent} for the chat message wrapper component
|
|
538
|
+
*
|
|
539
|
+
* @experimental
|
|
490
540
|
*/
|
|
491
541
|
declare class SiChatMessageActionDirective {
|
|
492
542
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiChatMessageActionDirective, never>;
|
|
@@ -494,23 +544,33 @@ declare class SiChatMessageActionDirective {
|
|
|
494
544
|
}
|
|
495
545
|
|
|
496
546
|
/**
|
|
497
|
-
* Base chat message component that provides the layout structure for
|
|
547
|
+
* Base declarative chat message component that provides the layout structure for chat messages.
|
|
498
548
|
*
|
|
499
549
|
* This component handles the core message layout including avatar positioning, loading states,
|
|
500
|
-
* and action button placement. It serves as the foundation for more specialized message components
|
|
550
|
+
* and action button as well as attachment list placement. It serves as the foundation for more specialized message components
|
|
501
551
|
* like {@link SiUserMessageComponent} and {@link SiAiMessageComponent}.
|
|
552
|
+
* Can be used within {@link SiChatContainerComponent}.
|
|
502
553
|
*
|
|
503
|
-
* @remarks
|
|
504
554
|
* The component provides:
|
|
505
555
|
* - Flexible alignment (start/end) for different message types
|
|
506
556
|
* - Avatar/icon slot for message attribution
|
|
507
557
|
* - Loading state with skeleton UI
|
|
508
558
|
* - Action buttons positioned on the side or bottom
|
|
559
|
+
* - Attachment list display slot
|
|
509
560
|
* - Responsive behavior that adapts to container size
|
|
510
|
-
* - Attachment display slot
|
|
511
561
|
*
|
|
512
|
-
* This is a low-level component
|
|
513
|
-
* message
|
|
562
|
+
* This is a low-level component designed for slotting in custom content, it provides slots via content projection:
|
|
563
|
+
* - Default content: Main message content area (consider using {@link SiMarkdownRendererComponent} for markdown support)
|
|
564
|
+
* - `si-avatar/si-icon/img` selector: Avatar or icon representing the message sender
|
|
565
|
+
* - `si-chat-message-action` selector: Action buttons related to the message
|
|
566
|
+
* - `si-attachment-list` selector: Attachment list component for displaying file attachments
|
|
567
|
+
*
|
|
568
|
+
* @see {@link SiUserMessageComponent} for user message display
|
|
569
|
+
* @see {@link SiAiMessageComponent} for AI message display
|
|
570
|
+
* @see {@link SiAttachmentListComponent} for attachment list to slot in
|
|
571
|
+
* @see {@link SiChatMessageActionDirective} for action buttons to slot in
|
|
572
|
+
* @see {@link SiMarkdownRendererComponent} for markdown content rendering
|
|
573
|
+
* @see {@link SiChatContainerComponent} for the chat container to use this within
|
|
514
574
|
*
|
|
515
575
|
* @experimental
|
|
516
576
|
*/
|
|
@@ -535,64 +595,24 @@ declare class SiChatMessageComponent {
|
|
|
535
595
|
}
|
|
536
596
|
|
|
537
597
|
/**
|
|
538
|
-
* User message component for displaying user
|
|
598
|
+
* User message component for displaying the user's messages in conversational interfaces.
|
|
539
599
|
*
|
|
540
|
-
* The user message component renders user-submitted content in chat interfaces,
|
|
600
|
+
* The user message component renders user-submitted content in (AI) chat interfaces,
|
|
541
601
|
* supporting text, attachments, and contextual actions. It appears as a text bubble
|
|
542
602
|
* aligned to the right side and supports markdown formatting for rich content.
|
|
543
|
-
*
|
|
544
|
-
* @remarks
|
|
545
|
-
* This component is designed for use in:
|
|
546
|
-
* - AI chat interfaces where user input needs to be displayed
|
|
547
|
-
* - Peer-to-peer conversation interfaces
|
|
548
|
-
* - Conversation histories or chat transcripts
|
|
603
|
+
* Can be used within {@link SiChatContainerComponent}.
|
|
549
604
|
*
|
|
550
605
|
* The component automatically handles:
|
|
551
|
-
* -
|
|
606
|
+
* - Styling for user messages distinct from AI or generic chat messages
|
|
607
|
+
* - Option to render markdown content, provide via `contentFormatter` input with a markdown renderer function (e.g., from {@link getMarkdownRenderer})
|
|
552
608
|
* - Displaying attachments above the message bubble
|
|
553
|
-
* -
|
|
554
|
-
* - Proper alignment and styling for user messages
|
|
555
|
-
*
|
|
556
|
-
* @example
|
|
557
|
-
* Basic usage with content only:
|
|
558
|
-
* ```html
|
|
559
|
-
* <si-user-message [content]="'Hello, how can I help you?'" />
|
|
560
|
-
* ```
|
|
561
|
-
*
|
|
562
|
-
* @example
|
|
563
|
-
* With actions and attachments:
|
|
564
|
-
* ```typescript
|
|
565
|
-
* import { Component } from '@angular/core';
|
|
566
|
-
* import { SiUserMessageComponent } from '@siemens/element-ng/chat-messages';
|
|
567
|
-
*
|
|
568
|
-
* @Component({
|
|
569
|
-
* selector: 'app-chat',
|
|
570
|
-
* imports: [SiUserMessageComponent],
|
|
571
|
-
* template: `
|
|
572
|
-
* <si-user-message
|
|
573
|
-
* [content]="message.text"
|
|
574
|
-
* [actions]="messageActions"
|
|
575
|
-
* [secondaryActions]="menuActions"
|
|
576
|
-
* [attachments]="message.attachments"
|
|
577
|
-
* [actionParam]="message"
|
|
578
|
-
* />
|
|
579
|
-
* `
|
|
580
|
-
* })
|
|
581
|
-
* export class ChatComponent {
|
|
582
|
-
* messageActions = [
|
|
583
|
-
* { icon: 'copy', label: 'Copy', action: (id) => this.copyMessage(id) },
|
|
584
|
-
* { icon: 'edit', label: 'Edit', action: (id) => this.editMessage(id) }
|
|
585
|
-
* ];
|
|
586
|
-
*
|
|
587
|
-
* menuActions = [
|
|
588
|
-
* { label: 'Delete', action: (id) => this.deleteMessage(id) }
|
|
589
|
-
* ];
|
|
590
|
-
* }
|
|
591
|
-
* ```
|
|
609
|
+
* - Displaying primary and secondary actions
|
|
592
610
|
*
|
|
593
611
|
* @see {@link SiChatMessageComponent} for the base message wrapper component
|
|
594
|
-
* @see {@link
|
|
595
|
-
* @see {@link
|
|
612
|
+
* @see {@link SiAiMessageComponent} for the AI message component
|
|
613
|
+
* @see {@link SiAttachmentListComponent} for the base attachment component
|
|
614
|
+
* @see {@link getMarkdownRenderer} for markdown formatting support
|
|
615
|
+
* @see {@link SiChatContainerComponent} for the chat container to use this within
|
|
596
616
|
*
|
|
597
617
|
* @experimental
|
|
598
618
|
*/
|
|
@@ -650,5 +670,5 @@ declare class SiUserMessageComponent {
|
|
|
650
670
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiUserMessageComponent, "si-user-message", never, { "content": { "alias": "content"; "required": false; "isSignal": true; }; "contentFormatter": { "alias": "contentFormatter"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "secondaryActions": { "alias": "secondaryActions"; "required": false; "isSignal": true; }; "attachments": { "alias": "attachments"; "required": false; "isSignal": true; }; "actionParam": { "alias": "actionParam"; "required": false; "isSignal": true; }; "secondaryActionsLabel": { "alias": "secondaryActionsLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
651
671
|
}
|
|
652
672
|
|
|
653
|
-
export { SiAiMessageComponent, SiAttachmentListComponent, SiChatInputComponent, SiChatInputDisclaimerDirective, SiChatMessageActionDirective, SiChatMessageComponent, SiUserMessageComponent };
|
|
673
|
+
export { SiAiMessageComponent, SiAttachmentListComponent, SiChatContainerComponent, SiChatContainerInputDirective, SiChatInputComponent, SiChatInputDisclaimerDirective, SiChatMessageActionDirective, SiChatMessageComponent, SiUserMessageComponent };
|
|
654
674
|
export type { Attachment, ChatInputAttachment, MessageAction };
|
package/dashboard/index.d.ts
CHANGED
|
@@ -86,7 +86,8 @@ declare class SiDashboardCardComponent extends SiCardComponent implements OnDest
|
|
|
86
86
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiDashboardCardComponent, "si-dashboard-card", never, { "restoreText": { "alias": "restoreText"; "required": false; "isSignal": true; }; "expandText": { "alias": "expandText"; "required": false; "isSignal": true; }; "enableExpandInteraction": { "alias": "enableExpandInteraction"; "required": false; "isSignal": true; }; "showMenubar": { "alias": "showMenubar"; "required": false; "isSignal": true; }; }, { "expandChange": "expandChange"; }, never, ["[headerIcon]", "[body]", "[footer]"], true, never>;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
declare class SiDashboardComponent implements OnChanges,
|
|
89
|
+
declare class SiDashboardComponent implements OnChanges, AfterViewInit {
|
|
90
|
+
private readonly destroyRef;
|
|
90
91
|
/**
|
|
91
92
|
* Heading for the dashboard page.
|
|
92
93
|
*/
|
|
@@ -117,7 +118,6 @@ declare class SiDashboardComponent implements OnChanges, OnDestroy, AfterViewIni
|
|
|
117
118
|
protected dashboardFrameEndPadding: number | null;
|
|
118
119
|
protected readonly hideMenubarComputed: _angular_core.Signal<boolean>;
|
|
119
120
|
private _isExpanded;
|
|
120
|
-
private unsubscribe;
|
|
121
121
|
private scrollPosition;
|
|
122
122
|
private cards;
|
|
123
123
|
private readonly expandedPortalOutlet;
|
|
@@ -135,7 +135,6 @@ declare class SiDashboardComponent implements OnChanges, OnDestroy, AfterViewIni
|
|
|
135
135
|
constructor();
|
|
136
136
|
ngOnChanges(changes: SimpleChanges): void;
|
|
137
137
|
ngAfterViewInit(): void;
|
|
138
|
-
ngOnDestroy(): void;
|
|
139
138
|
private subscribeToCards;
|
|
140
139
|
private initCards;
|
|
141
140
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { trigger, transition, style, query, animate } from '@angular/animations';
|
|
2
2
|
import { NgClass } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { signal, Injectable, input, model, booleanAttribute, output, computed, inject,
|
|
4
|
+
import { signal, Injectable, input, model, booleanAttribute, output, computed, inject, viewChild, ChangeDetectionStrategy, Component, contentChildren, DestroyRef, ElementRef, NgModule } from '@angular/core';
|
|
5
5
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
6
|
import { areAnimationsDisabled } from '@siemens/element-ng/common';
|
|
7
7
|
import { addIcons, elementDown2, SiIconComponent } from '@siemens/element-ng/icon';
|
|
@@ -131,7 +131,6 @@ class SiCollapsiblePanelComponent {
|
|
|
131
131
|
headerId = this.controlId + '-header';
|
|
132
132
|
isHCollapsible = false;
|
|
133
133
|
icons = addIcons({ elementDown2 });
|
|
134
|
-
destroyRef = inject(DestroyRef);
|
|
135
134
|
accordionService = inject(SiAccordionService, { optional: true });
|
|
136
135
|
accordionHCollapseService = inject(SiAccordionHCollapseService, {
|
|
137
136
|
optional: true
|
|
@@ -143,7 +142,7 @@ class SiCollapsiblePanelComponent {
|
|
|
143
142
|
constructor() {
|
|
144
143
|
this.isHCollapsible = !!this.accordionHCollapseService;
|
|
145
144
|
this.accordionService?.toggle$
|
|
146
|
-
.pipe(takeUntilDestroyed(
|
|
145
|
+
.pipe(takeUntilDestroyed(), filter(item => item !== this))
|
|
147
146
|
.subscribe(() => this.openClose(false));
|
|
148
147
|
}
|
|
149
148
|
get showHide() {
|