Skip to content

Commit

Permalink
Chat: Add state default options
Browse files Browse the repository at this point in the history
  • Loading branch information
marker dao ® committed Aug 29, 2024
1 parent 2d7156c commit 091f421
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/devextreme-angular/src/ui/chat/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class DxChatComponent extends DxComponent implements OnDestroy, OnChanges


/**
* [descr:WidgetOptions.activeStateEnabled]
* [descr:dxChatOptions.activeStateEnabled]
*/
@Input()
Expand Down Expand Up @@ -115,7 +115,7 @@ export class DxChatComponent extends DxComponent implements OnDestroy, OnChanges


/**
* [descr:WidgetOptions.focusStateEnabled]
* [descr:dxChatOptions.focusStateEnabled]
*/
@Input()
Expand Down Expand Up @@ -154,7 +154,7 @@ export class DxChatComponent extends DxComponent implements OnDestroy, OnChanges


/**
* [descr:WidgetOptions.hoverStateEnabled]
* [descr:dxChatOptions.hoverStateEnabled]
*/
@Input()
Expand Down
3 changes: 3 additions & 0 deletions packages/devextreme/js/__internal/ui/chat/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ class Chat extends Widget<Properties> {
_getDefaultOptions(): Properties {
return {
...super._getDefaultOptions(),
activeStateEnabled: true,
focusStateEnabled: true,
hoverStateEnabled: true,
title: '',
items: [],
user: { id: new Guid().toString() },
Expand Down
18 changes: 18 additions & 0 deletions packages/devextreme/js/ui/chat.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,24 @@ export type Message = {
* @docid
*/
export interface dxChatOptions extends WidgetOptions<dxChat> {
/**
* @docid
* @default true
* @public
*/
activeStateEnabled?: boolean;
/**
* @docid
* @default true
* @public
*/
focusStateEnabled?: boolean;
/**
* @docid
* @default true
* @public
*/
hoverStateEnabled?: boolean;
/**
* @docid
* @default { id: new Guid().toString() }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1342,8 +1342,11 @@ testComponentDefaults(ColorBox,
testComponentDefaults(Chat,
{},
{
activeStateEnabled: true,
focusStateEnabled: true,
hoverStateEnabled: true,
title: '',
onMessageSend: null,
onMessageSend: undefined,
}
);

Expand Down
12 changes: 12 additions & 0 deletions packages/devextreme/ts/dx.all.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9461,6 +9461,18 @@ declare module DevExpress.ui {
* @deprecated [depNote:dxChatOptions]
*/
export interface dxChatOptions extends WidgetOptions<dxChat> {
/**
* [descr:dxChatOptions.activeStateEnabled]
*/
activeStateEnabled?: boolean;
/**
* [descr:dxChatOptions.focusStateEnabled]
*/
focusStateEnabled?: boolean;
/**
* [descr:dxChatOptions.hoverStateEnabled]
*/
hoverStateEnabled?: boolean;
/**
* [descr:dxChatOptions.user]
*/
Expand Down

0 comments on commit 091f421

Please sign in to comment.