@progress/kendo-react-conversational-ui 6.1.1 → 7.0.0-develop.2

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.
Files changed (109) hide show
  1. package/{dist/npm/ChatPropsAndState.d.ts → ChatPropsAndState.d.ts} +5 -2
  2. package/{dist/npm/Events.d.ts → Events.d.ts} +5 -1
  3. package/LICENSE.md +1 -1
  4. package/{dist/es/ViewItem.d.ts → ViewItem.d.ts} +6 -2
  5. package/{dist/npm/api → api}/action.interface.d.ts +5 -1
  6. package/{dist/es/api → api}/attachment.interface.d.ts +5 -1
  7. package/{dist/npm/api → api}/message.interface.d.ts +4 -0
  8. package/{dist/es/api → api}/user.interface.d.ts +4 -0
  9. package/{dist/npm/components → components}/Action.d.ts +6 -3
  10. package/{dist/npm/components → components}/ActionGroup.d.ts +5 -2
  11. package/{dist/npm/components → components}/Attachment.d.ts +6 -3
  12. package/{dist/npm/components → components}/AttachmentGroup.d.ts +5 -2
  13. package/{dist/es/components → components}/Chat.d.ts +6 -2
  14. package/{dist/npm/components → components}/ChatMessage.d.ts +5 -1
  15. package/components/DateMarker.d.ts +18 -0
  16. package/{dist/npm/components → components}/MessageGroup.d.ts +6 -2
  17. package/{dist/npm/components → components}/NewMessage.d.ts +6 -2
  18. package/components/Toolbar.d.ts +13 -0
  19. package/{dist/npm/components → components}/base/FocusableUponSelection.d.ts +4 -0
  20. package/{dist/es/components → components}/base/SelectableItemsContainer.d.ts +4 -0
  21. package/{dist/npm/components → components}/templates/HeroCard.d.ts +6 -2
  22. package/dist/cdn/js/kendo-react-conversational-ui.js +5 -1
  23. package/index.d.ts +15 -0
  24. package/index.js +5 -0
  25. package/index.mjs +671 -0
  26. package/{dist/npm/messages → messages}/index.d.ts +4 -0
  27. package/package-metadata.d.ts +9 -0
  28. package/package.json +29 -39
  29. package/utils.d.ts +9 -0
  30. package/about.md +0 -3
  31. package/dist/es/ChatPropsAndState.d.ts +0 -92
  32. package/dist/es/ChatPropsAndState.js +0 -1
  33. package/dist/es/Events.d.ts +0 -38
  34. package/dist/es/Events.js +0 -1
  35. package/dist/es/ViewItem.js +0 -90
  36. package/dist/es/api/action.interface.d.ts +0 -31
  37. package/dist/es/api/action.interface.js +0 -1
  38. package/dist/es/api/attachment.interface.js +0 -1
  39. package/dist/es/api/message.interface.d.ts +0 -56
  40. package/dist/es/api/message.interface.js +0 -1
  41. package/dist/es/api/user.interface.js +0 -1
  42. package/dist/es/components/Action.d.ts +0 -20
  43. package/dist/es/components/Action.js +0 -43
  44. package/dist/es/components/ActionGroup.d.ts +0 -24
  45. package/dist/es/components/ActionGroup.js +0 -40
  46. package/dist/es/components/Attachment.d.ts +0 -25
  47. package/dist/es/components/Attachment.js +0 -68
  48. package/dist/es/components/AttachmentGroup.d.ts +0 -24
  49. package/dist/es/components/AttachmentGroup.js +0 -92
  50. package/dist/es/components/Chat.js +0 -210
  51. package/dist/es/components/ChatMessage.d.ts +0 -68
  52. package/dist/es/components/ChatMessage.js +0 -83
  53. package/dist/es/components/DateMarker.d.ts +0 -14
  54. package/dist/es/components/DateMarker.js +0 -33
  55. package/dist/es/components/MessageGroup.d.ts +0 -25
  56. package/dist/es/components/MessageGroup.js +0 -61
  57. package/dist/es/components/NewMessage.d.ts +0 -34
  58. package/dist/es/components/NewMessage.js +0 -81
  59. package/dist/es/components/Toolbar.d.ts +0 -9
  60. package/dist/es/components/Toolbar.js +0 -31
  61. package/dist/es/components/base/FocusableUponSelection.d.ts +0 -20
  62. package/dist/es/components/base/FocusableUponSelection.js +0 -35
  63. package/dist/es/components/base/SelectableItemsContainer.js +0 -113
  64. package/dist/es/components/templates/HeroCard.d.ts +0 -41
  65. package/dist/es/components/templates/HeroCard.js +0 -64
  66. package/dist/es/main.d.ts +0 -11
  67. package/dist/es/main.js +0 -10
  68. package/dist/es/messages/index.d.ts +0 -30
  69. package/dist/es/messages/index.js +0 -31
  70. package/dist/es/package-metadata.d.ts +0 -5
  71. package/dist/es/package-metadata.js +0 -11
  72. package/dist/es/utils.d.ts +0 -5
  73. package/dist/es/utils.js +0 -6
  74. package/dist/npm/ChatPropsAndState.js +0 -2
  75. package/dist/npm/Events.js +0 -2
  76. package/dist/npm/ViewItem.d.ts +0 -57
  77. package/dist/npm/ViewItem.js +0 -94
  78. package/dist/npm/api/action.interface.js +0 -2
  79. package/dist/npm/api/attachment.interface.d.ts +0 -32
  80. package/dist/npm/api/attachment.interface.js +0 -2
  81. package/dist/npm/api/message.interface.js +0 -2
  82. package/dist/npm/api/user.interface.d.ts +0 -23
  83. package/dist/npm/api/user.interface.js +0 -2
  84. package/dist/npm/components/Action.js +0 -45
  85. package/dist/npm/components/ActionGroup.js +0 -42
  86. package/dist/npm/components/Attachment.js +0 -70
  87. package/dist/npm/components/AttachmentGroup.js +0 -94
  88. package/dist/npm/components/Chat.d.ts +0 -72
  89. package/dist/npm/components/Chat.js +0 -213
  90. package/dist/npm/components/ChatMessage.js +0 -86
  91. package/dist/npm/components/DateMarker.d.ts +0 -14
  92. package/dist/npm/components/DateMarker.js +0 -35
  93. package/dist/npm/components/MessageGroup.js +0 -63
  94. package/dist/npm/components/NewMessage.js +0 -83
  95. package/dist/npm/components/Toolbar.d.ts +0 -9
  96. package/dist/npm/components/Toolbar.js +0 -33
  97. package/dist/npm/components/base/FocusableUponSelection.js +0 -38
  98. package/dist/npm/components/base/SelectableItemsContainer.d.ts +0 -33
  99. package/dist/npm/components/base/SelectableItemsContainer.js +0 -116
  100. package/dist/npm/components/templates/HeroCard.js +0 -67
  101. package/dist/npm/main.d.ts +0 -11
  102. package/dist/npm/main.js +0 -27
  103. package/dist/npm/messages/index.js +0 -34
  104. package/dist/npm/package-metadata.d.ts +0 -5
  105. package/dist/npm/package-metadata.js +0 -14
  106. package/dist/npm/utils.d.ts +0 -5
  107. package/dist/npm/utils.js +0 -10
  108. package/dist/systemjs/kendo-react-conversational-ui.js +0 -1
  109. package/e2e-next/conversationalui.basic.tests.ts +0 -24
