Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/devextreme-angular/src/common/grids/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export type {
AdaptiveDetailRowPreparingInfo,
AIAssistant,
AIAssistantRequestCreatingInfo,
AIColumnMode,
AIColumnRequestCreatingInfo,
ApplyChangesMode,
Expand Down
2 changes: 2 additions & 0 deletions packages/devextreme-angular/src/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ export namespace Export {
export function Grids(): void {}
export namespace Grids {
export type AdaptiveDetailRowPreparingInfo = GridsModule.AdaptiveDetailRowPreparingInfo;
export type AIAssistant = GridsModule.AIAssistant;
export type AIAssistantRequestCreatingInfo = GridsModule.AIAssistantRequestCreatingInfo;
Comment thread
anna-shakhova marked this conversation as resolved.
export type AIColumnMode = GridsModule.AIColumnMode;
export type AIColumnRequestCreatingInfo<TRowData = any> = GridsModule.AIColumnRequestCreatingInfo<TRowData>;
export type ApplyChangesMode = GridsModule.ApplyChangesMode;
Expand Down
34 changes: 32 additions & 2 deletions packages/devextreme-angular/src/ui/data-grid/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export type { ExplicitTypes } from 'devextreme/ui/data_grid';

import type dxSortable from 'devextreme/ui/sortable';
import type dxDraggable from 'devextreme/ui/draggable';
import type { AIAssistant, ColumnChooser, ColumnResizeMode, DataChange, GridsEditMode, NewRowPosition, GridsEditRefreshMode, StartEditAction, FilterPanel, ApplyFilterMode, GroupExpandMode, HeaderFilter, EnterKeyAction, EnterKeyDirection, Pager, GridBase, DataRenderMode, SearchPanel, SelectionColumnDisplayMode, Sorting, StateStoreType, SummaryType } from 'devextreme/common/grids';
import type { AIIntegration } from 'devextreme/common/ai-integration';
import type { ColumnChooser, ColumnResizeMode, DataChange, GridsEditMode, NewRowPosition, GridsEditRefreshMode, StartEditAction, FilterPanel, ApplyFilterMode, GroupExpandMode, HeaderFilter, EnterKeyAction, EnterKeyDirection, Pager, GridBase, DataRenderMode, SearchPanel, SelectionColumnDisplayMode, Sorting, StateStoreType, SummaryType } from 'devextreme/common/grids';
import type { default as dxDataGrid, dxDataGridColumn, dxDataGridRowObject, DataGridExportFormat, AdaptiveDetailRowPreparingEvent, AIColumnRequestCreatingEvent, CellClickEvent, CellDblClickEvent, CellHoverChangedEvent, CellPreparedEvent, ContentReadyEvent, ContextMenuPreparingEvent, DataErrorOccurredEvent, DisposingEvent, EditCanceledEvent, EditCancelingEvent, EditingStartEvent, EditorPreparedEvent, EditorPreparingEvent, ExportingEvent, FocusedCellChangedEvent, FocusedCellChangingEvent, FocusedRowChangedEvent, FocusedRowChangingEvent, InitializedEvent, InitNewRowEvent, KeyDownEvent, OptionChangedEvent, RowClickEvent, RowCollapsedEvent, RowCollapsingEvent, RowDblClickEvent, RowExpandedEvent, RowExpandingEvent, RowInsertedEvent, RowInsertingEvent, RowPreparedEvent, RowRemovedEvent, RowRemovingEvent, RowUpdatedEvent, RowUpdatingEvent, RowValidatingEvent, SavedEvent, SavingEvent, SelectionChangedEvent, ToolbarPreparingEvent, DataGridScrollMode, SelectionSensitivity, dxDataGridToolbar } from 'devextreme/ui/data_grid';
import type { default as dxDataGrid, dxDataGridColumn, dxDataGridRowObject, DataGridExportFormat, AdaptiveDetailRowPreparingEvent, AIAssistantRequestCreatingEvent, AIColumnRequestCreatingEvent, CellClickEvent, CellDblClickEvent, CellHoverChangedEvent, CellPreparedEvent, ContentReadyEvent, ContextMenuPreparingEvent, DataErrorOccurredEvent, DisposingEvent, EditCanceledEvent, EditCancelingEvent, EditingStartEvent, EditorPreparedEvent, EditorPreparingEvent, ExportingEvent, FocusedCellChangedEvent, FocusedCellChangingEvent, FocusedRowChangedEvent, FocusedRowChangingEvent, InitializedEvent, InitNewRowEvent, KeyDownEvent, OptionChangedEvent, RowClickEvent, RowCollapsedEvent, RowCollapsingEvent, RowDblClickEvent, RowExpandedEvent, RowExpandingEvent, RowInsertedEvent, RowInsertingEvent, RowPreparedEvent, RowRemovedEvent, RowRemovingEvent, RowUpdatedEvent, RowUpdatingEvent, RowValidatingEvent, SavedEvent, SavingEvent, SelectionChangedEvent, ToolbarPreparingEvent, DataGridScrollMode, SelectionSensitivity, dxDataGridToolbar } from 'devextreme/ui/data_grid';
import type { Mode, DragDirection, DragHighlight, ScrollbarMode, SingleMultipleOrNone, SelectAllMode, SortOrder, HorizontalAlignment } from 'devextreme/common';
import type { default as DataSource, DataSourceOptions } from 'devextreme/data/data_source';
import type { Store } from 'devextreme/data/store';
Expand Down Expand Up @@ -118,6 +118,7 @@ import { DxiTotalItemModule } from 'devextreme-angular/ui/nested';
import { DxoToolbarModule } from 'devextreme-angular/ui/nested';

import { DxoDataGridAIModule } from 'devextreme-angular/ui/data-grid/nested';
import { DxoDataGridAIAssistantModule } from 'devextreme-angular/ui/data-grid/nested';
import { DxoDataGridAIOptionsModule } from 'devextreme-angular/ui/data-grid/nested';
import { DxoDataGridAnimationModule } from 'devextreme-angular/ui/data-grid/nested';
import { DxiDataGridAsyncRuleModule } from 'devextreme-angular/ui/data-grid/nested';
Expand Down Expand Up @@ -343,6 +344,16 @@ export class DxDataGridComponent<TRowData = any, TKey = any> extends DxComponent
}



@Input()
get aiAssistant(): AIAssistant {
return this._getOption('aiAssistant');
}
set aiAssistant(value: AIAssistant) {
this._setOption('aiAssistant', value);
}


/**
* [descr:GridBaseOptions.aiIntegration]

Expand Down Expand Up @@ -1314,6 +1325,14 @@ export class DxDataGridComponent<TRowData = any, TKey = any> extends DxComponent
*/
@Output() onAdaptiveDetailRowPreparing: EventEmitter<AdaptiveDetailRowPreparingEvent>;

/**

* [descr:dxDataGridOptions.onAIAssistantRequestCreating]


*/
@Output() onAIAssistantRequestCreating: EventEmitter<AIAssistantRequestCreatingEvent>;

/**

* [descr:dxDataGridOptions.onAIColumnRequestCreating]
Expand Down Expand Up @@ -1656,6 +1675,13 @@ export class DxDataGridComponent<TRowData = any, TKey = any> extends DxComponent
*/
@Output() activeStateEnabledChange: EventEmitter<boolean>;

/**

* This member supports the internal infrastructure and is not intended to be used directly from your code.

*/
@Output() aiAssistantChange: EventEmitter<AIAssistant>;

/**

* This member supports the internal infrastructure and is not intended to be used directly from your code.
Expand Down Expand Up @@ -2188,6 +2214,7 @@ export class DxDataGridComponent<TRowData = any, TKey = any> extends DxComponent

this._createEventEmitters([
{ subscribe: 'adaptiveDetailRowPreparing', emit: 'onAdaptiveDetailRowPreparing' },
{ subscribe: 'aIAssistantRequestCreating', emit: 'onAIAssistantRequestCreating' },
{ subscribe: 'aIColumnRequestCreating', emit: 'onAIColumnRequestCreating' },
{ subscribe: 'cellClick', emit: 'onCellClick' },
{ subscribe: 'cellDblClick', emit: 'onCellDblClick' },
Expand Down Expand Up @@ -2231,6 +2258,7 @@ export class DxDataGridComponent<TRowData = any, TKey = any> extends DxComponent
{ subscribe: 'toolbarPreparing', emit: 'onToolbarPreparing' },
{ emit: 'accessKeyChange' },
{ emit: 'activeStateEnabledChange' },
{ emit: 'aiAssistantChange' },
{ emit: 'aiIntegrationChange' },
{ emit: 'allowColumnReorderingChange' },
{ emit: 'allowColumnResizingChange' },
Expand Down Expand Up @@ -2429,6 +2457,7 @@ export class DxDataGridComponent<TRowData = any, TKey = any> extends DxComponent
DxiTotalItemModule,
DxoToolbarModule,
DxoDataGridAIModule,
DxoDataGridAIAssistantModule,
DxoDataGridAIOptionsModule,
DxoDataGridAnimationModule,
DxiDataGridAsyncRuleModule,
Expand Down Expand Up @@ -2602,6 +2631,7 @@ export class DxDataGridComponent<TRowData = any, TKey = any> extends DxComponent
DxiTotalItemModule,
DxoToolbarModule,
DxoDataGridAIModule,
DxoDataGridAIAssistantModule,
DxoDataGridAIOptionsModule,
DxoDataGridAnimationModule,
DxiDataGridAsyncRuleModule,
Expand Down
108 changes: 108 additions & 0 deletions packages/devextreme-angular/src/ui/data-grid/nested/ai-assistant.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/* tslint:disable:max-line-length */


import {
Component,
OnInit,
OnDestroy,
NgModule,
Host,
SkipSelf,
Input
} from '@angular/core';




import type { AIIntegration } from 'devextreme/common/ai-integration';
import type { dxPopupOptions } from 'devextreme/ui/popup';

import {
DxIntegrationModule,
NestedOptionHost,
} from 'devextreme-angular/core';
import { NestedOption } from 'devextreme-angular/core';


@Component({
selector: 'dxo-data-grid-ai-assistant',
template: '',
styles: [''],
imports: [ DxIntegrationModule ],
providers: [NestedOptionHost]
})
export class DxoDataGridAIAssistantComponent extends NestedOption implements OnDestroy, OnInit {
@Input()
get aiIntegration(): AIIntegration {
return this._getOption('aiIntegration');
}
set aiIntegration(value: AIIntegration) {
this._setOption('aiIntegration', value);
}

@Input()
get chat(): Record<string, any> {
return this._getOption('chat');
}
set chat(value: Record<string, any>) {
this._setOption('chat', value);
}

@Input()
get enabled(): boolean {
return this._getOption('enabled');
}
set enabled(value: boolean) {
this._setOption('enabled', value);
}

@Input()
get popup(): dxPopupOptions<any> {
return this._getOption('popup');
}
set popup(value: dxPopupOptions<any>) {
this._setOption('popup', value);
}

@Input()
get title(): string {
return this._getOption('title');
}
set title(value: string) {
this._setOption('title', value);
}


protected get _optionPath() {
return 'aiAssistant';
}


constructor(@SkipSelf() @Host() parentOptionHost: NestedOptionHost,
@Host() optionHost: NestedOptionHost) {
super();
parentOptionHost.setNestedOption(this);
optionHost.setHost(this, this._fullOptionPath.bind(this));
}


ngOnInit() {
this._addRecreatedComponent();
}

ngOnDestroy() {
this._addRemovedOption(this._getOptionPath());
}


}

@NgModule({
imports: [
DxoDataGridAIAssistantComponent
],
exports: [
DxoDataGridAIAssistantComponent
],
})
export class DxoDataGridAIAssistantModule { }
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './ai-assistant';
export * from './ai-options';
export * from './ai';
export * from './animation';
Expand Down
34 changes: 32 additions & 2 deletions packages/devextreme-angular/src/ui/tree-list/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export type { ExplicitTypes } from 'devextreme/ui/tree_list';

import type dxSortable from 'devextreme/ui/sortable';
import type dxDraggable from 'devextreme/ui/draggable';
import type { AIAssistant, ColumnChooser, ColumnResizeMode, DataChange, GridsEditMode, GridsEditRefreshMode, StartEditAction, FilterPanel, ApplyFilterMode, HeaderFilter, EnterKeyAction, EnterKeyDirection, Pager, GridBase, DataRenderMode, SearchPanel, Sorting, StateStoreType } from 'devextreme/common/grids';
import type { AIIntegration } from 'devextreme/common/ai-integration';
import type { ColumnChooser, ColumnResizeMode, DataChange, GridsEditMode, GridsEditRefreshMode, StartEditAction, FilterPanel, ApplyFilterMode, HeaderFilter, EnterKeyAction, EnterKeyDirection, Pager, GridBase, DataRenderMode, SearchPanel, Sorting, StateStoreType } from 'devextreme/common/grids';
import type { default as dxTreeList, dxTreeListColumn, dxTreeListRowObject, TreeListFilterMode, AdaptiveDetailRowPreparingEvent, AIColumnRequestCreatingEvent, CellClickEvent, CellDblClickEvent, CellHoverChangedEvent, CellPreparedEvent, ContentReadyEvent, ContextMenuPreparingEvent, DataErrorOccurredEvent, DisposingEvent, EditCanceledEvent, EditCancelingEvent, EditingStartEvent, EditorPreparedEvent, EditorPreparingEvent, FocusedCellChangedEvent, FocusedCellChangingEvent, FocusedRowChangedEvent, FocusedRowChangingEvent, InitializedEvent, InitNewRowEvent, KeyDownEvent, NodesInitializedEvent, OptionChangedEvent, RowClickEvent, RowCollapsedEvent, RowCollapsingEvent, RowDblClickEvent, RowExpandedEvent, RowExpandingEvent, RowInsertedEvent, RowInsertingEvent, RowPreparedEvent, RowRemovedEvent, RowRemovingEvent, RowUpdatedEvent, RowUpdatingEvent, RowValidatingEvent, SavedEvent, SavingEvent, SelectionChangedEvent, ToolbarPreparingEvent, dxTreeListToolbar } from 'devextreme/ui/tree_list';
import type { default as dxTreeList, dxTreeListColumn, dxTreeListRowObject, TreeListFilterMode, AdaptiveDetailRowPreparingEvent, AIAssistantRequestCreatingEvent, AIColumnRequestCreatingEvent, CellClickEvent, CellDblClickEvent, CellHoverChangedEvent, CellPreparedEvent, ContentReadyEvent, ContextMenuPreparingEvent, DataErrorOccurredEvent, DisposingEvent, EditCanceledEvent, EditCancelingEvent, EditingStartEvent, EditorPreparedEvent, EditorPreparingEvent, FocusedCellChangedEvent, FocusedCellChangingEvent, FocusedRowChangedEvent, FocusedRowChangingEvent, InitializedEvent, InitNewRowEvent, KeyDownEvent, NodesInitializedEvent, OptionChangedEvent, RowClickEvent, RowCollapsedEvent, RowCollapsingEvent, RowDblClickEvent, RowExpandedEvent, RowExpandingEvent, RowInsertedEvent, RowInsertingEvent, RowPreparedEvent, RowRemovedEvent, RowRemovingEvent, RowUpdatedEvent, RowUpdatingEvent, RowValidatingEvent, SavedEvent, SavingEvent, SelectionChangedEvent, ToolbarPreparingEvent, dxTreeListToolbar } from 'devextreme/ui/tree_list';
import type { Mode, DataStructure, DragDirection, DragHighlight, ScrollMode, ScrollbarMode, SingleMultipleOrNone } from 'devextreme/common';
import type { default as DataSource, DataSourceOptions } from 'devextreme/data/data_source';
import type { Store } from 'devextreme/data/store';
Expand Down Expand Up @@ -108,6 +108,7 @@ import { DxoStateStoringModule } from 'devextreme-angular/ui/nested';
import { DxoToolbarModule } from 'devextreme-angular/ui/nested';

import { DxoTreeListAIModule } from 'devextreme-angular/ui/tree-list/nested';
import { DxoTreeListAIAssistantModule } from 'devextreme-angular/ui/tree-list/nested';
import { DxoTreeListAIOptionsModule } from 'devextreme-angular/ui/tree-list/nested';
import { DxoTreeListAnimationModule } from 'devextreme-angular/ui/tree-list/nested';
import { DxiTreeListAsyncRuleModule } from 'devextreme-angular/ui/tree-list/nested';
Expand Down Expand Up @@ -303,6 +304,16 @@ export class DxTreeListComponent<TRowData = any, TKey = any> extends DxComponent
}



@Input()
get aiAssistant(): AIAssistant {
return this._getOption('aiAssistant');
}
set aiAssistant(value: AIAssistant) {
this._setOption('aiAssistant', value);
}


/**
* [descr:GridBaseOptions.aiIntegration]

Expand Down Expand Up @@ -1272,6 +1283,14 @@ export class DxTreeListComponent<TRowData = any, TKey = any> extends DxComponent
*/
@Output() onAdaptiveDetailRowPreparing: EventEmitter<AdaptiveDetailRowPreparingEvent>;

/**

* [descr:dxTreeListOptions.onAIAssistantRequestCreating]


*/
@Output() onAIAssistantRequestCreating: EventEmitter<AIAssistantRequestCreatingEvent>;

/**

* [descr:dxTreeListOptions.onAIColumnRequestCreating]
Expand Down Expand Up @@ -1614,6 +1633,13 @@ export class DxTreeListComponent<TRowData = any, TKey = any> extends DxComponent
*/
@Output() activeStateEnabledChange: EventEmitter<boolean>;

/**

* This member supports the internal infrastructure and is not intended to be used directly from your code.

*/
@Output() aiAssistantChange: EventEmitter<AIAssistant>;

/**

* This member supports the internal infrastructure and is not intended to be used directly from your code.
Expand Down Expand Up @@ -2146,6 +2172,7 @@ export class DxTreeListComponent<TRowData = any, TKey = any> extends DxComponent

this._createEventEmitters([
{ subscribe: 'adaptiveDetailRowPreparing', emit: 'onAdaptiveDetailRowPreparing' },
{ subscribe: 'aIAssistantRequestCreating', emit: 'onAIAssistantRequestCreating' },
{ subscribe: 'aIColumnRequestCreating', emit: 'onAIColumnRequestCreating' },
{ subscribe: 'cellClick', emit: 'onCellClick' },
{ subscribe: 'cellDblClick', emit: 'onCellDblClick' },
Expand Down Expand Up @@ -2189,6 +2216,7 @@ export class DxTreeListComponent<TRowData = any, TKey = any> extends DxComponent
{ subscribe: 'toolbarPreparing', emit: 'onToolbarPreparing' },
{ emit: 'accessKeyChange' },
{ emit: 'activeStateEnabledChange' },
{ emit: 'aiAssistantChange' },
{ emit: 'aiIntegrationChange' },
{ emit: 'allowColumnReorderingChange' },
{ emit: 'allowColumnResizingChange' },
Expand Down Expand Up @@ -2374,6 +2402,7 @@ export class DxTreeListComponent<TRowData = any, TKey = any> extends DxComponent
DxoStateStoringModule,
DxoToolbarModule,
DxoTreeListAIModule,
DxoTreeListAIAssistantModule,
DxoTreeListAIOptionsModule,
DxoTreeListAnimationModule,
DxiTreeListAsyncRuleModule,
Expand Down Expand Up @@ -2526,6 +2555,7 @@ export class DxTreeListComponent<TRowData = any, TKey = any> extends DxComponent
DxoStateStoringModule,
DxoToolbarModule,
DxoTreeListAIModule,
DxoTreeListAIAssistantModule,
DxoTreeListAIOptionsModule,
DxoTreeListAnimationModule,
DxiTreeListAsyncRuleModule,
Expand Down
Loading
Loading