@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,159 +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 { defaultModelFields } from "./models/default-model-fields";
|
|
6
|
-
import { getter } from "@progress/kendo-angular-common";
|
|
7
|
-
import { paperPlaneIcon } from "@progress/kendo-svg-icons";
|
|
8
|
-
import { copyIcon, undoIcon, downloadIcon } from "@progress/kendo-svg-icons";
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
export const closest = (node, predicate) => {
|
|
13
|
-
while (node && !predicate(node)) {
|
|
14
|
-
node = node.parentNode;
|
|
15
|
-
}
|
|
16
|
-
return node;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* @hidden
|
|
20
|
-
*/
|
|
21
|
-
export const URL_REGEX = /(https?:\/\/[^\s]+)/g;
|
|
22
|
-
/**
|
|
23
|
-
* @hidden
|
|
24
|
-
*/
|
|
25
|
-
export const DOWNLOAD_ALL_SELECTOR = '.k-chat-download-button';
|
|
26
|
-
/**
|
|
27
|
-
* @hidden
|
|
28
|
-
*/
|
|
29
|
-
export const FILE_ACTION_BTN_SELECTOR = '.k-menu-button';
|
|
30
|
-
/**
|
|
31
|
-
* @hidden
|
|
32
|
-
*/
|
|
33
|
-
export const MENU_ITEM_SELECTOR = '.k-menu-link';
|
|
34
|
-
/**
|
|
35
|
-
* @hidden
|
|
36
|
-
* Default settings for the Speech to Text button.
|
|
37
|
-
* These settings can be overridden by the user.
|
|
38
|
-
*/
|
|
39
|
-
export const STB_DEFAULT_SETTINGS = {
|
|
40
|
-
continuous: false,
|
|
41
|
-
disabled: false,
|
|
42
|
-
fillMode: 'clear',
|
|
43
|
-
integrationMode: 'webSpeech',
|
|
44
|
-
interimResults: false,
|
|
45
|
-
lang: 'en-US',
|
|
46
|
-
maxAlternatives: 1,
|
|
47
|
-
rounded: 'medium',
|
|
48
|
-
size: 'medium',
|
|
49
|
-
themeColor: 'base'
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* @hidden
|
|
53
|
-
*/
|
|
54
|
-
export const SEND_BTN_DEFAULT_SETTINGS = {
|
|
55
|
-
fillMode: 'solid',
|
|
56
|
-
rounded: 'full',
|
|
57
|
-
size: 'medium',
|
|
58
|
-
themeColor: 'primary',
|
|
59
|
-
icon: 'paper-plane',
|
|
60
|
-
svgIcon: paperPlaneIcon,
|
|
61
|
-
buttonClass: 'k-chat-send'
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* @hidden
|
|
65
|
-
*/
|
|
66
|
-
export const FILESELECT_DEFAULT_SETTINGS = {
|
|
67
|
-
multiple: true,
|
|
68
|
-
disabled: false
|
|
69
|
-
};
|
|
70
|
-
/**
|
|
71
|
-
* @hidden
|
|
72
|
-
*/
|
|
73
|
-
export const SUGGESTIONS_LAYOUT_DEFAULT_SETTINGS = 'scroll';
|
|
74
|
-
/**
|
|
75
|
-
* @hidden
|
|
76
|
-
*/
|
|
77
|
-
export const CONTEXT_MENU_ACTIONS = [
|
|
78
|
-
{
|
|
79
|
-
id: 'copy',
|
|
80
|
-
label: 'Copy',
|
|
81
|
-
icon: 'copy',
|
|
82
|
-
svgIcon: copyIcon,
|
|
83
|
-
disabled: false
|
|
84
|
-
}, {
|
|
85
|
-
id: 'reply',
|
|
86
|
-
label: 'Reply',
|
|
87
|
-
icon: 'undo',
|
|
88
|
-
svgIcon: undoIcon,
|
|
89
|
-
disabled: false
|
|
90
|
-
}
|
|
91
|
-
];
|
|
92
|
-
/**
|
|
93
|
-
* @hidden
|
|
94
|
-
*/
|
|
95
|
-
export const FILE_ACTIONS = [
|
|
96
|
-
{
|
|
97
|
-
id: 'download',
|
|
98
|
-
label: 'Download',
|
|
99
|
-
icon: 'download',
|
|
100
|
-
svgIcon: downloadIcon,
|
|
101
|
-
disabled: false
|
|
102
|
-
}
|
|
103
|
-
];
|
|
104
|
-
/**
|
|
105
|
-
* @hidden
|
|
106
|
-
*/
|
|
107
|
-
export const processMessages = (messages, fields) => {
|
|
108
|
-
const modelFields = { ...defaultModelFields, ...fields };
|
|
109
|
-
return messages.map((message) => parseMessage(message, modelFields));
|
|
110
|
-
};
|
|
111
|
-
/**
|
|
112
|
-
* @hidden
|
|
113
|
-
*/
|
|
114
|
-
export const parseMessage = (message, fields) => {
|
|
115
|
-
const modelFields = { ...defaultModelFields, ...fields };
|
|
116
|
-
let author;
|
|
117
|
-
const authorId = getter(modelFields.authorIdField || 'authorId')(message);
|
|
118
|
-
const authorName = getter(modelFields.authorNameField || 'authorName')(message);
|
|
119
|
-
const authorImageUrl = getter(modelFields.authorImageUrlField || 'authorImageUrl')(message);
|
|
120
|
-
const authorImageAltText = getter(modelFields.authorImageAltTextField || 'authorImageAltText')(message);
|
|
121
|
-
if (authorId !== undefined) {
|
|
122
|
-
author = {
|
|
123
|
-
id: authorId,
|
|
124
|
-
...(authorName && { name: authorName }),
|
|
125
|
-
...(authorImageUrl && { avatarUrl: authorImageUrl }),
|
|
126
|
-
...(authorImageAltText && { avatarAltText: authorImageAltText }),
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
const timestampValue = getter(modelFields.timestampField)(message);
|
|
130
|
-
const timestamp = timestampValue instanceof Date ? timestampValue : new Date(timestampValue);
|
|
131
|
-
return {
|
|
132
|
-
id: getter(modelFields.idField)(message),
|
|
133
|
-
text: getter(modelFields.textField)(message),
|
|
134
|
-
author: author,
|
|
135
|
-
timestamp: timestamp,
|
|
136
|
-
status: getter(modelFields.statusField)(message),
|
|
137
|
-
files: getter(modelFields.filesField)(message),
|
|
138
|
-
attachments: getter(modelFields.attachmentsField)(message),
|
|
139
|
-
attachmentLayout: getter(modelFields.attachmentLayoutField)(message),
|
|
140
|
-
suggestedActions: getter(modelFields.suggestedActionsField)(message),
|
|
141
|
-
isPinned: getter(modelFields.isPinnedField)(message),
|
|
142
|
-
replyToId: getter(modelFields.replyToIdField)(message),
|
|
143
|
-
isDeleted: getter(modelFields.isDeletedField)(message),
|
|
144
|
-
typing: getter(modelFields.typingField)(message),
|
|
145
|
-
dataItem: message
|
|
146
|
-
};
|
|
147
|
-
};
|
|
148
|
-
/**
|
|
149
|
-
* @hidden
|
|
150
|
-
*/
|
|
151
|
-
export const transformActions = (actions) => {
|
|
152
|
-
return actions.map(action => ({
|
|
153
|
-
text: action.label,
|
|
154
|
-
icon: action.icon,
|
|
155
|
-
svgIcon: action.svgIcon,
|
|
156
|
-
disabled: action.disabled,
|
|
157
|
-
originalAction: action
|
|
158
|
-
}));
|
|
159
|
-
};
|
|
@@ -1,55 +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 } from '@angular/core';
|
|
6
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
|
-
import { Messages } from './messages';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
|
-
// eslint-disable no-forward-ref
|
|
11
|
-
/**
|
|
12
|
-
* Represents the custom messages component of the Chat.
|
|
13
|
-
*
|
|
14
|
-
* Use this component to override default messages for the Chat
|
|
15
|
-
* ([see example](slug:globalization_chat#custom-messages)).
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```html
|
|
19
|
-
* <kendo-chat-messages
|
|
20
|
-
* send="Send Message"
|
|
21
|
-
* messagePlaceholder="Type here...">
|
|
22
|
-
* </kendo-chat-messages>
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
export class CustomMessagesComponent extends Messages {
|
|
26
|
-
service;
|
|
27
|
-
constructor(service) {
|
|
28
|
-
super();
|
|
29
|
-
this.service = service;
|
|
30
|
-
}
|
|
31
|
-
get override() {
|
|
32
|
-
return true;
|
|
33
|
-
}
|
|
34
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
35
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: CustomMessagesComponent, isStandalone: true, selector: "kendo-chat-messages", providers: [
|
|
36
|
-
{
|
|
37
|
-
provide: Messages,
|
|
38
|
-
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
39
|
-
}
|
|
40
|
-
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
41
|
-
}
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CustomMessagesComponent, decorators: [{
|
|
43
|
-
type: Component,
|
|
44
|
-
args: [{
|
|
45
|
-
providers: [
|
|
46
|
-
{
|
|
47
|
-
provide: Messages,
|
|
48
|
-
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
49
|
-
}
|
|
50
|
-
],
|
|
51
|
-
selector: 'kendo-chat-messages',
|
|
52
|
-
template: ``,
|
|
53
|
-
standalone: true
|
|
54
|
-
}]
|
|
55
|
-
}], ctorParameters: () => [{ type: i1.LocalizationService }] });
|
|
@@ -1,40 +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 { Directive, forwardRef } from '@angular/core';
|
|
6
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
|
-
import { Messages } from './messages';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
|
-
// eslint-disable no-forward-ref
|
|
11
|
-
/**
|
|
12
|
-
* @hidden
|
|
13
|
-
*/
|
|
14
|
-
export class LocalizedMessagesDirective extends Messages {
|
|
15
|
-
service;
|
|
16
|
-
constructor(service) {
|
|
17
|
-
super();
|
|
18
|
-
this.service = service;
|
|
19
|
-
}
|
|
20
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
21
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: LocalizedMessagesDirective, isStandalone: true, selector: "[kendoChatLocalizedMessages]", providers: [
|
|
22
|
-
{
|
|
23
|
-
provide: Messages,
|
|
24
|
-
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
25
|
-
}
|
|
26
|
-
], usesInheritance: true, ngImport: i0 });
|
|
27
|
-
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
|
|
29
|
-
type: Directive,
|
|
30
|
-
args: [{
|
|
31
|
-
providers: [
|
|
32
|
-
{
|
|
33
|
-
provide: Messages,
|
|
34
|
-
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
selector: '[kendoChatLocalizedMessages]',
|
|
38
|
-
standalone: true
|
|
39
|
-
}]
|
|
40
|
-
}], ctorParameters: () => [{ type: i1.LocalizationService }] });
|
|
@@ -1,130 +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 { Directive, Input } from '@angular/core';
|
|
6
|
-
import { ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
/**
|
|
9
|
-
* @hidden
|
|
10
|
-
*/
|
|
11
|
-
export class Messages extends ComponentMessages {
|
|
12
|
-
/**
|
|
13
|
-
* Sets the text that displays when the sender deletes a message.
|
|
14
|
-
*/
|
|
15
|
-
deletedMessageSenderText;
|
|
16
|
-
/**
|
|
17
|
-
* Sets the text that displays when the receiver deletes a message.
|
|
18
|
-
*/
|
|
19
|
-
deletedMessageReceiverText;
|
|
20
|
-
/**
|
|
21
|
-
* Sets the text that displays in the download section of the message.
|
|
22
|
-
* This message displays below all files in the message.
|
|
23
|
-
*/
|
|
24
|
-
downloadAllFilesText;
|
|
25
|
-
/**
|
|
26
|
-
* Sets the placeholder text for the message text input.
|
|
27
|
-
*/
|
|
28
|
-
messagePlaceholder;
|
|
29
|
-
/**
|
|
30
|
-
* Sets the text for the **Send** button.
|
|
31
|
-
*/
|
|
32
|
-
send;
|
|
33
|
-
/**
|
|
34
|
-
* Sets the label for the message list.
|
|
35
|
-
*/
|
|
36
|
-
messageListLabel;
|
|
37
|
-
/**
|
|
38
|
-
* Sets the label for the message input box.
|
|
39
|
-
*/
|
|
40
|
-
messageBoxInputLabel;
|
|
41
|
-
/**
|
|
42
|
-
* Sets the text for the left arrow of the message attachments.
|
|
43
|
-
*/
|
|
44
|
-
messageAttachmentLeftArrow;
|
|
45
|
-
/**
|
|
46
|
-
* Sets the text for the right arrow of the message attachments.
|
|
47
|
-
*/
|
|
48
|
-
messageAttachmentRightArrow;
|
|
49
|
-
/**
|
|
50
|
-
* Sets the Speech to Text button title.
|
|
51
|
-
*/
|
|
52
|
-
speechToTextButtonTitle;
|
|
53
|
-
/**
|
|
54
|
-
* Sets the File Select button title.
|
|
55
|
-
*/
|
|
56
|
-
fileSelectButtonTitle;
|
|
57
|
-
/**
|
|
58
|
-
* Sets the title of the icon that removes the reply reference in the Message Box.
|
|
59
|
-
*/
|
|
60
|
-
removeReplyTitle;
|
|
61
|
-
/**
|
|
62
|
-
* Sets the title of the icon that removes a selected file in the Message Box.
|
|
63
|
-
*/
|
|
64
|
-
removeFileTitle;
|
|
65
|
-
/**
|
|
66
|
-
* Sets the title of the icon that shows the message can expand.
|
|
67
|
-
*/
|
|
68
|
-
expandTitle;
|
|
69
|
-
/**
|
|
70
|
-
* Sets the title of the icon that shows the message can collapse.
|
|
71
|
-
*/
|
|
72
|
-
collapseTitle;
|
|
73
|
-
/**
|
|
74
|
-
* Sets the title of the DropDownButton that opens the File actions.
|
|
75
|
-
*/
|
|
76
|
-
fileActionsTitle;
|
|
77
|
-
/**
|
|
78
|
-
* Sets the title of the button that shows the **Scroll right** when the suggestions list is scrollable with buttons.
|
|
79
|
-
*/
|
|
80
|
-
nextSuggestionsButtonTitle;
|
|
81
|
-
/**
|
|
82
|
-
* Sets the title of the button that shows the **Scroll left** when the suggestions list is scrollable with buttons.
|
|
83
|
-
*/
|
|
84
|
-
previousSuggestionsButtonTitle;
|
|
85
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
86
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: Messages, selector: "kendoConversationalUIMessages", inputs: { deletedMessageSenderText: "deletedMessageSenderText", deletedMessageReceiverText: "deletedMessageReceiverText", downloadAllFilesText: "downloadAllFilesText", messagePlaceholder: "messagePlaceholder", send: "send", messageListLabel: "messageListLabel", messageBoxInputLabel: "messageBoxInputLabel", messageAttachmentLeftArrow: "messageAttachmentLeftArrow", messageAttachmentRightArrow: "messageAttachmentRightArrow", speechToTextButtonTitle: "speechToTextButtonTitle", fileSelectButtonTitle: "fileSelectButtonTitle", removeReplyTitle: "removeReplyTitle", removeFileTitle: "removeFileTitle", expandTitle: "expandTitle", collapseTitle: "collapseTitle", fileActionsTitle: "fileActionsTitle", nextSuggestionsButtonTitle: "nextSuggestionsButtonTitle", previousSuggestionsButtonTitle: "previousSuggestionsButtonTitle" }, usesInheritance: true, ngImport: i0 });
|
|
87
|
-
}
|
|
88
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: Messages, decorators: [{
|
|
89
|
-
type: Directive,
|
|
90
|
-
args: [{
|
|
91
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
92
|
-
selector: 'kendoConversationalUIMessages'
|
|
93
|
-
}]
|
|
94
|
-
}], propDecorators: { deletedMessageSenderText: [{
|
|
95
|
-
type: Input
|
|
96
|
-
}], deletedMessageReceiverText: [{
|
|
97
|
-
type: Input
|
|
98
|
-
}], downloadAllFilesText: [{
|
|
99
|
-
type: Input
|
|
100
|
-
}], messagePlaceholder: [{
|
|
101
|
-
type: Input
|
|
102
|
-
}], send: [{
|
|
103
|
-
type: Input
|
|
104
|
-
}], messageListLabel: [{
|
|
105
|
-
type: Input
|
|
106
|
-
}], messageBoxInputLabel: [{
|
|
107
|
-
type: Input
|
|
108
|
-
}], messageAttachmentLeftArrow: [{
|
|
109
|
-
type: Input
|
|
110
|
-
}], messageAttachmentRightArrow: [{
|
|
111
|
-
type: Input
|
|
112
|
-
}], speechToTextButtonTitle: [{
|
|
113
|
-
type: Input
|
|
114
|
-
}], fileSelectButtonTitle: [{
|
|
115
|
-
type: Input
|
|
116
|
-
}], removeReplyTitle: [{
|
|
117
|
-
type: Input
|
|
118
|
-
}], removeFileTitle: [{
|
|
119
|
-
type: Input
|
|
120
|
-
}], expandTitle: [{
|
|
121
|
-
type: Input
|
|
122
|
-
}], collapseTitle: [{
|
|
123
|
-
type: Input
|
|
124
|
-
}], fileActionsTitle: [{
|
|
125
|
-
type: Input
|
|
126
|
-
}], nextSuggestionsButtonTitle: [{
|
|
127
|
-
type: Input
|
|
128
|
-
}], previousSuggestionsButtonTitle: [{
|
|
129
|
-
type: Input
|
|
130
|
-
}] } });
|
|
@@ -1,258 +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
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
6
|
-
import { Component, ElementRef, forwardRef, HostBinding, Input, NgZone, QueryList, ViewChild, ViewChildren } from '@angular/core';
|
|
7
|
-
import { fromEvent } from 'rxjs';
|
|
8
|
-
import { debounceTime } from 'rxjs/operators';
|
|
9
|
-
import { Keys, normalizeKeys } from '@progress/kendo-angular-common';
|
|
10
|
-
import { chevronLeftIcon, chevronRightIcon } from '@progress/kendo-svg-icons';
|
|
11
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
12
|
-
import { ButtonComponent } from '@progress/kendo-angular-buttons';
|
|
13
|
-
import { ChatItem } from './chat-item';
|
|
14
|
-
import { AttachmentTemplateDirective } from './templates/attachment-template.directive';
|
|
15
|
-
import { AttachmentComponent } from './attachment.component';
|
|
16
|
-
import * as i0 from "@angular/core";
|
|
17
|
-
import * as i1 from "@progress/kendo-angular-l10n";
|
|
18
|
-
// eslint-disable no-forward-ref
|
|
19
|
-
/**
|
|
20
|
-
* @hidden
|
|
21
|
-
*/
|
|
22
|
-
export class MessageAttachmentsComponent extends ChatItem {
|
|
23
|
-
zone;
|
|
24
|
-
localizationService;
|
|
25
|
-
/**
|
|
26
|
-
* @hidden
|
|
27
|
-
*/
|
|
28
|
-
chevronLeftIcon = chevronLeftIcon;
|
|
29
|
-
/**
|
|
30
|
-
* @hidden
|
|
31
|
-
*/
|
|
32
|
-
chevronRightIcon = chevronRightIcon;
|
|
33
|
-
attachments;
|
|
34
|
-
layout;
|
|
35
|
-
tabbable;
|
|
36
|
-
template;
|
|
37
|
-
localization;
|
|
38
|
-
get carousel() {
|
|
39
|
-
return this.layout !== 'list';
|
|
40
|
-
}
|
|
41
|
-
deck;
|
|
42
|
-
items;
|
|
43
|
-
scrollPosition = 0;
|
|
44
|
-
selectedIndex = 0;
|
|
45
|
-
scrollSubscription;
|
|
46
|
-
direction;
|
|
47
|
-
get showLeftArrow() {
|
|
48
|
-
return this.carousel && (this.direction === 'rtl' ? this.scrollPosition > -1 : this.scrollPosition > 0);
|
|
49
|
-
}
|
|
50
|
-
get showRightArrow() {
|
|
51
|
-
return this.carousel && (this.direction === 'rtl' ? this.scrollPosition < 0 : this.scrollPosition < 1);
|
|
52
|
-
}
|
|
53
|
-
carouselKeyHandlers = {
|
|
54
|
-
[Keys.ArrowLeft]: (e) => this.navigateTo(e, this.direction === 'rtl' ? 1 : -1),
|
|
55
|
-
[Keys.ArrowRight]: (e) => this.navigateTo(e, this.direction === 'rtl' ? -1 : 1)
|
|
56
|
-
};
|
|
57
|
-
listKeyHandlers = {
|
|
58
|
-
[Keys.ArrowUp]: (e) => this.navigateTo(e, -1),
|
|
59
|
-
[Keys.ArrowDown]: (e) => this.navigateTo(e, 1)
|
|
60
|
-
};
|
|
61
|
-
constructor(zone, localizationService) {
|
|
62
|
-
super();
|
|
63
|
-
this.zone = zone;
|
|
64
|
-
this.localizationService = localizationService;
|
|
65
|
-
this.direction = this.localizationService.rtl ? 'rtl' : 'ltr';
|
|
66
|
-
}
|
|
67
|
-
ngAfterViewInit() {
|
|
68
|
-
this.zone.runOutsideAngular(() => {
|
|
69
|
-
const scrollDebounceTime = 100;
|
|
70
|
-
this.scrollSubscription = fromEvent(this.deck.nativeElement, 'scroll')
|
|
71
|
-
.pipe(debounceTime(scrollDebounceTime))
|
|
72
|
-
.subscribe(() => this.onScroll());
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
ngOnDestroy() {
|
|
76
|
-
this.scrollSubscription.unsubscribe();
|
|
77
|
-
}
|
|
78
|
-
isSelected(index) {
|
|
79
|
-
return this.selectedIndex === index;
|
|
80
|
-
}
|
|
81
|
-
itemKeydown(e, attachment) {
|
|
82
|
-
const keyHandlers = this.layout === 'list' ?
|
|
83
|
-
this.listKeyHandlers : this.carouselKeyHandlers;
|
|
84
|
-
const code = normalizeKeys(e);
|
|
85
|
-
const handler = keyHandlers[code];
|
|
86
|
-
if (handler) {
|
|
87
|
-
handler(e, attachment);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
itemClick(index) {
|
|
91
|
-
this.select(index);
|
|
92
|
-
}
|
|
93
|
-
focus() {
|
|
94
|
-
this.select(this.selectedIndex);
|
|
95
|
-
}
|
|
96
|
-
scrollTo(dir) {
|
|
97
|
-
const el = this.deck.nativeElement;
|
|
98
|
-
const scrollStep = el.scrollWidth / this.items.length;
|
|
99
|
-
const max = el.scrollWidth - el.offsetWidth;
|
|
100
|
-
const pos = el.scrollLeft + scrollStep * dir;
|
|
101
|
-
el.scrollLeft = this.direction === 'rtl' ? Math.min(0, max, pos) : Math.max(0, Math.min(max, pos));
|
|
102
|
-
}
|
|
103
|
-
select(index) {
|
|
104
|
-
this.selectedIndex = index;
|
|
105
|
-
const item = this.items.toArray()[index];
|
|
106
|
-
if (item) {
|
|
107
|
-
item.nativeElement.focus();
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
navigateTo(e, offset) {
|
|
111
|
-
const prevIndex = this.selectedIndex;
|
|
112
|
-
const nextIndex = Math.max(0, Math.min(prevIndex + offset, this.items.length - 1));
|
|
113
|
-
if (nextIndex !== prevIndex) {
|
|
114
|
-
this.select(nextIndex);
|
|
115
|
-
e.preventDefault();
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
onScroll() {
|
|
119
|
-
const el = this.deck.nativeElement;
|
|
120
|
-
if (el.scrollWidth === 0) {
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
const pos = el.scrollLeft / (el.scrollWidth - el.offsetWidth);
|
|
124
|
-
if (pos !== this.scrollPosition) {
|
|
125
|
-
this.zone.run(() => {
|
|
126
|
-
this.scrollPosition = pos;
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
textFor(key) {
|
|
131
|
-
return this.localization.get(key);
|
|
132
|
-
}
|
|
133
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageAttachmentsComponent, deps: [{ token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
134
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: MessageAttachmentsComponent, isStandalone: true, selector: "kendo-chat-message-attachments", inputs: { attachments: "attachments", layout: "layout", tabbable: "tabbable", template: "template", localization: "localization" }, host: { properties: { "class.k-card-deck-scrollwrap": "this.carousel" } }, providers: [{
|
|
135
|
-
provide: ChatItem,
|
|
136
|
-
useExisting: forwardRef(() => MessageAttachmentsComponent)
|
|
137
|
-
}], viewQueries: [{ propertyName: "deck", first: true, predicate: ["deck"], descendants: true, read: ElementRef, static: true }, { propertyName: "items", predicate: ["item"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: `
|
|
138
|
-
@if (showLeftArrow) {
|
|
139
|
-
<button
|
|
140
|
-
(click)="scrollTo(-1)"
|
|
141
|
-
kendoButton
|
|
142
|
-
tabindex="-1"
|
|
143
|
-
[attr.title]="textFor('messageAttachmentLeftArrow')"
|
|
144
|
-
[svgIcon]="chevronLeftIcon"
|
|
145
|
-
icon="chevron-left"
|
|
146
|
-
>
|
|
147
|
-
</button>
|
|
148
|
-
}
|
|
149
|
-
<div
|
|
150
|
-
#deck
|
|
151
|
-
[class.k-card-deck]="carousel"
|
|
152
|
-
[class.k-card-list]="!carousel"
|
|
153
|
-
>
|
|
154
|
-
@for (att of attachments; track att; let index = $index; let first = $first; let last = $last) {
|
|
155
|
-
<kendo-chat-attachment #item
|
|
156
|
-
[attachment]="att"
|
|
157
|
-
[template]="template"
|
|
158
|
-
[class.k-selected]="isSelected(index)"
|
|
159
|
-
[class.k-focus]="isSelected(index)"
|
|
160
|
-
[class.k-card-wrap]="true"
|
|
161
|
-
[class.k-first]="first"
|
|
162
|
-
[class.k-last]="last"
|
|
163
|
-
[attr.tabindex]="tabbable && isSelected(index) ? '0' : '-1'"
|
|
164
|
-
(click)="itemClick(index)"
|
|
165
|
-
(keydown)="itemKeydown($event, att)"
|
|
166
|
-
>
|
|
167
|
-
</kendo-chat-attachment>
|
|
168
|
-
}
|
|
169
|
-
</div>
|
|
170
|
-
@if (showRightArrow) {
|
|
171
|
-
<button
|
|
172
|
-
(click)="scrollTo(1)"
|
|
173
|
-
kendoButton
|
|
174
|
-
tabindex="-1"
|
|
175
|
-
[attr.title]="textFor('messageAttachmentRightArrow')"
|
|
176
|
-
[svgIcon]="chevronRightIcon"
|
|
177
|
-
icon="chevron-right"
|
|
178
|
-
>
|
|
179
|
-
</button>
|
|
180
|
-
}
|
|
181
|
-
`, isInline: true, dependencies: [{ 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: AttachmentComponent, selector: "kendo-chat-attachment", inputs: ["attachment", "template"] }] });
|
|
182
|
-
}
|
|
183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageAttachmentsComponent, decorators: [{
|
|
184
|
-
type: Component,
|
|
185
|
-
args: [{
|
|
186
|
-
providers: [{
|
|
187
|
-
provide: ChatItem,
|
|
188
|
-
useExisting: forwardRef(() => MessageAttachmentsComponent)
|
|
189
|
-
}],
|
|
190
|
-
selector: 'kendo-chat-message-attachments',
|
|
191
|
-
template: `
|
|
192
|
-
@if (showLeftArrow) {
|
|
193
|
-
<button
|
|
194
|
-
(click)="scrollTo(-1)"
|
|
195
|
-
kendoButton
|
|
196
|
-
tabindex="-1"
|
|
197
|
-
[attr.title]="textFor('messageAttachmentLeftArrow')"
|
|
198
|
-
[svgIcon]="chevronLeftIcon"
|
|
199
|
-
icon="chevron-left"
|
|
200
|
-
>
|
|
201
|
-
</button>
|
|
202
|
-
}
|
|
203
|
-
<div
|
|
204
|
-
#deck
|
|
205
|
-
[class.k-card-deck]="carousel"
|
|
206
|
-
[class.k-card-list]="!carousel"
|
|
207
|
-
>
|
|
208
|
-
@for (att of attachments; track att; let index = $index; let first = $first; let last = $last) {
|
|
209
|
-
<kendo-chat-attachment #item
|
|
210
|
-
[attachment]="att"
|
|
211
|
-
[template]="template"
|
|
212
|
-
[class.k-selected]="isSelected(index)"
|
|
213
|
-
[class.k-focus]="isSelected(index)"
|
|
214
|
-
[class.k-card-wrap]="true"
|
|
215
|
-
[class.k-first]="first"
|
|
216
|
-
[class.k-last]="last"
|
|
217
|
-
[attr.tabindex]="tabbable && isSelected(index) ? '0' : '-1'"
|
|
218
|
-
(click)="itemClick(index)"
|
|
219
|
-
(keydown)="itemKeydown($event, att)"
|
|
220
|
-
>
|
|
221
|
-
</kendo-chat-attachment>
|
|
222
|
-
}
|
|
223
|
-
</div>
|
|
224
|
-
@if (showRightArrow) {
|
|
225
|
-
<button
|
|
226
|
-
(click)="scrollTo(1)"
|
|
227
|
-
kendoButton
|
|
228
|
-
tabindex="-1"
|
|
229
|
-
[attr.title]="textFor('messageAttachmentRightArrow')"
|
|
230
|
-
[svgIcon]="chevronRightIcon"
|
|
231
|
-
icon="chevron-right"
|
|
232
|
-
>
|
|
233
|
-
</button>
|
|
234
|
-
}
|
|
235
|
-
`,
|
|
236
|
-
standalone: true,
|
|
237
|
-
imports: [ButtonComponent, AttachmentComponent]
|
|
238
|
-
}]
|
|
239
|
-
}], ctorParameters: () => [{ type: i0.NgZone }, { type: i1.LocalizationService }], propDecorators: { attachments: [{
|
|
240
|
-
type: Input
|
|
241
|
-
}], layout: [{
|
|
242
|
-
type: Input
|
|
243
|
-
}], tabbable: [{
|
|
244
|
-
type: Input
|
|
245
|
-
}], template: [{
|
|
246
|
-
type: Input
|
|
247
|
-
}], localization: [{
|
|
248
|
-
type: Input
|
|
249
|
-
}], carousel: [{
|
|
250
|
-
type: HostBinding,
|
|
251
|
-
args: ['class.k-card-deck-scrollwrap']
|
|
252
|
-
}], deck: [{
|
|
253
|
-
type: ViewChild,
|
|
254
|
-
args: ['deck', { read: ElementRef, static: true }]
|
|
255
|
-
}], items: [{
|
|
256
|
-
type: ViewChildren,
|
|
257
|
-
args: ['item', { read: ElementRef }]
|
|
258
|
-
}] } });
|