@@ -1,81 +0,0 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- import { Keys, classNames } from '@progress/kendo-react-common';
17
- import * as React from 'react';
18
- import Toolbar from './Toolbar';
19
- import { Button } from '@progress/kendo-react-buttons';
20
- import { paperPlaneIcon, moreHorizontalIcon } from '@progress/kendo-svg-icons';
21
- import { provideLocalizationService } from '@progress/kendo-react-intl';
22
- import { messages, newMessageSendButton, newMessageOptionsButton, newMessageMessageInput } from '../messages';
23
- /**
24
- * @hidden
25
- */
26
- var NewMessage = /** @class */ (function (_super) {
27
- __extends(NewMessage, _super);
28
- function NewMessage() {
29
- var _this = _super !== null && _super.apply(this, arguments) || this;
30
- _this.state = { focused: false };
31
- _this.inputEl = null;
32
- _this.onInputKeyDown = function (event) {
33
- if (event.keyCode === Keys.enter) {
34
- _this.sendMessage(event);
35
- }
36
- };
37
- _this.sendMessage = function (event) {
38
- if (_this.props.onMessageSend && _this.inputEl !== null) {
39
- var messageText = _this.inputEl.value;
40
- if (messageText) {
41
- var message = {
42
- author: _this.props.user,
43
- text: messageText,
44
- timestamp: new Date()
45
- };
46
- _this.props.onMessageSend(message, event);
47
- }
48
- }
49
- if (_this.inputEl !== null) {
50
- _this.inputEl.value = null;
51
- }
52
- };
53
- return _this;
54
- }
55
- NewMessage.prototype.render = function () {
56
- var _this = this;
57
- var localizationService = provideLocalizationService(this);
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]) }));
59
- var sendButton = (React.createElement(Button, { fillMode: "flat", themeColor: "base", 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]) }));
61
- return (React.createElement(React.Fragment, null,
62
- React.createElement("span", { className: "k-message-box k-textbox k-input k-input-md k-rounded-md k-input-solid" }, this.props.MessageBox ?
63
- React.createElement(this.props.MessageBox, { messageInput: messageInput, sendButton: sendButton, toolbarButton: toolbarButton }) :
64
- React.createElement(React.Fragment, null,
65
- messageInput,
66
- React.createElement("span", { className: "k-input-suffix" },
67
- this.props.toolbar && toolbarButton,
68
- sendButton))),
69
- this.props.showToolbar && React.createElement(Toolbar, null, this.props.toolbar)));
70
- };
71
- NewMessage.prototype.focusInput = function () {
72
- if (this.inputEl !== null) {
73
- this.inputEl.focus();
74
- }
75
- };
76
- NewMessage.prototype.getClassNames = function () {
77
- return classNames('k-input-inner', { 'k-focus': this.state.focused });
78
- };
79
- return NewMessage;
80
- }(React.Component));
81
- export default NewMessage;
@@ -1,9 +0,0 @@
1
- import * as React from 'react';
2
- /**
3
- * @hidden
4
- */
5
- export default class Toolbar extends React.Component<{
6
- children?: React.ReactNode;
7
- }> {
8
- render(): JSX.Element;
9
- }
@@ -1,31 +0,0 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- import * as React from 'react';
17
- /**
18
- * @hidden
19
- */
20
- var Toolbar = /** @class */ (function (_super) {
21
- __extends(Toolbar, _super);
22
- function Toolbar() {
23
- return _super !== null && _super.apply(this, arguments) || this;
24
- }
25
- Toolbar.prototype.render = function () {
26
- return (React.createElement("div", { className: "k-toolbar-box" },
27
- React.createElement("div", { className: "k-button-list" }, this.props.children)));
28
- };
29
- return Toolbar;
30
- }(React.Component));
31
- export default Toolbar;
@@ -1,20 +0,0 @@
1
- import * as React from 'react';
2
- /**
3
- * @hidden
4
- */
5
- export interface FocusableUponSelectionProps {
6
- /**
7
- * Sets the `selected` state of the component.
8
- */
9
- selected: boolean;
10
- }
11
- /**
12
- * @hidden
13
- */
14
- export declare abstract class FocusableUponSelection<P extends FocusableUponSelectionProps, S = {}> extends React.Component<P, S> {
15
- protected elementToFocus: any;
16
- /**
17
- * @hidden
18
- */
19
- componentDidUpdate(prevProps: any): void;
20
- }
@@ -1,35 +0,0 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- import * as React from 'react';
17
- /**
18
- * @hidden
19
- */
20
- var FocusableUponSelection = /** @class */ (function (_super) {
21
- __extends(FocusableUponSelection, _super);
22
- function FocusableUponSelection() {
23
- return _super !== null && _super.apply(this, arguments) || this;
24
- }
25
- /**
26
- * @hidden
27
- */
28
- FocusableUponSelection.prototype.componentDidUpdate = function (prevProps) {
29
- if (!prevProps.selected && this.props.selected) {
30
- this.elementToFocus.focus();
31
- }
32
- };
33
- return FocusableUponSelection;
34
- }(React.Component));
35
- export { FocusableUponSelection };
@@ -1,113 +0,0 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- import * as React from 'react';
17
- import { Keys } from '@progress/kendo-react-common';
18
- /**
19
- * @hidden
20
- */
21
- var SelectableItemsContainer = /** @class */ (function (_super) {
22
- __extends(SelectableItemsContainer, _super);
23
- function SelectableItemsContainer() {
24
- var _this = _super !== null && _super.apply(this, arguments) || this;
25
- _this.state = { selectedItemIndex: null };
26
- _this.onRequestContainerSelection = function () { return _this.props.onRequestSelection(_this.props.group.selectionIndex); };
27
- _this.onKeyDown = function (event) {
28
- var newSelectedItemIndex = null;
29
- var decrementKeyCode;
30
- var incrementKeyCode;
31
- if (_this.isKeyboardNavigationLeftRight) {
32
- decrementKeyCode = Keys.left;
33
- incrementKeyCode = Keys.right;
34
- }
35
- else {
36
- decrementKeyCode = Keys.up;
37
- incrementKeyCode = Keys.down;
38
- }
39
- if (event.keyCode === decrementKeyCode) {
40
- newSelectedItemIndex = _this.navigate(false);
41
- }
42
- else if (event.keyCode === incrementKeyCode) {
43
- newSelectedItemIndex = _this.navigate(true);
44
- }
45
- if (newSelectedItemIndex !== null) {
46
- // Prevent the default behaviour of moving of the scrollbar
47
- // because scrolling is achieved through item focusing.
48
- event.preventDefault();
49
- // Stop propagation to remove the collision with the up/down
50
- // keyboard navigation of the message list.
51
- event.stopPropagation();
52
- }
53
- };
54
- return _this;
55
- }
56
- SelectableItemsContainer.getDerivedStateFromProps = function (props, state) {
57
- if (!props.selected && state.selectedItemIndex !== null) {
58
- // Moving away from a selected group.
59
- return { selectedItemIndex: null };
60
- }
61
- else if (props.selected && state.selectedItemIndex === null) {
62
- // Entering a group w/o directly choosing (e.g. clicking) a subitem.
63
- return { selectedItemIndex: 0 };
64
- }
65
- return null;
66
- };
67
- SelectableItemsContainer.prototype.navigate = function (incrementSelection, newSelectedItemIndexUponFirstIncrement) {
68
- if (newSelectedItemIndexUponFirstIncrement === void 0) { newSelectedItemIndexUponFirstIncrement = 0; }
69
- var result = null;
70
- var currentlySelectedItemIndex = this.state.selectedItemIndex;
71
- if (incrementSelection) {
72
- if (currentlySelectedItemIndex === null) {
73
- result = newSelectedItemIndexUponFirstIncrement;
74
- }
75
- else if (currentlySelectedItemIndex < this.getLastSelectionIndex()) {
76
- result = currentlySelectedItemIndex + 1;
77
- }
78
- }
79
- else {
80
- if (currentlySelectedItemIndex === null) {
81
- result = 0;
82
- }
83
- else if (currentlySelectedItemIndex > 0) {
84
- result = currentlySelectedItemIndex - 1;
85
- }
86
- }
87
- if (result !== null) {
88
- this.setState({ selectedItemIndex: result });
89
- }
90
- return result;
91
- };
92
- Object.defineProperty(SelectableItemsContainer.prototype, "isKeyboardNavigationLeftRight", {
93
- get: function () {
94
- return true;
95
- },
96
- enumerable: false,
97
- configurable: true
98
- });
99
- SelectableItemsContainer.prototype.getLastSelectionIndex = function () {
100
- var result = -1;
101
- if (this.props.group.type === 'action-group') {
102
- var actionGroup = this.props.group;
103
- result = actionGroup.actions ? actionGroup.actions.length - 1 : -1;
104
- }
105
- else if (this.props.group.type === 'attachment-group') {
106
- var attachmentGroup = this.props.group;
107
- result = attachmentGroup.attachments ? attachmentGroup.attachments.length - 1 : -1;
108
- }
109
- return result;
110
- };
111
- return SelectableItemsContainer;
112
- }(React.Component));
113
- export { SelectableItemsContainer };
@@ -1,41 +0,0 @@
1
- import * as React from 'react';
2
- import { Action, HeroCardActionExecuteEvent } from './../../main';
3
- export interface HeroCardProps {
4
- /**
5
- * The URL of the hero card image.
6
- */
7
- imageUrl: string;
8
- /**
9
- * The title of the hero card.
10
- */
11
- title: string;
12
- /**
13
- * The subtitle of the hero card.
14
- */
15
- subtitle: string;
16
- /**
17
- * An array with the possible quick actions for this hero card.
18
- */
19
- actions: Action[];
20
- /**
21
- * Fires when the user clicks a button.
22
- */
23
- onActionExecute?: (event: HeroCardActionExecuteEvent) => void;
24
- /**
25
- * Max width of the card image.
26
- */
27
- imageMaxWidth?: string | number;
28
- }
29
- /**
30
- * Represents a Hero Card component. Hero cards host a single large image and action buttons with text content.
31
- */
32
- export declare class HeroCard extends React.Component<HeroCardProps, {}> {
33
- /**
34
- * @hidden
35
- */
36
- render(): JSX.Element;
37
- private onBtnClick;
38
- private getActionsView;
39
- private getTitleView;
40
- private getSubtitleView;
41
- }
@@ -1,64 +0,0 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- import * as React from 'react';
17
- import { Button } from '@progress/kendo-react-buttons';
18
- import { dispatchEvent } from '@progress/kendo-react-common';
19
- // tslint:enable:max-line-length
20
- /**
21
- * Represents a Hero Card component. Hero cards host a single large image and action buttons with text content.
22
- */
23
- var HeroCard = /** @class */ (function (_super) {
24
- __extends(HeroCard, _super);
25
- function HeroCard() {
26
- var _this = _super !== null && _super.apply(this, arguments) || this;
27
- _this.onBtnClick = function (action, event) {
28
- dispatchEvent(_this.props.onActionExecute, event, _this, { action: action });
29
- };
30
- return _this;
31
- }
32
- /**
33
- * @hidden
34
- */
35
- HeroCard.prototype.render = function () {
36
- return (React.createElement("div", { className: "k-card" },
37
- React.createElement("img", { className: "k-card-image", src: this.props.imageUrl, style: { maxWidth: this.props.imageMaxWidth } }),
38
- React.createElement("div", { className: "k-card-body" },
39
- this.getTitleView(),
40
- this.getSubtitleView()),
41
- React.createElement("div", { className: "k-card-actions k-card-actions-vertical" }, this.getActionsView())));
42
- };
43
- HeroCard.prototype.getActionsView = function () {
44
- var _this = this;
45
- return this.props.actions.map(function (action, index) { return (React.createElement("span", { className: "k-card-action", key: index },
46
- React.createElement(Button, { fillMode: "flat", onClick: function (e) { return _this.onBtnClick(action, e); } }, action.title))); });
47
- };
48
- HeroCard.prototype.getTitleView = function () {
49
- var result = null;
50
- if (this.props.title) {
51
- result = (React.createElement("h5", { className: "k-card-title" }, this.props.title));
52
- }
53
- return result;
54
- };
55
- HeroCard.prototype.getSubtitleView = function () {
56
- var result = null;
57
- if (this.props.subtitle) {
58
- result = (React.createElement("h6", { className: "k-card-subtitle" }, this.props.subtitle));
59
- }
60
- return result;
61
- };
62
- return HeroCard;
63
- }(React.Component));
64
- export { HeroCard };
package/dist/es/main.d.ts DELETED
@@ -1,11 +0,0 @@
1
- import { MessageModel } from './ViewItem';
2
- import { ChatMessage, ChatMessageProps, ChatMessageTemplateProps } from './components/ChatMessage';
3
- export * from './api/action.interface';
4
- export * from './api/attachment.interface';
5
- export * from './api/message.interface';
6
- export * from './api/user.interface';
7
- export * from './components/Chat';
8
- export * from './ChatPropsAndState';
9
- export * from './Events';
10
- export * from './components/templates/HeroCard';
11
- export { MessageModel, ChatMessage, ChatMessageProps, ChatMessageTemplateProps };
package/dist/es/main.js DELETED
@@ -1,10 +0,0 @@
1
- import { ChatMessage } from './components/ChatMessage';
2
- export * from './api/action.interface';
3
- export * from './api/attachment.interface';
4
- export * from './api/message.interface';
5
- export * from './api/user.interface';
6
- export * from './components/Chat';
7
- export * from './ChatPropsAndState';
8
- export * from './Events';
9
- export * from './components/templates/HeroCard';
10
- export { ChatMessage };
@@ -1,30 +0,0 @@
1
- /**
2
- * @hidden
3
- */
4
- export declare const newMessageSendButton = "newMessage.sendButton";
5
- /**
6
- * @hidden
7
- */
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";
17
- /**
18
- * @hidden
19
- */
20
- export declare const ariaLabelMessageList = "messageList.ariaLabel";
21
- /**
22
- * @hidden
23
- */
24
- export declare const messages: {
25
- "newMessage.sendButton": string;
26
- "newMessage.optionsButton": string;
27
- "newMessage.messageInput": string;
28
- "avatar.alt": string;
29
- "messageList.ariaLabel": string;
30
- };
@@ -1,31 +0,0 @@
1
- var _a;
2
- /**
3
- * @hidden
4
- */
5
- export var newMessageSendButton = 'newMessage.sendButton';
6
- /**
7
- * @hidden
8
- */
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';
18
- /**
19
- * @hidden
20
- */
21
- export var ariaLabelMessageList = 'messageList.ariaLabel';
22
- /**
23
- * @hidden
24
- */
25
- export var messages = (_a = {},
26
- _a[newMessageSendButton] = 'Send',
27
- _a[newMessageOptionsButton] = 'Options',
28
- _a[newMessageMessageInput] = 'Message',
29
- _a[avatarAlt] = 'Avatar',
30
- _a[ariaLabelMessageList] = 'Message list',
31
- _a);
@@ -1,5 +0,0 @@
1
- import { PackageMetadata } from '@progress/kendo-licensing';
2
- /**
3
- * @hidden
4
- */
5
- export declare const packageMetadata: PackageMetadata;
@@ -1,11 +0,0 @@
1
- /**
2
- * @hidden
3
- */
4
- export var packageMetadata = {
5
- name: '@progress/kendo-react-conversational-ui',
6
- productName: 'KendoReact',
7
- productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
8
- publishDate: 1700063746,
9
- version: '',
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
- };
@@ -1,5 +0,0 @@
1
- import { Message, User } from './main';
2
- /**
3
- * @hidden
4
- */
5
- export declare const isAuthor: (user: User, msg: Message) => boolean;
package/dist/es/utils.js DELETED
@@ -1,6 +0,0 @@
1
- /**
2
- * @hidden
3
- */
4
- export var isAuthor = function (user, msg) {
5
- return user && msg.author && user.id === msg.author.id;
6
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,57 +0,0 @@
1
- import { Message, User, Action, Attachment, AttachmentLayout } from './main';
2
- /**
3
- * @hidden
4
- */
5
- export interface Selectable {
6
- selectionIndex: number;
7
- }
8
- /**
9
- * Represents the data item of a single `Message`.
10
- */
11
- export interface MessageModel extends Message, Selectable {
12
- }
13
- /**
14
- * @hidden
15
- */
16
- export interface MessageGroup {
17
- type: 'message-group';
18
- messages: MessageModel[];
19
- author: User;
20
- timestamp: Date;
21
- trackBy: any;
22
- }
23
- /**
24
- * @hidden
25
- */
26
- export interface AttachmentGroup extends Selectable {
27
- type: 'attachment-group';
28
- attachments: Attachment[];
29
- attachmentLayout: AttachmentLayout;
30
- timestamp: Date;
31
- trackBy: any;
32
- }
33
- /**
34
- * @hidden
35
- */
36
- export interface ActionGroup extends Selectable {
37
- type: 'action-group';
38
- actions?: Action[];
39
- timestamp: Date;
40
- trackBy: any;
41
- }
42
- /**
43
- * @hidden
44
- */
45
- export interface DateMarker {
46
- type: 'date-marker';
47
- timestamp: Date;
48
- trackBy: any;
49
- }
50
- /**
51
- * @hidden
52
- */
53
- export declare type ViewItem = MessageGroup | AttachmentGroup | ActionGroup | DateMarker;
54
- /**
55
- * @hidden
56
- */
57
- export declare const convertMsgsToViewItems: (messages: MessageModel[]) => ViewItem[];