@progress/kendo-react-conversational-ui 5.17.0-dev.202308141334 → 5.17.0-dev.202308171144
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/dist/cdn/js/kendo-react-conversational-ui.js +1 -1
- package/dist/es/components/Chat.js +1 -1
- package/dist/es/components/ChatMessage.js +2 -2
- package/dist/es/components/MessageGroup.js +5 -3
- package/dist/es/components/NewMessage.d.ts +0 -1
- package/dist/es/components/NewMessage.js +6 -15
- package/dist/es/package-metadata.js +1 -1
- package/dist/npm/components/Chat.js +1 -1
- package/dist/npm/components/ChatMessage.js +2 -2
- package/dist/npm/components/MessageGroup.js +5 -3
- package/dist/npm/components/NewMessage.d.ts +0 -1
- package/dist/npm/components/NewMessage.js +6 -15
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-react-conversational-ui.js +1 -1
- package/package.json +6 -5
|
@@ -148,7 +148,7 @@ var Chat = /** @class */ (function (_super) {
|
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
150
|
Chat.prototype.getClassNames = function () {
|
|
151
|
-
return classNames('k-
|
|
151
|
+
return classNames('k-chat', this.props.className, { 'k-rtl': this.isDirectionRightToLeft });
|
|
152
152
|
};
|
|
153
153
|
Chat.prototype.checkIsDirectionRightToLeft = function (props) {
|
|
154
154
|
var result = props.dir !== undefined ? props.dir === 'rtl' :
|
|
@@ -37,7 +37,7 @@ var ChatMessage = /** @class */ (function (_super) {
|
|
|
37
37
|
};
|
|
38
38
|
ChatMessage.prototype.getMainView = function () {
|
|
39
39
|
if (this.props.item.typing) {
|
|
40
|
-
return (React.createElement("div", { className: "k-bubble" },
|
|
40
|
+
return (React.createElement("div", { className: "k-chat-bubble" },
|
|
41
41
|
React.createElement("div", { className: "k-typing-indicator" },
|
|
42
42
|
React.createElement("span", null),
|
|
43
43
|
React.createElement("span", null),
|
|
@@ -47,7 +47,7 @@ var ChatMessage = /** @class */ (function (_super) {
|
|
|
47
47
|
return React.createElement(this.props.template, { item: this.props.item });
|
|
48
48
|
}
|
|
49
49
|
else if (this.props.item.text) {
|
|
50
|
-
return (React.createElement("div", { className: "k-bubble" }, this.props.item.text));
|
|
50
|
+
return (React.createElement("div", { className: "k-chat-bubble" }, this.props.item.text));
|
|
51
51
|
}
|
|
52
52
|
else {
|
|
53
53
|
return null;
|
|
@@ -15,6 +15,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
15
15
|
})();
|
|
16
16
|
import * as React from 'react';
|
|
17
17
|
import { classNames } from '@progress/kendo-react-common';
|
|
18
|
+
import { Avatar } from '@progress/kendo-react-layout';
|
|
18
19
|
import Attachment from './Attachment';
|
|
19
20
|
import { isAuthor } from './../utils';
|
|
20
21
|
import { provideLocalizationService } from '@progress/kendo-react-intl';
|
|
@@ -31,10 +32,11 @@ var MessageGroup = /** @class */ (function (_super) {
|
|
|
31
32
|
var _a = this.props.group.author, avatarUrl = _a.avatarUrl, avatarAltText = _a.avatarAltText, name = _a.name;
|
|
32
33
|
var localizationService = provideLocalizationService(this);
|
|
33
34
|
return (React.createElement("div", { className: this.getMsgGroupClassNames() },
|
|
34
|
-
avatarUrl && (React.createElement("img", { src: avatarUrl, className: "k-avatar", alt: avatarAltText !== undefined
|
|
35
|
-
? avatarAltText
|
|
36
|
-
: localizationService.toLanguageString(avatarAlt, messages[avatarAlt]) })),
|
|
37
35
|
name && (React.createElement("p", { className: "k-author" }, name)),
|
|
36
|
+
avatarUrl && (React.createElement(Avatar, { type: 'image' },
|
|
37
|
+
React.createElement("img", { src: avatarUrl, alt: avatarAltText !== undefined
|
|
38
|
+
? avatarAltText
|
|
39
|
+
: localizationService.toLanguageString(avatarAlt, messages[avatarAlt]) }))),
|
|
38
40
|
this.getGroupMessagesView()));
|
|
39
41
|
};
|
|
40
42
|
MessageGroup.prototype.getMsgGroupClassNames = function () {
|
|
@@ -25,7 +25,6 @@ export interface NewMessageState {
|
|
|
25
25
|
*/
|
|
26
26
|
export default class NewMessage extends React.Component<NewMessageProps, NewMessageState> {
|
|
27
27
|
readonly state: NewMessageState;
|
|
28
|
-
private static buttonIconPath;
|
|
29
28
|
private inputEl;
|
|
30
29
|
render(): JSX.Element;
|
|
31
30
|
focusInput(): void;
|
|
@@ -17,6 +17,7 @@ import { Keys, classNames } from '@progress/kendo-react-common';
|
|
|
17
17
|
import * as React from 'react';
|
|
18
18
|
import Toolbar from './Toolbar';
|
|
19
19
|
import { Button } from '@progress/kendo-react-buttons';
|
|
20
|
+
import { paperPlaneIcon, moreHorizontalIcon } from '@progress/kendo-svg-icons';
|
|
20
21
|
import { provideLocalizationService } from '@progress/kendo-react-intl';
|
|
21
22
|
import { messages, newMessageSendButton, newMessageOptionsButton, newMessageMessageInput } from '../messages';
|
|
22
23
|
/**
|
|
@@ -55,24 +56,16 @@ var NewMessage = /** @class */ (function (_super) {
|
|
|
55
56
|
var _this = this;
|
|
56
57
|
var localizationService = provideLocalizationService(this);
|
|
57
58
|
var messageInput = (React.createElement("input", { type: "text", className: this.getClassNames(), placeholder: this.props.placeholder, onKeyDown: this.onInputKeyDown, onFocus: function () { return _this.setState({ focused: true }); }, onBlur: function () { return _this.setState({ focused: false }); }, ref: function (el) { return _this.inputEl = el; }, "aria-label": localizationService.toLanguageString(newMessageMessageInput, messages[newMessageMessageInput]) }));
|
|
58
|
-
var sendButton = (React.createElement(Button, { fillMode: "flat", themeColor: "base", rounded: null, className: "k-
|
|
59
|
-
|
|
60
|
-
React.createElement("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 16 16" },
|
|
61
|
-
React.createElement("path", { d: NewMessage.buttonIconPath })))));
|
|
62
|
-
var toolbarButton = (React.createElement(Button, { fillMode: "flat", themeColor: "base", rounded: null, className: "k-icon-button k-button-toggle", onClick: function (event) { return _this.props.onToolbarActionButtonClick(!_this.props.showToolbar, event); }, "aria-label": localizationService.toLanguageString(newMessageOptionsButton, messages[newMessageOptionsButton]) },
|
|
63
|
-
React.createElement("span", { className: "k-button-icon k-icon" },
|
|
64
|
-
React.createElement("svg", { version: "1.1", id: "Layer_1", x: "0px", y: "0px", viewBox: "0 0 512 512" },
|
|
65
|
-
React.createElement("g", null,
|
|
66
|
-
React.createElement("path", { d: "M128,240c0-26.4-21.6-48-48-48s-48,21.6-48,48s21.6,48,48,48S128,266.4,128,240z" }),
|
|
67
|
-
React.createElement("path", { d: "M192,240c0,26.4,21.6,48,48,48c26.4,0,48-21.6,48-48s-21.6-48-48-48C213.6,192,192,213.6,192,240z" }),
|
|
68
|
-
React.createElement("path", { d: "M352,240c0,26.4,21.6,48,48,48c26.4,0,48-21.6,48-48s-21.6-48-48-48C373.6,192,352,213.6,352,240z" }))))));
|
|
59
|
+
var sendButton = (React.createElement(Button, { fillMode: "flat", themeColor: "base", rounded: null, className: "k-chat-send", icon: "paper-plane", svgIcon: paperPlaneIcon, onClick: this.sendMessage, "aria-label": localizationService.toLanguageString(newMessageSendButton, messages[newMessageSendButton]), dir: this.props.isDirectionRightToLeft ? 'rtl' : undefined }));
|
|
60
|
+
var toolbarButton = (React.createElement(Button, { fillMode: "flat", themeColor: "base", rounded: null, className: "k-button-toggle", icon: 'more-horizontal', svgIcon: moreHorizontalIcon, onClick: function (event) { return _this.props.onToolbarActionButtonClick(!_this.props.showToolbar, event); }, "aria-label": localizationService.toLanguageString(newMessageOptionsButton, messages[newMessageOptionsButton]) }));
|
|
69
61
|
return (React.createElement(React.Fragment, null,
|
|
70
62
|
React.createElement("div", { className: "k-message-box k-textbox k-input k-input-md k-rounded-md k-input-solid" }, this.props.MessageBox ?
|
|
71
63
|
React.createElement(this.props.MessageBox, { messageInput: messageInput, sendButton: sendButton, toolbarButton: toolbarButton }) :
|
|
72
64
|
React.createElement(React.Fragment, null,
|
|
73
65
|
messageInput,
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
React.createElement("span", { className: "k-input-suffix" },
|
|
67
|
+
this.props.toolbar && toolbarButton,
|
|
68
|
+
sendButton))),
|
|
76
69
|
this.props.showToolbar && React.createElement(Toolbar, null, this.props.toolbar)));
|
|
77
70
|
};
|
|
78
71
|
NewMessage.prototype.focusInput = function () {
|
|
@@ -83,8 +76,6 @@ var NewMessage = /** @class */ (function (_super) {
|
|
|
83
76
|
NewMessage.prototype.getClassNames = function () {
|
|
84
77
|
return classNames({ 'k-focus': this.state.focused }, 'k-input k-input k-input-md k-input-solid k-input-solid-base');
|
|
85
78
|
};
|
|
86
|
-
/* eslint-disable-next-line max-len */
|
|
87
|
-
NewMessage.buttonIconPath = 'M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z';
|
|
88
79
|
return NewMessage;
|
|
89
80
|
}(React.Component));
|
|
90
81
|
export default NewMessage;
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-react-conversational-ui',
|
|
6
6
|
productName: 'KendoReact',
|
|
7
7
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1692270759,
|
|
9
9
|
version: '',
|
|
10
10
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
11
11
|
};
|
|
@@ -151,7 +151,7 @@ var Chat = /** @class */ (function (_super) {
|
|
|
151
151
|
}
|
|
152
152
|
};
|
|
153
153
|
Chat.prototype.getClassNames = function () {
|
|
154
|
-
return (0, kendo_react_common_1.classNames)('k-
|
|
154
|
+
return (0, kendo_react_common_1.classNames)('k-chat', this.props.className, { 'k-rtl': this.isDirectionRightToLeft });
|
|
155
155
|
};
|
|
156
156
|
Chat.prototype.checkIsDirectionRightToLeft = function (props) {
|
|
157
157
|
var result = props.dir !== undefined ? props.dir === 'rtl' :
|
|
@@ -40,7 +40,7 @@ var ChatMessage = /** @class */ (function (_super) {
|
|
|
40
40
|
};
|
|
41
41
|
ChatMessage.prototype.getMainView = function () {
|
|
42
42
|
if (this.props.item.typing) {
|
|
43
|
-
return (React.createElement("div", { className: "k-bubble" },
|
|
43
|
+
return (React.createElement("div", { className: "k-chat-bubble" },
|
|
44
44
|
React.createElement("div", { className: "k-typing-indicator" },
|
|
45
45
|
React.createElement("span", null),
|
|
46
46
|
React.createElement("span", null),
|
|
@@ -50,7 +50,7 @@ var ChatMessage = /** @class */ (function (_super) {
|
|
|
50
50
|
return React.createElement(this.props.template, { item: this.props.item });
|
|
51
51
|
}
|
|
52
52
|
else if (this.props.item.text) {
|
|
53
|
-
return (React.createElement("div", { className: "k-bubble" }, this.props.item.text));
|
|
53
|
+
return (React.createElement("div", { className: "k-chat-bubble" }, this.props.item.text));
|
|
54
54
|
}
|
|
55
55
|
else {
|
|
56
56
|
return null;
|
|
@@ -17,6 +17,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
var React = require("react");
|
|
19
19
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
20
|
+
var kendo_react_layout_1 = require("@progress/kendo-react-layout");
|
|
20
21
|
var Attachment_1 = require("./Attachment");
|
|
21
22
|
var utils_1 = require("./../utils");
|
|
22
23
|
var kendo_react_intl_1 = require("@progress/kendo-react-intl");
|
|
@@ -33,10 +34,11 @@ var MessageGroup = /** @class */ (function (_super) {
|
|
|
33
34
|
var _a = this.props.group.author, avatarUrl = _a.avatarUrl, avatarAltText = _a.avatarAltText, name = _a.name;
|
|
34
35
|
var localizationService = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
35
36
|
return (React.createElement("div", { className: this.getMsgGroupClassNames() },
|
|
36
|
-
avatarUrl && (React.createElement("img", { src: avatarUrl, className: "k-avatar", alt: avatarAltText !== undefined
|
|
37
|
-
? avatarAltText
|
|
38
|
-
: localizationService.toLanguageString(messages_1.avatarAlt, messages_1.messages[messages_1.avatarAlt]) })),
|
|
39
37
|
name && (React.createElement("p", { className: "k-author" }, name)),
|
|
38
|
+
avatarUrl && (React.createElement(kendo_react_layout_1.Avatar, { type: 'image' },
|
|
39
|
+
React.createElement("img", { src: avatarUrl, alt: avatarAltText !== undefined
|
|
40
|
+
? avatarAltText
|
|
41
|
+
: localizationService.toLanguageString(messages_1.avatarAlt, messages_1.messages[messages_1.avatarAlt]) }))),
|
|
40
42
|
this.getGroupMessagesView()));
|
|
41
43
|
};
|
|
42
44
|
MessageGroup.prototype.getMsgGroupClassNames = function () {
|
|
@@ -25,7 +25,6 @@ export interface NewMessageState {
|
|
|
25
25
|
*/
|
|
26
26
|
export default class NewMessage extends React.Component<NewMessageProps, NewMessageState> {
|
|
27
27
|
readonly state: NewMessageState;
|
|
28
|
-
private static buttonIconPath;
|
|
29
28
|
private inputEl;
|
|
30
29
|
render(): JSX.Element;
|
|
31
30
|
focusInput(): void;
|
|
@@ -19,6 +19,7 @@ var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
|
19
19
|
var React = require("react");
|
|
20
20
|
var Toolbar_1 = require("./Toolbar");
|
|
21
21
|
var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
|
|
22
|
+
var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
|
|
22
23
|
var kendo_react_intl_1 = require("@progress/kendo-react-intl");
|
|
23
24
|
var messages_1 = require("../messages");
|
|
24
25
|
/**
|
|
@@ -57,24 +58,16 @@ var NewMessage = /** @class */ (function (_super) {
|
|
|
57
58
|
var _this = this;
|
|
58
59
|
var localizationService = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
59
60
|
var messageInput = (React.createElement("input", { type: "text", className: this.getClassNames(), placeholder: this.props.placeholder, onKeyDown: this.onInputKeyDown, onFocus: function () { return _this.setState({ focused: true }); }, onBlur: function () { return _this.setState({ focused: false }); }, ref: function (el) { return _this.inputEl = el; }, "aria-label": localizationService.toLanguageString(messages_1.newMessageMessageInput, messages_1.messages[messages_1.newMessageMessageInput]) }));
|
|
60
|
-
var sendButton = (React.createElement(kendo_react_buttons_1.Button, { fillMode: "flat", themeColor: "base", rounded: null, className: "k-
|
|
61
|
-
|
|
62
|
-
React.createElement("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 16 16" },
|
|
63
|
-
React.createElement("path", { d: NewMessage.buttonIconPath })))));
|
|
64
|
-
var toolbarButton = (React.createElement(kendo_react_buttons_1.Button, { fillMode: "flat", themeColor: "base", rounded: null, className: "k-icon-button k-button-toggle", onClick: function (event) { return _this.props.onToolbarActionButtonClick(!_this.props.showToolbar, event); }, "aria-label": localizationService.toLanguageString(messages_1.newMessageOptionsButton, messages_1.messages[messages_1.newMessageOptionsButton]) },
|
|
65
|
-
React.createElement("span", { className: "k-button-icon k-icon" },
|
|
66
|
-
React.createElement("svg", { version: "1.1", id: "Layer_1", x: "0px", y: "0px", viewBox: "0 0 512 512" },
|
|
67
|
-
React.createElement("g", null,
|
|
68
|
-
React.createElement("path", { d: "M128,240c0-26.4-21.6-48-48-48s-48,21.6-48,48s21.6,48,48,48S128,266.4,128,240z" }),
|
|
69
|
-
React.createElement("path", { d: "M192,240c0,26.4,21.6,48,48,48c26.4,0,48-21.6,48-48s-21.6-48-48-48C213.6,192,192,213.6,192,240z" }),
|
|
70
|
-
React.createElement("path", { d: "M352,240c0,26.4,21.6,48,48,48c26.4,0,48-21.6,48-48s-21.6-48-48-48C373.6,192,352,213.6,352,240z" }))))));
|
|
61
|
+
var sendButton = (React.createElement(kendo_react_buttons_1.Button, { fillMode: "flat", themeColor: "base", rounded: null, className: "k-chat-send", icon: "paper-plane", svgIcon: kendo_svg_icons_1.paperPlaneIcon, onClick: this.sendMessage, "aria-label": localizationService.toLanguageString(messages_1.newMessageSendButton, messages_1.messages[messages_1.newMessageSendButton]), dir: this.props.isDirectionRightToLeft ? 'rtl' : undefined }));
|
|
62
|
+
var toolbarButton = (React.createElement(kendo_react_buttons_1.Button, { fillMode: "flat", themeColor: "base", rounded: null, className: "k-button-toggle", icon: 'more-horizontal', svgIcon: kendo_svg_icons_1.moreHorizontalIcon, onClick: function (event) { return _this.props.onToolbarActionButtonClick(!_this.props.showToolbar, event); }, "aria-label": localizationService.toLanguageString(messages_1.newMessageOptionsButton, messages_1.messages[messages_1.newMessageOptionsButton]) }));
|
|
71
63
|
return (React.createElement(React.Fragment, null,
|
|
72
64
|
React.createElement("div", { className: "k-message-box k-textbox k-input k-input-md k-rounded-md k-input-solid" }, this.props.MessageBox ?
|
|
73
65
|
React.createElement(this.props.MessageBox, { messageInput: messageInput, sendButton: sendButton, toolbarButton: toolbarButton }) :
|
|
74
66
|
React.createElement(React.Fragment, null,
|
|
75
67
|
messageInput,
|
|
76
|
-
|
|
77
|
-
|
|
68
|
+
React.createElement("span", { className: "k-input-suffix" },
|
|
69
|
+
this.props.toolbar && toolbarButton,
|
|
70
|
+
sendButton))),
|
|
78
71
|
this.props.showToolbar && React.createElement(Toolbar_1.default, null, this.props.toolbar)));
|
|
79
72
|
};
|
|
80
73
|
NewMessage.prototype.focusInput = function () {
|
|
@@ -85,8 +78,6 @@ var NewMessage = /** @class */ (function (_super) {
|
|
|
85
78
|
NewMessage.prototype.getClassNames = function () {
|
|
86
79
|
return (0, kendo_react_common_1.classNames)({ 'k-focus': this.state.focused }, 'k-input k-input k-input-md k-input-solid k-input-solid-base');
|
|
87
80
|
};
|
|
88
|
-
/* eslint-disable-next-line max-len */
|
|
89
|
-
NewMessage.buttonIconPath = 'M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z';
|
|
90
81
|
return NewMessage;
|
|
91
82
|
}(React.Component));
|
|
92
83
|
exports.default = NewMessage;
|
|
@@ -8,7 +8,7 @@ exports.packageMetadata = {
|
|
|
8
8
|
name: '@progress/kendo-react-conversational-ui',
|
|
9
9
|
productName: 'KendoReact',
|
|
10
10
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate:
|
|
11
|
+
publishDate: 1692270759,
|
|
12
12
|
version: '',
|
|
13
13
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
14
14
|
};
|