@@ -26,10 +26,10 @@ import AlertList from '@ts/ui/chat/alertlist';
2626import ConfirmationPopup from '@ts/ui/chat/confirmationpopup' ;
2727import type {
2828 MessageEnteredEvent as MessageBoxMessageEnteredEvent ,
29- Properties as MessageBoxProperties ,
29+ // Properties as MessageBoxProperties,
3030 TypingStartEvent as MessageBoxTypingStartEvent ,
3131} from '@ts/ui/chat/messagebox' ;
32- import MessageBox from '@ts/ui/chat/messagebox' ;
32+ import type MessageBox from '@ts/ui/chat/messagebox' ;
3333import type {
3434 EmptyViewTemplate ,
3535 MessageEditingEvent ,
@@ -43,7 +43,7 @@ const CHAT_CLASS = 'dx-chat';
4343const TEXTEDITOR_INPUT_CLASS = 'dx-texteditor-input' ;
4444
4545class Chat extends Widget < Properties > {
46- _messageBox ! : MessageBox ;
46+ _messageBox ? : MessageBox ;
4747
4848 _messageList ! : MessageList ;
4949
@@ -310,7 +310,7 @@ class Chat extends Widget<Properties> {
310310 invokeConditionally (
311311 messageEditingStartArgs . cancel ,
312312 ( ) => {
313- this . _messageBox . option ( 'text' , e . message . text ) ;
313+ this . _messageBox ? .option ( 'text' , e . message . text ) ;
314314 this . _messageToEdit = e . message ;
315315 } ,
316316 ) ;
@@ -332,7 +332,7 @@ class Chat extends Widget<Properties> {
332332 {
333333 onApplyButtonClick : ( ) : void => {
334334 if ( this . _messageToEdit === this . _messageToDelete ) {
335- this . _messageBox . option ( 'text' , '' ) ;
335+ this . _messageBox ? .option ( 'text' , '' ) ;
336336 this . _messageEditCanceledAction ?.( { message : this . _messageToEdit } ) ;
337337 this . _messageToEdit = undefined ;
338338 }
@@ -386,7 +386,7 @@ class Chat extends Widget<Properties> {
386386 invokeConditionally (
387387 eventArgs . cancel ,
388388 ( ) => {
389- this . _messageBox . option ( 'text' , '' ) ;
389+ this . _messageBox ? .option ( 'text' , '' ) ;
390390 this . _messageUpdatedAction ?.( eventArgs ) ;
391391 this . _messageToEdit = undefined ;
392392 } ,
@@ -406,38 +406,38 @@ class Chat extends Widget<Properties> {
406406 }
407407
408408 _renderMessageBox ( ) : void {
409- const {
410- activeStateEnabled,
411- focusStateEnabled,
412- hoverStateEnabled,
413- } = this . option ( ) ;
409+ // const {
410+ // activeStateEnabled,
411+ // focusStateEnabled,
412+ // hoverStateEnabled,
413+ // } = this.option();
414414
415415 const $messageBox = $ ( '<div>' ) ;
416416
417417 this . $element ( ) . append ( $messageBox ) ;
418418
419- const configuration : MessageBoxProperties = {
420- activeStateEnabled,
421- focusStateEnabled,
422- hoverStateEnabled,
423- onMessageEntered : ( e ) => {
424- this . _messageEnteredHandler ( e ) ;
425- } ,
426- onTypingStart : ( e ) => {
427- this . _typingStartHandler ( e ) ;
428- } ,
429- onTypingEnd : ( ) => {
430- this . _typingEndHandler ( ) ;
431- } ,
432- onMessageEditCanceled : ( ) => {
433- this . _messageEditCanceledHandler ( ) ;
434- } ,
435- onMessageUpdating : ( e ) => {
436- this . _messageUpdatingHandler ( e ) ;
437- } ,
438- } ;
439-
440- this . _messageBox = this . _createComponent ( $messageBox , MessageBox , configuration ) ;
419+ // const configuration: MessageBoxProperties = {
420+ // activeStateEnabled,
421+ // focusStateEnabled,
422+ // hoverStateEnabled,
423+ // onMessageEntered: (e) => {
424+ // this._messageEnteredHandler(e);
425+ // },
426+ // onTypingStart: (e) => {
427+ // this._typingStartHandler(e);
428+ // },
429+ // onTypingEnd: () => {
430+ // this._typingEndHandler();
431+ // },
432+ // onMessageEditCanceled: () => {
433+ // this._messageEditCanceledHandler();
434+ // },
435+ // onMessageUpdating: (e) => {
436+ // this._messageUpdatingHandler(e);
437+ // },
438+ // };
439+
440+ // this._messageBox = this._createComponent($messageBox, MessageBox, configuration);
441441 }
442442
443443 _updateRootAria ( ) : void {
@@ -452,7 +452,7 @@ class Chat extends Widget<Properties> {
452452 _updateMessageBoxAria ( ) : void {
453453 const emptyViewId = this . _messageList . getEmptyViewId ( ) ;
454454
455- this . _messageBox . updateInputAria ( emptyViewId ) ;
455+ this . _messageBox ? .updateInputAria ( emptyViewId ) ;
456456 }
457457
458458 _createMessageEnteredAction ( ) : void {
@@ -570,7 +570,7 @@ class Chat extends Widget<Properties> {
570570 case 'activeStateEnabled' :
571571 case 'focusStateEnabled' :
572572 case 'hoverStateEnabled' :
573- this . _messageBox . option ( name , value ) ;
573+ this . _messageBox ? .option ( name , value ) ;
574574 break ;
575575 case 'user' : {
576576 const author = value as Properties [ typeof name ] ;
0 commit comments