Skip to content
Open
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
10 changes: 6 additions & 4 deletions packages/devextreme-angular/src/common/grids/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export type {
AIColumnRequestCreatingInfo,
ApplyChangesMode,
ApplyFilterMode,
BasicFilterExprObj,
BasicFilterExpr,
ColumnAIOptions,
ColumnBase,
ColumnButtonBase,
Expand All @@ -22,7 +22,7 @@ export type {
ColumnHeaderFilterSearchConfig,
ColumnLookup,
ColumnResizeMode,
CombinedFilterExprObj,
CombinedFilterExpr,
CommandInfo,
CompositeKeyPair,
DataChange,
Expand All @@ -34,7 +34,9 @@ export type {
EditingTextsBase,
EnterKeyAction,
EnterKeyDirection,
FilterExprObj,
FilterExpr,
FilterExprNode,
FilterExprTree,
FilterOperation,
FilterPanel,
FilterPanelTexts,
Expand All @@ -55,7 +57,7 @@ export type {
KeyboardNavigation,
KeyDownInfo,
LoadPanel,
NegatedFilterExprObj,
NegatedFilterExpr,
NewRowInfo,
NewRowPosition,
Pager,
Expand Down
10 changes: 6 additions & 4 deletions packages/devextreme-angular/src/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ export namespace Grids {
export type AIColumnRequestCreatingInfo<TRowData = any> = GridsModule.AIColumnRequestCreatingInfo<TRowData>;
export type ApplyChangesMode = GridsModule.ApplyChangesMode;
export type ApplyFilterMode = GridsModule.ApplyFilterMode;
export type BasicFilterExprObj = GridsModule.BasicFilterExprObj;
export type BasicFilterExpr = GridsModule.BasicFilterExpr;
export type ColumnAIOptions = GridsModule.ColumnAIOptions;
export type ColumnBase<TRowData = any> = GridsModule.ColumnBase<TRowData>;
export type ColumnButtonBase = GridsModule.ColumnButtonBase;
Expand All @@ -297,7 +297,7 @@ export namespace Grids {
export type ColumnHeaderFilterSearchConfig = GridsModule.ColumnHeaderFilterSearchConfig;
export type ColumnLookup = GridsModule.ColumnLookup;
export type ColumnResizeMode = GridsModule.ColumnResizeMode;
export type CombinedFilterExprObj = GridsModule.CombinedFilterExprObj;
export type CombinedFilterExpr = GridsModule.CombinedFilterExpr;
export type CommandInfo<TCommands extends PredefinedCommands = PredefinedCommands> = GridsModule.CommandInfo<TCommands>;
export type CompositeKeyPair = GridsModule.CompositeKeyPair;
export type DataChange<TRowData = any, TKey = any> = GridsModule.DataChange<TRowData, TKey>;
Expand All @@ -309,7 +309,9 @@ export namespace Grids {
export type EditingTextsBase = GridsModule.EditingTextsBase;
export type EnterKeyAction = GridsModule.EnterKeyAction;
export type EnterKeyDirection = GridsModule.EnterKeyDirection;
export type FilterExprObj = GridsModule.FilterExprObj;
export type FilterExpr = GridsModule.FilterExpr;
export type FilterExprNode = GridsModule.FilterExprNode;
export type FilterExprTree = GridsModule.FilterExprTree;
export type FilterOperation = GridsModule.FilterOperation;
export type FilterPanel<TComponent = any, TRowData = any, TKey = any> = GridsModule.FilterPanel<TComponent, TRowData, TKey>;
export type FilterPanelTexts = GridsModule.FilterPanelTexts;
Expand All @@ -330,7 +332,7 @@ export namespace Grids {
export type KeyboardNavigation = GridsModule.KeyboardNavigation;
export type KeyDownInfo = GridsModule.KeyDownInfo;
export type LoadPanel = GridsModule.LoadPanel;
export type NegatedFilterExprObj = GridsModule.NegatedFilterExprObj;
export type NegatedFilterExpr = GridsModule.NegatedFilterExpr;
export type NewRowInfo<TRowData = any> = GridsModule.NewRowInfo<TRowData>;
export type NewRowPosition = GridsModule.NewRowPosition;
export type Pager = GridsModule.Pager;
Expand Down
10 changes: 6 additions & 4 deletions packages/devextreme-react/src/common/grids.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export type {
AIColumnRequestCreatingInfo,
ApplyChangesMode,
ApplyFilterMode,
BasicFilterExprObj,
BasicFilterExpr,
ColumnAIOptions,
ColumnBase,
ColumnButtonBase,
Expand All @@ -22,7 +22,7 @@ export type {
ColumnHeaderFilterSearchConfig,
ColumnLookup,
ColumnResizeMode,
CombinedFilterExprObj,
CombinedFilterExpr,
CommandInfo,
CompositeKeyPair,
DataChange,
Expand All @@ -34,7 +34,9 @@ export type {
EditingTextsBase,
EnterKeyAction,
EnterKeyDirection,
FilterExprObj,
FilterExpr,
FilterExprNode,
FilterExprTree,
FilterOperation,
FilterPanel,
FilterPanelTexts,
Expand All @@ -55,7 +57,7 @@ export type {
KeyboardNavigation,
KeyDownInfo,
LoadPanel,
NegatedFilterExprObj,
NegatedFilterExpr,
NewRowInfo,
NewRowPosition,
Pager,
Expand Down
10 changes: 6 additions & 4 deletions packages/devextreme-react/src/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ export namespace Grids {
export type AIColumnRequestCreatingInfo<TRowData = any> = GridsModule.AIColumnRequestCreatingInfo<TRowData>;
export type ApplyChangesMode = GridsModule.ApplyChangesMode;
export type ApplyFilterMode = GridsModule.ApplyFilterMode;
export type BasicFilterExprObj = GridsModule.BasicFilterExprObj;
export type BasicFilterExpr = GridsModule.BasicFilterExpr;
export type ColumnAIOptions = GridsModule.ColumnAIOptions;
export type ColumnBase<TRowData = any> = GridsModule.ColumnBase<TRowData>;
export type ColumnButtonBase = GridsModule.ColumnButtonBase;
Expand All @@ -297,7 +297,7 @@ export namespace Grids {
export type ColumnHeaderFilterSearchConfig = GridsModule.ColumnHeaderFilterSearchConfig;
export type ColumnLookup = GridsModule.ColumnLookup;
export type ColumnResizeMode = GridsModule.ColumnResizeMode;
export type CombinedFilterExprObj = GridsModule.CombinedFilterExprObj;
export type CombinedFilterExpr = GridsModule.CombinedFilterExpr;
export type CommandInfo<TCommands extends PredefinedCommands = PredefinedCommands> = GridsModule.CommandInfo<TCommands>;
export type CompositeKeyPair = GridsModule.CompositeKeyPair;
export type DataChange<TRowData = any, TKey = any> = GridsModule.DataChange<TRowData, TKey>;
Expand All @@ -309,7 +309,9 @@ export namespace Grids {
export type EditingTextsBase = GridsModule.EditingTextsBase;
export type EnterKeyAction = GridsModule.EnterKeyAction;
export type EnterKeyDirection = GridsModule.EnterKeyDirection;
export type FilterExprObj = GridsModule.FilterExprObj;
export type FilterExpr = GridsModule.FilterExpr;
export type FilterExprNode = GridsModule.FilterExprNode;
export type FilterExprTree = GridsModule.FilterExprTree;
export type FilterOperation = GridsModule.FilterOperation;
export type FilterPanel<TComponent = any, TRowData = any, TKey = any> = GridsModule.FilterPanel<TComponent, TRowData, TKey>;
export type FilterPanelTexts = GridsModule.FilterPanelTexts;
Expand All @@ -330,7 +332,7 @@ export namespace Grids {
export type KeyboardNavigation = GridsModule.KeyboardNavigation;
export type KeyDownInfo = GridsModule.KeyDownInfo;
export type LoadPanel = GridsModule.LoadPanel;
export type NegatedFilterExprObj = GridsModule.NegatedFilterExprObj;
export type NegatedFilterExpr = GridsModule.NegatedFilterExpr;
export type NewRowInfo<TRowData = any> = GridsModule.NewRowInfo<TRowData>;
export type NewRowPosition = GridsModule.NewRowPosition;
export type Pager = GridsModule.Pager;
Expand Down
10 changes: 6 additions & 4 deletions packages/devextreme-vue/src/common/grids.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export type {
AIColumnRequestCreatingInfo,
ApplyChangesMode,
ApplyFilterMode,
BasicFilterExprObj,
BasicFilterExpr,
ColumnAIOptions,
ColumnBase,
ColumnButtonBase,
Expand All @@ -22,7 +22,7 @@ export type {
ColumnHeaderFilterSearchConfig,
ColumnLookup,
ColumnResizeMode,
CombinedFilterExprObj,
CombinedFilterExpr,
CommandInfo,
CompositeKeyPair,
DataChange,
Expand All @@ -34,7 +34,9 @@ export type {
EditingTextsBase,
EnterKeyAction,
EnterKeyDirection,
FilterExprObj,
FilterExpr,
FilterExprNode,
FilterExprTree,
FilterOperation,
FilterPanel,
FilterPanelTexts,
Expand All @@ -55,7 +57,7 @@ export type {
KeyboardNavigation,
KeyDownInfo,
LoadPanel,
NegatedFilterExprObj,
NegatedFilterExpr,
NewRowInfo,
NewRowPosition,
Pager,
Expand Down
10 changes: 6 additions & 4 deletions packages/devextreme-vue/src/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ export namespace Grids {
export type AIColumnRequestCreatingInfo<TRowData = any> = GridsModule.AIColumnRequestCreatingInfo<TRowData>;
export type ApplyChangesMode = GridsModule.ApplyChangesMode;
export type ApplyFilterMode = GridsModule.ApplyFilterMode;
export type BasicFilterExprObj = GridsModule.BasicFilterExprObj;
export type BasicFilterExpr = GridsModule.BasicFilterExpr;
export type ColumnAIOptions = GridsModule.ColumnAIOptions;
export type ColumnBase<TRowData = any> = GridsModule.ColumnBase<TRowData>;
export type ColumnButtonBase = GridsModule.ColumnButtonBase;
Expand All @@ -297,7 +297,7 @@ export namespace Grids {
export type ColumnHeaderFilterSearchConfig = GridsModule.ColumnHeaderFilterSearchConfig;
export type ColumnLookup = GridsModule.ColumnLookup;
export type ColumnResizeMode = GridsModule.ColumnResizeMode;
export type CombinedFilterExprObj = GridsModule.CombinedFilterExprObj;
export type CombinedFilterExpr = GridsModule.CombinedFilterExpr;
export type CommandInfo<TCommands extends PredefinedCommands = PredefinedCommands> = GridsModule.CommandInfo<TCommands>;
export type CompositeKeyPair = GridsModule.CompositeKeyPair;
export type DataChange<TRowData = any, TKey = any> = GridsModule.DataChange<TRowData, TKey>;
Expand All @@ -309,7 +309,9 @@ export namespace Grids {
export type EditingTextsBase = GridsModule.EditingTextsBase;
export type EnterKeyAction = GridsModule.EnterKeyAction;
export type EnterKeyDirection = GridsModule.EnterKeyDirection;
export type FilterExprObj = GridsModule.FilterExprObj;
export type FilterExpr = GridsModule.FilterExpr;
export type FilterExprNode = GridsModule.FilterExprNode;
export type FilterExprTree = GridsModule.FilterExprTree;
export type FilterOperation = GridsModule.FilterOperation;
export type FilterPanel<TComponent = any, TRowData = any, TKey = any> = GridsModule.FilterPanel<TComponent, TRowData, TKey>;
export type FilterPanelTexts = GridsModule.FilterPanelTexts;
Expand All @@ -330,7 +332,7 @@ export namespace Grids {
export type KeyboardNavigation = GridsModule.KeyboardNavigation;
export type KeyDownInfo = GridsModule.KeyDownInfo;
export type LoadPanel = GridsModule.LoadPanel;
export type NegatedFilterExprObj = GridsModule.NegatedFilterExprObj;
export type NegatedFilterExpr = GridsModule.NegatedFilterExpr;
export type NewRowInfo<TRowData = any> = GridsModule.NewRowInfo<TRowData>;
export type NewRowPosition = GridsModule.NewRowPosition;
export type Pager = GridsModule.Pager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { SearchOperation } from '@js/common/data.types';
import type { FilterExprNode, FilterExprTree } from '@js/common/grids';
import type { CommandResult } from '@ts/grids/grid_core/ai_assistant/types';
import { z } from 'zod';

Expand All @@ -9,37 +10,6 @@ const FILTER_OPS = [
'contains', 'notcontains', 'startswith', 'endswith',
] as const satisfies readonly SearchOperation[];

interface BasicFilterExpr {
type: 'basic';
field: string;
operator: SearchOperation;
value: string | number | boolean | null;
}

interface CombinedFilterExpr {
type: 'combined';
combiner: 'and' | 'or';
leftId: string;
rightId: string;
}

interface NegatedFilterExpr {
type: 'negated';
expressionId: string;
}

type FilterExpr = BasicFilterExpr | CombinedFilterExpr | NegatedFilterExpr;

interface FilterExprNode {
id: string;
expr: FilterExpr;
}

interface FilterExprTree {
rootId: string;
nodes: FilterExprNode[];
}

type FilterExprArray = | [string, SearchOperation, string | number | boolean | null]
| [FilterExprArray, 'and' | 'or', FilterExprArray]
| ['!', FilterExprArray];
Expand Down
43 changes: 34 additions & 9 deletions packages/devextreme/js/common/grids.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export type ResponseStatusTexts = {
* @public
* @namespace DevExpress.common.grids
*/
export type BasicFilterExprObj = {
export type BasicFilterExpr = {
type: 'basic';
field: string;
operator: SearchOperation;
Expand All @@ -117,29 +117,49 @@ export type BasicFilterExprObj = {
* @public
* @namespace DevExpress.common.grids
*/
export type CombinedFilterExprObj = {
export type CombinedFilterExpr = {
type: 'combined';
left: FilterExprObj;
combiner: 'and' | 'or';
right: FilterExprObj;
leftId: string;
rightId: string;
};

/**
* @docid
* @public
* @namespace DevExpress.common.grids
*/
export type NegatedFilterExprObj = {
export type NegatedFilterExpr = {
type: 'negated';
expression: FilterExprObj;
expressionId: string;
};

/**
* @docid
* @public
* @namespace DevExpress.common.grids
*/
export type FilterExprObj = BasicFilterExprObj | CombinedFilterExprObj | NegatedFilterExprObj;
export type FilterExpr = BasicFilterExpr | CombinedFilterExpr | NegatedFilterExpr;

/**
* @docid
* @public
* @namespace DevExpress.common.grids
*/
interface FilterExprNode {
id: string;
expr: FilterExpr;
}

/**
* @docid
* @public
* @namespace DevExpress.common.grids
*/
interface FilterExprTree {
rootId: string;
nodes: FilterExprNode[];
}

/**
* @docid
Expand Down Expand Up @@ -175,7 +195,7 @@ export type PredefinedCommands = {
width: number | string;
};
filterValue: {
expression: FilterExprObj | null;
expression: FilterExprTree | null;
};
clearFilter: {};
focusRowByKey: {
Expand Down Expand Up @@ -220,7 +240,12 @@ export type PredefinedCommands = {
*/
export type CommandInfo<
TCommands extends PredefinedCommands = PredefinedCommands,
> = { [K in keyof TCommands]: { name: K; args: TCommands[K] } }[keyof TCommands];
> = {
[K in keyof TCommands]: {
name: K;
args: TCommands[K]
}
}[keyof TCommands];

/**
* @docid
Expand Down
Loading
Loading