@siemens/element-ng 48.2.0 → 48.4.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.
Files changed (80) hide show
  1. package/accordion/index.d.ts +5 -2
  2. package/application-header/index.d.ts +15 -2
  3. package/chat-messages/index.d.ts +670 -0
  4. package/chat-messages/package.json +3 -0
  5. package/dashboard/index.d.ts +3 -3
  6. package/fesm2022/siemens-element-ng-accordion.mjs +7 -4
  7. package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -1
  8. package/fesm2022/siemens-element-ng-application-header.mjs +62 -1
  9. package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
  10. package/fesm2022/siemens-element-ng-card.mjs +4 -4
  11. package/fesm2022/siemens-element-ng-card.mjs.map +1 -1
  12. package/fesm2022/siemens-element-ng-chat-messages.mjs +959 -0
  13. package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -0
  14. package/fesm2022/siemens-element-ng-dashboard.mjs +15 -15
  15. package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
  16. package/fesm2022/siemens-element-ng-datepicker.mjs +5 -3
  17. package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
  18. package/fesm2022/siemens-element-ng-file-uploader.mjs +277 -118
  19. package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
  20. package/fesm2022/siemens-element-ng-filtered-search.mjs +7 -12
  21. package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
  22. package/fesm2022/siemens-element-ng-icon.mjs +3 -1
  23. package/fesm2022/siemens-element-ng-icon.mjs.map +1 -1
  24. package/fesm2022/siemens-element-ng-ip-input.mjs +92 -89
  25. package/fesm2022/siemens-element-ng-ip-input.mjs.map +1 -1
  26. package/fesm2022/siemens-element-ng-markdown-renderer.mjs +253 -0
  27. package/fesm2022/siemens-element-ng-markdown-renderer.mjs.map +1 -0
  28. package/fesm2022/siemens-element-ng-navbar-vertical.mjs +2 -9
  29. package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
  30. package/fesm2022/siemens-element-ng-phone-number.mjs +5 -4
  31. package/fesm2022/siemens-element-ng-phone-number.mjs.map +1 -1
  32. package/fesm2022/siemens-element-ng-popover.mjs +3 -4
  33. package/fesm2022/siemens-element-ng-popover.mjs.map +1 -1
  34. package/fesm2022/siemens-element-ng-resize-observer.mjs +13 -0
  35. package/fesm2022/siemens-element-ng-resize-observer.mjs.map +1 -1
  36. package/fesm2022/siemens-element-ng-select.mjs +4 -0
  37. package/fesm2022/siemens-element-ng-select.mjs.map +1 -1
  38. package/fesm2022/siemens-element-ng-side-panel.mjs +3 -5
  39. package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
  40. package/fesm2022/siemens-element-ng-status-bar.mjs +3 -4
  41. package/fesm2022/siemens-element-ng-status-bar.mjs.map +1 -1
  42. package/fesm2022/siemens-element-ng-tour.mjs +58 -21
  43. package/fesm2022/siemens-element-ng-tour.mjs.map +1 -1
  44. package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
  45. package/fesm2022/siemens-element-ng-tree-view.mjs +43 -4
  46. package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
  47. package/file-uploader/index.d.ts +119 -15
  48. package/filtered-search/index.d.ts +6 -7
  49. package/icon/index.d.ts +3 -1
  50. package/ip-input/index.d.ts +13 -0
  51. package/markdown-renderer/index.d.ts +36 -0
  52. package/markdown-renderer/package.json +3 -0
  53. package/navbar-vertical/index.d.ts +2 -4
  54. package/package.json +15 -7
  55. package/resize-observer/index.d.ts +13 -0
  56. package/schematics/migrations/action-modal-migration/action-modal-migration.js +47 -6
  57. package/schematics/migrations/data/attribute-selectors.js +6 -0
  58. package/schematics/migrations/data/component-names.js +78 -0
  59. package/schematics/migrations/data/element-selectors.js +10 -0
  60. package/schematics/migrations/data/index.js +17 -0
  61. package/schematics/migrations/data/output-names.js +7 -0
  62. package/schematics/migrations/data/symbol-removals.js +49 -0
  63. package/schematics/migrations/element-migration/element-migration.js +93 -0
  64. package/schematics/migrations/element-migration/index.js +5 -0
  65. package/schematics/migrations/index.js +7 -2
  66. package/schematics/migrations/wizard-migration/index.js +80 -0
  67. package/schematics/scss-import-to-siemens-migration/index.js +3 -3
  68. package/schematics/ts-import-to-siemens-migration/index.js +2 -2
  69. package/schematics/utils/index.js +3 -3
  70. package/schematics/utils/project-utils.js +24 -35
  71. package/schematics/utils/template-utils.js +78 -2
  72. package/schematics/utils/ts-utils.js +5 -5
  73. package/select/index.d.ts +5 -0
  74. package/status-bar/index.d.ts +0 -1
  75. package/template-i18n.json +10 -0
  76. package/tour/index.d.ts +4 -2
  77. package/translate/index.d.ts +10 -0
  78. package/tree-view/index.d.ts +40 -1
  79. package/schematics/migrations/to-legacy-migration/to-legacy-migration.js +0 -55
  80. package/schematics/migrations/to-legacy-migration/to-legacy-replacement.js +0 -35
