@progress/kendo-angular-conversational-ui 21.1.1-develop.1 → 21.2.0-develop.1
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/chat/message-list.component.d.ts +2 -2
- package/esm2022/ai-prompt/aiprompt.component.mjs +155 -139
- package/esm2022/ai-prompt/common/output-card.component.mjs +81 -83
- package/esm2022/ai-prompt/views/output-view.component.mjs +27 -29
- package/esm2022/ai-prompt/views/prompt-view.component.mjs +150 -135
- package/esm2022/chat/attachment.component.mjs +53 -37
- package/esm2022/chat/cards/hero-card.component.mjs +48 -35
- package/esm2022/chat/chat-file.component.mjs +32 -29
- package/esm2022/chat/chat.component.mjs +251 -241
- package/esm2022/chat/message-attachments.component.mjs +58 -53
- package/esm2022/chat/message-box.component.mjs +203 -183
- package/esm2022/chat/message-list.component.mjs +247 -207
- package/esm2022/chat/message-reference-content.component.mjs +30 -19
- package/esm2022/chat/message.component.mjs +307 -279
- package/esm2022/chat/suggested-actions.component.mjs +139 -131
- package/esm2022/inline-ai-prompt/inlineaiprompt-content.component.mjs +205 -179
- package/esm2022/package-metadata.mjs +2 -2
- package/fesm2022/progress-kendo-angular-conversational-ui.mjs +1979 -1767
- package/package.json +14 -14
- package/schematics/ngAdd/index.js +4 -0
|
@@ -7,7 +7,7 @@ import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
|
7
7
|
import { BaseView } from './base-view';
|
|
8
8
|
import { AIPromptService } from '../common/aiprompt.service';
|
|
9
9
|
import { AIPromptOutputCardComponent } from '../common/output-card.component';
|
|
10
|
-
import {
|
|
10
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
11
11
|
import * as i0 from "@angular/core";
|
|
12
12
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
13
13
|
import * as i2 from "../common/aiprompt.service";
|
|
@@ -40,26 +40,25 @@ export class OutputViewComponent extends BaseView {
|
|
|
40
40
|
return this.service.outputTemplate?.templateRef;
|
|
41
41
|
}
|
|
42
42
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: OutputViewComponent, deps: [{ token: i1.LocalizationService }, { token: i2.AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
|
|
43
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
43
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: OutputViewComponent, isStandalone: true, selector: "kendo-aiprompt-output-view", providers: [{
|
|
44
44
|
provide: BaseView,
|
|
45
45
|
useExisting: forwardRef(() => OutputViewComponent)
|
|
46
46
|
}], usesInheritance: true, ngImport: i0, template: `
|
|
47
47
|
<ng-template #content>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
</ng-container>
|
|
55
|
-
</ng-container>
|
|
56
|
-
<ng-template #defaultTemplate>
|
|
57
|
-
<div kendoAIPromptOutputCard [promptOutput]="output"></div>
|
|
58
|
-
</ng-template>
|
|
48
|
+
<div
|
|
49
|
+
class="k-card-list"
|
|
50
|
+
role="list">
|
|
51
|
+
@for (output of promptOutputs; track output) {
|
|
52
|
+
@if (customTemplate) {
|
|
53
|
+
<ng-container *ngTemplateOutlet="customTemplate; context: { $implicit: output }">
|
|
59
54
|
</ng-container>
|
|
60
|
-
|
|
55
|
+
} @else {
|
|
56
|
+
<div kendoAIPromptOutputCard [promptOutput]="output"></div>
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
</div>
|
|
61
60
|
</ng-template>
|
|
62
|
-
|
|
61
|
+
`, isInline: true, dependencies: [{ kind: "component", type: AIPromptOutputCardComponent, selector: "[kendoAIPromptOutputCard]", inputs: ["promptOutput"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
63
62
|
}
|
|
64
63
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: OutputViewComponent, decorators: [{
|
|
65
64
|
type: Component,
|
|
@@ -71,22 +70,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
71
70
|
}],
|
|
72
71
|
template: `
|
|
73
72
|
<ng-template #content>
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
</ng-container>
|
|
81
|
-
</ng-container>
|
|
82
|
-
<ng-template #defaultTemplate>
|
|
83
|
-
<div kendoAIPromptOutputCard [promptOutput]="output"></div>
|
|
84
|
-
</ng-template>
|
|
73
|
+
<div
|
|
74
|
+
class="k-card-list"
|
|
75
|
+
role="list">
|
|
76
|
+
@for (output of promptOutputs; track output) {
|
|
77
|
+
@if (customTemplate) {
|
|
78
|
+
<ng-container *ngTemplateOutlet="customTemplate; context: { $implicit: output }">
|
|
85
79
|
</ng-container>
|
|
86
|
-
|
|
80
|
+
} @else {
|
|
81
|
+
<div kendoAIPromptOutputCard [promptOutput]="output"></div>
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
</div>
|
|
87
85
|
</ng-template>
|
|
88
|
-
|
|
86
|
+
`,
|
|
89
87
|
standalone: true,
|
|
90
|
-
imports: [
|
|
88
|
+
imports: [AIPromptOutputCardComponent, NgTemplateOutlet]
|
|
91
89
|
}]
|
|
92
90
|
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i2.AIPromptService }] });
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Component, forwardRef, isDevMode } from '@angular/core';
|
|
6
|
-
import { NgIf, NgFor } from '@angular/common';
|
|
7
6
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
7
|
import { guid } from '@progress/kendo-angular-common';
|
|
9
8
|
import { chevronDownIcon, chevronUpIcon } from '@progress/kendo-svg-icons';
|
|
@@ -105,84 +104,92 @@ export class PromptViewComponent extends BaseView {
|
|
|
105
104
|
}
|
|
106
105
|
}
|
|
107
106
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PromptViewComponent, deps: [{ token: i1.LocalizationService }, { token: i2.AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
|
|
108
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
107
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: PromptViewComponent, isStandalone: true, selector: "kendo-aiprompt-prompt-view", providers: [
|
|
109
108
|
{
|
|
110
109
|
provide: BaseView,
|
|
111
110
|
useExisting: forwardRef(() => PromptViewComponent)
|
|
112
111
|
}
|
|
113
112
|
], usesInheritance: true, ngImport: i0, template: `
|
|
114
113
|
<ng-template #content>
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
114
|
+
<kendo-textarea
|
|
115
|
+
[cols]="textareaSettings?.cols"
|
|
116
|
+
[disabled]="textareaSettings?.disabled"
|
|
117
|
+
[fillMode]="textareaSettings?.fillMode"
|
|
118
|
+
[flow]="textareaSettings?.flow ?? 'vertical'"
|
|
119
|
+
[inputAttributes]="textareaSettings?.inputAttributes"
|
|
120
|
+
[maxlength]="textareaSettings?.maxlength"
|
|
121
|
+
[placeholder]="textareaSettings?.placeholder ?? messageFor('promptPlaceholder')"
|
|
122
|
+
[readonly]="textareaSettings?.readonly"
|
|
123
|
+
[resizable]="textareaSettings?.resizable ?? 'vertical'"
|
|
124
|
+
[rounded]="textareaSettings?.rounded"
|
|
125
|
+
[rows]="textareaSettings?.rows ?? 1"
|
|
126
|
+
[selectOnFocus]="textareaSettings?.selectOnFocus"
|
|
127
|
+
[showSuffixSeparator]="textareaSettings?.showSuffixSeparator ?? true"
|
|
128
|
+
[size]="textareaSettings?.size"
|
|
129
|
+
[tabIndex]="textareaSettings?.tabindex"
|
|
130
|
+
[title]="textareaSettings?.title"
|
|
131
|
+
[(value)]="textAreaValue"
|
|
133
132
|
>
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
@if (speechToTextButtonSettings) {
|
|
134
|
+
<kendo-textarea-suffix>
|
|
135
|
+
<button kendoSpeechToTextButton
|
|
136
|
+
role="button"
|
|
137
|
+
[continuous]="speechToTextButtonSettings?.continuous"
|
|
138
|
+
[disabled]="speechToTextButtonSettings?.disabled"
|
|
139
|
+
[fillMode]="speechToTextButtonSettings?.fillMode ?? 'flat'"
|
|
140
|
+
[integrationMode]="speechToTextButtonSettings?.integrationMode ?? 'webSpeech'"
|
|
141
|
+
[interimResults]="speechToTextButtonSettings?.interimResults"
|
|
142
|
+
[lang]="speechToTextButtonSettings?.lang"
|
|
143
|
+
[maxAlternatives]="speechToTextButtonSettings?.maxAlternatives"
|
|
144
|
+
[rounded]="speechToTextButtonSettings?.rounded"
|
|
145
|
+
[size]="speechToTextButtonSettings?.size"
|
|
146
|
+
[themeColor]="speechToTextButtonSettings?.themeColor"
|
|
147
|
+
[attr.aria-label]="messageFor('speechToTextButton')"
|
|
148
|
+
[attr.title]="messageFor('speechToTextButton')"
|
|
149
|
+
[attr.aria-disabled]="speechToTextButtonSettings?.disabled"
|
|
150
|
+
(error)="onSpeechToTextError($event)"
|
|
151
|
+
(result)="onSpeechToTextResult($event)"
|
|
152
|
+
></button>
|
|
153
|
+
</kendo-textarea-suffix>
|
|
154
|
+
}
|
|
155
|
+
</kendo-textarea>
|
|
156
|
+
@if (promptSuggestions) {
|
|
157
|
+
<div
|
|
158
|
+
class="k-prompt-expander">
|
|
159
|
+
<button kendoButton
|
|
160
|
+
[attr.aria-controls]="contentId"
|
|
161
|
+
[attr.aria-expanded]="showSuggestions"
|
|
162
|
+
fillMode="flat"
|
|
163
|
+
[icon]="suggestionsIcons.font"
|
|
164
|
+
[svgIcon]="suggestionsIcons.svg"
|
|
165
|
+
type="button"
|
|
166
|
+
(click)="showSuggestions = !showSuggestions">
|
|
167
|
+
{{messageFor('promptSuggestions')}}
|
|
168
|
+
</button>
|
|
169
|
+
@if (showSuggestions) {
|
|
170
|
+
<div
|
|
171
|
+
class="k-prompt-expander-content"
|
|
172
|
+
[attr.id]="contentId">
|
|
173
|
+
<div class="k-suggestion-group" role="group">
|
|
174
|
+
@for (suggestion of promptSuggestions; track suggestion) {
|
|
175
|
+
<div
|
|
176
|
+
class="k-suggestion"
|
|
136
177
|
role="button"
|
|
137
|
-
[
|
|
138
|
-
[
|
|
139
|
-
[
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
[themeColor]="speechToTextButtonSettings?.themeColor"
|
|
147
|
-
[attr.aria-label]="messageFor('speechToTextButton')"
|
|
148
|
-
[attr.title]="messageFor('speechToTextButton')"
|
|
149
|
-
[attr.aria-disabled]="speechToTextButtonSettings?.disabled"
|
|
150
|
-
(error)="onSpeechToTextError($event)"
|
|
151
|
-
(result)="onSpeechToTextResult($event)"
|
|
152
|
-
></button>
|
|
153
|
-
</kendo-textarea-suffix>
|
|
154
|
-
</kendo-textarea>
|
|
155
|
-
<div *ngIf="promptSuggestions"
|
|
156
|
-
class="k-prompt-expander">
|
|
157
|
-
<button kendoButton
|
|
158
|
-
[attr.aria-controls]="contentId"
|
|
159
|
-
[attr.aria-expanded]="showSuggestions"
|
|
160
|
-
fillMode="flat"
|
|
161
|
-
[icon]="suggestionsIcons.font"
|
|
162
|
-
[svgIcon]="suggestionsIcons.svg"
|
|
163
|
-
type="button"
|
|
164
|
-
(click)="showSuggestions = !showSuggestions">
|
|
165
|
-
{{messageFor('promptSuggestions')}}
|
|
166
|
-
</button>
|
|
167
|
-
<div *ngIf="showSuggestions"
|
|
168
|
-
class="k-prompt-expander-content"
|
|
169
|
-
[attr.id]="contentId">
|
|
170
|
-
<div class="k-suggestion-group" role="group">
|
|
171
|
-
<div *ngFor="let suggestion of promptSuggestions"
|
|
172
|
-
class="k-suggestion"
|
|
173
|
-
role="button"
|
|
174
|
-
[attr.tabindex]="0"
|
|
175
|
-
[attr.aria-label]="suggestion"
|
|
176
|
-
[attr.title]="suggestion"
|
|
177
|
-
(click)="suggestionClick(suggestion)"
|
|
178
|
-
(keydown)="suggestionKeydown($event, suggestion)">
|
|
179
|
-
{{suggestion}}
|
|
180
|
-
</div>
|
|
181
|
-
</div>
|
|
178
|
+
[attr.tabindex]="0"
|
|
179
|
+
[attr.aria-label]="suggestion"
|
|
180
|
+
[attr.title]="suggestion"
|
|
181
|
+
(click)="suggestionClick(suggestion)"
|
|
182
|
+
(keydown)="suggestionKeydown($event, suggestion)">
|
|
183
|
+
{{suggestion}}
|
|
184
|
+
</div>
|
|
185
|
+
}
|
|
186
|
+
</div>
|
|
182
187
|
</div>
|
|
188
|
+
}
|
|
183
189
|
</div>
|
|
190
|
+
}
|
|
184
191
|
</ng-template>
|
|
185
|
-
|
|
192
|
+
`, isInline: true, dependencies: [{ kind: "component", type: TextAreaComponent, selector: "kendo-textarea", inputs: ["focusableId", "flow", "inputAttributes", "adornmentsOrientation", "rows", "cols", "maxlength", "maxResizableRows", "tabindex", "tabIndex", "resizable", "size", "rounded", "fillMode", "showPrefixSeparator", "showSuffixSeparator"], outputs: ["focus", "blur", "valueChange"], exportAs: ["kendoTextArea"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: TextAreaSuffixComponent, selector: "kendo-textarea-suffix", inputs: ["flow", "orientation"], exportAs: ["kendoTextAreaSuffix"] }, { kind: "component", type: SpeechToTextButtonComponent, selector: "button[kendoSpeechToTextButton]", inputs: ["disabled", "size", "rounded", "fillMode", "themeColor", "integrationMode", "lang", "continuous", "interimResults", "maxAlternatives"], outputs: ["start", "end", "result", "error", "click"], exportAs: ["kendoSpeechToTextButton"] }] });
|
|
186
193
|
}
|
|
187
194
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PromptViewComponent, decorators: [{
|
|
188
195
|
type: Component,
|
|
@@ -196,78 +203,86 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
196
203
|
],
|
|
197
204
|
template: `
|
|
198
205
|
<ng-template #content>
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
206
|
+
<kendo-textarea
|
|
207
|
+
[cols]="textareaSettings?.cols"
|
|
208
|
+
[disabled]="textareaSettings?.disabled"
|
|
209
|
+
[fillMode]="textareaSettings?.fillMode"
|
|
210
|
+
[flow]="textareaSettings?.flow ?? 'vertical'"
|
|
211
|
+
[inputAttributes]="textareaSettings?.inputAttributes"
|
|
212
|
+
[maxlength]="textareaSettings?.maxlength"
|
|
213
|
+
[placeholder]="textareaSettings?.placeholder ?? messageFor('promptPlaceholder')"
|
|
214
|
+
[readonly]="textareaSettings?.readonly"
|
|
215
|
+
[resizable]="textareaSettings?.resizable ?? 'vertical'"
|
|
216
|
+
[rounded]="textareaSettings?.rounded"
|
|
217
|
+
[rows]="textareaSettings?.rows ?? 1"
|
|
218
|
+
[selectOnFocus]="textareaSettings?.selectOnFocus"
|
|
219
|
+
[showSuffixSeparator]="textareaSettings?.showSuffixSeparator ?? true"
|
|
220
|
+
[size]="textareaSettings?.size"
|
|
221
|
+
[tabIndex]="textareaSettings?.tabindex"
|
|
222
|
+
[title]="textareaSettings?.title"
|
|
223
|
+
[(value)]="textAreaValue"
|
|
217
224
|
>
|
|
218
|
-
|
|
219
|
-
|
|
225
|
+
@if (speechToTextButtonSettings) {
|
|
226
|
+
<kendo-textarea-suffix>
|
|
227
|
+
<button kendoSpeechToTextButton
|
|
228
|
+
role="button"
|
|
229
|
+
[continuous]="speechToTextButtonSettings?.continuous"
|
|
230
|
+
[disabled]="speechToTextButtonSettings?.disabled"
|
|
231
|
+
[fillMode]="speechToTextButtonSettings?.fillMode ?? 'flat'"
|
|
232
|
+
[integrationMode]="speechToTextButtonSettings?.integrationMode ?? 'webSpeech'"
|
|
233
|
+
[interimResults]="speechToTextButtonSettings?.interimResults"
|
|
234
|
+
[lang]="speechToTextButtonSettings?.lang"
|
|
235
|
+
[maxAlternatives]="speechToTextButtonSettings?.maxAlternatives"
|
|
236
|
+
[rounded]="speechToTextButtonSettings?.rounded"
|
|
237
|
+
[size]="speechToTextButtonSettings?.size"
|
|
238
|
+
[themeColor]="speechToTextButtonSettings?.themeColor"
|
|
239
|
+
[attr.aria-label]="messageFor('speechToTextButton')"
|
|
240
|
+
[attr.title]="messageFor('speechToTextButton')"
|
|
241
|
+
[attr.aria-disabled]="speechToTextButtonSettings?.disabled"
|
|
242
|
+
(error)="onSpeechToTextError($event)"
|
|
243
|
+
(result)="onSpeechToTextResult($event)"
|
|
244
|
+
></button>
|
|
245
|
+
</kendo-textarea-suffix>
|
|
246
|
+
}
|
|
247
|
+
</kendo-textarea>
|
|
248
|
+
@if (promptSuggestions) {
|
|
249
|
+
<div
|
|
250
|
+
class="k-prompt-expander">
|
|
251
|
+
<button kendoButton
|
|
252
|
+
[attr.aria-controls]="contentId"
|
|
253
|
+
[attr.aria-expanded]="showSuggestions"
|
|
254
|
+
fillMode="flat"
|
|
255
|
+
[icon]="suggestionsIcons.font"
|
|
256
|
+
[svgIcon]="suggestionsIcons.svg"
|
|
257
|
+
type="button"
|
|
258
|
+
(click)="showSuggestions = !showSuggestions">
|
|
259
|
+
{{messageFor('promptSuggestions')}}
|
|
260
|
+
</button>
|
|
261
|
+
@if (showSuggestions) {
|
|
262
|
+
<div
|
|
263
|
+
class="k-prompt-expander-content"
|
|
264
|
+
[attr.id]="contentId">
|
|
265
|
+
<div class="k-suggestion-group" role="group">
|
|
266
|
+
@for (suggestion of promptSuggestions; track suggestion) {
|
|
267
|
+
<div
|
|
268
|
+
class="k-suggestion"
|
|
220
269
|
role="button"
|
|
221
|
-
[
|
|
222
|
-
[
|
|
223
|
-
[
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
[themeColor]="speechToTextButtonSettings?.themeColor"
|
|
231
|
-
[attr.aria-label]="messageFor('speechToTextButton')"
|
|
232
|
-
[attr.title]="messageFor('speechToTextButton')"
|
|
233
|
-
[attr.aria-disabled]="speechToTextButtonSettings?.disabled"
|
|
234
|
-
(error)="onSpeechToTextError($event)"
|
|
235
|
-
(result)="onSpeechToTextResult($event)"
|
|
236
|
-
></button>
|
|
237
|
-
</kendo-textarea-suffix>
|
|
238
|
-
</kendo-textarea>
|
|
239
|
-
<div *ngIf="promptSuggestions"
|
|
240
|
-
class="k-prompt-expander">
|
|
241
|
-
<button kendoButton
|
|
242
|
-
[attr.aria-controls]="contentId"
|
|
243
|
-
[attr.aria-expanded]="showSuggestions"
|
|
244
|
-
fillMode="flat"
|
|
245
|
-
[icon]="suggestionsIcons.font"
|
|
246
|
-
[svgIcon]="suggestionsIcons.svg"
|
|
247
|
-
type="button"
|
|
248
|
-
(click)="showSuggestions = !showSuggestions">
|
|
249
|
-
{{messageFor('promptSuggestions')}}
|
|
250
|
-
</button>
|
|
251
|
-
<div *ngIf="showSuggestions"
|
|
252
|
-
class="k-prompt-expander-content"
|
|
253
|
-
[attr.id]="contentId">
|
|
254
|
-
<div class="k-suggestion-group" role="group">
|
|
255
|
-
<div *ngFor="let suggestion of promptSuggestions"
|
|
256
|
-
class="k-suggestion"
|
|
257
|
-
role="button"
|
|
258
|
-
[attr.tabindex]="0"
|
|
259
|
-
[attr.aria-label]="suggestion"
|
|
260
|
-
[attr.title]="suggestion"
|
|
261
|
-
(click)="suggestionClick(suggestion)"
|
|
262
|
-
(keydown)="suggestionKeydown($event, suggestion)">
|
|
263
|
-
{{suggestion}}
|
|
264
|
-
</div>
|
|
265
|
-
</div>
|
|
270
|
+
[attr.tabindex]="0"
|
|
271
|
+
[attr.aria-label]="suggestion"
|
|
272
|
+
[attr.title]="suggestion"
|
|
273
|
+
(click)="suggestionClick(suggestion)"
|
|
274
|
+
(keydown)="suggestionKeydown($event, suggestion)">
|
|
275
|
+
{{suggestion}}
|
|
276
|
+
</div>
|
|
277
|
+
}
|
|
278
|
+
</div>
|
|
266
279
|
</div>
|
|
280
|
+
}
|
|
267
281
|
</div>
|
|
282
|
+
}
|
|
268
283
|
</ng-template>
|
|
269
|
-
|
|
284
|
+
`,
|
|
270
285
|
standalone: true,
|
|
271
|
-
imports: [TextAreaComponent,
|
|
286
|
+
imports: [TextAreaComponent, ButtonComponent, TextAreaSuffixComponent, SpeechToTextButtonComponent]
|
|
272
287
|
}]
|
|
273
288
|
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i2.AIPromptService }] });
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Component, Input } from '@angular/core';
|
|
6
|
-
import {
|
|
6
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
7
7
|
import { AttachmentTemplateDirective } from './templates/attachment-template.directive';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
/**
|
|
@@ -32,55 +32,71 @@ export class AttachmentComponent {
|
|
|
32
32
|
}
|
|
33
33
|
_attachment;
|
|
34
34
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AttachmentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
35
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: AttachmentComponent, isStandalone: true, selector: "kendo-chat-attachment", inputs: { attachment: "attachment", template: "template" }, ngImport: i0, template: `
|
|
36
|
+
@if (template) {
|
|
37
|
+
<ng-container *ngTemplateOutlet="template.templateRef; context: context;">
|
|
38
|
+
</ng-container>
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@if (!template) {
|
|
42
|
+
<div class="k-card">
|
|
42
43
|
<div class="k-card-body">
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
@if (attachment.title) {
|
|
45
|
+
<h5 class="k-card-title">
|
|
46
|
+
{{ attachment.title }}
|
|
47
|
+
</h5>
|
|
48
|
+
}
|
|
49
|
+
@if (attachment.subtitle) {
|
|
50
|
+
<h6 class="k-card-subtitle">
|
|
51
|
+
{{ attachment.subtitle }}
|
|
52
|
+
</h6>
|
|
53
|
+
}
|
|
54
|
+
@if (image) {
|
|
55
|
+
<img [attr.src]="attachment.content" />
|
|
56
|
+
}
|
|
57
|
+
@if (unknown) {
|
|
51
58
|
{{ attachment.content }}
|
|
52
|
-
|
|
59
|
+
}
|
|
53
60
|
</div>
|
|
54
|
-
|
|
55
|
-
|
|
61
|
+
</div>
|
|
62
|
+
}
|
|
63
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
56
64
|
}
|
|
57
65
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AttachmentComponent, decorators: [{
|
|
58
66
|
type: Component,
|
|
59
67
|
args: [{
|
|
60
68
|
selector: 'kendo-chat-attachment',
|
|
61
69
|
template: `
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
70
|
+
@if (template) {
|
|
71
|
+
<ng-container *ngTemplateOutlet="template.templateRef; context: context;">
|
|
72
|
+
</ng-container>
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@if (!template) {
|
|
76
|
+
<div class="k-card">
|
|
68
77
|
<div class="k-card-body">
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
78
|
+
@if (attachment.title) {
|
|
79
|
+
<h5 class="k-card-title">
|
|
80
|
+
{{ attachment.title }}
|
|
81
|
+
</h5>
|
|
82
|
+
}
|
|
83
|
+
@if (attachment.subtitle) {
|
|
84
|
+
<h6 class="k-card-subtitle">
|
|
85
|
+
{{ attachment.subtitle }}
|
|
86
|
+
</h6>
|
|
87
|
+
}
|
|
88
|
+
@if (image) {
|
|
89
|
+
<img [attr.src]="attachment.content" />
|
|
90
|
+
}
|
|
91
|
+
@if (unknown) {
|
|
77
92
|
{{ attachment.content }}
|
|
78
|
-
|
|
93
|
+
}
|
|
79
94
|
</div>
|
|
80
|
-
|
|
81
|
-
|
|
95
|
+
</div>
|
|
96
|
+
}
|
|
97
|
+
`,
|
|
82
98
|
standalone: true,
|
|
83
|
-
imports: [
|
|
99
|
+
imports: [NgTemplateOutlet]
|
|
84
100
|
}]
|
|
85
101
|
}], propDecorators: { attachment: [{
|
|
86
102
|
type: Input
|