@ids-group-ltd/ids-design-system 1.1.0 → 1.1.2
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/CHANGELOG.md +289 -0
- package/agent/INDEX.md +1 -1
- package/agent/feedback/ds-alert.md +3 -2
- package/agent/feedback/ds-chat-message.md +3 -3
- package/agent/feedback/ds-chat-step.md +1 -1
- package/agent/feedback/ds-chat-steps.md +1 -1
- package/agent/feedback/ds-chat-thread.md +2 -2
- package/agent/feedback/ds-empty-state.md +2 -1
- package/agent/feedback/ds-tree.md +4 -2
- package/agent/forms/ds-chat-input.md +3 -3
- package/agent/foundations/tokens.md +2 -2
- package/agent/navigation/ds-splitter.md +1 -1
- package/components.md +22 -18
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +5 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs +184 -72
- package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +14 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +23 -12
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-splitter.mjs +116 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-splitter.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +4 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +4 -19
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +84 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +31 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +33 -0
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +4 -2
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.11.2.json +1 -0
- package/migrations/1.0.1.json +4 -0
- package/migrations/1.0.2.json +9 -1
- package/migrations/1.1.0.json +25 -0
- package/migrations/1.1.1.json +190 -0
- package/migrations/1.1.2.json +135 -0
- package/migrations/README.md +9 -7
- package/package.json +4 -1
- package/schematics/check-overrides/surface.json +29 -3
- package/stylelint/index.mjs +17 -3
- package/stylelint/known-tokens.mjs +139 -0
- package/stylelint/report.mjs +185 -0
- package/stylelint/tokens.mjs +160 -0
- package/stylelint/use-tokens.mjs +397 -0
- package/styles/_check-box.scss +2 -2
- package/styles/_dropdown-overlay.scss +5 -2
- package/styles/_field-box.scss +2 -2
- package/styles/_tokens.scss +8 -0
- package/themes/README.md +1 -1
- package/themes/_semantic.scss +13 -0
- package/themes/dark/_theme.scss +15 -3
- package/types/ids-group-ltd-ids-design-system-components-alert.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-chat.d.ts +58 -5
- package/types/ids-group-ltd-ids-design-system-components-empty-state.d.ts +7 -2
- package/types/ids-group-ltd-ids-design-system-components-splitter.d.ts +15 -1
- package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-tree.d.ts +57 -3
- package/types/ids-group-ltd-ids-design-system-components.d.ts +8 -4
- package/types/ids-group-ltd-ids-design-system-core.d.ts +40 -0
- package/types/ids-group-ltd-ids-design-system.d.ts +3 -3
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, input, model, inject, computed, ViewEncapsulation, Component, contentChildren, forwardRef, booleanAttribute, output, contentChild, ElementRef,
|
|
2
|
+
import { InjectionToken, input, model, inject, signal, effect, untracked, DestroyRef, computed, ViewEncapsulation, Component, contentChildren, forwardRef, booleanAttribute, output, contentChild, ElementRef, afterNextRender, Injector, viewChild } from '@angular/core';
|
|
3
3
|
import { DS_INTL, DS_INTL_DEFAULTS, injectDsLocale } from '@ids-group-ltd/ids-design-system/core';
|
|
4
4
|
import { ButtonComponent } from '@ids-group-ltd/ids-design-system/components/button';
|
|
5
5
|
import { IconComponent } from '@ids-group-ltd/ids-design-system/icons';
|
|
6
6
|
import { SpinnerComponent } from '@ids-group-ltd/ids-design-system/components/spinner';
|
|
7
|
+
import { IconButtonComponent } from '@ids-group-ltd/ids-design-system/components/icon-button';
|
|
7
8
|
import { TextareaComponent } from '@ids-group-ltd/ids-design-system/components/textarea';
|
|
9
|
+
import { TooltipDirective } from '@ids-group-ltd/ids-design-system/components/tooltip';
|
|
8
10
|
import { FieldClickFocusDirective } from '@ids-group-ltd/ids-design-system/components';
|
|
9
11
|
|
|
10
12
|
const CHAT_THREAD = new InjectionToken('CHAT_THREAD');
|
|
@@ -40,10 +42,44 @@ class ChatStepComponent {
|
|
|
40
42
|
intl = inject(DS_INTL);
|
|
41
43
|
steps = inject(CHAT_STEPS, { optional: true });
|
|
42
44
|
detailsId = `ds-chat-step-${++nextId$1}-details`;
|
|
45
|
+
/** The status on screen: `status`, held back while `ds-chat-steps` paces an instant finish. */
|
|
46
|
+
shownStatus = signal(null, ...(ngDevMode ? [{ debugName: "shownStatus" }] : /* istanbul ignore next */ []));
|
|
47
|
+
runningSince = 0;
|
|
48
|
+
settleTimer;
|
|
49
|
+
constructor() {
|
|
50
|
+
let first = true;
|
|
51
|
+
effect(() => {
|
|
52
|
+
const next = this.status();
|
|
53
|
+
untracked(() => this.show(next, first));
|
|
54
|
+
first = false;
|
|
55
|
+
});
|
|
56
|
+
inject(DestroyRef).onDestroy(() => clearTimeout(this.settleTimer));
|
|
57
|
+
}
|
|
58
|
+
show(next, first) {
|
|
59
|
+
clearTimeout(this.settleTimer);
|
|
60
|
+
const settles = next === 'done' || next === 'error';
|
|
61
|
+
if (first || !settles || !this.steps) {
|
|
62
|
+
if (next === 'running') {
|
|
63
|
+
this.runningSince = performance.now();
|
|
64
|
+
}
|
|
65
|
+
this.shownStatus.set(next);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (this.shownStatus() !== 'running') {
|
|
69
|
+
this.runningSince = performance.now();
|
|
70
|
+
}
|
|
71
|
+
const delay = this.steps.settleDelay(this.runningSince);
|
|
72
|
+
if (delay <= 0) {
|
|
73
|
+
this.shownStatus.set(next);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
this.shownStatus.set('running');
|
|
77
|
+
this.settleTimer = setTimeout(() => this.shownStatus.set(next), delay);
|
|
78
|
+
}
|
|
43
79
|
isFirst = computed(() => this.steps?.firstStep() === this, ...(ngDevMode ? [{ debugName: "isFirst" }] : /* istanbul ignore next */ []));
|
|
44
80
|
isLast = computed(() => this.steps?.lastStep() === this, ...(ngDevMode ? [{ debugName: "isLast" }] : /* istanbul ignore next */ []));
|
|
45
81
|
nodeIcon = computed(() => {
|
|
46
|
-
const status = this.
|
|
82
|
+
const status = this.shownStatus();
|
|
47
83
|
return status ? (STATUS_ICONS[status] ?? null) : null;
|
|
48
84
|
}, ...(ngDevMode ? [{ debugName: "nodeIcon" }] : /* istanbul ignore next */ []));
|
|
49
85
|
wording = computed(() => ({
|
|
@@ -51,7 +87,7 @@ class ChatStepComponent {
|
|
|
51
87
|
...this.intl().chat,
|
|
52
88
|
}), ...(ngDevMode ? [{ debugName: "wording" }] : /* istanbul ignore next */ []));
|
|
53
89
|
statusLabel = computed(() => {
|
|
54
|
-
const status = this.
|
|
90
|
+
const status = this.shownStatus();
|
|
55
91
|
return status ? this.wording()[STATUS_WORDING[status]] : '';
|
|
56
92
|
}, ...(ngDevMode ? [{ debugName: "statusLabel" }] : /* istanbul ignore next */ []));
|
|
57
93
|
detailsLabel = computed(() => this.wording().stepDetails(this.heading()), ...(ngDevMode ? [{ debugName: "detailsLabel" }] : /* istanbul ignore next */ []));
|
|
@@ -59,19 +95,19 @@ class ChatStepComponent {
|
|
|
59
95
|
this.expanded.set(!this.expanded());
|
|
60
96
|
}
|
|
61
97
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChatStepComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
62
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ChatStepComponent, isStandalone: true, selector: "ds-chat-step", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, time: { classPropertyName: "time", publicName: "time", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, host: { attributes: { "role": "listitem" }, properties: { "attr.data-status": "
|
|
98
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ChatStepComponent, isStandalone: true, selector: "ds-chat-step", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, time: { classPropertyName: "time", publicName: "time", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, host: { attributes: { "role": "listitem" }, properties: { "attr.data-status": "shownStatus()", "class.is-first": "isFirst()", "class.is-last": "isLast()", "class.is-expanded": "expanded()", "class.outside-steps": "!steps" } }, ngImport: i0, template: "<div\n class=\"node-col\"\n aria-hidden=\"true\">\n <span class=\"spine lead\"></span>\n\n <span class=\"node\">\n @if (shownStatus() === 'running') {\n <ds-spinner size=\"sm\" />\n } @else if (nodeIcon(); as name) {\n <ds-icon\n [name]=\"name\"\n [size]=\"10\"\n [stroke]=\"2.4\" />\n }\n </span>\n\n <span class=\"spine\"></span>\n</div>\n\n<div class=\"text\">\n <div class=\"head\">\n @if (statusLabel()) {\n <span class=\"visually-hidden\">\n {{ statusLabel() }}:\n </span>\n }\n\n @if (heading()) {\n <span class=\"heading\">\n {{ heading() }}\n </span>\n }\n\n <span class=\"trailing\">\n <ng-content select=\"[trailing]\"></ng-content>\n\n <button\n type=\"button\"\n class=\"toggle\"\n [attr.aria-label]=\"detailsLabel()\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"detailsId\"\n (click)=\"toggle()\">\n <ds-icon\n class=\"chev\"\n name=\"chevronDown\"\n [size]=\"16\" />\n </button>\n </span>\n </div>\n\n <ng-content></ng-content>\n\n @if (time()) {\n <span class=\"time\">\n {{ time() }}\n </span>\n }\n</div>\n\n<span\n class=\"spine tail\"\n aria-hidden=\"true\">\n</span>\n\n<div class=\"rest\">\n <div\n class=\"details\"\n [id]=\"detailsId\"\n [attr.inert]=\"expanded() ? null : ''\">\n <div class=\"details-content\">\n <div class=\"details-body\">\n <ng-content select=\"[details]\"></ng-content>\n </div>\n </div>\n </div>\n</div>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_step-node-size: var(--chat-step-node-size);--_step-spine-width: var(--timeline-spine-w);--_step-gap: var(--chat-step-gap);--_step-node-bg-color: var(--surface-secondary);--_step-node-color: var(--text-tertiary);--_step-node-border-color: var(--text-tertiary);--_step-spine-color: var(--border-divider);--_step-toggle-icon-color: var(--icon-default);--_step-toggle-icon-color-hover: var(--icon-strong);--_step-open-bg-color: var(--surface-secondary);display:grid;grid-template-columns:var(--_step-node-size) 1fr;column-gap:var(--space-2)}.node-col{grid-area:1/1;display:flex;flex-direction:column;align-items:center}.node{display:inline-flex;align-items:center;justify-content:center;flex:none;width:var(--_step-node-size);height:var(--_step-node-size);border-radius:var(--radius-pill);background-color:var(--_step-node-bg-color);color:var(--_step-node-color);border:var(--border-width-default) solid var(--_step-node-border-color)}.spine{visibility:hidden;flex:1;width:var(--_step-spine-width);margin-top:var(--space-1);background-color:var(--_step-spine-color)}.lead{margin-top:0;margin-bottom:var(--space-1)}.tail{grid-area:2/1;justify-self:center;margin-top:0}.text{grid-area:1/2;display:flex;flex-direction:column;align-self:center;gap:var(--space-0-5);min-width:0}.rest{grid-area:2/2;padding-bottom:var(--_step-gap);min-width:0}:host(.is-last) .spine:not(.lead),:host(.outside-steps:last-child) .spine:not(.lead){visibility:hidden}:host(.is-last) .rest,:host(.outside-steps:last-child) .rest{padding-bottom:0}:host(.is-first) .lead,:host(.outside-steps:first-child) .lead{visibility:hidden}.head{position:relative;display:flex;align-items:flex-start;gap:var(--space-2);min-width:0}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.trailing{display:inline-flex;align-items:center;gap:var(--space-2);margin-left:auto;flex:none;height:calc(var(--font-size-xs) * var(--line-height-base))}.head:has(.trailing>:not(.toggle)){align-items:center;margin-bottom:var(--space-1-5);padding-top:var(--space-2)}.head:has(.trailing>:not(.toggle)) .trailing{height:auto}.toggle{display:inline-flex;align-items:center;justify-content:center;padding:var(--space-0-5);border:0;background:none;cursor:pointer}.toggle:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.toggle{position:relative}.toggle:before{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--hit-xs));height:max(100%,var(--hit-xs));translate:-50% -50%;border-radius:inherit}.toggle:focus-visible{outline-style:none}.toggle:focus-visible:before{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:calc(var(--focus-ring-offset) - 2 * var(--focus-ring-width));animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.toggle{color:var(--_step-toggle-icon-color)}.toggle:hover{color:var(--_step-toggle-icon-color-hover)}.toggle .chev{transition:transform var(--duration-base) var(--ease-standard)}.toggle[aria-expanded=true] .chev{transform:rotate(180deg)}:host:not(:has(.details-body>*)) .toggle{display:none}:host(.is-expanded){isolation:isolate}:host(.is-expanded):before{content:\"\";grid-area:1/1/3/3;z-index:-1;margin:0 calc(-1 * var(--space-2)) var(--_step-gap);border-radius:var(--ds-radius-control);background-color:var(--_step-open-bg-color)}:host(.is-expanded.is-last):before,:host(.is-expanded.outside-steps:last-child):before{margin-bottom:0}.details{display:grid;grid-template-rows:0fr;min-width:0;visibility:hidden;transition:grid-template-rows var(--duration-slow) var(--ease-decelerate),visibility var(--duration-slow) allow-discrete}.details:not(:has(.details-body>*)){display:none}:host(.is-expanded) .details{grid-template-rows:1fr;visibility:visible}.details-content{min-height:0;overflow:hidden}.details-body{padding-top:var(--space-1)}.heading{color:var(--text-primary);font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans)}.time{color:var(--text-tertiary);font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans)}:host([data-status=done]){--_step-node-bg-color: var(--success);--_step-node-color: var(--text-on-success);--_step-node-border-color: var(--success)}:host([data-status=running]){--_step-node-bg-color: var(--surface-default);--_step-node-color: var(--accent);--_step-node-border-color: var(--accent)}:host([data-status=pending]){--_step-node-bg-color: var(--surface-default);--_step-node-color: var(--text-tertiary);--_step-node-border-color: var(--text-tertiary)}:host([data-status=error]){--_step-node-bg-color: var(--error);--_step-node-color: var(--text-on-error);--_step-node-border-color: var(--error)}:host([data-status=pending]) .node{border-style:dashed}:host([data-status=pending]) .heading{color:var(--text-tertiary);font-weight:var(--font-weight-regular)}:host([data-status=waiting]){--_step-node-bg-color: var(--text-secondary);--_step-node-color: var(--surface-default);--_step-node-border-color: var(--text-secondary)}:host{--_step-heading-centre: calc(var(--font-size-xs) * var(--line-height-base) / 2)}:host .text{align-self:start;padding-top:max(0px,var(--_step-node-size) / 2 + var(--space-1) - var(--_step-heading-centre))}:host .lead{flex:none;height:max(0px,var(--_step-heading-centre) - var(--_step-node-size) / 2 - var(--space-1))}:host:has(>.text>.head>.trailing>:not(.toggle)){--_step-heading-centre: calc( var(--space-2) + max(var(--font-size-xs) * var(--line-height-base), var(--field-h-sm)) / 2 )}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "component", type: SpinnerComponent, selector: "ds-spinner", inputs: ["size"] }] });
|
|
63
99
|
}
|
|
64
100
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChatStepComponent, decorators: [{
|
|
65
101
|
type: Component,
|
|
66
102
|
args: [{ selector: 'ds-chat-step', standalone: true, imports: [IconComponent, SpinnerComponent], encapsulation: ViewEncapsulation.Emulated, host: {
|
|
67
103
|
role: 'listitem',
|
|
68
|
-
'[attr.data-status]': '
|
|
104
|
+
'[attr.data-status]': 'shownStatus()',
|
|
69
105
|
'[class.is-first]': 'isFirst()',
|
|
70
106
|
'[class.is-last]': 'isLast()',
|
|
71
107
|
'[class.is-expanded]': 'expanded()',
|
|
72
108
|
'[class.outside-steps]': '!steps',
|
|
73
|
-
}, template: "<div\n class=\"node-col\"\n aria-hidden=\"true\">\n <span class=\"spine lead\"></span>\n\n <span class=\"node\">\n @if (
|
|
74
|
-
}], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], time: [{ type: i0.Input, args: [{ isSignal: true, alias: "time", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }] } });
|
|
109
|
+
}, template: "<div\n class=\"node-col\"\n aria-hidden=\"true\">\n <span class=\"spine lead\"></span>\n\n <span class=\"node\">\n @if (shownStatus() === 'running') {\n <ds-spinner size=\"sm\" />\n } @else if (nodeIcon(); as name) {\n <ds-icon\n [name]=\"name\"\n [size]=\"10\"\n [stroke]=\"2.4\" />\n }\n </span>\n\n <span class=\"spine\"></span>\n</div>\n\n<div class=\"text\">\n <div class=\"head\">\n @if (statusLabel()) {\n <span class=\"visually-hidden\">\n {{ statusLabel() }}:\n </span>\n }\n\n @if (heading()) {\n <span class=\"heading\">\n {{ heading() }}\n </span>\n }\n\n <span class=\"trailing\">\n <ng-content select=\"[trailing]\"></ng-content>\n\n <button\n type=\"button\"\n class=\"toggle\"\n [attr.aria-label]=\"detailsLabel()\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"detailsId\"\n (click)=\"toggle()\">\n <ds-icon\n class=\"chev\"\n name=\"chevronDown\"\n [size]=\"16\" />\n </button>\n </span>\n </div>\n\n <ng-content></ng-content>\n\n @if (time()) {\n <span class=\"time\">\n {{ time() }}\n </span>\n }\n</div>\n\n<span\n class=\"spine tail\"\n aria-hidden=\"true\">\n</span>\n\n<div class=\"rest\">\n <div\n class=\"details\"\n [id]=\"detailsId\"\n [attr.inert]=\"expanded() ? null : ''\">\n <div class=\"details-content\">\n <div class=\"details-body\">\n <ng-content select=\"[details]\"></ng-content>\n </div>\n </div>\n </div>\n</div>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_step-node-size: var(--chat-step-node-size);--_step-spine-width: var(--timeline-spine-w);--_step-gap: var(--chat-step-gap);--_step-node-bg-color: var(--surface-secondary);--_step-node-color: var(--text-tertiary);--_step-node-border-color: var(--text-tertiary);--_step-spine-color: var(--border-divider);--_step-toggle-icon-color: var(--icon-default);--_step-toggle-icon-color-hover: var(--icon-strong);--_step-open-bg-color: var(--surface-secondary);display:grid;grid-template-columns:var(--_step-node-size) 1fr;column-gap:var(--space-2)}.node-col{grid-area:1/1;display:flex;flex-direction:column;align-items:center}.node{display:inline-flex;align-items:center;justify-content:center;flex:none;width:var(--_step-node-size);height:var(--_step-node-size);border-radius:var(--radius-pill);background-color:var(--_step-node-bg-color);color:var(--_step-node-color);border:var(--border-width-default) solid var(--_step-node-border-color)}.spine{visibility:hidden;flex:1;width:var(--_step-spine-width);margin-top:var(--space-1);background-color:var(--_step-spine-color)}.lead{margin-top:0;margin-bottom:var(--space-1)}.tail{grid-area:2/1;justify-self:center;margin-top:0}.text{grid-area:1/2;display:flex;flex-direction:column;align-self:center;gap:var(--space-0-5);min-width:0}.rest{grid-area:2/2;padding-bottom:var(--_step-gap);min-width:0}:host(.is-last) .spine:not(.lead),:host(.outside-steps:last-child) .spine:not(.lead){visibility:hidden}:host(.is-last) .rest,:host(.outside-steps:last-child) .rest{padding-bottom:0}:host(.is-first) .lead,:host(.outside-steps:first-child) .lead{visibility:hidden}.head{position:relative;display:flex;align-items:flex-start;gap:var(--space-2);min-width:0}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.trailing{display:inline-flex;align-items:center;gap:var(--space-2);margin-left:auto;flex:none;height:calc(var(--font-size-xs) * var(--line-height-base))}.head:has(.trailing>:not(.toggle)){align-items:center;margin-bottom:var(--space-1-5);padding-top:var(--space-2)}.head:has(.trailing>:not(.toggle)) .trailing{height:auto}.toggle{display:inline-flex;align-items:center;justify-content:center;padding:var(--space-0-5);border:0;background:none;cursor:pointer}.toggle:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.toggle{position:relative}.toggle:before{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--hit-xs));height:max(100%,var(--hit-xs));translate:-50% -50%;border-radius:inherit}.toggle:focus-visible{outline-style:none}.toggle:focus-visible:before{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:calc(var(--focus-ring-offset) - 2 * var(--focus-ring-width));animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.toggle{color:var(--_step-toggle-icon-color)}.toggle:hover{color:var(--_step-toggle-icon-color-hover)}.toggle .chev{transition:transform var(--duration-base) var(--ease-standard)}.toggle[aria-expanded=true] .chev{transform:rotate(180deg)}:host:not(:has(.details-body>*)) .toggle{display:none}:host(.is-expanded){isolation:isolate}:host(.is-expanded):before{content:\"\";grid-area:1/1/3/3;z-index:-1;margin:0 calc(-1 * var(--space-2)) var(--_step-gap);border-radius:var(--ds-radius-control);background-color:var(--_step-open-bg-color)}:host(.is-expanded.is-last):before,:host(.is-expanded.outside-steps:last-child):before{margin-bottom:0}.details{display:grid;grid-template-rows:0fr;min-width:0;visibility:hidden;transition:grid-template-rows var(--duration-slow) var(--ease-decelerate),visibility var(--duration-slow) allow-discrete}.details:not(:has(.details-body>*)){display:none}:host(.is-expanded) .details{grid-template-rows:1fr;visibility:visible}.details-content{min-height:0;overflow:hidden}.details-body{padding-top:var(--space-1)}.heading{color:var(--text-primary);font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans)}.time{color:var(--text-tertiary);font:var(--font-weight-regular) var(--font-size-xs)/var(--line-height-base) var(--font-sans)}:host([data-status=done]){--_step-node-bg-color: var(--success);--_step-node-color: var(--text-on-success);--_step-node-border-color: var(--success)}:host([data-status=running]){--_step-node-bg-color: var(--surface-default);--_step-node-color: var(--accent);--_step-node-border-color: var(--accent)}:host([data-status=pending]){--_step-node-bg-color: var(--surface-default);--_step-node-color: var(--text-tertiary);--_step-node-border-color: var(--text-tertiary)}:host([data-status=error]){--_step-node-bg-color: var(--error);--_step-node-color: var(--text-on-error);--_step-node-border-color: var(--error)}:host([data-status=pending]) .node{border-style:dashed}:host([data-status=pending]) .heading{color:var(--text-tertiary);font-weight:var(--font-weight-regular)}:host([data-status=waiting]){--_step-node-bg-color: var(--text-secondary);--_step-node-color: var(--surface-default);--_step-node-border-color: var(--text-secondary)}:host{--_step-heading-centre: calc(var(--font-size-xs) * var(--line-height-base) / 2)}:host .text{align-self:start;padding-top:max(0px,var(--_step-node-size) / 2 + var(--space-1) - var(--_step-heading-centre))}:host .lead{flex:none;height:max(0px,var(--_step-heading-centre) - var(--_step-node-size) / 2 - var(--space-1))}:host:has(>.text>.head>.trailing>:not(.toggle)){--_step-heading-centre: calc( var(--space-2) + max(var(--font-size-xs) * var(--line-height-base), var(--field-h-sm)) / 2 )}\n"] }]
|
|
110
|
+
}], ctorParameters: () => [], propDecorators: { heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], time: [{ type: i0.Input, args: [{ isSignal: true, alias: "time", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }] } });
|
|
75
111
|
|
|
76
112
|
/**
|
|
77
113
|
* The steps of an agent's work, in the `[steps]` slot of a `ds-chat-message`: `ds-chat-step`s in
|
|
@@ -87,8 +123,26 @@ class ChatStepsComponent {
|
|
|
87
123
|
firstStep = computed(() => this.items().at(0), ...(ngDevMode ? [{ debugName: "firstStep" }] : /* istanbul ignore next */ []));
|
|
88
124
|
/** The step that draws no gap below it. */
|
|
89
125
|
lastStep = computed(() => this.items().at(-1), ...(ngDevMode ? [{ debugName: "lastStep" }] : /* istanbul ignore next */ []));
|
|
126
|
+
/** Shortest time a step shows as running before its final status, even when it finishes at once;
|
|
127
|
+
* `0` shows the final status at once. */
|
|
128
|
+
minRunningMs = input(600, ...(ngDevMode ? [{ debugName: "minRunningMs" }] : /* istanbul ignore next */ []));
|
|
129
|
+
/** Shortest gap between two steps showing their final status, so steps that finish together
|
|
130
|
+
* settle one after another; `0` lets them settle together. */
|
|
131
|
+
revealStaggerMs = input(300, ...(ngDevMode ? [{ debugName: "revealStaggerMs" }] : /* istanbul ignore next */ []));
|
|
132
|
+
lastSettle = 0;
|
|
133
|
+
/** @internal */
|
|
134
|
+
settleDelay(runningSince) {
|
|
135
|
+
if (typeof matchMedia === 'function' &&
|
|
136
|
+
matchMedia('(prefers-reduced-motion: reduce)').matches) {
|
|
137
|
+
return 0;
|
|
138
|
+
}
|
|
139
|
+
const now = performance.now();
|
|
140
|
+
const at = Math.max(now, runningSince + this.minRunningMs(), this.lastSettle + this.revealStaggerMs());
|
|
141
|
+
this.lastSettle = at;
|
|
142
|
+
return at - now;
|
|
143
|
+
}
|
|
90
144
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChatStepsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
91
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.22", type: ChatStepsComponent, isStandalone: true, selector: "ds-chat-steps", inputs: { enter: { classPropertyName: "enter", publicName: "enter", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "list", "data-density": "compact" } }, providers: [
|
|
145
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.22", type: ChatStepsComponent, isStandalone: true, selector: "ds-chat-steps", inputs: { enter: { classPropertyName: "enter", publicName: "enter", isSignal: true, isRequired: false, transformFunction: null }, minRunningMs: { classPropertyName: "minRunningMs", publicName: "minRunningMs", isSignal: true, isRequired: false, transformFunction: null }, revealStaggerMs: { classPropertyName: "revealStaggerMs", publicName: "revealStaggerMs", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "list", "data-density": "compact" } }, providers: [
|
|
92
146
|
{
|
|
93
147
|
provide: CHAT_STEPS,
|
|
94
148
|
useExisting: forwardRef(() => ChatStepsComponent),
|
|
@@ -109,8 +163,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
109
163
|
], styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:flex;flex-direction:column}\n"] }]
|
|
110
164
|
}], propDecorators: { enter: [{ type: i0.Input, args: [{ isSignal: true, alias: "enter", required: false }] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ChatStepComponent), { ...{
|
|
111
165
|
descendants: true,
|
|
112
|
-
}, isSignal: true }] }] } });
|
|
166
|
+
}, isSignal: true }] }], minRunningMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "minRunningMs", required: false }] }], revealStaggerMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "revealStaggerMs", required: false }] }] } });
|
|
113
167
|
|
|
168
|
+
const TONE_ICONS = {
|
|
169
|
+
neutral: null,
|
|
170
|
+
info: 'info',
|
|
171
|
+
success: 'success',
|
|
172
|
+
warning: 'warn',
|
|
173
|
+
error: 'error',
|
|
174
|
+
};
|
|
114
175
|
/**
|
|
115
176
|
* One message of a conversation: a bubble on the right for the user, on the left for the
|
|
116
177
|
* assistant. Slots: default (the text or rendered markdown), `[steps]` (a `ds-chat-steps` of the
|
|
@@ -120,6 +181,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
120
181
|
class ChatMessageComponent {
|
|
121
182
|
/** Who wrote it: `'user'` draws a filled bubble on the right, `'assistant'` a subtle one on the left. */
|
|
122
183
|
role = input('assistant', ...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
|
|
184
|
+
/** What a `'system'` notice means. `'neutral'` is a quiet one-line plaque for a routine note
|
|
185
|
+
* (saved, switched, started); `'info'`, `'success'`, `'warning'` and `'error'` draw a card in that
|
|
186
|
+
* status colour with its icon, for a note the reader should not miss. Other roles ignore it. */
|
|
187
|
+
tone = input('neutral', ...(ngDevMode ? [{ debugName: "tone" }] : /* istanbul ignore next */ []));
|
|
188
|
+
/** A bold first line of a `'system'` notice, for one that carries a detail under it. */
|
|
189
|
+
title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
190
|
+
/** Icon at the start of a `'system'` notice. A toned notice shows its tone's icon without it; a
|
|
191
|
+
* `'neutral'` one shows none. */
|
|
192
|
+
icon = input(null, ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
123
193
|
/** Name shown above the bubble. Without it the role is spoken (`DS_INTL.chat.user` / `assistant`). */
|
|
124
194
|
author = input('', ...(ngDevMode ? [{ debugName: "author" }] : /* istanbul ignore next */ []));
|
|
125
195
|
/** Time label, already formatted, shown under the bubble. In a `ds-chat-thread` only the last message
|
|
@@ -172,6 +242,7 @@ class ChatMessageComponent {
|
|
|
172
242
|
...DS_INTL_DEFAULTS.chat,
|
|
173
243
|
...this.intl().chat,
|
|
174
244
|
}), ...(ngDevMode ? [{ debugName: "wording" }] : /* istanbul ignore next */ []));
|
|
245
|
+
noticeIcon = computed(() => this.icon() ?? TONE_ICONS[this.tone()], ...(ngDevMode ? [{ debugName: "noticeIcon" }] : /* istanbul ignore next */ []));
|
|
175
246
|
speaker = computed(() => this.author() || this.wording()[this.role()], ...(ngDevMode ? [{ debugName: "speaker" }] : /* istanbul ignore next */ []));
|
|
176
247
|
host = inject(ElementRef);
|
|
177
248
|
constructor() {
|
|
@@ -270,9 +341,10 @@ class ChatMessageComponent {
|
|
|
270
341
|
});
|
|
271
342
|
});
|
|
272
343
|
}
|
|
273
|
-
// Folding, the
|
|
274
|
-
// the
|
|
275
|
-
// layout
|
|
344
|
+
// Folding, the chip at the top of the bubble rises into the steps: their height closes from the bottom, so
|
|
345
|
+
// the rows nearest the chip slide under it first, unsquashed, and the last ones fade as it reaches the
|
|
346
|
+
// top. The bubble rides up with the layout, and a new chip opens in the first third so it leads the move.
|
|
347
|
+
// Opening plays it back, the rows sliding out from under the chip. One duration and one easing throughout.
|
|
276
348
|
applyFold(folded, animate) {
|
|
277
349
|
const host = this.host.nativeElement;
|
|
278
350
|
if (host.classList.contains('steps-folded') === folded) {
|
|
@@ -287,73 +359,52 @@ class ChatMessageComponent {
|
|
|
287
359
|
return;
|
|
288
360
|
}
|
|
289
361
|
const timing = {
|
|
290
|
-
duration:
|
|
291
|
-
easing: 'cubic-bezier(0.
|
|
362
|
+
duration: 360,
|
|
363
|
+
easing: 'cubic-bezier(0.2, 0, 0, 1)',
|
|
292
364
|
};
|
|
293
365
|
if (chip && chipNew) {
|
|
294
|
-
const chipHeight = chip.getBoundingClientRect().height
|
|
366
|
+
const chipHeight = `${chip.getBoundingClientRect().height}px`;
|
|
295
367
|
chip.animate([
|
|
296
|
-
{
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
overflow: 'hidden',
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
height: `${chipHeight}px`,
|
|
304
|
-
opacity: 1,
|
|
305
|
-
transform: 'none',
|
|
306
|
-
overflow: 'hidden',
|
|
307
|
-
},
|
|
308
|
-
], { ...timing, easing: 'cubic-bezier(0.2, 0, 0, 1)' });
|
|
309
|
-
}
|
|
310
|
-
if (folded) {
|
|
311
|
-
const height = steps.getBoundingClientRect().height;
|
|
312
|
-
steps.style.transformOrigin = 'bottom left';
|
|
313
|
-
steps.animate([
|
|
314
|
-
{
|
|
315
|
-
height: `${height}px`,
|
|
316
|
-
opacity: 1,
|
|
317
|
-
transform: 'none',
|
|
318
|
-
overflow: 'hidden',
|
|
319
|
-
},
|
|
320
|
-
{
|
|
321
|
-
height: '0px',
|
|
322
|
-
opacity: 0,
|
|
323
|
-
transform: 'scale(0.6)',
|
|
324
|
-
overflow: 'hidden',
|
|
325
|
-
},
|
|
326
|
-
], { duration: 380, easing: 'cubic-bezier(0.2, 0, 0, 1)' }).onfinish = () => host.classList.toggle('steps-folded', this.folded());
|
|
368
|
+
{ height: '0px', opacity: 0, overflow: 'hidden' },
|
|
369
|
+
{ height: chipHeight, opacity: 1, overflow: 'hidden', offset: 0.3 },
|
|
370
|
+
{ height: chipHeight, opacity: 1, overflow: 'hidden' },
|
|
371
|
+
], timing);
|
|
327
372
|
}
|
|
328
|
-
|
|
373
|
+
if (!folded) {
|
|
329
374
|
host.classList.remove('steps-folded');
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
375
|
+
}
|
|
376
|
+
const height = steps.getBoundingClientRect().height;
|
|
377
|
+
const margin = getComputedStyle(steps).marginBottom;
|
|
378
|
+
const open = {
|
|
379
|
+
height: `${height}px`,
|
|
380
|
+
marginBottom: margin,
|
|
381
|
+
opacity: 1,
|
|
382
|
+
overflow: 'hidden',
|
|
383
|
+
};
|
|
384
|
+
const shut = {
|
|
385
|
+
height: '0px',
|
|
386
|
+
marginBottom: '0px',
|
|
387
|
+
opacity: 0,
|
|
388
|
+
overflow: 'hidden',
|
|
389
|
+
};
|
|
390
|
+
const run = steps.animate(folded
|
|
391
|
+
? [open, { opacity: 1, offset: 0.7 }, shut]
|
|
392
|
+
: [shut, { opacity: 1, offset: 0.3 }, open], timing);
|
|
393
|
+
if (folded) {
|
|
394
|
+
run.onfinish = () => host.classList.toggle('steps-folded', this.folded());
|
|
346
395
|
}
|
|
347
396
|
}
|
|
348
397
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChatMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
349
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ChatMessageComponent, isStandalone: true, selector: "ds-chat-message", inputs: { role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, author: { classPropertyName: "author", publicName: "author", isSignal: true, isRequired: false, transformFunction: null }, time: { classPropertyName: "time", publicName: "time", isSignal: true, isRequired: false, transformFunction: null }, sentAt: { classPropertyName: "sentAt", publicName: "sentAt", isSignal: true, isRequired: false, transformFunction: null }, streaming: { classPropertyName: "streaming", publicName: "streaming", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, stepsFolded: { classPropertyName: "stepsFolded", publicName: "stepsFolded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { stepsFolded: "stepsFoldedChange", retry: "retry" }, host: { properties: { "attr.role": "null", "attr.data-role": "role()", "class.in-thread": "!!thread", "class.is-first": "isFirst()", "class.is-grouped": "isGrouped()", "class.is-continued": "isContinued()", "class.has-divider": "!!timeBreak()", "attr.data-status": "status()", "attr.aria-busy": "streaming() || null" } }, queries: [{ propertyName: "stepList", first: true, predicate: ChatStepsComponent, descendants: true, isSignal: true }, { propertyName: "steps", predicate: ChatStepComponent, descendants: true, isSignal: true }, { propertyName: "stepElements", predicate: ChatStepComponent, descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "@if (timeBreak(); as label) {\n <div class=\"divider\">\n <span class=\"divider-label\">\n {{ label }}\n </span>\n </div>\n}\n\n<div class=\"meta\">\n <span\n class=\"speaker\"\n [class.visually-hidden]=\"!author() || isGrouped()\">\n {{ speaker() }}\n </span>\n</div>\n\n<div class=\"steps\">\n <ng-content select=\"[steps]\"></ng-content>\n</div>\n\n<div class=\"bubble\">\n @if (stepCount()) {\n <button\n type=\"button\"\n class=\"steps-chip\"\n [attr.aria-expanded]=\"!folded()\"\n [attr.aria-label]=\"\n folded() ? wording().stepsFolded(stepCount(), failedStepCount()) : null\n \"\n (click)=\"toggleSteps()\">\n @if (failedStepCount()) {\n <ds-icon\n class=\"steps-chip-failed\"\n name=\"error\"\n [size]=\"12\" />\n } @else {\n <ds-icon\n class=\"steps-chip-done\"\n name=\"check\"\n [size]=\"12\" />\n }\n\n <span>\n {{ wording().steps(stepCount()) }}\n </span>\n\n @if (failedStepCount()) {\n <span class=\"steps-chip-failed\">\n \u00B7 {{ wording().stepsFailed(failedStepCount()) }}\n </span>\n }\n\n <ds-icon\n [name]=\"folded() ? 'chevronUp' : 'chevronDown'\"\n [size]=\"12\" />\n </button>\n }\n\n <div class=\"body\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"attachments\">\n <ng-content select=\"[attachments]\"></ng-content>\n </div>\n</div>\n\n@switch (status()) {\n @case ('sending') {\n <div\n class=\"status\"\n role=\"status\">\n {{ wording().sending }}\n </div>\n }\n @case ('failed') {\n <div\n class=\"status is-failed\"\n role=\"status\">\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n {{ wording().notSent }}\n <ds-button\n variant=\"text\"\n size=\"sm\"\n (pressed)=\"retry.emit()\">\n {{ wording().retry }}\n </ds-button>\n </div>\n }\n @default {\n @if (status() === 'sent') {\n <span\n class=\"visually-hidden\"\n role=\"status\">\n {{ wording().sent }}\n </span>\n }\n\n @if (time() && !isContinued() && !streaming()) {\n <div class=\"status time\">\n {{ time() }}\n </div>\n }\n }\n}\n\n@if (!streaming()) {\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n}\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_chat-bubble-max-width: var(--ds-chat-message-max-width, 85%);--_chat-bubble-radius: var(--ds-chat-message-radius, var(--ds-radius-panel));--_chat-bubble-padding: var(--ds-chat-message-padding, var(--space-2) var(--space-3));--_chat-bubble-bg-color: var(--ds-chat-message-assistant-bg-color, var(--surface-secondary));--_chat-bubble-color: var(--ds-chat-message-assistant-color, var(--text-primary));position:relative;display:flex;flex-direction:column;align-items:flex-start;min-width:0}:host([data-role=user]){--_chat-bubble-bg-color: var(--ds-chat-message-user-bg-color, var(--primary));--_chat-bubble-color: var(--ds-chat-message-user-color, var(--text-on-primary));align-items:flex-end}:host(.in-thread){margin-top:var(--_chat-thread-gap)}:host(.is-grouped){margin-top:var(--_chat-thread-group-gap)}:host(.is-first){margin-top:0}.divider{display:flex;align-items:center;gap:var(--space-3);align-self:stretch;margin-bottom:var(--space-3);font-size:var(--font-size-xs);line-height:var(--line-height-base);color:var(--text-tertiary)}.divider:before,.divider:after{content:\"\";flex:1;border-top:var(--border-width-default) solid var(--border-divider)}.divider-label{flex:none}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.meta{display:flex;align-items:baseline;gap:var(--space-2);max-width:100%;font-size:var(--font-size-xs);line-height:var(--line-height-base);color:var(--text-tertiary)}.meta:has(.speaker:not(.visually-hidden)){margin-bottom:var(--space-1)}.speaker{font-weight:var(--font-weight-semibold);color:var(--text-secondary)}.bubble{display:flex;flex-direction:column;gap:var(--space-2);max-width:var(--_chat-bubble-max-width);min-width:0;padding:var(--_chat-bubble-padding);border-radius:var(--_chat-bubble-radius);background-color:var(--_chat-bubble-bg-color);color:var(--_chat-bubble-color);font-size:var(--font-size-s);line-height:var(--line-height-base);overflow-wrap:anywhere;-webkit-user-select:text;user-select:text}:host([data-role=assistant]:not(.is-continued)) .bubble{border-end-start-radius:var(--ds-radius-inner)}:host([data-role=user]:not(.is-continued)) .bubble{border-end-end-radius:var(--ds-radius-inner)}:host([data-role=user]) .bubble ::selection{background-color:var(--_chat-bubble-color);color:var(--_chat-bubble-bg-color)}:host([data-role=user]) .body{white-space:pre-line}.steps,.body,.attachments{min-width:0}.steps{inline-size:100%;max-inline-size:var(--_chat-bubble-max-width);margin-bottom:var(--space-2);padding-inline:var(--space-1);overflow-wrap:anywhere}.bubble:has(>.body:empty):not(:has(>.attachments>*)){display:none}.attachments{display:flex;flex-wrap:wrap;gap:var(--space-1)}:host([aria-busy=true]) .body:after{content:\"\";display:inline-block;inline-size:.5em;block-size:1em;margin-inline-start:var(--space-0-5);vertical-align:text-bottom;background-color:currentcolor;animation:chat-caret var(--duration-loop-fast) steps(1) infinite}@keyframes chat-caret{50%{opacity:0}}:host([data-status=sending]) .bubble{opacity:var(--opacity-disabled)}.status{display:inline-flex;align-items:center;gap:var(--space-1);margin-top:var(--space-1);font-size:var(--font-size-xs);line-height:var(--line-height-base);color:var(--text-tertiary)}.status.is-failed{color:var(--error-text)}.actions{display:flex;align-items:center;gap:var(--space-1);margin-top:var(--space-1);opacity:0;transition:opacity var(--duration-fast) var(--ease-standard)}:host(:hover) .actions,.actions:focus-within{opacity:1}@media(hover:none){.actions{opacity:1}}.steps:not(:has(*)),.attachments:not(:has(*)),.actions:not(:has(*)),.body:empty{display:none}.steps-chip{display:none;align-items:center;align-self:flex-start;gap:var(--space-1);padding:var(--space-0-5) var(--space-2);border:var(--border-width-default) solid var(--border-default);border-radius:var(--ds-radius-pill);background-color:var(--surface-default);color:var(--text-secondary);font:inherit;font-size:var(--font-size-xs);line-height:var(--line-height-base);cursor:pointer}.steps-chip:hover{border-color:var(--border-strong);color:var(--text-primary)}.steps-chip-done{color:var(--success-text)}.steps-chip-failed{color:var(--error-text);font-weight:var(--font-weight-semibold)}:host(.steps-folded)>.steps{display:none}:host(.steps-chip-shown) .steps-chip{display:inline-flex}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "ds-button", inputs: ["color", "variant", "align", "size", "routerLink", "href", "fragment", "queryParams", "queryParamsHandling", "target", "rel", "routerLinkActiveOptions", "ariaCurrent", "type", "disabled", "loading", "loadingMode", "fullWidth", "ariaLabel", "icon", "trailingIcon", "ariaHasPopup", "ariaExpanded", "ariaControls", "disabledReason", "ariaDescribedBy"], outputs: ["pressed"] }, { kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
|
|
398
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ChatMessageComponent, isStandalone: true, selector: "ds-chat-message", inputs: { role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, author: { classPropertyName: "author", publicName: "author", isSignal: true, isRequired: false, transformFunction: null }, time: { classPropertyName: "time", publicName: "time", isSignal: true, isRequired: false, transformFunction: null }, sentAt: { classPropertyName: "sentAt", publicName: "sentAt", isSignal: true, isRequired: false, transformFunction: null }, streaming: { classPropertyName: "streaming", publicName: "streaming", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, stepsFolded: { classPropertyName: "stepsFolded", publicName: "stepsFolded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { stepsFolded: "stepsFoldedChange", retry: "retry" }, host: { properties: { "attr.role": "null", "attr.title": "null", "attr.data-role": "role()", "attr.data-tone": "role() === 'system' ? tone() : null", "class.in-thread": "!!thread", "class.is-first": "isFirst()", "class.is-grouped": "isGrouped()", "class.is-continued": "isContinued()", "class.has-divider": "!!timeBreak()", "attr.data-status": "status()", "attr.aria-busy": "streaming() || null" } }, queries: [{ propertyName: "stepList", first: true, predicate: ChatStepsComponent, descendants: true, isSignal: true }, { propertyName: "steps", predicate: ChatStepComponent, descendants: true, isSignal: true }, { propertyName: "stepElements", predicate: ChatStepComponent, descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "@if (timeBreak(); as label) {\n <div class=\"divider\">\n <span class=\"divider-label\">\n {{ label }}\n </span>\n </div>\n}\n\n<div class=\"meta\">\n <span\n class=\"speaker\"\n [class.visually-hidden]=\"!author() || isGrouped()\">\n {{ speaker() }}\n </span>\n</div>\n\n<div class=\"steps\">\n <ng-content select=\"[steps]\"></ng-content>\n</div>\n\n<div class=\"bubble\">\n @if (stepCount()) {\n <button\n type=\"button\"\n class=\"steps-chip\"\n [attr.aria-expanded]=\"!folded()\"\n [attr.aria-label]=\"\n folded() ? wording().stepsFolded(stepCount(), failedStepCount()) : null\n \"\n (click)=\"toggleSteps()\">\n @if (failedStepCount()) {\n <ds-icon\n class=\"steps-chip-failed\"\n name=\"error\"\n [size]=\"12\" />\n } @else {\n <ds-icon\n class=\"steps-chip-done\"\n name=\"check\"\n [size]=\"12\" />\n }\n\n <span>\n {{ wording().steps(stepCount()) }}\n </span>\n\n @if (failedStepCount()) {\n <span class=\"steps-chip-failed\">\n \u00B7 {{ wording().stepsFailed(failedStepCount()) }}\n </span>\n }\n\n <ds-icon\n [name]=\"folded() ? 'chevronUp' : 'chevronDown'\"\n [size]=\"12\" />\n </button>\n }\n\n @if (role() === 'system') {\n @if (noticeIcon(); as name) {\n <span class=\"notice-lead\">\n <ds-icon\n [name]=\"name\"\n [size]=\"14\" />\n </span>\n }\n\n @if (title()) {\n <div class=\"notice-title\">\n {{ title() }}\n </div>\n }\n }\n\n <div class=\"body\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"attachments\">\n <ng-content select=\"[attachments]\"></ng-content>\n </div>\n</div>\n\n@switch (status()) {\n @case ('sending') {\n <div\n class=\"status\"\n role=\"status\">\n {{ wording().sending }}\n </div>\n }\n @case ('failed') {\n <div\n class=\"status is-failed\"\n role=\"status\">\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n {{ wording().notSent }}\n <ds-button\n variant=\"text\"\n size=\"sm\"\n (pressed)=\"retry.emit()\">\n {{ wording().retry }}\n </ds-button>\n </div>\n }\n @default {\n @if (status() === 'sent') {\n <span\n class=\"visually-hidden\"\n role=\"status\">\n {{ wording().sent }}\n </span>\n }\n\n @if (\n time() &&\n !isContinued() &&\n !streaming()\n ) {\n <div class=\"status time\">\n {{ time() }}\n </div>\n }\n }\n}\n\n@if (!streaming()) {\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n}\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_chat-bubble-max-width: var(--ds-chat-message-max-width, 85%);--_chat-bubble-radius: var(--ds-chat-message-radius, var(--ds-radius-panel));--_chat-bubble-padding: var(--ds-chat-message-padding, var(--space-2) var(--space-3));--_chat-bubble-bg-color: var(--ds-chat-message-assistant-bg-color, var(--surface-secondary));--_chat-bubble-color: var(--ds-chat-message-assistant-color, var(--text-primary));position:relative;display:flex;flex-direction:column;align-items:flex-start;min-width:0}:host([data-role=user]){--_chat-bubble-bg-color: var(--ds-chat-message-user-bg-color, var(--primary));--_chat-bubble-color: var(--ds-chat-message-user-color, var(--text-on-primary));align-items:flex-end}:host([data-role=system]){--_chat-bubble-bg-color: var(--ds-chat-message-system-bg-color, var(--surface-secondary));--_chat-bubble-color: var(--ds-chat-message-system-color, var(--text-secondary));--_chat-bubble-radius: var(--ds-radius-control);--_chat-bubble-padding: var(--space-1) var(--space-2);--_chat-notice-border-color: var(--ds-chat-message-system-border-color, var(--border-default));align-items:center}:host([data-role=system]) .bubble{display:grid;grid-template-columns:minmax(0,1fr);gap:0;border:var(--border-width-default) solid var(--_chat-notice-border-color);font-size:var(--font-size-xs);text-wrap:pretty}:host([data-role=system]) .bubble:has(>.notice-lead){grid-template-columns:auto minmax(0,1fr);column-gap:var(--space-2)}:host([data-role=system]) .notice-title,:host([data-role=system]) .body,:host([data-role=system]) .attachments{grid-column:-2}:host([data-role=system]) .attachments{margin-top:var(--space-2)}:host([data-role=system]:not([data-tone=neutral])){--_chat-bubble-padding: var(--space-2) var(--space-3)}:host([data-tone=info]){--_chat-bubble-bg-color: var(--info-subtitle);--_chat-bubble-color: var(--info-text);--_chat-notice-border-color: var(--info-border)}:host([data-tone=success]){--_chat-bubble-bg-color: var(--success-subtitle);--_chat-bubble-color: var(--success-text);--_chat-notice-border-color: var(--success-border)}:host([data-tone=warning]){--_chat-bubble-bg-color: var(--warning-subtitle);--_chat-bubble-color: var(--warning-text);--_chat-notice-border-color: var(--warning-border)}:host([data-tone=error]){--_chat-bubble-bg-color: var(--error-subtitle);--_chat-bubble-color: var(--error-text);--_chat-notice-border-color: var(--error-border)}.notice-lead{grid-row:1/span 3;display:flex;align-items:center;block-size:1lh}.notice-title{font-weight:var(--font-weight-semibold);color:var(--text-primary)}:host(.in-thread){margin-top:var(--_chat-thread-gap)}:host(.is-grouped){margin-top:var(--_chat-thread-group-gap)}:host(.is-first){margin-top:0}.divider{display:flex;align-items:center;gap:var(--space-3);align-self:stretch;margin-bottom:var(--space-3);font-size:var(--font-size-xs);line-height:var(--line-height-base);color:var(--text-tertiary)}.divider:before,.divider:after{content:\"\";flex:1;border-top:var(--border-width-default) solid var(--border-divider)}.divider-label{flex:none}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.meta{display:flex;align-items:baseline;gap:var(--space-2);max-width:100%;font-size:var(--font-size-xs);line-height:var(--line-height-base);color:var(--text-tertiary)}.meta:has(.speaker:not(.visually-hidden)){margin-bottom:var(--space-1)}.speaker{font-weight:var(--font-weight-semibold);color:var(--text-secondary)}.bubble{display:flex;flex-direction:column;gap:var(--space-2);max-width:var(--_chat-bubble-max-width);min-width:0;padding:var(--_chat-bubble-padding);border-radius:var(--_chat-bubble-radius);background-color:var(--_chat-bubble-bg-color);color:var(--_chat-bubble-color);font-size:var(--font-size-s);line-height:var(--line-height-base);overflow-wrap:anywhere;-webkit-user-select:text;user-select:text}:host([data-role=assistant]:not(.is-continued)) .bubble{border-end-start-radius:var(--ds-radius-inner)}:host([data-role=user]:not(.is-continued)) .bubble{border-end-end-radius:var(--ds-radius-inner)}:host([data-role=user]) .bubble ::selection{background-color:var(--_chat-bubble-color);color:var(--_chat-bubble-bg-color)}:host([data-role=user]) .body{white-space:pre-line}.steps,.body,.attachments{min-width:0}.steps{inline-size:100%;max-inline-size:var(--_chat-bubble-max-width);margin-bottom:var(--space-2);padding-inline:var(--space-1);overflow-wrap:anywhere}.bubble:has(>.body:empty):not(:has(>.attachments>*)){display:none}.attachments{display:flex;flex-wrap:wrap;gap:var(--space-1)}:host([aria-busy=true]) .body:after{content:\"\";display:inline-block;inline-size:.5em;block-size:1em;margin-inline-start:var(--space-0-5);vertical-align:text-bottom;background-color:currentcolor;animation:chat-caret var(--duration-loop-fast) steps(1) infinite}@keyframes chat-caret{50%{opacity:0}}:host([data-status=sending]) .bubble{opacity:var(--opacity-disabled)}.status{display:inline-flex;align-items:center;gap:var(--space-1);margin-top:var(--space-1);font-size:var(--font-size-xs);line-height:var(--line-height-base);color:var(--text-tertiary)}.status.is-failed{color:var(--error-text)}.actions{display:flex;align-items:center;gap:var(--space-1);margin-top:var(--space-1);opacity:0;transition:opacity var(--duration-fast) var(--ease-standard)}:host(:hover) .actions,.actions:focus-within{opacity:1}@media(hover:none){.actions{opacity:1}}.steps:not(:has(*)),.attachments:not(:has(*)),.actions:not(:has(*)),.body:empty{display:none}.steps-chip{display:none;align-items:center;align-self:flex-start;gap:var(--space-1);padding:var(--space-0-5) var(--space-2);border:var(--border-width-default) solid var(--border-default);border-radius:var(--ds-radius-pill);background-color:var(--surface-default);color:var(--text-secondary);font:inherit;font-size:var(--font-size-xs);line-height:var(--line-height-base);cursor:pointer}.steps-chip:hover{border-color:var(--border-strong);color:var(--text-primary)}.steps-chip-done{color:var(--success-text)}.steps-chip-failed{color:var(--error-text);font-weight:var(--font-weight-semibold)}:host(.steps-folded)>.steps{display:none}:host(.steps-chip-shown) .steps-chip{display:inline-flex}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "ds-button", inputs: ["color", "variant", "align", "size", "routerLink", "href", "fragment", "queryParams", "queryParamsHandling", "target", "rel", "routerLinkActiveOptions", "ariaCurrent", "type", "disabled", "loading", "loadingMode", "fullWidth", "ariaLabel", "icon", "trailingIcon", "ariaHasPopup", "ariaExpanded", "ariaControls", "disabledReason", "ariaDescribedBy"], outputs: ["pressed"] }, { kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
|
|
350
399
|
}
|
|
351
400
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChatMessageComponent, decorators: [{
|
|
352
401
|
type: Component,
|
|
353
402
|
args: [{ selector: 'ds-chat-message', standalone: true, imports: [ButtonComponent, IconComponent], encapsulation: ViewEncapsulation.Emulated, host: {
|
|
354
403
|
// The `role` input would otherwise stay on the host as an invalid ARIA role.
|
|
355
404
|
'[attr.role]': 'null',
|
|
405
|
+
'[attr.title]': 'null',
|
|
356
406
|
'[attr.data-role]': 'role()',
|
|
407
|
+
'[attr.data-tone]': "role() === 'system' ? tone() : null",
|
|
357
408
|
'[class.in-thread]': '!!thread',
|
|
358
409
|
'[class.is-first]': 'isFirst()',
|
|
359
410
|
'[class.is-grouped]': 'isGrouped()',
|
|
@@ -361,8 +412,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
361
412
|
'[class.has-divider]': '!!timeBreak()',
|
|
362
413
|
'[attr.data-status]': 'status()',
|
|
363
414
|
'[attr.aria-busy]': 'streaming() || null',
|
|
364
|
-
}, template: "@if (timeBreak(); as label) {\n <div class=\"divider\">\n <span class=\"divider-label\">\n {{ label }}\n </span>\n </div>\n}\n\n<div class=\"meta\">\n <span\n class=\"speaker\"\n [class.visually-hidden]=\"!author() || isGrouped()\">\n {{ speaker() }}\n </span>\n</div>\n\n<div class=\"steps\">\n <ng-content select=\"[steps]\"></ng-content>\n</div>\n\n<div class=\"bubble\">\n @if (stepCount()) {\n <button\n type=\"button\"\n class=\"steps-chip\"\n [attr.aria-expanded]=\"!folded()\"\n [attr.aria-label]=\"\n folded() ? wording().stepsFolded(stepCount(), failedStepCount()) : null\n \"\n (click)=\"toggleSteps()\">\n @if (failedStepCount()) {\n <ds-icon\n class=\"steps-chip-failed\"\n name=\"error\"\n [size]=\"12\" />\n } @else {\n <ds-icon\n class=\"steps-chip-done\"\n name=\"check\"\n [size]=\"12\" />\n }\n\n <span>\n {{ wording().steps(stepCount()) }}\n </span>\n\n @if (failedStepCount()) {\n <span class=\"steps-chip-failed\">\n \u00B7 {{ wording().stepsFailed(failedStepCount()) }}\n </span>\n }\n\n <ds-icon\n [name]=\"folded() ? 'chevronUp' : 'chevronDown'\"\n [size]=\"12\" />\n </button>\n }\n\n <div class=\"body\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"attachments\">\n <ng-content select=\"[attachments]\"></ng-content>\n </div>\n</div>\n\n@switch (status()) {\n @case ('sending') {\n <div\n class=\"status\"\n role=\"status\">\n {{ wording().sending }}\n </div>\n }\n @case ('failed') {\n <div\n class=\"status is-failed\"\n role=\"status\">\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n {{ wording().notSent }}\n <ds-button\n variant=\"text\"\n size=\"sm\"\n (pressed)=\"retry.emit()\">\n {{ wording().retry }}\n </ds-button>\n </div>\n }\n @default {\n @if (status() === 'sent') {\n <span\n class=\"visually-hidden\"\n role=\"status\">\n {{ wording().sent }}\n </span>\n }\n\n @if (time()
|
|
365
|
-
}], ctorParameters: () => [], propDecorators: { role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], author: [{ type: i0.Input, args: [{ isSignal: true, alias: "author", required: false }] }], time: [{ type: i0.Input, args: [{ isSignal: true, alias: "time", required: false }] }], sentAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "sentAt", required: false }] }], streaming: [{ type: i0.Input, args: [{ isSignal: true, alias: "streaming", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], stepsFolded: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepsFolded", required: false }] }, { type: i0.Output, args: ["stepsFoldedChange"] }], retry: [{ type: i0.Output, args: ["retry"] }], stepList: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ChatStepsComponent), { ...{
|
|
415
|
+
}, template: "@if (timeBreak(); as label) {\n <div class=\"divider\">\n <span class=\"divider-label\">\n {{ label }}\n </span>\n </div>\n}\n\n<div class=\"meta\">\n <span\n class=\"speaker\"\n [class.visually-hidden]=\"!author() || isGrouped()\">\n {{ speaker() }}\n </span>\n</div>\n\n<div class=\"steps\">\n <ng-content select=\"[steps]\"></ng-content>\n</div>\n\n<div class=\"bubble\">\n @if (stepCount()) {\n <button\n type=\"button\"\n class=\"steps-chip\"\n [attr.aria-expanded]=\"!folded()\"\n [attr.aria-label]=\"\n folded() ? wording().stepsFolded(stepCount(), failedStepCount()) : null\n \"\n (click)=\"toggleSteps()\">\n @if (failedStepCount()) {\n <ds-icon\n class=\"steps-chip-failed\"\n name=\"error\"\n [size]=\"12\" />\n } @else {\n <ds-icon\n class=\"steps-chip-done\"\n name=\"check\"\n [size]=\"12\" />\n }\n\n <span>\n {{ wording().steps(stepCount()) }}\n </span>\n\n @if (failedStepCount()) {\n <span class=\"steps-chip-failed\">\n \u00B7 {{ wording().stepsFailed(failedStepCount()) }}\n </span>\n }\n\n <ds-icon\n [name]=\"folded() ? 'chevronUp' : 'chevronDown'\"\n [size]=\"12\" />\n </button>\n }\n\n @if (role() === 'system') {\n @if (noticeIcon(); as name) {\n <span class=\"notice-lead\">\n <ds-icon\n [name]=\"name\"\n [size]=\"14\" />\n </span>\n }\n\n @if (title()) {\n <div class=\"notice-title\">\n {{ title() }}\n </div>\n }\n }\n\n <div class=\"body\">\n <ng-content></ng-content>\n </div>\n\n <div class=\"attachments\">\n <ng-content select=\"[attachments]\"></ng-content>\n </div>\n</div>\n\n@switch (status()) {\n @case ('sending') {\n <div\n class=\"status\"\n role=\"status\">\n {{ wording().sending }}\n </div>\n }\n @case ('failed') {\n <div\n class=\"status is-failed\"\n role=\"status\">\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n {{ wording().notSent }}\n <ds-button\n variant=\"text\"\n size=\"sm\"\n (pressed)=\"retry.emit()\">\n {{ wording().retry }}\n </ds-button>\n </div>\n }\n @default {\n @if (status() === 'sent') {\n <span\n class=\"visually-hidden\"\n role=\"status\">\n {{ wording().sent }}\n </span>\n }\n\n @if (\n time() &&\n !isContinued() &&\n !streaming()\n ) {\n <div class=\"status time\">\n {{ time() }}\n </div>\n }\n }\n}\n\n@if (!streaming()) {\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n}\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_chat-bubble-max-width: var(--ds-chat-message-max-width, 85%);--_chat-bubble-radius: var(--ds-chat-message-radius, var(--ds-radius-panel));--_chat-bubble-padding: var(--ds-chat-message-padding, var(--space-2) var(--space-3));--_chat-bubble-bg-color: var(--ds-chat-message-assistant-bg-color, var(--surface-secondary));--_chat-bubble-color: var(--ds-chat-message-assistant-color, var(--text-primary));position:relative;display:flex;flex-direction:column;align-items:flex-start;min-width:0}:host([data-role=user]){--_chat-bubble-bg-color: var(--ds-chat-message-user-bg-color, var(--primary));--_chat-bubble-color: var(--ds-chat-message-user-color, var(--text-on-primary));align-items:flex-end}:host([data-role=system]){--_chat-bubble-bg-color: var(--ds-chat-message-system-bg-color, var(--surface-secondary));--_chat-bubble-color: var(--ds-chat-message-system-color, var(--text-secondary));--_chat-bubble-radius: var(--ds-radius-control);--_chat-bubble-padding: var(--space-1) var(--space-2);--_chat-notice-border-color: var(--ds-chat-message-system-border-color, var(--border-default));align-items:center}:host([data-role=system]) .bubble{display:grid;grid-template-columns:minmax(0,1fr);gap:0;border:var(--border-width-default) solid var(--_chat-notice-border-color);font-size:var(--font-size-xs);text-wrap:pretty}:host([data-role=system]) .bubble:has(>.notice-lead){grid-template-columns:auto minmax(0,1fr);column-gap:var(--space-2)}:host([data-role=system]) .notice-title,:host([data-role=system]) .body,:host([data-role=system]) .attachments{grid-column:-2}:host([data-role=system]) .attachments{margin-top:var(--space-2)}:host([data-role=system]:not([data-tone=neutral])){--_chat-bubble-padding: var(--space-2) var(--space-3)}:host([data-tone=info]){--_chat-bubble-bg-color: var(--info-subtitle);--_chat-bubble-color: var(--info-text);--_chat-notice-border-color: var(--info-border)}:host([data-tone=success]){--_chat-bubble-bg-color: var(--success-subtitle);--_chat-bubble-color: var(--success-text);--_chat-notice-border-color: var(--success-border)}:host([data-tone=warning]){--_chat-bubble-bg-color: var(--warning-subtitle);--_chat-bubble-color: var(--warning-text);--_chat-notice-border-color: var(--warning-border)}:host([data-tone=error]){--_chat-bubble-bg-color: var(--error-subtitle);--_chat-bubble-color: var(--error-text);--_chat-notice-border-color: var(--error-border)}.notice-lead{grid-row:1/span 3;display:flex;align-items:center;block-size:1lh}.notice-title{font-weight:var(--font-weight-semibold);color:var(--text-primary)}:host(.in-thread){margin-top:var(--_chat-thread-gap)}:host(.is-grouped){margin-top:var(--_chat-thread-group-gap)}:host(.is-first){margin-top:0}.divider{display:flex;align-items:center;gap:var(--space-3);align-self:stretch;margin-bottom:var(--space-3);font-size:var(--font-size-xs);line-height:var(--line-height-base);color:var(--text-tertiary)}.divider:before,.divider:after{content:\"\";flex:1;border-top:var(--border-width-default) solid var(--border-divider)}.divider-label{flex:none}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.meta{display:flex;align-items:baseline;gap:var(--space-2);max-width:100%;font-size:var(--font-size-xs);line-height:var(--line-height-base);color:var(--text-tertiary)}.meta:has(.speaker:not(.visually-hidden)){margin-bottom:var(--space-1)}.speaker{font-weight:var(--font-weight-semibold);color:var(--text-secondary)}.bubble{display:flex;flex-direction:column;gap:var(--space-2);max-width:var(--_chat-bubble-max-width);min-width:0;padding:var(--_chat-bubble-padding);border-radius:var(--_chat-bubble-radius);background-color:var(--_chat-bubble-bg-color);color:var(--_chat-bubble-color);font-size:var(--font-size-s);line-height:var(--line-height-base);overflow-wrap:anywhere;-webkit-user-select:text;user-select:text}:host([data-role=assistant]:not(.is-continued)) .bubble{border-end-start-radius:var(--ds-radius-inner)}:host([data-role=user]:not(.is-continued)) .bubble{border-end-end-radius:var(--ds-radius-inner)}:host([data-role=user]) .bubble ::selection{background-color:var(--_chat-bubble-color);color:var(--_chat-bubble-bg-color)}:host([data-role=user]) .body{white-space:pre-line}.steps,.body,.attachments{min-width:0}.steps{inline-size:100%;max-inline-size:var(--_chat-bubble-max-width);margin-bottom:var(--space-2);padding-inline:var(--space-1);overflow-wrap:anywhere}.bubble:has(>.body:empty):not(:has(>.attachments>*)){display:none}.attachments{display:flex;flex-wrap:wrap;gap:var(--space-1)}:host([aria-busy=true]) .body:after{content:\"\";display:inline-block;inline-size:.5em;block-size:1em;margin-inline-start:var(--space-0-5);vertical-align:text-bottom;background-color:currentcolor;animation:chat-caret var(--duration-loop-fast) steps(1) infinite}@keyframes chat-caret{50%{opacity:0}}:host([data-status=sending]) .bubble{opacity:var(--opacity-disabled)}.status{display:inline-flex;align-items:center;gap:var(--space-1);margin-top:var(--space-1);font-size:var(--font-size-xs);line-height:var(--line-height-base);color:var(--text-tertiary)}.status.is-failed{color:var(--error-text)}.actions{display:flex;align-items:center;gap:var(--space-1);margin-top:var(--space-1);opacity:0;transition:opacity var(--duration-fast) var(--ease-standard)}:host(:hover) .actions,.actions:focus-within{opacity:1}@media(hover:none){.actions{opacity:1}}.steps:not(:has(*)),.attachments:not(:has(*)),.actions:not(:has(*)),.body:empty{display:none}.steps-chip{display:none;align-items:center;align-self:flex-start;gap:var(--space-1);padding:var(--space-0-5) var(--space-2);border:var(--border-width-default) solid var(--border-default);border-radius:var(--ds-radius-pill);background-color:var(--surface-default);color:var(--text-secondary);font:inherit;font-size:var(--font-size-xs);line-height:var(--line-height-base);cursor:pointer}.steps-chip:hover{border-color:var(--border-strong);color:var(--text-primary)}.steps-chip-done{color:var(--success-text)}.steps-chip-failed{color:var(--error-text);font-weight:var(--font-weight-semibold)}:host(.steps-folded)>.steps{display:none}:host(.steps-chip-shown) .steps-chip{display:inline-flex}\n"] }]
|
|
416
|
+
}], ctorParameters: () => [], propDecorators: { role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], tone: [{ type: i0.Input, args: [{ isSignal: true, alias: "tone", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], author: [{ type: i0.Input, args: [{ isSignal: true, alias: "author", required: false }] }], time: [{ type: i0.Input, args: [{ isSignal: true, alias: "time", required: false }] }], sentAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "sentAt", required: false }] }], streaming: [{ type: i0.Input, args: [{ isSignal: true, alias: "streaming", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], stepsFolded: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepsFolded", required: false }] }, { type: i0.Output, args: ["stepsFoldedChange"] }], retry: [{ type: i0.Output, args: ["retry"] }], stepList: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ChatStepsComponent), { ...{
|
|
366
417
|
descendants: true,
|
|
367
418
|
}, isSignal: true }] }], steps: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ChatStepComponent), { ...{
|
|
368
419
|
descendants: true,
|
|
@@ -463,6 +514,9 @@ class ChatThreadComponent {
|
|
|
463
514
|
constructor() {
|
|
464
515
|
afterNextRender(() => {
|
|
465
516
|
this.live.set(true);
|
|
517
|
+
// The kept scrollbar room is as wide as the platform's scrollbar, which no stylesheet can know.
|
|
518
|
+
const scroller = this.scroller().nativeElement;
|
|
519
|
+
scroller.style.setProperty('--_chat-thread-gutter', `${scroller.offsetWidth - scroller.clientWidth}px`);
|
|
466
520
|
this.toEnd();
|
|
467
521
|
// Growth of the content (a new message, a streamed line, an opened snapshot) and a smaller
|
|
468
522
|
// viewport both move the end away; a pinned thread follows it.
|
|
@@ -689,7 +743,7 @@ class ChatThreadComponent {
|
|
|
689
743
|
provide: CHAT_THREAD,
|
|
690
744
|
useExisting: forwardRef(() => ChatThreadComponent),
|
|
691
745
|
},
|
|
692
|
-
], queries: [{ propertyName: "messages", predicate: ChatMessageComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true, isSignal: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n #scroller\n class=\"scroller\"\n role=\"region\"\n tabindex=\"0\"\n [attr.aria-label]=\"label()\"\n (scroll)=\"onScroll()\">\n <div\n #content\n class=\"content\">\n <ng-content></ng-content>\n\n @if (working()) {\n <div class=\"working\">\n <span aria-hidden=\"true\">\n <ds-spinner size=\"sm\" />\n </span>\n\n <span class=\"working-label\">\n {{ workingText() }}\n </span>\n </div>\n }\n </div>\n</div>\n\n@if (loadingOlder()) {\n <div class=\"older\">\n <ds-spinner size=\"sm\" />\n </div>\n}\n\n@if (!pinned()) {\n <ds-button\n class=\"jump\"\n variant=\"outline\"\n color=\"neutral\"\n size=\"sm\"\n trailingIcon=\"arrowDown\"\n (pressed)=\"scrollToEnd()\">\n {{ jumpLabel() }}\n </ds-button>\n}\n\n<div\n class=\"visually-hidden\"\n aria-live=\"polite\"\n aria-atomic=\"true\">\n {{ announcement() }}\n</div>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_chat-thread-gap: var(--ds-chat-thread-gap, var(--space-4));--_chat-thread-group-gap: var(--ds-chat-thread-group-gap, var(--space-1));--_chat-thread-padding: var(--ds-chat-thread-padding, var(--space-4));position:relative;display:flex;flex-direction:column;inline-size:100%;min-height:0}.scroller{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;overflow-anchor:none;padding:var(--_chat-thread-padding)}.content{display:flex;flex-direction:column}.older{position:absolute;top:var(--space-3);left:50%;translate:-50% 0;display:flex;padding:var(--space-1-5);border-radius:var(--ds-radius-pill);background-color:var(--surface-default);box-shadow:var(--shadow-popover)}.working{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--_chat-thread-gap);font-size:var(--font-size-s);line-height:var(--line-height-base);color:var(--text-secondary)}.working-label{min-width:0;overflow-wrap:anywhere}.jump{position:absolute;bottom:var(--space-3);left:50%;translate:-50% 0;--ds-button-radius: var(--ds-radius-pill);--ds-button-bg-color: var(--surface-default);--ds-button-shadow: var(--shadow-popover)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "ds-button", inputs: ["color", "variant", "align", "size", "routerLink", "href", "fragment", "queryParams", "queryParamsHandling", "target", "rel", "routerLinkActiveOptions", "ariaCurrent", "type", "disabled", "loading", "loadingMode", "fullWidth", "ariaLabel", "icon", "trailingIcon", "ariaHasPopup", "ariaExpanded", "ariaControls", "disabledReason", "ariaDescribedBy"], outputs: ["pressed"] }, { kind: "component", type: SpinnerComponent, selector: "ds-spinner", inputs: ["size"] }] });
|
|
746
|
+
], queries: [{ propertyName: "messages", predicate: ChatMessageComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true, isSignal: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n #scroller\n class=\"scroller\"\n role=\"region\"\n tabindex=\"0\"\n [attr.aria-label]=\"label()\"\n (scroll)=\"onScroll()\">\n <div\n #content\n class=\"content\">\n <ng-content></ng-content>\n\n @if (working()) {\n <div class=\"working\">\n <span aria-hidden=\"true\">\n <ds-spinner size=\"sm\" />\n </span>\n\n <span class=\"working-label\">\n {{ workingText() }}\n </span>\n </div>\n }\n </div>\n</div>\n\n@if (loadingOlder()) {\n <div class=\"older\">\n <ds-spinner size=\"sm\" />\n </div>\n}\n\n@if (!pinned()) {\n <ds-button\n class=\"jump\"\n variant=\"outline\"\n color=\"neutral\"\n size=\"sm\"\n trailingIcon=\"arrowDown\"\n (pressed)=\"scrollToEnd()\">\n {{ jumpLabel() }}\n </ds-button>\n}\n\n<div\n class=\"visually-hidden\"\n aria-live=\"polite\"\n aria-atomic=\"true\">\n {{ announcement() }}\n</div>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_chat-thread-gap: var(--ds-chat-thread-gap, var(--space-4));--_chat-thread-group-gap: var(--ds-chat-thread-group-gap, var(--space-1));--_chat-thread-padding: var(--ds-chat-thread-padding, var(--space-4));--_chat-thread-inset-bottom: var(--ds-chat-thread-inset-bottom, 0px);position:relative;display:flex;flex-direction:column;inline-size:100%;min-height:0}.scroller{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;overflow-anchor:none;padding:var(--_chat-thread-padding);padding-block-end:calc(var(--_chat-thread-padding) + var(--_chat-thread-inset-bottom));padding-inline-end:max(0px,var(--_chat-thread-padding) - var(--_chat-thread-gutter, 0px))}.content{display:flex;flex-direction:column}.older{position:absolute;top:var(--space-3);left:50%;translate:-50% 0;display:flex;padding:var(--space-1-5);border-radius:var(--ds-radius-pill);background-color:var(--surface-default);box-shadow:var(--shadow-popover)}.working{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--_chat-thread-gap);font-size:var(--font-size-s);line-height:var(--line-height-base);color:var(--text-secondary)}.working-label{min-width:0;overflow-wrap:anywhere}.jump{position:absolute;bottom:calc(var(--space-3) + var(--_chat-thread-inset-bottom));left:50%;translate:-50% 0;--ds-button-radius: var(--ds-radius-pill);--ds-button-bg-color: var(--surface-default);--ds-button-shadow: var(--shadow-popover)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "ds-button", inputs: ["color", "variant", "align", "size", "routerLink", "href", "fragment", "queryParams", "queryParamsHandling", "target", "rel", "routerLinkActiveOptions", "ariaCurrent", "type", "disabled", "loading", "loadingMode", "fullWidth", "ariaLabel", "icon", "trailingIcon", "ariaHasPopup", "ariaExpanded", "ariaControls", "disabledReason", "ariaDescribedBy"], outputs: ["pressed"] }, { kind: "component", type: SpinnerComponent, selector: "ds-spinner", inputs: ["size"] }] });
|
|
693
747
|
}
|
|
694
748
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChatThreadComponent, decorators: [{
|
|
695
749
|
type: Component,
|
|
@@ -698,7 +752,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
698
752
|
provide: CHAT_THREAD,
|
|
699
753
|
useExisting: forwardRef(() => ChatThreadComponent),
|
|
700
754
|
},
|
|
701
|
-
], template: "<div\n #scroller\n class=\"scroller\"\n role=\"region\"\n tabindex=\"0\"\n [attr.aria-label]=\"label()\"\n (scroll)=\"onScroll()\">\n <div\n #content\n class=\"content\">\n <ng-content></ng-content>\n\n @if (working()) {\n <div class=\"working\">\n <span aria-hidden=\"true\">\n <ds-spinner size=\"sm\" />\n </span>\n\n <span class=\"working-label\">\n {{ workingText() }}\n </span>\n </div>\n }\n </div>\n</div>\n\n@if (loadingOlder()) {\n <div class=\"older\">\n <ds-spinner size=\"sm\" />\n </div>\n}\n\n@if (!pinned()) {\n <ds-button\n class=\"jump\"\n variant=\"outline\"\n color=\"neutral\"\n size=\"sm\"\n trailingIcon=\"arrowDown\"\n (pressed)=\"scrollToEnd()\">\n {{ jumpLabel() }}\n </ds-button>\n}\n\n<div\n class=\"visually-hidden\"\n aria-live=\"polite\"\n aria-atomic=\"true\">\n {{ announcement() }}\n</div>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_chat-thread-gap: var(--ds-chat-thread-gap, var(--space-4));--_chat-thread-group-gap: var(--ds-chat-thread-group-gap, var(--space-1));--_chat-thread-padding: var(--ds-chat-thread-padding, var(--space-4));position:relative;display:flex;flex-direction:column;inline-size:100%;min-height:0}.scroller{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;overflow-anchor:none;padding:var(--_chat-thread-padding)}.content{display:flex;flex-direction:column}.older{position:absolute;top:var(--space-3);left:50%;translate:-50% 0;display:flex;padding:var(--space-1-5);border-radius:var(--ds-radius-pill);background-color:var(--surface-default);box-shadow:var(--shadow-popover)}.working{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--_chat-thread-gap);font-size:var(--font-size-s);line-height:var(--line-height-base);color:var(--text-secondary)}.working-label{min-width:0;overflow-wrap:anywhere}.jump{position:absolute;bottom:var(--space-3);left:50%;translate:-50% 0;--ds-button-radius: var(--ds-radius-pill);--ds-button-bg-color: var(--surface-default);--ds-button-shadow: var(--shadow-popover)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}\n"] }]
|
|
755
|
+
], template: "<div\n #scroller\n class=\"scroller\"\n role=\"region\"\n tabindex=\"0\"\n [attr.aria-label]=\"label()\"\n (scroll)=\"onScroll()\">\n <div\n #content\n class=\"content\">\n <ng-content></ng-content>\n\n @if (working()) {\n <div class=\"working\">\n <span aria-hidden=\"true\">\n <ds-spinner size=\"sm\" />\n </span>\n\n <span class=\"working-label\">\n {{ workingText() }}\n </span>\n </div>\n }\n </div>\n</div>\n\n@if (loadingOlder()) {\n <div class=\"older\">\n <ds-spinner size=\"sm\" />\n </div>\n}\n\n@if (!pinned()) {\n <ds-button\n class=\"jump\"\n variant=\"outline\"\n color=\"neutral\"\n size=\"sm\"\n trailingIcon=\"arrowDown\"\n (pressed)=\"scrollToEnd()\">\n {{ jumpLabel() }}\n </ds-button>\n}\n\n<div\n class=\"visually-hidden\"\n aria-live=\"polite\"\n aria-atomic=\"true\">\n {{ announcement() }}\n</div>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_chat-thread-gap: var(--ds-chat-thread-gap, var(--space-4));--_chat-thread-group-gap: var(--ds-chat-thread-group-gap, var(--space-1));--_chat-thread-padding: var(--ds-chat-thread-padding, var(--space-4));--_chat-thread-inset-bottom: var(--ds-chat-thread-inset-bottom, 0px);position:relative;display:flex;flex-direction:column;inline-size:100%;min-height:0}.scroller{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;overflow-anchor:none;padding:var(--_chat-thread-padding);padding-block-end:calc(var(--_chat-thread-padding) + var(--_chat-thread-inset-bottom));padding-inline-end:max(0px,var(--_chat-thread-padding) - var(--_chat-thread-gutter, 0px))}.content{display:flex;flex-direction:column}.older{position:absolute;top:var(--space-3);left:50%;translate:-50% 0;display:flex;padding:var(--space-1-5);border-radius:var(--ds-radius-pill);background-color:var(--surface-default);box-shadow:var(--shadow-popover)}.working{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--_chat-thread-gap);font-size:var(--font-size-s);line-height:var(--line-height-base);color:var(--text-secondary)}.working-label{min-width:0;overflow-wrap:anywhere}.jump{position:absolute;bottom:calc(var(--space-3) + var(--_chat-thread-inset-bottom));left:50%;translate:-50% 0;--ds-button-radius: var(--ds-radius-pill);--ds-button-bg-color: var(--surface-default);--ds-button-shadow: var(--shadow-popover)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}\n"] }]
|
|
702
756
|
}], ctorParameters: () => [], propDecorators: { working: [{ type: i0.Input, args: [{ isSignal: true, alias: "working", required: false }] }], workingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "workingLabel", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], foldStepsOnSend: [{ type: i0.Input, args: [{ isSignal: true, alias: "foldStepsOnSend", required: false }] }], timeBreakMinutes: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeBreakMinutes", required: false }] }], hasOlder: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasOlder", required: false }] }], loadingOlder: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingOlder", required: false }] }], loadOlder: [{ type: i0.Output, args: ["loadOlder"] }], messages: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ChatMessageComponent), { ...{
|
|
703
757
|
descendants: true,
|
|
704
758
|
}, isSignal: true }] }], scroller: [{ type: i0.ViewChild, args: ['scroller', { isSignal: true }] }], content: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }] } });
|
|
@@ -755,6 +809,13 @@ class ChatInputComponent {
|
|
|
755
809
|
/** Work in flight: the send button keeps its place, shows a spinner and refuses to submit, and
|
|
756
810
|
* Enter does not submit. The text area stays editable. */
|
|
757
811
|
busy = input(false, { ...(ngDevMode ? { debugName: "busy" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
812
|
+
/** While `busy`, the default send button becomes Stop: a square inside a turning ring that emits
|
|
813
|
+
* `stopRequested`. */
|
|
814
|
+
stoppable = input(false, { ...(ngDevMode ? { debugName: "stoppable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
815
|
+
/** What the default buttons offer while `busy` once text is typed. `'stop'`: the send button stays
|
|
816
|
+
* Stop (or the spinner). `'queue'`: Redirect, Stop (with `stoppable`) and Queue, left to right;
|
|
817
|
+
* Queue is the main button and Enter queues. With no text it is Stop again. */
|
|
818
|
+
busyAction = input('stop', ...(ngDevMode ? [{ debugName: "busyAction" }] : /* istanbul ignore next */ []));
|
|
758
819
|
/** The current step while `busy`, such as "Rebuilding"; where it shows follows `layout`. */
|
|
759
820
|
busyLabel = input('', ...(ngDevMode ? [{ debugName: "busyLabel" }] : /* istanbul ignore next */ []));
|
|
760
821
|
/** Where the buttons and the step text sit. `'status-bar'`: buttons inside, the step text in the
|
|
@@ -766,6 +827,12 @@ class ChatInputComponent {
|
|
|
766
827
|
/** The trimmed text, on Enter or the send button. Never fires for blank text, while `busy` or
|
|
767
828
|
* while `disabled`. */
|
|
768
829
|
submitted = output();
|
|
830
|
+
/** The Stop button was pressed; fires only while `busy`, `stoppable` and not `disabled`. */
|
|
831
|
+
stopRequested = output();
|
|
832
|
+
/** The trimmed text, on Enter or the Queue button; fires only while the Queue button shows. */
|
|
833
|
+
queued = output();
|
|
834
|
+
/** The trimmed text, on the Redirect button; fires only while the Queue button shows. */
|
|
835
|
+
redirected = output();
|
|
769
836
|
/** Image files pasted into the text area. The paste inserts no text when it carries images. */
|
|
770
837
|
filesPasted = output();
|
|
771
838
|
/** True when Enter or the send button would submit; bind it in a `[send]` slot. */
|
|
@@ -776,6 +843,20 @@ class ChatInputComponent {
|
|
|
776
843
|
}), ...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
|
|
777
844
|
textareaLabel = computed(() => this.ariaLabel() || this.labels().label, ...(ngDevMode ? [{ debugName: "textareaLabel" }] : /* istanbul ignore next */ []));
|
|
778
845
|
sendLabel = computed(() => this.labels().send, ...(ngDevMode ? [{ debugName: "sendLabel" }] : /* istanbul ignore next */ []));
|
|
846
|
+
stopLabel = computed(() => this.labels().stop, ...(ngDevMode ? [{ debugName: "stopLabel" }] : /* istanbul ignore next */ []));
|
|
847
|
+
queueLabel = computed(() => this.labels().queue, ...(ngDevMode ? [{ debugName: "queueLabel" }] : /* istanbul ignore next */ []));
|
|
848
|
+
redirectLabel = computed(() => this.labels().redirect, ...(ngDevMode ? [{ debugName: "redirectLabel" }] : /* istanbul ignore next */ []));
|
|
849
|
+
queueShown = computed(() => this.busy() &&
|
|
850
|
+
this.busyAction() === 'queue' &&
|
|
851
|
+
!this.disabled() &&
|
|
852
|
+
this.value().trim() !== '', ...(ngDevMode ? [{ debugName: "queueShown" }] : /* istanbul ignore next */ []));
|
|
853
|
+
stopShown = computed(() => this.busy() && this.stoppable() && !this.disabled() && !this.queueShown(), ...(ngDevMode ? [{ debugName: "stopShown" }] : /* istanbul ignore next */ []));
|
|
854
|
+
mainLabel = computed(() => this.queueShown()
|
|
855
|
+
? this.queueLabel()
|
|
856
|
+
: this.stopShown()
|
|
857
|
+
? this.stopLabel()
|
|
858
|
+
: this.sendLabel(), ...(ngDevMode ? [{ debugName: "mainLabel" }] : /* istanbul ignore next */ []));
|
|
859
|
+
mainIcon = computed(() => this.queueShown() ? 'list-plus' : this.stopShown() ? 'stop' : 'arrowUp', ...(ngDevMode ? [{ debugName: "mainIcon" }] : /* istanbul ignore next */ []));
|
|
779
860
|
statusAbove = computed(() => this.layout() === 'status-above' || this.layout() === 'split', ...(ngDevMode ? [{ debugName: "statusAbove" }] : /* istanbul ignore next */ []));
|
|
780
861
|
statusText = computed(() => this.busy() ? this.busyLabel() : '', ...(ngDevMode ? [{ debugName: "statusText" }] : /* istanbul ignore next */ []));
|
|
781
862
|
/** Emits `submitted` when `canSubmit`; for a send button rendered in the `[send]` slot. */
|
|
@@ -784,6 +865,26 @@ class ChatInputComponent {
|
|
|
784
865
|
this.submitted.emit(this.value().trim());
|
|
785
866
|
}
|
|
786
867
|
}
|
|
868
|
+
queue() {
|
|
869
|
+
this.queued.emit(this.value().trim());
|
|
870
|
+
}
|
|
871
|
+
redirect() {
|
|
872
|
+
this.redirected.emit(this.value().trim());
|
|
873
|
+
}
|
|
874
|
+
onSendPressed() {
|
|
875
|
+
if (this.queueShown()) {
|
|
876
|
+
this.queue();
|
|
877
|
+
}
|
|
878
|
+
else if (this.stopShown()) {
|
|
879
|
+
this.stopRequested.emit();
|
|
880
|
+
}
|
|
881
|
+
else if (this.canSubmit()) {
|
|
882
|
+
this.submit();
|
|
883
|
+
}
|
|
884
|
+
else {
|
|
885
|
+
this.focus();
|
|
886
|
+
}
|
|
887
|
+
}
|
|
787
888
|
/** Moves keyboard focus to the text area. */
|
|
788
889
|
focus(options) {
|
|
789
890
|
this.textarea().focus(options);
|
|
@@ -797,7 +898,12 @@ class ChatInputComponent {
|
|
|
797
898
|
return;
|
|
798
899
|
}
|
|
799
900
|
event.preventDefault();
|
|
800
|
-
this.
|
|
901
|
+
if (this.queueShown()) {
|
|
902
|
+
this.queue();
|
|
903
|
+
}
|
|
904
|
+
else {
|
|
905
|
+
this.submit();
|
|
906
|
+
}
|
|
801
907
|
}
|
|
802
908
|
onPaste(event) {
|
|
803
909
|
const images = Array.from(event.clipboardData?.files ?? []).filter((file) => file.type.startsWith('image/'));
|
|
@@ -807,12 +913,18 @@ class ChatInputComponent {
|
|
|
807
913
|
}
|
|
808
914
|
}
|
|
809
915
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChatInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
810
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ChatInputComponent, isStandalone: true, selector: "ds-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 }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, minRows: { classPropertyName: "minRows", publicName: "minRows", isSignal: true, isRequired: false, transformFunction: null }, maxRows: { classPropertyName: "maxRows", publicName: "maxRows", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, busy: { classPropertyName: "busy", publicName: "busy", isSignal: true, isRequired: false, transformFunction: null }, busyLabel: { classPropertyName: "busyLabel", publicName: "busyLabel", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", submitted: "submitted", filesPasted: "filesPasted" }, viewQueries: [{ propertyName: "textarea", first: true, predicate: TextareaComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"'chat-input layout-' + layout()\">\n <div class=\"attachments\">\n <ng-content select=\"[attachments]\" />\n </div>\n\n @if (statusAbove()) {\n <div\n class=\"status status-above\"\n aria-live=\"polite\">\n {{ statusText() }}\n </div>\n }\n\n <div\n class=\"frame\"\n dsFieldClickFocus\n [class.disabled]=\"disabled()\">\n <div class=\"box\"></div>\n\n <div class=\"chips\">\n <ng-content select=\"[chips]\" />\n </div>\n\n <ds-textarea\n autosize\n resize=\"none\"\n [rows]=\"minRows()\"\n [minRows]=\"minRows()\"\n [maxRows]=\"maxRows()\"\n [placeholder]=\"placeholder()\"\n [ariaLabel]=\"textareaLabel()\"\n [disabled]=\"disabled()\"\n [(value)]=\"value\"\n (keydown)=\"onKeydown($event)\"\n (paste)=\"onPaste($event)\" />\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\" />\n </div>\n\n @if (!statusAbove()) {\n <span\n class=\"status status-bar\"\n aria-live=\"polite\">\n {{ statusText() }}\n </span>\n }\n\n <div class=\"send\">\n <ng-content select=\"[send]\">\n <ds-button\n icon=\"arrowUp\"\n size=\"sm\"\n class=\"send-button\"\n loadingMode=\"icon\"\n [ariaLabel]=\"sendLabel()\"\n [disabled]=\"!busy() && !canSubmit()\"\n [loading]=\"busy()\"\n (pressed)=\"submit()\" />\n </ng-content>\n </div>\n </div>\n</div>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_field-border-color: var(--ds-field-border-color, var(--border-default));--_field-border-color-hover: var(--ds-field-border-color-hover, var(--border-strong));--_field-border-color-focus: var(--ds-field-border-color-focus, var(--accent));--_field-text-color: var(--ds-field-text-color, var(--text-primary));--_field-placeholder-color: var(--ds-field-placeholder-color, var(--text-tertiary));--_field-font-size: var(--ds-field-font-size, var(--font-size-s));--_chat-input-bg-color: var(--ds-chat-input-bg-color, var(--surface-default));--_chat-input-radius: var(--ds-chat-input-radius, var(--ds-radius-control));--_chat-input-padding: var(--ds-chat-input-padding, var(--space-2));display:block}.chat-input{display:flex;flex-direction:column;gap:var(--space-1)}.frame{--_p: var(--_chat-input-padding);display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-rows:auto auto auto;grid-template-areas:\"chips chips chips\" \"text text text\" \"actions status send\";column-gap:var(--space-2);cursor:text}@media not (forced-colors:active){.frame ds-textarea:where(:focus-visible){outline:none}}.box{grid-row:1/4;grid-column:1/4;background-color:var(--_chat-input-bg-color);border:var(--border-width-default) solid var(--_field-border-color);border-radius:var(--_chat-input-radius);transition:border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard)}.frame:has(ds-textarea:hover,.chips:hover) .box{border-color:var(--_field-border-color-hover)}.frame:has(ds-textarea:focus-within) .box{border-color:var(--_field-border-color-focus);box-shadow:var(--ds-field-focus-shadow)}.frame.disabled{cursor:default}.frame.disabled .box{background-color:var(--surface-disabled);border-color:var(--border-disabled)}ds-textarea{--ds-input-bg-color: transparent;--ds-input-bg-color-disabled: transparent;--ds-input-border: transparent;--ds-input-border-hover: transparent;--ds-input-border-focus: transparent;--ds-input-focus-shadow: none;--ds-input-padding-x: var(--space-2);--ds-input-padding-y: var(--space-1);--border-disabled: transparent;grid-area:text;margin:var(--_p) var(--_p) var(--space-1)}.chips{display:flex;flex-wrap:wrap;grid-area:chips;gap:var(--space-2);margin:var(--_p) calc(var(--_p) + var(--space-1)) 0}.chips:empty{display:none}.actions{display:flex;grid-area:actions;align-items:center;gap:var(--space-1);margin:0 0 var(--_p) var(--_p)}.status{overflow:clip visible;text-overflow:ellipsis;white-space:nowrap;color:var(--text-secondary);font-size:var(--font-size-s);line-height:var(--line-height-base)}.status-bar{grid-area:status;align-self:center;min-width:0;text-align:end;margin-block-end:var(--_p)}.status-above{min-height:1lh;padding-inline:var(--space-4)}.send{display:flex;grid-area:send;align-items:center;gap:var(--space-2);margin:0 var(--_p) var(--_p) 0}.send-button{--ds-button-padding-x: 0;width:var(--field-h-sm)}.layout-split .frame{grid-template-rows:auto auto;grid-template-areas:\". chips .\" \"actions text send\"}.layout-split .frame .box{grid-row:1/3;grid-column:2/3}.layout-split .frame ds-textarea{margin-block-end:var(--_p)}.layout-split .frame .actions,.layout-split .frame .send{align-self:end;margin:0 0 calc(var(--_p) - var(--space-1) / 2)}.layout-send-outside .frame{grid-template-areas:\"chips chips .\" \"text text .\" \"actions status send\"}.layout-send-outside .frame .box{grid-column:1/3}.layout-send-outside .frame .status-bar{margin-inline-end:var(--_p)}.layout-send-outside .frame .send{align-self:end;margin:0}.layout-send-outside .frame .send-button{--ds-button-height: var(--field-h-md);--ds-button-radius: 50%;width:var(--field-h-md)}.layout-toolbar .frame .box{grid-row:1/3}.layout-toolbar .frame ds-textarea{margin-block-end:var(--_p)}.layout-toolbar .frame .actions,.layout-toolbar .frame .status-bar,.layout-toolbar .frame .send{margin:var(--space-1) 0 0}.attachments{display:flex;flex-direction:column;gap:var(--space-2);margin-block-end:var(--space-1)}.attachments:empty{display:none}\n"], dependencies: [{ kind: "component", type: TextareaComponent, selector: "ds-textarea", inputs: ["value", "size", "label", "placeholder", "disabled", "readOnly", "readonly", "success", "required", "optional", "rows", "name", "autosize", "minRows", "maxRows", "resize", "ariaLabel", "maxLength", "maxLengthMode", "countTrimmed", "minLength", "pattern"], outputs: ["valueChange"] }, { kind: "component", type: ButtonComponent, selector: "ds-button", inputs: ["color", "variant", "align", "size", "routerLink", "href", "fragment", "queryParams", "queryParamsHandling", "target", "rel", "routerLinkActiveOptions", "ariaCurrent", "type", "disabled", "loading", "loadingMode", "fullWidth", "ariaLabel", "icon", "trailingIcon", "ariaHasPopup", "ariaExpanded", "ariaControls", "disabledReason", "ariaDescribedBy"], outputs: ["pressed"] }, { kind: "directive", type: FieldClickFocusDirective, selector: "[dsFieldClickFocus]" }] });
|
|
916
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ChatInputComponent, isStandalone: true, selector: "ds-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 }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, minRows: { classPropertyName: "minRows", publicName: "minRows", isSignal: true, isRequired: false, transformFunction: null }, maxRows: { classPropertyName: "maxRows", publicName: "maxRows", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, busy: { classPropertyName: "busy", publicName: "busy", isSignal: true, isRequired: false, transformFunction: null }, stoppable: { classPropertyName: "stoppable", publicName: "stoppable", isSignal: true, isRequired: false, transformFunction: null }, busyAction: { classPropertyName: "busyAction", publicName: "busyAction", isSignal: true, isRequired: false, transformFunction: null }, busyLabel: { classPropertyName: "busyLabel", publicName: "busyLabel", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", submitted: "submitted", stopRequested: "stopRequested", queued: "queued", redirected: "redirected", filesPasted: "filesPasted" }, viewQueries: [{ propertyName: "textarea", first: true, predicate: TextareaComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"'chat-input layout-' + layout()\">\n <div class=\"attachments\">\n <ng-content select=\"[attachments]\" />\n </div>\n\n @if (statusAbove()) {\n <div\n class=\"status status-above\"\n aria-live=\"polite\">\n {{ statusText() }}\n </div>\n }\n\n <div\n class=\"frame\"\n dsFieldClickFocus\n [class.disabled]=\"disabled()\">\n <div class=\"box\"></div>\n\n <div class=\"chips\">\n <ng-content select=\"[chips]\" />\n </div>\n\n <ds-textarea\n autosize\n resize=\"none\"\n [rows]=\"minRows()\"\n [minRows]=\"minRows()\"\n [maxRows]=\"maxRows()\"\n [placeholder]=\"placeholder()\"\n [ariaLabel]=\"textareaLabel()\"\n [disabled]=\"disabled()\"\n [(value)]=\"value\"\n (keydown)=\"onKeydown($event)\"\n (paste)=\"onPaste($event)\" />\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\" />\n </div>\n\n @if (!statusAbove()) {\n <span\n class=\"status status-bar\"\n aria-live=\"polite\">\n {{ statusText() }}\n </span>\n }\n\n <div\n class=\"send\"\n [class.queue]=\"queueShown()\">\n @if (queueShown()) {\n <ds-icon-button\n icon=\"send\"\n size=\"sm\"\n [ariaLabel]=\"redirectLabel()\"\n [dsTooltip]=\"redirectLabel()\"\n (pressed)=\"redirect()\" />\n\n @if (stoppable()) {\n <ds-icon-button\n icon=\"stop\"\n size=\"sm\"\n [ariaLabel]=\"stopLabel()\"\n [dsTooltip]=\"stopLabel()\"\n (pressed)=\"stopRequested.emit()\" />\n }\n }\n\n <ng-content select=\"[send]\">\n <ds-button\n size=\"sm\"\n class=\"send-button\"\n loadingMode=\"icon\"\n [class.stop]=\"stopShown()\"\n [icon]=\"mainIcon()\"\n [ariaLabel]=\"mainLabel()\"\n [dsTooltip]=\"stopShown() || queueShown() ? mainLabel() : ''\"\n [disabled]=\"disabled()\"\n [loading]=\"busy() && !stopShown() && !queueShown()\"\n (pressed)=\"onSendPressed()\" />\n </ng-content>\n </div>\n </div>\n</div>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_field-border-color: var(--ds-field-border-color, var(--border-field));--_field-border-color-hover: var(--ds-field-border-color-hover, var(--border-field-hover));--_field-border-color-focus: var(--ds-field-border-color-focus, var(--accent));--_field-text-color: var(--ds-field-text-color, var(--text-primary));--_field-placeholder-color: var(--ds-field-placeholder-color, var(--text-tertiary));--_field-font-size: var(--ds-field-font-size, var(--font-size-s));--_chat-input-bg-color: var(--ds-chat-input-bg-color, var(--surface-default));--_chat-input-radius: var(--ds-chat-input-radius, var(--ds-radius-control));--_chat-input-padding: var(--ds-chat-input-padding, var(--space-2));display:block}.chat-input{display:flex;flex-direction:column;gap:var(--space-1)}.frame{--_p: var(--_chat-input-padding);display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-rows:auto auto auto;grid-template-areas:\"chips chips chips\" \"text text text\" \"actions status send\";column-gap:var(--space-2);cursor:text}@media not (forced-colors:active){.frame ds-textarea:where(:focus-visible){outline:none}}.box{grid-row:1/4;grid-column:1/4;background-color:var(--_chat-input-bg-color);border:var(--border-width-default) solid var(--_field-border-color);border-radius:var(--_chat-input-radius);transition:border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard)}.frame:has(ds-textarea:hover,.chips:hover) .box{border-color:var(--_field-border-color-hover)}.frame:has(ds-textarea:focus-within) .box{border-color:var(--_field-border-color-focus);box-shadow:var(--ds-field-focus-shadow)}.frame.disabled{cursor:default}.frame.disabled .box{background-color:var(--surface-disabled);border-color:var(--border-disabled)}ds-textarea{--ds-input-bg-color: transparent;--ds-input-bg-color-disabled: transparent;--ds-input-border: transparent;--ds-input-border-hover: transparent;--ds-input-border-focus: transparent;--ds-input-focus-shadow: none;--ds-input-padding-x: var(--space-2);--ds-input-padding-y: var(--space-1);--border-disabled: transparent;grid-area:text;margin:var(--_p) var(--_p) var(--space-1)}.chips{display:flex;flex-wrap:wrap;grid-area:chips;gap:var(--space-2);margin:var(--_p) calc(var(--_p) + var(--space-1)) 0}.chips:empty{display:none}.actions{display:flex;grid-area:actions;align-items:center;gap:var(--space-1);margin:0 0 var(--_p) var(--_p)}.status{overflow:clip visible;text-overflow:ellipsis;white-space:nowrap;color:var(--text-secondary);font-size:var(--font-size-s);line-height:var(--line-height-base)}.status-bar{grid-area:status;align-self:center;min-width:0;text-align:end;margin-block-end:var(--_p)}.status-above{min-height:1lh;padding-inline:var(--space-4)}.send{display:flex;grid-area:send;align-items:center;gap:var(--space-2);margin:0 var(--_p) var(--_p) 0}.send.queue{gap:var(--space-0-5)}.send-button{--ds-button-padding-x: 0;--_send-radius: var(--ds-button-radius, var(--ds-radius-control));width:var(--field-h-sm)}@property --_send-ring-angle{syntax: \"<angle>\"; inherits: false; initial-value: 0deg;}.send-button.stop{position:relative}.send-button.stop:after{content:\"\";position:absolute;inset:calc(var(--space-1) * -1);padding:var(--border-width-strong);border-radius:calc(var(--_send-radius) + var(--space-1));background:conic-gradient(from var(--_send-ring-angle),var(--primary) 0 30%,var(--primary-muted) 30% 100%);-webkit-mask:linear-gradient(var(--primary) 0 0) content-box exclude,linear-gradient(var(--primary) 0 0);mask:linear-gradient(var(--primary) 0 0) content-box exclude,linear-gradient(var(--primary) 0 0);pointer-events:none;animation:send-ring-turn var(--duration-loop-slow) linear infinite}@keyframes send-ring-turn{to{--_send-ring-angle: 360deg}}.layout-split .frame{grid-template-rows:auto auto;grid-template-areas:\". chips .\" \"actions text send\"}.layout-split .frame .box{grid-row:1/3;grid-column:2/3}.layout-split .frame ds-textarea{margin-block-end:var(--_p)}.layout-split .frame .actions,.layout-split .frame .send{align-self:end;margin:0 0 calc(var(--_p) - var(--space-1) / 2)}.layout-send-outside .frame{grid-template-areas:\"chips chips .\" \"text text .\" \"actions status send\"}.layout-send-outside .frame .box{grid-column:1/3}.layout-send-outside .frame .status-bar{margin-inline-end:var(--_p)}.layout-send-outside .frame .send{align-self:end;margin:0}.layout-send-outside .frame .send-button{--ds-button-height: var(--field-h-md);--ds-button-radius: 50%;--_send-radius: 50%;width:var(--field-h-md)}.layout-toolbar .frame .box{grid-row:1/3}.layout-toolbar .frame ds-textarea{margin-block-end:var(--_p)}.layout-toolbar .frame .actions,.layout-toolbar .frame .status-bar,.layout-toolbar .frame .send{margin:var(--space-1) 0 0}.attachments{display:flex;flex-direction:column;gap:var(--space-2);margin-block-end:var(--space-1)}.attachments:empty{display:none}\n"], dependencies: [{ kind: "component", type: TextareaComponent, selector: "ds-textarea", inputs: ["value", "size", "label", "placeholder", "disabled", "readOnly", "readonly", "success", "required", "optional", "rows", "name", "autosize", "minRows", "maxRows", "resize", "ariaLabel", "maxLength", "maxLengthMode", "countTrimmed", "minLength", "pattern"], outputs: ["valueChange"] }, { kind: "component", type: ButtonComponent, selector: "ds-button", inputs: ["color", "variant", "align", "size", "routerLink", "href", "fragment", "queryParams", "queryParamsHandling", "target", "rel", "routerLinkActiveOptions", "ariaCurrent", "type", "disabled", "loading", "loadingMode", "fullWidth", "ariaLabel", "icon", "trailingIcon", "ariaHasPopup", "ariaExpanded", "ariaControls", "disabledReason", "ariaDescribedBy"], outputs: ["pressed"] }, { kind: "component", type: IconButtonComponent, selector: "ds-icon-button", inputs: ["icon", "ariaLabel", "ariaDescribedBy", "variant", "color", "size", "type", "disabled", "selected", "ariaHasPopup", "ariaExpanded", "ariaControls"], outputs: ["pressed"] }, { kind: "directive", type: TooltipDirective, selector: "[dsTooltip], [dsTooltipWhenClipped]", inputs: ["dsTooltip", "dsTooltipConfig", "dsTooltipPlacement", "dsTooltipDelay", "dsTooltipArrow", "dsTooltipWhenClipped", "dsTooltipPinOnClick"] }, { kind: "directive", type: FieldClickFocusDirective, selector: "[dsFieldClickFocus]" }] });
|
|
811
917
|
}
|
|
812
918
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChatInputComponent, decorators: [{
|
|
813
919
|
type: Component,
|
|
814
|
-
args: [{ selector: 'ds-chat-input', standalone: true, imports: [
|
|
815
|
-
|
|
920
|
+
args: [{ selector: 'ds-chat-input', standalone: true, imports: [
|
|
921
|
+
TextareaComponent,
|
|
922
|
+
ButtonComponent,
|
|
923
|
+
IconButtonComponent,
|
|
924
|
+
TooltipDirective,
|
|
925
|
+
FieldClickFocusDirective,
|
|
926
|
+
], encapsulation: ViewEncapsulation.Emulated, template: "<div [class]=\"'chat-input layout-' + layout()\">\n <div class=\"attachments\">\n <ng-content select=\"[attachments]\" />\n </div>\n\n @if (statusAbove()) {\n <div\n class=\"status status-above\"\n aria-live=\"polite\">\n {{ statusText() }}\n </div>\n }\n\n <div\n class=\"frame\"\n dsFieldClickFocus\n [class.disabled]=\"disabled()\">\n <div class=\"box\"></div>\n\n <div class=\"chips\">\n <ng-content select=\"[chips]\" />\n </div>\n\n <ds-textarea\n autosize\n resize=\"none\"\n [rows]=\"minRows()\"\n [minRows]=\"minRows()\"\n [maxRows]=\"maxRows()\"\n [placeholder]=\"placeholder()\"\n [ariaLabel]=\"textareaLabel()\"\n [disabled]=\"disabled()\"\n [(value)]=\"value\"\n (keydown)=\"onKeydown($event)\"\n (paste)=\"onPaste($event)\" />\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\" />\n </div>\n\n @if (!statusAbove()) {\n <span\n class=\"status status-bar\"\n aria-live=\"polite\">\n {{ statusText() }}\n </span>\n }\n\n <div\n class=\"send\"\n [class.queue]=\"queueShown()\">\n @if (queueShown()) {\n <ds-icon-button\n icon=\"send\"\n size=\"sm\"\n [ariaLabel]=\"redirectLabel()\"\n [dsTooltip]=\"redirectLabel()\"\n (pressed)=\"redirect()\" />\n\n @if (stoppable()) {\n <ds-icon-button\n icon=\"stop\"\n size=\"sm\"\n [ariaLabel]=\"stopLabel()\"\n [dsTooltip]=\"stopLabel()\"\n (pressed)=\"stopRequested.emit()\" />\n }\n }\n\n <ng-content select=\"[send]\">\n <ds-button\n size=\"sm\"\n class=\"send-button\"\n loadingMode=\"icon\"\n [class.stop]=\"stopShown()\"\n [icon]=\"mainIcon()\"\n [ariaLabel]=\"mainLabel()\"\n [dsTooltip]=\"stopShown() || queueShown() ? mainLabel() : ''\"\n [disabled]=\"disabled()\"\n [loading]=\"busy() && !stopShown() && !queueShown()\"\n (pressed)=\"onSendPressed()\" />\n </ng-content>\n </div>\n </div>\n</div>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_field-border-color: var(--ds-field-border-color, var(--border-field));--_field-border-color-hover: var(--ds-field-border-color-hover, var(--border-field-hover));--_field-border-color-focus: var(--ds-field-border-color-focus, var(--accent));--_field-text-color: var(--ds-field-text-color, var(--text-primary));--_field-placeholder-color: var(--ds-field-placeholder-color, var(--text-tertiary));--_field-font-size: var(--ds-field-font-size, var(--font-size-s));--_chat-input-bg-color: var(--ds-chat-input-bg-color, var(--surface-default));--_chat-input-radius: var(--ds-chat-input-radius, var(--ds-radius-control));--_chat-input-padding: var(--ds-chat-input-padding, var(--space-2));display:block}.chat-input{display:flex;flex-direction:column;gap:var(--space-1)}.frame{--_p: var(--_chat-input-padding);display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-rows:auto auto auto;grid-template-areas:\"chips chips chips\" \"text text text\" \"actions status send\";column-gap:var(--space-2);cursor:text}@media not (forced-colors:active){.frame ds-textarea:where(:focus-visible){outline:none}}.box{grid-row:1/4;grid-column:1/4;background-color:var(--_chat-input-bg-color);border:var(--border-width-default) solid var(--_field-border-color);border-radius:var(--_chat-input-radius);transition:border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard)}.frame:has(ds-textarea:hover,.chips:hover) .box{border-color:var(--_field-border-color-hover)}.frame:has(ds-textarea:focus-within) .box{border-color:var(--_field-border-color-focus);box-shadow:var(--ds-field-focus-shadow)}.frame.disabled{cursor:default}.frame.disabled .box{background-color:var(--surface-disabled);border-color:var(--border-disabled)}ds-textarea{--ds-input-bg-color: transparent;--ds-input-bg-color-disabled: transparent;--ds-input-border: transparent;--ds-input-border-hover: transparent;--ds-input-border-focus: transparent;--ds-input-focus-shadow: none;--ds-input-padding-x: var(--space-2);--ds-input-padding-y: var(--space-1);--border-disabled: transparent;grid-area:text;margin:var(--_p) var(--_p) var(--space-1)}.chips{display:flex;flex-wrap:wrap;grid-area:chips;gap:var(--space-2);margin:var(--_p) calc(var(--_p) + var(--space-1)) 0}.chips:empty{display:none}.actions{display:flex;grid-area:actions;align-items:center;gap:var(--space-1);margin:0 0 var(--_p) var(--_p)}.status{overflow:clip visible;text-overflow:ellipsis;white-space:nowrap;color:var(--text-secondary);font-size:var(--font-size-s);line-height:var(--line-height-base)}.status-bar{grid-area:status;align-self:center;min-width:0;text-align:end;margin-block-end:var(--_p)}.status-above{min-height:1lh;padding-inline:var(--space-4)}.send{display:flex;grid-area:send;align-items:center;gap:var(--space-2);margin:0 var(--_p) var(--_p) 0}.send.queue{gap:var(--space-0-5)}.send-button{--ds-button-padding-x: 0;--_send-radius: var(--ds-button-radius, var(--ds-radius-control));width:var(--field-h-sm)}@property --_send-ring-angle{syntax: \"<angle>\"; inherits: false; initial-value: 0deg;}.send-button.stop{position:relative}.send-button.stop:after{content:\"\";position:absolute;inset:calc(var(--space-1) * -1);padding:var(--border-width-strong);border-radius:calc(var(--_send-radius) + var(--space-1));background:conic-gradient(from var(--_send-ring-angle),var(--primary) 0 30%,var(--primary-muted) 30% 100%);-webkit-mask:linear-gradient(var(--primary) 0 0) content-box exclude,linear-gradient(var(--primary) 0 0);mask:linear-gradient(var(--primary) 0 0) content-box exclude,linear-gradient(var(--primary) 0 0);pointer-events:none;animation:send-ring-turn var(--duration-loop-slow) linear infinite}@keyframes send-ring-turn{to{--_send-ring-angle: 360deg}}.layout-split .frame{grid-template-rows:auto auto;grid-template-areas:\". chips .\" \"actions text send\"}.layout-split .frame .box{grid-row:1/3;grid-column:2/3}.layout-split .frame ds-textarea{margin-block-end:var(--_p)}.layout-split .frame .actions,.layout-split .frame .send{align-self:end;margin:0 0 calc(var(--_p) - var(--space-1) / 2)}.layout-send-outside .frame{grid-template-areas:\"chips chips .\" \"text text .\" \"actions status send\"}.layout-send-outside .frame .box{grid-column:1/3}.layout-send-outside .frame .status-bar{margin-inline-end:var(--_p)}.layout-send-outside .frame .send{align-self:end;margin:0}.layout-send-outside .frame .send-button{--ds-button-height: var(--field-h-md);--ds-button-radius: 50%;--_send-radius: 50%;width:var(--field-h-md)}.layout-toolbar .frame .box{grid-row:1/3}.layout-toolbar .frame ds-textarea{margin-block-end:var(--_p)}.layout-toolbar .frame .actions,.layout-toolbar .frame .status-bar,.layout-toolbar .frame .send{margin:var(--space-1) 0 0}.attachments{display:flex;flex-direction:column;gap:var(--space-2);margin-block-end:var(--space-1)}.attachments:empty{display:none}\n"] }]
|
|
927
|
+
}], propDecorators: { textarea: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TextareaComponent), { 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 }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], minRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "minRows", required: false }] }], maxRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxRows", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], busy: [{ type: i0.Input, args: [{ isSignal: true, alias: "busy", required: false }] }], stoppable: [{ type: i0.Input, args: [{ isSignal: true, alias: "stoppable", required: false }] }], busyAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "busyAction", required: false }] }], busyLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "busyLabel", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], submitted: [{ type: i0.Output, args: ["submitted"] }], stopRequested: [{ type: i0.Output, args: ["stopRequested"] }], queued: [{ type: i0.Output, args: ["queued"] }], redirected: [{ type: i0.Output, args: ["redirected"] }], filesPasted: [{ type: i0.Output, args: ["filesPasted"] }] } });
|
|
816
928
|
|
|
817
929
|
/**
|
|
818
930
|
* A file attached to a message: a type tile or an image preview, the file name and a second line
|