Skip to content

Commit

Permalink
Merge branch '24_2' into 24_2_dataSource_d_ts
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeniyKiyashko committed Aug 30, 2024
2 parents 20b80a7 + 8404bc4 commit a40db18
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 11 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 @@ -78,7 +78,7 @@ export class DxChatComponent extends DxComponent implements OnDestroy, OnChanges


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


/**
* [descr:WidgetOptions.focusStateEnabled]
* [descr:dxChatOptions.focusStateEnabled]
*/
@Input()
Expand Down Expand Up @@ -169,7 +169,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 @@ -29,6 +29,9 @@ class Chat extends Widget<Properties> {
_getDefaultOptions(): Properties {
return {
...super._getDefaultOptions(),
activeStateEnabled: true,
focusStateEnabled: true,
hoverStateEnabled: true,
title: '',
items: [],
dataSource: null,
Expand Down
24 changes: 21 additions & 3 deletions packages/devextreme/js/ui/chat.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,22 @@ export type Message = {
export interface dxChatOptions extends WidgetOptions<dxChat> {
/**
* @docid
* @type string | Array<Message> | Store | DataSource | DataSourceOptions | null
* @default null
* @default true
* @public
*/
dataSource?: DataSourceLike<Message> | null;
activeStateEnabled?: boolean;
/**
* @docid
* @default true
* @public
*/
focusStateEnabled?: boolean;
/**
* @docid
* @default true
* @public
*/
hoverStateEnabled?: boolean;
/**
* @docid
* @default { id: new Guid().toString() }
Expand All @@ -135,6 +146,13 @@ export interface dxChatOptions extends WidgetOptions<dxChat> {
* @public
*/
items?: Array<Message>;
/**
* @docid
* @type string | Array<Message> | Store | DataSource | DataSourceOptions | null
* @default null
* @public
*/
dataSource?: DataSourceLike<Message> | null;
/**
* @docid
* @default null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1342,9 +1342,12 @@ testComponentDefaults(ColorBox,
testComponentDefaults(Chat,
{},
{
activeStateEnabled: true,
focusStateEnabled: true,
hoverStateEnabled: true,
title: '',
onMessageSend: null,
dataSource: null,
onMessageSend: undefined,
dataSource: undefined,
}
);

Expand Down
18 changes: 15 additions & 3 deletions packages/devextreme/ts/dx.all.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<TComponent> = {
export type ComponentFactory<TComponent> = {
new (
element: UserDefinedElement,
options?: Record<string, unknown>
Expand Down Expand Up @@ -9464,9 +9464,17 @@ declare module DevExpress.ui {
*/
export interface dxChatOptions extends WidgetOptions<dxChat> {
/**
* [descr:dxChatOptions.dataSource]
* [descr:dxChatOptions.activeStateEnabled]
*/
dataSource?: DevExpress.data.DataSource.DataSourceLike<DevExpress.ui.dxChat.Message> | null;
activeStateEnabled?: boolean;
/**
* [descr:dxChatOptions.focusStateEnabled]
*/
focusStateEnabled?: boolean;
/**
* [descr:dxChatOptions.hoverStateEnabled]
*/
hoverStateEnabled?: boolean;
/**
* [descr:dxChatOptions.user]
*/
Expand All @@ -9479,6 +9487,10 @@ declare module DevExpress.ui {
* [descr:dxChatOptions.items]
*/
items?: Array<DevExpress.ui.dxChat.Message>;
/**
* [descr:dxChatOptions.dataSource]
*/
dataSource?: DevExpress.data.DataSource.DataSourceLike<DevExpress.ui.dxChat.Message> | null;
/**
* [descr:dxChatOptions.onMessageSend]
*/
Expand Down

0 comments on commit a40db18

Please sign in to comment.