@siemens/element-ng 51.6.0 → 51.8.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 (150) hide show
  1. package/README.md +3 -4
  2. package/element-ng.scss +3 -1
  3. package/fesm2022/siemens-element-ng-accordion.mjs +2 -2
  4. package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -1
  5. package/fesm2022/siemens-element-ng-ag-grid.mjs +9 -9
  6. package/fesm2022/siemens-element-ng-ag-grid.mjs.map +1 -1
  7. package/fesm2022/siemens-element-ng-application-header.mjs +10 -7
  8. package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
  9. package/fesm2022/siemens-element-ng-avatar.mjs +3 -3
  10. package/fesm2022/siemens-element-ng-avatar.mjs.map +1 -1
  11. package/fesm2022/siemens-element-ng-card.mjs +22 -15
  12. package/fesm2022/siemens-element-ng-card.mjs.map +1 -1
  13. package/fesm2022/siemens-element-ng-carousel.mjs +6 -4
  14. package/fesm2022/siemens-element-ng-carousel.mjs.map +1 -1
  15. package/fesm2022/siemens-element-ng-chat-messages.mjs +621 -46
  16. package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -1
  17. package/fesm2022/siemens-element-ng-color-picker.mjs +55 -39
  18. package/fesm2022/siemens-element-ng-color-picker.mjs.map +1 -1
  19. package/fesm2022/siemens-element-ng-content-action-bar.mjs +2 -2
  20. package/fesm2022/siemens-element-ng-content-action-bar.mjs.map +1 -1
  21. package/fesm2022/siemens-element-ng-dashboard.mjs +13 -15
  22. package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
  23. package/fesm2022/siemens-element-ng-date-range-filter.mjs +3 -3
  24. package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -1
  25. package/fesm2022/siemens-element-ng-datepicker.mjs +5 -4
  26. package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
  27. package/fesm2022/siemens-element-ng-empty-state.mjs +13 -6
  28. package/fesm2022/siemens-element-ng-empty-state.mjs.map +1 -1
  29. package/fesm2022/siemens-element-ng-file-uploader.mjs +2 -2
  30. package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
  31. package/fesm2022/siemens-element-ng-filter-bar.mjs +4 -4
  32. package/fesm2022/siemens-element-ng-filter-bar.mjs.map +1 -1
  33. package/fesm2022/siemens-element-ng-footer.mjs +2 -2
  34. package/fesm2022/siemens-element-ng-form.mjs +4 -4
  35. package/fesm2022/siemens-element-ng-formly.mjs +1 -1
  36. package/fesm2022/siemens-element-ng-formly.mjs.map +1 -1
  37. package/fesm2022/siemens-element-ng-icon.mjs +2 -1
  38. package/fesm2022/siemens-element-ng-icon.mjs.map +1 -1
  39. package/fesm2022/siemens-element-ng-info-page.mjs +20 -7
  40. package/fesm2022/siemens-element-ng-info-page.mjs.map +1 -1
  41. package/fesm2022/siemens-element-ng-inline-notification.mjs +2 -2
  42. package/fesm2022/siemens-element-ng-inline-notification.mjs.map +1 -1
  43. package/fesm2022/siemens-element-ng-landing-page.mjs +2 -2
  44. package/fesm2022/siemens-element-ng-landing-page.mjs.map +1 -1
  45. package/fesm2022/siemens-element-ng-list-details.mjs +2 -2
  46. package/fesm2022/siemens-element-ng-list-details.mjs.map +1 -1
  47. package/fesm2022/siemens-element-ng-loading-spinner.mjs +2 -2
  48. package/fesm2022/siemens-element-ng-loading-spinner.mjs.map +1 -1
  49. package/fesm2022/siemens-element-ng-maplibre.mjs +133 -10
  50. package/fesm2022/siemens-element-ng-maplibre.mjs.map +1 -1
  51. package/fesm2022/siemens-element-ng-menu.mjs +6 -6
  52. package/fesm2022/siemens-element-ng-menu.mjs.map +1 -1
  53. package/fesm2022/siemens-element-ng-modal.mjs +71 -84
  54. package/fesm2022/siemens-element-ng-modal.mjs.map +1 -1
  55. package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs +64 -14
  56. package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs.map +1 -1
  57. package/fesm2022/siemens-element-ng-navbar-vertical.mjs +4 -4
  58. package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
  59. package/fesm2022/siemens-element-ng-navbar.mjs +7 -2
  60. package/fesm2022/siemens-element-ng-navbar.mjs.map +1 -1
  61. package/fesm2022/siemens-element-ng-notification-item.mjs +2 -2
  62. package/fesm2022/siemens-element-ng-notification-item.mjs.map +1 -1
  63. package/fesm2022/siemens-element-ng-number-input.mjs +2 -2
  64. package/fesm2022/siemens-element-ng-number-input.mjs.map +1 -1
  65. package/fesm2022/siemens-element-ng-password-strength.mjs +2 -2
  66. package/fesm2022/siemens-element-ng-password-strength.mjs.map +1 -1
  67. package/fesm2022/siemens-element-ng-phone-number.mjs +32 -23
  68. package/fesm2022/siemens-element-ng-phone-number.mjs.map +1 -1
  69. package/fesm2022/siemens-element-ng-photo-upload.mjs +7 -2
  70. package/fesm2022/siemens-element-ng-photo-upload.mjs.map +1 -1
  71. package/fesm2022/siemens-element-ng-pills-input.mjs +2 -2
  72. package/fesm2022/siemens-element-ng-pills-input.mjs.map +1 -1
  73. package/fesm2022/siemens-element-ng-result-details-list.mjs +11 -6
  74. package/fesm2022/siemens-element-ng-result-details-list.mjs.map +1 -1
  75. package/fesm2022/siemens-element-ng-search-bar.mjs +188 -15
  76. package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -1
  77. package/fesm2022/siemens-element-ng-select.mjs +631 -764
  78. package/fesm2022/siemens-element-ng-select.mjs.map +1 -1
  79. package/fesm2022/siemens-element-ng-side-panel.mjs +19 -10
  80. package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
  81. package/fesm2022/siemens-element-ng-slider.mjs +2 -2
  82. package/fesm2022/siemens-element-ng-slider.mjs.map +1 -1
  83. package/fesm2022/siemens-element-ng-source-chip.mjs +2 -2
  84. package/fesm2022/siemens-element-ng-source-chip.mjs.map +1 -1
  85. package/fesm2022/siemens-element-ng-split.mjs +2 -2
  86. package/fesm2022/siemens-element-ng-split.mjs.map +1 -1
  87. package/fesm2022/siemens-element-ng-status-bar.mjs +12 -12
  88. package/fesm2022/siemens-element-ng-status-bar.mjs.map +1 -1
  89. package/fesm2022/siemens-element-ng-status-counter.mjs +2 -2
  90. package/fesm2022/siemens-element-ng-status-counter.mjs.map +1 -1
  91. package/fesm2022/siemens-element-ng-status-toggle.mjs +2 -2
  92. package/fesm2022/siemens-element-ng-status-toggle.mjs.map +1 -1
  93. package/fesm2022/siemens-element-ng-summary-chip.mjs +2 -2
  94. package/fesm2022/siemens-element-ng-summary-chip.mjs.map +1 -1
  95. package/fesm2022/siemens-element-ng-summary-widget.mjs +2 -2
  96. package/fesm2022/siemens-element-ng-summary-widget.mjs.map +1 -1
  97. package/fesm2022/siemens-element-ng-tabs-legacy.mjs +2 -1
  98. package/fesm2022/siemens-element-ng-tabs-legacy.mjs.map +1 -1
  99. package/fesm2022/siemens-element-ng-tabs.mjs +3 -6
  100. package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -1
  101. package/fesm2022/siemens-element-ng-theme.mjs +9 -5
  102. package/fesm2022/siemens-element-ng-theme.mjs.map +1 -1
  103. package/fesm2022/siemens-element-ng-threshold.mjs +2 -2
  104. package/fesm2022/siemens-element-ng-threshold.mjs.map +1 -1
  105. package/fesm2022/siemens-element-ng-toast-notification.mjs +2 -2
  106. package/fesm2022/siemens-element-ng-toast-notification.mjs.map +1 -1
  107. package/fesm2022/siemens-element-ng-tour.mjs +2 -2
  108. package/fesm2022/siemens-element-ng-tour.mjs.map +1 -1
  109. package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
  110. package/fesm2022/siemens-element-ng-tree-view.mjs +8 -25
  111. package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
  112. package/fesm2022/siemens-element-ng-typeahead.mjs +42 -30
  113. package/fesm2022/siemens-element-ng-typeahead.mjs.map +1 -1
  114. package/fesm2022/siemens-element-ng-wizard.mjs +2 -2
  115. package/fesm2022/siemens-element-ng-wizard.mjs.map +1 -1
  116. package/maplibre/styles/maplibre-gl.scss +2 -2
  117. package/package.json +8 -8
  118. package/schematics/collection.json +5 -0
  119. package/schematics/migrate-search-bar/index.js +5 -0
  120. package/schematics/migrate-search-bar/migrate-search-bar-rule.js +733 -0
  121. package/schematics/migrate-search-bar/schema.json +14 -0
  122. package/schematics/migrate-search-bar/search-bar-template.js +742 -0
  123. package/schematics/migrate-search-bar/text-edits.js +23 -0
  124. package/schematics/migrations/data/css-custom-properties.js +11 -11
  125. package/schematics/utils/project-utils.js +2 -1
  126. package/template-i18n.json +8 -0
  127. package/types/siemens-element-ng-application-header.d.ts +1 -0
  128. package/types/siemens-element-ng-avatar.d.ts +1 -1
  129. package/types/siemens-element-ng-card.d.ts +17 -11
  130. package/types/siemens-element-ng-chat-messages.d.ts +518 -127
  131. package/types/siemens-element-ng-color-picker.d.ts +18 -9
  132. package/types/siemens-element-ng-dashboard.d.ts +2 -1
  133. package/types/siemens-element-ng-empty-state.d.ts +9 -2
  134. package/types/siemens-element-ng-info-page.d.ts +17 -5
  135. package/types/siemens-element-ng-maplibre.d.ts +39 -2
  136. package/types/siemens-element-ng-modal.d.ts +6 -4
  137. package/types/siemens-element-ng-navbar-vertical-next.d.ts +31 -2
  138. package/types/siemens-element-ng-navbar.d.ts +1 -0
  139. package/types/siemens-element-ng-phone-number.d.ts +5 -6
  140. package/types/siemens-element-ng-photo-upload.d.ts +1 -0
  141. package/types/siemens-element-ng-result-details-list.d.ts +7 -2
  142. package/types/siemens-element-ng-search-bar.d.ts +110 -5
  143. package/types/siemens-element-ng-select.d.ts +257 -286
  144. package/types/siemens-element-ng-side-panel.d.ts +5 -1
  145. package/types/siemens-element-ng-status-bar.d.ts +2 -2
  146. package/types/siemens-element-ng-tabs-legacy.d.ts +2 -1
  147. package/types/siemens-element-ng-theme.d.ts +1 -0
  148. package/types/siemens-element-ng-tour.d.ts +11 -0
  149. package/types/siemens-element-ng-translate.d.ts +8 -0
  150. package/types/siemens-element-ng-tree-view.d.ts +0 -8
@@ -1,22 +1,24 @@
1
- import { CdkMenuTrigger } from '@angular/cdk/menu';
2
1
  import * as i0 from '@angular/core';
3
- import { Directive, input, Component, booleanAttribute, output, model, inject, viewChild, PLATFORM_ID, effect, computed, signal, Injector, afterNextRender } from '@angular/core';
4
- import { elementOptionsVertical, elementRight2, elementIssue, elementCircleFilled, elementDocument, elementStateClose, elementStopFilled, elementSendFilled, elementPlus, elementAttachment } from '@siemens/element-icons';
5
- import { addIcons, SiIconComponent } from '@siemens/element-ng/icon';
6
- import { SiMenuFactoryComponent } from '@siemens/element-ng/menu';
2
+ import { Directive, inject, input, Component, booleanAttribute, output, model, viewChild, PLATFORM_ID, effect, InjectionToken, afterRenderEffect, computed, signal, contentChild, isSignal } from '@angular/core';
7
3
  import { SiSourceChipComponent } from '@siemens/element-ng/source-chip';
8
4
  import { t, SiTranslatePipe } from '@siemens/element-translate-ng/translate';
5
+ import { CdkMenuTrigger } from '@angular/cdk/menu';
6
+ import { elementOptionsVertical, elementRight2, elementIssue, elementCircleFilled, elementDocument, elementStateClose, elementStopFilled, elementSendFilled, elementPlus, elementAttachment } from '@siemens/element-icons';
7
+ import { addIcons, SiIconComponent } from '@siemens/element-ng/icon';
8
+ import { SiMenuActionService, SiMenuFactoryComponent } from '@siemens/element-ng/menu';
9
9
  import * as i1 from '@siemens/element-ng/resize-observer';
10
10
  import { SiResponsiveContainerDirective } from '@siemens/element-ng/resize-observer';
11
11
  import { SiLoadingSpinnerComponent } from '@siemens/element-ng/loading-spinner';
12
12
  import { SiModalService } from '@siemens/element-ng/modal';
