@siemens/element-ng 51.0.0-rc.9 → 51.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/siemens-element-ng-chat-messages.mjs +121 -21
- package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-form.mjs +17 -4
- package/fesm2022/siemens-element-ng-form.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-icon.mjs +1 -1
- package/fesm2022/siemens-element-ng-icon.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-list-details.mjs +62 -16
- package/fesm2022/siemens-element-ng-list-details.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-main-detail-container.mjs +72 -24
- package/fesm2022/siemens-element-ng-main-detail-container.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-markdown-hightlighter-highlightjs.mjs +2 -2
- package/fesm2022/siemens-element-ng-markdown-hightlighter-highlightjs.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs +2 -2
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs +2 -2
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-select.mjs +44 -5
- package/fesm2022/siemens-element-ng-select.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-side-panel.mjs +44 -9
- package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-split.mjs +18 -16
- package/fesm2022/siemens-element-ng-split.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs.mjs +93 -71
- package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -1
- package/package.json +4 -4
- package/schematics/migrations/data/element-class-changes.js +8 -7
- package/schematics/ng-update/migrate-list-details-units.js +86 -0
- package/schematics/ng-update/migrate-main-detail-units.js +89 -0
- package/schematics/ng-update/migrate-split-collapse.js +1 -32
- package/schematics/ng-update/migrate-split-scale.js +524 -0
- package/schematics/ng-update/migrate-split-sizes.js +5 -3
- package/schematics/ng-update/migrate-to-v51.js +6 -0
- package/schematics/utils/index.js +1 -0
- package/schematics/utils/template-edit-utils.js +35 -0
- package/schematics/utils/template-utils.js +31 -45
- package/types/siemens-element-ng-chat-messages.d.ts +81 -17
- package/types/siemens-element-ng-form.d.ts +3 -0
- package/types/siemens-element-ng-list-details.d.ts +25 -3
- package/types/siemens-element-ng-main-detail-container.d.ts +23 -3
- package/types/siemens-element-ng-select.d.ts +31 -4
- package/types/siemens-element-ng-side-panel.d.ts +17 -3
- package/types/siemens-element-ng-split.d.ts +3 -10
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { CdkMenuTrigger } from '@angular/cdk/menu';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Directive, input, Component, booleanAttribute, output, inject, viewChild, PLATFORM_ID, effect,
|
|
4
|
-
import { elementOptionsVertical, elementDocument, elementStateClose, elementStopFilled, elementSendFilled, elementPlus, elementAttachment } from '@siemens/element-icons';
|
|
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
5
|
import { addIcons, SiIconComponent } from '@siemens/element-ng/icon';
|
|
6
6
|
import { SiMenuFactoryComponent } from '@siemens/element-ng/menu';
|
|
7
7
|
import { SiSourceChipComponent } from '@siemens/element-ng/source-chip';
|
|
8
8
|
import { t, SiTranslatePipe } from '@siemens/element-translate-ng/translate';
|
|
9
9
|
import * as i1 from '@siemens/element-ng/resize-observer';
|
|
10
10
|
import { SiResponsiveContainerDirective } from '@siemens/element-ng/resize-observer';
|
|
11
|
+
import { SiLoadingSpinnerComponent } from '@siemens/element-ng/loading-spinner';
|
|
11
12
|
import { SiModalService } from '@siemens/element-ng/modal';
|
|
12
13
|
import { isPlatformBrowser } from '@angular/common';
|
|
13
14
|
import * as i1$1 from '@angular/forms';
|
|
14
15
|
import { FormsModule } from '@angular/forms';
|
|
15
16
|
import { SiFileUploadDirective } from '@siemens/element-ng/file-uploader';
|
|
17
|
+
import { SiTooltipDirective } from '@siemens/element-ng/tooltip';
|
|
16
18
|
import { SiActionCardComponent } from '@siemens/element-ng/card';
|
|
17
19
|
import { SiSummaryChipComponent } from '@siemens/element-ng/summary-chip';
|
|
18
20
|
|
|
@@ -194,6 +196,112 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
194
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"] }]
|
|
195
197
|
}], 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"] }] } });
|
|
196
198
|
|
|
199
|
+
/**
|
|
200
|
+
* Copyright (c) Siemens 2016 - 2026
|
|
201
|
+
* SPDX-License-Identifier: MIT
|
|
202
|
+
*/
|
|
203
|
+
/**
|
|
204
|
+
* Collapsible activity message for displaying progress and intermediate steps in a chat.
|
|
205
|
+
*
|
|
206
|
+
* @experimental
|
|
207
|
+
*/
|
|
208
|
+
class SiActivityMessageComponent {
|
|
209
|
+
/** Activity heading. */
|
|
210
|
+
heading = input.required(/* @ts-ignore */
|
|
211
|
+
...(ngDevMode ? [{ debugName: "heading" }] : /* istanbul ignore next */ []));
|
|
212
|
+
/** Activity icon. */
|
|
213
|
+
icon = input(/* @ts-ignore */
|
|
214
|
+
...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
215
|
+
/** Current state of the activity. */
|
|
216
|
+
state = input(/* @ts-ignore */
|
|
217
|
+
...(ngDevMode ? [undefined, { debugName: "state" }] : /* istanbul ignore next */ []));
|
|
218
|
+
/**
|
|
219
|
+
* Whether the activity details are expanded.
|
|
220
|
+
*
|
|
221
|
+
* @defaultValue false
|
|
222
|
+
*/
|
|
223
|
+
expanded = model(false, /* @ts-ignore */
|
|
224
|
+
...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
225
|
+
icons = addIcons({
|
|
226
|
+
elementCircleFilled,
|
|
227
|
+
elementIssue,
|
|
228
|
+
elementRight2
|
|
229
|
+
});
|
|
230
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiActivityMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
231
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiActivityMessageComponent, isStandalone: true, selector: "si-activity-message", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, host: { properties: { "class.expanded": "expanded()", "class.failed": "state() === 'failed'" } }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"activity-toggle\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"expanded.update(value => !value)\"\n>\n <span class=\"activity-marker\">\n @switch (state()) {\n @case ('running') {\n <si-loading-spinner class=\"activity-icon\" />\n }\n @case ('failed') {\n <si-icon class=\"activity-icon\" [icon]=\"icons.elementIssue\" />\n }\n @default {\n <si-icon\n class=\"activity-icon\"\n [class.default-icon]=\"!icon()\"\n [icon]=\"icon() ?? icons.elementCircleFilled\"\n />\n }\n }\n <si-icon class=\"disclosure-icon\" [class.expanded]=\"expanded()\" [icon]=\"icons.elementRight2\" />\n </span>\n <span class=\"activity-heading\">{{ heading() | translate }}</span>\n</button>\n\n@if (expanded()) {\n <div class=\"content-motion\" animate.enter=\"content-enter\" animate.leave=\"content-leave\">\n <div class=\"overflow-hidden\">\n <div class=\"activity-content\">\n <ng-content />\n </div>\n </div>\n </div>\n}\n", styles: [":host{position:relative;display:block;color:var(--si-sys-text-secondary);padding-block:var(--si-sys-sizing-spacing-y-20)}:host.failed{color:var(--si-sys-text-danger)}si-activity-message+:host{margin-block-start:var(--si-sys-sizing-spacing-y-20)}si-activity-message+:host:before{position:absolute;content:\"\";z-index:0;block-size:calc(var(--si-sys-sizing-spacing-y-20) + var(--si-sys-sizing-spacing-y-20) + var(--si-sys-sizing-spacing-y-20));inset-block-end:calc(100% - var(--si-sys-sizing-spacing-y-20));inset-inline-start:calc(var(--si-sys-sizing-icon-sm) / 2);border-inline-start:1px solid var(--si-sys-border-3)}.activity-toggle{position:relative;z-index:1;display:flex;align-items:center;gap:var(--si-sys-sizing-spacing-x-30);padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;text-align:start}.activity-toggle:is(:hover,:focus-visible) .activity-icon{display:none}.activity-toggle:is(:hover,:focus-visible) .disclosure-icon{display:inline-flex}.activity-marker{--loading-spinner-size: var(--si-sys-sizing-icon-sm);display:inline-flex;flex:0 0 var(--si-sys-sizing-icon-sm);align-items:center;justify-content:center;inline-size:var(--si-sys-sizing-icon-sm);block-size:var(--si-sys-sizing-icon-sm)}.activity-icon,.disclosure-icon{font-size:var(--si-sys-sizing-icon-sm)}.activity-heading{display:flex;align-items:center;min-block-size:calc(var(--si-sys-sizing-icon-sm) + 2 * var(--si-sys-sizing-spacing-y-20))}.default-icon{font-size:6px}.disclosure-icon{display:none;transition:transform calc(.5s * var(--element-animations-enabled, 1))}.disclosure-icon.expanded{transform:rotate(90deg)}.content-motion{display:grid;grid-template-rows:1fr;margin-inline-start:calc(var(--si-sys-sizing-icon-sm) / 2);padding-inline-start:calc(var(--si-sys-sizing-icon-sm) / 2 + var(--si-sys-sizing-spacing-x-30));border-inline-start:1px solid var(--si-sys-border-3)}.content-motion:is(.content-enter,.content-leave){transition:grid-template-rows calc(.5s * var(--element-animations-enabled, 1))}@starting-style{.content-motion.content-enter{grid-template-rows:0fr}}.content-motion.content-leave{grid-template-rows:0fr}.activity-content{overflow:hidden;padding-block-start:var(--si-sys-sizing-spacing-y-40)}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "component", type: SiLoadingSpinnerComponent, selector: "si-loading-spinner", inputs: ["isBlockingSpinner", "isSpinnerOverlay", "ariaLabel"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
232
|
+
}
|
|
233
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiActivityMessageComponent, decorators: [{
|
|
234
|
+
type: Component,
|
|
235
|
+
args: [{ selector: 'si-activity-message', imports: [SiIconComponent, SiLoadingSpinnerComponent, SiTranslatePipe], host: {
|
|
236
|
+
'[class.expanded]': 'expanded()',
|
|
237
|
+
'[class.failed]': `state() === 'failed'`
|
|
238
|
+
}, template: "<button\n type=\"button\"\n class=\"activity-toggle\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"expanded.update(value => !value)\"\n>\n <span class=\"activity-marker\">\n @switch (state()) {\n @case ('running') {\n <si-loading-spinner class=\"activity-icon\" />\n }\n @case ('failed') {\n <si-icon class=\"activity-icon\" [icon]=\"icons.elementIssue\" />\n }\n @default {\n <si-icon\n class=\"activity-icon\"\n [class.default-icon]=\"!icon()\"\n [icon]=\"icon() ?? icons.elementCircleFilled\"\n />\n }\n }\n <si-icon class=\"disclosure-icon\" [class.expanded]=\"expanded()\" [icon]=\"icons.elementRight2\" />\n </span>\n <span class=\"activity-heading\">{{ heading() | translate }}</span>\n</button>\n\n@if (expanded()) {\n <div class=\"content-motion\" animate.enter=\"content-enter\" animate.leave=\"content-leave\">\n <div class=\"overflow-hidden\">\n <div class=\"activity-content\">\n <ng-content />\n </div>\n </div>\n </div>\n}\n", styles: [":host{position:relative;display:block;color:var(--si-sys-text-secondary);padding-block:var(--si-sys-sizing-spacing-y-20)}:host.failed{color:var(--si-sys-text-danger)}si-activity-message+:host{margin-block-start:var(--si-sys-sizing-spacing-y-20)}si-activity-message+:host:before{position:absolute;content:\"\";z-index:0;block-size:calc(var(--si-sys-sizing-spacing-y-20) + var(--si-sys-sizing-spacing-y-20) + var(--si-sys-sizing-spacing-y-20));inset-block-end:calc(100% - var(--si-sys-sizing-spacing-y-20));inset-inline-start:calc(var(--si-sys-sizing-icon-sm) / 2);border-inline-start:1px solid var(--si-sys-border-3)}.activity-toggle{position:relative;z-index:1;display:flex;align-items:center;gap:var(--si-sys-sizing-spacing-x-30);padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;text-align:start}.activity-toggle:is(:hover,:focus-visible) .activity-icon{display:none}.activity-toggle:is(:hover,:focus-visible) .disclosure-icon{display:inline-flex}.activity-marker{--loading-spinner-size: var(--si-sys-sizing-icon-sm);display:inline-flex;flex:0 0 var(--si-sys-sizing-icon-sm);align-items:center;justify-content:center;inline-size:var(--si-sys-sizing-icon-sm);block-size:var(--si-sys-sizing-icon-sm)}.activity-icon,.disclosure-icon{font-size:var(--si-sys-sizing-icon-sm)}.activity-heading{display:flex;align-items:center;min-block-size:calc(var(--si-sys-sizing-icon-sm) + 2 * var(--si-sys-sizing-spacing-y-20))}.default-icon{font-size:6px}.disclosure-icon{display:none;transition:transform calc(.5s * var(--element-animations-enabled, 1))}.disclosure-icon.expanded{transform:rotate(90deg)}.content-motion{display:grid;grid-template-rows:1fr;margin-inline-start:calc(var(--si-sys-sizing-icon-sm) / 2);padding-inline-start:calc(var(--si-sys-sizing-icon-sm) / 2 + var(--si-sys-sizing-spacing-x-30));border-inline-start:1px solid var(--si-sys-border-3)}.content-motion:is(.content-enter,.content-leave){transition:grid-template-rows calc(.5s * var(--element-animations-enabled, 1))}@starting-style{.content-motion.content-enter{grid-template-rows:0fr}}.content-motion.content-leave{grid-template-rows:0fr}.activity-content{overflow:hidden;padding-block-start:var(--si-sys-sizing-spacing-y-40)}\n"] }]
|
|
239
|
+
}], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: true }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }] } });
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Copyright (c) Siemens 2016 - 2026
|
|
243
|
+
* SPDX-License-Identifier: MIT
|
|
244
|
+
*/
|
|
245
|
+
/**
|
|
246
|
+
* Titled content part for use inside an activity message.
|
|
247
|
+
*
|
|
248
|
+
* @experimental
|
|
249
|
+
*/
|
|
250
|
+
class SiActivityMessagePartComponent {
|
|
251
|
+
/** Part heading. */
|
|
252
|
+
heading = input.required(/* @ts-ignore */
|
|
253
|
+
...(ngDevMode ? [{ debugName: "heading" }] : /* istanbul ignore next */ []));
|
|
254
|
+
/**
|
|
255
|
+
* Whether the part can be collapsed and expanded.
|
|
256
|
+
*
|
|
257
|
+
* @defaultValue false
|
|
258
|
+
*/
|
|
259
|
+
collapsible = input(false, { ...(ngDevMode ? { debugName: "collapsible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
260
|
+
/**
|
|
261
|
+
* Whether collapsible content is expanded.
|
|
262
|
+
*
|
|
263
|
+
* @defaultValue true
|
|
264
|
+
*/
|
|
265
|
+
expanded = model(true, /* @ts-ignore */
|
|
266
|
+
...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
267
|
+
icons = addIcons({ elementCircleFilled, elementRight2 });
|
|
268
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiActivityMessagePartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
269
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiActivityMessagePartComponent, isStandalone: true, selector: "si-activity-message-part", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: true, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, ngImport: i0, template: "@if (collapsible()) {\n <button\n type=\"button\"\n class=\"section-heading section-toggle\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"expanded.update(value => !value)\"\n >\n <si-icon\n class=\"section-icon disclosure-icon\"\n [class.expanded]=\"expanded()\"\n [icon]=\"icons.elementRight2\"\n />\n <span>{{ heading() | translate }}</span>\n </button>\n} @else {\n <div class=\"section-heading\">\n <si-icon class=\"section-icon default-icon\" [icon]=\"icons.elementCircleFilled\" />\n <span>{{ heading() | translate }}</span>\n </div>\n}\n\n@if (!collapsible() || expanded()) {\n <div class=\"content-motion\" animate.enter=\"content-enter\" animate.leave=\"content-leave\">\n <div class=\"overflow-hidden\">\n <div class=\"section-content\">\n <ng-content />\n </div>\n </div>\n </div>\n}\n", styles: [":host{display:block;padding-block:var(--si-sys-sizing-spacing-y-20)}:host+:host{margin-block-start:var(--si-sys-sizing-spacing-y-50)}.section-heading{display:flex;align-items:center;gap:var(--si-sys-sizing-spacing-x-20);color:var(--si-sys-text-secondary)}.section-toggle{padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;text-align:start}.section-toggle .disclosure-icon{transition:transform calc(.5s * var(--element-animations-enabled, 1))}.section-toggle .disclosure-icon.expanded{transform:rotate(90deg)}.section-icon{flex:0 0 var(--si-sys-sizing-icon-sm);align-items:center;justify-content:center;inline-size:var(--si-sys-sizing-icon-sm);block-size:var(--si-sys-sizing-icon-sm);font-size:var(--si-sys-sizing-icon-sm)}.default-icon{font-size:6px}.content-motion{display:grid;grid-template-rows:1fr}.content-motion:is(.content-enter,.content-leave){transition:grid-template-rows calc(.5s * var(--element-animations-enabled, 1))}@starting-style{.content-motion.content-enter{grid-template-rows:0fr}}.content-motion.content-leave{grid-template-rows:0fr}.section-content{overflow:hidden;margin-block-start:var(--si-sys-sizing-spacing-y-20);padding-inline-start:calc(var(--si-sys-sizing-icon-sm) + var(--si-sys-sizing-spacing-x-20));color:var(--si-sys-text-secondary)}.section-content:empty{display:none}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
270
|
+
}
|
|
271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiActivityMessagePartComponent, decorators: [{
|
|
272
|
+
type: Component,
|
|
273
|
+
args: [{ selector: 'si-activity-message-part', imports: [SiIconComponent, SiTranslatePipe], template: "@if (collapsible()) {\n <button\n type=\"button\"\n class=\"section-heading section-toggle\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"expanded.update(value => !value)\"\n >\n <si-icon\n class=\"section-icon disclosure-icon\"\n [class.expanded]=\"expanded()\"\n [icon]=\"icons.elementRight2\"\n />\n <span>{{ heading() | translate }}</span>\n </button>\n} @else {\n <div class=\"section-heading\">\n <si-icon class=\"section-icon default-icon\" [icon]=\"icons.elementCircleFilled\" />\n <span>{{ heading() | translate }}</span>\n </div>\n}\n\n@if (!collapsible() || expanded()) {\n <div class=\"content-motion\" animate.enter=\"content-enter\" animate.leave=\"content-leave\">\n <div class=\"overflow-hidden\">\n <div class=\"section-content\">\n <ng-content />\n </div>\n </div>\n </div>\n}\n", styles: [":host{display:block;padding-block:var(--si-sys-sizing-spacing-y-20)}:host+:host{margin-block-start:var(--si-sys-sizing-spacing-y-50)}.section-heading{display:flex;align-items:center;gap:var(--si-sys-sizing-spacing-x-20);color:var(--si-sys-text-secondary)}.section-toggle{padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;text-align:start}.section-toggle .disclosure-icon{transition:transform calc(.5s * var(--element-animations-enabled, 1))}.section-toggle .disclosure-icon.expanded{transform:rotate(90deg)}.section-icon{flex:0 0 var(--si-sys-sizing-icon-sm);align-items:center;justify-content:center;inline-size:var(--si-sys-sizing-icon-sm);block-size:var(--si-sys-sizing-icon-sm);font-size:var(--si-sys-sizing-icon-sm)}.default-icon{font-size:6px}.content-motion{display:grid;grid-template-rows:1fr}.content-motion:is(.content-enter,.content-leave){transition:grid-template-rows calc(.5s * var(--element-animations-enabled, 1))}@starting-style{.content-motion.content-enter{grid-template-rows:0fr}}.content-motion.content-leave{grid-template-rows:0fr}.section-content{overflow:hidden;margin-block-start:var(--si-sys-sizing-spacing-y-20);padding-inline-start:calc(var(--si-sys-sizing-icon-sm) + var(--si-sys-sizing-spacing-x-20));color:var(--si-sys-text-secondary)}.section-content:empty{display:none}\n"] }]
|
|
274
|
+
}], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: true }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }] } });
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Copyright (c) Siemens 2016 - 2026
|
|
278
|
+
* SPDX-License-Identifier: MIT
|
|
279
|
+
*/
|
|
280
|
+
/**
|
|
281
|
+
* Collapsible container for grouping multiple activity messages.
|
|
282
|
+
*
|
|
283
|
+
* @experimental
|
|
284
|
+
*/
|
|
285
|
+
class SiActivityTraceComponent {
|
|
286
|
+
/** Trace heading. */
|
|
287
|
+
heading = input.required(/* @ts-ignore */
|
|
288
|
+
...(ngDevMode ? [{ debugName: "heading" }] : /* istanbul ignore next */ []));
|
|
289
|
+
/**
|
|
290
|
+
* Whether the trace content is expanded.
|
|
291
|
+
*
|
|
292
|
+
* @defaultValue false
|
|
293
|
+
*/
|
|
294
|
+
expanded = model(false, /* @ts-ignore */
|
|
295
|
+
...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
296
|
+
icons = addIcons({ elementRight2 });
|
|
297
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiActivityTraceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
298
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiActivityTraceComponent, isStandalone: true, selector: "si-activity-trace", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: true, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"trace-toggle\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"expanded.update(value => !value)\"\n>\n <span class=\"trace-marker\">\n <si-icon class=\"disclosure-icon\" [class.expanded]=\"expanded()\" [icon]=\"icons.elementRight2\" />\n </span>\n <span class=\"trace-heading\">{{ heading() | translate }}</span>\n</button>\n\n@if (expanded()) {\n <div class=\"content-motion\" animate.enter=\"content-enter\" animate.leave=\"content-leave\">\n <div class=\"overflow-hidden\">\n <div class=\"trace-content\">\n <ng-content />\n </div>\n </div>\n </div>\n}\n", styles: [":host{display:block;padding-block:var(--si-sys-sizing-spacing-y-20);color:var(--si-sys-text-secondary)}.trace-toggle{display:flex;align-items:center;gap:var(--si-sys-sizing-spacing-x-30);padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;text-align:start}.trace-marker{display:inline-flex;flex:0 0 var(--si-sys-sizing-icon-sm);align-items:center;justify-content:center;inline-size:var(--si-sys-sizing-icon-sm);block-size:var(--si-sys-sizing-icon-sm)}.disclosure-icon{font-size:var(--si-sys-sizing-icon-sm);transition:transform calc(.5s * var(--element-animations-enabled, 1))}.disclosure-icon.expanded{transform:rotate(90deg)}.trace-heading{display:flex;align-items:center;min-block-size:calc(var(--si-sys-sizing-icon-sm) + 2 * var(--si-sys-sizing-spacing-y-20))}.content-motion{display:grid;grid-template-rows:1fr}.content-motion:is(.content-enter,.content-leave){transition:grid-template-rows calc(.5s * var(--element-animations-enabled, 1))}@starting-style{.content-motion.content-enter{grid-template-rows:0fr}}.content-motion.content-leave{grid-template-rows:0fr}.trace-content{overflow:hidden;padding-block-start:var(--si-sys-sizing-spacing-y-40)}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
299
|
+
}
|
|
300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiActivityTraceComponent, decorators: [{
|
|
301
|
+
type: Component,
|
|
302
|
+
args: [{ selector: 'si-activity-trace', imports: [SiIconComponent, SiTranslatePipe], template: "<button\n type=\"button\"\n class=\"trace-toggle\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"expanded.update(value => !value)\"\n>\n <span class=\"trace-marker\">\n <si-icon class=\"disclosure-icon\" [class.expanded]=\"expanded()\" [icon]=\"icons.elementRight2\" />\n </span>\n <span class=\"trace-heading\">{{ heading() | translate }}</span>\n</button>\n\n@if (expanded()) {\n <div class=\"content-motion\" animate.enter=\"content-enter\" animate.leave=\"content-leave\">\n <div class=\"overflow-hidden\">\n <div class=\"trace-content\">\n <ng-content />\n </div>\n </div>\n </div>\n}\n", styles: [":host{display:block;padding-block:var(--si-sys-sizing-spacing-y-20);color:var(--si-sys-text-secondary)}.trace-toggle{display:flex;align-items:center;gap:var(--si-sys-sizing-spacing-x-30);padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;text-align:start}.trace-marker{display:inline-flex;flex:0 0 var(--si-sys-sizing-icon-sm);align-items:center;justify-content:center;inline-size:var(--si-sys-sizing-icon-sm);block-size:var(--si-sys-sizing-icon-sm)}.disclosure-icon{font-size:var(--si-sys-sizing-icon-sm);transition:transform calc(.5s * var(--element-animations-enabled, 1))}.disclosure-icon.expanded{transform:rotate(90deg)}.trace-heading{display:flex;align-items:center;min-block-size:calc(var(--si-sys-sizing-icon-sm) + 2 * var(--si-sys-sizing-spacing-y-20))}.content-motion{display:grid;grid-template-rows:1fr}.content-motion:is(.content-enter,.content-leave){transition:grid-template-rows calc(.5s * var(--element-animations-enabled, 1))}@starting-style{.content-motion.content-enter{grid-template-rows:0fr}}.content-motion.content-leave{grid-template-rows:0fr}.trace-content{overflow:hidden;padding-block-start:var(--si-sys-sizing-spacing-y-40)}\n"] }]
|
|
303
|
+
}], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: true }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }] } });
|
|
304
|
+
|
|
197
305
|
/**
|
|
198
306
|
* Copyright (c) Siemens 2016 - 2026
|
|
199
307
|
* SPDX-License-Identifier: MIT
|
|
@@ -456,14 +564,14 @@ class SiChatContainerComponent {
|
|
|
456
564
|
container?.nativeElement.focus();
|
|
457
565
|
}
|
|
458
566
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiChatContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
459
|
-
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 px-md-9 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-background-0)}:host.base-1{background-color:var(--si-sys-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;padding-inline:var(--si-sys-sizing-spacing-x-40);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){margin-block-end:calc(var(--si-sys-sizing-spacing-y-90)
|
|
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 px-md-9 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-background-0)}:host.base-1{background-color:var(--si-sys-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;padding-inline:var(--si-sys-sizing-spacing-x-40);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"] });
|
|
460
568
|
}
|
|
461
569
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiChatContainerComponent, decorators: [{
|
|
462
570
|
type: Component,
|
|
463
571
|
args: [{ selector: 'si-chat-container', host: {
|
|
464
572
|
class: 'd-flex si-layout-inner flex-grow-1 flex-column h-100 w-100',
|
|
465
573
|
'[class]': 'colorVariant()'
|
|
466
|
-
}, template: "<div class=\"chat-container d-flex flex-column flex-grow-1 px-6 px-md-9 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-background-0)}:host.base-1{background-color:var(--si-sys-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;padding-inline:var(--si-sys-sizing-spacing-x-40);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){margin-block-end:calc(var(--si-sys-sizing-spacing-y-90)
|
|
574
|
+
}, template: "<div class=\"chat-container d-flex flex-column flex-grow-1 px-6 px-md-9 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-background-0)}:host.base-1{background-color:var(--si-sys-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;padding-inline:var(--si-sys-sizing-spacing-x-40);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"] }]
|
|
467
575
|
}], 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 }] }] } });
|
|
468
576
|
|
|
469
577
|
/**
|
|
@@ -589,8 +697,7 @@ class SiChatInputComponent {
|
|
|
589
697
|
disclaimer = input(/* @ts-ignore */
|
|
590
698
|
...(ngDevMode ? [undefined, { debugName: "disclaimer" }] : /* istanbul ignore next */ []));
|
|
591
699
|
/**
|
|
592
|
-
* Primary actions available in the input
|
|
593
|
-
* All actions displayed inline
|
|
700
|
+
* Primary actions available in the input. Provide at most one action.
|
|
594
701
|
* @defaultValue []
|
|
595
702
|
*/
|
|
596
703
|
actions = input([], /* @ts-ignore */
|
|
@@ -734,7 +841,7 @@ class SiChatInputComponent {
|
|
|
734
841
|
...(ngDevMode ? [{ debugName: "hasActions" }] : /* istanbul ignore next */ []));
|
|
735
842
|
hasSecondaryActions = computed(() => this.secondaryActions().length > 0, /* @ts-ignore */
|
|
736
843
|
...(ngDevMode ? [{ debugName: "hasSecondaryActions" }] : /* istanbul ignore next */ []));
|
|
737
|
-
|
|
844
|
+
combinedMenuActions = computed(() => [
|
|
738
845
|
...(this.allowAttachments()
|
|
739
846
|
? [
|
|
740
847
|
{
|
|
@@ -746,17 +853,10 @@ class SiChatInputComponent {
|
|
|
746
853
|
}
|
|
747
854
|
]
|
|
748
855
|
: []),
|
|
749
|
-
...this.actions().map((a) => ({
|
|
750
|
-
type: 'action',
|
|
751
|
-
label: a.label,
|
|
752
|
-
icon: a.icon,
|
|
753
|
-
disabled: a.disabled,
|
|
754
|
-
action: (param) => a.action(param, a)
|
|
755
|
-
})),
|
|
756
856
|
...this.secondaryActions()
|
|
757
857
|
], /* @ts-ignore */
|
|
758
|
-
...(ngDevMode ? [{ debugName: "
|
|
759
|
-
hasMenuActions = computed(() => this.
|
|
858
|
+
...(ngDevMode ? [{ debugName: "combinedMenuActions" }] : /* istanbul ignore next */ []));
|
|
859
|
+
hasMenuActions = computed(() => this.hasSecondaryActions(), /* @ts-ignore */
|
|
760
860
|
...(ngDevMode ? [{ debugName: "hasMenuActions" }] : /* istanbul ignore next */ []));
|
|
761
861
|
triggerFileInput() {
|
|
762
862
|
this.fileInput()?.nativeElement.click();
|
|
@@ -917,7 +1017,7 @@ class SiChatInputComponent {
|
|
|
917
1017
|
textarea.style.height = finalHeight + 'px';
|
|
918
1018
|
}
|
|
919
1019
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiChatInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
920
|
-
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=\"btn-group\" role=\"group\">\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 @if (hasMenuActions()) {\n <button\n type=\"button\"\n class=\"btn btn-tertiary-ghost btn-icon\"\n [cdkMenuTriggerFor]=\"allActionsMenu\"\n [attr.aria-label]=\"secondaryActionsLabel() | translate\"\n [attr.title]=\"secondaryActionsLabel() | translate\"\n >\n <si-icon [icon]=\"icons.elementPlus\" />\n </button>\n\n <ng-template #allActionsMenu>\n <si-menu-factory [items]=\"allMenuActions()\" [actionParam]=\"actionParam()\" />\n </ng-template>\n }\n <ng-content />\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-border-4);background-color:var(--si-sys-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-background-4);border-color:var(--si-sys-border-1)}.input-wrapper.drag-over{border:1px solid var(--si-sys-effects-focus);box-shadow:0 0 0 1px var(--si-sys-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-text-secondary)}.chat-textarea:disabled{background-color:transparent;color:var(--si-sys-text-disabled);cursor:not-allowed}.chat-textarea:disabled::placeholder{color:var(--si-sys-text-disabled)}.input-wrapper:has(.chat-textarea:focus-visible){outline:var(--element-button-focus-width) solid var(--si-sys-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: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
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-border-4);background-color:var(--si-sys-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-background-4);border-color:var(--si-sys-border-1)}.input-wrapper.drag-over{border:1px solid var(--si-sys-effects-focus);box-shadow:0 0 0 1px var(--si-sys-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-text-secondary)}.chat-textarea:disabled{background-color:transparent;color:var(--si-sys-text-disabled);cursor:not-allowed}.chat-textarea:disabled::placeholder{color:var(--si-sys-text-disabled)}.input-wrapper:has(.chat-textarea:focus-visible){outline:var(--element-button-focus-width) solid var(--si-sys-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" }] });
|
|
921
1021
|
}
|
|
922
1022
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiChatInputComponent, decorators: [{
|
|
923
1023
|
type: Component,
|
|
@@ -928,8 +1028,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
928
1028
|
SiTranslatePipe,
|
|
929
1029
|
SiAttachmentListComponent,
|
|
930
1030
|
SiMenuFactoryComponent,
|
|
931
|
-
SiFileUploadDirective
|
|
932
|
-
|
|
1031
|
+
SiFileUploadDirective,
|
|
1032
|
+
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-border-4);background-color:var(--si-sys-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-background-4);border-color:var(--si-sys-border-1)}.input-wrapper.drag-over{border:1px solid var(--si-sys-effects-focus);box-shadow:0 0 0 1px var(--si-sys-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-text-secondary)}.chat-textarea:disabled{background-color:transparent;color:var(--si-sys-text-disabled);cursor:not-allowed}.chat-textarea:disabled::placeholder{color:var(--si-sys-text-disabled)}.input-wrapper:has(.chat-textarea:focus-visible){outline:var(--element-button-focus-width) solid var(--si-sys-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}.disclaimer-wrapper:empty{display:none}\n"] }]
|
|
933
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"] }] } });
|
|
934
1035
|
|
|
935
1036
|
/**
|
|
@@ -1063,7 +1164,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
1063
1164
|
* - Clickable prompt suggestion cards
|
|
1064
1165
|
* - Optional refresh button to regenerate suggestions
|
|
1065
1166
|
*
|
|
1066
|
-
* @see {@link SiAiChatContainerComponent} for the AI chat container which uses this component
|
|
1067
1167
|
* @see {@link SiChatContainerComponent} for the base chat container
|
|
1068
1168
|
*
|
|
1069
1169
|
* @experimental
|
|
@@ -1116,5 +1216,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
1116
1216
|
* Generated bundle index. Do not edit.
|
|
1117
1217
|
*/
|
|
1118
1218
|
|
|
1119
|
-
export { SiAiMessageComponent, SiAiWelcomeScreenComponent, SiAttachmentListComponent, SiChatContainerComponent, SiChatContainerInputDirective, SiChatInputComponent, SiChatInputDisclaimerDirective, SiChatMessageActionDirective, SiChatMessageComponent, SiUserMessageComponent };
|
|
1219
|
+
export { SiActivityMessageComponent, SiActivityMessagePartComponent, SiActivityTraceComponent, SiAiMessageComponent, SiAiWelcomeScreenComponent, SiAttachmentListComponent, SiChatContainerComponent, SiChatContainerInputDirective, SiChatInputComponent, SiChatInputDisclaimerDirective, SiChatMessageActionDirective, SiChatMessageComponent, SiUserMessageComponent };
|
|
1120
1220
|
//# sourceMappingURL=siemens-element-ng-chat-messages.mjs.map
|