@@ -10,13 +10,15 @@ import NestedOption from "./core/nested-option";
1010
1111import type { ChangeEvent , ClosedEvent , ContentReadyEvent , CopyEvent , CutEvent , DisposingEvent , EnterKeyEvent , FocusInEvent , FocusOutEvent , InitializedEvent , InputEvent , ItemClickEvent , KeyDownEvent , KeyUpEvent , OpenedEvent , PasteEvent , ValueChangedEvent } from "devextreme/ui/autocomplete" ;
1212import type { ContentReadyEvent as ButtonContentReadyEvent , DisposingEvent as ButtonDisposingEvent , InitializedEvent as ButtonInitializedEvent , dxButtonOptions , ClickEvent , OptionChangedEvent } from "devextreme/ui/button" ;
13- import type { AnimationConfig , AnimationState } from "devextreme/animation/fx" ;
13+ import type { AnimationConfig , AnimationState , AnimationType } from "devextreme/animation/fx" ;
14+ import type { HorizontalAlignment , VerticalAlignment , TextEditorButtonLocation , PositionAlignment , Direction , ButtonStyle , ButtonType , ToolbarItemLocation , ToolbarItemComponent } from "devextreme/common" ;
15+ import type { CollisionResolution , PositionConfig , CollisionResolutionCombination } from "devextreme/animation/position" ;
1416import type { event , EventInfo } from "devextreme/events/index" ;
1517import type { template } from "devextreme/core/templates/template" ;
1618import type { Component } from "devextreme/core/component" ;
17- import type { PositionConfig } from "devextreme/animation/position" ;
18- import type { dxPopupToolbarItem } from "devextreme/ui/popup" ;
19+ import type { dxPopupToolbarItem , ToolbarLocation } from "devextreme/ui/popup" ;
1920import type { CollectionWidgetItem } from "devextreme/ui/collection/ui.collection_widget.base" ;
21+ import type { LocateInMenuMode , ShowTextMode } from "devextreme/ui/toolbar" ;
2022
2123import type dxOverlay from "devextreme/ui/overlay" ;
2224import type DOMComponent from "devextreme/core/dom_component" ;
@@ -151,8 +153,8 @@ const Animation = Object.assign<typeof _componentAnimation, NestedComponentMeta>
151153// owners:
152154// Position
153155type IAtProps = React . PropsWithChildren < {
154- x ?: "center" | "left" | "right" ;
155- y ?: "bottom" | "center" | "top" ;
156+ x ?: HorizontalAlignment ;
157+ y ?: VerticalAlignment ;
156158} >
157159const _componentAt = ( props : IAtProps ) => {
158160 return React . createElement ( NestedOption < IAtProps > , {
@@ -189,7 +191,7 @@ const BoundaryOffset = Object.assign<typeof _componentBoundaryOffset, NestedComp
189191// owners:
190192// Autocomplete
191193type IButtonProps = React . PropsWithChildren < {
192- location ?: "after" | "before" ;
194+ location ?: TextEditorButtonLocation ;
193195 name ?: string ;
194196 options ?: dxButtonOptions ;
195197} >
@@ -213,8 +215,8 @@ const Button = Object.assign<typeof _componentButton, NestedComponentMeta>(_comp
213215// owners:
214216// Position
215217type ICollisionProps = React . PropsWithChildren < {
216- x ?: "fit" | "flip" | "flipfit" | "none" ;
217- y ?: "fit" | "flip" | "flipfit" | "none" ;
218+ x ?: CollisionResolution ;
219+ y ?: CollisionResolution ;
218220} >
219221const _componentCollision = ( props : ICollisionProps ) => {
220222 return React . createElement ( NestedOption < ICollisionProps > , {
@@ -270,7 +272,7 @@ type IDropDownOptionsProps = React.PropsWithChildren<{
270272 onShowing ?: ( ( e : { cancel : boolean | any , component : dxOverlay < any > , element : any , model : any } ) => void ) ;
271273 onShown ?: ( ( e : EventInfo < any > ) => void ) ;
272274 onTitleRendered ?: ( ( e : { component : dxPopup , element : any , model : any , titleElement : any } ) => void ) ;
273- position ?: ( ( ) => void ) | PositionConfig | "bottom" | "center" | "left" | "left bottom" | "left top" | "right" | "right bottom" | "right top" | "top" ;
275+ position ?: ( ( ) => void ) | PositionAlignment | PositionConfig ;
274276 resizeEnabled ?: boolean ;
275277 restorePosition ?: boolean ;
276278 rtlEnabled ?: boolean ;
@@ -287,8 +289,8 @@ type IDropDownOptionsProps = React.PropsWithChildren<{
287289 wrapperAttr ?: any ;
288290 defaultHeight ?: ( ( ) => number | string ) | number | string ;
289291 onHeightChange ?: ( value : ( ( ) => number | string ) | number | string ) => void ;
290- defaultPosition ?: ( ( ) => void ) | PositionConfig | "bottom" | "center" | "left" | "left bottom" | "left top" | "right" | "right bottom" | "right top" | "top" ;
291- onPositionChange ?: ( value : ( ( ) => void ) | PositionConfig | "bottom" | "center" | "left" | "left bottom" | "left top" | "right" | "right bottom" | "right top" | "top" ) => void ;
292+ defaultPosition ?: ( ( ) => void ) | PositionAlignment | PositionConfig ;
293+ onPositionChange ?: ( value : ( ( ) => void ) | PositionAlignment | PositionConfig ) => void ;
292294 defaultVisible ?: boolean ;
293295 onVisibleChange ?: ( value : boolean ) => void ;
294296 defaultWidth ?: ( ( ) => number | string ) | number | string ;
@@ -361,14 +363,14 @@ const From = Object.assign<typeof _componentFrom, NestedComponentMeta>(_componen
361363type IHideProps = React . PropsWithChildren < {
362364 complete ?: ( ( $element : any , config : AnimationConfig ) => void ) ;
363365 delay ?: number ;
364- direction ?: "bottom" | "left" | "right" | "top" ;
366+ direction ?: Direction ;
365367 duration ?: number ;
366368 easing ?: string ;
367369 from ?: AnimationState ;
368370 staggerDelay ?: number ;
369371 start ?: ( ( $element : any , config : AnimationConfig ) => void ) ;
370372 to ?: AnimationState ;
371- type ?: "css" | "fade" | "fadeIn" | "fadeOut" | "pop" | "slide" | "slideIn" | "slideOut" ;
373+ type ?: AnimationType ;
372374} >
373375const _componentHide = ( props : IHideProps ) => {
374376 return React . createElement ( NestedOption < IHideProps > , {
@@ -420,8 +422,8 @@ const Item = Object.assign<typeof _componentItem, NestedComponentMeta>(_componen
420422// owners:
421423// Position
422424type IMyProps = React . PropsWithChildren < {
423- x ?: "center" | "left" | "right" ;
424- y ?: "bottom" | "center" | "top" ;
425+ x ?: HorizontalAlignment ;
426+ y ?: VerticalAlignment ;
425427} >
426428const _componentMy = ( props : IMyProps ) => {
427429 return React . createElement ( NestedOption < IMyProps > , {
@@ -474,11 +476,11 @@ type IOptionsProps = React.PropsWithChildren<{
474476 onInitialized ?: ( ( e : ButtonInitializedEvent ) => void ) ;
475477 onOptionChanged ?: ( ( e : OptionChangedEvent ) => void ) ;
476478 rtlEnabled ?: boolean ;
477- stylingMode ?: "text" | "outlined" | "contained" ;
479+ stylingMode ?: ButtonStyle ;
478480 tabIndex ?: number ;
479481 template ?: ( ( buttonData : { icon : string , text : string } , contentElement : any ) => string | any ) | template ;
480482 text ?: string ;
481- type ?: "danger" | "default" | "normal" | "success" ;
483+ type ?: ButtonType | string ;
482484 useSubmitBehavior ?: boolean ;
483485 validationGroup ?: string ;
484486 visible ?: boolean ;
@@ -508,22 +510,22 @@ const Options = Object.assign<typeof _componentOptions, NestedComponentMeta>(_co
508510// From
509511// DropDownOptions
510512type IPositionProps = React . PropsWithChildren < {
511- at ?: Record < string , any > | "bottom" | "center" | "left" | "left bottom" | "left top" | "right" | "right bottom" | "right top" | "top" | {
512- x ?: "center" | "left" | "right" ;
513- y ?: "bottom" | "center" | "top" ;
513+ at ?: Record < string , any > | PositionAlignment | {
514+ x ?: HorizontalAlignment ;
515+ y ?: VerticalAlignment ;
514516 } ;
515517 boundary ?: any | string ;
516518 boundaryOffset ?: Record < string , any > | string | {
517519 x ?: number ;
518520 y ?: number ;
519521 } ;
520- collision ?: Record < string , any > | "fit" | "fit flip" | "fit flipfit" | "fit none" | "flip" | "flip fit" | "flip none" | "flipfit" | "flipfit fit" | "flipfit none" | "none" | "none fit" | "none flip" | "none flipfit" | {
521- x ?: "fit" | "flip" | "flipfit" | "none" ;
522- y ?: "fit" | "flip" | "flipfit" | "none" ;
522+ collision ?: CollisionResolutionCombination | Record < string , any > | {
523+ x ?: CollisionResolution ;
524+ y ?: CollisionResolution ;
523525 } ;
524- my ?: Record < string , any > | "bottom" | "center" | "left" | "left bottom" | "left top" | "right" | "right bottom" | "right top" | "top" | {
525- x ?: "center" | "left" | "right" ;
526- y ?: "bottom" | "center" | "top" ;
526+ my ?: Record < string , any > | PositionAlignment | {
527+ x ?: HorizontalAlignment ;
528+ y ?: VerticalAlignment ;
527529 } ;
528530 of ?: any | string ;
529531 offset ?: Record < string , any > | string | {
@@ -549,14 +551,14 @@ const Position = Object.assign<typeof _componentPosition, NestedComponentMeta>(_
549551type IShowProps = React . PropsWithChildren < {
550552 complete ?: ( ( $element : any , config : AnimationConfig ) => void ) ;
551553 delay ?: number ;
552- direction ?: "bottom" | "left" | "right" | "top" ;
554+ direction ?: Direction ;
553555 duration ?: number ;
554556 easing ?: string ;
555557 from ?: AnimationState ;
556558 staggerDelay ?: number ;
557559 start ?: ( ( $element : any , config : AnimationConfig ) => void ) ;
558560 to ?: AnimationState ;
559- type ?: "css" | "fade" | "fadeIn" | "fadeOut" | "pop" | "slide" | "slideIn" | "slideOut" ;
561+ type ?: AnimationType ;
560562} >
561563const _componentShow = ( props : IShowProps ) => {
562564 return React . createElement ( NestedOption < IShowProps > , {
@@ -599,16 +601,16 @@ type IToolbarItemProps = React.PropsWithChildren<{
599601 cssClass ?: string ;
600602 disabled ?: boolean ;
601603 html ?: string ;
602- locateInMenu ?: "always" | "auto" | "never" ;
603- location ?: "after" | "before" | "center" ;
604+ locateInMenu ?: LocateInMenuMode ;
605+ location ?: ToolbarItemLocation ;
604606 menuItemTemplate ?: ( ( ) => string | any ) | template ;
605607 options ?: any ;
606- showText ?: "always" | "inMenu" ;
608+ showText ?: ShowTextMode ;
607609 template ?: ( ( itemData : CollectionWidgetItem , itemIndex : number , itemElement : any ) => string | any ) | template ;
608610 text ?: string ;
609- toolbar ?: "bottom" | "top" ;
611+ toolbar ?: ToolbarLocation ;
610612 visible ?: boolean ;
611- widget ?: "dxAutocomplete" | "dxButton" | "dxButtonGroup" | "dxCheckBox" | "dxDateBox" | "dxDropDownButton" | "dxMenu" | "dxSelectBox" | "dxSwitch" | "dxTabs" | "dxTextBox" ;
613+ widget ?: ToolbarItemComponent ;
612614 menuItemRender ?: ( ...params : any ) => React . ReactNode ;
613615 menuItemComponent ?: React . ComponentType < any > ;
614616 render ?: ( ...params : any ) => React . ReactNode ;
0 commit comments