@progress/kendo-react-conversational-ui 5.6.0-dev.202208120836 → 5.6.0-dev.202208261541
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/README.md +1 -1
- package/about.md +2 -2
- package/dist/cdn/js/kendo-react-conversational-ui.js +1 -1
- package/dist/es/api/user.interface.d.ts +4 -0
- package/dist/es/components/Chat.d.ts +1 -1
- package/dist/es/components/MessageGroup.d.ts +0 -2
- package/dist/es/components/MessageGroup.js +8 -16
- package/dist/es/components/NewMessage.js +2 -2
- package/dist/es/messages/index.d.ts +10 -0
- package/dist/es/messages/index.js +10 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/npm/api/user.interface.d.ts +4 -0
- package/dist/npm/components/Chat.d.ts +1 -1
- package/dist/npm/components/MessageGroup.d.ts +0 -2
- package/dist/npm/components/MessageGroup.js +8 -16
- package/dist/npm/components/NewMessage.js +1 -1
- package/dist/npm/messages/index.d.ts +10 -0
- package/dist/npm/messages/index.js +11 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-react-conversational-ui.js +1 -1
- package/package.json +6 -6
|
@@ -15,7 +15,7 @@ export declare class Chat extends React.Component<ChatProps, ChatState> {
|
|
|
15
15
|
user: PropTypes.Requireable<object>;
|
|
16
16
|
messageTemplate: PropTypes.Requireable<any>;
|
|
17
17
|
attachmentTemplate: PropTypes.Requireable<any>;
|
|
18
|
-
width: PropTypes.Requireable<string | number
|
|
18
|
+
width: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
19
19
|
onMessageSend: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
20
|
onActionExecute: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
21
|
dir: PropTypes.Requireable<string>;
|
|
@@ -21,7 +21,5 @@ export interface MessageGroupProps {
|
|
|
21
21
|
export default class MessageGroup extends React.Component<MessageGroupProps, {}> {
|
|
22
22
|
render(): JSX.Element;
|
|
23
23
|
private getMsgGroupClassNames;
|
|
24
|
-
private getAvatarView;
|
|
25
|
-
private getAuthorNameView;
|
|
26
24
|
private getGroupMessagesView;
|
|
27
25
|
}
|
|
@@ -17,6 +17,8 @@ import * as React from 'react';
|
|
|
17
17
|
import { classNames } from '@progress/kendo-react-common';
|
|
18
18
|
import Attachment from './Attachment';
|
|
19
19
|
import { isAuthor } from './../utils';
|
|
20
|
+
import { provideLocalizationService } from '@progress/kendo-react-intl';
|
|
21
|
+
import { messages, avatarAlt } from '../messages';
|
|
20
22
|
/**
|
|
21
23
|
* @hidden
|
|
22
24
|
*/
|
|
@@ -26,9 +28,13 @@ var MessageGroup = /** @class */ (function (_super) {
|
|
|
26
28
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
27
29
|
}
|
|
28
30
|
MessageGroup.prototype.render = function () {
|
|
31
|
+
var _a = this.props.group.author, avatarUrl = _a.avatarUrl, avatarAltText = _a.avatarAltText, name = _a.name;
|
|
32
|
+
var localizationService = provideLocalizationService(this);
|
|
29
33
|
return (React.createElement("div", { className: this.getMsgGroupClassNames() },
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
avatarUrl && (React.createElement("img", { src: avatarUrl, className: "k-avatar", alt: avatarAltText !== undefined
|
|
35
|
+
? avatarAltText
|
|
36
|
+
: localizationService.toLanguageString(avatarAlt, messages[avatarAlt]) })),
|
|
37
|
+
name && (React.createElement("p", { className: "k-author" }, name)),
|
|
32
38
|
this.getGroupMessagesView()));
|
|
33
39
|
};
|
|
34
40
|
MessageGroup.prototype.getMsgGroupClassNames = function () {
|
|
@@ -37,20 +43,6 @@ var MessageGroup = /** @class */ (function (_super) {
|
|
|
37
43
|
'k-alt': isAuthor(this.props.user, this.props.group.messages[0])
|
|
38
44
|
});
|
|
39
45
|
};
|
|
40
|
-
MessageGroup.prototype.getAvatarView = function () {
|
|
41
|
-
var result = null;
|
|
42
|
-
if (this.props.group.author.avatarUrl) {
|
|
43
|
-
result = React.createElement("img", { src: this.props.group.author.avatarUrl, className: "k-avatar" });
|
|
44
|
-
}
|
|
45
|
-
return result;
|
|
46
|
-
};
|
|
47
|
-
MessageGroup.prototype.getAuthorNameView = function () {
|
|
48
|
-
var result = null;
|
|
49
|
-
if (this.props.group.author.name) {
|
|
50
|
-
result = React.createElement("p", { className: "k-author" }, this.props.group.author.name);
|
|
51
|
-
}
|
|
52
|
-
return result;
|
|
53
|
-
};
|
|
54
46
|
MessageGroup.prototype.getGroupMessagesView = function () {
|
|
55
47
|
var _this = this;
|
|
56
48
|
var lastItemIndex = this.props.group.messages.length - 1;
|
|
@@ -18,7 +18,7 @@ import * as React from 'react';
|
|
|
18
18
|
import Toolbar from './Toolbar';
|
|
19
19
|
import { Button } from '@progress/kendo-react-buttons';
|
|
20
20
|
import { provideLocalizationService } from '@progress/kendo-react-intl';
|
|
21
|
-
import { messages, newMessageSendButton, newMessageOptionsButton } from '../messages';
|
|
21
|
+
import { messages, newMessageSendButton, newMessageOptionsButton, newMessageMessageInput } from '../messages';
|
|
22
22
|
/**
|
|
23
23
|
* @hidden
|
|
24
24
|
*/
|
|
@@ -54,7 +54,7 @@ var NewMessage = /** @class */ (function (_super) {
|
|
|
54
54
|
NewMessage.prototype.render = function () {
|
|
55
55
|
var _this = this;
|
|
56
56
|
var localizationService = provideLocalizationService(this);
|
|
57
|
-
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; } }));
|
|
57
|
+
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
58
|
var sendButton = (React.createElement(Button, { fillMode: "flat", themeColor: "base", rounded: null, className: "k-icon-button k-button-send", onClick: this.sendMessage, "aria-label": localizationService.toLanguageString(newMessageSendButton, messages[newMessageSendButton]), dir: this.props.isDirectionRightToLeft ? 'rtl' : undefined },
|
|
59
59
|
React.createElement("span", { className: "k-button-icon k-icon" },
|
|
60
60
|
React.createElement("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 16 16" },
|
|
@@ -6,10 +6,20 @@ export declare const newMessageSendButton = "newMessage.sendButton";
|
|
|
6
6
|
* @hidden
|
|
7
7
|
*/
|
|
8
8
|
export declare const newMessageOptionsButton = "newMessage.optionsButton";
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare const newMessageMessageInput = "newMessage.messageInput";
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
export declare const avatarAlt = "avatar.alt";
|
|
9
17
|
/**
|
|
10
18
|
* @hidden
|
|
11
19
|
*/
|
|
12
20
|
export declare const messages: {
|
|
13
21
|
"newMessage.sendButton": string;
|
|
14
22
|
"newMessage.optionsButton": string;
|
|
23
|
+
"newMessage.messageInput": string;
|
|
24
|
+
"avatar.alt": string;
|
|
15
25
|
};
|
|
@@ -7,10 +7,20 @@ export var newMessageSendButton = 'newMessage.sendButton';
|
|
|
7
7
|
* @hidden
|
|
8
8
|
*/
|
|
9
9
|
export var newMessageOptionsButton = 'newMessage.optionsButton';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export var newMessageMessageInput = 'newMessage.messageInput';
|
|
14
|
+
/**
|
|
15
|
+
* @hidden
|
|
16
|
+
*/
|
|
17
|
+
export var avatarAlt = 'avatar.alt';
|
|
10
18
|
/**
|
|
11
19
|
* @hidden
|
|
12
20
|
*/
|
|
13
21
|
export var messages = (_a = {},
|
|
14
22
|
_a[newMessageSendButton] = 'Send',
|
|
15
23
|
_a[newMessageOptionsButton] = 'Options',
|
|
24
|
+
_a[newMessageMessageInput] = 'Message',
|
|
25
|
+
_a[avatarAlt] = 'Avatar',
|
|
16
26
|
_a);
|
|
@@ -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: 1661527206,
|
|
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
|
};
|
|
@@ -15,7 +15,7 @@ export declare class Chat extends React.Component<ChatProps, ChatState> {
|
|
|
15
15
|
user: PropTypes.Requireable<object>;
|
|
16
16
|
messageTemplate: PropTypes.Requireable<any>;
|
|
17
17
|
attachmentTemplate: PropTypes.Requireable<any>;
|
|
18
|
-
width: PropTypes.Requireable<string | number
|
|
18
|
+
width: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
19
19
|
onMessageSend: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
20
|
onActionExecute: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
21
|
dir: PropTypes.Requireable<string>;
|
|
@@ -21,7 +21,5 @@ export interface MessageGroupProps {
|
|
|
21
21
|
export default class MessageGroup extends React.Component<MessageGroupProps, {}> {
|
|
22
22
|
render(): JSX.Element;
|
|
23
23
|
private getMsgGroupClassNames;
|
|
24
|
-
private getAvatarView;
|
|
25
|
-
private getAuthorNameView;
|
|
26
24
|
private getGroupMessagesView;
|
|
27
25
|
}
|
|
@@ -19,6 +19,8 @@ var React = require("react");
|
|
|
19
19
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
20
20
|
var Attachment_1 = require("./Attachment");
|
|
21
21
|
var utils_1 = require("./../utils");
|
|
22
|
+
var kendo_react_intl_1 = require("@progress/kendo-react-intl");
|
|
23
|
+
var messages_1 = require("../messages");
|
|
22
24
|
/**
|
|
23
25
|
* @hidden
|
|
24
26
|
*/
|
|
@@ -28,9 +30,13 @@ var MessageGroup = /** @class */ (function (_super) {
|
|
|
28
30
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
29
31
|
}
|
|
30
32
|
MessageGroup.prototype.render = function () {
|
|
33
|
+
var _a = this.props.group.author, avatarUrl = _a.avatarUrl, avatarAltText = _a.avatarAltText, name = _a.name;
|
|
34
|
+
var localizationService = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
31
35
|
return (React.createElement("div", { className: this.getMsgGroupClassNames() },
|
|
32
|
-
|
|
33
|
-
|
|
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
|
+
name && (React.createElement("p", { className: "k-author" }, name)),
|
|
34
40
|
this.getGroupMessagesView()));
|
|
35
41
|
};
|
|
36
42
|
MessageGroup.prototype.getMsgGroupClassNames = function () {
|
|
@@ -39,20 +45,6 @@ var MessageGroup = /** @class */ (function (_super) {
|
|
|
39
45
|
'k-alt': (0, utils_1.isAuthor)(this.props.user, this.props.group.messages[0])
|
|
40
46
|
});
|
|
41
47
|
};
|
|
42
|
-
MessageGroup.prototype.getAvatarView = function () {
|
|
43
|
-
var result = null;
|
|
44
|
-
if (this.props.group.author.avatarUrl) {
|
|
45
|
-
result = React.createElement("img", { src: this.props.group.author.avatarUrl, className: "k-avatar" });
|
|
46
|
-
}
|
|
47
|
-
return result;
|
|
48
|
-
};
|
|
49
|
-
MessageGroup.prototype.getAuthorNameView = function () {
|
|
50
|
-
var result = null;
|
|
51
|
-
if (this.props.group.author.name) {
|
|
52
|
-
result = React.createElement("p", { className: "k-author" }, this.props.group.author.name);
|
|
53
|
-
}
|
|
54
|
-
return result;
|
|
55
|
-
};
|
|
56
48
|
MessageGroup.prototype.getGroupMessagesView = function () {
|
|
57
49
|
var _this = this;
|
|
58
50
|
var lastItemIndex = this.props.group.messages.length - 1;
|
|
@@ -56,7 +56,7 @@ var NewMessage = /** @class */ (function (_super) {
|
|
|
56
56
|
NewMessage.prototype.render = function () {
|
|
57
57
|
var _this = this;
|
|
58
58
|
var localizationService = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
59
|
-
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; } }));
|
|
59
|
+
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
60
|
var sendButton = (React.createElement(kendo_react_buttons_1.Button, { fillMode: "flat", themeColor: "base", rounded: null, className: "k-icon-button k-button-send", onClick: this.sendMessage, "aria-label": localizationService.toLanguageString(messages_1.newMessageSendButton, messages_1.messages[messages_1.newMessageSendButton]), dir: this.props.isDirectionRightToLeft ? 'rtl' : undefined },
|
|
61
61
|
React.createElement("span", { className: "k-button-icon k-icon" },
|
|
62
62
|
React.createElement("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 16 16" },
|
|
@@ -6,10 +6,20 @@ export declare const newMessageSendButton = "newMessage.sendButton";
|
|
|
6
6
|
* @hidden
|
|
7
7
|
*/
|
|
8
8
|
export declare const newMessageOptionsButton = "newMessage.optionsButton";
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare const newMessageMessageInput = "newMessage.messageInput";
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
export declare const avatarAlt = "avatar.alt";
|
|
9
17
|
/**
|
|
10
18
|
* @hidden
|
|
11
19
|
*/
|
|
12
20
|
export declare const messages: {
|
|
13
21
|
"newMessage.sendButton": string;
|
|
14
22
|
"newMessage.optionsButton": string;
|
|
23
|
+
"newMessage.messageInput": string;
|
|
24
|
+
"avatar.alt": string;
|
|
15
25
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.messages = exports.newMessageOptionsButton = exports.newMessageSendButton = void 0;
|
|
4
|
+
exports.messages = exports.avatarAlt = exports.newMessageMessageInput = exports.newMessageOptionsButton = exports.newMessageSendButton = void 0;
|
|
5
5
|
/**
|
|
6
6
|
* @hidden
|
|
7
7
|
*/
|
|
@@ -10,10 +10,20 @@ exports.newMessageSendButton = 'newMessage.sendButton';
|
|
|
10
10
|
* @hidden
|
|
11
11
|
*/
|
|
12
12
|
exports.newMessageOptionsButton = 'newMessage.optionsButton';
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
exports.newMessageMessageInput = 'newMessage.messageInput';
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
exports.avatarAlt = 'avatar.alt';
|
|
13
21
|
/**
|
|
14
22
|
* @hidden
|
|
15
23
|
*/
|
|
16
24
|
exports.messages = (_a = {},
|
|
17
25
|
_a[exports.newMessageSendButton] = 'Send',
|
|
18
26
|
_a[exports.newMessageOptionsButton] = 'Options',
|
|
27
|
+
_a[exports.newMessageMessageInput] = 'Message',
|
|
28
|
+
_a[exports.avatarAlt] = 'Avatar',
|
|
19
29
|
_a);
|
|
@@ -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: 1661527206,
|
|
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
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register("@progress/kendo-react-conversational-ui",["@progress/kendo-react-buttons","@progress/kendo-react-common","@progress/kendo-react-intl","react"],function(t,e){var o={},r={},i={},a={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(a,"__esModule",{value:!0}),{setters:[function(e){Object.keys(e).forEach(function(t){o[t]=e[t]})},function(e){Object.keys(e).forEach(function(t){r[t]=e[t]})},function(e){Object.keys(e).forEach(function(t){i[t]=e[t]})},function(e){Object.keys(e).forEach(function(t){a[t]=e[t]})}],execute:function(){var n,s;t((n={262:(t,e,o)=>{"use strict";var i=o(586);function n(){}function s(){}s.resetWarningCache=n,t.exports=function(){function t(t,e,o,n,s,r){if(r!==i)throw(r=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")).name="Invariant Violation",r}function e(){return t}var o={array:t.isRequired=t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:s,resetWarningCache:n};return o.PropTypes=o}},980:(t,e,o)=>{t.exports=o(262)()},586:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},271:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},310:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},203:(t,e,o)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertMsgsToViewItems=void 0;function c(t){return t[t.length-1]}var p=o(147);e.convertMsgsToViewItems=function(t){var e,a,t=t.slice().reduce((a=t.length,function(t,e,o){var n,s,r,i,o=o===a-1;return n=t,r=e.timestamp,i=c(n),!r||i&&(i=i.timestamp,!(s=r)||!i||i.getDate()===s.getDate()&&i.getMonth()===s.getMonth()&&i.getFullYear()===s.getFullYear())||(i={type:"date-marker",timestamp:r,trackBy:r.getTime()},n.push(i)),s=e,n=c(r=t),i=void 0,s.typing&&!o||((i=n&&"message-group"===n.type?n.messages:i)&&(0,p.isAuthor)(s.author,c(i))?i.push(s):r.push({type:"message-group",messages:[s],author:s.author,timestamp:s.timestamp,trackBy:s})),e.attachments&&1<e.attachments.length&&t.push({type:"attachment-group",attachments:e.attachments,attachmentLayout:e.attachmentLayout,timestamp:e.timestamp,trackBy:e}),e.suggestedActions&&o&&t.push({type:"action-group",actions:e.suggestedActions,timestamp:e.timestamp,trackBy:e}),t}),[]),o=0;return(e=t).forEach(function(t){"message-group"===t.type?t.messages.forEach(function(t){t.selectionIndex=o++}):"attachment-group"!==t.type&&"action-group"!==t.type||(t.selectionIndex=o++)}),e.lastSelectionIndex=o-1,t}},240:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},647:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},286:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},318:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},325:function(t,e,o){"use strict";var n,s,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),o(954)),a=o(811),c=o(811),o=(s=o(854).FocusableUponSelection,r(p,s),p.prototype.render=function(){var e=this;return i.createElement("span",{className:this.getClassNames(),onClick:function(t){return e.props.onActionExecute(e.props.item,t)},ref:function(t){return e.elementToFocus=t},onKeyDown:this.onKeyDown,tabIndex:this.props.tabbable?0:-1},this.props.item.title||this.props.item.value)},p.prototype.getClassNames=function(){return(0,c.classNames)("k-quick-reply",{"k-first":this.props.isFirstItemInGroup},{"k-last":this.props.isLastItemInGroup},{"k-selected":this.props.selected},{"k-focus":this.props.selected})},p);function p(){var e=null!==s&&s.apply(this,arguments)||this;return e.onKeyDown=function(t){t.keyCode===a.Keys.enter&&e.props.onActionExecute(e.props.item,t)},e}e.default=o},88:function(t,e,o){"use strict";var n,s,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),o(954)),a=o(811),c=o(325),o=(s=o(536).SelectableItemsContainer,r(p,s),p.prototype.render=function(){var o=this,n=this.props.group.actions?this.props.group.actions.length-1:0;return i.createElement("div",{className:this.getClassNames(),onClick:this.onRequestContainerSelection,onKeyDown:this.onKeyDown},this.props.group.actions&&this.props.group.actions.map(function(t,e){return i.createElement(c.default,{item:t,onActionExecute:o.props.onActionExecute,selected:e===o.state.selectedItemIndex,tabbable:o.props.isLastGroup&&e===o.state.selectedItemIndex,isFirstItemInGroup:0===e,isLastItemInGroup:e===n,key:e})}))},p.prototype.getClassNames=function(){return(0,a.classNames)("k-quick-replies")},p);function p(t){return s.call(this,t)||this}e.default=o},797:function(t,e,o){"use strict";var n,s,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),o(954)),a=o(811),o=(s=o(854).FocusableUponSelection,r(c,s),c.prototype.render=function(){var e=this;return i.createElement("div",{className:this.getClassNames(),tabIndex:this.getTabIndexValue(),onClick:this.props.onClick,ref:function(t){return e.elementToFocus=t}},this.props.template?i.createElement(this.props.template,{item:this.props.item}):i.createElement("div",{className:"k-card"},i.createElement("div",{className:"k-card-body"},this.getTitleView(),this.getSubtitleView(),this.getContentView())))},c.prototype.getTabIndexValue=function(){return void 0===this.props.tabbable?void 0:this.props.tabbable?0:-1},c.prototype.getClassNames=function(){return(0,a.classNames)({"k-selected":this.props.selected},{"k-focus":this.props.selected},"k-card-wrap",{"k-first":this.props.isFirstItemInGroup},{"k-last":this.props.isLastItemInGroup})},c.prototype.getTitleView=function(){return this.props.item.title?i.createElement("h5",{className:"k-card-title"},this.props.item.title):null},c.prototype.getSubtitleView=function(){return this.props.item.subtitle?i.createElement("h6",{className:"k-card-subtitle"},this.props.item.subtitle):null},c.prototype.getContentView=function(){return 0===this.props.item.contentType.indexOf("image/")?i.createElement("img",{src:this.props.item.content}):this.props.item.content},c);function c(){return null!==s&&s.apply(this,arguments)||this}e.default=o},564:function(t,e,o){"use strict";var n,s,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),o(954)),a=o(811),c=o(797),p=o(536),u=o(414),o=(s=p.SelectableItemsContainer,r(l,s),l.prototype.render=function(){var o=this,t=this.isCardDeckLayout(this.props),e=i.createElement("div",{className:this.getClassNames(),onKeyDown:t?void 0:this.onKeyDown},this.props.group.attachments.map(function(t,e){return i.createElement(c.default,{item:t,template:o.props.itemTemplate,selected:e===o.state.selectedItemIndex,tabbable:o.props.isLastGroup&&e===o.state.selectedItemIndex,isFirstItemInGroup:0===e,isLastItemInGroup:e===o.getLastItemIndex(),onClick:function(){return o.onAttachmentClick(e)},key:e})}));return t?i.createElement("div",{className:"k-card-deck-scrollwrap",onKeyDown:this.onKeyDown},this.getLeftScrollBtn(),e,this.getRightScrollBtn()):e},Object.defineProperty(l.prototype,"isKeyboardNavigationLeftRight",{get:function(){return this.isCardDeckLayout(this.props)},enumerable:!1,configurable:!0}),l.prototype.getLastItemIndex=function(){return this.props.group.attachments.length-1},l.prototype.getLeftScrollBtn=function(){var t=this,e=null;return e=this.isCardDeckLayout(this.props)&&this.state.selectedItemIndex?i.createElement(u.Button,{icon:"arrow-chevron-left",onClick:function(){return t.onNavigateBtnClick(!1)}}):e},l.prototype.getRightScrollBtn=function(){var t=this,e=null;return e=this.isCardDeckLayout(this.props)&&this.state.selectedItemIndex!==this.getLastItemIndex()?i.createElement(u.Button,{icon:"arrow-chevron-right",onClick:function(){return t.onNavigateBtnClick(!0)}}):e},l.prototype.onAttachmentClick=function(t){this.onRequestContainerSelection(),this.setState({selectedItemIndex:t})},l.prototype.onNavigateBtnClick=function(t){this.onRequestContainerSelection(),this.navigate(t,1)},l.prototype.isCardDeckLayout=function(t){return"list"!==t.group.attachmentLayout},l.prototype.getClassNames=function(){return(0,a.classNames)({"k-card-deck":this.isCardDeckLayout(this.props)})},l);function l(){return null!==s&&s.apply(this,arguments)||this}e.default=o},177:function(t,e,o){"use strict";var n,s,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.Chat=void 0,o(811)),a=o(980),c=o(954),p=o(203),u=o(88),l=o(564),m=o(372),h=o(575),d=o(415),f=o(626),y=o(811),g=o(363),o=(s=c.Component,r(v,s),v.prototype.render=function(){var e=this;return this.viewItems=this.getViewItemsFromMsgs(this.props.messages),this.isDirectionRightToLeft=this.checkIsDirectionRightToLeft(this.props),c.createElement("div",{style:{width:this.props.width},onKeyDown:this.onKeyDown,className:this.getClassNames(),ref:function(t){return e.chatWrapperEl=t}},c.createElement("div",{className:"k-message-list k-avatars",onBlur:this.onBlur,onFocus:this.onFocus,role:"log","aria-live":"polite",onScroll:function(t){e.scrollToBottomOnLoadingData=t.currentTarget.scrollTop===t.currentTarget.scrollHeight-t.currentTarget.clientHeight},ref:function(t){return e.viewItemsWrapperEl=t}},c.createElement("div",{className:"k-message-list-content"},this.renderViewItems())),c.createElement(d.default,{user:this.props.user,onMessageSend:this.onMessageSend,isDirectionRightToLeft:this.isDirectionRightToLeft,ref:function(t){return e.newMsgComp=t},placeholder:this.props.placeholder,MessageBox:this.props.messageBox,toolbar:this.props.toolbar,onToolbarActionButtonClick:this.props.onToolbarActionExecute,showToolbar:this.props.showToolbar}))},v.prototype.componentDidMount=function(){var t=this;this.setState({isFirstRender:!1},function(){t.nextTickId=window.setTimeout(function(){return t.scrollViewItemsToBottom()},250)})},v.prototype.componentWillUnmount=function(){clearTimeout(this.nextTickId)},v.prototype.componentDidUpdate=function(t){t.messages.length!==this.props.messages.length&&this.scrollToBottomOnLoadingData&&this.scrollViewItemsToBottom()},v.prototype.getClassNames=function(){return(0,i.classNames)("k-widget","k-chat",this.props.className,{"k-rtl":this.isDirectionRightToLeft})},v.prototype.checkIsDirectionRightToLeft=function(t){t=void 0!==t.dir?"rtl"===t.dir:this.chatWrapperEl&&"rtl"===getComputedStyle(this.chatWrapperEl).direction;return Boolean(t)},v.prototype.renderViewItems=function(){var o=this,n=this.viewItems.length-1;return this.viewItems.map(function(t,e){return"date-marker"===t.type?c.createElement(m.default,{item:t,key:e}):"message-group"===t.type?c.createElement(h.default,{group:t,itemTemplate:o.props.messageTemplate,attachmentTemplate:o.props.attachmentTemplate,user:o.props.user,selectedItemIndex:o.state.selectedItemIndex,onRequestSelection:o.onSelectionRequested,isLastGroup:e===n,key:e,message:o.props.message||v.defaultProps.message}):"attachment-group"===t.type?c.createElement(l.default,{group:t,itemTemplate:o.props.attachmentTemplate,onRequestSelection:o.onSelectionRequested,selected:t.selectionIndex===o.state.selectedItemIndex,isLastGroup:e===n,key:e}):"action-group"===t.type?c.createElement(u.default,{group:t,onActionExecute:o.onActionExecute,onRequestSelection:o.onSelectionRequested,selected:t.selectionIndex===o.state.selectedItemIndex,isLastGroup:e===n,key:e}):void 0})},v.prototype.scrollViewItemsToBottom=function(){this.viewItemsWrapperEl&&(this.viewItemsWrapperEl.scrollTop=this.viewItemsWrapperEl.scrollHeight-this.viewItemsWrapperEl.clientHeight)},v.prototype.getViewItemsFromMsgs=function(t){return 0<t.length?(0,p.convertMsgsToViewItems)(t):[]},v.propTypes={messages:a.arrayOf(a.object),user:a.object,messageTemplate:a.any,attachmentTemplate:a.any,width:a.oneOfType([a.string,a.number]),onMessageSend:a.func,onActionExecute:a.func,dir:a.string,messageBox:a.any},v.defaultProps={messages:[],dateFormat:"g",message:f.ChatMessage},v);function v(t){var n=s.call(this,t)||this;return n.viewItems=[],n.isDirectionRightToLeft=!1,n.scrollToBottomOnLoadingData=!0,n.onFocus=function(){clearTimeout(n.timeoutIdForChatLosingFocus)},n.onBlur=function(){n.timeoutIdForChatLosingFocus=window.setTimeout(function(){n.setState({selectedItemIndex:null})},0)},n.onSelectionRequested=function(t){n.setState({selectedItemIndex:t})},n.onKeyDown=function(t){var e=null,o=null!==n.state.selectedItemIndex?n.state.selectedItemIndex:n.viewItems.lastSelectionIndex;t.keyCode===i.Keys.up?null===o?e=0:0<o&&(e=o-1):t.keyCode===i.Keys.down&&(null===o?e=0:o<n.viewItems.lastSelectionIndex&&(e=o+1)),null!==e&&(n.setState({selectedItemIndex:e}),t.preventDefault())},n.onMessageSend=function(t,e){(0,i.dispatchEvent)(n.props.onMessageSend,e,n,{message:t})},n.onActionExecute=function(t,e){if((0,i.dispatchEvent)(n.props.onActionExecute,e,n,{action:t}),!e.isDefaultPrevented()){switch(t.type){case"reply":n.onMessageSend({author:n.props.user,text:t.value,timestamp:new Date},e);break;case"call":window.open("tel:"+t.value);break;case"openUrl":window.open(t.value)}n.newMsgComp.focusInput()}},(0,y.validatePackage)(g.packageMetadata),n.state={selectedItemIndex:null,isFirstRender:!0},n}e.Chat=o},626:function(t,e,o){"use strict";var n,s,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.ChatMessage=void 0,o(954)),a=o(811),c=o(987),o=(s=o(854).FocusableUponSelection,r(p,s),p.prototype.render=function(){var e=this;return i.createElement("div",{className:this.getClassNames(),tabIndex:this.props.tabIndex,onClick:function(){return e.props.onRequestSelection(e.props.item.selectionIndex)},onFocus:function(){return e.props.onRequestSelection(e.props.item.selectionIndex)},ref:function(t){return e.elementToFocus=t}},this.getTimestampView(),this.getMainView(),this.getStatusView())},p.prototype.getMainView=function(){return this.props.item.typing?i.createElement("div",{className:"k-bubble"},i.createElement("div",{className:"k-typing-indicator"},i.createElement("span",null),i.createElement("span",null),i.createElement("span",null))):this.props.template?i.createElement(this.props.template,{item:this.props.item}):this.props.item.text?i.createElement("div",{className:"k-bubble"},this.props.item.text):null},p.prototype.getTimestampView=function(){var t=null;return t=this.props.item.timestamp?i.createElement("time",{className:"k-message-time","aria-hidden":!this.props.selected},(0,c.provideIntlService)(this).formatDate(this.props.item.timestamp,this.props.dateFormat)):t},p.prototype.getStatusView=function(){var t=null;return t=this.props.item.status?i.createElement("span",{className:"k-message-status"},this.props.item.status):t},p.prototype.getClassNames=function(){return(0,a.classNames)({"k-only":this.props.isOnlyItemInGroup},{"k-first":this.props.isFirstItemInGroup&&!this.props.isOnlyItemInGroup},{"k-last":this.props.isLastItemInGroup&&!this.props.isOnlyItemInGroup},{"k-selected":this.props.selected},{"k-focus":this.props.selected},"k-message")},p.defaultProps={dateFormat:"g",tabIndex:-1},p);function p(){return null!==s&&s.apply(this,arguments)||this}e.ChatMessage=o,(0,c.registerForIntl)(o)},372:function(t,e,o){"use strict";var n,s,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),o(954)),a=o(987),o=(s=i.Component,r(c,s),c.prototype.render=function(){var t=this.props.item;return i.createElement("div",{className:"k-timestamp"},(0,a.provideIntlService)(this).formatDate(t.timestamp,"D"))},c);function c(){return null!==s&&s.apply(this,arguments)||this}e.default=o,(0,a.registerForIntl)(o)},575:function(t,e,o){"use strict";var n,s,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),o(954)),a=o(811),c=o(797),p=o(147),o=(s=i.Component,r(u,s),u.prototype.render=function(){return i.createElement("div",{className:this.getMsgGroupClassNames()},this.getAvatarView(),this.getAuthorNameView(),this.getGroupMessagesView())},u.prototype.getMsgGroupClassNames=function(){return(0,a.classNames)("k-message-group",{"k-no-avatar":!this.props.group.author.avatarUrl,"k-alt":(0,p.isAuthor)(this.props.user,this.props.group.messages[0])})},u.prototype.getAvatarView=function(){var t=null;return t=this.props.group.author.avatarUrl?i.createElement("img",{src:this.props.group.author.avatarUrl,className:"k-avatar"}):t},u.prototype.getAuthorNameView=function(){var t=null;return t=this.props.group.author.name?i.createElement("p",{className:"k-author"},this.props.group.author.name):t},u.prototype.getGroupMessagesView=function(){var n=this,s=this.props.group.messages.length-1;return this.props.group.messages.map(function(t,e){var o=[i.createElement(n.props.message,{item:t,template:n.props.itemTemplate,selected:t.selectionIndex===n.props.selectedItemIndex,onRequestSelection:n.props.onRequestSelection,tabIndex:e===s&&n.props.isLastGroup?0:-1,isFirstItemInGroup:0===e,isLastItemInGroup:e===s,isOnlyItemInGroup:0==s,key:e})];return t.attachments&&1===t.attachments.length&&o.push(i.createElement(c.default,{item:t.attachments[0],template:n.props.attachmentTemplate,selected:!1,key:"att-".concat(e)})),o})},u);function u(){return null!==s&&s.apply(this,arguments)||this}e.default=o},415:function(t,e,o){"use strict";var n,s,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),o(811)),a=o(954),c=o(540),p=o(414),u=o(987),l=o(965),o=(s=a.Component,r(m,s),m.prototype.render=function(){var e=this,t=(0,u.provideLocalizationService)(this),o=a.createElement("input",{type:"text",className:this.getClassNames(),placeholder:this.props.placeholder,onKeyDown:this.onInputKeyDown,onFocus:function(){return e.setState({focused:!0})},onBlur:function(){return e.setState({focused:!1})},ref:function(t){return e.inputEl=t}}),n=a.createElement(p.Button,{fillMode:"flat",themeColor:"base",rounded:null,className:"k-icon-button k-button-send",onClick:this.sendMessage,"aria-label":t.toLanguageString(l.newMessageSendButton,l.messages[l.newMessageSendButton]),dir:this.props.isDirectionRightToLeft?"rtl":void 0},a.createElement("span",{className:"k-button-icon k-icon"},a.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 16 16"},a.createElement("path",{d:m.buttonIconPath})))),t=a.createElement(p.Button,{fillMode:"flat",themeColor:"base",rounded:null,className:"k-icon-button k-button-toggle",onClick:function(t){return e.props.onToolbarActionButtonClick(!e.props.showToolbar,t)},"aria-label":t.toLanguageString(l.newMessageOptionsButton,l.messages[l.newMessageOptionsButton])},a.createElement("span",{className:"k-button-icon k-icon"},a.createElement("svg",{version:"1.1",id:"Layer_1",x:"0px",y:"0px",viewBox:"0 0 512 512"},a.createElement("g",null,a.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"}),a.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"}),a.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"})))));return a.createElement(a.Fragment,null,a.createElement("div",{className:"k-message-box k-textbox k-input k-input-md k-rounded-md k-input-solid"},this.props.MessageBox?a.createElement(this.props.MessageBox,{messageInput:o,sendButton:n,toolbarButton:t}):a.createElement(a.Fragment,null,o,this.props.toolbar&&t,n)),this.props.showToolbar&&a.createElement(c.default,null,this.props.toolbar))},m.prototype.focusInput=function(){null!==this.inputEl&&this.inputEl.focus()},m.prototype.getClassNames=function(){return(0,i.classNames)({"k-focus":this.state.focused},"k-input k-input k-input-md k-input-solid k-input-solid-base")},m.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",m);function m(){var o=null!==s&&s.apply(this,arguments)||this;return o.state={focused:!1},o.inputEl=null,o.onInputKeyDown=function(t){t.keyCode===i.Keys.enter&&o.sendMessage(t)},o.sendMessage=function(t){var e;o.props.onMessageSend&&null!==o.inputEl&&(e=o.inputEl.value)&&(e={author:o.props.user,text:e,timestamp:new Date},o.props.onMessageSend(e,t)),null!==o.inputEl&&(o.inputEl.value=null)},o}e.default=o},540:function(t,e,o){"use strict";var n,s,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),o(954)),o=(s=i.Component,r(a,s),a.prototype.render=function(){return i.createElement("div",{className:"k-toolbar-box"},i.createElement("div",{className:"k-button-list"},this.props.children))},a);function a(){return null!==s&&s.apply(this,arguments)||this}e.default=o},854:function(t,e,o){"use strict";var n,s,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),o=(Object.defineProperty(e,"__esModule",{value:!0}),e.FocusableUponSelection=void 0,s=o(954).Component,r(i,s),i.prototype.componentDidUpdate=function(t){!t.selected&&this.props.selected&&this.elementToFocus.focus()},i);function i(){return null!==s&&s.apply(this,arguments)||this}e.FocusableUponSelection=o},536:function(t,e,o){"use strict";var n,r,s=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.SelectableItemsContainer=void 0,o(954)),a=o(811),o=(r=i.Component,s(c,r),c.getDerivedStateFromProps=function(t,e){return t.selected||null===e.selectedItemIndex?t.selected&&null===e.selectedItemIndex?{selectedItemIndex:0}:null:{selectedItemIndex:null}},c.prototype.navigate=function(t,e){void 0===e&&(e=0);var o=null,n=this.state.selectedItemIndex;return t?null===n?o=e:n<this.getLastSelectionIndex()&&(o=n+1):null===n?o=0:0<n&&(o=n-1),null!==o&&this.setState({selectedItemIndex:o}),o},Object.defineProperty(c.prototype,"isKeyboardNavigationLeftRight",{get:function(){return!0},enumerable:!1,configurable:!0}),c.prototype.getLastSelectionIndex=function(){var t,e=-1;return"action-group"===this.props.group.type?e=(t=this.props.group).actions?t.actions.length-1:-1:"attachment-group"===this.props.group.type&&(e=(t=this.props.group).attachments?t.attachments.length-1:-1),e},c);function c(){var s=null!==r&&r.apply(this,arguments)||this;return s.state={selectedItemIndex:null},s.onRequestContainerSelection=function(){return s.props.onRequestSelection(s.props.group.selectionIndex)},s.onKeyDown=function(t){var e,o=null,n=s.isKeyboardNavigationLeftRight?(e=a.Keys.left,a.Keys.right):(e=a.Keys.up,a.Keys.down);t.keyCode===e?o=s.navigate(!1):t.keyCode===n&&(o=s.navigate(!0)),null!==o&&(t.preventDefault(),t.stopPropagation())},s}e.SelectableItemsContainer=o},280:function(t,e,o){"use strict";var n,s,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=(Object.defineProperty(e,"__esModule",{value:!0}),e.HeroCard=void 0,o(954)),a=o(414),c=o(811),o=(s=i.Component,r(p,s),p.prototype.render=function(){return i.createElement("div",{className:"k-card"},i.createElement("img",{className:"k-card-image",src:this.props.imageUrl,style:{maxWidth:this.props.imageMaxWidth}}),i.createElement("div",{className:"k-card-body"},this.getTitleView(),this.getSubtitleView()),i.createElement("div",{className:"k-card-actions k-card-actions-vertical"},this.getActionsView()))},p.prototype.getActionsView=function(){var o=this;return this.props.actions.map(function(e,t){return i.createElement("span",{className:"k-card-action",key:t},i.createElement(a.Button,{fillMode:"flat",onClick:function(t){return o.onBtnClick(e,t)}},e.title))})},p.prototype.getTitleView=function(){var t=null;return t=this.props.title?i.createElement("h5",{className:"k-card-title"},this.props.title):t},p.prototype.getSubtitleView=function(){var t=null;return t=this.props.subtitle?i.createElement("h6",{className:"k-card-subtitle"},this.props.subtitle):t},p);function p(){var o=null!==s&&s.apply(this,arguments)||this;return o.onBtnClick=function(t,e){(0,c.dispatchEvent)(o.props.onActionExecute,e,o,{action:t})},o}e.HeroCard=o},468:function(t,e,o){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,o,n){void 0===n&&(n=o);var s=Object.getOwnPropertyDescriptor(e,o);s&&!("get"in s?!e.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return e[o]}}),Object.defineProperty(t,n,s)}:function(t,e,o,n){t[n=void 0===n?o:n]=e[o]}),s=this&&this.__exportStar||function(t,e){for(var o in t)"default"===o||Object.prototype.hasOwnProperty.call(e,o)||n(e,t,o)},r=(Object.defineProperty(e,"__esModule",{value:!0}),e.ChatMessage=void 0,o(626));Object.defineProperty(e,"ChatMessage",{enumerable:!0,get:function(){return r.ChatMessage}}),s(o(240),e),s(o(647),e),s(o(286),e),s(o(318),e),s(o(177),e),s(o(271),e),s(o(310),e),s(o(280),e)},965:(t,e)=>{"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.messages=e.newMessageOptionsButton=e.newMessageSendButton=void 0,e.newMessageSendButton="newMessage.sendButton",e.newMessageOptionsButton="newMessage.optionsButton",e.messages=((o={})[e.newMessageSendButton]="Send",o[e.newMessageOptionsButton]="Options",o)},363:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.packageMetadata=void 0,e.packageMetadata={name:"@progress/kendo-react-conversational-ui",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1660292168,version:"",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"}},147:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAuthor=void 0,e.isAuthor=function(t,e){return t&&e.author&&t.id===e.author.id}},414:t=>{"use strict";t.exports=o},811:t=>{"use strict";t.exports=r},987:t=>{"use strict";t.exports=i},954:t=>{"use strict";t.exports=a}},s={},function t(e){var o=s[e];if(void 0!==o)return o.exports;o=s[e]={exports:{}};return n[e].call(o.exports,o,o.exports,t),o.exports}(468)))}}});
|
|
1
|
+
System.register("@progress/kendo-react-conversational-ui",["@progress/kendo-react-buttons","@progress/kendo-react-common","@progress/kendo-react-intl","react"],function(e,t){var n={},r={},i={},a={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(a,"__esModule",{value:!0}),{setters:[function(t){Object.keys(t).forEach(function(e){n[e]=t[e]})},function(t){Object.keys(t).forEach(function(e){r[e]=t[e]})},function(t){Object.keys(t).forEach(function(e){i[e]=t[e]})},function(t){Object.keys(t).forEach(function(e){a[e]=t[e]})}],execute:function(){var o,s;e((o={262:(e,t,n)=>{"use strict";var i=n(586);function o(){}function s(){}s.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,s,r){if(r!==i)throw(r=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")).name="Invariant Violation",r}function t(){return e}var n={array:e.isRequired=e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:o};return n.PropTypes=n}},980:(e,t,n)=>{e.exports=n(262)()},586:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},271:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},310:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},203:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertMsgsToViewItems=void 0;function c(e){return e[e.length-1]}var p=n(147);t.convertMsgsToViewItems=function(e){var t,a,e=e.slice().reduce((a=e.length,function(e,t,n){var o,s,r,i,n=n===a-1;return o=e,r=t.timestamp,i=c(o),!r||i&&(i=i.timestamp,!(s=r)||!i||i.getDate()===s.getDate()&&i.getMonth()===s.getMonth()&&i.getFullYear()===s.getFullYear())||(i={type:"date-marker",timestamp:r,trackBy:r.getTime()},o.push(i)),s=t,o=c(r=e),i=void 0,s.typing&&!n||((i=o&&"message-group"===o.type?o.messages:i)&&(0,p.isAuthor)(s.author,c(i))?i.push(s):r.push({type:"message-group",messages:[s],author:s.author,timestamp:s.timestamp,trackBy:s})),t.attachments&&1<t.attachments.length&&e.push({type:"attachment-group",attachments:t.attachments,attachmentLayout:t.attachmentLayout,timestamp:t.timestamp,trackBy:t}),t.suggestedActions&&n&&e.push({type:"action-group",actions:t.suggestedActions,timestamp:t.timestamp,trackBy:t}),e}),[]),n=0;return(t=e).forEach(function(e){"message-group"===e.type?e.messages.forEach(function(e){e.selectionIndex=n++}):"attachment-group"!==e.type&&"action-group"!==e.type||(e.selectionIndex=n++)}),t.lastSelectionIndex=n-1,e}},240:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},647:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},286:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},318:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},325:function(e,t,n){"use strict";var o,s,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=(Object.defineProperty(t,"__esModule",{value:!0}),n(954)),a=n(811),c=n(811),n=(s=n(854).FocusableUponSelection,r(p,s),p.prototype.render=function(){var t=this;return i.createElement("span",{className:this.getClassNames(),onClick:function(e){return t.props.onActionExecute(t.props.item,e)},ref:function(e){return t.elementToFocus=e},onKeyDown:this.onKeyDown,tabIndex:this.props.tabbable?0:-1},this.props.item.title||this.props.item.value)},p.prototype.getClassNames=function(){return(0,c.classNames)("k-quick-reply",{"k-first":this.props.isFirstItemInGroup},{"k-last":this.props.isLastItemInGroup},{"k-selected":this.props.selected},{"k-focus":this.props.selected})},p);function p(){var t=null!==s&&s.apply(this,arguments)||this;return t.onKeyDown=function(e){e.keyCode===a.Keys.enter&&t.props.onActionExecute(t.props.item,e)},t}t.default=n},88:function(e,t,n){"use strict";var o,s,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=(Object.defineProperty(t,"__esModule",{value:!0}),n(954)),a=n(811),c=n(325),n=(s=n(536).SelectableItemsContainer,r(p,s),p.prototype.render=function(){var n=this,o=this.props.group.actions?this.props.group.actions.length-1:0;return i.createElement("div",{className:this.getClassNames(),onClick:this.onRequestContainerSelection,onKeyDown:this.onKeyDown},this.props.group.actions&&this.props.group.actions.map(function(e,t){return i.createElement(c.default,{item:e,onActionExecute:n.props.onActionExecute,selected:t===n.state.selectedItemIndex,tabbable:n.props.isLastGroup&&t===n.state.selectedItemIndex,isFirstItemInGroup:0===t,isLastItemInGroup:t===o,key:t})}))},p.prototype.getClassNames=function(){return(0,a.classNames)("k-quick-replies")},p);function p(e){return s.call(this,e)||this}t.default=n},797:function(e,t,n){"use strict";var o,s,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=(Object.defineProperty(t,"__esModule",{value:!0}),n(954)),a=n(811),n=(s=n(854).FocusableUponSelection,r(c,s),c.prototype.render=function(){var t=this;return i.createElement("div",{className:this.getClassNames(),tabIndex:this.getTabIndexValue(),onClick:this.props.onClick,ref:function(e){return t.elementToFocus=e}},this.props.template?i.createElement(this.props.template,{item:this.props.item}):i.createElement("div",{className:"k-card"},i.createElement("div",{className:"k-card-body"},this.getTitleView(),this.getSubtitleView(),this.getContentView())))},c.prototype.getTabIndexValue=function(){return void 0===this.props.tabbable?void 0:this.props.tabbable?0:-1},c.prototype.getClassNames=function(){return(0,a.classNames)({"k-selected":this.props.selected},{"k-focus":this.props.selected},"k-card-wrap",{"k-first":this.props.isFirstItemInGroup},{"k-last":this.props.isLastItemInGroup})},c.prototype.getTitleView=function(){return this.props.item.title?i.createElement("h5",{className:"k-card-title"},this.props.item.title):null},c.prototype.getSubtitleView=function(){return this.props.item.subtitle?i.createElement("h6",{className:"k-card-subtitle"},this.props.item.subtitle):null},c.prototype.getContentView=function(){return 0===this.props.item.contentType.indexOf("image/")?i.createElement("img",{src:this.props.item.content}):this.props.item.content},c);function c(){return null!==s&&s.apply(this,arguments)||this}t.default=n},564:function(e,t,n){"use strict";var o,s,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=(Object.defineProperty(t,"__esModule",{value:!0}),n(954)),a=n(811),c=n(797),p=n(536),u=n(414),n=(s=p.SelectableItemsContainer,r(l,s),l.prototype.render=function(){var n=this,e=this.isCardDeckLayout(this.props),t=i.createElement("div",{className:this.getClassNames(),onKeyDown:e?void 0:this.onKeyDown},this.props.group.attachments.map(function(e,t){return i.createElement(c.default,{item:e,template:n.props.itemTemplate,selected:t===n.state.selectedItemIndex,tabbable:n.props.isLastGroup&&t===n.state.selectedItemIndex,isFirstItemInGroup:0===t,isLastItemInGroup:t===n.getLastItemIndex(),onClick:function(){return n.onAttachmentClick(t)},key:t})}));return e?i.createElement("div",{className:"k-card-deck-scrollwrap",onKeyDown:this.onKeyDown},this.getLeftScrollBtn(),t,this.getRightScrollBtn()):t},Object.defineProperty(l.prototype,"isKeyboardNavigationLeftRight",{get:function(){return this.isCardDeckLayout(this.props)},enumerable:!1,configurable:!0}),l.prototype.getLastItemIndex=function(){return this.props.group.attachments.length-1},l.prototype.getLeftScrollBtn=function(){var e=this,t=null;return t=this.isCardDeckLayout(this.props)&&this.state.selectedItemIndex?i.createElement(u.Button,{icon:"arrow-chevron-left",onClick:function(){return e.onNavigateBtnClick(!1)}}):t},l.prototype.getRightScrollBtn=function(){var e=this,t=null;return t=this.isCardDeckLayout(this.props)&&this.state.selectedItemIndex!==this.getLastItemIndex()?i.createElement(u.Button,{icon:"arrow-chevron-right",onClick:function(){return e.onNavigateBtnClick(!0)}}):t},l.prototype.onAttachmentClick=function(e){this.onRequestContainerSelection(),this.setState({selectedItemIndex:e})},l.prototype.onNavigateBtnClick=function(e){this.onRequestContainerSelection(),this.navigate(e,1)},l.prototype.isCardDeckLayout=function(e){return"list"!==e.group.attachmentLayout},l.prototype.getClassNames=function(){return(0,a.classNames)({"k-card-deck":this.isCardDeckLayout(this.props)})},l);function l(){return null!==s&&s.apply(this,arguments)||this}t.default=n},177:function(e,t,n){"use strict";var o,s,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=(Object.defineProperty(t,"__esModule",{value:!0}),t.Chat=void 0,n(811)),a=n(980),c=n(954),p=n(203),u=n(88),l=n(564),m=n(372),d=n(575),h=n(415),f=n(626),y=n(811),g=n(363),n=(s=c.Component,r(v,s),v.prototype.render=function(){var t=this;return this.viewItems=this.getViewItemsFromMsgs(this.props.messages),this.isDirectionRightToLeft=this.checkIsDirectionRightToLeft(this.props),c.createElement("div",{style:{width:this.props.width},onKeyDown:this.onKeyDown,className:this.getClassNames(),ref:function(e){return t.chatWrapperEl=e}},c.createElement("div",{className:"k-message-list k-avatars",onBlur:this.onBlur,onFocus:this.onFocus,role:"log","aria-live":"polite",onScroll:function(e){t.scrollToBottomOnLoadingData=e.currentTarget.scrollTop===e.currentTarget.scrollHeight-e.currentTarget.clientHeight},ref:function(e){return t.viewItemsWrapperEl=e}},c.createElement("div",{className:"k-message-list-content"},this.renderViewItems())),c.createElement(h.default,{user:this.props.user,onMessageSend:this.onMessageSend,isDirectionRightToLeft:this.isDirectionRightToLeft,ref:function(e){return t.newMsgComp=e},placeholder:this.props.placeholder,MessageBox:this.props.messageBox,toolbar:this.props.toolbar,onToolbarActionButtonClick:this.props.onToolbarActionExecute,showToolbar:this.props.showToolbar}))},v.prototype.componentDidMount=function(){var e=this;this.setState({isFirstRender:!1},function(){e.nextTickId=window.setTimeout(function(){return e.scrollViewItemsToBottom()},250)})},v.prototype.componentWillUnmount=function(){clearTimeout(this.nextTickId)},v.prototype.componentDidUpdate=function(e){e.messages.length!==this.props.messages.length&&this.scrollToBottomOnLoadingData&&this.scrollViewItemsToBottom()},v.prototype.getClassNames=function(){return(0,i.classNames)("k-widget","k-chat",this.props.className,{"k-rtl":this.isDirectionRightToLeft})},v.prototype.checkIsDirectionRightToLeft=function(e){e=void 0!==e.dir?"rtl"===e.dir:this.chatWrapperEl&&"rtl"===getComputedStyle(this.chatWrapperEl).direction;return Boolean(e)},v.prototype.renderViewItems=function(){var n=this,o=this.viewItems.length-1;return this.viewItems.map(function(e,t){return"date-marker"===e.type?c.createElement(m.default,{item:e,key:t}):"message-group"===e.type?c.createElement(d.default,{group:e,itemTemplate:n.props.messageTemplate,attachmentTemplate:n.props.attachmentTemplate,user:n.props.user,selectedItemIndex:n.state.selectedItemIndex,onRequestSelection:n.onSelectionRequested,isLastGroup:t===o,key:t,message:n.props.message||v.defaultProps.message}):"attachment-group"===e.type?c.createElement(l.default,{group:e,itemTemplate:n.props.attachmentTemplate,onRequestSelection:n.onSelectionRequested,selected:e.selectionIndex===n.state.selectedItemIndex,isLastGroup:t===o,key:t}):"action-group"===e.type?c.createElement(u.default,{group:e,onActionExecute:n.onActionExecute,onRequestSelection:n.onSelectionRequested,selected:e.selectionIndex===n.state.selectedItemIndex,isLastGroup:t===o,key:t}):void 0})},v.prototype.scrollViewItemsToBottom=function(){this.viewItemsWrapperEl&&(this.viewItemsWrapperEl.scrollTop=this.viewItemsWrapperEl.scrollHeight-this.viewItemsWrapperEl.clientHeight)},v.prototype.getViewItemsFromMsgs=function(e){return 0<e.length?(0,p.convertMsgsToViewItems)(e):[]},v.propTypes={messages:a.arrayOf(a.object),user:a.object,messageTemplate:a.any,attachmentTemplate:a.any,width:a.oneOfType([a.string,a.number]),onMessageSend:a.func,onActionExecute:a.func,dir:a.string,messageBox:a.any},v.defaultProps={messages:[],dateFormat:"g",message:f.ChatMessage},v);function v(e){var o=s.call(this,e)||this;return o.viewItems=[],o.isDirectionRightToLeft=!1,o.scrollToBottomOnLoadingData=!0,o.onFocus=function(){clearTimeout(o.timeoutIdForChatLosingFocus)},o.onBlur=function(){o.timeoutIdForChatLosingFocus=window.setTimeout(function(){o.setState({selectedItemIndex:null})},0)},o.onSelectionRequested=function(e){o.setState({selectedItemIndex:e})},o.onKeyDown=function(e){var t=null,n=null!==o.state.selectedItemIndex?o.state.selectedItemIndex:o.viewItems.lastSelectionIndex;e.keyCode===i.Keys.up?null===n?t=0:0<n&&(t=n-1):e.keyCode===i.Keys.down&&(null===n?t=0:n<o.viewItems.lastSelectionIndex&&(t=n+1)),null!==t&&(o.setState({selectedItemIndex:t}),e.preventDefault())},o.onMessageSend=function(e,t){(0,i.dispatchEvent)(o.props.onMessageSend,t,o,{message:e})},o.onActionExecute=function(e,t){if((0,i.dispatchEvent)(o.props.onActionExecute,t,o,{action:e}),!t.isDefaultPrevented()){switch(e.type){case"reply":o.onMessageSend({author:o.props.user,text:e.value,timestamp:new Date},t);break;case"call":window.open("tel:"+e.value);break;case"openUrl":window.open(e.value)}o.newMsgComp.focusInput()}},(0,y.validatePackage)(g.packageMetadata),o.state={selectedItemIndex:null,isFirstRender:!0},o}t.Chat=n},626:function(e,t,n){"use strict";var o,s,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=(Object.defineProperty(t,"__esModule",{value:!0}),t.ChatMessage=void 0,n(954)),a=n(811),c=n(987),n=(s=n(854).FocusableUponSelection,r(p,s),p.prototype.render=function(){var t=this;return i.createElement("div",{className:this.getClassNames(),tabIndex:this.props.tabIndex,onClick:function(){return t.props.onRequestSelection(t.props.item.selectionIndex)},onFocus:function(){return t.props.onRequestSelection(t.props.item.selectionIndex)},ref:function(e){return t.elementToFocus=e}},this.getTimestampView(),this.getMainView(),this.getStatusView())},p.prototype.getMainView=function(){return this.props.item.typing?i.createElement("div",{className:"k-bubble"},i.createElement("div",{className:"k-typing-indicator"},i.createElement("span",null),i.createElement("span",null),i.createElement("span",null))):this.props.template?i.createElement(this.props.template,{item:this.props.item}):this.props.item.text?i.createElement("div",{className:"k-bubble"},this.props.item.text):null},p.prototype.getTimestampView=function(){var e=null;return e=this.props.item.timestamp?i.createElement("time",{className:"k-message-time","aria-hidden":!this.props.selected},(0,c.provideIntlService)(this).formatDate(this.props.item.timestamp,this.props.dateFormat)):e},p.prototype.getStatusView=function(){var e=null;return e=this.props.item.status?i.createElement("span",{className:"k-message-status"},this.props.item.status):e},p.prototype.getClassNames=function(){return(0,a.classNames)({"k-only":this.props.isOnlyItemInGroup},{"k-first":this.props.isFirstItemInGroup&&!this.props.isOnlyItemInGroup},{"k-last":this.props.isLastItemInGroup&&!this.props.isOnlyItemInGroup},{"k-selected":this.props.selected},{"k-focus":this.props.selected},"k-message")},p.defaultProps={dateFormat:"g",tabIndex:-1},p);function p(){return null!==s&&s.apply(this,arguments)||this}t.ChatMessage=n,(0,c.registerForIntl)(n)},372:function(e,t,n){"use strict";var o,s,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=(Object.defineProperty(t,"__esModule",{value:!0}),n(954)),a=n(987),n=(s=i.Component,r(c,s),c.prototype.render=function(){var e=this.props.item;return i.createElement("div",{className:"k-timestamp"},(0,a.provideIntlService)(this).formatDate(e.timestamp,"D"))},c);function c(){return null!==s&&s.apply(this,arguments)||this}t.default=n,(0,a.registerForIntl)(n)},575:function(e,t,n){"use strict";var o,s,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=(Object.defineProperty(t,"__esModule",{value:!0}),n(954)),a=n(811),c=n(797),p=n(147),u=n(987),l=n(965),n=(s=i.Component,r(m,s),m.prototype.render=function(){var e=this.props.group.author,t=e.avatarUrl,n=e.avatarAltText,e=e.name,o=(0,u.provideLocalizationService)(this);return i.createElement("div",{className:this.getMsgGroupClassNames()},t&&i.createElement("img",{src:t,className:"k-avatar",alt:void 0!==n?n:o.toLanguageString(l.avatarAlt,l.messages[l.avatarAlt])}),e&&i.createElement("p",{className:"k-author"},e),this.getGroupMessagesView())},m.prototype.getMsgGroupClassNames=function(){return(0,a.classNames)("k-message-group",{"k-no-avatar":!this.props.group.author.avatarUrl,"k-alt":(0,p.isAuthor)(this.props.user,this.props.group.messages[0])})},m.prototype.getGroupMessagesView=function(){var o=this,s=this.props.group.messages.length-1;return this.props.group.messages.map(function(e,t){var n=[i.createElement(o.props.message,{item:e,template:o.props.itemTemplate,selected:e.selectionIndex===o.props.selectedItemIndex,onRequestSelection:o.props.onRequestSelection,tabIndex:t===s&&o.props.isLastGroup?0:-1,isFirstItemInGroup:0===t,isLastItemInGroup:t===s,isOnlyItemInGroup:0==s,key:t})];return e.attachments&&1===e.attachments.length&&n.push(i.createElement(c.default,{item:e.attachments[0],template:o.props.attachmentTemplate,selected:!1,key:"att-".concat(t)})),n})},m);function m(){return null!==s&&s.apply(this,arguments)||this}t.default=n},415:function(e,t,n){"use strict";var o,s,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=(Object.defineProperty(t,"__esModule",{value:!0}),n(811)),a=n(954),c=n(540),p=n(414),u=n(987),l=n(965),n=(s=a.Component,r(m,s),m.prototype.render=function(){var t=this,e=(0,u.provideLocalizationService)(this),n=a.createElement("input",{type:"text",className:this.getClassNames(),placeholder:this.props.placeholder,onKeyDown:this.onInputKeyDown,onFocus:function(){return t.setState({focused:!0})},onBlur:function(){return t.setState({focused:!1})},ref:function(e){return t.inputEl=e},"aria-label":e.toLanguageString(l.newMessageMessageInput,l.messages[l.newMessageMessageInput])}),o=a.createElement(p.Button,{fillMode:"flat",themeColor:"base",rounded:null,className:"k-icon-button k-button-send",onClick:this.sendMessage,"aria-label":e.toLanguageString(l.newMessageSendButton,l.messages[l.newMessageSendButton]),dir:this.props.isDirectionRightToLeft?"rtl":void 0},a.createElement("span",{className:"k-button-icon k-icon"},a.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 16 16"},a.createElement("path",{d:m.buttonIconPath})))),e=a.createElement(p.Button,{fillMode:"flat",themeColor:"base",rounded:null,className:"k-icon-button k-button-toggle",onClick:function(e){return t.props.onToolbarActionButtonClick(!t.props.showToolbar,e)},"aria-label":e.toLanguageString(l.newMessageOptionsButton,l.messages[l.newMessageOptionsButton])},a.createElement("span",{className:"k-button-icon k-icon"},a.createElement("svg",{version:"1.1",id:"Layer_1",x:"0px",y:"0px",viewBox:"0 0 512 512"},a.createElement("g",null,a.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"}),a.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"}),a.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"})))));return a.createElement(a.Fragment,null,a.createElement("div",{className:"k-message-box k-textbox k-input k-input-md k-rounded-md k-input-solid"},this.props.MessageBox?a.createElement(this.props.MessageBox,{messageInput:n,sendButton:o,toolbarButton:e}):a.createElement(a.Fragment,null,n,this.props.toolbar&&e,o)),this.props.showToolbar&&a.createElement(c.default,null,this.props.toolbar))},m.prototype.focusInput=function(){null!==this.inputEl&&this.inputEl.focus()},m.prototype.getClassNames=function(){return(0,i.classNames)({"k-focus":this.state.focused},"k-input k-input k-input-md k-input-solid k-input-solid-base")},m.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",m);function m(){var n=null!==s&&s.apply(this,arguments)||this;return n.state={focused:!1},n.inputEl=null,n.onInputKeyDown=function(e){e.keyCode===i.Keys.enter&&n.sendMessage(e)},n.sendMessage=function(e){var t;n.props.onMessageSend&&null!==n.inputEl&&(t=n.inputEl.value)&&(t={author:n.props.user,text:t,timestamp:new Date},n.props.onMessageSend(t,e)),null!==n.inputEl&&(n.inputEl.value=null)},n}t.default=n},540:function(e,t,n){"use strict";var o,s,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=(Object.defineProperty(t,"__esModule",{value:!0}),n(954)),n=(s=i.Component,r(a,s),a.prototype.render=function(){return i.createElement("div",{className:"k-toolbar-box"},i.createElement("div",{className:"k-button-list"},this.props.children))},a);function a(){return null!==s&&s.apply(this,arguments)||this}t.default=n},854:function(e,t,n){"use strict";var o,s,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),n=(Object.defineProperty(t,"__esModule",{value:!0}),t.FocusableUponSelection=void 0,s=n(954).Component,r(i,s),i.prototype.componentDidUpdate=function(e){!e.selected&&this.props.selected&&this.elementToFocus.focus()},i);function i(){return null!==s&&s.apply(this,arguments)||this}t.FocusableUponSelection=n},536:function(e,t,n){"use strict";var o,r,s=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=(Object.defineProperty(t,"__esModule",{value:!0}),t.SelectableItemsContainer=void 0,n(954)),a=n(811),n=(r=i.Component,s(c,r),c.getDerivedStateFromProps=function(e,t){return e.selected||null===t.selectedItemIndex?e.selected&&null===t.selectedItemIndex?{selectedItemIndex:0}:null:{selectedItemIndex:null}},c.prototype.navigate=function(e,t){void 0===t&&(t=0);var n=null,o=this.state.selectedItemIndex;return e?null===o?n=t:o<this.getLastSelectionIndex()&&(n=o+1):null===o?n=0:0<o&&(n=o-1),null!==n&&this.setState({selectedItemIndex:n}),n},Object.defineProperty(c.prototype,"isKeyboardNavigationLeftRight",{get:function(){return!0},enumerable:!1,configurable:!0}),c.prototype.getLastSelectionIndex=function(){var e,t=-1;return"action-group"===this.props.group.type?t=(e=this.props.group).actions?e.actions.length-1:-1:"attachment-group"===this.props.group.type&&(t=(e=this.props.group).attachments?e.attachments.length-1:-1),t},c);function c(){var s=null!==r&&r.apply(this,arguments)||this;return s.state={selectedItemIndex:null},s.onRequestContainerSelection=function(){return s.props.onRequestSelection(s.props.group.selectionIndex)},s.onKeyDown=function(e){var t,n=null,o=s.isKeyboardNavigationLeftRight?(t=a.Keys.left,a.Keys.right):(t=a.Keys.up,a.Keys.down);e.keyCode===t?n=s.navigate(!1):e.keyCode===o&&(n=s.navigate(!0)),null!==n&&(e.preventDefault(),e.stopPropagation())},s}t.SelectableItemsContainer=n},280:function(e,t,n){"use strict";var o,s,r=this&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=(Object.defineProperty(t,"__esModule",{value:!0}),t.HeroCard=void 0,n(954)),a=n(414),c=n(811),n=(s=i.Component,r(p,s),p.prototype.render=function(){return i.createElement("div",{className:"k-card"},i.createElement("img",{className:"k-card-image",src:this.props.imageUrl,style:{maxWidth:this.props.imageMaxWidth}}),i.createElement("div",{className:"k-card-body"},this.getTitleView(),this.getSubtitleView()),i.createElement("div",{className:"k-card-actions k-card-actions-vertical"},this.getActionsView()))},p.prototype.getActionsView=function(){var n=this;return this.props.actions.map(function(t,e){return i.createElement("span",{className:"k-card-action",key:e},i.createElement(a.Button,{fillMode:"flat",onClick:function(e){return n.onBtnClick(t,e)}},t.title))})},p.prototype.getTitleView=function(){var e=null;return e=this.props.title?i.createElement("h5",{className:"k-card-title"},this.props.title):e},p.prototype.getSubtitleView=function(){var e=null;return e=this.props.subtitle?i.createElement("h6",{className:"k-card-subtitle"},this.props.subtitle):e},p);function p(){var n=null!==s&&s.apply(this,arguments)||this;return n.onBtnClick=function(e,t){(0,c.dispatchEvent)(n.props.onActionExecute,t,n,{action:e})},n}t.HeroCard=n},468:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,s)}:function(e,t,n,o){e[o=void 0===o?n:o]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)},r=(Object.defineProperty(t,"__esModule",{value:!0}),t.ChatMessage=void 0,n(626));Object.defineProperty(t,"ChatMessage",{enumerable:!0,get:function(){return r.ChatMessage}}),s(n(240),t),s(n(647),t),s(n(286),t),s(n(318),t),s(n(177),t),s(n(271),t),s(n(310),t),s(n(280),t)},965:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.messages=t.avatarAlt=t.newMessageMessageInput=t.newMessageOptionsButton=t.newMessageSendButton=void 0,t.newMessageSendButton="newMessage.sendButton",t.newMessageOptionsButton="newMessage.optionsButton",t.newMessageMessageInput="newMessage.messageInput",t.avatarAlt="avatar.alt",t.messages=((n={})[t.newMessageSendButton]="Send",n[t.newMessageOptionsButton]="Options",n[t.newMessageMessageInput]="Message",n[t.avatarAlt]="Avatar",n)},363:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata=void 0,t.packageMetadata={name:"@progress/kendo-react-conversational-ui",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1661527206,version:"",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"}},147:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAuthor=void 0,t.isAuthor=function(e,t){return e&&t.author&&e.id===t.author.id}},414:e=>{"use strict";e.exports=n},811:e=>{"use strict";e.exports=r},987:e=>{"use strict";e.exports=i},954:e=>{"use strict";e.exports=a}},s={},function e(t){var n=s[t];return void 0!==n||(n=s[t]={exports:{}},o[t].call(n.exports,n,n.exports,e)),n.exports}(468)))}}});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-conversational-ui",
|
|
3
|
-
"description": "KendoReact Conversational UI components",
|
|
4
|
-
"version": "5.6.0-dev.
|
|
3
|
+
"description": "React Chat component allows the user to participate in chat sessions with users or chat bots. KendoReact Conversational UI components",
|
|
4
|
+
"version": "5.6.0-dev.202208261541",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/telerik/kendo-react.git"
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@progress/kendo-react-common": "5.6.0-dev.
|
|
44
|
+
"@progress/kendo-react-common": "5.6.0-dev.202208261541"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@progress/kendo-licensing": "^1.0.1",
|
|
48
|
-
"@progress/kendo-react-buttons": "5.6.0-dev.
|
|
49
|
-
"@progress/kendo-react-dateinputs": "5.6.0-dev.
|
|
50
|
-
"@progress/kendo-react-intl": "5.6.0-dev.
|
|
48
|
+
"@progress/kendo-react-buttons": "5.6.0-dev.202208261541",
|
|
49
|
+
"@progress/kendo-react-dateinputs": "5.6.0-dev.202208261541",
|
|
50
|
+
"@progress/kendo-react-intl": "5.6.0-dev.202208261541",
|
|
51
51
|
"adaptivecards": "^1.0.0",
|
|
52
52
|
"botframework-directlinejs": "^0.9.15"
|
|
53
53
|
},
|