diff --git a/packages/devextreme-angular/src/ui/chat/index.ts b/packages/devextreme-angular/src/ui/chat/index.ts index c6545c97766c..57f17fb35281 100644 --- a/packages/devextreme-angular/src/ui/chat/index.ts +++ b/packages/devextreme-angular/src/ui/chat/index.ts @@ -78,7 +78,7 @@ export class DxChatComponent extends DxComponent implements OnDestroy, OnChanges /** - * [descr:WidgetOptions.activeStateEnabled] + * [descr:dxChatOptions.activeStateEnabled] */ @Input() @@ -130,7 +130,7 @@ export class DxChatComponent extends DxComponent implements OnDestroy, OnChanges /** - * [descr:WidgetOptions.focusStateEnabled] + * [descr:dxChatOptions.focusStateEnabled] */ @Input() @@ -169,7 +169,7 @@ export class DxChatComponent extends DxComponent implements OnDestroy, OnChanges /** - * [descr:WidgetOptions.hoverStateEnabled] + * [descr:dxChatOptions.hoverStateEnabled] */ @Input() diff --git a/packages/devextreme/js/__internal/ui/chat/chat.ts b/packages/devextreme/js/__internal/ui/chat/chat.ts index fecd6c0da719..19c34b662613 100644 --- a/packages/devextreme/js/__internal/ui/chat/chat.ts +++ b/packages/devextreme/js/__internal/ui/chat/chat.ts @@ -29,6 +29,9 @@ class Chat extends Widget { _getDefaultOptions(): Properties { return { ...super._getDefaultOptions(), + activeStateEnabled: true, + focusStateEnabled: true, + hoverStateEnabled: true, title: '', items: [], dataSource: null, diff --git a/packages/devextreme/js/ui/chat.d.ts b/packages/devextreme/js/ui/chat.d.ts index bb480880c07d..1761a2bbecf9 100644 --- a/packages/devextreme/js/ui/chat.d.ts +++ b/packages/devextreme/js/ui/chat.d.ts @@ -111,11 +111,22 @@ export type Message = { export interface dxChatOptions extends WidgetOptions { /** * @docid - * @type string | Array | Store | DataSource | DataSourceOptions | null - * @default null + * @default true * @public */ - dataSource?: DataSourceLike | null; + activeStateEnabled?: boolean; + /** + * @docid + * @default true + * @public + */ + focusStateEnabled?: boolean; + /** + * @docid + * @default true + * @public + */ + hoverStateEnabled?: boolean; /** * @docid * @default { id: new Guid().toString() } @@ -135,6 +146,13 @@ export interface dxChatOptions extends WidgetOptions { * @public */ items?: Array; + /** + * @docid + * @type string | Array | Store | DataSource | DataSourceOptions | null + * @default null + * @public + */ + dataSource?: DataSourceLike | null; /** * @docid * @default null diff --git a/packages/devextreme/testing/tests/DevExpress.ui/defaultOptions.tests.js b/packages/devextreme/testing/tests/DevExpress.ui/defaultOptions.tests.js index ac4b14b995c6..66fae23c6e33 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui/defaultOptions.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui/defaultOptions.tests.js @@ -1342,9 +1342,12 @@ testComponentDefaults(ColorBox, testComponentDefaults(Chat, {}, { + activeStateEnabled: true, + focusStateEnabled: true, + hoverStateEnabled: true, title: '', - onMessageSend: null, - dataSource: null, + onMessageSend: undefined, + dataSource: undefined, } ); diff --git a/packages/devextreme/ts/dx.all.d.ts b/packages/devextreme/ts/dx.all.d.ts index 64ac3a9ff570..269621759d96 100644 --- a/packages/devextreme/ts/dx.all.d.ts +++ b/packages/devextreme/ts/dx.all.d.ts @@ -4837,7 +4837,7 @@ declare module DevExpress.core { /** * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ - type ComponentFactory = { + export type ComponentFactory = { new ( element: UserDefinedElement, options?: Record @@ -9464,9 +9464,17 @@ declare module DevExpress.ui { */ export interface dxChatOptions extends WidgetOptions { /** - * [descr:dxChatOptions.dataSource] + * [descr:dxChatOptions.activeStateEnabled] */ - dataSource?: DevExpress.data.DataSource.DataSourceLike | null; + activeStateEnabled?: boolean; + /** + * [descr:dxChatOptions.focusStateEnabled] + */ + focusStateEnabled?: boolean; + /** + * [descr:dxChatOptions.hoverStateEnabled] + */ + hoverStateEnabled?: boolean; /** * [descr:dxChatOptions.user] */ @@ -9479,6 +9487,10 @@ declare module DevExpress.ui { * [descr:dxChatOptions.items] */ items?: Array; + /** + * [descr:dxChatOptions.dataSource] + */ + dataSource?: DevExpress.data.DataSource.DataSourceLike | null; /** * [descr:dxChatOptions.onMessageSend] */