@@ -3,7 +3,7 @@ import { locate, move } from '@js/common/core/animation/translator';
33import { name as clickEventName } from '@js/common/core/events/click' ;
44import { active } from '@js/common/core/events/core/emitter.feedback' ;
55import eventsEngine from '@js/common/core/events/core/events_engine' ;
6- import { addNamespace } from '@js/common/core/events/utils/index ' ;
6+ import { addNamespace } from '@js/common/core/events/utils' ;
77import messageLocalization from '@js/common/core/localization/message' ;
88import type { dxElementWrapper } from '@js/core/renderer' ;
99import $ from '@js/core/renderer' ;
@@ -13,7 +13,6 @@ import { isMaterialBased } from '@js/ui/themes';
1313import ActionSheet from '@ts/ui/m_action_sheet' ;
1414
1515import SwitchableEditDecorator from './m_list.edit.decorator.switchable' ;
16- import EditDecoratorMenuHelperMixin from './m_list.edit.decorator_menu_helper' ;
1716import { register as registerDecorator } from './m_list.edit.decorator_registry' ;
1817
1918const LIST_EDIT_DECORATOR = 'dxListEditDecorator' ;
@@ -71,12 +70,10 @@ class SwitchableEditDecoratorSlide extends SwitchableEditDecorator {
7170 }
7271
7372 _renderMenu ( ) : void {
74- // @ts -expect-error ts-error
75- if ( ! this . _menuEnabled ( ) ) {
73+ const { menuItems } = this . _list . option ( ) ;
74+ if ( ! menuItems . length ) {
7675 return ;
7776 }
78- // @ts -expect-error ts-error
79- const menuItems = this . _menuItems ( ) ;
8077
8178 if ( menuItems . length === 1 ) {
8279 const menuItem = menuItems [ 0 ] ;
@@ -118,8 +115,8 @@ class SwitchableEditDecoratorSlide extends SwitchableEditDecorator {
118115 }
119116
120117 _renderDeleteButton ( ) : void {
121- // @ts -expect-error ts-error
122- if ( ! this . _deleteEnabled ( ) ) {
118+ const { allowItemDeleting } = this . _list . option ( ) ;
119+ if ( ! allowItemDeleting ) {
123120 return ;
124121 }
125122
@@ -140,8 +137,12 @@ class SwitchableEditDecoratorSlide extends SwitchableEditDecorator {
140137 }
141138
142139 _fireAction ( menuItem ) : void {
143- // @ts -expect-error ts-error
144- this . _fireMenuAction ( $ ( this . _cachedNode ) , menuItem . action ) ;
140+ this . _list . _itemEventHandlerByHandler (
141+ $ ( this . _cachedNode ) ,
142+ menuItem . action ,
143+ { } ,
144+ { excludeValidators : [ 'disabled' , 'readOnly' ] } ,
145+ ) ;
145146 this . _cancelDeleteReadyItem ( ) ;
146147 }
147148
@@ -297,7 +298,10 @@ class SwitchableEditDecoratorSlide extends SwitchableEditDecorator {
297298 const that = this ;
298299
299300 const currentPosition = this . _getCurrentPositions ( ) ;
300- const durationTimePart = Math . min ( Math . abs ( currentPosition . content - positions . content ) / this . _cachedButtonWidth , 1 ) ;
301+ const durationTimePart = Math . min (
302+ Math . abs ( currentPosition . content - positions . content ) / this . _cachedButtonWidth ,
303+ 1 ,
304+ ) ;
301305 // @ts -expect-error ts-error
302306 return fx . animate ( this . _$cachedContent , {
303307 from : currentPosition ,
@@ -326,6 +330,5 @@ class SwitchableEditDecoratorSlide extends SwitchableEditDecorator {
326330registerDecorator (
327331 'menu' ,
328332 'slide' ,
329- // @ts -expect-error ts-error
330- SwitchableEditDecoratorSlide . include ( EditDecoratorMenuHelperMixin ) ,
333+ SwitchableEditDecoratorSlide ,
331334) ;
0 commit comments