13
- import { isPlatformBrowser } from '@angular/common';
13
+ import { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';
14
14
  import * as i1$1 from '@angular/forms';
15
15
  import { FormsModule } from '@angular/forms';
16
16
  import { SiFileUploadDirective } from '@siemens/element-ng/file-uploader';
17
17
  import { SiTooltipDirective } from '@siemens/element-ng/tooltip';
18
18
  import { SiActionCardComponent } from '@siemens/element-ng/card';
19
19
  import { SiSummaryChipComponent } from '@siemens/element-ng/summary-chip';
20
+ import { SiInlineNotificationComponent } from '@siemens/element-ng/inline-notification';
21
+ import { makeSiMarkdownOptions, SiMarkdownComponent } from '@siemens/element-ng/markdown';
20
22
 
21
23
  /**
22
24
  * Copyright (c) Siemens 2016 - 2026
@@ -50,6 +52,65 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
50
52
  }]
51
53
  }] });
52
54
 
55
+ /**
56
+ * Copyright (c) Siemens 2016 - 2026
57
+ * SPDX-License-Identifier: MIT
58
+ */
59
+ /**
60
+ * Shared action controls for user and AI messages.
61
+ *
62
+ * Pass the pre-split primary and secondary actions to this component.
63
+ *
64
+ * @experimental
65
+ */
66
+ class SiChatMessageActionsComponent {
67
+ menuActionService = inject(SiMenuActionService, { optional: true });
68
+ icons = addIcons({ elementOptionsVertical });
69
+ /** Primary message actions displayed inline.
70
+ * @defaultValue []
71
+ */
72
+ actions = input([], /* @ts-ignore */
73
+ ...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
74
+ /** Secondary actions displayed in the menu.
75
+ * @defaultValue []
76
+ */
77
+ secondaryActions = input([], /* @ts-ignore */
78
+ ...(ngDevMode ? [{ debugName: "secondaryActions" }] : /* istanbul ignore next */ []));
79
+ /** Parameter passed to action handlers. */
80
+ actionParam = input(/* @ts-ignore */
81
+ ...(ngDevMode ? [undefined, { debugName: "actionParam" }] : /* istanbul ignore next */ []));
82
+ /** More actions button aria label.
83
+ * @defaultValue
84
+ * ```
85
+ * t(() => $localize`:@@SI_CHAT_MESSAGE_ACTIONS.SECONDARY_ACTIONS:Additional actions`)
86
+ * ```
87
+ */
88
+ secondaryActionsLabel = input(t(() => $localize `:@@SI_CHAT_MESSAGE_ACTIONS.SECONDARY_ACTIONS:Additional actions`), /* @ts-ignore */
89
+ ...(ngDevMode ? [{ debugName: "secondaryActionsLabel" }] : /* istanbul ignore next */ []));
90
+ runAction(action) {
91
+ if (typeof action.action === 'function') {
92
+ action.action(this.actionParam(), action);
93
+ }
94
+ else {
95
+ this.menuActionService?.actionTriggered(action, this.actionParam());
96
+ }
97
+ }
98
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiChatMessageActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
99
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiChatMessageActionsComponent, isStandalone: true, selector: "si-chat-message-actions", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, secondaryActions: { classPropertyName: "secondaryActions", publicName: "secondaryActions", isSignal: true, isRequired: false, transformFunction: null }, actionParam: { classPropertyName: "actionParam", publicName: "actionParam", isSignal: true, isRequired: false, transformFunction: null }, secondaryActionsLabel: { classPropertyName: "secondaryActionsLabel", publicName: "secondaryActionsLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "d-block" }, ngImport: i0, template: "<div class=\"btn-group message-actions align-items-center\" role=\"group\" siChatMessageAction>\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost\"\n [class.btn-icon]=\"!!action.icon\"\n [disabled]=\"action.disabled\"\n [attr.aria-label]=\"action.label | translate\"\n (click)=\"runAction(action)\"\n >\n @if (action.icon) {\n <si-icon [icon]=\"action.icon\" />\n } @else {\n {{ action.label | translate }}\n }\n </button>\n }\n\n @if (secondaryActions().length > 0) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"secondaryActionsMenu\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n [attr.title]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon [icon]=\"icons.elementOptionsVertical\" />\n </button>\n\n <ng-template #secondaryActionsMenu>\n <si-menu-factory [items]=\"secondaryActions()\" [actionParam]=\"actionParam()\" />\n </ng-template>\n }\n\n <ng-content />\n</div>\n", dependencies: [{ kind: "directive", type: CdkMenuTrigger, selector: "[cdkMenuTriggerFor]", inputs: ["cdkMenuTriggerFor", "cdkMenuPosition", "cdkMenuTriggerData", "cdkMenuTriggerTransformOriginOn"], outputs: ["cdkMenuOpened", "cdkMenuClosed"], exportAs: ["cdkMenuTriggerFor"] }, { kind: "directive", type: SiChatMessageActionDirective, selector: "[siChatMessageAction]" }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiMenuFactoryComponent, selector: "si-menu-factory", inputs: ["items", "actionParam"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
100
+ }
101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiChatMessageActionsComponent, decorators: [{
102
+ type: Component,
103
+ args: [{ selector: 'si-chat-message-actions', imports: [
104
+ CdkMenuTrigger,
105
+ SiChatMessageActionDirective,
106
+ SiIconComponent,
107
+ SiMenuFactoryComponent,
108
+ SiTranslatePipe
109
+ ], host: {
110
+ class: 'd-block'
111
+ }, template: "<div class=\"btn-group message-actions align-items-center\" role=\"group\" siChatMessageAction>\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost\"\n [class.btn-icon]=\"!!action.icon\"\n [disabled]=\"action.disabled\"\n [attr.aria-label]=\"action.label | translate\"\n (click)=\"runAction(action)\"\n >\n @if (action.icon) {\n <si-icon [icon]=\"action.icon\" />\n } @else {\n {{ action.label | translate }}\n }\n </button>\n }\n\n @if (secondaryActions().length > 0) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"secondaryActionsMenu\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n [attr.title]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon [icon]=\"icons.elementOptionsVertical\" />\n </button>\n\n <ng-template #secondaryActionsMenu>\n <si-menu-factory [items]=\"secondaryActions()\" [actionParam]=\"actionParam()\" />\n </ng-template>\n }\n\n <ng-content />\n</div>\n" }]
112
+ }], propDecorators: { actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], secondaryActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryActions", required: false }] }], actionParam: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionParam", required: false }] }], secondaryActionsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryActionsLabel", required: false }] }] } });
113
+
53
114
  /**
54
115
  * Copyright (c) Siemens 2016 - 2026
55
116
  * SPDX-License-Identifier: MIT
@@ -137,7 +198,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
137
198
  * @experimental
138
199
  */
139
200
  class SiAiMessageComponent {
140
- icons = addIcons({ elementOptionsVertical });
141
201
  /**
142
202
  * The AI-generated message content
143
203
  * @defaultValue ''
@@ -181,19 +241,16 @@ class SiAiMessageComponent {
181
241
  /** Emitted when a source has been clicked. */
182
242
  sourceClicked = output();
183
243
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiAiMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
184
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiAiMessageComponent, isStandalone: true, selector: "si-ai-message", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, secondaryActions: { classPropertyName: "secondaryActions", publicName: "secondaryActions", isSignal: true, isRequired: false, transformFunction: null }, actionParam: { classPropertyName: "actionParam", publicName: "actionParam", isSignal: true, isRequired: false, transformFunction: null }, sources: { classPropertyName: "sources", publicName: "sources", isSignal: true, isRequired: false, transformFunction: null }, secondaryActionsLabel: { classPropertyName: "secondaryActionsLabel", publicName: "secondaryActionsLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sourceClicked: "sourceClicked" }, ngImport: i0, template: "<si-chat-message alignment=\"start\" actionsPosition=\"bottom\" [loading]=\"loading()\">\n @if (content()) {\n <span class=\"text-pre-wrap\">{{ content() }}</span>\n } @else {\n <ng-content />\n }\n\n @let src = sources();\n @if (actions().length > 0 || secondaryActions().length > 0 || src?.length) {\n <div class=\"btn-group ai-message-actions align-items-center\" role=\"group\" siChatMessageAction>\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"action.disabled\"\n [attr.aria-label]=\"action.label | translate\"\n (click)=\"action.action(actionParam(), action)\"\n >\n <si-icon [icon]=\"action.icon\" />\n </button>\n }\n\n @if (secondaryActions().length > 0) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"secondaryActionsMenu\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n [attr.title]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon [icon]=\"icons.elementOptionsVertical\" />\n </button>\n\n <ng-template #secondaryActionsMenu>\n <si-menu-factory [items]=\"secondaryActions()\" [actionParam]=\"actionParam()\" />\n </ng-template>\n }\n\n @if (src?.length) {\n <si-source-chip\n showIcon\n showLabel\n [sources]=\"src\"\n (sourceClicked)=\"sourceClicked.emit($event)\"\n />\n }\n </div>\n }\n</si-chat-message>\n", styles: [":host{display:block}si-chat-message{--chat-message-bubble-bg: transparent;--chat-message-bubble-padding: 0;margin-block-end:calc(var(--si-sys-sizing-spacing-y-20) * -1)}.ai-message-actions{margin-block-start:calc(var(--si-sys-sizing-spacing-y-50) - var(--si-sys-sizing-spacing-y-20))}\n"], dependencies: [{ kind: "directive", type: CdkMenuTrigger, selector: "[cdkMenuTriggerFor]", inputs: ["cdkMenuTriggerFor", "cdkMenuPosition", "cdkMenuTriggerData", "cdkMenuTriggerTransformOriginOn"], outputs: ["cdkMenuOpened", "cdkMenuClosed"], exportAs: ["cdkMenuTriggerFor"] }, { kind: "component", type: SiChatMessageComponent, selector: "si-chat-message", inputs: ["loading", "alignment", "actionsPosition"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiMenuFactoryComponent, selector: "si-menu-factory", inputs: ["items", "actionParam"] }, { kind: "directive", type: SiChatMessageActionDirective, selector: "[siChatMessageAction]" }, { kind: "component", type: SiSourceChipComponent, selector: "si-source-chip", inputs: ["showIcon", "showLabel", "sources", "compact", "disabled"], outputs: ["sourceClicked"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
244
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiAiMessageComponent, isStandalone: true, selector: "si-ai-message", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, secondaryActions: { classPropertyName: "secondaryActions", publicName: "secondaryActions", isSignal: true, isRequired: false, transformFunction: null }, actionParam: { classPropertyName: "actionParam", publicName: "actionParam", isSignal: true, isRequired: false, transformFunction: null }, sources: { classPropertyName: "sources", publicName: "sources", isSignal: true, isRequired: false, transformFunction: null }, secondaryActionsLabel: { classPropertyName: "secondaryActionsLabel", publicName: "secondaryActionsLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sourceClicked: "sourceClicked" }, ngImport: i0, template: "<si-chat-message alignment=\"start\" actionsPosition=\"bottom\" [loading]=\"loading()\">\n @if (content()) {\n <span class=\"text-pre-wrap\">{{ content() }}</span>\n } @else {\n <ng-content />\n }\n\n @let src = sources();\n @if (actions().length > 0 || secondaryActions().length > 0 || src?.length) {\n <si-chat-message-actions\n class=\"ai-message-actions\"\n siChatMessageAction\n [actions]=\"actions()\"\n [secondaryActions]=\"secondaryActions()\"\n [actionParam]=\"actionParam()\"\n [secondaryActionsLabel]=\"secondaryActionsLabel()\"\n >\n @if (src?.length) {\n <si-source-chip\n showIcon\n showLabel\n [sources]=\"src\"\n (sourceClicked)=\"sourceClicked.emit($event)\"\n />\n }\n </si-chat-message-actions>\n }\n</si-chat-message>\n", styles: [":host{display:block}si-chat-message{--chat-message-bubble-bg: transparent;--chat-message-bubble-padding: 0;margin-block-end:calc(var(--si-sys-sizing-spacing-y-20) * -1)}.ai-message-actions{margin-block-start:calc(var(--si-sys-sizing-spacing-y-50) - var(--si-sys-sizing-spacing-y-20))}\n"], dependencies: [{ kind: "component", type: SiChatMessageComponent, selector: "si-chat-message", inputs: ["loading", "alignment", "actionsPosition"] }, { kind: "directive", type: SiChatMessageActionDirective, selector: "[siChatMessageAction]" }, { kind: "component", type: SiChatMessageActionsComponent, selector: "si-chat-message-actions", inputs: ["actions", "secondaryActions", "actionParam", "secondaryActionsLabel"] }, { kind: "component", type: SiSourceChipComponent, selector: "si-source-chip", inputs: ["showIcon", "showLabel", "sources", "compact", "disabled"], outputs: ["sourceClicked"] }] });
185
245
  }
186
246
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiAiMessageComponent, decorators: [{
187
247
  type: Component,
188
248
  args: [{ selector: 'si-ai-message', imports: [
189
- CdkMenuTrigger,
190
249
  SiChatMessageComponent,
191
- SiIconComponent,
192
- SiMenuFactoryComponent,
193
250
  SiChatMessageActionDirective,
194
- SiTranslatePipe,
251
+ SiChatMessageActionsComponent,
195
252
  SiSourceChipComponent
196
- ], template: "<si-chat-message alignment=\"start\" actionsPosition=\"bottom\" [loading]=\"loading()\">\n @if (content()) {\n <span class=\"text-pre-wrap\">{{ content() }}</span>\n } @else {\n <ng-content />\n }\n\n @let src = sources();\n @if (actions().length > 0 || secondaryActions().length > 0 || src?.length) {\n <div class=\"btn-group ai-message-actions align-items-center\" role=\"group\" siChatMessageAction>\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"action.disabled\"\n [attr.aria-label]=\"action.label | translate\"\n (click)=\"action.action(actionParam(), action)\"\n >\n <si-icon [icon]=\"action.icon\" />\n </button>\n }\n\n @if (secondaryActions().length > 0) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"secondaryActionsMenu\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n [attr.title]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon [icon]=\"icons.elementOptionsVertical\" />\n </button>\n\n <ng-template #secondaryActionsMenu>\n <si-menu-factory [items]=\"secondaryActions()\" [actionParam]=\"actionParam()\" />\n </ng-template>\n }\n\n @if (src?.length) {\n <si-source-chip\n showIcon\n showLabel\n [sources]=\"src\"\n (sourceClicked)=\"sourceClicked.emit($event)\"\n />\n }\n </div>\n }\n</si-chat-message>\n", styles: [":host{display:block}si-chat-message{--chat-message-bubble-bg: transparent;--chat-message-bubble-padding: 0;margin-block-end:calc(var(--si-sys-sizing-spacing-y-20) * -1)}.ai-message-actions{margin-block-start:calc(var(--si-sys-sizing-spacing-y-50) - var(--si-sys-sizing-spacing-y-20))}\n"] }]
253
+ ], template: "<si-chat-message alignment=\"start\" actionsPosition=\"bottom\" [loading]=\"loading()\">\n @if (content()) {\n <span class=\"text-pre-wrap\">{{ content() }}</span>\n } @else {\n <ng-content />\n }\n\n @let src = sources();\n @if (actions().length > 0 || secondaryActions().length > 0 || src?.length) {\n <si-chat-message-actions\n class=\"ai-message-actions\"\n siChatMessageAction\n [actions]=\"actions()\"\n [secondaryActions]=\"secondaryActions()\"\n [actionParam]=\"actionParam()\"\n [secondaryActionsLabel]=\"secondaryActionsLabel()\"\n >\n @if (src?.length) {\n <si-source-chip\n showIcon\n showLabel\n [sources]=\"src\"\n (sourceClicked)=\"sourceClicked.emit($event)\"\n />\n }\n </si-chat-message-actions>\n }\n</si-chat-message>\n", styles: [":host{display:block}si-chat-message{--chat-message-bubble-bg: transparent;--chat-message-bubble-padding: 0;margin-block-end:calc(var(--si-sys-sizing-spacing-y-20) * -1)}.ai-message-actions{margin-block-start:calc(var(--si-sys-sizing-spacing-y-50) - var(--si-sys-sizing-spacing-y-20))}\n"] }]
197
254
  }], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], secondaryActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryActions", required: false }] }], actionParam: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionParam", required: false }] }], sources: [{ type: i0.Input, args: [{ isSignal: true, alias: "sources", required: false }] }], secondaryActionsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryActionsLabel", required: false }] }], sourceClicked: [{ type: i0.Output, args: ["sourceClicked"] }] } });
198
255
 
