@progress/kendo-angular-conversational-ui 21.4.1-develop.1 → 22.0.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/ai-prompt/localization/messages.d.ts +1 -1
- package/ai-prompt/views/base-view.d.ts +1 -1
- package/chat/l10n/messages.d.ts +1 -1
- package/fesm2022/progress-kendo-angular-conversational-ui.mjs +182 -182
- package/inline-ai-prompt/localization/messages.d.ts +1 -1
- package/package.json +17 -25
- package/esm2022/ai-prompt/aiprompt.component.mjs +0 -556
- package/esm2022/ai-prompt/aiprompt.module.mjs +0 -53
- package/esm2022/ai-prompt/common/aiprompt.service.mjs +0 -75
- package/esm2022/ai-prompt/common/output-card.component.mjs +0 -230
- package/esm2022/ai-prompt/common/toolbar-focusable.directive.mjs +0 -72
- package/esm2022/ai-prompt/common/toolbar-navigation.service.mjs +0 -56
- package/esm2022/ai-prompt/localization/custom-messages.component.mjs +0 -54
- package/esm2022/ai-prompt/localization/localized-messages.directive.mjs +0 -39
- package/esm2022/ai-prompt/localization/messages.mjs +0 -77
- package/esm2022/ai-prompt/models/ai-prompt-settings.mjs +0 -5
- package/esm2022/ai-prompt/models/command-execute-event.mjs +0 -5
- package/esm2022/ai-prompt/models/command.interface.mjs +0 -5
- package/esm2022/ai-prompt/models/index.mjs +0 -5
- package/esm2022/ai-prompt/models/output-rating-change-event.mjs +0 -5
- package/esm2022/ai-prompt/models/prompt-output.interface.mjs +0 -5
- package/esm2022/ai-prompt/models/prompt-request-event.mjs +0 -5
- package/esm2022/ai-prompt/models/view-type.mjs +0 -5
- package/esm2022/ai-prompt/templates/aiprompt-output-body-template.directive.mjs +0 -33
- package/esm2022/ai-prompt/templates/aiprompt-output-template.directive.mjs +0 -33
- package/esm2022/ai-prompt/templates/toolbar-actions.template.mjs +0 -39
- package/esm2022/ai-prompt/utils.mjs +0 -26
- package/esm2022/ai-prompt/views/base-view.mjs +0 -98
- package/esm2022/ai-prompt/views/command-view.component.mjs +0 -100
- package/esm2022/ai-prompt/views/custom-view.component.mjs +0 -50
- package/esm2022/ai-prompt/views/index.mjs +0 -8
- package/esm2022/ai-prompt/views/output-view.component.mjs +0 -90
- package/esm2022/ai-prompt/views/prompt-view.component.mjs +0 -288
- package/esm2022/chat/api/action.interface.mjs +0 -5
- package/esm2022/chat/api/attachment.interface.mjs +0 -5
- package/esm2022/chat/api/chat-file-interface.mjs +0 -5
- package/esm2022/chat/api/chat-suggestion.interface.mjs +0 -5
- package/esm2022/chat/api/execute-action-event.mjs +0 -29
- package/esm2022/chat/api/file-action.mjs +0 -5
- package/esm2022/chat/api/file-download-event.interface.mjs +0 -5
- package/esm2022/chat/api/files-layout.mjs +0 -5
- package/esm2022/chat/api/index.mjs +0 -21
- package/esm2022/chat/api/message-action.mjs +0 -5
- package/esm2022/chat/api/message-settings.interface.mjs +0 -5
- package/esm2022/chat/api/message-width-mode.mjs +0 -5
- package/esm2022/chat/api/message.interface.mjs +0 -5
- package/esm2022/chat/api/post-message-event.mjs +0 -21
- package/esm2022/chat/api/preventable-event.mjs +0 -28
- package/esm2022/chat/api/send-button-settings.mjs +0 -5
- package/esm2022/chat/api/suggestions-layout.mjs +0 -5
- package/esm2022/chat/api/timestamp-visibility.mjs +0 -5
- package/esm2022/chat/api/user.interface.mjs +0 -5
- package/esm2022/chat/attachment.component.mjs +0 -105
- package/esm2022/chat/builtin-actions.mjs +0 -27
- package/esm2022/chat/cards/hero-card.component.mjs +0 -131
- package/esm2022/chat/chat-file.component.mjs +0 -144
- package/esm2022/chat/chat-item.mjs +0 -10
- package/esm2022/chat/chat-view.mjs +0 -80
- package/esm2022/chat/chat.component.mjs +0 -1015
- package/esm2022/chat/chat.directives.mjs +0 -18
- package/esm2022/chat/chat.module.mjs +0 -61
- package/esm2022/chat/common/chat.service.mjs +0 -179
- package/esm2022/chat/common/models/default-model-fields.mjs +0 -25
- package/esm2022/chat/common/models/formatted-text-parts.mjs +0 -5
- package/esm2022/chat/common/models/message-box-options.mjs +0 -5
- package/esm2022/chat/common/models/model-fields.mjs +0 -5
- package/esm2022/chat/common/scroll-anchor.directive.mjs +0 -80
- package/esm2022/chat/common/scroll-button.component.mjs +0 -81
- package/esm2022/chat/common/scroll.service.mjs +0 -110
- package/esm2022/chat/common/utils.mjs +0 -159
- package/esm2022/chat/l10n/custom-messages.component.mjs +0 -55
- package/esm2022/chat/l10n/localized-messages.directive.mjs +0 -40
- package/esm2022/chat/l10n/messages.mjs +0 -130
- package/esm2022/chat/message-attachments.component.mjs +0 -258
- package/esm2022/chat/message-box.component.mjs +0 -501
- package/esm2022/chat/message-list.component.mjs +0 -617
- package/esm2022/chat/message-reference-content.component.mjs +0 -86
- package/esm2022/chat/message.component.mjs +0 -740
- package/esm2022/chat/suggested-actions.component.mjs +0 -443
- package/esm2022/chat/templates/attachment-template.directive.mjs +0 -43
- package/esm2022/chat/templates/author-message-content-template.directive.mjs +0 -39
- package/esm2022/chat/templates/author-message-template.directive.mjs +0 -39
- package/esm2022/chat/templates/header-template.directive.mjs +0 -33
- package/esm2022/chat/templates/message-box.directive.mjs +0 -36
- package/esm2022/chat/templates/message-content-template.directive.mjs +0 -39
- package/esm2022/chat/templates/message-template.directive.mjs +0 -39
- package/esm2022/chat/templates/no-data-template.directive.mjs +0 -38
- package/esm2022/chat/templates/receiver-message-content-template.directive.mjs +0 -39
- package/esm2022/chat/templates/receiver-message-template.directive.mjs +0 -39
- package/esm2022/chat/templates/status-template.directive.mjs +0 -33
- package/esm2022/chat/templates/suggestion-template.directive.mjs +0 -36
- package/esm2022/chat/templates/timestamp-template.directive.mjs +0 -42
- package/esm2022/chat/templates/user-status-template.directive.mjs +0 -38
- package/esm2022/conversational-ui.module.mjs +0 -73
- package/esm2022/directives.mjs +0 -145
- package/esm2022/index.mjs +0 -40
- package/esm2022/inline-ai-prompt/inlineaiprompt-content.component.mjs +0 -548
- package/esm2022/inline-ai-prompt/inlineaiprompt.component.mjs +0 -351
- package/esm2022/inline-ai-prompt/inlineaiprompt.module.mjs +0 -46
- package/esm2022/inline-ai-prompt/inlineaiprompt.service.mjs +0 -92
- package/esm2022/inline-ai-prompt/localization/custom-messages.component.mjs +0 -51
- package/esm2022/inline-ai-prompt/localization/localized-messages.directive.mjs +0 -39
- package/esm2022/inline-ai-prompt/localization/messages.mjs +0 -35
- package/esm2022/inline-ai-prompt/models/command.interface.mjs +0 -5
- package/esm2022/inline-ai-prompt/models/index.mjs +0 -5
- package/esm2022/inline-ai-prompt/models/inlineaiprompt-popupsettings.mjs +0 -5
- package/esm2022/inline-ai-prompt/models/inlineaiprompt-settings.mjs +0 -59
- package/esm2022/inline-ai-prompt/models/messages.mjs +0 -8
- package/esm2022/inline-ai-prompt/models/output-action-click-event.mjs +0 -5
- package/esm2022/inline-ai-prompt/models/output-action.interface.mjs +0 -5
- package/esm2022/inline-ai-prompt/models/prompt-output.interface.mjs +0 -5
- package/esm2022/inline-ai-prompt/models/prompt-request-event.mjs +0 -5
- package/esm2022/inline-ai-prompt/output-template.directive.mjs +0 -38
- package/esm2022/inline-ai-prompt/utils.mjs +0 -57
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/progress-kendo-angular-conversational-ui.mjs +0 -8
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, forwardRef, isDevMode } from '@angular/core';
|
|
6
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
|
-
import { guid } from '@progress/kendo-angular-common';
|
|
8
|
-
import { chevronDownIcon, chevronUpIcon } from '@progress/kendo-svg-icons';
|
|
9
|
-
import { ButtonComponent, SpeechToTextButtonComponent } from '@progress/kendo-angular-buttons';
|
|
10
|
-
import { TextAreaComponent, TextAreaSuffixComponent } from '@progress/kendo-angular-inputs';
|
|
11
|
-
import { BaseView } from './base-view';
|
|
12
|
-
import { AIPromptService } from '../common/aiprompt.service';
|
|
13
|
-
import * as i0 from "@angular/core";
|
|
14
|
-
import * as i1 from "@progress/kendo-angular-l10n";
|
|
15
|
-
import * as i2 from "../common/aiprompt.service";
|
|
16
|
-
/**
|
|
17
|
-
* Represents the component that renders the **Prompt** view of the AIPrompt.
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* ```html
|
|
21
|
-
* <kendo-aiprompt-prompt-view
|
|
22
|
-
* buttonText="My prompt view">
|
|
23
|
-
* </kendo-aiprompt-prompt-view>
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export class PromptViewComponent extends BaseView {
|
|
27
|
-
service;
|
|
28
|
-
constructor(localization, service) {
|
|
29
|
-
super('prompt', localization);
|
|
30
|
-
this.service = service;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* @hidden
|
|
34
|
-
*/
|
|
35
|
-
get suggestionsIcons() {
|
|
36
|
-
return this.showSuggestions ?
|
|
37
|
-
{ font: 'chevron-up', svg: chevronUpIcon } :
|
|
38
|
-
{ font: 'chevron-down', svg: chevronDownIcon };
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* @hidden
|
|
42
|
-
*/
|
|
43
|
-
showSuggestions = true;
|
|
44
|
-
/**
|
|
45
|
-
* @hidden
|
|
46
|
-
*/
|
|
47
|
-
contentId = `k-prompt-suggestions-${guid()}`;
|
|
48
|
-
/**
|
|
49
|
-
* @hidden
|
|
50
|
-
*/
|
|
51
|
-
get promptSuggestions() {
|
|
52
|
-
return this.service.promptSuggestions;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
*
|
|
56
|
-
* @hidden
|
|
57
|
-
*/
|
|
58
|
-
set textAreaValue(value) {
|
|
59
|
-
this.service.promptValue = value;
|
|
60
|
-
}
|
|
61
|
-
get textAreaValue() {
|
|
62
|
-
return this.service.promptValue;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* @hidden
|
|
66
|
-
*/
|
|
67
|
-
suggestionClick(suggestion) {
|
|
68
|
-
this.textAreaValue = this.service.promptValue = suggestion;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* @hidden
|
|
72
|
-
*/
|
|
73
|
-
suggestionKeydown(event, suggestion) {
|
|
74
|
-
if (event.key === 'Enter' || event.key === ' ') {
|
|
75
|
-
this.suggestionClick(suggestion);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* @hidden
|
|
80
|
-
*/
|
|
81
|
-
get speechToTextButtonSettings() {
|
|
82
|
-
return this.service.speechToTextButton;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* @hidden
|
|
86
|
-
*/
|
|
87
|
-
get textareaSettings() {
|
|
88
|
-
return this.service.textAreaSettings;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* @hidden
|
|
92
|
-
*/
|
|
93
|
-
onSpeechToTextResult(event) {
|
|
94
|
-
if (event.alternatives && event.alternatives.length > 0) {
|
|
95
|
-
this.textAreaValue += event.alternatives[0].transcript + ' ';
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* @hidden
|
|
100
|
-
*/
|
|
101
|
-
onSpeechToTextError(event) {
|
|
102
|
-
if (isDevMode()) {
|
|
103
|
-
console.error('Speech to Text error:', event.errorMessage);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
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 });
|
|
107
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: PromptViewComponent, isStandalone: true, selector: "kendo-aiprompt-prompt-view", providers: [
|
|
108
|
-
{
|
|
109
|
-
provide: BaseView,
|
|
110
|
-
useExisting: forwardRef(() => PromptViewComponent)
|
|
111
|
-
}
|
|
112
|
-
], usesInheritance: true, ngImport: i0, template: `
|
|
113
|
-
<ng-template #content>
|
|
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"
|
|
132
|
-
>
|
|
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"
|
|
177
|
-
role="button"
|
|
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>
|
|
187
|
-
</div>
|
|
188
|
-
}
|
|
189
|
-
</div>
|
|
190
|
-
}
|
|
191
|
-
</ng-template>
|
|
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"] }] });
|
|
193
|
-
}
|
|
194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PromptViewComponent, decorators: [{
|
|
195
|
-
type: Component,
|
|
196
|
-
args: [{
|
|
197
|
-
selector: 'kendo-aiprompt-prompt-view',
|
|
198
|
-
providers: [
|
|
199
|
-
{
|
|
200
|
-
provide: BaseView,
|
|
201
|
-
useExisting: forwardRef(() => PromptViewComponent)
|
|
202
|
-
}
|
|
203
|
-
],
|
|
204
|
-
template: `
|
|
205
|
-
<ng-template #content>
|
|
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"
|
|
224
|
-
>
|
|
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"
|
|
269
|
-
role="button"
|
|
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>
|
|
279
|
-
</div>
|
|
280
|
-
}
|
|
281
|
-
</div>
|
|
282
|
-
}
|
|
283
|
-
</ng-template>
|
|
284
|
-
`,
|
|
285
|
-
standalone: true,
|
|
286
|
-
imports: [TextAreaComponent, ButtonComponent, TextAreaSuffixComponent, SpeechToTextButtonComponent]
|
|
287
|
-
}]
|
|
288
|
-
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i2.AIPromptService }] });
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { PreventableEvent } from "./preventable-event";
|
|
6
|
-
/**
|
|
7
|
-
* Represents the arguments for the `executeAction` event.
|
|
8
|
-
*
|
|
9
|
-
* The `executeAction` event fires when the user clicks a quick action button.
|
|
10
|
-
* Call `preventDefault()` to suppress the built-in action handler.
|
|
11
|
-
*/
|
|
12
|
-
export class ExecuteActionEvent extends PreventableEvent {
|
|
13
|
-
/**
|
|
14
|
-
* Represents the action to execute.
|
|
15
|
-
*/
|
|
16
|
-
action;
|
|
17
|
-
/**
|
|
18
|
-
* Represents the message that contains the action.
|
|
19
|
-
*/
|
|
20
|
-
message;
|
|
21
|
-
/**
|
|
22
|
-
* @hidden
|
|
23
|
-
*/
|
|
24
|
-
constructor(action, message) {
|
|
25
|
-
super();
|
|
26
|
-
this.action = action;
|
|
27
|
-
this.message = message;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export * from './action.interface';
|
|
6
|
-
export * from './attachment.interface';
|
|
7
|
-
export * from './chat-file-interface';
|
|
8
|
-
export * from './chat-suggestion.interface';
|
|
9
|
-
export * from './execute-action-event';
|
|
10
|
-
export * from './message-action';
|
|
11
|
-
export * from './message-width-mode';
|
|
12
|
-
export * from './message.interface';
|
|
13
|
-
export * from './message-settings.interface';
|
|
14
|
-
export * from './post-message-event';
|
|
15
|
-
export * from './user.interface';
|
|
16
|
-
export * from './file-action';
|
|
17
|
-
export * from './file-download-event.interface';
|
|
18
|
-
export * from './send-button-settings';
|
|
19
|
-
export * from './files-layout';
|
|
20
|
-
export * from './suggestions-layout';
|
|
21
|
-
export * from './timestamp-visibility';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* Describes the arguments for the `sendMessage` event.
|
|
7
|
-
*/
|
|
8
|
-
export class SendMessageEvent {
|
|
9
|
-
/**
|
|
10
|
-
* Represents the message that contains the metadata and user input.
|
|
11
|
-
*
|
|
12
|
-
* The Chat does not automatically add the message to its data. For more information, see [Data Binding](slug:databinding_chat).
|
|
13
|
-
*/
|
|
14
|
-
message;
|
|
15
|
-
/**
|
|
16
|
-
* @hidden
|
|
17
|
-
*/
|
|
18
|
-
constructor(message) {
|
|
19
|
-
this.message = message;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export class PreventableEvent {
|
|
9
|
-
prevented = false;
|
|
10
|
-
/**
|
|
11
|
-
* Prevents the default action for a specified event.
|
|
12
|
-
* In this way, the source component suppresses
|
|
13
|
-
* the built-in behavior that follows the event.
|
|
14
|
-
*/
|
|
15
|
-
preventDefault() {
|
|
16
|
-
this.prevented = true;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Returns `true` if the event was prevented
|
|
20
|
-
* by any of its subscribers.
|
|
21
|
-
*
|
|
22
|
-
* @returns `true` if the default action was prevented.
|
|
23
|
-
* Otherwise, returns `false`.
|
|
24
|
-
*/
|
|
25
|
-
isDefaultPrevented() {
|
|
26
|
-
return this.prevented;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, Input } from '@angular/core';
|
|
6
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
7
|
-
import { AttachmentTemplateDirective } from './templates/attachment-template.directive';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
export class AttachmentComponent {
|
|
13
|
-
set attachment(value) {
|
|
14
|
-
this._attachment = value;
|
|
15
|
-
this.context = {
|
|
16
|
-
$implicit: this.attachment
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
get attachment() {
|
|
20
|
-
return this._attachment;
|
|
21
|
-
}
|
|
22
|
-
template;
|
|
23
|
-
get image() {
|
|
24
|
-
return this.contentType.startsWith('image/');
|
|
25
|
-
}
|
|
26
|
-
get unknown() {
|
|
27
|
-
return !this.image;
|
|
28
|
-
}
|
|
29
|
-
context;
|
|
30
|
-
get contentType() {
|
|
31
|
-
return this.attachment.contentType || '';
|
|
32
|
-
}
|
|
33
|
-
_attachment;
|
|
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: "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">
|
|
43
|
-
<div class="k-card-body">
|
|
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) {
|
|
58
|
-
{{ attachment.content }}
|
|
59
|
-
}
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
}
|
|
63
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
64
|
-
}
|
|
65
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AttachmentComponent, decorators: [{
|
|
66
|
-
type: Component,
|
|
67
|
-
args: [{
|
|
68
|
-
selector: 'kendo-chat-attachment',
|
|
69
|
-
template: `
|
|
70
|
-
@if (template) {
|
|
71
|
-
<ng-container *ngTemplateOutlet="template.templateRef; context: context;">
|
|
72
|
-
</ng-container>
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@if (!template) {
|
|
76
|
-
<div class="k-card">
|
|
77
|
-
<div class="k-card-body">
|
|
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) {
|
|
92
|
-
{{ attachment.content }}
|
|
93
|
-
}
|
|
94
|
-
</div>
|
|
95
|
-
</div>
|
|
96
|
-
}
|
|
97
|
-
`,
|
|
98
|
-
standalone: true,
|
|
99
|
-
imports: [NgTemplateOutlet]
|
|
100
|
-
}]
|
|
101
|
-
}], propDecorators: { attachment: [{
|
|
102
|
-
type: Input
|
|
103
|
-
}], template: [{
|
|
104
|
-
type: Input
|
|
105
|
-
}] } });
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { guid } from '@progress/kendo-angular-common';
|
|
6
|
-
import { SendMessageEvent } from './api/post-message-event';
|
|
7
|
-
const noop = () => { };
|
|
8
|
-
const handlers = {
|
|
9
|
-
'reply': (action, sender) => {
|
|
10
|
-
sender.sendMessage.emit(new SendMessageEvent({
|
|
11
|
-
id: guid(),
|
|
12
|
-
author: { id: sender.authorId },
|
|
13
|
-
text: action.value,
|
|
14
|
-
timestamp: new Date()
|
|
15
|
-
}));
|
|
16
|
-
},
|
|
17
|
-
'call': (action) => {
|
|
18
|
-
window.open('tel:' + action.value);
|
|
19
|
-
},
|
|
20
|
-
'openUrl': (action) => {
|
|
21
|
-
window.open(action.value);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* @hidden
|
|
26
|
-
*/
|
|
27
|
-
export const makeHandler = (action) => handlers[action.type] || noop;
|