@@ -0,0 +1,670 @@
1
+ import * as _siemens_element_translate_ng_translate_types from '@siemens/element-translate-ng/translate-types';
2
+ import { TranslatableString } from '@siemens/element-translate-ng/translate-types';
3
+ import * as _angular_core from '@angular/core';
4
+ import { ElementRef, TemplateRef, AfterContentInit, OnDestroy, AfterViewInit } from '@angular/core';
5
+ import { MenuItem } from '@siemens/element-ng/menu';
6
+ import { SiModalService } from '@siemens/element-ng/modal';
7
+ import { FileUploadError, UploadFile } from '@siemens/element-ng/file-uploader';
8
+ import { TranslatableString as TranslatableString$1 } from '@siemens/element-translate-ng/translate';
9
+ import * as i1 from '@siemens/element-ng/resize-observer';
10
+
11
+ /**
12
+ * Copyright (c) Siemens 2016 - 2025
13
+ * SPDX-License-Identifier: MIT
14
+ */
15
+
16
+ /**
17
+ * Actions for messages representing an action with icon, label (for accessibility), and handler, for use within {@link SiAiMessageComponent} and {@link SiUserMessageComponent}.
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
+ *
23
+ * @experimental
24
+ */
25
+ interface MessageAction {
26
+ /** Label that is shown to the user. */
27
+ label: TranslatableString;
28
+ /**
29
+ * Icon used to represent the action
30
+ */
31
+ icon: string;
32
+ /**
33
+ * Action that is called when the item is triggered.
34
+ */
35
+ action: (actionParam: any, source: this) => void;
36
+ /** Whether the menu item is disabled. */
37
+ disabled?: boolean;
38
+ }
39
+
40
+ /**
41
+ * AI message component for displaying AI-generated responses in conversational interfaces.
42
+ *
43
+ * The AI message component renders AI-generated content in chat interfaces,
44
+ * supporting text formatting, markdown, loading states, and contextual actions.
45
+ * It appears as text (no bubble) aligned to the left side without any avatar/icon slot.
46
+ * Can be used within {@link SiChatContainerComponent}.
47
+ *
48
+ * The component automatically handles:
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})
51
+ * - Showing loading states with skeleton UI during generation
52
+ * - Displaying primary and secondary actions
53
+ *
54
+ * @see {@link SiChatMessageComponent} for the base message wrapper component
55
+ * @see {@link SiUserMessageComponent} for the user message component
56
+ * @see {@link getMarkdownRenderer} for markdown formatting support
57
+ * @see {@link SiChatContainerComponent} for the chat container to use this within
58
+ *
59
+ * @experimental
60
+ */
61
+ declare class SiAiMessageComponent {
62
+ protected readonly formattedContent: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
63
+ /**
64
+ * The AI-generated message content
65
+ * @defaultValue ''
66
+ */
67
+ readonly content: _angular_core.InputSignal<string>;
68
+ /**
69
+ * Optional formatter function to transform content before display.
70
+ * - Returns string: Content will be sanitized using Angular's DomSanitizer
71
+ * - Returns Node: DOM node will be inserted directly without sanitization
72
+ *
73
+ * **Note:** If using a markdown renderer, make sure to apply the `markdown-content` class
74
+ * to the root element to ensure proper styling using the Element theme (e.g., `div.className = 'markdown-content'`).
75
+ * The function returned by {@link getMarkdownRenderer} does this automatically.
76
+ *
77
+ * **Warning:** When returning a Node, ensure the content is safe to prevent XSS attacks
78
+ * @defaultValue undefined
79
+ */
80
+ readonly contentFormatter: _angular_core.InputSignal<((text: string) => string | Node) | undefined>;
81
+ protected readonly textContent: _angular_core.WritableSignal<string | undefined>;
82
+ constructor();
83
+ /**
84
+ * Whether the message is currently being generated (shows skeleton)
85
+ * @defaultValue false
86
+ */
87
+ readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
88
+ /**
89
+ * Primary actions available for this message (thumbs up/down, copy, retry, etc.)
90
+ * All actions displayed inline
91
+ * @defaultValue []
92
+ */
93
+ readonly actions: _angular_core.InputSignal<MessageAction[]>;
94
+ /**
95
+ * Secondary actions available in dropdown menu, first use primary actions and only add secondary actions additionally
96
+ * @defaultValue []
97
+ */
98
+ readonly secondaryActions: _angular_core.InputSignal<MenuItem[]>;
99
+ /** Parameter to pass to action handlers */
100
+ readonly actionParam: _angular_core.InputSignal<unknown>;
101
+ /**
102
+ * More actions button aria label
103
+ *
104
+ * @defaultValue
105
+ * ```
106
+ * t(() => $localize`:@@SI_AI_MESSAGE.SECONDARY_ACTIONS:More actions`)
107
+ * ```
108
+ */
109
+ readonly secondaryActionsLabel: _angular_core.InputSignal<_siemens_element_translate_ng_translate_types.TranslatableString>;
110
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiAiMessageComponent, never>;
111
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiAiMessageComponent, "si-ai-message", never, { "content": { "alias": "content"; "required": false; "isSignal": true; }; "contentFormatter": { "alias": "contentFormatter"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "secondaryActions": { "alias": "secondaryActions"; "required": false; "isSignal": true; }; "actionParam": { "alias": "actionParam"; "required": false; "isSignal": true; }; "secondaryActionsLabel": { "alias": "secondaryActionsLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
112
+ }
113
+
114
+ /**
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
120
+ *
121
+ * @experimental
122
+ */
123
+ interface Attachment {
124
+ /** File name */
125
+ name: string;
126
+ /** Optionally show a preview of the attachment by providing a template that is shown in a modal when clicked (optional) */
127
+ previewTemplate?: TemplateRef<any> | (() => TemplateRef<any>);
128
+ }
129
+ /**
130
+ * Attachment list component for displaying file attachments in chat messages.
131
+ *
132
+ * This component renders a list of file attachments with icons, names, and optional
133
+ * preview and remove functionality. It's designed to work with chat message components
134
+ * to show files that have been uploaded or shared in conversations.
135
+ *
136
+ * This component provides:
137
+ * - A list of pills showing each attachment's name and an icon
138
+ * - Optional preview modal for attachments
139
+ * - Optional remove functionality for editable messages
140
+ *
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}
142
+ *
143
+ * @see {@link SiUserMessageComponent} for user message display
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
147
+ * @see {@link Attachment} for attachment data structure
148
+ *
149
+ * @experimental
150
+ */
151
+ declare class SiAttachmentListComponent {
152
+ protected modalService: SiModalService;
153
+ /**
154
+ * List of attachments to display
155
+ * @defaultValue []
156
+ */
157
+ readonly attachments: _angular_core.InputSignal<Attachment[]>;
158
+ /**
159
+ * Whether to align attachments to the end (right) or start (left)
160
+ * @defaultValue 'start'
161
+ */
162
+ readonly alignment: _angular_core.InputSignal<"start" | "end">;
163
+ /**
164
+ * Whether to show remove buttons on attachments
165
+ * @defaultValue false
166
+ */
167
+ readonly removable: _angular_core.InputSignalWithTransform<boolean, unknown>;
168
+ /**
169
+ * Label for remove attachment button
170
+ *
171
+ * @defaultValue
172
+ * ```
173
+ * t(() => $localize`:@@SI_ATTACHMENT_LIST.REMOVE_ATTACHMENT:Remove attachment`)
174
+ * ```
175
+ */
176
+ readonly removeLabel: _angular_core.InputSignal<_siemens_element_translate_ng_translate_types.TranslatableString>;
177
+ /**
178
+ * Emitted when an attachment should be removed
179
+ */
180
+ readonly remove: _angular_core.OutputEmitterRef<Attachment>;
181
+ private getPreviewTemplate;
182
+ protected openPreview(event: Event, attachment: Attachment): void;
183
+ protected getFileIcon(name: string): string;
184
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiAttachmentListComponent, never>;
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>;
186
+ }
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
+ */
280
+ interface ChatInputAttachment extends Attachment {
281
+ /** File object */
282
+ file: File;
283
+ /** File size in bytes */
284
+ size: number;
285
+ /** MIME type */
286
+ type: string;
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
+ */
310
+ declare class SiChatInputComponent implements AfterViewInit {
311
+ private static idCounter;
312
+ private readonly textInput;
313
+ private readonly projectedContent;
314
+ /**
315
+ * Current input value
316
+ * @defaultValue ''
317
+ */
318
+ readonly value: _angular_core.ModelSignal<string>;
319
+ /**
320
+ * Placeholder text for the input
321
+ *
322
+ * @defaultValue
323
+ * ```
324
+ * t(() => $localize`:@@SI_CHAT_INPUT.PLACEHOLDER:Enter a message…`)
325
+ * ```
326
+ */
327
+ readonly placeholder: _angular_core.InputSignal<TranslatableString$1>;
328
+ /**
329
+ * Whether the input is disabled
330
+ * @defaultValue false
331
+ */
332
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
333
+ /**
334
+ * Whether a message is currently being sent, also prevent the sending of new ones while still allowing the user to type
335
+ * @defaultValue false
336
+ */
337
+ readonly sending: _angular_core.InputSignalWithTransform<boolean, unknown>;
338
+ /**
339
+ * Whether the input supports interrupting ongoing operations. When active,
340
+ * the send button transforms into an interrupt button (with element-stop-filled icon).
341
+ * If sending is true, the interrupt button will be disabled.
342
+ * @defaultValue false
343
+ */
344
+ readonly interruptible: _angular_core.InputSignalWithTransform<boolean, unknown>;
345
+ /**
346
+ * Maximum number of characters allowed
347
+ */
348
+ readonly maxLength: _angular_core.InputSignal<number | undefined>;
349
+ /**
350
+ * A disclaimer to display.
351
+ *
352
+ * If not provided, the component will look for projected content with the `siChatInputDisclaimer` directive.
353
+ * If both are empty, no disclaimer section will be shown (handled via CSS :empty).
354
+ */
355
+ readonly disclaimer: _angular_core.InputSignal<TranslatableString$1 | undefined>;
356
+ /**
357
+ * Primary actions available in the input (attach files, etc.)
358
+ * All actions displayed inline
359
+ * @defaultValue []
360
+ */
361
+ readonly actions: _angular_core.InputSignal<MessageAction[]>;
362
+ /**
363
+ * Secondary actions available in dropdown menu
364
+ * @defaultValue []
365
+ */
366
+ readonly secondaryActions: _angular_core.InputSignal<MenuItem[]>;
367
+ /**
368
+ * Whether file attachments are supported
369
+ * @defaultValue false
370
+ */
371
+ readonly allowAttachments: _angular_core.InputSignal<boolean>;
372
+ /**
373
+ * Accepted file types for attachments (as accept string)
374
+ * @defaultValue undefined
375
+ */
376
+ readonly accept: _angular_core.InputSignal<string | undefined>;
377
+ /**
378
+ * Maximum file size in bytes
379
+ * @defaultValue 10485760 (10MB)
380
+ */
381
+ readonly maxFileSize: _angular_core.InputSignal<number>;
382
+ /**
383
+ * Current attachments
384
+ * @defaultValue []
385
+ */
386
+ readonly attachments: _angular_core.ModelSignal<ChatInputAttachment[]>;
387
+ /**
388
+ * The label for the input, used for accessibility
389
+ * @defaultValue
390
+ * ```
391
+ * t(() => $localize`:@@SI_CHAT_INPUT.LABEL:Chat message input`)
392
+ * ```
393
+ */
394
+ readonly label: _angular_core.InputSignal<string>;
395
+ /** Parameter to pass to action handlers */
396
+ readonly actionParam: _angular_core.InputSignal<any>;
397
+ /**
398
+ * Send button label
399
+ *
400
+ * @defaultValue
401
+ * ```
402
+ * t(() => $localize`:@@SI_CHAT_INPUT.SEND:Send`)
403
+ * ```
404
+ */
405
+ readonly sendButtonLabel: _angular_core.InputSignal<TranslatableString$1>;
406
+ /**
407
+ * Send button icon
408
+ *
409
+ * @defaultValue 'element-send-filled'
410
+ */
411
+ readonly sendButtonIcon: _angular_core.InputSignal<string>;
412
+ /**
413
+ * Interrupt button label
414
+ *
415
+ * @defaultValue
416
+ * ```
417
+ * t(() => $localize`:@@SI_CHAT_INPUT.INTERRUPT:Interrupt`)
418
+ * ```
419
+ */
420
+ readonly interruptButtonLabel: _angular_core.InputSignal<TranslatableString$1>;
421
+ /**
422
+ * Auto-focus the input on component initialization
423
+ * @defaultValue false
424
+ */
425
+ readonly autoFocus: _angular_core.InputSignalWithTransform<boolean, unknown>;
426
+ /**
427
+ * Attach file button aria label
428
+ *
429
+ * @defaultValue
430
+ * ```
431
+ * t(() => $localize`:@@SI_CHAT_INPUT.ATTACH_FILE:Attach file`)
432
+ * ```
433
+ */
434
+ readonly attachFileLabel: _angular_core.InputSignal<TranslatableString$1>;
435
+ /**
436
+ * Remove attachment aria label prefix
437
+ *
438
+ * @defaultValue
439
+ * ```
440
+ * t(() => $localize`:@@SI_ATTACHMENT_LIST.REMOVE_ATTACHMENT:Remove attachment`)
441
+ * ```
442
+ */
443
+ readonly removeAttachmentLabel: _angular_core.InputSignal<TranslatableString$1>;
444
+ /**
445
+ * More actions button aria label
446
+ *
447
+ * @defaultValue
448
+ * ```
449
+ * t(() => $localize`:@@SI_CHAT_INPUT.SECONDARY_ACTIONS:More actions`)
450
+ * ```
451
+ */
452
+ readonly secondaryActionsLabel: _angular_core.InputSignal<TranslatableString$1>;
453
+ /**
454
+ * Emitted when the user wants to send a message
455
+ */
456
+ readonly send: _angular_core.OutputEmitterRef<{
457
+ content: string;
458
+ attachments: ChatInputAttachment[];
459
+ }>;
460
+ /**
461
+ * Emitted when the user wants to interrupt the current operation
462
+ */
463
+ readonly interrupt: _angular_core.OutputEmitterRef<void>;
464
+ /**
465
+ * Emitted when file upload errors occur
466
+ */
467
+ readonly fileError: _angular_core.OutputEmitterRef<FileUploadError>;
468
+ protected readonly id: string;
469
+ protected readonly hasContent: _angular_core.Signal<boolean>;
470
+ protected readonly hasAttachments: _angular_core.Signal<boolean>;
471
+ protected readonly hasActions: _angular_core.Signal<boolean>;
472
+ protected readonly hasSecondaryActions: _angular_core.Signal<boolean>;
473
+ protected readonly canSend: _angular_core.Signal<boolean>;
474
+ protected readonly showInterruptButton: _angular_core.Signal<boolean>;
475
+ protected readonly buttonDisabled: _angular_core.Signal<boolean>;
476
+ protected readonly buttonIcon: _angular_core.Signal<string>;
477
+ protected readonly buttonLabel: _angular_core.Signal<TranslatableString$1>;
478
+ protected get attachmentList(): Attachment[];
479
+ protected onInputChange(value: string): void;
480
+ protected onSend(): void;
481
+ protected onButtonClick(): void;
482
+ protected onKeyDown(event: KeyboardEvent): void;
483
+ protected onFilesAdded(uploadFiles: UploadFile[]): void;
484
+ protected onFileError(error: FileUploadError): void;
485
+ protected removeAttachment(attachment: Attachment): void;
486
+ protected onContainerClick(event: Event): void;
487
+ ngAfterViewInit(): void;
488
+ protected adjustTextareaHeight(event: Event): void;
489
+ /**
490
+ * Focus the textarea input
491
+ */
492
+ focus(): void;
493
+ private setTextareaHeight;
494
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiChatInputComponent, never>;
495
+ 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>;
496
+ }
497
+
498
+ /**
499
+ * Directive to mark content as chat input disclaimer into {@link SiChatInputComponent}.
500
+ * Apply this directive to content that should be slotted into the disclaimer area.
501
+ *
502
+ * @example
503
+ * ```html
504
+ * <si-chat-input>
505
+ * <div siChatInputDisclaimer>
506
+ * Custom disclaimer content
507
+ * </div>
508
+ * </si-chat-input>
509
+ * ```
510
+ *
511
+ * @see {@link SiChatInputComponent} for the chat input wrapper component
512
+ *
513
+ * @experimental
514
+ */
515
+ declare class SiChatInputDisclaimerDirective {
516
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiChatInputDisclaimerDirective, never>;
517
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SiChatInputDisclaimerDirective, "[siChatInputDisclaimer]", never, {}, {}, never, never, true, never>;
518
+ }
519
+
520
+ /**
521
+ * Directive to mark content as chat message actions into {@link SiChatMessageComponent}.
522
+ * Apply this directive to e.g. buttons that should be slotted into the message actions area.
523
+ *
524
+ * @example
525
+ * ```html
526
+ * <si-chat-message>
527
+ * Message content
528
+ * <button siChatMessageAction>Like</button>
529
+ * <button siChatMessageAction>Share</button>
530
+ * </si-chat-message>
531
+ * ```
532
+ *
533
+ * @see {@link SiChatMessageComponent} for the chat message wrapper component
534
+ *
535
+ * @experimental
536
+ */
537
+ declare class SiChatMessageActionDirective {
538
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiChatMessageActionDirective, never>;
539
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SiChatMessageActionDirective, "[siChatMessageAction]", never, {}, {}, never, never, true, never>;
540
+ }
541
+
542
+ /**
543
+ * Base declarative chat message component that provides the layout structure for chat messages.
544
+ *
545
+ * This component handles the core message layout including avatar positioning, loading states,
546
+ * and action button as well as attachment list placement. It serves as the foundation for more specialized message components
547
+ * like {@link SiUserMessageComponent} and {@link SiAiMessageComponent}.
548
+ * Can be used within {@link SiChatContainerComponent}.
549
+ *
550
+ * The component provides:
551
+ * - Flexible alignment (start/end) for different message types
552
+ * - Avatar/icon slot for message attribution
553
+ * - Loading state with skeleton UI
554
+ * - Action buttons positioned on the side or bottom
555
+ * - Attachment list display slot
556
+ * - Responsive behavior that adapts to container size
557
+ *
558
+ * This is a low-level component designed for slotting in custom content, it provides slots via content projection:
559
+ * - Default content: Main message content area (consider using {@link SiMarkdownRendererComponent} for markdown support)
560
+ * - `si-avatar/si-icon/img` selector: Avatar or icon representing the message sender
561
+ * - `si-chat-message-action` selector: Action buttons related to the message
562
+ * - `si-attachment-list` selector: Attachment list component for displaying file attachments
563
+ *
564
+ * @see {@link SiUserMessageComponent} for user message display
565
+ * @see {@link SiAiMessageComponent} for AI message display
566
+ * @see {@link SiAttachmentListComponent} for attachment list to slot in
567
+ * @see {@link SiChatMessageActionDirective} for action buttons to slot in
568
+ * @see {@link SiMarkdownRendererComponent} for markdown content rendering
569
+ * @see {@link SiChatContainerComponent} for the chat container to use this within
570
+ *
571
+ * @experimental
572
+ */
573
+ declare class SiChatMessageComponent {
574
+ /**
575
+ * Whether the message is currently loading
576
+ * @defaultValue false
577
+ */
578
+ readonly loading: _angular_core.InputSignal<boolean>;
579
+ /**
580
+ * Alignment of the message
581
+ * @defaultValue 'start'
582
+ */
583
+ readonly alignment: _angular_core.InputSignal<"start" | "end">;
584
+ /**
585
+ * Where to display action buttons (if any)
586
+ * @defaultValue 'side'
587
+ */
588
+ readonly actionsPosition: _angular_core.InputSignal<"bottom" | "side">;
589
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiChatMessageComponent, never>;
590
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiChatMessageComponent, "si-chat-message", never, { "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "alignment": { "alias": "alignment"; "required": false; "isSignal": true; }; "actionsPosition": { "alias": "actionsPosition"; "required": false; "isSignal": true; }; }, {}, never, ["si-icon,si-avatar,img", "si-attachment-list,si-badge", "*", "[siChatMessageAction]"], true, [{ directive: typeof i1.SiResponsiveContainerDirective; inputs: {}; outputs: {}; }]>;
591
+ }
592
+
593
+ /**
594
+ * User message component for displaying the user's messages in conversational interfaces.
595
+ *
596
+ * The user message component renders user-submitted content in (AI) chat interfaces,
597
+ * supporting text, attachments, and contextual actions. It appears as a text bubble
598
+ * aligned to the right side and supports markdown formatting for rich content.
599
+ * Can be used within {@link SiChatContainerComponent}.
600
+ *
601
+ * The component automatically handles:
602
+ * - Styling for user messages distinct from AI or generic chat messages
603
+ * - Option to render markdown content, provide via `contentFormatter` input with a markdown renderer function (e.g., from {@link getMarkdownRenderer})
604
+ * - Displaying attachments above the message bubble
605
+ * - Displaying primary and secondary actions
606
+ *
607
+ * @see {@link SiChatMessageComponent} for the base message wrapper component
608
+ * @see {@link SiAiMessageComponent} for the AI message component
609
+ * @see {@link SiAttachmentListComponent} for the base attachment component
610
+ * @see {@link getMarkdownRenderer} for markdown formatting support
611
+ * @see {@link SiChatContainerComponent} for the chat container to use this within
612
+ *
613
+ * @experimental
614
+ */
615
+ declare class SiUserMessageComponent {
616
+ protected readonly formattedContent: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
617
+ /**
618
+ * The user message content
619
+ * @defaultValue ''
620
+ */
621
+ readonly content: _angular_core.InputSignal<string>;
622
+ /**
623
+ * Optional formatter function to transform content before display.
624
+ * - Returns string: Content will be inserted as text with built-in sanitization
625
+ * - Returns Node: DOM node will be inserted directly without sanitization
626
+ *
627
+ * **Note:** When returning a Node with formatted content, apply the `markdown-content` class
628
+ * to the root element to ensure proper styling (e.g., `div.className = 'markdown-content'`).
629
+ * The function returned by {@link getMarkdownRenderer} does this automatically.
630
+ *
631
+ * **Warning:** When returning a Node, ensure the content is safe to prevent XSS attacks
632
+ * @defaultValue undefined
633
+ */
634
+ readonly contentFormatter: _angular_core.InputSignal<((text: string) => string | Node) | undefined>;
635
+ /**
636
+ * Primary message actions (edit, delete, copy, etc.).
637
+ * All actions displayed inline
638
+ * @defaultValue []
639
+ */
640
+ readonly actions: _angular_core.InputSignal<MessageAction[]>;
641
+ /**
642
+ * Secondary actions available in dropdown menu, first use primary actions and only add secondary actions additionally
643
+ * @defaultValue []
644
+ */
645
+ readonly secondaryActions: _angular_core.InputSignal<MenuItem[]>;
646
+ /**
647
+ * List of attachments included with this message
648
+ * @defaultValue []
649
+ */
650
+ readonly attachments: _angular_core.InputSignal<Attachment[]>;
651
+ /** Parameter to pass to action handlers */
652
+ readonly actionParam: _angular_core.InputSignal<any>;
653
+ /**
654
+ * More actions button aria label
655
+ *
656
+ * @defaultValue
657
+ * ```
658
+ * t(() => $localize`:@@SI_USER_MESSAGE.SECONDARY_ACTIONS:More actions`)
659
+ * ```
660
+ */
661
+ readonly secondaryActionsLabel: _angular_core.InputSignal<_siemens_element_translate_ng_translate_types.TranslatableString>;
662
+ protected readonly hasAttachments: _angular_core.Signal<boolean>;
663
+ protected readonly textContent: _angular_core.WritableSignal<string | undefined>;
664
+ constructor();
665
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiUserMessageComponent, never>;
666
+ 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>;
667
+ }
668
+
669
+ export { SiAiMessageComponent, SiAttachmentListComponent, SiChatContainerComponent, SiChatContainerInputDirective, SiChatInputComponent, SiChatInputDisclaimerDirective, SiChatMessageActionDirective, SiChatMessageComponent, SiUserMessageComponent };
670
+ export type { Attachment, ChatInputAttachment, MessageAction };
@@ -0,0 +1,3 @@
1
+ {
2
+ "module": "../fesm2022/siemens-element-ng-chat-messages.mjs"
3
+ }