199
256
  /**
@@ -385,11 +442,11 @@ class SiAttachmentListComponent {
385
442
  return this.icons.elementDocument;
386
443
  }
387
444
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiAttachmentListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
388
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiAttachmentListComponent, isStandalone: true, selector: "si-attachment-list", inputs: { attachments: { classPropertyName: "attachments", publicName: "attachments", isSignal: true, isRequired: false, transformFunction: null }, alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, removeLabel: { classPropertyName: "removeLabel", publicName: "removeLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { remove: "remove" }, ngImport: i0, template: "<div class=\"d-flex flex-wrap gap-4\" [class.justify-content-end]=\"alignment() === 'end'\">\n @for (attachment of attachments(); track $index) {\n <div class=\"attachment-item d-flex align-items-stretch\" role=\"group\">\n @if (attachment.previewTemplate) {\n <button\n type=\"button\"\n class=\"attachment-main focus-inside d-flex align-items-center flex-grow-1 min-width-0\"\n [attr.title]=\"attachment.name\"\n [attr.aria-label]=\"attachment.name\"\n (click)=\"openPreview($event, attachment)\"\n (keydown.enter)=\"openPreview($event, attachment)\"\n (keydown.space)=\"openPreview($event, attachment)\"\n >\n <si-icon\n class=\"attachment-icon icon flex-shrink-0 m-2\"\n [icon]=\"getFileIcon(attachment.name)\"\n />\n <div class=\"attachment-info flex-grow-1 min-width-0\">\n <span\n class=\"attachment-name me-4 text-truncate si-body d-block\"\n [title]=\"attachment.name\"\n >\n {{ attachment.name }}\n </span>\n </div>\n </button>\n } @else {\n <div class=\"attachment-main--static d-flex align-items-center flex-grow-1 min-width-0\">\n <si-icon\n class=\"attachment-icon icon flex-shrink-0 m-2\"\n [icon]=\"getFileIcon(attachment.name)\"\n />\n <div class=\"attachment-info flex-grow-1 min-width-0\">\n <span\n class=\"attachment-name me-4 text-truncate si-body d-block\"\n [title]=\"attachment.name\"\n >\n {{ attachment.name }}\n </span>\n </div>\n </div>\n }\n\n @if (removable()) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-sm btn-icon expand-button flex-shrink-0 ms-auto align-self-center focus-inside m-2\"\n [attr.aria-label]=\"removeLabel() | translate: { attachment: attachment.name }\"\n (click)=\"remove.emit(attachment); $event.stopPropagation()\"\n >\n <si-icon class=\"icon\" [icon]=\"icons.elementStateClose\" />\n </button>\n }\n </div>\n }\n</div>\n", styles: [".attachment-item{border-radius:var(--element-radius-2);overflow:hidden;background-color:var(--attachment-list-bg, transparent);color:var(--attachment-name-color, var(--si-sys-color-text-secondary));border:1px solid var(--si-sys-color-border-4)}.attachment-main{appearance:none;border:0;background:none;padding:0;margin:0;inline-size:100%;text-align:inherit;color:inherit;cursor:pointer}.attachment-icon{display:flex;align-items:center;justify-content:center;color:var(--si-sys-color-text-primary)}.attachment-info{display:flex;flex-direction:column;gap:2px;min-inline-size:0}.attachment-info .attachment-name{line-height:1.2}.attachment-info .attachment-size{line-height:1}.expand-button{border-radius:var(--element-radius-2)}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
445
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiAttachmentListComponent, isStandalone: true, selector: "si-attachment-list", inputs: { attachments: { classPropertyName: "attachments", publicName: "attachments", isSignal: true, isRequired: false, transformFunction: null }, alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, removeLabel: { classPropertyName: "removeLabel", publicName: "removeLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { remove: "remove" }, ngImport: i0, template: "<div class=\"d-flex flex-wrap gap-4\" [class.justify-content-end]=\"alignment() === 'end'\">\n @for (attachment of attachments(); track $index) {\n <div class=\"attachment-item d-flex align-items-stretch\" role=\"group\">\n @if (attachment.previewTemplate) {\n <button\n type=\"button\"\n class=\"attachment-main focus-inside d-flex align-items-center flex-grow-1 min-width-0\"\n [attr.title]=\"attachment.name\"\n [attr.aria-label]=\"attachment.name\"\n (click)=\"openPreview($event, attachment)\"\n (keydown.enter)=\"openPreview($event, attachment)\"\n (keydown.space)=\"openPreview($event, attachment)\"\n >\n <si-icon\n class=\"attachment-icon icon flex-shrink-0 m-2\"\n [icon]=\"getFileIcon(attachment.name)\"\n />\n <div class=\"attachment-info flex-grow-1 min-width-0\">\n <span\n class=\"attachment-name me-4 text-truncate si-body d-block\"\n [title]=\"attachment.name\"\n >\n {{ attachment.name }}\n </span>\n </div>\n </button>\n } @else {\n <div class=\"attachment-main--static d-flex align-items-center flex-grow-1 min-width-0\">\n <si-icon\n class=\"attachment-icon icon flex-shrink-0 m-2\"\n [icon]=\"getFileIcon(attachment.name)\"\n />\n <div class=\"attachment-info flex-grow-1 min-width-0\">\n <span\n class=\"attachment-name me-4 text-truncate si-body d-block\"\n [title]=\"attachment.name\"\n >\n {{ attachment.name }}\n </span>\n </div>\n </div>\n }\n\n @if (removable()) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-sm btn-icon expand-button flex-shrink-0 ms-auto align-self-center focus-inside m-2\"\n [attr.aria-label]=\"removeLabel() | translate: { attachment: attachment.name }\"\n (click)=\"remove.emit(attachment); $event.stopPropagation()\"\n >\n <si-icon class=\"icon\" [icon]=\"icons.elementStateClose\" />\n </button>\n }\n </div>\n }\n</div>\n", styles: [".attachment-item{border-radius:var(--si-sys-sizing-border-radius-sm);overflow:hidden;background-color:var(--attachment-list-bg, transparent);color:var(--attachment-name-color, var(--si-sys-color-text-secondary));border:1px solid var(--si-sys-color-border-4)}.attachment-main{appearance:none;border:0;background:none;padding:0;margin:0;inline-size:100%;text-align:inherit;color:inherit;cursor:pointer}.attachment-icon{display:flex;align-items:center;justify-content:center;color:var(--si-sys-color-text-primary)}.attachment-info{display:flex;flex-direction:column;gap:2px;min-inline-size:0}.attachment-info .attachment-name{line-height:1.2}.attachment-info .attachment-size{line-height:1}.expand-button{border-radius:var(--si-sys-sizing-border-radius-sm)}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
389
446
  }
390
447
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiAttachmentListComponent, decorators: [{
391
448
  type: Component,
392
- args: [{ selector: 'si-attachment-list', imports: [SiIconComponent, SiTranslatePipe], template: "<div class=\"d-flex flex-wrap gap-4\" [class.justify-content-end]=\"alignment() === 'end'\">\n @for (attachment of attachments(); track $index) {\n <div class=\"attachment-item d-flex align-items-stretch\" role=\"group\">\n @if (attachment.previewTemplate) {\n <button\n type=\"button\"\n class=\"attachment-main focus-inside d-flex align-items-center flex-grow-1 min-width-0\"\n [attr.title]=\"attachment.name\"\n [attr.aria-label]=\"attachment.name\"\n (click)=\"openPreview($event, attachment)\"\n (keydown.enter)=\"openPreview($event, attachment)\"\n (keydown.space)=\"openPreview($event, attachment)\"\n >\n <si-icon\n class=\"attachment-icon icon flex-shrink-0 m-2\"\n [icon]=\"getFileIcon(attachment.name)\"\n />\n <div class=\"attachment-info flex-grow-1 min-width-0\">\n <span\n class=\"attachment-name me-4 text-truncate si-body d-block\"\n [title]=\"attachment.name\"\n >\n {{ attachment.name }}\n </span>\n </div>\n </button>\n } @else {\n <div class=\"attachment-main--static d-flex align-items-center flex-grow-1 min-width-0\">\n <si-icon\n class=\"attachment-icon icon flex-shrink-0 m-2\"\n [icon]=\"getFileIcon(attachment.name)\"\n />\n <div class=\"attachment-info flex-grow-1 min-width-0\">\n <span\n class=\"attachment-name me-4 text-truncate si-body d-block\"\n [title]=\"attachment.name\"\n >\n {{ attachment.name }}\n </span>\n </div>\n </div>\n }\n\n @if (removable()) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-sm btn-icon expand-button flex-shrink-0 ms-auto align-self-center focus-inside m-2\"\n [attr.aria-label]=\"removeLabel() | translate: { attachment: attachment.name }\"\n (click)=\"remove.emit(attachment); $event.stopPropagation()\"\n >\n <si-icon class=\"icon\" [icon]=\"icons.elementStateClose\" />\n </button>\n }\n </div>\n }\n</div>\n", styles: [".attachment-item{border-radius:var(--element-radius-2);overflow:hidden;background-color:var(--attachment-list-bg, transparent);color:var(--attachment-name-color, var(--si-sys-color-text-secondary));border:1px solid var(--si-sys-color-border-4)}.attachment-main{appearance:none;border:0;background:none;padding:0;margin:0;inline-size:100%;text-align:inherit;color:inherit;cursor:pointer}.attachment-icon{display:flex;align-items:center;justify-content:center;color:var(--si-sys-color-text-primary)}.attachment-info{display:flex;flex-direction:column;gap:2px;min-inline-size:0}.attachment-info .attachment-name{line-height:1.2}.attachment-info .attachment-size{line-height:1}.expand-button{border-radius:var(--element-radius-2)}\n"] }]
449
+ args: [{ selector: 'si-attachment-list', imports: [SiIconComponent, SiTranslatePipe], template: "<div class=\"d-flex flex-wrap gap-4\" [class.justify-content-end]=\"alignment() === 'end'\">\n @for (attachment of attachments(); track $index) {\n <div class=\"attachment-item d-flex align-items-stretch\" role=\"group\">\n @if (attachment.previewTemplate) {\n <button\n type=\"button\"\n class=\"attachment-main focus-inside d-flex align-items-center flex-grow-1 min-width-0\"\n [attr.title]=\"attachment.name\"\n [attr.aria-label]=\"attachment.name\"\n (click)=\"openPreview($event, attachment)\"\n (keydown.enter)=\"openPreview($event, attachment)\"\n (keydown.space)=\"openPreview($event, attachment)\"\n >\n <si-icon\n class=\"attachment-icon icon flex-shrink-0 m-2\"\n [icon]=\"getFileIcon(attachment.name)\"\n />\n <div class=\"attachment-info flex-grow-1 min-width-0\">\n <span\n class=\"attachment-name me-4 text-truncate si-body d-block\"\n [title]=\"attachment.name\"\n >\n {{ attachment.name }}\n </span>\n </div>\n </button>\n } @else {\n <div class=\"attachment-main--static d-flex align-items-center flex-grow-1 min-width-0\">\n <si-icon\n class=\"attachment-icon icon flex-shrink-0 m-2\"\n [icon]=\"getFileIcon(attachment.name)\"\n />\n <div class=\"attachment-info flex-grow-1 min-width-0\">\n <span\n class=\"attachment-name me-4 text-truncate si-body d-block\"\n [title]=\"attachment.name\"\n >\n {{ attachment.name }}\n </span>\n </div>\n </div>\n }\n\n @if (removable()) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-sm btn-icon expand-button flex-shrink-0 ms-auto align-self-center focus-inside m-2\"\n [attr.aria-label]=\"removeLabel() | translate: { attachment: attachment.name }\"\n (click)=\"remove.emit(attachment); $event.stopPropagation()\"\n >\n <si-icon class=\"icon\" [icon]=\"icons.elementStateClose\" />\n </button>\n }\n </div>\n }\n</div>\n", styles: [".attachment-item{border-radius:var(--si-sys-sizing-border-radius-sm);overflow:hidden;background-color:var(--attachment-list-bg, transparent);color:var(--attachment-name-color, var(--si-sys-color-text-secondary));border:1px solid var(--si-sys-color-border-4)}.attachment-main{appearance:none;border:0;background:none;padding:0;margin:0;inline-size:100%;text-align:inherit;color:inherit;cursor:pointer}.attachment-icon{display:flex;align-items:center;justify-content:center;color:var(--si-sys-color-text-primary)}.attachment-info{display:flex;flex-direction:column;gap:2px;min-inline-size:0}.attachment-info .attachment-name{line-height:1.2}.attachment-info .attachment-size{line-height:1}.expand-button{border-radius:var(--si-sys-sizing-border-radius-sm)}\n"] }]
393
450
  }], propDecorators: { attachments: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachments", required: false }] }], alignment: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignment", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], removeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeLabel", required: false }] }], remove: [{ type: i0.Output, args: ["remove"] }] } });
394
451
 
395
452
  /**
@@ -564,14 +621,14 @@ class SiChatContainerComponent {
564
621
  container?.nativeElement.focus();
565
622
  }
566
623
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiChatContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
567
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: SiChatContainerComponent, isStandalone: true, selector: "si-chat-container", inputs: { colorVariant: { classPropertyName: "colorVariant", publicName: "colorVariant", isSignal: true, isRequired: false, transformFunction: null }, noAutoScroll: { classPropertyName: "noAutoScroll", publicName: "noAutoScroll", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "colorVariant()" }, classAttribute: "d-flex si-layout-inner flex-grow-1 flex-column h-100 w-100" }, viewQueries: [{ propertyName: "messagesContainer", first: true, predicate: ["messagesContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"chat-container d-flex flex-column flex-grow-1 px-6 py-6 w-100\">\n <div\n #messagesContainer\n class=\"messages-container d-flex flex-column flex-grow-1 w-100 align-self-center\"\n tabindex=\"0\"\n (scroll)=\"onScroll()\"\n >\n <ng-content />\n </div>\n\n <div class=\"chat-input-area py-3 pt-0 mt-6 d-flex flex-column align-items-center\">\n <ng-content select=\"si-inline-notification\" />\n <ng-content select=\"si-chat-input,[siChatContainerInput]\" />\n </div>\n</div>\n", styles: [":host{overflow-y:hidden;overflow-x:visible}:host.base-0{background-color:var(--si-sys-color-background-0)}:host.base-1{background-color:var(--si-sys-color-background-1)}.chat-container.initialized{scroll-behavior:smooth}::ng-deep .chat-container:has(si-ai-welcome-screen){inline-size:100%;padding-inline-start:0!important;padding-inline-end:0!important}::ng-deep .chat-container:has(si-ai-welcome-screen) :is(.chat-input-area,si-ai-welcome-screen){padding-inline-start:var(--si-sys-sizing-spacing-x-60);padding-inline-end:var(--si-sys-sizing-spacing-x-60)}.chat-container{min-block-size:0;overflow-y:auto;overflow-x:visible}.messages-container{overflow-y:auto;overflow-x:visible;min-block-size:5rem;gap:calc(var(--si-sys-sizing-spacing-y-90) + var(--si-sys-sizing-spacing-y-40)) calc(var(--si-sys-sizing-spacing-x-90) + var(--si-sys-sizing-spacing-x-40))}.messages-container ::ng-deep si-user-message:not(.last),.messages-container>::ng-deep si-activity-message:has(+si-activity-message){margin-block-end:calc(-1 * (var(--si-sys-sizing-spacing-y-90) + var(--si-sys-sizing-spacing-y-40)))}.messages-container>::ng-deep :is(si-activity-message,si-activity-trace):has(+si-ai-message),.messages-container>::ng-deep si-ai-message:has(+:is(si-activity-message,si-activity-trace)){margin-block-end:calc(-1 * (var(--si-sys-sizing-spacing-y-90) + var(--si-sys-sizing-spacing-y-40)) + var(--si-sys-sizing-spacing-y-60))}::ng-deep .messages-container:not(:has(si-ai-welcome-screen)){max-inline-size:720px}::ng-deep .messages-container:has(si-ai-welcome-screen){inline-size:100%}.chat-input-area{justify-self:flex-end;align-self:center;overflow:visible;inline-size:100%}.chat-input-area>::ng-deep *{max-inline-size:720px}::ng-deep .chat-input-area:empty:not(:has(si-inline-notification)),::ng-deep .chat-input-area:has([sichatcontainerinput]:empty):not(:has(si-inline-notification)){display:none!important}.chat-input-area:empty ::ng-deep>si-inline-notification,.chat-input-area:empty ::ng-deep *>si-inline-notification,.chat-input-area:has([sichatcontainerinput]:empty) ::ng-deep>si-inline-notification,.chat-input-area:has([sichatcontainerinput]:empty) ::ng-deep *>si-inline-notification{margin-block-end:0!important}.chat-container:has(.messages-container:not(:empty)) .messages-empty-state{display:none!important}:host-context(.si-container-xs,.si-container-sm) ::ng-deep si-inline-notification :is(.alert,.alert-link){font-size:var(--si-sys-typography-font-size-body)}\n"] });
624
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: SiChatContainerComponent, isStandalone: true, selector: "si-chat-container", inputs: { colorVariant: { classPropertyName: "colorVariant", publicName: "colorVariant", isSignal: true, isRequired: false, transformFunction: null }, noAutoScroll: { classPropertyName: "noAutoScroll", publicName: "noAutoScroll", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "colorVariant()" }, classAttribute: "d-flex si-layout-inner flex-grow-1 flex-column h-100 w-100" }, viewQueries: [{ propertyName: "messagesContainer", first: true, predicate: ["messagesContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"chat-container d-flex flex-column flex-grow-1 px-6 py-6 w-100\">\n <div\n #messagesContainer\n class=\"messages-container d-flex flex-column flex-grow-1 w-100 align-self-center\"\n tabindex=\"0\"\n (scroll)=\"onScroll()\"\n >\n <ng-content />\n </div>\n\n <div class=\"chat-input-area py-3 pt-0 mt-6 d-flex flex-column align-items-center\">\n <ng-content select=\"si-inline-notification\" />\n <ng-content select=\"si-chat-input,[siChatContainerInput]\" />\n </div>\n</div>\n", styles: [":host{overflow-y:hidden;overflow-x:visible}:host.base-0{background-color:var(--si-sys-color-background-0)}:host.base-1{background-color:var(--si-sys-color-background-1)}.chat-container.initialized{scroll-behavior:smooth}::ng-deep .chat-container:has(si-ai-welcome-screen){inline-size:100%;padding-inline-start:0!important;padding-inline-end:0!important}::ng-deep .chat-container:has(si-ai-welcome-screen) :is(.chat-input-area,si-ai-welcome-screen){padding-inline-start:var(--si-sys-sizing-spacing-x-60);padding-inline-end:var(--si-sys-sizing-spacing-x-60)}.chat-container{min-block-size:0;overflow-y:auto;overflow-x:visible}.messages-container{overflow-y:auto;overflow-x:visible;min-block-size:5rem;gap:calc(var(--si-sys-sizing-spacing-y-90) + var(--si-sys-sizing-spacing-y-40)) calc(var(--si-sys-sizing-spacing-x-90) + var(--si-sys-sizing-spacing-x-40))}.messages-container ::ng-deep si-user-message:not(.last),.messages-container>::ng-deep si-activity-message:has(+si-activity-message){margin-block-end:calc(-1 * (var(--si-sys-sizing-spacing-y-90) + var(--si-sys-sizing-spacing-y-40)))}.messages-container>::ng-deep :is(si-activity-message,si-activity-trace):has(+si-ai-message),.messages-container>::ng-deep si-ai-message:has(+:is(si-activity-message,si-activity-trace)){margin-block-end:calc(-1 * (var(--si-sys-sizing-spacing-y-90) + var(--si-sys-sizing-spacing-y-40)) + var(--si-sys-sizing-spacing-y-60))}::ng-deep .messages-container:not(:has(si-ai-welcome-screen)){max-inline-size:720px}::ng-deep .messages-container:has(si-ai-welcome-screen){inline-size:100%}.chat-input-area{justify-self:flex-end;align-self:center;overflow:visible;inline-size:100%}.chat-input-area>::ng-deep *{max-inline-size:720px}::ng-deep .chat-input-area:empty:not(:has(si-inline-notification)),::ng-deep .chat-input-area:has([sichatcontainerinput]:empty):not(:has(si-inline-notification)){display:none!important}.chat-input-area:empty ::ng-deep>si-inline-notification,.chat-input-area:empty ::ng-deep *>si-inline-notification,.chat-input-area:has([sichatcontainerinput]:empty) ::ng-deep>si-inline-notification,.chat-input-area:has([sichatcontainerinput]:empty) ::ng-deep *>si-inline-notification{margin-block-end:0!important}.chat-container:has(.messages-container:not(:empty)) .messages-empty-state{display:none!important}:host-context(.si-container-xs,.si-container-sm) ::ng-deep si-inline-notification :is(.alert,.alert-link){font-size:var(--si-sys-typography-body-font-size)}\n"] });
568
625
  }
569
626
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiChatContainerComponent, decorators: [{
570
627
  type: Component,
571
628
  args: [{ selector: 'si-chat-container', host: {
572
629
  class: 'd-flex si-layout-inner flex-grow-1 flex-column h-100 w-100',
573
630
  '[class]': 'colorVariant()'
574
- }, template: "<div class=\"chat-container d-flex flex-column flex-grow-1 px-6 py-6 w-100\">\n <div\n #messagesContainer\n class=\"messages-container d-flex flex-column flex-grow-1 w-100 align-self-center\"\n tabindex=\"0\"\n (scroll)=\"onScroll()\"\n >\n <ng-content />\n </div>\n\n <div class=\"chat-input-area py-3 pt-0 mt-6 d-flex flex-column align-items-center\">\n <ng-content select=\"si-inline-notification\" />\n <ng-content select=\"si-chat-input,[siChatContainerInput]\" />\n </div>\n</div>\n", styles: [":host{overflow-y:hidden;overflow-x:visible}:host.base-0{background-color:var(--si-sys-color-background-0)}:host.base-1{background-color:var(--si-sys-color-background-1)}.chat-container.initialized{scroll-behavior:smooth}::ng-deep .chat-container:has(si-ai-welcome-screen){inline-size:100%;padding-inline-start:0!important;padding-inline-end:0!important}::ng-deep .chat-container:has(si-ai-welcome-screen) :is(.chat-input-area,si-ai-welcome-screen){padding-inline-start:var(--si-sys-sizing-spacing-x-60);padding-inline-end:var(--si-sys-sizing-spacing-x-60)}.chat-container{min-block-size:0;overflow-y:auto;overflow-x:visible}.messages-container{overflow-y:auto;overflow-x:visible;min-block-size:5rem;gap:calc(var(--si-sys-sizing-spacing-y-90) + var(--si-sys-sizing-spacing-y-40)) calc(var(--si-sys-sizing-spacing-x-90) + var(--si-sys-sizing-spacing-x-40))}.messages-container ::ng-deep si-user-message:not(.last),.messages-container>::ng-deep si-activity-message:has(+si-activity-message){margin-block-end:calc(-1 * (var(--si-sys-sizing-spacing-y-90) + var(--si-sys-sizing-spacing-y-40)))}.messages-container>::ng-deep :is(si-activity-message,si-activity-trace):has(+si-ai-message),.messages-container>::ng-deep si-ai-message:has(+:is(si-activity-message,si-activity-trace)){margin-block-end:calc(-1 * (var(--si-sys-sizing-spacing-y-90) + var(--si-sys-sizing-spacing-y-40)) + var(--si-sys-sizing-spacing-y-60))}::ng-deep .messages-container:not(:has(si-ai-welcome-screen)){max-inline-size:720px}::ng-deep .messages-container:has(si-ai-welcome-screen){inline-size:100%}.chat-input-area{justify-self:flex-end;align-self:center;overflow:visible;inline-size:100%}.chat-input-area>::ng-deep *{max-inline-size:720px}::ng-deep .chat-input-area:empty:not(:has(si-inline-notification)),::ng-deep .chat-input-area:has([sichatcontainerinput]:empty):not(:has(si-inline-notification)){display:none!important}.chat-input-area:empty ::ng-deep>si-inline-notification,.chat-input-area:empty ::ng-deep *>si-inline-notification,.chat-input-area:has([sichatcontainerinput]:empty) ::ng-deep>si-inline-notification,.chat-input-area:has([sichatcontainerinput]:empty) ::ng-deep *>si-inline-notification{margin-block-end:0!important}.chat-container:has(.messages-container:not(:empty)) .messages-empty-state{display:none!important}:host-context(.si-container-xs,.si-container-sm) ::ng-deep si-inline-notification :is(.alert,.alert-link){font-size:var(--si-sys-typography-font-size-body)}\n"] }]
631
+ }, template: "<div class=\"chat-container d-flex flex-column flex-grow-1 px-6 py-6 w-100\">\n <div\n #messagesContainer\n class=\"messages-container d-flex flex-column flex-grow-1 w-100 align-self-center\"\n tabindex=\"0\"\n (scroll)=\"onScroll()\"\n >\n <ng-content />\n </div>\n\n <div class=\"chat-input-area py-3 pt-0 mt-6 d-flex flex-column align-items-center\">\n <ng-content select=\"si-inline-notification\" />\n <ng-content select=\"si-chat-input,[siChatContainerInput]\" />\n </div>\n</div>\n", styles: [":host{overflow-y:hidden;overflow-x:visible}:host.base-0{background-color:var(--si-sys-color-background-0)}:host.base-1{background-color:var(--si-sys-color-background-1)}.chat-container.initialized{scroll-behavior:smooth}::ng-deep .chat-container:has(si-ai-welcome-screen){inline-size:100%;padding-inline-start:0!important;padding-inline-end:0!important}::ng-deep .chat-container:has(si-ai-welcome-screen) :is(.chat-input-area,si-ai-welcome-screen){padding-inline-start:var(--si-sys-sizing-spacing-x-60);padding-inline-end:var(--si-sys-sizing-spacing-x-60)}.chat-container{min-block-size:0;overflow-y:auto;overflow-x:visible}.messages-container{overflow-y:auto;overflow-x:visible;min-block-size:5rem;gap:calc(var(--si-sys-sizing-spacing-y-90) + var(--si-sys-sizing-spacing-y-40)) calc(var(--si-sys-sizing-spacing-x-90) + var(--si-sys-sizing-spacing-x-40))}.messages-container ::ng-deep si-user-message:not(.last),.messages-container>::ng-deep si-activity-message:has(+si-activity-message){margin-block-end:calc(-1 * (var(--si-sys-sizing-spacing-y-90) + var(--si-sys-sizing-spacing-y-40)))}.messages-container>::ng-deep :is(si-activity-message,si-activity-trace):has(+si-ai-message),.messages-container>::ng-deep si-ai-message:has(+:is(si-activity-message,si-activity-trace)){margin-block-end:calc(-1 * (var(--si-sys-sizing-spacing-y-90) + var(--si-sys-sizing-spacing-y-40)) + var(--si-sys-sizing-spacing-y-60))}::ng-deep .messages-container:not(:has(si-ai-welcome-screen)){max-inline-size:720px}::ng-deep .messages-container:has(si-ai-welcome-screen){inline-size:100%}.chat-input-area{justify-self:flex-end;align-self:center;overflow:visible;inline-size:100%}.chat-input-area>::ng-deep *{max-inline-size:720px}::ng-deep .chat-input-area:empty:not(:has(si-inline-notification)),::ng-deep .chat-input-area:has([sichatcontainerinput]:empty):not(:has(si-inline-notification)){display:none!important}.chat-input-area:empty ::ng-deep>si-inline-notification,.chat-input-area:empty ::ng-deep *>si-inline-notification,.chat-input-area:has([sichatcontainerinput]:empty) ::ng-deep>si-inline-notification,.chat-input-area:has([sichatcontainerinput]:empty) ::ng-deep *>si-inline-notification{margin-block-end:0!important}.chat-container:has(.messages-container:not(:empty)) .messages-empty-state{display:none!important}:host-context(.si-container-xs,.si-container-sm) ::ng-deep si-inline-notification :is(.alert,.alert-link){font-size:var(--si-sys-typography-body-font-size)}\n"] }]
575
632
  }], ctorParameters: () => [], propDecorators: { messagesContainer: [{ type: i0.ViewChild, args: ['messagesContainer', { isSignal: true }] }], colorVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorVariant", required: false }] }], noAutoScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "noAutoScroll", required: false }] }] } });
576
633
 
577
634
  /**
@@ -610,6 +667,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
610
667
  }]
611
668
  }] });
612
669
 
670
+ /**
671
+ * Copyright (c) Siemens 2016 - 2026
672
+ * SPDX-License-Identifier: MIT
673
+ */
674
+ /**
675
+ * Optional parent contract for {@link SiChatInputComponent}.
676
+ */
677
+ const SI_CHAT_INPUT_PARENT = new InjectionToken('si.chat-input.parent');
678
+
613
679
  /**
614
680
  * Copyright (c) Siemens 2016 - 2026
615
681
  * SPDX-License-Identifier: MIT
@@ -628,6 +694,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
628
694
  * - Displaying primary and secondary actions.
629
695
  *
630
696
  * Additionally to the inputs and outputs documented here, the component supports content projection via the following slots:
697
+ *
631
698
  * - Default content: Custom action buttons to display inline, prefer using the `actions` input for buttons, can be used in addition.
632
699
  * - `siChatInputDisclaimer` selector: Custom disclaimer content to display below the input area, prefer using the `disclaimer` input for simple text disclaimers.
633
700
  *
@@ -650,6 +717,24 @@ class SiChatInputComponent {
650
717
  elementSendFilled,
651
718
  elementStopFilled
652
719
  });
720
+ parent = inject(SI_CHAT_INPUT_PARENT, { optional: true });
721
+ constructor() {
722
+ effect(() => {
723
+ const parent = this.parent;
724
+ if (parent) {
725
+ this.sending.set(parent.inputSending());
726
+ this.interruptible.set(parent.inputInterruptible());
727
+ }
728
+ });
729
+ afterRenderEffect(() => {
730
+ const value = this.value();
731
+ const textarea = this.textInput()?.nativeElement;
732
+ if (textarea) {
733
+ textarea.value = value;
734
+ this.setTextareaHeight(textarea);
735
+ }
736
+ });
737
+ }
653
738
  /**
654
739
  * Current input value
655
740
  * @defaultValue ''
@@ -675,14 +760,16 @@ class SiChatInputComponent {
675
760
  * Whether a message is currently being sent, also prevent the sending of new ones while still allowing the user to type
676
761
  * @defaultValue false
677
762
  */
678
- sending = input(false, { ...(ngDevMode ? { debugName: "sending" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
763
+ sending = model(false, /* @ts-ignore */
764
+ ...(ngDevMode ? [{ debugName: "sending" }] : /* istanbul ignore next */ []));
679
765
  /**
680
766
  * Whether the input supports interrupting ongoing operations. When active,
681
767
  * the send button transforms into an interrupt button (with element-stop-filled icon).
682
768
  * If sending is true, the interrupt button will be disabled.
683
769
  * @defaultValue false
684
770
  */
685
- interruptible = input(false, { ...(ngDevMode ? { debugName: "interruptible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
771
+ interruptible = model(false, /* @ts-ignore */
772
+ ...(ngDevMode ? [{ debugName: "interruptible" }] : /* istanbul ignore next */ []));
686
773
  /**
687
774
  * Maximum number of characters allowed
688
775
  */
@@ -878,19 +965,18 @@ class SiChatInputComponent {
878
965
  ...(ngDevMode ? [{ debugName: "buttonLabel" }] : /* istanbul ignore next */ []));
879
966
  dragOver = signal(false, /* @ts-ignore */
880
967
  ...(ngDevMode ? [{ debugName: "dragOver" }] : /* istanbul ignore next */ []));
881
- injector = inject(Injector);
882
- onInputChange(value) {
883
- this.value.set(value);
968
+ menuActionService = inject(SiMenuActionService, { optional: true });
969
+ runAction(action) {
970
+ if (typeof action.action === 'function') {
971
+ action.action(this.actionParam(), action);
972
+ }
973
+ else {
974
+ this.menuActionService?.actionTriggered(action, this.actionParam());
975
+ }
884
976
  }
885
977
  selectFollowUpPrompt(prompt) {
886
978
  this.followUpPromptSelected.emit(prompt);
887
979
  this.focus();
888
- afterNextRender(() => {
889
- const textarea = this.textInput();
890
- if (textarea?.nativeElement) {
891
- this.setTextareaHeight(textarea.nativeElement);
892
- }
893
- }, { injector: this.injector });
894
980
  }
895
981
  onSend() {
896
982
  if (this.canSend()) {
@@ -898,6 +984,7 @@ class SiChatInputComponent {
898
984
  content: this.value(),
899
985
  attachments: this.attachments()
900
986
  });
987
+ this.parent?.onInputSend();
901
988
  this.value.set('');
902
989
  this.attachments.set([]);
903
990
  }
@@ -911,8 +998,14 @@ class SiChatInputComponent {
911
998
  }
912
999
  }
913
1000
  onKeyDown(event) {
1001
+ if (event.isComposing) {
1002
+ return;
1003
+ }
914
1004
  if (event.key === 'Enter' && !event.shiftKey) {
915
1005
  event.preventDefault();
1006
+ if (event.repeat) {
1007
+ return;
1008
+ }
916
1009
  if (!this.canSend()) {
917
1010
  return;
918
1011
  }
@@ -922,6 +1015,9 @@ class SiChatInputComponent {
922
1015
  this.onSend();
923
1016
  }
924
1017
  }
1018
+ onInput(event) {
1019
+ this.setTextareaHeight(event.target);
1020
+ }
925
1021
  onFilesAdded(uploadFiles) {
926
1022
  const validFiles = uploadFiles.filter(uploadFile => uploadFile.status === 'added');
927
1023
  validFiles.forEach(uploadFile => {
@@ -959,7 +1055,6 @@ class SiChatInputComponent {
959
1055
  ngAfterViewInit() {
960
1056
  const textarea = this.textInput();
961
1057
  if (textarea?.nativeElement) {
962
- this.setTextareaHeight(textarea.nativeElement);
963
1058
  if (this.autoFocus()) {
964
1059
  // Use setTimeout to ensure the element is fully rendered
965
1060
  setTimeout(() => {
@@ -968,10 +1063,6 @@ class SiChatInputComponent {
968
1063
  }
969
1064
  }
970
1065
  }
971
- adjustTextareaHeight(event) {
972
- const textarea = event.target;
973
- this.setTextareaHeight(textarea);
974
- }
975
1066
  /**
976
1067
  * Focus the textarea input
977
1068
  */
@@ -1017,7 +1108,7 @@ class SiChatInputComponent {
1017
1108
  textarea.style.height = finalHeight + 'px';
1018
1109
  }
1019
1110
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiChatInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1020
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiChatInputComponent, isStandalone: true, selector: "si-chat-input", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, sending: { classPropertyName: "sending", publicName: "sending", isSignal: true, isRequired: false, transformFunction: null }, interruptible: { classPropertyName: "interruptible", publicName: "interruptible", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, disclaimer: { classPropertyName: "disclaimer", publicName: "disclaimer", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, secondaryActions: { classPropertyName: "secondaryActions", publicName: "secondaryActions", isSignal: true, isRequired: false, transformFunction: null }, allowAttachments: { classPropertyName: "allowAttachments", publicName: "allowAttachments", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, attachments: { classPropertyName: "attachments", publicName: "attachments", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, actionParam: { classPropertyName: "actionParam", publicName: "actionParam", isSignal: true, isRequired: false, transformFunction: null }, sendButtonLabel: { classPropertyName: "sendButtonLabel", publicName: "sendButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, sendButtonIcon: { classPropertyName: "sendButtonIcon", publicName: "sendButtonIcon", isSignal: true, isRequired: false, transformFunction: null }, interruptButtonLabel: { classPropertyName: "interruptButtonLabel", publicName: "interruptButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, attachFileLabel: { classPropertyName: "attachFileLabel", publicName: "attachFileLabel", isSignal: true, isRequired: false, transformFunction: null }, removeAttachmentLabel: { classPropertyName: "removeAttachmentLabel", publicName: "removeAttachmentLabel", isSignal: true, isRequired: false, transformFunction: null }, secondaryActionsLabel: { classPropertyName: "secondaryActionsLabel", publicName: "secondaryActionsLabel", isSignal: true, isRequired: false, transformFunction: null }, followUpPrompts: { classPropertyName: "followUpPrompts", publicName: "followUpPrompts", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", attachments: "attachmentsChange", followUpPromptSelected: "followUpPromptSelected", send: "send", interrupt: "interrupt", fileError: "fileError" }, viewQueries: [{ propertyName: "textInput", first: true, predicate: ["textInput"], descendants: true, isSignal: true }, { propertyName: "fileUploadDirective", first: true, predicate: SiFileUploadDirective, descendants: true, isSignal: true }, { propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (followUpPrompts().length) {\n <div class=\"follow-up-prompts d-flex flex-wrap gap-4 mb-4\">\n @for (prompt of followUpPrompts(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-secondary-ghost fw-normal\"\n [disabled]=\"disabled() || sending()\"\n (click)=\"selectFollowUpPrompt(prompt)\"\n >{{ prompt }}</button\n >\n }\n </div>\n}\n\n<div\n class=\"input-wrapper border rounded-3\"\n [class.drag-over]=\"dragOver()\"\n (click)=\"onContainerClick($event)\"\n (drop)=\"dropHandler($event)\"\n (dragover)=\"dragOverHandler($event)\"\n (dragleave)=\"dragOver.set(false)\"\n>\n @if (hasAttachments()) {\n <si-attachment-list\n [attachments]=\"attachments()\"\n [removeLabel]=\"removeAttachmentLabel()\"\n [removable]=\"true\"\n (remove)=\"removeAttachment($event)\"\n />\n }\n\n <div class=\"si-body-paragraph\">\n <label class=\"form-label d-none\" [for]=\"id\">{{ label() | translate }}</label>\n <textarea\n #textInput\n class=\"chat-textarea w-100 border-0\"\n rows=\"1\"\n [id]=\"id\"\n [placeholder]=\"placeholder() | translate\"\n [disabled]=\"disabled()\"\n [maxlength]=\"maxLength() || null\"\n [(ngModel)]=\"value\"\n (keydown)=\"onKeyDown($event)\"\n (input)=\"adjustTextareaHeight($event)\"\n ></textarea>\n </div>\n\n <div class=\"d-flex align-items-center justify-content-between\">\n <div class=\"d-flex align-items-center gap-0\">\n <div class=\"btn-group\" role=\"group\">\n @if (allowAttachments()) {\n <input\n #fileInput\n type=\"file\"\n class=\"d-none\"\n siFileUpload\n [accept]=\"accept()\"\n [maxFileSize]=\"maxFileSize()\"\n [multiple]=\"true\"\n (validFiles)=\"onFilesAdded($event)\"\n (fileError)=\"onFileError($event)\"\n />\n }\n\n @if (allowAttachments() && !hasSecondaryActions()) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"disabled()\"\n [siTooltip]=\"attachFileLabel() | translate\"\n [attr.aria-label]=\"attachFileLabel() | translate\"\n (click)=\"triggerFileInput()\"\n >\n <si-icon [icon]=\"icons.elementAttachment\" />\n </button>\n }\n\n @if (hasMenuActions()) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"allActionsMenu\"\n [siTooltip]=\"secondaryActionsLabel() | translate\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon [icon]=\"icons.elementPlus\" />\n </button>\n\n <ng-template #allActionsMenu>\n <si-menu-factory [items]=\"combinedMenuActions()\" [actionParam]=\"actionParam()\" />\n </ng-template>\n }\n @if (hasActions()) {\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"action.disabled\"\n [siTooltip]=\"action.label | translate\"\n [attr.aria-label]=\"action.label | translate\"\n (click)=\"action.action(actionParam(), action)\"\n >\n <si-icon [icon]=\"action.icon\" />\n </button>\n }\n }\n </div>\n <div class=\"d-flex align-items-center gap-0\">\n <ng-content />\n </div>\n </div>\n\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"buttonDisabled()\"\n [attr.aria-label]=\"buttonLabel() | translate\"\n (click)=\"onButtonClick()\"\n >\n <si-icon class=\"text-accent\" [icon]=\"buttonIcon()\" />\n </button>\n </div>\n</div>\n\n<div class=\"disclaimer-wrapper text-center mt-4 px-3\">\n @if (disclaimer()) {\n <span class=\"si-body-sm text-secondary d-block\">{{ disclaimer() | translate }}</span>\n }\n <ng-content select=\"[siChatInputDisclaimer]\" />\n</div>\n", styles: [":host{max-inline-size:720px}.input-wrapper{border-color:var(--si-sys-color-border-4);background-color:var(--si-sys-color-background-1);padding-block:var(--si-sys-sizing-spacing-y-50) var(--si-sys-sizing-spacing-y-40);padding-inline:var(--si-sys-sizing-spacing-x-50);display:flex;flex-direction:column;gap:var(--si-sys-sizing-spacing-y-50) var(--si-sys-sizing-spacing-x-50)}.input-wrapper:hover,.input-wrapper:active,.input-wrapper:focus-within{background-color:var(--si-sys-color-background-4);border-color:var(--si-sys-color-border-1)}.input-wrapper.drag-over{border:1px solid var(--si-sys-color-effects-focus);box-shadow:0 0 0 1px var(--si-sys-color-effects-focus)}.chat-textarea{min-block-size:1lh;font-family:inherit;padding-block:0;display:block;outline:none;resize:none;background-color:transparent}.chat-textarea::placeholder{color:var(--si-sys-color-text-secondary)}.chat-textarea:disabled{background-color:transparent;color:var(--si-sys-color-text-disabled);cursor:not-allowed}.chat-textarea:disabled::placeholder{color:var(--si-sys-color-text-disabled)}.input-wrapper:has(.chat-textarea:focus-visible){outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}.disclaimer-wrapper:empty{display:none}\n"], dependencies: [{ kind: "directive", type: CdkMenuTrigger, selector: "[cdkMenuTriggerFor]", inputs: ["cdkMenuTriggerFor", "cdkMenuPosition", "cdkMenuTriggerData", "cdkMenuTriggerTransformOriginOn"], outputs: ["cdkMenuOpened", "cdkMenuClosed"], exportAs: ["cdkMenuTriggerFor"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiAttachmentListComponent, selector: "si-attachment-list", inputs: ["attachments", "alignment", "removable", "removeLabel"], outputs: ["remove"] }, { kind: "component", type: SiMenuFactoryComponent, selector: "si-menu-factory", inputs: ["items", "actionParam"] }, { kind: "directive", type: SiFileUploadDirective, selector: "input[type=\"file\"][siFileUpload]", inputs: ["errorTextFileType", "errorTextFileMaxSize", "accept", "maxFileSize", "multiple", "directoryUpload"], outputs: ["validFiles", "filesAdded", "fileError"] }, { kind: "directive", type: SiTooltipDirective, selector: "[siTooltip]", inputs: ["siTooltip", "placement", "isDisabled", "tooltipScrollStrategy", "tooltipContext"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
1111
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiChatInputComponent, isStandalone: true, selector: "si-chat-input", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, sending: { classPropertyName: "sending", publicName: "sending", isSignal: true, isRequired: false, transformFunction: null }, interruptible: { classPropertyName: "interruptible", publicName: "interruptible", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, disclaimer: { classPropertyName: "disclaimer", publicName: "disclaimer", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, secondaryActions: { classPropertyName: "secondaryActions", publicName: "secondaryActions", isSignal: true, isRequired: false, transformFunction: null }, allowAttachments: { classPropertyName: "allowAttachments", publicName: "allowAttachments", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, attachments: { classPropertyName: "attachments", publicName: "attachments", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, actionParam: { classPropertyName: "actionParam", publicName: "actionParam", isSignal: true, isRequired: false, transformFunction: null }, sendButtonLabel: { classPropertyName: "sendButtonLabel", publicName: "sendButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, sendButtonIcon: { classPropertyName: "sendButtonIcon", publicName: "sendButtonIcon", isSignal: true, isRequired: false, transformFunction: null }, interruptButtonLabel: { classPropertyName: "interruptButtonLabel", publicName: "interruptButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, attachFileLabel: { classPropertyName: "attachFileLabel", publicName: "attachFileLabel", isSignal: true, isRequired: false, transformFunction: null }, removeAttachmentLabel: { classPropertyName: "removeAttachmentLabel", publicName: "removeAttachmentLabel", isSignal: true, isRequired: false, transformFunction: null }, secondaryActionsLabel: { classPropertyName: "secondaryActionsLabel", publicName: "secondaryActionsLabel", isSignal: true, isRequired: false, transformFunction: null }, followUpPrompts: { classPropertyName: "followUpPrompts", publicName: "followUpPrompts", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", sending: "sendingChange", interruptible: "interruptibleChange", attachments: "attachmentsChange", followUpPromptSelected: "followUpPromptSelected", send: "send", interrupt: "interrupt", fileError: "fileError" }, viewQueries: [{ propertyName: "textInput", first: true, predicate: ["textInput"], descendants: true, isSignal: true }, { propertyName: "fileUploadDirective", first: true, predicate: SiFileUploadDirective, descendants: true, isSignal: true }, { propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (followUpPrompts().length) {\n <div class=\"follow-up-prompts d-flex flex-wrap gap-4 mb-4\">\n @for (prompt of followUpPrompts(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-secondary-ghost fw-normal\"\n [disabled]=\"disabled() || sending()\"\n (click)=\"selectFollowUpPrompt(prompt)\"\n >{{ prompt }}</button\n >\n }\n </div>\n}\n\n<div\n class=\"input-wrapper border rounded-3\"\n [class.drag-over]=\"dragOver()\"\n (click)=\"onContainerClick($event)\"\n (drop)=\"dropHandler($event)\"\n (dragover)=\"dragOverHandler($event)\"\n (dragleave)=\"dragOver.set(false)\"\n>\n @if (hasAttachments()) {\n <si-attachment-list\n [attachments]=\"attachments()\"\n [removeLabel]=\"removeAttachmentLabel()\"\n [removable]=\"true\"\n (remove)=\"removeAttachment($event)\"\n />\n }\n\n <div class=\"si-body-paragraph\">\n <label class=\"form-label d-none\" [for]=\"id\">{{ label() | translate }}</label>\n <textarea\n #textInput\n class=\"chat-textarea w-100 border-0\"\n rows=\"1\"\n [id]=\"id\"\n [placeholder]=\"placeholder() | translate\"\n [disabled]=\"disabled()\"\n [maxlength]=\"maxLength() || null\"\n [(ngModel)]=\"value\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeyDown($event)\"\n ></textarea>\n </div>\n\n <div class=\"d-flex align-items-center justify-content-between\">\n <div class=\"d-flex align-items-center gap-0\">\n <div class=\"btn-group\" role=\"group\">\n @if (allowAttachments()) {\n <input\n #fileInput\n type=\"file\"\n class=\"d-none\"\n siFileUpload\n [accept]=\"accept()\"\n [maxFileSize]=\"maxFileSize()\"\n [multiple]=\"true\"\n (validFiles)=\"onFilesAdded($event)\"\n (fileError)=\"onFileError($event)\"\n />\n }\n\n @if (allowAttachments() && !hasSecondaryActions()) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"disabled()\"\n [siTooltip]=\"attachFileLabel() | translate\"\n [attr.aria-label]=\"attachFileLabel() | translate\"\n (click)=\"triggerFileInput()\"\n >\n <si-icon [icon]=\"icons.elementAttachment\" />\n </button>\n }\n\n @if (hasMenuActions()) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"allActionsMenu\"\n [siTooltip]=\"secondaryActionsLabel() | translate\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon [icon]=\"icons.elementPlus\" />\n </button>\n\n <ng-template #allActionsMenu>\n <si-menu-factory [items]=\"combinedMenuActions()\" [actionParam]=\"actionParam()\" />\n </ng-template>\n }\n @if (hasActions()) {\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost\"\n [class.btn-icon]=\"!!action.icon\"\n [disabled]=\"action.disabled\"\n [siTooltip]=\"action.label | translate\"\n [attr.aria-label]=\"action.label | translate\"\n (click)=\"runAction(action)\"\n >\n @if (action.icon) {\n <si-icon [icon]=\"action.icon\" />\n } @else {\n {{ action.label | translate }}\n }\n </button>\n }\n }\n </div>\n <div class=\"d-flex align-items-center gap-0\">\n <ng-content />\n </div>\n </div>\n\n <button\n type=\"button\"\n class=\"btn btn-tertiary btn-icon\"\n [disabled]=\"buttonDisabled()\"\n [attr.aria-label]=\"buttonLabel() | translate\"\n (click)=\"onButtonClick()\"\n >\n <si-icon class=\"text-accent\" [icon]=\"buttonIcon()\" />\n </button>\n </div>\n</div>\n\n<div class=\"disclaimer-wrapper text-center mt-4 px-3\">\n @if (disclaimer()) {\n <span class=\"si-body-sm text-secondary d-block\">{{ disclaimer() | translate }}</span>\n }\n <ng-content select=\"[siChatInputDisclaimer]\" />\n</div>\n", styles: [":host{max-inline-size:720px}.input-wrapper{border-color:var(--si-sys-color-border-4);background-color:var(--si-sys-color-background-1);padding-block:var(--si-sys-sizing-spacing-y-50) var(--si-sys-sizing-spacing-y-40);padding-inline:var(--si-sys-sizing-spacing-x-50);display:flex;flex-direction:column;gap:var(--si-sys-sizing-spacing-y-50) var(--si-sys-sizing-spacing-x-50)}.input-wrapper:hover,.input-wrapper:active,.input-wrapper:focus-within{background-color:var(--si-sys-color-background-4);border-color:var(--si-sys-color-border-1)}.input-wrapper.drag-over{border:1px solid var(--si-sys-color-effects-focus);box-shadow:0 0 0 1px var(--si-sys-color-effects-focus)}.chat-textarea{min-block-size:1lh;font-family:inherit;padding-block:0;display:block;outline:none;resize:none;background-color:transparent}.chat-textarea::placeholder{color:var(--si-sys-color-text-secondary)}.chat-textarea:disabled{background-color:transparent;color:var(--si-sys-color-text-disabled);cursor:not-allowed}.chat-textarea:disabled::placeholder{color:var(--si-sys-color-text-disabled)}.input-wrapper:has(.chat-textarea:focus-visible){outline:var(--si-sys-sizing-focus-ring-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--si-sys-sizing-focus-ring-offset)}.disclaimer-wrapper:empty{display:none}\n"], dependencies: [{ kind: "directive", type: CdkMenuTrigger, selector: "[cdkMenuTriggerFor]", inputs: ["cdkMenuTriggerFor", "cdkMenuPosition", "cdkMenuTriggerData", "cdkMenuTriggerTransformOriginOn"], outputs: ["cdkMenuOpened", "cdkMenuClosed"], exportAs: ["cdkMenuTriggerFor"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiAttachmentListComponent, selector: "si-attachment-list", inputs: ["attachments", "alignment", "removable", "removeLabel"], outputs: ["remove"] }, { kind: "component", type: SiMenuFactoryComponent, selector: "si-menu-factory", inputs: ["items", "actionParam"] }, { kind: "directive", type: SiFileUploadDirective, selector: "input[type=\"file\"][siFileUpload]", inputs: ["errorTextFileType", "errorTextFileMaxSize", "accept", "maxFileSize", "multiple", "directoryUpload"], outputs: ["validFiles", "filesAdded", "fileError"] }, { kind: "directive", type: SiTooltipDirective, selector: "[siTooltip]", inputs: ["siTooltip", "placement", "isDisabled", "tooltipScrollStrategy", "tooltipContext"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
1021
1112
  }
1022
1113
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiChatInputComponent, decorators: [{
1023
1114
  type: Component,
@@ -1030,8 +1121,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
1030
1121
  SiMenuFactoryComponent,
1031
1122
  SiFileUploadDirective,
1032
1123
  SiTooltipDirective
1033
- ], template: "@if (followUpPrompts().length) {\n <div class=\"follow-up-prompts d-flex flex-wrap gap-4 mb-4\">\n @for (prompt of followUpPrompts(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-secondary-ghost fw-normal\"\n [disabled]=\"disabled() || sending()\"\n (click)=\"selectFollowUpPrompt(prompt)\"\n >{{ prompt }}</button\n >\n }\n </div>\n}\n\n<div\n class=\"input-wrapper border rounded-3\"\n [class.drag-over]=\"dragOver()\"\n (click)=\"onContainerClick($event)\"\n (drop)=\"dropHandler($event)\"\n (dragover)=\"dragOverHandler($event)\"\n (dragleave)=\"dragOver.set(false)\"\n>\n @if (hasAttachments()) {\n <si-attachment-list\n [attachments]=\"attachments()\"\n [removeLabel]=\"removeAttachmentLabel()\"\n [removable]=\"true\"\n (remove)=\"removeAttachment($event)\"\n />\n }\n\n <div class=\"si-body-paragraph\">\n <label class=\"form-label d-none\" [for]=\"id\">{{ label() | translate }}</label>\n <textarea\n #textInput\n class=\"chat-textarea w-100 border-0\"\n rows=\"1\"\n [id]=\"id\"\n [placeholder]=\"placeholder() | translate\"\n [disabled]=\"disabled()\"\n [maxlength]=\"maxLength() || null\"\n [(ngModel)]=\"value\"\n (keydown)=\"onKeyDown($event)\"\n (input)=\"adjustTextareaHeight($event)\"\n ></textarea>\n </div>\n\n <div class=\"d-flex align-items-center justify-content-between\">\n <div class=\"d-flex align-items-center gap-0\">\n <div class=\"btn-group\" role=\"group\">\n @if (allowAttachments()) {\n <input\n #fileInput\n type=\"file\"\n class=\"d-none\"\n siFileUpload\n [accept]=\"accept()\"\n [maxFileSize]=\"maxFileSize()\"\n [multiple]=\"true\"\n (validFiles)=\"onFilesAdded($event)\"\n (fileError)=\"onFileError($event)\"\n />\n }\n\n @if (allowAttachments() && !hasSecondaryActions()) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"disabled()\"\n [siTooltip]=\"attachFileLabel() | translate\"\n [attr.aria-label]=\"attachFileLabel() | translate\"\n (click)=\"triggerFileInput()\"\n >\n <si-icon [icon]=\"icons.elementAttachment\" />\n </button>\n }\n\n @if (hasMenuActions()) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"allActionsMenu\"\n [siTooltip]=\"secondaryActionsLabel() | translate\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon [icon]=\"icons.elementPlus\" />\n </button>\n\n <ng-template #allActionsMenu>\n <si-menu-factory [items]=\"combinedMenuActions()\" [actionParam]=\"actionParam()\" />\n </ng-template>\n }\n @if (hasActions()) {\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"action.disabled\"\n [siTooltip]=\"action.label | translate\"\n [attr.aria-label]=\"action.label | translate\"\n (click)=\"action.action(actionParam(), action)\"\n >\n <si-icon [icon]=\"action.icon\" />\n </button>\n }\n }\n </div>\n <div class=\"d-flex align-items-center gap-0\">\n <ng-content />\n </div>\n </div>\n\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"buttonDisabled()\"\n [attr.aria-label]=\"buttonLabel() | translate\"\n (click)=\"onButtonClick()\"\n >\n <si-icon class=\"text-accent\" [icon]=\"buttonIcon()\" />\n </button>\n </div>\n</div>\n\n<div class=\"disclaimer-wrapper text-center mt-4 px-3\">\n @if (disclaimer()) {\n <span class=\"si-body-sm text-secondary d-block\">{{ disclaimer() | translate }}</span>\n }\n <ng-content select=\"[siChatInputDisclaimer]\" />\n</div>\n", styles: [":host{max-inline-size:720px}.input-wrapper{border-color:var(--si-sys-color-border-4);background-color:var(--si-sys-color-background-1);padding-block:var(--si-sys-sizing-spacing-y-50) var(--si-sys-sizing-spacing-y-40);padding-inline:var(--si-sys-sizing-spacing-x-50);display:flex;flex-direction:column;gap:var(--si-sys-sizing-spacing-y-50) var(--si-sys-sizing-spacing-x-50)}.input-wrapper:hover,.input-wrapper:active,.input-wrapper:focus-within{background-color:var(--si-sys-color-background-4);border-color:var(--si-sys-color-border-1)}.input-wrapper.drag-over{border:1px solid var(--si-sys-color-effects-focus);box-shadow:0 0 0 1px var(--si-sys-color-effects-focus)}.chat-textarea{min-block-size:1lh;font-family:inherit;padding-block:0;display:block;outline:none;resize:none;background-color:transparent}.chat-textarea::placeholder{color:var(--si-sys-color-text-secondary)}.chat-textarea:disabled{background-color:transparent;color:var(--si-sys-color-text-disabled);cursor:not-allowed}.chat-textarea:disabled::placeholder{color:var(--si-sys-color-text-disabled)}.input-wrapper:has(.chat-textarea:focus-visible){outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}.disclaimer-wrapper:empty{display:none}\n"] }]
1034
- }], propDecorators: { textInput: [{ type: i0.ViewChild, args: ['textInput', { isSignal: true }] }], fileUploadDirective: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SiFileUploadDirective), { isSignal: true }] }], fileInput: [{ type: i0.ViewChild, args: ['fileInput', { isSignal: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], sending: [{ type: i0.Input, args: [{ isSignal: true, alias: "sending", required: false }] }], interruptible: [{ type: i0.Input, args: [{ isSignal: true, alias: "interruptible", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], disclaimer: [{ type: i0.Input, args: [{ isSignal: true, alias: "disclaimer", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], secondaryActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryActions", required: false }] }], allowAttachments: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowAttachments", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], maxFileSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFileSize", required: false }] }], attachments: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachments", required: false }] }, { type: i0.Output, args: ["attachmentsChange"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], actionParam: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionParam", required: false }] }], sendButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "sendButtonLabel", required: false }] }], sendButtonIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "sendButtonIcon", required: false }] }], interruptButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "interruptButtonLabel", required: false }] }], autoFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFocus", required: false }] }], attachFileLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachFileLabel", required: false }] }], removeAttachmentLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeAttachmentLabel", required: false }] }], secondaryActionsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryActionsLabel", required: false }] }], followUpPrompts: [{ type: i0.Input, args: [{ isSignal: true, alias: "followUpPrompts", required: false }] }], followUpPromptSelected: [{ type: i0.Output, args: ["followUpPromptSelected"] }], send: [{ type: i0.Output, args: ["send"] }], interrupt: [{ type: i0.Output, args: ["interrupt"] }], fileError: [{ type: i0.Output, args: ["fileError"] }] } });
1124
+ ], template: "@if (followUpPrompts().length) {\n <div class=\"follow-up-prompts d-flex flex-wrap gap-4 mb-4\">\n @for (prompt of followUpPrompts(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-secondary-ghost fw-normal\"\n [disabled]=\"disabled() || sending()\"\n (click)=\"selectFollowUpPrompt(prompt)\"\n >{{ prompt }}</button\n >\n }\n </div>\n}\n\n<div\n class=\"input-wrapper border rounded-3\"\n [class.drag-over]=\"dragOver()\"\n (click)=\"onContainerClick($event)\"\n (drop)=\"dropHandler($event)\"\n (dragover)=\"dragOverHandler($event)\"\n (dragleave)=\"dragOver.set(false)\"\n>\n @if (hasAttachments()) {\n <si-attachment-list\n [attachments]=\"attachments()\"\n [removeLabel]=\"removeAttachmentLabel()\"\n [removable]=\"true\"\n (remove)=\"removeAttachment($event)\"\n />\n }\n\n <div class=\"si-body-paragraph\">\n <label class=\"form-label d-none\" [for]=\"id\">{{ label() | translate }}</label>\n <textarea\n #textInput\n class=\"chat-textarea w-100 border-0\"\n rows=\"1\"\n [id]=\"id\"\n [placeholder]=\"placeholder() | translate\"\n [disabled]=\"disabled()\"\n [maxlength]=\"maxLength() || null\"\n [(ngModel)]=\"value\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeyDown($event)\"\n ></textarea>\n </div>\n\n <div class=\"d-flex align-items-center justify-content-between\">\n <div class=\"d-flex align-items-center gap-0\">\n <div class=\"btn-group\" role=\"group\">\n @if (allowAttachments()) {\n <input\n #fileInput\n type=\"file\"\n class=\"d-none\"\n siFileUpload\n [accept]=\"accept()\"\n [maxFileSize]=\"maxFileSize()\"\n [multiple]=\"true\"\n (validFiles)=\"onFilesAdded($event)\"\n (fileError)=\"onFileError($event)\"\n />\n }\n\n @if (allowAttachments() && !hasSecondaryActions()) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"disabled()\"\n [siTooltip]=\"attachFileLabel() | translate\"\n [attr.aria-label]=\"attachFileLabel() | translate\"\n (click)=\"triggerFileInput()\"\n >\n <si-icon [icon]=\"icons.elementAttachment\" />\n </button>\n }\n\n @if (hasMenuActions()) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"allActionsMenu\"\n [siTooltip]=\"secondaryActionsLabel() | translate\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon [icon]=\"icons.elementPlus\" />\n </button>\n\n <ng-template #allActionsMenu>\n <si-menu-factory [items]=\"combinedMenuActions()\" [actionParam]=\"actionParam()\" />\n </ng-template>\n }\n @if (hasActions()) {\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost\"\n [class.btn-icon]=\"!!action.icon\"\n [disabled]=\"action.disabled\"\n [siTooltip]=\"action.label | translate\"\n [attr.aria-label]=\"action.label | translate\"\n (click)=\"runAction(action)\"\n >\n @if (action.icon) {\n <si-icon [icon]=\"action.icon\" />\n } @else {\n {{ action.label | translate }}\n }\n </button>\n }\n }\n </div>\n <div class=\"d-flex align-items-center gap-0\">\n <ng-content />\n </div>\n </div>\n\n <button\n type=\"button\"\n class=\"btn btn-tertiary btn-icon\"\n [disabled]=\"buttonDisabled()\"\n [attr.aria-label]=\"buttonLabel() | translate\"\n (click)=\"onButtonClick()\"\n >\n <si-icon class=\"text-accent\" [icon]=\"buttonIcon()\" />\n </button>\n </div>\n</div>\n\n<div class=\"disclaimer-wrapper text-center mt-4 px-3\">\n @if (disclaimer()) {\n <span class=\"si-body-sm text-secondary d-block\">{{ disclaimer() | translate }}</span>\n }\n <ng-content select=\"[siChatInputDisclaimer]\" />\n</div>\n", styles: [":host{max-inline-size:720px}.input-wrapper{border-color:var(--si-sys-color-border-4);background-color:var(--si-sys-color-background-1);padding-block:var(--si-sys-sizing-spacing-y-50) var(--si-sys-sizing-spacing-y-40);padding-inline:var(--si-sys-sizing-spacing-x-50);display:flex;flex-direction:column;gap:var(--si-sys-sizing-spacing-y-50) var(--si-sys-sizing-spacing-x-50)}.input-wrapper:hover,.input-wrapper:active,.input-wrapper:focus-within{background-color:var(--si-sys-color-background-4);border-color:var(--si-sys-color-border-1)}.input-wrapper.drag-over{border:1px solid var(--si-sys-color-effects-focus);box-shadow:0 0 0 1px var(--si-sys-color-effects-focus)}.chat-textarea{min-block-size:1lh;font-family:inherit;padding-block:0;display:block;outline:none;resize:none;background-color:transparent}.chat-textarea::placeholder{color:var(--si-sys-color-text-secondary)}.chat-textarea:disabled{background-color:transparent;color:var(--si-sys-color-text-disabled);cursor:not-allowed}.chat-textarea:disabled::placeholder{color:var(--si-sys-color-text-disabled)}.input-wrapper:has(.chat-textarea:focus-visible){outline:var(--si-sys-sizing-focus-ring-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--si-sys-sizing-focus-ring-offset)}.disclaimer-wrapper:empty{display:none}\n"] }]
1125
+ }], ctorParameters: () => [], propDecorators: { textInput: [{ type: i0.ViewChild, args: ['textInput', { isSignal: true }] }], fileUploadDirective: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SiFileUploadDirective), { isSignal: true }] }], fileInput: [{ type: i0.ViewChild, args: ['fileInput', { isSignal: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], sending: [{ type: i0.Input, args: [{ isSignal: true, alias: "sending", required: false }] }, { type: i0.Output, args: ["sendingChange"] }], interruptible: [{ type: i0.Input, args: [{ isSignal: true, alias: "interruptible", required: false }] }, { type: i0.Output, args: ["interruptibleChange"] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], disclaimer: [{ type: i0.Input, args: [{ isSignal: true, alias: "disclaimer", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], secondaryActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryActions", required: false }] }], allowAttachments: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowAttachments", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], maxFileSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFileSize", required: false }] }], attachments: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachments", required: false }] }, { type: i0.Output, args: ["attachmentsChange"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], actionParam: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionParam", required: false }] }], sendButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "sendButtonLabel", required: false }] }], sendButtonIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "sendButtonIcon", required: false }] }], interruptButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "interruptButtonLabel", required: false }] }], autoFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFocus", required: false }] }], attachFileLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachFileLabel", required: false }] }], removeAttachmentLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeAttachmentLabel", required: false }] }], secondaryActionsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryActionsLabel", required: false }] }], followUpPrompts: [{ type: i0.Input, args: [{ isSignal: true, alias: "followUpPrompts", required: false }] }], followUpPromptSelected: [{ type: i0.Output, args: ["followUpPromptSelected"] }], send: [{ type: i0.Output, args: ["send"] }], interrupt: [{ type: i0.Output, args: ["interrupt"] }], fileError: [{ type: i0.Output, args: ["fileError"] }] } });
1035
1126
 
1036
1127
  /**
1037
1128
  * Copyright (c) Siemens 2016 - 2026
@@ -1090,7 +1181,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
1090
1181
  * @experimental
1091
1182
  */
1092
1183
  class SiUserMessageComponent {
1093
- icons = addIcons({ elementOptionsVertical });
1094
1184
  /**
1095
1185
  * The user message content
1096
1186
  * @defaultValue ''
@@ -1132,19 +1222,16 @@ class SiUserMessageComponent {
1132
1222
  hasAttachments = computed(() => this.attachments()?.length > 0, /* @ts-ignore */
1133
1223
  ...(ngDevMode ? [{ debugName: "hasAttachments" }] : /* istanbul ignore next */ []));
1134
1224
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiUserMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1135
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiUserMessageComponent, isStandalone: true, selector: "si-user-message", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, secondaryActions: { classPropertyName: "secondaryActions", publicName: "secondaryActions", isSignal: true, isRequired: false, transformFunction: null }, attachments: { classPropertyName: "attachments", publicName: "attachments", isSignal: true, isRequired: false, transformFunction: null }, actionParam: { classPropertyName: "actionParam", publicName: "actionParam", isSignal: true, isRequired: false, transformFunction: null }, secondaryActionsLabel: { classPropertyName: "secondaryActionsLabel", publicName: "secondaryActionsLabel", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<si-chat-message alignment=\"end\" actionsPosition=\"bottom\" [loading]=\"false\">\n @if (hasAttachments()) {\n <si-attachment-list alignment=\"end\" [attachments]=\"attachments()\" [removable]=\"false\" />\n }\n\n @if (content()) {\n <span class=\"text-pre-wrap\">{{ content() }}</span>\n } @else {\n <ng-content />\n }\n @if (actions().length > 0 || secondaryActions().length > 0) {\n <div class=\"btn-group user-message-actions\" role=\"group\" siChatMessageAction>\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"action.disabled\"\n [attr.aria-label]=\"action.label | translate\"\n (click)=\"action.action(actionParam(), action)\"\n >\n <si-icon [icon]=\"action.icon\" />\n </button>\n }\n\n @if (secondaryActions().length > 0) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"secondaryActionsMenu\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n [attr.title]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon [icon]=\"icons.elementOptionsVertical\" />\n </button>\n\n <ng-template #secondaryActionsMenu>\n <si-menu-factory [items]=\"secondaryActions()\" [actionParam]=\"actionParam()\" />\n </ng-template>\n }\n </div>\n }\n</si-chat-message>\n", styles: [":host{display:block}:host:not(:has([siChatMessageAction])) si-chat-message{padding-block-end:calc(32px + var(--si-sys-sizing-spacing-y-20))!important}.user-message-actions{opacity:0;transition:opacity .2s ease}si-chat-message{--chat-message-bubble-bg: var(--si-sys-color-background-2);max-inline-size:600px;margin-inline-start:auto}:host:hover .user-message-actions,.user-message-actions:hover,.user-message-actions:has(::ng-deep [aria-expanded=true]),:host-context(.si-container-xs,.si-container-sm) .user-message-actions:active{opacity:1}\n"], dependencies: [{ kind: "directive", type: CdkMenuTrigger, selector: "[cdkMenuTriggerFor]", inputs: ["cdkMenuTriggerFor", "cdkMenuPosition", "cdkMenuTriggerData", "cdkMenuTriggerTransformOriginOn"], outputs: ["cdkMenuOpened", "cdkMenuClosed"], exportAs: ["cdkMenuTriggerFor"] }, { kind: "component", type: SiAttachmentListComponent, selector: "si-attachment-list", inputs: ["attachments", "alignment", "removable", "removeLabel"], outputs: ["remove"] }, { kind: "component", type: SiChatMessageComponent, selector: "si-chat-message", inputs: ["loading", "alignment", "actionsPosition"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiMenuFactoryComponent, selector: "si-menu-factory", inputs: ["items", "actionParam"] }, { kind: "directive", type: SiChatMessageActionDirective, selector: "[siChatMessageAction]" }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
1225
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiUserMessageComponent, isStandalone: true, selector: "si-user-message", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, secondaryActions: { classPropertyName: "secondaryActions", publicName: "secondaryActions", isSignal: true, isRequired: false, transformFunction: null }, attachments: { classPropertyName: "attachments", publicName: "attachments", isSignal: true, isRequired: false, transformFunction: null }, actionParam: { classPropertyName: "actionParam", publicName: "actionParam", isSignal: true, isRequired: false, transformFunction: null }, secondaryActionsLabel: { classPropertyName: "secondaryActionsLabel", publicName: "secondaryActionsLabel", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<si-chat-message alignment=\"end\" actionsPosition=\"bottom\" [loading]=\"false\">\n @if (hasAttachments()) {\n <si-attachment-list alignment=\"end\" [attachments]=\"attachments()\" [removable]=\"false\" />\n }\n\n @if (content()) {\n <span class=\"text-pre-wrap\">{{ content() }}</span>\n } @else {\n <ng-content />\n }\n @if (actions().length > 0 || secondaryActions().length > 0) {\n <si-chat-message-actions\n class=\"user-message-actions\"\n siChatMessageAction\n [actions]=\"actions()\"\n [secondaryActions]=\"secondaryActions()\"\n [actionParam]=\"actionParam()\"\n [secondaryActionsLabel]=\"secondaryActionsLabel()\"\n />\n }\n</si-chat-message>\n", styles: [":host{display:block}:host:not(:has([siChatMessageAction])) si-chat-message{padding-block-end:calc(32px + var(--si-sys-sizing-spacing-y-20))!important}.user-message-actions{opacity:0;transition:opacity .2s ease}si-chat-message{--chat-message-bubble-bg: var(--si-sys-color-background-2);max-inline-size:600px;margin-inline-start:auto}:host:hover .user-message-actions,.user-message-actions:hover,.user-message-actions:has(::ng-deep [aria-expanded=true]),:host-context(.si-container-xs,.si-container-sm) .user-message-actions:active{opacity:1}\n"], dependencies: [{ kind: "component", type: SiAttachmentListComponent, selector: "si-attachment-list", inputs: ["attachments", "alignment", "removable", "removeLabel"], outputs: ["remove"] }, { kind: "component", type: SiChatMessageComponent, selector: "si-chat-message", inputs: ["loading", "alignment", "actionsPosition"] }, { kind: "directive", type: SiChatMessageActionDirective, selector: "[siChatMessageAction]" }, { kind: "component", type: SiChatMessageActionsComponent, selector: "si-chat-message-actions", inputs: ["actions", "secondaryActions", "actionParam", "secondaryActionsLabel"] }] });
1136
1226
  }
1137
1227
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiUserMessageComponent, decorators: [{
1138
1228
  type: Component,
1139
1229
  args: [{ selector: 'si-user-message', imports: [
1140
- CdkMenuTrigger,
1141
1230
  SiAttachmentListComponent,
1142
1231
  SiChatMessageComponent,
1143
- SiIconComponent,
1144
- SiMenuFactoryComponent,
1145
1232
  SiChatMessageActionDirective,
1146
- SiTranslatePipe
1147
- ], template: "<si-chat-message alignment=\"end\" actionsPosition=\"bottom\" [loading]=\"false\">\n @if (hasAttachments()) {\n <si-attachment-list alignment=\"end\" [attachments]=\"attachments()\" [removable]=\"false\" />\n }\n\n @if (content()) {\n <span class=\"text-pre-wrap\">{{ content() }}</span>\n } @else {\n <ng-content />\n }\n @if (actions().length > 0 || secondaryActions().length > 0) {\n <div class=\"btn-group user-message-actions\" role=\"group\" siChatMessageAction>\n @for (action of actions(); track $index) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [disabled]=\"action.disabled\"\n [attr.aria-label]=\"action.label | translate\"\n (click)=\"action.action(actionParam(), action)\"\n >\n <si-icon [icon]=\"action.icon\" />\n </button>\n }\n\n @if (secondaryActions().length > 0) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"secondaryActionsMenu\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n [attr.title]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon [icon]=\"icons.elementOptionsVertical\" />\n </button>\n\n <ng-template #secondaryActionsMenu>\n <si-menu-factory [items]=\"secondaryActions()\" [actionParam]=\"actionParam()\" />\n </ng-template>\n }\n </div>\n }\n</si-chat-message>\n", styles: [":host{display:block}:host:not(:has([siChatMessageAction])) si-chat-message{padding-block-end:calc(32px + var(--si-sys-sizing-spacing-y-20))!important}.user-message-actions{opacity:0;transition:opacity .2s ease}si-chat-message{--chat-message-bubble-bg: var(--si-sys-color-background-2);max-inline-size:600px;margin-inline-start:auto}:host:hover .user-message-actions,.user-message-actions:hover,.user-message-actions:has(::ng-deep [aria-expanded=true]),:host-context(.si-container-xs,.si-container-sm) .user-message-actions:active{opacity:1}\n"] }]
1233
+ SiChatMessageActionsComponent
1234
+ ], template: "<si-chat-message alignment=\"end\" actionsPosition=\"bottom\" [loading]=\"false\">\n @if (hasAttachments()) {\n <si-attachment-list alignment=\"end\" [attachments]=\"attachments()\" [removable]=\"false\" />\n }\n\n @if (content()) {\n <span class=\"text-pre-wrap\">{{ content() }}</span>\n } @else {\n <ng-content />\n }\n @if (actions().length > 0 || secondaryActions().length > 0) {\n <si-chat-message-actions\n class=\"user-message-actions\"\n siChatMessageAction\n [actions]=\"actions()\"\n [secondaryActions]=\"secondaryActions()\"\n [actionParam]=\"actionParam()\"\n [secondaryActionsLabel]=\"secondaryActionsLabel()\"\n />\n }\n</si-chat-message>\n", styles: [":host{display:block}:host:not(:has([siChatMessageAction])) si-chat-message{padding-block-end:calc(32px + var(--si-sys-sizing-spacing-y-20))!important}.user-message-actions{opacity:0;transition:opacity .2s ease}si-chat-message{--chat-message-bubble-bg: var(--si-sys-color-background-2);max-inline-size:600px;margin-inline-start:auto}:host:hover .user-message-actions,.user-message-actions:hover,.user-message-actions:has(::ng-deep [aria-expanded=true]),:host-context(.si-container-xs,.si-container-sm) .user-message-actions:active{opacity:1}\n"] }]
1148
1235
  }], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], secondaryActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryActions", required: false }] }], attachments: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachments", required: false }] }], actionParam: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionParam", required: false }] }], secondaryActionsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryActionsLabel", required: false }] }] } });
1149
1236
 
1150
1237
  /**
@@ -1164,6 +1251,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
1164
1251
  * - Clickable prompt suggestion cards
1165
1252
  * - Optional refresh button to regenerate suggestions
1166
1253
  *
1254
+ * @see {@link SiAiChatComponent} for the AI chat container which uses this component
1167
1255
  * @see {@link SiChatContainerComponent} for the base chat container
1168
1256
  *
1169
1257
  * @experimental
@@ -1198,15 +1286,502 @@ class SiAiWelcomeScreenComponent {
1198
1286
  this.promptSelected.emit(suggestion);
1199
1287
  }
1200
1288
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiAiWelcomeScreenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1201
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiAiWelcomeScreenComponent, isStandalone: true, selector: "si-ai-welcome-screen", inputs: { categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: false, transformFunction: null }, selectedCategory: { classPropertyName: "selectedCategory", publicName: "selectedCategory", isSignal: true, isRequired: false, transformFunction: null }, promptSuggestions: { classPropertyName: "promptSuggestions", publicName: "promptSuggestions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedCategory: "selectedCategoryChange", promptSelected: "promptSelected" }, host: { classAttribute: "d-block" }, ngImport: i0, template: "<div class=\"d-flex flex-column gap-13 align-items-center w-100\">\n <!-- Welcome Header -->\n <div class=\"welcome-header d-flex flex-column gap-4 w-100 pt-13 pb-8\">\n <ng-content />\n </div>\n\n <!-- Prompt Categories and Suggestions -->\n <div class=\"prompt-suggestions d-flex flex-column gap-6 align-items-center w-100\">\n @if (categories().length > 0) {\n <div class=\"d-flex gap-4 align-items-center w-100\">\n @for (category of categories(); track $index) {\n <si-summary-chip\n class=\"user-select-none\"\n [label]=\"category.label\"\n [selected]=\"selectedCategory() === category.label\"\n (selectedChange)=\"onCategoryClick(category.label)\"\n />\n }\n </div>\n }\n\n @if (promptSuggestions().length > 0) {\n <div class=\"d-flex flex-column gap-4 w-100\">\n @for (suggestion of promptSuggestions(); track $index) {\n <button si-action-card type=\"button\" class=\"w-100\" (click)=\"onPromptClick(suggestion)\">\n <div body class=\"card-body card-text\">\n {{ suggestion.text }}\n </div>\n </button>\n }\n </div>\n }\n </div>\n</div>\n", styles: [".welcome-header{max-inline-size:720px;overflow-x:visible;position:relative}.welcome-header:before{position:absolute;content:\"\";inset-inline-start:-104px;inset-block-start:50%;transform:translateY(-50%);inline-size:168px;block-size:168px;background-image:var(--element-brand-ai-key-visual);background-size:contain;background-repeat:no-repeat;background-position:center}:host{container-type:inline-size}@container (max-width: 767.98px){:host .welcome-header:before{display:none}}.prompt-suggestions{max-inline-size:720px}.prompt-suggestions>div:first-child{flex-wrap:wrap}:host{inline-size:100%}::ng-deep button[si-action-card]{background-color:transparent;border-radius:var(--element-radius-2);border:1px solid var(--si-sys-color-border-4)}\n"], dependencies: [{ kind: "component", type: SiActionCardComponent, selector: "button[si-action-card]", inputs: ["selectable", "selected"], outputs: ["selectedChange"] }, { kind: "component", type: SiSummaryChipComponent, selector: "si-summary-chip", inputs: ["status", "icon", "color", "stackedIcon", "stackedColor", "label", "value", "selected", "disabled", "hideLabel"], outputs: ["selectedChange"] }] });
1289
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiAiWelcomeScreenComponent, isStandalone: true, selector: "si-ai-welcome-screen", inputs: { categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: false, transformFunction: null }, selectedCategory: { classPropertyName: "selectedCategory", publicName: "selectedCategory", isSignal: true, isRequired: false, transformFunction: null }, promptSuggestions: { classPropertyName: "promptSuggestions", publicName: "promptSuggestions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedCategory: "selectedCategoryChange", promptSelected: "promptSelected" }, host: { classAttribute: "d-block" }, ngImport: i0, template: "<div class=\"d-flex flex-column gap-13 align-items-center w-100\">\n <!-- Welcome Header -->\n <div class=\"welcome-header d-flex flex-column gap-4 w-100 pt-13 pb-8\">\n <ng-content />\n </div>\n\n <!-- Prompt Categories and Suggestions -->\n <div class=\"prompt-suggestions d-flex flex-column gap-6 align-items-center w-100\">\n @if (categories().length > 0) {\n <div class=\"d-flex gap-4 align-items-center w-100\">\n @for (category of categories(); track $index) {\n <si-summary-chip\n class=\"user-select-none\"\n [label]=\"category.label\"\n [selected]=\"selectedCategory() === category.label\"\n (selectedChange)=\"onCategoryClick(category.label)\"\n />\n }\n </div>\n }\n\n @if (promptSuggestions().length > 0) {\n <div class=\"d-flex flex-column gap-4 w-100\">\n @for (suggestion of promptSuggestions(); track $index) {\n <button si-action-card type=\"button\" class=\"w-100\" (click)=\"onPromptClick(suggestion)\">\n <div body class=\"card-body card-text\">\n {{ suggestion.text }}\n </div>\n </button>\n }\n </div>\n }\n </div>\n</div>\n", styles: [".welcome-header{max-inline-size:720px;overflow-x:visible;position:relative}.welcome-header:before{position:absolute;content:\"\";inset-inline-start:-104px;inset-block-start:50%;transform:translateY(-50%);inline-size:168px;block-size:168px;background-image:var(--element-brand-ai-key-visual);background-size:contain;background-repeat:no-repeat;background-position:center}:host{container-type:inline-size}@container (max-width: 767.98px){:host .welcome-header:before{display:none}}.prompt-suggestions{max-inline-size:720px}.prompt-suggestions>div:first-child{flex-wrap:wrap}:host{inline-size:100%}::ng-deep button[si-action-card]{background-color:transparent;border-radius:var(--si-sys-sizing-border-radius-sm);border:1px solid var(--si-sys-color-border-4)}\n"], dependencies: [{ kind: "component", type: SiActionCardComponent, selector: "button[si-action-card], a[si-action-card]", inputs: ["selectable", "selected"], outputs: ["selectedChange"] }, { kind: "component", type: SiSummaryChipComponent, selector: "si-summary-chip", inputs: ["status", "icon", "color", "stackedIcon", "stackedColor", "label", "value", "selected", "disabled", "hideLabel"], outputs: ["selectedChange"] }] });
1202
1290
  }
1203
1291
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiAiWelcomeScreenComponent, decorators: [{
1204
1292
  type: Component,
1205
1293
  args: [{ selector: 'si-ai-welcome-screen', imports: [SiActionCardComponent, SiSummaryChipComponent], host: {
1206
1294
  class: 'd-block'
1207
- }, template: "<div class=\"d-flex flex-column gap-13 align-items-center w-100\">\n <!-- Welcome Header -->\n <div class=\"welcome-header d-flex flex-column gap-4 w-100 pt-13 pb-8\">\n <ng-content />\n </div>\n\n <!-- Prompt Categories and Suggestions -->\n <div class=\"prompt-suggestions d-flex flex-column gap-6 align-items-center w-100\">\n @if (categories().length > 0) {\n <div class=\"d-flex gap-4 align-items-center w-100\">\n @for (category of categories(); track $index) {\n <si-summary-chip\n class=\"user-select-none\"\n [label]=\"category.label\"\n [selected]=\"selectedCategory() === category.label\"\n (selectedChange)=\"onCategoryClick(category.label)\"\n />\n }\n </div>\n }\n\n @if (promptSuggestions().length > 0) {\n <div class=\"d-flex flex-column gap-4 w-100\">\n @for (suggestion of promptSuggestions(); track $index) {\n <button si-action-card type=\"button\" class=\"w-100\" (click)=\"onPromptClick(suggestion)\">\n <div body class=\"card-body card-text\">\n {{ suggestion.text }}\n </div>\n </button>\n }\n </div>\n }\n </div>\n</div>\n", styles: [".welcome-header{max-inline-size:720px;overflow-x:visible;position:relative}.welcome-header:before{position:absolute;content:\"\";inset-inline-start:-104px;inset-block-start:50%;transform:translateY(-50%);inline-size:168px;block-size:168px;background-image:var(--element-brand-ai-key-visual);background-size:contain;background-repeat:no-repeat;background-position:center}:host{container-type:inline-size}@container (max-width: 767.98px){:host .welcome-header:before{display:none}}.prompt-suggestions{max-inline-size:720px}.prompt-suggestions>div:first-child{flex-wrap:wrap}:host{inline-size:100%}::ng-deep button[si-action-card]{background-color:transparent;border-radius:var(--element-radius-2);border:1px solid var(--si-sys-color-border-4)}\n"] }]
1295
+ }, template: "<div class=\"d-flex flex-column gap-13 align-items-center w-100\">\n <!-- Welcome Header -->\n <div class=\"welcome-header d-flex flex-column gap-4 w-100 pt-13 pb-8\">\n <ng-content />\n </div>\n\n <!-- Prompt Categories and Suggestions -->\n <div class=\"prompt-suggestions d-flex flex-column gap-6 align-items-center w-100\">\n @if (categories().length > 0) {\n <div class=\"d-flex gap-4 align-items-center w-100\">\n @for (category of categories(); track $index) {\n <si-summary-chip\n class=\"user-select-none\"\n [label]=\"category.label\"\n [selected]=\"selectedCategory() === category.label\"\n (selectedChange)=\"onCategoryClick(category.label)\"\n />\n }\n </div>\n }\n\n @if (promptSuggestions().length > 0) {\n <div class=\"d-flex flex-column gap-4 w-100\">\n @for (suggestion of promptSuggestions(); track $index) {\n <button si-action-card type=\"button\" class=\"w-100\" (click)=\"onPromptClick(suggestion)\">\n <div body class=\"card-body card-text\">\n {{ suggestion.text }}\n </div>\n </button>\n }\n </div>\n }\n </div>\n</div>\n", styles: [".welcome-header{max-inline-size:720px;overflow-x:visible;position:relative}.welcome-header:before{position:absolute;content:\"\";inset-inline-start:-104px;inset-block-start:50%;transform:translateY(-50%);inline-size:168px;block-size:168px;background-image:var(--element-brand-ai-key-visual);background-size:contain;background-repeat:no-repeat;background-position:center}:host{container-type:inline-size}@container (max-width: 767.98px){:host .welcome-header:before{display:none}}.prompt-suggestions{max-inline-size:720px}.prompt-suggestions>div:first-child{flex-wrap:wrap}:host{inline-size:100%}::ng-deep button[si-action-card]{background-color:transparent;border-radius:var(--si-sys-sizing-border-radius-sm);border:1px solid var(--si-sys-color-border-4)}\n"] }]
1208
1296
  }], propDecorators: { categories: [{ type: i0.Input, args: [{ isSignal: true, alias: "categories", required: false }] }], selectedCategory: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedCategory", required: false }] }, { type: i0.Output, args: ["selectedCategoryChange"] }], promptSuggestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "promptSuggestions", required: false }] }], promptSelected: [{ type: i0.Output, args: ["promptSelected"] }] } });
1209
1297
 
1298
+ /**
1299
+ * Copyright (c) Siemens 2016 - 2026
1300
+ * SPDX-License-Identifier: MIT
1301
+ */
1302
+ /**
1303
+ * A model-driven chat container component for displaying an AI chat interface with automatic scroll-to-bottom behavior.
1304
+ *
1305
+ * This component provides an AI chat interface, managing scrolling behavior
1306
+ * to keep the newest messages visible while respecting user scrolling actions. It automatically
1307
+ * scrolls to the bottom when new content is added, unless the user has scrolled up to view older messages.
1308
+ *
1309
+ * Required content projection:
1310
+ * - `si-chat-input`: Input controls for composing messages
1311
+ *
1312
+ * @see {@link ChatMessage} for the chat message model
1313
+ * @see {@link AiChatMessage} for the AI chat message model
1314
+ * @see {@link UserChatMessage} for the user chat message model
1315
+ * @see {@link TemplateChatMessage} for the template chat message model
1316
+ * @see {@link SiChatInputComponent} for the chat input component
1317
+ * @see {@link SiChatContainerComponent} for the base chat container component
1318
+ * @see {@link SiAiMessageComponent} for the used AI message component
1319
+ * @see {@link SiUserMessageComponent} for the used user message component
1320
+ * @see {@link SiChatMessageComponent} for the base wrapper chat message component used by AI and user message components
1321
+ *
1322
+ * @experimental
1323
+ */
1324
+ class SiAiChatComponent {
1325
+ chatInput = contentChild(SiChatInputComponent, /* @ts-ignore */
1326
+ ...(ngDevMode ? [{ debugName: "chatInput" }] : /* istanbul ignore next */ []));
1327
+ chatContainer = viewChild(SiChatContainerComponent, /* @ts-ignore */
1328
+ ...(ngDevMode ? [{ debugName: "chatContainer" }] : /* istanbul ignore next */ []));
1329
+ constructor() {
1330
+ effect(() => {
1331
+ if (this.isEmpty()) {
1332
+ this.chatContainer()?.scrollToTop();
1333
+ }
1334
+ });
1335
+ }
1336
+ /**
1337
+ * List of chat messages to display. Messages can contain either content (string)
1338
+ * or a template (TemplateRef) for custom rendering. When both content and template
1339
+ * are provided, the template takes precedence.
1340
+ */
1341
+ messages = input(/* @ts-ignore */
1342
+ ...(ngDevMode ? [undefined, { debugName: "messages" }] : /* istanbul ignore next */ []));
1343
+ /**
1344
+ * Whether the latest activity details are expanded automatically.
1345
+ * @defaultValue true
1346
+ */
1347
+ autoExpand = input(true, { ...(ngDevMode ? { debugName: "autoExpand" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1348
+ /**
1349
+ * Which activity input and output parts are shown.
1350
+ * @defaultValue 'auto'
1351
+ */
1352
+ show = input('auto', /* @ts-ignore */
1353
+ ...(ngDevMode ? [{ debugName: "show" }] : /* istanbul ignore next */ []));
1354
+ /**
1355
+ * Whether a message is currently being sent, disables input and shows a loading state in the input area.
1356
+ * If you want to show a loading state for the latest AI message, set {@link loading} to true instead.
1357
+ * @defaultValue false
1358
+ */
1359
+ sending = input(false, { ...(ngDevMode ? { debugName: "sending" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1360
+ /**
1361
+ * Whether a pending loading AI message should be shown (e.g. while waiting for response).
1362
+ * If you also want to prevent the user from sending new messages, set {@link sending} to true as well.
1363
+ * @defaultValue false
1364
+ */
1365
+ loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1366
+ /**
1367
+ * Whether to disable the interrupt functionality
1368
+ * @defaultValue false
1369
+ */
1370
+ disableInterrupt = input(false, { ...(ngDevMode ? { debugName: "disableInterrupt" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1371
+ /**
1372
+ * Whether the system is currently interrupting an operation. When true,
1373
+ * forces interruptible mode and shows sending state on the input.
1374
+ * @defaultValue false
1375
+ */
1376
+ interrupting = input(false, { ...(ngDevMode ? { debugName: "interrupting" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1377
+ /**
1378
+ * Disable auto-scroll to bottom when new messages are added
1379
+ * @defaultValue false
1380
+ */
1381
+ noAutoScroll = input(false, { ...(ngDevMode ? { debugName: "noAutoScroll" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1382
+ /**
1383
+ * Custom AI icon name, used for empty state
1384
+ * @defaultValue 'element-ai'
1385
+ */
1386
+ aiIcon = input('element-ai', /* @ts-ignore */
1387
+ ...(ngDevMode ? [{ debugName: "aiIcon" }] : /* istanbul ignore next */ []));
1388
+ /**
1389
+ * Color to use for component background.
1390
+ * @defaultValue 'base-0'
1391
+ */
1392
+ colorVariant = input('base-0', /* @ts-ignore */
1393
+ ...(ngDevMode ? [{ debugName: "colorVariant" }] : /* istanbul ignore next */ []));
1394
+ /**
1395
+ * Options used to render chat message markdown.
1396
+ * @defaultValue
1397
+ * ```
1398
+ * makeSiMarkdownOptions()
1399
+ * ```
1400
+ */
1401
+ markdownOptions = input(makeSiMarkdownOptions(), /* @ts-ignore */
1402
+ ...(ngDevMode ? [{ debugName: "markdownOptions" }] : /* istanbul ignore next */ []));
1403
+ /**
1404
+ * The greeting text for the welcome screen
1405
+ * @defaultValue
1406
+ * ```
1407
+ * t(() => $localize`:@@SI_AI_CHAT_CONTAINER.WELCOME_GREETING:Hello,`)
1408
+ * ```
1409
+ */
1410
+ greeting = input(t(() => $localize `:@@SI_AI_CHAT_CONTAINER.WELCOME_GREETING:Hello,`), /* @ts-ignore */
1411
+ ...(ngDevMode ? [{ debugName: "greeting" }] : /* istanbul ignore next */ []));
1412
+ /**
1413
+ * The welcome message text for the welcome screen
1414
+ * @defaultValue
1415
+ * ```
1416
+ * t(() => $localize`:@@SI_AI_CHAT_CONTAINER.WELCOME_MESSAGE:how can I help you today?`)
1417
+ * ```
1418
+ */
1419
+ welcomeMessage = input(t(() => $localize `:@@SI_AI_CHAT_CONTAINER.WELCOME_MESSAGE:how can I help you today?`), /* @ts-ignore */
1420
+ ...(ngDevMode ? [{ debugName: "welcomeMessage" }] : /* istanbul ignore next */ []));
1421
+ /**
1422
+ * The list of prompt suggestions for the welcome screen, either as an array or a record mapping category labels to suggestion arrays
1423
+ * @defaultValue []
1424
+ */
1425
+ promptSuggestions = input([], /* @ts-ignore */
1426
+ ...(ngDevMode ? [{ debugName: "promptSuggestions" }] : /* istanbul ignore next */ []));
1427
+ /**
1428
+ * More actions button aria label
1429
+ *
1430
+ * @defaultValue
1431
+ * ```
1432
+ * t(() => $localize`:@@SI_AI_CHAT_CONTAINER.SECONDARY_ACTIONS:More actions`)
1433
+ * ```
1434
+ */
1435
+ secondaryActionsLabel = input(t(() => $localize `:@@SI_AI_CHAT_CONTAINER.SECONDARY_ACTIONS:More actions`), /* @ts-ignore */
1436
+ ...(ngDevMode ? [{ debugName: "secondaryActionsLabel" }] : /* istanbul ignore next */ []));
1437
+ /**
1438
+ * Status notification severity
1439
+ */
1440
+ statusSeverity = input(/* @ts-ignore */
1441
+ ...(ngDevMode ? [undefined, { debugName: "statusSeverity" }] : /* istanbul ignore next */ []));
1442
+ /**
1443
+ * Status notification heading
1444
+ */
1445
+ statusHeading = input(/* @ts-ignore */
1446
+ ...(ngDevMode ? [undefined, { debugName: "statusHeading" }] : /* istanbul ignore next */ []));
1447
+ /**
1448
+ * Status notification message
1449
+ */
1450
+ statusMessage = input(/* @ts-ignore */
1451
+ ...(ngDevMode ? [undefined, { debugName: "statusMessage" }] : /* istanbul ignore next */ []));
1452
+ /**
1453
+ * Status notification action link
1454
+ */
1455
+ statusAction = input(/* @ts-ignore */
1456
+ ...(ngDevMode ? [undefined, { debugName: "statusAction" }] : /* istanbul ignore next */ []));
1457
+ /**
1458
+ * Label for activity input arguments.
1459
+ * @defaultValue
1460
+ * ```
1461
+ * t(() => $localize`:@@SI_AI_CHAT_CONTAINER.INPUT_ARGUMENTS:Input arguments`)
1462
+ * ```
1463
+ */
1464
+ activityInputArgumentsLabel = input(t(() => $localize `:@@SI_AI_CHAT_CONTAINER.INPUT_ARGUMENTS:Input arguments`), /* @ts-ignore */
1465
+ ...(ngDevMode ? [{ debugName: "activityInputArgumentsLabel" }] : /* istanbul ignore next */ []));
1466
+ /**
1467
+ * Label for activity output.
1468
+ * @defaultValue
1469
+ * ```
1470
+ * t(() => $localize`:@@SI_AI_CHAT_CONTAINER.OUTPUT:Output`)
1471
+ * ```
1472
+ */
1473
+ activityOutputLabel = input(t(() => $localize `:@@SI_AI_CHAT_CONTAINER.OUTPUT:Output`), /* @ts-ignore */
1474
+ ...(ngDevMode ? [{ debugName: "activityOutputLabel" }] : /* istanbul ignore next */ []));
1475
+ /**
1476
+ * Default name for reasoning activities.
1477
+ * @defaultValue
1478
+ * ```
1479
+ * t(() => $localize`:@@SI_AI_CHAT_CONTAINER.REASONING:Reasoning`)
1480
+ * ```
1481
+ */
1482
+ activityReasoningLabel = input(t(() => $localize `:@@SI_AI_CHAT_CONTAINER.REASONING:Reasoning`), /* @ts-ignore */
1483
+ ...(ngDevMode ? [{ debugName: "activityReasoningLabel" }] : /* istanbul ignore next */ []));
1484
+ /**
1485
+ * Emitted when a new message is sent
1486
+ */
1487
+ messageSent = output();
1488
+ /**
1489
+ * Internal selected category state
1490
+ */
1491
+ selectedCategory = signal(undefined, /* @ts-ignore */
1492
+ ...(ngDevMode ? [{ debugName: "selectedCategory" }] : /* istanbul ignore next */ []));
1493
+ /**
1494
+ * Computed list of categories derived from promptSuggestions
1495
+ */
1496
+ promptCategories = computed(() => {
1497
+ const suggestions = this.promptSuggestions();
1498
+ if (Array.isArray(suggestions)) {
1499
+ return [];
1500
+ }
1501
+ return Object.keys(suggestions).map(label => ({ label }));
1502
+ }, /* @ts-ignore */
1503
+ ...(ngDevMode ? [{ debugName: "promptCategories" }] : /* istanbul ignore next */ []));
1504
+ /**
1505
+ * Resolved prompt suggestions based on selected category.
1506
+ */
1507
+ resolvedPromptSuggestions = computed(() => {
1508
+ const suggestions = this.promptSuggestions();
1509
+ if (Array.isArray(suggestions)) {
1510
+ return suggestions;
1511
+ }
1512
+ const category = this.selectedCategory();
1513
+ if (category && suggestions[category]) {
1514
+ return suggestions[category];
1515
+ }
1516
+ const keys = Object.keys(suggestions);
1517
+ return keys.length > 0 ? suggestions[keys[0]] : [];
1518
+ }, /* @ts-ignore */
1519
+ ...(ngDevMode ? [{ debugName: "resolvedPromptSuggestions" }] : /* istanbul ignore next */ []));
1520
+ isEmpty = computed(() => this.messages()?.length === 0 && !this.loading(), /* @ts-ignore */
1521
+ ...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
1522
+ inputInterruptible = computed(() => {
1523
+ return this.interrupting() || (this.loading() && !this.disableInterrupt() && !this.sending());
1524
+ }, /* @ts-ignore */
1525
+ ...(ngDevMode ? [{ debugName: "inputInterruptible" }] : /* istanbul ignore next */ []));
1526
+ inputSending = computed(() => {
1527
+ return this.sending() || this.interrupting();
1528
+ }, /* @ts-ignore */
1529
+ ...(ngDevMode ? [{ debugName: "inputSending" }] : /* istanbul ignore next */ []));
1530
+ displayMessages = computed(() => {
1531
+ const messages = this.messages();
1532
+ if (!messages?.length) {
1533
+ if (this.loading()) {
1534
+ const loadingMessage = {
1535
+ type: 'ai',
1536
+ content: '',
1537
+ loading: true
1538
+ };
1539
+ return [loadingMessage];
1540
+ }
1541
+ return [];
1542
+ }
1543
+ const latestMessage = messages.at(-1);
1544
+ if (this.loading() && latestMessage) {
1545
+ const shouldAddAiMessage = this.isTemplateMessage(latestMessage) ||
1546
+ (latestMessage.type === 'ai' &&
1547
+ this.getContentValue(latestMessage.content) &&
1548
+ !this.getLoadingState(latestMessage.loading, latestMessage.content, false) &&
1549
+ !this.isStreamingContent(latestMessage.content)) ||
1550
+ latestMessage.type === 'user' ||
1551
+ latestMessage.type === 'activity' ||
1552
+ latestMessage.type === 'activity-trace';
1553
+ if (shouldAddAiMessage) {
1554
+ const newMessages = [...messages];
1555
+ const loadingMessage = {
1556
+ type: 'ai',
1557
+ content: '',
1558
+ loading: true
1559
+ };
1560
+ newMessages.push(loadingMessage);
1561
+ return newMessages;
1562
+ }
1563
+ }
1564
+ return messages;
1565
+ }, /* @ts-ignore */
1566
+ ...(ngDevMode ? [{ debugName: "displayMessages" }] : /* istanbul ignore next */ []));
1567
+ renderedMessages = computed(() => this.displayMessages().map(message => {
1568
+ const actions = 'actions' in message ? (message.actions ?? []) : [];
1569
+ return {
1570
+ message,
1571
+ primaryActions: actions.slice(0, 3),
1572
+ secondaryActions: actions.slice(3)
1573
+ };
1574
+ }), /* @ts-ignore */
1575
+ ...(ngDevMode ? [{ debugName: "renderedMessages" }] : /* istanbul ignore next */ []));
1576
+ isTemplateMessage(message) {
1577
+ return 'template' in message && message.template !== undefined;
1578
+ }
1579
+ /**
1580
+ * Scrolls to the bottom of the messages container immediately.
1581
+ * This method forces a scroll even if the user has scrolled up.
1582
+ */
1583
+ scrollToBottom() {
1584
+ this.chatContainer()?.scrollToBottom();
1585
+ }
1586
+ onInputSend() {
1587
+ this.scrollToBottom();
1588
+ }
1589
+ /**
1590
+ * Focuses the chat input component if it exists.
1591
+ */
1592
+ focus() {
1593
+ const inputComponent = this.chatInput();
1594
+ if (inputComponent) {
1595
+ inputComponent.focus();
1596
+ }
1597
+ }
1598
+ getContentValue(content) {
1599
+ if (isSignal(content)) {
1600
+ return content();
1601
+ }
1602
+ return content ?? '';
1603
+ }
1604
+ getMarkdownContent(content) {
1605
+ const value = isSignal(content) ? content() : content;
1606
+ if (typeof value === 'string') {
1607
+ return value;
1608
+ }
1609
+ return value ? `\`\`\`json\n${JSON.stringify(value, undefined, 2)}\n\`\`\`` : '';
1610
+ }
1611
+ isEmptyContent(content) {
1612
+ const contentValue = this.getContentValue(content);
1613
+ return !contentValue || contentValue.trim().length === 0;
1614
+ }
1615
+ getLoadingValue(loading) {
1616
+ if (isSignal(loading)) {
1617
+ return loading();
1618
+ }
1619
+ return loading ?? false;
1620
+ }
1621
+ isStreamingContent(content) {
1622
+ return isSignal(content) && this.getContentValue(content).trim().length > 0;
1623
+ }
1624
+ getLoadingState(messageLoading, content, isLatest, globalLoading = false) {
1625
+ const messageLoadingValue = this.getLoadingValue(messageLoading);
1626
+ const isEmptyContent = this.isEmptyContent(content);
1627
+ return messageLoadingValue || (isLatest && globalLoading && isEmptyContent);
1628
+ }
1629
+ isLatestMessage(message) {
1630
+ const messages = this.displayMessages();
1631
+ return messages[messages.length - 1] === message;
1632
+ }
1633
+ isLatestActivityMessage(message) {
1634
+ const messages = this.displayMessages();
1635
+ const messageIndex = messages.indexOf(message);
1636
+ if (messageIndex === -1) {
1637
+ return false;
1638
+ }
1639
+ return !messages.slice(messageIndex + 1).some(next => {
1640
+ return (!this.isTemplateMessage(next) &&
1641
+ (next.type === 'activity' || next.type === 'activity-trace' || next.type === 'user'));
1642
+ });
1643
+ }
1644
+ shouldAutoExpandTrace(message) {
1645
+ return (this.isLatestActivityMessage(message) &&
1646
+ ((message.autoExpand ?? this.autoExpand()) ||
1647
+ message.messages.some(activity => this.hasExplicitAutoExpand(activity))));
1648
+ }
1649
+ shouldAutoExpandActivity(message, active, inheritedAutoExpand) {
1650
+ const directDetail = this.getDirectActivityDetailType(message);
1651
+ const directAutoExpand = directDetail === 'input' && typeof message.autoExpandInputs === 'boolean'
1652
+ ? message.autoExpandInputs
1653
+ : directDetail === 'output'
1654
+ ? message.autoExpandOutputs
1655
+ : undefined;
1656
+ return (active &&
1657
+ (directAutoExpand ??
1658
+ ((message.autoExpand ?? inheritedAutoExpand) || this.hasExplicitAutoExpand(message))));
1659
+ }
1660
+ hasExplicitAutoExpand(message) {
1661
+ return (message.autoExpandInputs === true ||
1662
+ (Array.isArray(message.autoExpandInputs) && message.autoExpandInputs.length > 0) ||
1663
+ message.autoExpandOutputs === true ||
1664
+ !!message.messages?.some(activity => activity.autoExpand === true ? true : this.hasExplicitAutoExpand(activity)));
1665
+ }
1666
+ hasActivityDetails(message) {
1667
+ return (!!this.getContentValue(message.content).trim() ||
1668
+ this.shouldShowActivityInputs(message) ||
1669
+ this.shouldShowActivityOutput(message) ||
1670
+ !!message.messages?.length);
1671
+ }
1672
+ getActivityInputs(message) {
1673
+ if (typeof message.input === 'string') {
1674
+ return [
1675
+ {
1676
+ heading: message.inputArgumentsLabel ?? this.activityInputArgumentsLabel(),
1677
+ content: message.input
1678
+ }
1679
+ ];
1680
+ }
1681
+ if (Array.isArray(message.input)) {
1682
+ return message.input.map((heading, index) => ({ heading, key: `${index}` }));
1683
+ }
1684
+ if (message.input) {
1685
+ return Object.entries(message.input).map(([key, content]) => ({
1686
+ heading: key,
1687
+ content,
1688
+ key
1689
+ }));
1690
+ }
1691
+ return [];
1692
+ }
1693
+ hasActivityOutput(message) {
1694
+ return !!message.output?.trim();
1695
+ }
1696
+ getDirectActivityDetail(message) {
1697
+ const detail = this.getDirectActivityDetailType(message);
1698
+ return detail === 'input'
1699
+ ? message.input
1700
+ : detail === 'output'
1701
+ ? message.output
1702
+ : undefined;
1703
+ }
1704
+ getDirectActivityDetailType(message) {
1705
+ if (message.content || message.messages?.length) {
1706
+ return undefined;
1707
+ }
1708
+ const showInputs = this.shouldShowActivityInputs(message);
1709
+ const showOutput = this.shouldShowActivityOutput(message);
1710
+ if (showInputs && !showOutput && typeof message.input === 'string') {
1711
+ return 'input';
1712
+ }
1713
+ if (showOutput && !showInputs) {
1714
+ return 'output';
1715
+ }
1716
+ return undefined;
1717
+ }
1718
+ shouldShowActivityInputs(message) {
1719
+ const show = this.show();
1720
+ return (this.getActivityInputs(message).length > 0 &&
1721
+ (show === 'inputs' ||
1722
+ show === 'both' ||
1723
+ (show === 'auto' && !this.hasActivityOutput(message))));
1724
+ }
1725
+ shouldShowActivityOutput(message) {
1726
+ const show = this.show();
1727
+ return (this.hasActivityOutput(message) && (show === 'outputs' || show === 'both' || show === 'auto'));
1728
+ }
1729
+ shouldAutoExpandInput(message, inputPart, active, inheritedAutoExpand) {
1730
+ if (!active || inputPart.content === undefined) {
1731
+ return false;
1732
+ }
1733
+ if (Array.isArray(message.autoExpandInputs)) {
1734
+ return inputPart.key !== undefined && message.autoExpandInputs.includes(inputPart.key);
1735
+ }
1736
+ if (message.autoExpandInputs !== undefined) {
1737
+ return message.autoExpandInputs;
1738
+ }
1739
+ if (this.shouldShowActivityOutput(message)) {
1740
+ return false;
1741
+ }
1742
+ return message.autoExpand ?? inheritedAutoExpand;
1743
+ }
1744
+ shouldAutoExpandOutput(message, active, inheritedAutoExpand) {
1745
+ return active && (message.autoExpandOutputs ?? message.autoExpand ?? inheritedAutoExpand);
1746
+ }
1747
+ isSignal = isSignal;
1748
+ onPromptSelected(suggestion) {
1749
+ // Set the input value and emit the send event
1750
+ const inputComponent = this.chatInput();
1751
+ if (inputComponent) {
1752
+ inputComponent.value.set(suggestion.text);
1753
+ // Programmatically trigger the send output
1754
+ inputComponent.send.emit({
1755
+ content: suggestion.text,
1756
+ attachments: []
1757
+ });
1758
+ this.onInputSend();
1759
+ inputComponent.value.set('');
1760
+ }
1761
+ }
1762
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiAiChatComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1763
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiAiChatComponent, isStandalone: true, selector: "si-ai-chat", inputs: { messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null }, autoExpand: { classPropertyName: "autoExpand", publicName: "autoExpand", isSignal: true, isRequired: false, transformFunction: null }, show: { classPropertyName: "show", publicName: "show", isSignal: true, isRequired: false, transformFunction: null }, sending: { classPropertyName: "sending", publicName: "sending", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, disableInterrupt: { classPropertyName: "disableInterrupt", publicName: "disableInterrupt", isSignal: true, isRequired: false, transformFunction: null }, interrupting: { classPropertyName: "interrupting", publicName: "interrupting", isSignal: true, isRequired: false, transformFunction: null }, noAutoScroll: { classPropertyName: "noAutoScroll", publicName: "noAutoScroll", isSignal: true, isRequired: false, transformFunction: null }, aiIcon: { classPropertyName: "aiIcon", publicName: "aiIcon", isSignal: true, isRequired: false, transformFunction: null }, colorVariant: { classPropertyName: "colorVariant", publicName: "colorVariant", isSignal: true, isRequired: false, transformFunction: null }, markdownOptions: { classPropertyName: "markdownOptions", publicName: "markdownOptions", isSignal: true, isRequired: false, transformFunction: null }, greeting: { classPropertyName: "greeting", publicName: "greeting", isSignal: true, isRequired: false, transformFunction: null }, welcomeMessage: { classPropertyName: "welcomeMessage", publicName: "welcomeMessage", isSignal: true, isRequired: false, transformFunction: null }, promptSuggestions: { classPropertyName: "promptSuggestions", publicName: "promptSuggestions", isSignal: true, isRequired: false, transformFunction: null }, secondaryActionsLabel: { classPropertyName: "secondaryActionsLabel", publicName: "secondaryActionsLabel", isSignal: true, isRequired: false, transformFunction: null }, statusSeverity: { classPropertyName: "statusSeverity", publicName: "statusSeverity", isSignal: true, isRequired: false, transformFunction: null }, statusHeading: { classPropertyName: "statusHeading", publicName: "statusHeading", isSignal: true, isRequired: false, transformFunction: null }, statusMessage: { classPropertyName: "statusMessage", publicName: "statusMessage", isSignal: true, isRequired: false, transformFunction: null }, statusAction: { classPropertyName: "statusAction", publicName: "statusAction", isSignal: true, isRequired: false, transformFunction: null }, activityInputArgumentsLabel: { classPropertyName: "activityInputArgumentsLabel", publicName: "activityInputArgumentsLabel", isSignal: true, isRequired: false, transformFunction: null }, activityOutputLabel: { classPropertyName: "activityOutputLabel", publicName: "activityOutputLabel", isSignal: true, isRequired: false, transformFunction: null }, activityReasoningLabel: { classPropertyName: "activityReasoningLabel", publicName: "activityReasoningLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { messageSent: "messageSent" }, host: { classAttribute: "d-flex si-layout-inner flex-grow-1 flex-column h-100 w-100" }, providers: [{ provide: SI_CHAT_INPUT_PARENT, useExisting: SiAiChatComponent }], queries: [{ propertyName: "chatInput", first: true, predicate: SiChatInputComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "chatContainer", first: true, predicate: SiChatContainerComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<si-chat-container [colorVariant]=\"colorVariant()\" [noAutoScroll]=\"noAutoScroll() || isEmpty()\">\n @if (isEmpty()) {\n <si-ai-welcome-screen\n [categories]=\"promptCategories()\"\n [selectedCategory]=\"selectedCategory()\"\n [promptSuggestions]=\"resolvedPromptSuggestions()\"\n (selectedCategoryChange)=\"selectedCategory.set($event)\"\n (promptSelected)=\"onPromptSelected($event)\"\n >\n <p class=\"h1 mb-0 text-white\">\n <strong>{{ greeting() | translate }}</strong>\n </p>\n <p class=\"h1 mb-0 text-white\">{{ welcomeMessage() | translate }}</p>\n <ng-content select=\"[welcomeScreen]\" />\n </si-ai-welcome-screen>\n }\n\n @for (entry of renderedMessages(); track $index) {\n @let message = entry.message;\n @if (isTemplateMessage(message)) {\n <ng-container\n [ngTemplateOutlet]=\"message.template\"\n [ngTemplateOutletContext]=\"message.templateContext ?? message\"\n />\n } @else {\n @if (message.type === 'user') {\n <si-user-message\n [class.last]=\"$last\"\n [attachments]=\"message.attachments || []\"\n [actions]=\"entry.primaryActions\"\n [secondaryActions]=\"entry.secondaryActions\"\n [actionParam]=\"message\"\n [secondaryActionsLabel]=\"secondaryActionsLabel()\"\n >\n <si-markdown\n [markdown]=\"getContentValue(message.content)\"\n [options]=\"markdownOptions()\"\n />\n </si-user-message>\n }\n\n @if (message.type === 'ai') {\n <si-ai-message\n [loading]=\"\n getLoadingState(message.loading, message.content, isLatestMessage(message), false)\n \"\n [actions]=\"entry.primaryActions\"\n [secondaryActions]=\"entry.secondaryActions\"\n [actionParam]=\"message\"\n [secondaryActionsLabel]=\"secondaryActionsLabel()\"\n >\n <si-markdown\n [markdown]=\"getContentValue(message.content)\"\n [options]=\"markdownOptions()\"\n />\n </si-ai-message>\n }\n\n @if (message.type === 'activity') {\n <ng-container\n [ngTemplateOutlet]=\"activityMessageTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: message,\n active: isLatestActivityMessage(message),\n inheritedAutoExpand: autoExpand()\n }\"\n />\n }\n\n @if (message.type === 'activity-trace') {\n <si-activity-trace [heading]=\"message.name\" [expanded]=\"shouldAutoExpandTrace(message)\">\n @for (activity of message.messages; track activity; let last = $last) {\n <ng-container\n [ngTemplateOutlet]=\"activityMessageTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: activity,\n active: isLatestActivityMessage(message) && last,\n inheritedAutoExpand: message.autoExpand ?? autoExpand()\n }\"\n />\n }\n </si-activity-trace>\n }\n }\n }\n\n <ng-template\n #activityMessageTemplate\n let-message\n let-active=\"active\"\n let-inheritedAutoExpand=\"inheritedAutoExpand\"\n >\n <si-activity-message\n [heading]=\"message.name ?? activityReasoningLabel()\"\n [icon]=\"message.icon === false ? undefined : message.icon\"\n [state]=\"getLoadingValue(message.loading) ? 'running' : undefined\"\n [expanded]=\"shouldAutoExpandActivity(message, active, inheritedAutoExpand)\"\n >\n @if (message.content) {\n <si-markdown\n [markdown]=\"getMarkdownContent(message.content)\"\n [options]=\"markdownOptions()\"\n />\n }\n @if (getDirectActivityDetail(message); as directDetail) {\n <si-markdown [markdown]=\"directDetail\" [options]=\"markdownOptions()\" />\n } @else {\n @if (shouldShowActivityInputs(message)) {\n @for (input of getActivityInputs(message); track input.key ?? $index) {\n <si-activity-message-part\n [heading]=\"input.heading\"\n [collapsible]=\"input.content !== undefined\"\n [expanded]=\"\n shouldAutoExpandInput(\n message,\n input,\n active && !message.messages?.length,\n inheritedAutoExpand\n )\n \"\n >\n @if (input.content !== undefined) {\n <si-markdown [markdown]=\"input.content\" [options]=\"markdownOptions()\" />\n }\n </si-activity-message-part>\n }\n }\n @if (shouldShowActivityOutput(message)) {\n <si-activity-message-part\n [heading]=\"message.outputLabel ?? activityOutputLabel()\"\n [collapsible]=\"true\"\n [expanded]=\"\n shouldAutoExpandOutput(\n message,\n active && !message.messages?.length,\n inheritedAutoExpand\n )\n \"\n >\n <si-markdown [markdown]=\"message.output!\" [options]=\"markdownOptions()\" />\n </si-activity-message-part>\n }\n }\n @for (activity of message.messages ?? []; track activity) {\n <ng-container\n [ngTemplateOutlet]=\"activityMessageTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: activity,\n active: active && $last,\n inheritedAutoExpand: message.autoExpand ?? inheritedAutoExpand\n }\"\n />\n }\n </si-activity-message>\n </ng-template>\n\n @if (statusSeverity() && statusMessage()) {\n <si-inline-notification\n class=\"mb-6 w-100 overflow-hidden\"\n [severity]=\"statusSeverity()!\"\n [heading]=\"statusHeading()\"\n [message]=\"statusMessage()!\"\n [action]=\"statusAction()\"\n />\n }\n\n <div siChatContainerInput class=\"w-100\">\n <ng-content select=\"si-chat-input\" />\n </div>\n</si-chat-container>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SiInlineNotificationComponent, selector: "si-inline-notification", inputs: ["severity", "heading", "message", "action", "translationParams", "embedded"] }, { kind: "component", type: SiAiMessageComponent, selector: "si-ai-message", inputs: ["content", "loading", "actions", "secondaryActions", "actionParam", "sources", "secondaryActionsLabel"], outputs: ["sourceClicked"] }, { kind: "component", type: SiActivityMessageComponent, selector: "si-activity-message", inputs: ["heading", "icon", "state", "expanded"], outputs: ["expandedChange"] }, { kind: "component", type: SiActivityMessagePartComponent, selector: "si-activity-message-part", inputs: ["heading", "collapsible", "expanded"], outputs: ["expandedChange"] }, { kind: "component", type: SiActivityTraceComponent, selector: "si-activity-trace", inputs: ["heading", "expanded"], outputs: ["expandedChange"] }, { kind: "component", type: SiUserMessageComponent, selector: "si-user-message", inputs: ["content", "actions", "secondaryActions", "attachments", "actionParam", "secondaryActionsLabel"] }, { kind: "component", type: SiMarkdownComponent, selector: "si-markdown", inputs: ["markdown", "options", "citations", "debug"], outputs: ["extensionEvent"] }, { kind: "component", type: SiChatContainerComponent, selector: "si-chat-container", inputs: ["colorVariant", "noAutoScroll"] }, { kind: "directive", type: SiChatContainerInputDirective, selector: "[siChatContainerInput]" }, { kind: "component", type: SiAiWelcomeScreenComponent, selector: "si-ai-welcome-screen", inputs: ["categories", "selectedCategory", "promptSuggestions"], outputs: ["selectedCategoryChange", "promptSelected"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
1764
+ }
1765
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiAiChatComponent, decorators: [{
1766
+ type: Component,
1767
+ args: [{ selector: 'si-ai-chat', imports: [
1768
+ NgTemplateOutlet,
1769
+ SiInlineNotificationComponent,
1770
+ SiAiMessageComponent,
1771
+ SiActivityMessageComponent,
1772
+ SiActivityMessagePartComponent,
1773
+ SiActivityTraceComponent,
1774
+ SiUserMessageComponent,
1775
+ SiMarkdownComponent,
1776
+ SiChatContainerComponent,
1777
+ SiChatContainerInputDirective,
1778
+ SiTranslatePipe,
1779
+ SiAiWelcomeScreenComponent
1780
+ ], providers: [{ provide: SI_CHAT_INPUT_PARENT, useExisting: SiAiChatComponent }], host: {
1781
+ class: 'd-flex si-layout-inner flex-grow-1 flex-column h-100 w-100'
1782
+ }, template: "<si-chat-container [colorVariant]=\"colorVariant()\" [noAutoScroll]=\"noAutoScroll() || isEmpty()\">\n @if (isEmpty()) {\n <si-ai-welcome-screen\n [categories]=\"promptCategories()\"\n [selectedCategory]=\"selectedCategory()\"\n [promptSuggestions]=\"resolvedPromptSuggestions()\"\n (selectedCategoryChange)=\"selectedCategory.set($event)\"\n (promptSelected)=\"onPromptSelected($event)\"\n >\n <p class=\"h1 mb-0 text-white\">\n <strong>{{ greeting() | translate }}</strong>\n </p>\n <p class=\"h1 mb-0 text-white\">{{ welcomeMessage() | translate }}</p>\n <ng-content select=\"[welcomeScreen]\" />\n </si-ai-welcome-screen>\n }\n\n @for (entry of renderedMessages(); track $index) {\n @let message = entry.message;\n @if (isTemplateMessage(message)) {\n <ng-container\n [ngTemplateOutlet]=\"message.template\"\n [ngTemplateOutletContext]=\"message.templateContext ?? message\"\n />\n } @else {\n @if (message.type === 'user') {\n <si-user-message\n [class.last]=\"$last\"\n [attachments]=\"message.attachments || []\"\n [actions]=\"entry.primaryActions\"\n [secondaryActions]=\"entry.secondaryActions\"\n [actionParam]=\"message\"\n [secondaryActionsLabel]=\"secondaryActionsLabel()\"\n >\n <si-markdown\n [markdown]=\"getContentValue(message.content)\"\n [options]=\"markdownOptions()\"\n />\n </si-user-message>\n }\n\n @if (message.type === 'ai') {\n <si-ai-message\n [loading]=\"\n getLoadingState(message.loading, message.content, isLatestMessage(message), false)\n \"\n [actions]=\"entry.primaryActions\"\n [secondaryActions]=\"entry.secondaryActions\"\n [actionParam]=\"message\"\n [secondaryActionsLabel]=\"secondaryActionsLabel()\"\n >\n <si-markdown\n [markdown]=\"getContentValue(message.content)\"\n [options]=\"markdownOptions()\"\n />\n </si-ai-message>\n }\n\n @if (message.type === 'activity') {\n <ng-container\n [ngTemplateOutlet]=\"activityMessageTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: message,\n active: isLatestActivityMessage(message),\n inheritedAutoExpand: autoExpand()\n }\"\n />\n }\n\n @if (message.type === 'activity-trace') {\n <si-activity-trace [heading]=\"message.name\" [expanded]=\"shouldAutoExpandTrace(message)\">\n @for (activity of message.messages; track activity; let last = $last) {\n <ng-container\n [ngTemplateOutlet]=\"activityMessageTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: activity,\n active: isLatestActivityMessage(message) && last,\n inheritedAutoExpand: message.autoExpand ?? autoExpand()\n }\"\n />\n }\n </si-activity-trace>\n }\n }\n }\n\n <ng-template\n #activityMessageTemplate\n let-message\n let-active=\"active\"\n let-inheritedAutoExpand=\"inheritedAutoExpand\"\n >\n <si-activity-message\n [heading]=\"message.name ?? activityReasoningLabel()\"\n [icon]=\"message.icon === false ? undefined : message.icon\"\n [state]=\"getLoadingValue(message.loading) ? 'running' : undefined\"\n [expanded]=\"shouldAutoExpandActivity(message, active, inheritedAutoExpand)\"\n >\n @if (message.content) {\n <si-markdown\n [markdown]=\"getMarkdownContent(message.content)\"\n [options]=\"markdownOptions()\"\n />\n }\n @if (getDirectActivityDetail(message); as directDetail) {\n <si-markdown [markdown]=\"directDetail\" [options]=\"markdownOptions()\" />\n } @else {\n @if (shouldShowActivityInputs(message)) {\n @for (input of getActivityInputs(message); track input.key ?? $index) {\n <si-activity-message-part\n [heading]=\"input.heading\"\n [collapsible]=\"input.content !== undefined\"\n [expanded]=\"\n shouldAutoExpandInput(\n message,\n input,\n active && !message.messages?.length,\n inheritedAutoExpand\n )\n \"\n >\n @if (input.content !== undefined) {\n <si-markdown [markdown]=\"input.content\" [options]=\"markdownOptions()\" />\n }\n </si-activity-message-part>\n }\n }\n @if (shouldShowActivityOutput(message)) {\n <si-activity-message-part\n [heading]=\"message.outputLabel ?? activityOutputLabel()\"\n [collapsible]=\"true\"\n [expanded]=\"\n shouldAutoExpandOutput(\n message,\n active && !message.messages?.length,\n inheritedAutoExpand\n )\n \"\n >\n <si-markdown [markdown]=\"message.output!\" [options]=\"markdownOptions()\" />\n </si-activity-message-part>\n }\n }\n @for (activity of message.messages ?? []; track activity) {\n <ng-container\n [ngTemplateOutlet]=\"activityMessageTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: activity,\n active: active && $last,\n inheritedAutoExpand: message.autoExpand ?? inheritedAutoExpand\n }\"\n />\n }\n </si-activity-message>\n </ng-template>\n\n @if (statusSeverity() && statusMessage()) {\n <si-inline-notification\n class=\"mb-6 w-100 overflow-hidden\"\n [severity]=\"statusSeverity()!\"\n [heading]=\"statusHeading()\"\n [message]=\"statusMessage()!\"\n [action]=\"statusAction()\"\n />\n }\n\n <div siChatContainerInput class=\"w-100\">\n <ng-content select=\"si-chat-input\" />\n </div>\n</si-chat-container>\n" }]
1783
+ }], ctorParameters: () => [], propDecorators: { chatInput: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SiChatInputComponent), { isSignal: true }] }], chatContainer: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SiChatContainerComponent), { isSignal: true }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], autoExpand: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoExpand", required: false }] }], show: [{ type: i0.Input, args: [{ isSignal: true, alias: "show", required: false }] }], sending: [{ type: i0.Input, args: [{ isSignal: true, alias: "sending", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], disableInterrupt: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableInterrupt", required: false }] }], interrupting: [{ type: i0.Input, args: [{ isSignal: true, alias: "interrupting", required: false }] }], noAutoScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "noAutoScroll", required: false }] }], aiIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "aiIcon", required: false }] }], colorVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorVariant", required: false }] }], markdownOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "markdownOptions", required: false }] }], greeting: [{ type: i0.Input, args: [{ isSignal: true, alias: "greeting", required: false }] }], welcomeMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "welcomeMessage", required: false }] }], promptSuggestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "promptSuggestions", required: false }] }], secondaryActionsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondaryActionsLabel", required: false }] }], statusSeverity: [{ type: i0.Input, args: [{ isSignal: true, alias: "statusSeverity", required: false }] }], statusHeading: [{ type: i0.Input, args: [{ isSignal: true, alias: "statusHeading", required: false }] }], statusMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "statusMessage", required: false }] }], statusAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "statusAction", required: false }] }], activityInputArgumentsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "activityInputArgumentsLabel", required: false }] }], activityOutputLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "activityOutputLabel", required: false }] }], activityReasoningLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "activityReasoningLabel", required: false }] }], messageSent: [{ type: i0.Output, args: ["messageSent"] }] } });
1784
+
1210
1785
  /**
1211
1786
  * Copyright (c) Siemens 2016 - 2026
1212
1787
  * SPDX-License-Identifier: MIT
@@ -1216,5 +1791,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
1216
1791
  * Generated bundle index. Do not edit.
1217
1792
  */
1218
1793
 
1219
- export { SiActivityMessageComponent, SiActivityMessagePartComponent, SiActivityTraceComponent, SiAiMessageComponent, SiAiWelcomeScreenComponent, SiAttachmentListComponent, SiChatContainerComponent, SiChatContainerInputDirective, SiChatInputComponent, SiChatInputDisclaimerDirective, SiChatMessageActionDirective, SiChatMessageComponent, SiUserMessageComponent };
1794
+ export { SI_CHAT_INPUT_PARENT, SiActivityMessageComponent, SiActivityMessagePartComponent, SiActivityTraceComponent, SiAiChatComponent, SiAiMessageComponent, SiAiWelcomeScreenComponent, SiAttachmentListComponent, SiChatContainerComponent, SiChatContainerInputDirective, SiChatInputComponent, SiChatInputDisclaimerDirective, SiChatMessageActionDirective, SiChatMessageActionsComponent, SiChatMessageComponent, SiUserMessageComponent };
1220
1795
  //# sourceMappingURL=siemens-element-ng-chat-messages.mjs.map